/*
 * Design tokens — ported from the Imagine Academy theme (C:/xampp/htdocs/imagine/wp-content/themes/imagine,
 * src/input.css + the resolved theme layer of assets/css/output.css). Imagine is Tailwind with a build step; this theme
 * has none, so Imagine's COMPUTED values live here as custom properties and main.css reads only these.
 *
 * Themes: dark is the default (Imagine: data-theme is "dark" unless the visitor saved "light"). The dark values sit on
 * :root and [data-theme="dark"], the light values on [data-theme="light"]; both attributes also work on any subtree
 * (the player is always data-theme="dark"; the style guide shows every component in both). Components never contain a
 * colour or a theme condition.
 *
 * Every departure from an Imagine value is marked where it is defined, with the measured contrast that forced it.
 * The one sanctioned literal elsewhere is the @media breakpoint (Imagine/Tailwind: 40em, 48em, 64em, 80em).
 */

/* Fonts: Imagine loads Cairo + Inter (400–800) from Google Fonts; here they are self-hosted variable-font subsets
   (OFL 1.1, assets/fonts/LICENSES.txt). Cairo carries Arabic and Latin, so an Arabic page never switches family. */
@font-face {
	font-family: "Cairo";
	src: url("../fonts/cairo-arabic.woff2") format("woff2");
	font-weight: 400 800;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
	font-family: "Cairo";
	src: url("../fonts/cairo-latin-ext.woff2") format("woff2");
	font-weight: 400 800;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Cairo";
	src: url("../fonts/cairo-latin.woff2") format("woff2");
	font-weight: 400 800;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Inter";
	src: url("../fonts/inter-latin-ext.woff2") format("woff2");
	font-weight: 400 800;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Inter";
	src: url("../fonts/inter-latin.woff2") format("woff2");
	font-weight: 400 800;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	/* ================================================================ Imagine brand (theme-independent) */
	--blue-600: #2563eb;        /* Imagine --color-electric-blue */
	--blue-500: #3b82f6;        /* Imagine --color-bright-blue */
	--violet-600: #7c3aed;      /* Imagine --color-neon-purple */
	--violet-500: #8b5cf6;      /* Imagine --color-soft-violet */
	--green-500: #22c55e;       /* Imagine --color-success */
	--amber-500: #f59e0b;       /* Imagine --color-warning */
	--red-500: #ef4444;         /* Imagine --color-error */
	--cyan-500: #06b6d4;        /* Imagine --color-info */
	--white: #ffffff;
	--whatsapp: #128c7e;        /* WhatsApp's own teal: white icon 4.1:1 (their #25D366 green gives 2.0:1) */

	/* Imagine's --gradient-primary is 90deg #2563EB → #8B5CF6. White button text on #8B5CF6 is 4.23:1 (fails AA), so
	   the end stop is Imagine's own --color-neon-purple #7C3AED: 5.70:1. Same angle, same start, same hue family. */
	--gradient-primary: linear-gradient(90deg, var(--blue-600), var(--violet-600));
	--gradient-text: linear-gradient(90deg, #2563eb, #8b5cf6, #3b82f6, #2563eb);   /* hero sheen: large text, ≥ 3:1 */
	--gradient-avatar: linear-gradient(to bottom right, var(--blue-600), var(--violet-600));
	--gradient-divider: linear-gradient(90deg, transparent, rgb(37 99 235 / 0.4), transparent);

	/* Course thumbnails (generated SVG): one hue per CEFR level. White text ≥ 8.28:1 on every hue. */
	--level-a1: #1f3b6b;
	--level-a2: #4b2d6f;
	--level-b1: #7c3524;
	--level-b2: #6b4712;
	--level-c1: #155064;
	--level-c2: #2b2e35;
	--de-black: #000000;
	--de-red: #dd0000;
	--de-gold: #ffce00;
	--text-on-media: var(--white);
	--text-on-media-muted: rgb(255 255 255 / 0.72);
	--thumb-mark: rgb(255 255 255 / 0.07);
	--thumb-rung: rgb(255 255 255 / 0.22);
	--ring-on-media: 0 0 0 1px rgb(255 255 255 / 0.24);
	--player-bg: #050816;       /* the video letterbox: Imagine's dark page colour, in both themes */
	--overlay: rgb(0 0 0 / 0.6);          /* Imagine bg-black/60: the mobile menu overlay */
	--scrim-media: rgb(0 0 0 / 0.3);       /* Imagine bg-black/30: play overlay on the course thumbnail */
	--play-ring: rgb(255 255 255 / 0.2);   /* Imagine bg-[#FFFFFF]/20 + border /50 */
	--play-ring-edge: rgb(255 255 255 / 0.5);
	--play-ring-hover: rgb(255 255 255 / 0.3);   /* Imagine hover:bg-[#FFFFFF]/30 */
	/* Lesson player controls (always on the dark player surface). The scrim sits under the control row: white text on it
	   stays ≥ 6:1 even over a pure white frame. */
	--player-scrim: linear-gradient(to top, rgb(0 0 0 / 0.8), rgb(0 0 0 / 0.5) 50%, rgb(0 0 0 / 0));
	--player-track: rgb(255 255 255 / 0.24);
	--player-buffered: rgb(255 255 255 / 0.45);
	/* The moving watermark (P8-8): readable on a phone recording, light enough to watch through. Tune on a real phone. */
	--mark-opacity: 0.5;
	--mark-shadow: 0 0 2px rgb(0 0 0 / 0.9), 0 1px 1px rgb(0 0 0 / 0.6);

	/* ================================================================ type — Imagine: Cairo (RTL) / Inter (LTR) */
	--font-arabic: "Cairo", sans-serif;
	--font-latin: "Inter", sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, Consolas, monospace;

	--fs-2xs: 0.625rem;         /* 10px  badges on cards (Imagine text-[10px]) */
	--fs-xs: 0.75rem;           /* 12px  meta, badges, footer headings */
	--fs-sm: 0.875rem;          /* 14px  card text, labels, nav drawer */
	--fs-button: 0.9375rem;     /* 15px  buttons, nav links, inputs */
	--fs-base: 1rem;            /* 16px  body */
	--fs-article: 1.0625rem;    /* 17px  article body, article h4 */
	--fs-lg: 1.125rem;          /* 18px */
	--fs-xl: 1.25rem;           /* 20px  card headings, article h3 */
	--fs-2xl: 1.5rem;           /* 24px */
	--fs-article-h2: 1.625rem;  /* 26px */
	--fs-3xl: 1.875rem;         /* 30px  price, course h1 (phone) */
	--fs-4xl: 2.25rem;          /* 36px  course h1, page h1 */
	--fs-5xl: 3rem;             /* 48px  course h1 (desktop), page h1 (desktop) */
	--fs-section-title: clamp(1.75rem, 4vw, 2.5rem);
	--fs-section-subtitle: clamp(1rem, 2vw, 1.125rem);
	--fs-hero: clamp(1.25rem, 3vw, 2.25rem);

	--lh-none: 1;
	--lh-tight: 1.25;
	--lh-section-title: 1.2;
	--lh-heading: 1.3;
	--lh-snug: 1.375;
	--lh-hero: 1.5;
	--lh-relaxed: 1.625;
	--lh-body: 1.7;
	--lh-article: 1.85;
	--lh-xs: calc(1 / 0.75);
	--lh-sm: calc(1.25 / 0.875);
	--lh-base: 1.5;
	--lh-lg: calc(1.75 / 1.125);
	--lh-xl: calc(1.75 / 1.25);

	--fw-regular: 400;
	--fw-medium: 500;
	--fw-semibold: 600;
	--fw-bold: 700;
	--fw-extrabold: 800;

	--tracking-tight: -0.025em;
	--tracking-title: -0.02em;
	--tracking-wide: 0.025em;
	--tracking-wider: 0.05em;
	--tracking-widest: 0.1em;

	/* ================================================================ space — Tailwind's 4px base, the steps Imagine uses */
	--space-0-5: 0.125rem;
	--space-1: 0.25rem;
	--space-1-5: 0.375rem;
	--space-2: 0.5rem;
	--space-2-5: 0.625rem;
	--space-3: 0.75rem;
	--space-3-5: 0.875rem;
	--space-4: 1rem;
	--space-5: 1.25rem;
	--space-6: 1.5rem;
	--space-7: 1.75rem;
	--space-8: 2rem;
	--space-10: 2.5rem;
	--space-12: 3rem;
	--space-14: 3.5rem;
	--space-16: 4rem;
	--space-20: 5rem;
	--space-24: 6rem;
	--space-28: 7rem;
	--space-36: 9rem;

	/* ================================================================ layout */
	--container: 1200px;        /* Imagine .container-custom */
	--gutter: var(--space-6);   /* 24px at every width */
	--section-y: var(--space-20);   /* Imagine .section-wrapper: 80px */
	--header-h: var(--space-16);    /* 64px, 80px from 1024px */
	--header-top: var(--wp-admin--admin-bar--height, 0);
	--measure-xs: 20rem;
	--measure-sm: 24rem;
	--measure-md: 28rem;
	--measure-xl: 36rem;
	--measure-2xl: 42rem;
	--measure-3xl: 48rem;
	--measure-4xl: 56rem;
	--measure-5xl: 64rem;
	--drawer-w: 20rem;          /* Imagine w-80 max-w-[85vw] */
	--drawer-max: 85vw;
	--col-aside: 1fr;           /* the course sidebar is Imagine's lg:col-span-1 of 3 */
	--viewport-h: 100dvh;

	/* ================================================================ shape */
	--radius-xs: 0.25rem;       /* article inline code */
	--radius-sm: 0.375rem;
	--radius-md: 0.5rem;
	--radius-lg: 0.75rem;       /* inputs, theme toggle, pagination, share, outline button */
	--radius-xl: 1rem;          /* primary/secondary buttons, floating cards, icon tiles */
	--radius-2xl: 1.5rem;       /* cards, hero image, category cards */
	--radius-full: 9999px;      /* badges, filter tabs, tags, avatars */
	--border-width: 1px;
	--border-width-2: 2px;
	--border-width-3: 3px;

	/* ================================================================ component sizes (Imagine's Tailwind sizes) */
	--size-1: 0.25rem;
	--size-1-5: 0.375rem;
	--size-2: 0.5rem;
	--size-3: 0.75rem;
	--size-3-5: 0.875rem;
	--size-4: 1rem;
	--size-5: 1.25rem;
	--size-6: 1.5rem;
	--size-7: 1.75rem;
	--size-8: 2rem;
	--size-9: 2.25rem;
	--size-10: 2.5rem;
	--size-11: 2.75rem;         /* 44px: the player's touch targets */
	--size-12: 3rem;
	--size-14: 3.5rem;
	--size-16: 4rem;
	--size-bar-w: 4rem;         /* section-title gradient bar: w-16 h-1 */
	--size-bar-w-sm: 3rem;      /* w-12 */
	--size-dot: 0.5rem;         /* carousel dot */
	--size-dot-active: 1.625rem;
	--size-progress: 0.5rem;
	--size-target: 1.5rem;
	--ratio-video: 16 / 9;
	--ratio-card: 3 / 2;        /* Imagine course card thumbnail: aspect-3/2 */
	--ratio-hero: 4 / 3;        /* Imagine hero placeholder: aspect-[4/3] */
	--ratio-portrait: 4 / 5;
	--ratio-square: 1 / 1;
	--clamp-2: 2;
	--clamp-3: 3;
	--safe-bottom: env(safe-area-inset-bottom, 0);
	--underline-offset: 3px;    /* Imagine .article-content a */

	/* ================================================================ motion — Imagine */
	--ease-tw: cubic-bezier(0.4, 0, 0.2, 1);   /* Tailwind default + ease-in-out */
	--ease: ease;
	--dur-none: 0.01ms;
	--dur-150: 150ms;
	--dur-200: 200ms;
	--dur-250: 250ms;
	--dur-300: 300ms;
	--dur-500: 500ms;
	--dur-600: 600ms;
	--dur-progress: 700ms;
	--stagger: 100ms;          /* Imagine transition-delay: i × 100ms */
	--stagger-2: 200ms;
	--stagger-3: 300ms;
	--dur-spin: 1s;
	--dur-float-a: 6s;
	--dur-float-b: 7.5s;
	--delay-float-b: 0.8s;
	--dur-drift-1: 16s;
	--dur-drift-2: 20s;
	--dur-sheen: 6s;
	--dur-shimmer: 3.5s;
	--dur-ring: 14s;
	--dur-scroll-dot: 1.8s;
	--dur-ping: 1s;
	--lift-1: -1px;             /* buttons, active filter tab */
	--lift-4: -4px;             /* cards */
	--lift-6: -0.375rem;        /* category cards (-translate-y-1.5) */
	--float-y: -14px;           /* hero floating cards */
	--reveal-y: 24px;           /* .scroll-animate */
	--grow: 1.1;                /* category icon on hover */
	--zoom: 1.05;               /* card image on hover */
	--press: 0.98;

	/* ================================================================ Imagine component dimensions */
	--fs-13: 0.8125rem;         /* tag links */
	--space-9: 2.25rem;         /* article heading/hr rhythm */
	--space-article-p: 1.4rem;  /* article paragraph gap */
	--size-20: 5rem;
	--size-32: 8rem;
	--size-40: 10rem;           /* hero top vignette */
	--size-80: 20rem;
	--size-96: 24rem;
	--hero-portrait-sm: 15rem;  /* the teacher's photo on a phone: the name stays above the fold at 360 × 640 */
	--hero-portrait-lg: 26rem;  /* the teacher's photo on a desktop */
	--tracking-code-input: 0.35em; /* the six-digit email code (Latin digits only — Arabic is never letter-spaced) */
	--poster-locked: 0.18;      /* a locked lesson's thumbnail, faint behind the lock panel (text stays AA) */
	--orb-1: 520px;
	--orb-2: 460px;
	--glow-w: 800px;
	--glow-h: 300px;
	--hero-grid-size: 56px;
	--blur-sm: 8px;
	--blur-glass: 12px;
	--blur-float: 14px;
	--blur-header: 16px;
	--blur-2xl: 40px;
	--blur-ring: 48px;
	--blur-3xl: 64px;
	--blur-orb: 120px;
	--hamburger-gap: 5px;
	--hamburger-shift: 7px;
	--fade-w: 1.5rem;           /* carousel edge fade: 24px on phones, 48px from 768px */
	--turn: 1turn;
	--turn-half: 0.5turn;
	--scale-0: 0;
	--fs-code: 0.875em;         /* Imagine .article-content code */
	--code-pad: 0.15em 0.45em;
	--shimmer: linear-gradient(110deg, transparent 35%, rgb(255 255 255 / 0.18) 50%, transparent 65%);
	--hero-ring: conic-gradient(from 0deg, rgb(37 99 235 / 0) 0%, rgb(37 99 235 / 0.35) 25%, rgb(124 58 237 / 0.35) 50%, rgb(59 130 246 / 0) 75%);
	--drift-x: 30px;            /* Imagine heroDrift */
	--drift-y: -40px;
	--drift-scale: 1.12;
	--scroll-dot-y: 14px;

	--z-raised: 1;
	--z-float: 20;
	--z-header: 50;
	--z-sticky: 55;
	--z-overlay: 60;
	--z-drawer: 70;
	--z-whatsapp: 80;
	--z-player-full: 90;        /* in-page full screen (iPhone): over the WhatsApp button, under the skip link */
	--z-skip: 100;
}

/* ================================================================================ theme: DARK (Imagine's default) */
:root,
[data-theme="dark"] {
	color-scheme: dark;
	--bg-page: #050816;                       /* bg-primary */
	--bg-surface: #0b1120;                    /* bg-elements */
	--bg-surface-raised: #0b1120;
	--bg-inset: #0b1120;                      /* alternating sections use bg-elements */
	--bg-muted: rgb(255 255 255 / 0.05);      /* white/5 */
	--bg-muted-strong: rgb(255 255 255 / 0.1);
	--glass-bg: rgb(11 17 32 / 0.7);
	--glass-float-bg: rgb(11 17 32 / 0.75);
	--glass-border: rgb(255 255 255 / 0.1);
	--header-scrolled-bg: rgb(5 8 22 / 0.92);
	--header-border: rgb(255 255 255 / 0.06);
	--text-primary: #ffffff;                  /* Imagine --color-white */
	--text-secondary: #cbd5e1;                /* soft-gray */
	--text-muted: #94a3b8;                    /* muted-gray */
	--text-subtle: #7c8ba1;                   /* Imagine dark-gray #64748B is 4.19:1 on the page → 5.76:1 */
	--border: rgb(255 255 255 / 0.06);
	--border-soft: rgb(255 255 255 / 0.08);
	--border-hover: rgb(59 130 246 / 0.3);
	--border-strong: rgb(255 255 255 / 0.2);
	--border-strong-hover: rgb(255 255 255 / 0.4);
	--border-input: #5b6780;                  /* Imagine white/10 is 1.29:1 — a field edge needs 3:1 → 3.31:1 */
	--accent: #2563eb;
	--accent-bright: #3b82f6;
	--accent-contrast: #ffffff;
	--link: #3b82f6;
	--link-hover: #a78bfa;                    /* Imagine soft-violet #8B5CF6 is 4.45:1 on cards → 6.92:1 */
	--tint-blue-bg: rgb(37 99 235 / 0.15);
	--tint-blue-border: rgb(37 99 235 / 0.3);
	--tint-blue-text: #60a5fa;                /* Imagine #3B82F6 on its tint: 4.50:1 → 6.51:1 */
	--tint-purple-bg: rgb(124 58 237 / 0.15);
	--tint-purple-border: rgb(124 58 237 / 0.3);
	--tint-purple-text: #a78bfa;              /* Imagine #8B5CF6 on its tint: 3.99:1 → 6.20:1 */
	--tint-green-bg: rgb(34 197 94 / 0.15);
	--tint-green-border: rgb(34 197 94 / 0.3);
	--tint-green-text: #22c55e;
	--tint-yellow-bg: rgb(245 158 11 / 0.15);
	--tint-yellow-border: rgb(245 158 11 / 0.3);
	--tint-yellow-text: #f59e0b;
	--success: #22c55e;
	--warning: #f59e0b;
	--danger: #f87171;                        /* Imagine #EF4444 is 5.00:1 on cards; lighter for small error text: 6.81:1 */
	--info: #06b6d4;
	--icon-tile-bg: rgb(37 99 235 / 0.1);
	--icon-tile-border: rgb(37 99 235 / 0.2);
	--icon-tile-fg: #3b82f6;
	--icon-tile-alt-bg: rgb(124 58 237 / 0.1);
	--icon-tile-alt-border: rgb(124 58 237 / 0.2);
	--icon-tile-alt-fg: #a78bfa;
	--category-tile-bg: linear-gradient(to bottom right, rgb(37 99 235 / 0.15), rgb(124 58 237 / 0.15));
	--focus-ring: #2563eb;                    /* 3.86:1 on the page */
	--shadow-focus: 0 0 0 3px rgb(37 99 235 / 0.15);
	--shadow-card: none;
	--shadow-card-hover: 0 20px 40px rgb(0 0 0 / 0.3);
	--shadow-float: 0 18px 45px rgb(0 0 0 / 0.45);
	--shadow-image: 0 25px 50px -12px rgb(0 0 0 / 0.25);
	--shadow-glow-blue: 0 0 30px rgb(37 99 235 / 0.35);
	--shadow-glow-purple: 0 0 30px rgb(124 58 237 / 0.35);
	--shadow-tab-active: 0 4px 14px rgb(37 99 235 / 0.35);
	--shadow-category-hover: 0 22px 45px -12px rgb(37 99 235 / 0.35);
	--ring-image: 0 0 0 1px rgb(255 255 255 / 0.1);
	--hero-grid-line: rgb(255 255 255 / 0.035);
	--orb-blue: rgb(37 99 235 / 0.2);
	--orb-purple: rgb(124 58 237 / 0.2);
	--glow-soft-blue: rgb(37 99 235 / 0.08);
	--glow-soft-purple: rgb(124 58 237 / 0.08);
	--bullet: #64748b;
	--progress-track: rgb(255 255 255 / 0.1);
	--hamburger: #ffffff;
	--sun-on: 0;                              /* Imagine shows the moon in dark mode */
	--moon-on: 1;
	/* component tints (Imagine's white/N utilities) */
	--toggle-bg: rgb(255 255 255 / 0.05);
	--toggle-border: rgb(255 255 255 / 0.1);
	--toggle-bg-hover: rgb(255 255 255 / 0.1);
	--toggle-border-hover: rgb(255 255 255 / 0.2);
	--filter-border: rgb(255 255 255 / 0.1);
	--filter-border-hover: rgb(37 99 235 / 0.4);
	--btn-secondary-hover-bg: rgb(255 255 255 / 0.08);
	--outline-hover-bg: rgb(37 99 235 / 0.1);
	--tabs-border: rgb(255 255 255 / 0.1);
	--pagination-border: rgb(255 255 255 / 0.08);
	--pagination-hover-bg: rgb(255 255 255 / 0.07);
	--pagination-hover-border: rgb(255 255 255 / 0.18);
	--tag-bg: rgb(255 255 255 / 0.04);
	--tag-border: rgb(255 255 255 / 0.08);
	--tag-hover-bg: rgb(37 99 235 / 0.1);
	--share-border: rgb(255 255 255 / 0.1);
	--share-hover-bg: rgb(255 255 255 / 0.05);
	--share-hover-border: rgb(255 255 255 / 0.2);
	--subtle-border: rgb(255 255 255 / 0.05);
	--drawer-border: rgb(255 255 255 / 0.1);
	--row-hover: rgb(255 255 255 / 0.03);
	--code-bg: rgb(37 99 235 / 0.12);
}

/* ================================================================================ theme: LIGHT (Imagine [data-theme="light"]) */
[data-theme="light"] {
	color-scheme: light;
	--bg-page: #eef2f7;
	--bg-surface: #ffffff;
	--bg-surface-raised: #ffffff;
	--bg-inset: #ffffff;
	--bg-muted: rgb(0 0 0 / 0.04);
	--bg-muted-strong: rgb(0 0 0 / 0.06);
	--glass-bg: rgb(255 255 255 / 0.9);
	--glass-float-bg: rgb(255 255 255 / 0.85);
	--glass-border: rgb(15 23 42 / 0.1);
	--header-scrolled-bg: rgb(248 250 252 / 0.92);
	--header-border: rgb(0 0 0 / 0.07);
	--text-primary: #0f172a;
	--text-secondary: #334155;
	--text-muted: #475569;
	--text-subtle: #5b6778;                   /* Imagine #64748B is 4.23:1 on the page → 5.11:1 */
	--border: rgb(15 23 42 / 0.1);
	--border-soft: rgb(0 0 0 / 0.08);
	--border-hover: rgb(37 99 235 / 0.3);
	--border-strong: rgb(0 0 0 / 0.15);
	--border-strong-hover: rgb(0 0 0 / 0.25);
	--border-input: #7b879a;                  /* Imagine black/12 is 1.17:1 → 3.23:1 */
	--accent: #2563eb;
	--accent-bright: #2563eb;                 /* Imagine bright-blue #3B82F6 is 3.27:1 on the page → 4.60:1 */
	--accent-contrast: #ffffff;
	--link: #2563eb;
	--link-hover: #6d28d9;                    /* Imagine soft-violet 3.77:1 → 7.10:1 */
	--tint-blue-bg: rgb(37 99 235 / 0.1);
	--tint-blue-border: rgb(37 99 235 / 0.3);
	--tint-blue-text: #1d4ed8;                /* 3.20:1 → 5.22:1 */
	--tint-purple-bg: rgb(124 58 237 / 0.1);
	--tint-purple-border: rgb(124 58 237 / 0.3);
	--tint-purple-text: #6d28d9;              /* 3.77:1 → 6.13:1 */
	--tint-green-bg: rgb(34 197 94 / 0.1);
	--tint-green-border: rgb(34 197 94 / 0.3);
	--tint-green-text: #166534;               /* Imagine #22C55E 2.0:1 → 5.87:1 over the tint on bg-page */
	--tint-yellow-bg: rgb(245 158 11 / 0.1);
	--tint-yellow-border: rgb(245 158 11 / 0.3);
	--tint-yellow-text: #92400e;              /* Imagine #F59E0B 1.9:1 → 5.89:1 over the tint on bg-page */
	--success: #15803d;
	--warning: #b45309;
	--danger: #b91c1c;                        /* Imagine #EF4444 3.76:1 on white → 6.47:1 */
	--info: #0e7490;
	--icon-tile-bg: rgb(37 99 235 / 0.1);
	--icon-tile-border: rgb(37 99 235 / 0.2);
	--icon-tile-fg: #2563eb;
	--icon-tile-alt-bg: rgb(124 58 237 / 0.1);
	--icon-tile-alt-border: rgb(124 58 237 / 0.2);
	--icon-tile-alt-fg: #6d28d9;
	--category-tile-bg: linear-gradient(to bottom right, rgb(37 99 235 / 0.15), rgb(124 58 237 / 0.15));
	--focus-ring: #2563eb;
	--shadow-focus: 0 0 0 3px rgb(37 99 235 / 0.12);
	--shadow-card: 0 1px 2px rgb(15 23 42 / 0.06), 0 8px 24px rgb(15 23 42 / 0.07);
	--shadow-card-hover: 0 24px 48px rgb(15 23 42 / 0.16);
	--shadow-float: 0 18px 45px rgb(0 0 0 / 0.12);
	--shadow-image: 0 25px 50px -12px rgb(0 0 0 / 0.25);
	--shadow-glow-blue: 0 0 30px rgb(37 99 235 / 0.2);
	--shadow-glow-purple: 0 0 30px rgb(124 58 237 / 0.2);
	--shadow-tab-active: 0 4px 14px rgb(37 99 235 / 0.35);
	--shadow-category-hover: 0 22px 45px -12px rgb(37 99 235 / 0.35);
	--ring-image: 0 0 0 1px rgb(0 0 0 / 0.08);
	--hero-grid-line: rgb(0 0 0 / 0.04);
	--orb-blue: rgb(37 99 235 / 0.2);
	--orb-purple: rgb(124 58 237 / 0.2);
	--glow-soft-blue: rgb(37 99 235 / 0.08);
	--glow-soft-purple: rgb(124 58 237 / 0.08);
	--bullet: #cbd5e1;
	--progress-track: rgb(0 0 0 / 0.08);
	--hamburger: #0f172a;
	--sun-on: 1;
	--moon-on: 0;
	/* component tints — Imagine's light overrides; where Imagine had none (a white/N utility on a light page is
	   invisible), the light value is the matching black/N */
	--toggle-bg: rgb(0 0 0 / 0.03);
	--toggle-border: rgb(0 0 0 / 0.12);
	--toggle-bg-hover: rgb(0 0 0 / 0.06);
	--toggle-border-hover: rgb(0 0 0 / 0.22);
	--filter-border: rgb(0 0 0 / 0.1);
	--filter-border-hover: rgb(37 99 235 / 0.35);
	--btn-secondary-hover-bg: rgb(0 0 0 / 0.05);
	--outline-hover-bg: rgb(37 99 235 / 0.1);
	--tabs-border: rgb(0 0 0 / 0.1);
	--pagination-border: rgb(0 0 0 / 0.1);
	--pagination-hover-bg: rgb(0 0 0 / 0.05);
	--pagination-hover-border: rgb(0 0 0 / 0.2);
	--tag-bg: rgb(0 0 0 / 0.04);
	--tag-border: rgb(0 0 0 / 0.08);
	--tag-hover-bg: rgb(37 99 246 / 0.08);
	--share-border: rgb(0 0 0 / 0.1);
	--share-hover-bg: rgb(0 0 0 / 0.04);
	--share-hover-border: rgb(0 0 0 / 0.18);
	--subtle-border: rgb(0 0 0 / 0.05);
	--drawer-border: rgb(0 0 0 / 0.08);
	--row-hover: rgb(0 0 0 / 0.03);
	--code-bg: rgb(37 99 235 / 0.08);
}

html[dir="rtl"] { --dir-sign: -1; }
html:not([dir="rtl"]) { --dir-sign: 1; }

@media (max-width: 37.5em) {
	/* Core un-fixes the admin bar below 600px, so the fixed header sits at the very top. */
	:root { --header-top: 0; }
}

@media (min-width: 48em) {
	:root { --fade-w: 3rem; }
}

@media (min-width: 64em) {
	:root { --header-h: var(--space-20); }
}
