/* ── You view ── */

/* Fills the .feed page column (which provides the outer padding). */
.you-view {
  width: 100%;
}

.you-total {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.you-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.you-disc-card {
  flex: 1;
  min-width: 100px;
  /* A sparse account (one or two disciplines) should not stretch its cards
     across the whole dashboard column. */
  max-width: 220px;
  background: var(--surface);
  border-radius: 12px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  box-shadow: var(--shadow-sm);
}

.you-disc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  height: 28px;
}

.you-disc-icon .at-icon {
  width: 26px;
  height: 26px;
  vertical-align: 0;
}

.you-th .at-icon {
  vertical-align: -3px;
  margin-right: 2px;
  opacity: 0.7;
}

.you-disc-name {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.you-disc-dist {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.you-disc-dur {
  font-size: 0.78rem;
  color: var(--text-subtle);
}

.you-year-section {
  margin-bottom: 24px;
}

.you-year-heading {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

/* The unknown bucket (issue #905): the activities that belong to no month.
   Set apart from the year tables so it does not read as one more year, and
   carrying a line of prose saying what is in it — the point of the bucket is
   that the reader is told, not that the number is hidden. */
.you-undated-section {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.you-undated-note {
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-bottom: 8px;
  max-width: 60ch;
}

.you-table-wrap {
  overflow-x: auto;
}

.you-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: 0.82rem;
}

.you-th {
  background: var(--surface-alt);
  padding: 8px 12px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.you-th-month {
  width: 48px;
}

.you-month {
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-subtle);
  border-right: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.you-cell {
  padding: 6px 12px;
  border-left: 1px solid var(--border-subtle);
}

tbody tr + tr .you-month,
tbody tr + tr .you-cell {
  border-top: 1px solid var(--border-subtle);
}

.you-cell-dist {
  font-weight: 700;
  color: var(--text);
}

.you-cell-dur {
  font-size: 0.72rem;
  color: var(--text-subtle);
}

.you-cell-empty {
  color: var(--border-strong);
  text-align: center;
}

/* ── Goals section ── */

.you-goals {
  margin-bottom: 28px;
}

.you-goals-heading {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-muted);
  margin: 0 0 12px;
  letter-spacing: -0.3px;
}

.you-goals-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.you-goal-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  flex: 1 1 220px;
  min-width: 200px;
}

.you-goal-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.you-goal-card-subtitle {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-bottom: 4px;
}

.you-goal-bar {
  height: 8px;
  background: var(--surface-alt);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.you-goal-bar-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 999px;
  transition: width 0.3s ease, background 0.2s ease;
}

.you-goal-bar-fill.complete {
  background: var(--accent);
}

.you-goal-bar-fill.warning {
  background: var(--warning);
}

.you-goal-bar-fill.danger {
  background: var(--danger);
}

.you-goal-card-numbers {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.you-goal-add {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  width: 84px;
  min-height: 58px;
  transition: width 0.25s ease, padding 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.you-goal-add.open {
  width: 100%;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.you-goal-add-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 42px; /* golden ratio: 68 / 42 ≈ 1.619 */
  border-radius: 10px;
  border: none;
  background: var(--brand-soft);
  color: var(--brand);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  align-self: flex-start;
  font-family: inherit;
  transition: filter 0.15s ease;
}

.you-goal-add-chip:hover {
  filter: brightness(0.96);
}

.you-goal-add-chip .at-icon {
  width: 22px;
  height: 22px;
  vertical-align: 0;
}

.you-goal-form {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, margin-top 0.3s ease;
  margin-top: 0;
}

.you-goal-add.open .you-goal-form {
  max-height: 600px;
  margin-top: 14px;
}

.you-goal-form-row {
  margin-bottom: 14px;
}

.you-goal-form-row:last-of-type {
  margin-bottom: 0;
}

.you-goal-target-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.you-goal-value {
  width: 100px;
  padding: 6px 8px;
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  background: var(--surface);
  color: var(--text);
}

.you-goal-value:focus {
  border-color: var(--accent);
}

.you-goal-suffix {
  font-size: 0.85rem;
  color: var(--text-subtle);
}

.you-goal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.you-goal-cancel {
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.you-goal-cancel:hover {
  color: var(--text);
  background: var(--surface-alt);
}

.you-goal-save {
  padding: 8px 16px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.you-goal-save:hover:not(:disabled) {
  background: var(--brand-hover);
}

.you-goal-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Where the route library lives now that Routes left the main navigation. */

/* ── The journal (#2320) ──────────────────────────────────────────────────
   The You tab, and a person's page, laid out as adventures, stories and the
   rest by week. Tokens only; the wall's own card styles do the cards. */

.you-profile {
  gap: var(--space-5);
}

.you-year {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.you-year-kicker {
  margin: 0;
  color: var(--ink-muted);
}

.you-year-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: var(--space-4);
  margin: 0;
}

.you-year-figures dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-heading);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-display);
  color: var(--ink);
}

.you-year-figures dt {
  order: 2;
  font-size: var(--fs-small);
  color: var(--ink-muted);
}

.you-year-figures > div {
  display: flex;
  flex-direction: column;
}

.you-chart {
  width: 100%;
  height: auto;
  max-height: 5rem;
}

.you-chart-bar {
  fill: var(--border-control);
}

.you-chart-peak {
  fill: var(--accent);
}

.you-journal {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.journal {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.journal-filter {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: var(--space-2);
  min-height: 44px;
  font-size: var(--fs-small);
  color: var(--ink-muted);
  cursor: pointer;
}

.journal-filter input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--accent);
}

.journal-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.journal-h {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-heading);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-display);
  color: var(--ink);
}

.journal-covers,
.journal-stories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
  gap: var(--space-4);
}

.journal-cover {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-2);
  min-height: 11rem;
  padding: var(--space-5);
  box-sizing: border-box;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.journal-cover:hover {
  background: var(--surface-alt);
}

.journal-cover-underway {
  border-color: var(--band-bg);
  background: var(--band-bg);
  color: var(--on-dark);
}

.journal-cover-underway:hover {
  background: var(--band-bg);
  border-color: var(--on-dark-accent);
}

.journal-cover-kicker {
  color: var(--ink-muted);
}

.journal-cover-underway .journal-cover-kicker {
  color: var(--on-dark-accent);
}

.journal-cover-name {
  font-family: var(--font-display);
  font-size: var(--fs-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-display);
  overflow-wrap: anywhere;
}

.journal-cover-meta {
  font-size: var(--fs-small);
  color: var(--ink-muted);
}

.journal-cover-underway .journal-cover-meta {
  color: var(--on-dark-muted);
}

/* A cover stands in a grid cell as tall as the tallest in its row. */
.journal-cover-item {
  display: flex;
}

.journal-cover-item > .journal-cover {
  flex: 1;
  min-width: 0;
}

/* An adventure with a map: the map the wall's card shows, across the top of
   the cover and to its edges, under the text's own padding. */
.journal-cover-has-media {
  overflow: hidden;
}

.journal-cover-media {
  margin: calc(-1 * var(--space-5)) calc(-1 * var(--space-5)) var(--space-2);
}

.journal-cover-media .card-map-img,
.journal-cover-media .card-map-placeholder {
  display: block;
  width: 100%;
  height: 9rem;
}

.journal-cover-progress {
  overflow-wrap: anywhere;
}

.journal-kudos {
  align-self: flex-end;
}

.journal-week {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.journal-week-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
}

.journal-week-name {
  margin: 0;
  color: var(--ink);
}

.journal-week-figures {
  font-size: var(--fs-small);
  color: var(--ink-muted);
}

.journal-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.journal-audience {
  align-self: flex-end;
  font-size: var(--fs-small);
  color: var(--ink-muted);
}

.journal-route {
  align-self: flex-end;
  font-size: var(--fs-small);
  color: var(--ink-muted);
}

.journal-more {
  align-self: flex-start;
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--border-control);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.journal-more:hover {
  background: var(--surface-alt);
}
