/* Fizz Barcode Labels. Motif: the label sheet. Warm paper, die-cut outlines, black bars, and one scanner red
   for the check digit and anything that "prints". Display type is a narrow DIN-style grotesk (system fonts),
   numbers are monospaced. Labels stay white paper in dark mode, like real label stock under a desk lamp. */
:root {
  --bg: #f2f0ea; --bg-2: #e9e6dd; --surface: #fbfaf7; --paper: #ffffff; --ink: #15171c; --ink-2: #555a63; --line: #dcd7cb;
  --cut: #cfc8b8; --red: #d93a28; --red-ink: #b02a1a; --on-red: #ffffff; --slate: #334155; --ok: #1f7a4d; --ok-soft: #e3f1e8;
  --bars: #111111; --paper-ink: #15171c; --paper-ink-2: #5e6470;
  --shadow: 0 1px 2px rgba(40, 32, 20, .07), 0 10px 26px -14px rgba(40, 32, 20, .28);
  --shadow-lg: 0 2px 4px rgba(40, 32, 20, .06), 0 34px 70px -34px rgba(40, 32, 20, .45);
  --disp: "DIN Alternate", "DIN Next", Bahnschrift, "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216; --bg-2: #171a20; --surface: #1a1d23; --ink: #eceae4; --ink-2: #a9adb6; --line: #2c3038; --cut: #3a3f49;
    --red: #ff6a55; --red-ink: #ff8f7e; --on-red: #1b0703; --slate: #9fb0c8; --ok: #6fd3a0; --ok-soft: #17291f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 26px -14px rgba(0, 0, 0, .7);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 34px 70px -30px rgba(0, 0, 0, .85);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); }
main { overflow-x: clip; }
a { color: var(--red-ink); text-underline-offset: 3px; }
:focus-visible { outline: 2.5px solid var(--red); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--disp); line-height: 1.08; letter-spacing: -0.01em; font-weight: 700; }
code { font-family: var(--mono); font-size: .9em; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 12px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--disp); font-weight: 700; font-size: 1.12rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.top nav { display: flex; gap: 22px; align-items: center; font-size: .94rem; }
.top nav a { color: var(--ink-2); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
@media (max-width: 760px) { .top nav .opt { display: none; } }

/* Buttons from {{cta}} */
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.cta-btn { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 650;
  padding: 14px 24px; border-radius: 12px; box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, var(--shadow); transition: transform .2s var(--ease), box-shadow .2s; }
.cta-btn::before { content: ""; width: 14px; height: 14px; background: linear-gradient(90deg, currentColor 0 2px, transparent 2px 4px, currentColor 4px 5px, transparent 5px 7px, currentColor 7px 10px, transparent 10px 11px, currentColor 11px 12px, transparent 12px 13px, currentColor 13px); }
.cta-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.cta-note { font-size: .86rem; color: var(--ink-2); max-width: 30em; }
.cta.center { flex-direction: column; text-align: center; }

/* Hero */
.hero { display: grid; gap: 44px; padding-top: 56px; padding-bottom: 32px; position: relative; }
.hero::before { content: ""; position: absolute; z-index: -1; inset: -64px -50vw 0; pointer-events: none;
  background: radial-gradient(560px 360px at 80% 35%, color-mix(in srgb, var(--red) 9%, transparent), transparent 70%),
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--cut) 70%, transparent) 1px, transparent 1.4px) 0 0 / 22px 22px;
  -webkit-mask: radial-gradient(70% 80% at 70% 40%, #000 30%, transparent 80%); mask: radial-gradient(70% 80% at 70% 40%, #000 30%, transparent 80%); }
@media (min-width: 1020px) { .hero { grid-template-columns: minmax(0, 4.4fr) minmax(0, 7.6fr); align-items: center; gap: 56px; padding-top: 72px; padding-bottom: 56px; } }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--ink-2); margin: 0 0 18px; font-weight: 550; }
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 20%, transparent); }
.hero h1 { font-size: clamp(2.6rem, 4.6vw, 3.6rem); margin: 0 0 18px; text-wrap: balance; letter-spacing: -0.02em; }
.lead { font-size: 1.2rem; color: var(--ink-2); margin: 0 0 24px; max-width: 24em; }
.chip { display: inline-flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin: 0 0 28px; padding: 10px 16px; border-radius: 12px;
  background: var(--surface); border: 1px dashed var(--cut); font-size: .95rem; }
.chip b { color: var(--red-ink); font-family: var(--disp); font-size: 1.1rem; }
.chip span { color: var(--ink-2); }
.chip a { font-weight: 650; text-decoration: none; }

/* Demo */
.demo { display: grid; gap: 18px; min-width: 0; }
@media (min-width: 720px) { .demo { grid-template-columns: 290px minmax(0, 1fr); align-items: start; } }
@media (min-width: 1020px) { .demo { margin-right: -24px; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--shadow-lg); min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.ph-title { font-family: var(--disp); font-weight: 700; font-size: 1.05rem; }
.ph-sub { font-size: .74rem; color: var(--ink-2); }
.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.prod { font: inherit; font-size: .78rem; font-weight: 600; text-align: left; padding: 8px 9px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); cursor: pointer; line-height: 1.25; transition: border-color .2s, background-color .2s; }
.prod small { display: block; font-weight: 400; color: var(--ink-2); }
.prod[aria-checked="true"] { border-color: var(--ink); background: var(--paper); color: var(--paper-ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.prod[aria-checked="true"] small { color: var(--paper-ink-2); }
.field { display: block; font-size: .74rem; color: var(--ink-2); font-weight: 600; }
.code-in { display: flex; margin-top: 5px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.code-in input { flex: 1; min-width: 0; font: 600 1.02rem/1 var(--mono); letter-spacing: .06em; padding: 11px 10px; border: 0; background: transparent; color: var(--ink); }
.code-in input:focus { outline: none; }
.code-in:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 22%, transparent); }
.chk-out { font: 700 1.02rem/1 var(--mono); display: grid; place-items: center; width: 42px; background: var(--bg-2); color: var(--ink-2); border-left: 1px dashed var(--cut); }
.chk-out.ok { background: var(--red); color: var(--on-red); }
.math { min-height: 76px; margin: 10px 0 12px; }
.m-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; }
.m-d { display: grid; text-align: center; border-radius: 6px; background: var(--bg); padding: 3px 0 2px; }
.m-d b { font: 650 .86rem/1.2 var(--mono); }
.m-d i { font: .62rem/1.2 var(--mono); font-style: normal; color: var(--ink-2); }
.m-d.w3 { background: var(--bg-2); }
.m-res { font-size: .8rem; color: var(--ink-2); margin: 8px 0 0; }
.m-res b { color: var(--ink); font-family: var(--mono); }
.m-res .red { color: var(--red-ink); }
.m-wait { font-size: .8rem; color: var(--ink-2); margin: 6px 0 0; }
.row2 { display: flex; gap: 8px; align-items: stretch; margin-bottom: 10px; flex-wrap: wrap; }
.seg { display: flex; flex: 1; min-width: 0; padding: 3px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.seg button { flex: 1; font: inherit; font-size: .74rem; font-weight: 600; border: 0; border-radius: 7px; padding: 6px 6px; background: none; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button[aria-checked="true"] { background: var(--paper); color: var(--paper-ink); box-shadow: var(--shadow); }
.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.qty button { font: 600 1rem/1 var(--sans); width: 32px; height: 100%; min-height: 34px; border: 0; background: none; color: var(--ink); cursor: pointer; border-radius: 9px; }
.qty output { font: 650 .9rem var(--mono); min-width: 22px; text-align: center; }
.print { width: 100%; font: inherit; font-weight: 700; font-size: .95rem; padding: 11px; border: 0; border-radius: 11px; background: var(--red); color: var(--on-red); cursor: pointer;
  box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--red) 80%, transparent); transition: transform .15s var(--ease), filter .2s; }
.print:hover { filter: brightness(1.05); }
.print:active { transform: translateY(1px) scale(.99); }

.stock { position: relative; min-width: 0; }
.loupe { position: relative; z-index: 2; margin: 0 6px -30px 14px; transform: rotate(-1.5deg); }
.label { background: var(--paper); color: var(--paper-ink); border-radius: 10px; box-shadow: 0 0 0 1px rgba(0,0,0,.06), var(--shadow-lg); }
.label p { margin: 0; }
.label.big { width: 100%; max-width: 340px; aspect-ratio: 2.25 / 1.25; padding: 12px 14px 10px; display: grid; grid-template-rows: auto auto 1fr auto; }
.label .l-t { font-family: var(--disp); font-weight: 700; font-size: 1.02rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label .l-v { display: flex; justify-content: space-between; gap: 8px; font-size: .72rem; color: var(--paper-ink-2); }
.label .l-v span:last-child { font-family: var(--mono); }
.label .l-p { font-family: var(--disp); font-weight: 700; font-size: .92rem; text-align: right; margin-top: -2px; }
.bc { display: block; width: 100%; height: 100%; min-height: 0; margin: 4px 0 0; }
.bc .bar { fill: var(--bars); }
.bc .digits { font-family: var(--mono); fill: var(--paper-ink); }
.bc .digits .chk { fill: var(--red-ink); font-weight: 700; }
@media (prefers-color-scheme: dark) { .bc .digits .chk { fill: #c0321f; } }
.label.big.blank .bc { opacity: 0; }
.bc.draw .bar { animation: bar .5s var(--ease) both; transform-box: fill-box; transform-origin: 50% 100%; }
.bc.draw .bar:nth-child(4n+1) { animation-delay: .03s; } .bc.draw .bar:nth-child(4n+2) { animation-delay: .08s; }
.bc.draw .bar:nth-child(4n+3) { animation-delay: .13s; } .bc.draw .bar:nth-child(4n) { animation-delay: .18s; }
@keyframes bar { from { transform: scaleY(0); } }

.sheet { position: relative; background: var(--paper); border-radius: 6px; padding: 34px 10px 12px; aspect-ratio: 8.5 / 7.2; overflow: hidden;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 0 5px; box-shadow: 0 0 0 1px rgba(0,0,0,.05), var(--shadow-lg);
  -webkit-mask: linear-gradient(#000 78%, transparent); mask: linear-gradient(#000 78%, transparent); }
.sheet .cell, .roll .cell { border: 1px dashed #d6cfbf; border-radius: 4px; min-width: 0; overflow: hidden; }
.sheet .cell { padding: 2px 4px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); column-gap: 4px; align-items: center; }
.sheet .cell.on { border-style: solid; border-color: #e2dccf; }
.sheet .cell .l-t { font: 700 .5rem/1.1 var(--disp); color: #15171c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; grid-column: 1; margin: 0; }
.sheet .cell .l-p { font: 700 .48rem/1 var(--disp); color: #15171c; grid-column: 2; grid-row: 1; margin: 0; }
.sheet .cell .l-v { display: none; }
.sheet .cell .bc { grid-column: 1 / -1; height: 100%; margin: 0; }
.sheet .cell .bc .digits { display: none; }
.cell.pop { animation: pop .38s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.96); } }
.roll { position: relative; margin: 0 auto; width: min(100%, 280px); padding: 40px 12px 12px; display: grid; gap: 10px; background: #f3efe6; border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.05), var(--shadow-lg); -webkit-mask: linear-gradient(#000 82%, transparent); mask: linear-gradient(#000 82%, transparent); }
.roll .cell { background: #fff; aspect-ratio: 2.25 / 1.25; padding: 8px 10px; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; color: #15171c; border-style: solid; border-color: #e4dfd4; }
.roll .cell .l-t { font: 700 .82rem/1.1 var(--disp); margin: 0; }
.roll .cell .l-v { display: flex; justify-content: space-between; font-size: .62rem; color: #5e6470; margin: 0; }
.roll .cell .l-p { font: 700 .74rem/1 var(--disp); text-align: right; margin: 0; }
.cell.feed { animation: feed .5s var(--ease) both; }
@keyframes feed { from { opacity: 0; transform: translateY(-18px); } }
.meter { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 12px 4px 0; font-size: .8rem; color: var(--ink-2); }
.meter b { font-family: var(--mono); color: var(--ink); }
.meter span:last-child b { color: var(--ok); }

/* Sections */
.band { padding-top: 120px; }
.head { text-align: center; max-width: 40em; margin: 0 auto 44px; }
.head h2 { font-size: clamp(2rem, 3.8vw, 2.9rem); margin: 0 0 12px; text-wrap: balance; }
.head p { margin: 0; color: var(--ink-2); font-size: 1.08rem; }
.head.left { text-align: left; margin: 0; }
.eyebrow { display: inline-block; font: 600 .74rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--red-ink); margin: 0 0 14px; }
.split { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; } .split.rev > :first-child { order: 2; } }

/* Delivery */
.delivery { display: grid; gap: 22px; align-items: center; justify-items: center; max-width: 900px; margin: 0 auto; }
@media (min-width: 760px) { .delivery { grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr); } .del-total { grid-column: 1 / -1; } }
.paste { width: 100%; max-width: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.paste-h { font-size: .78rem; color: var(--ink-2); margin: 0 0 8px; font-weight: 600; }
.paste ol { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: .9rem; }
.paste li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 8px; transition: background-color .3s; }
.paste li code { font-size: inherit; overflow-wrap: anywhere; }
.paste li span { color: var(--ink-2); }
.paste li.on { background: color-mix(in srgb, var(--red) 10%, transparent); }
.paste li.on span { color: var(--red-ink); font-weight: 700; }
.arrow { color: var(--cut); width: 60px; }
@media (max-width: 759px) { .arrow { transform: rotate(90deg); } }
.mini-sheet { width: 100%; max-width: 300px; aspect-ratio: 8.5 / 11; background: var(--paper); border-radius: 6px; padding: 7% 3% 7%; display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(10, minmax(0, 1fr)); gap: 0 3%; box-shadow: 0 0 0 1px rgba(0,0,0,.05), var(--shadow-lg); }
.mini-sheet i { border: 1px dashed #d6cfbf; border-radius: 3px; display: grid; place-items: center; }
.mini-sheet svg { width: 62%; height: 70%; opacity: 0; transition: opacity .25s; }
.mini-sheet svg path { stroke: #111; stroke-width: 1.2; }
.mini-sheet i.on { border-style: solid; border-color: #e2dccf; }
.mini-sheet i.on svg { opacity: 1; }
.mini-sheet i.k0.on { background: #fff7f5; } .mini-sheet i.k1.on { background: #f5f8f6; } .mini-sheet i.k2.on { background: #f7f6fb; } .mini-sheet i.k3.on { background: #fbf8ef; }
.del-total { margin: 0; font-size: .95rem; color: var(--ink-2); }
.del-total b { font-family: var(--mono); color: var(--ink); }
html:not(.js) .mini-sheet svg { opacity: 1; }

/* Assign */
.assign { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.as-head, .assign li { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px; gap: 12px; align-items: center; padding: 12px 18px; }
.as-head { font-size: .74rem; font-weight: 650; color: var(--ink-2); border-bottom: 1px solid var(--line); grid-template-columns: minmax(0, 1fr) auto; }
.assign ul { list-style: none; margin: 0; padding: 0; }
.assign li { border-bottom: 1px dashed var(--line); font-size: .92rem; }
.assign li code { font-size: .88rem; color: var(--ink-2); }
.assign li em { font-style: normal; font-size: .7rem; font-weight: 700; text-align: center; padding: 2px 6px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.assign li.kept code { color: var(--ink); }
.assign li.new code { color: var(--ink-2); font-style: italic; font-family: var(--sans); }
.assign li.new.written code { color: var(--ink); font-style: normal; font-family: var(--mono); animation: pop .35s var(--ease); }
.assign li.new.written em { background: var(--ok-soft); color: var(--ok); }
.assign li.inuse { color: var(--ink-2); font-size: .84rem; opacity: .55; transition: opacity .3s; }
.assign li.inuse.seen { opacity: 1; }
.assign li.inuse.seen em { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red-ink); }
.as-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; font-size: .84rem; color: var(--ink-2); flex-wrap: wrap; }
.btn-sm { font: inherit; font-size: .84rem; font-weight: 700; padding: 8px 14px; border-radius: 9px; border: 0; background: var(--ink); color: var(--bg); cursor: pointer; }

/* Templates */
.tpls { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 700px) { .tpls { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tpls li { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 2px; transition: transform .25s var(--ease), box-shadow .25s; }
.tpls li:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tpls svg { width: 100%; height: 130px; margin-bottom: 10px; }
.tpls b { font-family: var(--disp); font-size: 1.02rem; }
.tpls span { font-size: .8rem; color: var(--ink-2); }
.tpls .pg { fill: var(--paper); stroke: var(--cut); stroke-width: .6; }
.tpls .cut { fill: none; stroke: #b9b09d; stroke-width: .5; }
.tpls .cut.dash { stroke-dasharray: 2 1.5; stroke: var(--red); }
.tpls .dim { stroke: var(--red); stroke-width: .7; fill: none; }
.tpls .liner { fill: #efe9dc; }
.tpls li.th .cut { fill: #fff; stroke: #d8d0bf; }
@media (prefers-color-scheme: dark) { .tpls .liner { fill: #e4ddcd; } }

/* Print menu mock */
.menu-mock { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 16px; position: relative; }
.mm-bar { display: flex; justify-content: space-between; align-items: center; font-size: .86rem; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.mm-crumb { font-weight: 650; }
.mm-btn { border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-weight: 600; background: var(--bg); }
.mm-btn i { font-style: normal; color: var(--ink-2); }
.mm-drop { position: absolute; right: 16px; top: 52px; width: 190px; background: var(--paper); color: var(--paper-ink); border-radius: 10px; padding: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,.06), var(--shadow-lg); display: grid; z-index: 1; }
.mm-drop span { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 7px; font-size: .84rem; color: #5e6470; }
.mm-drop span.on { background: #f3efe6; color: #15171c; font-weight: 650; }
.mm-lines { padding-top: 64px; display: grid; gap: 2px; }
.mm-lines p { display: flex; justify-content: space-between; gap: 10px; margin: 0; padding: 9px 4px; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.mm-lines b { font-family: var(--mono); }
.mm-lines .sum { border: 0; color: var(--ink-2); font-size: .84rem; }
.mm-lines .sum b { color: var(--red-ink); font-size: 1rem; }

/* Comparison cards ({{compare}}) */
.cmp-cards { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
@media (min-width: 640px) { .cmp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .cmp-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cmp-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 18px 18px; display: flex; flex-direction: column; }
.cmp-card.us { background: #15171c; color: #eceae4; border-color: #15171c; box-shadow: var(--shadow-lg); }
@media (prefers-color-scheme: dark) { .cmp-card.us { background: var(--paper); color: var(--paper-ink); border-color: var(--paper); } }
.cmp-badge { position: absolute; top: -11px; left: 16px; font: 700 .7rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; background: var(--red); color: var(--on-red); padding: 6px 9px; border-radius: 6px; }
.cmp-name { font-size: 1.12rem; margin: 0 0 2px; }
.cmp-plan { font-size: .8rem; color: var(--ink-2); margin: 0 0 12px; min-height: 2.5em; }
.cmp-card.us .cmp-plan { color: #a9adb6; }
@media (prefers-color-scheme: dark) { .cmp-card.us .cmp-plan { color: #5e6470; } }
.cmp-price { margin: 0 0 10px; display: flex; align-items: baseline; gap: 4px; }
.cmp-amount { font-family: var(--disp); font-weight: 700; font-size: 2.3rem; line-height: 1; letter-spacing: -0.02em; }
.cmp-card.us .cmp-amount { color: #ff6a55; }
@media (prefers-color-scheme: dark) { .cmp-card.us .cmp-amount { color: #c0321f; } }
.cmp-per { font-size: .85rem; color: var(--ink-2); }
.cmp-tag { display: block; font-size: .76rem; line-height: 1.4; color: var(--ink-2); background: var(--bg); border: 1px dashed var(--cut); border-radius: 8px; padding: 6px 9px; margin: 0 0 12px; }
.cmp-checks { list-style: none; margin: auto 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: .84rem; }
.cmp-card.us .cmp-checks { border-color: rgba(255,255,255,.14); }
@media (prefers-color-scheme: dark) { .cmp-card.us .cmp-checks { border-color: #e2dccf; } }
.cmp-checks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; line-height: 1.35; }
.cmp-checks li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; margin-top: 1px; background: var(--ok-soft) center / 10px no-repeat; }
.cmp-checks li.yes::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5.2l2.2 2.2L8.5 2.6' fill='none' stroke='%231f7a4d' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.cmp-checks li.no { color: var(--ink-2); }
.cmp-checks li.no::before { background-color: var(--bg-2); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2.5 2.5l5 5M7.5 2.5l-5 5' fill='none' stroke='%238a8f98' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.cmp-card.us .cmp-checks li.no { color: #a9adb6; }
.cmp-card.us .cmp-checks li.yes::before { background-color: #e3f1e8; }
.cmp-card.us .cmp-checks li.no::before { background-color: #3a3f49; }
@media (prefers-color-scheme: dark) { .cmp-card.us .cmp-checks li.no { color: #5e6470; } .cmp-card.us .cmp-checks li.no::before { background-color: #ece7dc; } }
.cmp-sources { font-size: .74rem; color: var(--ink-2); margin: 18px auto 0; max-width: 60em; text-align: center; line-height: 1.55; }
.cmp-sources a { color: var(--ink-2); }

/* Limits */
.limits-wrap { display: grid; gap: 22px; align-items: center; }
@media (min-width: 620px) { .limits-wrap { grid-template-columns: 220px minmax(0, 1fr); } }
.label.q { width: 220px; aspect-ratio: 2.25 / 1.25; padding: 12px 14px; display: grid; align-content: start; gap: 2px; transform: rotate(-2deg); justify-self: center; }
.label.q .l-t { font-family: var(--mono); font-size: 1rem; }
.l-qnote { font-size: .7rem; color: #b02a1a; margin-top: 18px !important; border-top: 1px dashed #e0d9ca; padding-top: 6px; }
.limits { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.limits li { position: relative; padding: 10px 14px 10px 40px; border: 1px dashed var(--cut); border-radius: 12px; background: var(--surface); font-size: .94rem; }
.limits li::before { content: ""; position: absolute; left: 14px; top: 15px; width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid var(--ink-2); }

/* Tool card */
.tool-card { display: grid; gap: 16px; align-items: center; text-decoration: none; color: var(--ink); padding: 30px; border-radius: 22px;
  background: radial-gradient(500px 200px at 90% 0%, color-mix(in srgb, var(--red) 14%, transparent), transparent 70%), var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); transition: transform .25s var(--ease); }
.tool-card:hover { transform: translateY(-2px); }
@media (min-width: 760px) { .tool-card { grid-template-columns: minmax(0, 1fr) auto; padding: 36px 40px; } }
.tc-copy { display: grid; gap: 6px; }
.tc-copy .eyebrow { margin: 0; }
.tc-h { font-family: var(--disp); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.1; }
.tc-p { color: var(--ink-2); }
.tc-go { font-weight: 700; color: var(--bg); background: var(--ink); padding: 12px 18px; border-radius: 11px; justify-self: start; white-space: nowrap; }

/* Guides list ({{guides}}, {{list}}, {{related}}) */
.guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 760px) { .guide-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.guide-list li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px 20px 22px; display: grid; gap: 6px; transition: box-shadow .25s, transform .25s var(--ease); }
.guide-list li:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.guide-list li::after { content: ""; position: absolute; right: 20px; top: 22px; width: 22px; height: 12px; opacity: .55;
  background: linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 12px, var(--ink) 12px 13px, transparent 13px 15px, var(--ink) 15px 17px, transparent 17px 19px, var(--ink) 19px); }
.guide-list a { font-family: var(--disp); font-weight: 700; font-size: 1.2rem; line-height: 1.2; color: var(--ink); text-decoration: none; padding-right: 34px; }
.guide-list a::before { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.guide-list span { font-size: .9rem; color: var(--ink-2); }

/* FAQ */
.faq-item { max-width: 780px; margin: 0 auto; border-bottom: 1px dashed var(--cut); }
.faq-item summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 650; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 400 1.5rem/1 var(--mono); color: var(--red-ink); transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-a { padding: 0 0 18px; color: var(--ink-2); }
.faq-a p { margin: 0 0 10px; }

/* Final + footer */
.final { padding-top: 120px; }
.final-in { text-align: center; padding: 64px 24px; border-radius: 24px; background: #15171c; color: #eceae4; position: relative; overflow: hidden; }
.final-in::before { content: ""; position: absolute; inset: 0; opacity: .08; pointer-events: none;
  background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 5px, #fff 5px 6px, transparent 6px 10px, #fff 10px 13px, transparent 13px 15px);
  -webkit-mask: linear-gradient(transparent 55%, #000); mask: linear-gradient(transparent 55%, #000); }
.final h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0 0 26px; position: relative; }
.final .cta { position: relative; }
.final .cta-btn { background: #ff6a55; color: #1b0703; }
.final .cta-note { color: #a9adb6; }
.foot { margin-top: 80px; border-top: 1px solid var(--line); padding: 26px 0 40px; font-size: .86rem; color: var(--ink-2); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.foot a { color: var(--ink-2); }

/* Articles and guides index */
.article, .guides-page, .tool-page { max-width: 760px; margin: 0 auto; padding: 48px 28px 0; }
.crumbs { font-size: .84rem; color: var(--ink-2); margin: 0 0 18px; }
.crumbs a { color: var(--ink-2); }
.article h1, .guides-page h1, .tool-page h1 { font-size: clamp(2.1rem, 4.6vw, 3rem); margin: 0 0 14px; text-wrap: balance; }
.meta { font-size: .86rem; color: var(--ink-2); margin: 0 0 30px; padding-bottom: 20px; border-bottom: 1px dashed var(--cut); }
.article h2 { font-size: 1.7rem; margin: 44px 0 10px; }
.article h3 { font-size: 1.25rem; margin: 30px 0 8px; }
.article p, .article li { color: var(--ink); }
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin: 4px 0; }
.article blockquote { margin: 20px 0; padding: 12px 18px; border-left: 3px solid var(--red); background: var(--surface); border-radius: 0 10px 10px 0; color: var(--ink-2); }
.article .table { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.article table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.article th, .article td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article th { font-size: .8rem; color: var(--ink-2); }
.article pre { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; }
.article-end { max-width: 760px; margin: 0 auto; padding: 40px 28px 0; display: grid; gap: 40px; }
.app-card { background: #15171c; color: #eceae4; border-radius: 20px; padding: 28px; }
.app-card h2 { margin: 0 0 8px; font-size: 1.5rem; }
.app-card p { color: #c3c6cc; margin: 0 0 18px; }
.app-card .cta-btn { background: #ff6a55; color: #1b0703; }
.app-card .cta-note { color: #a9adb6; }
.related h2 { font-size: 1.4rem; margin: 0 0 14px; }
.related .guide-list { grid-template-columns: minmax(0, 1fr); }
.guides-page .lead { margin-bottom: 30px; }
.guides-page .guide-list { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .band, .final { padding-top: 84px; }
  .hero { padding-top: 32px; gap: 34px; }
  .article, .guides-page, .tool-page, .article-end { padding-left: 16px; padding-right: 16px; }
  .loupe { margin-left: 8px; }
  .as-head, .assign li { padding: 11px 14px; gap: 8px; grid-template-columns: minmax(0, 1fr) auto 56px; }
  .assign li { font-size: .84rem; }
  .assign li code { font-size: .78rem; }
  .tool-card { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
