/**
 * Design tokens, PT Anugrah Intelligentia Indonesia: CSS custom properties.
 * GENERATED from src/model.ts by scripts/generate-css.mjs at build. Do not edit by hand: change the model.
 * Import globally, and consume as var(--token).
 *
 * Names prefixed --pola- are ones Astryx also declares (ADR-0005). Both layers land on :root (data-astryx-theme sits
 * on documentElement), so an unprefixed name would shadow Astryx's inside its own scope: that is what rendered the
 * active pagination page as a solid grey and Astryx body text at 16px. clash/check.mjs fails on a new match unless
 * it is a listed override.
 */

:root {
  /* ── Colour ────────────────────────────────────────────────────── */
  /* Primary actions, brand accents, the logo colour. */
  --color-anugrah-blue: #0052ff;
  /* Hovered / pressed primary. */
  --color-anugrah-blue-hover: #003ecb;
  /* Dark surfaces / reversed backgrounds. */
  --color-deep-navy: #050f1a;
  /* Headings, body copy, one-colour print. */
  --color-ink: #050f1a;
  /* Blue-tinted surfaces, 10% primary. */
  --color-sky-tint: #e5eeff;
  /* Page background. */
  --color-paper: #f9fafb;
  /* Base surface. */
  --color-white: #ffffff;
  /* Icons and other meaningful marks, never text (grey.iconSecondary). */
  --pola-color-neutral: #646b77;
  /* Hairline borders / dividers. */
  --color-line: #d1d5db;
  /* Secondary text. */
  --color-muted: #5b616e;
  --pola-color-success: #05b169;
  --color-danger: #df2935;
  --pola-color-warning: #f0ad4e;

  /* ── Colour · Tints (Badge / DataTag / status) ─────────────────── */
  --color-success-bg: #e6f6ef;
  --color-danger-bg: #fdecee;
  --color-warning-bg: #fdf3e3;
  --color-sky-line: #c7d7ff;

  /* ── Greys, one per job (ADR-0011) ─────────────────────────────── */
  /* generate-theme.mjs sets Astryx's --color-text-primary, -secondary, --color-icon-secondary and the two
     disabled greys from the same tokens, so pass-through components match. contrast/check.mjs holds the readable
     three to AA on every surface. */
  --text-primary: var(--color-ink);
  --text-secondary: var(--color-muted);
  --icon-secondary: var(--pola-color-neutral);
  /* Disabled text and icons. Exempt from AA, so it keeps the old neutral pair and looks disabled. */
  --text-disabled: #8a919e;

  /* ── Status text and status lines ──────────────────────────────── */
  /* A status figure or label takes its text role: the fills (--pola-color-success, --pola-color-warning,
     --color-danger) are too light to read as text. Each role is a soft badge's ink or line (ADR-0013), so it
     flips with the badge tokens. generate-theme.mjs sets Astryx's --color-text-success and -warning from the
     same tokens; contrast/check.mjs holds the text roles to AA on every surface and on their own tint. */
  --text-success: var(--badge-success-ink);
  --text-warning: var(--badge-warning-ink);
  --text-danger: var(--badge-error-ink);
  --color-success-line: var(--badge-success-line);
  --color-warning-line: var(--badge-warning-line);
  --color-danger-line: var(--badge-error-line);

  /* ── Semantic roles ────────────────────────────────────────────── */
  --text-on-dark: var(--color-white);
  /* Brand blue as text or an icon. The saturated blue manages only 2.98-3.36:1 on the dark surfaces, so it lifts
     to a light blue in dark. Fills stay --color-anugrah-blue. */
  --text-brand: var(--color-anugrah-blue);
  --text-link: var(--color-anugrah-blue);
  /* The light hover step goes darker (#003ECB), which is 2.20:1 on a dark surface, so in dark it goes lighter. */
  --text-link-hover: var(--color-anugrah-blue-hover);
  --surface-page: var(--color-paper);
  --surface-card: var(--color-white);
  --surface-tint: var(--color-sky-tint);
  --surface-inverse: var(--color-deep-navy);
  --border-hairline: var(--color-line);
  /* Text on --surface-inverse. Rides --color-white, which flips to a near-black in dark, so an inverted surface
     stays legible in both themes. */
  --text-on-inverse: var(--color-white);
  /* White drawn on a brand or semantic fill (primary Button, solid Badge, the TabBar FAB). Fixed, never flips:
     the fills underneath do not flip either, so a theme-aware white would turn the label near-black in dark
     (3.15:1 on the blue, 1.02:1 on the navy Card). */
  --color-on-brand: #ffffff;
  /* Recessed field at rest (SearchInput). A touch greyer than --color-paper, so it reads as sunken against a
     white card. */
  --field-rest: #f3f4f6;
  --focus-ring: var(--text-brand);

  /* ── Toast surface (flips with the theme) ──────────────────────── */
  /* In dark a hairline replaces the shadow. */
  --toast-border: transparent;

  /* ── Toast icons ───────────────────────────────────────────────── */
  /* The saturated set drops below 3:1 on the dark surface, so the icons lighten in dark. */
  --toast-icon-info: var(--color-anugrah-blue);
  /* The success text in light, as Astryx status icons take it (#57): the success fill #05B169 was 2.80:1 on
     white (#106). */
  --toast-icon-success: var(--text-success);
  --toast-icon-error: var(--color-danger);

  /* ── Skeleton shimmer ──────────────────────────────────────────── */
  /* Light greys read as "empty" on a white card; on a dark card the placeholder sits a step above the surface
     instead. */
  --skeleton-base: #eef0f3;
  --skeleton-shine: #f7f8fa;

  /* ── Soft badges (ADR-0013) ────────────────────────────────────── */
  /* Tint, line and ink per variant, named as Prome names them. Every ink reaches 4.5:1 on its tint in both
     themes (contrast/check.mjs); the line is decorative. StatusBadge draws from these; Astryx's own Badge stays
     solid. */
  --badge-neutral-tint: #eff1f3;
  --badge-neutral-line: #d7dbe0;
  --badge-neutral-ink: #3f4652;
  --badge-success-tint: #cfe9d1;
  --badge-success-line: #a6d4aa;
  --badge-success-ink: #0a5c14;
  --badge-warning-tint: #ffe8a3;
  --badge-warning-line: #ecd07a;
  --badge-warning-ink: #6e5000;
  --badge-error-tint: #ffd4d8;
  --badge-error-line: #f2aeb5;
  --badge-error-ink: #b21f31;
  --badge-info-tint: #e5eeff;
  --badge-info-line: #c7d7ff;
  --badge-info-ink: #003ecb;

  /* ── Type families ─────────────────────────────────────────────── */
  --font-sans: 'Inter Variable', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Ubuntu Sans Mono Variable', 'Ubuntu Sans Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* ── Font weights ──────────────────────────────────────────────── */
  --font-weight-regular: 400;
  --pola-font-weight-medium: 500;
  /* Keeps Astryx's name on purpose: see OVERRIDES in clash/check.mjs. */
  --font-weight-semibold: 500;
  --pola-font-weight-bold: 700;
  --font-weight-extrabold: 700;
  --font-weight-black: 700;

  /* ── Type scale (px) ───────────────────────────────────────────── */
  --font-size-display: 40px;
  --font-size-display-sm: 32px;
  --font-size-h2: 24px;
  --font-size-h3: 18px;
  --font-size-h4: 16px;
  --font-size-body: 16px;
  --font-size-body-sm: 14px;
  --font-size-caption: 12px;
  --font-size-micro: 11px;
  --font-size-mono-data: 16px;
  --font-size-mono-sm: 13px;

  /* ── Line height ───────────────────────────────────────────────── */
  --line-height-display: 1.2;
  --line-height-heading: 1.2;
  --line-height-body: 1.5;
  --line-height-snug: 1.35;

  /* ── Letter spacing ────────────────────────────────────────────── */
  --letter-spacing-display: -0.022em;
  --letter-spacing-h2: -0.019em;
  --letter-spacing-h3: -0.014em;
  --letter-spacing-normal: 0em;
  --letter-spacing-kicker: 0.06em;
  --letter-spacing-technical: 0em;

  /* ── Semantic type aliases ─────────────────────────────────────── */
  --text-display: var(--font-size-display);
  --pola-text-body-size: var(--font-size-body);
  --text-eyebrow-tracking: var(--letter-spacing-kicker);

  /* ── Spacing scale (px) ────────────────────────────────────────── */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-20: 20px;
  --space-xl: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 80px;

  /* ── Dialog ────────────────────────────────────────────────────── */
  --dialog-padding: 16px;
  --dialog-gap: 12px;

  /* ── Radii (px) ────────────────────────────────────────────────── */
  /* Small chips, checkboxes. */
  --radius-xs: 4px;
  /* Buttons, inputs, table containers. */
  --radius-sm: 8px;
  /* Cards, panels, dropdowns. */
  --radius-md: 12px;
  /* Modals, onboarding cards, hero sections. */
  --radius-lg: 16px;
  --radius-pill: 9999px;

  /* ── Elevation ─────────────────────────────────────────────────── */
  /* Cards, asset tiles. */
  --shadow-soft: 0 1px 3px rgba(5, 15, 26, 0.06);
  /* Dropdowns, popovers. */
  --shadow-card: 0 4px 12px rgba(5, 15, 26, 0.08);
  /* Modals, overlays. */
  --shadow-raised: 0 12px 24px rgba(5, 15, 26, 0.12);
  /* Input focus ring. */
  --shadow-focus: 0 0 0 4px rgba(0, 82, 255, 0.1);
  --shadow-fab: 0 8px 10px rgba(0, 82, 255, 0.3);

  /* ── Motion ────────────────────────────────────────────────────── */
  --pola-duration-fast: 125ms;
  --pola-duration-medium: 300ms;
  --pola-duration-slow: 700ms;
  /* Astryx's --ease-standard curve (ADR-0007). Reviewing an Astryx upgrade includes checking that it has not
     moved. */
  --easing-standard: cubic-bezier(0.24, 1, 0.4, 1);
  --transition-control: background 125ms cubic-bezier(0.24, 1, 0.4, 1), border-color 125ms cubic-bezier(0.24, 1, 0.4, 1), box-shadow 125ms cubic-bezier(0.24, 1, 0.4, 1), color 125ms cubic-bezier(0.24, 1, 0.4, 1);
  --press-opacity: 0.85;
  --disabled-opacity: 0.45;
}

/* Dark theme, opt-in only: set data-pola-theme="dark" on the page root. */
[data-pola-theme='dark'] {
  /* ── Colour ────────────────────────────────────────────────────── */
  --color-deep-navy: #0e1420;
  --color-ink: #f4f6f8;
  --color-sky-tint: #101b33;
  --color-paper: #0a0e14;
  --color-white: #101620;
  --pola-color-neutral: #8a8f98;
  --color-line: #232a36;
  --color-muted: #9a9ea6;

  /* ── Colour · Tints (Badge / DataTag / status) ─────────────────── */
  --color-success-bg: #0b2a1e;
  --color-danger-bg: #33141a;
  --color-warning-bg: #33260f;
  --color-sky-line: #1c3160;

  /* ── Greys, one per job (ADR-0011) ─────────────────────────────── */
  --text-disabled: #6b7280;

  /* ── Semantic roles ────────────────────────────────────────────── */
  --text-on-dark: #f4f6f8;
  --text-brand: #7da7ff;
  --text-link: #7da7ff;
  --text-link-hover: #a6c4ff;
  --surface-inverse: #f4f6f8;
  --field-rest: #1e2634;

  /* ── Toast surface (flips with the theme) ──────────────────────── */
  --toast-border: var(--color-line);

  /* ── Toast icons ───────────────────────────────────────────────── */
  --toast-icon-info: #7da7ff;
  --toast-icon-success: #7be6ac;
  --toast-icon-error: #ff8b8b;

  /* ── Skeleton shimmer ──────────────────────────────────────────── */
  /* The placeholder sits a step above the dark card surface rather than below it. */
  --skeleton-base: #1e2634;
  --skeleton-shine: #262f40;

  /* ── Soft badges (ADR-0013) ────────────────────────────────────── */
  /* A dark tint, a line a step above it, and a light ink. */
  --badge-neutral-tint: #292b2e;
  --badge-neutral-line: #3f4146;
  --badge-neutral-ink: #bcbfc4;
  --badge-success-tint: #1b322a;
  --badge-success-line: #22503c;
  --badge-success-ink: #77e2ae;
  --badge-warning-tint: #352e21;
  --badge-warning-line: #594828;
  --badge-warning-ink: #f8ce80;
  --badge-error-tint: #372325;
  --badge-error-line: #5c3032;
  --badge-error-ink: #ff9797;
  --badge-info-tint: #101b33;
  --badge-info-line: #1c3160;
  --badge-info-ink: #7da7ff;
}
