/*
 * The sign-up page. `TODO.md` §51.
 *
 * Standalone, like the how-it-works page beside it, and for the same reason: this folder is
 * copied to the VPS and served as plain files, so it must not need a bundler, a session or
 * anything from the app. The two fonts are borrowed from `../how-it-works/fonts/`, which is
 * deployed to the same document root - one copy, not two.
 *
 * The art direction is the app's: a dark room, one lit rectangle, hairlines instead of cards,
 * and the brand yellow used only for the single action on the page.
 */

@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../how-it-works/fonts/archivo.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'Newsreader Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(../how-it-works/fonts/newsreader.woff2) format('woff2-variations');
}

:root {
  --h: 258;
  --brand: #fdba08;
  --s-void: oklch(0.12 0.006 var(--h));
  --s-base: oklch(0.17 0.01 var(--h));
  --text-1: oklch(0.97 0.004 var(--h));
  --text-2: oklch(0.8 0.006 var(--h));
  --text-3: oklch(0.66 0.008 var(--h));
  --ok: oklch(0.78 0.14 150);
  --bad: oklch(0.72 0.16 25);
  --hairline: oklch(1 0 0 / 0.07);
  --hairline-firm: oklch(1 0 0 / 0.14);
  --font-ui: 'Archivo Variable', Archivo, system-ui, 'Segoe UI', Roboto, sans-serif;
  --font-text: 'Newsreader Variable', Newsreader, Georgia, 'Times New Roman', serif;
  --gutter: clamp(20px, 5vw, 64px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--s-void);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: min(680px, 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.top {
  padding: 22px var(--gutter);
  border-bottom: 1px solid var(--hairline);
}
.top img {
  height: 26px;
  display: block;
}

main {
  flex: 1;
  padding-block: clamp(32px, 7vw, 68px) 64px;
}

.rule-brand {
  width: 46px;
  height: 3px;
  background: var(--brand);
  margin-bottom: 20px;
}

h1 {
  font-family: var(--font-ui);
  font-stretch: 74%;
  font-weight: 700;
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.lede {
  font-family: var(--font-text);
  font-size: 18px;
  color: var(--text-2);
  margin-top: 14px;
  max-width: 54ch;
}

/* ── The fork ──────────────────────────────────────────────────────────────────────── */

.fork {
  display: grid;
  gap: 14px;
  margin-top: 34px;
}

.pick {
  display: grid;
  gap: 6px;
  text-align: left;
  padding: 22px;
  background: var(--s-base);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s;
}
.pick:hover,
.pick:focus-visible {
  border-color: var(--hairline-firm);
  background: oklch(0.2 0.01 var(--h));
}
.pick-k {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
}
.pick-t {
  font-size: 21px;
  font-weight: 650;
  font-stretch: 84%;
}
.pick-d {
  font-family: var(--font-text);
  color: var(--text-3);
  font-size: 16px;
}

.back {
  background: none;
  border: 0;
  color: var(--text-3);
  font: inherit;
  font-size: 14px;
  padding: 0 0 18px;
  cursor: pointer;
}
.back::before {
  content: '\2190\00a0';
}
.back:hover {
  color: var(--text-1);
}

/* ── Forms ─────────────────────────────────────────────────────────────────────────── */

form {
  display: grid;
  gap: 16px;
  margin-top: 30px;
}

label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 600;
}

.opt {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: oklch(0.55 0.008 var(--h));
}

input,
textarea,
select {
  font-family: var(--font-ui);
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-1);
  background: var(--s-base);
  border: 1px solid var(--hairline-firm);
  border-radius: 10px;
  padding: 12px 14px;
  width: 100%;
  resize: vertical;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

/* The sign-in page's "nothing to sign in to yet" panel. */
.big {
  margin: 8px 0 28px;
  padding: 22px 24px;
  border: 1px solid var(--brand);
  border-radius: 14px;
  background: oklch(0.2 0.03 85 / 0.5);
}
.big h2 {
  margin: 0 0 8px;
  font-size: 24px;
  color: var(--brand);
}
.big p {
  margin: 0;
  font-family: var(--font-text);
  font-size: 18px;
  color: var(--text-1);
}
.big ol {
  margin: 14px 0 0;
  padding-left: 22px;
  display: grid;
  gap: 6px;
  font-size: 16px;
  color: var(--text-2);
}
.big ol:empty {
  display: none;
}
.big a {
  color: var(--brand);
}

/* A password field with an eye that shows what was typed. Built by signin.js. */
.pw {
  position: relative;
}
.pw input {
  padding-right: 48px;
}
.pw .eye {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-3);
  cursor: pointer;
  border-radius: 10px;
}
.pw .eye:hover,
.pw .eye[aria-pressed='true'] {
  color: var(--text-1);
}
.pw .eye:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -4px;
}
.pw .eye svg {
  width: 20px;
  height: 20px;
}

.row2 {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 520px) {
  .row2 {
    grid-template-columns: 1fr;
  }
}

.hint {
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--text-3);
  font-family: var(--font-text);
}
.hint.ok {
  color: var(--ok);
}
.hint.bad {
  color: var(--bad);
}

/* The honeypot. Off-screen rather than `display:none`: some robots skip inputs they can see
   are hidden, and the point is that they do not skip this one. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.address {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 17px;
  padding: 12px 14px;
  background: var(--s-base);
  border-radius: 10px;
  border: 1px dashed var(--hairline-firm);
  overflow-wrap: anywhere;
}
.address .dim {
  color: var(--text-3);
}
#address-preview {
  color: var(--brand);
}

.cta {
  justify-self: start;
  background: var(--brand);
  color: #17140c;
  border: 0;
  border-radius: 10px;
  padding: 13px 26px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}
.cta:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Sign in: the main button big, and beside it the switch to the other way in ("Sign in / with
   code"): black, yellow edge and letters. 2026-10-03. */
.btn-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.btn-row .cta {
  flex: 1;
  padding: 16px 26px;
  font-size: 17px;
}
.switch {
  flex: 0 0 auto;
  background: #000;
  color: var(--brand);
  border: 1.5px solid var(--brand);
  border-radius: 10px;
  padding: 6px 14px;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.25;
  cursor: pointer;
}
.switch:hover,
.switch:focus-visible {
  background: #111;
}

.note {
  font-family: var(--font-text);
  font-size: 16px;
  color: var(--text-2);
  min-height: 1.5em;
}
.note.bad {
  color: var(--bad);
}
.note.ok {
  color: var(--ok);
}

.steps {
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
  padding-left: 20px;
  display: grid;
  gap: 10px;
  font-family: var(--font-text);
  color: var(--text-3);
  max-width: 56ch;
}
.steps strong {
  color: var(--text-1);
  font-weight: 600;
}

.foot {
  padding-block: 26px 40px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
}
.foot a,
.top a {
  color: var(--text-3);
  text-decoration: none;
}
.foot a:hover {
  color: var(--text-1);
}
/* The language picker (/_telix/i18n.js) after the footer links. TODO.md §98. */
.foot [data-lang-switch] {
  display: inline-block;
  margin-left: 14px;
  vertical-align: middle;
}

[hidden] {
  display: none !important;
}

/* "Already have an account?" under the two choices on /signup: room to breathe. */
.note.note-after {
  margin-top: 28px;
}
