/* The Label Mart — design tokens
   Liner paper, carbon ink, and the three press colors you see on a printer's
   test sheet: cyan (links), magenta (registration and crop marks), yellow
   (the peel tab). The signature is the die-cut label: white rounded cards on
   a warm liner, framed by crop marks, with a yellow peel corner. */
:root {
  --ink: #1A2130;
  --ink-soft: #3B4456;
  --muted: #555E6E;
  --paper: #F4F1EA;      /* release liner */
  --paper-2: #EAE5DA;
  --label: #FFFFFF;
  --rule: #D8D1C2;
  --rule-strong: #A69E8C;
  --link: #0A5A80;       /* cyan, darkened for 4.5:1 on white and liner */
  --mag: #B3165A;        /* registration magenta */
  --yel: #F2C230;        /* peel tab */
  --yel-soft: #FBEFC4;
  --ok: #1F6B45;

  --display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --text: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --wrap: 1180px;
  --gap: clamp(16px, 3vw, 32px);
  --r: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--text); }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--mag); outline-offset: 2px; border-radius: 3px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 10; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 0.94em; }
.small { font-size: 0.92rem; color: var(--muted); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 700; margin: 0.2em 0 0.35em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); font-weight: 700; margin: 2em 0 0.6em; }
h3 { font-size: 1.15rem; }
.kicker { font: 600 0.8rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mag); margin: 0; }
.lede { font-size: clamp(1.08rem, 1.8vw, 1.22rem); color: var(--ink-soft); max-width: 62ch; }

/* Masthead */
.mast { background: var(--ink); color: #E9ECF2; }
.mast__row { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-height: 44px; }
.brand__mark { width: 40px; height: 40px; flex: none; }
.brand__name { font: 700 1.25rem/1 var(--display); display: flex; flex-direction: column; gap: 3px; }
.brand__name small { font: 400 0.68rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: #B8C0CE; }
.nav { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; font: 600 0.98rem/1 var(--display); flex-wrap: wrap; }
.nav a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; color: #DDE2EA; text-decoration: none; border-radius: 8px; }
.nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav a[aria-current="page"] { color: var(--ink); background: var(--yel); }
.nav__search svg { width: 18px; height: 18px; }
.indep { margin: 0; background: var(--yel); color: var(--ink); font: 400 0.84rem/1.4 var(--text); }
.indep .wrap { display: block; padding: 7px 0; }
.indep a { color: var(--ink); font-weight: 700; }

/* Layout pieces */
.page { padding-block: 22px 64px; }
.crumbs { font-size: 0.9rem; color: var(--muted); margin: 6px 0 14px; }
.crumbs a { color: var(--muted); display: inline-block; padding-block: 10px; }
.section { margin-top: 56px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--ink); margin-bottom: 18px; }
.section__head h2 { margin: 0 0 8px; }
.section__head a { font-weight: 700; padding-block: 10px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; margin-top: 8px; }
.prose { max-width: 72ch; min-width: 0; }
.prose p, .prose li { overflow-wrap: anywhere; }
.prose li { margin-bottom: 0.35em; }
.prose h2 { scroll-margin-top: 16px; }

/* Die-cut label card: the site's signature surface */
.answer, .aside__box, .spec, .result, .path, .toolcard, .series, .calc, .decoder, .list li {
  background: var(--label); border: 1px solid var(--rule); border-radius: var(--r);
}
.answer { position: relative; padding: 18px 22px 10px; margin: 0 0 22px; border-left: 6px solid var(--yel); }
.answer__label { font: 600 0.78rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mag); margin: 0 0 8px; }
.answer ul { margin: 0; padding-left: 1.1em; }
.note { font-size: 0.93rem; color: var(--muted); border-top: 1px dashed var(--rule-strong); padding-top: 12px; margin-top: 32px; }
.callout { background: var(--yel-soft); border-radius: 10px; padding: 12px 16px; }
.nv { display: inline-block; font: 400 0.82rem/1.3 var(--mono); color: var(--muted); border: 1px dashed var(--rule-strong); border-radius: 999px; padding: 1px 9px; background: var(--paper); }

/* Tables */
.tbl { overflow-x: auto; margin: 1em 0 1.4em; border: 1px solid var(--rule); border-radius: 10px; background: var(--label); }
.tbl:focus-visible { outline-offset: 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--paper-2); vertical-align: top; }
thead th { font: 700 0.88rem/1.25 var(--display); color: var(--ink-soft); background: var(--paper); border-bottom: 1px solid var(--rule); }
tbody tr:last-child > * { border-bottom: 0; }

/* Article */
.article { padding-block: 22px 64px; }
.article__head { max-width: 860px; }
.trust { list-style: none; padding: 0; margin: 14px 0 26px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.9rem; color: var(--muted); }
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc a { display: inline-block; padding-block: 4px; }
.toc--inline { display: none; background: var(--label); border: 1px solid var(--rule); border-radius: 10px; padding: 4px 16px; margin-bottom: 20px; }
.toc--inline summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; gap: 6px; }
.toc--inline summary span { color: var(--muted); font-weight: 400; }
.series { padding: 14px 18px; margin: 0 0 22px; }
.series__label { margin: 0 0 6px; font: 600 0.78rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.series ol { margin: 0; padding-left: 1.3em; }
.series a, .series span { display: inline-block; padding-block: 3px; }
.series [aria-current] { font-weight: 700; }
.faq details { background: var(--label); border: 1px solid var(--rule); border-radius: 10px; margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 12px 16px; min-height: 44px; font-weight: 700; list-style-position: outside; }
.faq details p { margin: 0; padding: 0 16px 14px; }
.sources { padding-left: 1.3em; font-size: 0.95rem; }
.sources li { margin-bottom: 6px; }
.sources span { display: block; color: var(--muted); font-size: 0.85rem; }
.aside { display: grid; gap: 16px; position: sticky; top: 16px; }
.aside__box { padding: 16px 18px; }
.aside__box h2 { font-size: 1rem; margin: 0 0 10px; text-transform: none; }
.aside__box--tool { background: var(--yel-soft); border-color: #E6CF7E; }
.aside__box--tool p { margin: 0 0 8px; font-size: 0.95rem; }
.aside__box--tool a { font-weight: 700; display: inline-block; padding-block: 6px; }
.chips { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.chips a { display: flex; align-items: baseline; gap: 10px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 8px; text-decoration: none; color: var(--ink); background: var(--paper); }
.chips a:hover { border-color: var(--link); }
.chips b { font-family: var(--mono); color: var(--link); }
.chips span { font-size: 0.86rem; color: var(--muted); }
.related { margin-top: 56px; }
.list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.list li { padding: 16px 18px; }
.list .t { font: 700 1.08rem/1.3 var(--display); text-decoration: none; color: var(--ink); }
.list .t:hover { color: var(--link); text-decoration: underline; }
.list p { margin: 6px 0 0; font-size: 0.95rem; color: var(--ink-soft); }
.list .d { display: block; margin-top: 8px; font: 400 0.8rem/1 var(--mono); color: var(--muted); }
.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 8px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.2em; width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 4px; background: var(--label); }

/* Buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 2px solid var(--ink); border-radius: 10px; background: var(--ink); color: #fff; font: 700 1rem/1 var(--display); cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.btn:hover { background: var(--ink-soft); }
.btn--ghost { background: var(--label); color: var(--ink); }
.btn--ghost:hover { background: var(--yel-soft); }
input[type="search"], input[type="text"], input[type="number"], input[type="date"] {
  font: 400 1.05rem/1.2 var(--text); color: var(--ink); background: var(--label); min-height: 48px; width: 100%;
  padding: 10px 14px; border: 2px solid var(--ink); border-radius: 10px;
}
input:focus-visible { outline: 3px solid var(--mag); outline-offset: 1px; }
label { font-weight: 700; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font: 600 0.82rem/1 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 8px; }
.pill { display: inline-flex; margin: 0 6px 8px 0; font-weight: 400; cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--label); font-size: 0.95rem; }
.pill input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill input:focus-visible + span { outline: 3px solid var(--mag); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-weight: 400; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--ink); }

/* Home */
.hero { background: var(--paper-2); background-image: radial-gradient(var(--rule) 1px, transparent 1.2px); background-size: 18px 18px; border-bottom: 1px solid var(--rule); }
.hero__row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: 48px; align-items: center; padding-block: 48px 56px; }
.hero h1 { max-width: 16ch; }
.hero__q { margin-top: 22px; max-width: 560px; }
.hero__q label { display: block; margin-bottom: 8px; }
.hero__qrow { display: flex; gap: 8px; }
.hero__qrow input { flex: 1; min-width: 0; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 20px; font-size: 0.92rem; color: var(--ink-soft); }
.hero__sheet svg { width: 100%; height: auto; filter: drop-shadow(0 10px 18px rgba(26,33,48,0.14)); transform: rotate(2.5deg); }
.hero__sheet .sheet__label { fill: var(--label); stroke: var(--rule-strong); stroke-width: 2.5; }
.hero__sheet .sheet__label.is-peel { fill: var(--yel); stroke: var(--ink); }
.hero__ink path { stroke: var(--ink); stroke-width: 9; stroke-linecap: round; }
.paths { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.path { padding: 18px; position: relative; }
.path__no { display: block; font: 600 0.8rem/1 var(--mono); color: var(--mag); margin-bottom: 8px; }
.path__t { display: block; font: 700 1.12rem/1.25 var(--display); margin-bottom: 8px; }
.path ol { margin: 0; padding-left: 1.2em; font-size: 0.97rem; }
.path li { padding-block: 8px; line-height: 1.45; }
.tcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tcard { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px; min-height: 64px; background: var(--label); border: 1px solid var(--rule); border-radius: 10px; text-decoration: none; color: var(--ink); transition: border-color 0.15s, transform 0.15s; }
.tcard:hover { border-color: var(--ink); transform: translateY(-1px); }
.tcard__glyph { grid-row: span 2; }
.tcard__glyph svg { width: 34px; height: 34px; display: block; }
.tcard__glyph rect, .tcard__glyph circle { fill: var(--yel-soft); stroke: var(--ink); stroke-width: 1.5; }
.tcard__code { font: 600 1.05rem/1.1 var(--mono); color: var(--link); }
.tcard__d { font-size: 0.82rem; color: var(--muted); line-height: 1.35; }
.tcard__d span { display: block; }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.toolcard { display: block; padding: 20px; text-decoration: none; color: var(--ink); border-top: 6px solid var(--mag); transition: border-color 0.15s; }
.toolcard:hover { border-color: var(--ink); }
.toolcard svg { width: 44px; height: 44px; color: var(--ink); display: block; margin-bottom: 10px; }
.toolcard__t { display: block; font: 700 1.2rem/1.2 var(--display); color: var(--link); margin-bottom: 6px; }
.toolcard__d { display: block; color: var(--ink-soft); font-size: 0.97rem; }

/* Template page */
.h1__sub { display: block; font: 600 0.5em/1.3 var(--mono); color: var(--ink-soft); margin-top: 6px; letter-spacing: 0; }
.tpl__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; margin: 18px 0 36px; }
.spec { position: relative; padding: 22px 22px 16px; box-shadow: 0 1px 0 var(--rule), 0 12px 24px -16px rgba(26,33,48,0.35); }
/* crop marks around the spec card */
.spec::before, .spec::after { content: ""; position: absolute; width: 18px; height: 18px; border: 0 solid var(--mag); pointer-events: none; }
.spec::before { top: -10px; left: -10px; border-top-width: 1.5px; border-left-width: 1.5px; }
.spec::after { bottom: -10px; right: -10px; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.spec__peel { position: absolute; right: -1px; top: -1px; width: 46px; height: 46px; background: linear-gradient(225deg, var(--paper) 0 50%, var(--yel) 50% 100%); border-radius: 0 var(--r) 0 10px; box-shadow: -2px 2px 3px rgba(26,33,48,0.12); }
.spec__title { margin: 0 0 14px; font-size: 1.05rem; display: flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.spec__code { font: 600 1.4rem/1 var(--mono); color: var(--ink); background: var(--yel); padding: 6px 10px; border-radius: 6px; letter-spacing: 0; }
.spec__dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--paper-2); }
.spec__dl > div { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--paper-2); min-width: 0; }
.spec__dl > div:nth-child(odd) { padding-right: 14px; }
.spec__wide { grid-column: 1 / -1; }
.spec__dl dt { font: 600 0.74rem/1.25 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 3px; }
.spec__dl dt small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.spec__dl dd { margin: 0; font-size: 0.98rem; overflow-wrap: anywhere; }
.spec__stamp { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: 0.88rem; color: var(--ok); }
.spec__stamp svg { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.sheetfig { margin: 0; background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--r); padding: 18px; }
.sheetfig figcaption { font-size: 0.92rem; color: var(--ink-soft); margin: 12px 0; }
.sheetfig figcaption .nv { margin: 4px 0; }
.sheet { display: block; width: 100%; max-width: 440px; height: auto; margin-inline: auto; }
.sheet__paper { fill: var(--label); stroke: var(--rule-strong); stroke-width: 2; }
.sheet__label { fill: var(--yel-soft); stroke: var(--ink); stroke-width: 2.5; }
.sheet__dim path { stroke: var(--ink-soft); stroke-width: 2; fill: none; }
.sheet__dim text { font: 600 28px var(--mono); fill: var(--ink-soft); }
.sheet__crop path { stroke: var(--mag); stroke-width: 2.5; fill: none; }
.single { overflow-x: auto; display: flex; justify-content: center; padding: 12px 0; }
.single__svg { display: block; max-width: none; height: auto; flex: none; }
.single .sheet__label { stroke-width: 1.5; }
.single .sheet__crop path { stroke-width: 1.5; }
.codes { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.codes li { font: 400 0.92rem/1 var(--mono); background: var(--label); border: 1px solid var(--rule); border-radius: 6px; padding: 7px 9px; }
.codes a { display: inline-block; margin: -10px -12px; padding: 10px 12px; font-weight: 600; }

/* Hub */
.xref { background: var(--label); border: 1px solid var(--rule); border-radius: var(--r); padding: 18px; margin: 20px 0 16px; display: grid; gap: 14px; position: relative; }
.xref__q label { display: block; margin-bottom: 8px; }
.xref__q input { font-size: 1.15rem; }
.xref__count { margin: 0; font: 400 0.9rem/1.2 var(--mono); color: var(--muted); }
.xref__empty { background: var(--yel-soft); padding: 12px 16px; border-radius: 10px; }
.xtable th[data-k] button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.xtable th[data-k] button::after { content: "↕"; color: var(--rule-strong); font-size: 0.9em; }
.xtable th[aria-sort="ascending"] button::after { content: "↑"; color: var(--ink); }
.xtable th[aria-sort="descending"] button::after { content: "↓"; color: var(--ink); }
.xtable th[data-k] button:focus-visible { outline: 3px solid var(--mag); outline-offset: 2px; }
.xtable tbody th { font: 700 1rem/1.25 var(--display); white-space: nowrap; }
.xtable tbody th a { display: inline-block; padding-block: 4px; }
.xtable td small { display: block; color: var(--muted); font-size: 0.82rem; }
.xtable .num { text-align: right; }
.xmatch { display: block; margin-top: 4px; font: 600 0.75rem/1.2 var(--mono); color: var(--ink); background: var(--yel); border-radius: 4px; padding: 3px 6px; width: max-content; }
.xcodes summary { cursor: pointer; color: var(--link); font-weight: 700; min-height: 32px; }
.xcodes p { margin: 6px 0 0; font-size: 0.85rem; max-width: 34ch; }
.azwrap summary { cursor: pointer; font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border: 2px solid var(--ink); border-radius: 10px; background: var(--label); margin-bottom: 12px; }
.azindex { list-style: none; padding: 0; margin: 0; columns: 4 160px; column-gap: 24px; font-size: 0.92rem; }
.azindex li { break-inside: avoid; padding: 4px 0; border-bottom: 1px dotted var(--rule); }
.azindex .mono { font-weight: 600; }
.azindex a { display: inline-block; padding-block: 6px; }

/* Tools */
.tool__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 24px; align-items: start; margin: 22px 0 32px; }
.calc { padding: 20px; display: grid; gap: 14px; }
.calc__fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.field label { display: block; margin-bottom: 6px; font-size: 0.95rem; }
.field[hidden] { display: none; }
.calc__hint { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.result { padding: 22px; border-top: 6px solid var(--yel); }
.result__label { margin: 0; font: 600 0.78rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mag); }
.result__big { margin: 6px 0 4px; font: 700 clamp(2.6rem, 6vw, 3.6rem)/1 var(--display); }
.result__big small { font-size: 0.38em; color: var(--ink-soft); font-weight: 600; }
.result__ruler { width: 100%; max-width: 280px; height: auto; display: block; margin: 10px 0; }
.result__ruler rect { fill: var(--paper-2); stroke: var(--rule-strong); }
.result__ruler rect.on { fill: var(--yel); stroke: var(--ink); stroke-width: 1.5; }
.result__ruler text { font: 400 11px var(--mono); fill: var(--muted); }
.result__ruler text.on { fill: var(--ink); font-weight: 600; }
.result__dl { margin: 12px 0 0; display: grid; gap: 0; }
.result__dl > div { padding: 8px 0; border-top: 1px solid var(--paper-2); }
.result__dl dt { font: 600 0.8rem/1.3 var(--mono); color: var(--muted); }
.result__dl dd { margin: 2px 0 0; }
.result__warn { margin: 12px 0 0; background: var(--yel-soft); border-radius: 8px; padding: 10px 12px; font-size: 0.93rem; }
.result__line { margin: 12px 0; font-size: 0.95rem; overflow-wrap: anywhere; }
.bbl { position: relative; background: var(--label); border: 2px solid var(--ink); border-radius: 10px; padding: 14px 18px; margin-top: 10px; max-width: 360px; }
.bbl::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; background: linear-gradient(315deg, var(--paper) 0 50%, var(--yel) 50%); border-radius: 0 0 8px 0; }
.bbl__words { margin: 0; font: 700 0.95rem/1.3 var(--display); }
.bbl__date { margin: 4px 0 0; font-size: 2rem; font-weight: 600; letter-spacing: 0.04em; }
.decoder { padding: 20px; margin-bottom: 24px; }
.decoder h2 { margin-top: 0; }
.calc--inline { border: 0; padding: 0; }
.decoder__out { margin: 0; font-size: 1.05rem; min-height: 1.6em; }
.tbl--narrow { max-width: 460px; }
.decoder .field { max-width: 420px; }
.mcodes td.mono b { font-size: 1.05rem; }

/* Footer */
.foot { background: var(--ink); color: #C9D0DC; margin-top: 72px; padding-block: 40px 28px; font-size: 0.95rem; }
.foot a { color: #fff; }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot__brand { font: 700 1.3rem/1 var(--display); color: #fff; margin: 0 0 10px; }
.foot__label { font: 600 0.78rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--yel); margin: 0 0 8px; }
.foot__links { list-style: none; margin: 0; padding: 0; }
.foot__links a { display: inline-block; padding-block: 8px; }
.foot__small { border-top: 1px solid rgba(255,255,255,0.14); margin-top: 28px; padding-top: 18px; font-size: 0.86rem; }
.foot__indep { color: #fff; border-left: 4px solid var(--yel); padding-left: 12px; }

/* Search */
.search label { display: block; margin-bottom: 8px; }
.search { max-width: 640px; margin-bottom: 12px; }
#results { margin-top: 14px; }

/* Responsive */
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; gap: 24px; }
  .aside { position: static; }
  .toc--rail { display: none; }
  .toc--inline { display: block; }
  .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tpl__grid, .tool__grid { grid-template-columns: 1fr; }
  .hero__row { grid-template-columns: 1fr; }
  .hero__sheet { display: none; }
}
@media (max-width: 720px) {
  .foot__grid { grid-template-columns: 1fr; gap: 20px; }
  .paths { grid-template-columns: 1fr; }
  .nav a { padding: 0 10px; }
  .mast__row { padding-block: 8px; }
  .hero__row { padding-block: 32px 40px; }
  .hero__qrow { flex-direction: column; }
  .spec__dl { grid-template-columns: 1fr; }
  .spec__dl > div:nth-child(odd) { padding-right: 0; }
  /* cross-reference table becomes cards */
  .tbl--xref { border: 0; background: none; overflow: visible; }
  .xtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .xtable, .xtable tbody { display: block; }
  .xtable tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; background: var(--label); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
  .xtable tr[hidden] { display: none; }
  .xtable tbody th { grid-column: 1 / -1; border: 0; padding: 0 0 6px; font-size: 1.1rem; }
  .xtable td { border: 0; padding: 5px 0; font-size: 0.92rem; }
  .xtable td::before { content: attr(data-l); display: block; font: 600 0.7rem/1.2 var(--mono); text-transform: uppercase; color: var(--muted); }
  .xtable td[data-l="Same template"] { grid-column: 1 / -1; }
  .xtable .num { text-align: left; }
  .sheetfig { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .tcard:hover { transform: none; }
  .hero__sheet svg { transform: none; }
}

/* Print: spec card prints cleanly; the drawing buttons print the figure alone at 100% */
@media print {
  .mast, .foot, .crumbs, .aside, .related, .btn, .xref, .hero__q, .toc, .series { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .layout, .tpl__grid { display: block; }
  .spec, .sheetfig { break-inside: avoid; box-shadow: none; }
  a { color: inherit; }
  .foot__indep { display: block; }
  html.print-sheet body > *:not(main), html.print-single body > *:not(main) { display: none !important; }
  html.print-sheet main *, html.print-single main * { visibility: hidden; }
  html.print-sheet .is-printing, html.print-sheet .is-printing *, html.print-single .is-printing, html.print-single .is-printing * { visibility: visible; }
  html.print-sheet .is-printing, html.print-single .is-printing { position: absolute; left: 0; top: 0; border: 0; padding: 0; margin: 0; background: none; }
  html.print-sheet .is-printing figcaption, html.print-single .is-printing figcaption { display: none; }
  html.print-sheet .is-printing .sheet { max-width: none; width: 8.5in; height: 11in; }
  html.print-single .single { overflow: visible; display: block; padding: 0.5in; }
}
@page { size: letter; margin: 0.5in; }
