/* ==========================================================================
   DigitalSkylight — site.css
   One hand-written stylesheet. Order: tokens, fonts, reset/base, layout,
   typography, components, page-specific, utilities, responsive.
   Design system: .ai/design-system.md. Do not add a framework or reset lib.
   ========================================================================== */

/* ── 1. Tokens ────────────────────────────────────────────────────────── */
:root {
  --paper:          #F4F2ED;
  --paper-2:        #EAE7DF;
  --white:          #FFFFFF;
  --ink:            #1A1A17;
  --ink-hover:      #33322C;
  --ink-active:     #0F0F0D;
  --ink-2:          #5C5A52;
  --ink-3:          #6B6960;
  --rule:           #D9D5CB;
  --border-strong:  #878378;
  --accent:         #A63C18;
  --accent-light:   #E2825C;
  --crimson:        #8A1C1C;
  --pine:           #1F5D3C;
  --bronze:         #7A5310;
  --tint-error:     #F7E9E7;
  --tint-ok:        #E7F0E9;
  --tint-warn:      #F6EFE0;
  --on-ink:         #F4F2ED;
  --on-ink-2:       #A9A59A;

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", "DejaVu Sans Mono", monospace;

  --fs-display:      clamp(2rem, 1.35rem + 3.1vw, 3.25rem);
  --fs-page-title:   clamp(1.75rem, 1.35rem + 1.9vw, 2.5rem);
  --fs-section:      clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --fs-subsection:   1.125rem;
  --fs-product:      1.0625rem;
  --fs-body:         1rem;
  --fs-prose:        clamp(1rem, 0.97rem + 0.14vw, 1.0625rem);
  --fs-small:        0.875rem;
  --fs-caption:      0.8125rem;
  --fs-label:        0.875rem;
  --fs-nav:          0.9375rem;
  --fs-button:       0.9375rem;
  --fs-eyebrow:      0.75rem;
  --fs-spec:         0.875rem;
  --fs-ordinal:      0.8125rem;
  --fs-badge:        0.75rem;
  --fs-price-lg:     1.5rem;
  --fs-price-sm:     1rem;

  --lh-tight:  1.06;
  --lh-title:  1.12;
  --lh-head:   1.2;
  --lh-body:   1.6;
  --lh-prose:  1.72;
  --lh-flat:   1;

  --ls-display:  -0.022em;
  --ls-title:    -0.018em;
  --ls-section:  -0.012em;
  --ls-tight:    -0.005em;
  --ls-eyebrow:   0.09em;
  --ls-badge:     0.06em;
  --ls-ordinal:   0.04em;

  --w-normal: 400;
  --w-bold:   600;

  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;  --sp-5: 24px;
  --sp-6: 32px;  --sp-7: 44px;  --sp-8: 64px;  --sp-9: 88px;  --sp-10: 120px;
  --section-pad: var(--sp-8);
  --flow: var(--sp-4);

  --wrap:        1240px;
  --wrap-narrow:  880px;
  --rail-prose:   42rem;
  --gutter:      clamp(20px, 4vw, 40px);
  --grid-cols:   4;
  --grid-gap-x:  20px;
  --grid-gap-y:  40px;
  --header-h:    60px;

  --radius:        2px;
  --shadow:        none;
  --hairline:      1px solid var(--rule);
  --border:        1px solid var(--border-strong);
  --reveal:        2px solid var(--ink);
  --rule-close:    2px solid var(--ink);

  --btn-h:         48px;
  --btn-h-sm:      44px;
  --field-h:       48px;
  --tap-min:       44px;
  --checkbox:      22px;
  --focus-w:       2px;
  --focus-off:     2px;
  --focus-color:   var(--ink);

  --dur-1: 120ms;
  --dur-2: 180ms;
  --ease:  cubic-bezier(.2, 0, 0, 1);
}

@media (min-width: 768px) {
  :root {
    --section-pad: var(--sp-9);
    --grid-cols: 8;  --grid-gap-x: 24px; --grid-gap-y: 48px;
    --header-h: 68px;
  }
}
@media (min-width: 1024px) {
  :root {
    --section-pad: var(--sp-10);
    --grid-cols: 12; --grid-gap-y: 56px;
  }
}
@media (max-width: 767px) {
  :root { --ls-eyebrow: 0.07em; --fs-price-lg: 1.375rem; }
}

.on-ink {
  --focus-color: var(--paper);
  color: var(--on-ink);
  background: var(--ink);
}

/* ── 2. Fonts ─────────────────────────────────────────────────────────── */
/* Self-hosted IBM Plex Sans, SIL OFL 1.1 (see /assets/fonts/OFL.txt).
   Google's own per-script subsetting keeps "latin" (~40/19 KB) and
   "latin-ext" (~26/12 KB, needed for Janáčkova / Moravská / ČOI) as separate
   files rather than one merged ~30-40 KB file per weight as originally
   estimated; unicode-range means a page without Czech text only loads the
   latin file. No CDN is used at runtime — these were fetched once at build
   time and are served from this origin. */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-400-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-600-latin-ext.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── 3. Reset / base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
body { margin: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
address { font-style: normal; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important; animation-iteration-count: 1 !important;
    transition-duration: 1ms !important; scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: var(--focus-w) solid var(--focus-color);
  outline-offset: var(--focus-off);
  border-radius: var(--radius);
}
:focus:not(:focus-visible) { outline: none; }

/* ── 4. Layout ────────────────────────────────────────────────────────── */
.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}
.wrap-narrow {
  width: min(100% - 2 * var(--gutter), var(--wrap-narrow));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--paper);
  color: var(--ink);
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  transition: top var(--dur-1) var(--ease);
}
.skip-link:focus { top: 16px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

main { display: block; }
:target { scroll-margin-block: 84px; }
a, button, summary, input, select { scroll-margin-block: 84px; }

/* ── 5. Typography ────────────────────────────────────────────────────── */
h1 { font-size: var(--fs-page-title); line-height: var(--lh-title); font-weight: var(--w-bold); letter-spacing: var(--ls-title); text-align: left; }
h2 { font-size: var(--fs-section); line-height: var(--lh-head); font-weight: var(--w-bold); letter-spacing: var(--ls-section); text-align: left; --flow: 40px; }
h3 { font-size: var(--fs-subsection); line-height: 1.3; font-weight: var(--w-bold); letter-spacing: var(--ls-tight); text-align: left; --flow: 28px; }
strong { font-weight: var(--w-bold); }
em { font-style: italic; }

.mono-eyebrow, .section-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--ink-2);
  --flow: 12px;
}
.section-ordinal {
  color: var(--ink-3);
  letter-spacing: var(--ls-ordinal);
}
.mono-spec { font-family: var(--font-mono); font-size: var(--fs-spec); }

a { text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.16em; text-decoration-skip-ink: auto; transition: color var(--dur-1) var(--ease); }
a:hover, a:focus-visible { color: var(--accent); text-decoration-thickness: 0.12em; }
a:visited { color: inherit; }

.page-dek { color: var(--ink-2); max-width: 52ch; --flow: 16px; }
.section-dek { color: var(--ink-2); --flow: 8px; }

/* ── 6. Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--btn-h);
  padding: 0 22px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: var(--fs-button);
  font-weight: var(--w-bold);
  letter-spacing: 0.01em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--ink-hover); color: var(--paper); }
.btn--primary:active { background: var(--ink-active); }
.btn--secondary { background: transparent; color: var(--ink); border: 1px solid var(--ink); height: calc(var(--btn-h) - 2px); }
.btn--secondary:hover { background: var(--paper-2); color: var(--ink); }
.btn--tertiary { background: none; border: none; padding: 0; height: auto; min-height: var(--tap-min); display: inline-flex; align-items: center; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-weight: var(--w-bold); }
.btn--tertiary:hover { color: var(--accent); }
.btn--full { width: 100%; }
@media (max-width: 479px) {
  .btn--primary, .btn--secondary { height: var(--btn-h-sm); padding: 0 20px; }
}

/* ── 7. Header ────────────────────────────────────────────────────────── */
.utility-strip { background: var(--ink); color: var(--on-ink); }
.utility-strip__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  gap: var(--sp-4);
}
.utility-strip__line {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.utility-strip__email {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  color: var(--on-ink);
  display: none;
}
@media (min-width: 768px) {
  .utility-strip__email { display: inline; }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  height: var(--header-h);
}
.wordmark { display: flex; flex-direction: column; gap: 6px; }
.wordmark__bar { display: block; width: 16px; height: 2px; background: var(--ink); }
.wordmark__text { font-weight: var(--w-bold); font-size: 1.125rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }

.site-nav { display: none; margin-inline-start: var(--sp-6); }
.site-nav__list { display: flex; gap: var(--sp-5); }
.site-nav__link {
  font-size: var(--fs-nav);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding-block: 4px;
  border-bottom: 2px solid transparent;
}
.site-nav__link:hover { border-bottom-color: var(--ink); color: var(--ink); }
.site-nav__link.is-active { font-weight: var(--w-bold); border-bottom-color: var(--accent); color: var(--ink); }

.cart-link {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  padding-inline-start: var(--sp-4);
  border-left: 1px solid var(--rule);
  font-family: var(--font-sans);
  font-size: var(--fs-nav);
  text-decoration: none;
  color: var(--ink);
}
.cart-link:hover { color: var(--accent); }

.mobile-menu { margin-inline-start: var(--sp-3); }
.mobile-menu__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  cursor: pointer;
  list-style: none;
}
.mobile-menu__toggle::-webkit-details-marker { display: none; }
.mobile-menu__glyph {
  display: block;
  width: 20px;
  height: 14px;
  position: relative;
}
.mobile-menu__glyph::before, .mobile-menu__glyph::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.mobile-menu__glyph::before { top: 0; }
.mobile-menu__glyph::after { bottom: 0; }
.mobile-menu[open] .mobile-menu__glyph::before { transform: translateY(6px) rotate(45deg); }
.mobile-menu[open] .mobile-menu__glyph::after { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu__label { font-size: var(--fs-small); }
.mobile-menu__panel {
  position: absolute;
  inset-inline: 0;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  padding: var(--sp-5) var(--gutter) var(--sp-6);
}
.mobile-menu__list li a {
  display: flex;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  font-size: 1rem;
}
.mobile-menu__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: var(--sp-5);
  margin-bottom: var(--sp-2);
}

@media (min-width: 1024px) {
  .site-nav { display: block; }
  .mobile-menu { display: none; }
}

/* ── 8. Footer ────────────────────────────────────────────────────────── */
.site-footer { background: var(--paper); border-top: 2px solid var(--ink); padding-block: var(--sp-8); }
.site-footer__grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); }
.footer-col__heading {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: var(--sp-3);
}
.footer-link-list li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.footer-link-list--legal { margin-top: var(--sp-3); border-top: 1px solid var(--rule); }
.footer-col--colophon address { font-size: 1rem; color: var(--ink); margin-block: var(--sp-3) var(--sp-3); line-height: 1.6; }
.footer-contact-lines a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }
.footer-delivery-note { color: var(--ink-2); font-size: var(--fs-small); margin-top: var(--sp-3); max-width: 40ch; }

.site-footer__bottom { padding-block: 0; }
.site-footer__bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  flex-wrap: wrap;
  gap: 8px;
}
.site-footer__bottom-inner p { margin: 0; color: var(--on-ink); }
.site-footer__identity a { color: var(--on-ink); }
.site-footer__identity a:hover { color: var(--accent-light); }

@media (min-width: 768px) {
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-col--colophon { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .site-footer__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap-x); }
  .footer-col--colophon { grid-column: 1 / 6; }
  .footer-col--store { grid-column: 7 / 10; }
  .footer-col--help { grid-column: 10 / 13; }
}

/* ── 9. Plate ─────────────────────────────────────────────────────────── */
.plate { --flow: 20px; }
.plate__frame {
  border-top: 2px solid var(--ink);
  border-inline: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color var(--dur-1) var(--ease);
}
a:hover .plate__frame, a:focus-visible .plate__frame { border-color: var(--ink); }
.plate__field {
  aspect-ratio: 4 / 3;
  background: var(--white);
  overflow: hidden;
}
.plate__field img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.plate-svg { width: 100%; height: 100%; }
.plate__meta {
  height: 32px;
  display: flex;
  align-items: center;
  padding-inline: 12px;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--ink-2);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.plate__caption { margin-top: var(--sp-2); font-size: var(--fs-caption); color: var(--ink-3); }

.plate-thumb__field { aspect-ratio: 4 / 3; background: var(--white); border-top: 1px solid var(--ink); border-inline: 1px solid var(--rule); border-bottom: 1px solid var(--rule); overflow: hidden; }
.plate-thumb__field .plate-svg { width: 100%; height: 100%; }

/* ── 10. Badges ───────────────────────────────────────────────────────── */
.badge-list { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 4px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--fs-badge);
  letter-spacing: var(--ls-badge);
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
}
a.badge:hover { color: var(--accent); border-color: var(--border-strong); }
.badge--free { color: var(--accent); border-color: var(--accent); }
.badge--licence { color: var(--ink-2); }

/* ── 11. Price ────────────────────────────────────────────────────────── */
.price-block { --flow: 4px; }
.price { font-family: var(--font-mono); color: var(--ink); font-weight: 500; }
.price--lg { font-size: var(--fs-price-lg); line-height: 1.1; }
.price--sm { font-size: var(--fs-price-sm); line-height: 1.1; }
.price--free { color: var(--accent); }
.price-caption { font-size: var(--fs-caption); color: var(--ink-3); margin-top: 2px; }

/* ── 12. Product card ─────────────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap-x) var(--grid-gap-x);
  row-gap: var(--grid-gap-y);
  --flow: 32px;
}
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.product-card { display: flex; flex-direction: column; min-width: 0; }
.product-card__link { text-decoration: none; color: inherit; display: block; }
.product-card__title { font-size: var(--fs-product); font-weight: var(--w-bold); line-height: 1.35; letter-spacing: -0.005em; color: var(--ink); margin-top: 20px; }
.product-card__descriptor {
  font-size: var(--fs-small);
  color: var(--ink-2);
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card__bundle-line { font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--ink-3); margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card__meta-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: 16px; }

/* ── 13. Index row ────────────────────────────────────────────────────── */
.index-row-group { border-top: 1px solid var(--rule); }
.index-row-group li:last-child { border-bottom: 2px solid var(--ink); }
.index-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: baseline;
  gap: var(--sp-3);
  padding-block: 16px;
  border-bottom: 1px solid var(--rule);
}
.index-row__ordinal { font-family: var(--font-mono); font-size: var(--fs-ordinal); font-weight: 500; letter-spacing: var(--ls-ordinal); color: var(--ink-3); }
.index-row__body { display: flex; flex-direction: column; gap: 4px; }
.index-row__title { font-size: var(--fs-subsection); font-weight: var(--w-bold); color: var(--ink); text-decoration: none; }
.index-row:has(a) .index-row__title { text-decoration: underline; text-decoration-color: transparent; }
.index-row:hover .index-row__title, .index-row:focus-within .index-row__title { text-decoration-color: currentColor; }
.index-row:hover .index-row__ordinal, .index-row:focus-within .index-row__ordinal { color: var(--accent); }
.index-row__description { font-size: var(--fs-small); color: var(--ink-2); max-width: 78ch; }
.index-row__meta { font-family: var(--font-mono); font-size: var(--fs-spec); color: var(--ink-3); white-space: nowrap; }

@media (min-width: 768px) {
  .index-row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: var(--sp-5); padding-block: 24px; }
}

/* Place each part in its own column explicitly. Without this, a row that has no
   ordinal and no meta puts its only child in column 1 — the 32/48px ordinal
   column — and the title wraps one word per line. Category rows happened to look
   right only because they supply all three parts. */
.index-row__ordinal { grid-column: 1; }
.index-row__body { grid-column: 2; min-width: 0; }
.index-row__meta { grid-column: 3; }

/* Rows without an ordinal drop the ordinal column rather than keeping it as an
   orphan indent, so a titles-only list still aligns with the section heading. */
.index-row:not(:has(.index-row__ordinal)) { grid-template-columns: minmax(0, 1fr) auto; }
.index-row:not(:has(.index-row__ordinal)) .index-row__body { grid-column: 1; }
.index-row:not(:has(.index-row__ordinal)) .index-row__meta { grid-column: 2; }

/* ── 14. Manifest list ────────────────────────────────────────────────── */
.manifest-list { border-top: 1px solid var(--rule); }
.manifest-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px 16px;
  padding-block: 14px;
  border-bottom: 1px solid var(--rule);
}
.manifest-row__ordinal { font-family: var(--font-mono); font-size: var(--fs-ordinal); color: var(--ink-3); }
.manifest-row__file { display: flex; flex-direction: column; gap: 2px; }
.manifest-row__filename { font-family: var(--font-mono); font-size: var(--fs-spec); color: var(--ink); overflow-wrap: anywhere; }
.manifest-row__format { font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--ink-3); }
.manifest-row__description { grid-column: 2; font-size: var(--fs-small); color: var(--ink-2); }
.manifest-row__size { grid-column: 2; font-family: var(--font-mono); font-size: var(--fs-spec); color: var(--ink-2); text-align: left; }
.manifest-total { border-top: 2px solid var(--ink); padding-top: 12px; margin-top: 4px; font-weight: var(--w-bold); }

@media (min-width: 768px) {
  .manifest-row { grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1.2fr) auto; align-items: baseline; }
  .manifest-row__description { grid-column: auto; }
  .manifest-row__size { grid-column: auto; text-align: right; }
}

/* ── 15. Spec table ───────────────────────────────────────────────────── */
.spec-table { border-top: 1px solid var(--rule); }
.spec-table__row { display: grid; grid-template-columns: 1fr; gap: 4px; padding-block: 14px; border-bottom: 1px solid var(--rule); }
.spec-table__row dt { font-family: var(--font-mono); font-size: var(--fs-eyebrow); letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--ink-2); }
.spec-table__row dd { font-size: var(--fs-body); color: var(--ink); margin: 0; }
.spec-table__row dd ul { padding-left: 18px; list-style: disc; }
.spec-table__row dd li { margin-block: 2px; }
@media (min-width: 768px) {
  .spec-table__row { grid-template-columns: 200px minmax(0, 1fr); gap: 20px; }
}

/* ── 16. Suited / not suited ──────────────────────────────────────────── */
.suited-block { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); }
.suited-block__col ul { list-style: none; padding-left: 16px; margin-top: 8px; }
.suited-block__col--for ul { border-left: 2px solid var(--ink); }
.suited-block__col--not ul { border-left: 2px solid var(--border-strong); }
.suited-block__col--not li { color: var(--ink-2); }
.suited-block__col li { padding: 4px 0 4px 16px; }
@media (min-width: 768px) { .suited-block { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── 17. Filter bar ───────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  align-items: flex-start;
  padding-block: var(--sp-4);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  --flow: 24px;
}
.filter-bar__label { font-family: var(--font-mono); font-size: var(--fs-eyebrow); letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; display: block; }
.filter-bar__checkboxes { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap-min); font-size: var(--fs-small); }
.filter-bar__group--sort select { height: var(--field-h); border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--white); padding: 0 36px 0 12px; }
.filter-bar__actions { display: flex; align-items: center; gap: var(--sp-4); margin-left: auto; }
.filter-result-count { font-family: var(--font-mono); font-size: var(--fs-eyebrow); letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--ink-2); margin-top: var(--sp-4); }
.section-close-rule { border-top: 2px solid var(--ink); margin-top: var(--sp-4); padding-top: 12px; font-family: var(--font-mono); font-size: var(--fs-eyebrow); letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--ink-2); }

/* ── 18. Empty / utility panels ───────────────────────────────────────── */
.empty-panel { border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--sp-6) var(--sp-5); text-align: center; --flow: 12px; }
.empty-panel__heading { font-weight: var(--w-bold); font-size: var(--fs-subsection); }
.utility-panel { max-width: 640px; margin-inline: auto; text-align: center; padding-block: var(--sp-8); --flow: 20px; }
.utility-panel__links { margin-top: var(--sp-5); }
.utility-panel .index-row-group { text-align: left; margin-top: var(--sp-5); }

/* ── 19. Callouts ─────────────────────────────────────────────────────── */
.callout { border-left: 3px solid var(--border-strong); background: var(--paper-2); padding: 16px 20px; border-radius: var(--radius); --flow: 8px; }
.callout--info { border-left-color: var(--border-strong); background: var(--paper-2); }
.callout--warning { border-left-color: var(--bronze); background: var(--tint-warn); }
.callout--error { border-left-color: var(--crimson); background: var(--tint-error); }
.callout--confirmed { border-left-color: var(--pine); background: var(--tint-ok); }
.callout__label { font-family: var(--font-mono); font-size: var(--fs-eyebrow); letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--ink-2); }

/* ── 20. FAQ disclosure ───────────────────────────────────────────────── */
.faq-item { border-top: 1px solid var(--rule); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding-block: 18px;
  font-weight: var(--w-bold);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 12px; height: 12px;
  margin-left: 12px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat;
}
.faq-item[open] summary::after { background: linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat; }
.faq-item p { color: var(--ink-2); padding-bottom: 18px; max-width: var(--rail-prose); }

/* ── 21. Breadcrumb ───────────────────────────────────────────────────── */
.breadcrumb { --flow: 24px; margin-bottom: var(--sp-5); }
.breadcrumb ol { display: flex; flex-wrap: wrap; }
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb a, .breadcrumb span { font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--ink-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb__sep { margin-inline: 8px; color: var(--ink-3); }
.breadcrumb [aria-current="page"] { color: var(--ink-2); }

/* ── 22. Sections / page shell ────────────────────────────────────────── */
/* Vertical space belongs to the container and is never doubled: a section owns
   its LEADING space only (design-system §4.2; §4.1's value was stated without
   saying it collapses, which produced 240px between adjacent sections).
   The hairline lives on the inner .wrap, so the cadence reads
   last line → 120px → rule → 24px → eyebrow → h2. */
.section { padding-block: var(--section-pad) 0; }
.section > .wrap {
  border-block-start: 1px solid var(--rule);
  padding-block-start: var(--sp-5);
}

/* A band carries its own ground, which is already structure: it keeps padding on
   both sides, drops the rule, and lets the next section start closer. */
.section.band-paper2 { padding-block: var(--section-pad); }
.section.band-paper2 > .wrap { border-block-start: 0; padding-block-start: 0; }
.section.band-paper2 + .section { padding-block-start: var(--sp-9); }

/* First section sits closer to the header; the last one has to close the page,
   since sections no longer carry trailing space. */
main > .section:first-child { padding-block-start: clamp(32px, 5vw, 64px); }
main > .section:last-child { padding-block-end: var(--section-pad); }
.section > .wrap > * + *, .product-page > * + * { margin-top: var(--flow, 16px); }
.masthead { padding-block: var(--sp-9); }
@media (min-width: 1024px) { .masthead { padding-block: var(--sp-10); } }

.masthead__grid { display: flex; flex-direction: column; gap: var(--sp-6); }
.masthead__content { --flow: 16px; }
.masthead__content > * + * { margin-top: var(--flow, 16px); }
.masthead__statement { font-size: var(--fs-display); line-height: var(--lh-tight); font-weight: var(--w-bold); letter-spacing: var(--ls-display); max-width: 22ch; text-wrap: balance; }
.masthead__sub { color: var(--ink-2); max-width: 56ch; font-size: var(--fs-prose); line-height: var(--lh-prose); text-wrap: pretty; }

/* A second register, not a second size — the delivery statement is set as a
   ruled mono spec line below the actions, so it reads as chosen rather than as
   a smaller afterthought trailing the sub-line. */
.masthead__trust {
  font-family: var(--font-mono);
  font-size: var(--fs-spec);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 46ch;
  margin-top: var(--sp-6);
  padding-block-start: var(--sp-4);
  border-block-start: 1px solid var(--rule);
  text-wrap: pretty;
}
.masthead__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-5); margin-top: var(--sp-5); }
.masthead__figure { order: 3; }

@media (min-width: 1024px) {
  .masthead__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap-x); align-items: start; }
  .masthead__content { grid-column: 1 / 8; }
  .masthead__figure { grid-column: 8 / 13; order: 0; }
}

.standard-list { padding-left: 0; counter-reset: none; --flow: 16px; }
.standard-list li { list-style: none; padding-left: 32px; position: relative; }
.standard-list { counter-reset: item; }
.standard-list li { counter-increment: item; }
.standard-list li::before { content: counter(item) "."; position: absolute; left: 0; font-family: var(--font-mono); color: var(--ink-3); }
.standard-links { margin-top: var(--sp-4); }

.section-link { margin-top: var(--sp-5); }
.section-link a, .page-footnote a { text-decoration: underline; }
.page-footnote { color: var(--ink-2); margin-top: var(--sp-6); }

.band-paper2 { background: var(--paper-2); }
.free-band { display: flex; flex-direction: column; gap: var(--sp-6); }
.free-band__plate { max-width: 320px; position: relative; }
.free-band__plate .badge--free { position: absolute; top: 8px; left: 8px; background: var(--white); }
.free-band__content { --flow: 12px; }
.free-band__content form { margin-top: var(--sp-4); }
@media (min-width: 1024px) {
  .free-band { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap-x); align-items: center; }
  .free-band__plate { grid-column: 1 / 5; }
  .free-band__content { grid-column: 6 / 13; }
}

.category-link-row { margin-top: var(--sp-8); border-top: 1px solid var(--rule); padding-top: var(--sp-5); }
.category-link-row ul { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
.category-link-row a { text-decoration: underline; }
.category-ordinal { font-family: var(--font-mono); font-size: var(--fs-ordinal); color: var(--ink-3); letter-spacing: var(--ls-ordinal); }
.bundle-strip { margin-top: var(--sp-8); }
.bundle-comparison-line { font-family: var(--font-mono); font-size: var(--fs-spec); color: var(--ink-2); margin-top: var(--sp-3); }
.included-in-line { color: var(--ink-2); }

/* ── 23. Product page ─────────────────────────────────────────────────── */
.product-page { --flow: 0; }
.product-hero { --flow: 0; }
.product-hero__main { --flow: 16px; }
.product-hero__mobile-facts { display: flex; flex-direction: column; gap: var(--sp-4); margin-block: var(--sp-4); }
.product-dek { color: var(--ink-2); max-width: 60ch; }
.product-hero__main .plate { margin-top: var(--sp-5); }

.buy-rail { margin-top: var(--sp-6); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--sp-5); background: var(--paper); --flow: 12px; }
.buy-rail__badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.buy-rail__rule { border: none; border-top: 1px solid var(--rule); margin: var(--sp-3) 0; }
.buy-form + .buy-form { margin-top: var(--sp-3); }
.buy-rail__note { font-size: var(--fs-small); color: var(--ink-2); }
.buy-rail__link { font-size: var(--fs-small); }
.buy-rail__link a { text-decoration: underline; }

.product-section { padding-top: 44px; border-top: 1px solid var(--rule); margin-top: 44px; --flow: 16px; }
.product-second-buy { padding-top: 24px; }

.mobile-buy-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  height: 64px;
  background: var(--paper);
  border-top: 1px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-inline: var(--gutter);
}
.mobile-buy-bar__price { display: flex; flex-direction: column; overflow: hidden; }
.mobile-buy-bar__title { font-size: var(--fs-caption); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-buy-bar__amount { font-family: var(--font-mono); font-weight: 500; }
.mobile-buy-bar .btn { height: var(--btn-h-sm); }
body:has(.mobile-buy-bar) { padding-bottom: 72px; }

@media (min-width: 1024px) {
  .product-hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap-x); align-items: start; }
  .product-hero__main { grid-column: 1 / 8; }
  .buy-rail { grid-column: 8 / 13; position: sticky; top: calc(var(--header-h) + 24px); margin-top: 0; }
  .product-hero__mobile-facts { display: none; }
  .product-second-buy { display: none; }
  .mobile-buy-bar { display: none; }
  body:has(.mobile-buy-bar) { padding-bottom: 0; }
  .product-page > .product-section,
  .product-page > .product-second-buy { grid-column: 1 / 8; }
}
@media (min-width: 1024px) {
  .product-page { display: block; }
}

/* ── 24. Forms (shared shell for later passes) ────────────────────────── */
label { font-size: var(--fs-label); font-weight: var(--w-bold); display: block; margin-bottom: 8px; }
input[type="text"], input[type="email"], textarea, select {
  width: 100%;
  min-height: var(--field-h);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--white);
  padding: 12px 14px;
  font-size: var(--fs-body);
}
textarea { min-height: 160px; resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--ink); }

input[type="checkbox"] { width: var(--checkbox); height: var(--checkbox); accent-color: var(--ink); margin: 0; }

/* ── 25. Responsive: no horizontal overflow guard ─────────────────────── */
img, svg, table { max-width: 100%; }

/* ── 26. Cart, consent and checkout ───────────────────────────────────── */
/* design-system §5.6. The two consent controls are legally load-bearing:
   identical treatment, 1rem text never smaller than body, never pre-ticked,
   never de-emphasised, both focus cues always. Do not "tidy" this. */

.cart-lines { border-block-start: 1px solid var(--rule); }
.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--sp-4);
  align-items: start;
  padding-block: var(--sp-5);
  border-block-end: 1px solid var(--rule);
}
.cart-line__main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cart-line__title { font-size: var(--fs-product); font-weight: var(--w-bold); text-decoration-color: transparent; }
.cart-line:hover .cart-line__title,
.cart-line:focus-within .cart-line__title { text-decoration-color: currentColor; }
.cart-line__meta { font-family: var(--font-mono); font-size: var(--fs-spec); color: var(--ink-2); }
.cart-line__includes { font-size: var(--fs-small); color: var(--ink-2); }
.cart-line__side { display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-2); text-align: right; }

.cart-totals { border-block-end: var(--rule-close); }
.cart-totals__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-4); padding-block: var(--sp-4); }
.cart-totals__row--total { font-weight: var(--w-bold); }

.cart-delivery-note,
.cart-stripe-note { font-size: var(--fs-small); color: var(--ink-2); max-width: 64ch; }
.cart-policy-links { font-size: var(--fs-small); }
.cart-delivery-note, .cart-policy-links, .cart-stripe-note { margin-block-start: var(--sp-4); }

.checkout-form { display: flex; flex-direction: column; gap: var(--sp-4); margin-block-start: var(--sp-6); }
.error-summary { scroll-margin-block-start: var(--sp-6); }
.error-summary ul { display: flex; flex-direction: column; gap: 4px; padding-inline-start: 0; }

/* Both blocks are identical by construction — same ground, border, radius,
   padding and text size. Any change here must be made to both or to neither. */
.consent-block {
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 20px;
}
.consent-block + .consent-block { margin-block-start: var(--sp-4); }
.consent-block:focus-within { border-color: var(--ink); }
.consent-block--error { border-width: 2px; border-color: var(--crimson); padding: 19px; }

.checkbox-label {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  min-height: 44px;
  cursor: pointer;
  font-size: 1rem;          /* never smaller than body text */
  line-height: 1.6;
  color: var(--ink);
}
.checkbox-label > input[type="checkbox"] {
  inline-size: var(--checkbox);
  block-size: var(--checkbox);
  margin: 11px;             /* centres the 22px box in a 44px cell */
  accent-color: var(--ink);
  justify-self: center;
  align-self: start;
}
.checkbox-label > input[type="checkbox"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.checkbox-label > span { padding-block-start: 9px; }

/* Static explanatory text under block B — in the flow, at body size, never a
   tooltip, accordion or "read more". */
.consent-note { margin-block-start: var(--sp-3); font-size: 1rem; line-height: 1.6; color: var(--ink-2); }
.field-error { margin-block-start: var(--sp-2); padding-inline-start: 44px; color: var(--crimson); }
.field-help { font-size: var(--fs-small); color: var(--ink-2); }

.checkout-submit { margin-block-start: var(--sp-2); }
.checkout-stripe-footnote { font-size: var(--fs-small); color: var(--ink-2); }

@media (max-width: 479px) {
  .cart-line { grid-template-columns: minmax(0, 1fr); }
  .cart-line__side { align-items: flex-start; text-align: left; }
  .consent-block { padding: 16px; }
  .consent-block--error { padding: 15px; }
}

/* ── 27. Owner-review notice, prose tables, contact layout ────────────── */
/* Facts the owner must supply before launch (legal name, IČO, VAT status).
   Deliberately conspicuous: it must never be mistaken for finished copy, and
   tools/preflight.php fails while any remain unset. */
.callout--owner-review {
  border-left-color: var(--bronze);
  background: var(--tint-warn);
  border: 1px dashed var(--bronze);
  border-left: 3px solid var(--bronze);
}
.callout--owner-review .callout__label {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--bronze);
}

.prose table { margin-block: var(--sp-5); font-size: var(--fs-small); border-collapse: collapse; width: 100%; }
.prose th, .prose td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: var(--w-bold);
  border-bottom: 2px solid var(--ink);
}
.prose blockquote { margin-block: var(--sp-5); padding-inline-start: var(--sp-5); border-inline-start: 2px solid var(--rule); color: var(--ink-2); }
.prose code { font-family: var(--font-mono); font-size: 0.9em; background: var(--paper-2); padding: 1px 5px; border-radius: var(--radius); }
.prose pre { overflow-x: auto; background: var(--paper-2); padding: var(--sp-4); border-radius: var(--radius); }
.prose pre code { background: none; padding: 0; }
.prose ul, .prose ol { padding-left: 20px; margin-block: var(--sp-4); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-block: 6px; }
.prose-table-wrap { overflow-x: auto; }

/* Markdown-renderer inline mechanisms (src/content/pages.php) — CSP-safe
   classes replacing what were previously inline `style` attributes. The
   page CSP is `style-src 'self'` with no `unsafe-inline`, so any inline
   `style="…"` in server-rendered HTML is silently dropped by the browser;
   these must stay real classes. */
.owner-marker { color: var(--bronze); font-style: italic; }
.section-link--cta { --flow: 12px; }
.legal-version-line { color: var(--ink-3); }

.small { font-size: var(--fs-small); }
.contact-form > * + * { margin-top: 20px; }
.mono-eyebrow--plain { text-transform: none; letter-spacing: normal; }
.contact-field-help { color: var(--ink-2); margin-top: 6px; }
.contact-field-error { color: var(--crimson); font-size: var(--fs-small); margin-top: 4px; }
.contact-privacy-note { color: var(--ink-2); }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-7); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--sp-8); } }

/* ── 28. Prose flow ───────────────────────────────────────────────────── */
/* The prose block had rules for lists, tables and code but none for the flow
   between blocks, so paragraphs on /about, /licence, the legal pages and the
   guides ran together with no separation. design-system §4.2: space belongs to
   the container, and headings raise --flow on themselves (h2 40px, h3 28px,
   already set globally). */
.prose > * + * { margin-block-start: var(--flow, 16px); }
.prose p { line-height: var(--lh-prose); max-width: var(--rail-prose); }
.prose h2:first-child, .prose h3:first-child { margin-block-start: 0; }
.prose > ul + p, .prose > ol + p { --flow: var(--sp-5); }

/* The About plate is a 1:1 asset; at the narrow rail's full width that is an
   880px square dominating the page. Crop to 3:2 — the field already clips and
   the image is object-fit: cover, so the subject stays centred. */
.about-figure .plate__field { aspect-ratio: 3 / 2; }
