/* Inter and Manrope (SIL OFL 1.1, see fonts/*-OFL.txt), self-hosted: no third-party font CDN. */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  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;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  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;
}
@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations");
  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;
}
@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
  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;
}

/* tokens:start - the same block lives in src/Hypatio.Id.Web/app/assets/css/main.css; a console
   test (tests/tokens.test.ts) fails when the two drift apart. */
:root {
  --page: #f6f7f9;
  --surface: #ffffff;
  --ink: #0e1526;
  --muted: #525b6b;
  --line: #e1e5ec;
  --accent: #2b3fd6;
  --accent-ink: #ffffff;
  --accent-soft: #ebeeff;
  --copper: #a84c0c;
  --ok: #16794a;
  --danger: #b42318;
  --type-text: "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --type-display: "Manrope Variable", "Inter Variable", system-ui, sans-serif;
  --type-code: ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0a0e16;
    --surface: #111827;
    --ink: #e7ebf3;
    --muted: #9aa3b4;
    --line: #252d3c;
    --accent: #8e9bff;
    --accent-ink: #0a0e16;
    --accent-soft: #1b2142;
    --copper: #f0a060;
    --ok: #6fd3a0;
    --danger: #ff8a7a;
  }
}
/* tokens:end */

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.5 var(--type-text);
  overflow-x: hidden;
}

/* The celestial sphere behind the card - decoration only. */
.backdrop {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 1100px;
  height: 1100px;
  transform: translate(-50%, -46%);
  color: var(--ink);
  opacity: .07;
  pointer-events: none;
}

.topbar, .stage, .footer { position: relative; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 28px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 700 18px/1 var(--type-display);
  letter-spacing: -.01em;
}
.brand .id { font-weight: 500; color: var(--muted); }
.mark-star { fill: var(--copper); }

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 48px;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 32px;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 0 28px 24px;
  color: var(--muted);
  font-size: 13px;
}
.footer a { color: var(--muted); }
.footer .language { display: flex; align-items: center; gap: 8px; }
.footer select {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

h1 { margin: 0 0 6px; font: 700 26px/1.25 var(--type-display); letter-spacing: -.02em; }
h2 { margin: 28px 0 8px; font: 700 17px/1.3 var(--type-display); }
p { margin: 0 0 16px; }
h1 + p { margin-bottom: 20px; }
.muted { color: var(--muted); }
code { font-family: var(--type-code); }

a { color: var(--accent); }
a:hover { color: var(--ink); }

label { display: block; font-weight: 500; margin: 16px 0 6px; }
input[type=email], input[type=password], input[type=text] {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
input[inputmode=numeric] { font-family: var(--type-code); font-size: 20px; letter-spacing: .3em; }
input[aria-invalid=true], .input-validation-error { border: 2px solid var(--danger); }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.check { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }

button, .button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  margin-top: 20px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { color: var(--accent-ink); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.secondary, .button.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
button.secondary:hover, .button.secondary:hover { background: var(--accent-soft); }
button.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
button.inline { width: auto; min-height: 36px; margin: 0; padding: 0 12px; border-radius: 8px; }
/* A choice among several (the organisation for a sign-in): left-aligned rows, not buttons. */
button.choice { justify-content: space-between; margin-top: 10px; text-align: left; }

.links { margin-top: 24px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 0; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.error { color: var(--danger); }
.error:empty { display: none; }
.field-error { color: var(--danger); font-size: 13px; display: block; margin-top: 6px; }
.field-error:empty { display: none; }
.validation-summary-errors ul { margin: 16px 0 0; padding: 12px 14px 12px 32px; border: 1px solid var(--danger); border-radius: 10px; color: var(--danger); }
.validation-summary-valid { display: none; }
.notice { padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); }
.hint { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }

.scopes { list-style: none; margin: 0 0 8px; padding: 0; }
.scopes li { position: relative; padding: 12px 0 12px 30px; border-top: 1px solid var(--line); }
.scopes li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 15px;
  width: 6px;
  height: 11px;
  border: solid var(--ok);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.codes {
  list-style: none;
  columns: 2;
  margin: 0 0 8px;
  padding: 16px 20px;
  border-radius: 10px;
  background: var(--page);
  font: 16px/1.9 var(--type-code);
}
/* The QR code keeps a white background in dark mode too - scanners need the contrast. */
.qr { width: 200px; margin: 12px 0; padding: 8px; background: #ffffff; border-radius: 10px; }
.qr svg { display: block; width: 100%; height: auto; }
.key { font-family: var(--type-code); word-break: break-all; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list li:last-child { border-bottom: 1px solid var(--line); }

ol { padding-left: 20px; }
ol li { margin-bottom: 12px; }

@media (max-width: 480px) {
  /* Without the card the form sits directly on the page; the lines would run through it. */
  .backdrop { display: none; }
  .topbar { padding: 16px 20px; }
  .stage { justify-content: flex-start; padding: 8px 0 32px; }
  .card { border: 0; border-radius: 0; background: transparent; padding: 16px 20px; }
}
