/* Ghalamoom design tokens — GENERATED by tools/build.py from tokens/*.tokens.json. Do not edit. */

:root{
  --gh-ref-color-neutral-0:#FFFFFF;
  --gh-ref-color-neutral-50:#EDEEF0;
  --gh-ref-color-neutral-100:#D3D7DE;
  --gh-ref-color-neutral-200:#C2C7CF;
  --gh-ref-color-neutral-300:#A0A6B1;
  --gh-ref-color-neutral-400:#8A909B;
  --gh-ref-color-neutral-500:#646A75;
  --gh-ref-color-neutral-600:#454A54;
  --gh-ref-color-neutral-700:#2C313A;
  --gh-ref-color-neutral-750:#22262E;
  --gh-ref-color-neutral-800:#191C22;
  --gh-ref-color-neutral-850:#121419;
  --gh-ref-color-neutral-900:#0B0C0F;
  --gh-ref-color-neutral-950:#0A0B0E;
  --gh-ref-color-neutral-1000:#000000;
  --gh-ref-color-alpha-white-4:rgba(255,255,255,0.04);
  --gh-ref-color-alpha-white-8:rgba(255,255,255,0.075);
  --gh-ref-color-alpha-white-13:rgba(255,255,255,0.13);
  --gh-ref-color-alpha-white-22:rgba(255,255,255,0.22);
  --gh-ref-color-alpha-white-34:rgba(255,255,255,0.34);
  --gh-ref-color-alpha-white-50:rgba(255,255,255,0.5);
  --gh-ref-color-alpha-black-45:rgba(0,0,0,0.45);
  --gh-ref-color-alpha-black-55:rgba(0,0,0,0.55);
  --gh-ref-color-alpha-black-72:rgba(4,5,7,0.72);
  --gh-ref-color-alpha-black-88:rgba(10,11,14,0.88);
  --gh-ref-color-lime-200:#E4FCB0;
  --gh-ref-color-lime-300:#D8FA85;
  --gh-ref-color-lime-400:#C8F560;
  --gh-ref-color-lime-600:#7EA637;
  --gh-ref-color-lime-800:#4C6627;
  --gh-ref-color-lime-900:#2E3A1E;
  --gh-ref-color-lime-dark:#C8F560;
  --gh-ref-color-lime-dark-hover:#D8FA85;
  --gh-ref-color-lime-dark-a12:rgba(200,245,96,0.12);
  --gh-ref-color-lime-dark-a34:rgba(200,245,96,0.34);
  --gh-ref-color-lime-a10:rgba(200,245,96,0.10);
  --gh-ref-color-lime-a34:rgba(200,245,96,0.34);
  --gh-ref-color-lime-350:#BCEC4A;
  --gh-ref-color-lime-500:#A3CF3A;
  --gh-ref-color-lime-650:#5A800F;
  --gh-ref-color-lime-700:#55700F;
  --gh-ref-color-lime-750:#4E6A0C;
  --gh-ref-color-lime-100:#EEF6D6;
  --gh-ref-color-lime-150:#DCEDB0;
  --gh-ref-color-lime-250:#C3E07A;
  --gh-ref-color-lime-a18:rgba(156,203,30,0.20);
  --gh-ref-color-lime-ink-a40:rgba(78,106,12,0.42);
  --gh-ref-color-violet-300:#A99BFF;
  --gh-ref-color-violet-400:#8B7CFF;
  --gh-ref-color-violet-a14:rgba(169,155,255,0.14);
  --gh-ref-color-violet-a40:rgba(169,155,255,0.40);
  --gh-ref-color-violet-600:#5A44D4;
  --gh-ref-color-violet-a10:rgba(90,68,212,0.10);
  --gh-ref-color-violet-a34:rgba(90,68,212,0.36);
  --gh-ref-color-green-400:#62D9A0;
  --gh-ref-color-green-a12:rgba(98,217,160,0.12);
  --gh-ref-color-green-a34:rgba(98,217,160,0.34);
  --gh-ref-color-green-700:#146C43;
  --gh-ref-color-green-a10:rgba(20,108,67,0.10);
  --gh-ref-color-green-a30:rgba(20,108,67,0.32);
  --gh-ref-color-amber-400:#F2B654;
  --gh-ref-color-amber-a12:rgba(242,182,84,0.12);
  --gh-ref-color-amber-a34:rgba(242,182,84,0.34);
  --gh-ref-color-amber-700:#7C4F00;
  --gh-ref-color-amber-a14:rgba(196,128,10,0.14);
  --gh-ref-color-amber-a34-ink:rgba(138,88,0,0.36);
  --gh-ref-color-red-400:#FF7A6B;
  --gh-ref-color-red-500:#FF5B4A;
  --gh-ref-color-red-a12:rgba(255,122,107,0.12);
  --gh-ref-color-red-300:#FF968A;
  --gh-ref-color-red-a34:rgba(255,122,107,0.34);
  --gh-ref-color-red-700:#A82617;
  --gh-ref-color-red-600:#BD3322;
  --gh-ref-color-red-a10:rgba(180,42,26,0.10);
  --gh-ref-color-red-a30:rgba(180,42,26,0.32);
  --gh-ref-color-blue-400:#7CB7FF;
  --gh-ref-color-blue-a12:rgba(124,183,255,0.12);
  --gh-ref-color-blue-a34:rgba(124,183,255,0.34);
  --gh-ref-color-blue-700:#1E5FB0;
  --gh-ref-color-blue-a10:rgba(30,95,176,0.10);
  --gh-ref-color-blue-a30:rgba(30,95,176,0.32);
  --gh-ref-color-paper-0:#FFFFFF;
  --gh-ref-color-paper-25:#FCFCFA;
  --gh-ref-color-paper-50:#F4F4F0;
  --gh-ref-color-paper-75:#F2F2EE;
  --gh-ref-color-paper-100:#E9E9E4;
  --gh-ref-color-paper-150:#DCDDD6;
  --gh-ref-color-paper-200:#CDCFC6;
  --gh-ref-color-ink-950:#101215;
  --gh-ref-color-ink-900:#16181C;
  --gh-ref-color-ink-800:#24272C;
  --gh-ref-color-ink-700:#454A52;
  --gh-ref-color-ink-600:#5C616A;
  --gh-ref-color-ink-500:#71767E;
  --gh-ref-color-ink-400:#8E939B;
  --gh-ref-color-ink-300:#A9ADB3;
  --gh-ref-color-alpha-lime-24:rgba(78,106,12,0.24);
  --gh-ref-color-alpha-ink-4:rgba(22,24,20,0.04);
  --gh-ref-color-alpha-ink-8:rgba(22,24,20,0.08);
  --gh-ref-color-alpha-ink-10:rgba(22,24,20,0.10);
  --gh-ref-color-alpha-ink-14:rgba(22,24,20,0.14);
  --gh-ref-color-alpha-ink-16:rgba(22,24,20,0.16);
  --gh-ref-color-alpha-ink-24:rgba(22,24,20,0.24);
  --gh-ref-color-alpha-ink-36:rgba(22,24,20,0.36);
  --gh-ref-color-alpha-ink-48:rgba(22,24,20,0.48);
  --gh-ref-color-alpha-ink-header:rgba(242,242,238,0.88);
  --gh-ref-color-alpha-ink-scrim:rgba(22,24,20,0.42);
  --gh-ref-color-shadow-ink-12:rgba(30,32,24,0.12);
  --gh-ref-color-shadow-ink-18:rgba(30,32,24,0.18);
  --gh-ref-color-shadow-ink-06:rgba(30,32,24,0.06);
  --gh-ref-font-family-base:"Lahzeh FaNum", "Lahzeh", system-ui, sans-serif;
  --gh-ref-font-family-latin:"Lahzeh", system-ui, sans-serif;
  --gh-ref-font-weight-thin:200;
  --gh-ref-font-weight-light:300;
  --gh-ref-font-weight-regular:400;
  --gh-ref-font-weight-medium:500;
  --gh-ref-font-weight-semibold:600;
  --gh-ref-font-weight-bold:700;
  --gh-ref-font-weight-extrabold:800;
  --gh-ref-font-weight-heavy:850;
  --gh-ref-font-weight-black:900;
  --gh-ref-font-size-50:0.6875rem;
  --gh-ref-font-size-75:0.75rem;
  --gh-ref-font-size-100:0.8125rem;
  --gh-ref-font-size-200:0.875rem;
  --gh-ref-font-size-300:0.9375rem;
  --gh-ref-font-size-400:1rem;
  --gh-ref-font-size-500:1.0625rem;
  --gh-ref-font-size-600:1.25rem;
  --gh-ref-font-size-700:1.5rem;
  --gh-ref-font-size-800:2rem;
  --gh-ref-font-size-900:2.625rem;
  --gh-ref-font-size-1000:3.5rem;
  --gh-ref-font-size-1100:4.5rem;
  --gh-ref-font-size-1200:5.5rem;
  --gh-ref-font-line-height-tight:1.2;
  --gh-ref-font-line-height-snug:1.4;
  --gh-ref-font-line-height-normal:1.6;
  --gh-ref-font-line-height-relaxed:1.85;
  --gh-ref-space-0:0px;
  --gh-ref-space-50:2px;
  --gh-ref-space-100:4px;
  --gh-ref-space-150:6px;
  --gh-ref-space-200:8px;
  --gh-ref-space-250:10px;
  --gh-ref-space-300:12px;
  --gh-ref-space-400:16px;
  --gh-ref-space-500:20px;
  --gh-ref-space-600:24px;
  --gh-ref-space-700:28px;
  --gh-ref-space-800:32px;
  --gh-ref-space-1000:40px;
  --gh-ref-space-1200:48px;
  --gh-ref-space-1600:64px;
  --gh-ref-space-1800:72px;
  --gh-ref-space-2400:96px;
  --gh-ref-radius-none:0px;
  --gh-ref-radius-xs:5px;
  --gh-ref-radius-sm:8px;
  --gh-ref-radius-md:14px;
  --gh-ref-radius-lg:20px;
  --gh-ref-radius-xl:24px;
  --gh-ref-radius-full:999px;
  --gh-ref-size-icon-sm:15px;
  --gh-ref-size-icon-md:18px;
  --gh-ref-size-icon-lg:22px;
  --gh-ref-size-control-xs:24px;
  --gh-ref-size-control-sm:34px;
  --gh-ref-size-control-md:44px;
  --gh-ref-size-control-lg:52px;
  --gh-ref-size-touch-min:44px;
  --gh-ref-duration-instant:80ms;
  --gh-ref-duration-fast:120ms;
  --gh-ref-duration-base:150ms;
  --gh-ref-duration-slow:240ms;
  --gh-ref-duration-slower:400ms;
  --gh-ref-easing-standard:cubic-bezier(0.2, 0, 0, 1);
  --gh-ref-easing-enter:cubic-bezier(0, 0, 0, 1);
  --gh-ref-easing-exit:cubic-bezier(0.3, 0, 1, 1);
  --gh-ref-breakpoint-sm:560px;
  --gh-ref-breakpoint-md:860px;
  --gh-ref-breakpoint-lg:1180px;
  --gh-ref-breakpoint-xl:1440px;
  --gh-ref-z-base:0;
  --gh-ref-z-raised:10;
  --gh-ref-z-sticky:40;
  --gh-ref-z-popover:50;
  --gh-ref-z-fixed:90;
  --gh-ref-z-overlay:100;
  --gh-ref-z-tooltip:120;
  --gh-ref-z-toast:130;
}

:root{
  --gh-color-bg-canvas:var(--gh-ref-color-neutral-950); /* Page background */
  --gh-color-bg-header:var(--gh-ref-color-alpha-black-88); /* Sticky bars, used with backdrop blur */
  --gh-color-bg-scrim:var(--gh-ref-color-alpha-black-72); /* Behind modals, sheets, command palette */
  --gh-color-surface-1:var(--gh-ref-color-neutral-850); /* Tile / card */
  --gh-color-surface-2:var(--gh-ref-color-neutral-800); /* Raised tile, inner panel, input, popover */
  --gh-color-surface-3:var(--gh-ref-color-neutral-750); /* Hover, selected row, icon chip */
  --gh-color-surface-4:var(--gh-ref-color-neutral-700); /* Pressed, track of progress */
  --gh-color-surface-inverse:var(--gh-ref-color-neutral-50); /* Tooltip, toast, selected chip */
  --gh-color-surface-media:var(--gh-ref-color-neutral-1000); /* Video / artwork canvas (always dark, colour-accurate) */
  --gh-color-surface-paper:var(--gh-ref-color-neutral-50); /* Always-light plate, same in both themes: the printed page / specimen in tool previews, third-party brand marks */
  --gh-color-border-subtle:var(--gh-ref-color-alpha-white-8);
  --gh-color-border-default:var(--gh-ref-color-alpha-white-13);
  --gh-color-border-strong:var(--gh-ref-color-alpha-white-22);
  --gh-color-text-primary:var(--gh-ref-color-neutral-50);
  --gh-color-text-secondary:var(--gh-ref-color-neutral-300);
  --gh-color-text-tertiary:var(--gh-ref-color-neutral-400); /* Meta, captions. Min. 4.5:1 on surface-1. */
  --gh-color-text-disabled:var(--gh-ref-color-neutral-500);
  --gh-color-text-inverse:var(--gh-ref-color-neutral-950); /* On inverse surfaces */
  --gh-color-text-on-paper:var(--gh-ref-color-neutral-950); /* Ink on surface-paper (both themes) */
  --gh-color-accent-default:var(--gh-ref-color-lime-dark); /* Primary action, focus, progress, 'you' in charts. ONE accent. */
  --gh-color-accent-ink:var(--gh-ref-color-lime-dark); /* Accent as text, link, icon, line or border on a surface (dark: the lime itself; light: a deep olive that passes 4.5:1). Fills stay accent-default with accent-on text. */
  --gh-color-accent-hover:var(--gh-ref-color-lime-dark-hover);
  --gh-color-accent-soft:var(--gh-ref-color-lime-dark-a12);
  --gh-color-accent-border:var(--gh-ref-color-lime-dark-a34);
  --gh-color-accent-on:var(--gh-ref-color-neutral-950); /* Text/icons on accent — always ink, never white */
  --gh-color-ai-default:var(--gh-ref-color-violet-300); /* Assistant «دستیار قلم» only (shared with Course Studio) */
  --gh-color-ai-soft:var(--gh-ref-color-violet-a14);
  --gh-color-ai-border:var(--gh-ref-color-violet-a40);
  --gh-color-status-success:var(--gh-ref-color-green-400);
  --gh-color-status-success-soft:var(--gh-ref-color-green-a12);
  --gh-color-status-warning:var(--gh-ref-color-amber-400);
  --gh-color-status-warning-soft:var(--gh-ref-color-amber-a12);
  --gh-color-status-danger:var(--gh-ref-color-red-400);
  --gh-color-status-danger-soft:var(--gh-ref-color-red-a12);
  --gh-color-status-info:var(--gh-ref-color-blue-400);
  --gh-color-status-info-soft:var(--gh-ref-color-blue-a12);
  --gh-color-status-success-border:var(--gh-ref-color-green-a34);
  --gh-color-status-warning-border:var(--gh-ref-color-amber-a34);
  --gh-color-status-danger-hover:var(--gh-ref-color-red-300); /* Hover of destructive buttons */
  --gh-color-status-danger-border:var(--gh-ref-color-red-a34);
  --gh-color-status-info-border:var(--gh-ref-color-blue-a34);
  --gh-color-status-on-solid:var(--gh-ref-color-neutral-950); /* Text/icons on a solid status fill (danger-solid button, swipe action) */
  --gh-color-feedback-pin:var(--gh-ref-color-red-500); /* Instructor markup on artwork */
  --gh-color-feedback-on-pin:var(--gh-ref-color-neutral-950);
  --gh-color-feedback-pin-resolved:var(--gh-ref-color-neutral-500); /* Resolved instructor pin */
  --gh-color-focus-ring:var(--gh-ref-color-lime-dark);
  --gh-color-focus-field:var(--gh-ref-color-lime-dark); /* Focus ring of text fields (input, input group, search). Dark: same as the global ring. */
  --gh-color-focus-field-halo:transparent; /* Soft halo glued to a focused field's border (box-shadow). None in dark. */
  --gh-color-data-you:var(--gh-ref-color-lime-dark); /* The student / current period */
  --gh-color-data-compare:var(--gh-ref-color-neutral-400); /* Previous period, cohort average — neutral, drawn as ticks/dashes */
  --gh-color-data-goal:var(--gh-ref-color-neutral-50); /* Goal lines (dashed) */
  --gh-color-data-grid:var(--gh-ref-color-alpha-white-8);
  --gh-color-data-heat-0:var(--gh-ref-color-neutral-800);
  --gh-color-data-heat-1:var(--gh-ref-color-lime-900);
  --gh-color-data-heat-2:var(--gh-ref-color-lime-800);
  --gh-color-data-heat-3:var(--gh-ref-color-lime-600);
  --gh-color-data-heat-4:var(--gh-ref-color-lime-dark);
  --gh-color-data-mark:var(--gh-ref-color-neutral-500); /* Default (not-highlighted) data mark */
  --gh-color-data-mark-strong:var(--gh-ref-color-neutral-400); /* Emphasised neutral mark */
  --gh-color-data-track:var(--gh-ref-color-neutral-750); /* Empty track behind bars/progress */
  --gh-color-media-scrim:var(--gh-ref-color-alpha-black-88); /* Controls/captions over video and artwork */
  --gh-color-media-text:var(--gh-ref-color-neutral-50); /* Text/icons over video and artwork (always light, both themes) */
  --gh-color-selection-bg:var(--gh-ref-color-lime-dark); /* ::selection background */
  --gh-color-selection-text:var(--gh-ref-color-neutral-950);
  --gh-color-scrollbar-thumb:var(--gh-ref-color-alpha-white-22);
  --gh-color-scrollbar-track:transparent;
  --gh-color-avatar-tone-1-bg:var(--gh-ref-color-violet-600);
  --gh-color-avatar-tone-1-fg:var(--gh-ref-color-lime-300);
  --gh-color-avatar-tone-2-bg:var(--gh-ref-color-blue-700);
  --gh-color-avatar-tone-2-fg:var(--gh-ref-color-amber-400);
  --gh-color-avatar-tone-3-bg:var(--gh-ref-color-green-700);
  --gh-color-avatar-tone-3-fg:var(--gh-ref-color-red-300);
  --gh-color-avatar-tone-4-bg:var(--gh-ref-color-red-700);
  --gh-color-avatar-tone-4-fg:var(--gh-ref-color-amber-400);
  --gh-color-avatar-tone-5-bg:var(--gh-ref-color-lime-750);
  --gh-color-avatar-tone-5-fg:var(--gh-ref-color-lime-200);
  --gh-color-avatar-tone-6-bg:var(--gh-ref-color-amber-700);
  --gh-color-avatar-tone-6-fg:var(--gh-ref-color-amber-400);
  --gh-color-avatar-tone-7-bg:var(--gh-ref-color-violet-600);
  --gh-color-avatar-tone-7-fg:var(--gh-ref-color-red-300);
  --gh-color-avatar-tone-8-bg:var(--gh-ref-color-blue-700);
  --gh-color-avatar-tone-8-fg:var(--gh-ref-color-blue-400);
  --gh-font-family-base:var(--gh-ref-font-family-base);
  --gh-font-family-latin:var(--gh-ref-font-family-latin);
  --gh-type-display-xl-size:var(--gh-ref-font-size-1200);
  --gh-type-display-xl-weight:var(--gh-ref-font-weight-heavy);
  --gh-type-display-xl-line-height:1.15;
  --gh-type-display-lg-size:var(--gh-ref-font-size-1000);
  --gh-type-display-lg-weight:var(--gh-ref-font-weight-heavy);
  --gh-type-display-lg-line-height:1.2;
  --gh-type-display-size:var(--gh-ref-font-size-900);
  --gh-type-display-weight:var(--gh-ref-font-weight-heavy);
  --gh-type-display-line-height:1.3;
  --gh-type-heading-1-size:var(--gh-ref-font-size-800);
  --gh-type-heading-1-weight:var(--gh-ref-font-weight-extrabold);
  --gh-type-heading-1-line-height:1.35;
  --gh-type-heading-2-size:var(--gh-ref-font-size-700);
  --gh-type-heading-2-weight:var(--gh-ref-font-weight-bold);
  --gh-type-heading-2-line-height:1.4;
  --gh-type-heading-3-size:var(--gh-ref-font-size-600);
  --gh-type-heading-3-weight:var(--gh-ref-font-weight-bold);
  --gh-type-heading-3-line-height:1.5;
  --gh-type-heading-4-size:var(--gh-ref-font-size-400);
  --gh-type-heading-4-weight:var(--gh-ref-font-weight-bold);
  --gh-type-heading-4-line-height:1.5;
  --gh-type-body-lg-size:var(--gh-ref-font-size-500);
  --gh-type-body-lg-weight:var(--gh-ref-font-weight-regular);
  --gh-type-body-lg-line-height:var(--gh-ref-font-line-height-relaxed);
  --gh-type-body-size:var(--gh-ref-font-size-400);
  --gh-type-body-weight:var(--gh-ref-font-weight-regular);
  --gh-type-body-line-height:var(--gh-ref-font-line-height-relaxed);
  --gh-type-body-sm-size:var(--gh-ref-font-size-200);
  --gh-type-body-sm-weight:var(--gh-ref-font-weight-regular);
  --gh-type-body-sm-line-height:1.75;
  --gh-type-label-size:var(--gh-ref-font-size-200);
  --gh-type-label-weight:var(--gh-ref-font-weight-medium);
  --gh-type-label-line-height:var(--gh-ref-font-line-height-snug);
  --gh-type-label-sm-size:var(--gh-ref-font-size-100);
  --gh-type-label-sm-weight:var(--gh-ref-font-weight-medium);
  --gh-type-label-sm-line-height:var(--gh-ref-font-line-height-snug);
  --gh-type-caption-size:var(--gh-ref-font-size-75);
  --gh-type-caption-weight:var(--gh-ref-font-weight-regular);
  --gh-type-caption-line-height:var(--gh-ref-font-line-height-normal);
  --gh-type-figure-xl-size:var(--gh-ref-font-size-1000);
  --gh-type-figure-xl-weight:var(--gh-ref-font-weight-thin);
  --gh-type-figure-xl-line-height:1.1;
  --gh-type-figure-lg-size:var(--gh-ref-font-size-800);
  --gh-type-figure-lg-weight:var(--gh-ref-font-weight-thin);
  --gh-type-figure-lg-line-height:1.15;
  --gh-type-figure-md-size:var(--gh-ref-font-size-700);
  --gh-type-figure-md-weight:var(--gh-ref-font-weight-light);
  --gh-type-figure-md-line-height:1.2;
  --gh-shadow-overlay-sm:0 24px 48px var(--gh-ref-color-alpha-black-45); /* Popover, menu. Shadows only for floating layers — never decoration. */
  --gh-shadow-overlay-lg:0 40px 80px var(--gh-ref-color-alpha-black-55); /* Modal, command palette */
  --gh-radius-tile:var(--gh-ref-radius-xl);
  --gh-radius-panel:var(--gh-ref-radius-lg);
  --gh-radius-inner:var(--gh-ref-radius-md);
  --gh-radius-control:var(--gh-ref-radius-sm);
  --gh-radius-kbd:var(--gh-ref-radius-xs);
  --gh-radius-pill:var(--gh-ref-radius-full);
  --gh-layout-content-max:1376px;
  --gh-layout-gutter:var(--gh-ref-space-800);
  --gh-layout-gutter-mobile:var(--gh-ref-space-400);
  --gh-layout-gap:var(--gh-ref-space-300); /* The ONE bento gap */
  --gh-layout-section:var(--gh-ref-space-1800);
  --gh-layout-header-height:68px;
  --gh-layout-sidebar-width:244px;
  --gh-layout-tabbar-height:64px;
  --gh-layout-focusbar-height:60px; /* Slim top bar of lesson / quiz (focus layout) */
  --gh-motion-duration-fast:var(--gh-ref-duration-fast);
  --gh-motion-duration-base:var(--gh-ref-duration-base);
  --gh-motion-duration-slow:var(--gh-ref-duration-slow);
  --gh-motion-ease:var(--gh-ref-easing-standard);
}

:root{
  --gh-button-height-sm:var(--gh-ref-size-control-sm);
  --gh-button-height-md:var(--gh-ref-size-control-md);
  --gh-button-height-lg:var(--gh-ref-size-control-lg);
  --gh-button-radius:var(--gh-radius-pill);
  --gh-input-height:var(--gh-ref-size-control-md);
  --gh-input-radius:var(--gh-radius-inner);
  --gh-input-bg:var(--gh-color-surface-2);
  --gh-chip-height:32px;
  --gh-tag-height:var(--gh-ref-size-control-xs);
  --gh-tile-padding:var(--gh-ref-space-600);
  --gh-tile-padding-mobile:var(--gh-ref-space-500);
  --gh-tile-radius:var(--gh-radius-tile);
  --gh-icon-stroke:1.75; /* Lucide is drawn for 2px; 1.75 balances it with Lahzeh at 15–22px (ADR 0010) */
  --gh-icon-sm:var(--gh-ref-size-icon-sm);
  --gh-icon-md:var(--gh-ref-size-icon-md);
  --gh-icon-lg:var(--gh-ref-size-icon-lg);
  --gh-focus-width:2px;
  --gh-focus-offset:2px;
}

:root[data-contrast="high"]{
  --gh-color-bg-canvas:var(--gh-ref-color-neutral-1000);
  --gh-color-surface-1:var(--gh-ref-color-neutral-900);
  --gh-color-surface-2:#14161B;
  --gh-color-surface-3:#1E2128;
  --gh-color-border-subtle:var(--gh-ref-color-alpha-white-22);
  --gh-color-border-default:var(--gh-ref-color-alpha-white-34);
  --gh-color-border-strong:var(--gh-ref-color-alpha-white-50);
  --gh-color-text-primary:var(--gh-ref-color-neutral-0);
  --gh-color-text-secondary:var(--gh-ref-color-neutral-100);
  --gh-color-text-tertiary:var(--gh-ref-color-neutral-200);
}

/* ---- light theme («روشن») — semantic remap; components never branch on the theme ---- */

:root[data-theme="light"]{
  color-scheme:light;
  --gh-color-bg-canvas:var(--gh-ref-color-paper-75);
  --gh-color-bg-header:var(--gh-ref-color-alpha-ink-header);
  --gh-color-bg-scrim:var(--gh-ref-color-alpha-ink-scrim);
  --gh-color-surface-1:var(--gh-ref-color-paper-25);
  --gh-color-surface-2:var(--gh-ref-color-paper-50);
  --gh-color-surface-3:var(--gh-ref-color-paper-100);
  --gh-color-surface-4:var(--gh-ref-color-paper-150);
  --gh-color-surface-inverse:var(--gh-ref-color-ink-800);
  --gh-color-surface-media:var(--gh-ref-color-neutral-1000); /* Media canvas stays dark in the light theme */
  --gh-color-border-subtle:var(--gh-ref-color-alpha-ink-8);
  --gh-color-border-default:var(--gh-ref-color-alpha-ink-14);
  --gh-color-border-strong:var(--gh-ref-color-alpha-ink-24);
  --gh-color-text-primary:var(--gh-ref-color-ink-900);
  --gh-color-text-secondary:var(--gh-ref-color-ink-700);
  --gh-color-text-tertiary:var(--gh-ref-color-ink-600);
  --gh-color-text-disabled:var(--gh-ref-color-ink-400);
  --gh-color-text-inverse:var(--gh-ref-color-paper-50);
  --gh-color-accent-default:var(--gh-ref-color-lime-400); /* Lime stays the fill (buttons, badges, selection) with ink text on it */
  --gh-color-accent-ink:var(--gh-ref-color-lime-750);
  --gh-color-accent-hover:var(--gh-ref-color-lime-350);
  --gh-color-accent-soft:var(--gh-ref-color-lime-a18);
  --gh-color-accent-border:var(--gh-ref-color-lime-ink-a40);
  --gh-color-accent-on:var(--gh-ref-color-neutral-950);
  --gh-color-ai-default:var(--gh-ref-color-violet-600);
  --gh-color-ai-soft:var(--gh-ref-color-violet-a10);
  --gh-color-ai-border:var(--gh-ref-color-violet-a34);
  --gh-color-status-success:var(--gh-ref-color-green-700);
  --gh-color-status-success-soft:var(--gh-ref-color-green-a10);
  --gh-color-status-warning:var(--gh-ref-color-amber-700);
  --gh-color-status-warning-soft:var(--gh-ref-color-amber-a14);
  --gh-color-status-danger:var(--gh-ref-color-red-700);
  --gh-color-status-danger-soft:var(--gh-ref-color-red-a10);
  --gh-color-status-info:var(--gh-ref-color-blue-700);
  --gh-color-status-info-soft:var(--gh-ref-color-blue-a10);
  --gh-color-status-success-border:var(--gh-ref-color-green-a30);
  --gh-color-status-warning-border:var(--gh-ref-color-amber-a34-ink);
  --gh-color-status-danger-hover:var(--gh-ref-color-red-600);
  --gh-color-status-danger-border:var(--gh-ref-color-red-a30);
  --gh-color-status-info-border:var(--gh-ref-color-blue-a30);
  --gh-color-status-on-solid:var(--gh-ref-color-paper-0);
  --gh-color-feedback-pin:var(--gh-ref-color-red-500);
  --gh-color-feedback-on-pin:var(--gh-ref-color-neutral-950);
  --gh-color-feedback-pin-resolved:var(--gh-ref-color-ink-400);
  --gh-color-focus-ring:var(--gh-ref-color-lime-750);
  --gh-color-focus-field:transparent; /* Light fields: no hard ring — the accent border is the focus signal, plus a soft halo (owner 1405-09-12: the double dark ring was too heavy). */
  --gh-color-focus-field-halo:var(--gh-ref-color-alpha-lime-24);
  --gh-color-selection-bg:var(--gh-ref-color-lime-400);
  --gh-color-selection-text:var(--gh-ref-color-neutral-950);
  --gh-color-scrollbar-thumb:var(--gh-ref-color-alpha-ink-24);
  --gh-color-scrollbar-track:transparent;
  --gh-color-data-you:var(--gh-ref-color-lime-650);
  --gh-color-data-compare:var(--gh-ref-color-ink-500);
  --gh-color-data-goal:var(--gh-ref-color-ink-900);
  --gh-color-data-grid:var(--gh-ref-color-alpha-ink-10);
  --gh-color-data-heat-0:var(--gh-ref-color-paper-100);
  --gh-color-data-heat-1:var(--gh-ref-color-lime-150);
  --gh-color-data-heat-2:var(--gh-ref-color-lime-250);
  --gh-color-data-heat-3:var(--gh-ref-color-lime-500);
  --gh-color-data-heat-4:var(--gh-ref-color-lime-650);
  --gh-color-data-mark:var(--gh-ref-color-ink-300);
  --gh-color-data-mark-strong:var(--gh-ref-color-ink-500);
  --gh-color-data-track:var(--gh-ref-color-paper-150);
  --gh-color-media-scrim:var(--gh-ref-color-alpha-black-88);
  --gh-color-media-text:var(--gh-ref-color-neutral-50);
  --gh-shadow-overlay-sm:0 12px 32px var(--gh-ref-color-shadow-ink-12), 0 1px 3px var(--gh-ref-color-shadow-ink-06);
  --gh-shadow-overlay-lg:0 28px 64px var(--gh-ref-color-shadow-ink-18), 0 2px 8px var(--gh-ref-color-shadow-ink-06);
}

@media (prefers-color-scheme:light){
:root:not([data-theme]){
  color-scheme:light;
  --gh-color-bg-canvas:var(--gh-ref-color-paper-75);
  --gh-color-bg-header:var(--gh-ref-color-alpha-ink-header);
  --gh-color-bg-scrim:var(--gh-ref-color-alpha-ink-scrim);
  --gh-color-surface-1:var(--gh-ref-color-paper-25);
  --gh-color-surface-2:var(--gh-ref-color-paper-50);
  --gh-color-surface-3:var(--gh-ref-color-paper-100);
  --gh-color-surface-4:var(--gh-ref-color-paper-150);
  --gh-color-surface-inverse:var(--gh-ref-color-ink-800);
  --gh-color-surface-media:var(--gh-ref-color-neutral-1000); /* Media canvas stays dark in the light theme */
  --gh-color-border-subtle:var(--gh-ref-color-alpha-ink-8);
  --gh-color-border-default:var(--gh-ref-color-alpha-ink-14);
  --gh-color-border-strong:var(--gh-ref-color-alpha-ink-24);
  --gh-color-text-primary:var(--gh-ref-color-ink-900);
  --gh-color-text-secondary:var(--gh-ref-color-ink-700);
  --gh-color-text-tertiary:var(--gh-ref-color-ink-600);
  --gh-color-text-disabled:var(--gh-ref-color-ink-400);
  --gh-color-text-inverse:var(--gh-ref-color-paper-50);
  --gh-color-accent-default:var(--gh-ref-color-lime-400); /* Lime stays the fill (buttons, badges, selection) with ink text on it */
  --gh-color-accent-ink:var(--gh-ref-color-lime-750);
  --gh-color-accent-hover:var(--gh-ref-color-lime-350);
  --gh-color-accent-soft:var(--gh-ref-color-lime-a18);
  --gh-color-accent-border:var(--gh-ref-color-lime-ink-a40);
  --gh-color-accent-on:var(--gh-ref-color-neutral-950);
  --gh-color-ai-default:var(--gh-ref-color-violet-600);
  --gh-color-ai-soft:var(--gh-ref-color-violet-a10);
  --gh-color-ai-border:var(--gh-ref-color-violet-a34);
  --gh-color-status-success:var(--gh-ref-color-green-700);
  --gh-color-status-success-soft:var(--gh-ref-color-green-a10);
  --gh-color-status-warning:var(--gh-ref-color-amber-700);
  --gh-color-status-warning-soft:var(--gh-ref-color-amber-a14);
  --gh-color-status-danger:var(--gh-ref-color-red-700);
  --gh-color-status-danger-soft:var(--gh-ref-color-red-a10);
  --gh-color-status-info:var(--gh-ref-color-blue-700);
  --gh-color-status-info-soft:var(--gh-ref-color-blue-a10);
  --gh-color-status-success-border:var(--gh-ref-color-green-a30);
  --gh-color-status-warning-border:var(--gh-ref-color-amber-a34-ink);
  --gh-color-status-danger-hover:var(--gh-ref-color-red-600);
  --gh-color-status-danger-border:var(--gh-ref-color-red-a30);
  --gh-color-status-info-border:var(--gh-ref-color-blue-a30);
  --gh-color-status-on-solid:var(--gh-ref-color-paper-0);
  --gh-color-feedback-pin:var(--gh-ref-color-red-500);
  --gh-color-feedback-on-pin:var(--gh-ref-color-neutral-950);
  --gh-color-feedback-pin-resolved:var(--gh-ref-color-ink-400);
  --gh-color-focus-ring:var(--gh-ref-color-lime-750);
  --gh-color-focus-field:transparent; /* Light fields: no hard ring — the accent border is the focus signal, plus a soft halo (owner 1405-09-12: the double dark ring was too heavy). */
  --gh-color-focus-field-halo:var(--gh-ref-color-alpha-lime-24);
  --gh-color-selection-bg:var(--gh-ref-color-lime-400);
  --gh-color-selection-text:var(--gh-ref-color-neutral-950);
  --gh-color-scrollbar-thumb:var(--gh-ref-color-alpha-ink-24);
  --gh-color-scrollbar-track:transparent;
  --gh-color-data-you:var(--gh-ref-color-lime-650);
  --gh-color-data-compare:var(--gh-ref-color-ink-500);
  --gh-color-data-goal:var(--gh-ref-color-ink-900);
  --gh-color-data-grid:var(--gh-ref-color-alpha-ink-10);
  --gh-color-data-heat-0:var(--gh-ref-color-paper-100);
  --gh-color-data-heat-1:var(--gh-ref-color-lime-150);
  --gh-color-data-heat-2:var(--gh-ref-color-lime-250);
  --gh-color-data-heat-3:var(--gh-ref-color-lime-500);
  --gh-color-data-heat-4:var(--gh-ref-color-lime-650);
  --gh-color-data-mark:var(--gh-ref-color-ink-300);
  --gh-color-data-mark-strong:var(--gh-ref-color-ink-500);
  --gh-color-data-track:var(--gh-ref-color-paper-150);
  --gh-color-media-scrim:var(--gh-ref-color-alpha-black-88);
  --gh-color-media-text:var(--gh-ref-color-neutral-50);
  --gh-shadow-overlay-sm:0 12px 32px var(--gh-ref-color-shadow-ink-12), 0 1px 3px var(--gh-ref-color-shadow-ink-06);
  --gh-shadow-overlay-lg:0 28px 64px var(--gh-ref-color-shadow-ink-18), 0 2px 8px var(--gh-ref-color-shadow-ink-06);
}
}

:root[data-theme="light"][data-contrast="high"]{
  --gh-color-bg-canvas:var(--gh-ref-color-paper-0);
  --gh-color-surface-1:var(--gh-ref-color-paper-0);
  --gh-color-surface-2:var(--gh-ref-color-paper-50);
  --gh-color-surface-3:var(--gh-ref-color-paper-100);
  --gh-color-border-subtle:var(--gh-ref-color-alpha-ink-24);
  --gh-color-border-default:var(--gh-ref-color-alpha-ink-36);
  --gh-color-border-strong:var(--gh-ref-color-alpha-ink-48);
  --gh-color-text-primary:var(--gh-ref-color-ink-950);
  --gh-color-text-secondary:var(--gh-ref-color-ink-800);
  --gh-color-text-tertiary:var(--gh-ref-color-ink-700);
  --gh-color-accent-ink:var(--gh-ref-color-lime-750);
  --gh-color-focus-field:var(--gh-ref-color-lime-750);
  --gh-color-focus-field-halo:transparent;
}

@media (prefers-color-scheme:light){
:root:not([data-theme])[data-contrast="high"]{
  --gh-color-bg-canvas:var(--gh-ref-color-paper-0);
  --gh-color-surface-1:var(--gh-ref-color-paper-0);
  --gh-color-surface-2:var(--gh-ref-color-paper-50);
  --gh-color-surface-3:var(--gh-ref-color-paper-100);
  --gh-color-border-subtle:var(--gh-ref-color-alpha-ink-24);
  --gh-color-border-default:var(--gh-ref-color-alpha-ink-36);
  --gh-color-border-strong:var(--gh-ref-color-alpha-ink-48);
  --gh-color-text-primary:var(--gh-ref-color-ink-950);
  --gh-color-text-secondary:var(--gh-ref-color-ink-800);
  --gh-color-text-tertiary:var(--gh-ref-color-ink-700);
  --gh-color-accent-ink:var(--gh-ref-color-lime-750);
  --gh-color-focus-field:var(--gh-ref-color-lime-750);
  --gh-color-focus-field-halo:transparent;
}
}

/* ---- dark islands (media canvases; light.tokens.json $extensions.gh.islands) ---- */

:where(:root[data-theme="light"]) :is(.gh-player, .gh-modal__body--media, .gh-canvas__stage, .gh-compare, .gh-story:not(.gh-story--accent), .gh-media-trigger, .gh-artwork, .gh-m-cam, .gh-m-wall, .gh-m-zoom, .gh-dark-island), [data-theme="dark"]:not(:root){
  color-scheme:dark;
  --gh-color-bg-canvas:var(--gh-ref-color-neutral-950); /* Page background */
  --gh-color-bg-header:var(--gh-ref-color-alpha-black-88); /* Sticky bars, used with backdrop blur */
  --gh-color-bg-scrim:var(--gh-ref-color-alpha-black-72); /* Behind modals, sheets, command palette */
  --gh-color-surface-1:var(--gh-ref-color-neutral-850); /* Tile / card */
  --gh-color-surface-2:var(--gh-ref-color-neutral-800); /* Raised tile, inner panel, input, popover */
  --gh-color-surface-3:var(--gh-ref-color-neutral-750); /* Hover, selected row, icon chip */
  --gh-color-surface-4:var(--gh-ref-color-neutral-700); /* Pressed, track of progress */
  --gh-color-surface-inverse:var(--gh-ref-color-neutral-50); /* Tooltip, toast, selected chip */
  --gh-color-surface-media:var(--gh-ref-color-neutral-1000); /* Video / artwork canvas (always dark, colour-accurate) */
  --gh-color-surface-paper:var(--gh-ref-color-neutral-50); /* Always-light plate, same in both themes: the printed page / specimen in tool previews, third-party brand marks */
  --gh-color-border-subtle:var(--gh-ref-color-alpha-white-8);
  --gh-color-border-default:var(--gh-ref-color-alpha-white-13);
  --gh-color-border-strong:var(--gh-ref-color-alpha-white-22);
  --gh-color-text-primary:var(--gh-ref-color-neutral-50);
  --gh-color-text-secondary:var(--gh-ref-color-neutral-300);
  --gh-color-text-tertiary:var(--gh-ref-color-neutral-400); /* Meta, captions. Min. 4.5:1 on surface-1. */
  --gh-color-text-disabled:var(--gh-ref-color-neutral-500);
  --gh-color-text-inverse:var(--gh-ref-color-neutral-950); /* On inverse surfaces */
  --gh-color-text-on-paper:var(--gh-ref-color-neutral-950); /* Ink on surface-paper (both themes) */
  --gh-color-accent-default:var(--gh-ref-color-lime-dark); /* Primary action, focus, progress, 'you' in charts. ONE accent. */
  --gh-color-accent-ink:var(--gh-ref-color-lime-dark); /* Accent as text, link, icon, line or border on a surface (dark: the lime itself; light: a deep olive that passes 4.5:1). Fills stay accent-default with accent-on text. */
  --gh-color-accent-hover:var(--gh-ref-color-lime-dark-hover);
  --gh-color-accent-soft:var(--gh-ref-color-lime-dark-a12);
  --gh-color-accent-border:var(--gh-ref-color-lime-dark-a34);
  --gh-color-accent-on:var(--gh-ref-color-neutral-950); /* Text/icons on accent — always ink, never white */
  --gh-color-ai-default:var(--gh-ref-color-violet-300); /* Assistant «دستیار قلم» only (shared with Course Studio) */
  --gh-color-ai-soft:var(--gh-ref-color-violet-a14);
  --gh-color-ai-border:var(--gh-ref-color-violet-a40);
  --gh-color-status-success:var(--gh-ref-color-green-400);
  --gh-color-status-success-soft:var(--gh-ref-color-green-a12);
  --gh-color-status-warning:var(--gh-ref-color-amber-400);
  --gh-color-status-warning-soft:var(--gh-ref-color-amber-a12);
  --gh-color-status-danger:var(--gh-ref-color-red-400);
  --gh-color-status-danger-soft:var(--gh-ref-color-red-a12);
  --gh-color-status-info:var(--gh-ref-color-blue-400);
  --gh-color-status-info-soft:var(--gh-ref-color-blue-a12);
  --gh-color-status-success-border:var(--gh-ref-color-green-a34);
  --gh-color-status-warning-border:var(--gh-ref-color-amber-a34);
  --gh-color-status-danger-hover:var(--gh-ref-color-red-300); /* Hover of destructive buttons */
  --gh-color-status-danger-border:var(--gh-ref-color-red-a34);
  --gh-color-status-info-border:var(--gh-ref-color-blue-a34);
  --gh-color-status-on-solid:var(--gh-ref-color-neutral-950); /* Text/icons on a solid status fill (danger-solid button, swipe action) */
  --gh-color-feedback-pin:var(--gh-ref-color-red-500); /* Instructor markup on artwork */
  --gh-color-feedback-on-pin:var(--gh-ref-color-neutral-950);
  --gh-color-feedback-pin-resolved:var(--gh-ref-color-neutral-500); /* Resolved instructor pin */
  --gh-color-focus-ring:var(--gh-ref-color-lime-dark);
  --gh-color-focus-field:var(--gh-ref-color-lime-dark); /* Focus ring of text fields (input, input group, search). Dark: same as the global ring. */
  --gh-color-focus-field-halo:transparent; /* Soft halo glued to a focused field's border (box-shadow). None in dark. */
  --gh-color-data-you:var(--gh-ref-color-lime-dark); /* The student / current period */
  --gh-color-data-compare:var(--gh-ref-color-neutral-400); /* Previous period, cohort average — neutral, drawn as ticks/dashes */
  --gh-color-data-goal:var(--gh-ref-color-neutral-50); /* Goal lines (dashed) */
  --gh-color-data-grid:var(--gh-ref-color-alpha-white-8);
  --gh-color-data-heat-0:var(--gh-ref-color-neutral-800);
  --gh-color-data-heat-1:var(--gh-ref-color-lime-900);
  --gh-color-data-heat-2:var(--gh-ref-color-lime-800);
  --gh-color-data-heat-3:var(--gh-ref-color-lime-600);
  --gh-color-data-heat-4:var(--gh-ref-color-lime-dark);
  --gh-color-data-mark:var(--gh-ref-color-neutral-500); /* Default (not-highlighted) data mark */
  --gh-color-data-mark-strong:var(--gh-ref-color-neutral-400); /* Emphasised neutral mark */
  --gh-color-data-track:var(--gh-ref-color-neutral-750); /* Empty track behind bars/progress */
  --gh-color-media-scrim:var(--gh-ref-color-alpha-black-88); /* Controls/captions over video and artwork */
  --gh-color-media-text:var(--gh-ref-color-neutral-50); /* Text/icons over video and artwork (always light, both themes) */
  --gh-color-selection-bg:var(--gh-ref-color-lime-dark); /* ::selection background */
  --gh-color-selection-text:var(--gh-ref-color-neutral-950);
  --gh-color-scrollbar-thumb:var(--gh-ref-color-alpha-white-22);
  --gh-color-scrollbar-track:transparent;
  --gh-color-avatar-tone-1-bg:var(--gh-ref-color-violet-600);
  --gh-color-avatar-tone-1-fg:var(--gh-ref-color-lime-300);
  --gh-color-avatar-tone-2-bg:var(--gh-ref-color-blue-700);
  --gh-color-avatar-tone-2-fg:var(--gh-ref-color-amber-400);
  --gh-color-avatar-tone-3-bg:var(--gh-ref-color-green-700);
  --gh-color-avatar-tone-3-fg:var(--gh-ref-color-red-300);
  --gh-color-avatar-tone-4-bg:var(--gh-ref-color-red-700);
  --gh-color-avatar-tone-4-fg:var(--gh-ref-color-amber-400);
  --gh-color-avatar-tone-5-bg:var(--gh-ref-color-lime-750);
  --gh-color-avatar-tone-5-fg:var(--gh-ref-color-lime-200);
  --gh-color-avatar-tone-6-bg:var(--gh-ref-color-amber-700);
  --gh-color-avatar-tone-6-fg:var(--gh-ref-color-amber-400);
  --gh-color-avatar-tone-7-bg:var(--gh-ref-color-violet-600);
  --gh-color-avatar-tone-7-fg:var(--gh-ref-color-red-300);
  --gh-color-avatar-tone-8-bg:var(--gh-ref-color-blue-700);
  --gh-color-avatar-tone-8-fg:var(--gh-ref-color-blue-400);
  --gh-shadow-overlay-sm:0 24px 48px var(--gh-ref-color-alpha-black-45); /* Popover, menu. Shadows only for floating layers — never decoration. */
  --gh-shadow-overlay-lg:0 40px 80px var(--gh-ref-color-alpha-black-55); /* Modal, command palette */
}
:where(:root[data-theme="light"]) :is(.gh-player, .gh-modal__body--media, .gh-canvas__stage, .gh-compare, .gh-story:not(.gh-story--accent), .gh-media-trigger, .gh-artwork, .gh-m-cam, .gh-m-wall, .gh-m-zoom, .gh-dark-island), [data-theme="dark"]:not(:root){
  --gh-input-bg:var(--gh-color-surface-2);
}

@media (prefers-color-scheme:light){
:where(:root:not([data-theme])) :is(.gh-player, .gh-modal__body--media, .gh-canvas__stage, .gh-compare, .gh-story:not(.gh-story--accent), .gh-media-trigger, .gh-artwork, .gh-m-cam, .gh-m-wall, .gh-m-zoom, .gh-dark-island){
  color-scheme:dark;
  --gh-color-bg-canvas:var(--gh-ref-color-neutral-950); /* Page background */
  --gh-color-bg-header:var(--gh-ref-color-alpha-black-88); /* Sticky bars, used with backdrop blur */
  --gh-color-bg-scrim:var(--gh-ref-color-alpha-black-72); /* Behind modals, sheets, command palette */
  --gh-color-surface-1:var(--gh-ref-color-neutral-850); /* Tile / card */
  --gh-color-surface-2:var(--gh-ref-color-neutral-800); /* Raised tile, inner panel, input, popover */
  --gh-color-surface-3:var(--gh-ref-color-neutral-750); /* Hover, selected row, icon chip */
  --gh-color-surface-4:var(--gh-ref-color-neutral-700); /* Pressed, track of progress */
  --gh-color-surface-inverse:var(--gh-ref-color-neutral-50); /* Tooltip, toast, selected chip */
  --gh-color-surface-media:var(--gh-ref-color-neutral-1000); /* Video / artwork canvas (always dark, colour-accurate) */
  --gh-color-surface-paper:var(--gh-ref-color-neutral-50); /* Always-light plate, same in both themes: the printed page / specimen in tool previews, third-party brand marks */
  --gh-color-border-subtle:var(--gh-ref-color-alpha-white-8);
  --gh-color-border-default:var(--gh-ref-color-alpha-white-13);
  --gh-color-border-strong:var(--gh-ref-color-alpha-white-22);
  --gh-color-text-primary:var(--gh-ref-color-neutral-50);
  --gh-color-text-secondary:var(--gh-ref-color-neutral-300);
  --gh-color-text-tertiary:var(--gh-ref-color-neutral-400); /* Meta, captions. Min. 4.5:1 on surface-1. */
  --gh-color-text-disabled:var(--gh-ref-color-neutral-500);
  --gh-color-text-inverse:var(--gh-ref-color-neutral-950); /* On inverse surfaces */
  --gh-color-text-on-paper:var(--gh-ref-color-neutral-950); /* Ink on surface-paper (both themes) */
  --gh-color-accent-default:var(--gh-ref-color-lime-dark); /* Primary action, focus, progress, 'you' in charts. ONE accent. */
  --gh-color-accent-ink:var(--gh-ref-color-lime-dark); /* Accent as text, link, icon, line or border on a surface (dark: the lime itself; light: a deep olive that passes 4.5:1). Fills stay accent-default with accent-on text. */
  --gh-color-accent-hover:var(--gh-ref-color-lime-dark-hover);
  --gh-color-accent-soft:var(--gh-ref-color-lime-dark-a12);
  --gh-color-accent-border:var(--gh-ref-color-lime-dark-a34);
  --gh-color-accent-on:var(--gh-ref-color-neutral-950); /* Text/icons on accent — always ink, never white */
  --gh-color-ai-default:var(--gh-ref-color-violet-300); /* Assistant «دستیار قلم» only (shared with Course Studio) */
  --gh-color-ai-soft:var(--gh-ref-color-violet-a14);
  --gh-color-ai-border:var(--gh-ref-color-violet-a40);
  --gh-color-status-success:var(--gh-ref-color-green-400);
  --gh-color-status-success-soft:var(--gh-ref-color-green-a12);
  --gh-color-status-warning:var(--gh-ref-color-amber-400);
  --gh-color-status-warning-soft:var(--gh-ref-color-amber-a12);
  --gh-color-status-danger:var(--gh-ref-color-red-400);
  --gh-color-status-danger-soft:var(--gh-ref-color-red-a12);
  --gh-color-status-info:var(--gh-ref-color-blue-400);
  --gh-color-status-info-soft:var(--gh-ref-color-blue-a12);
  --gh-color-status-success-border:var(--gh-ref-color-green-a34);
  --gh-color-status-warning-border:var(--gh-ref-color-amber-a34);
  --gh-color-status-danger-hover:var(--gh-ref-color-red-300); /* Hover of destructive buttons */
  --gh-color-status-danger-border:var(--gh-ref-color-red-a34);
  --gh-color-status-info-border:var(--gh-ref-color-blue-a34);
  --gh-color-status-on-solid:var(--gh-ref-color-neutral-950); /* Text/icons on a solid status fill (danger-solid button, swipe action) */
  --gh-color-feedback-pin:var(--gh-ref-color-red-500); /* Instructor markup on artwork */
  --gh-color-feedback-on-pin:var(--gh-ref-color-neutral-950);
  --gh-color-feedback-pin-resolved:var(--gh-ref-color-neutral-500); /* Resolved instructor pin */
  --gh-color-focus-ring:var(--gh-ref-color-lime-dark);
  --gh-color-focus-field:var(--gh-ref-color-lime-dark); /* Focus ring of text fields (input, input group, search). Dark: same as the global ring. */
  --gh-color-focus-field-halo:transparent; /* Soft halo glued to a focused field's border (box-shadow). None in dark. */
  --gh-color-data-you:var(--gh-ref-color-lime-dark); /* The student / current period */
  --gh-color-data-compare:var(--gh-ref-color-neutral-400); /* Previous period, cohort average — neutral, drawn as ticks/dashes */
  --gh-color-data-goal:var(--gh-ref-color-neutral-50); /* Goal lines (dashed) */
  --gh-color-data-grid:var(--gh-ref-color-alpha-white-8);
  --gh-color-data-heat-0:var(--gh-ref-color-neutral-800);
  --gh-color-data-heat-1:var(--gh-ref-color-lime-900);
  --gh-color-data-heat-2:var(--gh-ref-color-lime-800);
  --gh-color-data-heat-3:var(--gh-ref-color-lime-600);
  --gh-color-data-heat-4:var(--gh-ref-color-lime-dark);
  --gh-color-data-mark:var(--gh-ref-color-neutral-500); /* Default (not-highlighted) data mark */
  --gh-color-data-mark-strong:var(--gh-ref-color-neutral-400); /* Emphasised neutral mark */
  --gh-color-data-track:var(--gh-ref-color-neutral-750); /* Empty track behind bars/progress */
  --gh-color-media-scrim:var(--gh-ref-color-alpha-black-88); /* Controls/captions over video and artwork */
  --gh-color-media-text:var(--gh-ref-color-neutral-50); /* Text/icons over video and artwork (always light, both themes) */
  --gh-color-selection-bg:var(--gh-ref-color-lime-dark); /* ::selection background */
  --gh-color-selection-text:var(--gh-ref-color-neutral-950);
  --gh-color-scrollbar-thumb:var(--gh-ref-color-alpha-white-22);
  --gh-color-scrollbar-track:transparent;
  --gh-color-avatar-tone-1-bg:var(--gh-ref-color-violet-600);
  --gh-color-avatar-tone-1-fg:var(--gh-ref-color-lime-300);
  --gh-color-avatar-tone-2-bg:var(--gh-ref-color-blue-700);
  --gh-color-avatar-tone-2-fg:var(--gh-ref-color-amber-400);
  --gh-color-avatar-tone-3-bg:var(--gh-ref-color-green-700);
  --gh-color-avatar-tone-3-fg:var(--gh-ref-color-red-300);
  --gh-color-avatar-tone-4-bg:var(--gh-ref-color-red-700);
  --gh-color-avatar-tone-4-fg:var(--gh-ref-color-amber-400);
  --gh-color-avatar-tone-5-bg:var(--gh-ref-color-lime-750);
  --gh-color-avatar-tone-5-fg:var(--gh-ref-color-lime-200);
  --gh-color-avatar-tone-6-bg:var(--gh-ref-color-amber-700);
  --gh-color-avatar-tone-6-fg:var(--gh-ref-color-amber-400);
  --gh-color-avatar-tone-7-bg:var(--gh-ref-color-violet-600);
  --gh-color-avatar-tone-7-fg:var(--gh-ref-color-red-300);
  --gh-color-avatar-tone-8-bg:var(--gh-ref-color-blue-700);
  --gh-color-avatar-tone-8-fg:var(--gh-ref-color-blue-400);
  --gh-shadow-overlay-sm:0 24px 48px var(--gh-ref-color-alpha-black-45); /* Popover, menu. Shadows only for floating layers — never decoration. */
  --gh-shadow-overlay-lg:0 40px 80px var(--gh-ref-color-alpha-black-55); /* Modal, command palette */
}
:where(:root:not([data-theme])) :is(.gh-player, .gh-modal__body--media, .gh-canvas__stage, .gh-compare, .gh-story:not(.gh-story--accent), .gh-media-trigger, .gh-artwork, .gh-m-cam, .gh-m-wall, .gh-m-zoom, .gh-dark-island){
  --gh-input-bg:var(--gh-color-surface-2);
}
}

:where(:root[data-theme="light"]) :where(.gh-player, .gh-modal__body--media, .gh-canvas__stage, .gh-compare, .gh-story:not(.gh-story--accent), .gh-media-trigger, .gh-artwork, .gh-m-cam, .gh-m-wall, .gh-m-zoom, .gh-dark-island), :where([data-theme="dark"]:not(:root)), :where([data-theme="light"]:not(:root)){color:var(--gh-color-text-primary)}

@media (prefers-color-scheme:light){:where(:root:not([data-theme])) :where(.gh-player, .gh-modal__body--media, .gh-canvas__stage, .gh-compare, .gh-story:not(.gh-story--accent), .gh-media-trigger, .gh-artwork, .gh-m-cam, .gh-m-wall, .gh-m-zoom, .gh-dark-island){color:var(--gh-color-text-primary)}}

[data-theme="light"]:not(:root){
  color-scheme:light;
  --gh-color-bg-canvas:var(--gh-ref-color-paper-75);
  --gh-color-bg-header:var(--gh-ref-color-alpha-ink-header);
  --gh-color-bg-scrim:var(--gh-ref-color-alpha-ink-scrim);
  --gh-color-surface-1:var(--gh-ref-color-paper-25);
  --gh-color-surface-2:var(--gh-ref-color-paper-50);
  --gh-color-surface-3:var(--gh-ref-color-paper-100);
  --gh-color-surface-4:var(--gh-ref-color-paper-150);
  --gh-color-surface-inverse:var(--gh-ref-color-ink-800);
  --gh-color-surface-media:var(--gh-ref-color-neutral-1000); /* Media canvas stays dark in the light theme */
  --gh-color-border-subtle:var(--gh-ref-color-alpha-ink-8);
  --gh-color-border-default:var(--gh-ref-color-alpha-ink-14);
  --gh-color-border-strong:var(--gh-ref-color-alpha-ink-24);
  --gh-color-text-primary:var(--gh-ref-color-ink-900);
  --gh-color-text-secondary:var(--gh-ref-color-ink-700);
  --gh-color-text-tertiary:var(--gh-ref-color-ink-600);
  --gh-color-text-disabled:var(--gh-ref-color-ink-400);
  --gh-color-text-inverse:var(--gh-ref-color-paper-50);
  --gh-color-accent-default:var(--gh-ref-color-lime-400); /* Lime stays the fill (buttons, badges, selection) with ink text on it */
  --gh-color-accent-ink:var(--gh-ref-color-lime-750);
  --gh-color-accent-hover:var(--gh-ref-color-lime-350);
  --gh-color-accent-soft:var(--gh-ref-color-lime-a18);
  --gh-color-accent-border:var(--gh-ref-color-lime-ink-a40);
  --gh-color-accent-on:var(--gh-ref-color-neutral-950);
  --gh-color-ai-default:var(--gh-ref-color-violet-600);
  --gh-color-ai-soft:var(--gh-ref-color-violet-a10);
  --gh-color-ai-border:var(--gh-ref-color-violet-a34);
  --gh-color-status-success:var(--gh-ref-color-green-700);
  --gh-color-status-success-soft:var(--gh-ref-color-green-a10);
  --gh-color-status-warning:var(--gh-ref-color-amber-700);
  --gh-color-status-warning-soft:var(--gh-ref-color-amber-a14);
  --gh-color-status-danger:var(--gh-ref-color-red-700);
  --gh-color-status-danger-soft:var(--gh-ref-color-red-a10);
  --gh-color-status-info:var(--gh-ref-color-blue-700);
  --gh-color-status-info-soft:var(--gh-ref-color-blue-a10);
  --gh-color-status-success-border:var(--gh-ref-color-green-a30);
  --gh-color-status-warning-border:var(--gh-ref-color-amber-a34-ink);
  --gh-color-status-danger-hover:var(--gh-ref-color-red-600);
  --gh-color-status-danger-border:var(--gh-ref-color-red-a30);
  --gh-color-status-info-border:var(--gh-ref-color-blue-a30);
  --gh-color-status-on-solid:var(--gh-ref-color-paper-0);
  --gh-color-feedback-pin:var(--gh-ref-color-red-500);
  --gh-color-feedback-on-pin:var(--gh-ref-color-neutral-950);
  --gh-color-feedback-pin-resolved:var(--gh-ref-color-ink-400);
  --gh-color-focus-ring:var(--gh-ref-color-lime-750);
  --gh-color-focus-field:transparent; /* Light fields: no hard ring — the accent border is the focus signal, plus a soft halo (owner 1405-09-12: the double dark ring was too heavy). */
  --gh-color-focus-field-halo:var(--gh-ref-color-alpha-lime-24);
  --gh-color-selection-bg:var(--gh-ref-color-lime-400);
  --gh-color-selection-text:var(--gh-ref-color-neutral-950);
  --gh-color-scrollbar-thumb:var(--gh-ref-color-alpha-ink-24);
  --gh-color-scrollbar-track:transparent;
  --gh-color-data-you:var(--gh-ref-color-lime-650);
  --gh-color-data-compare:var(--gh-ref-color-ink-500);
  --gh-color-data-goal:var(--gh-ref-color-ink-900);
  --gh-color-data-grid:var(--gh-ref-color-alpha-ink-10);
  --gh-color-data-heat-0:var(--gh-ref-color-paper-100);
  --gh-color-data-heat-1:var(--gh-ref-color-lime-150);
  --gh-color-data-heat-2:var(--gh-ref-color-lime-250);
  --gh-color-data-heat-3:var(--gh-ref-color-lime-500);
  --gh-color-data-heat-4:var(--gh-ref-color-lime-650);
  --gh-color-data-mark:var(--gh-ref-color-ink-300);
  --gh-color-data-mark-strong:var(--gh-ref-color-ink-500);
  --gh-color-data-track:var(--gh-ref-color-paper-150);
  --gh-color-media-scrim:var(--gh-ref-color-alpha-black-88);
  --gh-color-media-text:var(--gh-ref-color-neutral-50);
  --gh-shadow-overlay-sm:0 12px 32px var(--gh-ref-color-shadow-ink-12), 0 1px 3px var(--gh-ref-color-shadow-ink-06);
  --gh-shadow-overlay-lg:0 28px 64px var(--gh-ref-color-shadow-ink-18), 0 2px 8px var(--gh-ref-color-shadow-ink-06);
}
[data-theme="light"]:not(:root){
  --gh-input-bg:var(--gh-color-surface-2);
}

/* type styles */
.gh-type-display-xl{font-size:var(--gh-type-display-xl-size);font-weight:var(--gh-type-display-xl-weight);line-height:var(--gh-type-display-xl-line-height)}
.gh-type-display-lg{font-size:var(--gh-type-display-lg-size);font-weight:var(--gh-type-display-lg-weight);line-height:var(--gh-type-display-lg-line-height)}
.gh-type-display{font-size:var(--gh-type-display-size);font-weight:var(--gh-type-display-weight);line-height:var(--gh-type-display-line-height)}
.gh-type-heading-1{font-size:var(--gh-type-heading-1-size);font-weight:var(--gh-type-heading-1-weight);line-height:var(--gh-type-heading-1-line-height)}
.gh-type-heading-2{font-size:var(--gh-type-heading-2-size);font-weight:var(--gh-type-heading-2-weight);line-height:var(--gh-type-heading-2-line-height)}
.gh-type-heading-3{font-size:var(--gh-type-heading-3-size);font-weight:var(--gh-type-heading-3-weight);line-height:var(--gh-type-heading-3-line-height)}
.gh-type-heading-4{font-size:var(--gh-type-heading-4-size);font-weight:var(--gh-type-heading-4-weight);line-height:var(--gh-type-heading-4-line-height)}
.gh-type-body-lg{font-size:var(--gh-type-body-lg-size);font-weight:var(--gh-type-body-lg-weight);line-height:var(--gh-type-body-lg-line-height)}
.gh-type-body{font-size:var(--gh-type-body-size);font-weight:var(--gh-type-body-weight);line-height:var(--gh-type-body-line-height)}
.gh-type-body-sm{font-size:var(--gh-type-body-sm-size);font-weight:var(--gh-type-body-sm-weight);line-height:var(--gh-type-body-sm-line-height)}
.gh-type-label{font-size:var(--gh-type-label-size);font-weight:var(--gh-type-label-weight);line-height:var(--gh-type-label-line-height)}
.gh-type-label-sm{font-size:var(--gh-type-label-sm-size);font-weight:var(--gh-type-label-sm-weight);line-height:var(--gh-type-label-sm-line-height)}
.gh-type-caption{font-size:var(--gh-type-caption-size);font-weight:var(--gh-type-caption-weight);line-height:var(--gh-type-caption-line-height)}
.gh-type-figure-xl{font-size:var(--gh-type-figure-xl-size);font-weight:var(--gh-type-figure-xl-weight);line-height:var(--gh-type-figure-xl-line-height)}
.gh-type-figure-lg{font-size:var(--gh-type-figure-lg-size);font-weight:var(--gh-type-figure-lg-weight);line-height:var(--gh-type-figure-lg-line-height)}
.gh-type-figure-md{font-size:var(--gh-type-figure-md-size);font-weight:var(--gh-type-figure-md-weight);line-height:var(--gh-type-figure-md-line-height)}
