/* crew — the Crew screen, the challenge card (components/challenge.js) and the
   challenge builder (components/builder.js). See public/css/app.css for tokens.
   Tokens only; every rule works in both themes. Targets are 44px, primary
   actions 48px; nothing under 11px, no sentence under 13px. Motion is
   transform/opacity only and stops under reduce-motion (app.css). */

/* ------------------------------------------------------------ shared bits */
/* "Your move": calm, not a warning — the accent wash, the same as a hint. */
.tag.move { background: var(--seaglass-wash); color: var(--accent-text); }

.crew > section,
.crew > .card { margin-bottom: var(--sp-6); }
.crew .section-title { margin-top: 0; }
.crew .section-title .tag { flex: none; }
.crew-new { margin: -8px -6px -8px 0; color: var(--accent-text); }
.crew .section-title .btn.quiet { color: var(--accent-text); }

.crew-note {
  margin: var(--sp-2) 4px 0;
  font-size: var(--fs-note); line-height: 1.5; color: var(--ink-3);
}
.crew-sheet-lead {
  margin-bottom: var(--sp-4);
  font-size: var(--fs-body); line-height: 1.55; color: var(--ink-2);
}
.crew .is-quiet { color: var(--ink-3); }

/* --------------------------------------------------------- crew of one */
.crew-invite-head { display: flex; align-items: flex-start; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.crew-invite-glyph {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--seaglass) 14%, var(--surface));
  color: var(--accent-text);
}
.crew-invite h2 { font-size: var(--fs-h3); font-weight: 650; line-height: 1.3; }
.crew-invite-lead { margin-top: 4px; font-size: var(--fs-body); line-height: 1.5; color: var(--ink-2); }

/* ------------------------------------------------------------ your move */
.crew-inbox .card.item-group { margin-bottom: 0; }
.crew-inbox .hint-callout { margin-bottom: var(--sp-3); }

/* ---------------------------------------------------- this week together */
.crew-week .card-head h2 { font-size: var(--fs-h3); font-weight: 650; }
.crew-week-ring { display: flex; align-items: center; gap: var(--sp-4); margin: var(--sp-1) 0 var(--sp-4); }
.crew-week-caption { font-size: var(--fs-body); line-height: 1.45; color: var(--ink); }
.crew-week-caption.is-quiet { color: var(--ink-3); margin-bottom: var(--sp-3); }
.crew-week-sub { margin-top: 2px; font-size: var(--fs-note); line-height: 1.45; color: var(--ink-3); }

.crew-people { display: flex; flex-direction: column; gap: var(--sp-2); }
.crew-person {
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: 56px; padding: var(--sp-2) 0;
}
.crew-person + .crew-person { border-top: 1px solid var(--line-soft); }
.crew-person-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.crew-person-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); }
.crew-person-name { font-size: var(--fs-md); font-weight: 600; line-height: 1.3; }
.crew-person-pct {
  font-family: var(--font-display); font-size: var(--fs-md); font-weight: 650;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.crew-person-private {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-note); font-weight: 600; color: var(--ink-3);
}
.crew-person-note { font-size: var(--fs-note); line-height: 1.45; color: var(--ink-3); }
.crew-hi5 {
  font-size: 1.3rem;
  border-color: var(--line); background: var(--surface-2);
}
.crew-hi5:active { transform: scale(.9); }

.crew-contest {
  margin-top: var(--sp-3); padding-top: var(--sp-3);
  border-top: 1px dashed var(--line);
}
.crew-contest-title {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-note); font-weight: 650; color: var(--ink-2);
}
.crew-contest-title svg { color: var(--ink-3); flex: none; }
.crew-contest-text { margin-top: 4px; font-size: var(--fs-body); line-height: 1.5; color: var(--ink); }

/* ------------------------------------------------------ the challenge card */
.challenge-card { position: relative; }
.challenge-head { display: flex; align-items: flex-start; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.challenge-emoji {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.35rem; line-height: 1;
  background: color-mix(in srgb, var(--seaglass) 14%, var(--surface));
}
.challenge-titles { flex: 1 1 auto; min-width: 0; }
.challenge-titles h3 {
  font-size: var(--fs-h3); font-weight: 650; line-height: 1.3; color: var(--ink);
  overflow-wrap: anywhere;
}
.challenge-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.challenge-tags .tag { max-width: 100%; }
.challenge-vis svg { flex: none; }
.challenge-card .challenge-purpose {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-body); line-height: 1.5; color: var(--ink-2);
}

/* The rule as a list, one clause per line: this is what both people agree to. */
.challenge-rules {
  margin: 0; padding-left: 18px;
  font-size: var(--fs-body); line-height: 1.5; color: var(--ink);
}
.challenge-rules li + li { margin-top: 4px; }
.challenge-rules li::marker { color: var(--ink-3); }

/* Waiting on me: the sentence is open and first, on the accent wash. */
.challenge-agree {
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  border-radius: var(--r);
  background: var(--seaglass-wash);
  border: 1px solid color-mix(in srgb, var(--seaglass) 30%, transparent);
}
.challenge-agree .overline { margin-top: 0; }
.challenge-agree .overline::after { background: color-mix(in srgb, var(--seaglass) 30%, transparent); }
.challenge-agree-note { margin-top: var(--sp-3); font-size: var(--fs-note); line-height: 1.5; color: var(--ink-2); }
.challenge-agree-actions { margin-top: var(--sp-3); }
.challenge-agree-actions .btn { min-height: var(--tap); }
.challenge-agree-more { margin-top: var(--sp-1); color: var(--accent-text); }

.challenge-waiting {
  font-size: var(--fs-note); line-height: 1.5; color: var(--ink-3);
  padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px dashed var(--line);
}

.challenge-card .challenge-people { display: flex; flex-direction: column; margin-top: var(--sp-3); gap: 0; }
.challenge-person {
  display: flex; align-items: center; gap: var(--sp-2);
  min-height: 36px; font-size: var(--fs-note);
}
.challenge-person + .challenge-person { border-top: 1px solid var(--line-soft); }
.challenge-person-avatar { flex: none; width: 24px; text-align: center; }
.challenge-person-name { flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--ink); }
.challenge-person-value { flex: none; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.challenge-person-value.is-private { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); }

.challenge-how { margin-top: var(--sp-2); }
.challenge-how > .disclosure-body { padding-bottom: var(--sp-1); }
.challenge-rule-note { margin-top: var(--sp-2); font-size: var(--fs-note); line-height: 1.5; color: var(--ink-2); }

.challenge-reward {
  display: flex; align-items: flex-start; gap: var(--sp-2);
  margin-top: var(--sp-3); font-size: var(--fs-note); line-height: 1.5; color: var(--ink-2);
}
.challenge-reward b { color: var(--ink); }

.challenge-card .challenge-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--sp-2);
  margin-top: var(--sp-2);
}
.challenge-actions .btn.quiet { color: var(--ink-2); }
.challenge-actions .btn.quiet svg { color: var(--ink-3); }

/* Arrived at from a link (#/crew/challenges/<id>) or the inbox: a ring, no
   movement, so it needs nothing special under reduce-motion. */
.challenge-card.is-highlighted {
  border-color: var(--seaglass);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--seaglass) 55%, transparent), var(--shadow-2);
}
.challenge-card:focus { outline: none; }
.challenge-card:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

.crew-finished { margin-top: var(--sp-2); }
.crew-finished > .disclosure-body > .card { box-shadow: none; }

/* The compact row on Today: the bar under the name, full width. */
.challenge-mini { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.challenge-mini-label { font-size: var(--fs-caption); color: var(--ink-3); }

/* ----------------------------------------------------------------- bingo */
.bingo-grid {
  display: grid; gap: var(--sp-2);
  grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr));
}
.bingo-sq {
  position: relative; appearance: none; cursor: pointer;
  aspect-ratio: 1; min-height: 76px; padding: var(--sp-2) 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface-2); color: var(--ink);
  font: inherit; text-align: center;
  transition: transform var(--dur-1) var(--ease), background var(--dur-2), border-color var(--dur-2);
}
.bingo-sq:active { transform: scale(.96); }
.bingo-sq:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.bingo-emoji { font-size: 1.4rem; line-height: 1; }
.bingo-label {
  font-size: var(--fs-caption); line-height: 1.25; color: var(--ink-2); font-weight: 560;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
/* Done keeps its own emoji, so the board stays a record of what you did. */
.bingo-sq.is-done {
  background: var(--seaglass-wash);
  border-color: color-mix(in srgb, var(--seaglass) 60%, transparent);
}
.bingo-sq.is-done .bingo-label { color: var(--ink); }
.bingo-check {
  position: absolute; top: 6px; right: 6px;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad-accent); color: var(--on-accent);
}
/* A finished line: a warm edge, shape as well as colour (the ring is inset). */
.bingo-sq.in-line { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--sun) 75%, transparent); }
.crew-bingo-over { margin-top: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); }

/* -------------------------------------------------------- walks together */
.crew-outing-list { margin-bottom: 0; }
.crew-outing-list .avatar-stack { flex: none; }
/* Taking one back: kept at the foot of the sheet, under everything it says. */
.crew-outing-remove { margin-top: var(--sp-6); display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-2); }

/* ------------------------------------------------------------ the review */
.crew-review-last { margin-bottom: var(--sp-4); }
.crew-review-quote {
  margin: 0 0 var(--sp-2); padding: var(--sp-2) var(--sp-3);
  border-left: 3px solid var(--seaglass); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--surface-2);
}
.crew-review-quote p { font-size: var(--fs-body); line-height: 1.5; color: var(--ink); }
.crew-review-quote footer { margin-top: 2px; font-size: var(--fs-caption); color: var(--ink-3); }
.crew-review-lead { margin-bottom: var(--sp-3); font-size: var(--fs-body); line-height: 1.5; color: var(--ink-2); }
.crew-review-answer {
  margin-bottom: var(--sp-3); padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--line-soft);
}
.crew-review-who {
  display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
  font-size: var(--fs-md); font-weight: 600; color: var(--ink);
}
.crew-review-answer dl { margin: 0; }
.crew-review-answer dt {
  margin-top: 6px; font-size: var(--fs-caption); font-weight: 650;
  letter-spacing: .02em; color: var(--ink-3);
}
.crew-review-answer dd { margin: 2px 0 0; font-size: var(--fs-body); line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.crew-review .btn.block { min-height: var(--tap); }

.card.crew-review-stats {
  background: var(--surface-2); box-shadow: none;
  padding: var(--sp-2) var(--sp-4); margin-bottom: var(--sp-4);
}
.crew-review-stat {
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2);
  min-height: 36px; font-size: var(--fs-note); color: var(--ink-2);
}
.crew-review-stat + .crew-review-stat { border-top: 1px solid var(--line-soft); }
.crew-review-stat .num { font-variant-numeric: tabular-nums; }
.crew-review-theirs { margin-bottom: var(--sp-4); }
.crew-review-theirs .crew-review-answer { border-bottom: 0; padding-bottom: 0; }

/* ----------------------------------------------------------- between you */
.crew-feed-actions { margin-bottom: var(--sp-2); }
/* Rows run edge to edge inside the padded card. */
.crew-feed .crew-feed-list { margin: 0 calc(-1 * var(--pad)); }
.crew-feed-list > .item .item-lead svg { color: var(--ink-3); }
.crew-feed-empty { font-size: var(--fs-body); line-height: 1.5; color: var(--ink-2); padding: var(--sp-1) 0; }
.crew-feed-more { margin-top: var(--sp-1); }

/* ------------------------------------------------------------ the builder */
.builder-step { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: var(--sp-4); }
.builder-step-label { font-size: var(--fs-note); font-weight: 600; color: var(--ink-3); }
/* Focus lands here on each step for a screen reader; it is not a control. */
.builder-step-label:focus { outline: none; }
.builder-intro { margin-bottom: var(--sp-3); font-size: var(--fs-body); line-height: 1.5; color: var(--ink-2); }

.builder-templates { margin-bottom: 0; }
.builder-template-sub { display: flex; flex-direction: column; gap: 3px; }
.builder-template-facts { font-size: var(--fs-caption); font-weight: 600; color: var(--ink-3); letter-spacing: .01em; }
.builder-templates > .item:last-child .item-lead {
  background: transparent; border: 1.5px dashed var(--line-strong); color: var(--accent-text);
}

.builder-target { display: flex; align-items: center; gap: var(--sp-2); }
.builder-target input { flex: 1 1 auto; min-width: 0; }
.builder-target .tag { flex: none; }

/* "Who it's for": four full-width choices, the plain words first. */
.builder-who { display: flex; flex-direction: column; gap: var(--sp-2); }
.builder-choice {
  appearance: none; cursor: pointer; width: 100%;
  display: flex; align-items: flex-start; gap: var(--sp-3);
  min-height: 56px; padding: var(--sp-3);
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink); font: inherit; text-align: left;
  transition: transform var(--dur-1) var(--ease), background var(--dur-2), border-color var(--dur-2);
}
.builder-choice:active { transform: scale(.98); }
.builder-choice:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.builder-choice[aria-pressed="true"] {
  background: var(--seaglass-wash);
  border-color: color-mix(in srgb, var(--seaglass) 70%, transparent);
}
.builder-choice-dot {
  flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--line-strong); background: var(--surface);
}
.builder-choice[aria-pressed="true"] .builder-choice-dot {
  border-color: transparent; background: var(--grad-accent); color: var(--on-accent);
}
.builder-choice-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.builder-choice-title { font-size: var(--fs-md); font-weight: 600; line-height: 1.35; }
.builder-choice-sub { font-size: var(--fs-note); line-height: 1.45; color: var(--ink-3); }

/* Step 3: the preview first, on the accent wash, because it is the agreement. */
.card.builder-preview {
  background: var(--seaglass-wash);
  border-color: color-mix(in srgb, var(--seaglass) 30%, transparent);
  box-shadow: none; margin-bottom: var(--sp-4);
}
.builder-preview .overline { margin-top: 0; }
.builder-preview .overline::after { background: color-mix(in srgb, var(--seaglass) 30%, transparent); }
.builder-summary { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.builder-summary b { display: block; font-size: var(--fs-h3); font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.builder-summary-emoji {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.35rem;
  background: var(--surface);
}
.builder-preview-text { min-height: 3em; }
.builder-preview-error {
  display: flex; align-items: flex-start; gap: 6px; margin-bottom: var(--sp-2);
  font-size: var(--fs-note); line-height: 1.5; color: var(--ink-2);
}
.builder-preview-error svg { flex: none; margin-top: 1px; color: var(--ink-3); }
.builder-preview-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
  margin-top: var(--sp-3); font-size: var(--fs-note); line-height: 1.5; color: var(--ink-2);
}

.builder-version-note {
  display: flex; align-items: flex-start; gap: var(--sp-2);
  margin-bottom: var(--sp-3); font-size: var(--fs-note); line-height: 1.5; color: var(--ink-2);
}
.builder-version-note svg { flex: none; margin-top: 1px; color: var(--accent-text); }

.builder-more { margin-top: var(--sp-1); }
/* A field that does not apply to this measure or mode steps aside. .field
   sets display, which would otherwise beat the hidden attribute. */
.builder-more .field[hidden] { display: none; }
.builder-more > .disclosure-body { padding-top: var(--sp-3); }
.builder-emoji .chip { font-size: 1.2rem; min-width: var(--tap-min); justify-content: center; padding: 6px; }
.builder-hint { margin: -6px 0 var(--sp-3); font-size: var(--fs-note); line-height: 1.5; color: var(--ink-3); }
.builder-foot .btn { min-height: var(--tap); }

@media (max-width: 360px) {
  .bingo-sq { min-height: 68px; padding: 6px 4px; }
  .builder-choice { padding: var(--sp-2) var(--sp-3); }
}

/* ------------------------------------------------------- crew settings */
/* A quiet way to the shared rules, under the crew summary: findable, never loud. */
.crew-settings-row { display: flex; justify-content: flex-end; margin: var(--sp-2) -8px -6px 0; }
.crew-settings-link { min-height: var(--tap-min); color: var(--accent-text); gap: 6px; }
.crew-settings-link svg { flex: none; }

/* ------------------------------------------------- the week in the log */
/* "What you did": a page of the log, on the passport's sand paper.
   Every line is a fact from a fixed template, each with where it came from.
   No sentence here joins behaviour to the band (plan W2.9). */
.card.recap-card {
  background: var(--sand);
  border-color: var(--sand-deep);
  box-shadow: none;
  margin-bottom: var(--sp-4);
}
.recap-head {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap;
  gap: 2px var(--sp-3); margin-bottom: var(--sp-2);
}
.recap-head h3 { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 650; line-height: 1.3; color: var(--ink); }
.recap-when { font-size: var(--fs-caption); font-weight: 600; letter-spacing: .02em; color: var(--ink-3); }
.recap-lines { list-style: none; margin: 0; padding: 0; }
.recap-line {
  display: flex; align-items: flex-start; flex-wrap: wrap; gap: 2px var(--sp-2);
  padding: 6px 0; min-height: 28px;
  font-size: var(--fs-body); line-height: 1.45; color: var(--ink);
}
.recap-line + .recap-line { border-top: 1px dashed color-mix(in srgb, var(--sand-deep) 90%, transparent); }
.recap-glyph { flex: none; width: 22px; text-align: center; line-height: 1.45; }
.recap-text { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.recap-line > .tag { flex: none; margin-left: auto; margin-top: 1px; }
.recap-empty { font-size: var(--fs-note); line-height: 1.5; color: var(--ink-2); }
.recap-board {
  margin-top: var(--sp-3); padding-top: var(--sp-2);
  border-top: 1px solid color-mix(in srgb, var(--sand-deep) 90%, transparent);
}
.recap-board-title {
  font-size: var(--fs-overline); font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 2px;
}
.recap-foot { margin-top: var(--sp-3); font-size: var(--fs-note); line-height: 1.5; color: var(--ink-2); }

/* "What your band measured": owner-only, folded, after the questions. */
.recap-band {
  margin-top: var(--sp-2); padding: 0 var(--sp-3);
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface-2);
}
.recap-band > summary { min-height: var(--tap); }
.recap-band-summary { display: flex; align-items: center; gap: var(--sp-2); font-weight: 620; color: var(--ink); }
.recap-band-lock { flex: none; display: inline-grid; color: var(--ink-3); }
.recap-band-count { margin-left: auto; font-size: var(--fs-caption); font-weight: 600; color: var(--ink-3); }
.recap-band .disclosure-body { padding-bottom: var(--sp-3); }
.recap-band-lead { margin-bottom: var(--sp-2); font-size: var(--fs-note); line-height: 1.5; color: var(--ink-2); }
.recap-band .recap-line + .recap-line { border-top-color: var(--line-soft); }
.recap-trends { margin-top: var(--sp-2); color: var(--accent-text); gap: 6px; }

/* ------------------------------------------------ the walk-together ribbon */
/* Two walks on one clock. Each row is a 44px button; the track sits after a
   fixed name column, and the axis, the wash and every bar are placed on the
   same track with --a (start) and --w (width), fractions of the clock. */
.ribbon-slot { margin-bottom: var(--sp-4); }
.ribbon-skeleton { height: 128px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-soft); }
.ribbon {
  --lab: 6.25rem;
  --end: 6px;
  margin: 0; padding: var(--sp-3) var(--sp-2) var(--sp-3) 0;
  border: 1px solid var(--line-soft); border-radius: var(--r);
  background: var(--surface-2);
}
.ribbon-axis { position: relative; height: 18px; margin: 0 var(--end) 4px var(--lab); }
.ribbon-tick {
  position: absolute; top: 0; left: calc(var(--a) * 100%);
  /* Start-aligned at the left edge, end-aligned at the right, centred between. */
  transform: translateX(calc(var(--a) * -100%));
  font-size: var(--fs-overline); font-weight: 600; line-height: 18px;
  color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.ribbon-plot { position: relative; display: flex; flex-direction: column; gap: 2px; }
.ribbon-wash {
  position: absolute; top: 0; bottom: 0; z-index: 0; pointer-events: none;
  left: calc(var(--lab) + (100% - var(--lab) - var(--end)) * var(--a));
  width: calc((100% - var(--lab) - var(--end)) * var(--w));
  border-radius: var(--r-xs);
  background: color-mix(in srgb, var(--seaglass) 14%, transparent);
  box-shadow: inset 1px 0 0 color-mix(in srgb, var(--seaglass) 55%, transparent),
              inset -1px 0 0 color-mix(in srgb, var(--seaglass) 55%, transparent);
}
.ribbon-row {
  position: relative; z-index: 1;
  appearance: none; display: flex; align-items: center;
  width: 100%; min-height: var(--tap-min); margin: 0; padding: 0 var(--end) 0 0;
  border: 0; border-radius: var(--r-sm); background: transparent;
  color: var(--ink); font: inherit; text-align: left;
}
button.ribbon-row { cursor: pointer; }
button.ribbon-row:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -2px; }
button.ribbon-row[aria-pressed="true"] { background: color-mix(in srgb, var(--ink) 5%, transparent); }
button.ribbon-row[aria-pressed="true"] .ribbon-name { color: var(--ink); font-weight: 700; }
.ribbon-who {
  flex: none; width: var(--lab); padding-left: var(--sp-3);
  display: flex; align-items: center; gap: 6px; min-width: 0;
  font-size: var(--fs-note); font-weight: 600; color: var(--ink-2);
}
.ribbon-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ribbon-track {
  flex: 1 1 auto; position: relative; height: 14px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--line) 55%, transparent);
}
.ribbon-bar {
  position: absolute; top: 0; bottom: 0;
  left: calc(var(--a) * 100%); width: calc(var(--w) * 100%);
  border-radius: var(--r-pill);
  background: var(--seaglass);
  transform-origin: left center;
  animation: ss-ribbon-draw var(--dur-3) var(--ease) both;
}
/* The other person's walk: their own colour, the one Trends uses for them. */
.ribbon-row.is-mate .ribbon-bar { background: color-mix(in srgb, var(--plum) 80%, var(--seaglass)); animation-delay: 60ms; }
/* The overlap lane: no track, a taller wash-filled capsule with the minutes. */
.ribbon-row.is-together .ribbon-track { background: none; height: 26px; }
.ribbon-bar.is-together {
  display: grid; place-items: center; min-width: 44px;
  background: var(--seaglass-wash);
  border: 1.5px solid var(--seaglass);
  animation-delay: 140ms;
}
.ribbon-bar-note {
  font-size: var(--fs-caption); font-weight: 650; line-height: 1; white-space: nowrap;
  color: var(--accent-text); font-variant-numeric: tabular-nums;
}
/* Dashed means one thing in this app: on its way. */
.ribbon-bar.is-provisional {
  display: grid; place-items: center;
  background: transparent; border: 1.5px dashed var(--pending);
  animation: none;
}
.ribbon-row.is-pending .ribbon-track { background: none; height: 22px; }
.ribbon-bar.is-provisional .ribbon-bar-note { color: var(--pending-text); font-weight: 600; }
@keyframes ss-ribbon-draw {
  from { transform: scaleX(0); opacity: .4; }
  to   { transform: scaleX(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .ribbon-bar { animation: none; } }
:root[data-reduce-motion] .ribbon-bar { animation: none; }

.ribbon-readout {
  display: block; min-height: 1.5em; margin: var(--sp-2) var(--sp-2) 0 var(--sp-3);
  font-size: var(--fs-note); line-height: 1.5; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.ribbon-together-line {
  margin: var(--sp-3) 2px 0;
  font-size: var(--fs-body); font-weight: 620; line-height: 1.45; color: var(--ink);
}
.ribbon-note { margin: var(--sp-2) 2px 0; font-size: var(--fs-note); line-height: 1.5; color: var(--ink-3); }
.ribbon-note.is-private { display: flex; align-items: flex-start; gap: 6px; }
.ribbon-note.is-private svg { flex: none; margin-top: 2px; }

/* Your own zones, below the clock (the ring itself is wearable.css). */
.ribbon-zones { margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--line-soft); }
.ribbon-zones-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px var(--sp-2); margin-bottom: var(--sp-2); }
.ribbon-zones-head h3 { font-size: var(--fs-md); font-weight: 650; color: var(--ink); }
.tag.ribbon-private { display: inline-flex; align-items: center; gap: 4px; background: var(--line-soft); color: var(--ink-2); }
