/* ==========================================================================
   Pars Abr — X-mono design system · tokens.css
   Source of truth: the live ts.parsabr.com (measured 2026-10-29), cross-checked
   on cs.parsabr.com and my.parsabr.com. Where an older document disagrees, ts wins.

   No brand hue. Hierarchy = luminance + weight + elevation. Colour = status only.
   Theme: <html data-theme="light|dark">; with no attribute it follows the OS.
   Any element may also carry data-theme="light|dark" to pin a theme locally
   (used by previews, the gallery and always-dark media areas).

   Layers in this file:
     1. @font-face   2. tokens (light, dark, system-dark, derived)
     3. base         4. components (shared by every Pars Abr site)
   ========================================================================== */

/* ── 1. FONT: Peyda 4 variable, 100-1000 (never FaNum) ─────────────────────── */
@font-face { font-family: "Peyda"; font-weight: 100 1000; font-display: swap; src: url("../fonts/PeydaWebVF.woff2") format("woff2-variations"), url("../fonts/PeydaWebVF.woff2") format("woff2"); }

/* ── 2a. LIGHT (bare :root = the full palette; light twin) ───────────────── */
:root, [data-theme="light"] {
  color-scheme: light;
  /* surfaces */
  --paper: #eef1f4;                 /* page canvas, never pure white */
  --white: #ffffff;                 /* panel / card surface */
  --input: #e8ecef;                 /* panel-2: fields, inset boxes */
  --line: rgba(15,20,25,.14);       /* hairline */
  --hair-2: rgba(15,20,25,.28);     /* strong hairline: hover, focus, scrolled header */
  /* text */
  --text: #0f1419;
  --text-2: #49555e;                /* secondary */
  --faint: #98a2ad;                 /* disabled and decorative only; never readable text or placeholders */
  --strong: #0f1419;                /* headings, key figures */
  /* status: meaning only, never decoration */
  --ok: #15803d;  --warn: #b45309;  --danger: #e11d48;
  /* status text on soft fills / directly on paper: darker ink (contrast >= 5.7:1) */
  --ok-ink: color-mix(in srgb, var(--ok) 78%, #000);  --warn-ink: color-mix(in srgb, var(--warn) 78%, #000);  --danger-ink: color-mix(in srgb, var(--danger) 78%, #000);
  --on-danger: #fff;                /* label on a solid --danger fill */
  --muted-ink: var(--text-2);       /* secondary text on chips, raised rows, fields (light = text-2) */
  --led-idle: #7b868e;              /* measured but no data (radar) */
  /* soft keys */
  --btn-grad: linear-gradient(180deg,#30343a,#0f1113);
  --btn-fg: #fff;
  --btn-glow: 0 10px 22px -14px rgba(15,20,25,.5);
  --ghost-bg: linear-gradient(180deg,rgba(15,20,25,.07),rgba(15,20,25,.02));
  --ghost-border: rgba(15,20,25,.13);
  --ghost-inset: inset 0 1px 0 rgba(255,255,255,.85);  /* catch-light */
  /* glass, fills */
  --header-glass: rgba(255,255,255,.78);
  --chip-bg: rgba(15,20,25,.06);
  --nav-hover: rgba(15,20,25,.07);
  --sel: rgba(15,20,25,.16);
  --grid-line: rgba(15,20,25,.07);
  --scroll-thumb: #c9ccd1;
  /* elevation */
  --shadow-card: 0 1px 3px rgba(15,20,25,.08);
  --shadow-lift: 0 1px 2px rgba(15,20,25,.05), 0 10px 26px -16px rgba(15,20,25,.18);
  --shadow-pop: 0 1px 2px rgba(15,20,25,.06), 0 22px 44px -18px rgba(15,20,25,.3);
  --theme-color: #eef1f4;           /* <meta name="theme-color"> */
}

/* ── 2b. DARK (explicit choice, or a locally pinned element) ─────────────── */
:root[data-theme="dark"], [data-theme="dark"] {
  color-scheme: dark;
  --paper: #000;  --white: #0a0a0b;  --input: #121214;
  --line: rgba(255,255,255,.10);  --hair-2: rgba(255,255,255,.18);
  --text: #e7e9ea;  --text-2: #767b85;  --faint: #494e56;  --strong: #fff;
  --ok: #4ade80;  --warn: #fbbf24;  --danger: #fb7185;  --led-idle: #5c656c;
  --ok-ink: var(--ok);  --warn-ink: var(--warn);  --danger-ink: var(--danger);  /* dark: plain status is already >= 4.5:1 */
  --on-danger: #000;  /* label on a solid --danger fill: dark --danger is light */
  --muted-ink: color-mix(in srgb, var(--text-2) 85%, var(--text));  /* >= 4.5:1 on chips, raised rows, fields */
  --btn-grad: linear-gradient(180deg,#fff,#dfe2e5);  --btn-fg: #000;
  --btn-glow: 0 0 0 1px rgba(255,255,255,.06);  /* no white halo (unslop review) */
  --ghost-bg: linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.07));
  --ghost-border: rgba(255,255,255,.14);
  --ghost-inset: inset 0 1px 0 rgba(255,255,255,.12);
  --header-glass: rgba(0,0,0,.65);  --chip-bg: rgba(255,255,255,.045);
  --nav-hover: rgba(255,255,255,.10);  --sel: rgba(255,255,255,.18);
  --grid-line: rgba(255,255,255,.045);  --scroll-thumb: #26262a;
  --shadow-card: inset 0 1px 0 rgba(255,255,255,.04);
  --shadow-lift: inset 0 1px 0 rgba(255,255,255,.06), 0 12px 30px -18px rgba(0,0,0,.85);
  --shadow-pop: inset 0 1px 0 rgba(255,255,255,.06), 0 24px 48px -16px rgba(0,0,0,.9);
  --theme-color: #000000;
}

/* ── 2c. SYSTEM DARK (no data-theme attribute + OS dark) ─────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #000;  --white: #0a0a0b;  --input: #121214;
    --line: rgba(255,255,255,.10);  --hair-2: rgba(255,255,255,.18);
    --text: #e7e9ea;  --text-2: #767b85;  --faint: #494e56;  --strong: #fff;
    --ok: #4ade80;  --warn: #fbbf24;  --danger: #fb7185;  --led-idle: #5c656c;
  --ok-ink: var(--ok);  --warn-ink: var(--warn);  --danger-ink: var(--danger);  /* dark: plain status is already >= 4.5:1 */
  --on-danger: #000;  /* label on a solid --danger fill: dark --danger is light */
  --muted-ink: color-mix(in srgb, var(--text-2) 85%, var(--text));  /* >= 4.5:1 on chips, raised rows, fields */
    --btn-grad: linear-gradient(180deg,#fff,#dfe2e5);  --btn-fg: #000;
    --btn-glow: 0 0 0 1px rgba(255,255,255,.06);  /* no white halo (unslop review) */
    --ghost-bg: linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.07));
    --ghost-border: rgba(255,255,255,.14);
    --ghost-inset: inset 0 1px 0 rgba(255,255,255,.12);
    --header-glass: rgba(0,0,0,.65);  --chip-bg: rgba(255,255,255,.045);
    --nav-hover: rgba(255,255,255,.10);  --sel: rgba(255,255,255,.18);
    --grid-line: rgba(255,255,255,.045);  --scroll-thumb: #26262a;
    --shadow-card: inset 0 1px 0 rgba(255,255,255,.04);
    --shadow-lift: inset 0 1px 0 rgba(255,255,255,.06), 0 12px 30px -18px rgba(0,0,0,.85);
    --shadow-pop: inset 0 1px 0 rgba(255,255,255,.06), 0 24px 48px -16px rgba(0,0,0,.9);
    --theme-color: #000000;
  }
}

/* ── 2d. THEME-INDEPENDENT + DERIVED tokens ──────────────────────────────────
   Declared on :root AND every [data-theme] element so values that mix in a
   theme colour are recomputed inside locally pinned areas. */
:root, [data-theme] {
  /* derived from the palette (same formulas as my.parsabr.com) */
  --ok-soft: color-mix(in srgb, var(--ok) 12%, transparent);
  --warn-soft: color-mix(in srgb, var(--warn) 12%, transparent);
  --danger-soft: color-mix(in srgb, var(--danger) 12%, transparent);
  --ring: color-mix(in srgb, var(--text) 12%, transparent);        /* 3px field focus ring */
  --hair-focus: color-mix(in srgb, var(--text) 45%, transparent);  /* field border on focus */
  --glow: color-mix(in srgb, var(--text) 8%, transparent);         /* the one hero glow */
  --dock-glass: color-mix(in srgb, var(--paper) 82%, transparent); /* mobile dock */
  --sheet-glass: color-mix(in srgb, var(--paper) 96%, transparent);/* dropdown, mobile sheet */

  /* ink panel: dark in BOTH themes, type never flips */
  --ink-bg: linear-gradient(135deg,#1b1b1f,#0c0c0e 55%,#000);
  --text-on-ink: #e7e9ea;
  --text-2-on-ink: #9aa0a9;          /* >= 4.5:1 over the whole ink gradient */
  --line-ink: rgba(255,255,255,.10);
  --grid-line-ink: rgba(255,255,255,.035);
  --btn-on-ink: linear-gradient(180deg,#fff,#dfe2e5);
  --danger-grad: linear-gradient(180deg,#e11d48,#be123c);           /* destructive key, white text */

  /* shape */
  --radius: 1rem;            /* card (16px) */
  --radius-sm: .8rem;        /* inner box, alert, dropdown */
  --radius-input: .75rem;    /* field */
  --radius-icon: 12px;       /* icon tile (feature, service) */
  --radius-strip: 22px;      /* frosted status strip (20px <= 700px) */
  --radius-panel: 24px;      /* big panels: ink, services/credit, footer card, mobile sheet */
  --radius-pill: 999px;      /* every control: button, chip, nav, dock, toast */

  /* layout */
  --container: 1180px;       /* content width */
  --container-head: 1228px;  /* header + hero track (capsule = 1180 inside 24px gutters) */
  --gutter: 24px;            /* 16px <= 700px */
  --sec-pad: clamp(56px, 8vw, 104px);
  --sec-gap: clamp(28px, 4vw, 44px);  /* section head -> content */
  --head-h: 60px;            /* header capsule height (54px <= 700px) */
  --head-total: 80px;        /* space the sticky header occupies: 12 + 60 + 8 (74px <= 700px) */
  --grid-cell: 56px;         /* hero hairline grid */
  --dock-h: 56px;            /* mobile bottom dock */
  --target: 44px;            /* minimum touch target */

  /* type */
  --font: "Peyda", "Vazirmatn", Tahoma, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --fs-h1: clamp(2.15rem, 1rem + 4.6vw, 4.6rem);
  --fs-h2: clamp(1.7rem, 1.2rem + 1.9vw, 2.35rem);
  --fs-lede: clamp(1rem, .96rem + .25vw, 1.12rem);

  /* motion */
  --ease: cubic-bezier(.2,.7,.3,1);
  --dur-press: .12s;  --dur-hover: .15s;  --dur-theme: .25s;  --dur-reveal: .5s;
  --rise: 14px;
}
@media (max-width: 700px) {
  :root, [data-theme] { --gutter: 16px; --head-h: 54px; --head-total: 74px; --radius-strip: 20px; }
}

/* ── 3. BASE ─────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--paper); scroll-behavior: smooth; scroll-padding-top: calc(var(--head-total) + 12px); }
body { font-family: var(--font); background: var(--paper); color: var(--text);
  font-size: 16px; line-height: 1.9; word-spacing: 0; min-height: 100vh; overflow-x: clip;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  transition: background-color var(--dur-theme) var(--ease), color var(--dur-theme) var(--ease); }
[data-theme]:not(html) { color: var(--text); }  /* a locally pinned theme brings its own text colour */
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--sel); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 4px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.mono { font-family: var(--font-mono); font-size: .92em; direction: ltr; unicode-bidi: isolate; }
.en, .num { direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; }
.dim { color: var(--text-2); }
.grow { flex: 1 1 auto; min-width: 0; }
.ico { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip { position: absolute; inset-inline-start: 12px; top: -64px; z-index: 100; padding: 10px 18px;
  border-radius: var(--radius-pill); background: var(--strong); color: var(--paper); font-weight: 700; }
.skip:focus { top: 12px; }

/* scrollbar */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* ── 4. COMPONENTS ───────────────────────────────────────────────────────── */

/* type */
.h1 { font-size: var(--fs-h1); font-weight: 900; line-height: 1.3; letter-spacing: -.03em;
  color: var(--strong); text-wrap: balance; }
.h1 > span { display: block; }
.h1 .en { letter-spacing: -.02em; }
.h1-2 { color: var(--text-2); }
.h2 { font-size: var(--fs-h2); font-weight: 800; line-height: 1.45; letter-spacing: -.02em; color: var(--strong); }
.h3 { font-size: 1.12rem; font-weight: 800; line-height: 1.6; color: var(--strong); }
.lede { font-size: var(--fs-lede); color: var(--text-2); line-height: 2; max-width: 58ch; }
.eyebrow { font-size: .82rem; font-weight: 700; color: var(--text-2); letter-spacing: 0; } /* no box, no dot; never track Persian */
.figure { font-weight: 800; color: var(--strong); font-variant-numeric: tabular-nums; }

/* buttons: soft-key pills, never outline-only */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border: 0; border-radius: var(--radius-pill);
  font: 700 .95rem/1 var(--font); white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: transform var(--dur-press) var(--ease), box-shadow var(--dur-hover) ease,
    filter var(--dur-hover) ease, background var(--dur-hover) ease, border-color var(--dur-hover) ease; }
.btn:focus-visible { border-radius: var(--radius-pill); }
.btn-xs { height: 34px; padding: 0 12px; font-size: .8rem; gap: 6px; }
.btn-xs .ico { width: 16px; height: 16px; }
.btn-sm { height: 38px; padding: 0 16px; font-size: .85rem; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 1.02rem; font-weight: 800; gap: 10px; }
.btn-lg .ico { width: 20px; height: 20px; stroke-width: 2; }
.btn-primary { background: var(--btn-grad); color: var(--btn-fg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), var(--btn-glow); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--ghost-bg); color: var(--text);
  border: 1px solid var(--ghost-border); box-shadow: var(--ghost-inset); }
.btn-ghost:hover { border-color: var(--hair-2); filter: brightness(1.08); }
.btn-danger { background: var(--danger-grad); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.btn-danger:hover { filter: brightness(1.06); }
.btn-on-ink { background: var(--btn-on-ink); color: #000; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 0 0 1px rgba(255,255,255,.06); }
.btn-on-ink:hover { filter: brightness(1.04); }
.btn-ink-ghost { background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.07));
  color: var(--text-on-ink); border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.btn-ink-ghost:hover { border-color: rgba(255,255,255,.26); filter: brightness(1.1); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn-icon { width: 44px; padding: 0; }

/* card */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 28px); box-shadow: var(--shadow-card); min-width: 0;
  transition: border-color var(--dur-hover) ease, box-shadow var(--dur-hover) ease; }
.card:hover { border-color: var(--hair-2); box-shadow: var(--shadow-lift); }
.inset { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--chip-bg);
  border: 1px solid var(--line); font-size: .86rem; color: var(--muted-ink); line-height: 1.9; }
.icon-tile { width: 40px; height: 40px; padding: 10px; flex: none; border-radius: var(--radius-icon);
  background: var(--white); border: 1px solid var(--line); color: var(--strong); }

/* ink panel: CTA / connect / contact. Dark in both themes. */
.ink { position: relative; overflow: hidden; display: grid; gap: 28px 56px; grid-template-columns: minmax(0, 1fr);
  padding: clamp(24px, 4.4vw, 52px); border-radius: var(--radius-panel);
  background: var(--ink-bg); border: 1px solid var(--line-ink); color: var(--text-on-ink); }
.ink::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid-line-ink) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-ink) 1px, transparent 1px);
  background-size: var(--grid-cell) var(--grid-cell);
  -webkit-mask-image: radial-gradient(70% 90% at 100% 0%, #000, transparent 70%);
  mask-image: radial-gradient(70% 90% at 100% 0%, #000, transparent 70%); }
.ink > * { position: relative; }
.ink .h2 { color: #fff; }
.ink p, .ink .eyebrow { color: var(--text-2-on-ink); }
.ink .btn:focus-visible, .ink a:focus-visible { outline-color: #fff; }
@media (min-width: 900px) { .ink.split-2 { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.panel-main { display: grid; gap: 14px; align-content: start; justify-items: start; min-width: 0; }
.panel-main p:not(.eyebrow) { line-height: 1.95; max-width: 48ch; }
.panel-cta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 12px; }
.ink .addr-ink { width: min(100%, 420px); background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.ink .addr-ink .addr-v { color: #fff; font-size: 1.15rem; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; max-width: 100%; }
@media (max-width: 560px) { .cta, .cta .btn-lg, .cta .addr, .panel-cta, .panel-cta .btn { width: 100%; } }
.spec { display: grid; align-content: start; border-top: 1px solid var(--line-ink); min-width: 0; }
.spec > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line-ink); }
.spec dt { color: var(--text-2-on-ink); font-size: .88rem; }
.spec dd { color: var(--text-on-ink); font-weight: 700; font-size: .95rem; text-align: end; min-width: 0; }

/* chips, pills, nav */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: var(--radius-pill); background: var(--chip-bg); border: 1px solid var(--line);
  font-size: .82rem; font-weight: 600; color: var(--muted-ink); white-space: nowrap; user-select: none; }
.nav-item { height: 38px; padding: 0 16px; border-radius: var(--radius-pill); display: inline-flex; align-items: center;
  font-size: .92rem; font-weight: 600; color: var(--muted-ink);
  transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease; }
.nav-item:hover { background: var(--nav-hover); color: var(--text); }
.nav-item[aria-current="page"], .nav-item[aria-current="true"] { background: var(--strong); color: var(--paper); }
@media (max-width: 1023.98px) { .nav-item { padding: 0 12px; } }
.count { min-width: 26px; height: 24px; padding: 0 8px; display: inline-grid; place-items: center;
  border-radius: var(--radius-pill); background: var(--strong); color: var(--paper);
  font-size: .78rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* status LED: only for a measured state */
.led { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; display: inline-block;
  background: var(--ok); color: var(--ok); box-shadow: 0 0 6px currentColor; }
.led.warn { background: var(--warn); color: var(--warn); }
.led.down { background: var(--danger); color: var(--danger); animation: none; }
.led.idle { background: var(--led-idle); color: var(--led-idle); box-shadow: none; animation: none; }
@media (prefers-reduced-motion: no-preference) { .led:not(.down):not(.idle) { animation: led-breathe 2.4s ease-in-out infinite; } }
@keyframes led-breathe { 50% { opacity: .55; } }

/* badges / status labels (portal: .badge, .label, .status-*) */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: var(--radius-pill); font-size: .78rem; font-weight: 600; white-space: nowrap;
  background: var(--chip-bg); color: var(--text); border: 1px solid var(--line); }
.badge.ok { background: var(--ok-soft); color: var(--ok-ink); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; }
.badge.danger { background: var(--danger-soft); color: var(--danger-ink); border-color: transparent; }

/* alerts (portal .alert-*) */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--chip-bg); color: var(--text); line-height: 1.8; }
.alert > div { min-width: 0; overflow-wrap: anywhere; }
.alert .ico { margin-top: 4px; }
.alert b { color: var(--strong); font-weight: 700; }
.alert.ok { background: var(--ok-soft); border-color: var(--ok); }
.alert.ok .ico { color: var(--ok); }
.alert.warn { background: var(--warn-soft); border-color: var(--warn); }
.alert.warn .ico { color: var(--warn); }
.alert.danger { background: var(--danger-soft); border-color: var(--danger); }
.alert.danger .ico { color: var(--danger); }

/* forms */
.field { display: grid; gap: 6px; min-width: 0; }
.label { font-weight: 600; color: var(--text); font-size: .92rem; }
.hint { font-size: .82rem; color: var(--text-2); line-height: 1.7; }
.input, .select, .textarea { width: 100%; height: 44px; padding: 0 14px; font: 1rem var(--font);
  color: var(--text); background: var(--input); border: 1px solid var(--hair-2);
  border-radius: var(--radius-input); transition: border-color var(--dur-hover) ease, box-shadow var(--dur-hover) ease; }
.textarea { height: auto; min-height: 120px; padding: 10px 14px; line-height: 1.9; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--muted-ink); }
.input:focus, .select:focus, .textarea:focus { outline: none; color: var(--strong);
  border-color: var(--hair-focus); box-shadow: 0 0 0 3px var(--ring); }
.input:disabled, .input[readonly] { background: var(--chip-bg); color: var(--muted-ink); }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.field .error { font-size: .82rem; color: var(--danger-ink); font-weight: 600; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--strong); width: 18px; height: 18px; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 500; }
/* pill search: button lives inside the pill */
.pill-form { display: flex; align-items: center; gap: 8px; height: 54px; padding-inline: 20px 6px;
  border-radius: var(--radius-pill); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.pill-form:focus-within { border-color: var(--hair-focus); box-shadow: 0 0 0 3px var(--ring); }
.pill-form input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; background: none; outline: none;
  font: 600 1rem var(--font); color: var(--strong); }
@media (max-width: 700px) { .input, .select, .textarea, .pill-form input { font-size: 16px; } }
@media (max-width: 560px) { .pill-form { height: auto; flex-wrap: wrap; padding: 6px; border-radius: var(--radius-strip); }
  .pill-form input { height: 44px; padding-inline: 14px; } .pill-form .btn { width: 100%; } }

/* address pill: Latin value isolated LTR inside RTL */
.addr { display: flex; align-items: center; gap: 10px; min-width: 0; height: 54px; padding-inline: 20px 8px;
  border-radius: var(--radius-pill); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.addr-k { font-size: .8rem; font-weight: 700; color: var(--text-2); flex: 0 0 auto; }
.addr-v { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 600; color: var(--strong); text-align: left; }
.addr-sm { height: 46px; padding-inline: 16px 6px; background: var(--input); box-shadow: none; }

/* tables (portal .table) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.table { width: 100%; border-collapse: collapse; color: var(--text); font-size: .92rem; }
.table th, .table td { padding: 12px 16px; text-align: start; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table thead th { color: var(--muted-ink); font-weight: 600; font-size: .85rem; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--nav-hover); color: var(--strong); }
.table .num { font-weight: 700; color: var(--strong); }

/* tabs (portal .pt-tabs): same pill as nav */
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; border-radius: var(--radius-pill);
  background: var(--chip-bg); border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.tab { height: 38px; padding: 0 16px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; gap: 8px;
  font-size: .92rem; font-weight: 600; color: var(--muted-ink); white-space: nowrap; border: 0; background: none; cursor: pointer; font-family: inherit; }
.tab:hover { background: var(--nav-hover); color: var(--text); }
.tab[aria-selected="true"] { background: var(--strong); color: var(--paper); }
.tab[aria-selected="true"] .count { background: var(--paper); color: var(--strong); }
.tabs .tab:focus-visible { outline-offset: -2px; }

/* dropdown / sheet glass */
.menu { min-width: 200px; padding: .35rem; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--sheet-glass); box-shadow: var(--shadow-pop);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); }
.menu a { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: .55rem; font-weight: 500; color: var(--text); }
.menu a:hover, .menu a:focus-visible { background: var(--nav-hover); color: var(--strong); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: .35rem 0; }

/* progress (portal) */
.progress { height: 8px; border-radius: var(--radius-pill); background: var(--chip-bg); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--strong); border-radius: inherit; }

/* header: floating frosted capsule */
.header { position: sticky; top: 0; z-index: 50; padding: 12px 0 8px; pointer-events: none; }
.header > .container { max-width: var(--container-head); }
.header-in { pointer-events: auto; display: flex; align-items: center; gap: 6px;
  height: var(--head-h); padding-inline: 20px 8px; border-radius: var(--radius-pill);
  background: var(--header-glass); border: 1px solid var(--line);
  box-shadow: var(--ghost-inset), 0 10px 28px -18px rgba(0,0,0,.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  transition: border-color .2s var(--ease); }
.header.scrolled .header-in { border-color: var(--hair-2); }
.logo { display: inline-flex; align-items: center; flex: 0 0 auto; border-radius: 8px; }
.logo img { height: 30px; width: auto; }
/* logo: colour artwork in light, white in dark (no separate white file) */
[data-theme="dark"] .logo img, [data-theme="dark"] .logo-img { filter: brightness(0) invert(1); opacity: .92; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo img, :root:not([data-theme="light"]) .logo-img { filter: brightness(0) invert(1); opacity: .92; }
}
:root [data-theme="light"] .logo img, :root [data-theme="light"] .logo-img { filter: none; opacity: 1; }
:root [data-theme="dark"] .logo img, :root [data-theme="dark"] .logo-img { filter: brightness(0) invert(1); opacity: .92; }
.nav { display: flex; gap: 2px; margin-inline-start: 18px; }
.theme-btn { height: 44px; padding: 0 14px; gap: 8px; font-size: .85rem; }
.i-moon { display: none; }
:root[data-theme="light"] .i-moon { display: block; }
:root[data-theme="light"] .i-sun { display: none; }
.head-cta { height: 44px; padding: 0 18px; }
@media (max-width: 860px) { .theme-l { display: none; } .theme-btn { width: 44px; padding: 0; } }
@media (max-width: 700px) {
  .header-in { padding-inline: 16px 6px; }
  .nav, .head-cta { display: none; }
}
@media (max-width: 380px) { .logo img { height: 28px; } }

/* hero: 56px hairline grid + one monochrome glow, faded out downward */
.hero-wrap { position: relative; isolation: isolate; overflow: hidden;
  margin-top: calc(-1 * var(--head-total)); padding-top: var(--head-total); }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(70% 55% at 50% 0%, var(--glow), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: auto, var(--grid-cell) var(--grid-cell), var(--grid-cell) var(--grid-cell);
  background-position: 0 0, center top, center top;
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.hero { max-width: var(--container-head); margin-inline: auto; display: grid; gap: clamp(28px, 4vw, 48px);
  grid-template-columns: minmax(0, 1fr); padding-inline: var(--gutter);
  padding-block: clamp(40px, 7.5vw, 112px) clamp(28px, 4vw, 56px); }

/* frosted status strip (only with real measured data) */
.strip { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 0; min-height: 64px;
  padding: 10px; padding-inline-start: 22px; border-radius: var(--radius-strip);
  background: var(--header-glass); border: 1px solid var(--line);
  box-shadow: var(--ghost-inset), 0 18px 40px -28px rgba(0,0,0,.45);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }

/* sections */
.section { padding-block: var(--sec-pad); }
.section-tight { padding-block: clamp(8px, 2vw, 24px); }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 20px 32px; margin-bottom: var(--sec-gap); }
.sec-title { display: grid; gap: 8px; min-width: 0; max-width: 640px; }
.sec-lede { color: var(--text-2); line-height: 1.95; max-width: 60ch; }
.sec-note { margin-top: 22px; font-size: .9rem; color: var(--text-2); line-height: 1.95; max-width: 64ch;
  padding-inline-start: 14px; border-inline-start: 2px solid var(--hair-2); }

/* hairline list, used by steps / rules */
.rules { border-top: 1px solid var(--line); }
.rules li { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 14px; align-items: baseline;
  padding: 18px 2px; border-bottom: 1px solid var(--line); }
.rule-n { font-size: 1.5rem; font-weight: 900; line-height: 1; color: var(--strong); letter-spacing: -.03em; }

/* FAQ: bare hairline list, no box */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px 2px; font-weight: 700; font-size: 1.05rem; color: var(--strong); line-height: 1.7; border-radius: 8px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { width: 20px; height: 20px; color: var(--text-2); transition: transform .2s var(--ease); }
.faq details[open] summary .ico { transform: rotate(45deg); }
.faq summary:hover .ico { color: var(--text); }
.faq .ans { padding: 0 2px 22px; max-width: 68ch; }
.faq .ans p { color: var(--text-2); line-height: 2; }
@media (prefers-reduced-motion: no-preference) { .faq details[open] .ans { animation: rv-in .3s var(--ease) both; } }

/* services «خدمات پارس ابر»: credit card + hairline grid (services.json, 7 items) */
.credit { display: grid; grid-template-columns: minmax(0, 1fr); border-radius: var(--radius-panel); overflow: hidden;
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.credit-main { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start;
  align-items: end; gap: 18px 40px; padding: clamp(24px, 4.4vw, 48px); isolation: isolate; }
.credit-main::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid-cell) var(--grid-cell);
  -webkit-mask-image: radial-gradient(80% 100% at 100% 0%, #000, transparent 75%);
  mask-image: radial-gradient(80% 100% at 100% 0%, #000, transparent 75%); }
.credit-logo { height: 38px; width: auto; }
.credit-h { max-width: 18em; }
@media (min-width: 900px) {
  .credit-main { grid-template-columns: minmax(0, 1fr) auto; }
  .credit-logo { grid-column: 1 / -1; }
  .credit-main .btn { justify-self: end; margin-bottom: 6px; }
}
.svc-head { padding: 18px clamp(24px, 4.4vw, 48px) 6px; border-top: 1px solid var(--line); color: var(--text-2); font-size: .82rem; }
.svc-head b { font-weight: 700; letter-spacing: 0; }
.svc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.svc li { border-top: 1px solid var(--line); }
.svc li:nth-child(even) { border-inline-start: 1px solid var(--line); }
.svc li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.svc-i { display: flex; align-items: center; gap: 16px; padding: 18px clamp(24px, 4.4vw, 48px); height: 100%; line-height: 1.7;
  transition: background-color var(--dur-hover) ease; }
a.svc-i:hover { background: var(--nav-hover); }
.svc-ico { width: 40px; height: 40px; padding: 10px; flex: none; border-radius: var(--radius-icon);
  background: var(--white); border: 1px solid var(--line); color: var(--strong); }
.svc-t { display: grid; flex: 1 1 auto; min-width: 0; }
.svc-t b { color: var(--strong); font-weight: 800; }
.svc-t span { color: var(--muted-ink); font-size: .86rem; }
.svc-go { color: var(--muted-ink); width: 18px; height: 18px; flex: none; }
a.svc-i:hover .svc-go { color: var(--strong); }
.svc .is-cur { background: var(--chip-bg); }
.svc-here { flex: none; }
@media (max-width: 700px) {
  .svc { grid-template-columns: minmax(0, 1fr); }
  .svc li:nth-child(even) { border-inline-start: 0; }
  .svc-i { flex-wrap: wrap; }
}

/* footer: rounded closing card + backlink */
.footer { padding: clamp(24px, 4vw, 48px) 0 32px; }
.footer > .container { width: calc(100% - 2 * var(--gutter)); padding: clamp(22px, 3.4vw, 40px);
  display: grid; gap: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-panel); }
.foot-top { display: grid; gap: 28px 40px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.foot-brand, .foot-addr { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .foot-top { grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr) minmax(0, .9fr) minmax(0, 1.2fr); }
  .foot-brand, .foot-addr { grid-column: auto; }
}
.foot-brand { display: grid; gap: 12px; align-content: start; justify-items: start; }
.foot-brand .logo img { height: 34px; }
.foot-brand p { color: var(--text-2); font-size: .92rem; max-width: 30ch; line-height: 1.9; }
.foot-k { font-size: .78rem; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.foot-col { display: grid; align-content: start; justify-items: start; gap: 2px; }
.foot-col a { color: var(--text-2); font-weight: 600; font-size: .9rem; padding: 4px 0; transition: color var(--dur-hover) ease; }
.foot-col a:hover { color: var(--strong); }
.foot-bot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  padding-top: 20px; border-top: 1px solid var(--line); font-size: .88rem; }
.foot-bot a b { color: var(--strong); }
@media (max-width: 560px) { .foot-bot .btn { width: 100%; } }

/* toast */
.toast { position: fixed; z-index: 90; inset-inline: 12px; bottom: 24px; margin-inline: auto; width: fit-content;
  max-width: min(520px, calc(100vw - 24px)); padding: 10px 20px; border-radius: var(--radius-pill);
  background: var(--header-glass); border: 1px solid var(--hair-2); box-shadow: 0 16px 40px -20px rgba(0,0,0,.6);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font-weight: 700; font-size: .9rem; text-align: center; }
@media (prefers-reduced-motion: no-preference) { .toast:not([hidden]) { animation: rv-in .25s var(--ease) both; } }

/* mobile bottom dock (<= 700px) */
.mdock { display: none; }
@media (max-width: 700px) {
  .mdock { display: flex; position: fixed; z-index: 60; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    height: var(--dock-h); padding: 6px; gap: 4px; border-radius: var(--radius-pill);
    background: var(--dock-glass); border: 1px solid var(--hair-2);
    box-shadow: var(--ghost-inset), 0 16px 40px -18px rgba(0,0,0,.6);
    -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); }
  .mdock a { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-pill);
    font-weight: 700; font-size: .9rem; color: var(--muted-ink); transition: background-color var(--dur-hover) ease, color var(--dur-hover) ease; }
  .mdock a[aria-current="true"], .mdock a[aria-current="page"] { background: var(--strong); color: var(--paper); }
  body:has(.mdock) { padding-bottom: 84px; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

/* motion: rise reveal (content is visible without JS; .js opts in) */
@keyframes rv-in { from { opacity: 0; transform: translateY(var(--rise)); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .rv { animation: rv-in var(--dur-reveal) var(--ease) both; }
  .rv.d1 { animation-delay: .08s; } .rv.d2 { animation-delay: .16s; }
  .rv.d3 { animation-delay: .24s; } .rv.d4 { animation-delay: .32s; }
  .js .reveal { opacity: 0; transform: translateY(var(--rise));
    transition: opacity var(--dur-reveal) var(--ease), transform var(--dur-reveal) var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
