@font-face {
  font-family: "Schibsted Grotesk Variable";
  src: url("/assets/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #04060B;
  --surface: #0A0E17;
  --field: #05080F;
  --line: #1B2436;
  --line-2: #2A3650;
  --text: #F2F5FA;
  --white: #FFFFFF;
  --text-2: #9AA6BC;
  --text-3: #7C89A3;
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --blue-400: #5B9BFF;
  --amber-400: #F5B544;
  --red-400: #FF6B6B;
  --wm-fill: rgba(62, 108, 230, .11);
  --wm-stroke: rgba(130, 173, 255, .60);
  font-family: "Schibsted Grotesk Variable", "Hanken Grotesk", system-ui, sans-serif;
  font-synthesis: none;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; margin: 0; }
body { background: var(--bg); overflow-x: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--blue-400); }

.shell { position: relative; display: grid; grid-template-rows: 72px minmax(0, 1fr); min-height: 100dvh; isolation: isolate; overflow: hidden; }
.shell::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(ellipse 85% 45% at 50% 110%, rgba(53, 91, 218, .24), transparent 74%), radial-gradient(ellipse 40% 60% at 0% 100%, rgba(45, 103, 219, .12), transparent 76%), radial-gradient(ellipse 40% 60% at 100% 100%, rgba(115, 75, 204, .13), transparent 76%); }
.shell::after { content: ""; position: fixed; inset: auto 0 0; height: 2px; z-index: 0; pointer-events: none; background: linear-gradient(90deg, transparent 3%, #3761bd 25%, #9bc3ff 48%, #a493e9 65%, transparent 97%); box-shadow: 0 -8px 36px rgba(91, 128, 234, .20); }
.wordmark { position: fixed; z-index: 0; left: 50%; bottom: 0; width: 108vw; height: auto; transform: translate(-50%, 6%); pointer-events: none; animation: wordmark-enter 900ms ease-out both; }
.wordmark path { stroke: url(#frauth-wordmark-shine); }
@keyframes wordmark-enter {
  from { opacity: 0; transform: translate(-50%, calc(6% + 12px)); }
  to { opacity: 1; transform: translate(-50%, 6%); }
}
.shell-header, .shell-main { position: relative; z-index: 1; }
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: clamp(24px, 5vw, 64px); }
.shell-header { height: 72px; }
.header-content { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 100%; }
.brand { grid-column: 2; justify-self: center; display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 20.5px; line-height: 26px; font-weight: 600; letter-spacing: -.02em; text-decoration: none; }
.brand:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 4px; border-radius: 4px; }
.brand-mark { flex: none; width: 54px; height: 26px; }
.account-slot { grid-column: 3; justify-self: end; min-width: 0; }
.shell-main { display: grid; place-items: center; min-height: calc(100dvh - 72px); padding: 24px; }
.shell-main > .panel, .shell-main > .desktop-frame { transform: translateY(-3dvh); }

.panel { width: min(440px, 100%); padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.panel h2 { margin: 0; color: var(--text); font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: 0; }
.panel-helper, .panel-copy { max-width: 60ch; color: var(--text-2); font-size: 15px; line-height: 22px; }
.panel-helper { margin: 8px 0 32px; }
.panel-copy { margin: 16px 0 0; }
.field + .field { margin-top: 20px; }
.field label { display: block; margin-bottom: 8px; color: var(--text); font-size: 14px; line-height: 20px; font-weight: 500; }
.field-control { position: relative; }
.field input { width: 100%; height: 48px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 10px; outline: none; color: var(--text); background: var(--field); font-size: 16px; line-height: 24px; }
.field input::placeholder { color: var(--text-3); opacity: 1; }
.field input:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 2px; }
.field[data-invalid] input, .field input[aria-invalid="true"] { border-color: var(--red-400); }
.field-error { margin: 8px 0 0; color: var(--red-400); font-size: 14px; line-height: 20px; }
.field-control input[data-password] { padding-right: 72px; }
.reveal { position: absolute; top: 4px; right: 4px; min-width: 56px; height: 40px; padding: 0 8px; border: 0; border-radius: 8px; color: var(--text-2); background: transparent; font-size: 14px; line-height: 20px; font-weight: 500; }
.reveal:hover { color: var(--blue-400); }
.reveal:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 2px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; font-size: 16px; line-height: 24px; font-weight: 600; }
.button-primary { margin-top: 24px; color: var(--white); background: var(--blue-600); }
.button-primary:hover { background: var(--blue-700); }
.button-primary:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 2px; }
.button-primary:disabled { cursor: wait; background: var(--blue-700); }
.button-spinner { width: 18px; height: 18px; }
.button-spinner[hidden] { display: none; }
.form-message:empty { display: none; }
.form-message:not(:empty) { margin: 12px 0 0; color: var(--red-400); font-size: 14px; line-height: 20px; }

.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text); background: transparent; font-size: 13px; line-height: 16px; font-weight: 500; }
.status-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--amber-400); }
.panel .chip { margin-bottom: 24px; }
.panel-divider { height: 1px; margin: 24px 0; background: var(--line); }
.schedule-row { margin: 0; }
.schedule-row dt { color: var(--text-2); font-size: 14px; line-height: 20px; }
.schedule-row dd { margin: 8px 0 0; color: var(--text); font-size: 16px; line-height: 24px; }

.waiting-panel { width: min(580px, 100%); }
.waiting-panel h1 { margin: 0; color: var(--text); font-size: clamp(30px, 6vw, 44px); line-height: 1.1; letter-spacing: -.035em; }
.waiting-panel .chip { margin-bottom: 28px; }
.waiting-panel .panel-copy { margin-top: 18px; font-size: 16px; line-height: 25px; }
.waiting-countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 32px; }
.waiting-unit { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; padding: 16px 4px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--field); }
.waiting-unit strong { font-size: clamp(24px, 6vw, 38px); font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.04em; }
.waiting-unit span { color: var(--text-2); font-size: 12px; }
.waiting-status { min-height: 22px; margin: 18px 0 0; color: var(--text-2); font-size: 14px; line-height: 22px; }
.waiting-footer { margin: 32px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13px; line-height: 20px; }
.shell-waiting-amber { --line: #332b23; --line-2: #4b3a29; --text-2: #bcb2a7; --text-3: #9c8e80; --field: #120f0c; --surface: #0d0b0a; --amber-400: #f5bd65; --wm-fill: rgba(188,100,38,.13); --wm-stroke: rgba(242,180,101,.68); background: #090807; }
.shell-waiting-amber::before { background: radial-gradient(ellipse 86% 48% at 50% 112%, rgba(193,106,39,.2), transparent 74%), radial-gradient(ellipse 40% 60% at 0% 100%, rgba(177,83,38,.1), transparent 76%), radial-gradient(ellipse 40% 60% at 100% 100%, rgba(218,149,68,.1), transparent 76%); }
.shell-waiting-amber::after { background: linear-gradient(90deg, transparent 3%, #925126 25%, #f5bd65 48%, #c77b43 65%, transparent 97%); box-shadow: 0 -8px 36px rgba(206,124,56,.16); }
.shell-waiting-amber .waiting-unit strong { color: #ffcf81; }
.shell-waiting-amber .waiting-status time { color: #f3c58b; }
@media (max-width: 460px) { .waiting-panel { padding: 24px; } .waiting-countdown { gap: 6px; } .waiting-unit { padding: 13px 2px; } }

.desktop-frame { display: flex; flex-direction: column; width: min(560px, 100%); aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.frame-bar { display: flex; align-items: center; gap: 8px; flex: none; height: 36px; padding-inline: 16px; border-bottom: 1px solid var(--line); }
.frame-bar span { width: 10px; height: 10px; border: 1px solid var(--line-2); border-radius: 50%; }
.frame-body { display: grid; flex: 1; place-items: center; }

@media (prefers-reduced-motion: reduce) {
  .wordmark { animation: none; }
  *, *::before, *::after { transition: none !important; }
}
