/* GENERATED FILE — do not edit.
 * Source:     frontend/src/styles/tokens.css
 * Regenerate: node scripts/gen_design_tokens.mjs
 * Verify:     node scripts/gen_design_tokens.mjs --check   (publish_sky.sh runs this)
 *
 * The palette AND the backdrop are declared once for the whole site. This copy
 * exists because this stack has its own build and cannot import from the React
 * app's tree.
 *
 * Transform applied: a @media (prefers-color-scheme: dark) copy of the dark
 * block is appended. These pages honour the OS setting when the reader has made
 * no explicit choice; the SPA never does, because index.html always stamps an
 * attribute before first paint. Without this block a reader on a dark OS would
 * get the light palette here and the dark one in the app.
 */

/* -----------------------------------------------------------------------
   tokens.css — the Nocturne palette, in both themes. One file, one source.

   Purpose
     Every colour, font, radius and shadow the site paints with is declared
     here. Nothing else in src/ should carry a raw hex value.

   Structure
     1. the canonical set   --ground --surf --ink --acc … , the names the
                            redesign's own frames use
     2. compatibility       the older --bg / --panel / --text / --accent names,
                            re-pointed at the canonical set so a screen that
                            has not been rebuilt yet still renders
     3. ritual surfaces     the translucent panels and gradient stops the
                            fal pages float over their backdrop
     4. --nav-*             the seven-token contract shared/site-nav.css and
                            the Quartz garden both consume
     5. type, radii, motion

   The theme mechanism is unchanged: light is the default on bare :root, dark
   is :root[data-theme="dark"]. index.html sets that attribute before first
   paint and ThemeContext.jsx keeps it in step — neither needed editing.

   Values are transcribed verbatim from the design canvas at
   .claude/plans/Inzib website redesign/ (support.js, themeVars()).

   Author: inzib control room (Claude), 2026-08-31. Plan 32 step 0d.
   ----------------------------------------------------------------------- */

/* ═══ light — the default ═══════════════════════════════════════════════ */

:root,
:root[data-theme="light"] {
  color-scheme: light;

  /* ---- 1. canonical ---------------------------------------------------- */
  --ground: #e4e7f5; /* the page */
  --surf: #f3f5fe; /* raised: cards, the composer, the bar */
  --surf2: #e9ecf8; /* recessed: rails, wells, table stripes */
  --ink: #292b31; /* body text */
  --mute: #595d6c; /* secondary text */
  --faint: #3f424d; /* the smallest labels — DARKER than --mute here, not
                       lighter. A pale field needs more ink to hold 4.5:1,
                       so the muted steps invert between the two themes
                       rather than mirroring. */
  --line: #cfd3e5; /* a drawn border */
  --hair: rgba(41, 43, 49, 0.14); /* a divider that fades at its ends */

  --acc: #796cbf; /* the accent: a line and a glow, never a flood */
  --acc-text: #5d5294; /* the accent at paragraph size — deeper, for contrast */
  --acc-soft: rgba(121, 108, 191, 0.1); /* tinted fills and hovers */
  --acc-strong: rgba(121, 108, 191, 0.2); /* pressed */
  --on-acc: #f3f5fe; /* text on a filled accent */

  /* ---- 1a. the two text roles that are NOT body text (plan 47) ----------
     Added 2026-09-11, because a placeholder and a segmented-control label
     were BOTH `--mute` — the same declaration, the same hex, in both themes.
     Iman spotted it on the home hero: the typed suggestion in the composer
     and the resting «جواب سریع» / «عمیق» chips under it were indistinguishable.

     They are opposite roles. A placeholder marks content that is ABSENT and
     should recede; a control label is INTERACTIVE and should announce itself.
     Painting them the same colour flattens that, so the segmented control
     read as decoration rather than as three things a reader can press.

     ⚠ The fix is NOT to dim the placeholder. `--mute` on `--surf` measures
     5.25 dark / 6.02 light and one step below it (#83889d) already lands at
     4.32 — under the 4.5 bar. The room is upward, on the LABEL, which is why
     --ctl-label is the darker/brighter of the two rather than the placeholder
     being the weaker.

     Measured 2026-09-11 with the WCAG formula, not chosen by eye:
       --placeholder on --surf     light 5.08   dark 4.75   (bar 4.5)
       --ctl-label   on --surf2    light 8.49   dark 9.91   (bar 4.5)
       the two against each other  light 1.81   dark 1.94   -> visibly apart

     ⚠ --ctl-label INVERTS between the themes, like --faint above it: a pale
     field needs more ink and a dark field needs more light. Do not mirror
     one block's value into the other. */
  --placeholder: #64687a;
  --ctl-label: #3f424d;

  /* The filled state of a segmented control — a pressed chip, a chosen level.
     ⚠ It is NOT --acc, and in this theme it must not be: white on --acc
     (#796cbf) measures 4.10:1, under the 4.5 bar for a 12.5px label. The
     accent's deeper sibling clears it at 6.23 and also gives the pill 5.75:1
     against its own track, which is what WCAG 1.4.11 asks of the thing that
     shows a control's STATE. The dark block can use --acc directly; see there.

     What this replaces: `.eff-on` was `background: var(--surf)` on a
     `var(--surf2)` track — 1.08:1, i.e. the selected option was very nearly
     invisible in both themes. It looked worse in light only because the whole
     palette sits closer together there. */
  --acc-fill: #5d5294;
  --on-acc-fill: #f3f5fe;

  /* A border for something a reader can OPERATE, as opposed to --line, which
     divides content. The segmented control's track is the only user today.
     ⚠ It does not reach 3:1 against the page ground and is not asked to: the
     filled pill above is what identifies the control and carries 1.4.11. This
     is definition, not the accessibility contract. */
  --line-strong: #b0b7d0;

  /* The wordmark's accent — the "zib" half of the logo, and nothing smaller.
     ⚠ It is NOT --acc-text, and the difference is measured. The 2026-09-08
     identity guide specifies #6c5fd1 here and states 4.6:1 against the ground;
     against --ground #e4e7f5 it actually measures 4.06:1, and 4.60 is its
     figure against --surf. At the logo's size that is irrelevant — display
     type clears at 3:1 and this is 4.06 — but --acc-text draws body-size
     emphasis (.ab-md em, the counts under the /sky/ doors) where 4.5 is the
     bar, so pointing that token here would take real text from 5.50 to 4.06.
     Two jobs, two tokens. Iman chose this split on 2026-09-08 over applying
     the guide's value to both. Plan 42, D1. */
  --logo-acc: #6c5fd1;

  /* ---- status: the one warning colour (plan 35 T8.5) -------------------
     A refused Cortex turn renders an amber card. Semantic tokens rather than
     literals in the component, so plan 38's drift guard still has something to
     check and a theme change reaches the card.

     MEASURED 2026-09-10, not chosen by eye:
       --ink  on --warn-surf   12.63:1   (bar 4.5)
       --mute on --warn-surf    5.84:1   (bar 4.5)
       --warn on --ground       3.94:1   (bar 3.0 — it is a 3px rule, not text)
     ⚠ --warn is a BORDER, never a text colour. At paragraph size it does not
     clear 4.5:1 on this ground, and the card's words are --ink for that reason. */
  --warn: #a4620d;
  --warn-line: #e8d6b8;
  --warn-surf: #faf1e2;

  --bloom: rgba(210, 206, 253, 0.6); /* the one gradient: a corner glow */
  --shadow: 0 12px 30px rgba(41, 43, 49, 0.1);
  --shadow-lg: 0 20px 48px rgba(41, 43, 49, 0.14);

  /* the mark inside a search result */
  --hl-bg: rgba(121, 108, 191, 0.18);
  --hl-ink: #3d3568;

  /* ---- 1b. the two roles only the garden paints ------------------------ */
  /* Quartz needs nine role colours and the app names only seven of them. These
     two were freehand values inside quartz.config.ts until 2026-09-04 — the
     one place a palette was declared outside this file. Named here instead, so
     the whole site's colour is in one place even where only one stack uses it.
     Values carried over unchanged, so moving the declaration repainted nothing.

       --structure  faint structure: graph links and horizontal rules. Lighter
                    than --mute, which would read as text; darker than --line,
                    which would disappear behind a node.
       --mark-bg    the garden's search mark. Stronger than --hl-bg because it
                    sits on body prose rather than inside a result card. */
  --structure: #9397ab;
  --mark-bg: rgba(121, 108, 191, 0.28);

  /* The scrim: the ground, made translucent, for anything that has to fade
     content out beneath a pinned control. An opaque --ground fade was fine
     while the page was a flat fill; over the backdrop it draws a rectangle of
     dead colour across the gradient. Written as literal rgba rather than
     color-mix() to match --nav-bg, which is the same trick for the same
     reason — the value is --ground's channels and must be changed with it. */
  --scrim: rgba(228, 231, 245, 0.94);
  --scrim-0: rgba(228, 231, 245, 0);

  /* ---- 1c. the semantic accents ---------------------------------------- */
  /* The pigments of Persian illumination — Badakhshan lapis, saffron, madder,
     verdigris. They arrived with the entity pages (plan 33) as that stack's
     whole palette, declared in theme.py; on 2026-09-04 the ground and the ink
     moved onto Nocturne and these stayed, as what they always were on the page:
     ACCENTS, each with a job.

       --lapis      a link, and the marker of the section a reader is in
       --saffron    spent on exactly one thing — a claim awaiting a human
                    signature. Its scarcity is the meaning; do not spread it
       --madder     a correction, a caveat, a disputed attribution
       --verdigris  a confirmed, evidenced claim

     Declared here rather than in theme.py so the whole site's colour is in one
     file, and so a future screen can reach for "the awaiting-signature colour"
     without inventing a second one. Values carried over byte-identical. */
  --lapis: #2a4b8d;
  --lapis-soft: #dfe4f0;
  --lapis-line: #b9c4dd;
  /* ⚠ Darkened 2026-09-04, from #a8710f. It is the one value in this file that
     did NOT come across byte-identical, and the reason is measured: saffron
     marks a claim awaiting a human signature — meaningful text — and at
     #a8710f it never cleared 4.5:1. It measured 3.82 on the illumination
     ground it was chosen for, so the defect predates this change; moving the
     page to --ground took it to 3.39, which is mine. #8d5f0d is the smallest
     correction that clears the bar: hue 38.4° and saturation 0.836 are
     untouched, lightness drops 0.057. Now 4.52 on --ground, 5.11 on --surf.
     Dark mode was never in question and is unchanged at 8.88. */
  --saffron: #8d5f0d;
  --saffron-soft: #f6ecd6;
  --madder: #9c3b52;
  --madder-soft: #f3e2e6;
  --verdigris: #2f6b60;
  --verdigris-soft: #dce9e6;
  --verdigris-line: #b7d2cb;

  /* ---- 1d-bis. provenance: HOW a verse was found (plan 45) --------------
     Deliberately NOT two new hues. --verdigris above already carries the
     meaning "a confirmed, evidenced claim" and --lapis already carries
     meaning and association, so the two retrieval kinds reuse the pigments.
     Section 1f below records that the four accents already fail as a
     categorical set; adding a fifth and a sixth would make that worse.

     Measured with the WCAG formula, both themes, at 11px (so the 4.5 text
     bar applies, not the 3.0 non-text one):

       light   exact on its surface 4.96:1   on --ground 5.02:1
       light   sense on its surface 6.63:1   on --ground 6.85:1
       dark    exact on its surface 6.42:1   on --ground 8.02:1
       dark    sense on its surface 6.28:1   on --ground 7.48:1

     ⚠ The -line tokens are BORDERS. Do not set text in them. */
  --find-exact: var(--verdigris);
  --find-exact-surf: var(--verdigris-soft);
  --find-exact-line: var(--verdigris-line);
  --find-sense: var(--lapis);
  --find-sense-surf: var(--lapis-soft);
  --find-sense-line: var(--lapis-line);

  /* ---- 1e. the nine dyes of the knot game ------------------------------ */
  /* The natural dyestuffs a Persian rug is actually coloured with, and the
     game's whole palette since 2026-09-10 (plan 46, Iman's ask). They are
     deliberately SEPARATE from the four semantic accents above: those mark
     meaning on a page — a link, a caveat, an awaiting signature — while these
     are pigments a player picks up and paints a knot with. Sharing one value
     between the two jobs would mean a change to the site's caveat colour
     silently repainting somebody's gabbeh.

     Each dye's HUE is its identity and was fixed first; lightness and chroma
     were then SEARCHED, not chosen, to maximise the closest pair under normal
     vision and all three dichromacies — the same discipline the five poets
     below were built with, and for the same reason: nine warm dyestuffs sit
     close together, and six of these nine are warm.

     Measured 2026-09-10, deep set on --ground light:
       contrast 3.55 - 12.29, every dye clear of 3:1
       closest pair 51.4 (protan, esparak/golrang)
     The bright set in the dark block below measures 4.48 - 12.22, closest
     pair 58.7. Both beat the six-pigment palette they replace, whose closest
     pair was 29.7.

     ⚠ The gabbeh gold (--poet-khayyam dark, #d9a441) is painted with the
     DEEP set in BOTH themes — RugBoard calls paths(grid, k, 2) outright and
     never consults the theme — so this block, not the dark one, is what has
     to survive the gold. On it these measure 1.94 - 6.73, four of the nine
     under 3:1. Their predecessors were no better: three of six under it,
     over a range of 2.47 - 7.83. The gold is a FIELD that motifs read
     against by shape and edge, not a text background, and all nine were
     checked on a woven rug before shipping. Do not "fix" this without
     changing the gabbeh itself.

     `gereh.test.mjs` asserts PAL in motifs.js still equals these values. The
     game repeats them as literals for one reason only: the SVG and canvas
     exporters write colour into a file and cannot read a custom property. */
  --dye-gerdu: #6c4b32; /* poost-e gerdu — walnut husk */
  --dye-zaferan: #805804; /* za'faran — saffron */
  --dye-anar: #6c6940; /* poost-e anar — pomegranate rind */
  --dye-runas: #861401; /* runas — madder */
  --dye-qermezdane: #6c1736; /* qermez-dane — cochineal */
  --dye-nil: #203671; /* nil — indigo */
  --dye-esparak: #727f35; /* esparak — weld */
  --dye-golrang: #c0520e; /* golrang — safflower */
  --dye-jaft: #322315; /* jaft — oak bark and acorn cup */

  /* A hairline lift, for dense reference pages where the card shadow above
     would be theatre. Named rather than left colliding: theme.py declared its
     own --shadow at this value, and whichever sheet loaded last silently won. */
  --shadow-flat: 0 1px 2px rgba(27, 26, 33, 0.06);

  /* ---- 1d. the five poets, as a categorical set ------------------------ */
  /* ⚠ Do not adjust these by eye, and do not "tidy" them toward the semantic
     accents above. They are a five-way CATEGORICAL palette and were generated
     by construction, not chosen: at a fixed OKLCH lightness inside each mode's
     band (light 0.43–0.77, dark 0.48–0.67) with chroma capped at 0.145/0.135 so
     they stay in the Nocturne register. All six of the dataviz checker's tests
     pass in both modes — lightness band, chroma floor, CVD separation,
     normal-vision floor, and contrast against both surfaces:

       node validate_palette.js "#8265c6,#078d82,#ad6704,#ba507f,#377bce" \
            --mode light --surface "#f3f5fe"        -> ALL CHECKS PASS
       node validate_palette.js "#876dc8,#109488,#b66c00,#bd5a84,#4381cf" \
            --mode dark  --surface "#161826"        -> ALL CHECKS PASS

     The four accents above fail hard as a categorical set — plum against lapis
     measured ΔE 1.1 for deuteranopia, i.e. indistinguishable. Chroma is what
     carries CVD separation, and these have it where the accents do not.

     WHICH poet gets WHICH hue is the part that was chosen, and it was chosen
     from the poems rather than from the order they sit in. On its own line,
     per the Farsi rule:

       Hafez — arghavani, the wine of the Divan is «می ارغوانی», purple by name
       Saadi — the green of the garden: the Golestan and the Bustan
       Khayyam — clay and ochre: the potter's dust, and the wine
       Ferdowsi — the red of battle and of the Kayanid crown
       Rumi — the turning sky the sama' turns under

     ranked.py reads these through tokens.generated.json rather than keeping the
     second copy it carried until 2026-09-04.

     ⚠ Khayyam moved on 2026-09-08 (plan 42, D2), and it is the one value in
     this set that has: #ad6704 → #a8720e light, #b66c00 → #d9a441 dark. The
     identity guide calls the old pair «اخرای پیشین، که کدر بود» — the previous
     ochre, which was muddy — and it was also the worst-contrasting swatch in
     the dark set at 4.30:1 against --ground, where the new one measures 7.83.
     Light drops 3.61 → 3.36, which still clears the 3:1 bar these carry as
     categorical markers rather than text.

     The warning above was respected, not overridden: the swap was checked for
     CVD separation before it shipped, and the worst pair is `hafez/rumi` under
     protanopia in BOTH the old and new sets — identical, because neither of
     those two moved. Khayyam is not near the constraint in either direction,
     so this change costs the set nothing. Re-run the checker before touching
     any of the other four, which ARE load-bearing. */
  --poet-hafez: #8265c6;
  --poet-saadi: #078d82;
  --poet-khayyam: #a8720e;
  --poet-ferdowsi: #ba507f;
  --poet-rumi: #377bce;

  /* ---- 2. compatibility ------------------------------------------------ */
  /* Screens rebuilt in phases 1-3 use the canonical names above. Until each
     one lands, these keep it rendering on the new ground. Do not introduce
     new uses of them. */
  --bg: var(--ground);
  --bg-alt: var(--surf2);
  --panel: var(--surf);
  --text: var(--ink);
  --text-secondary: var(--mute);
  --border: var(--line);
  --hover: var(--acc-soft);
  --active: var(--acc-strong);
  --accent: var(--acc);
  --accent-light: var(--acc-soft);

  /* ---- 3. the ritual surfaces ------------------------------------------ */
  /* The fāl pages paint a gradient backdrop with drifting particles and float
     their panels over it, so those panels are translucent rather than solid —
     that depth is the point of the ritual. These are the only surfaces in the
     system that are not opaque.

     This replaces a second warm palette (gold on parchment) whose token names
     stopped being true the moment Nocturne landed — the one called "gold" was
     not gold any more. Renamed rather than aliased on 2026-08-31, plan 32
     phase 3, so nothing in the tree carries a name that lies. */
  --surf-veil: rgba(243, 245, 254, 0.72);
  --surf-veil-strong: rgba(243, 245, 254, 0.92);
  --surf-veil-soft: rgba(243, 245, 254, 0.5);

  /* the backdrop's gradient stops, ground → surface → a touch of the bloom */
  --ritual-1: #e4e7f5;
  --ritual-2: #e9ecf8;
  --ritual-3: #f3f5fe;
  --ritual-4: #eceefb;
  --ritual-5: #e4e7f5;
  --ritual-particle: #796cbf;

  /* the backdrop's motif layer — the rug figures over the wash.
     Two tokens rather than literals in site-backdrop.css because the SAME ink
     at the SAME opacity is not the same texture on the two grounds: a mid
     violet on a near-white page carries far less contrast than it does on
     Nocturne's near-black, so light needs the heavier hand. Measured by
     rendering both, not assumed. --lattice-tile is the motif's scale; the art
     is a 540px seamless tile, so any value is a scaling of it.

     ⚠ 0.15 is a CEILING, not a taste. Text sits ON this motif with no card
     under it, and at 0.14 --mute over a glyph measured 4.57:1 against the
     clean ground's 5.32 — AA for body text, with almost nothing to spare.
     Past ~0.15 the site's secondary text drops below 4.5:1 everywhere at
     once, and nothing in the build would say so.

     ⚠ Changed 2026-09-11 (plan 47), at Iman's ask for "larger texture, less
     on it": tile 420 -> 680px, opacity 0.14 -> 0.12 light and 0.10 -> 0.09
     dark. The two halves do different work and only one of them touches
     contrast:

       TILE is contrast-NEUTRAL. Scaling the mask changes how big a glyph is
       and how many land on a screen, not the alpha any pixel is drawn at, so
       the 4.57:1 worst case is unaffected by 680px. What it buys is the
       "less" half — a 1280px viewport now shows about 2 columns of motif
       instead of 3, so the page reads calmer at the same ink.

       OPACITY is the only lever that moves contrast, which is why the "less"
       was spent here rather than on the ceiling: 0.14 -> 0.12 takes the worst
       case AWAY from the bar, to roughly 4.7:1, instead of toward it. */
  --lattice-tile: 680px;
  --lattice-opacity: 0.12;

  /* ---- 4. the navigation contract -------------------------------------- */
  /* shared/site-nav.css consumes exactly these seven and nothing else; the
     Quartz garden maps its own palette onto the same names. A visual
     difference between the two bars is a bug in the shared sheet, not a
     local override. Translucent because the bar carries backdrop-filter. */
  --nav-bg: rgba(228, 231, 245, 0.86);
  --nav-border: var(--hair);
  --nav-text: var(--ink);
  --nav-text-soft: var(--mute);
  --nav-accent: var(--acc);
  --nav-accent-soft: var(--acc-soft);
  --nav-on-accent: var(--on-acc);
}

/* ═══ dark — Nocturne's own ground ══════════════════════════════════════ */

:root[data-theme="dark"] {
  color-scheme: dark;

  --ground: #161826;
  --surf: #232532;
  --surf2: #1d1f2c;
  --ink: #e9e9ed;
  --mute: #9397ab;
  --faint: #75798c; /* dimmest step here — the inversion described above */
  --line: #3f424d;
  --hair: rgba(233, 233, 237, 0.14);

  --acc: #9184d9;
  --acc-text: #d2cefd;
  --acc-soft: rgba(145, 132, 217, 0.14);
  --acc-strong: rgba(145, 132, 217, 0.26);
  --on-acc: #161826;

  /* the two non-body text roles, dark side — see the light block.
     --ctl-label is BRIGHTER than --mute here and DARKER than it there; that
     inversion is the point, not an inconsistency. */
  --placeholder: #8b8fa4;
  --ctl-label: #c6c9d6;

  /* the filled control state, dark side. Here it IS --acc: --ground on
     #9184d9 measures 5.45:1 and the pill sits 5.06:1 off its track, so this
     theme has none of the problem that forced the light block onto the
     deeper value. Declared rather than aliased so both themes state it in
     the same place. */
  --acc-fill: #9184d9;
  --on-acc-fill: #161826;

  --line-strong: #565b6d;

  /* The wordmark's accent, dark side. Here it IS --acc: the guide draws the
     dark logo at #9184d9, and on this ground that value already measures
     6.06:1, so the light side's split (see the note there) has nothing to
     solve. Declared anyway rather than aliased, so the two themes' logo
     colour is stated in the same place in both blocks. */
  --logo-acc: #9184d9;

  /* status, dark side. Measured the same way:
       --ink  on --warn-surf   12.83:1
       --mute on --warn-surf    5.37:1
       --warn on --ground       7.17:1
     The dark side has more room, so --warn is brighter here rather than
     merely inverted — the light value on this ground would read as brown. */
  --warn: #d69a3c;
  --warn-line: #4a3d26;
  --warn-surf: #2a2318;

  --bloom: rgba(66, 58, 106, 0.5);
  --shadow: 0 14px 38px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 22px 56px rgba(0, 0, 0, 0.55);

  --hl-bg: rgba(145, 132, 217, 0.28);
  --hl-ink: #e7e5fe;

  /* the garden's two, dark side — see the note in the light block */
  --structure: #75798c;
  --mark-bg: rgba(145, 132, 217, 0.32);

  /* the scrim, dark side — --ground's channels */
  --scrim: rgba(22, 24, 38, 0.94);
  --scrim-0: rgba(22, 24, 38, 0);

  /* the ritual surfaces, dark side */
  --surf-veil: rgba(35, 37, 50, 0.66);
  --surf-veil-strong: rgba(35, 37, 50, 0.9);
  --surf-veil-soft: rgba(35, 37, 50, 0.45);

  --ritual-1: #161826;
  --ritual-2: #1d1f2c;
  --ritual-3: #232532;
  --ritual-4: #1f2130;
  --ritual-5: #161826;
  --ritual-particle: #d2cefd;

  /* lighter ink on a dark ground reads sooner — see the light block */
  --lattice-tile: 680px;
  --lattice-opacity: 0.09;

  /* the bar */
  --nav-bg: rgba(22, 24, 38, 0.86);

  /* ---- the semantic accents, dark side — see the light block ----------- */
  --lapis: #8fa9e0;
  --lapis-soft: #1e2740;
  --lapis-line: #39456b;
  --saffron: #e0b155;
  --saffron-soft: #332a15;
  --madder: #df8ea0;
  --madder-soft: #331c22;
  --verdigris: #6fbdae;
  --verdigris-soft: #15302c;
  --verdigris-line: #2a4d46;

  /* provenance, dark side. The aliases themselves are inherited from the
     light block — only the pigments they point at are redefined here, which
     is why there are three lines and not six. */

  /* ---- the nine dyes, dark side — see the light block ------------------- */
  --dye-gerdu: #bb8d6c;
  --dye-zaferan: #ffbc45;
  --dye-anar: #b0a946;
  --dye-runas: #d45a45;
  --dye-qermezdane: #f37699;
  --dye-nil: #7795da;
  --dye-esparak: #cde081;
  --dye-golrang: #f2a17c;
  --dye-jaft: #90847b;
  --shadow-flat: 0 1px 2px rgba(0, 0, 0, 0.4);

  /* ---- the five poets, dark side --------------------------------------- */
  --poet-hafez: #876dc8;
  --poet-saadi: #109488;
  --poet-khayyam: #d9a441; /* was #b66c00 — 4.30:1, the set's worst. Now 7.83. */
  --poet-ferdowsi: #bd5a84;
  --poet-rumi: #4381cf;
}

/* ═══ 5. type, radii, motion — shared by both themes ═══════════════════ */

:root {
  /* FOUR families, four jobs, one stylesheet request from index.html.
     Restated 2026-09-08 by the identity guide (plan 42); the roles are its
     words, the fallbacks are ours.

       --font           Vazirmatn — everything a reader actually reads: the
                        couplets, the prose, the controls. 300 for a verse,
                        400 for body, 500/600 for a label.
       --font-display   Lalezar — headings and the Persian name. ⚠ ONE WEIGHT.
                        Google serves Lalezar at 400 only, so a rule that asks
                        for 500 or 600 on a Lalezar element gets the browser's
                        synthetic bold, which thickens the strokes unevenly and
                        is exactly the muddiness the face was chosen to avoid.
                        Every --font-display site was set to 400 in plan 42;
                        keep it that way.
       --font-wordmark  Sora — the logo, and nothing else. Not a UI face: it is
                        here so `inzib` is drawn the same way in the header, on
                        the /logo page and in the icons.
       --font-ui        Inter — small Latin labels and uppercase eyebrows.

     ⚠ --font-nastaliq NO LONGER FOLLOWS --font-display. It was aliased to it,
     and it is what draws the fāl ghazal and the share card — so pointing the
     display token at Lalezar while the alias stood would have set a heavy
     display face on a ghazal, silently, with nothing failing. The guide is
     explicit that a verse is Vazirmatn 300, so the alias moves to the body
     face and the name is kept only because call sites still use it. Plan 42,
     D3. (Mirza and IranNastaliq were never loaded; this has always resolved
     to Vazirmatn in practice, so this restores the truth rather than changing
     what a reader sees.) */
  --font: "Vazirmatn", system-ui, -apple-system, sans-serif;
  --font-display: "Lalezar", "Vazirmatn", system-ui, sans-serif;
  --font-wordmark: "Sora", "Inter", system-ui, -apple-system, sans-serif;
  --font-ui: "Inter", system-ui, -apple-system, sans-serif;
  --font-nastaliq: var(--font);

  /* The wordmark's one piece of geometry, so the header, the /logo page and
     any future surface draw it identically: Sora 600 at -0.04em. */
  --wordmark-weight: 600;
  --wordmark-tracking: -0.04em;

  /* ── THE VERSE WEIGHT ────────────────────────────────────────────────
     Plan 43 T8.3. Seven places draw a couplet, and every one of them had
     `font-weight: 300` written into it: AnswerBody, AnswerTurn, Composer
     (twice), CoupletCard, NearbyVerses and PoemDetail.

     ⚠ 300 IS CORRECT FOR VAZIRMATN AND WRONG FOR THE OTHER TWO, and this
     is the whole reason the token exists. Vazirmatn ships a real 300. Noto
     Naskh Arabic starts at 400 and Gulzar has ONE weight — so asking either
     for 300 does not give a lighter face, it gives the browser's SYNTHETIC
     light: strokes thinned by an algorithm that knows nothing about Persian
     letterforms, which on a nastaliq face looks like a rendering fault.

     Nothing errors. The verse simply looks wrong, and only for readers who
     chose a different face — so it would be reported as "the site looks odd
     on my phone" and never reproduced. The token is redefined per face in
     section 6 below, and the seven sites read it.

     ── THE READING FACE ─────────────────────────────────────────────────
     `--font-reading` is what a couplet is set in. It follows `--font` here
     and is overridden per `[data-font]`. Body prose, labels and controls
     deliberately do NOT follow it: a reader choosing نستعلیق is choosing it
     for the POETRY, and setting a form field in a nastaliq face would make
     the interface hard to use rather than beautiful. */
  --verse-weight: 300;
  --font-reading: var(--font);
  --verse-line-height: 2.1;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* One duration and one curve, so nothing on the page moves at its own
     private speed. */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 200ms;
  --dur-slow: 380ms;

  /* A minimal layering scale. Before 2026-09-02 every z-index in the app
     (0, 1, 40, 50, 100, 1000) was chosen locally with nothing to check it
     against, which is how the poet picker's menu (40) ended up losing to the
     sticky header (100) instead of covering it. Two rungs is enough for what
     exists today: the header, and anything that must clear it unconditionally
     — a portalled popover, a modal. Grow this scale before adding a third
     kind of overlay, rather than picking another number by hand. */
  --z-header: 100;
  --z-popover: 1000;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur: 1ms;
    --dur-slow: 1ms;
  }
}

/* ═══ 6. the reading face — plan 43 T8 ════════════════════════════════════

   The reader chooses the face their POETRY is set in. Three blocks, and each
   one changes exactly two tokens: the family, and the weight a verse is drawn
   at.

   ⚠ NOTHING ELSE BELONGS IN THESE BLOCKS. T8.1's criterion is that switching
   `data-font` in devtools changes the page with no other change — which is
   only true while every rule that varies by face is here. The moment one
   component grows its own `[data-font=nastaliq]` rule, the face becomes a
   thing seven files know about instead of one, and the next face added has to
   find them all.

   The attribute is stamped on <html> by the inline script in index.html BEFORE
   the first paint, so a returning reader never sees the default face flash
   first (T8.2). localStorage is the render source; the account is the
   portability copy (T8.4).

   ⚠ The families are loaded ON DEMAND by services/fontPref.js, not in
   index.html's stylesheet request. A reader who never opens the chooser pays
   nothing for the two faces they did not pick. */

:root[data-font="naskh"] {
  --font-reading: "Noto Naskh Arabic", "Vazirmatn", serif;
  /* No 300 exists in this family. Asking for one gets a synthetic light —
     algorithmically thinned strokes that look like a rendering fault. */
  --verse-weight: 400;
}

:root[data-font="nastaliq"] {
  --font-reading: "Gulzar", "Vazirmatn", serif;
  /* Gulzar has exactly ONE weight. Same reasoning, more so: nastaliq
     letterforms are calligraphic, and a synthetic weight destroys them. */
  --verse-weight: 400;
  /* Nastaliq sits on a steeply sloped baseline and needs the room, or
     descenders from one line collide with the line beneath. This is the one
     metric that genuinely differs by face rather than being a preference. */
  --verse-line-height: 2.6;
}

/* ── generated: the same dark values, for a reader who has chosen nothing ── */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #161826;
    --surf: #232532;
    --surf2: #1d1f2c;
    --ink: #e9e9ed;
    --mute: #9397ab;
    --faint: #75798c;
    --line: #3f424d;
    --hair: rgba(233, 233, 237, 0.14);
    --acc: #9184d9;
    --acc-text: #d2cefd;
    --acc-soft: rgba(145, 132, 217, 0.14);
    --acc-strong: rgba(145, 132, 217, 0.26);
    --on-acc: #161826;
    --placeholder: #8b8fa4;
    --ctl-label: #c6c9d6;
    --acc-fill: #9184d9;
    --on-acc-fill: #161826;
    --line-strong: #565b6d;
    --logo-acc: #9184d9;
    --warn: #d69a3c;
    --warn-line: #4a3d26;
    --warn-surf: #2a2318;
    --bloom: rgba(66, 58, 106, 0.5);
    --shadow: 0 14px 38px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 22px 56px rgba(0, 0, 0, 0.55);
    --hl-bg: rgba(145, 132, 217, 0.28);
    --hl-ink: #e7e5fe;
    --structure: #75798c;
    --mark-bg: rgba(145, 132, 217, 0.32);
    --scrim: rgba(22, 24, 38, 0.94);
    --scrim-0: rgba(22, 24, 38, 0);
    --surf-veil: rgba(35, 37, 50, 0.66);
    --surf-veil-strong: rgba(35, 37, 50, 0.9);
    --surf-veil-soft: rgba(35, 37, 50, 0.45);
    --ritual-1: #161826;
    --ritual-2: #1d1f2c;
    --ritual-3: #232532;
    --ritual-4: #1f2130;
    --ritual-5: #161826;
    --ritual-particle: #d2cefd;
    --lattice-tile: 680px;
    --lattice-opacity: 0.09;
    --nav-bg: rgba(22, 24, 38, 0.86);
    --lapis: #8fa9e0;
    --lapis-soft: #1e2740;
    --lapis-line: #39456b;
    --saffron: #e0b155;
    --saffron-soft: #332a15;
    --madder: #df8ea0;
    --madder-soft: #331c22;
    --verdigris: #6fbdae;
    --verdigris-soft: #15302c;
    --verdigris-line: #2a4d46;
    --dye-gerdu: #bb8d6c;
    --dye-zaferan: #ffbc45;
    --dye-anar: #b0a946;
    --dye-runas: #d45a45;
    --dye-qermezdane: #f37699;
    --dye-nil: #7795da;
    --dye-esparak: #cde081;
    --dye-golrang: #f2a17c;
    --dye-jaft: #90847b;
    --shadow-flat: 0 1px 2px rgba(0, 0, 0, 0.4);
    --poet-hafez: #876dc8;
    --poet-saadi: #109488;
    --poet-khayyam: #d9a441;
    --poet-ferdowsi: #bd5a84;
    --poet-rumi: #4381cf;
  }
}

/* -----------------------------------------------------------------------
   site-backdrop.css — the one backdrop, for every page of every stack.

   What this is
     The soft violet bloom the fāl page has carried since the Nocturne
     redesign: a corner glow, a second warmer glow opposite it, and a diagonal
     wash between five ground stops, with a woven rug motif over the top (a
     faint illumination lattice until 2026-09-11). Until 2026-09-04 it lived inside RitualBackdrop.jsx and was mounted
     by exactly ONE page — pages/Fal.jsx — so `/`, `/about`, the word garden
     and the entity pages all rendered on a flat fill instead.

   Why it is a stylesheet and not a component
     A component can only reach the stack it is written for, and inzib has
     three. As CSS on `body`, the same definition is generated into the Quartz
     garden and the Python entity pages by scripts/gen_design_tokens.mjs, and
     every page of the site gets it without opting in — which is the whole
     point: this file exists because "apply one style to the whole site" was
     not previously possible.

   Why `body::before` and not a background on `body`
     `background-attachment: fixed` is the obvious alternative and is the wrong
     one: it janks badly while scrolling on mobile WebKit, and iOS has ignored
     it outright in several versions. A `position: fixed` pseudo-element with
     `z-index: -1` is composited once and never repaints on scroll. It paints
     ABOVE the root element's propagated background — which is why it is
     visible at all despite the negative index — and below every scrap of page
     content, which is why nothing needs a z-index of its own to clear it.

     The consequence to remember: an ancestor with `transform`, `filter` or
     `will-change` would make it a containing block and the layer would scroll
     with the page. Nothing on any of the three stacks does that today.

   Every colour here is a token. There is no literal in this file, so the
   backdrop follows the theme without knowing that themes exist.

   Author: inzib control room (Claude), 2026-09-04. Plan 38, T7.
   ----------------------------------------------------------------------- */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    /* the bloom, over the reader's shoulder */
    radial-gradient(ellipse 80% 60% at 30% 20%, var(--bloom) 0%, transparent 60%),
    /* a quieter answering glow, opposite */
    radial-gradient(ellipse 70% 50% at 75% 80%, var(--acc-soft) 0%, transparent 55%),
    /* and the wash the two sit on */
    linear-gradient(
      135deg,
      var(--ritual-1) 0%,
      var(--ritual-2) 25%,
      var(--ritual-3) 55%,
      var(--ritual-4) 80%,
      var(--ritual-5) 100%
    );
}

/* The lattice: a Persian rug motif — birds, cypresses, knots and beasts, the
   vocabulary of a woven carpet — tiled across the whole site behind everything.

   It replaced a stroked nested-diamond figure on 2026-09-11, at Iman's ask.
   The art is generated pixel work, `references/design/inzib-bg-seed-4678.svg`,
   and what ships is NOT that file: see the <desc> inside the tile for why it
   was cropped from 630 to 540 wide. The short version is that the source's
   motif columns sit 180px apart, 180 does not divide 630, and tiling the
   original therefore dropped two glyphs 51px apart at every seam where the
   rhythm is 147px — a vertical stripe repeating across the page. At 540 every
   band's period divides the tile and the seam is gone.

   It is MASKED rather than drawn in colour, and that is the point. A mask takes
   its colour from `background-color`, so the motif is the accent, follows the
   theme, and contains no hex at all. The fill inside the file is arbitrary;
   only the alpha channel survives masking.

   Why a file and not a data URI, unlike the figure it replaced
     The diamond was 300 bytes and inlined twice. This is 22 KB, and this sheet
     is copied VERBATIM into the Quartz garden's SCSS and the entity pages' CSS
     by scripts/gen_design_tokens.mjs — so inlining it would have put 130 KB of
     base-ish path data into three render-blocking stylesheets to draw something
     at ten percent opacity. As a file it is one cached request, gzips to about
     a tenth, and the URL is root-absolute so all three stacks resolve it from
     the SPA's dist/ regardless of which path they are served under.

     The filename carries the art's seed. It is the cache key: `public/` is not
     hashed by Vite, so a NEW motif must arrive under a NEW name rather than
     overwrite this one.

   Both numbers are tokens, and both DIFFER between the themes — the same ink at
   the same opacity is not the same texture on a near-white page as on
   Nocturne's near-black. There is still no literal in this file. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--lattice-opacity);
  background-color: var(--acc);
  -webkit-mask-image: url("/images/backdrop-motif-4678.svg");
  mask-image: url("/images/backdrop-motif-4678.svg");
  -webkit-mask-size: var(--lattice-tile) var(--lattice-tile);
  mask-size: var(--lattice-tile) var(--lattice-tile);
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
}

/* Printing a poem should not spend a cartridge on the sky behind it. */
@media print {
  body::before,
  body::after {
    display: none;
  }
}

/* GENERATED FILE — do not edit.
 * Source:     frontend/src/shared/icon-hover.css + frontend/src/shared/site-nav.css + frontend/src/shared/site-footer.css
 * Regenerate: node scripts/gen_nav_data.mjs
 * Verify:     node scripts/gen_nav_data.mjs --check
 *
 * The shell is defined once for the whole site. This copy exists so the
 * static entity pages under /sky/people and /sky/places can render the
 * identical bar and the identical footer without a build step of their own.
 */

/* -----------------------------------------------------------------------
   icon-hover.css — the animated-icon utility, shared by both stacks.

   Lifted verbatim out of index.css on 2026-08-29 so the Quartz garden's
   navigation tabs animate exactly like the React app's. The garden's copy,
   quartz/components/styles/iconhover.generated.scss, is generated from this
   file by scripts/gen_nav_data.mjs — edit here, never there.
   ----------------------------------------------------------------------- */

/* -----------------------------------------------------------------
   Animated hover icons — inspired by itshover.com.

   Add `.icon-hover` to any inline <svg>, then pick a variant:

     .icon-hover--spin  → 360° rotation
     .icon-hover--bob   → vertical bob (good for nav glyphs)
     .icon-hover--pop   → quick scale-up overshoot
     .icon-hover--wobble → playful side-to-side
     .icon-hover--draw  → strokes redraw themselves on hover
                          (use on stroked SVGs whose paths get
                          `pathLength="1"` so the dash math is
                          consistent regardless of geometry)

   The animation triggers when an ancestor element with the class
   `.icon-hover-host` is hovered or focused, so dropping the class
   onto a button or link lights up every nested icon at once.
   ----------------------------------------------------------------- */
.icon-hover {
  display: inline-block;
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 220ms ease;
  will-change: transform;
}

.icon-hover-host:hover .icon-hover--spin,
.icon-hover-host:focus-visible .icon-hover--spin,
.icon-hover--spin:hover {
  animation: icon-hover-spin 600ms cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes icon-hover-spin {
  to { transform: rotate(360deg); }
}

.icon-hover-host:hover .icon-hover--bob,
.icon-hover-host:focus-visible .icon-hover--bob,
.icon-hover--bob:hover {
  animation: icon-hover-bob 700ms ease-in-out;
}
@keyframes icon-hover-bob {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-3px); }
  60%  { transform: translateY(1px); }
  100% { transform: translateY(0); }
}

.icon-hover-host:hover .icon-hover--pop,
.icon-hover-host:focus-visible .icon-hover--pop,
.icon-hover--pop:hover {
  animation: icon-hover-pop 380ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes icon-hover-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.icon-hover-host:hover .icon-hover--wobble,
.icon-hover-host:focus-visible .icon-hover--wobble,
.icon-hover--wobble:hover {
  animation: icon-hover-wobble 600ms ease-in-out;
}
@keyframes icon-hover-wobble {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(-12deg); }
  75%      { transform: rotate(10deg); }
}

/* Draw-in: SVGs that opt in should set pathLength="1" on their
   strokes so the dasharray math works no matter the path length. */
.icon-hover--draw [pathLength="1"],
.icon-hover--draw path,
.icon-hover--draw line,
.icon-hover--draw circle,
.icon-hover--draw polyline {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 600ms ease;
}
.icon-hover-host:hover .icon-hover--draw [pathLength="1"],
.icon-hover-host:hover .icon-hover--draw path,
.icon-hover-host:hover .icon-hover--draw line,
.icon-hover-host:hover .icon-hover--draw circle,
.icon-hover-host:hover .icon-hover--draw polyline,
.icon-hover--draw:hover [pathLength="1"],
.icon-hover--draw:hover path,
.icon-hover--draw:hover line,
.icon-hover--draw:hover circle,
.icon-hover--draw:hover polyline {
  animation: icon-hover-draw 700ms ease forwards;
}
@keyframes icon-hover-draw {
  0%   { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .icon-hover,
  .icon-hover-host:hover .icon-hover {
    animation: none !important;
    transition: none !important;
  }
}

/* -----------------------------------------------------------------------
   site-nav.css — the one stylesheet for the site's navigation.

   Purpose
     The React SPA and the Quartz garden render the same bar from
     site-nav.js; this file makes them *look* the same as well. Both stacks
     load it verbatim — the garden's copy is generated by
     scripts/gen_nav_data.mjs into quartz/components/styles/sitenav.generated.scss.

   Structure
     1. tokens        the --nav-* contract each stack must map
     2. .sitenav      row one: the bar (brand + tabs)
     3. .pagerow      row two: back, and the crumbs that say where you are
     4. phones

   The tabs' hover animations are the shared icon-hover.css utility,
   imported alongside this file by both stacks.

   The contract
     A host stack maps its own design tokens onto these, and nothing else:

       --nav-bg, --nav-border, --nav-text, --nav-text-soft,
       --nav-accent, --nav-accent-soft, --nav-on-accent

     Fallbacks are supplied for every one, so a stack that forgets a token
     still renders a legible bar rather than an invisible one.

   Positioning is deliberately NOT set here: the SPA's bar is sticky at the
   top of the document, while the garden's is fixed with a spacer (Quartz's
   scrolling ancestors defeat sticky — plan 28). Each stack owns that.

   Author: inzib control room (Claude), 2026-08-29. Shell geometry (the
   column tokens, `.shellrow`, the fixed bar height): plan 41, 2026-09-08.
   ----------------------------------------------------------------------- */

/* ---- 1. the shell column ----------------------------------------------
   Plan 41, 2026-09-08. Iman, with four screenshots: the bar, the back
   control and the section strip landed in a different place on every page.
   Measured at 1440px: the SPA's bar column was 120–1320, the garden's bar
   shrink-wrapped to 499–941, the entity pages' was 130–1310; the back
   control sat at x=1296, 1220, 1424, 503 or was missing altogether.

   One column, defined once, used by everything under the bar: the bar's
   inner row, the row beneath it (.shellrow), and the SPA's content column
   (Layout.jsx reads the same two tokens). A host stack positions the bar;
   it never sets its own width.                                            */

:root {
  --shell-max: 1200px;
  --shell-pad: 24px;
  --shell-bar-h: 60px;
}

/* ---- 2. the bar ------------------------------------------------------- */

.sitenav {
  /* Quartz's Header.css sets `header { display: flex; gap: 1.5rem }` on the
     bare element, and this bar IS a <header>. As a flex item with no width,
     .sitenav-inner shrink-wrapped to its content and floated in the middle
     of the garden's pages (443px wide at 1440). Block, everywhere. */
  display: block;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 200ms ease, border-color 200ms ease;
}

.sitenav-inner {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--shell-max);
  min-height: var(--shell-bar-h);
  margin: 0 auto;
  padding: 12px var(--shell-pad);
  display: flex;
  align-items: center;
  gap: 20px;
  /* The three hosts set 1.4, 1.55 and 1.7 on body; the bar was 55, 57 and
     61px tall. Its own line-height makes min-height the height everywhere. */
  line-height: 1.5;
}

/* The wordmark. Sora 600 at -0.04em, lowercase, two colours with the boundary
   between n and z — the whole of the mark's specification, and it is the same
   here as on /logo because both read it from the same tokens.

   `direction: ltr` is load-bearing: the bar is inside dir="rtl", and a Latin
   word with a trailing element can be reordered by the bidi algorithm. It is
   pinned so `in` is always left of `zib`.

   --font-wordmark and --logo-* are given literal fallbacks like every other
   token here: a host stack that maps only the seven --nav-* names still gets
   the right mark rather than a system-font approximation. */
.sitenav-brand {
  font-family: var(--font-wordmark, "Sora", "Inter", system-ui, sans-serif);
  font-size: 22px;
  font-weight: var(--wordmark-weight, 600);
  letter-spacing: var(--wordmark-tracking, -0.04em);
  direction: ltr;
  color: var(--nav-text);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.sitenav-brand span {
  color: var(--logo-acc, var(--nav-accent));
}

.sitenav-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
}

/* ⚠ FLAT SINCE 2026-09-08, at Iman's request: no pill, no outline, no fill.
   «اون دایره دور دکمه رو حذف کن. همین که موس رو روش می‌بریم یا وقتی کلیک
   می‌کنیم رنگش عوض میشه کافیه. خیلی شیک‌تر و ساده‌تره»

   State is carried by COLOUR and WEIGHT alone. Three things are deliberately
   kept rather than removed with the shape:

   - The padding. It is the touch target, not decoration — 44px-ish on a
     phone. Removing the visible pill must not shrink what a thumb can hit.
   - A `:focus-visible` ring. A control with no border and no background has
     no resting affordance, so the keyboard ring is now the ONLY thing marking
     focus. It was previously carried by the browser default against a visible
     box; take the box away without this and keyboard navigation goes dark.
   - `font-weight` on the current tab. Colour alone is not a sufficient state
     indicator for a reader who cannot distinguish it. */
/* ⚠ THE UNDERLINE IS THE STATE, since 2026-09-08 (plan 42). The identity
   guide gives one rule for every control on the site — «بی‌قاب، بی‌پر،
   بی‌جداکنندهٔ عمودی» — no box, no pill, no vertical divider:

     active / primary   a FIXED 1.5px accent underline
     secondary          the same line at 1px, grown from the START edge on
                        hover over 160ms
     ghost              colour alone

   Drawn as a background gradient rather than border-bottom or ::after,
   because only a background can animate its own width from one edge without
   a second element — and the garden's renderer emits no pseudo-element hooks.

   `background-position: right calc(100% - 4px)` is the RTL growth direction:
   the bar is inside dir="rtl", so a line that grows "from the start" grows
   from the right. The 4px lifts it off the text's descenders.

   Three things survive the flattening deliberately, as they did in the
   2026-09-08 change that removed the pill:
     - the padding, which is the touch target and not decoration
     - :focus-visible, now the ONLY resting affordance a keyboard gets
     - font-weight on the current tab, because colour alone is not a
       sufficient state indicator for a reader who cannot distinguish it */
.sitenav-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  color: var(--nav-text-soft);
  border: 0;
  background-color: transparent;
  background-image: linear-gradient(var(--nav-accent), var(--nav-accent));
  background-repeat: no-repeat;
  background-size: 0 1px;
  background-position: right calc(100% - 4px);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  transition: color 160ms var(--ease, cubic-bezier(0.22, 0.61, 0.36, 1)),
    background-size 160ms var(--ease, cubic-bezier(0.22, 0.61, 0.36, 1));
}

.sitenav-tab:hover,
.sitenav-tab:active {
  color: var(--nav-accent);
  background-size: 100% 1px;
}

.sitenav-tab-active {
  color: var(--nav-accent);
  font-weight: 700;
  background-size: 100% 1.5px;
}

/* The call-to-action tab. It was a filled pill with a shadow; it is now the
   accent colour and the fixed underline the guide gives a primary control —
   emphasis enough beside two soft-grey siblings. */
.sitenav-tab-emphasis {
  padding: 8px 16px;
  gap: 8px;
  color: var(--nav-accent);
  font-weight: 700;
  background-size: 100% 1.5px;
}

.sitenav-tab-emphasis:hover,
.sitenav-tab-emphasis:active,
.sitenav-tab-emphasis.sitenav-tab-active {
  color: var(--nav-accent);
  background-size: 100% 1.5px;
}

.sitenav-tab:focus-visible,
.sitenav-tab-emphasis:focus-visible {
  outline: 2px solid var(--nav-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.sitenav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---- 3. the row under the bar ----------------------------------------
   Back, plus crumbs that carry information the bar does not. It never
   repeats a section the bar already shows, and it never repeats home —
   the brand mark is the home link. (Iman, 2026-08-29.)

   .shellrow is the box the row sits in on the two static renderers: the
   same column as the bar, the same padding as the SPA's .main-content, so
   the back control's start edge is the brand's start edge on every page.
   Contents stack from the start edge: the garden's strip first (when there
   is one), then the back row. Never centred, never side by side.
   The SPA does not use it — .main-content already IS this box.           */

.shellrow {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: var(--shell-pad) var(--shell-pad) 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.shellrow > .skysub {
  margin: 0 0 10px;
}

.pagerow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--nav-text-soft);
}

/* Flat since 2026-09-08 — see the note on .sitenav-tab. This was the outlined
   pill Iman named as the second example ("مثلا برای کلمه بازگشت"). */
.pagerow-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background-color: transparent;
  background-image: linear-gradient(var(--nav-accent), var(--nav-accent));
  background-repeat: no-repeat;
  background-size: 0 1px;
  background-position: right calc(100% - 4px);
  padding: 6px 14px 6px 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--nav-text-soft);
  cursor: pointer;
  text-decoration: none;
  transition: color 160ms var(--ease, cubic-bezier(0.22, 0.61, 0.36, 1)),
    background-size 160ms var(--ease, cubic-bezier(0.22, 0.61, 0.36, 1));
}

.pagerow-back:hover,
.pagerow-back:active {
  color: var(--nav-accent);
  background-size: 100% 1px;
}

.pagerow-back:focus-visible {
  outline: 2px solid var(--nav-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.pagerow-back svg {
  width: 14px;
  height: 14px;
  /* RTL: the arrow points right, which is "back" here */
  transform: scaleX(-1);
}

.pagerow-crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pagerow-crumbs li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pagerow-crumbs a {
  color: var(--nav-text-soft);
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms;
}

.pagerow-crumbs a:hover {
  color: var(--nav-accent);
}

.pagerow-sep {
  color: var(--nav-border);
}

.pagerow-current {
  color: var(--nav-text);
  font-weight: 600;
}

/* ---- 4. phones -------------------------------------------------------
   Labels give way to icons so the four tabs stay on one line; without
   this the garden's bar grew to 81 px and pushed the page down.          */

@media (max-width: 768px) {
  :root {
    --shell-pad: 16px;
    --shell-bar-h: 52px;
  }
  .sitenav-inner {
    padding: 10px var(--shell-pad);
    gap: 10px;
  }
  .sitenav-brand {
    font-size: 19px;
  }
  .sitenav-tabs {
    gap: 6px;
  }
  .sitenav-tab {
    padding: 6px 10px;
    font-size: 12px;
  }
  .sitenav-tab-emphasis {
    padding: 7px 12px;
    font-size: 12px;
    gap: 6px;
  }
  .sitenav-tab span,
  .sitenav-tab-emphasis span {
    display: none;
  }
  .pagerow {
    margin-bottom: 12px;
    gap: 10px;
  }
}

/* ---- 5. the garden's own three ---------------------------------------
   واژه‌ها · مردمان · جای‌ها — one level below the header, on every page
   under /sky/. Added 2026-09-02, when the garden stopped being only a word
   map. Rendered by three stacks from SKY_SECTIONS: the Quartz components,
   the static entity pages, and the /sky/ landing (as cards, below).

   Same token contract as the bar above: the seven --nav-* names and nothing
   else, every one with a literal fallback, so a host that forgets to map
   them still gets a legible strip rather than an invisible one. */

.skysub {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
}

/* Flat since 2026-09-08 — the garden's sub-nav (واژه‌ها / مردمان / جای‌ها) is
   part of the same header, and leaving it pill-shaped beside a flattened site
   bar would look like an oversight rather than a decision. */
.skysub-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: 0;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  color: var(--nav-text-soft);
  background-color: transparent;
  background-image: linear-gradient(var(--nav-accent), var(--nav-accent));
  background-repeat: no-repeat;
  background-size: 0 1px;
  background-position: right calc(100% - 3px);
  transition: color 160ms var(--ease, cubic-bezier(0.22, 0.61, 0.36, 1)),
    background-size 160ms var(--ease, cubic-bezier(0.22, 0.61, 0.36, 1));
}

.skysub-tab:hover,
.skysub-tab:active {
  color: var(--nav-accent);
  background-size: 100% 1px;
}

.skysub-tab[aria-current="page"] {
  color: var(--nav-accent);
  font-weight: 700;
  background-size: 100% 1.5px;
}

.skysub-tab:focus-visible {
  outline: 2px solid var(--nav-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skysub-icon {
  width: 15px;
  height: 15px;
  flex: none;
}

.skysub-count {
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  opacity: 0.72;
}

/* ---- 6. the landing's three doors -------------------------------------
   The same three, as cards, for the one page whose whole job is the choice.
   A card is a link: the entire block is the target, not a word inside it. */

.skydoors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 14px;
  margin: 26px 0 8px;
}

.skydoor {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 20px 22px;
  border-radius: 10px;
  border: 1px solid var(--nav-border);
  background: var(--nav-bg);
  text-decoration: none;
  color: var(--nav-text);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.skydoor:hover {
  border-color: var(--nav-accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
}

.skydoor[aria-current="page"] {
  border-color: var(--nav-accent);
  box-shadow: inset 0 0 0 1px var(--nav-accent);
}

.skydoor-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skydoor-icon {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--nav-accent);
}

.skydoor-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.skydoor-blurb {
  font-size: 14px;
  line-height: 1.75;
  color: var(--nav-text-soft);
}

.skydoor-count {
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  color: var(--nav-accent);
  font-weight: 600;
  margin-top: auto;
  padding-top: 4px;
}

@media (max-width: 768px) {
  .skysub-tab {
    padding: 5px 10px;
    font-size: 12.5px;
    gap: 5px;
  }
  .skydoor {
    padding: 16px 18px;
  }
  .skydoor-title {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skydoor:hover {
    transform: none;
  }
  /* The underline still APPEARS — it is state, not decoration, and removing
     it would take the hover affordance away entirely. Only the sweep goes. */
  .sitenav-tab,
  .sitenav-tab-emphasis,
  .pagerow-back,
  .skysub-tab {
    transition: none;
  }
}

/* -----------------------------------------------------------------------
   site-footer.css — the one stylesheet for the site's footer.

   Purpose
     inzib is three applications behind one origin, and until now each drew
     its own footer: the SPA a rich one, the Quartz garden Quartz's own
     two-link default, and the entity pages a provenance line with no links
     at all. This file is the footer's half of what site-nav.css already does
     for the bar — one sheet, loaded verbatim by all three stacks, so the
     bottom of a page does not change when a visitor crosses between them.

   Structure
     1. the contract    which tokens a host stack must map
     2. .sitefoot       the shell and its columns
     3. .sitefoot-*     the groups, the links, the closing row
     4. phones

   The contract
     EXACTLY the seven --nav-* tokens site-nav.css already defines, and
     nothing else:

       --nav-bg, --nav-border, --nav-text, --nav-text-soft,
       --nav-accent, --nav-accent-soft, --nav-on-accent

     That is deliberate and it is the whole reason this file can be shared.
     All three stacks already map those seven for the bar — the SPA in
     tokens.css, the garden in its generated SCSS, the entity pages in
     nav.py's NAV_BRIDGE_CSS. Consuming one token beyond them would mean a
     fourth bridge to write and a fourth place for dark mode to fall back to
     a light literal, which is a bug this project has already shipped once.
     Spacing, radii and durations are literals here for the same reason.

   TWO CONSTRAINTS THAT SHAPED THIS FILE

     1. It must render in BOTH directions. The SPA and the garden are
        dir="rtl"; the entity pages are rooted dir="ltr" on purpose
        (entity_pages/shell.py explains why). So: logical properties only.
        No `left`, no `right`, no `margin-left` — `inline-start` and
        `inline-end` throughout, and the flex row simply follows the
        document. A physical property here reverses the footer on 2,511
        pages and no checker would catch it.

     2. It must be legible with NO stylesheet at all. Cloudflare holds
        /sky/*.css for four hours, so new markup can meet an old sheet.
        scripts/stamp_assets.sh mitigates that by content-hashing the
        reference, but "mitigated" is not "cannot happen" — a stamp only
        helps the visitors who fetch after the publish. The markup therefore
        carries its own separators as text nodes rather than as ::after
        content, and the groups are real lists, so an unstyled footer is a
        plain readable list of links instead of a run-on line.

   Positioning is NOT set here. The SPA's footer closes a flex column; the
   garden's sits inside Quartz's grid; the entity pages' follows the article.
   Each stack owns where it sits, exactly as it owns the bar's positioning.

   Consumers
     - frontend/src/index.css imports this file directly.
     - backend/quartz-config/.../styles/sitefooter.generated.scss and
       backend/scripts/entity_pages/footer.generated.css are GENERATED from
       it by scripts/gen_nav_data.mjs; `--check` fails if either is stale.

   Author: inzib control room (Claude), 2026-09-03. Plan 36.
   ----------------------------------------------------------------------- */

/* ---- 2. the shell ----------------------------------------------------- */

.sitefoot {
  /* Stated, not inherited. The SPA and the entity pages both set a global
     border-box reset, so this was invisible there — but the Quartz garden does
     not apply one to this element, and `width:100%` plus `padding:0 24px`
     content-box overflowed its overlay by exactly 48px, which is what a DOM
     measurement returned on 2026-09-04. A shared component cannot depend on
     each host's reset; the whole point of this sheet is that it renders the
     same in all three. */
  box-sizing: border-box;

  /* A rule that fades at both ends — the design's own signature, carried
     over from the SPA's footer so the unification is not a downgrade. */
  background: linear-gradient(
      to right,
      transparent,
      var(--nav-border) 48px,
      var(--nav-border) calc(100% - 48px),
      transparent
    )
    no-repeat top / 100% 1px;
  margin-top: 40px;
  padding: 28px 24px 22px;
  color: var(--nav-text-soft);
  font-size: 12px;
  line-height: 1.9;
}

.sitefoot-inner {
  box-sizing: border-box;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---- 3. the groups ---------------------------------------------------- */

.sitefoot-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 56px;
  align-items: flex-start;
}

.sitefoot-group {
  min-inline-size: 150px;
}

.sitefoot-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* The separator the markup carries for the unstyled case. Once this sheet is
   in play the list is a column and the separator would be noise, so it is
   hidden here rather than omitted there. */
.sitefoot-sep {
  display: none;
}

.sitefoot-link {
  color: var(--nav-text-soft);
  text-decoration: none;
  font-weight: 500;
  transition: color 200ms ease;
}

.sitefoot-link:hover,
.sitefoot-link:focus-visible {
  color: var(--nav-accent);
}

/* The page you are already on: shown, not linked away from. */
.sitefoot-link[aria-current="page"] {
  color: var(--nav-accent);
  font-weight: 600;
}

/* ---- the closing row -------------------------------------------------- */

.sitefoot-close {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--nav-border);
  font-size: 11.5px;
}

/* `.sitefoot-note` lived here until 2026-09-04. It styled the «برگرفته از
   گنجور» credit, which moved to /about; no renderer emits the element now. */

/* In the closing row two links are the same size and the same colour until
   hovered, and the first screenshot pass showed them reading as one run of
   text. Unlike .sitefoot-sep this one stays visible: the row is a line, not a
   column, so it needs the mark. It now falls BETWEEN links rather than before
   each one — with the credit gone, a leading dot would dangle. */
.sitefoot-dot {
  padding-inline-end: 8px;
  color: var(--nav-border);
}

/* Pushes the theme control to the far end, whichever end that is. */
.sitefoot-spacer {
  margin-inline-start: auto;
}

.sitefoot-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: transparent;
  border: 1px solid var(--nav-border);
  border-radius: 999px;
  color: var(--nav-text-soft);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease, background 200ms ease;
}

.sitefoot-toggle:hover,
.sitefoot-toggle:focus-visible {
  color: var(--nav-accent);
  border-color: var(--nav-accent);
  background: var(--nav-accent-soft);
}

.sitefoot-toggle-icon {
  inline-size: 14px;
  block-size: 14px;
  flex-shrink: 0;
}

.sitefoot-toggle-label {
  white-space: nowrap;
}

/* ---- 4. phones -------------------------------------------------------- */

@media (max-width: 768px) {
  .sitefoot {
    margin-top: 24px;
    padding: 22px 16px 18px;
  }

  /* Asked for by Iman on 2026-09-04: on a phone, do not draw the first
     footer — only the closing row. On a 390px screen the three link columns
     were 480px of scrolling, twelve links deep, in front of the two anyone
     actually came for.

     WHY THIS IS CSS AND NOT A CONDITIONAL RENDER IN SiteFooter.jsx.
     This sheet is the only footer mechanism the three renderers share. A
     JSX-side breakpoint would change the app and leave the garden's 10,651
     pages and the 2,511 entity pages as they are — three different phone
     footers, which is the drift plan 36 closed. It also fails safe: when the
     sheet is missing (the garden's CSS sits behind a four-hour edge cache) a
     reader gets more links than intended, never fewer.

     NOTHING BECOMES UNREACHABLE. Measured in a 390px render on 2026-09-04,
     not assumed: the header carries four destinations (home, the fal, the
     word map and the personal diwan); the landing page IS search; /sky/ opens
     onto its own three sections; and /about — still in the closing row below
     — links all five poets and /word-families. Every page in these columns stays two taps
     away. If About's poet list or its tour ever loses those links, this rule
     has to come back with them; no checker guards that. */
  .sitefoot-groups {
    display: none;
  }

  /* The closing row's rule existed to separate it from the columns above.
     With nothing above it, that border would draw a second horizontal line a
     few pixels under .sitefoot's own fading one, separating nothing. */
  .sitefoot-close {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
}

/* A `@media (max-width: 380px)` block stood here until 2026-09-04, stacking
   .sitefoot-group to one column because two stop fitting under about 380px.
   It was removed with the change above rather than missed: 380 is inside the
   768 breakpoint, so the groups are already `display: none` before it could
   apply and it can never match again. Restore both together if the hide is
   ever moved to a narrower width. */


/* ── the site's one palette ────────────────────────────────────────────────
   Until 2026-09-04 this file declared a complete SECOND palette — the pigments
   of Persian illumination, on paper — in three near-identical theme blocks. It
   was deliberate and it was reviewed, and it is why /sky/people looked like a
   different product from the rest of inzib: a warm #f5f5f1 ground and a lapis
   bar beside the app's #e4e7f5 and its purple.

   The colours now come from frontend/src/styles/tokens.css, prepended to this
   sheet as tokens.generated.css by theme.py:full_css(). What is left here is a
   translation table: this page's own names, pointed at the tokens that mean the
   same thing. It is theme-agnostic and declared ONCE — each token themes itself,
   so the three copies are gone with the palette that needed them.

   The surface scale inverts, and that is intentional rather than an oversight.
   The illumination model went page → darker panel → darker still; Nocturne
   raises a card off its ground instead. So --paper-2, which dresses cards and
   chips, takes the RAISED --surf, and --paper-3, which dresses table headers,
   wells and scroll rails, takes the RECESSED --surf2 — which is what tokens.css
   already calls "rails, wells, table stripes".

   The semantic accents (lapis, saffron, madder, verdigris) and the five poet
   hues did NOT move to Nocturne — they moved INTO tokens.css, at byte-identical
   values, and are consumed from there. They were always accents on this page
   rather than its ground, and the poet hues carry CVD-validated separation that
   no automated check here would notice losing. */
:root{
  /* surfaces */
  --paper: var(--ground);
  --paper-2: var(--surf);
  --paper-3: var(--surf2);

  /* ink. --ink itself is not redeclared: tokens.css already defines it, and a
     second declaration at a different value would be settled silently by
     whichever sheet happened to load last. */
  --ink-2: var(--mute);
  --ink-3: var(--faint);

  /* structure */
  --rule: var(--line);
  --shadow: var(--shadow-flat);

  /* type. Vazirmatn and the Latin UI face are the app's; Gulzar stays, because
     it is the couplet face — a true nastaliq, and the one place on this site
     where the typeface is part of what is being preserved rather than part of
     the chrome. */
  --fa: var(--font);
  --nas: "Gulzar", var(--font);
  --sans: var(--font-ui);
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
*{box-sizing:border-box}
html{color-scheme:light dark}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);
     font-size:15px;line-height:1.55;-webkit-font-smoothing:antialiased}
/* The page body follows the shell column (--shell-* from the shared nav
   sheet, plan 41): the bar, the rows under it and the text all share one
   measure. It was 1180/22 against a 1200/24 bar until 2026-09-08. */
.wrap{max-width:var(--shell-max,1200px);margin:0 auto;padding:0 var(--shell-pad,24px) 90px}
h1,h2,h3,h4{text-wrap:balance;margin:0}
a{color:var(--lapis);text-decoration-thickness:1px;text-underline-offset:2px}
a:hover{text-decoration-thickness:2px}
/* The document is LTR because its prose is English. Every Persian run isolates
   itself, so a Latin full stop can never be reordered to the wrong side and a
   Persian name can never be split by an English clause around it. */
.fa{font-family:var(--fa);direction:rtl;unicode-bidi:isolate}
.nas{font-family:var(--nas);direction:rtl;unicode-bidi:isolate;line-height:2.35}
.en{direction:ltr;unicode-bidi:isolate}
/* ltr + isolate since 2026-09-08: the document is RTL now, and .mono is what
   carries identifiers, SQL and file paths -- the runs that reorder if they are
   left to inherit the paragraph's direction. */
.mono{overflow-wrap:anywhere;font-family:var(--mono);font-variant-numeric:tabular-nums;
      direction:ltr;unicode-bidi:isolate}
.eyebrow{font-size:11px;letter-spacing:.14em;text-transform:uppercase;
         color:var(--ink-3);font-weight:600}

/* The poet row — the third line of navigation, under the shared bar and the
   garden's three. Which poets exist is a fact about this section, so unlike
   the two rows above it this one is local. */
.poetrow{display:flex;flex-wrap:wrap;gap:5px;direction:rtl;
         padding:8px 0 10px;border-bottom:1px solid var(--rule)}
/* Flat since 2026-09-08, at Iman's request — no pill, no outline, no fill;
   state is colour and weight alone. Same change as .sitenav-tab and
   .skysub-tab in site-nav.css, made here too because this row sits in the
   same header and a lone surviving pill would read as a bug. The padding
   stays: it is the touch target. */
.poetrow a{font-family:var(--fa);font-size:14px;text-decoration:none;
           color:var(--ink-3);padding:3px 10px;border:0;background:none;
           transition:color 160ms ease}
.poetrow a:hover,.poetrow a:active{color:var(--lapis)}
.poetrow a[aria-current="page"]{color:var(--lapis);font-weight:700}
.poetrow a:focus-visible{outline:2px solid var(--lapis);outline-offset:3px;
                         border-radius:4px}

/* `header` is scoped to the page masthead. The site bar is ALSO a <header>,
   and an unscoped rule here silently added 62px of padding to it — see the
   note in nav.py, rule 1. */
.wrap > header{padding:34px 0 24px;border-bottom:2px solid var(--ink)}
.wrap > header h1{font-size:clamp(30px,4.6vw,46px);font-weight:600;letter-spacing:-.02em;
          line-height:1.2;margin:9px 0 0}
.wrap > header h1 .fa{font-weight:600}
.subtitle{margin:6px 0 0;font-size:17px;color:var(--ink-2);font-weight:500;
          letter-spacing:-.01em}
/* These blocks held ENGLISH prose, so they were pinned ltr+isolate. Their
   text is Persian since 2026-09-08, and the pin then did the opposite of its
   job: Persian sentences laid out left-to-right inside an RTL page. They now
   inherit the document's direction. Runs that are still Latin -- .en, .mono --
   keep their own isolation and are unaffected. */
.thesis{margin:14px 0 0;max-width:64ch;color:var(--ink-2);font-size:16px}
.thesis b{color:var(--ink);font-weight:600}
.counts{display:flex;flex-wrap:wrap;gap:0;margin-top:24px;border:1px solid var(--rule);
        border-radius:3px;overflow:hidden;background:var(--paper-2)}
.count{flex:1 1 130px;padding:12px 15px;border-inline-end:1px solid var(--rule)}
.count:last-child{border-inline-end:0}
.count .v{font-family:var(--mono);font-size:22px;font-weight:500;line-height:1.1}
.count .k{font-size:11.5px;color:var(--ink-3);margin-top:4px;display:flex;
          flex-direction:column;gap:1px;line-height:1.35}
.count .k .fa{font-size:12.5px;color:var(--ink-2)}

/* ── the /sky/people masthead ─────────────────────────────────────────────
   Rebuilt 2026-09-04. Iman: «همه رو به فارسی بنویس · از رنگ‌های معنادار
   استفاده کن برای هر شاعر · مطمئن شو چینش زیبا و مینیمال هست».

   This is the one block in the section with no English in it at all, so it
   carries dir="rtl" on the element rather than isolating run by run: with no
   Latin inside, there is nothing to isolate FROM, and an RTL container is what
   makes the figures and the poet cards start at the right edge — where a
   Persian reader's eye starts — instead of being right-aligned text inside a
   left-to-right box.

   Every selector is prefixed `.wrap > header.hero` on purpose: the generic
   `.wrap > header` rules above are (0,1,1) and would otherwise out-specify a
   bare `.hero` and keep the old padding and h1 size. */
.wrap > header.hero{padding:38px 0 28px}
.hero-eyebrow{font-family:var(--fa);font-size:12px;color:var(--ink-3);
              font-weight:600}
.wrap > header.hero h1{font-family:var(--font-display);/* Lalezar, plan 42: the page title is the one display-sized string on an
   entity page, and the app and the garden both set their titles in it.
   Everything smaller stays --fa (Vazirmatn), which is what reads well at
   paragraph size. Lalezar has ONE weight (400); do not add a weight here. */font-size:clamp(31px,5vw,50px);
              font-weight:800;line-height:1.3;letter-spacing:0;margin:10px 0 0}
/* The lede and the figures sit on one row, bottom-aligned: RTL text hugs the
   right, and without something holding the left the masthead reads as a
   column pushed against one edge with half the width empty. They wrap apart
   by themselves when there is no longer room for both. */
.hero-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:20px 54px;
          margin:16px 0 0}
.hero-lede{font-family:var(--fa);margin:0;flex:1 1 34ch;max-width:56ch;
           color:var(--ink-2);font-size:16.5px;line-height:1.95}

/* The figures carry no box and no grid lines. The bordered bar they replace
   was the heaviest object on the page and it was holding three numbers. */
.figs{display:flex;flex-wrap:wrap;gap:16px 44px;margin:0;flex:0 0 auto}
.fig-v{font-family:var(--fa);font-size:29px;font-weight:700;line-height:1.05;
       font-variant-numeric:tabular-nums}
.fig-k{font-family:var(--fa);font-size:12.5px;color:var(--ink-3);margin-top:4px}

/* One card per poet, led by that poet's own colour (theme.py declares them,
   and ranked.py's chart legend reads the same tokens). The spine sits on the
   inline-start edge, which inside this RTL block is the right. */
/* Flex rather than a fixed column count, so every row — including the last,
   short one — stretches to both edges of the container at every width
   (Iman: «کارت‌ها به صورت ریسپانسیو عرضشون از دو طرف به خط بشن»). A grid of
   five equal columns is flush only while all five fit on one line; the moment
   it wraps, the last row is short and the edge is ragged. flex-grow has no
   such gap and needs no breakpoint to decide the count. */
.pheros{display:flex;flex-wrap:wrap;gap:8px;margin:28px 0 0}
.phero{flex:1 1 150px;
       display:block;text-decoration:none;color:inherit;background:var(--paper-2);
       border:1px solid var(--rule);border-inline-start:3px solid var(--pc);
       border-radius:4px;padding-block:12px;padding-inline:14px 13px;
       transition:background .14s,border-color .14s,transform .14s}
.phero:hover{background:var(--paper-3);border-color:var(--pc);transform:translateY(-1px)}
.phero-n{display:block;font-family:var(--fa);font-size:19px;font-weight:700;
         line-height:1.3}
.phero-c{display:block;font-family:var(--fa);font-size:12.5px;color:var(--ink-3);
         margin-top:2px;font-variant-numeric:tabular-nums}

@media (max-width:560px){
  .wrap > header.hero{padding:26px 0 22px}
  .hero-lede{font-size:15.5px;line-height:1.9}
  .figs{gap:14px 28px}
  .fig-v{font-size:24px}
  .pheros{gap:7px}
  .phero{flex-basis:132px}
}

section{margin-top:46px}
.shead{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;
       border-bottom:1px solid var(--rule);padding-bottom:9px;margin-bottom:18px}
.shead h2{font-size:19px;font-weight:600;letter-spacing:-.01em}
.shead h2 .fa{font-size:21px}
.shead p{margin:0;color:var(--ink-3);font-size:13.5px;flex:1 1 240px}
/* A Persian section note. `.shead p` above is (0,1,1) and would otherwise
   out-specify `.fa`, laying the sentence out left-to-right and stranding its
   full stop on the wrong side. */
.shead p.fa{direction:rtl;font-family:var(--fa);font-size:14px;line-height:1.75}

/* poet chips */
.poets{display:flex;flex-wrap:wrap;gap:9px;margin:22px 0 0}
.poet{border:1px solid var(--rule);border-radius:3px;background:var(--paper-2);
      padding:11px 15px;text-decoration:none;color:inherit;min-width:150px;
      display:flex;flex-direction:column;gap:3px}
.poet:hover{border-color:var(--lapis);box-shadow:var(--shadow)}
.poet .nm{font-family:var(--fa);direction:rtl;font-size:19px;font-weight:600}
.poet .sub{font-size:12px;color:var(--ink-3);font-family:var(--mono)}

/* filter + tabs */
.controls{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:16px}
input.q{font:inherit;font-size:14px;padding:7px 12px;border-radius:3px;flex:1 1 240px;
        border:1px solid var(--rule);background:var(--paper-2);color:var(--ink);
        font-family:var(--fa);direction:rtl;min-width:0}
input.q:focus-visible{outline:2px solid var(--lapis);outline-offset:1px}
button.f{font:inherit;font-size:13px;padding:6px 13px;border-radius:2px;cursor:pointer;
         border:1px solid var(--rule);background:var(--paper-2);color:var(--ink-2)}
button.f[aria-pressed="true"]{background:var(--ink);color:var(--paper);border-color:var(--ink)}
button.f:focus-visible{outline:2px solid var(--lapis);outline-offset:2px}
.hitcount{font-family:var(--mono);font-size:12.5px;color:var(--ink-3);margin-inline-start:auto}

/* the name grid */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(232px,1fr));gap:9px}
.card{border:1px solid var(--rule);border-radius:3px;padding:10px 13px;background:var(--paper-2);
      display:flex;flex-direction:column;gap:5px;text-decoration:none;color:inherit}
.card:hover{border-color:var(--lapis);box-shadow:var(--shadow)}
.card .top{display:flex;align-items:baseline;justify-content:space-between;gap:9px}
.card .nm{font-family:var(--fa);font-size:18px;font-weight:600;direction:rtl;
          line-height:1.4;min-width:0;overflow-wrap:anywhere}
.card .n{font-family:var(--mono);font-size:12.5px;color:var(--ink-3);flex:none}
.card .gl{font-family:var(--fa);direction:rtl;font-size:12.5px;color:var(--ink-2);
          line-height:1.65;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
          overflow:hidden}
.tag{font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;font-weight:600}
/* A Persian subtype label is not an acronym: no uppercasing, no tracking. */
.tag.fa{font-size:12px;letter-spacing:0;text-transform:none;font-weight:500;
        color:var(--ink-3)}
.t-person{color:var(--lapis)} .t-place{color:var(--verdigris)}
.t-group{color:var(--saffron)} .t-celestial_or_other{color:var(--madder)}
[hidden]{display:none!important}

/* one entity */
.ent{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(250px,.6fr);gap:28px;
     align-items:start}
@media(max-width:860px){.ent{grid-template-columns:1fr}}
.namebig{font-family:var(--fa);direction:rtl;font-size:clamp(30px,5vw,46px);
         font-weight:600;line-height:1.25;margin:8px 0 0}
.sf{display:flex;flex-wrap:wrap;gap:5px;direction:rtl;margin-top:10px}
.sf span{font-family:var(--fa);font-size:12.5px;background:var(--paper-3);
         border-radius:2px;padding:2px 8px;color:var(--ink-2)}
.sf span.ep{background:var(--lapis-soft);color:var(--lapis)}
/* The couplet block is Persian content, so it reads right to left and its rule
   sits on the side the reading starts from. */
.couplet{direction:rtl;border-inline-start:2px solid var(--lapis-line);
         padding:2px 14px;margin:16px 0}
.couplet .line{font-family:var(--nas);direction:rtl;font-size:19px;color:var(--ink)}
.couplet .src{font-size:12px;color:var(--ink-3);margin-top:5px;direction:rtl;
              font-family:var(--fa)}
.couplet .src a{color:var(--ink-3)}
mark{background:var(--saffron-soft);color:inherit;padding:0 2px;border-radius:2px}
.aside{display:flex;flex-direction:column;gap:14px;position:sticky;top:14px}
@media(max-width:860px){.aside{position:static}}
.box{border:1px solid var(--rule);border-radius:3px;padding:12px 14px;background:var(--paper-2)}
/* A bilingual panel heading is two isolated runs, so it needs a layout rather
   than a single text style: the Persian reads as the label, the English as its
   gloss beneath. Written as one string they collided — «نامها و لقبهاNAMES AND
   EPITHETS» — which is what the split was for. */
.box h4{margin:0 0 9px;display:flex;flex-direction:column;gap:1px;
        color:var(--ink-3);font-weight:600}
.box h4 .fa{font-size:13.5px;color:var(--ink-2);font-weight:600}
.box h4 .en{font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;
            color:var(--ink-3);font-weight:600}
.box .row{display:flex;align-items:baseline;gap:8px;padding:2.5px 0;font-size:14px}
/* The name takes the slack whether or not it is a link, so a figure with no
   page of its own still lines its count up with the rest. */
.box .row > a,.box .row > .nolink{flex:1 1 auto;min-width:0;overflow-wrap:anywhere;
                                  display:flex;align-items:baseline;gap:8px}
.box .row > a > .fa,.box .row > .nolink > .fa{flex:1 1 auto;min-width:0}
.box .row > .nolink{color:var(--ink-3)}
.box .row .w{font-family:var(--mono);font-size:12px;color:var(--ink-3);flex:none;
             margin-inline-start:auto}
.box .empty{color:var(--ink-3);font-size:13px}

/* ego view: before / after */
.ego{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media(max-width:560px){.ego{grid-template-columns:1fr}}
.ego .box.before{border-inline-start:3px solid var(--madder)}
.ego .box.after{border-inline-start:3px solid var(--verdigris)}

/* tables */
.tscroll{overflow-x:auto;border:1px solid var(--rule);border-radius:3px}
table{border-collapse:collapse;width:100%;font-size:13.5px;background:var(--paper-2)}
th{text-align:start;font-size:11px;letter-spacing:.08em;text-transform:uppercase;
   color:var(--ink-3);font-weight:600;padding:9px 12px;border-bottom:1px solid var(--rule);
   background:var(--paper-3);position:sticky;top:0;white-space:nowrap}
td{padding:8px 12px;border-bottom:1px solid var(--rule);vertical-align:top}
tr:last-child td{border-bottom:0}
td.num{font-family:var(--mono);font-variant-numeric:tabular-nums;white-space:nowrap;
       color:var(--ink-2)}
.pill{display:inline-block;padding:1.5px 8px;border-radius:2px;font-size:11px;
      font-weight:600;letter-spacing:.02em;white-space:nowrap}
.p-qatai{background:var(--lapis-soft);color:var(--lapis)}
.p-ehtemali,.p-riwayi{background:var(--saffron-soft);color:var(--saffron)}
.p-ostureh{background:var(--madder-soft);color:var(--madder)}
.p-namaalum{background:var(--paper-3);color:var(--ink-3)}
/* A note or a modern name may arrive in Persian or in English and there is no
   way to know which at build time. `plaintext` lets the first strong character
   in each one decide, so neither language gets its punctuation moved. */
.note,td.bidi{color:var(--ink-2);font-size:12.5px;max-width:44ch;
              unicode-bidi:plaintext}
td.bidi{color:var(--ink);max-width:26ch}

/* The Shahnameh spine. Persian content, so the whole strip is RTL and the
   timeline rule runs down the right-hand side, where the reading starts. */
.spine{direction:rtl;max-width:78ch}
.reign{position:relative;padding:9px 22px 13px 0;border-inline-start:2px solid var(--rule)}
.reign::before{content:"";position:absolute;inset-inline-start:-6px;top:15px;width:10px;
               height:10px;border-radius:50%;background:var(--lapis)}
.reign:hover::before{background:var(--saffron)}
.reign .ttl{font-family:var(--fa);font-size:17px;font-weight:600}
/* An LTR run inside an RTL block: inline-block makes it hug the right edge,
   beside its title, instead of drifting to the far side of the column. */
.reign .meta{font-family:var(--mono);font-size:11.5px;color:var(--ink-3);margin-top:2px;
             direction:ltr;unicode-bidi:isolate;display:inline-block}
.reign .figs{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}
.reign .figs a,.reign .figs > .nolink{font-family:var(--fa);font-size:13.5px;
               background:var(--paper-2);border:1px solid var(--rule);border-radius:2px;
               padding:1px 8px;text-decoration:none;color:var(--ink-2);
               display:inline-flex;align-items:baseline;gap:5px}
.reign .figs a:hover{border-color:var(--lapis);color:var(--lapis)}
.reign .figs .w{font-family:var(--mono);font-size:11px;color:var(--ink-3)}

/* unlocatable strip and caveats */
.nakoja{background:var(--madder-soft);border:1px solid var(--madder);border-radius:3px;
        padding:15px 18px;display:flex;gap:14px;flex-wrap:wrap;align-items:center}
.nakoja .lbl{font-size:12.5px;color:var(--madder);font-weight:600;flex:none}
.chips{display:flex;flex-wrap:wrap;gap:7px;direction:rtl}
.chip{background:var(--paper);border:1px solid var(--madder);color:var(--ink);
      border-radius:2px;padding:2px 10px;font-size:14px;font-family:var(--fa);
      text-decoration:none}
.chip:hover{background:var(--madder);color:var(--paper)}
.caveat{border:1px solid var(--saffron);background:var(--saffron-soft);border-radius:3px;
        padding:17px 20px;margin-top:46px}
.caveat h3{font-size:13px;color:var(--saffron);letter-spacing:.05em;text-transform:uppercase;
           margin-bottom:9px}
.caveat ul{margin:0;padding-inline-start:20px;color:var(--ink-2);font-size:14px}
/* plaintext, not a fixed direction: most of these items are Persian prose, but
   the genealogy's source list starts each line with a domain name. Letting the
   first strong character decide per item means neither kind has its punctuation
   moved -- and it is what the lint's M2 wants, since an isolated run cannot
   reorder the text around it. */
.caveat li{margin:6px 0;unicode-bidi:plaintext}
.caveat b{color:var(--ink)}
/* Was display:block: inside an LTR paragraph these names had to be stacked or
   the ' · ' between them landed in the wrong place, which is what left a column
   of names each followed by an orphan dot. In an RTL paragraph they flow inline
   and read as one list. */
.caveat .fa{display:inline}
footer{margin-top:42px;padding-top:17px;border-top:1px solid var(--rule);
       color:var(--ink-3);font-size:12.5px}
footer a{color:var(--ink-3)}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
@media print{.sitenav,.skywrap,.controls,.aside{display:none}body{background:#fff;color:#000}}


/* ---- the three drawings ------------------------------------------------ */
.viz{margin:0;padding:0}
.viz-svg{display:block;width:100%;height:auto;overflow:visible}
/* The captions were English and pinned ltr. They are Persian since 2026-09-08,
   and this selector (0,1,1) outranks the .fa class (0,1,0) they now carry, so
   the pin was quietly winning and laying Persian out left-to-right. Dropped:
   the caption inherits the page, and .en / .mono keep their own isolation. */
.viz figcaption{margin-top:12px;font-size:13px;color:var(--ink-3);
                line-height:1.7;max-width:74ch}
.viz figcaption b{color:var(--ink-2);font-weight:600}
.viz a{text-decoration:none}
.viz a:hover circle{fill:var(--saffron);stroke:var(--saffron)}
.viz a:hover text{fill:var(--ink);font-weight:600}
.viz a:focus-visible circle,.viz a:focus-visible text{outline:2px solid var(--lapis);
                                                      outline-offset:2px}
.viz-wide{overflow-x:auto}
.viz-provisional{border:1px dashed var(--saffron);border-radius:4px;
                 padding:10px;background:var(--saffron-soft)}

/* The map's only two fills. There is no border layer to colour, by design —
   the coastline carries no territorial claim and nothing else is drawn. */
:root{--land:#e7e3d8;--sea:#dfe6ef;--coast:#b9b4a4}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --land:#23232c;--sea:#171a22;--coast:#3d3d49}}
:root[data-theme="dark"]{--land:#23232c;--sea:#171a22;--coast:#3d3d49}
.viz-map{background:var(--sea);border-radius:3px}

/* The Sankey mounts here. Height is set by the script once it knows the node
   count; until then the container is empty and the SVG fallback below it is
   what a reader sees — which is also the permanent state with JavaScript off,
   or on the older cached bundle that has no SankeyChart. */
.sankey-host{width:100%;min-height:0}
.sankey-host:not(:empty){margin-bottom:6px}
.sankey-note{margin:10px 0 0;font-size:13px;color:var(--ink-3);line-height:1.7;
             max-width:76ch}

.viz-alt{margin-top:16px;font-size:13.5px}
.viz-alt summary{cursor:pointer;color:var(--lapis);padding:6px 0}
.viz-alt summary:focus-visible{outline:2px solid var(--lapis);outline-offset:2px}

.viz-arc{min-width:640px}
/* The genealogy is 139 rows deep. Scaled to the page width its names become
   unreadable, so it keeps its natural size and the frame scrolls instead —
   a legible drawing you scroll beats a whole one you cannot read. */
.viz-tree{width:auto;max-width:none;height:auto}
/* `direction:rtl` is load-bearing, not cosmetic: the tree grows leftward from
   its roots, so the roots sit at the RIGHT edge — which is precisely the part a
   left-anchored scroll container hides. An RTL scroll box opens at the right,
   which is both the fix and the correct reading position for Persian. */
.tree-frame{max-height:76vh;overflow:auto;direction:rtl;
            border:1px solid var(--rule);border-radius:4px;
            background:var(--paper-2);padding:10px}
.tree-frame > .viz{direction:ltr}
.tree-name{font-size:12.5px;fill:var(--ink)}
.tree-absent{fill:var(--ink-3);opacity:.62}
.viz-tree a .tree-name{fill:var(--lapis)}

.conflicts{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));
           gap:12px;margin-top:8px}
.conflict{border:1px solid var(--saffron);background:var(--saffron-soft);
          border-radius:3px;padding:13px 15px}
.conflict h4{margin:0 0 7px;font-size:17px}
.conflict ul{margin:0;padding-inline-start:18px;font-size:13.5px;color:var(--ink-2)}
.conflict li{margin:3px 0}
.conflict .note{margin:8px 0 4px;font-size:12.5px}
.conflict .src{margin:0;font-size:11px;color:var(--ink-3)}
/* The conflict entries are mixed BY NATURE: a Persian name, then an English
   sentence about how four charts disagree about it. `.en` pins them ltr, which
   is right for the English half and wrong for every item that OPENS with the
   Persian name -- and most of them do. plaintext lets each line's first strong
   character decide, so neither half has its punctuation moved. Measured
   2026-09-08: 14 Persian-bearing blocks on this page were laying out ltr. */
.conflict .en,.conflict ul.en li,.conflict p.src{unicode-bidi:plaintext}
/* ---- the map, once it can be moved (2026-09-07) ------------------------- */
/* Appended at the END of this sheet on purpose: .viz-svg above sets
   overflow:visible, and at equal specificity the later rule wins. Without it a
   panned camera paints land across the caption. */
.viz-map{overflow:hidden}
.viz-map .atlas-cam *{vector-effect:non-scaling-stroke}
/* A pin with fill="none" gets no interior hit area under the default
   visiblePainted, so it was clickable only on its 1.6px ring - about 0.6 CSS px
   on a phone. Shipping since the atlas was built; found 2026-09-07. */
.viz-map a circle{pointer-events:all}
/* ONE FINGER SCROLLS THE PAGE until the reader has zoomed in deliberately.
   pan-y still lets a two-finger gesture reach us. */
.viz-atlas .viz-map{touch-action:pan-y}
.viz-atlas[data-zoom="in"] .viz-map{touch-action:none;cursor:grab}
.viz-atlas[data-zoom="in"] .viz-map.atlas-drag{cursor:grabbing;user-select:none}
/* The graticule LABELS are glued to the frame edge and are nonsense once
   panned. The LINES stay: they are geography. */
.viz-atlas[data-zoom="in"] .atlas-gtext{display:none}
/* The graticule's degree labels are 10px in a 980-unit viewBox. On a 390px
   phone the map renders at ~346px, a scale of 0.35, so they come out at about
   3.5px -- not small, illegible. They are an orientation aid, not data, and an
   unreadable label is not information. The graticule LINES stay: those still
   orient the reader. Measured 2026-09-08 at 390x844. */
@media (max-width:560px){.atlas-gtext{display:none}}
.atlas-ctl{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0 0 8px}
.atlas-zoom{display:inline-flex;align-items:center;gap:2px;
            border:1px solid var(--rule);border-radius:999px;padding:2px;
            background:var(--paper)}
.atlas-z{font:inherit;font-size:13px;line-height:1;min-width:32px;height:28px;
         cursor:pointer;border:0;background:transparent;color:var(--ink-2);
         border-radius:999px}
.atlas-z:hover{background:var(--lapis-soft);color:var(--lapis)}
.atlas-z:focus-visible{outline:2px solid var(--lapis);outline-offset:2px}
.atlas-zfit{font-size:11.5px;padding:0 10px;min-width:0}
.atlas-zlabel{font-size:11px;color:var(--ink-3);min-width:46px;text-align:center;
              font-variant-numeric:tabular-nums}
.atlas-hint{margin:0;font-size:12px;color:var(--ink-3);opacity:0;
            transition:opacity .18s}
.atlas-hint[data-on="1"]{opacity:1}
.atlas-cap span{display:block;margin:3px 0}


/* The bar colours ARE the poet colours — theme.py declares them once, with
   the reasoning for which poet gets which hue, and both themes' values. These
   five are positional (--rb1 is poet_order[0]) and the mapping below is what
   ties position to poet; keep it in step with data.POET_ORDER. Before
   2026-09-04 the literals lived here as well as in the hero, which is exactly
   how a legend and a page start disagreeing. */
:root{--rb1:var(--poet-hafez);--rb2:var(--poet-saadi);--rb3:var(--poet-khayyam);
      --rb4:var(--poet-ferdowsi);--rb5:var(--poet-rumi)}
.rb-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0 0 12px}
.rb-q{font:inherit;font-size:13px;padding:5px 11px;border:1px solid var(--rule);
  border-radius:999px;background:var(--paper);color:var(--ink);min-width:190px}
.rb-q:focus{outline:2px solid var(--lapis);outline-offset:1px}
.rb-legend{display:flex;gap:6px;flex-wrap:wrap}
.rb-chip{display:inline-flex;align-items:center;gap:6px;font:inherit;font-size:12.5px;
  padding:4px 11px;border:1px solid var(--rule);border-radius:999px;cursor:pointer;
  background:var(--paper);color:var(--ink-2);transition:opacity .12s,border-color .12s}
.rb-chip i{width:10px;height:10px;border-radius:3px;flex:none}
.rb-chip[aria-pressed="false"]{opacity:.42}
.rb-chip[aria-pressed="false"] i{background:var(--ink-3)!important}
.rb-chip:hover{border-color:var(--lapis)}
.rb-full{font:inherit;font-size:12.5px;padding:4px 12px;border:1px solid var(--rule);
  border-radius:999px;cursor:pointer;background:var(--paper);color:var(--ink-2)}
.rb-full:hover{border-color:var(--lapis);color:var(--lapis)}
.rb-count{font-size:12px;color:var(--ink-3);margin-inline-start:auto;
  font-variant-numeric:tabular-nums}
.rb-host{position:relative;max-height:620px;overflow:auto;overscroll-behavior:contain;
  border:1px solid var(--rule);border-radius:10px;background:var(--paper);padding:8px 4px}
.rb-host:fullscreen{max-height:none;height:100%;padding:20px;border-radius:0}
/* Until 2026-09-08 the only way out of fullscreen was Escape: the toggle sits
   in `.rb-controls`, a sibling of the host, and fullscreen paints the host
   alone. This button is inside it and shows only there. 44px so it is a real
   tap target on a phone; `position:fixed` because inside a fullscreen element
   the viewport IS the element. */
.rb-close{display:none}
.rb-host:fullscreen .rb-close{display:flex;align-items:center;
  justify-content:center;position:fixed;top:14px;inset-inline-end:14px;z-index:5;
  inline-size:44px;block-size:44px;font-size:26px;line-height:1;cursor:pointer;
  border:1px solid var(--rule);border-radius:999px;
  background:var(--paper);color:var(--ink-2)}
.rb-host:fullscreen .rb-close:hover{border-color:var(--lapis);color:var(--lapis)}
.rb-host:fullscreen .rb-close:focus-visible{outline:2px solid var(--lapis);
  outline-offset:2px}
.rb-host:fullscreen .rb-svg{width:100%}
.rb-svg{max-width:100%;height:auto;display:block}
/* direction is inherited; if a shell ever sets dir=rtl this keeps text-anchor
   geometric, or every label grows the wrong way and hides under its bar. */
.rb-svg text{direction:ltr;unicode-bidi:isolate}
.rb-grid{stroke:var(--rule);stroke-width:1}
.rb-ax{fill:var(--ink-3);font-size:10.5px;font-variant-numeric:tabular-nums}
.rb-lab{fill:var(--ink);font-size:12px;font-family:var(--fa)}
.rb-num{fill:var(--ink-3);font-size:11px;font-variant-numeric:tabular-nums}
.rb-row{cursor:pointer}
.rb-row:hover .rb-hit{fill:var(--lapis-soft)}
.rb-row:focus{outline:none}
.rb-row:focus .rb-hit{fill:var(--lapis-soft);stroke:var(--lapis);stroke-width:1}
.rb-hit{fill:transparent}
.rb-tip{position:fixed;z-index:60;pointer-events:none;max-width:290px;
  background:var(--paper);border:1px solid var(--rule);border-radius:9px;
  box-shadow:0 6px 22px rgba(0,0,0,.14);padding:9px 12px;font-size:12.5px;
  color:var(--ink);opacity:0;transition:opacity .1s}
.rb-tip[data-on="1"]{opacity:1}
.rb-tip .t-n{font-family:var(--fa);font-size:14px;font-weight:600;display:block}
.rb-tip .t-g{color:var(--ink-2);display:block;margin:2px 0 6px;font-family:var(--fa);
  unicode-bidi:plaintext}
.rb-tip .t-r{display:flex;justify-content:space-between;gap:14px;
  font-variant-numeric:tabular-nums;line-height:1.7}
.rb-tip .t-r i{width:9px;height:9px;border-radius:2px;display:inline-block;
  margin-inline-end:6px}
.rb-tip .t-tot{border-top:1px solid var(--rule);margin-top:5px;padding-top:4px;font-weight:600}
.rb-tip .t-go{color:var(--ink-3);font-size:11px;margin-top:6px;display:block}
.rb-table{margin-top:14px;font-size:12.5px}
.rb-table summary{cursor:pointer;color:var(--lapis)}
.rb-table table{border-collapse:collapse;width:100%;margin-top:10px}
.rb-table th,.rb-table td{border-bottom:1px solid var(--rule);padding:4px 8px;text-align:start}
.rb-table th{color:var(--ink-3);font-size:11px;font-weight:600}
.rb-table td{color:var(--ink-2);font-variant-numeric:tabular-nums}
.rb-hint{color:var(--ink-3);font-size:12px;margin:10px 0 0}
/* .fa and .en are two isolated runs (the M2 rule). Isolation stops them
   reordering; it does not put a space between them, so each pair needs
   its own separator or the button reads "تمام‌صفحهfullscreen". */
.rb-full .en,.rb-table summary .en{margin-inline-start:.45em;opacity:.72;font-size:.92em}
.rb-hint .en{display:block;margin-top:3px;opacity:.85}
.rb-more{color:var(--ink-3);font-size:11.5px}
/* Do NOT shrink the chart to fit the phone. `.rb-svg{max-width:100%}` above
   scaled it to 0.694 at a 390px viewport (viewBox 484 rendered at 336), so its
   12px and 11px labels came out at 8.3px and 7.6px — on 2,949 of them, every
   text node in the chart. `.rb-host` is already `overflow:auto`, so the chart
   keeps its own size and the reader scrolls it sideways inside its own box,
   which is the same pattern `.tscroll` and `.viz-wide` use everywhere else on
   these pages. Measured 2026-09-08 on /sky/people/. */
@media(max-width:640px){.rb-count{margin-inline-start:0}.rb-host{max-height:480px}
                        .rb-svg{max-width:none}}


/* ---- the canvas, declared once per theme ------------------------------ */
.gn-wrap{
  --gn-bg1:#f2f0fb; --gn-bg2:#faf9ff; --gn-bg3:#ebe8f7;
  --gn-glow:rgba(126,131,255,.13); --gn-glow2:rgba(201,140,245,.11);
  --gn-card:#ffffff; --gn-card-line:rgba(30,26,60,.42);
  --gn-frame:rgba(30,26,60,.16);
  --gn-band:rgba(30,26,60,.030); --gn-band2:rgba(30,26,60,.055);
  --gn-txt:#161428; --gn-txt3:#655f8a;
  --c-king:#9A6A00; --c-hero:#4B50D6; --c-consort:#00796E;
  --c-mother:#8E3FC4; --c-anirani:#C81E52; --c-other:#5F5C7A;
  --c-descent:#4B50D6; --c-marriage:#2E7D32;
  margin:0 0 8px}
:root[data-theme="dark"] .gn-wrap{
  --gn-bg1:#241F52; --gn-bg2:#191533; --gn-bg3:#140F26;
  --gn-glow:rgba(142,146,255,.20); --gn-glow2:rgba(201,140,245,.16);
  --gn-card:rgba(255,255,255,.10); --gn-card-line:rgba(255,255,255,.34);
  --gn-frame:rgba(255,255,255,.16);
  --gn-band:rgba(255,255,255,.030); --gn-band2:rgba(255,255,255,.055);
  --gn-txt:#F2F0FC; --gn-txt3:#A9A3D4;
  --c-king:#F5B740; --c-hero:#8E92FF; --c-consort:#2ED3C6;
  --c-mother:#C98CF5; --c-anirani:#FF7A9C; --c-other:#9A93C8;
  --c-descent:#8E92FF; --c-marriage:#9BE06A}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .gn-wrap{
  --gn-bg1:#241F52; --gn-bg2:#191533; --gn-bg3:#140F26;
  --gn-glow:rgba(142,146,255,.20); --gn-glow2:rgba(201,140,245,.16);
  --gn-card:rgba(255,255,255,.10); --gn-card-line:rgba(255,255,255,.34);
  --gn-frame:rgba(255,255,255,.16);
  --gn-band:rgba(255,255,255,.030); --gn-band2:rgba(255,255,255,.055);
  --gn-txt:#F2F0FC; --gn-txt3:#A9A3D4;
  --c-king:#F5B740; --c-hero:#8E92FF; --c-consort:#2ED3C6;
  --c-mother:#C98CF5; --c-anirani:#FF7A9C; --c-other:#9A93C8;
  --c-descent:#8E92FF; --c-marriage:#9BE06A}}

/* ---- chips ------------------------------------------------------------ */
.gn-chips{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin:0 0 12px}
.gn-chipsep{width:1px;height:18px;background:var(--rule);margin:0 3px}
.gn-chip{display:inline-flex;align-items:center;gap:.5em;font:inherit;font-size:12.5px;
  font-family:var(--fa);padding:.36em .9em;border-radius:999px;cursor:pointer;
  color:var(--ink-2);background:var(--paper-2);border:1px solid var(--rule);
  transition:background .16s,border-color .16s,color .16s}
.gn-chip:hover{border-color:var(--lapis);color:var(--lapis)}
.gn-chip:focus-visible{outline:2px solid var(--lapis);outline-offset:2px}
.gn-chip[aria-pressed="true"]{background:var(--ink);color:var(--paper);
  border-color:transparent;font-weight:600}
.gn-cdot{width:9px;height:9px;border-radius:50%;flex:none;background:currentColor}
.gn-chip[aria-pressed="true"] .gn-cdot{background:var(--paper)}
.gn-cdot-godarzian{color:var(--c-consort)}.gn-cdot-turanian{color:var(--c-king)}
.gn-cdot-sistanian{color:var(--c-hero)}.gn-cdot-nozarian{color:var(--c-anirani)}
.gn-cdot-kayanian{color:var(--ink-3)}
.gn-chip-era .gn-cdot{background:none;border:1.6px solid currentColor}

/* ---- controls --------------------------------------------------------- */
.gn-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0 0 10px}
.gn-q{font:inherit;font-size:13px;padding:5px 11px;border:1px solid var(--rule);
  border-radius:999px;background:var(--paper);color:var(--ink);min-width:190px}
.gn-q:focus{outline:2px solid var(--lapis);outline-offset:1px}
.gn-zoom{display:inline-flex;align-items:center;gap:2px;border:1px solid var(--rule);
  border-radius:999px;padding:2px;background:var(--paper)}
.gn-z{font:inherit;font-size:13px;line-height:1;min-width:26px;height:24px;cursor:pointer;
  border:0;background:transparent;color:var(--ink-2);border-radius:999px}
.gn-z:hover{background:var(--lapis-soft);color:var(--lapis)}
.gn-zfit{font-size:11.5px;padding:0 9px}
.gn-zfit .en{margin-inline-start:.35em;opacity:.7}
.gn-zlabel{font-size:11px;color:var(--ink-3);min-width:38px;text-align:center;
  font-variant-numeric:tabular-nums}
.gn-full{font:inherit;font-size:12.5px;padding:4px 12px;border:1px solid var(--rule);
  border-radius:999px;cursor:pointer;background:var(--paper);color:var(--ink-2)}
.gn-full:hover{border-color:var(--lapis);color:var(--lapis)}
.gn-full .en{margin-inline-start:.45em;opacity:.72;font-size:.92em}
.gn-count{font-size:12px;color:var(--ink-3);margin-inline-start:auto;
  font-variant-numeric:tabular-nums}

/* ---- the stage -------------------------------------------------------- */
.gn-host{position:relative;overflow:auto;max-height:78vh;border-radius:14px;
  border:1px solid var(--gn-frame);overscroll-behavior:contain;cursor:grab;
  background:
    radial-gradient(62% 46% at 84% 82%,var(--gn-glow2),transparent 70%),
    radial-gradient(78% 60% at 16% 4%,var(--gn-glow),transparent 72%),
    linear-gradient(160deg,var(--gn-bg1) 0%,var(--gn-bg2) 46%,var(--gn-bg3) 100%)}
.gn-host.gn-panning{cursor:grabbing;user-select:none}
.gn-host:fullscreen{max-height:none;height:100%;border-radius:0}
.gn-svg{display:block}
.gn-svg text{direction:ltr;unicode-bidi:isolate;font-family:var(--fa)}

.gn-band{fill:var(--gn-band)}
.gn-band-1{fill:var(--gn-band2)}
/* no letter-spacing on these — it breaks Persian cursive joining */
.gn-era{fill:var(--gn-txt3);font-size:12px;font-weight:600}
.gn-house{fill:none;stroke:var(--gn-frame);stroke-dasharray:7 6;stroke-width:1.2}
.gn-house-godarzian{fill:var(--c-consort);fill-opacity:.085}
.gn-house-turanian{fill:var(--c-king);fill-opacity:.085}
.gn-house-sistanian{fill:var(--c-hero);fill-opacity:.085}
.gn-house-nozarian{fill:var(--c-anirani);fill-opacity:.075}
.gn-housename{fill:var(--gn-txt3);font-size:11.5px;font-weight:600}

/* ---- the cards -------------------------------------------------------- */
.gn{fill:var(--gn-card);stroke:var(--gn-card-line);stroke-width:1.15}
.gn-accent{stroke:none}
.gn-ac-king{fill:var(--c-king)}
.gn-ac-consort{fill:var(--c-consort)}
.gn-ac-mother{fill:var(--c-mother)}
.gn-ac-hero{fill:var(--c-hero)}
.gn-ac-anirani{fill:var(--c-anirani)}
.gn-ac-other{fill:var(--c-other)}
.gn-king{stroke:var(--c-king)}
.gn-consort{stroke:var(--c-consort)}
.gn-mother{stroke:var(--c-mother)}
.gn-anirani{stroke:var(--c-anirani)}
.gn-absent{opacity:.4;stroke-dasharray:4 3}
.gn-t{font-size:10.5px;fill:var(--gn-txt);pointer-events:none;font-weight:500}
.gn-g{cursor:default;transition:opacity .26s}
a .gn-g{cursor:pointer}
.gn-g:hover .gn,.gn-g:focus .gn{stroke-width:2.6}
.gn-g:focus{outline:none}
.gn-g.gn-dim{opacity:.14}
.gn-g.gn-hit .gn{stroke:var(--lapis);stroke-width:2.8}

/* ---- ties, and the light that runs along them ------------------------- */
.gn-tie{transition:opacity .26s}
.gn-link{fill:none}
.gn-descent{stroke:var(--c-descent);stroke-width:1.3;opacity:.55}
.gn-marriage{stroke:var(--c-marriage);stroke-width:1.5;opacity:.72}
.gn-link-dashed{stroke-dasharray:5 4}
.gn-link-back{opacity:.4}
/* the pulse: a short dash over the whole tie. pathLength="100" in the markup
   normalises it, so every light travels at one speed. Off by default — the
   succession runs on its own, and a hovered figure lights its own ties. */
.gn-pulse{fill:none;stroke-width:2.5;stroke-linecap:round;opacity:0;
  stroke-dasharray:4 96;stroke-dashoffset:100}
.gn-tie-descent .gn-pulse{stroke:var(--c-descent)}
.gn-tie-marriage .gn-pulse{stroke:var(--c-marriage)}
.gn-tie.gn-amb .gn-pulse{opacity:1;stroke:var(--c-king);
  animation:gn-flow 3.6s linear infinite}
.gn-tie.gn-lit .gn-pulse{opacity:1;animation:gn-flow 1.5s linear infinite}
.gn-tie.gn-lit .gn-link{opacity:1;stroke-width:2}
@keyframes gn-flow{to{stroke-dashoffset:0}}

/* ---- filtering by era or house ---------------------------------------- */
.gn-svg[data-f] .gn-g,.gn-svg[data-f] .gn-tie{opacity:.1}
.gn-svg[data-fk="era"][data-f="pishdadian"] .gn-g[data-era="pishdadian"],
.gn-svg[data-fk="era"][data-f="zahhak"] .gn-g[data-era="zahhak"],
.gn-svg[data-fk="era"][data-f="fereydun"] .gn-g[data-era="fereydun"],
.gn-svg[data-fk="era"][data-f="pahlavani"] .gn-g[data-era="pahlavani"],
.gn-svg[data-fk="era"][data-f="kayanian"] .gn-g[data-era="kayanian"],
.gn-svg[data-fk="era"][data-f="epic_history"] .gn-g[data-era="epic_history"],
.gn-svg[data-fk="era"][data-f="history"] .gn-g[data-era="history"],
.gn-svg[data-fk="house"][data-f="godarzian"] .gn-g[data-house="godarzian"],
.gn-svg[data-fk="house"][data-f="turanian"] .gn-g[data-house="turanian"],
.gn-svg[data-fk="house"][data-f="sistanian"] .gn-g[data-house="sistanian"],
.gn-svg[data-fk="house"][data-f="nozarian"] .gn-g[data-house="nozarian"],
.gn-svg[data-fk="house"][data-f="kayanian"] .gn-g[data-house="kayanian"]{opacity:1}
.gn-svg[data-f] .gn-tie.gn-keep{opacity:.85}

/* ---- marks ------------------------------------------------------------ */
.gn-conflict{fill:var(--c-king);stroke:var(--paper);stroke-width:1}
.gn-poemmark{fill:var(--c-hero);stroke:var(--paper);stroke-width:.8}

/* ---- tooltip ---------------------------------------------------------- */
.gn-tip{position:fixed;z-index:60;pointer-events:none;max-width:300px;
  background:var(--paper);border:1px solid var(--rule);border-radius:11px;
  box-shadow:0 10px 34px rgba(0,0,0,.20);padding:10px 13px;font-size:12.5px;
  color:var(--ink);opacity:0;transform:translateY(3px);
  transition:opacity .12s,transform .12s}
.gn-tip[data-on="1"]{opacity:1;transform:none}
.gn-tip .n{font-family:var(--fa);font-size:15px;font-weight:600;display:block}
.gn-tip .g{color:var(--ink-2);display:block;margin:1px 0 7px;font-family:var(--fa);
  unicode-bidi:plaintext}
.gn-tip .r{display:flex;justify-content:space-between;gap:16px;line-height:1.75}
.gn-tip .r b{font-weight:600;font-variant-numeric:tabular-nums}
.gn-tip .w{display:block;margin-top:6px;padding-top:5px;border-top:1px solid var(--rule);
  color:var(--ink-3);font-size:11.5px;unicode-bidi:plaintext}

/* ---- legend ----------------------------------------------------------- */
.gn-legend{margin:12px 0 0;padding:13px 15px;background:var(--paper-2);
  border:1px solid var(--rule);border-radius:12px}
.gn-legend-h{font-size:11px;color:var(--ink-3);margin-bottom:9px}
.gn-legend-h .en{margin-inline-start:.5em;opacity:.75}
.gn-keys{display:flex;gap:16px;flex-wrap:wrap;margin:5px 0;font-size:12px;color:var(--ink-2)}
.gn-key{display:inline-flex;align-items:center;gap:5px}
.gn-key .en{color:var(--ink-3);font-size:11px;margin-inline-start:.3em}
.gn-sw{width:20px;height:13px;border-radius:4px;display:inline-block;border:1.2px solid}
.gn-sw-king{background:var(--c-king);border-color:var(--c-king)}
.gn-sw-consort{background:var(--c-consort);border-color:var(--c-consort)}
.gn-sw-mother{background:var(--c-mother);border-color:var(--c-mother)}
.gn-sw-hero{background:var(--c-hero);border-color:var(--c-hero);border-radius:999px}
.gn-sw-anirani{background:var(--c-anirani);border-color:var(--c-anirani)}
.gn-sw-other{background:var(--paper);border-color:var(--rule)}
.gn-sw-absent{background:var(--paper);border-color:var(--ink-3);border-style:dashed;opacity:.6}
.gn-ln{width:24px;height:0;border-top-width:2px;border-top-style:solid;display:inline-block}
.gn-ln-descent{border-top-color:var(--c-descent)}
.gn-ln-marriage{border-top-color:var(--c-marriage)}
.gn-ln-dashed{border-top-color:var(--ink-3);border-top-style:dashed}
.gn-dot{width:9px;height:9px;border-radius:999px;display:inline-block}
.gn-dot-conflict{background:var(--c-king)}
.gn-tri{width:0;height:0;display:inline-block;border-inline:5px solid transparent;
  border-bottom:9px solid var(--c-hero)}

@media (prefers-reduced-motion:reduce){
  .gn-tie.gn-amb .gn-pulse,.gn-tie.gn-lit .gn-pulse{animation:none;
    stroke-dasharray:none;stroke-dashoffset:0;opacity:.5}
  .gn-g,.gn-tie,.gn-tip{transition:none}
}
@media(max-width:640px){.gn-host{max-height:60vh}.gn-count{margin-inline-start:0}}


/* ===== gn2: the family-view genealogy ================================== */
.gn2-wrap{
  --gn2-pishdadian:#d98c00; --gn2-kayanian:#2450c8; --gn2-turanian:#c8281e; --gn2-sistanian:#0f8f7a;
  --gn2-godarzian:#b5259b; --gn2-nozarian:#3f8a10; --gn2-none:#6d6a75;
  --gn2-pat:#5f5c66; --gn2-mat:#b0478a; --gn2-mar:#1a9a6a;
  background:var(--surf);border:1px solid var(--line);border-radius:16px;overflow:hidden;margin:8px 0 6px;
  display:flex;flex-direction:column}
:root[data-theme="dark"] .gn2-wrap{
  --gn2-pishdadian:#f2b23a; --gn2-kayanian:#6e8ff5; --gn2-turanian:#f0705f; --gn2-sistanian:#33c9ad;
  --gn2-godarzian:#e07ad0; --gn2-nozarian:#86c94a; --gn2-none:#a09db0;
  --gn2-pat:#a9a6b3; --gn2-mat:#e07ab8; --gn2-mar:#3fc48f}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .gn2-wrap{
  --gn2-pishdadian:#f2b23a; --gn2-kayanian:#6e8ff5; --gn2-turanian:#f0705f; --gn2-sistanian:#33c9ad;
  --gn2-godarzian:#e07ad0; --gn2-nozarian:#86c94a; --gn2-none:#a09db0;
  --gn2-pat:#a9a6b3; --gn2-mat:#e07ab8; --gn2-mar:#3fc48f}}
.gn2-wrap.gn2-full{position:fixed;inset:0;z-index:1000;margin:0;border:0;border-radius:0}
html.gn2-lock{overflow:hidden}
.gn2-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--line)}
.gn2-bar .sp{flex:1}
.gn2-btn{font:inherit;font-family:var(--font-ui,inherit);font-size:.85rem;min-height:40px;min-width:40px;padding:4px 12px;border-radius:10px;
  cursor:pointer;border:1px solid var(--line);background:var(--surf);color:var(--ink)}
.gn2-btn:hover{background:var(--hover,rgba(0,0,0,.05))}
.gn2-btn:focus-visible{outline:2px solid var(--acc);outline-offset:2px}
.gn2-btn.gn2-fs{border-color:var(--acc);color:var(--acc-text,var(--acc));font-weight:600}
.gn2-btn .en{display:none}
.gn2-zl{font-size:.8rem;color:var(--mute);min-width:3.5em;text-align:center;direction:ltr}
.gn2-q{font:inherit;font-size:.9rem;min-height:40px;padding:4px 12px;border-radius:10px;border:1px solid var(--line);
  background:var(--surf);color:var(--ink);width:min(220px,100%)}
.gn2-strip{display:flex;flex-wrap:wrap;gap:6px;padding:8px 12px 2px;align-items:center}
.gn2-hchip{font:inherit;font-size:.8rem;min-height:36px;padding:2px 10px;border-radius:999px;cursor:pointer;
  border:1px solid var(--line);background:var(--surf);color:var(--ink);display:inline-flex;align-items:center;gap:6px}
.gn2-hchip i{width:10px;height:10px;border-radius:50%;background:var(--c,var(--mute))}
.gn2-hchip:focus-visible{outline:2px solid var(--acc)}
.gn2-fambar{display:none;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid var(--line);
  background:color-mix(in oklab,var(--c,var(--ink)) 8%,var(--surf));border-top:3px solid var(--c,var(--line))}
.gn2-fambar.on{display:flex}
.gn2-fambar .t{flex:1;min-width:0;line-height:1.2}
.gn2-famname{font-weight:600;font-size:1.05rem;color:var(--c,var(--ink))}
.gn2-fammeta{font-size:.76rem;color:var(--mute)}
.gn2-fbtn{font-family:system-ui,sans-serif;font-size:1.2rem;line-height:1;min-width:44px;min-height:44px;border-radius:12px;
  border:1px solid var(--line);background:var(--surf);color:var(--ink);cursor:pointer}
.gn2-fbtn.gn2-all{font-family:inherit;font-size:.8rem;padding:0 10px}
.gn2-host{position:relative;height:min(78vh,860px);min-height:420px;touch-action:none;cursor:grab;background:var(--surf);overflow:hidden}
.gn2-full .gn2-host{flex:1;height:auto;min-height:0}
.gn2-host.panning{cursor:grabbing}
.gn2-host svg{display:block;width:100%;height:100%;direction:ltr;font-family:var(--font-ui,inherit)}
.gn2-world{will-change:transform}
.gn2-host svg text{fill:var(--ink);font-size:11px;pointer-events:none;user-select:none}
.gn2-host svg text.gn2-sub{fill:var(--mute);font-size:9.5px}
.gn2-host svg text.gn2-head{font-size:15px;font-weight:600}
.gn2-host svg text.gn2-lab{font-size:12.5px;font-weight:600;paint-order:stroke;stroke:var(--surf);stroke-width:3px;stroke-linejoin:round}
.gn2-host svg text.gn2-badge{font-size:8.5px;font-weight:600}
.gn2-lanechrome{cursor:zoom-in}
.gn2-lane{fill:var(--ink);fill-opacity:.03}
.gn2-band{fill:var(--ink);fill-opacity:.025}
.gn2-card{fill:var(--surf);stroke:var(--line);stroke-width:1.2}
.gn2-n{cursor:pointer;outline:none}
.gn2-n:hover .gn2-card,.gn2-n.lit .gn2-card,.gn2-n:focus-visible .gn2-card{stroke:var(--ink)}
.gn2-n.absent .gn2-m{fill:var(--surf)!important;stroke:currentColor;stroke-dasharray:2 2;stroke-width:1.2}
.gn2-flag.conflict{fill:var(--gn2-pishdadian)}
.gn2-flag.poem{fill:var(--acc)}
.gn2-t{fill:none;stroke-width:1.1;stroke-opacity:.55}
.gn2-t.rel-paternal{stroke:var(--gn2-pat);stroke-opacity:.6}
.gn2-t.rel-maternal{stroke:var(--gn2-mat);stroke-opacity:.9;stroke-width:1.4}
.gn2-t.rel-inferred{stroke:var(--gn2-mat);stroke-opacity:.6;stroke-dasharray:5 3}
.gn2-t.rel-marriage{stroke:var(--gn2-mar);stroke-dasharray:3 3;stroke-opacity:.85}
.gn2-t.disputed{stroke-dasharray:1.5 3}
.gn2-t.lit{stroke-opacity:1;stroke-width:2.4}
svg.searching .gn2-n:not(.hit){opacity:.15}
svg.searching .gn2-t{opacity:.2}
.gn2-legend{display:flex;flex-wrap:wrap;gap:6px 14px;padding:10px 12px;border-top:1px solid var(--line);font-size:.82rem;color:var(--mute)}
.gn2-legend .grp{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px}
.gn2-legend .grp + .grp{padding-inline-start:12px;border-inline-start:1px solid var(--line)}
.gn2-key{display:inline-flex;align-items:center;gap:6px;padding:4px 2px}
.gn2-key i{display:inline-block;width:12px;height:12px;border-radius:50%;background:var(--c,var(--mute))}
.gn2-key i.dia{transform:rotate(45deg);border-radius:2px}
.gn2-key i.sq{border-radius:2px}
.gn2-key i.ring{background:none;border:2px solid var(--c,var(--mute))}
.gn2-key i.hollow{background:var(--surf);border:1.5px dashed var(--mute)}
.gn2-key i.dot2{width:8px;height:8px;background:var(--gn2-pishdadian)}
.gn2-key i.tri{width:0;height:0;border-radius:0;background:none;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:9px solid var(--acc)}
.gn2-key i.ln{width:22px;height:0;border-radius:0;border-top:2px solid var(--gn2-pat)}
.gn2-key i.ln.maternal{border-top-color:var(--gn2-mat)}
.gn2-key i.ln.inferred{border-top:2px dashed var(--gn2-mat)}
.gn2-key i.ln.marriage{border-top:2px dashed var(--gn2-mar)}
.gn2-key i.ln.disputed{border-top:2px dotted var(--mute)}
/* the panel: a hover tooltip on a mouse, a pinned sheet after a tap */
.gn2-tip{position:fixed;z-index:1100;pointer-events:none;max-width:300px;opacity:0;transition:opacity .15s;
  background:var(--surf);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:10px 12px;
  box-shadow:var(--shadow-lg,0 8px 28px rgba(0,0,0,.14));font-size:.84rem;line-height:1.55;direction:rtl}
.gn2-tip.show{opacity:1}
.gn2-tip.pinned{pointer-events:auto}
.gn2-tip b{font-size:1rem;font-weight:600;display:block}
.gn2-tip .g{color:var(--mute)}
.gn2-tip .chips{display:flex;flex-wrap:wrap;gap:4px;margin:6px 0 2px}
.gn2-tip .chip{font-size:.74rem;padding:1px 8px;border-radius:999px;border:1px solid var(--line);color:var(--mute)}
.gn2-tip .chip.house{border-color:var(--c);color:var(--c)}
.gn2-tip .num{font-weight:600}
.gn2-tip .nt{margin-top:6px;font-size:.78rem;color:var(--mute);border-top:1px solid var(--line);padding-top:6px}
.gn2-tip .rels{margin:6px 0 4px;border-top:1px solid var(--line);padding-top:6px;font-size:.8rem}
.gn2-tip .rels.muted{color:var(--mute)}
.gn2-tip .rel .k{display:inline-block;min-width:6.5em;color:var(--mute)}
.gn2-tip .rel::before{content:"";display:inline-block;width:14px;border-top:2px solid var(--gn2-pat);margin-inline-end:6px;vertical-align:middle}
.gn2-tip .rel.maternal::before{border-top-color:var(--gn2-mat)}
.gn2-tip .rel.inferred::before{border-top:2px dashed var(--gn2-mat)}
.gn2-tip .rel.marriage::before{border-top:2px dashed var(--gn2-mar)}
.gn2-tip .rel.sib::before{border-top:2px dotted var(--mute)}
.gn2-tip .foot{display:none;align-items:center;gap:8px;margin-top:8px;border-top:1px solid var(--line);padding-top:8px}
.gn2-tip.pinned .foot{display:flex}
.gn2-tip .go{flex:1;font-size:.86rem;color:var(--acc);text-decoration:none;font-weight:600;min-height:40px;display:flex;align-items:center;
  justify-content:center;border:1px solid var(--acc);border-radius:10px;padding:0 12px}
.gn2-tip .go.muted{color:var(--mute);border-color:var(--line);font-weight:400}
.gn2-tip .close{font:inherit;font-size:1.3rem;line-height:1;min-width:40px;min-height:40px;border-radius:10px;border:1px solid var(--line);background:var(--surf);color:var(--mute);cursor:pointer}
.gn2-note{font-size:.82rem;color:var(--mute);margin:6px 0 0}
@media (hover:none),(max-width:640px){
  .gn2-tip.pinned{left:8px!important;right:8px!important;top:auto!important;bottom:8px!important;max-width:none;
    padding:14px 14px calc(14px + env(safe-area-inset-bottom));border-radius:16px;font-size:.9rem}
  .gn2-tip.pinned b{font-size:1.1rem}
}
@media (max-width:640px){
  .gn2-host{height:min(72vh,700px);min-height:380px}
  .gn2-strip{padding:6px 8px 0;gap:4px}
  .gn2-hchip{font-size:.72rem;min-height:32px;padding:1px 8px}
  .gn2-legend{font-size:.78rem;gap:4px 8px}
  .gn2-legend .grp + .grp{padding-inline-start:0;border:0}
  .gn2-famname{font-size:.95rem}
}
@media (prefers-reduced-motion:reduce){.gn2-tip{transition:none}}


/* ---- the shared bar, reconciled with this page ------------------------- */

/* 1. The bar IS a <header>, and theme.CSS styles the bare element. `.sitenav`
      sets no padding — the shared sheet puts it on `.sitenav-inner` — so the
      page rule would win and make the bar 90px tall instead of 53. */
header.sitenav{padding:0;border-bottom:1px solid var(--nav-border);margin:0}
header.sitenav h1{font-size:inherit;font-weight:inherit;margin:0}

/* 2. ⚠ Removed 2026-09-08 (plan 41). Two rules reversed the shared sheet's
      RTL for an LTR document. The document went RTL on 2026-09-08 and these
      stayed: `margin-inline-end:auto` then pushed the tabs against the brand
      (tabs at x=888–1214 beside a brand at 1288, where the SPA has them at
      144–463), and `transform:none` would have pointed a back arrow forward.
      The shared sheet is right for an RTL page. Nothing to bridge. */

/* 3. ⚠ Removed 2026-09-04. This is where the bar diverged.

      The shared sheet consumes exactly seven --nav-* tokens. This file used to
      map all seven onto the illumination palette, in all three theme scopes —
      so the bar rendered here with a LAPIS pill while the same markup, from the
      same sheet, rendered purple in the app. Nothing was broken; the contract
      was being fulfilled twice, with two different answers.

      tokens.generated.css now defines all seven, themed, ahead of this sheet.
      Re-declaring them here would silently win again, so the block is gone
      rather than emptied. If the bar ever needs to differ on these pages, say
      so in tokens.css where both halves can see it. */

/* 4. ⚠ Removed 2026-09-08 (plan 41). The bar was narrowed to the page's
      1180px here; now the page is widened to the bar's column instead
      (`.wrap` in theme.py reads the same --shell-* tokens). The bar is one
      component on three renderers and must measure the same on all of them;
      the page body is the thing that may follow it. */

/* The rows under the bar sit in the shared .shellrow (site-nav.css), the
   same column as the bar. The poet row is local to these pages and follows
   the strip and the back row inside that box. */
.shellrow > .poetrow{width:100%}
.skysub{direction:rtl}
.skysub-tab span{font-family:var(--fa)}
.skydoors{direction:rtl}
.skydoor-blurb,.skydoor-title{font-family:var(--fa)}
.sitenav-brand{font-family:var(--sans)}
.sitenav-tab span{font-family:var(--fa);font-size:13.5px}


/* ---- the shared footer, reconciled with this page ---------------------- */

/* 1. The footer IS a <footer>, and theme.CSS styles the bare element with a
      margin, a padding and a hard `border-top`. The class wins on every
      property it also sets, but nothing in the shared sheet sets a border —
      so that one survived and drew a flat rule directly on top of the
      footer's own rule-that-fades-at-both-ends. Exactly the shape of the
      collision `nav.NAV_BRIDGE_CSS` repair 1 found for the bar. */
footer.sitefoot{border-top:0;padding-top:28px}

/* 2. The bar is reconciled to the page's 1180px measure, not the shared
      sheet's 1200px; the footer has to line up with both. */
.sitefoot-inner{max-width:1180px;padding:0 22px}

/* 3. Persian runs carry their own face here, as everywhere on these pages.
      The `.sitefoot-group h3 .fa` half of this selector went on 2026-09-07
      with the group headings themselves. */
.sitefoot-link .fa{font-family:var(--fa)}

/* The way out to Ganjoor, beside the citation that now leads to this site's
   own page for the poem (plan 36). Small and quiet: it is provenance, not the
   thing to click. */
.src-out{margin-inline-start:4px;text-decoration:none;opacity:.55}
.src-out:hover{opacity:1}

