/* SPC Work Desk – "espresso and sheet".
   A dark espresso band carries navigation and the day's headline; a warm light sheet slides up over it and
   holds the work. One soft orange marks what needs action. Jost for words, thin large figures, pills instead of boxes.
   Fonts are self-hosted (Jost; IBM Plex Sans supplies the rupee sign). */

@font-face { font-family: "Rupee"; src: url("/static/fonts/plex-latin.woff2") format("woff2"); font-weight: 100 700; font-display: swap; unicode-range: U+20B9; }
@font-face { font-family: "Jost"; src: url("/static/fonts/jost-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jost"; src: url("/static/fonts/jost-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20B8, U+20BA-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex"; src: url("/static/fonts/plex-latin.woff2") format("woff2"); font-weight: 100 700; font-display: swap; }

:root {
  --esp: #2e2a28;
  --esp-2: #3b3633;
  --esp-3: #4b4541;
  --on-esp: #f4efea;
  --on-esp-2: #b3aaa3;
  --sheet: #efece9;
  --sheet-2: #e5e0db;
  --paper: #f8f6f4;
  --ink: #24201e;
  --ink-2: #67605b;
  --ink-3: #9a928c;
  --line: #dcd5cf;
  --acc: #e0673f;
  --acc-2: #c8532d;
  --acc-bg: #f7ddd1;
  --acc-ink: #8a3416;
  --ok-bg: #dfe4d6;
  --ok-ink: #3f5a3f;
  --warn-bg: #efe3cf;
  --warn-ink: #77582a;
  --info-bg: #dfe2e6;
  --info-ink: #3d4a58;
  --pill: 999px;
  --r: 14px;
  --r-lg: 22px;
  --sheet-r: 34px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --focus: 0 0 0 3px rgba(224, 103, 63, .45);
  font-family: "Rupee", "Jost", "Plex", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--esp); line-height: 1.5; }
a { color: var(--ink); text-decoration: none; transition: color .2s; }
a:hover { color: var(--acc-2); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 10px; }
h1 { font-size: 2.2rem; line-height: 1.12; letter-spacing: -0.015em; font-weight: 400; margin: 0 0 .3rem; }
h2 { font-size: 1.4rem; line-height: 1.25; font-weight: 400; margin: 0 0 1rem; letter-spacing: -0.005em; }
h3 { font-size: 1rem; font-weight: 500; margin: 1.4rem 0 .6rem; color: var(--ink-2); }
p { margin: .4rem 0 .8rem; }
b, strong { font-weight: 500; }
.i { width: 18px; height: 18px; flex: none; vertical-align: -3px; stroke-width: 1.75; }
.num, .money, .tbl td.num { font-variant-numeric: tabular-nums; }

/* ---------- Shell: espresso band + sheet ---------- */
.side { display: none; }
.main { min-height: 100vh; display: flex; flex-direction: column; }
.band { color: var(--on-esp); padding: 18px clamp(18px, 4vw, 48px) 58px; }
.band .bar { display: flex; align-items: center; gap: 6px; max-width: 1320px; margin: 0 auto; }
.brand { display: flex; align-items: baseline; gap: 8px; color: var(--on-esp); font-weight: 500; font-size: 1.15rem; margin-right: 20px; white-space: nowrap; }
.brand:hover { color: #fff; }
.brand b { font-weight: 500; color: var(--on-esp-2); font-size: .9rem; }
.nav { display: flex; gap: 2px; }
.nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: var(--pill); color: var(--on-esp-2); white-space: nowrap; transition: background .25s var(--ease), color .25s; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.nav a.on { background: var(--esp-2); color: #fff; }
.nav a .i { display: none; }
.band .grow { flex: 1; }
.band .search { position: relative; width: 210px; transition: width .35s var(--ease); }
.band .search:focus-within { width: 320px; }
.band .search input { margin: 0; min-height: 40px; padding-left: 38px; background: var(--esp-2); border-color: transparent; color: var(--on-esp); border-radius: var(--pill); }
.band .search input::placeholder { color: var(--on-esp-2); }
.band .search .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--on-esp-2); }
.band .btn { min-height: 40px; }
.band .btn.ghost { color: var(--on-esp); background: var(--esp-2); }
.band .btn.ghost:hover { background: var(--esp-3); color: #fff; }
.me { position: relative; }
.me > summary { list-style: none; cursor: pointer; width: 40px; height: 40px; border-radius: 50%; background: #7c6a5e; color: #fff; display: grid; place-items: center; font-weight: 500; font-size: .9rem; margin-left: 6px; }
.me > summary::-webkit-details-marker { display: none; }
.me .menu { position: absolute; right: 0; top: 50px; z-index: 40; background: var(--paper); color: var(--ink); border-radius: var(--r-lg); padding: 8px; min-width: 230px; box-shadow: 0 18px 40px rgba(20, 14, 10, .28); animation: rise .25s var(--ease); }
.me .menu .who { padding: 10px 12px 12px; line-height: 1.3; }
.me .menu .who small { display: block; color: var(--ink-3); }
.me .menu a, .me .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.me .menu a:hover, .me .menu button:hover { background: var(--sheet-2); }
.me .menu form { margin: 0; }

/* Desk headline inside the band */
.hero { max-width: 1320px; margin: 34px auto 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; animation: fade .5s var(--ease); }
.hero h1 { font-size: 2.9rem; font-weight: 400; color: var(--on-esp); margin: 0; }
.hero .sub { color: var(--on-esp-2); margin: 6px 0 0; }
.hero .fig { text-align: right; }
.hero .fig b { display: block; font-weight: 300; font-size: 4.2rem; letter-spacing: -0.03em; line-height: 1; }
.hero .fig b small { font-size: 1.2rem; font-weight: 400; color: var(--on-esp-2); margin-left: 6px; letter-spacing: 0; }
.hero .fig span { color: var(--on-esp-2); }
.chips { max-width: 1320px; margin: 24px auto 0; display: flex; gap: 10px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 10px; background: var(--esp-2); border-radius: var(--pill); padding: 6px 16px 6px 6px; color: var(--on-esp); transition: background .25s var(--ease); }
.chip:hover { background: var(--esp-3); color: #fff; }
.chip i { font-style: normal; min-width: 30px; height: 30px; padding: 0 8px; border-radius: var(--pill); background: var(--paper); color: var(--ink); display: grid; place-items: center; font-weight: 500; }
.chip.alert i { background: var(--acc); color: #fff; }
.chip.zero { color: var(--on-esp-2); }
.chip.zero i { background: var(--esp-3); color: var(--on-esp-2); }

.page { flex: 1; width: 100%; background: var(--sheet); border-radius: var(--sheet-r) var(--sheet-r) 0 0; margin-top: -30px; padding: 40px max(clamp(18px, 4vw, 48px), calc((100% - 1320px) / 2)) 40px; animation: sheet .45s var(--ease); }
.foot { background: var(--sheet); padding: 18px max(clamp(18px, 4vw, 48px), calc((100% - 1320px) / 2)) 26px; color: var(--ink-3); font-size: .8rem; }
.bottom { display: none; }
@keyframes sheet { from { transform: translateY(18px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Building blocks (no boxes: sections are separated by space) ---------- */
.card { margin-bottom: 44px; }
.card.flat { background: var(--paper); border-radius: var(--r-lg); padding: 20px 22px; }
.card.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.card > h2:first-child { display: flex; align-items: center; gap: 10px; }
.card > h2:first-child .i { display: none; }
.card.tile { display: flex; flex-direction: column; gap: 4px; color: inherit; padding: 18px 20px; margin: 0 0 6px; border-radius: var(--r-lg); transition: background .25s var(--ease); }
.card.tile:hover { background: var(--sheet-2); color: inherit; }
.card.tile h2 { font-size: 1.15rem; margin: 0; display: flex; align-items: center; gap: 12px; }
.card.tile h2 .i { display: grid; width: 38px; height: 38px; padding: 9px; border-radius: 50%; background: var(--paper); color: var(--acc); }
.card.tile p { color: var(--ink-2); margin: 0 0 0 50px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 0 64px; align-items: start; }
.grid2 > .wide { grid-column: 1 / -1; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 28px; }
.pagehead h1 { margin: 0; }
.pagehead .sub, .sub { color: var(--ink-2); margin: 4px 0 0; }
.page > h1:first-child, .page > .crumbs + h1 { margin-bottom: 24px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { margin: 0 0 8px; font-size: .9rem; }
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: var(--acc-2); }

.flash { padding: 12px 18px; border-radius: var(--r-lg); margin: 0 0 22px; display: flex; gap: 10px; align-items: flex-start; animation: fade .4s var(--ease); }
.flash p, .flash ul { margin: .2rem 0; }
.flash-ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash-error { background: var(--acc-bg); color: var(--acc-ink); }
.flash-info { background: var(--warn-bg); color: var(--warn-ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: var(--pill);
  border: 0; background: var(--paper); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; line-height: 1.1; white-space: nowrap;
  transition: background .25s var(--ease), color .2s, transform .12s; }
.btn:hover { background: #fff; color: var(--ink); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--esp); color: #fff; }
.btn.primary:hover { background: #000; color: #fff; }
.btn.butter, .btn.accent { background: var(--acc); color: #fff; }
.btn.butter:hover, .btn.accent:hover { background: var(--acc-2); color: #fff; }
.btn.danger { color: var(--acc-ink); background: var(--acc-bg); }
.btn.danger:hover { background: #f2cbb9; }
.btn.small { min-height: 34px; padding: 0 14px; font-size: .9rem; }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--sheet-2); }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
form.inline { display: inline; }
.linkbtn { background: none; border: 0; color: var(--acc-2); cursor: pointer; font: inherit; padding: 0; }

label { display: block; font-size: .88rem; color: var(--ink-2); margin-bottom: 16px; }
label.check { display: flex; gap: 10px; align-items: center; color: var(--ink); font-size: .95rem; }
label.check.inline { display: inline-flex; margin-right: 14px; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; min-height: 46px; padding: 10px 16px; border: 1.5px solid transparent; border-radius: var(--r);
  font: inherit; font-size: 15px; color: var(--ink); background: var(--paper); transition: border-color .2s, box-shadow .2s, background .2s; }
textarea { min-height: 96px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
input:hover, select:hover, textarea:hover { background-color: #fff; }
input:focus, select:focus, textarea:focus { outline: none; background-color: #fff; border-color: var(--acc); box-shadow: 0 0 0 4px rgba(224, 103, 63, .14); }
input[type=checkbox], input[type=radio] { width: 19px; height: 19px; min-height: 0; display: inline-block; margin: 0; accent-color: var(--acc); flex: none; padding: 0; }
input[type=file] { padding: 10px 12px; }
input[type=file]::file-selector-button { border: 0; border-radius: var(--pill); background: var(--esp); color: #fff; font: inherit; padding: 6px 14px; margin-right: 12px; cursor: pointer; }
input.from-scan, select.from-scan { background-color: #fbeadf; border-color: #f0b79f; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 18px; }
.formgrid .span2 { grid-column: 1 / -1; }
.fieldset { padding-top: 8px; margin-top: 18px; }
.fieldset > .legend { font-size: 1.15rem; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.fieldset > .legend .i { color: var(--acc); }
.hint { font-size: .84rem; color: var(--ink-3); margin-top: 5px; display: block; }
.rowform { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.rowform label { margin-bottom: 0; flex: 1 1 220px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 22px; }
.filters label { margin: 0; }
.filters input, .filters select { width: auto; min-width: 140px; }
.filters label.check { align-self: center; margin-top: 22px; }
.sep { margin-top: 22px; padding-top: 6px; }
details summary { cursor: pointer; color: var(--acc-2); font-weight: 500; }
.dupbox { background: var(--warn-bg); border-radius: var(--r-lg); padding: 14px 18px; margin-bottom: 16px; color: var(--warn-ink); }

/* Tables: rows that tint on hover, hairlines only */
.tablewrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .95rem; }
.tbl th { text-align: left; font-weight: 400; color: var(--ink-3); font-size: .84rem; padding: 8px 12px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl td { padding: 14px 12px; border-bottom: 1px solid #e6e0da; vertical-align: top; transition: background .2s; }
.tbl tbody tr:hover td { background: var(--sheet-2); }
.tbl tbody tr:hover td:first-child { border-radius: 16px 0 0 16px; }
.tbl tbody tr:hover td:last-child { border-radius: 0 16px 16px 0; }
.tbl td a { font-weight: 500; }
.tbl.compact td, .tbl.compact th { padding: 8px 10px; }
.tbl tr.total td { font-weight: 500; border-top: 1px solid var(--line); }
.tbl tr.overdue td:first-child, .tbl tr.aged td:first-child { box-shadow: inset 3px 0 0 var(--acc); }
.tbl tr.today td:first-child { box-shadow: inset 3px 0 0 var(--warn-ink); }
.tbl tr.struck td { color: var(--ink-3); }
.tbl th.num, .num { text-align: right; white-space: nowrap; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.wrap { word-break: break-word; }
.bad { color: var(--acc-2); font-weight: 500; }
.muted { color: var(--ink-3); }
.small { font-size: .88rem; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .88em; }
.big { font-size: 1.3rem; }
.center { text-align: center; }

.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; padding: 2px 10px; border-radius: var(--pill); background: var(--sheet-2); color: var(--ink-2); margin-left: 4px; white-space: nowrap; vertical-align: 1px; }
.tag.bad { background: var(--acc-bg); color: var(--acc-ink); }
.tag.warn { background: var(--warn-bg); color: var(--warn-ink); }
.tag.ok { background: var(--ok-bg); color: var(--ok-ink); }
.count { display: inline-grid; place-items: center; min-width: 28px; height: 26px; font-size: .82rem; padding: 0 9px; border-radius: var(--pill); background: var(--esp); color: #fff; font-weight: 500; }
.count.bad { background: var(--acc); }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; padding: 3px 12px 3px 10px; border-radius: var(--pill); background: var(--sheet-2); color: var(--ink-2); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .75; }
.s-received, .s-open { background: var(--sheet-2); color: var(--ink-2); }
.s-prepared, .s-submitted { background: var(--info-bg); color: var(--info-ink); }
.s-checked, .s-ia_cleared, .s-checked_external, .s-done, .s-resolved { background: var(--ok-bg); color: var(--ok-ink); }
.s-sent_ia, .s-put_up, .s-bank_upload { background: var(--warn-bg); color: var(--warn-ink); }
.s-ia_query { background: var(--acc-bg); color: var(--acc-ink); }
.s-approved { background: #d5ddc9; color: #344a33; }
.s-paid { background: var(--esp); color: #fff; }
.s-cancelled { background: transparent; color: var(--ink-3); text-decoration: line-through; }

.tabs { display: inline-flex; gap: 2px; margin-bottom: 22px; flex-wrap: wrap; background: var(--sheet-2); padding: 4px; border-radius: var(--pill); }
.tabs a { padding: 7px 16px; border-radius: var(--pill); color: var(--ink-2); transition: background .25s var(--ease), color .2s; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { background: var(--esp); color: #fff; }
.pager { display: flex; gap: 4px; flex-wrap: wrap; margin: 18px 0; }
.pager a { min-width: 38px; text-align: center; padding: 7px 10px; border-radius: var(--pill); color: var(--ink-2); }
.pager a:hover { background: var(--sheet-2); }
.pager a.on { background: var(--esp); color: #fff; }
.kv { display: grid; grid-template-columns: 11rem 1fr; gap: 10px 18px; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 10px 0; border-bottom: 1px solid #e6e0da; }
ul.codes { columns: 2; font-size: 1.15rem; font-family: ui-monospace, Consolas, monospace; }
.note { border-left: 2px solid var(--acc); padding-left: 12px; margin: 10px 0; color: var(--ink-2); }
.history td.small { max-width: 520px; word-break: break-word; }
h2 .scope { font-size: .9rem; color: var(--ink-3); }
h2.gap { margin-top: 26px; }
.empty { color: var(--ink-3); padding: 14px 0; display: flex; gap: 10px; align-items: center; }
.empty .i { color: var(--ok-ink); }
.hdr2 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.hdr2 h2 { margin: 0; }
.hdr2 a { color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; }
.hdr2 a:hover { color: var(--acc-2); }

/* ---------- Signature: bills by stage, as striped bars ---------- */
.stagewrap { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.stagewrap .total { font-size: 3.4rem; font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.stagewrap .of { color: var(--ink-2); }
.stages { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(52px, 1fr); gap: 8px; align-items: end; margin-bottom: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.stage { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink-3); text-align: center; }
.stage:hover { color: var(--ink); }
.stage .n { font-size: 1.25rem; color: var(--ink); }
.stage .n.zero { color: var(--ink-3); }
.stage .col { width: 100%; border-radius: 14px; background: repeating-linear-gradient(180deg, #dcd1c8 0 9px, #e8e1da 9px 15px); transition: height .6s var(--ease), filter .2s; }
.stage:hover .col { filter: brightness(.96); }
.stage.on .col { background: repeating-linear-gradient(180deg, var(--acc) 0 9px, #ec8a68 9px 15px); }
.stage.on .st { color: var(--ink); font-weight: 500; }
.stage.hold .col { background: repeating-linear-gradient(180deg, #5b524c 0 9px, #77706a 9px 15px); }
.stage .st { font-size: .84rem; white-space: nowrap; }
.stage .v { font-size: .78rem; white-space: nowrap; }
.h0 { height: 8px; } .h1 { height: 22px; } .h2 { height: 34px; } .h3 { height: 46px; } .h4 { height: 58px; } .h5 { height: 70px; }
.h6 { height: 82px; } .h7 { height: 94px; } .h8 { height: 106px; } .h9 { height: 118px; } .h10 { height: 130px; }
.stages.compact .h0 { height: 6px; } .stages.compact .col { max-height: 64px; }
.stages.compact .h10, .stages.compact .h9, .stages.compact .h8 { height: 64px; } .stages.compact .h7, .stages.compact .h6 { height: 50px; }
.stages.compact .h5, .stages.compact .h4 { height: 38px; } .stages.compact .h3, .stages.compact .h2 { height: 26px; } .stages.compact .h1 { height: 16px; }
.stagehint { font-size: .84rem; color: var(--ink-3); margin: 4px 0 30px; }

/* Stage track on a bill's page: a line of steps */
.track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(70px, 1fr); margin: 10px 0 30px; overflow-x: auto; }
.track span { position: relative; padding: 24px 8px 0 0; font-size: .82rem; color: var(--ink-3); }
.track span::before { content: ""; position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--sheet); border: 1.5px solid var(--ink-3); z-index: 1; }
.track span::after { content: ""; position: absolute; left: 12px; right: 0; top: 10px; height: 2px; background: var(--line); }
.track span:last-child::after { display: none; }
.track span.done { color: var(--ink-2); }
.track span.done::before { background: var(--esp); border-color: var(--esp); }
.track span.done::after { background: var(--esp); }
.track span.now { color: var(--ink); font-weight: 500; }
.track span.now::before { background: var(--acc); border-color: var(--acc); box-shadow: 0 0 0 5px rgba(224, 103, 63, .2); }
.track span.skip { opacity: .45; }

/* "What to do next" on a bill */
.nextstep { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--esp); color: var(--on-esp); border-radius: var(--r-lg); padding: 18px 22px; margin: 0 0 30px; }
.nextstep .what { font-size: 1.15rem; }
.nextstep .what small { display: block; color: var(--on-esp-2); font-size: .9rem; margin-top: 2px; }
.nextstep .btn { background: var(--acc); color: #fff; }
.nextstep .btn:hover { background: var(--acc-2); }
.nextstep.wait { background: var(--sheet-2); color: var(--ink); }
.nextstep.wait .what small { color: var(--ink-2); }

/* Desk lists: soft rows */
.queue { list-style: none; margin: 0; padding: 0; }
.queue li { display: flex; align-items: center; gap: 14px; padding: 11px 14px 11px 10px; border-radius: 26px; transition: background .25s var(--ease); }
.queue li + li { margin-top: 2px; }
.queue li:hover { background: var(--sheet-2); }
.queue .when { min-width: 44px; height: 44px; padding: 0 6px; flex: none; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font-size: .78rem; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: center; line-height: 1.1; }
.queue .when.wide { border-radius: var(--pill); min-width: 92px; font-size: .9rem; color: var(--ink); }
.queue .what { flex: 1; min-width: 0; }
.queue .what a { color: var(--ink); }
.queue .what a:hover { color: var(--acc-2); }
.queue .what small { display: block; color: var(--ink-3); font-size: .86rem; }
.queue .amt { font-size: 1.05rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.queue .age { font-size: .86rem; color: var(--ink-3); white-space: nowrap; }
.queue .age.late { color: var(--acc-2); }
.queue li.overdue .when { color: var(--acc); background: var(--acc-bg); font-weight: 500; }

/* OCR panel: a dark block, like the band */
.scanbox { display: grid; grid-template-columns: 1fr 240px; gap: 20px; background: var(--esp); color: var(--on-esp); border-radius: 28px; padding: 24px 26px; margin-bottom: 30px; scroll-margin-top: 20px; }
.scanbox h2 { color: #fff; margin-bottom: 6px; display: flex; gap: 10px; align-items: center; }
.scanbox h2 .i { color: var(--acc); }
.scanbox p { color: var(--on-esp-2); margin: 0 0 16px; }
.scanbox .pick { display: inline-flex; }
.scanbox input[type=file] { display: none; }
.scanbox .preview { background: var(--esp-2); border-radius: 18px; min-height: 150px; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--on-esp-2); font-size: .86rem; text-align: center; padding: 10px; }
.scanbox .preview img, .scanbox .preview canvas { max-width: 100%; max-height: 240px; display: block; border-radius: 8px; }
.scanbox .progress { height: 6px; background: var(--esp-3); border-radius: 3px; overflow: hidden; margin: 14px 0 8px; display: none; }
.scanbox .progress i { display: block; height: 100%; width: 0; background: var(--acc); transition: width .3s var(--ease); }
.scanbox.busy .progress { display: block; }
.scanbox .found { font-size: .92rem; color: var(--on-esp); }
.scanbox .found b { color: #f3a487; font-weight: 500; }

/* Sign-in pages */
.authwrap { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 46%) 1fr; background: var(--esp); }
.authside { color: var(--on-esp); padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; }
.authside .brand { font-size: 1.3rem; }
.authside .claim { font-size: 3rem; line-height: 1.08; letter-spacing: -0.02em; font-weight: 300; color: #fff; max-width: 12ch; margin: 0; }
.authside .claim span { color: var(--acc); }
.authside .rail-mini { display: flex; gap: 6px; align-items: flex-end; margin-top: 30px; height: 70px; }
.authside .rail-mini i { flex: 1; border-radius: 10px; background: repeating-linear-gradient(180deg, #5b524c 0 7px, #4b4541 7px 12px); height: 40%; }
.authside .rail-mini i:nth-child(2) { height: 70%; } .authside .rail-mini i:nth-child(4) { height: 55%; } .authside .rail-mini i:nth-child(6) { height: 30%; }
.authside .rail-mini i.b { background: repeating-linear-gradient(180deg, var(--acc) 0 7px, #ec8a68 7px 12px); height: 100%; }
.authside small { color: var(--on-esp-2); }
.authmain { display: flex; align-items: center; justify-content: center; padding: 40px 22px; background: var(--sheet); border-radius: var(--sheet-r) 0 0 var(--sheet-r); animation: sheet .45s var(--ease); }
.authmain .card { width: 100%; max-width: 420px; margin: 0; }
.authmain h1 { font-size: 2rem; margin-bottom: 18px; }

.filterbox > summary { display: none; }
.filterbox > summary::-webkit-details-marker { display: none; }

/* ---------- Tablet ---------- */
@media (max-width: 1240px) {
  .band .search { display: none; }
  .nav a { padding: 8px 12px; }
}
@media (max-width: 1080px) {
  .band .newbill { display: none; }
}

/* ---------- Phone ---------- */
@media (max-width: 1023px) {
  .nav, .band .desk-only { display: none; }
  .band { padding: 14px 18px 50px; }
  .main { padding-bottom: 96px; }
  .page { padding: 30px 18px 30px; border-radius: 28px 28px 0 0; }
  .foot { padding: 12px 18px 20px; }
  .hero { margin-top: 24px; flex-direction: column; align-items: flex-start; gap: 18px; }
  .hero h1 { font-size: 2.2rem; }
  .hero .fig { text-align: left; }
  .hero .fig b { font-size: 3.4rem; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -18px; padding-right: 18px; scrollbar-width: none; }
  .chip { white-space: nowrap; }
  .bottom { display: flex; justify-content: space-around; align-items: center; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
    background: var(--esp); border-radius: var(--pill); padding: 7px; box-shadow: 0 12px 30px rgba(20, 14, 10, .3); }
  .bottom a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--on-esp-2); font-size: .72rem; padding: 4px 10px; min-height: 48px; justify-content: center; border-radius: var(--pill); }
  .bottom a.on { color: #fff; }
  .bottom a .i { width: 21px; height: 21px; }
  .bottom a.scan { flex-direction: row; gap: 8px; background: var(--acc); color: #fff; padding: 0 20px; font-size: .95rem; font-weight: 500; }
  .bottom a.scan .dot { display: grid; }
  .authwrap { grid-template-columns: 1fr; }
  .authside { padding: 28px 22px 40px; }
  .authside .claim { font-size: 2.2rem; margin-top: 22px; }
  .authside small, .authside .rail-mini { display: none; }
  .authmain { border-radius: 28px 28px 0 0; align-items: flex-start; margin-top: -24px; }
}
@media (max-width: 720px) {
  h1 { font-size: 1.9rem; }
  .grid2 { grid-template-columns: 1fr; }
  .card { margin-bottom: 36px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { margin-top: 10px; }
  .filters label { flex: 1 1 45%; }
  .filters input, .filters select { width: 100%; min-width: 0; }
  .btn { min-height: 46px; }
  .btn.small { min-height: 38px; }
  .scanbox { grid-template-columns: 1fr; padding: 20px; }
  .scanbox .preview:not(.has) { display: none; }
  .filterbox > summary { display: inline-flex; list-style: none; margin-bottom: 14px; }
  .filterbox:not([open]) > .filters { display: none; }
  .stagewrap .total { font-size: 2.8rem; }
  .stages { grid-auto-columns: 62px; margin-right: -18px; padding-right: 18px; }
  /* Tables marked .cards become stacked rows */
  .tbl.cards thead { display: none; }
  .tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; width: 100%; }
  .tbl.cards tr { padding: 12px 4px; border-bottom: 1px solid #e3ddd7; }
  .tbl.cards tbody tr:hover td { background: none; }
  .tbl.cards td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .tbl.cards td::before { content: attr(data-label); color: var(--ink-3); font-size: .84rem; text-align: left; flex: none; }
  .tbl.cards td[data-label=""]::before, .tbl.cards td:not([data-label])::before { content: none; }
  .tbl.cards td.lead { font-size: 1.05rem; text-align: left; justify-content: flex-start; }
  .tbl.cards tr.overdue td:first-child, .tbl.cards tr.aged td:first-child { box-shadow: none; }
  .tbl.cards tr.overdue, .tbl.cards tr.aged { box-shadow: inset 3px 0 0 var(--acc); padding-left: 12px; }
  .tablewrap { overflow: visible; }
  .queue li { padding: 10px 4px; }
  .queue .age { display: none; }
  .nextstep { padding: 16px 18px; }
  .nextstep .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print {
  .band, .bottom, .noprint, .foot, form, .btn, details, .nextstep { display: none !important; }
  body, .page { background: #fff; }
  .page { margin: 0; padding: 0; border-radius: 0; animation: none; }
  body { font-size: 11pt; }
  .card { margin-bottom: 14px; }
  a { color: inherit; }
}

/* Buttons the band already offers on wide screens */
@media (min-width: 1024px) { .phone-only { display: none !important; } }
.filters .grow2 { flex: 2 1 260px; } .filters .grow2 input { width: 100%; }
.grid2 > *, .page > * { min-width: 0; }
.page { overflow-x: clip; }
.filters input[type=checkbox] { min-width: 0; width: 19px; }
.stages.compact { grid-auto-columns: minmax(64px, 120px); justify-content: start; }
.actions form.inline { display: inline-flex; gap: 8px; align-items: center; }
.actions form.inline select, .actions form.inline input { width: auto; margin: 0; min-height: 42px; }
.pagehead h1 .small { display: block; font-size: 1rem; margin-top: 6px; }

/* Fingerprint / face sign-in */
.passkeybox { margin-top: 26px; }
.passkeybox .or { display: block; color: var(--ink-3); margin-bottom: 12px; }
.passkeybox .btn { width: 100%; min-height: 50px; }
.offer { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--paper); border-radius: var(--r-lg); padding: 16px 20px; margin: 0 0 30px; }
.offer .i { width: 28px; height: 28px; color: var(--acc); }
.offer p { flex: 1 1 220px; margin: 0; }
[hidden] { display: none !important; }

/* Keyboard */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--acc); color: #fff; padding: 10px 18px; border-radius: var(--pill); transition: top .2s; }
.skip:focus { top: 12px; color: #fff; }
.page:focus { outline: none; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; box-shadow: none; }
.band :focus-visible { outline-color: #f3a487; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
.tbl tbody tr.kb-on td { background: var(--sheet-2); }
.tbl tbody tr.kb-on td:first-child { box-shadow: inset 3px 0 0 var(--acc); border-radius: 16px 0 0 16px; }
.tbl tbody tr.kb-on td:last-child { border-radius: 0 16px 16px 0; }
.queue li.kb-on { background: var(--sheet-2); box-shadow: inset 3px 0 0 var(--acc); }
kbd { display: inline-block; min-width: 24px; padding: 1px 7px; border-radius: 7px; background: var(--paper); border: 1px solid var(--line); border-bottom-width: 2px; font: 500 .82rem/1.5 "Jost", system-ui, sans-serif; color: var(--ink); text-align: center; }
.kbhelp { position: fixed; inset: 0; z-index: 90; background: rgba(30, 24, 20, .55); display: grid; place-items: center; padding: 20px; animation: fade .2s var(--ease); }
.kbhelp-in { background: var(--sheet); border-radius: 28px; padding: 28px 30px; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; }
.kbhelp dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; margin: 0 0 22px; align-items: center; }
.kbhelp dt { white-space: nowrap; color: var(--ink-3); }
.kbhelp dd { margin: 0; }
.kbhint { display: inline; }
@media (max-width: 1023px) { .kbhint { display: none; } }

/* Report headline figures */
.figs { display: flex; flex-wrap: wrap; gap: 10px 44px; margin: 0 0 34px; }
.figs div { display: flex; flex-direction: column; }
.figs b { font-weight: 300; font-size: 2.2rem; letter-spacing: -0.02em; line-height: 1.1; }
.figs span { color: var(--ink-2); font-size: .9rem; }
.figs .alert b { color: var(--acc-2); }
.actions form.inline input[type=month] { width: auto; margin: 0; min-height: 42px; }

/* Scan station */
.scan-actions { display: flex; flex-wrap: wrap; }
.pill-radio { margin: 0; cursor: pointer; }
.pill-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill-radio span { display: inline-block; padding: 8px 16px; border-radius: var(--pill); color: var(--ink-2); transition: background .2s, color .2s; }
.pill-radio input:checked + span { background: var(--esp); color: #fff; }
.pill-radio input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }
.scanin input { font-size: 1.2rem; min-height: 56px; }
.camera { margin-top: 14px; border-radius: 22px; overflow: hidden; background: #000; max-width: 520px; }
.camera video { width: 100%; display: block; }
.filemove { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--paper); border-radius: var(--r-lg); padding: 14px 18px; margin: 0 0 22px; }
.filemove .i { color: var(--acc); width: 22px; height: 22px; }
.filemove .where { flex: 1 1 240px; }
.filemove .where small { display: block; color: var(--ink-3); }

/* Team view */
.teamgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px 22px; margin-bottom: 26px; }
.member { display: block; padding: 18px 20px; border-radius: var(--r-lg); color: var(--ink); transition: background .25s var(--ease); border-left: 3px solid transparent; }
.member:hover { background: var(--sheet-2); color: var(--ink); }
.member.late { border-left-color: var(--acc); }
.member .who b { display: block; font-size: 1.2rem; font-weight: 400; }
.member .who small, .member .foot2 { color: var(--ink-3); font-size: .84rem; }
.member .pos { display: inline-block; font-size: .78rem; padding: 1px 9px; border-radius: var(--pill); background: var(--esp); color: #fff; margin-bottom: 4px; }
.member .nums { display: flex; gap: 22px; margin: 12px 0 8px; flex-wrap: wrap; }
.member .nums span { display: flex; flex-direction: column; font-size: .8rem; color: var(--ink-2); }
.member .nums b { font-size: 1.7rem; font-weight: 300; line-height: 1.1; color: var(--ink); }
.member .nums .bad b { color: var(--acc-2); }
.trackform { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 26px; max-width: 760px; }
.trackform label { margin: 0; flex: 1 1 320px; }
.trackcard { max-width: 980px; }
.track span small { color: var(--ink-3); font-size: .74rem; }

/* v1.3 registers */
.pre { white-space: pre-wrap; }
.trail li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.trail li:last-child { border-bottom: 0; }

/* Area tabs: the pages of the current area, as a quiet line under the band */
.areatabs { display: flex; gap: 4px; margin: -12px 0 26px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.areatabs::-webkit-scrollbar { display: none; }
.areatabs a { padding: 10px 14px 12px; color: var(--ink-3); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s, border-color .2s; }
.areatabs a:hover { color: var(--ink); }
.areatabs a.on { color: var(--ink); border-bottom-color: var(--acc); }
.morelinks { display: flex; flex-wrap: wrap; gap: 8px; }
.morelinks a { padding: 9px 16px; border-radius: var(--pill); background: var(--sheet-2); color: var(--ink); }

/* Partner's attention inbox */
.inbox { display: grid; gap: 10px; }
.inboxitem { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 16px 20px; border-radius: var(--r); background: var(--sheet-2); color: var(--ink); border-left: 3px solid transparent; }
.inboxitem.high { border-left-color: var(--acc); }
.inboxitem .kind { grid-column: 1; font-size: .84rem; color: var(--ink-3); }
.inboxitem .title { grid-column: 1; font-weight: 500; }
.inboxitem .detail { grid-column: 1; color: var(--ink-2); font-size: .92rem; }
.inboxitem .act { grid-column: 2; grid-row: 1 / span 3; align-self: center; font-size: .86rem; color: var(--ink-2); padding: 6px 12px; border-radius: var(--pill); background: var(--sheet-2); white-space: nowrap; }
.inboxitem.high .act { background: var(--acc-bg); color: var(--acc-ink); }
.inboxitem:hover { box-shadow: 0 2px 14px rgba(46, 42, 40, .08); }
@media (max-width: 640px) { .inboxitem { grid-template-columns: 1fr; } .inboxitem .act { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 6px; } }

/* Evidence book: reads as a document, prints cleanly */
.book { background: var(--sheet-2); border-radius: var(--r); padding: clamp(20px, 4vw, 56px); max-width: 960px; }
.book .bookhead { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 18px; }
.book .bookhead h1 { margin: 6px 0; }
.book section { margin: 22px 0; break-inside: avoid-page; }
.book h2 { font-size: 1.08rem; margin-bottom: 8px; }
.book code { word-break: break-all; }
.signs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; border-top: 1px solid var(--line); padding-top: 18px; }
.signs div { display: grid; gap: 4px; }
.signs span { color: var(--ink-3); font-size: .86rem; }
@media print { .book { padding: 0; max-width: none; } .areatabs { display: none; } }

/* Horizontal bars (no inline styles under the CSP: width classes) */
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(140px, 260px) 1fr 40px; align-items: center; gap: 12px; }
.hbar i { height: 12px; border-radius: var(--pill); background: repeating-linear-gradient(135deg, var(--esp) 0 6px, #4a4441 6px 10px); }
.hbar b { text-align: right; font-weight: 500; }
.hbar i.w1 { width: 10%; }
.hbar i.w2 { width: 20%; }
.hbar i.w3 { width: 30%; }
.hbar i.w4 { width: 40%; }
.hbar i.w5 { width: 50%; }
.hbar i.w6 { width: 60%; }
.hbar i.w7 { width: 70%; }
.hbar i.w8 { width: 80%; }
.hbar i.w9 { width: 90%; }
.hbar i.w10 { width: 100%; }

/* Scrutiny */
.checks { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks li .i { flex: none; margin-top: 3px; }
.checks li.ok .i { color: var(--ink-3); }
.checks li.warn .i { color: var(--ink-2); }
.checks li.bad .i { color: var(--acc); }
.checks li.bad b { color: var(--acc-ink); }
.tdsbox { background: var(--sheet-2); border-radius: var(--r); padding: 12px 16px; margin: 10px 0; }
.tdsbox ul { margin: 6px 0 0; padding-left: 18px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: .9rem; color: var(--ink-2); margin-bottom: 6px; }

/* Review mode: document left, details right */
.reviewgrid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.docpane { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.preview img, .preview canvas { width: 100%; height: auto; border-radius: 8px; background: #fff; margin-bottom: 10px; display: block; }
@media (max-width: 900px) { .reviewgrid { grid-template-columns: 1fr; } .docpane { position: static; max-height: none; } }

/* Ctrl+K palette */
.palette { position: fixed; inset: 0; background: rgba(46, 42, 40, .45); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; z-index: 60; }
.palette input { width: min(640px, 92vw); margin: 0; border-radius: var(--r) var(--r) 0 0; background: var(--sheet); font-size: 1.05rem; }
.palette ul { position: absolute; top: calc(12vh + 48px); width: min(640px, 92vw); list-style: none; margin: 0; padding: 6px; background: var(--sheet); border-radius: 0 0 var(--r) var(--r); max-height: 60vh; overflow: auto; box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.palette li a { display: block; padding: 9px 12px; border-radius: 10px; color: var(--ink); }
.palette li a small { display: block; color: var(--ink-3); }
.palette li.on a, .palette li a:hover { background: var(--sheet-2); }
.plainchips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.plainchips .chip { background: var(--sheet-2); color: var(--ink); }
.sheet { margin-bottom: 32px; break-after: page; }
details.inline { display: inline-block; margin-left: 8px; }
.kblist li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.kblist li:last-child { border-bottom: 0; }
/* Contract consumption bars */
.consume { display: grid; grid-template-columns: minmax(160px, 240px) 1fr 56px; gap: 12px; align-items: center; margin-bottom: 10px; }
.consume .track { height: 14px; border-radius: var(--pill); background: var(--sheet-2); display: block; overflow: hidden; }
.consume .track i { display: block; height: 100%; border-radius: var(--pill); background: repeating-linear-gradient(135deg, var(--acc) 0 6px, #c95a35 6px 10px); }
.consume .track i.time { background: repeating-linear-gradient(135deg, var(--esp) 0 6px, #4a4441 6px 10px); }
.consume .track i.w0 { width: 0; }
.consume b { text-align: right; font-weight: 500; }
.consume .track i.w1 { width: 10%; }
.consume .track i.w2 { width: 20%; }
.consume .track i.w3 { width: 30%; }
.consume .track i.w4 { width: 40%; }
.consume .track i.w5 { width: 50%; }
.consume .track i.w6 { width: 60%; }
.consume .track i.w7 { width: 70%; }
.consume .track i.w8 { width: 80%; }
.consume .track i.w9 { width: 90%; }
.consume .track i.w10 { width: 100%; }

/* Scanner */
.scanbar #camera video { width: 100%; max-width: 560px; border-radius: var(--r); background: #000; display: block; margin-top: 12px; }
.scancard { margin-bottom: 18px; }
.scancard h1 { margin: 4px 0; }
.scancard .fig { font-size: 1.6rem; font-weight: 500; margin: 6px 0; }
.scancard .fig .status { font-size: .9rem; vertical-align: middle; margin-left: 8px; }
.cardtabs { display: flex; flex-wrap: wrap; gap: 4px; }
.cardtabs > input { position: absolute; opacity: 0; pointer-events: none; }
.cardtabs > label { padding: 8px 16px; border-radius: var(--pill); background: var(--sheet-2); cursor: pointer; }
.cardtabs > input:checked + label { background: var(--esp); color: #fff; }
.cardtabs > input:focus-visible + label { outline: 2px solid var(--acc); outline-offset: 2px; }
.cardtabs > .pane { display: none; flex-basis: 100%; margin-top: 12px; }
#ct1:checked ~ .p1, #ct2:checked ~ .p2, #ct3:checked ~ .p3, #ct4:checked ~ .p4 { display: block; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 18px; }
@media (max-width: 800px) { .grid3 { grid-template-columns: 1fr; } }

.onlyprint { display: none; }
@media print { .onlyprint { display: block; } }
.tool > summary { cursor: pointer; }
.tbout:not(:empty) { margin-top: 12px; display: grid; gap: 10px; justify-items: start; }
.tbout .tablewrap { justify-self: stretch; }
.letters .letter { border-top: 1px solid var(--line, #ddd); padding: 18px 0; max-width: 70ch; }
@media print {
  body.print-letters * { visibility: hidden; }
  body.print-letters .letters, body.print-letters .letters * { visibility: visible; }
  body.print-letters .letters { position: absolute; left: 0; top: 0; width: 100%; }
  body.print-letters .letters .letter { page-break-after: always; border: 0; }
}
.tbgroup { font-size: 1rem; margin: 22px 0 8px; color: var(--ink-2); font-weight: 500; }
.book h2 label.small { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; font-weight: 400; color: var(--ink-3); }
.book h2 label.small input { width: auto; margin: 0; }
.compsteps li { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.compsteps li form { grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.compsteps li form input[name=note] { flex: 1 1 220px; min-width: 0; }
@media (min-width: 900px) { .compsteps li { grid-template-columns: auto 1fr minmax(320px, 40%); } .compsteps li form { grid-column: 3; } }
.tbl.cols3 { table-layout: fixed; width: 100%; }
.tbl.cols3 th:nth-child(1) { width: 16%; } .tbl.cols3 th:nth-child(2) { width: 18%; }
@media (max-width: 700px) { .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; } .tabs a { white-space: nowrap; flex: none; } }
/* Help */
.helpsearch { display: flex; gap: 8px; margin: 0 0 18px; max-width: 720px; }
.helpsearch input { flex: 1; min-width: 0; }
.helphits li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.helpgroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.helpgroups li { padding: 6px 0; }
.helpvideo { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; color: inherit; }
.helpvideo .i { width: 28px; height: 28px; color: var(--acc); }
.helpwrap { display: grid; grid-template-columns: minmax(0, 72ch) 220px; gap: 40px; align-items: start; }
.helpdoc { line-height: 1.65; }
.helpdoc h2 { margin-top: 32px; scroll-margin-top: 90px; }
.helpdoc h3 { margin-top: 22px; font-size: 1.02rem; scroll-margin-top: 90px; }
.helpdoc ul, .helpdoc ol { padding-left: 1.3em; }
.helpdoc li { margin: 4px 0; }
.helpdoc table { border-collapse: collapse; margin: 12px 0; font-size: .92rem; }
.helpdoc th, .helpdoc td { border-bottom: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.helpdoc code { background: var(--sheet-2); padding: 1px 5px; border-radius: 6px; font-size: .9em; }
.helpdoc blockquote { margin: 14px 0; padding: 10px 16px; border-left: 3px solid var(--acc); background: var(--sheet-2); border-radius: 0 12px 12px 0; }
.helptoc { position: sticky; top: 90px; }
.helptoc li { padding: 3px 0; }
.helpnav { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); }
.helpclips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
details.faq { border-bottom: 1px solid var(--line); padding: 12px 0; scroll-margin-top: 90px; }
details.faq > summary { cursor: pointer; font-weight: 500; }
details.faq > div { margin-top: 8px; }
.areatabs .helplink { margin-left: auto; color: var(--ink-3); }
.videowrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
video.tutorial { width: 100%; aspect-ratio: 16 / 9; background: #2e2a28; border-radius: 16px; }
.cliplist { margin: 0; padding-left: 1.4em; }
.cliplist li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.cliplist li a { display: block; }
.cliplist li.on a { font-weight: 600; }
@media (max-width: 900px) { .helpwrap, .videowrap { grid-template-columns: 1fr; } .helptoc { display: none; } }
details.faq > summary { color: var(--ink); }
details.faq[open] > summary { color: var(--acc-2, var(--ink)); }
.areatabs .helplink { display: inline-flex; align-items: center; gap: 6px; }
