/* Extracted from index.html on 2026-08-17 so the page needs no inline
 * <style>, which is what lets the CSP drop 'unsafe-inline' for styles.
 * Still a plain static file — no build step. */

:root {
    --bg: #10141a;
    --bg-panel: #161b22;
    --grid-line: #232a33;
    --steel: #4a6b8a;
    --steel-dim: #2e4356;
    --amber: #e8a33d;
    --amber-dim: #a87527;
    --text: #e8e6e1;
    --text-dim: #8a9199;
    --text-faint: #545c66;
    --danger: #d9614f;
    --ok: #5fae7a;
    --radius: 3px;
  }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    min-height: 100vh;
    background:
      linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 100% 32px,
      linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 32px 100%,
      var(--bg);
    background-blend-mode: normal;
    opacity: 1;
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
  }

  body::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 900px 600px at 50% 40%, rgba(74,107,138,0.10), transparent 70%);
    pointer-events: none;
  }

  /* Signal trace along top edge */
  .trace-band {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    overflow: hidden;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--grid-line);
  }
  .trace-band svg { width: 200%; height: 100%; animation: trace-scroll 14s linear infinite; }
  @keyframes trace-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
  @media (prefers-reduced-motion: reduce) {
    .trace-band svg { animation: none; }
  }

  .wrap { width: 100%; max-width: 400px; padding: 24px; position: relative; z-index: 1; }

  .brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 28px;
    justify-content: center;
  }
  .brand-mark {
    width: 9px; height: 9px;
    background: var(--amber);
    border-radius: 50%;
    box-shadow: 0 0 8px 1px rgba(232,163,61,0.6);
    animation: pulse 2.4s ease-in-out infinite;
  }
  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
  }
  @media (prefers-reduced-motion: reduce) {
    .brand-mark { animation: none; }
  }
  .brand-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
  }
  .brand-text b { color: var(--text); font-weight: 700; }

  .panel {
    background: var(--bg-panel);
    border: 1px solid var(--grid-line);
    border-radius: var(--radius);
    padding: 32px 28px;
    position: relative;
  }

  /* Instrument-faceplate corner ticks */
  .panel::before, .panel::after,
  .panel .tick-br, .panel .tick-bl {
    content: "";
    position: absolute;
    width: 10px; height: 10px;
    border: 1px solid var(--steel-dim);
  }
  .panel::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
  .panel::after { top: -1px; right: -1px; border-left: none; border-bottom: none; }

  .panel-header { margin-bottom: 22px; }
  .panel-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--amber);
    margin: 0 0 6px;
  }
  .panel-title {
    font-size: 19px;
    font-weight: 600;
    margin: 0;
    color: var(--text);
  }
  .panel-sub {
    font-size: 13px;
    color: var(--text-dim);
    margin: 6px 0 0;
    line-height: 1.5;
  }

  .field { margin-bottom: 16px; }
  .field label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 6px;
  }
  .field input {
    width: 100%;
    background: #0d1116;
    border: 1px solid var(--grid-line);
    border-radius: var(--radius);
    padding: 11px 12px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: border-color 0.15s ease;
  }
  .field input:focus {
    outline: none;
    border-color: var(--steel);
  }
  .field input.code-input {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    letter-spacing: 0.35em;
    text-align: center;
    padding: 12px 8px 12px 16px;
  }
  .field input::placeholder { color: var(--text-faint); }

  button.primary {
    width: 100%;
    background: var(--amber);
    color: #1a1204;
    border: none;
    border-radius: var(--radius);
    padding: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
    margin-top: 4px;
  }
  button.primary:hover:not(:disabled) { background: #f0ae4e; }
  button.primary:disabled { opacity: 0.5; cursor: not-allowed; }

  .link-row {
    text-align: center;
    margin-top: 16px;
  }
  .link-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 12.5px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 4px;
  }
  .link-btn:hover { color: var(--steel); }

  .alert {
    display: none;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    line-height: 1.45;
    font-family: 'Inter', sans-serif;
  }
  .alert.show { display: block; }
  .alert.error { background: rgba(217,97,79,0.12); border: 1px solid rgba(217,97,79,0.35); color: #e58a7c; }
  .alert.info { background: rgba(74,107,138,0.12); border: 1px solid rgba(74,107,138,0.35); color: #8fb3d1; }

  .qr-box {
    background: #fff;
    padding: 12px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
  }
  .qr-box img { display: block; width: 176px; height: 176px; }

  .secret-fallback {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-dim);
    background: #0d1116;
    border: 1px solid var(--grid-line);
    border-radius: var(--radius);
    padding: 10px 12px;
    word-break: break-all;
    margin-bottom: 18px;
    text-align: center;
    letter-spacing: 0.04em;
  }

  .backup-codes {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    background: #0d1116;
    border: 1px solid var(--grid-line);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin: 16px 0;
    color: var(--text);
  }

  .warn-box {
    font-size: 12.5px;
    color: var(--text-dim);
    background: rgba(232,163,61,0.08);
    border: 1px solid rgba(232,163,61,0.25);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 18px;
    line-height: 1.5;
  }

  .status-line {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    margin-top: 22px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
  }
  .status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

  .hidden { display: none !important; }
