/* EAN Barcode Generator — style.css (UI v4, 2026-11-18).
   Benchmark-first redesign: learned completely from barcode.tec-it.com
   (the niche traffic leader) before any CSS was written — see
   workspace/research_notes/ui-v4-benchmark/barcode-teardown.md.
   Steals, re-expressed in our own green-accent system (no copied text,
   images or branding): flat Metro cards (6px radius, hairline borders,
   no shadows), tighter leader type scale (H1 2rem, H2 1.3rem), H1+lede as
   one flat #fafafa hero panel, three-step numbering on the tool via CSS
   counters, Download pinned as a full-width footer strip of the tool
   card, tree-row Related lists with a green left bar on hover, columnar
   light footer, flat 1px form controls and flat tabs, banded header.
   Deliberately NOT stolen: the leader's dot-grid body texture, dark navy
   footer, red/orange brand colours and red tile menu.
   Visual redesign only: typography scale, spacing, colour system, buttons,
   cards, hierarchy, hover/focus states, mobile layout. No external requests;
   system fonts only. Content, URLs, SEO tags and all JS hooks unchanged.
   Spec: DESIGN.md. Print rules at the bottom are carried over verbatim from v1.
   UI v3 hard fixes kept (user-verified, must not regress): white header with
   a 3px green rule only, no barcode-strip decoration, light footer, plain
   white page background — no green tint, no gradient, no dot/dash texture
   anywhere. Green survives only as the primary-button fill, links and tiny
   accents. The only dashed border allowed is the functional label-sheet
   cut guide. */
:root{
  /* Palette — neutral greys in v3 (see DESIGN.md §2). Green survives only as
     --accent (primary button), --accent-ink (links) and tiny status accents. */
  --ink:#1a1a1a; --ink-soft:#333333; --muted:#595959; --line:#dcdcdc; --line-strong:#b0b0b0;
  --bg:#ffffff; --card:#fff; --soft:#f0f0f0;
  --accent:#0b5e2f; --accent-deep:#084a25; --accent-ink:#0a4d27;
  --accent-soft:#e8f1ea; --accent-ring:rgba(11,94,47,.20);
  --warn-bg:#fffaf0; --warn-line:#c98f1b; --warn-ink:#6b4a00;
  --err:#a1121f; --err-bg:#fdecea; --err-line:#f0b4b4;
  --ok:#0b5e2f; --ok-bg:#e8f1ea; --ok-line:#a8d5b5;
  --focus:#0b5e2f;
  --radius:6px; --radius-sm:4px; --max:1000px;
  /* v4: flat Metro system — no elevation anywhere. Depth comes from
     hairline borders and flat panels, as on the leader. */
  --shadow-sm:none; --shadow-md:none;
  --space-1:.25rem; --space-2:.5rem; --space-3:.75rem; --space-4:1rem;
  --space-5:1.5rem; --space-6:2rem; --space-8:3rem;
}
/* Pico variable overrides. :root[data-theme=light] outranks Pico's own light
   block (:root:not([data-theme=dark]),[data-theme=light]). */
:root[data-theme=light]{
  --pico-primary:#0b5e2f; --pico-primary-background:#0b5e2f;
  --pico-primary-border:var(--pico-primary-background);
  --pico-primary-hover:#084a25; --pico-primary-hover-background:#084a25;
  --pico-primary-hover-border:var(--pico-primary-hover-background);
  --pico-primary-focus:rgba(11,94,47,.25);
  --pico-primary-inverse:#fff;
  --pico-background-color:#ffffff; --pico-color:#1a1a1a;
  --pico-muted-color:#595959; --pico-muted-border-color:#dcdcdc;
  --pico-text-selection-color:rgba(11,94,47,.18);
  --pico-font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --pico-font-size:100%; --pico-line-height:1.65;
  --pico-border-radius:10px; --pico-border-width:1px;
  --pico-form-element-background-color:#fff;
  --pico-form-element-border-color:#b0b0b0;
  --pico-form-element-active-border-color:#0b5e2f;
  --pico-form-element-focus-color:rgba(11,94,47,.20);
  --pico-card-background-color:#fff;
  --pico-card-border-color:#dcdcdc;
  --pico-block-spacing-vertical:0;
}
*{box-sizing:border-box}
html{font-size:16px;-webkit-text-size-adjust:100%}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color:var(--ink);background:var(--bg);line-height:1.6;
  display:flex;flex-direction:column;min-height:100vh}
::selection{background:var(--accent-soft)}
a{color:var(--accent-ink);text-underline-offset:2px;text-decoration-thickness:1px}
a:hover{color:var(--accent-deep)}
a:visited{color:var(--accent-ink)}
:focus-visible{outline:3px solid var(--focus);outline-offset:2px;border-radius:4px}
/* v4: leader type scale — H1 2rem, not 2.5rem. The restraint is the point.
   H1 + lede form one flat #fafafa hero panel (the leader's bg-color-heading
   hero block): the h1 is the panel's top half, the lede its bottom half.
   Every page has H1 immediately followed by .lede, so this is uniform;
   a lone H1 (no lede) still renders as a complete panel. */
main>.wrap>h1{font-size:2rem;line-height:1.15;margin:0;letter-spacing:-.02em;font-weight:800;
  text-wrap:balance;max-width:none;background:#fafafa;border:1px solid #e6e6e6;
  border-radius:var(--radius);padding:1.5rem 1.5rem 1rem}
main>.wrap>h1:has(+.lede){border-bottom:none;border-radius:var(--radius) var(--radius) 0 0;
  padding-bottom:1rem}
main>.wrap>.lede{font-size:1.125rem;line-height:1.6;color:var(--ink-soft);max-width:none;
  margin:0 0 1.4rem;background:#fafafa;border:1px solid #e6e6e6;border-top:none;
  border-radius:0 0 var(--radius) var(--radius);padding:0 1.5rem 1.4rem}
/* Short green rule under the h1 — the one deliberate mark on a content page,
   echoing the header rule. Solid accent only, no pattern or texture. */
h1::after{content:"";display:block;width:44px;height:3px;background:var(--accent);
  border-radius:2px;margin-top:.85rem}
h2{font-size:1.3rem;line-height:1.3;margin:2.2rem 0 .7rem;letter-spacing:-.01em;
  font-weight:750;border-bottom:1px solid var(--line);padding-bottom:.45rem;text-wrap:balance}
h3{font-size:1.12rem;margin:1.5rem 0 .35rem;font-weight:700}
p{margin:.55rem 0;text-wrap:pretty}
/* Readable measure: prose never spans the full 1000px column. Scoped to
   direct content lists so tool internals (bulk rows) are untouched. */
main p{max-width:72ch}
main>.wrap>ol li,main>.wrap>ul li{max-width:76ch}
img,svg,canvas{max-width:100%;height:auto}
.wrap{max-width:var(--max);margin:0 auto;padding:0 20px}
/* Pico gives body>header/main/footer vertical padding; we own the rhythm. */
body>header,body>main,body>footer{padding-block:0}

/* Skip link: visually hidden until focused (ui-ux-pro-max skip-links). */
.skip-link{position:absolute;left:-9999px;top:0;z-index:10;background:var(--accent);color:#fff;
  padding:.7rem 1rem;border-radius:0 0 var(--radius-sm) 0;font-weight:600;text-decoration:none}
.skip-link:focus{left:0;color:#fff}

/* ---- Header (UI v3, kept in v4): white, dark-ink text, 3px green rule only.
   No green block, no gradient. The v2 barcode-strip decoration
   (header.site::after, white dash bars) is deleted entirely.
   v4: banded header after the leader — the nav row is a full-bleed #fafafa
   band under a tightened brand row; the tag sits at the right end. ---- */
header.site{border-bottom:3px solid var(--accent);background:#fff;
  color:var(--ink)}
.brand{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;
  gap:.3rem .9rem;padding:.8rem 0 .45rem}
.brand a.logo{font-size:1.35rem;font-weight:800;color:var(--ink);text-decoration:none;letter-spacing:-.02em}
.brand a.logo:hover{color:var(--accent-ink)}
.brand span.tag{color:var(--muted);font-size:.9rem}
/* Nav wraps instead of hiding links off-screen: at 360px the 9 pills form
   two tidy rows; on desktop they still fit one row. No clipped pills.
   v4: square pills with a hairline border (the leader's tree-row language,
   turned horizontal); the active pill keeps its green fill. */
nav.main{display:flex;flex-wrap:wrap;gap:.4rem;background:#fafafa;
  border-top:1px solid #ededed;margin:0 -20px;padding:.35rem 20px .8rem}
nav.main a{padding:.5rem .9rem;border:1px solid var(--line);border-radius:var(--radius);
  background:#fff;text-decoration:none;color:var(--ink-soft);
  font-size:.95rem;font-weight:600;min-height:44px;display:inline-flex;align-items:center;
  transition:background-color .15s ease,color .15s ease}
nav.main a:hover{background:#f0f0f0;color:var(--ink)}
nav.main a[aria-current="page"]{background:var(--accent);border-color:var(--accent);color:#fff}
main{flex:1 0 auto;padding-bottom:4rem}
main>.wrap{padding-top:2rem}
/* ---- Footer (UI v3, kept in v4): very light grey, dark-ink text. No dark block.
   v4: columnar like the leader's directory footer — link column left,
   disclaimer paragraphs right — while staying light. ---- */
footer.site{border-top:1px solid var(--line);background:#fafafa;color:var(--ink-soft);
  padding:2.2rem 0 2.6rem;font-size:.9rem}
footer.site .wrap{display:grid;grid-template-columns:200px 220px 1fr;gap:.4rem 2.5rem;align-items:start}
footer.site nav{display:flex;flex-direction:column;align-items:flex-start;gap:.45rem;
  margin-bottom:0;grid-row:1 / span 2}
footer.site nav .foot-h{font-weight:700;color:var(--ink);margin-top:.7rem}
footer.site nav .foot-h:first-child{margin-top:0}
footer.site a{color:var(--accent-ink);font-weight:600}
footer.site a:hover{color:var(--accent-deep)}
footer.site p{color:var(--muted);max-width:70ch;line-height:1.7;font-size:.9rem;margin:0 0 .8rem}
/* ---- Tool card: one flat surface, clear primary action (v4: the leader's
   flat Metro card — hairline border, no shadow; the preview is the hero,
   and the button row is a footer strip pinned to the card's bottom edge,
   like the leader's full-width Download button). ---- */
.tool{border:1px solid var(--line);border-radius:var(--radius);padding:22px;
  margin:1.4rem 0;background:var(--card);overflow:hidden;counter-reset:v4step}
.tool label{display:block;font-weight:650;margin:.85rem 0 .3rem;font-size:.97rem}
/* v4 — three-step numbering, stolen from the leader's 1-2-3 wizard
   (which numbers its steps on mobile). CSS counters only: no HTML, no
   content change. Step 1 = the first field label, step 2 = the first
   options-row label, step 3 = the preview stage (or the button row for
   bulk, which has no preview). Scoped per tool shape: checkdigit and
   labels have no three-beat shape and stay unnumbered. */
[data-tool="single"]>label:first-of-type::before,
[data-tool="mini"]>label:first-of-type::before,
[data-tool="isbn"]>label:first-of-type::before,
[data-tool="bulk"]>label:first-of-type::before,
[data-tool="single"] .field-row3>label:first-child::before,
[data-tool="mini"] .field-row3>label:first-child::before,
[data-tool="isbn"] .field-row3>label:first-child::before,
[data-tool="bulk"] .field-row>label:first-child::before,
[data-tool="single"] .preview::before,
[data-tool="mini"] .preview::before,
[data-tool="isbn"] .preview::before,
[data-tool="bulk"] .btnrow::before{
  counter-increment:v4step;content:counter(v4step);
  display:inline-flex;align-items:center;justify-content:center;flex:none;
  width:1.4rem;height:1.4rem;background:var(--accent);color:#fff;
  font-size:.85rem;font-weight:800;line-height:1;border-radius:3px;
  margin-right:.55rem;vertical-align:.12em}
/* The preview badge sits at the stage's top-left corner, not in the flow. */
[data-tool="single"] .preview::before,
[data-tool="mini"] .preview::before,
[data-tool="isbn"] .preview::before{
  position:absolute;top:10px;left:10px;margin-right:0;display:flex}
/* The bulk badge is a flex item in the button row. */
[data-tool="bulk"] .btnrow::before{align-self:center}
.tool input[type=text],.tool input[type=number],.tool select,.tool textarea{
  width:100%;min-height:48px;padding:.65rem .8rem;font-size:1rem;border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);background:#fff;color:var(--ink);margin-bottom:0;
  transition:border-color .15s ease,box-shadow .15s ease}
.tool input[data-in]{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  letter-spacing:.05em;font-size:1.06rem}
.tool input:hover,.tool select:hover,.tool textarea:hover{border-color:#8a8a8a}
.tool input:focus,.tool select:focus,.tool textarea:focus{outline:none;border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-ring)}
.tool textarea{min-height:150px;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.95rem;
  line-height:1.6;resize:vertical}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:0 1rem}
.field-row3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0 1rem}
/* Options row: the third column is a bare "&nbsp;" label wrapping two
   checklines — without this it sags to the bottom of the row under a blank
   line. Collapse the blank line and centre the two checklines against the
   two input rows, so the three columns read as three aligned fields. */
.field-row3>label:last-child{display:flex;flex-direction:column;justify-content:center;
  gap:.2rem;font-size:0;line-height:0}
.field-row3>label:last-child .checkline{font-size:.97rem;line-height:1.4;margin:.1rem 0}
.checkline{display:flex;align-items:center;gap:.55rem;margin:.6rem 0;font-weight:500;
  min-height:44px;cursor:pointer}
.checkline input{width:1.25rem;height:1.25rem;accent-color:var(--accent);flex:none;margin:0}
.checkline input:disabled{opacity:.35}

/* Preview: the result is the hero — the barcode itself, large, on a quiet
   stage. The SVG has a viewBox, so it scales proportionally: narrow values
   render big and confident instead of lost in a wide empty panel.
   v4: plain white stage, hairline border, no inset shadow (the leader's
   preview column is a plain white panel); the barcode renders larger. */
.preview{position:relative;border:1px solid var(--line);border-radius:var(--radius-sm);
  background:#fff;padding:28px 16px 24px;margin:1.2rem 0;text-align:center;overflow-x:auto}
.preview svg{display:block;margin:0 auto;width:min(100%,600px);height:auto;max-width:100%}
.preview .placeholder{color:var(--muted)}
/* Button row: the action strip. Where it is the card's last child
   (single/mini/isbn tools) it becomes the card's footer — top hairline,
   #fafafa band, pulled to the card's edges — with the primary button
   growing to dominate, like the leader's bottom-pinned full-width
   Download. Bulk/labels keep a plain row (their button row is mid-card). */
.btnrow{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:.6rem}
.tool>.btnrow:last-child{margin:1.2rem -22px -22px;padding:.9rem 22px;
  border-top:1px solid var(--line);background:#fafafa;
  border-radius:0 0 var(--radius) var(--radius)}
.btnrow .btn:first-child{flex:1 1 auto}
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:48px;
  padding:.7rem 1.35rem;border-radius:var(--radius-sm);border:1px solid var(--accent);
  background:var(--accent);color:#fff;font-size:1rem;font-weight:650;cursor:pointer;
  text-decoration:none;margin:0;transition:background-color .15s ease}
.btn:hover{background:var(--accent-deep)}
.btn:active{background:var(--accent-deep)}
.btn.secondary{background:#fff;color:var(--accent-ink)}
.btn.secondary:hover{background:#f0f0f0}
.btn:disabled,.btn[disabled]{background:#d0d0d0;border-color:#d0d0d0;color:#6e6e6e;
  cursor:not-allowed;box-shadow:none;transform:none}
.msg{border-radius:var(--radius-sm);padding:.7rem .9rem;margin:.8rem 0;font-size:.97rem;
  font-weight:500;display:flex;gap:.55rem;align-items:flex-start}
.msg::before{font-weight:800;flex:none}
.msg.error{background:var(--err-bg);color:var(--err);border:1px solid var(--err-line)}
.msg.error::before{content:"⚠"}
.msg.ok{background:var(--ok-bg);color:var(--ok);border:1px solid var(--ok-line)}
.msg.ok::before{content:"✓"}
.msg.note{background:var(--warn-bg);color:var(--warn-ink);border:1px solid var(--warn-line)}
.msg.note::before{content:"ℹ"}
.msg:empty{display:none}
/* Warning note, quieted in the beauty pass: a pale tint with an amber edge
   instead of a full amber slab — it was the loudest thing on every page. */
.warnbox{background:var(--warn-bg);border:1px solid #e9dfc0;border-left:4px solid var(--warn-line);
  border-radius:var(--radius-sm);padding:.95rem 1.1rem;margin:1.3rem 0}
.warnbox strong{color:var(--warn-ink)}
.infobox{background:var(--accent-soft);border:1px solid var(--ok-line);border-left:4px solid var(--accent);
  border-radius:var(--radius-sm);padding:.95rem 1.1rem;margin:1.3rem 0}

/* ---- Content: tables, steps, FAQ ---- */
table{border-collapse:separate;border-spacing:0;width:100%;margin:.9rem 0;font-size:.95rem;
  border:1px solid var(--line);border-radius:var(--radius-sm);overflow:hidden;background:#fff}
th,td{border:none;border-bottom:1px solid var(--line);padding:.65rem .8rem;text-align:left;vertical-align:top}
tr:last-child th,tr:last-child td{border-bottom:none}
th{background:#fafafa;font-weight:700;color:var(--ink-soft);font-size:.9rem;letter-spacing:.02em}
tbody tr:hover{background:#f7f7f7}
.tablewrap{overflow-x:auto}
.tabs{display:flex;gap:.4rem;flex-wrap:wrap;margin:1.2rem 0 0;padding:.3rem;
  background:#fafafa;border:1px solid var(--line);border-radius:var(--radius);
  width:fit-content;max-width:100%}
.tabs button{padding:.6rem 1.15rem;border:1px solid transparent;border-radius:var(--radius-sm);
  background:transparent;font-size:1rem;font-weight:600;color:var(--ink-soft);cursor:pointer;
  min-height:44px;transition:background-color .15s ease,color .15s ease}
.tabs button:hover{color:var(--accent-ink)}
.tabs button[aria-selected="true"]{background:var(--accent);font-weight:700;color:#fff}
.tabpanel{border:none;border-radius:0;padding:0}
.bulk-results{list-style:none;padding:0;margin:.9rem 0;max-height:340px;overflow-y:auto;
  border:1px solid var(--line);border-radius:var(--radius-sm);background:#fff}
.bulk-results:empty{display:none}
.bulk-results li{padding:.55rem .8rem;border-bottom:1px solid #ededed;
  font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.92rem;display:flex;
  justify-content:space-between;gap:.8rem;flex-wrap:wrap}
.bulk-results li:last-child{border-bottom:none}
.bulk-results li.bad{color:var(--err);background:var(--err-bg);border-left:4px solid var(--err)}
.bulk-results li.bad::before{content:"✕";font-weight:800}
.bulk-results li .st{white-space:nowrap}
/* FAQ: give each question its own block with a hairline above it, instead of
   one undifferentiated wall of headings. Related links get green markers and
   breathing room; steps get a touch more air between items. */
.faq h3{margin:1.6rem 0 .3rem;padding-top:1.2rem;border-top:1px solid var(--line)}
.faq h3:first-child{margin-top:1rem;padding-top:0;border-top:none}
.faq p{margin-top:.25rem}
main>.wrap>ul li{margin:.4rem 0}
main>.wrap>ul li::marker{color:var(--accent)}
/* v4 — Related link lists as the leader's tree rows: no bullets, hairline
   separators, a 3px green left bar on hover. Scoped with :has() to lists
   whose items are single links only, so prose bullets (e.g. the
   barcode-vs-QR page's "Use a barcode when…" lists) are untouched. */
main>.wrap>ul:has(>li>a:only-child){list-style:none;padding-left:0;margin:1rem 0}
main>.wrap>ul:has(>li>a:only-child) li{list-style:none;margin:0;border-bottom:1px solid #ededed}
main>.wrap>ul:has(>li>a:only-child) li:last-child{border-bottom:none}
main>.wrap>ul:has(>li>a:only-child) li a{display:block;padding:.6rem .2rem .6rem .8rem;
  border-left:3px solid transparent;text-decoration:none}
main>.wrap>ul:has(>li>a:only-child) li a:hover{border-left-color:var(--accent);
  background:#fafafa}
.steps{margin:.7rem 0;padding-left:1.5rem}
.steps li{margin:.55rem 0}
.steps li::marker{color:var(--accent);font-weight:700}
.kv{font-size:.95rem;color:var(--muted)}
code{background:#f7f7f7;border:1px solid #e3e3e3;padding:.15rem .35rem;border-radius:5px;font-size:.9em}
pre{background:#f7f7f7;border:1px solid #e3e3e3;padding:1rem;border-radius:var(--radius-sm);overflow-x:auto;font-size:.9rem}

/* Label sheet */
.sheet-grid{display:grid;gap:8px;margin:1rem 0}
.sheet-grid .cell{border:1px dashed #9a9a9a;padding:8px;text-align:center;overflow:hidden;
  background:#fff;border-radius:6px}
.sheet-grid .cell svg{max-width:100%}
.sheet-grid .cell .v{font-size:.8rem;font-family:ui-monospace,Menlo,Consolas,monospace}
.sheet-5160{grid-template-columns:repeat(3,1fr)}
.sheet-5163{grid-template-columns:repeat(2,1fr)}
.sheet-5167{grid-template-columns:repeat(4,1fr)}
.sheet-l7160{grid-template-columns:repeat(3,1fr)}
.sheet-a4{grid-template-columns:repeat(3,1fr)}

/* Print: only the print area (unchanged from v1) */
#print-area{display:none}
@media print{
  body *{visibility:hidden}
  #print-area,#print-area *{visibility:visible}
  #print-area{display:block;position:absolute;left:0;top:0;width:100%}
  #print-area .print-code{text-align:center;margin:20mm 0}
  #print-area .print-code svg{max-width:90%}
  #print-area .sheet-grid{visibility:visible}
  #print-area .sheet-grid .cell{border:none;padding:0}
  /* True-size label layouts (opus audit F2): the sheet's own padding is the
     page margin, so @page margin is 0. Single-barcode prints keep their
     spacing from .print-code's own margin. Avery 5160: labels 2.625in x 1in,
     top margin .5in, side margins .1875in, column pitch 2.75in. L7160 (A4):
     labels 63.5 x 38.1mm, top margin 15.1mm, side margins 7.2mm, pitch
     66.7mm. Other sheets keep the fluid grid, just without printed borders. */
  #print-area .sheet-5160{grid-template-columns:repeat(3,2.625in);column-gap:.125in;row-gap:0;grid-auto-rows:1in;padding:.5in .1875in}
  #print-area .sheet-5160 .cell{display:flex;align-items:center;justify-content:center;overflow:hidden}
  #print-area .sheet-l7160{grid-template-columns:repeat(3,63.5mm);column-gap:3.2mm;row-gap:0;grid-auto-rows:38.1mm;padding:15.1mm 7.2mm 15.2mm}
  #print-area .sheet-l7160 .cell{display:flex;align-items:center;justify-content:center;overflow:hidden}
  @page{margin:0}
}
@media (max-width:640px){
  main>.wrap>h1{font-size:1.7rem;padding:1.1rem 1.1rem .9rem}
  main>.wrap>.lede{padding:0 1.1rem 1.1rem}
  h2{font-size:1.2rem}
  .wrap{padding:0 16px}
  .brand{padding-top:.9rem}
  .brand a.logo{font-size:1.3rem}
  nav.main{margin:0 -16px;padding:.35rem 16px .8rem;flex-wrap:nowrap;overflow-x:auto}
  nav.main a{flex:none}
  .brand span.tag{display:none}
  .field-row,.field-row3{grid-template-columns:1fr}
  .tool{padding:18px 16px}
  .tool>.btnrow:last-child{margin:1.2rem -16px -16px;padding:.9rem 16px}
  .btn{width:100%;text-align:center}
  .btnrow{display:flex;flex-direction:column}
  /* Footer: back to a single column on small screens. */
  footer.site .wrap{display:block}
  footer.site nav{flex-direction:row;flex-wrap:wrap;gap:.45rem 1rem;margin-bottom:1.1rem}
  /* Tabs: one line each, equal thirds — no more 74px wrapped pills. */
  .tabs{width:100%;border-radius:var(--radius-sm);gap:.3rem}
  .tabs button{flex:1 1 0;min-width:0;white-space:nowrap;font-size:.92rem;padding:.6rem .4rem}
  /* Tables scroll sideways instead of crushing their columns. */
  .tablewrap table{min-width:540px}
  .sheet-5167{grid-template-columns:repeat(2,1fr)}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none !important}
}
