/* Promessa app. The same brand as the site: deep teal and white, light Archivo headings.
   Archivo's narrow width is used for dates and quantities only, so a figure always looks
   like a figure. Red means an empty shelf or a late date, amber means low, teal means
   something you can do. Nothing else uses them. */
:root {
  --page: #ffffff; --rail: #f5f6f3; --ink: #15212b; --muted: #56636e; --rule: #d8ddd8; --grid: #e8ebe8;
  --accent: #0b6b68; --accent-ink: #ffffff; --tint: #e7efed; --deep: #0e2a30;
  --late: #b5361f; --late-tint: #f7e4df; --warn: #a15c00; --ok: #2e7044; --info: #175cd3;
  --stock: #64757f; --late-hatch: rgba(181, 54, 31, 0.55); --field: #ffffff; --field-rule: #8b979c;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0e2a30; --rail: #081a20; --ink: #e6f0ee; --muted: #9db5b8; --rule: #23464d; --grid: #1a3a41;
    --accent: #7fe0d6; --accent-ink: #062a2b; --tint: #153d42; --deep: #081a20;
    --late: #ff8a6b; --late-tint: #3a2b2b; --warn: #e9b25e; --ok: #7fd09b; --info: #8fb8ff;
    --stock: #8ea4aa; --late-hatch: rgba(255, 138, 107, 0.6); --field: #0a2228; --field-rule: #4b7078;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.012em; text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.35rem); font-weight: 400; }
h2 { font-size: 1.2rem; font-weight: 600; letter-spacing: 0; }
h3 { font-size: 1rem; font-weight: 600; letter-spacing: 0; }
p, ul, ol, dl, dd { margin: 0; }
b, strong { font-weight: 600; }
summary { cursor: pointer; }
.muted { color: var(--muted); }
.small { font-size: 0.87rem; }
.num, .code { font-variant-numeric: tabular-nums; font-stretch: 85%; }
.code { color: var(--muted); }
.nowrap { white-space: nowrap; }
.late, [data-late="1"] { color: var(--late); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* frame */
.shell { display: grid; grid-template-columns: 208px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--rail); border-right: 1px solid var(--rule); padding: 22px 14px 18px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { font: 700 1.02rem/1 var(--font); letter-spacing: 0.06em; color: var(--ink); text-decoration: none; display: flex; gap: 9px; align-items: center; padding: 0 10px; }
.nav { display: grid; gap: 18px; }
.nav-group { display: grid; gap: 1px; }
.nav a, .account a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.nav a:hover, .account a:hover { background: var(--tint); }
.nav a.on, .account a.on { color: var(--accent); font-weight: 600; background: var(--tint); }
.count { font: 600 0.78rem/1 var(--font); font-variant-numeric: tabular-nums; min-width: 20px; padding: 4px 6px; border-radius: 99px; text-align: center; background: var(--accent); color: var(--accent-ink); }
.account { margin-top: auto; border-top: 1px solid var(--rule); padding-top: 12px; }
.account > summary { list-style: none; padding: 6px 10px; border-radius: 8px; display: grid; gap: 1px; line-height: 1.3; }
.account > summary::-webkit-details-marker { display: none; }
.account > summary:hover { background: var(--tint); }
.account > summary span { font-size: 0.82rem; color: var(--muted); overflow-wrap: anywhere; }
.account-links { display: grid; gap: 1px; padding-top: 6px; }
.account .linkbtn { text-align: left; padding: 8px 10px; width: 100%; }
main { padding: 34px max(18px, 3.2vw) 72px; display: grid; gap: 34px; align-content: start; min-width: 0; max-width: 1240px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px 28px; flex-wrap: wrap; }
.head .sub { margin-top: 8px; color: var(--muted); max-width: 68ch; }
.head-title { min-width: 0; flex: 1 1 420px; }
.tabbar { display: none; }

/* a section is a heading and what follows it, not a box */
.section { display: grid; gap: 14px; min-width: 0; }
.section + .section, .ruled { border-top: 1px solid var(--rule); padding-top: 26px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.plain-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.reveal > summary { color: var(--accent); width: fit-content; padding: 4px 0; }
.runway .reveal { padding-top: 10px; }
.reveal[open] > summary { margin-bottom: 12px; }

/* messages */
.banner { border-left: 4px solid; border-radius: 4px; padding: 11px 14px; background: var(--rail); }
.banner.ok { border-color: var(--accent); background: var(--tint); }
.banner.err { border-color: var(--late); background: var(--late-tint); }
.banner.warn { border-color: var(--warn); }

/* the calendar */
.runway { display: grid; min-width: 0; }
.rw-axis, .rw-row { display: grid; grid-template-columns: minmax(150px, 210px) minmax(0, 1fr); column-gap: 26px; }
.rw-axis { position: sticky; top: 0; z-index: 3; background: var(--page); border-bottom: 1px solid var(--rule); }
.rw-ticks { position: relative; height: 30px; font-size: 0.8rem; font-stretch: 80%; font-variant-numeric: tabular-nums; color: var(--muted); grid-column: 2; }
.rw-ticks span { position: absolute; bottom: 5px; transform: translateX(-50%); white-space: nowrap; }
.rw-ticks .now { transform: none; color: var(--ink); font-weight: 600; }
.rw-ticks .end { transform: translateX(-100%); }
.rw-rows { list-style: none; padding: 0; }
.rw-row { padding: 18px 0 22px; border-bottom: 1px solid var(--rule); row-gap: 12px; }
.rw-name { display: grid; align-content: start; gap: 3px; grid-row: span 2; }
.rw-name .money { font-size: 1.5rem; font-weight: 400; font-stretch: 85%; font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 8px; }
.rw-name .money + span { font-size: 0.87rem; color: var(--muted); }
.rw-track { position: relative; height: 62px; }
.rw-grid { position: absolute; top: -18px; bottom: 12px; width: 1px; background: var(--grid); }
.rw-span { position: absolute; top: 24px; height: 14px; }
.rw-span::before { content: ""; position: absolute; inset: 0 1px 0 0; }
.rw-span.ok::before { background: var(--stock); border-radius: 2px; }
.rw-span.low::before { background: var(--warn); top: 8px; border-radius: 2px; }
.rw-span.empty::before { border: 1.5px solid var(--late); border-radius: 2px; background: repeating-linear-gradient(135deg, var(--late-hatch) 0 2px, transparent 2px 6px); }
.rw-mark { position: absolute; top: 0; width: 24px; height: 100%; margin-left: -12px; }
.rw-mark svg { position: absolute; left: 50%; transform: translateX(-50%); display: block; }
.rw-mark.ocean::before, .rw-mark.air::before { content: ""; position: absolute; left: 50%; margin-left: -1px; top: 18px; height: 22px; width: 2px; background: var(--accent); outline: 2px solid var(--page); }
.rw-mark.ocean svg, .rw-mark.air svg { top: 0; color: var(--accent-ink); background: var(--accent); border-radius: 50%; padding: 3px; width: 20px; height: 20px; outline: 2px solid var(--page); }
.rw-mark.lands svg { top: 22px; color: var(--ink); width: 18px; height: 18px; paint-order: stroke; stroke: var(--page); stroke-width: 2; }
.rw-mark.was_due svg { top: 24px; color: var(--muted); width: 14px; height: 14px; }
.rw-date { position: absolute; top: 42px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 0.8rem; line-height: 1.3; font-stretch: 80%; font-variant-numeric: tabular-nums; color: var(--ink); }
.rw-mark.at-end .rw-date { left: auto; right: 2px; transform: none; }
.rw-mark.at-start .rw-date { left: 10px; transform: none; }
.rw-mark.ocean .rw-date, .rw-mark.air .rw-date { top: 2px; left: 26px; right: auto; transform: none; font-weight: 600; color: var(--accent); }
.rw-mark.ocean.at-end .rw-date, .rw-mark.air.at-end .rw-date { left: auto; right: 26px; }
/* past the last arrival the question becomes the next order, so the bar fades out, not stops */
.rw-span.last::after { content: ""; position: absolute; left: 100%; top: 0; bottom: 0; width: 38px; background: linear-gradient(90deg, var(--stock), transparent); margin-left: -1px; }
.rw-span.last.low::after { top: 8px; background: linear-gradient(90deg, var(--warn), transparent); }
.rw-span.last.empty::after { display: none; }
.rw-mark.empty .rw-date { font-weight: 600; color: var(--late); }
.rw-mark.low .rw-date { font-weight: 600; color: var(--warn); }
.rw-do { display: grid; gap: 7px; max-width: 74ch; }
.rw-do .ask { font-size: 1.04rem; }
.rw-facts { color: var(--muted); font-size: 0.87rem; }
.rw-links { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.rw-legend { display: flex; flex-wrap: wrap; gap: 6px 22px; padding-top: 14px; font-size: 0.83rem; color: var(--muted); }
.rw-legend span { display: inline-flex; align-items: center; gap: 7px; }
.key { width: 22px; height: 12px; flex: none; position: relative; display: inline-block; }
.key.ok { background: var(--stock); border-radius: 2px; }
.key.low::before { content: ""; position: absolute; inset: 6px 0 0; background: var(--warn); border-radius: 2px; }
.key.empty { border: 1.5px solid var(--late); border-radius: 2px; background: repeating-linear-gradient(135deg, var(--late-hatch) 0 2px, transparent 2px 6px); }
.rw-legend svg { width: 16px; height: 16px; flex: none; color: var(--ink); }
.rw-legend svg.act { color: var(--accent-ink); background: var(--accent); border-radius: 50%; padding: 2px; width: 18px; height: 18px; }

/* waiting for you */
.queue { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 34px; }
.queue a { display: flex; gap: 14px; align-items: baseline; padding: 8px 0; color: var(--ink); text-decoration: none; }
.queue a b { font-size: 1.7rem; font-weight: 400; font-stretch: 85%; font-variant-numeric: tabular-nums; line-height: 1; color: var(--accent); }
.queue a:hover span { text-decoration: underline; }

/* tables */
.table-wrap { overflow-x: auto; }
.table-wrap table { min-width: 680px; }   /* scroll sideways on phones instead of crushing columns */
table { border-collapse: collapse; width: 100%; font-size: 0.94rem; }
th { text-align: left; font-weight: 500; font-size: 0.85rem; line-height: 1.25; color: var(--muted); padding: 8px 14px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: bottom; }
td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.lvl { font-weight: 600; }
.lvl.stockout, .lvl.critical, .lvl.unreliable { color: var(--late); }
.lvl.below_safety, .lvl.watch, .lvl.mixed { color: var(--warn); }
.lvl.reorder { color: var(--info); }
/* supplier verdicts; "not-enough-history" is deliberately uncoloured - it is not a verdict */
.lvl.reliable { color: var(--ok); }

/* PO lines on the calendar */
.po-board .rw-axis, .po-row > summary { display: grid; grid-template-columns: minmax(200px, 1.1fr) minmax(0, 2.1fr) 92px; column-gap: 24px; }
.po-row { border-bottom: 1px solid var(--rule); }
.po-row > summary { list-style: none; align-items: center; padding: 12px 0; min-height: 58px; }
.po-row > summary::-webkit-details-marker { display: none; }
.po-row > summary:hover { background: var(--rail); }
.po-id { display: grid; gap: 1px; min-width: 0; }
.po-id span { font-size: 0.87rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.po-track { position: relative; height: 36px; }
.po-track .rw-grid { top: -12px; bottom: -12px; }
.po-track .today { position: absolute; top: -12px; bottom: -12px; width: 2px; margin-left: -1px; background: var(--rule); }
.po-slip { position: absolute; top: 17px; height: 2px; background: var(--late); }
.po-slip.guess { background: repeating-linear-gradient(90deg, var(--late) 0 5px, transparent 5px 9px); }
.po-mark { position: absolute; top: 18px; width: 22px; height: 22px; margin: -11px 0 0 -11px; display: grid; place-items: center; }
.po-mark svg { width: 13px; height: 13px; color: var(--ink); }
.po-mark.asked svg { color: var(--muted); }
.po-mark.slipped svg { color: var(--late); }
.po-mark.lands svg { width: 16px; height: 16px; }
.po-slipped { font-size: 0.9rem; line-height: 1.3; }
.po-more { padding: 4px 0 22px; display: grid; gap: 14px; }
.po-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 24px; }
.po-facts dt { font-size: 0.83rem; color: var(--muted); }
.po-facts dd { font-variant-numeric: tabular-nums; }

/* stages: a real sequence, so it is drawn as one */
.stages { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); }
.stages li { position: relative; padding: 24px 12px 0 0; font-size: 0.87rem; line-height: 1.35; }
.stages li::before { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--field-rule); background: var(--page); z-index: 1; }
.stages li::after { content: ""; position: absolute; left: 12px; right: 0; top: 9px; height: 2px; background: var(--rule); }
.stages li:last-child::after { display: none; }
.stages li.done::before { background: var(--accent); border-color: var(--accent); }
.stages li.done::after { background: var(--accent); }
.stages li.expected::before { border-color: var(--accent); }
.stages b { display: block; font-stretch: 85%; font-variant-numeric: tabular-nums; }
.stages .late { font-weight: 600; }

/* a supplier's record */
.record { display: flex; align-items: flex-end; gap: 1px; height: 46px; padding-bottom: 2px; border-bottom: 1px solid var(--rule); width: fit-content; min-width: 130px; }
.record span { width: 11px; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.record i { width: 7px; height: 7px; border-radius: 50%; background: var(--stock); }
.record i.over { background: var(--late); border-radius: 2px 2px 0 0; margin-bottom: -2px; }

/* forms */
form { margin: 0; }
.fields { display: grid; gap: 16px; }
.row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
.row.top { align-items: start; }
label { display: grid; gap: 6px; font-size: 0.9rem; font-weight: 500; min-width: 0; }
.hint { font-weight: 400; color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
input[type=text], input[type=email], input[type=date], input[type=number], select, textarea {
  font: inherit; font-weight: 400; font-size: 0.95rem; color: var(--ink); background: var(--field); border: 1px solid var(--field-rule); border-radius: 8px; padding: 9px 11px; width: 100%; min-width: 0; min-height: 42px;
}
input[readonly] { background: var(--rail); color: var(--muted); }
textarea { min-height: 220px; line-height: 1.55; resize: vertical; field-sizing: content; }
input[type=file] { font: inherit; font-size: 0.88rem; font-weight: 400; max-width: 100%; }
input[type=file]::file-selector-button { font: 500 0.88rem/1 var(--font); color: var(--accent); background: transparent; border: 1.5px solid var(--accent); border-radius: 99px; padding: 8px 14px; margin-right: 10px; cursor: pointer; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; accent-color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 10px 20px; border-radius: 99px; font: 600 0.94rem/1.1 var(--font); text-align: center;
  border: 1.5px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--tint); filter: none; }
.btn.danger { background: transparent; color: var(--late); border-color: var(--late); }
.btn.danger:hover { background: var(--late-tint); filter: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions.bottom { align-items: end; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }

/* emails to send */
.mail { border-bottom: 1px solid var(--rule); }
.mail:first-child { border-top: 1px solid var(--rule); }
.mail > summary { list-style: none; display: grid; grid-template-columns: minmax(190px, 1fr) minmax(0, 2fr) auto; gap: 4px 26px; align-items: baseline; padding: 15px 0; }
.mail > summary::-webkit-details-marker { display: none; }
.mail > summary:hover { background: var(--rail); }
.mail > summary .open-word { color: var(--accent); }
.mail[open] > summary .open-word { visibility: hidden; }
.mail .who { font-weight: 600; }
.mail form { padding: 4px 0 28px; max-width: 820px; }
.chip { font-weight: 600; white-space: nowrap; }
.chip.escalate { color: var(--late); }
.chip.ship_check, .chip.nudge { color: var(--warn); }

/* replies to check: their words on one side, what will be recorded on the other */
.check-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 34px; padding-top: 26px; border-top: 1px solid var(--rule); scroll-margin-top: 20px; align-items: start; }
.letter { background: var(--rail); border-radius: 8px; padding: 18px 20px; display: grid; gap: 12px; }
.letter-head { display: grid; gap: 2px; font-size: 0.9rem; }
.quote { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; font: inherit; line-height: 1.6; margin: 0; }
pre.quote { font-size: 0.82rem; }
.read { display: grid; gap: 16px; }
.read .row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.more-fields { border-top: 1px solid var(--rule); padding-top: 10px; }
.more-fields > summary { color: var(--accent); padding: 4px 0; width: fit-content; }
.more-fields[open] > summary { margin-bottom: 10px; }

/* shipments */
.ship { border-top: 1px solid var(--rule); padding-top: 26px; display: grid; gap: 18px; min-width: 0; }
.ship-line { display: grid; gap: 14px; padding-top: 4px; }
.ship-line + .ship-line { border-top: 1px solid var(--grid); padding-top: 16px; }
.ship-line-head { display: flex; justify-content: space-between; gap: 8px 22px; flex-wrap: wrap; align-items: center; }
.ship-line-head .actions select { width: auto; max-width: 260px; }

/* figures */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 26px 34px; }
.figure { display: grid; gap: 4px; align-content: start; }
.figure .big { font-size: 2.1rem; font-weight: 400; font-stretch: 85%; font-variant-numeric: tabular-nums; line-height: 1.1; }
.figure .basis { font-weight: 600; }
.meter { height: 8px; background: var(--grid); border-radius: 4px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); }
.meter.over span { background: var(--late); }

/* plans */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.plan { padding: 26px 28px 30px; display: grid; grid-template-rows: auto 1fr auto; gap: 18px; }
.plan + .plan { border-left: 1px solid var(--rule); }
.plan:first-child { padding-left: 0; }
.plan:last-child { padding-right: 0; }
.plan .price { font-size: 2.6rem; font-weight: 400; font-stretch: 85%; line-height: 1; font-variant-numeric: tabular-nums; }
.plan ul { padding: 0; list-style: none; display: grid; gap: 7px; align-content: start; }
.plan-top { display: grid; gap: 8px; }

/* public pages */
.public { max-width: 1160px; margin: 0 auto; padding: 20px max(20px, 3vw) 72px; display: grid; gap: clamp(36px, 6vw, 64px); }
.public-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
.public-bar .brand { padding: 0; }
.lead { display: grid; gap: 18px; max-width: 760px; }
.lead h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.lead p { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-radius: 14px; overflow: hidden; border: 1px solid var(--rule); min-height: 520px; }
.split-say { background: linear-gradient(160deg, #081a20 0%, #0e2a30 52%, #11403f 100%); color: #fff; padding: clamp(28px, 4.5vw, 56px); display: grid; gap: 26px; align-content: center; }
.split-say h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.split-say p, .split-say li { color: rgba(255, 255, 255, 0.84); }
.split-say ol { padding-left: 1.3em; display: grid; gap: 10px; }
.split-say li::marker { color: #7fe0d6; font-weight: 600; }
.split-do { padding: clamp(28px, 4.5vw, 56px); display: grid; gap: 20px; align-content: center; background: var(--page); }

@media (max-width: 1080px) {
  .check-item { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding-bottom: 64px; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--rule); padding: 14px 16px; }
  .side .brand { padding: 0; }
  .side .nav, .side .account { display: none; }
  main { padding: 24px 16px 40px; gap: 28px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; inset: auto 0 0; z-index: 20; background: var(--rail); border-top: 1px solid var(--rule); padding-bottom: env(safe-area-inset-bottom, 0); }
  .tabbar > a, .tabbar summary { display: grid; place-items: center; align-content: center; gap: 2px; min-height: 58px; padding: 4px 2px; font-size: 0.82rem; line-height: 1.15; text-align: center; color: var(--ink); text-decoration: none; list-style: none; font-stretch: 90%; position: relative; }
  .tabbar summary::-webkit-details-marker { display: none; }
  .tabbar > a.on { color: var(--accent); font-weight: 600; box-shadow: inset 0 3px 0 var(--accent); }
  .tabbar .count { position: absolute; top: 5px; right: 8px; padding: 3px 5px; min-width: 17px; font-size: 0.7rem; }
  .sheet { position: fixed; inset: auto 0 calc(58px + env(safe-area-inset-bottom, 0px)); background: var(--rail); border-top: 1px solid var(--rule); padding: 12px 16px 16px; display: grid; gap: 2px; max-height: 70vh; overflow: auto; box-shadow: 0 -14px 30px -18px rgba(8, 26, 32, 0.5); }
  .sheet a, .sheet .linkbtn { display: block; width: 100%; text-align: left; padding: 11px 4px; min-height: 44px; color: var(--ink); text-decoration: none; }
  .sheet a.on { color: var(--accent); font-weight: 600; }
  .sheet .who { padding: 8px 4px; border-top: 1px solid var(--rule); margin-top: 6px; font-size: 0.87rem; color: var(--muted); overflow-wrap: anywhere; }
  .rw-axis { grid-template-columns: minmax(0, 1fr); }
  .rw-ticks { grid-column: 1; }
  .rw-ticks span:nth-child(even):not(.now), .rw-ticks .near { display: none; }
  .rw-row { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  .rw-name { grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; align-items: baseline; }
  .rw-name > * { grid-column: 1; }
  .rw-name .money { margin: 0; font-size: 1.15rem; grid-column: 2; grid-row: 1; }
  .rw-name .money + span { grid-column: 2; grid-row: 2; }
  .rw-date .w { display: none; }
  .rw-grid { top: 4px; }
  .po-board .rw-axis { grid-template-columns: minmax(0, 1fr); }
  .po-row > summary { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
  .po-track { grid-column: 1 / -1; grid-row: 2; }
  .stages { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .stages li { padding: 0 0 0 26px; }
  .stages li::after { left: 5px; right: auto; top: 14px; bottom: -14px; width: 2px; height: auto; }
  .mail > summary { grid-template-columns: minmax(0, 1fr) auto; }
  .mail > summary .why { grid-column: 1 / -1; grid-row: 2; }
  .plans { grid-template-columns: minmax(0, 1fr); border: 0; }
  .plan, .plan:first-child, .plan:last-child { padding: 24px 0; border-top: 1px solid var(--rule); }
  .plan + .plan { border-left: 0; }
  .split { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .btn { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (forced-colors: active) {
  .rw-span::before, .key, .stages li::before, .record i { forced-color-adjust: none; }
}
