/* Roya Darman — patient v1 token layer. Generated from the single source file. */
:root{
  /* brand · teal replaces the spec's locked green, one file to reverse (E1) */
  --c-accent        : #006F2D; /* 6.18 on white — fill AND text */
  --c-accent-deep   : #004F4D; /* 9.44 — hover / pressed fill */
  --c-on-accent     : #FFFFFF; /* legal here because teal is dark */

  /* neutrals · live slate, not the spec's warm Linen */
  --c-canvas        : #F7F8FB;
  --c-surface       : #FFFFFF;
  --c-sunken        : #EFF3F8;
  --c-ink           : #334155; /* 10.35 */
  --c-ink-2         : #606A80; /* 5.43 — also the ink for sunken grounds */
  --c-ink-3         : #5B7391; /* 4.88 — never on --c-sunken (4.38) */
  --c-line          : #E3E8F0; /* decorative only */
  --c-line-interactive: #6D90B7; /* 3.32 — 1.4.11 */

  /* flags · fills only. Dark ink rides on them. */
  --c-flag          : #FF8A1C; /* 2.36 — NEVER text, NEVER a 1px border */
  --c-on-flag       : #0C2413; /* 6.97 on flag */
  --c-flag-ink      : #6B3F08; /* 8.11 on the flag tint */
  --c-flag-tint     : #FFF1E5;
  --c-highlight     : #2699F0; /* 3.04 — fill only */
  --c-highlight-ink : #125E9E; /* 6.73 */
  --c-focus         : #006F2D; /* ring: 2px solid, 2px offset, never outline:none */

  /* added semantics — SC-01 … SC-05. Aliases over existing hues. */
  --c-stop          : #A3231B; /* 7.46 */
  --c-stop-tint     : #FDECEA; /* 6.53 with --c-stop */
  --c-ok            : #0F7A4A; /* 5.38 */
  --c-ok-tint       : #E7F5EE; /* 4.79 with --c-ok */
  --c-warn          : #8A5A00; /* 5.93 — pending, distinct from the flag hue */
  --c-warn-tint     : #FDF2E4;

  /* type · one stack, glyph-level switching */
  --font-body       : 'Inter','Vazirmatn',system-ui,sans-serif;
  --font-display    : 'Inter Tight','Vazirmatn',system-ui,sans-serif;
  --font-fa         : 'Vazirmatn','Inter',system-ui,sans-serif;
  --font-mono       : 'JetBrains Mono',ui-monospace,monospace;
  --font-fa-size-ratio: 1.04;
  --font-fa-lh-floor  : 1.75;

  /* geometry */
  --s-1:2px; --s-3:8px; --s-5:16px; --s-7:24px; --s-10:48px;
  --r-sm:6px; --r-md:8px; --r-lg:12px; --r-full:999px;
  --e-dir-1         : calc(3px * var(--dir-sign)) 6px 16px -4px rgba(15,23,42,.07);
  --dur-1:100ms; --dur-2:180ms; --dur-3:320ms; --dur-4:560ms;
  --ease-standard   : cubic-bezier(.2,0,0,1);

  /* hit floor — web. Mobile overrides to 48 / 52. (RF-14, SC-06) */
  --hit-min         : 44px;
  --hit-mobile      : 48px;
  --hit-primary     : 52px;

  /* direction */
  --dir-sign        : 1;
}
[dir="rtl"]{ --dir-sign: -1; }

/* dark · elevation is surface lightness first, shadow second */
[data-theme="dark"]{
  --c-canvas:#0C1628; --c-surface:#14243A; --c-sunken:#0A1220;
  --c-ink:#E8F2FC; --c-ink-2:#B4C9DE; --c-ink-3:#8FA8C2;
  --c-accent:#6FC0BE; --c-on-accent:#0C1628;
  --c-accent-deep:#8FD4D2; /* SC-07 — #004F4D measured 1.92:1 here */
  --c-line:#26374F; --c-line-interactive:#7B93B4;
  --c-flag:#FFA24D; --c-on-flag:#0C2413; --c-flag-ink:#FCDFC0; --c-flag-tint:#2A1408;
  --c-stop:#FF8A80; --c-ok:#4ADE8A; --c-warn:#E8B44A;
  --c-focus:#6FC0BE;
}

/* The four Persian corrections. Family comes from the one stack — only metrics are overridden. */
:lang(fa){
  font-family    : var(--font-fa);
  font-size      : calc(1em * var(--font-fa-size-ratio));
  line-height    : max(var(--font-fa-lh-floor), 1.5em);
  letter-spacing : 0 !important; /* tracking breaks cursive joins */
}

/* Latin runs inside Persian prose must be ISOLATED, not merely directioned. */
.bidi-isolate{ direction:ltr; unicode-bidi:isolate; }

/* Mobile overrides — the floor is higher than web. Do not reuse the web value. */
@media (pointer:coarse){
  --hit-min: 48px;
}

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:1ms !important;
    transition-duration:1ms !important;
    transition-property:opacity, color, background-color, border-color !important;
  }
}