/* KinAuth public site: the stylesheet of every page (the product visuals of
   the main page have their own, product.css). The type and the spacing are
   the panel's (web/static/css/tokens.css); the colours are the site's own:
   the blues of the logo on white and on a deep navy. The site has no script
   to choose a theme with, so it follows prefers-color-scheme: light is
   written first, dark overrides it. */

@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: "JetBrains Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("../fonts/jetbrains-mono-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;
}

:root {
  color-scheme: light dark;

  /* The logo's blues. */
  --royal: #0a4dff;
  --azure: #1e8bff;
  --cyan: #22d3ee;
  --pale: #a5e3fa;
  --navy: #0b1220;

  --bg: #ffffff;
  --bg-subtle: #f5f8fc;
  --surface: #ffffff;
  --surface-2: #eef3fa;
  --border: #dce4f0;
  --border-strong: #c3cfe2;
  --text: #0b1220;
  --text-2: #3a4863;
  --muted: #5b6b86;             /* 5.4:1 on white */
  --grid-dot: rgba(11, 18, 32, 0.09);

  --accent: #0a4dff;            /* white on it: 6.0:1 */
  --accent-hover: #083fd6;
  --accent-text: #0a4dff;       /* 6.0:1 on white */
  --on-accent: #ffffff;
  --accent-soft: rgba(10, 77, 255, 0.09);
  --accent-border: rgba(10, 77, 255, 0.4);
  --focus: #0a4dff;
  --info: #0a4dff;
  --info-soft: rgba(10, 77, 255, 0.09);
  --neutral-soft: rgba(11, 18, 32, 0.05);
  --warn: #855800;
  --warn-soft: rgba(133, 88, 0, 0.1);
  --danger: #c22626;
  --danger-soft: rgba(194, 38, 38, 0.1);

  --arc: rgba(30, 139, 255, 0.16);
  --shot-shadow: 0 1px 2px rgba(11, 18, 32, 0.05), 0 24px 48px -28px rgba(11, 18, 32, 0.35);

  --font-sans: "Inter Variable", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --tracking-display: -0.035em;
  --tracking-heading: -0.02em;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --dur: 150ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --page: 1120px;
  --gutter: 24px;
  --measure: 36rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --bg-subtle: #0d1526;
    --surface: #111a2c;
    --surface-2: #172338;
    --border: #1d2a42;
    --border-strong: #2b3a57;
    --text: #f4f7fd;
    --text-2: #b8c4d9;
    --muted: #8696b2;           /* 6.3:1 on --bg, 5.8:1 on --surface */
    --grid-dot: rgba(255, 255, 255, 0.07);

    --accent: #1a5cff;          /* white on it: 5.2:1 */
    --accent-hover: #2a66ff;
    --accent-text: #6cb6ff;     /* 8.7:1 on --bg */
    --on-accent: #ffffff;
    --accent-soft: rgba(30, 139, 255, 0.14);
    --accent-border: rgba(30, 139, 255, 0.45);
    --focus: #22d3ee;
    --info: #6cb6ff;
    --info-soft: rgba(30, 139, 255, 0.16);
    --neutral-soft: rgba(255, 255, 255, 0.06);
    --warn: #f5b400;
    --warn-soft: rgba(245, 180, 0, 0.12);
    --danger: #ff6b6b;
    --danger-soft: rgba(255, 92, 92, 0.14);

    --arc: rgba(30, 139, 255, 0.5);
    --shot-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  }
}

@media (max-width: 640px) { :root { --gutter: 20px; } }
@media (max-width: 400px) { :root { --gutter: 16px; } }

@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0ms; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; letter-spacing: var(--tracking-heading); text-wrap: balance; }
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
code, .mono { font-family: var(--font-mono); font-size: 0.9em; font-variant-ligatures: none; font-feature-settings: normal; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); color: var(--text); }

a { color: var(--accent-text); text-decoration: underline; text-decoration-color: var(--accent-border); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--r-sm); }

.wrap { width: 100%; max-width: calc(var(--page) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: var(--gutter); top: -64px; z-index: 10; padding: 8px 12px; background: var(--accent); color: var(--on-accent); border-radius: var(--r-sm); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* What a reader replaces with their own: an organization's name in an
   address. Set apart so that nobody takes it for part of the address. */
.slot { font-style: normal; color: var(--accent-text); border-bottom: 1px dashed currentColor; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px;
  border: 1px solid var(--accent); border-radius: var(--r-md);
  background: var(--accent); color: var(--on-accent);
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-quiet { min-height: 36px; padding: 0 14px; background: transparent; border-color: var(--border-strong); color: var(--text); font-size: 0.9375rem; font-weight: 500; }
.btn-quiet:hover { background: var(--surface-2); border-color: var(--border-strong); }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 3px; color: var(--text); font-size: 1.3125rem; font-weight: 900; line-height: 1; letter-spacing: -0.03em; font-feature-settings: normal; text-decoration: none; }
.brand img { width: 116px; height: 32px; margin-left: -6px; }
.nav { display: flex; align-items: center; gap: 4px; font-size: 0.9375rem; }
.nav a { white-space: nowrap; }
.nav a:not(.btn) { padding: 8px 10px; border-radius: var(--r-sm); color: var(--text-2); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); }
.nav a[aria-current="page"] { color: var(--text); }
.nav .btn { margin-left: 10px; }
.nav .lang { margin-left: 4px; }
@media (max-width: 980px) { .nav .section-link { display: none; } }

/* ---------- Hero ---------- */
/* The one decoration of the site: a soft arc of light in the hero's upper
   right corner, placed so that it passes above the fact list and to the
   right of the heading: it crosses no text. */
.hero { position: relative; padding-block: 88px 56px; overflow: hidden; }
.hero::before { content: ""; position: absolute; z-index: -1; right: -41.25rem; top: -44.375rem; width: 70rem; height: 70rem; border-radius: 50%; border: 1px solid var(--arc); box-shadow: inset 0 0 90px -30px var(--arc); pointer-events: none; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); column-gap: 72px; row-gap: 48px; align-items: end; }
.hero h1 { max-width: 12em; font-size: clamp(2.375rem, 1.3rem + 4.4vw, 4rem); line-height: 1.04; letter-spacing: var(--tracking-display); }
.lede { max-width: 33rem; margin-top: 28px; color: var(--text-2); font-size: 1.1875rem; line-height: 1.55; }
.lede + .lede { margin-top: 14px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 36px; }
.facts { border-top: 1px solid var(--border-strong); font-size: 0.9375rem; line-height: 1.5; }
.facts div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 12px; padding-block: 11px; border-bottom: 1px solid var(--border); }
.facts dt { color: var(--muted); }
.facts .mono { font-size: 0.75rem; }
@media (max-width: 940px) {
  .hero { padding-block: 56px 40px; }
  .hero::before { display: none; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .facts { max-width: 33rem; }
}
@media (max-width: 640px) {
  .hero { padding-block: 44px 36px; }
  .lede { margin-top: 22px; font-size: 1.0625rem; line-height: 1.6; }
  .actions { margin-top: 28px; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* ---------- Figures ---------- */
.shot figcaption { max-width: var(--measure); margin-top: 14px; color: var(--muted); font-size: 0.875rem; line-height: 1.55; }
.shot-wide { padding-bottom: 96px; }

/* ---------- Sections ---------- */
.section { padding-block: 88px; border-top: 1px solid var(--border); }
.section h2 { max-width: 20em; font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2.125rem); line-height: 1.14; letter-spacing: -0.028em; }
.section h3 { font-size: 1rem; line-height: 1.4; letter-spacing: -0.01em; }
.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1em; }
.section h2 + .prose, .section h2 + p { margin-top: 20px; }
.section p { color: var(--text-2); }
.section strong { color: var(--text); font-weight: 600; }
.more { margin-top: 24px; font-weight: 500; }
@media (max-width: 640px) { .section { padding-block: 64px; } .shot-wide { padding-bottom: 64px; } }

/* Two columns of unequal width; one column below 900px. */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 80px; row-gap: 40px; align-items: start; }
.split.lean-left { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
@media (max-width: 900px) { .split, .split.lean-left { grid-template-columns: minmax(0, 1fr); } }

/* A term and what is true of it. */
.terms > div { padding-block: 18px; border-top: 1px solid var(--border); }
.terms > div:first-child { padding-top: 0; border-top: 0; }
.terms dt { color: var(--text); font-weight: 600; }
.terms dd { margin-top: 4px; color: var(--text-2); }
.terms.ruled > div:first-child { padding-top: 18px; border-top: 1px solid var(--border-strong); }
.terms.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px; }
.terms.pair > div:nth-child(-n+2) { padding-top: 18px; border-top: 1px solid var(--border-strong); }
@media (max-width: 760px) {
  .terms.pair { grid-template-columns: minmax(0, 1fr); }
  .terms.pair > div:nth-child(2) { border-top-color: var(--border); }
}

.block { margin-top: 64px; }
@media (max-width: 640px) { .block { margin-top: 48px; } }

/* Plain lists. */
.plain li { position: relative; padding-left: 1.25rem; color: var(--text-2); }
.plain li + li { margin-top: 8px; }
.plain li::before { content: ""; position: absolute; left: 0; top: 0.78em; width: 0.5rem; height: 1px; background: var(--muted); }

/* ---------- The second page: how it is built ---------- */
.doc-head { padding-block: 72px 48px; }
.doc-head h1 { max-width: 16em; font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); line-height: 1.08; letter-spacing: var(--tracking-display); }
.doc-head .lede { max-width: 38rem; }
.doc section { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); column-gap: 64px; row-gap: 16px; padding-block: 40px; border-top: 1px solid var(--border); }
.doc h2 { font-size: 1.25rem; line-height: 1.3; }
.doc p { color: var(--text-2); }
.doc p + p, .doc p + ul, .doc ul + p { margin-top: 1em; }
.doc-end { padding-block: 40px 96px; border-top: 1px solid var(--border); }
@media (max-width: 900px) {
  .doc-head { padding-block: 48px 32px; }
  .doc section { grid-template-columns: minmax(0, 1fr); padding-block: 32px; }
}

/* ---------- Footer ---------- */
.site-footer { padding-block: 36px 56px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.875rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; }
.site-footer p { max-width: 36rem; }
.site-footer p + p { margin-top: 6px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--text-2); }

/* ---------- The way in ---------- */
.way-in { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px); background-size: 22px 22px; }
.way-in main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px var(--gutter); }
.way-in .site-footer { border-top: 0; padding-block: 0 28px; }
.way-in .site-footer .wrap { justify-content: center; text-align: center; }
.card { width: 100%; max-width: 420px; padding: 32px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-lg); box-shadow: var(--shot-shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.card-head .lang { color: var(--text-2); font-size: 0.875rem; }
.card h1 { font-size: 1.375rem; }
.card h1 + p { margin-top: 6px; color: var(--text-2); font-size: 0.9375rem; line-height: 1.5; }
.card form { margin-top: 24px; }
.card label { display: block; margin-bottom: 8px; color: var(--text-2); font-size: 0.875rem; font-weight: 500; }
.field { display: flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--bg-subtle); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.field:hover { border-color: var(--muted); }
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.invalid { border-color: var(--danger); }
.field input { flex: 1; min-width: 0; height: 44px; padding: 0 0 0 12px; border: 0; border-radius: var(--r-md) 0 0 var(--r-md); background: transparent; color: var(--text); font: inherit; }
.field input:focus { outline: none; }
.field .suffix { display: flex; align-items: center; padding: 0 12px 0 2px; color: var(--muted); font-family: var(--font-mono); font-size: 0.875rem; font-feature-settings: normal; white-space: nowrap; }
.card .error { margin-top: 8px; color: var(--danger); font-size: 0.875rem; line-height: 1.5; }
.card .btn { width: 100%; margin-top: 16px; }
.card .hint { margin-top: 16px; color: var(--muted); font-size: 0.875rem; line-height: 1.55; }
.card .direct { margin-top: 20px; color: var(--text-2); font-size: 0.875rem; line-height: 1.55; }
.card .direct .mono { display: block; margin-top: 2px; font-size: 0.75rem; white-space: nowrap; }
.card .back { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.875rem; }
@media (max-width: 400px) { .card { padding: 24px 20px; } }
