/* =====================================================================
   MARROW FOR COACHES.  coach/coach.css
   The /coach/ page's own sections on the public system (2026-10-09, lane 3
   of ~/.edwinstrong/design-canon/public-rollout-plan-20261008.md, section
   3.2). Loads after assets/public/public.css and public-app.css, and only
   adds what this page alone draws:
     .cx-send   the signature: two phones, one send, one line between them
     .cx-tools  the eight ringed tools on the dark band
     .cx-mod    every modality, and the proof row under it
   The two app screens are replicated from marrow-app a7a84d09 in its own
   390 point space with its own values (src/constants/theme.ts, the hybrid):
     .cx-pane-send   the program editor's send panel
                     (app/(coach)/program-editor.tsx, AssignProgramPanel.tsx)
     .cx-pane-train  the member Train tab's program card in a branded build
                     (app/(tabs)/program.tsx, AssignedProgramSurface.tsx)
   Motion: one sequence per section, plays once on .is-in and rests; every
   start state sits under html.pub-armed, so reduced motion and Pause motion
   show the rest state. Only opacity, transform and stroke-dashoffset move.
   Colours through tokens only. No em or en dashes.
   ===================================================================== */

/* ---------- 2. The signature: write it once, it lands on every phone ---------- */
#main .cx-send-head { max-width: 760px; }
#main .cx-stage { display: grid; grid-template-columns: 300px 168px 300px; justify-content: center; align-items: center; column-gap: 20px; margin-top: 16px; }
#main .cx-col { display: flex; flex-direction: column; align-items: center; gap: 20px; min-width: 0; }
#main .cx-cap { margin: 0; display: inline-flex; align-items: baseline; gap: 10px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-secondary); }
#main .cx-cap b { font-weight: 500; color: var(--marrow-accent); }
#main .cx-device { --s: 0.71282; width: 300px; }

/* The wire between the two phones. */
#main .cx-wire { position: relative; display: grid; place-items: center; height: 120px; margin-top: 38px; }
#main .cx-wire svg { overflow: visible; }
#main .cx-wire-h { width: 160px; height: 40px; }
#main .cx-wire-v { display: none; width: 40px; height: 72px; }
#main .cx-wire-line { stroke: var(--marrow-accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
#main .cx-wire-lum { stroke: var(--marrow-accent); stroke-width: 8; stroke-linecap: round; stroke-opacity: 0.14; stroke-dasharray: 1; stroke-dashoffset: 0; }
#main .cx-wire-head { stroke: var(--marrow-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#main .cx-wire-l { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--marrow-accent); }

/* The coach's phone: the program editor, its send panel open. Points are the app's. */
#main .hm-app .cx-pane-send { padding: 0 20px; }
#main .hm-app .ce-eb { margin: 6px 0 0; font-size: 12px; line-height: 16px; letter-spacing: 0.96px; text-transform: uppercase; color: var(--hy-muted); }
#main .hm-app .ce-title { margin: 8px 0 0; font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 32px; letter-spacing: -0.56px; color: var(--hy-ink); }
#main .hm-app .ce-muted { margin: 8px 0 0; font-size: 14px; line-height: 21px; color: var(--hy-muted); }
#main .hm-app .ce-ghost { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; margin-top: 24px; padding: 0 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--hy-boundary); font-size: 14px; font-weight: 500; color: var(--hy-ink); }
#main .hm-app .ce-panel { margin-top: 18px; }
#main .hm-app .ce-h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 22px; color: var(--hy-ink); }
#main .hm-app .ce-div { display: block; height: 1px; margin: 10px 0; background: var(--hy-hairline); }
#main .hm-app .ce-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 0; }
#main .hm-app .ce-row + .ce-row { border-top: 1px solid var(--hy-hairline); }
#main .hm-app .ce-row.ce-more { border-top: 0; }
#main .hm-app .ce-row b { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; color: var(--hy-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#main .hm-app .ce-tick { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 4px; border: 1px solid var(--hy-boundary); font-size: 12px; font-weight: 600; line-height: 1; color: var(--hy-ground); }
#main .hm-app .ce-tick.is-on { background: var(--hy-aqua); border-color: var(--hy-aqua); }
#main .hm-app .ce-plus { flex: none; width: 22px; text-align: center; font-size: 18px; font-weight: 600; color: var(--hy-aqua); }
#main .hm-app .ce-add i { font-style: normal; font-size: 20px; color: var(--hy-muted); }
#main .hm-app .ce-send { display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 16px; border-radius: 2px; background: var(--hy-aqua); font-size: 13px; font-weight: 600; letter-spacing: 2.4px; text-transform: uppercase; color: var(--hy-ground); }
#main .hm-app .ce-ok { margin: 12px 0 0; font-size: 13px; font-weight: 600; line-height: 19px; color: var(--hy-ink); }

/* The member's phone: the Train tab of the coach's branded build, the program card on top. */
#main .hm-app .cx-pane-train { padding: 0 16px; }
#main .hm-app .ct-brand { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
#main .hm-app .ct-logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--hy-aqua); font-size: 13px; font-weight: 600; letter-spacing: 0.5px; color: var(--hy-ground); }
#main .hm-app .ct-name { font-family: var(--serif); font-weight: 400; font-size: 17px; line-height: 1.2; color: var(--hy-ink); }
#main .hm-app .ct-eb { margin: 16px 0 14px; font-size: 12px; line-height: 18px; letter-spacing: 1.44px; text-transform: uppercase; color: var(--hy-aqua); }
#main .hm-app .ct-card { padding: 20px; border-radius: 8px; background: var(--hy-card); border: 1px solid var(--hy-hairline); }
#main .hm-app .ct-k { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 2.2px; text-transform: uppercase; color: var(--hy-muted); }
#main .hm-app .ct-display { margin: 8px 0 0; font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 32px; color: var(--hy-ink); }
#main .hm-app .ct-body { margin: 8px 0 0; font-size: 15px; line-height: 22px; color: var(--hy-muted); }
#main .hm-app .ct-div { display: block; height: 1px; margin: 16px 0; background: var(--hy-hairline); }
#main .hm-app .ct-day { margin: 8px 0 0; font-size: 15px; font-weight: 600; color: var(--hy-ink); }
#main .hm-app .ct-meta { margin: 4px 0 0; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--hy-muted); }
#main .hm-app .ct-move { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--hy-hairline); }
#main .hm-app .ct-meta + .ct-move { margin-top: 12px; }
#main .hm-app .ct-i { flex: none; width: 16px; padding-top: 3px; font-size: 11px; font-weight: 600; color: var(--hy-muted); }
#main .hm-app .ct-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#main .hm-app .ct-t b { font-size: 15px; font-weight: 400; color: var(--hy-ink); }
#main .hm-app .ct-note { font-size: 11px; line-height: 16px; color: var(--hy-aqua-hi); }
#main .hm-app .ct-move em { flex: none; padding-top: 3px; font-style: normal; font-size: 11px; color: var(--hy-muted); }
#main .hm-app .ct-start { display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 16px; border-radius: 999px; background: var(--color-pure-white); font-size: 15px; font-weight: 500; color: var(--hy-ground); }

#main .hm-app .ct-next { margin-top: 12px; display: flex; flex-direction: column; padding: 18px; border-radius: 12px; background: var(--hy-card); border: 1px solid color-mix(in srgb, var(--hy-edge) 55%, transparent); }
#main .hm-app .ct-nk { margin: 0 0 8px; font-size: 12px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--hy-muted); }
#main .hm-app .ct-nt { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 33px; color: var(--hy-ink); }
#main .hm-app .ct-ns { margin: 2px 0 0; font-weight: 500; font-size: 14px; line-height: 20px; color: var(--hy-muted); }
#main .hm-app .ct-nw { margin: 10px 0 0; font-size: 16px; line-height: 24px; color: var(--hy-ink); }

/* ---------- 3. Everything you coach with ---------- */
#main .cx-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; list-style: none; }
#main .cx-tool { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 28px 24px 26px; border-radius: 20px; background: var(--hy-card); border: 1px solid var(--hy-hairline); }
#main .cx-ring { position: relative; display: block; width: 64px; height: 64px; margin-bottom: 14px; }
#main .cx-ring .pub-ring { margin: 0; }
#main .cx-ic { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#main .dialed-band .cx-tool h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 20px; line-height: 1.25; color: var(--hy-ink); }
#main .dialed-band .cx-tool p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--hy-muted); }
#main .cx-tool-link { display: inline-flex; align-items: center; min-height: 24px; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--hy-aqua-hi) 60%, transparent); text-decoration-thickness: 1px; text-underline-offset: 5px; }
#main .cx-tool .cx-tool-link, #main .cx-tool .cx-tool-link:hover { color: var(--hy-ink); }
#main .cx-tool .cx-tool-link:hover { text-decoration-color: var(--hy-aqua-hi); }
#main .cx-tools .pub-more { margin-top: 24px; }

/* ---------- 4 and 5. Every modality, and the proof row ---------- */
#main .cx-mod .pub-head { max-width: 760px; }
#main .cx-mods { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; max-width: 1000px; }
#main .cx-m { display: inline-flex; align-items: center; min-height: 56px; padding: 0 26px; border-radius: 999px; background: var(--paper-card); border: 1px solid var(--rule-soft); font-family: var(--serif); font-weight: 300; font-size: clamp(20px, 2.1vw, 28px); line-height: 1; letter-spacing: -0.01em; color: var(--ink-primary); }
#main .cx-m:nth-child(3n + 2) { font-style: italic; color: var(--marrow-accent); }
#main .cx-proof { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-rows: auto auto; margin-top: 80px; }
#main .cx-proof > .cx-pc-v { grid-row: 1 / span 2; justify-content: center; }
/* The verified card: the one lit hybrid card on the paper, its ring the teal role colour. */
#main .pub-light .cx-pc-v { display: flex; flex-direction: column; gap: 10px; padding: 36px; border-radius: 20px; color: var(--hy-teal); }
#main .pub-light .cx-pc-v .cx-ring { margin-bottom: 8px; }
#main .pub-light .cx-pc-v .pub-ring { color: var(--hy-teal); }
#main .pub-light .cx-pc-v .pub-ring .pub-ring-lum { stroke-opacity: 0.18; }
#main .pub-light .cx-pc-v .pub-ring .pub-ring-track { stroke: color-mix(in srgb, var(--hy-edge) 45%, transparent); }
#main .pub-light .cx-pc-v h3 { margin: 0; font-family: var(--serif); font-size: 26px; line-height: 1.2; font-weight: 300; letter-spacing: -0.01em; color: var(--hy-ink); max-width: 22ch; }
#main .pub-light .cx-pc-v p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--hy-muted); max-width: 46ch; }
#main .pub-light .cx-pc-v .pub-link { align-self: flex-start; color: var(--hy-aqua-hi); }
#main .pub-light .cx-pc-v :focus-visible { outline-color: var(--hy-aqua-hi); }
#main .cx-proof > .pub-pc:not(.cx-pc-v) { justify-content: center; padding: 28px 32px; }
#main > .cx-honest { padding-top: 32px; }

/* ---------- Motion. The rest state is the base; the start states live under pub-armed. ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* The send: the button presses, the result lands, the wire draws, the card rises, the note types. */
  .pub-armed #main .cx-stage:not(.is-in) :is(.ce-ok, .cx-wire-l, .cx-wire-head) { opacity: 0; }
  .pub-armed #main .cx-stage:not(.is-in) :is(.cx-wire-line, .cx-wire-lum) { stroke-dashoffset: 1; }
  .pub-armed #main .cx-stage:not(.is-in) :is(.ct-card, .ct-next) { opacity: 0; transform: translateY(24px); }
  .pub-armed #main .cx-stage.is-in .ce-send { animation: pub-kf-press 420ms cubic-bezier(0.22, 1, 0.36, 1) 600ms both; }
  .pub-armed #main .cx-stage.is-in .ce-ok { animation: pub-kf-rise 600ms cubic-bezier(0.22, 1, 0.36, 1) 1000ms both; }
  .pub-armed #main .cx-stage.is-in :is(.cx-wire-line, .cx-wire-lum) { animation: pub-kf-draw1 800ms cubic-bezier(0.22, 1, 0.36, 1) 1200ms both; }
  .pub-armed #main .cx-stage.is-in .cx-wire-head { animation: pub-kf-fade 300ms ease-out 1900ms both; }
  .pub-armed #main .cx-stage.is-in .cx-wire-l { animation: pub-kf-fade 500ms ease-out 1300ms both; }
  .pub-armed #main .cx-stage.is-in .ct-card { animation: pub-kf-rise 900ms cubic-bezier(0.22, 1, 0.36, 1) 1900ms both; }
  .pub-armed #main .cx-stage.is-in .ct-next { animation: pub-kf-rise 900ms cubic-bezier(0.22, 1, 0.36, 1) 2200ms both; }
  .pub-armed #main .cx-stage.is-in .ct-note .pub-ch { animation-delay: calc(2700ms + var(--t)); }

  /* The tools: the cards rise in turn and each ring draws after its card. */
  .pub-armed #main .cx-grid:not(.is-in) .cx-tool { opacity: 0; transform: translateY(24px); }
  .pub-armed #main .cx-grid.is-in .cx-tool { animation: pub-kf-rise 820ms cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: calc(var(--i) * 90ms); }
  .pub-armed #main .cx-grid.is-in .cx-tool :is(.pub-ring-arc, .pub-ring-lum) { animation-delay: calc(360ms + var(--i) * 90ms); }

  /* The modalities rise in a wave. */
  .pub-armed #main .cx-mods:not(.is-in) .cx-m { opacity: 0; transform: translateY(16px); }
  .pub-armed #main .cx-mods.is-in .cx-m { animation: pub-kf-rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: calc(var(--i) * 70ms); }
}

/* ---------- Widths ---------- */
@media (max-width: 1100px) {
  #main .cx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  #main .cx-stage { grid-template-columns: minmax(0, 300px); row-gap: 0; }
  #main .cx-wire { height: 104px; margin-top: 0; }
  #main .cx-wire-h { display: none; }
  #main .cx-wire-v { display: block; }
  #main .cx-wire-l { left: calc(50% + 28px); top: 50%; transform: translateY(-50%); }
  #main .cx-proof { grid-template-columns: 1fr; }
  #main .cx-proof > .cx-pc-v { grid-row: auto; }
}
@media (max-width: 767px) {
  #main .cx-stage { grid-template-columns: minmax(0, 280px); }
  #main .cx-device { --s: 0.66154; width: 280px; }
  #main .cx-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #main .cx-tool { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 16px; row-gap: 4px; align-items: start; padding: 22px 20px; }
  #main .cx-ring { grid-row: 1 / span 2; width: 56px; height: 56px; margin: 0; }
  #main .cx-ring .pub-ring { width: 56px; height: 56px; }
  #main .cx-ic { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
  #main .dialed-band .cx-tool h3 { font-size: 19px; }
  #main .cx-tool-link { min-height: 44px; }
  #main .cx-mods { gap: 10px; }
  #main .cx-m { min-height: 44px; padding: 0 18px; font-size: 20px; }
  #main .cx-proof { margin-top: 56px; }
  #main .pub-light .cx-pc-v { padding: 28px 24px; }
}
