/* ===========================================================================
   TinyDocx Dagwood — Coordination of Benefits
   Sandwich pastel palette: tan, yellow, pink, red, green.
   Matches the TinyDocx house style (Senior Tree / MemoryBook / MUE / Hash Browns).
   =========================================================================== */
:root{
  /* sandwich pastels */
  --bread:#f4b860;        /* crust gold */
  --bread-soft:#ffe7bd;   /* pastel tan */
  --cheese:#ffd23f;       /* yellow */
  --tomato:#e4572e;       /* red */
  --tomato-soft:#f7c0b3;  /* pastel pink/red */
  --pink:#f2a2a5;         /* deli pink */
  --lettuce:#79c84b;      /* green */
  --lettuce-deep:#38a836;
  --onion:#d66aa9;        /* pastel magenta */

  --ink:#2c2620;
  --ink-soft:#6f6457;
  --line:#ece3d6;
  --paper:#fffdf8;
  --panel:#fffaf1;
  --shadow:0 1px 2px rgba(90,70,40,.06), 0 8px 24px rgba(150,110,50,.07);
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,"Times New Roman",serif;
  --sans:"Segoe UI",system-ui,-apple-system,Roboto,Helvetica,Arial,sans-serif;
  --mono:"Cascadia Mono",Consolas,"SF Mono",Menlo,monospace;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:var(--sans); color:var(--ink);
  background:
    radial-gradient(1200px 480px at 80% -8%, #fff5e6 0%, transparent 60%),
    linear-gradient(180deg,#fffaf2 0%, #fdf6ec 100%);
  min-height:100vh;
}
a{color:inherit}
.mono{font-family:var(--mono)}
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
.skip-link{
  position:fixed; left:12px; top:12px; z-index:100; padding:10px 14px;
  background:#fff; border:2px solid var(--ink); border-radius:8px;
  transform:translateY(-160%); text-decoration:none; font-weight:700;
}
.skip-link:focus{transform:none}
button, input, a{touch-action:manipulation}
:where(button,a,input):focus-visible{
  outline:3px solid #1261a0; outline-offset:3px;
}

/* ---------- header ---------- */
header.top{
  display:flex; align-items:center; gap:18px;
  padding:14px 26px; background:var(--paper);
  border-bottom:1px solid var(--line); position:sticky; top:0; z-index:20;
}
.brand{display:flex; align-items:center; gap:14px; min-width:max-content}
.logo{
  width:54px; height:54px; border-radius:15px; overflow:hidden;
  box-shadow:0 6px 16px rgba(200,130,40,.28);
  background:linear-gradient(135deg,#ffd66e,#f4934a);
  display:flex; align-items:center; justify-content:center;
}
.logo img{width:100%; height:100%; object-fit:cover; display:block}
.brand h1{
  font-family:var(--serif); font-size:25px; font-weight:700;
  margin:0; line-height:1.05; letter-spacing:.1px;
}
.brand h1 .accent{color:var(--tomato)}
.brand .sub{
  font-size:11px; letter-spacing:.22em; text-transform:uppercase;
  color:var(--ink-soft); margin-top:3px; font-weight:600;
}
.tagline{
  flex:1; text-align:center; color:var(--ink-soft); font-size:13.5px;
  padding:0 16px; line-height:1.4;
}
.tagline b{color:var(--ink)}
.top-actions{display:flex; gap:10px; align-items:center}
.auth-user{max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  color:var(--ink-soft); font-size:12.5px; font-weight:650}
.auth-action{white-space:nowrap}
.btn-ghost{
  font-family:var(--sans); font-size:12.5px; font-weight:600;
  border:1px solid var(--line); background:#fff; color:var(--ink-soft);
  padding:9px 14px; border-radius:10px; cursor:pointer; display:inline-flex; gap:6px;
}
.btn-ghost:hover{border-color:var(--bread); color:var(--ink)}
.btn-dash{
  display:inline-flex; align-items:center; text-decoration:none;
  font-family:var(--sans); font-weight:800; letter-spacing:.08em; font-size:12.5px;
  color:#fff; border:none; padding:10px 18px; border-radius:11px; cursor:pointer;
  background:linear-gradient(120deg,var(--lettuce),var(--lettuce-deep));
  box-shadow:0 6px 14px rgba(56,168,54,.28);
}

/* ---------- tab bar ---------- */
.tabbar{
  display:flex; align-items:center; gap:8px;
  padding:10px 26px; background:var(--paper);
  border-bottom:1px solid var(--line); position:sticky; top:84px; z-index:15;
}
.tab{
  appearance:none; background:transparent; font-family:var(--sans);
  font-size:13px; font-weight:600; color:var(--ink-soft);
  padding:8px 14px; border-radius:10px; border:1px solid transparent; cursor:pointer;
  display:inline-flex; gap:7px; align-items:center;
}
.tab.active{background:#fff; border-color:var(--line); color:var(--ink); box-shadow:var(--shadow)}
.tab-note{
  margin-left:14px; font-size:11px; letter-spacing:.2em; text-transform:uppercase;
  color:#766b59;
}

/* ---------- layout ---------- */
.wrap{display:grid; grid-template-columns:312px 1fr; gap:0; align-items:start}
.rail{
  padding:20px 18px 60px; border-right:1px solid var(--line);
  min-height:calc(100vh - 138px);
}
.rail .railhead{
  font-size:11px; letter-spacing:.2em; text-transform:uppercase; color:#766b59;
  font-weight:700; margin:2px 0 12px; display:flex; align-items:center; gap:8px;
}
.rail .railhead::before{content:""; width:4px; height:14px; border-radius:3px; background:var(--cheese)}
.search{
  width:100%; padding:9px 12px; border:1px solid var(--line); border-radius:10px;
  font-family:var(--mono); font-size:12.5px; background:#fff; margin-bottom:14px;
}
.search:focus{border-color:var(--bread)}

.chap{
  display:block; width:100%; font-family:var(--sans); color:var(--ink); text-align:left;
  border:1px solid var(--line); border-radius:13px; background:var(--panel);
  padding:13px 14px; margin-bottom:11px; cursor:pointer; transition:.12s;
}
.chap:hover{border-color:var(--bread); transform:translateY(-1px); box-shadow:var(--shadow)}
.chap:disabled{cursor:not-allowed; opacity:.72; transform:none; box-shadow:none}
.chap.active{border-color:var(--lettuce); background:#f4fbef; box-shadow:0 0 0 1px var(--lettuce) inset}
.chap .cnum{font-family:var(--mono); font-weight:700; font-size:13px; color:var(--ink)}
.chap .ctitle{font-size:13.5px; font-weight:600; margin:3px 0 9px; line-height:1.3}
.chap .cblurb{display:none}
.pillrow{display:flex; gap:7px; flex-wrap:wrap; align-items:center}
.pill{
  font-family:var(--mono); font-size:10.5px; font-weight:700; letter-spacing:.05em;
  padding:3px 9px; border-radius:20px; text-transform:uppercase;
}
.pill.ready{background:#e7f6e2; color:#276f24}
.pill.unavailable{background:#f0ece4; color:#6f6457}
.pill.count{background:#fff4dc; color:#9a7327}
.rail-empty{font-size:13px; line-height:1.45; color:var(--ink-soft)}
.btn-retry{
  min-height:42px; padding:9px 14px; border:1px solid var(--bread);
  border-radius:10px; background:#fff; color:var(--ink); font-weight:700; cursor:pointer;
}

/* ---------- main panel ---------- */
.panel{padding:30px 40px 80px; max-width:920px}
.empty{
  text-align:center; color:var(--ink-soft); padding:90px 20px;
}
.empty .big{font-family:var(--serif); font-size:26px; color:var(--ink); margin:14px 0 8px}
.empty img{width:120px; height:120px; opacity:.92; filter:drop-shadow(0 8px 14px rgba(180,120,50,.2))}

/* progress */
.progress{
  display:flex; align-items:center; gap:12px; margin-bottom:22px; color:var(--ink-soft);
  font-size:12px;
}
.progress .bar{flex:1; height:8px; background:#f0e8da; border-radius:6px; overflow:hidden}
.progress .bar i{
  display:block; height:100%; border-radius:6px;
  background:linear-gradient(90deg,var(--cheese),var(--bread),var(--tomato));
  transition:width .3s ease;
}
.crumbs{font-family:var(--mono); font-size:11px}

/* question card */
.qcard{
  background:#fff; border:1px solid var(--line); border-radius:18px;
  box-shadow:var(--shadow); padding:30px 32px; animation:pop .18s ease;
}
@keyframes pop{from{opacity:0; transform:translateY(8px)} to{opacity:1; transform:none}}
.qcard .qctx{
  font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:#7b6134;
  font-weight:700; margin-bottom:10px;
}
.qcard h2{
  font-family:var(--serif); font-size:23px; line-height:1.3; margin:0 0 6px; font-weight:700;
}
.qcard .factid{font-family:var(--mono); font-size:11.5px; color:var(--ink-soft); margin-bottom:20px}
.qcard .qhelp{
  font-size:13.5px; line-height:1.5; color:var(--ink-soft); max-width:60ch;
  margin:2px 0 20px;
}
.qcard .testhint{
  font-size:12.5px; color:var(--ink-soft); margin:-8px 0 18px; font-style:italic;
}
.opts{display:flex; flex-direction:column; gap:11px; margin-top:8px}
.opt{
  text-align:left; font-family:var(--sans); font-size:15px; font-weight:600;
  padding:15px 18px; border-radius:13px; border:1.5px solid var(--line); background:#fffdf9;
  cursor:pointer; transition:.1s; display:flex; align-items:center; gap:12px;
}
.opt:hover{border-color:var(--tomato); background:#fff6f2; transform:translateX(2px)}
.opt .dot{width:11px; height:11px; border-radius:50%; background:var(--bread-soft); flex:none}
.opt.yes .dot{background:var(--lettuce)}
.opt.no .dot{background:var(--tomato)}
.numrow{display:flex; gap:12px; margin-top:10px}
.numrow input{
  flex:1; font-family:var(--mono); font-size:18px; padding:14px 16px;
  border:1.5px solid var(--line); border-radius:13px; background:#fffdf9;
}
.numrow input:focus{border-color:var(--bread)}
.numrow button, .selrow button{
  font-family:var(--sans); font-weight:800; letter-spacing:.05em; color:#fff; border:none;
  padding:0 26px; border-radius:13px; cursor:pointer;
  background:linear-gradient(120deg,var(--bread),var(--tomato));
  box-shadow:0 6px 14px rgba(228,87,46,.25);
}
.selrow{display:flex; gap:10px; margin-top:10px}
.selrow select{
  flex:1; font-size:15px; padding:14px 16px; border:1.5px solid var(--line);
  border-radius:13px; background:#fffdf9; font-family:var(--sans);
}
.cite-tag{
  margin-top:18px; font-size:11.5px; color:var(--ink-soft); font-family:var(--mono);
  border-top:1px dashed var(--line); padding-top:12px;
}

/* path trace */
.trace{margin-top:26px}
.trace .th{font-size:11px; letter-spacing:.18em; text-transform:uppercase; color:#b59a6a; font-weight:700; margin-bottom:10px}
.trace ol{list-style:none; margin:0; padding:0}
.trace li{
  display:flex; gap:12px; align-items:flex-start; padding:8px 0;
  border-bottom:1px solid var(--line); font-size:13px;
}
.trace li:last-child{border-bottom:none}
.trace .q{flex:1; color:var(--ink-soft)}
.trace .a{font-weight:700; font-family:var(--mono); font-size:12px; white-space:nowrap}
.trace .a.yes{color:var(--lettuce-deep)} .trace .a.no{color:var(--tomato)}

/* ---------- result / decision contract ---------- */
.result{animation:pop .2s ease}
.verdict{
  border-radius:20px; padding:26px 30px; color:#fff; box-shadow:var(--shadow);
  background:linear-gradient(120deg,#5aa84f,#2f8f2c);
}
.verdict.secondary{background:linear-gradient(120deg,var(--bread),#d98330)}
.verdict.conditional{background:linear-gradient(120deg,var(--cheese),#e0992a); color:#3a2c08}
.verdict.review,.verdict.barred,.verdict.notpayable{background:linear-gradient(120deg,var(--tomato),#b8331c)}
.verdict .status{
  font-family:var(--mono); font-size:13px; font-weight:700; letter-spacing:.05em;
  opacity:.9; text-transform:uppercase;
}
.verdict h2{font-family:var(--serif); font-size:25px; margin:8px 0 14px; line-height:1.28}
.payers{display:flex; gap:18px; flex-wrap:wrap}
.payer{background:rgba(255,255,255,.22); border-radius:12px; padding:10px 16px; backdrop-filter:blur(2px)}
.payer .lab{font-size:10.5px; letter-spacing:.16em; text-transform:uppercase; opacity:.85}
.payer .who{font-family:var(--mono); font-weight:700; font-size:17px; margin-top:2px}

.section{
  background:#fff; border:1px solid var(--line); border-radius:16px;
  padding:20px 24px; margin-top:16px; box-shadow:var(--shadow);
}
.section h3{
  font-size:11px; letter-spacing:.18em; text-transform:uppercase; color:#b59a6a;
  font-weight:700; margin:0 0 14px; display:flex; gap:8px; align-items:center;
}
.section h3::before{content:""; width:4px; height:13px; border-radius:3px; background:var(--tomato)}
.chips{display:flex; gap:8px; flex-wrap:wrap}
.chip{
  font-family:var(--mono); font-size:12px; font-weight:700; padding:5px 11px;
  border-radius:8px; background:#f6f1e8; border:1px solid var(--line);
}
.chip .k{color:var(--ink-soft); font-weight:600; margin-right:6px}
.chip.null{color:#a99b85}
.oblig{padding:12px 0; border-bottom:1px solid var(--line)}
.oblig:last-child{border-bottom:none}
.oblig .ty{
  font-family:var(--mono); font-size:11px; font-weight:700; color:var(--onion);
  text-transform:uppercase; letter-spacing:.05em;
}
.oblig .dt{font-size:13.5px; line-height:1.5; margin-top:4px; color:var(--ink)}
.cites .ci{padding:10px 0; border-bottom:1px solid var(--line); font-size:13px}
.cites .ci:last-child{border-bottom:none}
.cites .cid{font-family:var(--mono); font-size:11.5px; color:var(--tomato); font-weight:700}
.cites .ctext{color:var(--ink-soft); margin-top:2px}
.prov{font-size:12.5px; color:var(--ink-soft); line-height:1.55}
.prov .pa{font-family:var(--mono); color:var(--tomato); font-weight:700}
.meta-row{display:flex; gap:22px; flex-wrap:wrap; font-size:13px}
.meta-row .mk{color:var(--ink-soft); font-size:11px; text-transform:uppercase; letter-spacing:.1em}
.meta-row .mv{font-family:var(--mono); font-weight:700}
.needs-review{
  display:inline-flex; gap:6px; align-items:center; font-size:12px; font-weight:700;
  color:#b8331c; background:#fdeae6; border:1px solid #f5c6ba; padding:5px 11px; border-radius:20px;
}
.again{
  margin-top:24px; font-family:var(--sans); font-weight:700; font-size:13.5px;
  border:1px solid var(--line); background:#fff; color:var(--ink-soft);
  padding:12px 20px; border-radius:12px; cursor:pointer;
}
.again:hover{border-color:var(--tomato); color:var(--tomato)}
.inline-error{color:#8f2d1c; line-height:1.5; margin:18px 0 0}

.disclaimer{
  margin-top:30px; font-size:11.5px; color:var(--ink-soft); line-height:1.6;
  border-top:1px dashed var(--line); padding-top:14px;
}

/* ===========================================================================
   TinyDocx Picture Language (TPL) — icon + visible CMS vocabulary
   Rule: the icon precedes the term and never replaces it.
   =========================================================================== */
.tpl{display:inline-flex; align-items:center; gap:7px}
.tpl-icon{font-size:1.15em; line-height:1; font-family:
  "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif}
.tpl-term{font-weight:600}

/* Icon + Question headline */
.qhead{display:flex; align-items:flex-start; gap:12px}
.qhead-icon{
  font-size:30px; line-height:1.1; flex:none;
  font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
}

/* Icon + Term answer choices (picture walk) */
.opt .opt-icon{
  font-size:24px; line-height:1; width:30px; text-align:center; flex:none;
  font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
}
.opt .opt-term{font-weight:600}
.tpl-choices .opt{align-items:center}

/* TPL outcome inside the result verdict */
.verdict-badges{display:flex; flex-wrap:wrap; gap:10px; margin-bottom:12px}
.verdict .tpl-coverage{
  display:inline-flex; align-items:center; gap:8px; font-weight:800;
  font-size:15px; background:rgba(255,255,255,.24); padding:7px 14px;
  border-radius:20px;
}
.verdict .tpl-review{
  display:inline-flex; align-items:center; gap:7px; font-weight:800;
  font-size:13.5px; padding:7px 14px; border-radius:20px;
  background:rgba(184,51,28,.92); color:#fff;
  box-shadow:0 2px 8px rgba(120,30,15,.3);
}
.verdict .tpl-coverage .tpl-icon{font-size:1.3em}
.tpl-payers{
  display:flex; flex-direction:column; gap:10px; margin-top:18px;
  background:rgba(255,255,255,.16); border-radius:14px; padding:14px 16px;
}
.tpl-payer-row{
  display:flex; align-items:center; gap:16px; flex-wrap:wrap;
}
.tpl-payer-row .role .tpl-term{font-size:11px; letter-spacing:.12em;
  text-transform:uppercase; opacity:.9}
.tpl-payer-row .role .tpl-icon{font-size:1.4em}
.tpl-payer-row .who .tpl-term{font-family:var(--mono); font-size:17px; font-weight:700}
.tpl-payer-row .who .tpl-icon{font-size:1.5em}

/* Plain-words glossary: expands the acronyms in the outcome label so a
   non-expert can read it. Translucent white chips on the colored banner. */
.tpl-glossary{display:flex; flex-direction:column; gap:8px; margin-top:16px}
.gloss-chip{
  display:flex; align-items:baseline; gap:9px; flex-wrap:wrap;
  background:rgba(255,255,255,.16); border-radius:11px; padding:8px 13px;
}
.gloss-chip .gloss-icon{font-size:1.25em; align-self:center}
.gloss-chip .gloss-acr{font-family:var(--mono); font-weight:800; font-size:13.5px;
  letter-spacing:.04em}
.gloss-chip .gloss-exp{font-size:13.5px; opacity:.92; line-height:1.4}

/* ===========================================================================
   Image Key (legend) — the picture language: icon + meaning
   =========================================================================== */
.imagekey{animation:pop .18s ease}
.imagekey .ikhead{
  font-family:var(--serif); font-size:24px; margin:0 0 6px; font-weight:700;
}
.imagekey .iksub{color:var(--ink-soft); font-size:13px; margin-bottom:24px;
  line-height:1.5; max-width:640px}
.iksection{
  background:#fff; border:1px solid var(--line); border-radius:16px;
  padding:20px 24px; margin-bottom:16px; box-shadow:var(--shadow);
}
.iksection h3{
  font-size:11px; letter-spacing:.18em; text-transform:uppercase; color:#b59a6a;
  font-weight:700; margin:0 0 16px; display:flex; gap:8px; align-items:center;
}
.iksection h3::before{content:""; width:4px; height:13px; border-radius:3px; background:var(--cheese)}
.ikgrid{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:12px;
}
.ikitem{
  display:flex; align-items:center; gap:13px; padding:11px 14px;
  border:1px solid var(--line); border-radius:12px; background:#fffdf9;
}
.ikitem .ikicon{
  font-size:28px; line-height:1; width:38px; text-align:center; flex:none;
  font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
}
.ikitem .ikt{font-size:13.5px; font-weight:600; color:var(--ink); line-height:1.3}

/* ===========================================================================
   Wizard navigation — Back/Undo, result actions, session resume
   =========================================================================== */
.btn-back{
  font-family:var(--sans); font-weight:700; font-size:12.5px;
  border:1px solid var(--line); background:#fff; color:var(--ink-soft);
  padding:7px 14px; border-radius:10px; cursor:pointer; flex:none;
}
.btn-back:hover{border-color:var(--bread); color:var(--ink)}

.result-actions{display:flex; gap:12px; flex-wrap:wrap}
.result-actions .again{margin-top:24px}

.resume-chip{
  margin-top:26px; display:inline-flex; align-items:center; gap:16px;
  background:var(--panel); border:1px solid var(--bread);
  border-radius:14px; padding:14px 18px; box-shadow:var(--shadow);
  text-align:left;
}
.resume-chip .resume-text{font-size:13px; color:var(--ink-soft); line-height:1.5}
.resume-btn{
  font-family:var(--sans); font-weight:700; font-size:13px; flex:none;
  border:1px solid var(--lettuce-deep); background:#e7f6e2; color:#2f8f2c;
  padding:9px 16px; border-radius:10px; cursor:pointer;
}
.resume-btn:hover{background:var(--lettuce); color:#fff}
.resume-discard{
  font-family:var(--sans); font-weight:700; font-size:13px; flex:none;
  border:1px solid var(--line); background:#fff; color:var(--ink-soft);
  padding:9px 13px; border-radius:10px; cursor:pointer;
}

.status-message{
  position:fixed; left:50%; bottom:18px; z-index:50; max-width:min(620px,calc(100vw - 32px));
  transform:translate(-50%,18px); opacity:0; pointer-events:none;
  padding:11px 16px; border:1px solid #b9d9aa; border-radius:12px;
  background:#f2faee; color:#285f25; box-shadow:var(--shadow);
  font-size:13px; font-weight:650; transition:opacity .15s ease,transform .15s ease;
}
.status-message.visible{opacity:1; transform:translate(-50%,0)}
.status-message.error{border-color:#efb4a7; background:#fff1ed; color:#8f2d1c}
.is-busy{cursor:progress}

@media (max-width:800px){
  header.top{position:static; padding:12px 16px; flex-wrap:wrap; gap:12px}
  .brand{min-width:0; flex:1}
  .logo{width:46px; height:46px}
  .brand h1{font-size:22px}
  .brand .sub{letter-spacing:.14em}
  .tagline{display:none}
  .top-actions{width:100%; display:grid; grid-template-columns:repeat(3,1fr)}
  .top-actions > *{justify-content:center; min-height:42px; padding:8px 10px}
  .tabbar{position:static; padding:8px 12px; flex-wrap:wrap}
  .tab{min-height:42px; padding:8px 10px}
  .tab-note{width:100%; margin:2px 2px 0; line-height:1.45; letter-spacing:.12em}
  .wrap{display:block}
  .rail{min-height:0; padding:16px; border-right:0; border-bottom:1px solid var(--line)}
  #chapters{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px}
  .chap{margin:0}
  .panel{max-width:none; padding:22px 16px 64px}
  .empty{padding:48px 12px}
  .qcard{padding:24px 20px}
}

@media (max-width:520px){
  #chapters{grid-template-columns:1fr}
  .top-actions{grid-template-columns:1fr 1fr}
  .btn-dash{grid-column:1 / -1}
  .progress{align-items:flex-start; flex-wrap:wrap}
  .progress .bar{order:3; flex-basis:100%}
  .numrow{flex-direction:column}
  .numrow button{min-height:46px; padding:12px 18px}
  .qcard h2{font-size:21px}
  .trace li{display:block}
  .trace .a{display:block; margin-top:4px; white-space:normal}
  .resume-chip{display:flex; flex-wrap:wrap; justify-content:center}
  .resume-chip .resume-text{flex-basis:100%}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto !important; animation-duration:.01ms !important;
    animation-iteration-count:1 !important; transition-duration:.01ms !important}
}

/* ---------------------------------------------------------------------------
   Print / PDF export. The ↓ PDF button calls window.print(); without this the
   browser dumps the whole app (sidebar, tabs, action buttons). On print we keep
   only the brand and the determination card, and collapse the two-column grid
   so the result fills the page.
   --------------------------------------------------------------------------- */
@media print{
  /* Drop the interactive chrome: action buttons, tab bar, chapter sidebar. */
  .top-actions, .tabbar, .rail, .skip-link, .status-message{display:none !important}

  /* Collapse the layout grid to a single full-width column. */
  .wrap{display:block}
  .panel{max-width:none; padding:0}

  /* Trim the header to a clean printed letterhead. */
  .top{border:0; padding:0 0 12px}
  .tagline{display:none}

  /* Flat background; let result cards avoid splitting across page breaks. */
  body{background:#fff}
  .result{box-shadow:none}
  .section, .verdict, .oblig, .ci{break-inside:avoid; page-break-inside:avoid}
}
