/* iTech Workspace — design tokens for the gateway-served pages.
 *
 * Refined kit, November 2026: a light working surface, navy navigation, an
 * indigo accent and one colour language — blue activity, violet building, teal
 * published or completed, amber pending, rose problems. Inter for text, Sora
 * for headings and display type. Both are self-hosted (SIL OFL, licences beside
 * the files): the portal must not call fonts.googleapis.com.
 *
 * Light is the default and lives on bare :root, so a page with no script and no
 * stored preference is light. Dark is a stored choice: theme-init.js puts
 * `.dark` on <html> before first paint.
 *
 * Two sets of names share this sheet. The kit's own (--paper, --muted, --line,
 * --nav, --chart-*, --soft-*, …) are what new markup uses. The earlier names
 * (--solid, --surface*, --border*, --ink-2/3, --ok, --warn, --priv, --glass*)
 * stay, mapped onto the new palette, because the older pages still read them.
 * Keep in step with portal-ui/src/styles/itech-tokens.css.
 */
@font-face{font-family:'Inter';font-style:normal;font-weight:100 900;font-display:swap;
  src:url('/auth/assets/fonts/inter-variable.woff2') format('woff2');}
@font-face{font-family:'Sora';font-style:normal;font-weight:100 800;font-display:swap;
  src:url('/auth/assets/fonts/sora-latin.woff2') format('woff2');}

.font-display{font-family:var(--display);}
.font-ui{font-family:var(--font-sans);}
.font-data{font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;}

/* ── light (default) ────────────────────────────────────────────────────── */
:root {
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: Sora, Inter, -apple-system, 'Segoe UI', sans-serif;

  /* Surfaces */
  --paper: #fff;
  --canvas: #fff;
  --dashboard-bg: #f4f6fb;
  --soft: #f5f7fb;
  --soft-2: #e9edf5;
  /* Text */
  --ink: #1a2438;
  --muted: #56637d;
  --faint: #66748f;
  --on-accent: #fff;
  /* Lines */
  --line: #e3e8f1;
  --line-strong: #c6d0e0;
  /* Accent */
  --accent: #4654c8;
  --accent-hover: #3a47b0;
  --accent-soft: #eceefc;
  /* Navigation — the same navy in both themes, a shade deeper in dark */
  --nav: #15233d;
  --nav-ink: #f0f4fb;
  --nav-muted: #b5c2d9;
  --nav-active: #86a2e02e;
  --nav-line: #ffffff17;
  --nav-mark: #8fb0ff;
  /* Colour roles: strong */
  --chart-blue: #3b76e0;
  --chart-violet: #7c5cd6;
  --chart-teal: #129b8b;
  --chart-amber: #dd9a1f;
  --chart-rose: #d4557d;
  /* Colour roles: text on tints */
  --ink-blue: #2255b8;
  --ink-violet: #5b3fb4;
  --ink-teal: #0a6d62;
  --ink-amber: #85500a;
  --ink-rose: #a52e56;
  /* Colour roles: tints */
  --soft-blue: #ebf2fe;
  --soft-violet: #f1ecfc;
  --soft-teal: #e5f6f2;
  --soft-amber: #fdf3de;
  --soft-rose: #fcebf1;
  /* Status */
  --success: #0a6d62;
  --success-bg: #e5f6f2;
  --success-line: #a9ddd3;
  --warning: #85500a;
  --warning-bg: #fdf3de;
  --warning-line: #ecd197;
  --danger: #a52e56;
  --danger-bg: #fcebf1;
  --danger-line: #efc2d1;
  /* Shape and depth */
  --radius: 8px;
  --row-pad: 12px;
  --shadow: 0 14px 48px #15263e1c;
  --shadow-card: 0 1px 2px #1a24380d;
  --shadow-pop: 0 18px 50px #15233d2e, 0 2px 6px #15233d14;

  /* Earlier names, on the new palette. */
  --bg-signin: url('/auth/assets/bg-signin-light.jpg');
  --bg-app: none;
  --solid: var(--paper);
  --surface: var(--paper);
  --surface-2: var(--paper);
  --surface-3: var(--soft);
  --border: var(--line);
  --border-2: var(--line-strong);
  --ink-2: var(--muted);
  --ink-3: var(--faint);
  --accent-ink: var(--on-accent);
  --accent-h: var(--accent-hover);
  --accent-line: #b9c0ee;
  --ok: var(--ink-teal);
  --warn: var(--ink-amber);
  --priv: var(--ink-violet);
  --ok-soft: var(--soft-teal);
  --warn-soft: var(--soft-amber);
  --danger-soft: var(--soft-rose);
  --priv-soft: var(--soft-violet);
  --shadow-1: var(--shadow-card);
  --shadow-2: var(--shadow);
  --scrim: rgba(18, 35, 58, 0.4);
  --glass: rgba(255, 255, 255, 0.6);
  --glass-bar: rgba(255, 255, 255, 0.74);
  --glass-hi: rgba(255, 255, 255, 0.95);
  --glass-shadow: inset 0 1px 0 var(--glass-hi), 0 24px 60px rgba(40, 58, 120, 0.16);
  --glass-bar-shadow: inset 0 -1px 0 var(--border), inset 0 1px 0 var(--glass-hi);
  --ring: #4654c859;

  /* The identity gradients. --ai is only ever a 1px masked stroke or a small
     tile fill — never a wash behind text. */
  --ai: linear-gradient(135deg, var(--chart-violet) 0%, var(--accent) 55%, var(--chart-teal) 100%);
  --spectrum: linear-gradient(90deg, var(--chart-rose), var(--chart-amber), var(--chart-teal), var(--chart-blue));

  /* comfortable — the default density */
  --rh: 44px;
  --cpad: 20px;
  --fs: 14px;
  --gap: 16px;
}

/* ── dark (a stored choice) ─────────────────────────────────────────────── */
:root.dark {
  --paper: #1b2330;
  --canvas: #161e2b;
  --dashboard-bg: #161f2d;
  --soft: #242f40;
  --soft-2: #2d3b50;
  --ink: #edf2fa;
  --muted: #a8b6cc;
  --faint: #93a4be;
  --on-accent: #142239;
  --line: #303e53;
  --line-strong: #536885;
  --accent: #a8b3ff;
  --accent-hover: #c0c8ff;
  --accent-soft: #313953;
  --nav: #101b2d;
  --nav-ink: #e8eff9;
  --nav-muted: #a1b4ce;
  --nav-active: #a5bbdc28;
  --chart-blue: #84aaff;
  --chart-violet: #b89aed;
  --chart-teal: #69ccbc;
  --chart-amber: #eac078;
  --chart-rose: #e6a0b6;
  --ink-blue: #b4ccff;
  --ink-violet: #d2c0f7;
  --ink-teal: #93e0d3;
  --ink-amber: #f1d093;
  --ink-rose: #f3b9cb;
  --soft-blue: #263955;
  --soft-violet: #3a304f;
  --soft-teal: #213e3b;
  --soft-amber: #443a29;
  --soft-rose: #4a303e;
  --success: #93e0d3;
  --success-bg: #213e3b;
  --success-line: #3f6f68;
  --warning: #f1d093;
  --warning-bg: #443a29;
  --warning-line: #74613e;
  --danger: #f3b9cb;
  --danger-bg: #4a303e;
  --danger-line: #7b4a5e;
  --shadow: 0 14px 48px #0004;
  --shadow-card: none;
  --shadow-pop: 0 18px 50px #0007;

  --bg-signin: url('/auth/assets/bg-signin-dark.png');
  --accent-line: #5a6396;
  --scrim: rgba(0, 0, 0, 0.5);
  --glass: rgba(18, 19, 28, 0.6);
  --glass-bar: rgba(18, 28, 58, 0.66);
  --glass-hi: rgba(255, 255, 255, 0.16);
  --glass-shadow: inset 0 1px 0 var(--glass-hi), 0 28px 70px rgba(0, 0, 0, 0.45);
  --ring: #a8b3ff73;
  color-scheme: dark;
}

:root[data-density='operational'] { --rh: 38px; --cpad: 14px; --fs: 13px; --gap: 10px; }
:root[data-density='focused']     { --rh: 48px; --cpad: 24px; --fs: 15px; --gap: 20px; }

/* Motion is 120–200ms ease throughout; honour the OS setting. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── surfaces ───────────────────────────────────────────────────────────── */
/* Three glass weights from the handoff. -webkit- is duplicated on every one:
   Safari still needs the prefix, and without it the panel renders as a flat
   translucent box with no blur at all. */
.itech-glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  backdrop-filter: blur(28px) saturate(1.4);
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--border);
}
.itech-glass-bar {
  background: var(--glass-bar);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: var(--glass-bar-shadow);
}
.itech-card {
  background: var(--surface);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid var(--border);
}

/* The AI gradient as a 1px ring, never a fill behind text: the gradient paints
   the padding box and a mask punches out the content box, leaving the border. */
.itech-ai-stroke { position: relative; }
.itech-ai-stroke::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--ai);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* The spectrum hairline — once per screen, on a panel's top edge. */
.itech-spectrum-edge { position: relative; }
.itech-spectrum-edge::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--spectrum);
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  pointer-events: none;
}

/* Every control carries the same focus ring. */
.itech-focus:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* ── motion ─────────────────────────────────────────────────────────────── */
@keyframes itech-shimmer { from { background-position: -420px 0; } to { background-position: 420px 0; } }
@keyframes itech-pulse   { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
@keyframes itech-rise    { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.itech-skeleton {
  background: linear-gradient(90deg, var(--border), var(--border-2), var(--border));
  background-size: 420px 100%;
  animation: itech-shimmer 1.4s linear infinite;
}
.itech-pulse { animation: itech-pulse 1.4s ease-in-out infinite; }
.itech-rise  { animation: itech-rise .16s ease-out both; }

/* ── classes for the static auth pages ──────────────────────────────────────
   These pages run under `style-src-attr 'none'` — inline style attributes are
   deliberately blocked — so every token-driven value used by login.html has to
   be a real class. Same reason util.css exists. Do not reintroduce style="".  */
.i-art-signin{background-image:var(--bg-signin);background-size:cover;background-position:center;}
.i-scrim{background:var(--scrim);-webkit-backdrop-filter:blur(6px) saturate(1.3);backdrop-filter:blur(6px) saturate(1.3);}

.i-ink{color:var(--ink);} .i-ink-2{color:var(--ink-2);} .i-ink-3{color:var(--ink-3);}
.i-accent{color:var(--accent);}
.i-hairline{border-color:var(--border);}

.i-eyebrow{font-family:var(--font-sans);font-size:11px;font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:var(--ink-3);}
.i-eyebrow-rule{display:inline-block;width:34px;height:2px;border-radius:2px;background:var(--spectrum);}

.i-h1{font-family:var(--display);font-weight:600;
  font-size:clamp(36px,4.4vw,54px);line-height:1.04;letter-spacing:-.03em;color:var(--ink);}
.i-h2{font-family:var(--display);font-weight:600;letter-spacing:-.01em;color:var(--ink);}

.i-tile{display:grid;place-items:center;border-radius:9px;background:var(--accent-soft);color:var(--accent);}
.i-tile-lg{width:42px;height:42px;border-radius:12px;}
.i-tile-sm{width:32px;height:32px;}
.i-tile-ai{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:var(--ai);color:#fff;}

.i-panel{border-radius:16px;background:var(--glass);
  -webkit-backdrop-filter:blur(28px) saturate(1.4);backdrop-filter:blur(28px) saturate(1.4);
  box-shadow:var(--glass-shadow);}

/* Google button — the handoff's exact shape: 48px, 40px/1fr/40px, centred label. */
.i-gbtn{display:grid;grid-template-columns:40px 1fr 40px;align-items:center;height:48px;
  border-radius:12px;background:#FFFFFF;border:1px solid #DADCE0;text-decoration:none;
  transition:box-shadow .15s ease, transform .15s ease;}
.i-gbtn:hover{transform:translateY(-1px);box-shadow:0 6px 18px -6px var(--ring);}
.i-gchip{display:grid;place-items:center;width:32px;height:32px;border-radius:999px;background:#F1F3F4;margin-left:8px;}
.i-glabel{text-align:center;font-size:14px;font-weight:600;color:#1F1F1F;}
.i-mark-tile{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:var(--accent);color:var(--accent-ink);}
.i-divider{display:inline-block;width:1px;height:16px;background:var(--border-2);}
.i-btn-primary{border-radius:11px;background:var(--accent);color:var(--accent-ink);
  font-family:var(--font-sans);font-weight:600;font-size:14px;
  transition:background-color .15s ease,transform .15s ease;}
.i-btn-primary:hover{background:var(--accent-h);transform:translateY(-1px);}

/* ── sign-in: interactive example, layer tabs, dialog ────────────────────── */
.i-step{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 11px;border-radius:8px;
  border:1px solid transparent;background:transparent;color:var(--ink-2);
  font-family:var(--font-sans);font-size:12.5px;font-weight:600;
  cursor:pointer;transition:background-color .15s ease,color .15s ease;}
.i-step:hover{color:var(--ink);}
.i-step[aria-pressed="true"]{background:var(--accent-soft);color:var(--ink);}
.i-step-n{display:grid;place-items:center;width:18px;height:18px;border-radius:999px;flex:none;
  background:var(--border);color:inherit;font-family:var(--font-sans);font-size:10px;font-weight:600;}
.i-step[aria-pressed="true"] .i-step-n{background:var(--accent);color:var(--accent-ink);}

/* No reserved height. It was 212px, then 172px, and on the first step — which
   is two short lines — that was ~96px of empty panel. The steps differ enough
   in length that no single figure avoids a gap on one of them, so the panel
   sizes to its step and the slight resize is the honest option. */
.i-demo-body{min-height:0;}
.i-note{display:flex;align-items:center;gap:9px;padding:11px 13px;border-radius:11px;
  border:1px dashed var(--border-2);}
.i-dots{display:inline-flex;gap:4px;}
.i-dots i{width:5px;height:5px;border-radius:999px;background:var(--accent);animation:itech-pulse 1.4s ease-in-out infinite;}
.i-dots i:nth-child(2){animation-delay:.25s;} .i-dots i:nth-child(3){animation-delay:.5s;}
/* Tight enough that step two — the tallest — still fits the one screen the
   rest of the page is built to. */
.i-day{border:1px solid var(--border);border-radius:11px;padding:9px 10px;background:var(--surface-3);}
.i-review{border:1px solid var(--border);border-radius:11px;padding:13px;background:var(--surface-3);}
.i-review-done{border:1px solid var(--warn);border-radius:11px;padding:13px;background:var(--warn-soft);}
.i-warn{color:var(--warn);}

.i-layer{height:32px;padding:0 10px;border-radius:999px;border:1px solid var(--border-2);background:transparent;
  color:var(--ink-2);font-family:var(--font-sans);font-size:12px;font-weight:600;
  cursor:pointer;transition:background-color .15s ease,color .15s ease,border-color .15s ease;}
.i-layer{display:inline-flex;align-items:center;justify-content:center;gap:6px;}
.i-layer:hover{color:var(--ink);}
.i-layer[aria-pressed="true"]{background:var(--accent-soft);border-color:var(--accent);color:var(--ink);}

.i-btn-secondary{border-radius:11px;background:transparent;border:1px solid var(--border-2);color:var(--ink);
  font-family:var(--font-sans);font-weight:600;font-size:13px;cursor:pointer;
  transition:border-color .15s ease,color .15s ease;}
.i-btn-secondary:hover{border-color:var(--accent);color:var(--accent);}
.i-modal-scrim{background:rgba(0,0,0,.5);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);}

.i-well{border:1px solid var(--border);border-radius:14px;background:var(--surface-2);}
.i-layer{background:var(--surface);}

/* Shared platform pages (status, council, admin, auth) — same tokens as the SPA. */
.i-surface-2{background:var(--surface-2);}
.i-surface-3{background:var(--surface-3);}
.i-hairline-2{border-color:var(--border-2);}
.i-bg-accent{background:var(--accent);color:var(--accent-ink);}
.i-divider-bg{background:var(--border);}
.i-danger{color:var(--danger);}

/* The page ground. Replaces the hard-coded `bg-[#0c0a1a] text-white` the auth
   pages carried, which pinned them to dark no matter what the toggle said —
   light mode left white text on a near-black body. Both halves are tokens, so
   the class follows the theme like everything else. */
.i-body{background:var(--solid);color:var(--ink);}

/* ── sign-in card: form controls and the email disclosure ───────────────── */
/* A field on glass. The old markup used bg-slate-50 with a dark: twin, which is
   the pattern that kept coming back white in dark mode; a token surface has one
   definition and follows the theme. */
.i-input{height:40px;padding:0 12px;border-radius:10px;background:var(--surface-3);
  border:1px solid var(--border);color:var(--ink);font-size:13.5px;font-weight:500;
  transition:border-color .15s ease,box-shadow .15s ease;}
.i-input::placeholder{color:var(--ink-3);font-weight:400;}
.i-input:focus{outline:none;border-color:var(--accent-line);box-shadow:0 0 0 3px var(--ring);}
.i-flabel{display:block;margin-bottom:6px;font-size:11px;font-weight:700;letter-spacing:.06em;
  text-transform:uppercase;color:var(--ink-2);}
.i-danger-soft{background:var(--danger-soft);border-color:var(--danger);}

/* The credentials disclosure. Full width so its hit area matches the button
   above it, and the chevron turns to show which way it goes. */
.i-disclosure{display:flex;width:100%;align-items:center;justify-content:center;gap:6px;
  height:34px;margin-top:10px;border-radius:9px;background:transparent;border:none;
  color:var(--ink-2);font-size:12.5px;font-weight:600;cursor:pointer;
  transition:color .15s ease,background-color .15s ease;}
.i-disclosure:hover{color:var(--ink);background:var(--surface-3);}
.i-disclosure-chevron{transition:transform .16s ease;}
.i-disclosure[aria-expanded="true"] .i-disclosure-chevron{transform:rotate(180deg);}

/* Secondary action — outlined, so it sits beside a heading without competing
   with the accent-filled primary on the card. */
.i-btn-ghost{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 12px;
  border-radius:9px;background:var(--surface-3);border:1px solid var(--border-2);
  color:var(--ink);font-size:12.5px;font-weight:600;cursor:pointer;
  transition:border-color .15s ease,background-color .15s ease;}
.i-btn-ghost:hover{border-color:var(--accent);background:var(--accent-soft);color:var(--accent);}

/* ── chrome ─────────────────────────────────────────────────────────────── */
/* The top bar. A raised surface with a hairline under it, 60px tall in both
   themes — the prototype's proportion. */
.i-bar{height:60px;background:var(--surface-2);
  -webkit-backdrop-filter:blur(18px) saturate(1.3);backdrop-filter:blur(18px) saturate(1.3);}

/* Square icon button. Every control at this end of the bar is the same 34px
   square, so the right side reads as a set rather than a row of odd chips. */
.i-iconbtn{display:inline-flex;align-items:center;justify-content:center;gap:6px;
  width:34px;height:34px;border-radius:10px;background:var(--surface-3);
  border:1px solid var(--border);color:var(--ink-2);cursor:pointer;text-decoration:none;
  transition:color .15s ease,border-color .15s ease,background-color .15s ease;}
.i-iconbtn:hover{color:var(--ink);border-color:var(--border-2);}

/* The page footer: three parts on one line, quiet. */
.i-foot{border-top:1px solid var(--border);color:var(--ink-3);font-size:11.5px;}
.i-footlink{background:none;border:none;padding:0;cursor:pointer;color:var(--ink-2);
  font-size:11.5px;font-weight:600;text-decoration:none;transition:color .15s ease;}
.i-footlink:hover{color:var(--accent);text-decoration:underline;}

/* Worked example: the arrow between steps, and the roster's people. */
.i-step-arrow{color:var(--ink-3);font-size:13px;line-height:1;}
.i-person{display:flex;align-items:center;gap:8px;margin-top:6px;color:var(--ink);font-size:12.5px;}
.i-avatar{display:grid;place-items:center;width:20px;height:20px;border-radius:999px;
  background:var(--accent-soft);color:var(--accent);font-size:10px;font-weight:700;}
/* One column of days, each laid out as a row — the same data, listed. */
.i-roster-list .i-day{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;}
.i-roster-list .i-person{margin-top:0;}
