/* Tashfeer · tashfeer.io
   Direction: type-only-statement (seed 322713908). Brand palette and faces kept.
   Five type steps: giant · display · head · lead · body. One button shape: square. */

:root {
  /* colour · roles */
  --bg: #F2EDE3;          /* Dune · ground */
  --bg-2: #E8E1D2;        /* Dune, one tone step down */
  --paper: #FFFFFF;
  --ink: #0B2A24;         /* Pine Ink */
  --ink-2: #11362E;       /* Pine, one tone step up · row alternation */
  --on-dark: #FFFFFF;
  --on-dark-soft: #B3CBC1;
  --sage: #789E8C;
  --accent: #3FBF8F;      /* Jade · the primary action, the CTA field */
  --accent-deep: #0F7A57; /* Jade for text on light grounds */
  --muted: #45605A;       /* secondary notes on light */
  --hl-a: #CFE3D9;        /* highlighter tones, from the palette */
  --hl-b: #E2D7BF;
  --hl-c: #C2D5CC;

  /* type */
  --f-ar: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --f-la: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --t-giant: clamp(104px, 22vw, 380px);
  --t-display: clamp(66px, 12.6vw, 216px);
  --t-head: clamp(34px, 5vw, 84px);
  --t-lead: clamp(20px, 2.2vw, 32px);
  --t-body: 18px;

  /* space */
  --m: clamp(16px, 2.2vw, 32px);
  --section: clamp(120px, 13vw, 220px);

  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-reveal: 800ms;
  --stagger-line: 110ms;
  --stagger-item: 70ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-ar);
  font-size: var(--t-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[lang="en"], [dir="ltr"] { font-family: var(--f-la); }

.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { clip: auto; width: auto; height: auto; overflow: visible; z-index: 50; inset-inline-start: var(--m); top: var(--m);
  background: var(--ink); color: var(--on-dark); padding: 12px 18px; text-decoration: none; }

/* ---------- buttons: one shape, square ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border: 0; border-radius: 0;
  font-weight: 700; font-size: var(--t-body); text-decoration: none; cursor: pointer;
  transition: background-color var(--t-hover) var(--ease-out), color var(--t-hover) var(--ease-out), transform var(--t-press) var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--ink); color: var(--on-dark); }
.btn-ink { background: var(--ink); color: var(--on-dark); }
.btn-ink:hover { background: var(--accent); color: var(--ink); }

/* ========================================================
   HERO · waterline
   ======================================================== */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: clip; --seam: 50%; }
.hero-nav {
  position: absolute; z-index: 5; inset-inline: var(--m); top: var(--m);
  display: flex; align-items: center; gap: clamp(16px, 2.4vw, 40px);
}
.brand img { width: clamp(118px, 10vw, 150px); height: auto; }
.nav-links { display: flex; gap: clamp(14px, 2vw, 30px); margin-inline-start: auto; font-weight: 500; }
.nav-links a { text-decoration: underline 2px transparent; text-underline-offset: 8px; padding: 10px 0;
  transition: text-decoration-color var(--t-hover) var(--ease-out); }
.nav-links a:hover, .nav-links a:focus-visible { text-decoration-color: currentColor; }

.field { position: absolute; inset-inline: 0; }
.field-top { top: 0; height: var(--seam); background: var(--bg); }
.field-bottom { top: var(--seam); bottom: 0; background: var(--ink); }
.hl {
  position: absolute; inset: 0 var(--m); z-index: 2; margin: 0;
  text-align: center; font-weight: 700; font-size: var(--t-display);
  line-height: 1.02; letter-spacing: -0.01em;
}
.hl .line { position: absolute; inset-inline: 0; }
.hl .l1 { bottom: calc(100% - var(--seam) + 0.02em); color: var(--ink); }
.hl .l2 { top: calc(var(--seam) + 0.04em); color: var(--on-dark); padding-bottom: 0.36em; }
.lines .line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.lines [data-line] { display: block; }

.hero-sub {
  position: absolute; z-index: 4; inset-inline: var(--m); bottom: 40px;
  margin-inline: auto; max-width: 34ch; text-align: center;
  color: var(--on-dark); font-size: var(--t-lead); line-height: 1.5; font-weight: 500;
}

@media (max-width: 760px) {
  .hero { --seam: 46%; }
  .nav-links { display: none; }
  .brand { margin-inline-end: auto; }
  .hero-nav .btn { min-height: 44px; padding: 0 16px; }
  .hl { font-size: clamp(60px, 17vw, 120px); }
  .hero-sub { text-align: start; max-width: none; bottom: 28px; }
}

/* ========================================================
   1 · INTRO · staircase statement
   ======================================================== */
.intro {
  background: var(--ink); color: var(--on-dark);
  padding: var(--section) var(--m);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 34vw); gap: clamp(24px, 4vw, 72px);
  align-items: center;
}
.intro-body { display: flex; flex-direction: column; gap: clamp(32px, 4vw, 64px); }
.intro-h { font-size: var(--t-lead); font-weight: 700; color: var(--on-dark-soft); }
.stair { font-size: var(--t-lead); font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; max-width: none; }
.stair span { display: block; padding-inline-start: calc(var(--s) * 7vw); }
.stair span:nth-child(even) { color: var(--on-dark-soft); }
.intro-note { max-width: 46ch; color: var(--on-dark-soft); }
.intro-pics { display: flex; flex-direction: column; gap: 16px; align-self: start; }
.intro-pics figure > img, .writing-pic > img { display: block; }
.intro-pics img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.img-clip { overflow: clip; }
figcaption { font-size: var(--t-body); line-height: 1.5; margin-top: 10px; }
.intro-pics figcaption { color: var(--on-dark-soft); }

@media (max-width: 760px) {
  .intro { grid-template-columns: 1fr; min-height: 0; }
  .stair span { padding-inline-start: calc(var(--s) * 5vw); }
  .intro-pics { flex-direction: row; }
  .intro-pics figure { flex: 1; min-width: 0; }
}

/* ========================================================
   2 · ACADEMY · statement cell, dark rows
   ======================================================== */
.academy { display: grid; grid-template-columns: 1fr 1fr; }
.cell {
  background: var(--bg-2); min-height: 90svh;
  padding: var(--section) var(--m) var(--m);
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
}
.zig { font-size: var(--t-head); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; }
.zig span { display: block; }
.zig span:nth-child(2) { text-align: end; }
.cell-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.cell-foot p { max-width: 32ch; }
.rows { background: var(--ink); color: var(--on-dark); display: grid; grid-auto-rows: 1fr; }
.row {
  display: grid; grid-template-columns: 5fr 4fr 3fr; gap: 24px; align-items: start;
  padding: clamp(24px, 2.4vw, 36px) var(--m);
}
.row:nth-child(even) { background: var(--ink-2); }
.row h3 { font-size: var(--t-lead); font-weight: 700; line-height: 1.3; }
.row h3 a { text-decoration: none; transition: color var(--t-hover) var(--ease-out); }
.row h3 a:hover, .row h3 a:focus-visible { color: var(--accent); }
.row p { color: var(--on-dark-soft); line-height: 1.6; }
.terms li { line-height: 1.6; }

@media (max-width: 960px) {
  .academy { grid-template-columns: 1fr; }
  .cell { min-height: 70svh; }
  .cell-foot { flex-direction: column; align-items: flex-start; }
  .row { grid-template-columns: 1fr; gap: 10px; }
  .terms { display: inline; }
  .terms li { display: inline; }
  .terms li:not(:last-child)::after { content: "، "; }
}

/* ========================================================
   3 · DECODER · two giant words compared
   ======================================================== */
.decoder { background: var(--paper); padding: var(--section) var(--m) 0; overflow: clip; }
.decoder-top { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.decoder-top h2 { grid-column: 1 / span 5; font-size: var(--t-head); font-weight: 700; line-height: 1.1; }
.decoder-intro { grid-column: 7 / -1; display: flex; flex-direction: column; gap: 24px; }
.decoder-intro > p:first-child { font-size: var(--t-lead); line-height: 1.5; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--f-la); font-weight: 500; font-size: var(--t-body);
  min-height: 46px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--bg); color: var(--ink); cursor: pointer;
  transition: background-color var(--t-hover) var(--ease-out), color var(--t-hover) var(--ease-out), transform var(--t-press) var(--ease-out);
}
.chip:hover { background: var(--bg-2); }
.chip:active { transform: scale(0.96); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-dark); }
.decode-def { min-height: 3.4em; max-width: 44ch; }

.specimens { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 12vh; }
.spec { min-width: 0; }
.spec-cap { display: block; margin-bottom: 8px; color: var(--muted); }
.spec-box { overflow: clip; height: calc(var(--fs, 200px) * 0.86); }
.spec-word {
  display: inline-block; white-space: nowrap; font-weight: 700; line-height: 1.12;
  font-size: var(--fs, 200px); letter-spacing: -0.02em;
}
.spec-en .spec-word { font-family: var(--f-la); letter-spacing: -0.04em; }
.decoder-fallback { display: none; }
html:not(.js) .decoder-fallback { display: grid; gap: 12px; margin-top: 32px; }
html:not(.js) .specimens, html:not(.js) .chips, html:not(.js) .decode-def { display: none; }
.decoder-fallback dt { font-weight: 700; }
.decoder-more { padding: 32px 0 var(--m); }
.decoder-more a { font-weight: 700; color: var(--accent-deep); text-underline-offset: 6px; }

@media (max-width: 760px) {
  .decoder-top h2, .decoder-intro { grid-column: 1 / -1; }
  .specimens { grid-template-columns: 1fr; gap: 0; margin-top: 48px; }
  .spec { padding: 20px var(--m) 0; margin-inline: calc(var(--m) * -1); }
  .spec-en { padding-bottom: calc(var(--fs, 100px) * 0.34); }
  .spec-ar { background: var(--ink); color: var(--on-dark); }
  .spec-ar .spec-cap { color: var(--on-dark-soft); }
}

/* ========================================================
   Full-bleed bands
   ======================================================== */
.band { position: relative; background: var(--ink); color: var(--on-dark); }
.band-frame { overflow: clip; height: 82svh; }
.band-frame img { width: 100%; height: 100%; object-fit: cover; }
.band figcaption {
  position: absolute; inset-inline-start: var(--m); bottom: var(--m); margin: 0;
  background: var(--ink); color: var(--on-dark); padding: 10px 16px;
}
.band-lecture .band-frame { height: 70svh; }

/* ========================================================
   4 · WRITING · two-ended rows, narrow column
   ======================================================== */
.writing {
  padding: var(--section) var(--m);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 40vw);
  gap: clamp(32px, 6vw, 120px); align-items: start;
}
.writing-list { padding-inline-start: clamp(0px, 8vw, 160px); }
.writing-list h2 { font-size: var(--t-head); font-weight: 700; line-height: 1.1; margin-bottom: 40px; }
.group-name { color: var(--muted); margin: 40px 0 8px; font-weight: 500; }
.writing-list h2 + .group-name { margin-top: 0; }
.trows a {
  display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: baseline;
  padding: 8px 0; min-height: 44px; text-decoration: none;
  transition: transform var(--t-hover) var(--ease-out), color var(--t-hover) var(--ease-out);
}
.trows a:hover, .trows a:focus-visible { color: var(--accent-deep); transform: translateX(-6px); }
.dot { width: 14px; height: 14px; border-radius: 50%; transform: translateY(2px); }
.dot-a { background: var(--sage); }
.dot-b { background: var(--accent-deep); }
.t { font-weight: 500; line-height: 1.5; }
.v { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.writing-pic img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.writing-pic figcaption { color: var(--muted); }

@media (max-width: 700px) {
  .writing { grid-template-columns: 1fr; }
  .writing-list { padding-inline-start: 0; max-width: none; }
  .v { grid-column: 2; }
  .trows a { grid-template-columns: 16px 1fr; }
}

/* ========================================================
   5 · ABOUT · two columns, highlighted words
   ======================================================== */
.about { background: var(--paper); padding: var(--section) var(--m); }
.about-h { font-size: var(--t-head); font-weight: 700; line-height: 1.1; margin-bottom: 48px; max-width: 16ch; }
.about-text {
  columns: 2; column-gap: 40px;
  font-size: clamp(22px, 2.1vw, 32px); line-height: 1.6; text-align: justify; hyphens: auto;
}
.about-text strong { font-weight: 700; }
.about-text mark, .hl-final {
  color: var(--ink); padding: 0 0.12em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hl-a { background: var(--hl-a); }
.hl-b { background: var(--hl-b); }
.hl-c { background: var(--hl-c); }
.hl-final { background: var(--accent); font-weight: 700; text-decoration: none; transition: background-color var(--t-hover) var(--ease-out), color var(--t-hover) var(--ease-out); }
.hl-final:hover, .hl-final:focus-visible { background: var(--ink); color: var(--on-dark); }

@media (max-width: 760px) {
  .about-text { columns: 1; text-align: start; font-size: var(--t-lead); line-height: 1.55; }
  .hl-final { display: inline-block; margin-top: 16px; padding: 6px 10px; }
}

/* ========================================================
   6 · CTA · one word is the button
   ======================================================== */
.cta-link {
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 62svh; padding: var(--m); background: var(--accent); gap: 24px; color: var(--ink);
  text-decoration: none; overflow: clip;
  transition: background-color 120ms linear, color 120ms linear;
}
.cta-link:hover, .cta-link:focus-visible { background: var(--ink); color: var(--accent); }
.cta-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.cta-sentence { font-size: var(--t-lead); font-weight: 500; max-width: 30ch; line-height: 1.45; }
.cta-arrow { flex: none; width: 48px; height: 48px; transform: scaleX(-1); transition: transform var(--t-hover) var(--ease-out); }
.cta-link:hover .cta-arrow { transform: scaleX(-1) translate(6px, -6px); }
.cta-word { display: inline-block; align-self: flex-start; white-space: nowrap; font-size: var(--fs, var(--t-giant)); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }

@media (max-width: 760px) {
  .cta-link { min-height: 46svh; }
  .cta-arrow { width: 32px; height: 32px; }
}

/* ========================================================
   7 · PARTNERS · display rows
   ======================================================== */
.partners { background: var(--bg); }
.prow {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  min-height: clamp(84px, 10vw, 150px); padding: 0 var(--m) clamp(14px, 1.4vw, 24px);
  font-size: var(--t-head); font-weight: 400; line-height: 1.05; letter-spacing: -0.01em;
}
.prow:nth-of-type(even) { background: var(--bg-2); }
.prow-head { font-weight: 700; background: var(--ink); color: var(--on-dark); }
.prow-pic { width: clamp(64px, 7vw, 116px); height: clamp(64px, 7vw, 116px); border-radius: 50%; object-fit: cover; flex: none; }
.prow-go a {
  display: inline-flex; align-items: center; gap: 0.3em; text-decoration: none; font-weight: 700;
}
.go-btn {
  width: 0.9em; height: 0.9em; border-radius: 50%; background: var(--accent); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform var(--t-hover) var(--ease-out), background-color var(--t-hover) var(--ease-out);
}
.go-btn svg { width: 45%; height: 45%; }
.prow-go a:hover .go-btn, .prow-go a:focus-visible .go-btn { transform: translate(-4px, -4px); background: var(--ink); color: var(--accent); }

@media (max-width: 760px) {
  .prow { font-size: 8.4vw; min-height: 84px; }
  .prow-go { background: var(--accent) !important; }
  .prow-go a { width: 100%; justify-content: space-between; }
  .prow-go .go-btn { width: 56px; height: 56px; background: var(--ink); color: var(--accent); }
}

/* ========================================================
   8 · FOOTER · contact as the headline
   ======================================================== */
.foot {
  background: var(--ink); color: var(--on-dark); min-height: 90svh;
  padding: 40px var(--m) var(--m);
  display: flex; flex-direction: column; justify-content: space-between; gap: 64px;
}
.foot-top { display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 32px; align-items: start; color: var(--on-dark-soft); line-height: 1.6; }
.foot-top img { width: 130px; }
.to-top { color: var(--on-dark); text-underline-offset: 6px; }
.foot-mail { font-family: var(--f-la); font-size: clamp(56px, 10.2vw, 180px); font-weight: 700; line-height: 0.95; letter-spacing: -0.04em; }
.foot-mail a { display: flex; flex-direction: column; align-items: flex-start; text-decoration: none; width: fit-content; transition: color var(--t-hover) var(--ease-out); }
.foot-mail a:hover, .foot-mail a:focus-visible { color: var(--accent); }
.foot-meta { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; color: var(--on-dark-soft); }
.foot-meta a { text-decoration: none; }
.foot-meta a:hover { color: var(--on-dark); text-decoration: underline; }

@media (max-width: 760px) {
  .foot-top { grid-template-columns: 1fr; gap: 16px; }
  .foot-mail { font-size: 15.4vw; }
  .foot-meta { flex-direction: column; gap: 6px; }
}

/* ========================================================
   MOTION · hidden states only under .js and no-preference
   ======================================================== */
@media (prefers-reduced-motion: no-preference) {
  .js .hero .lines [data-line] {
    transform: translateY(105%);
    animation: line-up 900ms var(--ease-expo) forwards;
    animation-delay: calc(var(--i) * var(--stagger-line) + 120ms);
  }
  .js .hero-sub, .js .hero-nav { opacity: 0; animation: fade-up 700ms var(--ease-out) 520ms forwards; }
  .js .hero-nav { animation-delay: 300ms; }

  .js [data-reveal] { opacity: 0; transform: translateY(26px);
    transition: opacity 700ms var(--ease-out), transform var(--t-reveal) var(--ease-expo);
    transition-delay: calc(var(--d, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  .js .stair.is-in span { animation: stair-in 900ms var(--ease-expo) both; animation-delay: calc(var(--s) * 90ms); }

  /* the one moving picture: a slow scroll-linked scale on each band */
  @supports (animation-timeline: view()) {
    .band-frame img { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
    .intro-pics img, .writing-pic img, .gloss-pic img, .path-side img { animation: drift-sm linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  }
}
@keyframes line-up { to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes stair-in { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: scale(1.14) translateY(-3%); } to { transform: scale(1.02) translateY(3%); } }
@keyframes drift-sm { from { transform: scale(1.08); } to { transform: scale(1); } }

/* ========================================================
   INNER PAGES — academy, glossary
   ======================================================== */
.bar { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 40px); padding: var(--m); }
.bar .nav-links a[aria-current="page"] { text-decoration-color: currentColor; }
.page-head { padding: clamp(64px, 9vw, 150px) var(--m) clamp(48px, 6vw, 96px);
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: end; }
.page-head h1 { grid-column: 1 / span 7; font-size: var(--t-display); font-weight: 700; line-height: 1.02; letter-spacing: -0.01em; }
.page-head .lede { grid-column: 8 / -1; font-size: var(--t-lead); line-height: 1.5; font-weight: 500; }

/* academy paths */
.path { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px);
  padding: var(--section) var(--m); align-items: start; scroll-margin-top: 24px; }
.path:nth-of-type(even) { background: var(--paper); }
.path-dark { background: var(--ink) !important; color: var(--on-dark); }
.path-side { position: sticky; top: var(--m); display: flex; flex-direction: column; gap: 24px; }
.path-side h2 { font-size: var(--t-head); font-weight: 700; line-height: 1.08; }
.path-side p { max-width: 40ch; }
.path-facts { display: flex; gap: 32px; flex-wrap: wrap; font-weight: 700; font-size: var(--t-lead); }
.path-facts span span { display: block; font-weight: 400; font-size: var(--t-body); color: var(--muted); }
.path-dark .path-facts span span, .path-dark .path-side p { color: var(--on-dark-soft); }
.path-side .img-clip img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.lessons { list-style: none; margin: 0; padding: 0; }
.lessons li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline;
  padding: 14px 0; min-height: 64px; }
.lessons .lt { font-size: var(--t-lead); font-weight: 500; line-height: 1.35; }
.lessons .lt small { display: block; font-size: var(--t-body); font-weight: 400; color: var(--muted); margin-top: 4px; }
.path-dark .lessons .lt small, .path-dark .lessons .lm { color: var(--on-dark-soft); }
.lessons .lm { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.free { display: inline-block; background: var(--accent); color: var(--ink); font-weight: 700; padding: 2px 10px; }

/* glossary */
.gloss-tools { padding: 0 var(--m) 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.gloss-tools label { font-weight: 700; font-size: var(--t-lead); }
.gloss-search { flex: 1 1 320px; min-height: 56px; padding: 0 20px; border: 0; border-radius: 0;
  background: var(--paper); color: var(--ink); font: inherit; font-size: var(--t-lead); }
.gloss-search:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; }
.gloss-count { color: var(--muted); }
.gloss-group { padding: clamp(40px, 5vw, 80px) var(--m); }
.gloss-group:nth-of-type(even) { background: var(--paper); }
.gloss-group h2 { font-size: var(--t-head); font-weight: 700; line-height: 1.1; }
.gloss-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 32vw); gap: 32px; align-items: end; margin-bottom: 40px; }
.gloss-pic img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.gloss-pic figcaption { color: var(--muted); }
.terms-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 4vw, 72px); }
.term { padding: 20px 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.term dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.term .ar { font-size: var(--t-lead); font-weight: 700; }
.term .en { font-family: var(--f-la); color: var(--accent-deep); font-weight: 500; }
.term dd { max-width: none; }
.term[hidden] { display: none !important; }
.gloss-empty { padding: 48px var(--m); font-size: var(--t-lead); }

@media (max-width: 860px) {
  .page-head h1, .page-head .lede { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .path { grid-template-columns: 1fr; }
  .path-side { position: static; }
  .terms-list { grid-template-columns: 1fr; }
  .gloss-head { grid-template-columns: 1fr; }
  .lessons li { grid-template-columns: 1fr; gap: 4px; }
}
