/* ==========================================================================
   أسماء المدهون — بروفايل
   Design direction: «مِداد ولازَورد» (Ink & Lapis)
   Lapis and ink are the two pigments of the Arabic manuscript. The layout is a
   typographer's specimen sheet: a measured column with a margin rail, set on a
   faint grid of rhombic dots — the unit an Arabic calligrapher measures letters in.
   ========================================================================== */

/* --------------------------------------------------------------- fonts -- */
@font-face {
  font-family: "Tajawal";
  src: url("../fonts/Tajawal-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Tajawal";
  src: url("../fonts/Tajawal-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Tajawal";
  src: url("../fonts/Tajawal-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Noto Naskh Arabic";
  src: url("../fonts/NotoNaskhArabic-VariableFont_wght.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

/* --------------------------------------------------------------- tokens --
   :root carries the COMPLETE light palette. The two theme blocks below
   redefine tokens only — no component ever declares a colour inside them. */
:root {
  /* ground & ink */
  --ground: #eff0f3;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --ink: #16181f;
  --ink-2: #5b6070;
  --ink-3: #868c9e;
  --line: rgba(22, 24, 31, 0.11);
  --line-strong: rgba(22, 24, 31, 0.2);

  /* the one accent */
  --lapis: #2c42b5;
  --lapis-hover: #23359a;
  --lapis-soft: #e4e7f7;
  --lapis-ink: #ffffff;

  /* ambient rhombic-dot grid */
  --grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Cpath d='M15 12.4 17.6 15 15 17.6 12.4 15Z' fill='%2316181f' fill-opacity='0.075'/%3E%3C/svg%3E");

  /* إتقان's own palette — shown as a working sample inside the case study */
  --atq-ground: #f4efe5;
  --atq-card: #fffcf7;
  --atq-ink: #33302b;
  --atq-ink2: #7d7669;
  --atq-sea: #2f7885;
  --atq-olive: #6e9557;
  --atq-clay: #d98e6a;
  --atq-honey: #e0ac55;
  --atq-plum: #9b7bb0;
  --atq-line: rgba(51, 48, 43, 0.12);

  /* type scale — 1.25 */
  --step--2: 0.78rem;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.15rem;
  --step-2: 1.4rem;
  --step-3: clamp(1.55rem, 1.3rem + 1.1vw, 1.95rem);
  --step-4: clamp(1.9rem, 1.5rem + 1.9vw, 2.6rem);
  --step-5: clamp(2.3rem, 1.6rem + 3.2vw, 3.6rem);

  /* space */
  --sp-1: 0.375rem;
  --sp-2: 0.625rem;
  --sp-3: 1rem;
  --sp-4: 1.5rem;
  --sp-5: 2.25rem;
  --sp-6: 3.5rem;
  --sp-7: 5.5rem;

  --radius: 4px;
  --radius-lg: 8px;
  --measure: 65ch;
  --rail: 170px;

  --sans: "Tajawal", system-ui, "Segoe UI", sans-serif;
  --naskh: "Noto Naskh Arabic", "Tajawal", serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #101219;
    --surface: #171a24;
    --surface-2: #1d212c;
    --ink: #e8e9ef;
    --ink-2: #969cb0;
    --ink-3: #737a8d;
    --line: rgba(232, 233, 239, 0.13);
    --line-strong: rgba(232, 233, 239, 0.24);

    --lapis: #8a9bf5;
    --lapis-hover: #a3b1f8;
    --lapis-soft: #1d2340;
    --lapis-ink: #0d1020;

    --grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Cpath d='M15 12.4 17.6 15 15 17.6 12.4 15Z' fill='%23e8e9ef' fill-opacity='0.085'/%3E%3C/svg%3E");

    --atq-ground: #21201c;
    --atq-card: #2c2a25;
    --atq-ink: #ede7db;
    --atq-ink2: #a79f91;
    --atq-sea: #6fb8c4;
    --atq-olive: #97be82;
    --atq-clay: #e5a783;
    --atq-honey: #efc87c;
    --atq-plum: #bfa6d0;
    --atq-line: rgba(237, 231, 219, 0.14);
  }
}

:root[data-theme="dark"] {
  --ground: #101219;
  --surface: #171a24;
  --surface-2: #1d212c;
  --ink: #e8e9ef;
  --ink-2: #969cb0;
  --ink-3: #737a8d;
  --line: rgba(232, 233, 239, 0.13);
  --line-strong: rgba(232, 233, 239, 0.24);

  --lapis: #8a9bf5;
  --lapis-hover: #a3b1f8;
  --lapis-soft: #1d2340;
  --lapis-ink: #0d1020;

  --grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Cpath d='M15 12.4 17.6 15 15 17.6 12.4 15Z' fill='%23e8e9ef' fill-opacity='0.085'/%3E%3C/svg%3E");

  --atq-ground: #21201c;
  --atq-card: #2c2a25;
  --atq-ink: #ede7db;
  --atq-ink2: #a79f91;
  --atq-sea: #6fb8c4;
  --atq-olive: #97be82;
  --atq-clay: #e5a783;
  --atq-honey: #efc87c;
  --atq-plum: #bfa6d0;
  --atq-line: rgba(237, 231, 219, 0.14);
}

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

/* أي عنصر عليه hidden يختفي فعلًا، حتى لو أعطته قاعدة لاحقة display: flex/grid.
   يعتمد عليه إخفاء واتساب. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background-color: var(--ground);
  background-image: var(--grid);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[lang="en"] body {
  line-height: 1.68;
}

h1,
h2,
h3,
h4 {
  font-family: var(--naskh);
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  text-wrap: balance;
}

html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] h4 {
  font-family: var(--sans);
  letter-spacing: -0.021em;
  line-height: 1.18;
}

p {
  margin: 0;
}

a {
  color: var(--lapis);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

a:hover {
  color: var(--lapis-hover);
}

img,
svg {
  max-width: 100%;
  height: auto;
}

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

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

.numeric {
  font-variant-numeric: tabular-nums;
}

.skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  background: var(--lapis);
  color: var(--lapis-ink);
  padding: var(--sp-2) var(--sp-3);
  z-index: 50;
}

.skip:focus {
  inset-inline-start: var(--sp-3);
  top: var(--sp-3);
}

/* -------------------------------------------------------------- layout -- */
.wrap {
  width: min(100% - 2.5rem, 1090px);
  margin-inline: auto;
}

.prose {
  max-width: var(--measure);
}

.prose > * + * {
  margin-block-start: var(--sp-3);
}

.lede {
  font-size: var(--step-1);
  color: var(--ink-2);
}

/* A section is a manuscript page: a margin rail carrying the label, then the
   measured column. The rail collapses above the column on narrow screens. */
.section {
  padding-block: var(--sp-6);
  border-block-start: 1px solid var(--line);
}

.section:first-of-type {
  border-block-start: 0;
}

.section-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .section-grid {
    grid-template-columns: var(--rail) minmax(0, 1fr);
    gap: var(--sp-5);
  }
}

.rail {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.rail-label {
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  font-family: var(--sans);
}

.rail-rule {
  height: 2px;
  width: 40px;
  background: var(--lapis);
}

/* Grid and flex items default to min-width:auto, so a wide child (the diagram,
   the spec table) pushes its track past the viewport instead of scrolling
   inside its own overflow container. Letting every track shrink to 0 is what
   keeps the page body from ever scrolling sideways. */
.section-grid > *,
.hero-grid > *,
.project-hero > *,
.demo-shell > *,
.stack > *,
.stack-tight > *,
.figure,
.figure-scroll,
.spec-scroll {
  min-inline-size: 0;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.stack-tight {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* -------------------------------------------------------------- header -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-block-end: 1px solid var(--line);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding-block: var(--sp-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--step-1);
  font-family: var(--naskh);
  margin-inline-end: auto;
}

html[lang="en"] .brand {
  font-family: var(--sans);
}

.brand-mark {
  display: grid;
  place-items: center;
  inline-size: 30px;
  block-size: 30px;
  background: var(--lapis);
  color: var(--lapis-ink);
  border-radius: var(--radius);
  font-family: var(--naskh);
  font-size: 1.05rem;
  line-height: 1;
  padding-block-end: 3px;
  flex: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  flex-wrap: wrap;
}

.nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 500;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius);
}

.nav a:hover {
  color: var(--ink);
  background: var(--surface);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--lapis);
}

.toggles {
  display: flex;
  gap: var(--sp-1);
  align-items: center;
  padding-inline-start: var(--sp-2);
  border-inline-start: 1px solid var(--line);
}

.toggle {
  font: inherit;
  font-size: var(--step--2);
  font-weight: 700;
  font-family: var(--sans);
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 5px 9px;
  cursor: pointer;
  line-height: 1.4;
  min-block-size: 30px;
}

.toggle:hover {
  color: var(--ink);
  border-color: var(--lapis);
}

/* --------------------------------------------------------------- hero --- */
.hero {
  padding-block: clamp(var(--sp-6), 9vw, var(--sp-7)) var(--sp-6);
}

.hero-grid {
  display: grid;
  gap: var(--sp-5);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.eyebrow {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--lapis);
  font-family: var(--sans);
}

.hero h1 {
  font-size: var(--step-5);
  margin-block: var(--sp-2) 0;
}

.hero-role {
  font-size: var(--step-2);
  color: var(--ink-2);
  margin-block-start: var(--sp-1);
}

.hero-text {
  max-width: 54ch;
  margin-block-start: var(--sp-4);
  color: var(--ink-2);
}

/* The alif measure, redrawn in the browser: seven rhombic dots spanning the
   exact height of the alif beside them. It is the site's whole idea in a mark. */
.measure {
  /* Noto Naskh's alif: the glyph is 0.671em tall and starts 0.0465em below the
     top of a line-height:1 box. Deriving the dot column from those two ratios
     is what keeps the seven dots spanning the alif exactly, at any size. */
  --alif-size: clamp(190px, 25vw, 330px);
  --alif-h: calc(var(--alif-size) * 0.671);
  --alif-top: calc(var(--alif-size) * 0.0465);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  justify-self: center;
}

.measure-dots {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  block-size: var(--alif-h);
  margin-block-start: var(--alif-top);
}

.measure-dots i {
  inline-size: 13px;
  block-size: 13px;
  background: var(--lapis);
  transform: rotate(45deg);
  display: block;
}

.measure-dots i:nth-child(2) { opacity: 0.9; }
.measure-dots i:nth-child(3) { opacity: 0.8; }
.measure-dots i:nth-child(4) { opacity: 0.7; }
.measure-dots i:nth-child(5) { opacity: 0.6; }
.measure-dots i:nth-child(6) { opacity: 0.5; }
.measure-dots i:nth-child(7) { opacity: 0.42; }

.measure-alif {
  font-family: var(--naskh);
  font-size: var(--alif-size);
  line-height: 1;
  block-size: calc(var(--alif-top) + var(--alif-h));
  color: var(--lapis);
  user-select: none;
  display: block;
}

/* -------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font: inherit;
  font-weight: 700;
  font-family: var(--sans);
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  min-block-size: 46px;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary {
  background: var(--lapis);
  color: var(--lapis-ink);
}

.btn-primary:hover {
  background: var(--lapis-hover);
  color: var(--lapis-ink);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--lapis);
  color: var(--lapis);
}

.btn-lg {
  font-size: var(--step-1);
  padding: 0.95rem 1.75rem;
  min-block-size: 56px;
}

.btn svg {
  flex: none;
}

.btn-sub {
  font-size: var(--step--2);
  font-weight: 500;
  opacity: 0.82;
}

.btn-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1.35;
}

.btn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}

/* --------------------------------------------------------------- cards -- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
}

.grid-auto {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
}

/* work card */
.work {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s, transform 0.18s;
}

@media (min-width: 620px) {
  .work {
    grid-template-columns: 132px minmax(0, 1fr);
    align-items: center;
    padding: var(--sp-5);
  }
}

.work:hover {
  border-color: var(--lapis);
  transform: translateY(-2px);
}

.work img {
  inline-size: 108px;
  block-size: 108px;
  border-radius: 22%;
}

.work h3 {
  font-size: var(--step-3);
}

.work-desc {
  color: var(--ink-2);
  margin-block-start: var(--sp-1);
}

.work-more {
  color: var(--lapis);
  font-weight: 700;
  font-size: var(--step--1);
  margin-block-start: var(--sp-3);
  display: inline-block;
}

/* stat row */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4) var(--sp-5);
  margin-block-start: var(--sp-3);
  padding-block-start: var(--sp-3);
  border-block-start: 1px solid var(--line);
}

.stat-n {
  font-size: var(--step-2);
  font-weight: 700;
  font-family: var(--sans);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-l {
  font-size: var(--step--2);
  color: var(--ink-3);
}

/* chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.chip {
  font-size: var(--step--1);
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.8rem;
}

.chip-accent {
  color: var(--lapis);
  background: var(--lapis-soft);
  border-color: transparent;
  font-weight: 500;
}

/* -------------------------------------------------- atqan project hero --- */
.project-hero {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: 1fr;
  align-items: center;
  padding-block: var(--sp-6);
}

@media (min-width: 780px) {
  .project-hero {
    grid-template-columns: 168px minmax(0, 1fr);
  }
}

.project-hero img {
  inline-size: 152px;
  block-size: 152px;
  border-radius: 22%;
}

.project-hero h1 {
  font-size: var(--step-5);
}

.tagline {
  font-family: var(--naskh);
  font-size: var(--step-2);
  color: var(--lapis);
  margin-block-start: var(--sp-2);
}

html[lang="en"] .tagline {
  font-family: var(--sans);
  font-style: italic;
}

/* -------------------------------------------------- the live app demo ---- */
.demo-shell {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 820px) {
  .demo-shell {
    grid-template-columns: 296px minmax(0, 1fr);
    gap: var(--sp-5);
  }
}

/* the phone. Everything inside is painted from --atq-*, so the case study
   shows إتقان's real palette working — and it flips with the site theme,
   because the app ships both themes too. */
.phone {
  inline-size: 100%;
  max-inline-size: 296px;
  margin-inline: auto;
  border: 9px solid var(--ink);
  border-radius: 34px;
  background: var(--atq-ground);
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-block-size: 508px;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--atq-ink2);
  font-size: var(--step--2);
}

.speaker {
  inline-size: 66px;
  block-size: 66px;
  border-radius: 50%;
  border: 0;
  background: var(--atq-sea);
  color: var(--atq-card);
  display: grid;
  place-items: center;
  margin-inline: auto;
  cursor: pointer;
  flex: none;
  transition: transform 0.2s;
}

.speaker.is-playing {
  animation: pulse 1s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--atq-sea) 55%, transparent); }
  100% { box-shadow: 0 0 0 18px transparent; }
}

/* the answer slate */
.slate {
  background: var(--atq-card);
  border: 1px solid var(--atq-line);
  border-radius: 18px;
  min-block-size: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: var(--sp-2);
  direction: rtl;
}

/* While the child types, the word is joined Arabic. It splits into graphemes
   only at the comparison step — which is the thing that step is about. */
.slate.is-split {
  gap: 6px;
}

.slate.is-correct {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--atq-olive) 45%, transparent);
}

.slate span {
  font-family: var(--naskh);
  font-size: 40px;
  line-height: 1.25;
  color: var(--atq-ink);
}

.slate .caret {
  inline-size: 2px;
  block-size: 38px;
  background: var(--atq-sea);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.slate .bad {
  color: var(--atq-honey);
  border-block-end: 3px solid var(--atq-honey);
}

.slate .good {
  color: var(--atq-olive);
}

/* the in-app keyboard */
.keys {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  direction: rtl;
}

.keys b {
  background: var(--atq-card);
  border: 1px solid var(--atq-line);
  border-radius: 9px;
  font-family: var(--naskh);
  font-weight: 400;
  font-size: 17px;
  color: var(--atq-ink);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transition: background-color 0.12s, color 0.12s;
}

.keys b.hit {
  background: var(--atq-sea);
  color: var(--atq-card);
}

/* the rule card the app answers with */
.rule-card {
  background: var(--atq-card);
  border: 1px solid var(--atq-line);
  border-inline-start: 3px solid var(--atq-plum);
  border-radius: 12px;
  padding: var(--sp-2) var(--sp-3);
  opacity: 0;
  transition: opacity 0.35s;
  text-align: start;
  /* No direction override here: the rule text is prose and follows the page
     language. Only the slate and the keyboard below stay Arabic-RTL always. */
}

.rule-card.show {
  opacity: 1;
}

.rule-card b {
  display: block;
  font-family: var(--naskh);
  color: var(--atq-plum);
  font-size: var(--step--1);
}

.rule-card span {
  font-size: var(--step--2);
  color: var(--atq-ink2);
  line-height: 1.7;
}

.demo-caption {
  font-size: var(--step--1);
  color: var(--ink-3);
  text-align: center;
  margin-block-start: var(--sp-2);
}

.demo-steps {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: start;
  padding-block-end: var(--sp-3);
  border-block-end: 1px solid var(--line);
  opacity: 0.42;
  transition: opacity 0.3s;
}

.demo-steps li:last-child {
  border-block-end: 0;
  padding-block-end: 0;
}

.demo-steps li.active {
  opacity: 1;
}

.demo-steps li::before {
  counter-increment: step;
  content: counter(step);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: var(--step--1);
  color: var(--lapis);
  background: var(--lapis-soft);
  border-radius: var(--radius);
  inline-size: 30px;
  block-size: 30px;
  display: grid;
  place-items: center;
  font-family: var(--sans);
}

.demo-steps b {
  display: block;
  font-family: var(--naskh);
  font-size: var(--step-1);
}

html[lang="en"] .demo-steps b {
  font-family: var(--sans);
}

.demo-steps span {
  color: var(--ink-2);
  font-size: var(--step--1);
}

/* ------------------------------------------------------------- diagram --- */
.figure {
  margin: 0;
}

.figure-scroll {
  overflow-x: auto;
  padding-block-end: var(--sp-2);
}

.figure svg {
  display: block;
  min-inline-size: 640px;
}

.figure figcaption {
  font-size: var(--step--1);
  color: var(--ink-3);
  margin-block-start: var(--sp-2);
}

/* ------------------------------------------------------------ decisions -- */
.decision {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
}

.decision h3 {
  font-size: var(--step-2);
}

.decision-why {
  color: var(--ink-2);
  margin-block-start: var(--sp-2);
}

.decision-note {
  font-size: var(--step--1);
  color: var(--ink-3);
  margin-block-start: var(--sp-3);
  padding-block-start: var(--sp-2);
  border-block-start: 1px dashed var(--line-strong);
}

code {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.88em;
  background: var(--lapis-soft);
  color: var(--ink);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}

/* --------------------------------------------------------- swatch strip -- */
.swatches {
  display: grid;
  gap: var(--sp-2);
  grid-template-columns: repeat(auto-fill, minmax(min(112px, 100%), 1fr));
}

.swatch {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.swatch i {
  display: block;
  block-size: 52px;
}

.swatch small {
  display: block;
  padding: var(--sp-2);
  font-size: var(--step--2);
  line-height: 1.5;
  color: var(--ink-2);
}

.swatch small b {
  display: block;
  color: var(--ink);
  font-family: var(--naskh);
  font-size: var(--step--1);
}

html[lang="en"] .swatch small b {
  font-family: var(--sans);
}

.swatch code {
  background: transparent;
  padding: 0;
  color: var(--ink-3);
  font-size: 0.78rem;
}

/* ---------------------------------------------------------- spec table --- */
.spec-scroll {
  overflow-x: auto;
}

.spec {
  border-collapse: collapse;
  inline-size: 100%;
  min-inline-size: 420px;
  font-size: var(--step--1);
}

.spec th,
.spec td {
  text-align: start;
  padding: 0.65rem 0.75rem;
  border-block-end: 1px solid var(--line);
  vertical-align: top;
}

.spec th {
  color: var(--ink-3);
  font-weight: 500;
  white-space: nowrap;
  inline-size: 34%;
}

.spec td {
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------- contact --- */
.contact-actions {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
}

.contact-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s, transform 0.18s;
}

.contact-card:hover {
  border-color: var(--lapis);
  transform: translateY(-2px);
  color: inherit;
}

.contact-icon {
  inline-size: 44px;
  block-size: 44px;
  border-radius: var(--radius);
  background: var(--lapis-soft);
  color: var(--lapis);
  display: grid;
  place-items: center;
  flex: none;
}

.contact-card b {
  display: block;
  font-size: var(--step-1);
  font-family: var(--naskh);
}

html[lang="en"] .contact-card b {
  font-family: var(--sans);
}

.contact-card span {
  font-size: var(--step--1);
  color: var(--ink-2);
  direction: ltr;
  unicode-bidi: embed;
  display: block;
}

/* -------------------------------------------------------------- footer --- */
.site-footer {
  border-block-start: 1px solid var(--line);
  padding-block: var(--sp-5);
  margin-block-start: var(--sp-5);
  color: var(--ink-3);
  font-size: var(--step--1);
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
  justify-content: space-between;
}

.footer-bar a {
  color: var(--ink-2);
  text-decoration: none;
}

.footer-bar a:hover {
  color: var(--lapis);
}

/* --------------------------------------------------------------- misc ---- */
.note {
  font-size: var(--step--1);
  color: var(--ink-3);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: var(--sp-3);
}

.cta-band {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  justify-content: space-between;
}

.cta-band h2 {
  font-size: var(--step-3);
}

.feature b {
  display: block;
  font-family: var(--naskh);
  font-size: var(--step-1);
  margin-block-end: var(--sp-1);
}

html[lang="en"] .feature b {
  font-family: var(--sans);
}

.feature span {
  color: var(--ink-2);
  font-size: var(--step--1);
}

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