/* STF customer portal. StartFill website values (startfill.com, 26.10.2026): navy #0A1628, orange #FF8C00, eyebrow #CC6E00, mint #E7F6EE,
   teal #13756A, page #F6F8FB, container 1160px. System fonts only (CSP is 'self'). No inline styles anywhere. */
:root {
  --navy: #0A1628;
  --navy-2: #16294A;
  --orange: #FF8C00;
  --orange-ink: #CC6E00;
  --mint: #E7F6EE;
  --teal: #13756A;
  --page: #F6F8FB;
  --panel: #FFFFFF;
  --ink: #0A1628;
  --muted: #55627A;
  --line: #DCE2EC;
  --line-soft: #EBEFF5;
  --warn-bg: #FFF4E0;
  --warn-ink: #8A4B00;
  --bad-bg: #FDECEA;
  --bad-ink: #A3201A;
  --info-bg: #E8F0FB;
  --info-ink: #1D4F91;
  --focus: #13756A;
  --radius: 10px;
  --font: "Raleway", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 16px/1.5 var(--font); min-height: 100vh;
  overflow-wrap: break-word;
}
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: .92em; }
.nowrap { white-space: nowrap; }
.quiet { color: var(--muted); font-size: .9rem; margin: 0; }
a { color: var(--teal); text-underline-offset: 2px; }
a:hover { color: var(--navy); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1:focus, main:focus { outline: none; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 20; background: var(--orange); color: var(--navy); font-weight: 700; padding: 10px 16px; border-radius: 0 0 8px 8px; text-decoration: none; }
.skip:focus { top: 0; }

/* ---------------------------------------------------------------- header */
.site-header { background: var(--navy); color: #fff; }
.site-header :focus-visible { outline-color: var(--orange); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-height: 44px; }
.brand:hover { color: #fff; }
/* the mark: a container filled up to a line */
.brand-mark { width: 24px; height: 28px; border: 2px solid #fff; border-radius: 5px; position: relative; overflow: hidden; flex: none; }
.brand-mark::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60%; background: var(--orange); }
.brand-name { font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; }
.brand-sub { color: #B9C4D8; font-size: .95rem; padding-left: 12px; border-left: 1px solid #3B4C69; line-height: 1.2; }
.who { display: flex; align-items: center; gap: 16px; }
.who-text { margin: 0; display: flex; flex-direction: column; text-align: right; line-height: 1.25; }
.who-merchant { font-weight: 700; }
.who-user { color: #B9C4D8; font-size: .9rem; }
.nav { display: flex; gap: 4px; overflow-x: auto; padding-top: 0; padding-bottom: 0; }
.nav a { color: #D5DDEB; text-decoration: none; padding: 12px 16px; font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--orange); }

/* ---------------------------------------------------------------- buttons, inputs */
.btn { font-family: "Lato", var(--font); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 8px; border: 2px solid transparent; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn-primary { background: var(--orange); color: var(--navy); }
.btn-primary:hover { background: #E67E00; color: var(--navy); }
.btn-secondary { background: var(--panel); color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: #5A6C8A; min-height: 40px; }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-small { min-height: 36px; padding: 0 12px; font-size: .9rem; }
.btn:disabled { opacity: .55; cursor: progress; }
.textlink { font-weight: 600; }
.backlink { display: inline-block; margin: 20px 0 0; font-weight: 600; text-decoration: none; }
.backlink::before { content: "\2039\00a0"; }
.backlink:hover { text-decoration: underline; }

.input { font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #8A97AE; border-radius: 8px; min-height: 44px; padding: 0 12px; width: 100%; }
.input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
select.input { padding-right: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-weight: 600; font-size: .9rem; }
.field-grow { flex: 1 1 260px; }
.field-actions { flex-direction: row; align-items: flex-end; gap: 8px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin: 0 0 20px; }
.toolbar .field:not(.field-grow):not(.field-actions) { flex: 0 1 220px; }
.toolbar .field.field-search { flex: 0 1 380px; }
.formmsg { color: var(--bad-ink); font-weight: 600; min-height: 0; margin: -8px 0 12px; }

/* ---------------------------------------------------------------- page structure */
.main { padding-top: 8px; padding-bottom: 64px; }
.pagehead { margin: 28px 0 20px; }
.pagehead h1 { margin: 0; font-size: 2rem; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
.lead { color: var(--muted); font-size: 1.05rem; margin: 6px 0 0; max-width: 62ch; }
.statusline { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 10px 0 0; }
.reason { color: var(--warn-ink); font-weight: 600; }
.block { margin: 0 0 32px; }
.block > h2 { font-size: 1.2rem; margin: 0 0 12px; letter-spacing: -.01em; }
.empty { color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0; }
.loading { color: var(--muted); padding: 32px 0; margin: 0; }
.more { margin: 16px 0; }
.sub { display: block; color: var(--muted); font-size: .85rem; }
.pos { color: var(--teal); font-weight: 700; }
.neg { color: var(--bad-ink); font-weight: 700; }
.strong { font-weight: 700; }

.notice { border-radius: var(--radius); padding: 14px 18px; margin: 0 0 16px; border: 1px solid; }
.notice p { margin: 0; }
.notice p + p { margin-top: 8px; }
.notice-title { font-weight: 700; }
.notice-bad { background: var(--bad-bg); border-color: #F0B8B3; color: var(--bad-ink); }
.notice-warn { background: var(--warn-bg); border-color: #F2CF9A; color: var(--warn-ink); }
.notice-info { background: var(--info-bg); border-color: #BCD2F0; color: var(--info-ink); }
.notice .btn { margin-top: 12px; }

/* tags */
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .82rem; font-weight: 700; line-height: 1.5; border: 1px solid transparent; white-space: nowrap; }
.tag-ok { background: var(--mint); color: #0C5A51; border-color: #BFE3D2; }
.tag-warn { background: var(--warn-bg); color: var(--warn-ink); border-color: #F2CF9A; }
.tag-bad { background: var(--bad-bg); color: var(--bad-ink); border-color: #F0B8B3; }
.tag-info { background: var(--info-bg); color: var(--info-ink); border-color: #BCD2F0; }
.tag-neutral { background: #EEF1F6; color: #3A4760; border-color: var(--line); }
.flagwrap { margin-left: 8px; }

.chips { display: inline-flex; flex-wrap: wrap; gap: 4px 6px; }
.chip { background: #EEF1F6; border-radius: 6px; padding: 1px 7px; font-size: .85rem; color: var(--ink); text-decoration: none; }
a.chip { color: var(--teal); text-decoration: underline; }

/* ---------------------------------------------------------------- tables */
.tablebox { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; max-width: 100%; }
.tablebox:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
.data th, .data td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.data thead th { background: #F1F4F9; color: #3A4760; font-size: .85rem; font-weight: 700; white-space: nowrap; border-bottom: 1px solid var(--line); }
.data tbody tr:last-child > td, .data tbody tr:last-child > th { border-bottom: 0; }
.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data .wraps { white-space: normal; min-width: 12ch; }
.data tbody tr:hover > td { background: #FAFBFD; }
.data tfoot th, .data tfoot td { font-weight: 700; background: #FAFBFD; border-top: 1px solid var(--line); border-bottom: 0; }
.data tfoot th { text-align: right; }

/* ---------------------------------------------------------------- the four figures */
.figs { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fig { padding: 16px 20px; border-right: 1px solid var(--line); }
.fig:last-child { border-right: 0; }
.fig dt { color: var(--muted); font-size: .9rem; font-weight: 600; }
.fig dd { margin: 2px 0 0; font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.fig-available { background: var(--mint); }
.fig-available dt { color: #0C5A51; }
.fig-available dd { color: var(--teal); }
.figs-recall { grid-template-columns: repeat(3, 1fr); }

/* ---------------------------------------------------------------- home */
.needs { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px 8px; border-left: 6px solid var(--teal); }
.needs-open { border-left-color: var(--orange); }
.needs-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.needs-head h2 { margin: 0; font-size: 1.35rem; }
.count-badge { background: var(--orange); color: var(--navy); font-weight: 800; font-size: .85rem; padding: 2px 10px; border-radius: 999px; }
.needs .empty { background: var(--mint); border: 0; color: #0C5A51; font-weight: 600; margin-bottom: 12px; }
.actions { list-style: none; margin: 0; padding: 0; }
.action { display: flex; gap: 20px; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--line-soft); }
.action:first-child { border-top: 0; }
.action-main { min-width: 0; flex: 1; }
.action-kind { margin: 0 0 6px; }
.action-title { margin: 0; font-size: 1.05rem; }
.action-detail { margin: 4px 0 10px; color: var(--muted); }
.action-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 8px 0 0; }
.action-facts dt { font-size: .85rem; color: var(--muted); font-weight: 600; }
.action-facts dd { margin: 0; font-weight: 600; }
.action-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex: none; }

/* ---------------------------------------------------------------- stock */
.meaning { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.meaning > h2 { margin-bottom: 14px; }
.defs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 32px; margin: 0; }
.def dt { font-weight: 800; }
.def dd { margin: 2px 0 0; color: #34415A; max-width: 60ch; overflow-wrap: anywhere; }
.def-available dt { color: var(--teal); }
.formula { margin: 16px 0 0; padding: 10px 14px; background: var(--mint); border-radius: 8px; color: #0C5A51; font-weight: 600; }
.stock .itemrow th { font-weight: 400; padding: 6px 8px; }
.stock .itemrow > * { vertical-align: middle; }
.stock thead th.fig-available, .stock td.fig-available { background: var(--mint); }
.stock thead th.fig-available { color: #0C5A51; }
.stock td.fig-available { font-weight: 800; color: var(--teal); }
.stock td.fig-blocked { color: #7A4300; }
.stock tbody.item.open .itemrow > * { background: #F8FAFD; }
.stock tbody.item.open .itemrow td.fig-available { background: var(--mint); }
.expander { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 8px; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 8px; }
.expander:hover { background: #F1F4F9; }
.chev { width: 9px; height: 9px; border-right: 2.5px solid var(--navy); border-bottom: 2.5px solid var(--navy); transform: rotate(-45deg); transition: transform .12s; flex: none; margin: 0 4px; }
.expander[aria-expanded="true"] .chev { transform: rotate(45deg); }
.itemname { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.itemname .sku { font-weight: 800; font-family: var(--mono); font-size: .95rem; }
.itemname .name { color: #34415A; }
.itemname .lotcount { color: var(--muted); font-size: .85rem; }
.lotsrow > td { background: #F8FAFD; padding: 4px 14px 18px 46px; }
.lotsrow .tablebox { border-color: var(--line); }
.lots tr.lot-past > td { background: #FFF6F5; }
.lots tr.lot-soon > td { background: #FFFAF0; }

/* ---------------------------------------------------------------- orders, facts, timeline */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 24px; margin: 0 0 32px; padding: 16px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.facts dt { color: var(--muted); font-size: .85rem; font-weight: 600; }
.facts dd { margin: 2px 0 0; font-weight: 600; }

.timeline { list-style: none; margin: 0; padding: 22px 20px 18px; display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.tl-step { flex: 1 1 0; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; padding: 0 4px; }
.tl-step::before { content: ""; position: absolute; top: 11px; right: 50%; width: 100%; height: 3px; background: var(--line); }
.tl-step:first-child::before { display: none; }
.tl-dot { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; background: var(--panel); border: 3px solid #B4BECF; display: grid; place-items: center; font-size: .8rem; font-weight: 800; line-height: 1; }
.tl-text { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.tl-label { font-weight: 700; font-size: .92rem; }
.tl-at { color: var(--muted); font-size: .8rem; min-height: 1.2em; }
.tl-done .tl-dot { background: var(--teal); border-color: var(--teal); color: #fff; }
.tl-done .tl-dot::after { content: "\2713"; }
.tl-done::before { background: var(--teal); }
.tl-next .tl-dot { border-color: var(--orange); box-shadow: 0 0 0 4px #FFE2BD; }
.tl-next::before { background: linear-gradient(to left, var(--teal) 0, var(--teal) 100%); }
.tl-next .tl-label { color: var(--navy); }
.tl-todo .tl-label, .tl-todo .tl-at { color: var(--muted); }
.tl-skipped .tl-dot { border-style: dashed; border-color: #C9D1DE; }
.tl-skipped .tl-label { color: #7C889D; text-decoration: line-through; text-decoration-thickness: 1px; }
.tl-skipped::before { background: repeating-linear-gradient(to right, #C9D1DE 0 4px, transparent 4px 8px); }
.tl-problem .tl-dot { background: var(--bad-ink); border-color: var(--bad-ink); color: #fff; }
.tl-problem .tl-dot::after { content: "!"; }
.tl-problem .tl-label { color: var(--bad-ink); }
.tl-problem::before { background: var(--bad-ink); }

/* ---------------------------------------------------------------- recall, sign-in */
.resulthead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 8px 0 18px; }
.resulttitle { flex: 1 1 280px; }
.resulthead h2 { margin: 0; font-size: 1.3rem; }
.recall-result { margin-top: 28px; }

.signin { max-width: 560px; margin: 0 auto; padding-top: 24px; }
.signin-card { background: var(--panel); border: 1px solid var(--line); border-top: 5px solid var(--orange); border-radius: var(--radius); padding: 24px 26px; }
.signin-card p { margin: 0 0 12px; }
.signin-card .lead { color: var(--ink); font-size: 1.1rem; font-weight: 600; margin-top: 0; }
.signin-card .quiet { margin-bottom: 0; }
.signin-head { margin-bottom: 16px; }
.noscript { padding-top: 24px; }

/* P2-A: forms, actions, products, file uploads */
.pageactions { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; margin: 0 0 20px; }
.formpage, .importpage { max-width: 880px; }
.stackform { margin: 0 0 24px; }
.formpanel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 24px; }
.formpanel h2, .formpanel h3 { margin: 0 0 8px; font-size: 1.15rem; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 18px; margin: 0 0 16px; }
.formgrid .f-name, .formgrid .f-street { grid-column: span 1; }
.formactions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 8px 0 0; }
.formerror { margin-top: 12px; }
.hint { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.req { color: var(--bad-ink); }
.field-check { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-height: 44px; }
.field-check input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--teal); flex: none; }
.field-check .hint { flex-basis: 100%; margin: 0 0 0 32px; }
textarea.input { width: 100%; resize: vertical; }
.linerows { display: grid; gap: 10px; margin: 0 0 12px; }
.linerow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) auto; gap: 10px 14px; align-items: end; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.confirmwrap { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.confirmask { display: inline-flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.confirmtext { font-weight: 600; }
.orderactions { margin: 0 0 28px; }
.actionpanels .formpanel { margin-top: 12px; }
.rulebox { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 6px; margin: 0 0 16px; background: var(--panel); }
.rulebox legend { font-weight: 700; padding: 0 6px; }
.ruleask { margin-top: 16px; }
.ruleslist, .problems, .skulist { margin: 6px 0 10px; padding-left: 20px; }
.problems { font-size: .9rem; margin-bottom: 0; }
.howto { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 18px; margin: 0 0 20px; }
.howto summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; }
.howto h3 { margin: 16px 0 6px; font-size: 1rem; }
.howto .tablebox { margin-bottom: 12px; }
.importout { margin-top: 24px; }
.importout h2 { margin: 0 0 12px; font-size: 1.2rem; }
.figs-import { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.figs-import .fig dd { font-size: 1.7rem; }
.figs-import .fig-error dd { color: var(--bad-ink); }
.figs-import .fig-ok { background: var(--mint); }
.importdone { margin-top: 16px; }
.signin-link { margin-top: 16px; }
.signin-link h2 { margin: 0 0 6px; font-size: 1.1rem; }
.signin-link .field { margin: 10px 0 12px; }
.signin-link .notice { margin: 12px 0 0; }
/* END P2-A */

/* ---------------------------------------------------------------- phone */
@media (max-width: 720px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .bar { padding-top: 10px; padding-bottom: 10px; }
  .brand-sub { display: none; }
  .who { gap: 10px; }
  .who-text { font-size: .9rem; }
  .pagehead { margin: 20px 0 16px; }
  .pagehead h1 { font-size: 1.6rem; }
  .nav a { padding: 11px 12px; }
  .figs { grid-template-columns: repeat(2, 1fr); }
  .fig { padding: 12px 14px; }
  .fig:nth-child(2) { border-right: 0; }
  .fig:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .fig dd { font-size: 1.7rem; }
  .figs-recall { grid-template-columns: 1fr; }
  .figs-recall .fig { border-right: 0; border-bottom: 1px solid var(--line); }
  .figs-recall .fig:last-child { border-bottom: 0; }
  .defs { grid-template-columns: 1fr; }
  .meaning { padding: 16px; }
  .needs { padding: 16px 16px 4px; }
  .action { flex-direction: column; gap: 10px; }
  .action-side { flex-direction: row; align-items: center; justify-content: space-between; }
  /* the stock table becomes one card per item: name on top, the four figures below (the nested lots table stays a table) */
  table.stock, .stock > tbody.item, .stock > tbody > tr, .stock > tbody > tr > th, .stock > tbody > tr > td { display: block; }
  .stock > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stock > tbody.item { border-bottom: 1px solid var(--line); }
  .stock > tbody.item:last-child { border-bottom: 0; }
  .stock > tbody > tr.itemrow { display: grid; grid-template-columns: 1fr 1fr; padding: 4px 8px 10px; }
  .stock > tbody > tr.itemrow > th { grid-column: 1 / -1; padding: 2px 0; }
  .stock > tbody > tr.itemrow > td { border: 0; padding: 6px 10px; text-align: left; font-size: 1.05rem; }
  .stock > tbody > tr.itemrow > td::before { content: attr(data-label); display: block; font-size: .78rem; font-weight: 600; color: var(--muted); }
  .stock > tbody > tr.itemrow > td.fig-available { border-radius: 8px; }
  .stock > tbody > tr.itemrow > td.fig-available::before { color: #0C5A51; }
  .lotsrow > td { padding-left: 8px; padding-right: 8px; }
  .facts { grid-template-columns: 1fr 1fr; padding: 14px; }
  .timeline { flex-direction: column; padding: 16px 18px; gap: 0; }
  .tl-step { flex-direction: row; align-items: flex-start; text-align: left; gap: 14px; padding: 0 0 18px; }
  .tl-step:last-child { padding-bottom: 0; }
  .tl-step::before { top: -18px; right: auto; left: 11px; width: 3px; height: 100%; }
  .tl-step:first-child::before { display: none; }
  .tl-text { margin-top: 2px; }
  .tl-next::before { background: var(--teal); }
  .tl-skipped::before { background: repeating-linear-gradient(to bottom, #C9D1DE 0 4px, transparent 4px 8px); }
  .toolbar .field:not(.field-grow):not(.field-actions) { flex: 1 1 100%; }
  .field-actions { flex: 1 1 100%; }
  .field-actions .btn { flex: 1; }
  .signin-card { padding: 18px; }
  .linerow { grid-template-columns: 1fr 1fr; }
  .linerow .rowremove { grid-column: 1 / -1; }
  .formpanel { padding: 14px 16px; }
  .pageactions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.note { margin-top: 8px; }

/* ================================================================ P2-B: returns, support, account, return page (buyers) */
.hint { margin: 0; color: var(--muted); font-size: .85rem; }
.textarea { min-height: 96px; padding: 10px 12px; line-height: 1.45; resize: vertical; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form h3, .formhead { margin: 0; font-size: 1.05rem; }
.formrow { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.formrow > .field { flex: 1 1 220px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 24px; }
.panel .formmsg { margin: 0; }
.check label { display: inline-flex; gap: 10px; align-items: center; font-weight: 600; min-height: 32px; }
.check input { width: 22px; height: 22px; accent-color: var(--teal); }
.check .hint { margin-left: 32px; }
.flash { margin: 0 0 16px; padding: 0; font-weight: 600; }
.flash:empty { display: none; }
.flash-ok { color: #0C5A51; background: var(--mint); border: 1px solid #BFE3D2; border-radius: var(--radius); padding: 10px 14px; }
.flash-bad { color: var(--bad-ink); background: var(--bad-bg); border: 1px solid #F0B8B3; border-radius: var(--radius); padding: 10px 14px; }
.btn-danger { background: var(--bad-ink); color: #fff; }
.btn-danger:hover { background: #7E1712; color: #fff; }
.confirm { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.rowbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.lead-inline { margin: 0 0 14px; color: var(--muted); max-width: 70ch; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.card:hover { border-color: var(--teal); color: var(--ink); }
.card-title { font-weight: 800; font-size: 1.1rem; color: var(--teal); }
.card-text { color: var(--muted); }
.reveal .revealrow { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 6px; }
.reveal .revealrow .input { flex: 1 1 320px; }
.lines { display: flex; flex-direction: column; gap: 14px; }
.retline { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; min-width: 0; }
.retline legend { font-weight: 700; padding: 0 6px; }
.retline .formrow { width: 100%; }
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.msg { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; background: var(--panel); max-width: 78ch; }
.msg-startfill { background: var(--mint); border-color: #BFE3D2; margin-left: 24px; }
.msg-head { margin: 0 0 6px; }
.msg-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 14px; font-style: normal; }

.tablebox + .panel, .notice + .panel, .empty + .panel, .reveal + .tablebox { margin-top: 20px; }
.form .toolbar { margin: 0; }
.quiet.note { margin: 8px 0 20px; }

/* the public return page (returns.html) */
.pubhead { margin: 28px 0 8px; }
.pubhead h1 { margin: 0; font-size: 2rem; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
.pubcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 20px 0; max-width: 720px; }
.pubcard h1, .pubcard h2 { margin: 0 0 12px; font-size: 1.3rem; }
.pubcard h3 { margin: 18px 0 6px; font-size: 1rem; }
.pubcard .btn-primary { background: var(--accent, var(--orange)); color: var(--accent-ink, var(--navy)); }
.pubcard .btn-primary:hover { background: var(--accent, #FF9C26); color: var(--accent-ink, var(--navy)); filter: brightness(.94); }
.pubcard a { color: var(--accent, var(--teal)); }
.publines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.publine { display: grid; grid-template-columns: 1fr 110px; gap: 4px 16px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.publine-off { background: var(--page); }
.publine-main { display: flex; flex-direction: column; }
.publine .quiet { grid-column: 1 / 2; }
.publine .qty { grid-column: 2 / 3; grid-row: 1 / 3; text-align: right; }
.rma-label { margin: 0; color: var(--muted); font-weight: 600; }
.rma { margin: 0 0 12px; font-size: 1.8rem; font-weight: 800; letter-spacing: .02em; word-break: break-all; }
.donelines { margin: 0 0 6px; padding-left: 20px; }
@media (max-width: 720px) {
  /* B tables: one card per row, the column head above each value */
  table.data.stackm, .stackm > tbody, .stackm > tbody > tr, .stackm > tbody > tr > td { display: block; width: 100%; }
  .stackm > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stackm > tbody > tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .stackm > tbody > tr:last-child { border-bottom: 0; }
  table.data.stackm > tbody > tr > td { border: 0; padding: 4px 0; text-align: left; }
  .stackm > tbody > tr > td::before { content: attr(data-label); display: block; font-size: .78rem; font-weight: 600; color: var(--muted); }
  .stackm .rowbtns { margin-top: 4px; }
  .pubcard { padding: 18px 16px; }
  .publine { grid-template-columns: 1fr 90px; }
  .msg-startfill { margin-left: 8px; }
}
@media print {
  .site-header, .skip, .form-actions .btn { display: none !important; }
  .pubcard { border: 0; padding: 0; }
}
/* END P2-B */
/* ---------------------------------------------------------------- P2-C: reports, alerts, billing */
.block > .quiet:not(.note) { margin-bottom: 12px; }
.block > .note { margin-top: 10px; }
.field-pair { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.field-pair .field { flex: 0 1 200px; }
.savemsg { min-height: 1.4em; margin: 6px 0 0; color: var(--teal); font-weight: 600; }
.savemsg-bad { color: var(--bad-ink); }
.switches { list-style: none; margin: 0 0 12px; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.switch { display: flex; align-items: flex-start; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.switch:last-child { border-bottom: 0; }
.switch input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--teal); }
.switch input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch label { display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.usage-figs { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line); }
.usage-figs .fig { background: var(--panel); border: 0; }
.usage-figs .fig dd { font-size: 1.7rem; }
.statement { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 16px; }
.statement h3 { margin: 18px 0 10px; font-size: 1.05rem; }
.statement .resulthead h3 { margin: 0; font-size: 1.3rem; }
.statement .tablebox { margin-bottom: 8px; }
.st-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 720px) {
  .usage-figs { grid-template-columns: 1fr 1fr; }
  .statement { padding: 14px; }
  .field-pair .field { flex: 1 1 100%; }
  .switch { padding: 12px 14px; }
}

/* ---------------------------------------------------------------- password sign-in (docs/PORTAL-AUTH.md) */
.signin-card h2 { margin: 0 0 10px; font-size: 1.15rem; }
.signin-card form .field { margin: 10px 0 12px; }
.signin-card .check { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 14px; }
.signin-card .check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 12px; }
.methods { border: 1.5px solid var(--line); border-radius: var(--radius); margin: 4px 0 16px; padding: 10px 14px 6px; }
.methods legend { font-weight: 700; padding: 0 6px; }
.method { margin: 0 0 8px; }
.method .sub { margin-left: 26px; }
.setupkey { display: inline-block; font-size: 1.05rem; letter-spacing: .06em; background: #F1F4F9; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; word-break: break-all; }
.signin-link { border-top-color: var(--navy); }
.devlist { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.devlist li { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.devlist .devname { font-weight: 700; }
.devlist .sub { flex: 1 1 auto; }

/* 1.0.23 Reports page: one panel per subject (tracking numbers, orders, inventory) */
.reportresult { margin: 14px 0 0; display: flex; flex-direction: column; gap: 10px; }
.reportresult:empty { display: none; }
.panel h2 { margin: 0 0 6px; font-size: 1.25rem; }
.panel > .rowbtns { margin: 0 0 6px; }
.panel .toolbar { margin: 12px 0 8px; }
.panel > .rowbtns + .note, .panel > .btn { margin-top: 8px; }
.panel .toolbar + .note { margin-top: 0; }
.panel > .note { margin: 6px 0 14px; }
