/* Closing Desk: warm paper ledger. Serif for statements, Plex Sans for the workbench. */
:root {
  --paper: #f3efe6;
  --card: #fffdf8;
  --sheet: #ffffff;
  --ink: #16201b;
  --ink-2: #3f4944;
  --muted: #59625d;
  --rule: #d9d1c0;
  --rule-2: #e9e3d6;
  --accent: #1d5a42;
  --accent-ink: #ffffff;
  --accent-soft: #e3eee7;
  --ok: #24653f;   --ok-bg: #e2efe6;
  --warn: #7f520c; --warn-bg: #f6ead2;
  --bad: #9a2d22;  --bad-bg: #f7e1dc;
  --info: #3a5566; --info-bg: #e3eaef;
  --radius: 10px;
  --shadow: 0 1px 0 rgba(22, 32, 27, .04), 0 8px 24px -12px rgba(22, 32, 27, .18);
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --step: clamp(1rem, .6rem + 1.4vw, 1.75rem);
  --gutter: clamp(1rem, .5rem + 2vw, 2.5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 15.5px/1.55 var(--sans); font-feature-settings: 'tnum' 1;
  background-image: radial-gradient(rgba(22, 32, 27, .035) 1px, transparent 1px);
  background-size: 22px 22px;
}
h2, h3 { margin: 0; }
p { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid #2f7d5c; outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; border-radius: 6px; }
.skip:focus { left: 8px; }

/* ---------- masthead */
.masthead { position: sticky; top: 0; z-index: 20; background: rgba(243, 239, 230, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.masthead__inner { max-width: 1360px; margin: 0 auto; padding: .7rem var(--gutter); display: flex; align-items: center; gap: .6rem 1.5rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .7rem; margin-right: auto; min-width: 0; }
.brand__mark { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--ink); color: var(--paper); font: 600 15px/1 var(--serif); letter-spacing: .02em; flex: none; }
.brand__name { font: 600 1.15rem/1.1 var(--serif); }
.brand__sub { font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.steps { display: flex; gap: .25rem; flex-wrap: wrap; }
.steps__item { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .7rem; min-height: 40px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .9rem; }
.steps__item span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--rule); font-size: .75rem; background: var(--card); }
.steps__item:hover { background: var(--card); color: var(--ink); }
.privacy { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; color: var(--ok); font-weight: 500; background: var(--ok-bg); padding: .35rem .7rem; border-radius: 999px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- layout */
.layout { max-width: 1360px; margin: 0 auto; padding: var(--step) var(--gutter) 4rem; display: grid; gap: var(--step); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .layout { grid-template-columns: minmax(0, 1fr) 290px; align-items: start; } }
.work { display: grid; gap: var(--step); min-width: 0; }
.panel { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: clamp(1rem, .6rem + 1.6vw, 2rem); box-shadow: var(--shadow); min-width: 0; }
.panel[hidden], .rail[hidden] { display: none; }
.panel__head { margin-bottom: 1.25rem; max-width: 70ch; }
.eyebrow { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.panel h2 { font: 600 clamp(1.45rem, 1.1rem + 1vw, 2rem)/1.15 var(--serif); margin: .2rem 0 .4rem; letter-spacing: -.01em; }
.lede { color: var(--ink-2); }
.sub { font: 600 1.1rem/1.3 var(--serif); margin: 1.6rem 0 .6rem; display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
.count { font: 500 .8rem var(--sans); color: var(--muted); }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- packet */
.drop { position: relative; display: grid; justify-items: center; gap: .3rem; padding: clamp(1.5rem, 1rem + 3vw, 3rem) 1rem; border: 1.5px dashed #b9ae97; border-radius: var(--radius); background: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(29, 90, 66, .025) 10px 20px), var(--sheet); text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s; font-size: 1rem; color: var(--ink); }
.drop:hover, .drop--over { border-color: var(--accent); background-color: var(--accent-soft); }
.drop:focus-within { outline: 3px solid #2f7d5c; outline-offset: 2px; }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; }
.drop__icon { color: var(--accent); }
.drop__title { font-weight: 600; }
.drop__hint { font-size: .85rem; color: var(--muted); font-weight: 400; }
.drop--small { padding: .9rem 1rem; grid-auto-flow: column; justify-content: center; gap: .6rem; }
.drop--small .drop__hint { display: none; }
.files { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .4rem; }
.file { display: flex; gap: .2rem 1rem; flex-wrap: wrap; align-items: center; padding: .45rem .8rem; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--sheet); }
.file__name { font-weight: 600; overflow-wrap: anywhere; }
.file__what { color: var(--muted); font-size: .85rem; margin-right: auto; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: .6rem; margin-top: 1.2rem; }
.fact { padding: .8rem .9rem; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--rule-2); }
.fact__h { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.fact__v { font-weight: 500; margin: .15rem 0; overflow-wrap: anywhere; }
.fact__s { font-size: .75rem; color: var(--muted); overflow-wrap: anywhere; }

table { border-collapse: collapse; width: 100%; }
.ties th, .ties td { padding: .55rem .6rem; border-bottom: 1px solid var(--rule-2); text-align: left; vertical-align: top; font-size: .9rem; }
.ties thead th, .lines thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.ties tbody th { font-weight: 500; min-width: 210px; }
.src { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; min-width: 140px; }
.pip { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .5rem; vertical-align: .05em; background: var(--ok); }
.tie--gap .pip, .check--bad .pip { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.tie--info .pip { background: var(--info); }
.tie--gap { background: linear-gradient(90deg, var(--warn-bg), transparent 60%); }

.note { margin-top: .8rem; padding: .7rem .9rem; border-radius: 8px; background: var(--info-bg); color: var(--info); font-size: .9rem; }
.note--warn { background: var(--warn-bg); color: var(--warn); }
.note--bad { background: var(--bad-bg); color: var(--bad); }
.note--busy { background: var(--accent-soft); color: var(--accent); }

/* ---------- entries */
.entry { border: 1px solid var(--rule); border-left: 4px solid var(--ok); border-radius: var(--radius); padding: 1rem clamp(.8rem, .5rem + 1vw, 1.25rem); background: var(--sheet); margin-bottom: .9rem; }
.entry--bad { border-left-color: var(--bad); }
.entry--off, .entry--blocked { border-left-color: var(--muted); background: #fbf9f4; }
.entry__head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; }
.entry__id { font: 600 .78rem var(--sans); letter-spacing: .06em; padding: .2rem .45rem; border-radius: 6px; background: var(--ink); color: var(--paper); }
.entry h3 { font: 600 1.08rem/1.3 var(--serif); margin-right: auto; }
.badge { font-size: .75rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px; background: var(--paper); color: var(--ink-2); border: 1px solid var(--rule); }
.badge--proposed, .badge--assumption { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge--answer, .badge--manual { background: var(--info-bg); color: var(--info); border-color: transparent; }
.badge--schedule, .badge--invoice { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.ni { font-weight: 600; font-size: .88rem; color: var(--muted); }
.ni--down { color: var(--bad); }
.ni--up { color: var(--ok); }
.entry__why { color: var(--ink-2); font-size: .9rem; margin: .5rem 0 .7rem; max-width: 85ch; }
.lines th, .lines td { padding: .4rem .5rem; border-bottom: 1px solid var(--rule-2); text-align: left; font-size: .9rem; }
.lines tbody th { font-weight: 500; min-width: 190px; }
.lines tfoot th, .lines tfoot td { font-weight: 600; border-bottom: 0; border-top: 1.5px solid var(--ink); }
.num { text-align: right !important; white-space: nowrap; }
.acct { font-size: .78rem; color: var(--muted); font-weight: 600; margin-right: .2rem; }
.amt { width: 9.5em; text-align: right; font-weight: 500; padding: .35rem .5rem; min-height: 38px; }
.amt:hover { border-color: #a99d84; }
.amt--edited { background: var(--info-bg); border-color: var(--info); }
.amt[aria-invalid='true'] { border-color: var(--bad); background: var(--bad-bg); }
.entry__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin-top: .7rem; }
.entry__tools { display: inline-flex; gap: 1rem; align-items: center; }
.state { font-size: .85rem; font-weight: 600; color: var(--ok); }
.state--bad { color: var(--bad); }
.state--off, .state--blocked { color: var(--muted); font-weight: 500; }
.switch { display: inline-flex; grid-auto-flow: column; align-items: center; gap: .4rem; font-size: .88rem; font-weight: 500; min-height: 44px; cursor: pointer; }
.switch input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
.link { background: none; border: 0; padding: .3rem 0; font: inherit; font-size: .88rem; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }
.totals { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; align-items: center; padding: .8rem 1rem; border-radius: var(--radius); background: var(--ink); color: var(--paper); font-size: .9rem; }
.totals .state { color: #9ee0b8; }
.totals .state--bad { color: #ffb4a8; }
.manual { margin-top: 1rem; border: 1px solid var(--rule); border-radius: var(--radius); padding: .6rem 1rem; background: var(--sheet); }
.manual summary { cursor: pointer; font-weight: 600; min-height: 36px; display: flex; align-items: center; }
.manual__form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: .7rem; padding: .8rem 0 .4rem; align-items: end; }
label { display: grid; gap: .25rem; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
input, select { font: inherit; font-size: .95rem; font-weight: 400; color: var(--ink); background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: .5rem .65rem; min-height: 44px; min-width: 0; }
.btn { font: inherit; font-weight: 600; padding: .55rem 1.05rem; min-height: 44px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; transition: transform .1s, background-color .15s; }
.btn:hover { background: #164a36; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent-soft); }

/* ---------- open items */
.progress { margin-bottom: .9rem; color: var(--muted); }
.progress strong { color: var(--ink); font: 600 1.3rem var(--serif); }
.flag { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem clamp(.8rem, .5rem + 1vw, 1.25rem) 1rem clamp(1rem, .7rem + 1vw, 1.45rem); background: var(--sheet); margin-bottom: .9rem; position: relative; }
.flag::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; border-radius: var(--radius) 0 0 var(--radius); background: var(--warn); }
.flag--done::before { background: var(--ok); }
.flag__head { display: flex; flex-wrap: wrap; gap: .4rem .7rem; align-items: center; }
.kind { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--muted); flex-basis: 100%; }
.flag h3 { font: 600 1.08rem/1.3 var(--serif); flex: 1 1 240px; }
.pill { font-size: .75rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; }
.pill--open { background: var(--warn-bg); color: var(--warn); }
.pill--done { background: var(--ok-bg); color: var(--ok); }
.flag__q { font-weight: 600; margin: .55rem 0 .3rem; }
.flag__why { color: var(--ink-2); font-size: .9rem; max-width: 85ch; }
.flag__src { color: var(--muted); font-size: .78rem; margin-top: .35rem; overflow-wrap: anywhere; }
.opts { display: flex; flex-wrap: wrap; gap: .45rem; margin: .8rem 0 .2rem; }
.opt { font: inherit; font-size: .88rem; min-height: 44px; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); cursor: pointer; }
.opt:hover { border-color: var(--accent); }
.opt[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: #fff; }
.opt__def { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; margin-left: .25rem; padding: .05rem .35rem; border-radius: 4px; background: rgba(255, 255, 255, .2); }
.param { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin-top: .6rem; }
.chat { list-style: none; margin: .8rem 0 0; padding: .7rem; display: grid; gap: .4rem; background: var(--paper); border-radius: var(--radius); }
.msg { max-width: min(85%, 60ch); padding: .45rem .75rem; border-radius: 12px; font-size: .9rem; }
.msg--you { justify-self: end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 4px; }
.msg--desk { justify-self: start; background: var(--sheet); border: 1px solid var(--rule); border-bottom-left-radius: 4px; }
.ask { display: flex; gap: .5rem; margin-top: .7rem; }
.ask input { flex: 1; }
.flag__now { font-size: .82rem; color: var(--muted); margin-top: .5rem; }

/* ---------- statements */
.checks { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: .5rem; }
.check { display: flex; gap: .2rem; align-items: start; padding: .6rem .75rem; border-radius: 8px; background: var(--ok-bg); font-size: .85rem; }
.check--bad { background: var(--bad-bg); }
.check .pip { margin-top: .4em; flex: none; }
.check__d { display: block; color: var(--ink-2); font-size: .78rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .2rem; border-bottom: 1px solid var(--rule); }
.tabs button { font: inherit; font-weight: 500; font-size: .9rem; padding: .6rem .85rem; min-height: 44px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--ink-2); cursor: pointer; }
.tabs button[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.tabs button:hover { color: var(--ink); }
.paper { position: relative; margin-top: 1rem; background: #e8e2d4; border-radius: var(--radius); padding: clamp(2rem, 1.5rem + 2vw, 3rem) clamp(.5rem, .2rem + 2vw, 2.5rem) clamp(.6rem, .3rem + 2vw, 2.5rem); }
.stamp { position: absolute; top: .65rem; right: .9rem; left: .9rem; text-align: right; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ok); }
.stamp--draft { color: var(--bad); }
.sheet { background: var(--sheet); max-width: 920px; margin: 0 auto; padding: clamp(1rem, .6rem + 2.4vw, 3rem) clamp(.7rem, .4rem + 2.4vw, 3.2rem); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 14px 30px -18px rgba(0, 0, 0, .35); }
.sheet--ttm { max-width: none; }
.sheet__co, .sheet__title, .sheet__period { text-align: center; font-family: var(--serif); }
.sheet__co { font-size: 1.15rem; font-weight: 600; }
.sheet__title { font-size: 1.05rem; }
.sheet__period { font-size: .95rem; color: var(--ink-2); margin-bottom: 1.4rem; }
.fs { font-size: .9rem; }
.fs thead th { font-weight: 600; font-size: .78rem; padding: .3rem .5rem; border-bottom: 1px solid var(--ink); }
.fs th[scope='row'] { text-align: left; font-weight: 400; padding: .22rem .5rem .22rem 1.2rem; min-width: 200px; }
.fs td { padding: .22rem .5rem; text-align: right; white-space: nowrap; }
.fs .pct { color: var(--ink-2); font-size: .92em; text-align: right; }
.r-head th { text-align: left; font-weight: 600; padding: .7rem .5rem .2rem; }
.r-sub th { font-weight: 500; font-style: italic; padding-left: .8rem; }
.r-total th, .r-total td { font-weight: 600; border-top: 1px solid var(--ink); }
.r-grand th, .r-grand td { font-weight: 700; border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); }
.fs .r-total th[scope='row'], .fs .r-grand th[scope='row'] { padding-left: .5rem; }
.cur { float: left; margin-right: .6rem; }
.sheet--ttm .fs { font-size: .78rem; }
.sheet--ttm .fs th[scope='row'] { min-width: 180px; position: sticky; left: 0; background: var(--sheet); }
.sheet--ttm { padding-inline: clamp(.5rem, .3rem + 1vw, 1.2rem); }
.sheet--ttm .fs { font-size: .68rem; }
.sheet--ttm .fs td { padding: .2rem .2rem; }
.sheet--ttm .fs th[scope='row'] { min-width: 128px; }
.sheet--ttm .cur { margin-right: .2rem; }
.swipe-hint.swipe-hint--always { display: block; margin: .4rem 0; font-size: .8rem; color: var(--muted); }
.review { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: end; margin-top: 1.2rem; }
.review__note { flex-basis: 100%; font-size: .8rem; color: var(--muted); }
.print-all { display: none; }

/* ---------- rail */
.rail { position: sticky; top: 84px; background: var(--ink); color: var(--paper); border-radius: 14px; padding: 1.2rem 1.2rem 1rem; box-shadow: var(--shadow); }
.rail__h { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: #b9c6bf; font-weight: 600; }
.bridge { list-style: none; padding: 0; margin: .7rem 0 1rem; display: grid; gap: .1rem; }
.bridge li { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; font-size: .9rem; }
.bridge__adj a { color: #d9e6df; text-underline-offset: 3px; }
.bridge .ni--down { color: #ffb4a8; }
.bridge .ni--up { color: #9ee0b8; }
.bridge__total { border-top: 1px solid #47544d; margin-top: .3rem; padding-top: .6rem !important; align-items: baseline; }
.bridge__total span:first-child { font-weight: 600; }
.bridge__total .num { font: 600 1.6rem/1 var(--serif); }
.rail__stats { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.stat { display: block; padding: .6rem .7rem; border-radius: 9px; background: #24302a; color: var(--paper); text-decoration: none; font-size: .8rem; min-height: 44px; }
.stat:hover { background: #2d3b34; }
.stat strong { display: block; font: 600 1.25rem var(--serif); }
.stat--warn strong { color: #f4cf8e; }
.stat--ok strong { color: #9ee0b8; }
.stat--bad strong { color: #ffb4a8; }
.rail__note { font-size: .78rem; color: #b9c6bf; margin-top: .8rem; }
.rail :focus-visible { outline-color: #9ee0b8; }
@media (max-width: 1099px) { .rail { position: static; order: -1; } }

.foot { max-width: 1360px; margin: 0 auto; padding: 0 var(--gutter) 3rem; color: var(--muted); font-size: .82rem; }

@media (max-width: 560px) {
  html { scroll-padding-top: 12px; }
  .masthead { position: static; }
  .steps { width: 100%; display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; }
  .steps__item { padding: .4rem .35rem; font-size: .8rem; min-height: 44px; }
  .steps__item span { display: none; }
  .ties, .ties tbody, .ties tr, .ties th, .ties td { display: block; }
  .ties thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ties tr { padding: .5rem .2rem; border-bottom: 1px solid var(--rule-2); }
  .ties th, .ties td { border: 0; padding: .1rem .4rem; }
  .ties tbody th { min-width: 0; }
  .ties td:last-child { font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
  .lines, .lines tbody, .lines tfoot { display: block; }
  .lines thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lines tr { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem .6rem; padding: .55rem 0; border-bottom: 1px solid var(--rule-2); }
  .lines th, .lines td, .lines tfoot th, .lines tfoot td { display: block; border: 0; padding: 0; }
  .lines tbody th, .lines tfoot th, .lines td.src { grid-column: 1 / -1; min-width: 0; }
  .lines td.num::before { content: attr(data-l); display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: left; }
  .lines td.num:empty::before { content: none; }
  .lines .amt { width: 100%; }
  .lines td.src { font-size: .78rem; overflow-wrap: anywhere; }
  .lines tfoot tr { border-top: 1.5px solid var(--ink); border-bottom: 0; }
  .ask { flex-direction: column; }
  .fs th[scope='row'] { min-width: 150px; padding-left: .6rem; }
}
@media (min-width: 1800px) { body { font-size: 16.5px; } .layout, .masthead__inner { max-width: 1520px; } }

/* ---------- print: the five statements only */
@page { margin: 14mm; }
@page wide { size: landscape; }
@media print {
  body { background: #fff; font-size: 10pt; }
  .masthead, .rail, .foot, .panel__head, #packet, #entries, #flags, #st-out > :not(.print-all) { display: none !important; }
  .layout, .work, .panel { display: block; padding: 0; margin: 0; border: 0; box-shadow: none; background: none; max-width: none; }
  .print-all { display: block; }
  .print-page { break-after: page; position: relative; }
  .print-page:has(.sheet--ttm) { page: wide; }
  .sheet { box-shadow: none; padding: 0; max-width: none; }
  .scroll { overflow: visible; }
  .stamp { position: static; text-align: right; margin-bottom: .5rem; }
  .sheet--ttm .fs { font-size: 7.5pt; }
  .sheet--ttm .fs td, .sheet--ttm .fs th { padding-top: .08rem; padding-bottom: .08rem; }
  .sheet--ttm .fs th[scope='row'] { min-width: 0; padding-left: .3rem; }
  .print-page:has(.sheet--ttm) { break-inside: avoid; }
}
.swipe-hint { display: none; }
@media (max-width: 700px) { .swipe-hint { display: block; margin: .4rem 0; font-size: .8rem; color: var(--muted); } }
@media print { .swipe-hint { display: none !important; } }
.rail__held { margin-top: .8rem; font-size: .85rem; font-weight: 600; }
.rail__held a { color: #f3c37a; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.paper:has(.sheet--ttm) { padding-inline: clamp(.3rem, .2rem + .6vw, 1rem); }
/* TTM scrolls sideways: pin the label column (row labels, section heads and the header corner) */
.sheet--ttm .fs thead th:first-child, .sheet--ttm .fs .r-head th { position: sticky; left: 0; z-index: 1; background: var(--sheet); white-space: nowrap; }
.sheet--ttm .fs th[scope='row'] { z-index: 1; }
