/* GENERATED by frontend/scripts/build-gate.mjs - edit src/tokens.css or src/gate.css. */
@font-face{font-family:'Source Sans 3 Variable';font-style:normal;font-display:swap;font-weight:200 900;src:url(fonts/source-sans-3-latin-ext-wght-normal.woff2) format('woff2-variations');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:'Source Sans 3 Variable';font-style:normal;font-display:swap;font-weight:200 900;src:url(fonts/source-sans-3-latin-wght-normal.woff2) format('woff2-variations');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:'Source Code Pro Variable';font-style:normal;font-display:swap;font-weight:200 900;src:url(fonts/source-code-pro-latin-ext-wght-normal.woff2) format('woff2-variations');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:'Source Code Pro Variable';font-style:normal;font-display:swap;font-weight:200 900;src:url(fonts/source-code-pro-latin-wght-normal.woff2) format('woff2-variations');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;}
/* ══════════════════════════════════════════════════════════════════════════
   Clockwork v2 - tokens and palettes. THE ONLY FILE ALLOWED TO CONTAIN COLORS
   (scripts/check-hex.mjs fails the build otherwise; palette.tsx swatches are
   the one other exception). GENERATED from iriszero/src/v2/tokens.css by
   C:\Temp\cw_make_tokens.py with the corrections below - regenerate, don't
   hand-edit. Plan: docs/Clockwork - GUI Redesign Plan.md.

   Deliberate departures from the branding standard (plan section 2) - do not "fix":
     1. Default palette is Halo (shared with Iris and Acuity), not Clockwork's
        September Cobalt. Cobalt stays in the cube.
     2. 13 palettes in the cube.
     3. Seven corrected values. The fleet's --text-3 fails 4.5:1 on surface-2
        in Verdigris, Midnight, Nebula, Synthwave, Obsidian and Quartz, and
        Quartz --accent-ink is 4.36:1 on its own tint. Minimum change to clear
        4.5:1 with 0.05 headroom, measured 2026-10-30 (C:\Temp\cw_contrast.py):
          verdigris --text-3     #5B7185 -> #586E81  (4.40 -> 4.61)
          midnight  --text-3     #7E77AE -> #867FB3  (4.12 -> 4.58)
          nebula    --text-3     #7079B4 -> #7A82B9  (4.08 -> 4.60)
          synthwave --text-3     #8E75B4 -> #9179B6  (4.34 -> 4.55)
          obsidian  --text-3     #6F7C88 -> #76838E  (4.18 -> 4.60)
          quartz    --text-3     #7B73A2 -> #6C658F  (3.71 -> 4.59)
          quartz    --accent-ink #6D3BEF -> #6A39E8  (4.36 -> 4.56 on tint)
     4. The mark cuts a canvas gap between block and rubber strip: --accent-2
        is within 1.0-1.75:1 of --accent on 11 of 13 palettes.
     5. The large mark keeps Halo's sky --accent-2 (1.97:1 on white) as a fill;
        the small mark and favicon use --accent-2-ink (3.83:1). Same trade as
        Iris's pupil.
     6. Source Sans 3 + Source Code Pro (figures only). Type floor 12px.
     7. Lively motion (5 of 5); all of it off under prefers-reduced-motion.

   Every palette block declares EVERY token. A token set only in the default
   block would leak into the others, because that block also matches :root.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Halo - Iris default (light). Measured WCAG 2026-10-02 ── */
:root, :root[data-pal="halo"] {
  --chrome:#F6F7FD; --bg:#FFFFFF; --surface:#FFFFFF; --surface-2:#EEF0FC; --surface-3:#F6F7FD;
  --border:#E6E8F5; --border-light:#D3D7EE;
  --text:#12133A;         /* 17.80:1 on canvas */
  --text-2:#3B3F6E;       /*  9.26:1 on chrome */
  --text-3:#5A5E8C;       /*  6.15:1 canvas, 5.75:1 chrome, 5.42:1 surface-2 */
  --accent:#4338CA;       /*  7.90:1 on white */
  --accent-ink:#3730A3;   /*  7.40:1 on the 14% accent tint (active nav) */
  --accent-2:#22C0F8;     /*  Iris Sky - fills and glow only; 2.11:1 on white, never text */
  --accent-2-ink:#0284C7; /*  4.10:1 on white - small mark pupil, chart lines */
  --on-accent:#FFFFFF;    /*  7.90:1 on accent */
  --green:#15803D; --yellow:#A16207; --red:#B91C1C; --purple:#7C3AED; --cyan:#0369A1;
  --shadow:18 19 58; --lift:1;
  color-scheme:light;
}
/* ── Eclipse - Halo's dark twin ── */
:root[data-pal="eclipse"] {
  --chrome:#110F42; --bg:#161452; --surface:#201D66; --surface-2:#2A2780; --surface-3:#24217A;
  --border:#2E2B78; --border-light:#3B38A0;
  --text:#EEF0FF;         /* 14.76:1 canvas, 12.98:1 surface */
  --text-2:#C9CBF2;       /* 11.37:1 chrome */
  --text-3:#A9ACE0;       /*  7.69:1 canvas, 5.68:1 surface-2 */
  --accent:#22C0F8;       /*  6.97:1 on surface */
  --accent-ink:#7FDBFF;   /*  9.09:1 on the 14% tint */
  --accent-2:#9A9CFF; --accent-2-ink:#9A9CFF; /* 6.83:1 on canvas */
  --on-accent:#04121C;    /*  8.99:1 on accent */
  --green:#4ADE80; --yellow:#FDE047; --red:#FF8A94; --purple:#B79CFF; --cyan:#7FDBFF;
  --shadow:0 0 0; --lift:0;
  color-scheme:dark;
}
/* ── The house palettes - values verbatim from Forge frontend/src/index.css ── */
:root[data-pal="cobalt"] {
  --chrome:#EFF3FC; --bg:#F7F9FE; --surface:#FFFFFF; --surface-2:#E7EDFA; --surface-3:#F2F6FF;
  --border:#E0E7F6; --border-light:#C9D4EA;
  --text:#0C1222; --text-2:#33405C; --text-3:#5D6A87;
  --accent:#2447F0; --accent-ink:#2447F0; --accent-2:#0F62CF; --accent-2-ink:#0F62CF; --on-accent:#FFFFFF;
  --green:#0B7A4B; --yellow:#B45D07; --red:#D31145; --purple:#6D3BEF; --cyan:#0F62CF;
  --shadow:12 18 34; --lift:1;
  color-scheme:light;
}
:root[data-pal="verdigris"] {
  --chrome:#F4F7F9; --bg:#EEF2F5; --surface:#FFFFFF; --surface-2:#EAF0F3; --surface-3:#F4F7F9;
  --border:#E3E9EE; --border-light:#D3DCE3;
  --text:#10243A; --text-2:#33475B; --text-3:#586E81;
  --accent:#0E7490; --accent-ink:#0B6680; --accent-2:#C2410C; --accent-2-ink:#C2410C; --on-accent:#FFFFFF;
  --green:#15803D; --yellow:#A16207; --red:#B91C1C; --purple:#7C3AED; --cyan:#2C6FD6;
  --shadow:16 36 58; --lift:1;
  color-scheme:light;
}
:root[data-pal="kiln"] {
  --chrome:#060A17; --bg:#0A1022; --surface:#141D38; --surface-2:#1B2546; --surface-3:#111930;
  --border:#1F2A4A; --border-light:#2C3A62;
  --text:#F0F4FF; --text-2:#B9C3DE; --text-3:#8C9ABD;
  --accent:#FFA834; --accent-ink:#FFA834; --accent-2:#2EE6E6; --accent-2-ink:#2EE6E6; --on-accent:#1A0E00;
  --green:#4ADE80; --yellow:#FDE047; --red:#F87171; --purple:#A78BFA; --cyan:#2EE6E6;
  --shadow:0 0 0; --lift:0;
  color-scheme:dark;
}
:root[data-pal="lagoon"] {
  --chrome:#041016; --bg:#06171E; --surface:#0E2731; --surface-2:#14323E; --surface-3:#1A3B48;
  --border:#173440; --border-light:#24495A;
  --text:#ECFBFA; --text-2:#BFDCDD; --text-3:#8DB1BB;
  --accent:#3BF2C8; --accent-ink:#3BF2C8; --accent-2:#FF7D6B; --accent-2-ink:#FF7D6B; --on-accent:#03140F;
  --green:#4BE39A; --yellow:#FFC857; --red:#FF6B7D; --purple:#B79CFF; --cyan:#5AD7F5;
  --shadow:0 0 0; --lift:0;
  color-scheme:dark;
}
:root[data-pal="ember"] {
  --chrome:#150F0D; --bg:#0C0908; --surface:#191211; --surface-2:#221917; --surface-3:#2A1F1C;
  --border:#2C201D; --border-light:#43302B;
  --text:#FBEEEA; --text-2:#DED0CA; --text-3:#AE9D96;
  --accent:#FF6B5C; --accent-ink:#FF6B5C; --accent-2:#FFA94D; --accent-2-ink:#FFA94D; --on-accent:#1A0A07;
  --green:#3FD9A0; --yellow:#FFC24B; --red:#FF4F5E; --purple:#C08CFF; --cyan:#4FC8E0;
  --shadow:0 0 0; --lift:0;
  color-scheme:dark;
}
/* Aurora = Cadence's default, officially renamed Aurora (Nick, 2026-10-02). Iris uses key "aurora". */
:root[data-pal="aurora"] {
  --chrome:#09091A; --bg:#0E0E24; --surface:#1A1A3C; --surface-2:#232350; --surface-3:#2B2B5E;
  --border:#26264E; --border-light:#36366A;
  --text:#F2F1FF; --text-2:#CFCDEA; --text-3:#A3A1C9;
  --accent:#2EF0B6; --accent-ink:#2EF0B6; --accent-2:#C38BFF; --accent-2-ink:#C38BFF; --on-accent:#04140F;
  --green:#3BF0B0; --yellow:#FFC25C; --red:#FF5E7A; --purple:#C38BFF; --cyan:#22D3EE;
  --shadow:0 0 0; --lift:0;
  color-scheme:dark;
}
:root[data-pal="midnight"] {
  --chrome:#0F0D26; --bg:#0A0918; --surface:#141131; --surface-2:#1B1741; --surface-3:#1A1740;
  --border:#251F52; --border-light:#3A3277;
  --text:#ECEAFF; --text-2:#B3ADD8; --text-3:#867FB3;
  /* white on #9D7CFF is 3.11:1 and fails AA; canvas ink is 6.35:1 (Monitor, 2026-09-30) */
  --accent:#9D7CFF; --accent-ink:#9D7CFF; --accent-2:#5CC8FF; --accent-2-ink:#5CC8FF; --on-accent:#0A0918;
  --green:#3BE8B0; --yellow:#FFB347; --red:#FF5C8A; --purple:#C77DFF; --cyan:#5CC8FF;
  --shadow:0 0 0; --lift:0;
  color-scheme:dark;
}
:root[data-pal="nebula"] {
  --chrome:#0A0B24; --bg:#060617; --surface:#0E1030; --surface-2:#151940; --surface-3:#141838;
  --border:#1C2154; --border-light:#2C3478;
  --text:#E6ECFF; --text-2:#A6B0DC; --text-3:#7A82B9;
  --accent:#00E0FF; --accent-ink:#00E0FF; --accent-2:#7B9BFF; --accent-2-ink:#7B9BFF; --on-accent:#0A0F1A;
  --green:#2FF7A6; --yellow:#FFC24B; --red:#FF4F7E; --purple:#C77DFF; --cyan:#00E0FF;
  --shadow:0 0 0; --lift:0;
  color-scheme:dark;
}
:root[data-pal="synthwave"] {
  --chrome:#120827; --bg:#0D0619; --surface:#1B0F31; --surface-2:#251140; --surface-3:#22103C;
  --border:#301852; --border-light:#472573;
  --text:#F6EBFF; --text-2:#C4AEDC; --text-3:#9179B6;
  /* white on #FF48D0 is 2.96:1 (fails); canvas ink is 6.71:1 */
  --accent:#FF48D0; --accent-ink:#FF48D0; --accent-2:#7B61FF; --accent-2-ink:#8F78FF; --on-accent:#0D0619;
  --green:#2BFFC7; --yellow:#FFAA2B; --red:#FF4260; --purple:#C77DFF; --cyan:#7B61FF;
  --shadow:0 0 0; --lift:0;
  color-scheme:dark;
}
:root[data-pal="obsidian"] {
  --chrome:#0A0E12; --bg:#07090C; --surface:#0D1116; --surface-2:#12181F; --surface-3:#131A22;
  --border:#1A2028; --border-light:#2A333E;
  --text:#F2F5F8; --text-2:#A7B2BD; --text-3:#76838E;
  --accent:#4FD1C5; --accent-ink:#4FD1C5; --accent-2:#6AA6F0; --accent-2-ink:#6AA6F0; --on-accent:#0A0F1A;
  --green:#3ECF8E; --yellow:#F0B23D; --red:#FF5C5C; --purple:#A78BFA; --cyan:#6AA6F0;
  --shadow:0 0 0; --lift:0;
  color-scheme:dark;
}
:root[data-pal="quartz"] {
  --chrome:#F3F1FA; --bg:#F6F5FB; --surface:#FFFFFF; --surface-2:#EEEBF8; --surface-3:#F5F2FE;
  --border:#E5E1F2; --border-light:#CDC6E6;
  --text:#171230; --text-2:#494272; --text-3:#6C658F;
  --accent:#6D3BEF; --accent-ink:#6A39E8; --accent-2:#2A5EC4; --accent-2-ink:#2A5EC4; --on-accent:#FFFFFF;
  --green:#0C8A60; --yellow:#A2650B; --red:#C22553; --purple:#8B4BE8; --cyan:#2A5EC4;
  --shadow:23 18 48; --lift:1;
  color-scheme:light;
}

/* ── Semantic status colors: FIXED hue in every palette, treatment flips ──
   Never wire these to --accent. Code passes a level; CSS picks the color.
   Light (ink on dim): ok 6.34, warn 6.20, bad 5.66, info 7.56, violet 7.59.
   Dark (ink on a 16% tint of itself over the surface): Forge measured kiln
   ok 5.28 warn 5.59 bad 4.87 info 4.94 violet 4.77; Eclipse ok 5.59 warn 5.87
   bad 5.02 info 5.05 (Iris, 2026-10-02). */
:root {
  --ok-ink:#166534;     --ok-dim:#E7F5EC;
  --warn-ink:#854D0E;   --warn-dim:#FBF3E1;
  --bad-ink:#B91C1C;    --bad-dim:#FDECEC;
  --info-ink:#1E40AF;   --info-dim:#E8EFFD;
  --violet-ink:#5B21B6; --violet-dim:#EFE9FD;
}
:root[data-pal="eclipse"], :root[data-pal="kiln"], :root[data-pal="lagoon"], :root[data-pal="ember"],
:root[data-pal="aurora"], :root[data-pal="midnight"], :root[data-pal="nebula"],
:root[data-pal="synthwave"], :root[data-pal="obsidian"] {
  --ok-ink:#3ECF8E;     --ok-dim:color-mix(in srgb,#3ECF8E 16%,transparent);
  --warn-ink:#F0B23D;   --warn-dim:color-mix(in srgb,#F0B23D 16%,transparent);
  --bad-ink:#FF8A94;    --bad-dim:color-mix(in srgb,#FF8A94 16%,transparent);
  --info-ink:#7DB4F5;   --info-dim:color-mix(in srgb,#7DB4F5 16%,transparent);
  --violet-ink:#B79CFF; --violet-dim:color-mix(in srgb,#B79CFF 16%,transparent);
}

/* ── Derived tokens (no new colors: everything mixes the palette above) ── */
:root {
  --accent-dim: color-mix(in srgb, var(--accent) 14%, transparent);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent);
  --cube-edge: color-mix(in srgb, var(--text) 32%, transparent);
  --ease: cubic-bezier(.2,.8,.2,1);
  --spring: cubic-bezier(.2,.9,.2,1.15);
  --font: 'Source Sans 3 Variable', 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Source Code Pro Variable', 'Source Code Pro', ui-monospace, 'Cascadia Mono', Consolas, monospace;
}
/* Gate pages (sign-in, error, request link) - server-rendered Jinja, styled
   from the same tokens as the SPA. build-gate.mjs prepends tokens.css and the
   self-hosted fonts and writes static/gate/gate.css. Wired into
   templates/login.html (Nov 1, ahead of cutover at Nick's ask): the sign-in
   page is shared by v1 and v2 and carries no v1 data. */
* { box-sizing:border-box; }
html, body { margin:0; min-height:100%; }
body { font-family:var(--font); font-size:14px; line-height:1.55; color:var(--text); background:var(--bg); -webkit-font-smoothing:antialiased; }
.gate {
  min-height:100vh; display:grid; place-items:center; padding:24px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 42%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    var(--bg);
}
.gate-card {
  width:400px; max-width:100%; background:var(--surface); border:1px solid var(--border); border-radius:14px;
  padding:34px 32px 28px; text-align:center; box-shadow:0 26px 70px rgb(var(--shadow) / .16);
  display:flex; flex-direction:column; align-items:center;
}
.wordmark { display:flex; flex-direction:column; align-items:center; line-height:1.05; margin:14px 0 6px; }
.wordmark-name { font-weight:800; letter-spacing:.07em; font-size:21px; color:var(--text); }
.wordmark-sub { font-size:11px; font-weight:700; letter-spacing:.2em; color:var(--text-3); margin-top:3px; }
.gate-sub { color:var(--text-3); margin:6px 0 0; }
.gate-err { margin-top:14px; color:var(--bad-ink); background:var(--bad-dim); border-radius:8px; padding:9px 11px; text-align:left; width:100%; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:7px; width:100%; margin-top:16px; padding:11px 14px; border-radius:7px; border:1px solid var(--accent); background:var(--accent); color:var(--on-accent); font-weight:600; text-decoration:none; }
.btn:hover { filter:brightness(1.06); }
.btn:focus-visible { outline:none; box-shadow:0 0 0 3px var(--ring); }
.btn:disabled { opacity:.55; cursor:not-allowed; }
.gate-mark { display:block; }
h1.wordmark { font-size:inherit; font-weight:inherit; }
.gate-note { margin:18px 0 0; font-size:12px; color:var(--text-3); }

/* Request link page (stage 4b): public, no sign-in. */
.gate-card.req-card { width:640px; text-align:left; align-items:stretch; }
.req-card .gate-mark { align-self:flex-start; }
.req-org { margin:10px 0 0; font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--text-3); }
.req-title { font-size:21px; margin:6px 0 2px; }
.req-form { margin-top:14px; }
.req-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px 14px; }
.req-field { display:flex; flex-direction:column; gap:5px; font-size:12.5px; font-weight:600; color:var(--text-2); }
.req-field.wide { grid-column:1 / -1; }
.req-field input, .req-field select, .req-field textarea { font:inherit; font-size:14px; font-weight:400; color:var(--text); padding:8px 10px;
  border:1px solid var(--border); border-radius:8px; background:var(--surface); }
.req-field input:focus, .req-field select:focus, .req-field textarea:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--ring); }
.req-field [aria-invalid="true"] { border-color:var(--bad-ink); background:var(--bad-dim); }
@media (max-width: 560px) { .req-grid { grid-template-columns:1fr; } }