/* GENERATED by web/tools/bundle-css.mjs — edit the modules, not this file. */
/* ── tokens.css ─────────────────────────────────────────────────────────── */
/* «الورق الحي» — the living-print token set.
   The app is light-only, and so is the web. There is no dark mapping here.
   Palette, type ladder and geometry are quoted from the Flutter theme
   (sanad_colors.dart, sanad_type.dart) and from landing/DESIGN.md v3. */

:root {
  color-scheme: light;

  /* ── the app's palette, verbatim ───────────────────────────────────── */
  --desk: #f1efe9;
  --teak-hi: #fdfcf9;
  --paper: #ffffff;
  --paper-lift: #f7f2ea;
  --paper-sunken: #f0ede5;
  --ink: #201d18;
  --ink-muted: #6e675c;
  --ink-line: rgba(32, 29, 24, .10);
  --stamp-ink: #5a4e3c;
  --ink-deep: #241f19;
  --outline: #ddd7ca;
  --sea: #2e7d64;
  --sea-text: #276a55;
  --seal: #a6402f;
  --amber: #b98a2f;
  --amber-text: #806018;
  --brass: #c99a3c;
  --brass-text: #8a6524;
  --disc-mark: #fdfcf9;
  --ring: .72;
  --ring-label: .85;
  --umbra: rgba(32, 29, 24, .18);

  /* ── the app's type ────────────────────────────────────────────────── */
  --display: 'Fraunces', 'IBM Plex Sans Arabic', serif;
  --body: 'Inter', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --t-floor: 11px;
  --t-data: 12px;
  --t-caption: 13px;
  --t-label: 14px;
  --t-body: 15px;
  --t-body-lg: 16px;
  --t-heading: 20px;
  --t-title: 24px;
  --t-display: 34px;
  --t-hero: 58px;

  /* ── geometry ──────────────────────────────────────────────────────── */
  --r-card: 6px;
  --r-action: 12px;
  --r-switch: 4px;
  --r-well: 10px;
  --r-pill: 999px;
  --shadow-card: 0 8px 22px -10px rgba(32, 29, 24, .10);
  --shadow-float: 0 -12px 30px -12px var(--umbra);
  --shadow-deep: 0 24px 60px -28px rgba(32, 29, 24, .32);
  --gut: clamp(14px, 1.5vw, 22px);
  --pad: clamp(18px, 3vw, 40px);
  --sect: clamp(42px, 5.4vw, 72px);
  --masthead: 62px;
  --dock: 90px;
  --cartbar: 76px;

  /* ── motion: one vocabulary, two surfaces ─────────────────────────── */
  --t-press: 120ms;
  --t-switch: 200ms;
  --t-sheet: 280ms;
  --t-settle: 420ms;
  --t-success: 480ms;
  --t-count: 1100ms;
  --t-inhale: 2400ms;
  --ease-press: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.2, 1.2, .3, 1);
  --ease-settle: cubic-bezier(.16, 1, .3, 1);
  --ease-stamp: cubic-bezier(.6, 0, .9, .3);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in: cubic-bezier(.55, 0, 1, .45);

  /* ── layers ────────────────────────────────────────────────────────── */
  --z-masthead: 30;
  --z-dock: 40;
  --z-sheet: 60;
  --z-toast: 70;
}

/* ── base.css ─────────────────────────────────────────────────────────── */
/* Base: reset, type, layout, tables, focus, and the two page laws
   (nothing hidden at rest; reduced motion collapses). */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  background: var(--desk);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-body-lg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.has-dock { padding-bottom: calc(var(--dock) + 10px); }
body.has-cartbar { padding-bottom: calc(var(--cartbar) + 12px); }
html.locked, html.locked body { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--sea);
  outline-offset: 3px;
  border-radius: var(--r-switch);
}
::selection { background: var(--paper-sunken); color: var(--ink); }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* a keyboard door before the letterhead */
.skip {
  position: fixed;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-action);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--t-switch) var(--ease-press);
}
.skip:focus-visible { transform: none; }

/* ── the page's two surfaces: the desk, and a lifted sheet laid on it ── */
.wrap { max-width: 1180px; margin-inline: auto; padding-inline: var(--gut); }
.sect { padding-block: var(--sect); }
.band {
  background: var(--paper-lift);
  border-block: 1px solid var(--outline);
}
.band-paper { background: var(--paper); }
.band-sunken { background: var(--paper-sunken); }
section[id], main[id] { scroll-margin-top: calc(var(--masthead) + 12px); }

/* ── type, on the app's ladder ──────────────────────────────────────── */
.d1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.1rem, 5.6vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: 0;
}
.d2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1.25;
}
.d3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--t-heading);
  line-height: 1.35;
}
html[lang='en'] .d1,
html[lang='en'] .d2,
html[lang='en'] .d3 { letter-spacing: -.03em; }

.lede {
  font-size: var(--t-body-lg);
  line-height: 1.7;
  color: var(--ink-muted);
  max-width: 36em;
}
html[lang='ar'] .lede { font-size: 17px; line-height: 1.75; }
.body { font-size: var(--t-body); line-height: 1.7; color: var(--ink-muted); }
html[lang='ar'] .body { font-size: var(--t-body-lg); line-height: 1.75; }
.cap {
  font-size: var(--t-caption);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 44em;
}
.lbl {
  font-family: var(--mono);
  font-size: var(--t-floor);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
html[lang='ar'] .lbl {
  font-family: var(--body);
  font-size: var(--t-data);
  letter-spacing: 0;
  font-weight: 600;
}
.meta {
  font-family: var(--mono);
  font-size: var(--t-data);
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}
html[lang='ar'] .meta {
  font-family: var(--body);
  font-size: var(--t-caption);
  font-weight: 400;
}
.num { font-variant-numeric: tabular-nums; }
.figure {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.strong { color: var(--ink); font-weight: 600; }
.sea { color: var(--sea-text); }
.seal { color: var(--seal); }
.amber { color: var(--amber-text); }

/* ── tables: the desktop grid, and the phone's stacked row ─────────── */
table { width: 100%; border-collapse: collapse; }
caption { text-align: start; }
th, td {
  padding: 10px 8px;
  text-align: start;
  vertical-align: baseline;
  border-bottom: 1px solid var(--ink-line);
}
th {
  font-family: var(--mono);
  font-size: var(--t-floor);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--ink-muted);
}
html[lang='ar'] th {
  font-family: var(--body);
  font-size: var(--t-data);
  letter-spacing: 0;
  font-weight: 600;
  text-transform: none;
}
td { font-size: var(--t-caption); }
tr:last-child td { border-bottom: 0; }

@media (max-width: 640px) {
  .table-stack thead { display: none; }
  .table-stack,
  .table-stack tbody,
  .table-stack tr,
  .table-stack td { display: block; width: 100%; }
  .table-stack tr {
    padding-block: 10px;
    border-bottom: 1px solid var(--ink-line);
  }
  .table-stack tr:last-child { border-bottom: 0; }
  .table-stack td {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 3px 0;
    border: 0;
  }
  .table-stack td:first-child {
    font-weight: 600;
    color: var(--ink);
    padding-block-end: 5px;
  }
  .table-stack td[colspan] { display: block; }
}

/* ── grids ──────────────────────────────────────────────────────────── */
.g2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--pad);
  align-items: start;
}
.g2.balanced { align-items: center; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gut); }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gut); }
.g5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--gut); }
@media (max-width: 1000px) {
  .g2, .g3, .g4, .g5 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .g2, .g3, .g4, .g5 { grid-template-columns: 1fr; }
}

/* ── reduced motion: the end state, always ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── components.css ─────────────────────────────────────────────────────────── */
/* Components: the four shapes, the paper, the dock, and the instruments.
   Nothing here animates layout; motion lives in motion.css. */

/* ── the letterhead ─────────────────────────────────────────────────── */
.masthead {
  position: sticky;
  top: 0;
  z-index: var(--z-masthead);
  background: var(--teak-hi);
  border-bottom: 1px solid var(--outline);
}
.masthead::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: var(--rule-origin, left);
  opacity: .18;
}
[dir='rtl'] .masthead { --rule-origin: right; }
html.js .masthead::after { animation: rule-draw var(--t-settle) var(--ease-settle) both; }
.masthead .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--masthead);
  flex-wrap: wrap;
}
.masthead.stuck { box-shadow: 0 8px 18px -14px var(--umbra); }
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--t-title);
  text-decoration: none;
}
.brand svg { width: 26px; height: 26px; }
.serial {
  font-family: var(--mono);
  font-size: var(--t-floor);
  letter-spacing: .08em;
  color: var(--ink-muted);
}
.serial b { color: var(--ink); font-weight: 600; }
.nav {
  display: flex;
  gap: 4px;
  margin-inline-start: auto;
  flex-wrap: wrap;
}
.nav a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: var(--t-label);
  padding: 7px 11px;
  border-radius: var(--r-switch);
  transition: color var(--t-press) var(--ease-press),
              background-color var(--t-press) var(--ease-press);
}
.nav a:hover { color: var(--ink); background: var(--paper-sunken); }
.tagline { font-size: var(--t-caption); color: var(--ink-muted); font-weight: 600; }

/* the view switch: a rectilinear frame, never a capsule */
.switch,
.lang {
  display: inline-flex;
  border: 1px solid var(--outline);
  border-radius: var(--r-switch);
  overflow: hidden;
  background: var(--paper);
}
.switch a,
.switch button,
.lang a {
  display: flex;
  align-items: center;
  padding: 9px 14px;
  min-height: 40px;
  font-size: var(--t-label);
  color: var(--ink-muted);
  text-decoration: none;
  border-inline-end: 1px solid var(--outline);
  transition: color var(--t-press) var(--ease-press),
              background-color var(--t-press) var(--ease-press);
}
.lang a {
  font-family: var(--mono);
  font-size: var(--t-floor);
  letter-spacing: .08em;
  padding: 6px 10px;
  min-height: 32px;
}
.switch > :last-child,
.lang > :last-child { border-inline-end: 0; }
.switch [aria-current='true'],
.switch [aria-selected='true'],
.lang [aria-current='true'] {
  background: var(--paper-sunken);
  color: var(--ink);
  font-weight: 600;
}

/* a section's name, said once */
.kick { display: inline-flex; align-items: center; gap: 10px; }
.kick::after { content: ''; width: 26px; height: 1px; background: var(--outline); }

/* ── 1 · a VERDICT: rotated, double-ringed, the only thing that tilts ── */
.stamp {
  display: inline-block;
  position: relative;
  transform: rotate(-5.2deg);
  border: 2px solid currentColor;
  border-radius: var(--r-switch);
  padding: 3px 9px;
  font-family: var(--mono);
  font-size: var(--t-data);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.5;
}
html[lang='ar'] .stamp {
  font-family: var(--body);
  font-weight: 700;
  font-size: var(--t-caption);
  letter-spacing: 0;
  text-transform: none;
}
.stamp::after {
  content: '';
  position: absolute;
  inset: 2.5px;
  border: 1px solid currentColor;
  opacity: .35;
  border-radius: 3px;
}
.stamp.saved { color: var(--sea-text); }
.stamp.leak { color: var(--seal); }
.stamp.warn { color: var(--amber-text); }
.stamp.neutral { color: var(--stamp-ink); }
.stamp.sm { font-size: var(--t-floor); padding: 1px 7px; border-width: 1.5px; transform: rotate(-2deg); }

/* ── 2 · a CHOICE: upright, ink only, never filled ──────────────────── */
.choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  isolation: isolate;
  background: transparent;
  border: 0;
  color: rgba(32, 29, 24, var(--ring-label));
  font-family: inherit;
  font-size: var(--t-label);
  font-weight: 600;
  cursor: pointer;
  transition: color var(--t-press) var(--ease-press);
}
.choice::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1.4px solid currentColor;
  opacity: var(--ring);
  border-radius: var(--r-switch);
}
.choice[aria-selected='true'] { color: var(--ink); }
.choice[aria-selected='true']::before { opacity: 1; border-width: 1.25px; }
.choice[aria-selected='true']::after {
  content: '';
  position: absolute;
  inset: 3.6px;
  border: 1.75px solid currentColor;
  border-radius: 3px;
}
.choice:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }

/* ── 3 · an ACTION: a 12px button, or a capsule ─────────────────────── */
.act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  text-decoration: none;
  cursor: pointer;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: var(--r-action);
  font-family: inherit;
  font-size: var(--t-body);
  font-weight: 600;
  transition: transform var(--t-switch) var(--ease-press),
              background-color var(--t-switch) var(--ease-press),
              color var(--t-switch) var(--ease-press);
}
.act:hover { transform: translateY(-1px); }
.act:active { transform: scale(.97); }
.act:disabled,
.act[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: .55;
  transform: none;
}
.act-2 { background: transparent; color: var(--ink); border-color: var(--outline); }
.act-2:hover { background: var(--paper); }
.act-pill { border-radius: var(--r-pill); }

/* ── paper: the voucher, its holes, its tear ────────────────────────── */
.voucher,
.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--outline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: var(--pad);
}
.voucher.holes::before,
.voucher.holes::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--desk);
  box-shadow: inset 0 1px 2px rgba(32, 29, 24, .15);
}
.voucher.holes::before { inset-inline-start: -6px; }
.voucher.holes::after { inset-inline-end: -6px; }
.tear {
  height: 1px;
  margin: 18px 0;
  border: 0;
  background: repeating-linear-gradient(
    to right,
    rgba(32, 29, 24, .3) 0 6px,
    transparent 6px 9px
  );
}

/* a ledger row */
.row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-block: 11px;
  border-bottom: 1px solid var(--ink-line);
}
.row:last-child { border-bottom: 0; }
.row .k { font-size: var(--t-caption); font-weight: 600; color: var(--ink); }
.row .k .sub {
  display: block;
  font-size: var(--t-floor);
  font-weight: 400;
  color: var(--ink-muted);
}
.row .v {
  margin-inline-start: auto;
  font-family: var(--mono);
  font-size: var(--t-caption);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
html[lang='ar'] .row .v { font-family: var(--body); }

/* a slip: the sticky footer / the receipt */
.slip {
  background: linear-gradient(to bottom, var(--paper-lift), var(--paper));
  border: 1px solid var(--outline);
  border-radius: var(--r-card);
  padding: var(--pad);
}
.slip .line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-block: 6px;
  font-size: var(--t-caption);
  font-variant-numeric: tabular-nums;
}
.slip .total {
  border-top: 1px solid var(--ink-line);
  margin-top: 8px;
  padding-top: 10px;
  font-weight: 700;
}

/* a plate: a real capture on the desk */
.plate {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--outline);
  border-radius: var(--r-card);
  padding: 8px;
  box-shadow: var(--shadow-card);
}
.plate img { border-radius: 4px; width: 100%; }
.plate figcaption { margin-top: 10px; }
.kind-pane .plate { max-width: 386px; margin-inline: auto; }
.g2 > .plate { max-width: 400px; margin-inline: auto; }

/* ── the desk's small instruments ───────────────────────────────────── */
.meter {
  height: 8px;
  border-radius: 2px;
  background: var(--paper-sunken);
  overflow: hidden;
  position: relative;
}
.meter > i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ink);
  transform: scaleX(var(--v, 0));
  transform-origin: left;
  border-radius: 2px;
}
[dir='rtl'] .meter > i { transform-origin: right; }
.meter > b {
  position: absolute;
  inset-block: -2px;
  width: 2px;
  background: var(--seal);
  inset-inline-start: var(--mark, 60%);
}
.meter.alarm > i { background: var(--seal); }
.meter.ok > i { background: var(--sea); }
.dots { display: inline-flex; gap: 5px; align-items: center; }
.dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.2px solid var(--ink-muted);
}
.dots i.done { background: var(--sea); border-color: var(--sea); }
.pearl {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sea);
  animation: pearl var(--t-inhale) ease-in-out infinite;
}

/* ── the hero: the master voucher itself ────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr .92fr;
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
}
.hero .acts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.hero .meta { margin-top: 18px; }
@media (max-width: 1000px) { .hero { grid-template-columns: 1fr; } }
.master { position: relative; }
.master .serial { position: absolute; inset-block-start: 16px; inset-inline-end: 18px; }
.master .big {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(3.2rem, 11vw, 5.4rem);
  line-height: .95;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.master .heel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.delta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: var(--t-caption);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
html[lang='ar'] .delta { font-family: var(--body); }
.delta.saved { color: var(--sea-text); }
.delta.leak { color: var(--seal); }
.kind-pane[hidden] { display: none; }

/* the hero title's word masks */
.split-line {
  display: block;
  overflow: hidden;
  padding-block: .12em;
  margin-block: -.12em;
}
.split-line > span { display: block; }
.split-line .w { display: inline-block; will-change: transform; }

/* a strip of readouts split by hairlines */
.strip { display: grid; grid-template-columns: repeat(3, 1fr); }
.strip > div { padding: 4px 12px; border-inline-end: 1px solid var(--ink-line); }
.strip > div:last-child { border-inline-end: 0; }
.strip .k { font-size: var(--t-floor); color: var(--ink-muted); }
.strip .v {
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
html[lang='ar'] .strip .v { font-family: var(--body); }

/* a real sequence gets numbered marks */
.steps .row { align-items: flex-start; gap: 14px; padding-block: 15px; }
.steps .row .k { flex: 1; }
.steps .n {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 1px solid var(--outline);
  border-radius: var(--r-switch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--t-label);
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}

/* the page's loudest type, and it is a loss */
.figure-xl {
  font-family: var(--display);
  font-weight: 600;
  line-height: .95;
  letter-spacing: 0;
  font-size: clamp(3.4rem, 12vw, 6rem);
  font-variant-numeric: tabular-nums;
  color: var(--seal);
}
.figure-xl .unit {
  font-family: var(--body);
  font-size: var(--t-label);
  font-weight: 600;
  color: var(--ink-muted);
}

.closing { max-width: 620px; margin-inline: auto; }
.kinds { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.kind-line { margin-top: 12px; }
.kind-pane { display: block; }
.phones { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.phones .plate { padding: 6px; }
@media (max-width: 420px) { .phones { grid-template-columns: 1fr; } }
.verdicts { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 16px; align-items: center; }

/* ── the dock: the page's own navigation ────────────────────────────── */
.dock {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: var(--z-dock);
  height: var(--dock);
  background: var(--teak-hi);
  border-top: 1px solid var(--outline);
  display: flex;
  align-items: flex-end;
  padding-bottom: 6px;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
}
.dock .bite {
  position: absolute;
  top: -3px;
  inset-inline-start: 50%;
  width: 62px;
  height: 62px;
  margin-inline-start: -31px;
  border-radius: 50%;
  background: var(--desk);
}
.dock .disc {
  position: absolute;
  inset-inline-start: 50%;
  bottom: calc(var(--dock) - 28px - 26px);
  width: 52px;
  height: 52px;
  margin-inline-start: -26px;
  border-radius: 50%;
  background: var(--ink-deep);
  border: 2px solid var(--brass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--disc-mark);
  box-shadow: 0 4px 10px -2px rgba(32, 29, 24, .3);
  text-decoration: none;
  transition: transform var(--t-press) var(--ease-press);
}
.dock .disc:active { transform: translateY(3px); }
.dock .berths {
  display: flex;
  width: 100%;
  max-width: 620px;
  margin-inline: auto;
  align-items: stretch;
  padding-inline: 8px;
}
.dock .berth {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 6px;
  border-radius: var(--r-switch);
  text-decoration: none;
  color: var(--ink-muted);
  font-size: var(--t-data);
  font-weight: 500;
  transition: color var(--t-press) var(--ease-press),
              background-color var(--t-press) var(--ease-press),
              transform var(--t-press) var(--ease-press);
}
.dock .berth:active { transform: scale(.96); }
.dock .berth svg { width: 22px; height: 22px; display: block; }
.dock .berth[aria-current='true'] {
  background: rgba(46, 125, 100, .10);
  color: var(--sea-text);
  font-weight: 700;
}
.dock .berth[aria-current='true'] svg { stroke-width: 2; }
.dock .notch { flex: 0 0 86px; }
.dock .mark {
  position: absolute;
  top: 6px;
  left: 0;
  width: 3px;
  height: 8px;
  border-radius: 1.5px;
  background: var(--ink);
  transform: translateX(var(--x, 0px));
  transition: transform var(--t-settle) var(--ease-spring);
}
@media (max-width: 640px) {
  .dock .berth { font-size: var(--t-floor); padding: 4px 3px; }
  .dock .berth svg { width: 20px; height: 20px; }
}

/* ── the cockpit ────────────────────────────────────────────────────── */
.stat {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--ink-line);
  border: 1px solid var(--outline);
  border-radius: var(--r-card);
  overflow: hidden;
}
.stat > div { background: var(--paper); padding: var(--gut); }
.stat .v {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.prime {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: var(--pad);
  align-items: start;
}
.big {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.8rem, 9vw, 5.6rem);
  line-height: .95;
  font-variant-numeric: tabular-nums;
}
.state {
  border: 1px dashed var(--outline);
  border-radius: var(--r-card);
  padding: var(--pad);
  background: var(--paper);
}
.source {
  border: 1px dashed var(--outline);
  border-radius: var(--r-card);
  padding: 12px 16px;
  background: var(--paper);
}
.source summary {
  cursor: pointer;
  font-size: var(--t-caption);
  font-weight: 600;
  color: var(--ink-muted);
  list-style-position: inside;
}
.source .cap { margin-top: 10px; }
.colophon {
  background: var(--paper-lift);
  color: var(--ink);
  border-block: 1px solid var(--outline);
}
.colophon .wrap {
  padding-block: 34px 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  align-items: center;
}
.colophon svg { width: 22px; height: 22px; }
.colophon .cap, .colophon .meta { color: var(--ink-muted); }
@media (max-width: 1000px) {
  .prime { grid-template-columns: 1fr; }
  .stat { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .stat { grid-template-columns: 1fr; }
  .nav, .tagline { display: none; }
}

/* ── a printed skeleton: never a spinner-first page ────────────────── */
.skeleton-page {
  padding-block: var(--sect);
  display: grid;
  gap: 18px;
}
.sk {
  display: block;
  background: var(--paper);
  border: 1px solid var(--outline);
  border-radius: var(--r-card);
  overflow: hidden;
}
.sk-line,
.sk-bone {
  background: var(--paper-sunken);
  border-radius: 3px;
  animation: skeleton-breathe var(--t-inhale) ease-in-out infinite;
}
.sk-line { height: 12px; }
.sk-line.lg { height: 26px; }
.sk-line.xl { height: 58px; width: 42%; }
.sk-bone { height: 88px; }
.sk-inner { padding: var(--pad); display: grid; gap: 12px; }
.sk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 640px) { .sk-grid { grid-template-columns: 1fr; } }

/* ── the boot and scroll markers (motion hooks) ────────────────────── */
[data-boot] { --boot: 0; }
[data-stamp] { transform-origin: center; }

/* ── print ──────────────────────────────────────────────────────────── */
@media print {
  .masthead, .dock, .skip, .act, .sheet, .toast { display: none !important; }
  body { background: #fff; padding: 0; }
  .band, .colophon { background: #fff; }
  a { text-decoration: none; }
}

/* ── landing.css ─────────────────────────────────────────────────────────── */
/* «السجلّ» — the new landing composition.
   A ledger, not a page: a register spine on the reading edge, five folios,
   one press-stamped cover. Dockless by design. The shared tokens, type and
   four shapes come from tokens.css / base.css / components.css. */

body.has-reg { padding-bottom: 0; }

/* ── the register: the folio index, on the reading edge ─────────────────── */
.reg-nav {
  position: fixed;
  inset-inline-start: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: none;
}
.reg-nav ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  padding-inline-start: 14px;
}
.reg-nav ol::before {
  content: '';
  position: absolute;
  inset-block: 8px;
  inset-inline-start: 0;
  width: 1px;
  background: var(--outline);
}
.reg-nav a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  text-decoration: none;
  color: var(--ink-muted);
  font-size: var(--t-data);
  line-height: 1.4;
  transition: color var(--t-press) var(--ease-press);
}
.reg-nav .n {
  font-family: var(--mono);
  font-size: var(--t-floor);
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
  width: 2.4em;
}
.reg-nav .k { white-space: nowrap; }
.reg-nav a[aria-current='true'] { color: var(--ink); font-weight: 700; }
.reg-nav a:hover { color: var(--ink); }
.reg-nav .reg-mark {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 3px;
  height: 14px;
  border-radius: 1.5px;
  background: var(--ink);
  transform: translateY(var(--y, 0px));
  transition: transform var(--t-settle) var(--ease-spring);
  pointer-events: none;
}
@media (min-width: 1100px) {
  .reg-nav { display: block; }
  .landing .wrap, .landing .masthead .wrap { max-width: 1120px; padding-inline-start: calc(var(--gut) + 84px); }
}

/* the phone's register: a sticky rail under the letterhead, the same index */
@media (max-width: 1099px) {
  .reg-nav {
    display: block;
    position: sticky;
    top: var(--masthead);
    inset-inline-start: auto;
    transform: none;
    background: var(--desk);
    border-bottom: 1px solid var(--outline);
    z-index: 29;
  }
  .reg-nav ol {
    flex-direction: row;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 var(--gut);
    position: relative;
  }
  .reg-nav ol::-webkit-scrollbar { display: none; }
  .reg-nav ol::before { display: none; }
  .reg-nav a {
    flex: 0 0 auto;
    padding: 9px 12px;
    border-inline-end: 1px solid var(--ink-line);
    min-height: 40px;
  }
  .reg-nav a:last-child { border-inline-end: 0; }
  .reg-nav a[aria-current='true'] { background: var(--paper-sunken); }
  .reg-nav .k { display: none; }
  .reg-nav .reg-mark {
    top: auto;
    bottom: 0;
    inset-inline-start: 0;
    width: 18px;
    height: 3px;
    transform: translateX(var(--x, 0px));
  }
}

/* ── the folio: one entry in the ledger ─────────────────────────────────── */
.folio {
  padding-block: clamp(52px, 8vw, 110px);
  border-top: 1px solid var(--outline);
}
.folio:first-of-type { border-top: 0; }
.folio > .wrap { display: block; }
.folio-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(22px, 3vw, 34px);
}
.folio-head .n {
  font-family: var(--mono);
  font-size: var(--t-floor);
  letter-spacing: .08em;
  color: var(--ink-muted);
  border: 1px solid var(--outline);
  border-radius: var(--r-switch);
  padding: 2px 7px;
  font-variant-numeric: tabular-nums;
}
.folio-head .k { font-size: var(--t-label); font-weight: 700; }
.folio-head .rule {
  flex: 1;
  height: 1px;
  background: var(--outline);
  transform: scaleX(var(--draw, 1));
  transform-origin: var(--rule-origin, left);
}
[dir='rtl'] .folio-head { --rule-origin: right; }

/* ── the cover ──────────────────────────────────────────────────────────── */
.landing .cover { padding-block: clamp(36px, 6vw, 80px) clamp(52px, 8vw, 110px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: clamp(26px, 6vw, 88px);
  align-items: center;
}
.hero-copy { min-width: 0; }
.kicker {
  font-family: var(--mono);
  font-size: var(--t-data);
  letter-spacing: .04em;
  color: var(--ink-muted);
  margin-bottom: 20px;
}
html[lang='ar'] .kicker { font-family: var(--body); letter-spacing: 0; font-size: var(--t-caption); font-weight: 600; }
.display {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(3.1rem, 8.4vw, 6.6rem);
  line-height: 1.06;
  letter-spacing: 0;
  margin-bottom: 22px;
}
html[lang='en'] .display { letter-spacing: -.035em; }
.hero-copy .lede { max-width: 32em; }
.hero-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.hero-meta { margin-top: 18px; }

.hero-stage { position: relative; min-width: 0; }
.cover-slip {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--outline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-deep);
  padding: clamp(40px, 4.6vw, 56px) clamp(20px, 3vw, 32px) clamp(20px, 3vw, 32px);
  transform-origin: 50% 60%;
}
.cover-slip .serial { position: absolute; inset-block-start: 16px; inset-inline-end: 18px; }
.cover-slip .lbl { margin-top: 4px; }
.cover-slip .big {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(3rem, 8vw, 5.2rem);
  line-height: .95;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  margin-top: 8px;
}
.cover-slip .heel {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.cover-slip .meter { margin-top: 10px; }
.cover-slip .row { padding-block: 10px; }
.cover-slip .meta { margin-top: 12px; }

/* the stamper: the mark above the cover, in its two separable pieces */
.press {
  --w: 150px;
  position: absolute;
  top: calc(-1 * var(--w) * .62);
  inset-inline-start: 50%;
  width: var(--w);
  height: var(--w);
  margin-inline-start: calc(var(--w) / -2);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 14px 18px rgba(32, 29, 24, .22));
}
.press svg { display: block; width: 100%; height: 100%; }
.press .mk { fill: var(--ink); }
.press .im { fill: var(--sea); }
.press-print { position: absolute; inset: 0; opacity: 0; }

/* ── the sale: four books, one line ─────────────────────────────────────── */
.folio h2 { max-width: 22em; }
.flow {
  display: grid;
  grid-template-columns: 1fr 56px 1fr 56px 1fr 56px 1fr;
  align-items: stretch;
  gap: 0;
  margin-top: clamp(24px, 4vw, 42px);
}
.flow .node {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 16px 18px;
  background: var(--paper);
  border: 1px solid var(--outline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.flow .node .n {
  font-family: var(--mono);
  font-size: var(--t-floor);
  letter-spacing: .08em;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.flow .node b { font-size: var(--t-body); }
.flow .node span { font-size: var(--t-caption); color: var(--ink-muted); line-height: 1.55; }
.flow .wire {
  align-self: center;
  height: 2px;
  background: var(--sea);
  opacity: .55;
  transform: scaleX(var(--wire, 1));
  transform-origin: var(--wire-origin, left);
}
[dir='rtl'] .flow .wire { --wire-origin: right; }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; }
  .flow .wire { width: 2px; height: 28px; justify-self: center; transform: scaleY(var(--wire, 1)); transform-origin: top; }
}
.plates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gut);
  margin-top: clamp(22px, 3vw, 34px);
}
.plates .plate { padding: 6px; }
.plates .plate img { border-radius: 4px; }
.plates .plate figcaption { padding: 2px 4px 6px; }
@media (max-width: 720px) { .plates { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .plates { grid-template-columns: 1fr; } }

/* ── the loss ───────────────────────────────────────────────────────────── */
.folio.gap .figure-xl { margin-top: clamp(18px, 3vw, 30px); }
.seal-strike {
  display: inline-block;
  margin-top: 10px;
  color: var(--seal);
  border: 3px solid var(--seal);
  border-radius: var(--r-switch);
  padding: 6px 18px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  transform: rotate(-5.2deg);
}
.gap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(22px, 4vw, 48px);
  align-items: center;
  margin-top: clamp(24px, 4vw, 40px);
}
.gap-grid .voucher { box-shadow: var(--shadow-deep); }
@media (max-width: 900px) { .gap-grid { grid-template-columns: 1fr; } }

/* ── the deadline ───────────────────────────────────────────────────────── */
.stamp-row { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: clamp(22px, 3vw, 34px); align-items: center; }
.stamp-row .stamp { font-size: clamp(1rem, 2vw, 1.35rem); padding: 7px 16px; }
.stamp-row .stamp:nth-child(2n) { --stamp-rotate: 2.5deg; transform: rotate(2.5deg); }
.stamp-row .stamp:nth-child(3n) { --stamp-rotate: -3.2deg; transform: rotate(-3.2deg); }
.deadline-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(22px, 4vw, 48px);
  align-items: center;
  margin-top: clamp(24px, 4vw, 40px);
}
@media (max-width: 900px) { .deadline-grid { grid-template-columns: 1fr; } }

/* ── the ask ────────────────────────────────────────────────────────────── */
.ask-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(22px, 4vw, 48px);
  align-items: center;
}
.ask-grid .voucher { padding: clamp(22px, 3.4vw, 38px); }
.price {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: .95;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  margin-top: 10px;
}
.price .cur { font-family: var(--body); font-size: .24em; font-weight: 600; color: var(--ink-muted); letter-spacing: 0; }
.ask-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
@media (max-width: 900px) { .ask-grid { grid-template-columns: 1fr; } }

/* ── the anchor's scroll offset and the rule that draws ─────────────────── */
.folio[id] { scroll-margin-top: calc(var(--masthead) + 56px); }
[data-rule] {
  transform: scaleX(var(--draw, 1));
  transform-origin: var(--rule-origin, left);
}
[dir='rtl'] [data-rule] { --rule-origin: right; }
@supports (animation-timeline: view()) {
  [data-rule] {
    animation: rule-grow linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 30%;
  }
}
@keyframes rule-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* the mark is the brand, not the motion: with no JS it is shown composed */
html:not(.js) .press,
html:not(.js) .press-print { opacity: 1; }

/* ── small screens ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stage { max-width: 520px; margin-inline: auto; width: 100%; margin-top: clamp(40px, 9vw, 64px); }
  .cover-slip .big { font-size: clamp(2.8rem, 12vw, 4.6rem); }
}
@media (max-width: 640px) {
  .display { font-size: clamp(2.7rem, 13vw, 4.4rem); }
  .press { --w: 112px; }
  .folio { padding-block: 44px; }
  /* a wide stamp tilted five degrees walks off a 390px desk: keep the
     verdict, soften the tilt, and give the row its own margins */
  .stamp-row { flex-direction: column; align-items: flex-start; gap: 10px; padding-inline: 12px; }
  .stamp-row .stamp { transform: rotate(-2deg); }
  .stamp-row .stamp:nth-child(2n) { transform: rotate(1.5deg); }
  .seal-strike { transform: rotate(-3deg); }
}

/* ── reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .press { opacity: 1 !important; }
  .press-print { opacity: 1 !important; }
  .seal-strike, .stamp-row .stamp { opacity: 1 !important; }
  .flow .wire { transform: none !important; }
  .folio-head .rule, [data-rule] { transform: none !important; }
}

/* ── motion.css ─────────────────────────────────────────────────────────── */
/* Motion: one choreography language.
   - Load choreography runs through shared/motion.js (WAAPI).
   - Scroll choreography runs through CSS view timelines where supported,
     and falls back to one IntersectionObserver in shared/motion.js.
   - Nothing here animates layout. */

@keyframes rule-draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes sanad-rise {
  from { opacity: .001; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes sanad-press-in {
  0% { opacity: 0; transform: translateY(-26px) scale(.98); }
  55% { opacity: 1; transform: translateY(0) scale(1); }
  72% { transform: translateY(0) scale(1.015); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes sanad-stamp-land {
  0% { opacity: 0; transform: scale(2.2) rotate(6deg); }
  100% { opacity: 1; transform: scale(1) rotate(var(--stamp-rotate, -5.2deg)); }
}

@keyframes sanad-stamp-land-sm {
  0% { opacity: 0; transform: scale(2.2) rotate(6deg); }
  100% { opacity: 1; transform: scale(1) rotate(-2deg); }
}

@keyframes sanad-dot-fill {
  from { opacity: .001; transform: scale(.4); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes sanad-tick-land {
  0% { transform: scaleY(.4); opacity: .4; }
  60% { transform: scaleY(1.2); opacity: 1; }
  100% { transform: scaleY(1); opacity: 1; }
}

@keyframes skeleton-breathe {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

@keyframes pearl {
  0%, 100% { opacity: .55; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes sanad-page-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-6px); }
}

@keyframes sanad-page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes sanad-sheet-in {
  from { opacity: .001; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── the load choreography's hidden-until-ready state ─────────────────
   The inline head script adds `js`; a 1.5s fail-safe removes it if
   shared/motion.js never marks itself ready. The headline is NEVER hidden:
   it is the page's largest paint and must not wait for a module. */
html.js [data-motion] { opacity: 0; }

/* ── scroll choreography: CSS view timelines ────────────────────────── */
@supports (animation-timeline: view()) {
  [data-reveal] {
    animation: sanad-rise linear both;
    animation-timeline: view();
    animation-range: entry 6% cover 24%;
  }
  [data-reveal="late"] {
    animation-range: entry 2% cover 20%;
  }
  [data-stamp] {
    animation: sanad-stamp-land linear both;
    animation-timeline: view();
    animation-range: entry 12% cover 32%;
  }
  [data-stamp].sm {
    animation-name: sanad-stamp-land-sm;
  }
}

/* ── the dock's one moving part ────────────────────────────────────── */
/* The transform transition lives in components.css; reduced motion zeroes
   it through the global policy. */

/* ── page transitions (cross-document, progressive) ─────────────────── */
@view-transition { navigation: auto; }
.masthead { view-transition-name: masthead; }
.dock { view-transition-name: dock; }
.disc { view-transition-name: disc; }
.prime-instrument { view-transition-name: prime-instrument; }

::view-transition-old(root) {
  animation: sanad-page-out var(--t-switch) var(--ease-settle) both;
}
::view-transition-new(root) {
  animation: sanad-page-in var(--t-sheet) var(--ease-settle) both;
}
::view-transition-old(disc),
::view-transition-new(disc) {
  animation-duration: var(--t-settle);
}

/* ── reduced motion: the end state, always ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html.js [data-motion] { opacity: 1 !important; }
  [data-reveal],
  [data-stamp],
  .press-in,
  .pearl,
  .sk-line,
  .sk-bone {
    animation: none !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  [data-stamp] { opacity: 1 !important; }
  .dock .mark { transition: none !important; }
  ::view-transition-old(root),
  ::view-transition-new(root),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
