  /* The tokens this page uses, with the same values as base.html (a test keeps them equal). */
  :root {
    color-scheme: dark;
    --bg: #0b1520; --bg-glow: #0a1f2c; --input-bg: #0d1622; --panel: #111827;
    --card-sheen: rgba(234, 242, 248, 0.018); --card-highlight: rgba(234, 242, 248, 0.05); --shadow: rgba(0, 0, 0, 0.45);
    --border: rgba(55, 65, 81, 0.6); --input-border: #677385; --chip-line: rgba(212, 216, 225, 0.24);
    --text: #eaf2f8; --text-faint: #9aa6b5;
    --thread: #f6b43c; --thread-hover: #ffc75e; --on-thread: #1a1305;
    --focus: #f6b43c; --accent: #f6b43c; --accent-bg: rgba(246, 180, 60, 0.14);
    --logo-tile: #122030; --logo-edge: rgba(212, 216, 225, 0.2);
    --logo-gold: #f6b43c; --logo-gold-deep: #b8860b; --logo-silver: #d4d8e1; --logo-silver-deep: #8a93a3;
    --down: #f87171; --down-bg: rgba(248, 113, 113, 0.12); --down-line: rgba(248, 113, 113, 0.45);
    --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  }
  * { box-sizing: border-box; }
  body {
    margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(1100px 640px at 50% -10%, var(--bg-glow), transparent 75%), var(--bg);
    color: var(--text); font-family: var(--font-sans); font-weight: 400; line-height: 1.5; -webkit-font-smoothing: antialiased;
  }
  .login-card {
    position: relative; overflow: hidden;
    background: linear-gradient(180deg, var(--card-sheen), transparent 180px), var(--panel);
    border: 1px solid var(--border); border-radius: 16px;
    box-shadow: inset 0 1px 0 var(--card-highlight), 0 24px 48px -32px var(--shadow);
    padding: 32px 28px 28px; width: 100%; max-width: 360px; margin: 16px;
  }
  /* A gold-to-silver hairline along the card's top edge, the two metals of the loop. */
  .login-card::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--thread) 25%, var(--chip-line) 85%, transparent);
  }
  .brand {
    display: flex; align-items: center; gap: 12px; margin-bottom: 26px;
    font-weight: 600; font-size: 1.35rem; letter-spacing: -0.02em;
  }
  .loom-mark { display: block; flex: 0 0 auto; }
  /* The wordmark: the loop at x-height for the double "o"; the plain word beside it is for screen readers only. */
  .wordmark-art { white-space: nowrap; }
  .loom-glyph { display: inline; vertical-align: -0.01em; margin: 0 0.03em 0 0.05em; overflow: visible; }
  .wordmark-art + .wordmark {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  label { display: block; font-weight: 500; font-size: 0.82rem; margin-bottom: 6px; color: var(--text); }
  input[type="password"] {
    width: 100%; padding: 10px 12px; background: var(--input-bg); color: var(--text);
    border: 1px solid var(--input-border); border-radius: 10px; font-family: inherit; font-size: 0.95rem; margin-bottom: 18px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }
  input[type="password"]:hover { border-color: var(--text-faint); }
  input[type="password"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
  button {
    width: 100%; background: var(--thread); color: var(--on-thread); border: none; padding: 11px;
    border-radius: 10px; font-family: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer;
    transition: background-color 0.15s ease;
  }
  button:hover { background: var(--thread-hover); }
  button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .error-banner {
    background: var(--down-bg); color: var(--down); border: 1px solid var(--down-line);
    padding: 9px 12px; border-radius: 10px; font-size: 0.82rem; margin-bottom: 18px;
  }
