:root {
  color-scheme: dark;
  --bg: #0f0b18; --deep: #0a0712; --card: #1a1428; --surface: #201a30;
  --border: #3b314b; --fg: #f0ebfa; --muted: #b3a9c6; --accent: #efb23f;
  --bright: #f7cf6b; --ink: #241a08; --accent-text: #efb23f; --tint: #efb23f0d;
  --error-bg: #361d2b; --error-fg: #ffd4df; --warning-bg: #352817; --warning-fg: #ffe2ae;
  font: 500 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--fg);
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f1e6; --deep: #fffaf0; --card: #fff; --surface: #f5f0e6;
  --border: #d7cbb7; --fg: #241a2e; --muted: #645b6d; --accent-text: #825200;
  --error-bg: #fff0f3; --error-fg: #922342; --warning-bg: #fff1d5; --warning-fg: #744900;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; min-height: 100vh; min-height: 100dvh; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); display: flex; flex-direction: column; }
h1, h2, p { margin: 0; }
button, input { font: inherit; }
button, input, a { -webkit-tap-highlight-color: transparent; }
button { min-height: 54px; padding: 13px 18px; cursor: pointer; border-radius: 15px; border: 1px solid transparent; font-weight: 750; touch-action: manipulation; }
button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
button:not(:disabled):active { transform: translateY(1px); }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 4px; }
[hidden] { display: none !important; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); padding: 18px 32px; background: var(--deep); }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--fg); }
.brand img { display: block; border-radius: 14px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1rem; font-weight: 800; letter-spacing: -.02em; }
.brand small { font-size: .75rem; color: var(--muted); }
.theme-toggle { min-height: 52px; padding: 10px 16px; background: transparent; color: var(--fg); border-color: var(--border); font-size: .84rem; white-space: nowrap; }
.access-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); align-items: center; gap: 70px; max-width: 1080px; width: 100%; margin: auto; padding: 56px 28px; }
.eyebrow { font-weight: 800; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-text); margin-bottom: 20px; }
.welcome h1 { font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.08; margin-bottom: 26px; }
.welcome > p:not(.eyebrow) { font-size: 1.05rem; color: var(--muted); line-height: 1.7; }
.welcome-note { display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--border); margin-top: 36px; padding-top: 24px; font-size: .85rem; color: var(--muted); max-width: 360px; }
.note-icon { display: grid; place-items: center; border: 1px solid var(--border); color: var(--accent-text); background: var(--tint); border-radius: 50%; width: 36px; height: 36px; flex: 0 0 36px; font-weight: 800; }
.access-card { border: 1px solid var(--border); border-radius: 24px; background: var(--card); padding: 32px; min-width: 0; box-shadow: 0 18px 60px #00000009; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 24px; }
.step { color: var(--accent-text); font-size: .69rem; letter-spacing: .09em; font-weight: 800; }
.card-dot { height: 7px; width: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--tint); }
.access-card h2 { font-size: 1.8rem; font-weight: 800; line-height: 1.2; letter-spacing: -.03em; margin-bottom: 10px; }
.muted { color: var(--muted); font-size: .93rem; }
form > label { display: block; margin-top: 24px; margin-bottom: 9px; font-size: .85rem; font-weight: 750; }
input:not([type="radio"]) { width: 100%; min-height: 56px; border: 1px solid var(--border); border-radius: 12px; color: var(--fg); background: var(--bg); padding: 14px; font-size: 1rem; }
input::placeholder { color: var(--muted); opacity: .8; }
.password-field { display: flex; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.password-field input { border: 0; background: transparent; min-width: 0; }
.password-field .reveal { color: var(--accent-text); font-size: .79rem; padding-inline: 12px; min-width: 70px; border-radius: 10px; background: transparent; flex-shrink: 0; }
.primary { display: flex; align-items: center; justify-content: center; gap: 16px; width: 100%; background: linear-gradient(180deg, var(--bright), var(--accent)); color: var(--ink); box-shadow: 0 8px 24px #efb23f20; margin-top: 28px; }
.primary span { font-size: 1.2rem; }
.secondary { width: 100%; background: var(--surface); border-color: var(--border); color: var(--fg); }
.form-note { color: var(--muted); font-size: .75rem; margin-top: 20px; text-align: center; }
.message { padding: 14px 16px; border-radius: 12px; font-size: .87rem; margin-top: 20px; overflow-wrap: anywhere; }
.error { color: var(--error-fg); background: var(--error-bg); border: 1px solid #b6647855; }
.warning { color: var(--warning-fg); background: var(--warning-bg); border: 1px solid #d6a13f70; }
.status { color: var(--accent-text); font-size: .85rem; margin-top: 18px; }
fieldset { border: 0; margin: 24px 0 16px; padding: 0; min-width: 0; }
legend { font-size: .85rem; font-weight: 750; margin-bottom: 12px; }
.channel { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; min-height: 76px; }
.channel + .channel { margin-top: 10px; }
.channel:has(input:checked) { border-color: var(--accent-text); background: var(--tint); }
.channel input { accent-color: var(--accent); width: 22px; height: 22px; margin: 0; flex: 0 0 22px; }
.channel strong, .channel small { display: block; }
.channel strong { font-size: .92rem; }
.channel small { color: var(--muted); font-size: .74rem; margin-top: 3px; }
.field-hint { font-size: .76rem; color: var(--muted); margin-top: 9px; }
#code { font-variant-numeric: tabular-nums; }
.text-button { color: var(--muted); background: transparent; width: 100%; margin-top: 12px; font-size: .85rem; }
#retry-session { margin-top: 24px; }
footer { text-align: center; color: var(--muted); font-size: .72rem; padding: 22px 20px; }
footer span { margin: 0 8px; color: var(--accent-text); }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 12px; z-index: 10; color: var(--ink); background: var(--accent); }
.skip-link:focus { top: 12px; }
noscript { padding: 20px; text-align: center; }
@media (orientation: portrait), (max-width: 800px) {
  .access-layout { grid-template-columns: minmax(0, 480px); justify-content: center; gap: 32px; padding: 40px 24px; }
  .welcome h1 { font-size: 2.8rem; margin-bottom: 18px; }
  .welcome h1 br { display: none; }
  .welcome .eyebrow { margin-bottom: 12px; }
  .welcome-note { display: none; }
}
@media (max-width: 480px) {
  .topbar { padding: 14px 18px; gap: 10px; }
  .brand { gap: 8px; }
  .brand img { width: 42px; height: 42px; }
  .brand strong { font-size: .87rem; }
  .brand small { font-size: .66rem; }
  .theme-toggle { font-size: .75rem; padding-inline: 10px; }
  .access-layout { padding: 32px 18px; gap: 24px; }
  .welcome h1 { font-size: 2.35rem; }
  .welcome > p:not(.eyebrow) { font-size: .95rem; }
  .access-card { padding: 24px; border-radius: 20px; }
  .access-card h2 { font-size: 1.55rem; }
}
@media (max-width: 360px) {
  .topbar { padding-inline: 12px; }
  .brand small { max-width: 80px; }
  .brand img { width: 36px; height: 36px; }
  .theme-toggle { padding-inline: 8px; font-size: .7rem; }
  .access-layout { padding-inline: 12px; }
  .access-card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
