/* robot.dryfoos.com — its own dress, on purpose.
   Nothing here is shared with dryfoos.com, specassay.com or loupe: those are
   the practice and this is a toy (Rik's word, 2026-12-04, "distinct").

   THE GAUGE IS THE DESIGN SYSTEM. Every result has a rank from 1 to 26 on a
   Pure Guardian to Relentless Hunter scale, and robot.js turns that rank into
   --accent: green at 1, through yellow and orange, to red at 26. So the page
   is a different colour for every ending, the colour MEANS the answer, and a
   result card looks finished with no picture in it. The art is Rik's to add
   later and nothing is waiting on it. */

:root {
  --bg: #07070b;
  --panel: #101019;
  --panel-2: #16161f;
  --line: #262633;
  --ink: #f4f4f8;
  --dim: #9a9ab0;
  --faint: #6b6b84;
  /* Replaced per result by robot.js. Mid-scale is the honest default. */
  --accent: #ffb020;
  --accent-ink: #07070b;
  --sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* A slow wash of the accent behind everything, so changing --accent changes
   the whole room and not just one button. */
body::before {
  background:
    radial-gradient(60rem 40rem at 50% -10%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(40rem 30rem at 110% 110%, color-mix(in oklab, var(--accent) 12%, transparent), transparent 70%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  transition: background 600ms ease;
  z-index: 0;
}

/* The wrap is as tall as the window and the stage takes what the chrome does
   not, so a SHORT screen (the intro, a question) sits in the middle of the
   glass instead of clinging to the top with a void beneath it. `flex: 1 0
   auto` is the important part: the stage may grow past that height for a
   result, which is long, and will not be squashed to fit. */
.wrap {
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  max-width: 48rem;
  min-height: 100dvh;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.1rem, 4vw, 2rem) 4rem;
  position: relative;
  z-index: 1;
}

/* ---------- chrome ---------- */

.top {
  align-items: center;
  display: flex;
  gap: 0.7rem;
  justify-content: space-between;
  /* Modest, because the stage is centred in what is left: the air above the
     question comes from the centring, not from this. */
  margin-bottom: clamp(1.4rem, 4vw, 2.2rem);
}

.wordmark {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  gap: 0.5rem;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
}

.wordmark .dot {
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 25%, transparent);
  height: 9px;
  transition: background 400ms ease, box-shadow 400ms ease;
  width: 9px;
}

.counter {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

/* ---------- the question card ---------- */

.stage {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

h1 {
  font-size: clamp(2.5rem, 9vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0 0 1.2rem;
}

h1 .hl { color: var(--accent); transition: color 400ms ease; }

.lede {
  color: var(--dim);
  font-size: clamp(1.02rem, 2.4vw, 1.18rem);
  margin: 0 0 2.4rem;
  max-width: 34rem;
}

.q {
  font-size: clamp(1.6rem, 5.4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0 0 2rem;
  text-wrap: balance;
}

/* The two answers. Big, thumb-sized, and the same shape on every screen. */
.answers {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 30rem) { .answers { grid-template-columns: 1fr; } }

.btn {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  padding: 1.15rem 1.3rem;
  text-align: left;
  transition: transform 120ms ease, border-color 160ms ease, background 160ms ease;
}

.btn:hover { border-color: var(--accent); transform: translateY(-2px); }

.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.btn:active { transform: translateY(0); }

.btn .k {
  color: var(--faint);
  display: block;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  margin-top: 0.35rem;
  text-transform: uppercase;
}

.btn.go {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  text-align: center;
}

.btn.go .k { color: color-mix(in oklab, var(--accent-ink) 60%, transparent); }

.tray {
  align-items: center;
  display: flex;
  gap: 1.2rem;
  margin-top: 2rem;
}

.link {
  background: none;
  border: 0;
  color: var(--faint);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  padding: 0.4rem 0;
  text-transform: uppercase;
}

.link:hover { color: var(--ink); }
.link:focus-visible { color: var(--ink); outline: 2px solid var(--accent); outline-offset: 3px; }

/* The progress rail: one tick per question answered so far. */
.rail { display: flex; gap: 5px; margin-bottom: 2rem; }

.rail i {
  background: var(--line);
  border-radius: 2px;
  height: 4px;
  transition: background 300ms ease;
  width: 26px;
}

.rail i.on { background: var(--accent); }

/* ---------- the result ---------- */

.badge {
  align-items: baseline;
  color: var(--accent);
  display: inline-flex;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  gap: 0.5rem;
  letter-spacing: 0.16em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.name {
  font-size: clamp(2.6rem, 11vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 0.6rem;
  text-wrap: balance;
}

.from {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  margin: 0 0 1.8rem;
}

.summary {
  font-size: clamp(1.12rem, 2.8vw, 1.3rem);
  margin: 0 0 2.2rem;
  max-width: 36rem;
}

/* Where the picture goes when there is one. Until then this is not an empty
   box with a sad icon in it: it is the rank, set large, which is the thing
   the quiz actually measured. */
/* NO 16/9 UNTIL THERE IS SOMETHING TO PUT IN IT. An empty frame at picture
   proportions is most of a screen of nothing, and it pushes the description,
   which is the actual payoff, below the fold. So the plate is a compact band
   while it holds only the rank, and robot.js adds `has-art` once a real
   picture has loaded, which is the only state that deserves the full frame. */
.plate {
  align-items: center;
  min-height: 11rem;
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--accent) 18%, var(--panel)), var(--panel));
  border: 1px solid color-mix(in oklab, var(--accent) 35%, var(--line));
  border-radius: 1.25rem;
  display: flex;
  justify-content: center;
  margin: 0 0 2rem;
  overflow: hidden;
  position: relative;
}

.plate.has-art { aspect-ratio: 16 / 9; min-height: 0; }

.plate img { display: block; height: 100%; object-fit: cover; width: 100%; }

.plate .rank {
  color: var(--accent);
  font-size: clamp(3.4rem, 13vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.facts {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 2.4rem;
  padding-top: 1.4rem;
}

@media (max-width: 34rem) { .facts { grid-template-columns: 1fr; } }

.facts dt {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

.facts dd { margin: 0; }

/* The gauge: the whole spectrum drawn, with a marker where you landed, so
   the answer has somewhere to sit. */
.gauge { margin: 0 0 2.4rem; }

/* A CONTINUOUS RAIL, NOT A ROW OF TICKS. One tick per ending would have let
   anyone count the endings off the screen, which is the one thing the page is
   not supposed to say (Rik, 2026-12-04). A rail puts the reader somewhere on
   the spectrum without saying how many places there are. */
.gauge .bar {
  background: linear-gradient(
    90deg,
    hsl(155 60% 40%), hsl(96 60% 42%), hsl(50 75% 48%), hsl(22 75% 50%), hsl(350 70% 48%));
  border-radius: 999px;
  height: 6px;
  opacity: 0.55;
  position: relative;
}

.gauge .bar i {
  background: var(--accent);
  border: 3px solid var(--bg);
  border-radius: 50%;
  box-shadow: 0 0 20px color-mix(in oklab, var(--accent) 70%, transparent);
  height: 22px;
  margin-left: -11px;
  position: absolute;
  top: -8px;
  transition: left 500ms cubic-bezier(.2, .8, .2, 1), background 400ms ease;
  width: 22px;
}

.gauge .ends {
  color: var(--faint);
  display: flex;
  font-family: var(--mono);
  font-size: 0.66rem;
  justify-content: space-between;
  letter-spacing: 0.14em;
  /* Clears the marker, which overhangs the rail. */
  margin-top: 1.2rem;
  text-transform: uppercase;
}

.note {
  border-left: 2px solid var(--line);
  color: var(--faint);
  font-size: 0.9rem;
  margin: 2.6rem 0 0;
  padding-left: 1rem;
}

.note a { color: var(--dim); }

/* ---------- the no-script fallback ---------- */

/* Honour a reader who has asked for less motion. The transitions above are
   decoration; none of them carries meaning on its own. */
@media (prefers-reduced-motion: reduce) {
  *, body::before { transition: none !important; animation: none !important; }
}
