/*
  ASTERIA — The Briefing Room, DIRECTOR-only styles (D28). Loaded beside
  learn.css; same tokens, same voice. Covers: THE LOOP (SVG ring), the hash
  chain (TWO HATS · READING THE RECORD · the practice record strip), the
  TRUTH ↔ BELIEF board, and the control-console replica of the practice turn.
  Every animation has its reduced-motion equivalent at the foot of the file.
*/

/* ── THE LOOP ──────────────────────────────────── */
.loopwrap { max-width: 980px; }
.loopwrap > .eyebrow { display: block; color: var(--accent-dim); margin-bottom: 6px; }
svg.loop { width: 100%; max-height: 46vh; height: auto; display: block; overflow: visible; }
svg.loop .looptrack { fill: none; stroke: var(--line2); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; animation: drawon 1.8s ease-out forwards; }
svg.loop .loopride { fill: none; stroke: none; }
svg.loop .loopstation .ring { fill: var(--panel); stroke: var(--line2); stroke-width: 1.5; transition: stroke .35s, filter .35s; }
svg.loop .loopstation .core { fill: var(--line2); transition: fill .35s; }
svg.loop .loopstation .stagenum { font: 700 11px var(--mono); fill: var(--bg); }
svg.loop .loopstation .stagelabel { font: 700 13px var(--disp); letter-spacing: .1em; fill: var(--ink2); }
svg.loop .loopstation .stagesub { font: 10.5px 'Segoe UI'; fill: var(--ink3); }
svg.loop .loopstation.hat-game-control.lit .ring { stroke: var(--accent); filter: drop-shadow(0 0 10px rgba(232, 196, 106, .55)); }
svg.loop .loopstation.hat-game-control.lit .core { fill: var(--accent); }
svg.loop .loopstation.hat-adjudicator.lit .ring { stroke: var(--serious); filter: drop-shadow(0 0 10px rgba(178, 120, 200, .5)); }
svg.loop .loopstation.hat-adjudicator.lit .core { fill: var(--serious); }
svg.loop .loopstation:not(.hat-game-control):not(.hat-adjudicator).lit .ring { stroke: var(--l3); filter: drop-shadow(0 0 10px rgba(121, 175, 217, .5)); }
svg.loop .loopstation:not(.hat-game-control):not(.hat-adjudicator).lit .core { fill: var(--l3); }
svg.loop .loopstation.lit .stagelabel { fill: var(--ink); }
svg.loop .packet { fill: var(--accent); filter: drop-shadow(0 0 8px rgba(232, 196, 106, .85)); }
svg.loop .loopcentre { font: 700 20px var(--disp); letter-spacing: .22em; fill: var(--ink3); opacity: 0; animation: fadein 1s ease forwards; animation-delay: 1.4s; }
.loopcaps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.loopcap { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; transition: border-color .3s, background .3s; }
.loopcap.lit { border-color: var(--accent-dim); background: rgba(232, 196, 106, .05); }
.loopcapbtn { display: flex; align-items: baseline; gap: 8px; width: 100%; background: none; border: 0; padding: 0; color: var(--ink2); cursor: pointer; font: inherit; text-align: left; }
.loopcapbtn .num { color: var(--accent); font-weight: 700; }
.loopcapbtn b { font: 700 12px/1.3 var(--disp); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.loopcapbtn[aria-pressed="true"] b { color: var(--accent); }
.loopcapbtn:focus-visible { outline: 2px solid var(--accent-dim); outline-offset: 3px; border-radius: 3px; }
.loopcap p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--ink2); }
.loopcap.lit p { color: var(--ink); }

/* ── the hash chain ────────────────────────────── */
.hatswrap, .recordwrap { max-width: none; }
.hatlegend { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.hatcard { display: flex; flex-direction: column; gap: 3px; flex: 1 1 280px; padding: 9px 12px; border-radius: 5px; border: 1px solid var(--line2); background: var(--panel); font-size: 12px; color: var(--ink2); }
.hatcard b { font: 700 11.5px/1.2 var(--disp); letter-spacing: .12em; }
.hatcard.hat-game-control { border-color: var(--accent-dim); } .hatcard.hat-game-control b { color: var(--accent); }
.hatcard.hat-adjudicator { border-color: var(--serious); } .hatcard.hat-adjudicator b { color: var(--serious); }
.chain { list-style: none; margin: 0; padding: 6px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 0; }
.chainlink { position: relative; min-width: 0; padding-right: 24px; opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .45s ease; }
.chainlink.shown { opacity: 1; transform: none; }
.chainlink::after { content: ""; position: absolute; top: 34px; right: 4px; width: 18px; height: 2px; background: var(--line2); }
.chainlink::before { content: ""; position: absolute; top: 30px; right: 2px; width: 0; height: 0; border: 5px solid transparent; border-left-color: var(--line2); }
.chainlink:last-child::after, .chainlink:last-child::before { display: none; }
.chainbtn { display: flex; flex-direction: column; gap: 5px; width: 100%; height: 100%; min-height: 150px; box-sizing: border-box; text-align: left; background: var(--panel); border: 1px solid var(--line2); border-radius: 6px; padding: 9px 10px; color: var(--ink); cursor: pointer; font: inherit; transition: border-color .3s, box-shadow .3s; }
.chainbtn:hover { border-color: var(--ink3); }
.chainbtn:focus-visible { outline: 2px solid var(--accent-dim); outline-offset: 2px; }
/* Glyph and sequence on the first row; the hat (or who) on its own row, so no link's badge ever wraps mid-word. */
.chainhead { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 6px; }
.chainglyph { font-size: 13px; color: var(--ink3); }
.chainseq { font-size: 10px; color: var(--ink3); }
.chainhat { grid-column: 1 / -1; justify-self: start; white-space: nowrap; font: 700 9px/1 var(--disp); letter-spacing: .1em; text-transform: uppercase; padding: 3px 6px; border-radius: 3px; border: 1px solid var(--line2); color: var(--ink3); }
.chainlink.hat-game-control .chainbtn { border-color: var(--accent-dim); box-shadow: inset 0 2px 0 var(--accent); }
.chainlink.hat-game-control .chainhat { border-color: var(--accent-dim); color: var(--accent); }
.chainlink.hat-adjudicator .chainbtn { border-color: var(--serious); box-shadow: inset 0 2px 0 var(--serious); }
.chainlink.hat-adjudicator .chainhat { border-color: var(--serious); color: var(--serious); }
.chainwhat { font-size: 11.5px; line-height: 1.45; color: var(--ink); text-wrap: pretty; }
.chainhash { display: flex; flex-direction: column; gap: 1px; margin-top: auto; font-size: 9.5px; color: var(--ink3); }
.chainhash .thishash { color: var(--ink2); }
.chainlink.fresh .chainbtn { animation: chainpop .6s ease both; }
@keyframes chainpop { 0% { box-shadow: 0 0 0 0 rgba(232, 196, 106, .0); } 40% { box-shadow: 0 0 0 4px rgba(232, 196, 106, .35); } 100% { box-shadow: 0 0 0 0 rgba(232, 196, 106, 0); } }
.chaindetail { margin: 10px 0 0; min-height: 2.6em; font-size: 13px; line-height: 1.55; color: var(--ink); max-width: 860px; }
.chaincap { margin: 6px 0 0; font-size: 10.5px; line-height: 1.55; color: var(--ink3); max-width: 860px; }
.chaincap b { color: var(--accent-dim); font: 600 9.5px/1 var(--disp); letter-spacing: .1em; }
.mode-append .chain { grid-template-columns: 1fr; gap: 8px 0; }
.mode-append .chainlink { padding-right: 0; }
.mode-append .chainlink::before, .mode-append .chainlink::after { display: none; }
.mode-append .chainbtn { min-height: 0; }
.mode-append .chaindetail { font-size: 11.5px; }
.mode-append .chaincap { display: none; }
.recordcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 16px; }
.recordcol { background: var(--panel); border: 1px solid var(--line2); border-radius: 6px; padding: 12px 14px; }
.recordcol h3 { margin: 0 0 8px; font: 700 12px/1.3 var(--disp); letter-spacing: .12em; text-transform: uppercase; }
.recordcol.shows h3 { color: var(--good); } .recordcol.cannot h3 { color: var(--warn); }
.recordcol ul { margin: 0; padding: 0; list-style: none; }
.recordcol li { position: relative; padding: 5px 0 5px 20px; font-size: 12.5px; line-height: 1.5; color: var(--ink); border-bottom: 1px solid var(--line); animation: rise .5s ease both; animation-delay: calc(var(--i, 0) * 100ms); }
.recordcol li:last-child { border-bottom: 0; }
.recordcol.shows li::before { content: "✓"; position: absolute; left: 2px; color: var(--good); }
.recordcol.cannot li::before { content: "—"; position: absolute; left: 2px; color: var(--warn); }
.recordnote { margin: 12px 0 0; font-size: 11.5px; color: var(--ink3); }

/* ── the truth ↔ belief board ──────────────────── */
.board { max-width: 1100px; }
.boardhead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.boardsteps { display: flex; gap: 4px; }
.boardstep { background: var(--panel); border: 1px solid var(--line2); border-radius: 4px; color: var(--ink2); font-size: 11.5px; padding: 6px 10px; cursor: pointer; transition: border-color .3s, color .3s; }
.boardstep[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 10px rgba(232, 196, 106, .25); }
.boardstep:focus-visible { outline: 2px solid var(--accent-dim); outline-offset: 2px; }
.boardsummary { margin: 0; font-size: 12.5px; color: var(--ink); }
.boardsummary b { color: var(--accent-dim); font: 600 9.5px/1 var(--disp); letter-spacing: .1em; margin-right: 4px; }
.boardrows { background: var(--panel); border: 1px solid var(--line2); border-radius: 6px; padding: 4px 14px; }
.boardrow .t .boardrest { font-size: 11px; color: var(--ink2); }
.boardrow .t .boardtruthtag { margin-left: auto; font-size: 9.5px; letter-spacing: .12em; color: var(--ink3); border: 1px solid var(--line2); border-radius: 3px; padding: 2px 6px; }
.boardlevels { display: flex; gap: 6px; margin: 6px 0 2px; }
.boardlevels .dim { display: inline-flex; align-items: center; gap: 4px; }
.boardlevels .dim i { font: 600 9px/1 var(--disp); letter-spacing: .08em; color: var(--ink3); font-style: normal; }
.boardlevels .lv { min-width: 30px; text-align: center; padding: 4px 0; display: inline-block; transition: background .5s; }
.boardrow .belief { display: inline-flex; align-items: center; gap: 4px; transition: border-color .4s, color .4s; }
.boardrow .belief .echip { font-size: 8.5px; padding: 3px 6px; }
.boardrow .belief .seesv { font-size: 10px; }
.boardrow .belief.noview { opacity: .6; }
.boardcap { margin: 10px 0 0; font-size: 10.5px; line-height: 1.55; color: var(--ink3); max-width: 860px; }
.boardcap b { color: var(--accent-dim); font: 600 9.5px/1 var(--disp); letter-spacing: .1em; }
.boardexample { margin-top: 16px; max-width: 760px; }
.boardexample .eyebrow { display: block; margin-bottom: 6px; color: var(--accent-dim); }
.boardexample .msg.delivery { border-color: var(--accent-dim); animation: rise .6s ease both; }

/* ── the practice turn: control-console replica ─ */
.practice-loading { font-size: 12px; color: var(--ink3); font-style: italic; }
.replica.console.director { padding: 0; max-width: none; font-size: 13px; }
.replica.director .grid.ctrl { grid-template-columns: 1fr 1.1fr 1fr; }
@media (max-width: 1120px) { .replica.director .grid.ctrl { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .replica.director .grid.ctrl { grid-template-columns: 1fr; } }
.replica.director .cmdbar { margin-bottom: 8px; }
.replica.director .nowbar { margin-bottom: 10px; }
/* The console's pace cards at the replica's narrower column: OUTSTANDING lists the cells on its own full-width card. */
.replica.director .pace .pacecard { flex: 1 1 40%; }
.replica.director .pace .pacecard:nth-child(2) { flex-basis: 100%; }
.replica.director .pace .pacecard .v { font-size: 12.5px; overflow-wrap: anywhere; }
.replica.director .panelintro { margin: -2px 0 8px; font-size: 11.5px; color: var(--ink2); line-height: 1.5; }
.replica.director .adj .panelintro { margin-top: 0; }
.replica.director .inj .cbtn, .replica.director .adjbtns .cbtn { transition: outline-color .3s, box-shadow .3s; }
.replica.director .actas { display: block; width: 100%; margin-top: 8px; background: var(--accent); border: none; border-radius: 4px; color: #141005; font: 700 11px/1 var(--disp); letter-spacing: .12em; padding: 10px 12px; cursor: pointer; }
.replica.director .actas:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.replica.director .adjexplain { margin: 6px 0 0; font-size: 10.5px; color: var(--ink3); line-height: 1.5; }
.replica.director .del.fanout { animation: rise .5s ease both; animation-delay: calc(var(--i, 0) * 220ms); }
.replica.director .del.fanout .echip { margin-left: 4px; }
.replica.director .guidering { transition: outline-color .3s; }
.decisionscap { display: block; margin: 16px 0 8px; color: var(--accent-dim); }

/* ── responsive ────────────────────────────────── */
@media (max-width: 900px) {
  .chain { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
}

/* ── reduced motion: every scene has its static equivalent ───────────── */
@media (prefers-reduced-motion: reduce) {
  svg.loop .looptrack, svg.loop .loopcentre { animation: none; stroke-dashoffset: 0; opacity: 1; }
  .chainlink { transition: none; }
  .chainlink.fresh .chainbtn, .recordcol li, .boardexample .msg.delivery, .replica.director .del.fanout { animation: none; }
  .loopcap, .boardstep, .boardrow .belief, .boardlevels .lv { transition: none; }
}
.reduced-motion svg.loop .looptrack, .reduced-motion svg.loop .loopcentre { animation: none; stroke-dashoffset: 0; opacity: 1; }
.reduced-motion .chainlink { transition: none; }
.reduced-motion .chainlink.fresh .chainbtn, .reduced-motion .recordcol li, .reduced-motion .boardexample .msg.delivery, .reduced-motion .replica.director .del.fanout { animation: none; }
