/*
 * The colours this product is made of.
 *
 * Twelve stylesheets held 1451 hand-written hex values, which is why the same green
 * appeared as #10b981 in one file and #009a67 in another and nobody could say which
 * was the brand. A token is not a preference: it is the answer to "what colour is a
 * primary button", and it has to be answerable in one place before it can be changed.
 *
 * Every value here is exactly what it replaced - this file introduced no new colour.
 * The names say what a colour is FOR, not what it looks like: --color-danger survives
 * a redesign, --color-red does not.
 *
 * tests/Architecture/StyleTokenTest.php counts the raw hex left in each stylesheet and
 * refuses to let the count grow, so the remaining ones drain instead of multiplying.
 */
:root {
    /* Brand */
    --color-brand: #10b981;
    --color-brand-strong: #009a67;
    --color-accent: #f54e12;
    --color-accent-soft: #ff7e07;
    --color-link: #2663eb;

    /* Ink: text on light backgrounds, strongest first */
    --color-ink: #131313;
    --color-ink-deep: #111318;
    --color-ink-muted: #333333;
    --color-ink-soft: #6c757d;
    --color-ink-faint: #868686;

    /* Slate: the neutral scale the newer screens use */
    --color-slate-900: #0f172a;
    --color-slate-800: #101828;
    --color-slate-700: #334155;
    --color-slate-600: #374151;
    --color-slate-500: #6b7280;
    --color-slate-400: #94a3b8;
    --color-slate-300: #9ca3af;

    /* Surfaces and lines */
    --color-surface: #ffffff;
    --color-surface-muted: #f8f8f8;
    --color-surface-subtle: #f9fafb;
    --color-surface-cool: #f8fafc;
    --color-border: #e5e7eb;
    --color-border-strong: #d1d5db;
    --color-border-cool: #e2e8f0;
    --color-border-soft: #e7e9ec;
    --color-border-faint: #d8dbdf;

    /* States */
    --color-danger: #b91c1c;
    --color-black: #000000;

    /* Second pass: roles that repeat across screens, same values as before. */
    --color-ink-strong: #111827;
    --color-slate-450: #64748b;
    --color-ink-grey: #4f4f4f;
    --color-border-cool-soft: #e7ebf0;
    --color-brand-bright: #2db87d;
    --color-slate-550: #4b5563;
    --color-slate-650: #475569;
    --color-link-strong: #2563eb;
    --color-ink-black: #0f1419;
    --color-surface-grey: #f3f4f6;
    --color-accent-deep: #e23c00;
    --color-border-slate: #cbd5e1;
    --color-warning: #f59e0b;
    --color-success: #22c55e;
    --color-danger-bright: #ef4444;
    --color-link-bright: #3b82f6;
    --color-surface-faint: #fafafa;

    /* Third pass: the profile and papers screens, same values as before. */
    /* plan card border when the plan is the chosen one */
    --color-brand-vivid: #12cc8e;
    /* primary button, pressed */
    --color-brand-deep: #269767;
    /* far end of the brand gradient */
    --color-brand-dark: #007a55;
    /* brand tint behind a success panel */
    --color-brand-surface: #ecfdf5;
    /* border of the recommended / attention card */
    --color-warning-light: #ffcd71;
    /* the same attention card, its background */
    --color-warning-tint: #fff7e84d;
    /* warning badge background */
    --color-warning-surface: #fff3dc;
    /* text on a warning badge */
    --color-warning-ink: #8a5a06;
    /* accent on a dark panel, where the deeper accent goes muddy */
    --color-accent-bright: #ff9838;
    /* running / in-progress badge background */
    --color-info-surface: #eef2fb;
    /* text on an info badge */
    --color-info-ink: #2e52a8;
    /* body text on the onboarding screens */
    --color-ink-navy: #344054;
    /* secondary text on the onboarding screens */
    --color-ink-cool: #667085;
    /* second-level text in the plan and papers lists */
    --color-ink-slate: #5b6472;
    /* the same level, papers list */
    --color-ink-steel: #5f6773;
    /* third-level text, plan cards */
    --color-ink-cool-soft: #8b929c;
    /* third-level text, papers list */
    --color-ink-cool-faint: #8a93a0;
    /* headings on the papers list */
    --color-ink-night: #14181f;
    /* the active pagination chip */
    --color-ink-charcoal: #1f2328;
    /* Focus. Same charcoal as the current page in a pager and the pressed tab, because
       focus is the product's "this one" signal and not a colour of its own; the ring is
       the steel tint at 10% so it reads on a white card without becoming a border. */
    --color-focus-line: #1f2328;
    --color-focus-ring: #abbac633;
    /* border of a neutral, unselected card */
    --color-border-steel: #abbac6;
    /* that card, its background */
    --color-border-steel-tint: #abbac61a;
    /* the same steel, used as an overlay */
    --color-border-steel-scrim: #abbac699;
    /* a bordered control under the pointer */
    --color-border-hover: #b9bec5;
    /* the line between rows of a card list */
    --color-line-cool: #e4e7ec;
    /* a full-width rule that reads as a band */
    --color-surface-line: #f3f5f6;
    /* the divider inside a settings block */
    --color-surface-divider: #f1f3f5;
    /* icon button under the pointer */
    --color-surface-hover: #f1f2f4;

    /* Fourth pass: the writer surface, same values as before. */
    /* border of the writer block under the pointer, and of a selected one */
    --color-selection-border: #93c5fd;
    /* the writer's own attention colour: a flagged span, a stalled action */
    --color-warning-vivid: #f97316;
    /* the product tour's call to action */
    --color-brand-mid: #45bf78;

    /*
     * Fifth pass: result severity. The checker cards carried this scale as a local
     * `--tone-*` palette, which meant "what colour is a failing result" had a
     * different answer in every screen that ever needs to show one. Same values.
     */
    /* a result inside the safe band */
    --color-level-good: #0ea772;
    /* its text, dark enough to read on the tint */
    --color-level-good-deep: #07734f;
    /* the panel behind it */
    --color-level-good-surface: #eafbf3;
    /* and that panel's border */
    --color-level-good-line: #a6e7cb;
    /* a borderline result: text */
    --color-level-warn-deep: #b54708;
    /* panel */
    --color-level-warn-surface: #fffaeb;
    /* border */
    --color-level-warn-line: #fdd9a0;
    /* a result that fails: the mark itself */
    --color-level-bad: #e5484d;
    /* its text */
    --color-level-bad-deep: #b42318;
    /* panel */
    --color-level-bad-surface: #fef3f2;
    /* border */
    --color-level-bad-line: #fbc5c1;
    /* nothing measured yet: panel */
    --color-level-idle-surface: #f5f7f9;
    /* and border - the same neutral a chip and a card edge use */
    --color-level-idle-line: #e6e9ee;
    /* the unfilled part of a gauge or progress bar */
    --color-track: #e8ebf0;
    /* third-level text on a result card */
    --color-ink-pale: #939ba7;
    /* a link-coloured action under the pointer */
    --color-link-surface: #eff4ff;

    /* Two of the sidebar's colours are not the sidebar's alone. */
    /* a sky blue used as an accent edge, and as the far end of the avatar gradient */
    --color-info-bright: #0ea5e9;
    /* a light red that reads as a warning without shouting: the writer's error
       callout, sign out under the pointer in the admin sidebar */
    --color-danger-soft: #fca5a5;

    /*
     * Sixth pass: the admin sidebar. One surface with its own dark scale, which is
     * why every name here carries `admin` - these are not the product's greens and
     * navies, they are that panel's. They live here anyway, because "which navy is
     * the admin sidebar" has to be answerable in one place to be changeable at all.
     */
    /* the active nav item, and every hairline inside the dark sidebar */
    --color-admin-edge: #1e293b;
    /* the build widget at rest: border */
    --color-admin-panel-line: #1f2c45;
    /* its background, top */
    --color-admin-panel-top: #17233c;
    /* and bottom */
    --color-admin-panel-bottom: #111a2e;
    /* the same widget under the pointer: border */
    --color-admin-panel-line-hover: #2a3a58;
    /* background, top */
    --color-admin-panel-top-hover: #1b2946;
    /* and bottom */
    --color-admin-panel-bottom-hover: #141f36;
    /* its icon button, once the row is hovered */
    --color-admin-icon-line-hover: #24334c;
    /* readable text on the dark sidebar */
    --color-admin-ink: #a9b8cd;
    /* and the line below it */
    --color-admin-ink-soft: #7f8ea6;
    /* a newer release is live - the loud state: border */
    --color-admin-alert-line: #1c5c37;
    /* background, top */
    --color-admin-alert-top: #14432a;
    /* and bottom */
    --color-admin-alert-bottom: #0e2b1c;
    /* its title and button label */
    --color-admin-alert-ink: #d1fae5;
    /* and its age line */
    --color-admin-alert-ink-soft: #a7f3d0;
    /* the account role, when that account is an admin */
    --color-admin-role-ink: #4ade80;
    /* the go-look-at-it button, pressed */
    --color-admin-cta: #34d576;
    /* and its label, dark enough to read on green */
    --color-admin-cta-ink: #06230f;
    /* the avatar's initials */
    --color-admin-avatar-ink: #06210f;

    /*
     * Seventh pass: the tail. 101 values that each appeared once or twice, which is
     * how a palette actually grows - nobody adds fifty colours, everybody adds one.
     * 59 of them were the same colour as a token already here (under one JND, the
     * largest 2.4) and now use it; the rest are below, exact, named for their job.
     */
    /* a block being rewritten: its outline, the slider dot, the AI highlight */
    --color-editing: #3758f9;
    /* a confirming button */
    --color-success-deep: #15803d;
    /* text on a success panel or badge */
    --color-success-ink: #166534;
    /* and its border */
    --color-success-line: #bbf7d0;
    /* the dot on a delivered notification */
    --color-success-dot: #11c47a;
    /* accept, pressed */
    --color-brand-press: #059669;
    /* accept inside the editor, pressed - a shade of its own */
    --color-brand-accept-press: #0ea372;
    /* the pipeline tick in onboarding */
    --color-brand-spark: #12b76a;
    /* the tour's call to action, pressed */
    --color-brand-mid-press: #3aa364;
    /* the plan card's own green, at full strength */
    --color-plan-brand-strong: #07835b;
    /* the sidebar call to action: gradient start */
    --color-cta-gradient-start: #1ba97a;
    /* and end */
    --color-cta-gradient-end: #175a46;
    /* the top bar runs the same gradient one step darker */
    --color-cta-gradient-deep: #1d7057;
    /* the fill behind an AI-flagged span, the border of a warning note or panel */
    --color-warning-fill: #fde68a;
    /* the fill behind a plagiarism match, the border of an error alert */
    --color-danger-line: #fecaca;
    /* a span the fact checker questioned */
    --color-highlight-fact: #f7edda;
    /* the search term, found on the page */
    --color-highlight-hit: #fef08a;
    /* text inside a warning note */
    --color-warning-note-ink: #713f12;
    /* the ribbon on a plan that is being cancelled */
    --color-warning-ribbon-ink: #4d2c0d;
    /* cohort plan-type badges: one hue per billing period, ink + its own surface */
    --color-plan-yearly-ink: #6d28d9;
    --color-plan-yearly-surface: #f5f3ff;
    --color-plan-monthly-ink: #1d4ed8;
    --color-plan-monthly-surface: #eff6ff;
    --color-plan-weekly-ink: #b45309;
    --color-plan-weekly-surface: #fffbeb;
    /* upgrade, pressed */
    --color-accent-press: #eb7101;
    /* a destructive menu item, and a cancelled plan's ribbon */
    --color-accent-ink: #c33d0d;
    /* the hint under a plan card */
    --color-accent-ink-soft: #b4451f;
    /* the badge on a subscription the user has cancelled */
    --color-accent-pale: #fddcd0;
    /* delete, pressed */
    --color-danger-press: #e04610;
    /* the bar that marks a dead row, and the text that says why */
    --color-danger-mark: #dc2626;
    /* the badge on a plagiarism match */
    --color-danger-pale: #fee2e2;
    /* text where a warning has to be read, not noticed */
    --color-danger-ink-deep: #7f1d1d;
    /* a failing badge: panel */
    --color-danger-badge-surface: #fceaea;
    /* and text */
    --color-danger-badge-ink: #a32d2d;
    /* text on an error alert */
    --color-error-ink: #991b1b;
    /* a form field that did not validate: its border and its message */
    --color-error-form: #f13e8c;
    /* the alert above that form */
    --color-error-form-surface: #fdf2f8;
    /* its text */
    --color-error-form-ink: #9d174d;
    /* and its border */
    --color-error-form-line: #fbcfe8;
    /* the tint behind a feature icon */
    --color-info-pale: #eff8ff;
    /* the border of an in-progress panel */
    --color-info-line: #bfdbfe;
    /* an active chip, and a match score */
    --color-link-deep: #1d4ed8;
    /* the outline on the block the cursor is in */
    --color-focus-indigo: #6366f1;
    /* its gutter button, hovered: border */
    --color-focus-indigo-line: #c7d2fe;
    /* and glyph */
    --color-focus-indigo-ink: #4f46e5;
    /* the focus ring on a green button */
    --color-focus-green: #86efac;
    /* a change waiting to take effect: border */
    --color-pending-line: #14b8a6;
    /* title */
    --color-pending-ink: #0f766e;
    /* and body text */
    --color-pending-ink-deep: #134e4a;
    /* anything attributed to the model: tint */
    --color-ai-surface: #f1eafb;
    /* and glyph */
    --color-ai-ink: #6a3fb5;
    /* a progress bar that is still filling */
    --color-progress: #7fa5e6;
    /* the far end of the gradient behind a user with no picture */
    --color-avatar-end: #fb7185;
    /* a popover that sits over the document */
    --color-surface-dark: #1f2937;
    /* an action inside one */
    --color-surface-dark-soft: #2d2d2d;
    /* the product tour's own card */
    --color-surface-tour: #262626;
    /* a dark button under the pointer */
    --color-ink-button-hover: #1f1f1f;
    /* body text on a dark card, and a muted state dot */
    --color-ink-dim: #c7c7c7;
    /* a hint nobody has to read */
    --color-ink-hint: #999999;
    /* text in a diff preview */
    --color-ink-preview: #637381;
    /* a navigation glyph at rest */
    --color-ink-icon: #7d7d7d;
    /* when something happened */
    --color-ink-timestamp: #7b8190;
    /* a scrollbar thumb inside a card */
    --color-scrollbar: #c7ccd6;
    /* and the same thumb, grabbed */
    --color-scrollbar-hover: #a9b0bd;
    /* --- the release notice (public/css/version-notify.css) ------------------
       Its own small family because it is chrome, not product: a dark card that
       has to read as "part of the app" on top of any page, light or dark. */
    /* the notice's ground, lifted at the top edge */
    --color-release-ground: #1b2a49;
    /* body text on that ground */
    --color-release-ink: #e5eaf2;
    /* its dismiss glyph at rest */
    --color-release-ink-dim: #93a3b8;
    /* the reload button under the pointer */
    --color-link-lift: #60a5fa;
    /* a forced release: the same card, turned into a warning */
    --color-warning-edge: #7c4a06;
    --color-warning-ground: #4a2708;
    --color-warning-ground-deep: #2c1804;
    --color-warning-lift: #fbbf24;
    --color-warning-lift-bright: #fcd34d;
    --color-warning-ink-deep: #26160b;
    --color-warning-ink-faint: #fffbeb;
    --color-warning-ink-dim: #dcbb6a;
    /* --- the legacy page kit (public/css/legacy-pages.css) -------------------
       Bootstrap-era colours, used by the pages that still render server-side and
       by the admin panel's cards and buttons. Kept at their exact values rather
       than mapped onto the product palette: re-shading them while moving them out
       of a <style> block would be a visual change nobody asked for. */
    /* the page behind the cards */
    --color-legacy-ground: #f5f5f5;
    /* a card's edge, and a table rule */
    --color-legacy-border: #dddddd;
    /* a table header, and a definition row */
    --color-legacy-row: #f8f9fa;
    /* a label above a value */
    --color-legacy-ink-soft: #666666;
    /* the primary button and every plain link */
    --color-legacy-link: #007bff;
    --color-legacy-danger: #dc3545;
    --color-legacy-success: #28a745;
    /* the three notices: fill, text, edge */
    --color-legacy-success-fill: #d4edda;
    --color-legacy-success-ink: #155724;
    --color-legacy-success-edge: #c3e6cb;
    --color-legacy-danger-fill: #f8d7da;
    --color-legacy-danger-ink: #721c24;
    --color-legacy-danger-edge: #f5c6cb;
    --color-legacy-warning-fill: #fff3cd;
    --color-legacy-warning-ink: #856404;
}
