/* NTK web: the shared look of every page (verify, feed, login, privacy).
   After Dieter Rams and the owner's mock: flat single-colour surfaces, no
   gradients, no borders, no emboss. The page is one light grey (#E6EAF2); the
   header bar and the plates that hold information are lighter (#F3F6FC); keys,
   tiles and secondary actions sit between them (#ECEFF6). Each surface has
   rounded corners and a barely visible soft shadow. The one main action is a
   flat orange key with black text; orange also marks focus and the needle of
   the dial (lib/dial.js). Text is black; headings are very thin (Inter, self-
   hosted in /assets/fonts/, SIL OFL); small labels are bold capitals with
   letter-spacing. Icons are thin lines (lib/icons.js). Dark mode is the same
   layout in flat dark greys. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/InterVariable.woff2") format("woff2");
}

:root {
  --bg: #E6EAF2;              /* the page */
  --bar: #F3F6FC;             /* the header bar */
  --plate: #F3F6FC;           /* panels that hold information: results, posts */
  --key: #ECEFF6;             /* keys, tiles, secondary actions */
  --key-down: #E2E6EE;        /* a key while pressed */
  --field: #F3F6FC;           /* inputs */
  --ink: #000000;             /* text: 17:1 and up */
  --ink-2: #545C72;           /* secondary text: 5.5:1 on the page, 6.2:1 on a plate */
  --minor: #8E98B1;           /* minor marks: unlit ticks, skipped checks */
  --line: #BDC3D3;            /* fine lines */
  --orange: #FD5B15;          /* the main action, focus, the needle */
  --orange-down: #E54E0E;
  --on-orange: #FFFFFF;       /* white, at a medium weight */
  --green: #1E9E5A;           /* MATCH, PASS */
  --code-bg: #ECEFF6;
  --shadow: 0 1px 2px rgba(60, 72, 100, .06), 0 3px 8px rgba(60, 72, 100, .08);
  --shadow-down: 0 1px 1px rgba(60, 72, 100, .08);

  --r-plate: 16px;
  --r-key: 12px;
  --r-sm: 6px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1D2026;
    --bar: #272B32;
    --plate: #272B32;
    --key: #30353D;
    --key-down: #2A2E36;
    --field: #272B32;
    --ink: #ECEFF5;
    --ink-2: #A2AABC;         /* 6.1:1 on a plate */
    --minor: #69728A;
    --line: #3A404C;
    --orange-down: #E54E0E;
    --green: #2FB36B;
    --code-bg: #30353D;
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 3px 8px rgba(0, 0, 0, .2);
    --shadow-down: 0 1px 1px rgba(0, 0, 0, .3);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .3em;
  text-decoration-color: var(--orange);
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

h1, h2, h3 { margin: 0 0 .6em; line-height: 1.15; font-weight: 200; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 8vw, 2.6rem); font-weight: 150; letter-spacing: -.025em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1rem; font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 .9rem; }
strong { font-weight: 600; }

code, .mono {
  font-family: var(--mono);
  font-size: .86em;
}
code {
  padding: .1em .4em;
  border-radius: var(--r-sm);
  background: var(--code-bg);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.wrap {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---- surfaces ---------------------------------------------------------- */

/* A plate: a flat panel that holds information. */
.pbox, .block {
  background: var(--plate);
  border: 0;
  border-radius: var(--r-plate);
  box-shadow: var(--shadow);
}

/* Tiles: flat keys side by side, a small gap between them. */
.tiles {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.tiles > * {
  min-width: 0;
  margin: 0;
  border-radius: var(--r-key);
  background: var(--key);
  box-shadow: var(--shadow);
}

/* ---- buttons: flat keys ------------------------------------------------- */

.btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 48px;
  margin: 0;
  padding: .7rem 1.5rem;
  border: 0;
  border-radius: var(--r-key);
  background: var(--key);
  box-shadow: var(--shadow);
  font: inherit;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: transform 60ms ease-out, box-shadow 60ms ease-out, background-color 60ms ease-out;
}
.btn:hover { color: var(--ink); }
/* Pressed: a little down, the shadow almost gone. */
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: var(--shadow-down); background: var(--key-down); }
.btn:disabled { color: var(--ink-2); cursor: default; }

/* The one main action: a flat orange key with white text at a medium weight. */
.btn-primary { background: var(--orange); color: var(--on-orange); font-weight: 600; }
.btn-primary:hover { color: var(--on-orange); }
.btn-primary:active:not(:disabled) { background: var(--orange-down); }
.btn-primary:disabled { background: var(--key); color: var(--ink-2); }

.btn-small {
  min-height: 36px;
  padding: .4rem .95rem;
  border-radius: 10px;
  font-size: .85rem;
}

/* ---- labels ------------------------------------------------------------- */

/* A chip: a small printed label on a recessed patch. */
.chip {
  display: inline-block;
  padding: .55em .7em .5em;
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--ink);
  font: 700 9.5px/1 var(--font);
  letter-spacing: .12em;
  white-space: nowrap;
}

.label {
  display: block;
  margin-bottom: .6rem;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
}

.rule { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }

/* ---- page frame --------------------------------------------------------- */

/* The header bar: full width; the mark at the left, the page's name at the right. */
.site-bar { background: var(--bar); }
.site-bar-in {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-height: 4.5rem;
  padding-top: .8rem;
  padding-bottom: .8rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.brand:hover { color: inherit; }
.brand picture { display: block; line-height: 0; }
.badge { display: block; height: 20px; width: auto; }
.site-name {
  display: grid;
  justify-items: end;
  margin: 0 0 0 auto;
  line-height: 1.1;
  text-align: right;
}
.page-name {
  font-size: 1.15rem;
  font-weight: 200;
  letter-spacing: .01em;
  color: var(--ink);
}
.brand-name {
  display: block;
  margin-top: .2rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-foot {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  color: var(--ink-2);
  font-size: .85rem;
}
.site-foot a { color: var(--ink); }

/* A note or an error: a flat patch with a small orange mark. */
.notice {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin: .9rem 0 0;
  padding: .8rem 1rem;
  border-radius: var(--r-key);
  background: var(--field);
  font-size: .92rem;
}
.notice::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: .5em;
  border-radius: 2px;
  background: var(--orange);
}

.fine { color: var(--ink-2); font-size: .85rem; }

/* An input: flat; focused, a thin orange line at its foot. */
textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: .85rem 1rem;
  border: 0;
  border-radius: var(--r-key);
  background: var(--field);
  box-shadow: none;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  resize: vertical;
}
textarea:focus, textarea:focus-visible { outline: none; box-shadow: inset 0 -2px 0 var(--orange); }
textarea::placeholder { color: var(--ink-2); opacity: 1; }

/* Thin line icons (lib/icons.js) take the text colour. */
svg.icon { display: inline-block; flex: none; vertical-align: middle; }

/* ---- the dial (lib/dial.js) --------------------------------------------- */

/* After an old radio's tuning scale: fine black ticks on a thin line, tiny thin
   numbers from 0 to 100, an orange needle. While a page waits on the network the
   busy dial (.dial-busy) has evenly spaced ticks, no numbers, and a needle that
   advances from 0 towards 100 as progress, slowing as it goes. */
.dial { position: relative; padding-top: 4px; color: var(--ink); }
.dial-scale { display: block; width: 100%; height: 30px; overflow: visible; }
.dial-scale line { stroke: currentColor; stroke-width: 1px; stroke-linecap: butt; }
.dial-scale .dial-needs { stroke-width: 3px; }
.dial-scale .dial-needle { stroke: var(--orange); stroke-width: 2px; }
.dial-numbers {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  margin: .3rem -5% 0;
  font-size: 9.5px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: .02em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.dial-sweep {
  position: absolute;
  top: 0;
  bottom: -3px;
  left: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--orange);
  animation: ntk-progress 12s cubic-bezier(.12, .62, .25, 1) forwards;
}
@keyframes ntk-progress { from { left: 0%; } to { left: 97%; } }
@media (prefers-reduced-motion: reduce) {
  .dial-sweep { animation: none; left: 50%; }
  .btn { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---- text pages (privacy) ---------------------------------------------- */

.doc { padding-top: 1.5rem; padding-bottom: 1rem; }
.doc h1 { font-size: clamp(2.6rem, 12vw, 3.6rem); font-weight: 100; letter-spacing: -.03em; margin: .5rem 0 .9rem; }
.doc .lede { color: var(--ink-2); font-size: 1.08rem; font-weight: 300; line-height: 1.6; margin-bottom: 2rem; }
.doc-short { padding: 1.4rem 1.4rem .7rem; margin-bottom: 2.75rem; }
.doc-short h2 {
  margin-bottom: 1.1rem;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.doc-short ul { margin: 0; padding: 0; list-style: none; }
.doc-short li { position: relative; margin: 0 0 .9rem; padding-left: 1.35rem; }
.doc-short li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--orange);
}
.doc-part { margin: 0 0 2.2rem; }
.doc-part h2 { font-size: 1.5rem; font-weight: 200; }

[hidden] { display: none !important; }

/* The launch video on /trailer/. */
.trailer-video {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.5rem 0 2rem;
  border-radius: 14px;
  background: #000;
}
