/* Super Hi-Fi Traffic design tokens: the one place colour, type, spacing,
   radius, elevation and motion are defined (POLISH_SPEC section 1). Imported
   first. Components use these names; raw values belong only here.
   Light ships today; dark is a later token swap. */
:root {
  /* Keep the owner-approved AI listening meter spacing. */
  --kaira-meter-gap: 3px;
  /* Surfaces */
  --canvas: #e6e8eb; /* app ground */
  --paper: #fcfcfb; /* tables, forms, panels, top bar */
  --recess: #eef0f2; /* table header band, segmented track, disabled fields */
  --hover: #f4f5f6; /* row hover */

  /* Text and rules */
  --ink: #0a0c0f; /* headings, primary text on paper, heavy rules */
  --ink-2: #23272d; /* body text */
  --mute: #5b616b; /* secondary text and labels (6.1:1 on paper) */
  --mute-2: #8e949e; /* placeholder and disabled only */
  --line: rgba(10, 12, 15, 0.08); /* row dividers inside tables */
  --line-2: rgba(10, 12, 15, 0.14); /* region and control borders */
  --line-strong: rgba(10, 12, 15, 0.24); /* a hovered control's border */
  /* On the dark surfaces (toasts, the sidebar) */
  --line-on-dark: rgba(255, 255, 255, 0.18);
  --line-on-dark-2: rgba(255, 255, 255, 0.3);
  --hover-on-dark: rgba(255, 255, 255, 0.1);
  /* The live dot on dark surfaces: the sidebar's connection and the sign-in
     card's badge. */
  --live-on-dark: #3fb574;
  --live-glow: rgba(63, 181, 116, 0.7);

  /* Signal: the one accent. A fill, an indicator or a focus ring; never body text. */
  --signal: #f36f1f;
  --signal-2: #ff8638; /* orange on dark surfaces */
  --signal-text: #b0440a; /* small orange text (5.6:1 on paper) */
  --signal-tint: #fff4ed; /* selected row, "needs you" chip ground */

  /* Status (chips, edges and messages only, never chrome). The fill is for
     dots and edges; the -text value passes 4.5:1 on paper and on its tint. */
  --ok: #2f8f5c;
  --ok-tint: #e6f4ec;
  --ok-text: #1f6b43; /* 6.3:1 on paper */
  --warn: #8a6210;
  --warn-tint: #fbefd3;
  --warn-text: #7a560e;
  --bad: #b8392a;
  --bad-tint: #f8e0dc;
  --bad-text: #a53324;
  --info: #2c6bb0;
  --info-tint: #e0ebf7;
  --info-text: #255f9e;

  /* Focus: a darker orange that passes 3:1 on paper, canvas and every tint */
  --focus: #c9560f;

  /* Type */
  --display: "Montserrat Variable", "Montserrat", system-ui, sans-serif;
  --body:
    "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-12: 48px;

  /* Radii: controls, panels, dialogs, and round for chips and dots */
  --r-control: 6px;
  --r-panel: 8px;
  --r-dialog: 12px;
  --r-round: 999px;

  /* Dialog widths (DESIGN_SYSTEM.md section 11, audit 235 DS-20): a
     dialog, a wide dialog, and a workspace for reports and long tables */
  --dialog: 480px;
  --dialog-wide: 720px;
  --dialog-workspace: 1120px;

  /* Elevation: surfaces are flat; only menus and dialogs float */
  --shadow-menu:
    0 1px 2px rgba(10, 12, 15, 0.04), 0 12px 32px -8px rgba(10, 12, 15, 0.18);
  --shadow-dialog: 0 24px 64px -16px rgba(10, 12, 15, 0.28);
  --scrim: rgba(10, 12, 15, 0.55);

  /* The sign-in moment (sign-in-moment.css): the sign-in page's dark
     ground, the vignette's shade and the warm flash from the Sign in button */
  --moment-ground: #07090a;
  --moment-shade: rgba(7, 9, 10, 0.42);
  --moment-shade-deep: rgba(7, 9, 10, 0.72);
  --moment-flash-core: rgba(255, 178, 108, 0.24);
  --moment-flash-warm: rgba(243, 111, 31, 0.1);
  /* …and the sign-in page's orange glow, brighter while the workspace opens */
  --moment-glow: rgba(243, 111, 31, 0.1);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-hover: 120ms;
  --t-menu: 200ms;
  --t-dialog: 240ms;

  /* Earlier names, kept so existing screens work while they move to the names above */
  --muted: var(--mute);
  --accent: var(--signal);
  --signal-soft: var(--signal-tint);
  --accent-soft: var(--signal-tint);
  --orange: var(--signal);
  --border: var(--line-2);
  --surface: var(--paper);
  --text: var(--ink-2);
  --font-body: var(--body);

  /* Kaira, the AI (web/kaira.css, docs/review/KAIRA_LOOK.md): gold
     only, owner decision November 26, 2026. */
  --kaira-gold: #e9862c;
  --kaira-gold-mid: #edb36b;
  --kaira-gold-soft: #f2bb78;
  --kaira-gold-light: #ffe6c2;
  --kaira-cream: #fff8ec;
  --kaira-white: #ffffff;
  --kaira-bronze: #8a5c2b;
  --kaira-bronze-light: #c08d4e;
  --kaira-note-text: #7a3f10;
  --kaira-ink: #0b0b0d;
  --kaira-shadow: #141117;
  --kaira-earth: #502800;

  /* Ask Kaira's dark button, its drop-down, the Why? link and the opening
     flare: owner decision November 27, 2026 (Zack, Safari preview,
     docs/review/KAIRA_LOOK.md). The one place Kaira is dark. */
  --kaira-night: #0e0d0f; /* the button's face, the foot of the header band */
  --kaira-night-2: #1a1712; /* the top of the header band and the connector */
  --kaira-on-night: #fdf8ef; /* words on the dark */
  --kaira-gold-pale: #f9dfb2; /* the AI in KAIRA, top */
  --kaira-gold-warm: #dda45d; /* the AI in KAIRA, foot; hover edge; open line */
  --kaira-panel: #fffdf9; /* the drop-down's body */
  --kaira-umber: #3c2208; /* the drop-down's warm shadow */
  --kaira-why-hover: #fff6e8; /* a Why? link while hovered or open */
  --kaira-why-ink: #6e4820; /* its words then */
  --kaira-spark-1: #fff3dc; /* the flare's sparks */
  --kaira-spark-2: #ffd39a;
  --kaira-spark-3: #f7a24a;
  --kaira-spark-glow: #ffb15c;
  --kaira-ring: #ffd6a0; /* the flare's ring */
  --kaira-ring-glow: #ffb45a;
  --kaira-flare: #ffe0b0; /* the symbol's glow as it flares */
}

/* The Daily log's own palette (LOGTOOLS 4.2.5), moved here from style.css
   (audit 235 DS-22): light values extend the palette above; the dark ones
   wait for a theme switch. */
:root {
  /* Daily log colours (LOGTOOLS 4.2.5). Light values extend the palette above. */
  --log-row: #ffffff;
  --log-ink: #23272d;
  --log-muted: #5b616b;
  --log-muted-strong: #4a4f57;
  --log-line: #e7e9ed;
  --log-hour-bg: #d9e6e9;
  --log-hour-ink: #17363c;
  --log-hour-rule: #3d6f78;
  --log-break-bg: #eaf0f2;
  --log-break-ink: #2c3f45;
  --log-break-sub: #4f646b;
  --log-slot-bg: #f1ebfb;
  --log-slot-ink: #4c2a85;
  --log-slot-rule: #7c4dcc;
  --log-open-bg: #eef8f1;
  --log-open-ink: #1d5e3b;
  --log-open-rule: #3f9a67;
  --log-note-bg: #edf3fc;
  --log-note-ink: #1d4580;
  --log-note-rule: #3b6fc0;
  --log-closed-bg: #eceef1;
  --log-closed-ink: #4a515b;
  --log-closed-hatch: #d5d9df;
  --log-past-bg: #f6f7f8;
  --log-ok-bg: #e5f3eb;
  --log-ok-ink: #1b5e3b;
  --log-ok-edge: #2f8a57;
  --log-copy-bg: #fff0d6;
  --log-copy-ink: #7b4b06;
  --log-copy-edge: #b7790f;
  --log-copy-tint: #fffaf0;
  --log-fix-bg: #fde8e7;
  --log-fix-ink: #9b1c1c;
  --log-fix-edge: #d23c3c;
  --log-fix-tint: #fff5f4;
  --log-done-bg: #eef0f3;
  --log-done-ink: #3d4653;
  --log-done-edge: #7d8794;
  --log-hold-bg: #e9ecf2;
  --log-hold-ink: #37425a;
  --log-wait-bg: #f1f3f5;
  --log-wait-ink: #454d58;
  --log-mg-bg: #e0f1f4;
  --log-mg-ink: #0f5563;
  --log-lock-bg: #e8eaee;
  --log-lock-ink: #2f3742;
  --log-sponsor-bg: #f1ebfb;
  --log-sponsor-ink: #5a2d9c;
  --log-selected-bg: #fff0e4;
  --log-selected-edge: #c9560f;
  --log-drop-bg: #fff1e4;
  --log-drop-edge: #c9560f;
  --log-bar-track: #dfe3e8;
  --log-bar-room: #2f8a57;
  --log-bar-tight: #a86b08;
  --log-bar-full: #5b6675;
  --log-bar-over: #c73333;
  --log-hl-blue: #dbe8fd;
  --log-hl-green: #d8f1df;
  --log-hl-gold: #fbefc4;
  --log-hl-rose: #fbdde6;
  --log-hl-violet: #e9defb;
  --log-hl-teal: #d3eff0;
  --log-hl-lime: #e6f2c9;
  --log-hl-grey: #e6e8ec;
  --log-hl-both: #d9c6fb;
}
/*
 * Dark log colours, ready for a future dark theme. The app has no theme switch
 * yet, so nothing sets these attributes today and the log stays light. A future
 * switch sets data-theme="dark", or data-theme="system" to follow the device.
 * (Keyed to an attribute on purpose: a bare prefers-color-scheme rule would
 * darken the log alone inside the light app for people whose device is dark.)
 */
:root[data-theme="dark"] {
  --log-row: #15181d;
  --log-ink: #e6e8eb;
  --log-muted: #a7aeb8;
  --log-muted-strong: #b9c0c9;
  --log-line: #2a2f37;
  --log-hour-bg: #1c3237;
  --log-hour-ink: #cfe6ea;
  --log-hour-rule: #5fa5b0;
  --log-break-bg: #1d262a;
  --log-break-ink: #d3dde0;
  --log-break-sub: #a6b6bb;
  --log-slot-bg: #2a2140;
  --log-slot-ink: #d9c9f7;
  --log-slot-rule: #a482e8;
  --log-open-bg: #16291f;
  --log-open-ink: #a8e3c0;
  --log-open-rule: #4fb07a;
  --log-note-bg: #172338;
  --log-note-ink: #bcd2f5;
  --log-note-rule: #6f9be0;
  --log-closed-bg: #22252a;
  --log-closed-ink: #a3aab4;
  --log-closed-hatch: #30343b;
  --log-past-bg: #1a1d22;
  --log-ok-bg: #173a28;
  --log-ok-ink: #9fe0b9;
  --log-ok-edge: #4fb07a;
  --log-copy-bg: #3a2a0c;
  --log-copy-ink: #f5cf85;
  --log-copy-edge: #e0a93a;
  --log-copy-tint: #26200f;
  --log-fix-bg: #45191a;
  --log-fix-ink: #ffb4ae;
  --log-fix-edge: #ff6b61;
  --log-fix-tint: #2a1718;
  --log-done-bg: #262b33;
  --log-done-ink: #c3cad4;
  --log-done-edge: #7d8794;
  --log-hold-bg: #262c3a;
  --log-hold-ink: #c3cce0;
  --log-wait-bg: #23272e;
  --log-wait-ink: #c3cad4;
  --log-mg-bg: #123238;
  --log-mg-ink: #9fdbe6;
  --log-lock-bg: #2a2f37;
  --log-lock-ink: #d0d6de;
  --log-sponsor-bg: #2e2346;
  --log-sponsor-ink: #d6c6f7;
  --log-selected-bg: #3a2413;
  --log-selected-edge: #f08a4b;
  --log-drop-bg: #3f2616;
  --log-drop-edge: #f59a5c;
  --log-bar-track: #2f353e;
  --log-bar-room: #4fb07a;
  --log-bar-tight: #e0a93a;
  --log-bar-full: #9aa5b5;
  --log-bar-over: #ff6b61;
  --log-hl-blue: #1b2d4d;
  --log-hl-green: #173524;
  --log-hl-gold: #3a3110;
  --log-hl-rose: #45192a;
  --log-hl-violet: #2e2247;
  --log-hl-teal: #13393b;
  --log-hl-lime: #2b3512;
  --log-hl-grey: #2a2e35;
  --log-hl-both: #3f2c66;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --log-row: #15181d;
    --log-ink: #e6e8eb;
    --log-muted: #a7aeb8;
    --log-muted-strong: #b9c0c9;
    --log-line: #2a2f37;
    --log-hour-bg: #1c3237;
    --log-hour-ink: #cfe6ea;
    --log-hour-rule: #5fa5b0;
    --log-break-bg: #1d262a;
    --log-break-ink: #d3dde0;
    --log-break-sub: #a6b6bb;
    --log-slot-bg: #2a2140;
    --log-slot-ink: #d9c9f7;
    --log-slot-rule: #a482e8;
    --log-open-bg: #16291f;
    --log-open-ink: #a8e3c0;
    --log-open-rule: #4fb07a;
    --log-note-bg: #172338;
    --log-note-ink: #bcd2f5;
    --log-note-rule: #6f9be0;
    --log-closed-bg: #22252a;
    --log-closed-ink: #a3aab4;
    --log-closed-hatch: #30343b;
    --log-past-bg: #1a1d22;
    --log-ok-bg: #173a28;
    --log-ok-ink: #9fe0b9;
    --log-ok-edge: #4fb07a;
    --log-copy-bg: #3a2a0c;
    --log-copy-ink: #f5cf85;
    --log-copy-edge: #e0a93a;
    --log-copy-tint: #26200f;
    --log-fix-bg: #45191a;
    --log-fix-ink: #ffb4ae;
    --log-fix-edge: #ff6b61;
    --log-fix-tint: #2a1718;
    --log-done-bg: #262b33;
    --log-done-ink: #c3cad4;
    --log-done-edge: #7d8794;
    --log-hold-bg: #262c3a;
    --log-hold-ink: #c3cce0;
    --log-wait-bg: #23272e;
    --log-wait-ink: #c3cad4;
    --log-mg-bg: #123238;
    --log-mg-ink: #9fdbe6;
    --log-lock-bg: #2a2f37;
    --log-lock-ink: #d0d6de;
    --log-sponsor-bg: #2e2346;
    --log-sponsor-ink: #d6c6f7;
    --log-selected-bg: #3a2413;
    --log-selected-edge: #f08a4b;
    --log-drop-bg: #3f2616;
    --log-drop-edge: #f59a5c;
    --log-bar-track: #2f353e;
    --log-bar-room: #4fb07a;
    --log-bar-tight: #e0a93a;
    --log-bar-full: #9aa5b5;
    --log-bar-over: #ff6b61;
    --log-hl-blue: #1b2d4d;
    --log-hl-green: #173524;
    --log-hl-gold: #3a3110;
    --log-hl-rose: #45192a;
    --log-hl-violet: #2e2247;
    --log-hl-teal: #13393b;
    --log-hl-lime: #2b3512;
    --log-hl-grey: #2a2e35;
    --log-hl-both: #3f2c66;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --t-hover: 0ms;
    --t-menu: 0ms;
    --t-dialog: 0ms;
  }
}
