@import url("https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,400..900&family=Libre+Caslon+Text:ital,wght@0,400;0,700;1,400&display=swap");

:root {
  --ledger: #e6ece6;
  --ledger-line: #cdd8cf;
  --ink: #15252a;
  --ink-soft: #4a5a5e;
  --stamp: #c42b1c;
  --navy: #10365c;
  --gold: #a27c2c;
  --accent: var(--navy);
  --sans: "Archivo", system-ui, sans-serif;
  --serif: "Libre Caslon Text", Georgia, serif;
  --col: 36rem;
  --s1: 0.5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2.5rem; --s5: 4rem;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ledger);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
main, footer.site { max-width: var(--col); margin: 0 auto; padding: 0 1.25rem; }

/* Toy name and headline */
.toy-name { font: 600 0.95rem/1.2 var(--sans); color: var(--accent); margin: var(--s4) 0 var(--s1); }
h1 {
  font: 880 clamp(2.1rem, 9vw, 3.4rem)/0.98 var(--sans);
  font-stretch: 118%;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s2);
  text-wrap: balance;
}
.lede { font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 var(--s3); max-width: 32rem; }
h2 { font: 800 1.45rem/1.15 var(--sans); font-stretch: 110%; margin: var(--s5) 0 var(--s2); }
h3 { font: 700 1.1rem/1.3 var(--sans); margin: var(--s3) 0 var(--s1); }
p { margin: 0 0 var(--s2); }
a { color: var(--accent); text-underline-offset: 0.18em; }
small, .small { font-size: 0.85rem; color: var(--ink-soft); }

/* Buttons */
button, .btn {
  font: 750 1.05rem/1 var(--sans); font-stretch: 105%;
  border: 2px solid var(--ink); border-radius: 0.4rem;
  background: var(--ink); color: var(--ledger);
  padding: 0.95rem 1.3rem; cursor: pointer; text-decoration: none; display: inline-block;
  touch-action: manipulation;
}
button.big { width: 100%; font-size: 1.25rem; padding: 1.15rem 1.3rem; background: var(--accent); border-color: var(--accent); color: #fff; }
button.quiet, .btn.quiet { background: transparent; color: var(--ink); }
button:disabled { opacity: 0.45; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--stamp); outline-offset: 3px;
}
.row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: var(--s2) 0; }
.row > * { flex: 1 1 auto; }

/* The toy area */
.stage { position: relative; margin: var(--s3) 0; }
canvas.chart { display: block; width: 100%; height: 13rem; }

/* Glossy fund material */
.gloss {
  background: #fff; color: var(--navy);
  border-top: 6px solid var(--navy);
  padding: 1.1rem 1.1rem 1.25rem;
  box-shadow: 0 1px 0 var(--ledger-line), 0 18px 40px -24px rgba(16, 54, 92, 0.55);
  font-family: var(--serif);
}
.gloss .kicker { font: 600 0.8rem/1.2 var(--sans); color: var(--gold); margin: 0 0 0.3rem; }
.gloss h3 { font: 700 1.5rem/1.15 var(--serif); margin: 0 0 0.6rem; color: var(--navy); }
.gloss .figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 0.8rem 0; font-family: var(--sans); }
.gloss .figs b { display: block; font: 800 1.35rem/1.1 var(--sans); color: var(--navy); }
.gloss .figs span { font-size: 0.78rem; color: #5b6f84; }
.gloss blockquote { margin: 0.6rem 0 0; font: italic 400 0.98rem/1.5 var(--serif); color: #2c4a68; }

/* The verdict stamp: the one loud thing on every page */
.stamp {
  position: absolute; z-index: 3; pointer-events: none;
  right: 0.4rem; top: 38%;
  font: 900 clamp(2.2rem, 12vw, 3.6rem)/1 var(--sans); font-stretch: 125%;
  color: var(--stamp); border: 0.32rem solid var(--stamp); border-radius: 0.5rem;
  padding: 0.2rem 0.7rem 0.3rem; transform: rotate(-12deg);
  mix-blend-mode: multiply; opacity: 0; filter: url(#rough);
}
.stamp.on { animation: slam 0.42s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes slam {
  0% { opacity: 0; transform: rotate(-12deg) scale(2.4); }
  60% { opacity: 0.95; transform: rotate(-12deg) scale(0.94); }
  100% { opacity: 0.9; transform: rotate(-12deg) scale(1); }
}

/* Plain-words verdict under the toy */
.verdict { border-left: 0.35rem solid var(--stamp); padding: 0.2rem 0 0.2rem 1rem; margin: var(--s3) 0; font-size: 1.12rem; }
.verdict b { font-weight: 800; }

/* Sliders and fields */
label { font-weight: 600; display: block; margin: var(--s2) 0 0.3rem; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="number"], select { font: 600 1rem var(--sans); padding: 0.6rem; border: 2px solid var(--ink); border-radius: 0.4rem; background: #fff; color: var(--ink); width: 100%; }
output { font-weight: 800; }

/* Sources and footer */
.sources { font-size: 0.86rem; color: var(--ink-soft); padding-left: 1.1rem; }
.sources li { margin-bottom: 0.4rem; }
footer.site { padding-top: var(--s4); padding-bottom: var(--s5); border-top: 2px solid var(--ink); margin-top: var(--s5); }
.toys { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.2rem 1rem; }
.toys a { font-weight: 650; text-decoration: none; display: block; padding: 0.35rem 0; color: var(--ink); }
.toys a:hover { text-decoration: underline; }
.toys a[aria-current] { color: var(--ink-soft); }
.ask { background: var(--ink); color: var(--ledger); padding: 1.2rem 1.2rem 0.4rem; border-radius: 0.4rem; margin: var(--s4) 0; }
.ask a { color: #fff; font-weight: 800; }

.hidden { display: none !important; }

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

/* Phones: the body is the scroll box (fixes the bouncing bar), text boxes 16px (no focus zoom) */
@media (max-width: 900px) {
  html, body { overscroll-behavior-y: none; }
  html { height: 100%; overflow: hidden; }
  body { position: relative; height: 100%; min-height: 0; overflow-x: hidden; overflow-y: auto; }
  table { display: block; overflow-x: auto; }
  :is(input, textarea, select) { font-size: 16px; }
}
