/* The sign-in page (login.html), design 7 "Glass Board" (the owner's pick, 11/12/26): BuildIQ's still aurora
   sky; on the left a board of frosted tiles (the planning-board drawing with the IntrepidCS MRP nameplate, then
   "Forgot your password?" and "What's new"), on the right the frosted glass card with the IQ Cube in its lens.
   Loaded by login.html only, after buildiq.css, so its tokens are this page's own. Built with the
   ui-ux-pro-max skill's rules: 48 px fields, 16 px text, 4.5:1 contrast in both themes, reduced motion. */
/* ---------- Tokens: light (default) ---------- */
:root {
  color-scheme: light;
  --bg: #eef0fb; --ink: #12142b; --muted: #4e5378; --line: #e4e6f3; --line-strong: #d3d6ea;
  --brand: #c8161d; --brand-text: #c8161d; --accent: #5b4dff; --accent-deep: #4338ca; --accent-ink: #ffffff;
  --link: #4338ca;
  --focus: #4338ca; --focus-halo: rgba(91, 77, 255, .22); --glow-c: rgba(91, 77, 255, .45);
  --btn-grad: linear-gradient(135deg, #5b4dff 0%, #4f46e5 50%, #2563eb 100%);
  --btn-sheen: rgba(255, 255, 255, .3);
  --title-1: #1a1452; --title-2: #3b2fd6; --title-3: #0f5568;
  --icon: #1f6fd1; --cube-shadow: rgba(200, 22, 29, .28);
  --card: rgba(255, 255, 255, .84); --card-solid: #ffffff; --card-edge: rgba(255, 255, 255, .95);
  --card-glow: rgba(123, 108, 255, .14);
  --card-shadow: 0 1px 1px rgba(18, 20, 43, .04), 0 30px 64px -26px rgba(60, 48, 170, .38);
  --tile: rgba(255, 255, 255, .8); --tile-solid: #ffffff; --tile-edge: rgba(255, 255, 255, .9);
  --tile-line: rgba(18, 20, 43, .07);
  --tile-shadow: 0 1px 1px rgba(18, 20, 43, .04), 0 20px 44px -26px rgba(60, 48, 170, .36);
  --board: rgba(227, 230, 250, .8); --board-solid: #e3e6fa; --board-dot: rgba(67, 56, 202, .13);
  --field-bg: #ffffff; --field-line: #6e7496; --field-line-hover: #565c86;
  --hover: rgba(91, 77, 255, .08);
  --alt-bg: #ffffff; --alt-line: #737998;
  --off-bg: #dfe2f1; --off-ink: #454a6c; --off-line: #c5c9e0;
  --bad-bg: #fff0f1; --bad-line: #d9606b; --bad-ink: #9b1c25; --bad-field: #c8161d;
  --lock-bg: #efeeff; --lock-line: #a49cff; --lock-ink: #2b2380; --lock-icon: #4338ca; --lock-track: #d9d5ff;
  --lock-bar: #5b4dff;
  --ok-bg: #e7f6ee; --ok-line: #9fd8b8; --ok-ink: #11603a;
  --warn-bg: #fff3d9; --warn-line: #e9b75a; --warn-ink: #6b4100;
  --info-bg: #eeedff; --info-line: #c4bfff; --info-ink: #12142b; --info-icon: #4338ca;
  --test-bg: #fff1c9; --test-line: #e9c46a; --test-ink: #5a3c00; --test-stripe: rgba(201, 140, 0, .35);
  --plate-bg: #ffffff; --plate-line: #d5d9f0; --rivet: #c3c8e4;
  --plate-shadow: 0 18px 40px -18px rgba(40, 40, 110, .35);
  --lens-bg: rgba(255, 255, 255, .75);
  --chip-bg: #eef0fb; --chip-line: #d3d6ea; --avatar-bg: #4338ca; --avatar-ink: #ffffff;
  --icon-bg: #e6f1fe; --new-bg: #c8161d; --new-ink: #ffffff;
  --prism-1: #7b6cff; --prism-2: #38bdf8; --prism-3: #f0abfc; --prism-4: #a5b4fc; --prism-5: #7fe0b8;
  --aurora-1: rgba(123, 108, 255, .32); --aurora-2: rgba(56, 198, 232, .28);
  --aurora-3: rgba(240, 138, 216, .24); --aurora-4: rgba(127, 224, 184, .22);
  --ribbon-a: .30; --ribbon-b: .24;
  /* the sky of characters (login-glyphs.js): the IQ Cube outline, the wave, the scatter, the glow */
  --glyph-hi: #4338ca; --glyph: rgba(67, 56, 202, .6); --glyph-dim: rgba(67, 56, 202, .22);
  --glyph-glow: rgba(91, 77, 255, .28);
  /* the plan-board illustration (5-d09) */
  --art-card: #ffffff; --art-card-line: #d9dcf2; --art-ghost: #e6e8f6; --art-ghost-2: #cdd1ee; --art-grid: #dfe2f3;
  --art-shadow-c: #282a6e; --art-shadow-a: .16;
  --bar-a1: #7b6cff; --bar-a2: #5b4dff; --bar-done: #2e2694;
  --bar-b1: #38bdf8; --bar-b2: #2b9bff; --bar-c1: #a5b4fc; --bar-c2: #f0abfc;
  --bar-d1: #f0abfc; --bar-d2: #c084fc; --bar-e1: #2b9bff; --bar-e2: #5b4dff;
  --art-link: #2b9bff; --art-milestone: #4338ca; --art-red: #c8161d; --cal-head: #c8161d;
  --cal-ring: #12142b; --cal-stub: rgba(255, 255, 255, .85);
  --cell-plan: #dcd8ff; --cell-build: #5b4dff;
  --tray: #d9ddf5; --tray-rim: #c9cfee; --comp: #f1f2fb; --comp-line: #c3c8e8;
  --chip: #23264a; --chip-dot: #5a5f8c; --chip-pin: #8d93bb; --lead: #9aa0c4; --res: #efd6ae; --band-2: #2b9bff;
  --cap: #2b9bff; --cap-hi: #bfe3ff; --led-a: #f0abfc; --led-b: #7b6cff; --nut: #b3b9da;
  --cube-top: #ea4b51; --cube-left: #c8161d; --cube-right: #940e14; --cube-trace: #ffffff;
  --spark-a: #7b6cff; --spark-b: #38bdf8; --spark-c: #f0abfc;
}
/* ---------- Tokens: dark (the computer's setting, unless the page says light) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #04050f; --ink: #e9edf7; --muted: #a3abc4; --line: #21232f; --line-strong: #2e3242;
    --brand: #b4161b; --brand-text: #ff6369; --accent: #5b7cff; --accent-deep: #a9c1ff; --accent-ink: #050814;
    --link: #a9c1ff;
    --focus: #8fa6ff; --focus-halo: rgba(91, 124, 255, .3); --glow-c: rgba(60, 100, 255, .55);
    --btn-grad: linear-gradient(135deg, #7c95ff 0%, #5b7cff 45%, #3ba5f5 100%);
    --btn-sheen: rgba(255, 255, 255, .35);
    --title-1: #e6edff; --title-2: #a9c1ff; --title-3: #7dd3fc;
    --icon: #5fb4ff; --cube-shadow: rgba(0, 0, 0, .55);
    --card: rgba(13, 15, 24, .86); --card-solid: #0f1119; --card-edge: rgba(255, 255, 255, .1);
    --card-glow: rgba(79, 123, 255, .16);
    --card-shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 30px 70px -24px rgba(0, 0, 0, .8);
    --tile: rgba(13, 15, 24, .84); --tile-solid: #0f1119; --tile-edge: rgba(255, 255, 255, .07);
    --tile-line: rgba(255, 255, 255, .09);
    --tile-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 22px 48px -26px rgba(0, 0, 0, .85);
    --board: rgba(7, 9, 25, .8); --board-solid: #070919; --board-dot: rgba(165, 180, 252, .1);
    --field-bg: #0a0c14; --field-line: #747c9d; --field-line-hover: #9199b9;
    --hover: rgba(91, 124, 255, .12);
    --alt-bg: #141724; --alt-line: #707899;
    --off-bg: #23273a; --off-ink: #b3bbd4; --off-line: #343953;
    --bad-bg: #2a1117; --bad-line: #c2475a; --bad-ink: #ffb3bb; --bad-field: #ff7a80;
    --lock-bg: #141a3c; --lock-line: #4152a8; --lock-ink: #dce3ff; --lock-icon: #a9c1ff; --lock-track: #26306a;
    --lock-bar: #7c95ff;
    --ok-bg: #0d2a1c; --ok-line: #23603f; --ok-ink: #8fe0b4;
    --warn-bg: #2a2210; --warn-line: #7a5d1c; --warn-ink: #ffd27a;
    --info-bg: #151c3d; --info-line: #2f3d7a; --info-ink: #e9edf7; --info-icon: #a9c1ff;
    --test-bg: #2b2208; --test-line: #6b5414; --test-ink: #ffdc8f; --test-stripe: rgba(255, 200, 60, .22);
    --plate-bg: #e1e5f4; --plate-line: #f4f6fd; --rivet: #aab0cc;
    --plate-shadow: 0 18px 40px -16px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06);
    --lens-bg: rgba(120, 150, 255, .1);
    --chip-bg: #1a1d2b; --chip-line: #2e3242; --avatar-bg: #a9c1ff; --avatar-ink: #050814;
    --icon-bg: #0d1f35; --new-bg: #b4161b; --new-ink: #ffffff;
    --prism-1: #4f7bff; --prism-2: #22d3ee; --prism-3: #a5c8ff; --prism-4: #3b82f6; --prism-5: #2dd4bf;
    --aurora-1: rgba(59, 91, 255, .3); --aurora-2: rgba(34, 140, 255, .2);
    --aurora-3: rgba(40, 70, 200, .2); --aurora-4: rgba(14, 165, 233, .1);
    --ribbon-a: .34; --ribbon-b: .22;
    --glyph-hi: #eef2ff; --glyph: rgba(169, 193, 255, .85); --glyph-dim: rgba(140, 160, 255, .3);
    --glyph-glow: rgba(91, 124, 255, .55);
    --art-card: #121530; --art-card-line: #272c52; --art-ghost: #20254a; --art-ghost-2: #2d3465; --art-grid: #1c2042;
    --art-shadow-c: #000000; --art-shadow-a: .55;
    --bar-a1: #8f84ff; --bar-a2: #6d5cff; --bar-done: #ffffff;
    --bar-b1: #38bdf8; --bar-b2: #3b8cff; --bar-c1: #a5b4fc; --bar-c2: #f0abfc;
    --bar-d1: #f0abfc; --bar-d2: #b77cff; --bar-e1: #3ba5f5; --bar-e2: #7c95ff;
    --art-link: #5fb4ff; --art-milestone: #a5b4fc; --art-red: #ef4f55; --cal-head: #b4161b;
    --cal-ring: #c9cde6; --cal-stub: rgba(255, 255, 255, .8);
    --cell-plan: #2c2a6b; --cell-build: #7c95ff;
    --tray: #181c3a; --tray-rim: #232850; --comp: #0d1029; --comp-line: #2b3160;
    --chip: #343a6b; --chip-dot: #5c64a0; --chip-pin: #7d86b3; --lead: #5d6590; --res: #d8bf98; --band-2: #3ba5f5;
    --cap: #3ba5f5; --cap-hi: #a9d9ff; --led-a: #f0abfc; --led-b: #8f84ff; --nut: #4a5285;
    --cube-top: #d9363c; --cube-left: #b4161b; --cube-right: #7d0d11; --cube-trace: #ffffff;
    --spark-a: #7b6cff; --spark-b: #38bdf8; --spark-c: #f0abfc;
  }
}
/* ---------- Tokens: dark (chosen with <html data-theme="dark">) ---------- */
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #04050f; --ink: #e9edf7; --muted: #a3abc4; --line: #21232f; --line-strong: #2e3242;
    --brand: #b4161b; --brand-text: #ff6369; --accent: #5b7cff; --accent-deep: #a9c1ff; --accent-ink: #050814;
    --link: #a9c1ff;
    --focus: #8fa6ff; --focus-halo: rgba(91, 124, 255, .3); --glow-c: rgba(60, 100, 255, .55);
    --btn-grad: linear-gradient(135deg, #7c95ff 0%, #5b7cff 45%, #3ba5f5 100%);
    --btn-sheen: rgba(255, 255, 255, .35);
    --title-1: #e6edff; --title-2: #a9c1ff; --title-3: #7dd3fc;
    --icon: #5fb4ff; --cube-shadow: rgba(0, 0, 0, .55);
    --card: rgba(13, 15, 24, .86); --card-solid: #0f1119; --card-edge: rgba(255, 255, 255, .1);
    --card-glow: rgba(79, 123, 255, .16);
    --card-shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 30px 70px -24px rgba(0, 0, 0, .8);
    --tile: rgba(13, 15, 24, .84); --tile-solid: #0f1119; --tile-edge: rgba(255, 255, 255, .07);
    --tile-line: rgba(255, 255, 255, .09);
    --tile-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 22px 48px -26px rgba(0, 0, 0, .85);
    --board: rgba(7, 9, 25, .8); --board-solid: #070919; --board-dot: rgba(165, 180, 252, .1);
    --field-bg: #0a0c14; --field-line: #747c9d; --field-line-hover: #9199b9;
    --hover: rgba(91, 124, 255, .12);
    --alt-bg: #141724; --alt-line: #707899;
    --off-bg: #23273a; --off-ink: #b3bbd4; --off-line: #343953;
    --bad-bg: #2a1117; --bad-line: #c2475a; --bad-ink: #ffb3bb; --bad-field: #ff7a80;
    --lock-bg: #141a3c; --lock-line: #4152a8; --lock-ink: #dce3ff; --lock-icon: #a9c1ff; --lock-track: #26306a;
    --lock-bar: #7c95ff;
    --ok-bg: #0d2a1c; --ok-line: #23603f; --ok-ink: #8fe0b4;
    --warn-bg: #2a2210; --warn-line: #7a5d1c; --warn-ink: #ffd27a;
    --info-bg: #151c3d; --info-line: #2f3d7a; --info-ink: #e9edf7; --info-icon: #a9c1ff;
    --test-bg: #2b2208; --test-line: #6b5414; --test-ink: #ffdc8f; --test-stripe: rgba(255, 200, 60, .22);
    --plate-bg: #e1e5f4; --plate-line: #f4f6fd; --rivet: #aab0cc;
    --plate-shadow: 0 18px 40px -16px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06);
    --lens-bg: rgba(120, 150, 255, .1);
    --chip-bg: #1a1d2b; --chip-line: #2e3242; --avatar-bg: #a9c1ff; --avatar-ink: #050814;
    --icon-bg: #0d1f35; --new-bg: #b4161b; --new-ink: #ffffff;
    --prism-1: #4f7bff; --prism-2: #22d3ee; --prism-3: #a5c8ff; --prism-4: #3b82f6; --prism-5: #2dd4bf;
    --aurora-1: rgba(59, 91, 255, .3); --aurora-2: rgba(34, 140, 255, .2);
    --aurora-3: rgba(40, 70, 200, .2); --aurora-4: rgba(14, 165, 233, .1);
    --ribbon-a: .34; --ribbon-b: .22;
    --glyph-hi: #eef2ff; --glyph: rgba(169, 193, 255, .85); --glyph-dim: rgba(140, 160, 255, .3);
    --glyph-glow: rgba(91, 124, 255, .55);
    --art-card: #121530; --art-card-line: #272c52; --art-ghost: #20254a; --art-ghost-2: #2d3465; --art-grid: #1c2042;
    --art-shadow-c: #000000; --art-shadow-a: .55;
    --bar-a1: #8f84ff; --bar-a2: #6d5cff; --bar-done: #ffffff;
    --bar-b1: #38bdf8; --bar-b2: #3b8cff; --bar-c1: #a5b4fc; --bar-c2: #f0abfc;
    --bar-d1: #f0abfc; --bar-d2: #b77cff; --bar-e1: #3ba5f5; --bar-e2: #7c95ff;
    --art-link: #5fb4ff; --art-milestone: #a5b4fc; --art-red: #ef4f55; --cal-head: #b4161b;
    --cal-ring: #c9cde6; --cal-stub: rgba(255, 255, 255, .8);
    --cell-plan: #2c2a6b; --cell-build: #7c95ff;
    --tray: #181c3a; --tray-rim: #232850; --comp: #0d1029; --comp-line: #2b3160;
    --chip: #343a6b; --chip-dot: #5c64a0; --chip-pin: #7d86b3; --lead: #5d6590; --res: #d8bf98; --band-2: #3ba5f5;
    --cap: #3ba5f5; --cap-hi: #a9d9ff; --led-a: #f0abfc; --led-b: #8f84ff; --nut: #4a5285;
    --cube-top: #d9363c; --cube-left: #b4161b; --cube-right: #7d0d11; --cube-trace: #ffffff;
    --spark-a: #7b6cff; --spark-b: #38bdf8; --spark-c: #f0abfc;
}
/* ---------- Built from the tokens ---------- */
:root {
  --font-display: "Space Grotesk", Bahnschrift, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --prism: linear-gradient(90deg, var(--prism-1), var(--prism-2) 30%, var(--prism-3) 62%, var(--prism-4) 82%, var(--prism-1));
  --prism-ring: conic-gradient(from 210deg, var(--prism-1), var(--prism-2), var(--prism-3), var(--prism-4), var(--prism-1));
  --r-card: 26px; --r-tile: 22px; --r-field: 12px;
  --pad: 24px; --gap: 20px;
  --logo-ink: #000000;   /* the MRP artwork is black, made for the light nameplate, in both themes */
  --t-fast: 150ms; --t-enter: 200ms;
}

/* ---------- Base (scoped to the sign-in page) ---------- */
.page-login *, .page-login *::before, .page-login *::after { box-sizing: border-box; }
.page-login [hidden] { display: none !important; }
html:has(> body.page-login) { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.page-login { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  font: 16px/1.5 var(--font-body); color: var(--ink); background: var(--bg); overflow-x: hidden;
  isolation: isolate; }   /* the sky (z-index -1) paints above the body's background */
body.page-login > main { flex: 1; display: flex; flex-direction: column; max-width: none; margin: 0; padding: 0; min-height: 0; }
:where(.page-login) :where(p, h1, h2, ul, ol) { margin: 0; }
:where(.page-login) :where(ul, ol) { padding: 0; list-style: none; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round; }
.page-login :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- The sky (1-d02): four aurora pools and two prism curtains, all still ---------- */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.sky-pools { position: absolute; inset: -15vh -15vw;
  background: radial-gradient(47vw 52vh at 40vw 12vh, var(--aurora-1), transparent 70%),
              radial-gradient(44vw 49vh at 109vw 10vh, var(--aurora-2), transparent 70%),
              radial-gradient(55vw 60vh at 96vw 102vh, var(--aurora-3), transparent 70%),
              radial-gradient(42vw 47vh at 40vw 112vh, var(--aurora-4), transparent 70%); }
.glyphs { position: absolute; inset: 0; display: block; }   /* login-glyphs.js draws the characters */
.ribbon { position: absolute; left: 0; right: 0; border-radius: 50%; filter: blur(56px); }
.ribbon.r1 { top: 30%; height: 28%; opacity: var(--ribbon-a); transform: rotate(-13deg);
  background: linear-gradient(90deg, transparent 4%, var(--prism-1) 26%, var(--prism-2) 46%, var(--prism-3) 66%,
                              var(--prism-4) 80%, transparent 96%); }
.ribbon.r2 { top: 54%; height: 18%; opacity: var(--ribbon-b); transform: rotate(8deg);
  background: linear-gradient(90deg, transparent 8%, var(--prism-2) 30%, var(--prism-5) 52%, var(--prism-1) 74%,
                              transparent 94%); }

/* ---------- 13. Test server banner (test copy only): calm amber ---------- */
.test-banner { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px 12px; padding: 10px 16px 13px; background: var(--test-bg); color: var(--test-ink);
  border-bottom: 1px solid var(--test-line); font-size: 15px; text-align: center; }
.test-banner::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: repeating-linear-gradient(-45deg, var(--test-stripe) 0 8px, transparent 8px 16px); }
.tb-tag { display: inline-flex; align-items: center; gap: 7px; font: 700 13px/1 var(--font-display);
  letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; border-radius: 8px;
  border: 1.5px solid currentColor; }
.tb-tag svg.i { width: 16px; height: 16px; }

/* ---------- Layout ----------
   DOM order: card, tiles (help, What's new), board. Phones read it in that order; from 600 px the board moves
   above the card, from 960 px the board and tiles form the left column and the card sits on the right. */
.signin { flex: 1 0 auto; width: 100%; max-width: 1320px; margin: 0 auto; padding: 16px 16px 96px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px;
  grid-template-areas: "card" "tiles" "board"; align-content: center; }
.login-card { grid-area: card; }
.tiles { grid-area: tiles; }
.tile-board { grid-area: board; }
@media (min-width: 600px) and (max-width: 959.98px) {
  .signin { padding: 24px 24px 96px; gap: 20px; grid-template-areas: "board" "card" "tiles"; }
  .login-card { justify-self: center; }
}
@media (min-width: 960px) {
  .signin { padding: 28px 32px 88px; gap: var(--gap); align-items: center;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 440px);
    grid-template-rows: auto auto; grid-template-areas: "board card" "tiles card"; }
  .login-card { align-self: center; }
}

/* ---------- Tiles (6-d13's bento idea, in 1-d02's frosted glass) ---------- */
.tile { position: relative; min-width: 0; border-radius: var(--r-tile); padding: 18px 20px;
  background: var(--tile); border: 1px solid var(--tile-line);
  -webkit-backdrop-filter: blur(18px) saturate(1.35); backdrop-filter: blur(18px) saturate(1.35);
  box-shadow: inset 0 1px 0 var(--tile-edge), var(--tile-shadow); overflow-wrap: anywhere; }
.tiles { display: flex; flex-wrap: wrap; gap: 16px; min-width: 0; }
.tiles > .tile { flex: 1 1 260px; }
.tiles > .tile-help { flex-grow: 1.35; }
.tile-head { display: flex; align-items: center; gap: 12px; }
.tile-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px;
  background: var(--icon-bg); color: var(--icon); }
.tile-head h2 { font: 600 18px/1.25 var(--font-display); letter-spacing: -.01em; color: var(--ink); }

/* The planning board (5-d09): its own light surface, dotted like a pin board, with the riveted nameplate */
.tile-board { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-items: center;
  gap: 18px; padding: clamp(18px, 2.4vw, 28px);
  background: radial-gradient(circle, var(--board-dot) 1.2px, transparent 1.7px) 0 0 / 22px 22px, var(--board); }
/* 6. the MRP logo, whole, on its own light nameplate in both themes (it is black artwork) */
.plate { padding: 16px 22px; border: 1px solid var(--plate-line); border-radius: 18px; box-shadow: var(--plate-shadow);
  background:
    radial-gradient(circle at 11px 11px, var(--rivet) 0 2.5px, transparent 3px),
    radial-gradient(circle at calc(100% - 11px) 11px, var(--rivet) 0 2.5px, transparent 3px),
    radial-gradient(circle at 11px calc(100% - 11px), var(--rivet) 0 2.5px, transparent 3px),
    radial-gradient(circle at calc(100% - 11px) calc(100% - 11px), var(--rivet) 0 2.5px, transparent 3px),
    var(--plate-bg); }
.plate::after { content: ""; display: block; height: 2px; margin: 8px 4px 0; border-radius: 2px; background: var(--prism); }
.mrp-logo { display: block; height: 120px; width: auto; aspect-ratio: 396 / 454; }
.mrp-co { font-family: Bahnschrift, "Arial Narrow", "Segoe UI", Arial, sans-serif; font-weight: 700;
  font-stretch: semi-condensed; font-size: 92px; fill: var(--logo-ink); }
.mrp-name { font-family: Impact, "Arial Black", "Segoe UI Black", sans-serif; font-weight: 400; font-size: 130px;
  letter-spacing: 10px; fill: var(--logo-ink); }
.mrp-drips { fill: none; stroke: var(--logo-ink); stroke-linecap: round; }
.board-art { display: grid; place-items: center; width: 100%; min-width: 0; }
.login-art { display: block; width: min(100%, 420px); height: auto; }

/* plan-board art paint (tokens only) */
.pb-art-card { fill: var(--art-card); stroke: var(--art-card-line); stroke-width: 1; }
.pb-art-fx { flood-color: var(--art-shadow-c); flood-opacity: var(--art-shadow-a); }
.pb-ghost { fill: var(--art-ghost); } .pb-ghost-2 { fill: var(--art-ghost-2); }
.pb-art-grid { stroke: var(--art-grid); stroke-width: 1.2; stroke-dasharray: 2 4; }
.pb-s-a1 { stop-color: var(--bar-a1); } .pb-s-a2 { stop-color: var(--bar-a2); }
.pb-s-b1 { stop-color: var(--bar-b1); } .pb-s-b2 { stop-color: var(--bar-b2); }
.pb-s-c1 { stop-color: var(--bar-c1); } .pb-s-c2 { stop-color: var(--bar-c2); }
.pb-s-d1 { stop-color: var(--bar-d1); } .pb-s-d2 { stop-color: var(--bar-d2); }
.pb-s-e1 { stop-color: var(--bar-e1); } .pb-s-e2 { stop-color: var(--bar-e2); }
.pb-bar-done { fill: var(--bar-done); fill-opacity: .35; }
.pb-art-link { fill: none; stroke: var(--art-link); stroke-width: 2; stroke-dasharray: 4 5; stroke-linecap: round; }
.pb-art-link-red { stroke: var(--art-red); }
.pb-art-link-head { fill: none; stroke: var(--art-link); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pb-art-link-head-red { stroke: var(--art-red); }
.pb-milestone { fill: var(--art-milestone); }
.pb-short-dot { fill: var(--art-red); stroke: var(--art-card); stroke-width: 3; }
.pb-today { stroke: var(--art-red); stroke-width: 2.5; stroke-linecap: round; }
.pb-today-cap { fill: var(--art-red); }
.pb-cal-head { fill: var(--cal-head); } .pb-cal-ring { fill: var(--cal-ring); } .pb-cal-stub { fill: var(--cal-stub); }
.pb-cell-plan { fill: var(--cell-plan); } .pb-cell-build { fill: var(--cell-build); }
.pb-cal-mark { fill: none; stroke: var(--art-red); stroke-width: 2.5; }
.pb-tray { fill: var(--tray); } .pb-tray-rim { fill: var(--tray-rim); }
.pb-comp { fill: var(--comp); stroke: var(--comp-line); }
.pb-comp-empty { fill: var(--comp); stroke: var(--art-red); stroke-width: 2; stroke-dasharray: 5 5; }
.pb-chip { fill: var(--chip); } .pb-chip-dot { fill: var(--chip-dot); }
.pb-pins, .pb-pins path { fill: none; stroke: var(--chip-pin); stroke-width: 2; stroke-linecap: round; }
.pb-lead { fill: none; stroke: var(--lead); stroke-width: 2; stroke-linecap: round; }
.pb-res { fill: var(--res); } .pb-band-1 { fill: var(--cal-head); } .pb-band-2 { fill: var(--band-2); } .pb-band-3 { fill: var(--chip); }
.pb-cap { fill: var(--cap); } .pb-cap-hi { fill: none; stroke: var(--cap-hi); stroke-width: 2; stroke-linecap: round; }
.pb-cube-top { fill: var(--cube-top); } .pb-cube-left { fill: var(--cube-left); } .pb-cube-right { fill: var(--cube-right); }
.pb-cube-trace { fill: none; stroke: var(--cube-trace); stroke-width: 1.6; stroke-linecap: round; }
.pb-led-a { fill: var(--led-a); } .pb-led-b { fill: var(--led-b); }
.pb-nut { fill: var(--nut); } .pb-nut-hole { fill: var(--comp); }
.pb-spark { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.pb-spark-a { stroke: var(--spark-a); } .pb-spark-b { stroke: var(--spark-b); } .pb-spark-c { stroke: var(--spark-c); }

/* 15. Forgot your password tile */
.tile-help { scroll-margin: 16px; }
.tile-help:focus { outline: none; }
.tile-help:target { box-shadow: 0 0 0 3px var(--focus), inset 0 1px 0 var(--tile-edge), var(--tile-shadow); }
.help-lead { margin-top: 12px; font-size: 15px; color: var(--ink); }
.admins { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.admins li { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px;
  background: var(--chip-bg); border: 1px solid var(--chip-line); color: var(--ink); font-size: 15px; font-weight: 600; }
.lg-avatar { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: var(--avatar-bg); color: var(--avatar-ink); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.help-note { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* What's new tile */
.new-pill { margin-left: auto; padding: 3px 9px; border-radius: 999px; background: var(--new-bg); color: var(--new-ink);
  font: 700 12px/1.3 var(--font-body); letter-spacing: .06em; text-transform: uppercase; }
.lg-news { display: grid; gap: 8px; margin-top: 12px; }
.lg-news li { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 10px; align-items: baseline;
  font-size: 15px; color: var(--ink); }
.lg-news li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; transform: translateY(-1px) rotate(45deg);
  background: var(--prism); }
.news-note { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* ---------- The card (1-d02): milky glass with a still prism rim ---------- */
.login-card { position: relative; width: 100%; max-width: 460px; padding: var(--pad); border-radius: var(--r-card);
  background: radial-gradient(120% 55% at 50% 0%, var(--card-glow), transparent 62%), var(--card);
  -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: inset 0 1px 0 var(--card-edge), var(--card-shadow); }
.login-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.25px; pointer-events: none;
  background: var(--prism-ring);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: .9; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .login-card { background: var(--card-solid); } .tile { background: var(--tile-solid); }
  .tile-board { background: radial-gradient(circle, var(--board-dot) 1.2px, transparent 1.7px) 0 0 / 22px 22px, var(--board-solid); }
}
@media (prefers-reduced-transparency: reduce) {
  .login-card, .tile { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .login-card { background: var(--card-solid); } .tile { background: var(--tile-solid); }
  .tile-board { background: radial-gradient(circle, var(--board-dot) 1.2px, transparent 1.7px) 0 0 / 22px 22px, var(--board-solid); }
}

/* 7. Brand: the IQ Cube on a lens of prism light, the name ("IQ" in brand red), the quieter tagline */
.lg-brand { display: grid; justify-items: center; text-align: center; margin-bottom: 16px; }
.lens { position: relative; width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%;
  margin-bottom: 6px; background: radial-gradient(circle at 50% 38%, var(--lens-bg), transparent 72%); }
.lens::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--prism-ring);
  filter: blur(14px); opacity: .5; }
.lens::after { content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 1.5px; background: var(--prism-ring);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: .75; }
.lens img { position: relative; z-index: 1; width: 56px; height: 56px; filter: drop-shadow(0 7px 10px var(--cube-shadow)); }
.brand-name { font: 650 32px/1.1 var(--font-display); letter-spacing: -.02em; color: var(--title-1);
  background: linear-gradient(92deg, var(--title-1) 0, var(--title-2) 60%, var(--title-3) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand-name .iq { color: var(--brand-text); -webkit-text-fill-color: var(--brand-text); }
.tagline { margin-top: 4px; font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); text-wrap: balance; }
.seam { height: 1px; margin: 0 0 16px; border: 0;
  background: linear-gradient(90deg, transparent, var(--line-strong) 18%, var(--line-strong) 82%, transparent); }
.login-card h1 { margin: 0 0 12px; font: 600 21px/1.25 var(--font-display); letter-spacing: -.01em; color: var(--ink); }

/* Notice (first run) and messages */
.notice, .msg { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start;
  border-radius: 14px; padding: 12px 14px; font-size: 15px; border: 1px solid; }
.notice svg.i, .msg svg.i { width: 22px; height: 22px; }
.notice { margin: 0 0 16px; background: var(--info-bg); border-color: var(--info-line); color: var(--info-ink); }
.notice svg.i { color: var(--info-icon); }
/* 3, 14: ONE permanent role="alert" slot directly above the fields; empty (no whitespace) it takes no room */
.alert-slot { margin: 0 0 16px; }
.alert-slot:empty { margin: 0; }
.msg-error { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad-ink); font-weight: 600; }
/* the lockout is a wait, not a mistake: calm indigo, not the red error colours */
.msg-wait { background: var(--lock-bg); border-color: var(--lock-line); color: var(--lock-ink); }
.msg-wait svg.i { color: var(--lock-icon); }
.msg-wait .msg-title { font-weight: 600; }
.msg-ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); font-weight: 600; }
.lock-time { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; }
.lock-bar { margin-top: 10px; height: 4px; border-radius: 4px; background: var(--lock-track); overflow: hidden; }
.lock-fill { display: block; height: 100%; width: 100%; background: var(--lock-bar); transform-origin: left center; }

/* Fields (1) */
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 5px; font-size: 15px; font-weight: 600; color: var(--ink); }
.login-card input.input { display: block; width: 100%; min-height: 48px; padding: 0 14px; font: 16px/1.2 var(--font-body);
  color: var(--ink); background: var(--field-bg); border: 1.5px solid var(--field-line); border-radius: var(--r-field);
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease; }
.login-card input.input:hover { border-color: var(--field-line-hover); }
.login-card input.input:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--accent);
  box-shadow: 0 0 0 6px var(--focus-halo); }
.login-card input.input[aria-invalid="true"] { border-color: var(--bad-field); }
.pw { position: relative; }
.login-card .pw input.input { padding-right: 56px; }
.pw input::-ms-reveal { display: none; }
/* 2. show / hide password */
.eye { position: absolute; top: 50%; right: 2px; transform: translateY(-50%); width: 44px; height: 44px;
  display: grid; place-items: center; margin: 0; padding: 0; border: 0; border-radius: 10px; background: transparent;
  color: var(--muted); cursor: pointer; transition: background-color var(--t-fast) ease, color var(--t-fast) ease; }
.eye:hover { background: var(--hover); color: var(--ink); }
.page-login .eye:focus-visible { outline-offset: -3px; }
.eye .i-off { display: none; }
.eye[aria-pressed="true"] .i-on { display: none; }
.eye[aria-pressed="true"] .i-off { display: block; }
/* 4. Caps Lock: the wrapper is always in the page (aria-live), the pill goes in and out */
.caps { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 5px 10px 5px 8px;
  border-radius: 8px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink);
  font-size: 14.5px; font-weight: 600; }
.caps svg.i { width: 18px; height: 18px; }

/* 12. Remember my username: the whole row is the target (44 px tall) */
.lg-check { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: -2px 0 12px; cursor: pointer;
  font-size: 15px; color: var(--ink); }
.lg-check input { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 22px; height: 22px;
  margin: 0; border: 1.5px solid var(--field-line); border-radius: 7px; background: var(--field-bg); cursor: pointer;
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease; }
.lg-check input::after { content: ""; position: absolute; left: 6.5px; top: 2.5px; width: 6px; height: 11px;
  border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); opacity: 0; }
.lg-check input:checked { background: var(--accent); border-color: var(--accent); }
.lg-check input:checked::after { opacity: 1; }

/* Sign in button (1, 9, 14) */
.btn-primary { position: relative; width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: center;
  gap: 10px; margin: 0; padding: 0 20px; border: 0; border-radius: 999px; background: var(--btn-grad); color: var(--accent-ink);
  font: 600 16.5px/1 var(--font-body); cursor: pointer; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 var(--btn-sheen), 0 12px 26px -12px var(--glow-c);
  transition: box-shadow .2s ease, transform var(--t-fast) ease, filter .2s ease; }
.btn-primary:hover { filter: saturate(1.12); box-shadow: inset 0 1px 0 var(--btn-sheen), 0 16px 32px -12px var(--glow-c); }
.btn-primary:active { transform: translateY(1px); }
.page-login .btn-primary:focus-visible { outline-offset: 3px; }
.btn-primary:disabled { background: var(--btn-grad); color: var(--accent-ink); }
.btn-primary .i-spin, .btn-primary .i-lock { display: none; }
.btn-primary.is-busy { cursor: progress; }
.btn-primary.is-busy .i-spin { display: block; }
.btn-primary.is-busy .i-go, .btn-primary.is-locked .i-go { display: none; }
.btn-primary.is-locked { background: var(--off-bg); color: var(--off-ink); box-shadow: inset 0 0 0 1px var(--off-line);
  cursor: not-allowed; filter: none; }
.btn-primary.is-locked .i-lock { display: block; }
.i-spin { width: 20px; height: 20px; flex: none; }

/* 10, 11. Google and passkey (https only); the card ends cleanly without them */
.lg-alt { margin-top: 16px; }
.or { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.alt-list { display: grid; gap: 10px; }
.alt-btn { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 0; padding: 8px 18px; border: 1px solid var(--alt-line); border-radius: 999px; background: var(--alt-bg); color: var(--ink);
  font: 600 15.5px/1.2 var(--font-body); text-align: center; text-decoration: none; cursor: pointer;
  transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease; }
.alt-btn:hover { border-color: var(--accent); background: linear-gradient(var(--hover), var(--hover)), var(--alt-bg); }
.alt-btn svg.i { color: var(--icon); width: 22px; height: 22px; }
.alt-btn .g { width: 20px; height: 20px; flex: none; }
.alt-note { margin: 2px 0 0; text-align: center; color: var(--muted); font-size: 13.5px; }

/* Card foot: a link to the help tile, below the card on phones and tablets (hidden from 960 px) */
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px;
  margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--line-strong); }
.text-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--link); font-size: 15px;
  font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.text-link svg.i { width: 16px; height: 16px; }
.foot-note { color: var(--muted); font-size: 14px; }
@media (min-width: 960px) { .card-foot { display: none; } }   /* the help tile sits right beside the card */

/* ---------- 9. Motion: a 200 ms fade and rise, tiles one after another, bars that grow once ----------
   Jinja adds .is-retry to <body> on the re-render after a wrong password or a lockout: no entrance then. */
@media (prefers-reduced-motion: no-preference) {
  .page-login:not(.is-retry) .rise { animation: rise var(--t-enter) ease-out both; animation-delay: calc(var(--i, 0) * 40ms); }
  .page-login:not(.is-retry) .pb-bar { transform-box: fill-box; transform-origin: 0 50%;
    animation: grow 280ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(160ms + var(--i) * 45ms); }
  .i-spin { animation: spin .8s linear infinite; }
  .lock-fill { transition: transform 250ms linear; }
}
/* Reduced motion: no entrance, but the spinner still turns, slowly, so "Signing in…" never looks frozen */
@media (prefers-reduced-motion: reduce) {
  .i-spin { animation: spin 1.6s linear infinite; }
  .btn-primary, .login-card input.input, .eye, .alt-btn, .lg-check input { transition: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
/* Phones: the lens sits beside the name; tiles stack */
@media (max-width: 599.98px) {
  :root { --pad: 20px; --r-card: 22px; }
  .lg-brand { grid-template-columns: auto auto; justify-content: center; justify-items: start; align-items: center;
    column-gap: 14px; text-align: left; margin-bottom: 12px; }
  .lens { grid-row: 1 / span 2; margin: 0; width: 68px; height: 68px; }
  .lens img { width: 46px; height: 46px; }
  .brand-name { align-self: end; font-size: 28px; }
  .tagline { align-self: start; font-size: 12px; letter-spacing: .08em; }
  .seam { margin-bottom: 12px; }
  .login-card h1 { font-size: 20px; margin-bottom: 10px; }
  .test-banner { font-size: 14.5px; }
  .tiles > .tile { flex-basis: 100%; }
  .mrp-logo { height: 112px; }
}
/* Tablets: the board is a band above the card, nameplate beside the art */
@media (min-width: 600px) and (max-width: 959.98px) {
  .tile-board { grid-template-columns: auto minmax(0, 1fr); justify-items: stretch; gap: 24px; }
  .plate { justify-self: center; padding: 14px 16px; }
  .mrp-logo { height: clamp(112px, 16vw, 148px); }
  .login-art { width: 100%; max-height: clamp(160px, 30vw, 260px); }
}
/* Desktop: nameplate above the art; the art shrinks with the window height so the board and tiles fit */
@media (min-width: 960px) {
  .mrp-logo { height: clamp(96px, 12vh, 132px); }
  .login-art { width: min(100%, 500px, max(220px, calc((100vh - 560px) * 1.2))); }
}
/* Wide desktop: nameplate beside the art, which can then be bigger */
@media (min-width: 1280px) {
  .tile-board { grid-template-columns: auto minmax(0, 1fr); gap: 28px; }
  .mrp-logo { height: clamp(110px, 15vh, 150px); }
  .login-art { width: min(100%, 560px, max(260px, calc((100vh - 400px) * 1.2))); }
}
/* Short screens (1366x768, 1280x720): the card tightens and the lens sits beside the name */
@media (min-width: 600px) and (max-height: 820px) {
  .lg-brand { grid-template-columns: auto auto; justify-content: center; justify-items: start; align-items: center;
    column-gap: 14px; text-align: left; margin-bottom: 12px; }
  .lens { grid-row: 1 / span 2; margin: 0; width: 72px; height: 72px; }
  .lens img { width: 48px; height: 48px; }
  .brand-name { align-self: end; }
  .tagline { align-self: start; letter-spacing: .1em; }
  .seam { margin-bottom: 12px; }
  .login-card h1 { font-size: 20px; margin-bottom: 10px; }
  .field { margin-bottom: 12px; }
  .lg-check { margin: -4px 0 8px; }
  .lg-alt { margin-top: 12px; } .or { margin-bottom: 10px; } .alt-list { gap: 8px; }
  .card-foot { margin-top: 12px; }
}
@media (min-width: 960px) and (max-height: 820px) { .signin { padding-top: 18px; } }
/* Desktop: the board has no panel of its own, so the drawing and the nameplate float on the sky of characters
   (login-glyphs.js centres the IQ Cube on it; the owner liked it see-through, 11/12/26). Reduced transparency keeps
   the solid panel. */
@media (min-width: 960px) {
  .tile-board { background: transparent; border-color: transparent; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (min-width: 960px) and (prefers-reduced-transparency: reduce) {
  .tile-board { background: radial-gradient(circle, var(--board-dot) 1.2px, transparent 1.7px) 0 0 / 22px 22px, var(--board-solid);
    border-color: var(--tile-line); box-shadow: inset 0 1px 0 var(--tile-edge), var(--tile-shadow); }
}
@media (forced-colors: active) {
  .login-card::before, .lens::after, .plate::after { display: none; }
  .login-card, .tile, .msg, .notice, .caps, .alt-btn, .admins li { border: 1px solid CanvasText; }
  .brand-name, .brand-name .iq { color: CanvasText; -webkit-text-fill-color: CanvasText; background: none; }
  .lock-fill { background: CanvasText; }
}
