/* The look of Kata: THE one file a designer replaces (design/README.md says what must stay).
   Placeholder until Philippe and Eco design Kata: the tokens, fonts and components of the Duo quick setup page.
   Token names stay; values may change. Fonts are ours, served from /static/fonts: no request to any other host. */
@font-face { font-family: 'Forum'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/forum.woff2) format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/hanken-grotesk.woff2) format('woff2'); }

:root {
  --surface-base: oklch(0.17 0.010 250); --surface-raised: oklch(0.21 0.012 250); --surface-overlay: oklch(0.25 0.014 250);
  --surface-sunk: oklch(0.145 0.010 250);
  --ink-bright: oklch(0.96 0.004 242); --ink-primary: oklch(0.91 0.006 244); --ink-secondary: oklch(0.76 0.010 245); --ink-dim: oklch(0.64 0.012 246);
  --border-hairline: oklch(0.31 0.014 248); --border-default: oklch(0.38 0.014 248); --edge-trunk: oklch(0.47 0.013 248);
  --accent: oklch(0.72 0.110 228); --accent-bright: oklch(0.80 0.130 226);
  --warm-rest: oklch(0.72 0.045 72); --warm-peak: oklch(0.83 0.145 66);
  --ok: oklch(0.80 0.14 160); --alert: oklch(0.76 0.16 25);
  --grid-dot: oklch(0.36 0.014 248 / .5);
  --glow-a: color-mix(in oklch, var(--accent-bright) 45%, transparent);
  --display: 'Forum', Georgia, 'Times New Roman', serif;
  --body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --col: 680px; --gut: 20px;
  color-scheme: dark;
}

/* @label-policy */
/* Read by the setup script and sent to the identity service as the colours of its sign-in pages (hex only; dark first,
   then light). A unit test requires the dark values to match the tokens above within 2 of 255 per channel. */
:root {
  --lp-primary: #4bcefd; --lp-background: #0c1014; --lp-font: #dee2e5; --lp-warn: #ff847c;
  --lp-primary-light: #4db2db; --lp-background-light: #f6f8fa; --lp-font-light: #1b2330; --lp-warn-light: #ff847c;
}

* { box-sizing: border-box; }
html { background: var(--surface-base); color: var(--ink-primary); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 18px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-wrap: anywhere;
       background: var(--surface-base) radial-gradient(var(--grid-dot) 1px, transparent 1.2px) 0 0 / 28px 28px; min-height: 100vh;
       display: flex; flex-direction: column; }
h1, h2, h3, ul, ol, p, dl, dd { margin: 0; }
p + p { margin-top: .9em; }
a { color: var(--ink-bright); text-underline-offset: 3px; text-decoration-color: var(--edge-trunk); }
a:hover { text-decoration-color: var(--accent-bright); }
strong { font-weight: 600; color: var(--ink-bright); }
::selection { background: color-mix(in oklch, var(--accent) 40%, transparent); color: var(--ink-bright); }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 8px; }

/* top bar: the brand, the language switch, the account or sign-in button */
.top { display: flex; align-items: center; gap: 14px; max-width: 1080px; width: 100%; margin: 0 auto; padding: 12px var(--gut);
       border-bottom: 1px solid var(--border-hairline); }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; font: 400 1.35rem/1 var(--display); letter-spacing: .05em; color: var(--ink-bright); }
.lang { display: inline-flex; gap: 4px; font-size: .9rem; }
.lang a { text-decoration: none; color: var(--ink-secondary); padding: 6px 10px; border-radius: 999px; border: 1px solid transparent; }
.lang a:hover { border-color: var(--border-default); }
.lang a[aria-current] { color: var(--ink-bright); border-color: var(--border-default); background: var(--surface-raised); }

/* the page: one column, one card per screen */
.page { max-width: var(--col); width: 100%; margin: 0 auto; padding: clamp(18px, 4vw, 40px) var(--gut); flex: 1 0 auto; }
.card { padding: clamp(20px, 4vw, 34px); border-radius: 20px; background: var(--surface-raised); border: 1px solid var(--border-hairline); }
.card h1 { font: 400 clamp(2.1rem, 7vw, 3.2rem)/1.08 var(--display); color: var(--ink-bright); text-wrap: balance; }
.card h2 { font: 400 clamp(1.5rem, 5vw, 2rem)/1.15 var(--display); color: var(--ink-bright); text-wrap: balance; }
.stack > * + * { margin-top: 1em; }
.lead { font-size: 1.14rem; line-height: 1.55; color: var(--ink-primary); }
.note { color: var(--ink-secondary); font-size: .92rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 1.4em; }
.foot { max-width: var(--col); width: 100%; margin: 0 auto; padding: 14px var(--gut) 28px; text-align: center; }

/* buttons: pills */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 24px; border-radius: 999px; cursor: pointer;
       font: 500 1rem/1.15 var(--body); text-decoration: none; text-align: center; color: var(--ink-primary); background: transparent; border: 1px solid var(--border-default);
       transition: background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .3s var(--ease); }
.btn:hover { border-color: var(--accent); }
.btn-primary { border: 0; font-weight: 600; background: var(--accent-bright); color: var(--surface-base); box-shadow: 0 0 22px -8px var(--glow-a); }
.btn-primary:hover { background: var(--ink-bright); }
.btn-quiet { border-color: transparent; color: var(--ink-secondary); }
.btn-quiet:hover { border-color: var(--border-default); color: var(--ink-bright); }
button.btn { font-family: var(--body); }

/* fields and messages (the gate page, and later the avatar steps) */
.field { margin-top: 20px; }
.field label { display: block; font: 500 1rem/1.4 var(--body); color: var(--ink-bright); margin-bottom: 4px; }
.field input { width: 100%; font: inherit; color: var(--ink-bright); background: var(--surface-sunk); border: 1px solid var(--border-default); border-radius: 14px; padding: 12px 16px; min-height: 52px; }
.field input:focus-visible { outline: none; border-color: var(--accent-bright); box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 25%, transparent); }
.alert { margin-top: 16px; padding: 12px 16px; border-radius: 14px; font-weight: 500; color: var(--alert); border: 1px solid color-mix(in oklch, var(--alert) 45%, transparent); background: color-mix(in oklch, var(--alert) 10%, transparent); }
.alert-ok { color: var(--ok); border-color: color-mix(in oklch, var(--ok) 40%, transparent); background: color-mix(in oklch, var(--ok) 10%, transparent); }
