@import url("https://fonts.googleapis.com/css2?family=Zilla+Slab:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap");
/* the Persian edition, kept in its own request so a failure here cannot take
   the Latin faces down with it */
@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap");

/* =========================================================================
   Eqlid Sugar — export design system
   "A mill's dossier, built out of cubes."
   Tokens → base → layout → components → responsive → preferences
   ========================================================================= */

:root {
  /* colour — the sugar-beet chain, never blue */
  --paper: #FBFAF7;
  --mist: #EDEEEA;
  --ink: #241A28;
  --ink-soft: #5A4F5C;
  --ink-raised: #302335;
  --ink-rule: #4A3D4E;
  --ink-text: #E7DFE9;
  --ink-text-soft: #C6BCC8;
  --beet: #7A1F3D;
  --beet-deep: #55132A;
  --beet-soft: #F3E7EB;
  --olive: #63705C;
  --amber: #C08A2E;
  --amber-soft: #F5EBD9;
  --rule: #DCD9D3;

  /* type */
  --font-head: "Zilla Slab", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --step-h1: clamp(2.05rem, 1.35rem + 3.1vw, 3.9rem);
  --step-h2: clamp(1.55rem, 1.2rem + 1.6vw, 2.35rem);
  --step-h3: clamp(1.12rem, 1.02rem + 0.5vw, 1.4rem);
  --step-lead: clamp(1.06rem, 1rem + 0.45vw, 1.28rem);
  --step-body: 1.0625rem;
  --step-data: 0.78rem;

  /* space + structure */
  --gap: 1.25rem;
  --gap-l: 2rem;
  --band: clamp(3rem, 2rem + 5vw, 5.75rem);
  --shell: 76rem;
  --rail: 10rem;
  --rail-gap: 3rem;
  --edge: 1.25rem;
  --radius: 2px;
  --cut: 20px;
  --speed: 150ms;
}

/* ---------------------------------------------------------------- base -- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.65;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

h1 { font-size: var(--step-h1); line-height: 1.06; font-weight: 700; }
h2 { font-size: var(--step-h2); line-height: 1.15; }
h3 { font-size: var(--step-h3); line-height: 1.3; }
h4 { font-size: 1rem; line-height: 1.35; }

p { margin: 0 0 1em; overflow-wrap: break-word; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--beet);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color var(--speed) ease, text-decoration-color var(--speed) ease;
}
a:hover { color: var(--beet-deep); text-decoration-color: var(--amber); }

ul, ol { margin: 0 0 1em; padding-inline-start: 1.1rem; }
li { margin-bottom: 0.35em; }

strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--rule); margin: var(--gap-l) 0; }
svg { display: block; }

:focus-visible {
  outline: 2px solid var(--beet);
  outline-offset: 2px;
  border-radius: var(--radius);
}

::selection { background: var(--beet-soft); color: var(--ink); }

/* ----------------------------------------------------------- utilities -- */

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

.skip-link {
  position: absolute;
  inset-inline-start: var(--edge);
  top: -4rem;
  z-index: 60;
  background: var(--beet);
  color: var(--paper);
  font-family: var(--font-data);
  font-size: var(--step-data);
  letter-spacing: 0.06em;
  padding: 0.7rem 1rem;
  text-decoration: none;
  transition: top var(--speed) ease;
}
.skip-link:focus { top: 0.6rem; color: var(--paper); }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--edge);
}

.mono {
  font-family: var(--font-data);
  font-size: var(--step-data);
  letter-spacing: 0.06em;
  font-weight: 500;
}

.muted { color: var(--ink-soft); }
.lead { font-size: var(--step-lead); line-height: 1.55; color: var(--ink-soft); max-width: 46ch; }
.rule-line { height: 1px; background: var(--rule); border: 0; }

/* -------------------------------------------------------------- header -- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.masthead__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--gap);
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 26px; height: 30px; flex: 0 0 auto; }
.brand__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.05;
  letter-spacing: 0.01em;
  display: block;
}
.brand__sub {
  font-family: var(--font-data);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive);
  display: block;
}

.masthead__actions { display: flex; align-items: center; gap: 0.6rem; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-data);
  font-size: var(--step-data);
  letter-spacing: 0.06em;
  min-height: 44px;
  padding: 0 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--speed) ease, color var(--speed) ease;
}
.nav-toggle:hover { background: var(--ink); color: var(--paper); }
.nav-toggle__bars { display: grid; gap: 3px; }
.nav-toggle__bars span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
}

#site-nav {
  display: none;
  flex: 0 0 100%;
  border-top: 1px solid var(--rule);
  padding-block: 0.5rem 1rem;
}
#site-nav[data-open="true"] { display: block; }

.nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.nav__list li { margin: 0; }

.nav__link {
  display: block;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-data);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
}
.nav__link:hover { color: var(--beet); }
.nav__link[aria-current="page"] { color: var(--beet); font-weight: 500; }

/* ------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0 1.15rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-data);
  font-size: var(--step-data);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--speed) ease, color var(--speed) ease,
              border-color var(--speed) ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }

.btn--primary {
  background: var(--beet);
  border-color: var(--beet);
  color: var(--paper);
}
.btn--primary:hover { background: var(--beet-deep); border-color: var(--beet-deep); color: var(--paper); }

.btn--ghost { border-color: var(--rule); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.btn--small { min-height: 38px; padding: 0 0.8rem; font-size: 0.72rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ------------------------------------------------------ section + rail -- */

.section { border-top: 1px solid var(--rule); }
.section:first-of-type { border-top: 0; }
.section--tint { background: var(--mist); }

.section__inner {
  position: relative;
  padding-block: var(--band);
  display: grid;
  gap: var(--gap-l);
}

/* the binder tab: a lowercase mono marker on a short rule, never an eyebrow */
.section__tag {
  font-family: var(--font-data);
  font-size: var(--step-data);
  letter-spacing: 0.1em;
  color: var(--beet);
  text-transform: lowercase;
  margin: 0;
}

.section__head { max-width: 58ch; }
.section__head h2 { position: relative; padding-bottom: 0.4rem; }
.section__head h2::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 2px;
  background: var(--beet);
  margin-top: 0.55rem;
}

.section__body > *:first-child { margin-top: 0; }
.section__body > * + .btn-row,
.section__body > * + .chips,
.section__body > * + .table-scroll,
.section__body > * + .route-art,
.section__body > * + h3 { margin-top: 1.75rem; }
.section__body > .chips + *,
.section__body > .route-art + * { margin-top: 1.5rem; }

/* ------------------------------------------------------ the ink band ---- */

.section--ink { background: var(--ink); color: var(--ink-text); }
.section--ink h2,
.section--ink h3,
.section--ink h4 { color: var(--paper); }
.section--ink .lead,
.section--ink .muted { color: var(--ink-text-soft); }
.section--ink a { color: var(--amber); }
.section--ink a:hover { color: var(--paper); text-decoration-color: var(--paper); }
.section--ink .section__tag { color: var(--amber); }
.section--ink .section__head h2::after { background: var(--amber); }
.section--ink .panel { background: var(--ink-raised); color: var(--ink-text); }
.section--ink .panel p { color: var(--ink-text-soft); }
.section--ink .panel--line { background: transparent; border-color: var(--ink-rule); }
.section--ink .panel--beet { background: var(--beet); }
.section--ink .panel--beet p { color: #F0DCE2; }
.section--ink .panel__doc { color: var(--amber); }
.section--ink .card { background: var(--ink-raised); border-color: var(--ink-rule); }
.section--ink .card p { color: var(--ink-text-soft); }
.section--ink .card:hover { border-color: var(--amber); }
.section--ink .chip { border-color: var(--ink-rule); color: var(--ink-text-soft); }
.section--ink .row,
.section--ink .stage,
.section--ink .strip__row { border-color: var(--ink-rule); }
.section--ink .row__text,
.section--ink .stage__text { color: var(--ink-text-soft); }
.section--ink .strip__label,
.section--ink .stage__icon { color: var(--amber); }
.section--ink .btn { border-color: #6C5D70; color: var(--paper); }
.section--ink .btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.section--ink .btn--primary { background: var(--beet); border-color: var(--beet); color: var(--paper); }
.section--ink .btn--primary:hover { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.section--ink :focus-visible { outline-color: var(--amber); }

/* ---------------------------------------------------------------- hero -- */

.hero { border-bottom: 1px solid var(--rule); }
.hero__grid { display: grid; gap: var(--gap-l); align-items: center; }
.hero__copy { max-width: 46ch; }
.hero h1 { max-width: 16ch; }
.hero .lead { max-width: 52ch; margin-top: 1.25rem; }
.hero__actions { margin-top: 1.75rem; }

/* the crystal lattice: a drawn ground for the artwork, no image involved */
.hero__plate {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(0.9rem, 0.5rem + 1.8vw, 2rem);
}
.hero__plate::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(30deg, transparent 0 25px, var(--rule) 25px 26px),
    repeating-linear-gradient(-30deg, transparent 0 25px, var(--rule) 25px 26px);
  opacity: 0.6;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}

.hero__art {
  position: relative;
  width: 100%;
  max-width: 26rem;
  margin-inline: auto;
  height: auto;
}

/* isometric drawing parts, coloured here so no SVG carries an inline style */
.iso__top { fill: var(--paper); stroke: var(--beet); stroke-width: 1.25; }
.iso__left { fill: var(--beet-soft); stroke: var(--beet); stroke-width: 1.25; }
.iso__right { fill: var(--amber-soft); stroke: var(--beet); stroke-width: 1.25; }
.iso__ground { stroke: var(--rule); stroke-width: 1; }
.iso__hint { stroke: var(--olive); stroke-width: 1; fill: none; stroke-dasharray: 3 4; }
.iso__line {
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.iso__solid { fill: var(--beet-soft); stroke: var(--beet); stroke-width: 1.25; stroke-linejoin: round; }
.iso__accent { fill: none; stroke: var(--amber); stroke-width: 1.4; stroke-linecap: round; }
.section--ink .iso__line { stroke: var(--ink-text-soft); }
.section--ink .iso__ground { stroke: var(--ink-rule); }

/* the trade route drawing: works → container → quay → buyer */
.route-art {
  width: 100%;
  max-width: 56rem;
  height: auto;
  margin-inline: auto;
}

/* -------------------------------------------------------- data strip ---- */

.strip { display: grid; gap: 0; }
.strip__row {
  display: grid;
  gap: 0.15rem 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}
.strip__row:last-child { border-bottom: 1px solid var(--rule); }
.strip__label {
  font-family: var(--font-data);
  font-size: var(--step-data);
  letter-spacing: 0.1em;
  color: var(--olive);
  text-transform: uppercase;
}
.strip__value { font-size: 1rem; margin: 0; }

/* the third column: the page on this site that backs the claim up */
.strip__proof {
  font-family: var(--font-data);
  font-size: var(--step-data);
  letter-spacing: 0.06em;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.1rem;
  white-space: nowrap;
  justify-self: start;
}
.strip__proof:hover { border-bottom-color: var(--beet); }

/* --------------------------------------------------------- ruled rows -- */

.rows { display: grid; }
.row {
  display: grid;
  gap: 0.4rem 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.row:last-child { border-bottom: 1px solid var(--rule); }
.row__mark { width: 26px; height: 30px; color: var(--beet); }
.row__title { margin: 0; font-size: var(--step-h3); font-family: var(--font-head); font-weight: 600; }
.row__text { margin: 0; color: var(--ink-soft); max-width: 62ch; }

/* ------------------------------------------------------------- stages -- */

.stages { display: grid; gap: 0; }
.stage {
  padding: 1.4rem 0;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 0.5rem;
  align-content: start;
}
.stage:last-child { border-bottom: 1px solid var(--rule); }
.stage__icon { width: 34px; height: 34px; color: var(--olive); }
.stage__icon * { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.stage__name { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; margin: 0; }
.stage__name .mono { display: block; color: var(--beet); margin-bottom: 0.15rem; }
.stage__text { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

/* -------------------------------------------------------------- panels -- */

.panels { display: grid; gap: var(--gap); }

.panel {
  background: var(--mist);
  padding: clamp(1.25rem, 1rem + 1.2vw, 2rem);
  display: grid;
  gap: 0.75rem;
  align-content: start;
}
.panel h3 { margin: 0; }
.panel p { color: var(--ink-soft); }
.panel--cut {
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.panel--line { background: transparent; border: 1px solid var(--rule); }
.panel--beet { background: var(--beet); color: var(--paper); }
.panel--beet h3 { color: var(--paper); }
.panel--beet p { color: #F0DCE2; }
.panel--beet a { color: var(--paper); }

.panel__doc { width: 40px; height: 46px; color: var(--beet); }
.panel__doc * { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; }
.panel--beet .panel__doc { color: var(--amber); }

/* --------------------------------------------------------------- cards -- */

.cards { display: grid; gap: var(--gap); }
.card {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 1.35rem;
  display: grid;
  gap: 0.6rem;
  align-content: start;
  transition: border-color var(--speed) ease;
}
.card:hover { border-color: var(--ink); }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }
.card__foot { margin-top: 0.4rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; margin: 0; padding: 0; }
.chip {
  display: inline-block;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.3rem 0.6rem;
  font-family: var(--font-data);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 0;
}

/* -------------------------------------------------------------- tables -- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 34rem;
}
.spec caption {
  text-align: start;
  font-family: var(--font-data);
  font-size: var(--step-data);
  letter-spacing: 0.08em;
  color: var(--olive);
  padding-bottom: 0.6rem;
}
.spec th, .spec td {
  border-bottom: 1px solid var(--rule);
  padding-block: 0.7rem;
  padding-inline: 0 0.9rem;
  text-align: start;
  vertical-align: top;
}
.spec thead th {
  background: var(--mist);
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-data);
  font-size: var(--step-data);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-inline-start: 0.9rem;
}
.spec tbody th { font-weight: 500; padding-inline-start: 0.9rem; }
.spec td.spec__unit, .spec td.spec__value { font-family: var(--font-data); font-size: 0.85rem; }
.spec tbody tr:hover { background: var(--beet-soft); }

.section--ink .spec caption { color: var(--amber); }
.section--ink .spec thead th { background: var(--ink-raised); color: var(--paper); border-bottom-color: var(--amber); }
.section--ink .spec th, .section--ink .spec td { border-bottom-color: var(--ink-rule); }
.section--ink .spec tbody tr:hover { background: var(--ink-raised); }

/* --------------------------------------------------------------- forms -- */

.form { display: grid; gap: var(--gap); max-width: 40rem; }
.form__grid { display: grid; gap: var(--gap); }

.form__field { display: grid; gap: 0.35rem; }
.form__label {
  font-family: var(--font-data);
  font-size: var(--step-data);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive);
}
.form__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
  min-height: 46px;
  transition: border-color var(--speed) ease, box-shadow var(--speed) ease;
}
textarea.form__input { min-height: 8rem; resize: vertical; line-height: 1.55; }
select.form__input { appearance: none; background-image: none; }
.form__input::placeholder { color: #9A93A0; }
.form__input:hover { border-color: var(--ink-soft); }
.form__input:focus-visible { border-color: var(--beet); outline: 2px solid var(--beet); outline-offset: 1px; }

.form__hint { font-family: var(--font-data); font-size: 0.72rem; color: var(--ink-soft); margin: 0; }

.form__field[data-state="error"] .form__input { border-color: var(--beet); box-shadow: inset 3px 0 0 var(--beet); }
.form__field[data-state="error"] .form__label { color: var(--beet); }
.form__field[data-state="ok"] .form__input { border-color: var(--olive); }

.form__status {
  font-family: var(--font-data);
  font-size: var(--step-data);
  letter-spacing: 0.04em;
  margin: 0;
  min-height: 1.4em;
  color: var(--ink-soft);
}
.form__status[data-state="error"] { color: var(--beet); }
.form__status[data-state="sent"] { color: var(--olive); }

.section--ink .form__label { color: var(--amber); }
.section--ink .form__hint,
.section--ink .form__status { color: var(--ink-text-soft); }
.section--ink .form__input { background: var(--ink-raised); border-color: var(--ink-rule); color: var(--ink-text); }
.section--ink .form__input::placeholder { color: #8E7F92; }

/* -------------------------------------------------------------- footer -- */

.site-footer {
  background: var(--ink);
  color: #CEC5D0;
  border-top: 4px solid var(--beet);
  padding-block: var(--band) 2rem;
  font-size: 0.95rem;
}
.site-footer h2, .site-footer h3 { color: var(--paper); }
.site-footer a { color: #CEC5D0; text-decoration: none; }
.site-footer a:hover { color: var(--amber); text-decoration: underline; }

.footer__grid { display: grid; gap: var(--gap-l); }
.footer__brand { display: grid; gap: 0.75rem; align-content: start; max-width: 32ch; }
.footer__brand .brand__name, .footer__brand .brand { color: var(--paper); }
.footer__col h3 {
  font-family: var(--font-data);
  font-size: var(--step-data);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 0.75rem;
}
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer__list li { margin: 0; }

.footer__base {
  margin-top: var(--gap-l);
  padding-top: 1.25rem;
  border-top: 1px solid var(--ink-rule);
  display: grid;
  gap: 0.5rem;
  font-family: var(--font-data);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}
.footer__credit { color: var(--paper); }

/* ------------------------------------------------- styleguide helpers --- */

.swatches { display: grid; gap: var(--gap); }
.swatch { border: 1px solid var(--rule); display: grid; }
.swatch__chip { height: 5.5rem; }
.swatch__chip--paper { background: var(--paper); border-bottom: 1px solid var(--rule); }
.swatch__chip--mist { background: var(--mist); }
.swatch__chip--ink { background: var(--ink); }
.swatch__chip--beet { background: var(--beet); }
.swatch__chip--olive { background: var(--olive); }
.swatch__chip--amber { background: var(--amber); }
.swatch__chip--rule { background: var(--rule); }
.swatch__meta { padding: 0.75rem; display: grid; gap: 0.15rem; }
.swatch__meta code { font-family: var(--font-data); font-size: 0.78rem; color: var(--ink); }
.swatch__meta span { font-size: 0.85rem; color: var(--ink-soft); }

.specimen { border-top: 1px solid var(--rule); padding: 1.1rem 0; display: grid; gap: 0.3rem; }
.specimen__note { font-family: var(--font-data); font-size: 0.72rem; color: var(--olive); letter-spacing: 0.06em; }

/* --------------------------------------------------------- responsive -- */

@media (min-width: 30em) {
  .form__grid--two { grid-template-columns: 1fr 1fr; }
  .strip__row { grid-template-columns: 12rem minmax(0, 1fr); align-items: baseline; }
}

@media (min-width: 40em) {
  .section__inner { gap: 2.5rem; }
  .row { grid-template-columns: 26px minmax(0, 1fr); }
  .row__title { grid-column: 2; }
  .row__text { grid-column: 2; }
  .stages { grid-template-columns: 1fr 1fr; gap: 0 var(--gap-l); }
  .stage:nth-child(2) { border-top: 1px solid var(--rule); }
  .panels--two { grid-template-columns: 1fr 1fr; }
  .cards--two { grid-template-columns: 1fr 1fr; }
  .cards--three { grid-template-columns: 1fr 1fr; }
  .swatches { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 52em) {
  :root { --edge: 2rem; }
  .nav-toggle { display: none; }
  .masthead__bar {
    min-height: 5rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 2rem;
  }
  #site-nav {
    display: block;
    border-top: 0;
    padding-block: 0;
    grid-column: 2;
    grid-row: 1;
  }
  .masthead .brand { grid-column: 1; grid-row: 1; }
  .masthead__actions { grid-column: 3; grid-row: 1; }
  .nav__list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 1.35rem; }
  .nav__link { border-bottom: 2px solid transparent; padding: 0.35rem 0; }
  .nav__link:hover { border-bottom-color: var(--rule); }
  .nav__link[aria-current="page"] { border-bottom-color: var(--beet); }
  .strip__row { grid-template-columns: 11rem minmax(0, 1fr) auto; }
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; gap: 3rem; }
  .hero__copy { max-width: none; }
  .stages { grid-template-columns: repeat(4, 1fr); }
  .stage:nth-child(n) { border-top: 1px solid var(--rule); }
  .cards--three { grid-template-columns: repeat(3, 1fr); }
  .swatches { grid-template-columns: repeat(4, 1fr); }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .form__grid--three { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 64em) {
  .section__inner {
    grid-template-columns: var(--rail) minmax(0, 1fr);
    column-gap: var(--rail-gap);
  }
  /* the spine: one hairline running the height of every section, in the
     gutter between the binder tab and the content — a ruled margin */
  .section__inner::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    inset-inline-start: calc(var(--rail) + (var(--rail-gap) / 2));
    width: 1px;
    background: var(--rule);
  }
  .section--ink .section__inner::before { background: var(--ink-rule); }
  .section__tag {
    grid-column: 1;
    grid-row: 1;
    border-top: 2px solid var(--rule);
    padding-top: 0.6rem;
    margin-top: 0.3rem;
  }
  .section--ink .section__tag { border-top-color: var(--ink-rule); }
  .section__head { grid-column: 2; grid-row: 1; }
  .section__body { grid-column: 2; }
  .hero__grid { gap: 4.5rem; }
  .row { grid-template-columns: 26px 18rem minmax(0, 1fr); align-items: start; }
  .row__title { grid-column: 2; }
  .row__text { grid-column: 3; }
  .spec { min-width: 0; }
}

@media (min-width: 86em) {
  :root { --band: 6.5rem; --rail: 12rem; }
}

/* --------------------------------------------------------- preferences -- */

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

@media (forced-colors: active) {
  .btn, .card, .panel, .form__input { border: 1px solid CanvasText; }
  .section__head h2::after { background: CanvasText; }
  .hero__plate::before { display: none; }
}

@media print {
  .masthead, .site-footer, .skip-link, .btn { display: none; }
  body { background: #FFFFFF; color: #000000; font-size: 11pt; }
  .section { border-top: 1px solid #999999; }
  .section--ink { background: #FFFFFF; color: #000000; }
  .section--ink h2, .section--ink h3, .section--ink .panel { color: #000000; background: #FFFFFF; }
  .hero__plate::before { display: none; }
}

/* === about: prose column === */
/* Running text on the pages that argue rather than tabulate. No colour of its
   own, so the same column reads correctly inside an ink band. */
.prose { max-width: 68ch; }
.prose > :first-child { margin-top: 0; }
.prose h3 { font-size: var(--step-h3); margin: 1.9rem 0 0.5rem; }
.prose p { margin-bottom: 1.1em; }
.prose p:last-child { margin-bottom: 0; }
.prose ul { margin: 0 0 1.1em; padding-inline-start: 1.2rem; }

/* === about: three cut panels === */
@media (min-width: 40em) {
  .panels--three { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 52em) {
  .panels--three { grid-template-columns: repeat(3, 1fr); }
}

/* === products: card mark === */
.card__icon { width: 34px; height: 39px; color: var(--beet); }
.card__icon * {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.section--ink .card__icon { color: var(--amber); }

/* === blog: card meta line === */
.card .card__meta {
  font-family: var(--font-data);
  font-size: var(--step-data);
  letter-spacing: 0.06em;
  color: var(--olive);
  margin: 0;
}
.section--ink .card .card__meta { color: var(--amber); }

/* === product-detail: note under a table === */
.table-note {
  margin: 1rem 0 0;
  max-width: 62ch;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.section--ink .table-note { color: var(--ink-text-soft); }

/* === masthead: the language switch === */
/* Two codes on a hairline, set in the data face like every other label in the
   masthead. The edition you are reading is the one carrying the beet rule. */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  font-family: var(--font-data);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
.lang-switch__link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 0.35rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.lang-switch__link:hover { color: var(--beet); }
.lang-switch__link[aria-current] { color: var(--ink); border-bottom-color: var(--beet); }
.lang-switch__sep { color: var(--rule); }

/* === the Persian edition === */
/* Every *-fa.html page is this same document read from the right:
   <html lang="fa" dir="rtl">. No new components, only the things that a
   right-to-left page and an Arabic-script face genuinely change. */

[dir="rtl"] {
  --font-head: "Noto Naskh Arabic", "Vazirmatn", Georgia, serif;
  --font-body: "Vazirmatn", "Noto Naskh Arabic", system-ui, sans-serif;
  --font-data: "Vazirmatn", "IBM Plex Mono", ui-monospace, monospace;
  --step-body: 1.02rem;
  font-family: var(--font-body);
}
[dir="rtl"] body { line-height: 1.85; }
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4 {
  letter-spacing: 0;
  word-break: normal;
  hyphens: none;
}
[dir="rtl"] h1 { line-height: 1.3; }
[dir="rtl"] h2 { line-height: 1.4; }
[dir="rtl"] h3 { line-height: 1.5; }
[dir="rtl"] .lead { line-height: 1.8; }

/* tracking cuts the joins between Arabic letters, so every tracked label
   loses its letter-spacing — the size and the colour carry the register */
[dir="rtl"] .mono,
[dir="rtl"] .brand__sub,
[dir="rtl"] .skip-link,
[dir="rtl"] .nav-toggle,
[dir="rtl"] .nav__link,
[dir="rtl"] .btn,
[dir="rtl"] .chip,
[dir="rtl"] .section__tag,
[dir="rtl"] .strip__label,
[dir="rtl"] .strip__proof,
[dir="rtl"] .form__label,
[dir="rtl"] .form__hint,
[dir="rtl"] .form__status,
[dir="rtl"] .card__meta,
[dir="rtl"] .figure__caption,
[dir="rtl"] .specimen__note,
[dir="rtl"] .footer__base,
[dir="rtl"] .footer__col h3,
[dir="rtl"] .spec caption,
[dir="rtl"] .spec thead th { letter-spacing: 0; }

/* the stamped corner is cut on the leading edge, so it mirrors with the page */
[dir="rtl"] .panel--cut,
[dir="rtl"] .hero__plate::before {
  clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut));
}

/* the error marker sits on the field's leading edge in either direction */
[dir="rtl"] .form__field[data-state="error"] .form__input {
  box-shadow: inset -3px 0 0 var(--beet);
}

/* the language codes stay Latin even on a Persian page */
[dir="rtl"] .lang-switch { direction: ltr; }

/* === article: drawn figure === */
.figure { margin: 1.9rem 0; display: grid; gap: 0.6rem; justify-items: start; }
.figure svg { width: 100%; max-width: 28rem; height: auto; }
.figure__caption {
  font-family: var(--font-data);
  font-size: var(--step-data);
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: var(--olive);
  margin: 0;
}
.section--ink .figure__caption { color: var(--amber); }
