/* The palette is intentionally restrained: ink, paper, and one confident signal color. */
:root {
  --ink: #0c0d0d;
  --panel: #151817;
  --line: #303533;
  --muted: #929a95;
  --paper: #f0f2e9;
  --signal: #d7ff5f;
  --signal-dark: #a8ca38;
  --serif: Iowan Old Style, Baskerville, Georgia, serif;
  --sans: "Avenir Next", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--ink); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(circle at 79% 16%, rgba(215, 255, 95, 0.08), transparent 24rem),
    linear-gradient(135deg, #0c0d0d 0%, #111514 58%, #0b0c0c 100%);
  font-family: var(--sans);
}

.site-shell {
  display: flex;
  flex-direction: column;
  width: min(100% - 48px, 1120px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 27px 0 24px;
}

.topline, footer, label, .result-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topline { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 12px var(--signal); }
.topline-rule { height: 1px; flex: 1; margin: 0 5px; background: var(--line); }

.hero { margin: clamp(84px, 15vh, 165px) 0 76px; animation: arrive 700ms ease both; }
h1 { max-width: 800px; margin: 0; font-size: clamp(3.5rem, 10vw, 8.5rem); line-height: 0.82; letter-spacing: 0; font-weight: 700; }
h1 span { color: var(--signal); }
.tagline { margin: 28px 0 0; color: #bec5bd; font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.45rem); font-style: italic; }

.ask-panel { width: min(100%, 820px); animation: arrive 700ms 120ms ease both; }
.form-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
label { display: block; margin-bottom: 12px; color: var(--muted); }
.form-toolbar label { margin: 0; }
select { padding: 10px 34px 10px 12px; border: 1px solid var(--line); border-radius: 3px; outline: none; color: var(--paper); background: var(--panel); font: 700 0.72rem var(--sans); letter-spacing: 0.08em; cursor: pointer; }
select:focus { border-color: var(--signal); box-shadow: 0 0 0 3px rgba(215, 255, 95, 0.13); }
.input-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
input { min-width: 0; padding: 20px 21px; border: 1px solid var(--line); border-radius: 3px; outline: none; color: var(--paper); background: rgba(21, 24, 23, 0.82); font: 1rem var(--sans); transition: border-color 180ms ease, box-shadow 180ms ease; }
input::placeholder { color: #68716c; }
input:focus { border-color: var(--signal); box-shadow: 0 0 0 3px rgba(215, 255, 95, 0.13); }
button { border: 0; cursor: pointer; font: 700 0.75rem var(--sans); letter-spacing: 0.11em; text-transform: uppercase; }
.ask-button { display: flex; align-items: center; gap: 30px; padding: 0 23px; border-radius: 3px; color: var(--ink); background: var(--signal); transition: background 180ms ease, transform 180ms ease; }
.ask-button:hover, .ask-button:focus-visible { background: #e5ff91; transform: translateY(-2px); }
.ask-button:focus-visible, .again-button:focus-visible { outline: 3px solid rgba(215, 255, 95, 0.45); outline-offset: 3px; }
.button-arrow { font-size: 1.3rem; line-height: 1; }
.field-error { margin: 10px 0 0; color: #ff9d7b; font-size: 0.85rem; }

.result { position: relative; margin-top: 52px; padding: 34px 0 12px; border-top: 1px solid var(--signal); animation: reveal 650ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.result-label { margin: 0; color: var(--muted); }
.processing-message { min-height: 25px; margin: 33px 0 15px; color: #b6beb6; font-family: var(--serif); font-size: 1.15rem; font-style: italic; }
.answer { margin: 0; color: var(--signal); font-size: clamp(5rem, 15vw, 10rem); line-height: 0.8; letter-spacing: 0; font-weight: 700; }
.answer--statement { max-width: 700px; font-size: clamp(2.3rem, 6vw, 5.8rem); line-height: 0.92; }
.explanation { max-width: 600px; margin: 24px 0 0; color: #bec5bd; font-family: var(--serif); font-size: 1.1rem; line-height: 1.45; }
.again-button { display: inline-flex; align-items: center; gap: 22px; margin-top: 38px; padding: 15px 20px; border: 1px solid var(--line); border-radius: 3px; color: var(--paper); background: transparent; transition: border-color 180ms ease, background 180ms ease, transform 180ms ease; }
.again-button:hover, .again-button:focus-visible { border-color: var(--signal); background: rgba(215, 255, 95, 0.08); transform: translateY(-2px); }
.again-button span { color: var(--signal); font-size: 1rem; }
footer { margin-top: auto; padding-top: 96px; color: #68716c; }
footer span { color: var(--signal); }

@keyframes arrive { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes reveal { from { opacity: 0; transform: translateY(-18px); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: translateY(0); clip-path: inset(0 0 0 0); } }

@media (max-width: 620px) {
  .site-shell { width: min(100% - 32px, 1120px); padding-top: 19px; }
  .topline { font-size: 0.57rem; }
  .topline-rule { margin-left: auto; }
  .hero { margin-top: 105px; margin-bottom: 60px; }
  .input-row { grid-template-columns: 1fr; }
  .ask-button { justify-content: space-between; min-height: 58px; }
  .result { padding-top: 30px; }
  footer { padding-top: 74px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}