/* Mossbench — INSTRUMENT.
   One sheet, both scripts. Logical properties only: no left/right, ever. */

:root {
  /* LEDGER, inverted 2026-10-21. The market is unanimously light — Bachem white +
     #004080, Sports Technology Labs white body, Peptide Sciences white — and near-black
     with gold is the register of watches and spirits, not lab supply. The site's own
     best content (certificate, archive, cards) was already paper; the dark was only the
     gaps between documents. So paper is the ground now, documents are white on it, and
     brass on ivory reads as a seal rather than as luxury packaging. Dark is kept as an
     inversion for the footer and the notice. */
  --void: #f3efe6;          /* the ground: warm paper */
  --pitch: #ffffff;
  --panel: #ffffff;         /* documents and cards sit above the ground */
  --raise: #fbf9f4;
  --line: #ddd6c6;
  --line-hot: #c3b9a2;
  --ink: #16161a;
  --dim: #55534c;
  --faint: #6f6c64;
  --chrome: #4a4842;

  --paper: #ffffff;
  --paper-2: #f7f4ec;
  --paper-ink: #16161a;
  --paper-dim: #55534c;
  --paper-line: #e3dccd;

  --brass-light: #d8b878;  /* the same seal colour, for the dark inversions */
  --brass: #7b5d2b;         /* 5.3:1 on the paper ground, as text and as a button fill */
  --brass-deep: #6d5326;
  --ice: #1f6f86;
  --good: #1f7a4d;
  --warn: #8a6410;
  --bad: #a33232;

  /* the inversion, used by the footer and the notice */
  --dark: #15151a;
  --dark-2: #1f1f25;
  --dark-ink: #efeae0;
  --dark-dim: #9b988f;
  --dark-line: #2e2e36;

  --ui: "Archivo", "Segoe UI", system-ui, sans-serif;
  --doc: "Spectral", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step-display: clamp(2.1rem, 1.1rem + 4.4vw, 4.8rem);
  --step-head: clamp(1.7rem, 1.1rem + 2.1vw, 2.9rem);
  --step-lead: clamp(1.16rem, 1.06rem + 0.45vw, 1.34rem);
  --step-body: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-small: 1rem;
  --step-micro: 0.82rem;

  --gap: clamp(14px, 1.6vw, 26px);
  --rhythm: clamp(66px, 7.5vw, 132px);
  --radius: 2px;
  --shell: clamp(18px, 4.2vw, 76px);
}

[lang="ar"] {
  --ui: "Noto Kufi Arabic", "Segoe UI", system-ui, sans-serif;
  --doc: "Noto Naskh Arabic", Georgia, serif;
  --mono: "Noto Kufi Arabic", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--ui);
  font-size: var(--step-body);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The honeycomb: a brass hex lattice as the field the whole site sits on. Tiled from
   a seamless SVG (site/img/hex.svg, generated so the hexagons cut by one edge meet
   their other halves on the opposite one), masked so it reads as a texture near the
   top and fades out rather than ending on a line. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("/img/hex.svg");
  background-size: 76px 132px;
  opacity: 0.13;
  mask-image: radial-gradient(130% 95% at 50% -6%, #000 24%, transparent 72%);
  -webkit-mask-image: radial-gradient(130% 95% at 50% -6%, #000 24%, transparent 72%);
}
body::after { content: none; }
body > * { position: relative; z-index: 1; }

h1, h2, h3, h4 {
  font-weight: 600; line-height: 1.08; margin: 0 0 0.5em;
  letter-spacing: -0.022em;
}
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3 { letter-spacing: 0; line-height: 1.3; }
p { margin: 0 0 1em; }
a { color: var(--brass); text-underline-offset: 3px; }
a:hover, a:focus-visible { color: #a7ecfa; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
::selection { background: var(--brass); color: var(--void); }
img { max-width: 100%; display: block; }
hr { border: 0; border-block-start: 1px solid var(--line); margin: var(--rhythm) 0; }

/* Every figure that must line up. On an instrument the data is the interface. */
.fig, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums lining-nums; }
[lang="ar"] .fig, [lang="ar"] .mono { letter-spacing: 0; }
/* A mixed Latin-and-digit run inside RTL text gets reordered by the bidi
   algorithm: "24-0917-B" comes out "B-24-0917". Isolating the run and giving it
   its own direction is the only fix that holds for every such string. It still
   sits at the inline start of its box, so nothing moves. */
[dir="rtl"] .fig, [dir="rtl"] .tether .v, [dir="rtl"] .ticker span {
  direction: ltr; unicode-bidi: isolate; text-align: end;
}
[dir="rtl"] .ticker span { text-align: start; }
.tether .v { display: block; }

/* ── the shell ─────────────────────────────────────────────────────────── */
.wrap { max-inline-size: 1500px; margin-inline: auto; padding-inline: var(--shell); }

/* ── panel: the housing every block sits in ─────────────────────────────
   The top edge carries a scan gradient rather than a flat rule — the one
   borrowed device, and the thing that makes a box read as instrument
   housing instead of a card. */
.panel {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 40px);
}
.panel::before {
  content: ""; position: absolute; inset-block-start: -1px; inset-inline: -1px; block-size: 1px;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
  opacity: 0.5;
}
.panel > :last-child { margin-block-end: 0; }
.panel-hot { border-color: var(--line-hot); }

/* HUD brackets. Drawn with gradients on one element so there is nothing extra
   in the markup and nothing to mis-mirror in RTL. */
.ticks { position: relative; }
.ticks::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background:
    linear-gradient(var(--brass), var(--brass)) 0 0 / 1px 14px no-repeat,
    linear-gradient(var(--brass), var(--brass)) 0 0 / 14px 1px no-repeat,
    linear-gradient(var(--brass), var(--brass)) 100% 0 / 1px 14px no-repeat,
    linear-gradient(var(--brass), var(--brass)) 100% 0 / 14px 1px no-repeat,
    linear-gradient(var(--brass), var(--brass)) 0 100% / 1px 14px no-repeat,
    linear-gradient(var(--brass), var(--brass)) 0 100% / 14px 1px no-repeat,
    linear-gradient(var(--brass), var(--brass)) 100% 100% / 1px 14px no-repeat,
    linear-gradient(var(--brass), var(--brass)) 100% 100% / 14px 1px no-repeat;
  opacity: 0.55;
}

/* ── labels ────────────────────────────────────────────────────────────── */
.tag {
  font-family: var(--mono); font-size: var(--step-micro);
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass);
  display: inline-flex; align-items: center; gap: 0.6em;
}
[lang="ar"] .tag { letter-spacing: 0; text-transform: none; }
.tag::before {
  content: ""; inline-size: 20px; block-size: 1px; background: var(--brass); opacity: 0.6;
}
.dot {
  inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 3px rgba(95,242,168,0.16); display: inline-block;
}

/* ── the deck: the first screen ────────────────────────────────────────── */
.deck {
  min-block-size: 100svh;
  display: grid; align-items: center; gap: var(--gap);
  padding-block: clamp(70px, 10vh, 120px) clamp(40px, 7vh, 90px);
}
@media (min-width: 64rem) {
  .deck { grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); }
}
.deck > * { min-width: 0; }

.deck h1 { font-size: var(--step-display); margin-block: 0.28em 0.5em; max-inline-size: 18ch; }
.deck .lede {
  font-size: var(--step-lead); color: var(--dim); max-inline-size: 46ch; margin-block-end: 2.2rem;
}
.deck .lede strong { color: var(--ink); font-weight: 500; }

/* the vial stage */
.rig { position: relative; aspect-ratio: 1 / 1.08; min-block-size: 46svh; }
#vial { position: absolute; inset: 0; }
#vial canvas { inline-size: 100%; block-size: 100%; display: block; }
.rig-still {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--faint); font-family: var(--mono); font-size: var(--step-micro);
  letter-spacing: 0.14em; text-transform: uppercase; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--radius); padding: 2rem;
}
[lang="ar"] .rig-still { letter-spacing: 0; text-transform: none; }
#vial.is-live ~ .rig-still { display: none; }

/* readouts tethered round the rig */
.tether {
  position: absolute; font-family: var(--mono); font-size: var(--step-micro);
  color: var(--dim); letter-spacing: 0.08em; white-space: nowrap;
  padding-inline-start: 26px;
}
[lang="ar"] .tether { letter-spacing: 0; }
.tether::before {
  content: ""; position: absolute; inset-block-start: 0.62em; inset-inline-start: 0;
  inline-size: 18px; block-size: 1px; background: var(--brass); opacity: 0.7;
}
.tether b { color: var(--brass); font-weight: 500; display: block; letter-spacing: 0.12em; }
[lang="ar"] .tether b { letter-spacing: 0; }
.t-1 { inset-block-start: 13%; inset-inline-start: 0; }
.t-2 { inset-block-start: 45%; inset-inline-end: 0; padding-inline: 0 24px; margin-inline-end: -24px; }
.t-2::before { inset-inline-start: auto; inset-inline-end: 0; }
.t-3 { inset-block-end: 15%; inset-inline-start: 2%; }
@media (max-width: 40rem) { .tether { display: none; } }

/* ── actions ───────────────────────────────────────────────────────────── */
.acts { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }
button[type="submit"], .btn, .act {
  --b: var(--brass);
  display: inline-flex; align-items: center; gap: 0.7em;
  font-family: var(--mono); font-size: var(--step-small); font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  color: var(--void); background: var(--b);
  padding: 0.95em 1.5em; border: 1px solid var(--b); border-radius: var(--radius);
  cursor: pointer; transition: filter .18s ease, transform .18s ease;
}
[lang="ar"] .btn, [lang="ar"] .act { letter-spacing: 0; text-transform: none; }
button[type="submit"]:hover, button[type="submit"]:focus-visible,
.btn:hover, .act:hover, .btn:focus-visible, .act:focus-visible {
  color: var(--void); filter: brightness(1.14); transform: translateY(-1px);
}
.act-plain {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--mono); font-size: var(--step-small); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
  border-block-end: 1px solid var(--line-hot); padding-block-end: 0.3em;
}
[lang="ar"] .act-plain { letter-spacing: 0; text-transform: none; }
.act-plain:hover, .act-plain:focus-visible { color: var(--brass); border-color: var(--brass); }
.status { color: var(--dim); font-size: var(--step-small); margin-block-start: 1.5rem; max-inline-size: 48ch; }

/* ── ticker ────────────────────────────────────────────────────────────── */
.ticker {
  border-block: 1px solid var(--line); background: var(--panel);
  overflow: hidden; padding-block: 0.7em;
}
.ticker-row { display: flex; gap: 3.5rem; inline-size: max-content; }
@media (prefers-reduced-motion: no-preference) {
  .ticker-row { animation: slide 46s linear infinite; }
  [dir="rtl"] .ticker-row { animation-direction: reverse; }
}
@keyframes slide { to { transform: translateX(-50%); } }
.ticker span {
  font-family: var(--mono); font-size: var(--step-micro); color: var(--dim);
  letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 0.7em;
}
[lang="ar"] .ticker span { letter-spacing: 0; text-transform: none; }
.ticker span b { color: var(--brass); font-weight: 500; }

/* ── sections ──────────────────────────────────────────────────────────── */
.bay { padding-block: var(--rhythm); }
.bay > header { max-inline-size: 62ch; margin-block-end: clamp(28px, 4vw, 58px); }
.bay h2 { font-size: var(--step-head); margin-block: 0.5rem 0.6rem; }
.bay > p { max-inline-size: 58ch; }
.bay .intro, .bay > header > p:not(.tag) { color: var(--dim); font-size: var(--step-lead); margin: 0; }

.bento { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 46rem) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 72rem) { .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bento-2 { grid-template-columns: 1fr; }
@media (min-width: 58rem) { .bento-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bento .panel h3 { font-size: var(--step-lead); margin-block-end: 0.5rem; }
.bento .panel p { color: var(--dim); font-size: var(--step-body); margin: 0; }
.bento .n {
  font-family: var(--mono); font-size: clamp(1.9rem, 1.2rem + 2vw, 2.7rem);
  color: var(--brass); line-height: 1; display: block; margin-block-end: 0.5rem;
  font-variant-numeric: tabular-nums lining-nums;
}

/* a key/value readout, the shape the whole site states facts in */
.readout { display: grid; gap: 0.1rem 1.5rem; margin: 0; }
@media (min-width: 34rem) { .readout { grid-template-columns: minmax(7rem, auto) 1fr; } }
.readout dt {
  font-family: var(--mono); font-size: var(--step-micro); color: var(--faint);
  letter-spacing: 0.1em; text-transform: uppercase; padding-block: 0.55em;
}
[lang="ar"] .readout dt { letter-spacing: 0; text-transform: none; }
.readout dd {
  margin: 0; color: var(--ink); font-size: var(--step-small); padding-block: 0.55em;
  border-block-end: 1px solid var(--line);
}
@media (min-width: 34rem) { .readout dt { border-block-end: 1px solid var(--line); } }

/* ── console: mono output, used by the verifier and the specimen ──────── */
.console {
  font-family: var(--mono); font-size: var(--step-small); line-height: 1.75;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(16px, 2vw, 28px); overflow-x: auto;
}
.console .k { color: var(--faint); }
.console .v { color: var(--ink); }
.console .ok { color: var(--good); }
.console .no { color: var(--bad); }
.console .hm { color: var(--warn); }

/* ── forms ─────────────────────────────────────────────────────────────── */
form { display: grid; gap: 1.4rem; max-inline-size: 42rem; }
form button[type="submit"] { justify-self: start; }

.field label, .field > span:first-child {
  display: block; font-family: var(--mono); font-size: var(--step-micro);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass);
  margin-block-end: 0.5rem;
}
[lang="ar"] .field label, [lang="ar"] .field > span:first-child { letter-spacing: 0; text-transform: none; }
.hint { display: block; color: var(--faint); font-size: var(--step-small); margin-block-end: 0.6rem; }
input[type="text"], input[type="email"], input[type="number"], input[type="search"], select, textarea {
  inline-size: 100%; font: inherit; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line-hot); border-radius: var(--radius);
  padding: 0.85em 1em; transition: border-color .16s ease, background .16s ease;
}
textarea { min-block-size: 8rem; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--brass); background: #fffdf8; outline: none;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--brass) 50%),
                    linear-gradient(135deg, var(--brass) 50%, transparent 50%);
  background-size: 6px 6px, 6px 6px;
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-repeat: no-repeat;
  padding-inline-end: 2.6em;
}
[dir="rtl"] select { background-position: 18px 50%, 12px 50%; padding-inline-end: 1em; padding-inline-start: 2.6em; }
.attest { display: grid; gap: 1rem; }
.attest .at-head {
  font-family: var(--mono); font-size: var(--step-micro); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brass);
}
.attest .check { display: grid; grid-template-columns: auto 1fr; gap: 0.85rem; align-items: start; }
.attest .check label {
  font-size: var(--step-small); color: var(--dim); text-transform: none; letter-spacing: 0;
  font-family: var(--ui); margin-block-end: 0; display: block;
}
.attest input[type="checkbox"] {
  inline-size: 18px; block-size: 18px; margin: 0.3em 0 0; accent-color: var(--brass);
}
.attest strong { color: var(--ink); font-weight: 500; }
.privacy-note { color: var(--faint); font-size: var(--step-small); max-inline-size: 52ch; }
.form-msg { font-family: var(--mono); font-size: var(--step-small); }
.form-msg.ok { color: var(--good); }
.form-msg.no { color: var(--bad); }
/* taste-skill-ignore — a hidden honeypot, not a layout rule */
.hp { position: absolute; inset-inline-start: -9999px; inline-size: 1px; block-size: 1px; overflow: hidden; }

/* ── masthead ──────────────────────────────────────────────────────────── */
.masthead {
  position: sticky; inset-block-start: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem 2rem;
  flex-wrap: wrap;
  padding: 0.9rem var(--shell);
  background: rgba(243,239,230,0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-block-end: 1px solid var(--line);
}
.wordmark {
  font-family: var(--mono); font-weight: 700; font-size: 0.98rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
}
[lang="ar"] .wordmark { letter-spacing: 0.06em; }
.masthead nav { display: flex; gap: 1.1rem; flex-wrap: wrap; align-items: center; }
.masthead nav a {
  font-family: var(--mono); font-size: var(--step-micro); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--dim); text-decoration: none;
}
[lang="ar"] .masthead nav a { letter-spacing: 0; text-transform: none; }
.masthead nav a:hover, .masthead nav a:focus-visible { color: var(--brass); }

/* ── catalogue ─────────────────────────────────────────────────────────── */
.cat-tools { display: grid; gap: 1rem; margin-block-end: 2rem; }
.cat-tools .field { max-inline-size: 28rem; }
.cat-areas { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--mono); font-size: var(--step-micro); letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--dim); background: transparent;
  border: 1px solid var(--line-hot); border-radius: 100px; padding: 0.5em 1em; cursor: pointer;
}
[lang="ar"] .chip { letter-spacing: 0; text-transform: none; }
.chip:hover { color: var(--ink); border-color: var(--brass-deep); }
.chip[aria-pressed="true"] { color: var(--void); background: var(--brass); border-color: var(--brass); }
.cat-count {
  font-family: var(--mono); font-size: var(--step-micro); color: var(--faint);
  letter-spacing: 0.1em; text-transform: uppercase;
}
[lang="ar"] .cat-count { letter-spacing: 0; text-transform: none; }
.cat-empty { color: var(--dim); }

.names { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.names .group h3 {
  font-family: var(--mono); font-size: var(--step-micro); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brass); margin-block-end: 0.8rem;
}
[lang="ar"] .names .group h3 { letter-spacing: 0; text-transform: none; }
.names ul { list-style: none; margin: 0; padding: 0; }
.names li { border-block-end: 1px solid var(--line); }
.names a {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  padding: 0.7em 0; color: var(--ink); text-decoration: none; font-size: var(--step-small);
}
.names a::after { content: "\2192"; color: var(--faint); font-family: var(--mono); }
[dir="rtl"] .names a::after { content: "\2190"; }
.names a:hover, .names a:focus-visible { color: var(--brass); }
.names a:hover::after { color: var(--brass); }

/* ── generated pages ───────────────────────────────────────────────────── */
.page { padding-block: clamp(40px, 7vh, 90px) 0; }
.page-sheet { max-inline-size: 90rem; margin-inline: auto; padding-inline: var(--shell); }
.page-sheet > * { max-inline-size: 72ch; }
.page-sheet .wide, .page-sheet .names, .page-sheet .bento, .page-sheet .shelf,
.page-sheet .console, .page-sheet form, .page-sheet .cat-tools { max-inline-size: none; }
.page-shelf .page-sheet { max-inline-size: 96rem; }
.coa { margin-inline: auto; }
.page-sheet h1 { font-size: var(--step-head); margin-block-end: 0.6rem; max-inline-size: 22ch; }
.page-sheet h2 {
  font-size: var(--step-lead); margin-block: 2.8rem 0.8rem;
  padding-block-start: 1.4rem; border-block-start: 1px solid var(--line);
}
.page-sheet h3 { font-size: var(--step-body); margin-block: 1.8rem 0.4rem; color: var(--brass); }
.page-sheet .intro { font-size: var(--step-lead); color: var(--dim); margin-block-end: 2rem; max-inline-size: 56ch; }
.crumb {
  font-family: var(--mono); font-size: var(--step-micro); letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--faint); margin-block-end: 1.2rem;
}
[lang="ar"] .crumb { letter-spacing: 0; text-transform: none; }
.crumb a { color: var(--dim); text-decoration: none; }
.crumb a:hover { color: var(--brass); }
.defs > div { margin-block-end: 1.8rem; }
.defs dt, .defs h3 { color: var(--brass); font-weight: 500; }
.rules { padding-inline-start: 0; list-style: none; counter-reset: r; }
.rules li {
  counter-increment: r; margin-block-end: 1.3rem; padding-inline-start: 3rem; position: relative;
}
.rules li::before {
  content: counter(r, decimal-leading-zero);
  position: absolute; inset-inline-start: 0; inset-block-start: 0.1em;
  font-family: var(--mono); font-size: var(--step-micro); color: var(--brass);
}
.plain-list { padding-inline-start: 0; list-style: none; }
.plain-list > li { margin-block-end: 1.6rem; }
.spec > li { margin-block-end: 2rem; }
.updated, .issued {
  font-family: var(--mono); font-size: var(--step-micro); color: var(--faint);
  letter-spacing: 0.1em; text-transform: uppercase;
}
[lang="ar"] .updated, [lang="ar"] .issued { letter-spacing: 0; text-transform: none; }
.legal { color: var(--dim); font-size: var(--step-small); max-inline-size: 70ch; }
.legal-flag {
  border-inline-start: 2px solid var(--warn); padding-inline-start: 1.2rem;
  color: var(--ink); background: rgba(242,189,106,0.05); padding-block: 0.9rem;
}
.passing { color: var(--dim); }

/* ── verifier output ───────────────────────────────────────────────────── */
.verify-out { margin-block-start: 2.5rem; }
.verdict { font-size: var(--step-head); line-height: 1.12; margin: 0 0 1.5rem; max-inline-size: 26ch; }
.verdict-pass { color: var(--good); }
.verdict-warn { color: var(--warn); }
.verdict-fail { color: var(--bad); }
.vr { margin-block-end: 1rem; max-inline-size: 66ch; }
.vr-k {
  font-family: var(--mono); font-size: var(--step-micro); letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--faint); display: block;
}
[lang="ar"] .vr-k { letter-spacing: 0; text-transform: none; }
.vr-b { font-family: var(--mono); color: var(--ink); }
.vr-pass { color: var(--good); } .vr-warn { color: var(--warn); }
.vr-fail { color: var(--bad); } .vr-skip { color: var(--faint); }
.vr-list { padding-inline-start: 0; list-style: none; }
.vr-note { color: var(--faint); font-size: var(--step-small); margin-block-start: 2rem; max-inline-size: 64ch; }

/* ── the trace ─────────────────────────────────────────────────────────── */
.trace { inline-size: 100%; block-size: auto; overflow: visible; }
.trace path.curve { fill: none; stroke: var(--brass); stroke-width: 1.5; }
.trace .axis { stroke: var(--line-hot); stroke-width: 1; }
.trace text { fill: var(--faint); font-family: var(--mono); font-size: 10px; }
.trace-light { color: var(--faint); font-size: var(--step-small); font-family: var(--mono); }

/* ── footer ────────────────────────────────────────────────────────────── */
.close {
  border-block-start: 1px solid var(--dark); background: var(--dark); color: var(--dark-ink);
  margin-block-start: var(--rhythm);
}
.close a { color: var(--dark-dim); }
.close a:hover, .close a:focus-visible { color: var(--brass); }
.close .legal, .close .status { color: var(--dark-dim); }
.close h2, .close h3 { color: #d8b878; }
.close-inner { padding-block: clamp(40px, 6vw, 78px); }
.close-cols { display: grid; gap: var(--gap) 2.5rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.close-menu { list-style: none; margin: 0; padding: 0; }
.close-menu li { margin-block-end: 0.55rem; }
.close-menu a { color: var(--dark-dim); text-decoration: none; font-size: var(--step-small); }
.close-menu a:hover, .close-menu a:focus-visible { color: var(--brass); }
.close h2, .close h3 {
  font-family: var(--mono); font-size: var(--step-micro); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brass); margin-block-end: 1rem;
}
[lang="ar"] .close h2, [lang="ar"] .close h3 { letter-spacing: 0; text-transform: none; }
.close-pic { display: none; }

/* ── motion, applied only where it is asked for ────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  html.js .rise { opacity: 0; transform: translateY(18px); }
}

/* ── print ─────────────────────────────────────────────────────────────── */
@media print {
  body { background: #fff; color: #000; }
  body::before, body::after, .masthead nav, .ticker, .rig, .close { display: none; }
  .panel, .console { border: 1px solid #999; background: #fff; }
  a { color: #000; }
}

/* ── inquiry: the form, and what happens to it ─────────────────────────── */
.ask { display: grid; gap: var(--gap); align-items: start; }
@media (min-width: 68rem) { .ask { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); } }
.ask > * { min-width: 0; }


/* ── the structure viewer ──────────────────────────────────────────────── */
.mol-wrap { margin-block: 1.6rem 0.8rem; max-inline-size: none; }
.mol {
  position: relative; aspect-ratio: 16 / 10; inline-size: 100%;
  background: var(--paper); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset;
}
.mol canvas { display: block; touch-action: pan-y; cursor: grab; }
.mol canvas:active { cursor: grabbing; }

.mol-still {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 1.5rem;
  text-align: center; color: var(--paper-dim); font-family: var(--mono);
  font-size: var(--step-micro); letter-spacing: 0.1em; text-transform: uppercase;
}
[lang="ar"] .mol-still { letter-spacing: 0; text-transform: none; }
.mol.is-live .mol-still { display: none; }
.mol-bar {
  display: flex; flex-wrap: wrap; gap: 0.8rem 1.4rem; align-items: center;
  justify-content: space-between; margin-block-start: 0.7rem;
}
.mol-key { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.mol-key span {
  font-family: var(--mono); font-size: var(--step-micro); color: var(--dim);
  display: inline-flex; align-items: center; gap: 0.45em;
}
.mol-key i { inline-size: 8px; block-size: 8px; border-radius: 50%; display: inline-block; }
#mol-toggle {
  font-family: var(--mono); font-size: var(--step-micro); color: var(--dim);
  background: none; border: 1px solid var(--line-hot); border-radius: var(--radius);
  padding: 0.45em 0.9em; cursor: pointer;
}
#mol-toggle:hover { color: var(--brass); border-color: var(--brass-deep); }

/* ── the selection tray ────────────────────────────────────────────────── */
.tray-open {
  font-family: var(--mono); font-size: var(--step-micro); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink); background: none;
  border: 1px solid var(--line-hot); border-radius: 100px;
  padding: 0.45em 0.9em; cursor: pointer; display: inline-flex; align-items: center; gap: 0.6em;
}
[lang="ar"] .tray-open { letter-spacing: 0; text-transform: none; }
.tray-open:hover { border-color: var(--brass); color: var(--brass); }
.tray-badge {
  background: var(--brass); color: var(--void); border-radius: 100px;
  min-inline-size: 1.5em; padding: 0.1em 0.45em; font-weight: 700; text-align: center;
}
.tray {
  position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 90;
  inline-size: min(28rem, 92vw);
  background: var(--panel); border-inline-start: 1px solid var(--line-hot); box-shadow: -18px 0 40px -24px rgba(0,0,0,0.3);
  display: flex; flex-direction: column; gap: 1rem;
  padding: clamp(18px, 2.4vw, 32px);
  transform: translateX(100%);
}
[dir="rtl"] .tray { transform: translateX(-100%); }
@media (prefers-reduced-motion: no-preference) { .tray { transition: transform .26s ease; } }
.tray.is-open { transform: none; }
/* `display: flex` beats the hidden attribute, so a closed drawer stayed in the
   layout off-screen: measured as page content, and read aloud on every page. */
.tray[hidden] { display: none; }
.tray-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.tray-x {
  background: none; border: 0; color: var(--dim); font-size: 1.6rem; line-height: 1;
  cursor: pointer; padding: 0.2em 0.4em;
}
.tray-x:hover { color: var(--brass); }
.tray-list { flex: 1; overflow-y: auto; }
.tray-empty { color: var(--faint); font-size: var(--step-small); }
.tray-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 0.9rem; align-items: center;
  padding-block: 0.8rem; border-block-end: 1px solid var(--line);
}
.tray-row a { color: var(--ink); text-decoration: none; display: block; font-size: var(--step-small); }
.tray-row a:hover { color: var(--brass); }
.tray-row .fig { display: block; color: var(--faint); font-size: var(--step-micro); }
.tray-qty { display: inline-flex; align-items: center; gap: 0.3rem; }
.tray-qty button {
  inline-size: 26px; block-size: 26px; background: none; color: var(--ink);
  border: 1px solid var(--line-hot); border-radius: var(--radius); cursor: pointer;
  font-family: var(--mono); line-height: 1;
}
.tray-qty button:hover { border-color: var(--brass); color: var(--brass); }
.tray-qty .fig { min-inline-size: 2ch; text-align: center; }
.tray-rm { background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 1.2rem; line-height: 1; }
.tray-rm:hover { color: var(--bad); }
.tray-note { color: var(--faint); font-size: var(--step-micro); margin: 0; }
.tray-acts { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; align-items: center; }
.tray-clear { background: none; border: 0; cursor: pointer; }

[data-add].is-added { background: var(--good); border-color: var(--good); }


/* ── compound page: the structure leads ────────────────────────────────── */
.cmp-deck { display: grid; gap: var(--gap) clamp(24px, 3.5vw, 56px); align-items: start; max-inline-size: none; }
@media (min-width: 62rem) { .cmp-deck { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.cmp-deck > * { min-width: 0; }
.cmp-deck h1 { font-size: clamp(2.4rem, 1.2rem + 3.6vw, 4.4rem); margin-block: 0.2em 0.5rem; line-height: 1.02; }
.cmp-deck .intro { font-size: var(--step-lead); color: var(--dim); margin-block-end: 1.6rem; }
.defs-tight > div { margin-block-end: 0; display: grid; grid-template-columns: minmax(7rem, auto) 1fr;
  gap: 1.2rem; padding-block: 0.6em; border-block-end: 1px solid var(--line); }
.defs-tight dt { font-family: var(--mono); font-size: var(--step-micro); color: var(--faint);
  letter-spacing: 0.1em; text-transform: uppercase; }
[lang="ar"] .defs-tight dt { letter-spacing: 0; text-transform: none; }
.defs-tight dd { margin: 0; font-size: var(--step-small); }
.cmp-deck .acts { margin-block-start: 1.8rem; }
.cmp-deck .mol { aspect-ratio: 1 / 1; }
@media (min-width: 62rem) { .cmp-deck .mol { aspect-ratio: 4 / 5; } }

/* ── the shelf ───────────────────────────────────────────────────────────
   Every card is a paper data sheet on a dark page. Twenty-one ivory objects on
   black is the composition; a dark card with a thin border and a badge is the
   one every generated storefront already has. */
.shelf {
  display: grid; gap: var(--gap); max-inline-size: none;
  grid-template-columns: repeat(auto-fill, minmax(min(48%, 15rem), 1fr));
}
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); color: var(--paper-ink);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }
.card:hover, .card:focus-within {
  transform: translateY(-3px); border-color: var(--line-hot);
  box-shadow: 0 12px 26px -16px rgba(40,34,20,0.3);
}
.card-pic {
  position: relative; aspect-ratio: 5 / 4; display: grid; place-items: center;
  background: var(--paper-2);
  border-block-end: 1px solid var(--paper-line);
  padding: 2.1rem 0.6rem 0.6rem;
}
.card-pic img { inline-size: 100%; block-size: 100%; object-fit: contain; }
.card-pic .card-none {
  font-family: var(--mono); font-size: var(--step-micro); color: var(--paper-dim);
  letter-spacing: 0.08em; text-transform: uppercase; text-align: center;
}
[lang="ar"] .card-pic .card-none { letter-spacing: 0; text-transform: none; }
.card-area {
  position: absolute; inset-block-start: 0; inset-inline-start: 0;
  font-family: var(--mono); font-size: var(--step-micro); color: var(--paper-dim);
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.5em 0.9em;
}
[lang="ar"] .card-area { letter-spacing: 0; text-transform: none; }
.card-body { padding: clamp(14px, 1.4vw, 20px); display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.card-body h3 { font-size: var(--step-lead); margin: 0; font-family: var(--ui); letter-spacing: -0.02em; }
.card-body h3 a { color: var(--paper-ink); text-decoration: none; }
.card-body h3 a::after { content: ""; position: absolute; inset: 0; }
.card-body h3 a:hover, .card-body h3 a:focus-visible { color: var(--brass-deep); }
.card-spec { display: grid; gap: 0.1rem; margin: 0; }
.card-spec div {
  display: flex; justify-content: space-between; gap: 0.8rem; align-items: baseline;
  padding-block: 0.3em; border-block-end: 1px solid var(--paper-line);
}
.card-spec dt {
  font-family: var(--mono); font-size: var(--step-micro); color: var(--paper-dim);
  letter-spacing: 0.06em; text-transform: uppercase;
}
[lang="ar"] .card-spec dt { letter-spacing: 0; text-transform: none; }
.card-spec dd {
  margin: 0; font-family: var(--mono); font-size: var(--step-micro); color: var(--paper-ink);
  font-variant-numeric: tabular-nums lining-nums;
}
[dir="rtl"] .card-spec dd { direction: ltr; unicode-bidi: isolate; }
.card-foot {
  margin-block-start: auto; padding-block-start: 0.8rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; flex-wrap: wrap;
}
.card-price {
  font-family: var(--mono); font-size: var(--step-micro); color: var(--paper-dim);
  letter-spacing: 0.06em; text-transform: uppercase;
}
[lang="ar"] .card-price { letter-spacing: 0; text-transform: none; }
.card-add {
  position: relative; z-index: 1;
  font-family: var(--mono); font-size: var(--step-micro); font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--paper-ink); background: transparent;
  border: 1px solid var(--paper-ink); border-radius: var(--radius);
  padding: 0.55em 1.05em; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
[lang="ar"] .card-add { letter-spacing: 0; text-transform: none; }
.card-add:hover, .card-add:focus-visible { background: var(--paper-ink); color: var(--paper); }
.card-add.is-added { background: var(--brass-deep); border-color: var(--brass-deep); color: var(--paper); }
.card-withdrawn { opacity: 0.45; }
.card-withdrawn .card-add { display: none; }

[data-add].is-added { background: var(--good); border-color: var(--good); }


/* ── compound page: the structure leads ────────────────────────────────── */
.cmp-deck { display: grid; gap: var(--gap) clamp(24px, 3.5vw, 56px); align-items: start; max-inline-size: none; }
@media (min-width: 62rem) { .cmp-deck { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.cmp-deck > * { min-width: 0; }
.cmp-deck h1 { font-size: clamp(2.4rem, 1.2rem + 3.6vw, 4.4rem); margin-block: 0.2em 0.5rem; line-height: 1.02; }
.cmp-deck .intro { font-size: var(--step-lead); color: var(--dim); margin-block-end: 1.6rem; }
.defs-tight > div { margin-block-end: 0; display: grid; grid-template-columns: minmax(7rem, auto) 1fr;
  gap: 1.2rem; padding-block: 0.6em; border-block-end: 1px solid var(--line); }
.defs-tight dt { font-family: var(--mono); font-size: var(--step-micro); color: var(--faint);
  letter-spacing: 0.1em; text-transform: uppercase; }
[lang="ar"] .defs-tight dt { letter-spacing: 0; text-transform: none; }
.defs-tight dd { margin: 0; font-size: var(--step-small); }
.cmp-deck .acts { margin-block-start: 1.8rem; }
.cmp-deck .mol { aspect-ratio: 1 / 1; }
@media (min-width: 62rem) { .cmp-deck .mol { aspect-ratio: 4 / 5; } }


/* A shelf page leads with its title at display size, like the compound pages. */
.page-shelf .page-sheet h1 { font-size: clamp(2.4rem, 1.2rem + 3.6vw, 4.4rem); line-height: 1.02; margin-block-end: 0.6rem; }
.page-shelf .page-sheet .intro { max-inline-size: 60ch; }

@media (max-width: 30rem) {
  .card-body { padding: 12px; gap: 0.5rem; }
  .card-body h3 { font-size: var(--step-body); }
  .card-spec div { flex-direction: column; gap: 0; }
  .card-foot { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .card-add { inline-size: 100%; }
  .card-area { padding: 0.2em 0.5em; }
}

/* ── PAPER ───────────────────────────────────────────────────────────────
   The one structural idea: a document is paper, and the page is dark. Every
   certificate, label and spec sheet is an ivory object on a black field. It is
   what the brand is about, and it is the thing a screen of dark panels with
   cyan borders cannot do. */
.paper {
  background: var(--paper); color: var(--paper-ink);
  font-family: var(--doc);
  border-radius: var(--radius);
  padding: clamp(22px, 2.6vw, 44px);
  position: relative;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px -20px rgba(40,34,20,0.35);
}
.paper h2, .paper h3, .paper h4 { color: var(--paper-ink); font-family: var(--ui); }
.paper p, .paper li, .paper dd { color: var(--paper-dim); }
.paper strong { color: var(--paper-ink); }
.paper a { color: var(--brass-deep); }
.paper .tag { color: var(--brass-deep); }
.paper .tag::before { background: var(--brass-deep); }
.paper .readout dt { color: var(--paper-dim); }
.paper .readout dd { color: var(--paper-ink); border-block-end-color: var(--paper-line); }
.paper .readout dt { border-block-end-color: var(--paper-line); }
.paper hr { border-block-start-color: var(--paper-line); }

/* a torn/deckled foot, so a paper block reads as a sheet and not a light div */
.paper-deckle::after {
  content: ""; position: absolute; inset-inline: 0; inset-block-end: -9px; block-size: 9px;
  background: var(--paper);
  clip-path: polygon(0 0, 100% 0, 100% 40%, 96% 100%, 92% 42%, 88% 100%, 84% 40%, 80% 100%,
    76% 42%, 72% 100%, 68% 40%, 64% 100%, 60% 42%, 56% 100%, 52% 40%, 48% 100%, 44% 42%,
    40% 100%, 36% 40%, 32% 100%, 28% 42%, 24% 100%, 20% 40%, 16% 100%, 12% 42%, 8% 100%, 4% 40%, 0 100%);
}

/* type on paper reads at document size, not UI size */
.paper { font-size: 1.05rem; line-height: 1.68; }
.paper .fig, .paper .mono { font-family: var(--mono); }

/* ── live measurement is the only thing that is ever ice ───────────────── */
.live { color: var(--ice); }
.live-dot {
  inline-size: 6px; block-size: 6px; border-radius: 50%; background: var(--ice);
  box-shadow: 0 0 0 3px rgba(143,212,232,0.18); display: inline-block;
}

/* ── the fill picker ───────────────────────────────────────────────────── */
.pick { margin-block-start: 1.6rem; }
.pick > label {
  display: block; font-family: var(--mono); font-size: var(--step-micro);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass);
  margin-block-end: 0.6rem;
}
[lang="ar"] .pick > label { letter-spacing: 0; text-transform: none; }
.pick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-opt {
  font-family: var(--mono); font-size: var(--step-small);
  color: var(--ink); background: transparent;
  border: 1px solid var(--line-hot); border-radius: var(--radius);
  padding: 0.6em 1.15em; cursor: pointer; min-inline-size: 5.5rem;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.pick-opt:hover { border-color: var(--brass-deep); }
.pick-opt.is-on { background: var(--paper); color: var(--paper-ink); border-color: var(--paper); }
.pick .hint { margin-block-start: 0.6rem; }

/* ── the specimen certificate ──────────────────────────────────────────── */
.coa { max-inline-size: none; margin-block: 0; }
.cmp-deck .coa h2 { font-size: var(--step-lead); }
.coa-stamp {
  font-family: var(--mono); font-size: var(--step-micro); letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--bad);
  border: 2px solid var(--bad); border-radius: var(--radius);
  padding: 0.5em 1em; display: inline-block; transform: rotate(-1.2deg);
  margin-block-end: 1.8rem; opacity: 0.78;
}
[lang="ar"] .coa-stamp { letter-spacing: 0; text-transform: none; }
.coa-head {
  text-align: center; padding-block-end: 1.4rem; margin-block-end: 1.6rem;
  border-block-end: 2px solid var(--paper-ink);
}
.coa-mark {
  display: block; font-family: var(--ui); font-weight: 600; font-size: var(--step-micro);
  color: var(--brass-deep); margin-block-end: 0.7rem;
}
.coa-head h2 {
  font-family: var(--ui); font-size: var(--step-lead); letter-spacing: 0.1em;
  text-transform: uppercase; margin: 0; color: var(--paper-ink);
}
[lang="ar"] .coa-head h2 { letter-spacing: 0; text-transform: none; }
.coa h3 {
  font-family: var(--mono); font-size: var(--step-micro); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brass-deep);
  margin-block: 2rem 0.8rem;
}
[lang="ar"] .coa h3 { letter-spacing: 0; text-transform: none; }
.coa .readout dd { font-size: var(--step-small); }
.coa-foot {
  margin-block-start: 2.4rem; padding-block-start: 1.4rem;
  border-block-start: 1px solid var(--paper-line); font-size: var(--step-small);
}
.coa-ruo {
  font-family: var(--mono); font-size: var(--step-micro); color: var(--paper-ink);
  border: 1px solid var(--paper-line); padding: 0.8em 1em; margin-block-end: 0;
}

/* Below the split, the certificate bleeds to the viewport edge and its own padding
   becomes the page gutter. Otherwise the sheet's 22px padding stacks on top of the
   32px shell and the document sits a frame inside the frame. */
@media (max-width: 61.999rem) {
  .cmp-deck .coa {
    margin-inline: calc(var(--shell) * -1);
    padding-inline: var(--shell);
    border-radius: 0;
  }
  .cmp-deck .coa.paper-deckle::after { inset-inline: 0; }
}

/* ── the hero photograph ───────────────────────────────────────────────── */
.shot-hero { margin: 0; position: relative; }
.shot-hero img {
  inline-size: 100%; block-size: auto; border-radius: var(--radius);
  aspect-ratio: 11 / 13; object-fit: cover;
  filter: contrast(1.04) saturate(0.82);
}
@media (max-width: 64rem) { .shot-hero img { aspect-ratio: 4 / 3; } }
.shot-hero figcaption {
  font-family: var(--mono); font-size: var(--step-micro); color: var(--dim);
  margin-block-start: 0.8rem; max-inline-size: 48ch; padding-inline-start: 26px;
  position: relative;
}
.shot-hero figcaption::before {
  content: ""; position: absolute; inset-block-start: 0.62em; inset-inline-start: 0;
  inline-size: 18px; block-size: 1px; background: var(--brass); opacity: 0.8;
}

/* Paper owns its own text colour: an inherited dark-surface ink lands at 1:1 on it.
   These carry an element selector because `.bento .panel p` (0,2,1) outranks a plain
   `.paper .tag` (0,2,0) and was repainting paper text in the dark-surface grey. */
.paper p.tag, .paper p.tag::before { color: var(--brass-deep); }
.paper p.tag::before { background: var(--brass-deep); }
.paper p.status, .paper span.hint, .paper span.card-price { color: var(--paper-dim); }
.paper p.paper-lead { font-size: var(--step-lead); color: var(--paper-ink); }
.paper p, .paper li { color: var(--paper-dim); }
.panel.paper p, .panel.paper li, .panel.paper dd { color: var(--paper-dim); }
.panel.paper dd { color: var(--paper-ink); }
.panel.paper { border-color: var(--paper-line); }
.panel.paper::before { display: none; }

/* ── the sitewide notice ───────────────────────────────────────────────── */
.notice {
  margin: 0; padding: 0.7em var(--shell);
  background: var(--dark); color: #f0e7d4;
  font-family: var(--mono); font-size: var(--step-micro); line-height: 1.5;
  text-align: center;
}
.notice strong { font-weight: 700; color: #e4c489; }

/* ── order lines ───────────────────────────────────────────────────────── */
.order { max-inline-size: none; gap: 0; }
.order-step { margin-block-end: var(--rhythm); }
.order-step h2 {
  display: flex; align-items: center; gap: 0.8rem;
  font-size: var(--step-lead); margin-block-end: 1.4rem;
  padding-block-start: 0; border: 0;
}
.step-n {
  inline-size: 1.9rem; block-size: 1.9rem; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--brass); color: var(--void);
  font-family: var(--mono); font-size: var(--step-micro); font-weight: 700;
}
.order-empty { color: var(--dim); }
.order-lines { border-block-start: 1px solid var(--line); }
.order-line {
  display: grid; gap: 0.6rem 1rem; align-items: center;
  grid-template-columns: 1fr auto; padding-block: 1rem;
  border-block-end: 1px solid var(--line);
}
@media (min-width: 46rem) {
  .order-line { grid-template-columns: 1fr auto 6rem 6rem auto; }
}
.ol-what a { color: var(--ink); text-decoration: none; display: block; }
.ol-what a:hover { color: var(--brass); }
.ol-what .fig { display: block; color: var(--faint); font-size: var(--step-micro); }
.ol-qty { display: inline-flex; align-items: center; gap: 0.35rem; }
.ol-qty button {
  inline-size: 28px; block-size: 28px; background: none; color: var(--ink);
  border: 1px solid var(--line-hot); border-radius: var(--radius); cursor: pointer;
  font-family: var(--mono); line-height: 1;
}
.ol-qty button:hover { border-color: var(--brass); color: var(--brass); }
.ol-qty .fig { min-inline-size: 2ch; text-align: center; }
.ol-unit { color: var(--dim); text-align: end; }
.ol-sum { color: var(--ink); text-align: end; }
.ol-rm { background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 1.2rem; line-height: 1; }
.ol-rm:hover { color: var(--bad); }

.order-sums {
  display: grid; grid-template-columns: 1fr auto; gap: 0.4rem 1.5rem;
  margin-block-start: 1.6rem; max-inline-size: 26rem; margin-inline-start: auto;
}
.order-sums dt { color: var(--dim); font-size: var(--step-small); }
.order-sums dd { margin: 0; text-align: end; color: var(--ink); font-size: var(--step-small); }
.order-sums .is-total {
  border-block-start: 1px solid var(--line-hot); padding-block-start: 0.7rem;
  margin-block-start: 0.4rem; font-size: var(--step-lead); color: var(--ink);
}
.order-sums em {
  display: block; font-style: normal; font-family: var(--mono);
  font-size: var(--step-micro); color: var(--faint);
}

/* ── payment method ────────────────────────────────────────────────────── */
.pays { display: grid; gap: 0.7rem; max-inline-size: 36rem; }
.pay {
  display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.95em 1.1em; cursor: pointer;
}
.pay:hover { border-color: var(--brass-deep); }
.pay:has(input:checked) { border-color: var(--brass); background: var(--panel); }
.pay input { inline-size: 18px; block-size: 18px; margin-block-start: 0.2em; accent-color: var(--brass); }
.pay b { display: block; color: var(--ink); font-weight: 500; }
.pay em {
  display: block; font-style: normal; color: var(--dim);
  font-size: var(--step-micro); margin-block-start: 0.15rem;
}

/* ── price lines on products ───────────────────────────────────────────── */
.price-line { margin-block: 1.4rem 0; display: flex; align-items: baseline; gap: 0.7rem; }
.price-line b {
  font-family: var(--mono); font-size: clamp(1.6rem, 1.1rem + 1.4vw, 2.1rem);
  color: var(--ink); font-weight: 500;
}
.price-line em {
  font-style: normal; font-family: var(--mono); font-size: var(--step-micro);
  color: var(--faint); letter-spacing: 0.08em; text-transform: uppercase;
}
[lang="ar"] .price-line em { letter-spacing: 0; text-transform: none; }
.card-price b { display: block; font-family: var(--mono); font-size: var(--step-body); color: var(--paper-ink); font-weight: 500; }
.card-price em { font-style: normal; font-size: 0.74rem; color: var(--paper-dim); }
.tray-sum { color: var(--ink); font-family: var(--mono); font-size: var(--step-micro); }
.tray-total {
  display: flex; align-items: baseline; gap: 0.6rem; justify-content: space-between;
  padding-block-start: 1rem; margin-block-start: 0.6rem; border-block-start: 1px solid var(--line-hot);
}
.tray-total b { font-family: var(--mono); color: var(--ink); font-size: var(--step-lead); }
.tray-total em { font-style: normal; font-family: var(--mono); font-size: var(--step-micro); color: var(--faint); }
.flag-strip {
  font-family: var(--mono); font-size: var(--step-micro); color: var(--brass);
  border: 1px solid var(--brass-deep); border-radius: var(--radius);
  padding: 0.7em 1em; display: inline-block; margin-block-end: 2.5rem;
}

.order .privacy-note { margin-block: 1.8rem 1.4rem; }
.order .attest { margin-block-end: 0.6rem; }
.card-spec dt { white-space: nowrap; }

/* ── checkout layout ───────────────────────────────────────────────────── */
.page-sheet .co-title { font-size: clamp(2.4rem, 1.2rem + 3.6vw, 4.4rem); line-height: 1.02; margin-block-end: 0.5rem; }
.co-grid { display: grid; gap: var(--gap) clamp(28px, 4vw, 64px); align-items: start; }
@media (min-width: 68rem) {
  .co-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr); }
  .co-main { grid-column: 1; grid-row: 1; }
  .co-side { grid-column: 2; grid-row: 1; position: sticky; inset-block-start: 5.5rem; }
}
.co-grid > * { min-width: 0; }
.co-side .order-step { margin-block-end: 0; }
.co-side .order-lines { border-block-start: 0; }
.co-side {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(18px, 2vw, 30px);
}
.co-side .order-sums { margin-inline-start: 0; max-inline-size: none; }
.co-side .order-line { grid-template-columns: 1fr auto auto; }
.co-side .ol-unit { display: none; }
.order .intro, .order .hint, .order .privacy-note { max-inline-size: 60ch; }
.page-sheet .co-title, .page-sheet .intro, .page-sheet .flag-strip { max-inline-size: 60ch; }

/* A hint sits inside its label, so it inherits the label's uppercase and tracking
   and stops reading as secondary. */
.field label .hint, .pick .hint {
  text-transform: none; letter-spacing: 0; font-family: var(--ui); font-weight: 400;
}
.co-side .order-line { grid-template-columns: 1fr auto auto auto; }
.co-side .ol-sum { min-inline-size: 3.5rem; }

/* ── lot archive ───────────────────────────────────────────────────────── */
.lot-find { max-inline-size: 30rem; margin-block: 2rem 1.6rem; }
.lot-find .cat-count { margin-block-start: 0.7rem; }
.lot-table { overflow-x: auto; max-inline-size: none; }
.lot-table table { inline-size: 100%; border-collapse: collapse; }
.lot-table th {
  text-align: start; font-family: var(--mono); font-size: var(--step-micro);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass);
  font-weight: 500; padding: 0.7em 1rem 0.7em 0; border-block-end: 1px solid var(--line-hot);
  white-space: nowrap;
}
[lang="ar"] .lot-table th { letter-spacing: 0; text-transform: none; }
.lot-table td {
  padding: 0.85em 1rem 0.85em 0; border-block-end: 1px solid var(--line);
  font-size: var(--step-small); color: var(--dim); vertical-align: baseline;
}
[dir="rtl"] .lot-table th, [dir="rtl"] .lot-table td { padding: 0.8em 0 0.8em 1rem; }
.lot-table td a { color: var(--ink); text-decoration: none; }
.lot-table td a:hover, .lot-table td a:focus-visible { color: var(--brass); }
[dir="rtl"] .lot-table td.fig { direction: ltr; unicode-bidi: isolate; text-align: end; }
.lot-none { color: var(--faint); padding-block: 1.6em; }

/* On a certificate the field labels are the content, not micro-labels around it —
   a lot page is almost entirely this table, so micro made it the page's body size. */
.coa .readout dt { font-size: var(--step-small); letter-spacing: 0.04em; }
[lang="ar"] .coa .readout dt { letter-spacing: 0; }

/* These two are full sentences carrying terms, not micro-labels, and on a lot page
   the RUO line is the longest running text on the page. */
.coa-ruo { font-size: var(--step-small); }
.tray-note { font-size: var(--step-small); }

/* The footer and the notice are inversions, so they need the light brass: the ground
   brass is tuned for paper and falls to 3:1 on a dark panel. */
.close h2, .close h3 { color: var(--brass-light); }
.close .tag { color: var(--brass-light); }
.close .tag::before { background: var(--brass-light); }
.notice strong { color: var(--brass-light); }
