/*
  SHIP-OS adaptive semantic design tokens.
  Load before style.css, design-v3.css, route CSS, and Tailwind output.
  Components consume semantic roles; these primitives are the only active
  product palette source. Print surfaces intentionally override to light.
*/
:root {
    color-scheme: light;
    --font-d: "Outfit", ui-sans-serif, system-ui, sans-serif;
    --font-b: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;

    /* Canonical rocket identity */
    --ship-brand-navy: #172033;
    --ship-brand-navy-deep: #101828;
    --ship-brand-navy-mid: #243048;
    --ship-brand-blue: #0f5ea8;
    --ship-brand-blue-hover: #0b4f8f;
    --ship-brand-blue-soft: #7aa2ff;
    --ship-brand-gold: #f4b804;
    --ship-brand-gold-strong: #f8c01c;
    --ship-on-brand-gold: #172033;

    /* Interaction */
    --ship-action: #0f5ea8;
    --ship-action-hover: #0b4f8f;
    --ship-on-action: #ffffff;
    --ship-link: #0f5ea8;
    --ship-link-dark: #7aa2ff;
    --ship-selected: #0f5ea8;
    --ship-selected-muted: #e5f0fb;
    --ship-focus-ring: #0f5ea8;
    /* Translucent focus halo derived from the themed ring color. Tailwind's
       slash-opacity modifier (tw-ring-ship-focus-ring/25) compiles to nothing
       on var()-based colors, so translucency is a token role, not a modifier. */
    --ship-focus-ring-soft: color-mix(in srgb, var(--ship-focus-ring) 25%, transparent);

    /* Surfaces */
    --ship-canvas: #edf2fa;
    --ship-canvas-top: #f6faff;
    --ship-canvas-bottom: #edf2fa;
    --ship-surface: #ffffff;
    --ship-surface-elevated: #ffffff;
    --ship-surface-muted: #f6faff;
    --ship-control-fill: #edf2fa;
    --ship-action-bar: #f6faff;
    --ship-border-subtle: #d6e1f1;
    --ship-border-strong: #7d8da8;
    --ship-divider: #d6e1f1;
    --ship-scrim: rgb(23 32 51 / 0.32);
    /* Heavy ink veil for full-bleed busy overlays (was slate-950/85). */
    --ship-scrim-strong: color-mix(in srgb, var(--ship-foreground) 85%, transparent);

    /* Text */
    --ship-text-primary: #0f172b;
    --ship-text-secondary: #31405f;
    --ship-text-tertiary: #5f6f8f;
    --ship-text-inverse: #ffffff;

    /* Semantic status: foreground / background / border */
    --ship-success: #166534;
    --ship-success-bg: #e8f7ee;
    --ship-success-border: #9fd8b6;
    --ship-warning: #854d0e;
    --ship-warning-bg: #fff4db;
    --ship-warning-border: #e7c56d;
    --ship-danger: #b42318;
    --ship-danger-bg: #fdecea;
    --ship-danger-border: #f0aea8;
    --ship-info: #0f5ea8;
    --ship-info-bg: #e5f0fb;
    --ship-info-border: #9bc1e7;
    --ship-neutral: #475569;
    --ship-neutral-bg: #eef2f7;
    --ship-neutral-border: #cbd5e1;
    --ship-ambiguous: #6b3fa0;
    --ship-ambiguous-bg: #f2e9ff;
    --ship-ambiguous-border: #c9adeb;

    /* Compatibility roles; do not add new consumers. */
    --ship-primary: var(--ship-action);
    --ship-primary-dark: var(--ship-action-hover);
    --ship-primary-light: var(--ship-brand-blue-soft);
    --ship-background: var(--ship-canvas);
    --ship-foreground: var(--ship-text-primary);
    --ship-foreground-muted: var(--ship-text-secondary);
    --ship-border: var(--ship-border-subtle);

    /* Spacing (4/8 rhythm) */
    --ship-space-1: 0.25rem;
    --ship-space-2: 0.5rem;
    --ship-space-3: 0.75rem;
    --ship-space-4: 1rem;
    --ship-space-5: 1.25rem;
    --ship-space-6: 1.5rem;
    --ship-space-8: 2rem;

    /*
      Desk band inset (#2120): the single sanctioned dark "terminal" surface
      for the openbot desk band, fixed across light/dark appearances so the
      console texture reads identically in both (the app palette is light-only
      by policy; the inset is deliberately theme-stable like a terminal).
      All band text derives from --ship-text-inverse / semantic -bg tints
      blended toward this surface with color-mix, keeping >=4.5:1 contrast.
    */
    --ship-desk-inset: #101828;

    /* Desk-band inset family: exact Ops Fabric band values, moved here from
       ad-hoc hexes so the token sheet stays the single palette source.
       -deep is the recessed input well inside the inset surface. */
    --ship-desk-inset-deep: #0f1624;
    --ship-desk-inset-surface: #1d2a44;
    --ship-desk-inset-border: #3d4f6f;
    --ship-desk-inset-text: #d7e3f4;
    --ship-desk-inset-text-muted: #9fb0cc;
    --ship-desk-inset-success: #7dd3a7;
    --ship-desk-inset-cmd: #f4d47c;
    --ship-desk-inset-focus: #4f8fe0;

    /* Web radii; native adapters keep their platform role scale. */
    --ship-radius-sm: 0.25rem;
    --ship-radius-md: 0.5rem;
    --ship-radius-lg: 0.75rem;
    --ship-radius-card: 1rem;
    --ship-radius-pill: 9999px;

    --ship-shadow-xs: 0 1px 2px rgb(23 32 51 / 0.06);
    --ship-shadow-sm: 0 1px 3px rgb(23 32 51 / 0.10), 0 1px 2px rgb(23 32 51 / 0.06);
    --ship-shadow-md: 0 4px 10px rgb(23 32 51 / 0.12);

    /* Touch target minimum */
    --ship-touch-target: 2.75rem;
}

@media print {
    :root {
        color-scheme: light;
        --ship-canvas: #ffffff;
        --ship-canvas-top: #ffffff;
        --ship-canvas-bottom: #ffffff;
        --ship-surface: #ffffff;
        --ship-surface-elevated: #ffffff;
        --ship-surface-muted: #f6faff;
        --ship-control-fill: #edf2fa;
        --ship-action-bar: #f6faff;
        --ship-text-primary: #0f172b;
        --ship-text-secondary: #31405f;
        --ship-text-tertiary: #5f6f8f;
        --ship-border-subtle: #d6e1f1;
        --ship-border-strong: #7d8da8;
        --ship-divider: #d6e1f1;
        --ship-success: #166534;
        --ship-success-bg: #e8f7ee;
        --ship-success-border: #9fd8b6;
        --ship-warning: #854d0e;
        --ship-warning-bg: #fff4db;
        --ship-warning-border: #e7c56d;
        --ship-danger: #b42318;
        --ship-danger-bg: #fdecea;
        --ship-danger-border: #f0aea8;
        --ship-info: #0f5ea8;
        --ship-info-bg: #e5f0fb;
        --ship-info-border: #9bc1e7;
        --ship-neutral: #475569;
        --ship-neutral-bg: #eef2f7;
        --ship-neutral-border: #cbd5e1;
        --ship-ambiguous: #6b3fa0;
        --ship-ambiguous-bg: #f2e9ff;
        --ship-ambiguous-border: #c9adeb;
    }
}
