/* Concept C, "Plain words": one left-aligned column, no cards. The settings
   and status are said in big sentences; everything else stays quiet.
   D-DIN (OFL) is self-hosted; the secret itself is always monospace so
   0/O and 1/l/I can't be confused. */

@font-face {
  font-family: "D-DIN";
  src: url("/fonts/d-din-regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "D-DIN";
  src: url("/fonts/d-din-bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

:root {
  --page: #F6F9F9;
  --ink: #0E3B43;
  --teal: #1698AD;
  --teal-ink: #107486; /* teal dark enough for text on --page */
  --muted: #5E7C82;
  --line: #C7D6D8;
  --mark: #FFE066;
  --ok: #157F3B;
  --danger: #B42318;
  --font: "D-DIN", "DIN Alternate", Bahnschrift, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0C2328;
    --ink: #E4F0F1;
    --teal: #3FB6C9;
    --teal-ink: #5CC6D6;
    --muted: #93AEB2;
    --line: #2B474C;
    --ok: #4ADE80;
    --danger: #F97066;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

.site-header, main, .site-footer { max-width: 680px; margin: 0 auto; padding: 0 24px; }
.site-header { padding-top: 32px; padding-bottom: 40px; }
.logo img { display: block; height: 30px; width: auto; }

a { color: var(--teal-ink); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

/* Type scale: 17 body, 20 question, clamp 28-40 sentences. */
.big {
  font-size: clamp(30px, 6.4vw, 42px);
  line-height: 1.18;
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0;
  max-width: 17ch;
}
.sentence {
  font-size: clamp(28px, 5.8vw, 38px);
  line-height: 1.32;
  letter-spacing: -0.015em;
  margin: 36px 0 0;
  max-width: 19ch;
}
.prompt { font-size: 22px; line-height: 1.5; margin: 32px 0 0; max-width: 34ch; }
.muted { color: var(--muted); margin: 14px 0 0; max-width: 52ch; }
.question { display: block; font-size: 20px; font-weight: 700; margin: 0 0 10px; }

/* The settings live inside the sentence as underlined words. */
.inline-choice {
  font: inherit;
  color: var(--teal-ink);
  font-weight: 700;
  border: 0;
  border-bottom: 3px solid var(--teal);
  background: transparent;
  padding: 0 2px;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  field-sizing: content;
  max-width: 100%;
}
input.inline-choice { cursor: text; min-width: 6ch; }
input.inline-choice::placeholder { color: var(--muted); font-weight: 400; }
.inline-choice option { color: #0E3B43; background: #fff; font-weight: 400; }

textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  color: inherit;
  font: 16px/1.6 var(--mono);
  padding: 6px 0;
}
textarea::placeholder { color: var(--muted); }
.size { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.size.over { color: var(--danger); font-weight: 700; }

.check { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--teal); margin: 0; }

button {
  font: 700 17px/1 var(--font);
  border-radius: 999px;
  cursor: pointer;
  padding: 14px 24px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
}
button.primary { background: var(--ink); color: var(--page); }
button.primary:hover { background: var(--teal-ink); border-color: var(--teal-ink); }
button:not(.primary):hover { border-color: var(--teal-ink); color: var(--teal-ink); }
button:disabled { opacity: 0.6; cursor: progress; }
button.copied, button.primary.copied { background: var(--ok); border-color: var(--ok); color: #fff; }
button.danger { border-color: var(--danger); color: var(--danger); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.error { color: var(--danger); font-weight: 700; margin: 20px 0 0; }

#turnstile-widget { margin-top: 20px; }

/* Links on the "ready" screen. */
.link-block { margin-top: 30px; }
.link-block label { display: block; font-weight: 700; margin-bottom: 8px; }
.copy-field { display: flex; gap: 10px; align-items: center; }
.copy-field input {
  flex: 1;
  min-width: 0;
  font: 14px/1.4 var(--mono);
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--line);
  padding: 10px 0;
}
.copy-field button { padding: 11px 20px; flex-shrink: 0; }

/* The revealed secret: monospace, highlighter swept across it once. */
.secret-text {
  margin: 28px 0 0;
  font: 16px/1.9 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.secret-text span {
  color: #0E3B43;
  padding: 2px 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  background: linear-gradient(var(--mark), var(--mark)) no-repeat 0 60% / 0% 85%;
  transition: background-size 0.8s cubic-bezier(.4, 0, .2, 1) 0.1s;
}
.secret-text.marked span { background-size: 100% 85%; }

/* Manage page. */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 28px; margin: 30px 0 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.subhead { font-size: 20px; font-weight: 700; margin: 36px 0 8px; }
.times { margin: 0; padding-left: 20px; }

.site-footer { color: var(--muted); font-size: 14px; padding-top: 64px; padding-bottom: 40px; }
.site-footer p { margin: 0; max-width: 52ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
