:root {color-scheme: light dark;
  --bg-void: light-dark(#f8fafc, #05080c);
  --bg-primary: light-dark(#f1f5f9, #0a0f16);
  --bg-card: light-dark(#ffffff, #0f151e);
  --bg-card-hover: light-dark(#f1f5f9, #1a2436);
  --bg-surface: light-dark(#e2e8f0, #141c28);
  --bg-control: light-dark(#ffffff, #141c28);
  --border: light-dark(#e2e8f0, rgba(255, 255, 255, 0.10));
  --border-subtle: light-dark(#edf0f4, rgba(255, 255, 255, 0.05));
  --text-primary: light-dark(#0f172a, #f0f4f8);
  --text-secondary: light-dark(#475569, #9ca8b8);
  --text-tertiary: light-dark(#64748b, #7a8a9a);
  --text-muted: light-dark(#94a3b8, #6b7d8f);
  --accent: light-dark(#0891b2, #22d3ee);
  --accent-light: light-dark(#06b6d4, #67e8f9);
  --accent-dim: light-dark(rgba(8, 145, 178, 0.08), rgba(34, 211, 238, 0.10));
  --accent-soft: light-dark(rgba(8, 145, 178, 0.10), rgba(34, 211, 238, 0.12));
  --accent-ring: light-dark(rgba(8, 145, 178, 0.25), rgba(34, 211, 238, 0.35));
  --on-accent: light-dark(#ffffff, #000000);
  --green: light-dark(#059669, #10b981);
  --green-dim: light-dark(rgba(5, 150, 105, 0.08), rgba(16, 185, 129, 0.15));
  --amber: light-dark(#d97706, #f59e0b);
  --amber-dim: light-dark(rgba(217, 119, 6, 0.08), rgba(245, 158, 11, 0.15));
  --red: light-dark(#dc2626, #ef4444);
  --code-terminal-bg: #1e293b;
  --code-terminal-border: #334155;
  --code-terminal-text: #e2e8f0;
  --shadow-tint-md: light-dark(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.5));
  --shadow-tint-lg: light-dark(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.6));
  --shadow-md: 0 4px 12px var(--shadow-tint-md);
  --shadow-lg: 0 12px 32px var(--shadow-tint-lg);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
:root[data-theme="dark"] {color-scheme: dark; }
:root[data-theme="light"] {color-scheme: light; }
* {margin: 0; padding: 0; box-sizing: border-box; }
html {background: var(--bg-void); }
body {background: var(--bg-void); color: var(--text-primary); font-family: var(--font-sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
a {color: var(--accent); text-decoration: none; }
.logo-mark {position: relative;
  width: 36px;
  height: 36px;
  flex: none; }
.logo-outer {position: absolute;
  inset: 0;
  background: var(--accent);
  border-radius: 8px; }
.logo-inner {position: absolute;
  inset: 3px;
  background: var(--bg-primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center; }
.logo-glyph {width: 16px;
  height: 16px;
  border: 2px solid var(--accent);
  border-radius: 2px; }
.wordmark {display: flex; align-items: center; gap: 12px; }
.wordmark .name {font-size: 14px; font-weight: 700; letter-spacing: -0.3px; color: var(--text-primary); white-space: nowrap; }
.centre-inner .wordmark .name {font-size: 22px; letter-spacing: -0.02em; }
.badge {display: inline-block; margin-left: 6px; padding: 2px 5px; border-radius: 4px;
  font-size: 9px; line-height: 1; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  background: light-dark(rgba(8, 145, 178, 0.12), rgba(34, 211, 238, 0.16));
  border: 1px solid light-dark(rgba(8, 145, 178, 0.35), rgba(34, 211, 238, 0.38));
  position: relative; top: -2.0em; vertical-align: baseline; }
.centre-stage {min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg-void); }
.centre-inner {width: 368px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.centre-inner .sub {font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); margin-top: -12px; }
.field {margin-bottom: 14px; }
.field label {display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 6px; font-family: var(--font-mono); }
.field input {width: 100%; background: var(--bg-control); color: var(--text-primary); border: 1px solid var(--border);
  border-radius: 7px; padding: 10px 12px; font-size: 14px; font-family: var(--font-sans); outline: none; }
.field input:focus {border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-dim); }
.hint {font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.btn {display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; padding: 12px 20px; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; font-family: var(--font-sans);
  white-space: nowrap; }
.btn-primary {background: var(--accent); color: var(--on-accent); width: 100%; }
.btn-primary:hover {background: var(--accent-light); }
.btn-secondary {background: var(--bg-surface); color: var(--text-primary); border-color: var(--border); }
.btn-secondary:hover {background: var(--bg-card-hover); }
.btn-inline {width: auto; }
.legal {font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); margin-top: 26px; }
@keyframes prov-pulse { 50% { opacity: 0.25; } }
.code-row {display: flex; gap: 10px; justify-content: center; margin: 26px 0 8px; }
.code-cell {width: 46px; height: 56px; text-align: center;
  font-family: var(--font-mono); font-size: 22px;
  background: var(--bg-control); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 10px; outline: none;
  caret-color: var(--accent); }
.code-cell:focus {border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-dim); }
@media (max-width: 480px) {
.centre-stage {padding: 16px; }
.centre-inner {width: 100% !important; max-width: 420px; }
.code-row input {width: 40px; height: 50px; }
}
.turnstile-wrap {position: relative; overflow: hidden;
  height: 63px; margin-bottom: 14px;
  border: 1px solid var(--border); border-radius: 9px;
  background: var(--bg-control); }
.turnstile-wrap .cf-turnstile {position: absolute; top: -1px; left: -1px;
  width: calc(100% + 2px); height: calc(100% + 2px); }
.turnstile-wrap iframe {display: block; width: 100% !important; height: 100% !important; }
.hint--error {color: var(--red); }
.btn.is-busy, .btn.is-busy:hover {cursor: progress; background: var(--accent); opacity: 1; }
.btn.is-busy::before {content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: btn-busy-spin .8s linear infinite; }
@keyframes btn-busy-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
.btn.is-busy::before {animation: none; border-top-color: currentColor; opacity: .6; }
}
.step-qr {width: 188px;
  margin: 4px auto 18px;
  padding: 8px;
  background: #ffffff;
  border-radius: var(--radius); }
.step-qr svg {width: 100%; height: auto; display: block; }
.step-key {display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--text-secondary); }
.step-key__value {font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--text-primary); overflow-wrap: anywhere; }
.btn-copy {padding: 5px 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer; }
.btn-copy:hover {color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.btn-copy:focus-visible {outline: 2px solid var(--accent-ring); outline-offset: 2px; }
.choice-list {display: grid; gap: 10px; text-align: left; }
.choice {display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: var(--bg-control); color: inherit; text-decoration: none; }
a.choice:hover, a.choice:focus-visible {border-color: var(--accent-ring); background: var(--accent-dim); }
.row-actions {display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.step-codes {display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; margin: 4px 0 16px; padding: 16px 20px; list-style: none; background: var(--bg-control); border: 1px solid var(--border); border-radius: 8px; font-family: var(--font-mono); font-size: 13px; text-align: center; color: var(--text-primary); }
@media (max-width: 400px) {
.step-codes {grid-template-columns: 1fr; }
}
.field select {width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-control); color: var(--text-primary); font: inherit; font-size: 14px; }
.centre-inner > main {width: 100%; }
.centre-inner--login {width: 396px; }
.centre-inner--step {width: 460px; }
.login-card {width: 100%; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 44px 36px 38px; }
.login-title {font-size: 19px; font-weight: 600; letter-spacing: -0.02em; text-align: center; margin: 0 0 10px; color: var(--text-primary); text-wrap: balance; }
.login-intro {margin: 0 0 24px; text-align: center; font-size: 13px; line-height: 1.65; color: var(--text-secondary); text-wrap: pretty; }
.login-intro b {color: var(--text-primary); font-weight: 600; }
.login-card .field {margin-bottom: 18px; }
.login-card .field:last-of-type {margin-bottom: 0; }
.login-submit {width: 100%; margin-top: 22px; }
.login-error, .login-notice {border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; line-height: 1.5; margin-bottom: 18px; }
.login-error {background: var(--red-dim, rgba(239, 68, 68, .1)); border: 1px solid color-mix(in srgb, var(--red) 40%, transparent); color: var(--red); }
.login-notice {background: var(--green-dim); border: 1px solid color-mix(in srgb, var(--green) 40%, transparent); color: var(--green); }
.login-card .code-row {margin: 0; gap: 8px; }
.login-card .code-cell {flex: 1 1 0; width: auto; min-width: 0; height: 48px; }
.login-or {display: flex; align-items: center; gap: 10px; margin: 22px 0 16px; color: var(--text-muted); font-size: 12px; }
.login-or::before, .login-or::after {content: ""; flex: 1; border-top: 1px solid var(--border); }
.login-microsoft {display: flex; width: 100%; justify-content: center; gap: 10px; }
.login-microsoft svg {width: 16px; height: 16px; flex: none; }
.login-links {display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.login-link {display: block; width: 100%; margin: 0; padding: 0; background: none; border: 0; font: inherit; font-size: 13px; color: var(--text-secondary); text-align: center; text-decoration: none; cursor: pointer; list-style: none; }
.login-link::-webkit-details-marker {display: none; }
.login-link:hover {color: var(--text-primary); text-decoration: underline; }
.login-link:focus-visible {outline: 2px solid var(--accent-ring); outline-offset: 3px; border-radius: 3px; }
.login-recovery {margin-top: 20px; }
.login-recovery[open] > .login-link {margin-bottom: 14px; }
.login-recovery .hint {margin-top: 8px; line-height: 1.55; }
.login-card .step-qr {margin: 0 auto 16px; }
.login-card .step-key {margin-bottom: 8px; }
.login-card .step-codes {margin: 0 0 16px; }
.login-card .row-actions {margin: 0; }
.login-card .choice-list {margin-top: 4px; }
.login-intro--quiet {margin: 0; font-size: 12.5px; color: var(--text-tertiary); }
a.wordmark {text-decoration: none; }
fieldset.choice-list {border: 0; padding: 0; margin: 0 0 18px; }
.choice input[type=radio] {margin-top: 3px; accent-color: var(--accent); }
label.choice {cursor: pointer; }
label.choice:has(input:checked) {border-color: var(--accent-ring); background: var(--accent-dim); }
.field input[type="password"] {font-family: var(--font-mono); }
.choice-list {display: grid; gap: 10px; }
.choice {display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: var(--bg-control); cursor: pointer; }
.choice input {margin-top: 3px; }
.btn[disabled] {opacity: .5; cursor: not-allowed; }
.login-card .login-fine {margin-top: 18px; text-align: center; }
.field select {width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-control); color: var(--text-primary); font: inherit; font-size: 14px; }
.field legend {padding: 0; margin-bottom: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary); }
.login-fine a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 2px; }
.login-fine a:hover { color: var(--text-primary); }
