:root {
  --ink: #0a0d14;
  --ink-soft: #3b4556;
  --pacific-deep: #0d3b8c;
  --timber: #1659c7;
  --paper: #f3f6fb;
  --line: rgba(10, 24, 54, 0.12);
  --white: #ffffff;
  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.top {
  position: fixed;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: max(1rem, env(safe-area-inset-top)) 1.25rem 0;
  pointer-events: none;
}

.top a { pointer-events: auto; }

.brand,
.top-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.top-links {
  display: flex;
  gap: 1rem;
  font-size: 0.92rem;
}

.top-links a:hover { color: var(--pacific-deep); }

.panel {
  position: fixed;
  z-index: 3;
  left: 1.25rem;
  bottom: 1.25rem;
  width: min(28rem, calc(100% - 2.5rem));
  padding: 1.25rem 1.35rem 1.15rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(10, 24, 54, 0.12);
  backdrop-filter: blur(10px);
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--timber);
}

h1 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.85rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lead, .note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.choice-label {
  margin: 0.95rem 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.choices button {
  min-height: 2.35rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.choices button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1rem;
  margin: 1rem 0 0.75rem;
}

.facts div { margin: 0; }

.facts dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.facts dd {
  margin: 0.1rem 0 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.status {
  position: fixed;
  z-index: 4;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  background: var(--paper);
  font-weight: 700;
}

body.is-ready .status { display: none; }

@media (max-width: 720px) {
  .panel {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    width: auto;
    max-height: 42vh;
    overflow: auto;
    padding: 1rem;
  }

  h1 { font-size: 1.45rem; }
  .lead { display: none; }
}

/* The logo has a transparent ground; this page is light, so it sits directly on it. */
.brand-logo {
  display: block;
  height: 2.6rem;
  width: auto;
  /* If the header squeezes the box, shrink the logo; never stretch it. */
  object-fit: contain;
  padding: 0.15rem 0.45rem;
  border-radius: 0.6rem;
}
