/* latin-ext */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/sora-f9e5e339.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/sora-4fa0aa0c.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/sora-f9e5e339.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/sora-4fa0aa0c.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(fonts/sora-f9e5e339.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(fonts/sora-4fa0aa0c.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/worksans-5b1fe2fb.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/worksans-94b95f7b.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/worksans-f7b83de3.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/worksans-5b1fe2fb.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/worksans-94b95f7b.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/worksans-f7b83de3.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/worksans-5b1fe2fb.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/worksans-94b95f7b.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/worksans-f7b83de3.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/*
 * The sign-in and consent pages.
 *
 * nullAuth's design system, cut down to one card: Sora and Work Sans,
 * self-hosted; 1.5px borders; square corners; the same oklch ramps. Dark mode
 * follows the system setting, since these pages run no script to toggle it.
 * Served under `style-src 'self'`, so no inline styles anywhere.
 */

:root {
  --accent: #7c3aed;
  --bg: oklch(0.99 0.002 90);
  --text: oklch(0.16 0.004 290);
  --muted: oklch(0.16 0.004 290 / 0.55);
  --faint: oklch(0.16 0.004 290 / 0.035);
  --border: oklch(0.16 0.004 290 / 0.12);
  --card-bg: oklch(1 0 0);
  --danger: #e03131;
  --warn: #e8590c;
  --primary: var(--text);
  --on-primary: var(--bg);

  --sans: 'Work Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Sora', ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(0.16 0.004 290);
    --text: oklch(0.97 0.002 90);
    --muted: oklch(0.97 0.002 90 / 0.55);
    --faint: oklch(0.97 0.002 90 / 0.06);
    --border: oklch(0.97 0.002 90 / 0.16);
    --card-bg: oklch(0.21 0.005 290);
    --danger: #ff6b6b;
    --warn: #ff922b;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.card-page {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 40px 20px;
}

.card {
  width: 416px;
  max-width: 100%;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
}

.card-brand {
  margin-bottom: 1.5rem;
}

.brand-mark {
  display: block;
  height: 1.75rem;
  width: auto;
  margin-bottom: 0.75rem;
}

.card-brand .server {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-brand h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: 0.02em;
  margin: 0.375rem 0 0;
}

p {
  margin: 0 0 1rem;
}

.mono {
  font-family: var(--mono);
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

.muted {
  color: var(--muted);
  font-size: 0.875rem;
}

.error-block,
.warn-block {
  padding: 0.625rem;
  margin-bottom: 1rem;
  border: 1.5px solid var(--danger);
  color: var(--danger);
  font-size: 0.875rem;
}

.warn-block {
  border-color: var(--warn);
  color: var(--warn);
}

.grants {
  margin: 0 0 1.25rem;
  padding: 0.75rem 0.75rem 0.75rem 2rem;
  background: var(--faint);
  border: 1.5px solid var(--border);
  font-size: 0.875rem;
}

.grants li + li {
  margin-top: 0.375rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0;
}

.form-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-input {
  font-family: var(--sans);
  font-size: 15px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  width: 100%;
  border-radius: 0;
}

.form-input:focus,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.primary-button,
.secondary-button {
  display: block;
  width: 100%;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 0;
  cursor: pointer;
}

a.primary-button {
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

.primary-button {
  background: var(--primary);
  color: var(--on-primary);
  border: 1.5px solid var(--primary);
}

.secondary-button {
  margin-top: 0.625rem;
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.switch {
  margin-top: 1.25rem;
  text-align: center;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 0.625rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-top: 1.5px solid var(--border);
}

.divider + form .secondary-button {
  margin-top: 0;
}

/* The account page. */
.card.is-wide {
  width: 640px;
}

section {
  margin-bottom: 1.75rem;
}

section h2 {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.rows {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.rows li > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.inline-form {
  display: inline;
  margin: 0;
}

.link-button.is-danger {
  color: var(--danger);
}

.ok-block {
  padding: 0.6rem 0.75rem;
  border-left: 3px solid var(--accent);
  background: var(--faint);
}

.qr {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.qr svg {
  width: 200px;
  height: 200px;
  /* The code must stay dark on light to scan, in either theme. */
  background: #fff;
  padding: 8px;
}

.primary-button.is-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

/* A checkbox with its explanation beside it. */
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0;
  font-size: 0.9375rem;
}

.check input {
  margin-top: 0.2rem;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  flex: none;
}

/* A link that follows a full-width button. */
.after-button {
  margin-top: 1rem;
}

/* Recovery codes: two columns, easy to read off and copy. */
.codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1.5rem;
  margin: 1rem 0;
  padding: 1rem 1rem 1rem 2.5rem;
  background: var(--faint);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.recovery {
  margin-top: 1rem;
}

.recovery summary {
  cursor: pointer;
  color: var(--muted);
}

.recovery[open] summary {
  margin-bottom: 0.75rem;
}
