/* The Friday file on the run engine: three panes and a call drawer (mission
   spec 1.1). Builds on the carried-forward styles.css and workspace.css and
   the platform tokens. */

/* Header: the mission's public name and the clock. Nothing else (spec 6.2). */
.fx-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--card-line);
  background: rgb(255 255 255 / 94%);
  backdrop-filter: saturate(1.4) blur(8px);
}
.fx-header strong { color: var(--ink); font-size: 15px; font-weight: 650; }
.fx-clock { color: var(--ink); font: 600 13px/1.4 var(--mono); font-variant-numeric: tabular-nums; }
.fx-clock:not(:empty) { padding: 4px 10px; border: 1px solid var(--card-line); border-radius: var(--r-pill); background: var(--bg-sunken); }

/* Single-card screens: notice, brief, first lean, three months later. */
body.fx #app:not([data-stage="desk"]) { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: clamp(24px, 5vh, 56px) 0 64px; }
body.fx #app:is([data-stage="debrief"], [data-stage="compare"]) { width: min(1040px, calc(100% - 32px)); }
.fx-card { padding: clamp(22px, 4vw, 36px); border: 1px solid var(--card-line); border-radius: var(--r-xl); background: var(--card); }
.fx-card h1 { font-size: clamp(26px, 3.4vw, 32px); letter-spacing: -.02em; }
.fx-card > p { margin-top: 14px; font-size: 16px; line-height: 1.6; }
.fx-card .gd-eyebrow { margin: 0 0 6px; }
.fx-h { margin: 22px 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.fx-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.fx-q { margin: 22px 0 10px; color: var(--ink); font-size: 16px; font-weight: 650; }
.fx-card fieldset { margin: 0; padding: 0; border: 0; }
.fx-consent { margin-top: 14px; }
.fx-consent legend { margin-bottom: 4px; color: var(--ink); font-weight: 650; }
.fx-name { display: grid; gap: 6px; max-width: 420px; margin-top: 16px; color: var(--ink); font-weight: 600; }
.fx-name input { padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-md); color: var(--ink); background: var(--card); font: inherit; font-weight: 400; }
.fx-name input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fx-name input[aria-invalid="true"] { border-color: var(--warn); }
.fx-name-missing { margin-top: 6px; color: var(--warn); font-size: 14px; font-weight: 600; }
.fx-brief .gd-cast-mini { margin-top: 22px; }

/* A sender's name over their role, wherever a message shows. */
body.fx .gd-sender { align-items: center; margin-top: 0; }
body.fx .gd-sender p { margin: 0; }
body.fx .gd-sender-n { display: block; color: var(--ink); font-size: 14px; font-weight: 650; line-height: 1.35; }
body.fx .gd-sender-r { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.fx-brief .gd-mail { margin-top: 20px; }

/* The desk: JunoAI, the desk itself, and people. */
body.fx #app[data-stage="desk"] { width: 100%; margin: 0; padding: 0; }
.fx-desk { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(260px, 320px); align-items: start; min-height: calc(100dvh - 52px - 64px); }
.fx-pane { min-width: 0; padding: 20px; }
.fx-juno { align-self: stretch; border-right: 1px solid var(--tool-line); background: var(--tool-soft); }
.fx-people { align-self: stretch; border-left: 1px solid var(--card-line); background: var(--card-soft); }
.fx-centre { padding: 20px clamp(20px, 3vw, 36px) 32px; }
.fx-pane-h { display: flex; align-items: center; gap: 10px; }
.fx-pane-h h2 { font-size: 16px; }
.fx-pane-h p { color: var(--muted); font-size: 13px; }
.fx-people .fx-h { margin-top: 0; }

.fx-thread { display: grid; gap: 10px; margin-top: 16px; }
.fx-msg { padding: 14px; border: 1px solid var(--tool-line); border-radius: var(--r-lg); background: var(--card); }
.fx-msg-text { color: var(--ink); font-size: 15px; line-height: 1.55; }
.fx-msg .gd-seg { margin-top: 12px; }
body.gd .fx-msg .gd-seg-b { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.fx-you { margin-top: 10px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.fx-you span { margin-right: 6px; padding: 1px 6px; border-radius: 4px; color: #fff; background: var(--navy); font-size: 11px; }
.fx-juno-reply { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--tool-line); color: var(--tool); font-size: 14px; line-height: 1.5; }
.fx-span { padding: 0 2px; border-radius: 3px; color: inherit; background: var(--warn-bg); box-shadow: inset 0 -1px var(--warn-line); }
.fx-span .gd-chip { margin-left: 6px; }
.fx-ask-juno { display: grid; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--tool-line); }

body.gd .fx-flag { display: inline-flex; width: auto; min-height: 28px; padding: 2px 8px; border: 1px solid var(--card-line); border-radius: var(--r-sm); color: var(--ink-2); background: var(--card); font-size: 12px; font-weight: 600; line-height: 1.4; box-shadow: none; }
body.gd .fx-flag:hover { border-color: var(--warn-line); color: var(--warn); background: var(--warn-bg); box-shadow: none; }

.fx-calendar { display: inline-block; margin: 12px 0 0; padding: 6px 12px; border: 1px solid var(--card-line); border-radius: var(--r-md); color: var(--ink-2); background: var(--card); font-size: 13px; }
.fx-hours-line { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* The dashboard summary: one panel, every metric with its flag in the same place. */
.fx-dash { margin-top: 4px; }
.fx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin: 0; padding: 0; list-style: none; border: 1px solid var(--card-line); border-radius: var(--r-lg); background: var(--card); overflow: hidden; }
.fx-tile { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-height: 96px; margin: 0 -1px -1px 0; padding: 14px 16px 10px; border-right: 1px solid var(--card-line-soft); border-bottom: 1px solid var(--card-line-soft); color: var(--ink); font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.fx-tile > :last-child { align-self: flex-end; }
.fx-tile.is-flagged { background: var(--warn-bg); }

/* A flag's readings (surfaces/note.mjs): the cue's readings as plain buttons, in the run's own order. */
.fx-reading { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--card-line); border-radius: var(--r-lg); background: var(--card); }
.fx-reading .fx-q { margin: 0 0 8px; }
.fx-reading-list { display: grid; gap: 6px; }
body.gd .fx-reading-b { width: 100%; justify-content: flex-start; text-align: left; font-weight: 500; white-space: normal; }
.fx-reading .fx-actions { margin-top: 8px; }
.fx-tile .fx-reading { align-self: stretch; }

/* The note-line bank (surfaces/note.mjs): what is in the note, then folds of lines by what they are about. */
.fx-note { margin-top: 24px; }
.fx-note .fx-h:focus { outline: none; }
.fx-note-added { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.fx-note-added li { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid var(--brand-press); border-radius: var(--r-md); background: var(--brand-soft); font-size: 14px; line-height: 1.45; }
.fx-note-added .gd-btn { flex: none; }
.fx-note-none { margin-top: 8px; }
.fx-note-groups { display: grid; gap: 6px; margin-top: 12px; }
body.gd .fx-note-g { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--card-line); border-radius: var(--r-md); color: var(--ink); background: var(--card); box-shadow: none; font-size: 14.5px; font-weight: 600; text-align: left; }
body.gd .fx-note-g::after { content: "+"; color: var(--muted); font-weight: 500; }
body.gd .fx-note-g[aria-expanded="true"]::after { content: "\2212"; }
.fx-note-n { margin-left: auto; color: var(--muted); font-size: 12.5px; font-weight: 550; }
.fx-note-lines { margin: 4px 0 6px; }
.fx-note-claims { margin: 10px 0 0; padding: 0; border: 0; }
.fx-note-claims legend { margin-bottom: 2px; color: var(--ink); font-size: 14px; font-weight: 650; }
.gd-drawer .fx-note { margin-top: 0; }

/* Files: document rows with title, cost and opened status. */
.fx-files { display: grid; margin: 0; padding: 0; list-style: none; border: 1px solid var(--card-line); border-radius: var(--r-lg); background: var(--card); overflow: hidden; }
.fx-files li + li { border-top: 1px solid var(--card-line-soft); }
body.gd .fx-file { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 16px; border: 0; border-radius: 0; color: var(--ink); background: transparent; box-shadow: none; font-size: 15px; font-weight: 600; text-align: left; }
body.gd .fx-file:hover { background: var(--bg-page-soft); box-shadow: none; }
body.gd .fx-file.is-opened { color: var(--ink-2); font-weight: 500; }
body.gd .fx-file:disabled { opacity: .55; cursor: not-allowed; }
.fx-file-i { width: 14px; height: 18px; border: 1.5px solid var(--muted-2); border-radius: 2px 6px 2px 2px; }
.fx-file.is-opened .fx-file-i { border-color: var(--ok); }
.fx-file-s { color: var(--muted); font: 600 12.5px/1.4 var(--mono); white-space: nowrap; }
.fx-file-s.is-opened { color: var(--ok); font-family: var(--sans); }

.fx-reader .gd-mail { margin-top: 4px; }
.fx-reader h2 { margin-top: 12px; font-size: 20px; letter-spacing: -.01em; }
.fx-reader h2:focus { outline: none; }

.fx-person-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.fx-person-list .gd-sender { margin: 0 0 10px; }
body.gd .fx-ask { display: flex; justify-content: space-between; align-items: flex-start; width: 100%; gap: 8px; text-align: left; font-weight: 550; }
.fx-qa { margin-top: 4px; }
.fx-q-asked { color: var(--muted); font-size: 13px; font-weight: 600; }
.fx-answer { margin-top: 4px; color: var(--ink); font-size: 14px; line-height: 1.55; }
.fx-ask-juno .fx-answer { color: var(--tool); }

/* The call drawer sits at the foot of the desk. */
body.fx #app[data-stage="desk"] .gd-drawer { position: sticky; bottom: 0; }
.gd-drawer fieldset { margin: 0; padding: 0; border: 0; }
.gd-drawer legend { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--ink); font-size: 15px; font-weight: 650; }
.gd-drawer .gd-conds { margin-left: 0; }
.gd-drawer .gd-send { grid-row: 1 / span 5; }

/* Three months later. */
.fx-later .gd-doc p { color: var(--ink); }
.fx-later .gd-reply > p { margin-top: 10px; }
.fx-forward { margin-top: 20px; }
.fx-forward header h2 { font-size: 15px; }
.fx-after { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--card-line); }
.fx-after .gd-choices { margin-top: 12px; }

/* Debrief. */
.fx-dcard + .fx-dcard { margin-top: 16px; }
.gd-debrief .gd-card { margin-top: 16px; }
.fx-pathway { display: grid; gap: 6px; margin: 10px 0 0; padding-left: 22px; font-size: 14px; line-height: 1.5; }
ul.fx-pathway { padding-left: 18px; }
.fx-said { color: var(--tool); font-style: italic; }
.fx-callback { margin-top: 20px; color: var(--ink-2); font-size: 16px; font-style: italic; }
.fx-replay { margin-top: 24px; }

/* Tablet: people fold under the desk. */
@media (max-width: 1180px) {
  .fx-desk { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); }
  .fx-people { grid-column: 1 / -1; border-top: 1px solid var(--card-line); border-left: 0; }
  .fx-person-list { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* Phone: the three panes become tabs under the header. */
.fx-tabs { display: none; }
@media (max-width: 760px) {
  .fx-header { padding: 8px 16px; }
  .fx-tabs { position: sticky; top: 52px; z-index: 15; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 6px 12px; border-bottom: 1px solid var(--card-line); background: var(--card); }
  body.gd .fx-tab { min-height: 40px; padding: 6px 8px; border: 1px solid transparent; border-radius: var(--r-md); color: var(--ink-2); background: transparent; box-shadow: none; font-size: 14px; font-weight: 600; text-align: center; }
  body.gd .fx-tab[aria-pressed="true"] { border-color: var(--card-line); color: var(--ink); background: var(--bg-sunken); box-shadow: none; }
  .fx-desk { display: block; min-height: 0; padding-bottom: 80px; }
  .fx-desk > .fx-pane { display: none; border: 0; }
  .fx-desk[data-pane="centre"] > .fx-centre, .fx-desk[data-pane="juno"] > .fx-juno, .fx-desk[data-pane="people"] > .fx-people { display: block; }
  .fx-pane { padding: 16px; }
  .fx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fx-tile { padding: 10px 12px; font-size: 13px; }
  .gd-drawer .gd-send { grid-row: auto; }
  body.fx #app[data-stage="desk"] .gd-drawer { position: fixed; right: 0; bottom: 0; left: 0; }
  body.fx #app[data-drawer="open"] .gd-drawer { top: 0; z-index: 30; display: flex; flex-direction: column; overflow: auto; }
  body.fx #app[data-drawer="open"] .gd-drawer-body { flex: 1; max-height: none; }
}

/* ---------- Visual slice 2: The Friday file (docs/VISUAL_LANGUAGE.md 3.1 to
   3.13, 3.17 and 5.2). The notice rules are the shell's and serve every
   mission; everything else is scoped to the Friday page, whose markup is
   The Friday file's own. Entry motion plays only while #app carries
   data-enter (surfaces/app.mjs); opacity and transform only; the
   reduced-motion block in workspace.css turns all of it off. ---------- */

/* 3.17 The notice: a plain white card, no gradient. */
.fx-notice { box-shadow: var(--shadow-card); }
.fx-notice .gd-eyebrow { color: var(--accent); }
.fx-notice .gd-check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Initials, where a portrait is missing, keep their own fill under hero.css. */
body.fx .gd-av-you { color: #fff; background: var(--accent-deep); }

/* 5.2 The first screen: hero, story card, the five-step fold, where you start, how it works. */
body.fx[data-mission="the-friday-file"] #app[data-stage="brief"] { width: min(1080px, calc(100% - 32px)); }
.fx-brief .gd-lead.fx-hook { font-weight: 500; }
.fx-brief .gd-scene .gd-av { width: 40px; height: 40px; }
.fx-brief .gd-scene-you p { color: var(--on-dark-muted); }
.fx-brief .gd-msg { color: var(--ink); }
.fx-brief-h { margin: 44px 0 0; color: var(--accent); }
.fx-brief .gd-journey { margin-top: 18px; }
.fx-brief-go { margin-top: 28px; }

/* The five steps open in place: a plain fold, no ring (second pass, R3). */
.fx-setup { margin-top: 36px; }
.fx-setup > summary { list-style: none; }
.fx-setup > summary::-webkit-details-marker { display: none; }
.fx-setup > .gd-setup::after { transition: transform var(--t-base) var(--ease-out); }
.fx-setup[open] > .gd-setup { border-radius: var(--r-lg) var(--r-lg) 0 0; transform: none; box-shadow: none; }
.fx-setup[open] > .gd-setup::after { transform: rotate(90deg); }
.fx-prep { display: grid; gap: 4px; margin: 0; padding: 6px 20px 20px; list-style: none; border: 1px solid var(--accent-line); border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); background: var(--card); }
.fx-prep li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding-top: 14px; }
.fx-prep li + li { border-top: 1px solid var(--card-line-soft); }
.fx-prep .gd-n { margin-top: 1px; background: var(--accent); }
.fx-prep h3 { color: var(--ink); font-size: 15px; }
.fx-prep p { margin-top: 2px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.fx-setup[open] > .fx-prep { animation: gd-fade 200ms var(--ease-std); }

/* 3.5 Where you start: you, Grace and her note as sent, your desk. */
.fx-start { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, 1fr); }
.fx-start .gd-av-face.gd-av-you { display: grid; place-items: center; font-size: 15px; }
.fx-av-desk { display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.fx-av-desk svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.fx-start-note { justify-self: stretch; margin-top: 10px; padding: 10px 14px; border-radius: 16px 16px 16px 4px; color: var(--ink); background: var(--bg-sunken); font-size: 14px; line-height: 1.5; text-align: left; }
.fx-start-note .gd-mail-meta { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.fx-start-note .gd-mail-meta span:first-child { color: var(--ink); font-size: 13px; }
.fx-start-currency { justify-self: stretch; margin: 8px 0 0; color: var(--ink-2); font-size: 13px; text-align: left; }

/* The story card's typing dots and line share one cell (3.9): the dots fade
   out, never collapse, so the bubble keeps its height. */
[data-mission="the-friday-file"] #app[data-enter] .gd-bubble .gd-typing { padding: 0; overflow: visible; animation: gd-hide 1ms linear var(--done, .7s) forwards; }
[data-mission="the-friday-file"] #app[data-enter] .gd-bubble .gd-typing i { animation: gd-dots calc(var(--done, .7s) - var(--d, 0s)) ease-in-out var(--d, 0s) 1; }
[data-mission="the-friday-file"] #app[data-enter] .gd-bubble .gd-typing i:nth-child(2) { animation-delay: calc(var(--d, 0s) + .15s); animation-duration: calc(var(--done, .7s) - var(--d, 0s) - .15s); }
[data-mission="the-friday-file"] #app[data-enter] .gd-bubble .gd-typing i:nth-child(3) { animation-delay: calc(var(--d, 0s) + .3s); animation-duration: calc(var(--done, .7s) - var(--d, 0s) - .3s); }

/* The story card is in place by 1.6 s (design second pass, S4): You .1 s,
   strip .25 s, JunoAI .4 s typing to .9 s, tiles from .8 s at +80 ms, Grace
   1.1 s typing to 1.5 s, the clock 1.5 s, the Start shine 1.8 s. Every
   animation in the card ends by 1.6 s: the clock rises in 100 ms, a line
   shows in 100 ms, and each typing dot stops at its bubble's --done (slice
   T1; first-screen-test.mjs). Reduced motion is unchanged. */
[data-mission="the-friday-file"] #app[data-enter] .gd-scene-you { animation-delay: .1s; }
[data-mission="the-friday-file"] #app[data-enter] .gd-scene-dash { animation-delay: .25s; }
[data-mission="the-friday-file"] #app[data-enter] .gd-scene .gd-bubble-ai { --d: .4s; --done: .9s; }
[data-mission="the-friday-file"] #app[data-enter] .gd-scene-files li { animation-delay: calc(.8s + var(--i, 0) * 80ms); }
[data-mission="the-friday-file"] #app[data-enter] .gd-scene .gd-bubble-right { --d: 1.1s; --done: 1.5s; }
[data-mission="the-friday-file"] #app[data-enter] .gd-scene-clock { animation-delay: 1.5s; animation-duration: 100ms; }
[data-mission="the-friday-file"] #app[data-enter] .gd-scene .gd-pulse { animation-delay: 2s; }
[data-mission="the-friday-file"] #app[data-enter] .gd-scene .gd-said { animation-delay: var(--done, .7s); animation-duration: .1s; }

/* The header clock is the hero's amber in-world pill, in Inter, not mono
   (design second pass, S9). The text and its aria-live are the shell's;
   the phone short form needs shell markup and is left to slice 7. */
[data-mission="the-friday-file"] .fx-clock { color: var(--ink); font: 700 13px/1.4 var(--sans); }
[data-mission="the-friday-file"] .fx-clock:not(:empty) { border: 0; background: var(--amber-pill); }

/* 3.8 The desk: panes rise once on entry, left to right; nothing moves after. */
[data-mission="the-friday-file"] #app[data-enter] .fx-desk > .fx-pane { animation: gd-rise 400ms var(--ease-out) both; }
[data-mission="the-friday-file"] #app[data-enter] .fx-desk > .fx-pane:nth-child(2) { animation-delay: 80ms; }
[data-mission="the-friday-file"] #app[data-enter] .fx-desk > .fx-pane:nth-child(3) { animation-delay: 160ms; }
[data-mission="the-friday-file"] .fx-arrive { animation: gd-fade 250ms var(--ease-std) both; }
[data-mission="the-friday-file"] .fx-unlocked { animation: gd-rise 400ms var(--ease-out) both; }
[data-mission="the-friday-file"] .fx-juno .fx-pane-h h2 { font-size: 17px; }
[data-mission="the-friday-file"] .fx-msg { border-radius: 16px 16px 16px 4px; box-shadow: 0 1px 2px rgb(15 23 42 / 5%); }
[data-mission="the-friday-file"] .fx-msg.is-replied { box-shadow: none; }
[data-mission="the-friday-file"] .fx-tiles, [data-mission="the-friday-file"] .fx-files, [data-mission="the-friday-file"] .fx-person-list { box-shadow: var(--shadow-card); }
body.gd[data-mission="the-friday-file"] .fx-file { grid-template-columns: 32px minmax(0, 1fr) auto; transition: background-color var(--t-fast) var(--ease-std); }
[data-mission="the-friday-file"] .fx-file-i { position: relative; width: 32px; height: 32px; border: 1px solid var(--accent-line); border-radius: var(--r-md); background: var(--accent-soft); }
[data-mission="the-friday-file"] .fx-file-i::before { content: ""; position: absolute; top: 8px; left: 10px; width: 10px; height: 14px; border: 1.5px solid var(--accent); border-radius: 2px 5px 2px 2px; background: var(--card); }
[data-mission="the-friday-file"] .fx-file.is-opened .fx-file-i { border-color: var(--ok-line); background: var(--ok-bg); }
[data-mission="the-friday-file"] .fx-file.is-opened .fx-file-i::before { border-color: var(--ok); }
[data-mission="the-friday-file"] .fx-file-s.gd-chip { font: 600 11px/1.6 var(--sans); }
body.gd[data-mission="the-friday-file"] .fx-contact { transition: background-color var(--t-fast) var(--ease-std); }
[data-mission="the-friday-file"] .gd-drawer:not(.is-open) { box-shadow: 0 -10px 28px rgb(42 33 70 / 10%); }

/* 3.11 The call: it rises into place when it opens, once. #app keeps its
   data-drawer across redraws, so the animation on it plays only when the
   call opens; the body reads its progress. */
@property --fx-call { syntax: "<number>"; inherits: true; initial-value: 1; }
@keyframes fx-call-in { from { --fx-call: 0; } to { --fx-call: 1; } }
[data-mission="the-friday-file"] #app[data-drawer="open"] { animation: fx-call-in 250ms var(--ease-out); }
[data-mission="the-friday-file"] #app[data-drawer="open"] .gd-drawer-body { opacity: var(--fx-call); transform: translateY(calc((1 - var(--fx-call)) * 16px)); }
[data-mission="the-friday-file"] .gd-choice, [data-mission="the-friday-file"] .gd-conds .gd-check { transition: border-color var(--t-fast) var(--ease-std), background-color var(--t-fast) var(--ease-std); }
[data-mission="the-friday-file"] .gd-choice.is-on, [data-mission="the-friday-file"] .gd-conds .gd-check.is-on { border-color: var(--accent); background: var(--accent-soft); }

/* 3.12 Three months later: the card, then the headline, then each block in turn, all started by 700 ms. */
[data-mission="the-friday-file"] .fx-later { box-shadow: var(--shadow-card); }
[data-mission="the-friday-file"] .fx-later h1 { font-size: clamp(28px, 3.6vw, 36px); letter-spacing: -.03em; }
[data-mission="the-friday-file"] .fx-receipt { border: 0; border-left: 3px solid var(--accent); border-radius: 0 var(--r-md) var(--r-md) 0; background: var(--accent-soft); }
[data-mission="the-friday-file"] .fx-later .gd-reply { border-radius: 16px 16px 16px 4px; }
[data-mission="the-friday-file"] #app[data-enter] .fx-later { animation: gd-rise 500ms var(--ease-out) both; }
[data-mission="the-friday-file"] #app[data-enter] .fx-later > h1 { animation: gd-fade 300ms var(--ease-std) 150ms both; }
[data-mission="the-friday-file"] #app[data-enter] .fx-later > :nth-child(n + 2) { animation: gd-rise 400ms var(--ease-out) 250ms both; }
[data-mission="the-friday-file"] #app[data-enter] .fx-later > :nth-child(n + 4) { animation-delay: 370ms; }
[data-mission="the-friday-file"] #app[data-enter] .fx-later > :nth-child(n + 6) { animation-delay: 490ms; }
[data-mission="the-friday-file"] #app[data-enter] .fx-later > :nth-child(n + 8) { animation-delay: 610ms; }

/* What followed as a dated sequence (design second pass, S8): one row per
   note line, its time mark at the left, in the world's order. Shared with
   The Monday queue's audit; each mission sets its own entry timing. */
.fx-note-seq { display: grid; margin: 12px 0 0; padding: 4px 22px; list-style: none; }
.fx-note-seq > li { display: grid; grid-template-columns: 8em minmax(0, 1fr); align-items: baseline; column-gap: 16px; padding: 12px 0; }
.fx-note-seq > li + li { border-top: 1px solid var(--card-line-soft); }
.fx-note-seq p { margin: 0; color: var(--ink); }
.fx-when { color: var(--accent-press); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
[data-mission="the-friday-file"] #app[data-enter] .fx-note-seq > li { animation: gd-rise 400ms var(--ease-out) min(.3s + var(--i, 0) * 50ms, .65s) both; }
@media (max-width: 640px) {
  .fx-note-seq { padding: 4px 16px; }
  .fx-note-seq > li { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .fx-when:empty { display: none; }
}

/* 3.13 Your record: three lines first, each a card with an accent bar; folds fade open; nothing coloured by outcome. */
[data-mission="the-friday-file"] .fx-lines.gd-card { padding: 0; border: 0; background: transparent; }
[data-mission="the-friday-file"] .fx-lines h2 { font-size: 20px; }
[data-mission="the-friday-file"] .fx-lines .fx-pathway { gap: 12px; margin-top: 14px; padding-left: 0; list-style: none; counter-reset: line; }
[data-mission="the-friday-file"] .fx-lines .fx-pathway > li { position: relative; padding: 16px 18px 16px 52px; border: 1px solid var(--card-line); border-left: 3px solid var(--accent); border-radius: 0 var(--r-lg) var(--r-lg) 0; background: var(--card); box-shadow: var(--shadow-card); counter-increment: line; }
[data-mission="the-friday-file"] .fx-lines .fx-pathway > li::before { content: counter(line); position: absolute; top: 16px; left: 16px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--accent-press); background: var(--accent-soft); font-size: 12px; font-weight: 700; line-height: 1; }
[data-mission="the-friday-file"] #app[data-enter] .fx-lines .fx-pathway > li { animation: gd-rise var(--t-enter) var(--ease-out) 200ms both; }
[data-mission="the-friday-file"] #app[data-enter] .fx-lines .fx-pathway > li:nth-child(2) { animation-delay: 320ms; }
[data-mission="the-friday-file"] #app[data-enter] .fx-lines .fx-pathway > li:nth-child(3) { animation-delay: 440ms; }
[data-mission="the-friday-file"] .gd-debrief details[open] > :not(summary) { animation: gd-fade 200ms var(--ease-std); }
[data-mission="the-friday-file"] .fx-done h1 { display: flex; align-items: center; gap: 14px; }
@keyframes fx-tick { from { opacity: 0; transform: rotate(45deg) scale(.3); } }

@media (max-width: 760px) {
  /* "Flag this" is the act detection is read from: a 44 px target with a
     visible outline on phones, label unchanged (second pass, S10). Every
     mission's page inherits it. */
  body.gd button.fx-flag { align-items: center; min-height: 44px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-md); color: var(--ink-2); background: var(--card); text-decoration: none; }
  .fx-start { grid-template-columns: minmax(0, 1fr); }
  .fx-start li { grid-template-columns: 48px minmax(0, 1fr); justify-items: start; align-items: center; column-gap: 14px; padding: 14px 16px; text-align: left; }
  .fx-start .gd-av-face { grid-row: span 2; width: 48px; height: 48px; }
  .fx-start strong { margin-top: 0; }
  .fx-start .fx-start-note { grid-column: 1 / -1; }
  .fx-brief-h { margin-top: 36px; }
  .fx-prep { padding: 4px 16px 16px; }
  /* The story card repeats the brief; a phone reads the brief, then Start (slice T1). */
  .fx-brief .gd-scene { display: none; }
  .fx-brief-go .gd-btn { flex: 1 1 100%; }
}

/* Facilitator and group view (blueprint 6.8). */
body.fg #app { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 64px; }
body.fg #app[data-stage="closed"], body.fx #app[data-stage="closed"] { width: min(760px, calc(100% - 32px)); }
.fg-tabs { display: flex; gap: 6px; }
.fg-tabs a { padding: 6px 12px; border-radius: var(--r-md); color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; }
.fg-tabs a[aria-current="true"] { color: var(--ink); background: var(--bg-sunken); }
.fg .gd-card + .gd-card, .fg-open + .gd-card { margin-top: 16px; }
.fg-open fieldset { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; padding: 0; border: 0; }
.fg-open legend { width: 100%; margin-bottom: 4px; color: var(--ink); font-weight: 650; }
.fg-sessions { display: grid; gap: 12px; margin: 12px 0 0; padding: 0; list-style: none; }
.fg-session { padding: 14px; border: 1px solid var(--card-line); border-radius: var(--r-lg); background: var(--card-soft); }
.fg-session p + p { margin-top: 6px; }
.fg-session a { word-break: break-all; }
.fg-h { margin: 28px 0 10px; font-size: 20px; }
.fg-meta { color: var(--ink-2); font-size: 14px; }
.fg-meta + .fg-meta { margin-top: 4px; }
.fg-note { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.fg-synthetic { padding: 10px 14px; border: 1px solid var(--warn-line); border-radius: var(--r-md); background: var(--warn-bg); color: var(--ink); font-size: 14px; }
.fg-pattern { color: var(--ink); font-size: 17px; line-height: 1.5; }
.fg-none { color: var(--muted); font-size: 15px; }
.fg-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fg-table caption { margin-bottom: 8px; color: var(--ink); font-size: 16px; font-weight: 650; text-align: left; }
.fg-table th, .fg-table td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--card-line); text-align: left; vertical-align: middle; }
.fg-table thead th { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.fg-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fg-per { display: block; color: var(--muted); font-size: 12px; }
.fg-bar { position: relative; width: 28%; min-width: 120px; }
.fg-bar::before { content: ""; position: absolute; top: 50%; right: 0; left: 0; height: 2px; background: var(--card-line); }
.fg-range { position: absolute; top: calc(50% - 5px); height: 10px; border-radius: 5px; background: var(--tool-soft); box-shadow: inset 0 0 0 1px var(--tool-line); }
.fg-mid { position: absolute; top: calc(50% - 7px); width: 2px; height: 14px; background: var(--navy); }
.fg-int { white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fg-record { margin-top: 10px; }
.fg-record summary { cursor: pointer; font-weight: 650; }
.fg-foot { width: min(1040px, calc(100% - 32px)); margin: 0 auto 32px; color: var(--muted); font-size: 13px; }
@media (max-width: 760px) {
  .fg-bar { display: none; }
  .fg .fx-header { flex-wrap: wrap; }
}
.pv-level { color: var(--muted); font-size: 12.5px; font-weight: 500; }

/* ---------- Orientation and polish pass (2026-10-01) ---------- */

/* Buttons: no violet glow from the carried-forward sheet; one accent (blueprint 9). */
body.fx button:hover { box-shadow: none; }

/* The stage strip: under the header, never in it (spec 6.2). */
.fx-stages { display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; margin: 0 0 20px; }
.fx-stages ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; counter-reset: stage; }
.fx-stages li { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; counter-increment: stage; }
.fx-stages li + li::before { content: ""; width: 14px; height: 1px; margin-right: 2px; background: var(--line-strong); }
.fx-stages li.is-past { color: var(--ink-2); }
.fx-stages li[aria-current="step"] { color: var(--ink); font-weight: 700; text-decoration: underline 2px var(--accent); text-underline-offset: 6px; }
.fx-stage-short { display: none; margin: 0; color: var(--ink); font-size: 13px; font-weight: 600; }
.fx-saved { margin: 0; color: var(--muted); font-size: 12.5px; }
.fx-saved[data-state="failed"] { flex-basis: 100%; padding: 8px 12px; border: 1px solid var(--warn-line); border-radius: var(--r-md); color: var(--warn); background: var(--warn-bg); font-weight: 600; }
body.fx #app[data-stage="desk"] > .fx-stages { margin: 0; padding: 8px 24px; border-bottom: 1px solid var(--card-line); background: var(--card); }

/* Returning to a run. */
.fx-resume p { color: var(--ink); }
.fx-confirm { margin-top: 18px; padding: 12px 14px; border: 1px solid var(--warn-line); border-radius: var(--r-md); color: var(--ink); background: var(--warn-bg); font-size: 15px; }
.fx-resume .fx-confirm + .fx-actions { margin-top: 14px; }

/* JunoAI: a conversation, slate like the in-world AI voice. */
.fx-msg { position: relative; border-color: var(--tool-line); border-radius: 4px var(--r-lg) var(--r-lg) var(--r-lg); }
.fx-msg.is-replied { padding: 0; background: transparent; border-style: dashed; }
body.gd .fx-fold { display: grid; gap: 2px; width: 100%; min-height: 44px; padding: 10px 14px; border: 0; border-radius: inherit; color: var(--ink-2); background: transparent; box-shadow: none; font-size: 13.5px; font-weight: 500; line-height: 1.45; text-align: left; }
body.gd .fx-fold:hover { background: var(--card); }
.fx-fold-you { color: var(--ink); font-size: 12.5px; font-weight: 650; }
.fx-fold[aria-expanded="true"] { border-bottom: 1px dashed var(--tool-line); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.fx-msg.is-replied > .fx-msg-text, .fx-msg.is-replied > .fx-juno-reply { margin: 10px 14px; }
.fx-msg.is-replied > .fx-juno-reply { margin-bottom: 14px; }
.fx-new { display: inline-block; margin-bottom: 6px; padding: 1px 8px; border-radius: var(--r-pill); color: var(--accent); background: var(--accent-soft); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
body.gd .fx-flag { min-height: 28px; padding: 2px 6px; white-space: nowrap; border-color: transparent; color: var(--muted); background: transparent; font-size: 12.5px; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
body.gd .fx-flag:hover { border-color: transparent; color: var(--warn); background: transparent; text-decoration-color: currentColor; }

/* People: contacts that open to their questions. */
.fx-person-list { gap: 0; border: 1px solid var(--card-line); border-radius: var(--r-lg); background: var(--card); overflow: hidden; }
.fx-person + .fx-person { border-top: 1px solid var(--card-line-soft); }
body.gd .fx-contact { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 12px; border: 0; border-radius: 0; background: transparent; box-shadow: none; text-align: left; }
body.gd .fx-contact:hover { background: var(--bg-page-soft); }
body.gd .fx-contact:disabled { opacity: 1; cursor: default; }
body.gd .fx-contact::after { content: "+"; margin-left: auto; color: var(--muted); font-size: 18px; font-weight: 400; }
body.gd .fx-contact[aria-expanded="true"]::after { content: "\2212"; }
body.gd .fx-contact:disabled::after { content: none; }
.fx-person-q { display: grid; gap: 8px; padding: 0 12px 12px; }
.fx-contact .gd-av { width: 36px; height: 36px; }

/* The call: a full-height workspace over the desk, with a clear way back. */
body.fx #app[data-drawer="open"] :is(.fx-desk, .fx-tabs) { display: none; }
body.fx #app[data-drawer="open"] .gd-drawer { position: static; top: auto; display: block; border-top: 0; box-shadow: none; }
body.fx #app[data-drawer="open"] .gd-drawer-bar { position: sticky; top: 52px; z-index: 10; }
body.fx #app[data-drawer="open"] .gd-drawer-body { display: block; max-height: none; overflow: visible; padding: 28px max(24px, calc((100% - 760px) / 2)) 56px; }
body.fx .gd-drawer-body .gd-dstep + .gd-dstep { margin-top: 36px; }
body.fx .gd-drawer .gd-send { position: static; margin-top: 14px; padding: 0; border: 0; background: none; }
body.fx .gd-drawer .gd-send .gd-btn { width: auto; }
.fx-sub { margin-top: 18px !important; }
.fx-sub legend { font-size: 14px !important; }
.fx-preview { margin: 0; padding: 14px 16px; border-left: 3px solid var(--accent); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--ink); background: var(--accent-soft); font-size: 15px; line-height: 1.55; }

/* Three months later: a short sequence. */
.fx-later .fx-h { margin-top: 28px; }
.fx-later h1 + .fx-h { margin-top: 18px; }
.fx-receipt { margin: 0; padding: 12px 14px; border: 1px solid var(--card-line); border-radius: var(--r-md); color: var(--ink); background: var(--card-soft); font-size: 15px; }

/* Your record: pathway first, the rest folds. Ids stay, quietly. */
.fx-cites { margin: 0 0 6px; }
.gd-debrief .pv-cite { margin-left: 6px; color: var(--muted); font: 500 11px/1 var(--mono); }
.fx-cell { margin-top: 16px; padding: 12px 16px; border: 1px solid var(--card-line); border-radius: var(--r-lg); background: var(--card); color: var(--ink); }
.fx-fold-card { padding: 0; }
.fx-fold-card > summary { display: flex; align-items: center; min-height: 56px; padding: 12px 22px; cursor: pointer; list-style: none; }
.fx-fold-card > summary::-webkit-details-marker { display: none; }
.fx-fold-card > summary::after { content: "+"; margin-left: auto; color: var(--muted); font-size: 20px; }
.fx-fold-card[open] > summary::after { content: "\2212"; }
.fx-fold-card > summary h2 { margin: 0; }
.fx-fold-card > :not(summary) { margin-left: 22px; margin-right: 22px; }
.fx-fold-card[open] { padding-bottom: 20px; }
.fx-done p { color: var(--ink); }

@media (max-width: 760px) {
  .fx-stages ol { display: none; }
  .fx-stage-short { display: block; }
  body.fx #app[data-stage="desk"] > .fx-stages { padding: 8px 16px; }
  body.fx #app[data-drawer="open"] .gd-drawer { position: static; overflow: visible; }
  body.fx #app[data-drawer="open"] .gd-drawer-body { padding: 18px 16px 40px; }
  .fx-tiles { grid-template-columns: minmax(0, 1fr); }
  .fx-tile { flex-direction: row; align-items: center; min-height: 52px; padding: 10px 14px; }
  .fx-tile > :last-child { align-self: center; }
  .fx-actions .gd-btn { flex: 1 1 100%; }
}
body.fx #app:is([data-stage="debrief"], [data-stage="compare"]) > .fx-stages { width: min(920px, calc(100% - 32px)); margin: 0 auto -12px; }

/* Sol pass, desk and call (2026-10-01) */
.fx-brief .fx-hook { font-weight: 600; }
.fx-brief .fx-promise { color: var(--ink); font-weight: 600; }
.fx-divider { margin: 14px 0 6px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.fx-divider::after { content: ""; flex: 1; border-top: 1px solid var(--card-line); }
.fx-unlocked { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); font-size: 15px; }
.fx-src { color: var(--muted); font-size: 13px; white-space: nowrap; }
.is-suggested { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-md); }
/* ---------- Your record: three lines first, the full record folded (Fable 5.1 ruling, 1 October 2026) ---------- */
.fx-lines .fx-pathway { display: grid; gap: 10px; margin: 0; padding-left: 20px; color: var(--ink); font-size: 16px; line-height: 1.55; }
.fx-record { margin-top: 16px; }
.fx-record > summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; list-style: none; }
.fx-record > summary::-webkit-details-marker { display: none; }
.fx-record[open] > summary { margin-bottom: 12px; }
.fx-record > .gd-card + .gd-card { margin-top: 12px; }
.fx-howread { margin-top: 16px; }
.pv-legend { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; }
.gd-debrief .pv-rule { margin-left: 6px; color: var(--ink-2); font: 600 11.5px/1 var(--mono); }

/* ---------- Two runs, diff first; the guard line (Fable 5.1 ruling, 1 October 2026) ---------- */
.fx-compare > h2.gd-h3 { margin: 28px 0 0; }
.fx-compare .fx-pair { margin-top: 10px; }
.fx-compare .fx-pair .gd-h3 { margin-top: 0; }
.fx-compare .fx-pair .fx-pathway { margin: 0; padding-left: 18px; }
.fx-guard { margin: 16px 0 0; padding: 12px 16px; border-left: 3px solid var(--tool-line); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--ink); background: var(--card-soft); font-size: 15px; line-height: 1.55; }
.fx-cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fx-compare > .fx-fold-card { margin-top: 20px; }
@media (max-width: 760px) {
  .fx-compare .fx-pair, .fx-cells { grid-template-columns: minmax(0, 1fr); }
  .fx-compare > h2.gd-h3 { margin-top: 22px; }
}

/* Phone: the open call keeps the draft and the way to the review in view */
.fx-call-foot { display: none; }
@media (max-width: 760px) {
  .fx-call-foot { display: flex; position: sticky; bottom: 0; z-index: 2; align-items: center; justify-content: space-between; gap: 10px; margin: 16px -16px 0; padding: 10px 16px; background: var(--card); border-top: 1px solid var(--card-line); font-size: 14px; }
  .fx-call-foot .gd-btn { white-space: nowrap; }
}
.fx-call-juno { margin-bottom: 8px; }
.fx-call-juno .fx-divider { gap: 10px; }

/* Phone: JunoAI's replies stack full width, each with a one-line gloss */
.fx-gloss { display: none; }
@media (max-width: 760px) {
  .fx-msg .gd-seg { flex-direction: column; align-items: stretch; }
  .fx-msg .gd-seg-b { text-align: left; }
  .fx-gloss { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); }
}

/* Phone: wide group tables scroll inside their card instead of being cut off */
@media (max-width: 760px) {
  .fg-table { display: block; max-width: 100%; overflow-x: auto; }
}

/* Record references: event ids stay in the page, shown on request (spec 5.1) */
.fx-refs-off .pv-cite, .fx-refs-off .pv-rule { display: none; }
.fx-not-this { color: var(--muted); font-size: 14px; }
.fx-refs { margin-top: 6px; }
.fx-cost-line { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.fx-kenji-note { margin: 0 0 8px; font-size: 14px; }
@media (max-width: 760px) {
  .fx-msg.is-compact .gd-seg { flex-direction: row; }
  .fx-msg.is-compact .gd-seg-b { text-align: center; }
}

/* ---------- Slice 5: group view, facilitator and record (docs/VISUAL_LANGUAGE.md 3.14 and 3.16) ----------
   Appended only; earlier fg- and rc- rules above still apply and are
   overridden here. The group view is calm and legible on a projector:
   counts in words, intervals drawn as a range with no point marked inside
   it, banded counts drawn hatched, and no motion on any number. */

/* Group view: the facts at the top. */
.fg-view > * + * { margin-top: 16px; }
.fg-facts { display: flex; flex-wrap: wrap; gap: 10px; }
.fg-fact { display: block; margin: 0; padding: 12px 16px; border: 1px solid var(--card-line); border-radius: var(--r-lg); color: var(--ink-2); background: var(--card); box-shadow: var(--shadow-card); font-size: 15px; line-height: 1.4; }
.fg-fact-main { flex: 1 1 100%; color: var(--ink); font-size: 18px; font-weight: 600; }
.fg-fact-main strong { margin-right: 6px; font-size: 36px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fg-view > .fg-note { margin-top: 10px; }
.fg-synthetic { margin: 0; }

/* The pattern: one sentence, said plainly. */
.fg-view .gd-card { border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.fg-view .gd-card h2 { color: var(--muted); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.fg-pattern-card { border-left: 3px solid var(--accent); }
.fg-view .fg-pattern { margin-top: 6px; color: var(--ink); font-size: 20px; line-height: 1.5; letter-spacing: -.005em; }
.fg-view .fg-none { color: var(--ink-2); font-size: 16px; }

/* Below the floor: the floor banner, in words. */
.fg-view .fg-empty { border-color: var(--warn-line); background: var(--warn-bg); box-shadow: none; }
.fg-view .fg-empty h2 { color: var(--ink); font-size: var(--fs-h2); letter-spacing: 0; text-transform: none; }
.fg-view .fg-empty p { color: var(--ink); }

/* Rates: label, count in words, the interval drawn, the interval in words. */
.fg-table { font-size: 15px; }
.fg-table caption { margin-bottom: 10px; font-size: 17px; }
.fg-table tbody th { color: var(--ink); font-weight: 600; line-height: 1.4; }
.fg-table tbody td { color: var(--ink-2); }
.fg-table tbody td.fg-count { color: var(--ink); font-weight: 600; }
.fg-table tr[data-shown="fewer_than"] .fg-count, .fg-table tr[data-shown="more_than"] .fg-count, .fg-table tr[data-shown="few"] .fg-count, .fg-table tr[data-shown="none"] .fg-count { font-weight: 500; font-style: italic; }
.fg-per { font-style: normal; font-weight: 400; }
.fg-bar { width: 30%; min-width: 140px; padding-right: 18px; }
.fg-bar::before { content: none; }
.fg-track { position: relative; display: block; height: 12px; border-radius: 6px; background: var(--bg-sunken); box-shadow: inset 0 0 0 1px var(--card-line); }
.fg-track::after { content: ""; position: absolute; top: -3px; bottom: -3px; left: 50%; width: 1px; background: var(--line-strong); }
.fg-track .fg-range { top: 0; height: 100%; border-radius: 6px; background: var(--ink-2); box-shadow: none; transform-origin: left center; }
.fg-table tr:is([data-shown="fewer_than"], [data-shown="more_than"]) .fg-range { background: repeating-linear-gradient(135deg, var(--ink-2) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.fg-bar-h { padding-right: 18px; }
.fg-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.fg-int { color: var(--ink-2); }
.fg-how { color: var(--muted); }

/* Guide and shared records. */
.fg-guide ol { display: grid; gap: 6px; margin: 10px 0 0; padding-left: 22px; color: var(--ink); font-size: 16px; line-height: 1.5; }
.fg-guide .gd-h3 { color: var(--accent-press); }
.fg-h { color: var(--ink); font-size: var(--fs-h2); letter-spacing: -.01em; }
.fg-record { box-shadow: var(--shadow-card); }

/* Motion (3.14): cards rise on entry, +80 ms each; the drawn ranges draw
   once from .3 s. Never a number. */
#app[data-enter] .fg-view > * { animation: gd-rise var(--t-enter) var(--ease-out) both; }
#app[data-enter] .fg-view > :nth-child(2) { animation-delay: 80ms; }
#app[data-enter] .fg-view > :nth-child(3) { animation-delay: 160ms; }
#app[data-enter] .fg-view > :nth-child(4) { animation-delay: 240ms; }
#app[data-enter] .fg-view > :nth-child(5) { animation-delay: 320ms; }
#app[data-enter] .fg-view > :nth-child(n + 6) { animation-delay: 400ms; }
#app[data-enter] .fg-range { animation: gd-draw 500ms var(--ease-out) 300ms both; }
#app[data-enter] .fg-guide, #app[data-enter] .fh-bar + .fg-h { animation: gd-rise var(--t-enter) var(--ease-out) both; }

/* The room view of a group view: chrome gone, type up for a projector. */
body.fg[data-room] .fg-view .fg-pattern { font-size: clamp(22px, 2.2vw, 30px); }
body.fg[data-room] .fg-table { font-size: clamp(16px, 1.5vw, 20px); }
body.fg[data-room] .fg-table caption { font-size: clamp(19px, 1.8vw, 24px); }
body.fg[data-room] .fg-table thead th { font-size: 14px; }
body.fg[data-room] .fg-scale { font-size: 14px; }
body.fg[data-room] .fg-track { height: 16px; border-radius: 8px; }
body.fg[data-room] .fg-track .fg-range { border-radius: 8px; }
body.fg[data-room] .fg-guide p, body.fg[data-room] .fg-guide ol { font-size: clamp(16px, 1.5vw, 20px); }
body.fg[data-room] .fg-fact { font-size: 17px; }
body.fg[data-room] .fg-fact-main { font-size: 22px; }
body.fg[data-room] .fg-fact-main strong { font-size: 48px; }
body.fg[data-room] .fg-note { font-size: 15px; }
body.fg[data-room] .fg-synthetic { font-size: 17px; }
body.fg[data-room] .fg-h { font-size: clamp(22px, 2.2vw, 30px); }
.fh-bar { margin-top: 0; gap: 8px 10px; }
.fh-bar a.gd-btn { text-decoration: none; }
.fh-bar [data-do="present"] { margin-left: auto; }
.fg-guide .fg-h { margin-top: 0; }
.fg-guide + .fg-view, .fg-view + .fg-h { margin-top: 20px; }

@media (max-width: 760px) {
  .fg-bar-h { display: none; }
  .fg-fact-main { font-size: 16px; }
  .fg-fact-main strong { font-size: 30px; }
  .fg-view .fg-pattern { font-size: 18px; }
}

/* ---------- Your record (3.16): a card per mission, each run a card ---------- */
.rc-header .rc-home { color: inherit; text-decoration: none; }
.rc-header a:not(.rc-home) { color: var(--ink-2); font-size: 14px; font-weight: 600; }
body.fx #app[data-stage="record"] { width: min(1040px, calc(100% - 32px)); }
.rc-head .gd-eyebrow { color: var(--accent); font-weight: 700; }
.rc-head h1 { margin-top: 10px; color: var(--ink); font-size: clamp(30px, 4.4vw, 46px); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
.rc-head p:not(.gd-eyebrow) { max-width: 62ch; margin-top: 14px; color: var(--ink-2); font-size: 17px; line-height: 1.55; }
.rc-chips { margin-top: 16px; }
.rc-chips li { border-color: transparent; color: var(--accent-press); background: var(--accent-soft); font-weight: 600; }

.rc-missions { display: grid; gap: 20px; margin-top: 32px; }
.rc-mission { overflow: hidden; border: 1px solid var(--card-line); border-radius: var(--r-xl); background: var(--card); box-shadow: var(--shadow-card); }
.rc-band { position: relative; padding: 18px 22px 16px; overflow: hidden; background: var(--gradient-hero); }
.rc-band::before { content: ""; position: absolute; top: -80px; right: -40px; width: 200px; height: 200px; border-radius: 50%; background: rgb(255 255 255 / 8%); }
.rc-band > * { position: relative; }
.rc-band-k { color: var(--on-dark-muted); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rc-band h2 { margin-top: 2px; color: var(--on-dark); font-size: 24px; font-weight: 700; letter-spacing: -.015em; }
.rc-body { padding: 18px 22px 22px; }

.rc-runs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.rc-run a { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; height: 100%; padding: 14px 16px; border: 1px solid var(--card-line); border-radius: var(--r-lg); color: var(--ink); background: var(--card); text-decoration: none; transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base), border-color var(--t-fast); }
.rc-run a:hover { transform: translateY(-2px); border-color: var(--accent-line); background: var(--card); box-shadow: var(--shadow-card); }
.rc-run-t { color: var(--ink); font-size: 16px; font-weight: 650; line-height: 1.35; }
.rc-run-d { color: var(--muted); font-size: 14px; }
.rc-run-go { margin-top: auto; padding-top: 4px; color: var(--accent); font-size: 14px; font-weight: 600; }
.rc-run a:hover .rc-run-go { color: var(--accent-press); }

/* Where a run stands (reconcile.mjs), in words; the tag's look repeats them:
   filled for in the session, plain for practice, dashed for on this device
   only, dotted while it could not be checked. */
.rc-run-s { display: inline-flex; align-items: baseline; gap: 8px; max-width: 100%; padding: 4px 10px; border: 1px solid var(--card-line); border-radius: var(--r-md); color: var(--ink-2); background: var(--card-soft); font-size: 13px; font-weight: 600; line-height: 1.45; }
.rc-run-s::before { content: ""; flex: none; width: 8px; height: 8px; border: 1.5px solid currentColor; border-radius: 50%; transform: translateY(-1px); }
.rc-run-s[data-where="session"] { border-color: var(--accent-line); color: var(--accent-press); background: var(--accent-soft); }
.rc-run-s[data-where="session"]::before { background: currentColor; }
.rc-run-s:is([data-where="after_close"], [data-where="absent"], [data-where="withdrawn"], [data-where="gone"], [data-where="not_shared"]) { border-style: dashed; border-color: var(--line-strong); background: var(--card); }
.rc-run-s[data-where="unchecked"] { border-style: dotted; border-color: var(--muted-2); background: var(--card); }
.rc-run-s[data-where="unchecked"]::before { border-style: dotted; }

.rc-none { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--card-soft); }
.rc-none p { color: var(--ink-2); font-size: 15px; }
.rc-none a.gd-btn { text-decoration: none; }

/* By theme: its own card, tagged experimental; cells in words, marks neutral. */
.rc-missions + .rc-themes { margin-top: 20px; }
.rc-themes { padding: clamp(20px, 3vw, 28px); border-radius: var(--r-xl); box-shadow: var(--shadow-card); }
.rc-tag { display: inline-block; margin: 0 0 8px; padding: 2px 10px; border: 1px dashed var(--accent-line); border-radius: var(--r-pill); color: var(--accent-press); background: var(--accent-soft); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.gd-card .rc-tag { margin-top: 0; font-size: 12px; }
.rc-themes h2 { font-size: var(--fs-h2); }
.rc-key { display: grid; gap: 6px; margin: 14px 0 16px; font-size: 14px; }
.rc-key div { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.rc-key dt { color: var(--ink); font-weight: 650; }
.rc-key dd { margin: 0; color: var(--ink-2); }
.rc-table td { color: var(--ink-2); }
.rc-table td[data-cell]::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border: 1.5px solid var(--ink-2); border-radius: 50%; vertical-align: 0; }
.rc-table td[data-cell="observed"] { color: var(--ink); font-weight: 650; }
.rc-table td[data-cell="observed"]::before { background: var(--ink-2); }
.rc-table td[data-cell="not_part"] { color: var(--muted); }
.rc-table td[data-cell="not_part"]::before { width: 10px; height: 0; border-width: 1.5px 0 0; border-radius: 0; vertical-align: 3px; }
.rc-theme { display: block; color: var(--ink); font-weight: 650; }
.rc-ev { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; line-height: 1.45; }
.rc-back { margin-bottom: 16px; }
.rc-back a { color: var(--accent-press); font-weight: 600; }
.rc-back a::before { content: "\2190"; margin-right: 8px; }
.rc-foot { width: min(1040px, calc(100% - 32px)); margin: 0 auto 32px; color: var(--muted); font-size: 13px; }

/* Motion (3.16): the head and the cards rise on entry, staggered. */
#app[data-enter] .rc-head { animation: gd-rise var(--t-enter) var(--ease-out) both; }
#app[data-enter] .rc-mission { animation: gd-rise var(--t-enter) var(--ease-out) calc(.12s + var(--i, 0) * var(--t-stagger)) both; }
#app[data-enter] .rc-themes { animation: gd-rise var(--t-enter) var(--ease-out) .48s both; }

@media (max-width: 640px) {
  .rc-head p:not(.gd-eyebrow) { font-size: 16px; }
  .rc-missions { gap: 16px; margin-top: 24px; }
  .rc-band { padding: 14px 16px 12px; }
  .rc-band h2 { font-size: 21px; }
  .rc-body { padding: 14px 16px 16px; }
  .rc-runs { grid-template-columns: minmax(0, 1fr); }
  .rc-none .gd-btn { width: 100%; }
  /* Each theme becomes a block, each mission's cell a labelled line. */
  .rc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .rc-table, .rc-table tbody, .rc-table tr, .rc-table th, .rc-table td { display: block; width: 100%; }
  .rc-table tr { padding: 10px 0; border-bottom: 1px solid var(--card-line); }
  .rc-table th, .rc-table td { padding: 2px 0; border: 0; }
  .rc-table td[data-cell]::before { content: attr(data-label) ": "; display: inline; width: auto; height: auto; margin: 0; border: 0; border-radius: 0; color: var(--muted); background: none; font-weight: 600; vertical-align: baseline; }
}
@media (prefers-reduced-motion: reduce) {
  .rc-run a, .rc-run a:hover { transform: none; transition: none; }
}

/* ---------- Second pass, slice 7b: the shell (docs/DESIGN_SECOND_PASS.md M1, R10, S1) ----------
   Appended; shared by every mission. */

/* M1: "Step n of N" beside the strip on laptops, drawn from data-count with an
   empty alternative so a screen reader reads the full line once; phones keep
   the full short form, where the list hides. */
@media (min-width: 761px) {
  .fx-stage-short { display: block; margin-right: auto; font-size: 0; }
  .fx-stage-short::before { content: attr(data-count) / ""; color: var(--muted); font-size: 13px; }
}

/* R10: "Saved on this device" shows for 2 s after a write, then fades. A failed write stays. */
.fx-saved { transition: opacity 400ms var(--ease-std); }
.fx-saved[data-faded]:not([data-state="failed"]) { opacity: 0; }

/* S1: the done card. A tick drawn once, three facts, one door and two quiet ones. */
.fx-done h1 { display: flex; align-items: center; gap: 12px; }
.fx-tick { flex: none; width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; }
#app[data-enter] .fx-tick { --tick-len: 20; animation: gd-draw-tick 400ms var(--ease-out) 200ms both; }
.fx-done-facts { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.fx-done-facts li { padding: 12px 16px; border-left: 3px solid var(--accent-line); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--ink); background: var(--card-soft); line-height: 1.5; }

/* R11, M11: the guide folds under the pattern and the counts. S14: what to say to the room, under the code. */
.fg-view + .fg-guide { margin-top: 20px; }
.fg-guide > summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.fg-guide > summary::-webkit-details-marker { display: none; }
.fg-guide > summary::after { content: "+"; margin-left: auto; color: var(--muted); font-size: 20px; }
.fg-guide[open] > summary::after { content: "\2212"; }
.fg-guide > summary .fg-h { margin: 0; }
.fg-guide[open] > summary { margin-bottom: 10px; }
.fh-say { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--accent-line); }
.fh-say p[data-say] { margin-top: 6px; color: var(--ink); font-size: 17px; line-height: 1.55; }
.fh-say .fg-note { margin-top: 10px; }
