:root {
  --paper: #f5eddb;
  --paper-2: #fbf6ea;
  --ink: #17291f;
  --ink-soft: #4a5f52;
  --line: rgba(23, 41, 31, 0.22);
  --line-strong: rgba(23, 41, 31, 0.5);
  --leaf: #2f7d4f;
  --leaf-deep: #1f5a3a;
  --leaf-bright: #7dbb6a;
  --lime: #c6d98a;
  --hibiscus: #e3452c;
  --flamingo: #f4a2b6;
  --citrus: #f2a41f;
  --lemon: #f6d65c;

  --display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --max: 1200px;
  --gutter: clamp(18px, 4.5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.15 0 0 0 0 0.1 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.16;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 50;
}
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: -0.045em; line-height: 0.9; }
code { font-family: var(--mono); font-size: 0.88em; background: rgba(23, 41, 31, 0.08); padding: 1px 5px; border-radius: 3px; }
::selection { background: var(--citrus); color: var(--ink); }

/* Garden */
.garden { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.garden svg { width: 100%; height: 100%; display: block; }
.garden .plant { mix-blend-mode: multiply; }
.garden-band, .garden-foot { opacity: 0.22; }
.garden-band .plant, .garden-foot .plant { mix-blend-mode: normal; }

/* Masthead */
.mast {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.brand { font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em; }
.brand-sub { font-style: italic; color: var(--ink-soft); margin-left: 6px; }
.nav-links { display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; font-size: 14px; font-weight: 500; }
.nav-links a { padding-bottom: 2px; border-bottom: 1px solid transparent; }
.nav-links a:hover { border-bottom-color: var(--ink); }

/* Hero */
.hero {
  position: relative;
  min-height: min(86vh, 900px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 96px var(--gutter) 96px;
  border-bottom: 1px solid var(--line);
}
.hero-inner { position: relative; z-index: 2; max-width: 900px; text-align: center; }
.hero-inner::before {
  content: "";
  position: absolute;
  inset: -90px -140px;
  background: radial-gradient(ellipse at center, rgba(245, 237, 219, 0.96) 0%, rgba(245, 237, 219, 0.78) 42%, rgba(245, 237, 219, 0) 70%);
  z-index: -1;
}
.kicker { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.6vw, 30px); color: var(--leaf-deep); margin-bottom: 18px; }
.hero h1 { font-size: clamp(76px, 13.5vw, 196px); }
.sub { max-width: 620px; margin: 30px auto 0; font-size: 18px; line-height: 1.55; }
.cta { display: flex; justify-content: center; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.pill {
  display: inline-block;
  font: 500 15px/1 var(--body);
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pill:hover { background: var(--hibiscus); border-color: var(--hibiscus); color: var(--paper); }
.pill-ghost { background: rgba(251, 246, 234, 0.75); color: var(--ink); border-color: var(--line-strong); }
.pill-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.pill-light:hover { background: var(--citrus); border-color: var(--citrus); color: var(--ink); }
.pill:disabled { opacity: 0.6; cursor: wait; }
.plate-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--gutter);
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-soft);
}

/* Verdict */
.verdict { position: relative; overflow: hidden; background: var(--leaf); color: var(--paper); transition: background 0.5s ease; }
.verdict.is-yes { background: var(--hibiscus); }
.verdict-inner { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 84px var(--gutter) 88px; }
.stamp {
  display: inline-block;
  font: 700 12px/1 var(--display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 9px 13px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  transform: rotate(-3deg);
  margin-bottom: 26px;
}
.giant { font-size: clamp(120px, 26vw, 360px); text-transform: uppercase; line-height: 0.82; }
.giant.is-waiting { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.note { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.2vw, 26px); margin-top: 26px; max-width: 900px; }

.plates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 60px; align-items: start; }
.plate {
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 22px 22px 24px;
}
.plate-label { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 20px; letter-spacing: 0; line-height: 1.2; color: var(--hibiscus); margin-bottom: 16px; }
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 15px; }
.kv dt { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink-soft); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.meter-level { font-family: var(--display); font-weight: 700; font-size: 34px; letter-spacing: -0.03em; line-height: 1; }
.meter-score { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-soft); margin: 6px 0 18px; }
.meter {
  position: relative;
  height: 14px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: linear-gradient(90deg, var(--leaf-bright) 0%, var(--lime) 30%, var(--citrus) 60%, var(--hibiscus) 100%);
}
.marker {
  position: absolute;
  top: -8px;
  left: 0;
  width: 28px;
  height: 28px;
  margin-left: -14px;
  border-radius: 50%;
  border: 3px solid var(--paper-2);
  background: var(--ink);
  transition: left 0.6s ease;
}
.levels { list-style: none; margin: 18px 0 0; padding: 0; font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.levels li { display: flex; gap: 10px; }
.levels li::before { content: attr(data-n); font-family: var(--serif); font-style: italic; width: 12px; }
.levels li span { margin-left: auto; font-variant-numeric: tabular-nums; }
.levels li.is-current { color: var(--ink); font-weight: 500; }
.noul-big { font-family: var(--display); font-weight: 800; font-size: 72px; letter-spacing: -0.05em; line-height: 0.95; }
.noul-label { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-soft); margin: 8px 0 18px; }
.bar { height: 14px; border-radius: 999px; border: 1px solid var(--ink); background: var(--paper); overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--leaf-bright); transition: width 0.6s ease; }
.actions { display: flex; align-items: center; gap: 20px; margin-top: 40px; flex-wrap: wrap; }
.meta { font-family: var(--serif); font-style: italic; font-size: 17px; opacity: 0.9; }

/* Cases */
.case { position: relative; max-width: var(--max); margin: 0 auto; padding: 88px var(--gutter) 40px; }
.case-doom { padding-bottom: 88px; }
.case-doom::before { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 0; border-top: 1px solid var(--line); }
.eyebrow { font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 14px; }
.case-head { margin-bottom: 36px; }
.case-head h2 { font-size: clamp(44px, 6.4vw, 88px); max-width: 900px; }
.case-doom .case-head h2 { color: var(--hibiscus); }
.lede { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink-soft); margin-top: 16px; max-width: 560px; }
.specimens { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.specimen {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 150px;
  transition: border-color 0.15s ease;
}
.specimen:hover { border-color: var(--ink); }
.spec-label { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--leaf-deep); }
.case-doom .spec-label { color: var(--hibiscus); }
.specimen a { font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -0.025em; line-height: 1.12; }
.specimen a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.specimen .src { margin-top: auto; font-size: 13px; color: var(--ink-soft); }
.specimen.empty { justify-content: center; font-family: var(--serif); font-style: italic; color: var(--ink-soft); }

/* Notes */
.notes { position: relative; max-width: var(--max); margin: 0 auto; padding: 72px var(--gutter) 96px; }
.notes::before { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 0; border-top: 1px solid var(--line); }
.notes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.note-block h3 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 20px; letter-spacing: 0; line-height: 1.3; margin-bottom: 10px; color: var(--ink-soft); }
pre.code {
  margin: 0;
  padding: 18px 20px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  overflow: auto;
  max-height: 520px;
}
pre.code code { background: transparent; padding: 0; font-size: inherit; }
.how { margin-top: 80px; border-top: 1px solid var(--line); padding-top: 48px; }
.how h2 { font-size: clamp(40px, 5vw, 64px); margin-bottom: 30px; }
.how-list { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 14px 24px; margin: 0; font-size: 15.5px; line-height: 1.55; max-width: 900px; }
.how-list dt { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--leaf-deep); }
.how-list dd { margin: 0; }
.sources { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; font-size: 13px; }
.sources li { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-2); }
.sources li span { color: var(--ink-soft); margin-left: 6px; }
.sources li.is-down { text-decoration: line-through; color: var(--ink-soft); background: transparent; }

/* Footer */
.footer { position: relative; overflow: hidden; background: var(--ink); color: var(--paper); }
.footer-inner { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 56px var(--gutter) 64px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; font-size: 14px; line-height: 1.6; }
.foot-label { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--lime); margin-bottom: 10px; }
.footer a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(245, 237, 219, 0.4); }
.footer a:hover { color: var(--citrus); }
.footer a.footer-brand { display: inline-flex; flex-direction: column; gap: 8px; margin-top: 18px; text-decoration: none; }
.footer-brand .foot-label { margin: 0; }
.footer-brand img { display: block; width: 112px; height: auto; }
.footer-brand:hover img { filter: brightness(0) saturate(100%) invert(72%) sepia(50%) saturate(700%) hue-rotate(350deg); }

/* Responsive */
@media (max-width: 1000px) {
  .plates { grid-template-columns: minmax(0, 1fr); }
  .specimens { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notes-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 720px) {
  .mast { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px var(--gutter); }
  .brand { font-size: 19px; }
  .brand-sub { display: none; }
  .nav-links { gap: 14px; font-size: 13px; justify-content: flex-start; }
  .hero { min-height: 0; padding: 72px var(--gutter) 96px; }
  .hero h1 { font-size: clamp(60px, 17vw, 96px); }
  .kicker { font-size: 20px; }
  .sub { font-size: 16px; margin-top: 22px; }
  .plate-caption { flex-direction: column; gap: 4px; font-size: 14px; }
  .verdict-inner { padding: 64px var(--gutter) 64px; }
  .giant { font-size: clamp(96px, 32vw, 180px); }
  .note { font-size: 18px; }
  .case { padding-top: 64px; }
  .case-head h2 { font-size: clamp(40px, 11vw, 64px); }
  .specimens { grid-template-columns: minmax(0, 1fr); }
  .how-list { grid-template-columns: minmax(0, 1fr); gap: 4px 0; }
  .how-list dd { margin-bottom: 14px; }
}
