@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --ink: #171713;
  --paper: #f3efe4;
  --paper-2: #e9e2d3;
  --acid: #dbff3d;
  --red: #f04a38;
  --muted: #706d63;
  --line: rgba(23, 23, 19, 0.25);
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Manrope", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  min-width: 320px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  box-shadow: inset 0 0 100px rgba(20, 18, 12, 0.08);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 19;
  opacity: 0.06;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

a { color: inherit; }

.site-header {
  min-height: 76px;
  padding: 0 clamp(20px, 4vw, 72px);
  border-bottom: 1px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wordmark { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 500; }
.wordmark-mark { width: 38px; height: 38px; background: var(--ink); color: var(--acid); display: grid; place-items: center; border-radius: 50%; }
.proof-link { text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 3px; }
.proof-link span { color: var(--red); }

main > section { padding: clamp(72px, 9vw, 140px) clamp(20px, 6vw, 110px); }

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  align-items: center;
  border-bottom: 1px solid var(--ink);
  overflow: hidden;
  padding-top: 64px;
  padding-bottom: 48px;
}

.eyebrow, .kicker {
  margin: 0 0 24px;
  font: 500 11px/1.2 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1, .not-found h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(56px, 7.8vw, 128px);
  line-height: 0.91;
  letter-spacing: -0.065em;
  font-weight: 700;
}

.dek { max-width: 720px; margin: 38px 0; font-size: clamp(18px, 2vw, 27px); line-height: 1.45; }

.formula { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font: 500 11px/1 var(--mono); text-transform: uppercase; }
.formula span { border: 1px solid var(--ink); padding: 10px 12px; background: rgba(255,255,255,0.22); }
.formula i { color: var(--red); font-style: normal; font-size: 18px; }

.goblin-figure { margin: 0; align-self: end; position: relative; transform: rotate(1.5deg); }
.goblin-figure::before { content: ""; position: absolute; inset: 15% 4% 4%; background: var(--acid); border-radius: 50%; z-index: -1; }
.goblin-figure img { display: block; width: min(100%, 680px); mix-blend-mode: multiply; }
.goblin-figure figcaption { position: absolute; right: 1%; bottom: 3%; background: var(--ink); color: var(--paper); font: 10px/1 var(--mono); text-transform: uppercase; padding: 10px; transform: rotate(-3deg); }

.machine { background: var(--ink); color: var(--paper); }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; align-items: end; margin-bottom: 58px; }
.section-heading .kicker { grid-column: 1 / -1; color: var(--acid); }
.section-heading h2, .meter-topline h2, .fine-grid h2 { font-size: clamp(38px, 5vw, 78px); line-height: 0.98; letter-spacing: -0.045em; margin: 0; }
.section-heading > p:last-child { max-width: 480px; margin: 0; justify-self: end; color: #b7b3a9; line-height: 1.6; }

.upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 40px); }
.upload-card { position: relative; min-width: 0; }
.card-number { position: absolute; z-index: 3; top: 20px; left: 20px; font: 500 12px/1 var(--mono); background: var(--acid); color: var(--ink); width: 35px; height: 35px; border-radius: 50%; display: grid; place-items: center; }
.file-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop-zone { min-height: 410px; border: 1px solid #65645e; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; padding: 60px 28px 30px; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.upload-card:hover .drop-zone, .upload-card.is-dragging .drop-zone { border-color: var(--acid); background: rgba(219, 255, 61, 0.08); transform: translateY(-3px); }
.paper-icon { width: 90px; height: 116px; border: 2px solid currentColor; position: relative; display: grid; place-items: center; margin-bottom: 30px; transform: rotate(-2deg); }
.paper-icon::after { content: ""; width: 24px; height: 24px; background: var(--ink); border-left: 2px solid var(--paper); border-bottom: 2px solid var(--paper); position: absolute; top: -2px; right: -2px; }
.paper-icon i { font: 500 12px/1 var(--mono); font-style: normal; color: var(--acid); }
.drop-title { font-size: clamp(24px, 3vw, 42px); font-weight: 600; letter-spacing: -0.03em; }
.drop-note { color: #99968f; margin-top: 8px; font: 11px/1.4 var(--mono); text-transform: uppercase; }
.filename { margin-top: 34px; padding-top: 14px; width: 100%; border-top: 1px solid #56554f; color: var(--acid); font: 11px/1.4 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-status { min-height: 30px; padding-top: 10px; font: 11px/1.4 var(--mono); color: #a9a69f; }
.upload-card.is-loading .paper-icon { animation: wobble .7s infinite alternate ease-in-out; }
.upload-card.has-file .paper-icon { color: var(--acid); }

@keyframes wobble { to { transform: rotate(3deg) translateY(-5px); } }

.meter-section { position: relative; border-bottom: 1px solid var(--ink); }
.meter-topline { display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.score-display { text-align: right; }
.score-display strong { display: block; color: var(--red); font-size: clamp(60px, 9vw, 150px); line-height: .78; letter-spacing: -0.08em; }
.score-display span { display: block; margin-top: 20px; font: 11px/1.3 var(--mono); text-transform: uppercase; }
.egg-meter { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); margin-top: 70px; }
.egg-cell { position: relative; aspect-ratio: 0.76; min-width: 0; border-right: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.egg-cell:last-child { border-right: 0; }
.egg { position: absolute; width: 125%; max-width: none; transition: opacity .18s ease, transform .35s cubic-bezier(.2,.8,.2,1); }
.egg.broken { opacity: 0; transform: translateY(-10px) scale(.85); }
.egg-cell.is-broken .egg.intact { opacity: 0; transform: translateY(10px) scale(.85); }
.egg-cell.is-broken .egg.broken { opacity: 1; transform: none; }
.egg-cell span { position: absolute; bottom: 8px; left: 8px; font: 10px/1 var(--mono); color: var(--muted); }
.meter-caption { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; margin-top: 18px; font: 10px/1.2 var(--mono); text-transform: uppercase; }
.meter-rule { height: 1px; background: var(--ink); position: relative; }
.meter-rule i { position: absolute; width: 8px; height: 8px; border-top: 1px solid; border-right: 1px solid; right: 0; top: -4px; transform: rotate(45deg); }
.result-error { position: relative; margin-top: 46px; border: 2px solid var(--red); padding: 20px; display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 22px; background: rgba(240, 74, 56, .08); }
.result-error[hidden] { display: none; }
.result-error img { width: 150px; height: 150px; object-fit: contain; }
.result-error p { margin: 0 0 8px; color: var(--red); font: 500 10px/1 var(--mono); letter-spacing: .1em; }
.result-error strong { font-size: clamp(16px, 2vw, 25px); }
.result-error button { border: 0; background: transparent; font-size: 40px; cursor: pointer; }

.fine-print { background: var(--paper-2); }
.fine-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 7vw; }
.fine-grid p { margin: 0 0 24px; line-height: 1.7; }
.fine-grid a { text-decoration-color: var(--red); text-decoration-thickness: 2px; }

footer { min-height: 120px; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px clamp(20px, 6vw, 110px); font: 10px/1.4 var(--mono); text-transform: uppercase; }

.error-page { min-height: 100vh; background: var(--acid); }
.not-found { min-height: calc(100vh - 76px); display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: clamp(40px, 6vw, 100px) clamp(20px, 6vw, 110px); overflow: hidden; }
.not-found h1 { font-size: clamp(50px, 6.6vw, 104px); }
.not-found-copy > p:not(.eyebrow) { max-width: 600px; font-size: clamp(17px, 1.5vw, 23px); line-height: 1.55; margin: 32px 0; }
.not-found figure { margin: 0 -8vw 0 0; transform: rotate(4deg); }
.not-found img { display: block; width: 100%; }
.home-button { display: inline-flex; gap: 30px; align-items: center; background: var(--ink); color: var(--paper); padding: 18px 22px; text-decoration: none; font: 500 11px/1 var(--mono); text-transform: uppercase; }
.home-button span { color: var(--acid); }

/* Single-screen comparison app */
.app-page {
  height: 100dvh;
  overflow: hidden;
  background: var(--ink);
}

.app-page::before { box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.16); }

.app-page .site-header {
  height: 58px;
  min-height: 58px;
  background: var(--paper);
  padding-inline: clamp(16px, 3vw, 48px);
}

.app-page .wordmark { gap: 9px; text-transform: none; font-family: var(--sans); font-size: 15px; letter-spacing: -0.03em; }
.app-page .wordmark i { color: var(--muted); font-style: normal; font-weight: 500; }
.app-page .wordmark-mark { width: 40px; height: 40px; overflow: hidden; background: var(--acid); }
.app-page .wordmark-mark img { width: 50px; height: 50px; object-fit: cover; mix-blend-mode: multiply; }
.header-meta { display: flex; align-items: center; gap: clamp(18px, 3vw, 44px); }
.header-meta > span { color: var(--muted); }
.header-meta .engine-link { color: var(--ink); font-weight: 500; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.mode-link { flex: 0 0 auto; padding: 7px 10px; background: var(--acid); color: var(--ink); text-decoration: none; font-weight: 500; }
.mode-link b { color: var(--red); }

.app-shell {
  height: calc(100dvh - 58px);
  min-height: 0;
  padding: clamp(12px, 2vh, 22px) clamp(16px, 3vw, 48px);
  display: grid;
  grid-template-rows: auto minmax(200px, 1fr) auto auto;
  gap: clamp(10px, 1.5vh, 16px);
  background: var(--ink);
  color: var(--paper);
}

.app-shell > section { padding: 0; }

.app-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
}

.app-intro .eyebrow { margin-bottom: 7px; color: var(--acid); font-size: 9px; }
.app-intro h1 { margin: 0; font-size: clamp(27px, 3.3vw, 52px); line-height: .98; letter-spacing: -.055em; }
.intro-help { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.intro-help p { margin: 0; color: #b9b6ad; font-size: 12px; }
.app-page .formula { justify-content: flex-end; font-size: 9px; gap: 6px; }
.app-page .formula span { padding: 6px 8px; border-color: #77756e; background: transparent; }
.app-page .formula i { color: var(--acid); font-size: 12px; }

.app-workspace { min-height: 0; background: transparent; }
.app-page .upload-grid { height: 100%; gap: clamp(10px, 1.5vw, 20px); }
.app-page .upload-card { height: 100%; }
.app-page .card-number { top: 12px; left: 12px; width: 30px; height: 30px; }
.app-page .drop-zone {
  height: 100%;
  min-height: 0;
  padding: 40px 20px 16px;
  background: #211f1b;
}
.app-page .paper-icon { width: clamp(48px, 6vh, 68px); height: clamp(62px, 8vh, 88px); margin-bottom: clamp(8px, 1.5vh, 18px); }
.app-page .paper-icon::after { width: 17px; height: 17px; }
.app-page .drop-title { font-size: clamp(20px, 2.3vw, 34px); }
.app-page .drop-note { margin-top: 4px; font-size: 9px; }
.app-page .filename { margin-top: clamp(10px, 2vh, 24px); padding-top: 9px; font-size: 9px; }
.app-page .upload-status { position: absolute; bottom: -14px; min-height: 0; padding: 0 4px; font-size: 9px; }

.app-meter {
  background: var(--paper);
  color: var(--ink);
  border: 0;
  padding: clamp(10px, 1.5vh, 16px) clamp(12px, 1.5vw, 22px) 9px !important;
}
.app-page .meter-topline { align-items: center; }
.app-page .meter-topline .kicker { margin: 0 0 3px; font-size: 8px; }
.app-page .meter-topline h2 { font-size: clamp(20px, 2vw, 31px); line-height: 1; }
.app-page .score-display { display: flex; align-items: baseline; gap: 16px; text-align: right; }
.app-page .score-display strong { font-size: clamp(43px, 5.5vw, 78px); line-height: .72; }
.app-page .score-display span { margin: 0; font-size: 9px; max-width: 240px; }
.app-page .egg-meter { margin-top: clamp(8px, 1vh, 12px); }
.app-page .egg-cell { height: clamp(62px, 11vh, 105px); aspect-ratio: auto; }
.app-page .egg { width: min(112%, 108px); }
.app-page .egg-cell span { bottom: 4px; left: 5px; font-size: 8px; }
.app-page .meter-caption { margin-top: 6px; font-size: 8px; }
.app-page .result-error {
  position: fixed;
  z-index: 50;
  left: 50%;
  top: 50%;
  width: min(720px, calc(100vw - 32px));
  transform: translate(-50%, -50%);
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}

.legal-disclaimer {
  min-width: 0;
  color: #c5c1b8;
  font: 400 clamp(9px, .72vw, 11px)/1.5 var(--mono);
}

.legal-disclaimer p { margin: 0; }

.thinking-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 14, 12, .82);
  backdrop-filter: blur(5px);
}

.thinking-overlay[hidden] { display: none; }

.thinking-card {
  width: min(680px, calc(100vw - 32px));
  min-height: 310px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, .8fr) 1.2fr;
  align-items: center;
  gap: 28px;
  padding: 28px clamp(24px, 4vw, 48px);
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--acid);
  color: var(--ink);
  box-shadow: 14px 14px 0 var(--red);
}

.thinking-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(23, 23, 19, .22);
}

.thinking-card img {
  width: 100%;
  max-height: 270px;
  position: relative;
  z-index: 1;
  object-fit: contain;
  mix-blend-mode: multiply;
  transform-origin: 50% 90%;
  animation: chicken-think .45s infinite alternate ease-in-out;
}

.thinking-card p {
  margin: 0 0 12px;
  font: 500 9px/1.2 var(--mono);
  letter-spacing: .11em;
}

.thinking-card strong {
  display: block;
  font-size: clamp(29px, 4.5vw, 53px);
  line-height: .95;
  letter-spacing: -.055em;
}

.thinking-card span {
  display: block;
  margin-top: 18px;
  font: 500 10px/1.55 var(--mono);
  max-width: 330px;
}

.thought-bubble {
  position: absolute;
  z-index: 3;
  top: 28px;
  left: 39%;
  display: flex;
  gap: 7px;
  padding: 13px 16px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  transform: rotate(-5deg);
}

.thought-bubble::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  left: 4px;
  bottom: -13px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.thought-bubble i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  animation: thought-dot .8s infinite ease-in-out;
}

.thought-bubble i:nth-child(2) { animation-delay: .13s; }
.thought-bubble i:nth-child(3) { animation-delay: .26s; }

@keyframes chicken-think {
  from { transform: rotate(-1.5deg) translateY(1px); }
  to { transform: rotate(1.5deg) translateY(-4px); }
}

@keyframes thought-dot {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

.egg-meter.result-flash .egg-cell {
  animation: egg-cell-flash .42s 2 ease-in-out;
}

.egg-meter.result-flash .egg {
  animation: egg-art-flash .42s 2 ease-in-out;
}

@keyframes egg-cell-flash {
  50% { background: var(--acid); }
}

@keyframes egg-art-flash {
  50% { filter: drop-shadow(0 0 9px var(--red)); }
}

/* Pro mode */
.pro-page {
  height: 100dvh;
  overflow: hidden;
  background: var(--ink);
}

.pro-page .site-header {
  height: 58px;
  min-height: 58px;
  padding-inline: clamp(16px, 3vw, 48px);
  background: var(--paper);
}

.pro-page .wordmark { gap: 9px; text-transform: none; font-family: var(--sans); font-size: 15px; letter-spacing: -.03em; }
.pro-page .wordmark i { color: var(--muted); font-style: normal; font-weight: 500; }
.pro-page .wordmark em { margin-left: 5px; color: var(--red); font: 500 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.pro-page .wordmark-mark { width: 40px; height: 40px; overflow: hidden; background: var(--acid); }
.pro-page .wordmark-mark img { width: 50px; height: 50px; object-fit: cover; mix-blend-mode: multiply; }

.pro-shell {
  height: calc(100dvh - 58px);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(12px, 2vh, 20px);
  padding: clamp(14px, 2.4vh, 26px) clamp(16px, 3vw, 48px);
  background: var(--ink);
  color: var(--paper);
}

.pro-shell > section { padding: 0; }

.pro-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 440px);
  align-items: end;
  gap: 40px;
}

.pro-intro .eyebrow { margin-bottom: 6px; color: var(--acid); font-size: 8px; }
.pro-intro h1 { margin: 0; font-size: clamp(28px, 3.8vw, 60px); line-height: .95; letter-spacing: -.055em; }
.pro-intro > p { margin: 0; color: #b9b6ad; font-size: clamp(11px, 1.1vw, 15px); line-height: 1.5; }

.pro-grid { min-height: 0; display: grid; grid-template-columns: minmax(300px, .78fr) minmax(430px, 1.22fr); }
.pro-pane { min-width: 0; min-height: 0; position: relative; display: flex; flex-direction: column; border: 1px solid #68655d; }
.pro-upload-pane { padding: clamp(14px, 2vw, 26px); background: #211f1b; }
.pro-results-pane { padding: clamp(14px, 2vw, 26px); border-left: 0; background: var(--paper); color: var(--ink); }

.pro-pane-heading { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: clamp(12px, 2vh, 22px); }
.pro-pane-heading > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pro-pane-heading > div > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--acid); color: var(--ink); font: 500 9px/1 var(--mono); }
.pro-results-pane .pro-pane-heading > div > span { background: var(--ink); color: var(--acid); }
.pro-pane-heading h2 { margin: 0; font-size: clamp(20px, 2.3vw, 34px); letter-spacing: -.04em; }
.pro-pane-heading > strong { flex: 0 0 auto; font: 500 9px/1 var(--mono); color: var(--acid); }
.pro-results-pane .pro-pane-heading > strong { color: var(--red); }

.pro-drop-zone {
  flex: 1 1 auto;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 1px dashed #77746c;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.pro-drop-zone:hover, .pro-drop-zone.is-dragging { border-color: var(--acid); background: rgba(219, 255, 61, .08); transform: translateY(-2px); }
.pro-drop-zone.is-full { opacity: .45; cursor: not-allowed; pointer-events: none; }
.pro-drop-zone > strong { margin-top: 18px; font-size: clamp(22px, 2.5vw, 38px); letter-spacing: -.035em; }
.pro-drop-zone > span:last-child { margin-top: 6px; color: #9b9891; font: 9px/1.5 var(--mono); text-transform: uppercase; }

.paper-stack { width: 76px; height: 92px; position: relative; display: grid; place-items: center; border: 2px solid var(--paper); transform: rotate(-2deg); }
.paper-stack::before, .paper-stack::after { content: ""; position: absolute; inset: 4px -7px -6px 6px; z-index: -1; border: 1px solid #77746c; transform: rotate(5deg); }
.paper-stack::after { inset: 7px 5px -9px -9px; transform: rotate(-5deg); }
.paper-stack i { color: var(--acid); font: 500 10px/1 var(--mono); font-style: normal; }

.pro-controls { flex: 0 0 auto; min-height: 34px; display: flex; align-items: end; justify-content: space-between; gap: 14px; padding-top: 10px; }
.pro-controls p { margin: 0; color: #aaa79f; font: 9px/1.35 var(--mono); }
.pro-controls button, .pro-rank-item button { border: 0; cursor: pointer; }
.pro-controls button { padding: 7px 9px; background: transparent; color: var(--paper); border-bottom: 1px solid #77746c; font: 500 9px/1 var(--mono); text-transform: uppercase; }
.pro-controls button:disabled { opacity: .35; cursor: default; }

.pro-error { position: absolute; z-index: 5; inset: auto 20px 20px; display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--red); background: var(--paper); color: var(--ink); box-shadow: 7px 7px 0 var(--red); }
.pro-error[hidden] { display: none; }
.pro-error img { width: 52px; height: 52px; object-fit: contain; }
.pro-error b, .pro-error span { display: block; }
.pro-error b { margin-bottom: 4px; color: var(--red); font: 500 8px/1 var(--mono); }
.pro-error span { font-size: 11px; line-height: 1.3; }
.pro-error button { border: 0; background: none; font-size: 27px; cursor: pointer; }

.pro-ranking { flex: 1 1 auto; min-height: 0; margin: 0; padding: 0; overflow-y: auto; list-style: none; border-top: 1px solid var(--ink); scrollbar-color: var(--ink) transparent; }
.pro-rank-item { min-height: 56px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 24px; align-items: center; gap: 10px; padding: 7px 3px; border-bottom: 1px solid var(--line); }
.pro-rank-item.is-outlier { background: var(--acid); margin-inline: -8px; padding-inline: 11px; border-color: var(--ink); }
.pro-rank-number { font: 500 9px/1 var(--mono); color: var(--muted); }
.pro-rank-item > div:nth-child(2) { min-width: 0; }
.pro-rank-item > div:nth-child(2) strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(12px, 1.25vw, 17px); }
.pro-rank-item > div:nth-child(2) span { display: block; margin-top: 3px; color: var(--muted); font: 500 7px/1 var(--mono); letter-spacing: .08em; }
.pro-rank-item.is-outlier > div:nth-child(2) span { color: var(--red); }
.pro-average { min-width: 95px; text-align: right; }
.pro-average strong { display: block; color: var(--red); font-size: clamp(20px, 2.2vw, 32px); line-height: .8; letter-spacing: -.06em; }
.pro-average span { display: block; margin-top: 5px; font: 500 7px/1 var(--mono); color: var(--muted); }
.pro-rank-item button { width: 24px; height: 24px; padding: 0; background: transparent; color: var(--muted); font-size: 21px; }
.pro-rank-item button:hover { color: var(--red); }

.pro-empty { height: 100%; min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.pro-empty img { width: clamp(80px, 10vw, 130px); height: clamp(90px, 12vh, 150px); object-fit: contain; }
.pro-empty strong { margin-top: 8px; font-size: clamp(18px, 2vw, 28px); }
.pro-empty span { margin-top: 5px; color: var(--muted); font: 8px/1.4 var(--mono); text-transform: uppercase; }
.pro-footnote { flex: 0 0 auto; margin: 10px 0 0; color: var(--muted); font: 8px/1.35 var(--mono); }
.pro-footnote a { color: var(--red); text-decoration: none; border-bottom: 1px solid currentColor; }
.pro-page .legal-disclaimer { color: #c5c1b8; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .goblin-figure { width: min(80%, 560px); justify-self: center; margin-top: 20px; }
  .section-heading, .fine-grid { grid-template-columns: 1fr; }
  .section-heading > p:last-child { justify-self: start; margin-top: 28px; }
  .egg-meter { grid-template-columns: repeat(5, 1fr); }
  .egg-cell:nth-child(5) { border-right: 0; }
  .egg-cell:nth-child(-n+5) { border-bottom: 1px solid var(--line); }
  .not-found { grid-template-columns: 1fr; }
  .not-found figure { max-width: 700px; margin: 30px auto -100px; }
  .app-shell { grid-template-rows: auto minmax(180px, 1fr) auto auto; }
  .app-intro { grid-template-columns: 1fr; gap: 12px; }
  .intro-help { align-items: flex-start; }
  .app-page .formula { justify-content: flex-start; }
  .app-page .egg-meter { grid-template-columns: repeat(10, 1fr); }
  .app-page .egg-cell:nth-child(5) { border-right: 1px solid var(--line); }
  .app-page .egg-cell:nth-child(-n+5) { border-bottom: 0; }
  .pro-intro { grid-template-columns: 1fr; gap: 8px; }
  .pro-intro > p { display: none; }
  .pro-grid { grid-template-columns: minmax(250px, .8fr) minmax(360px, 1.2fr); }
}

@media (max-width: 650px) {
  .site-header { min-height: 64px; }
  .proof-link { max-width: 150px; text-align: right; }
  main > section { padding-left: 20px; padding-right: 20px; }
  .hero h1 { font-size: clamp(48px, 16vw, 78px); }
  .upload-grid { grid-template-columns: 1fr; }
  .drop-zone { min-height: 330px; }
  .meter-topline { display: block; }
  .score-display { text-align: left; margin-top: 50px; }
  .egg { width: 142%; }
  .meter-caption { grid-template-columns: 1fr 1fr; }
  .meter-rule { display: none; }
  .meter-caption span:last-child { text-align: right; }
  .result-error { grid-template-columns: 70px 1fr; }
  .result-error img { width: 70px; height: 70px; }
  .result-error button { position: absolute; right: 22px; margin-top: -105px; }
  footer { align-items: flex-start; flex-direction: column; }
  .not-found { padding-top: 60px; }
  .header-meta > span { display: none; }
  .app-page .proof-link { display: none; }
  .app-page .site-header { min-height: 54px; height: 54px; }
  .app-shell { height: calc(100dvh - 54px); min-height: 0; grid-template-rows: auto minmax(145px, 1fr) auto auto; padding: 9px 10px; gap: 8px; }
  .app-intro { gap: 6px; }
  .app-intro .eyebrow { display: none; }
  .app-intro h1 { font-size: clamp(23px, 7vw, 34px); }
  .intro-help p { display: none; }
  .app-page .formula { gap: 4px; }
  .app-page .formula span { padding: 4px 5px; font-size: 8px; }
  .app-page .upload-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .app-page .upload-card { height: 100%; }
  .app-page .drop-zone { min-height: 0; padding: 34px 7px 8px; }
  .app-page .paper-icon { width: 38px; height: 50px; margin-bottom: 7px; }
  .app-page .paper-icon::after { width: 12px; height: 12px; }
  .app-page .drop-title { font-size: clamp(15px, 4.5vw, 21px); }
  .app-page .drop-note { display: none; }
  .app-page .filename { margin-top: 7px; padding-top: 6px; }
  .app-page .upload-status { bottom: -9px; }
  .app-meter { padding: 8px 8px 6px !important; }
  .app-page .meter-topline h2 { font-size: 17px; }
  .app-page .meter-topline .kicker { font-size: 7px; }
  .app-page .score-display { gap: 8px; }
  .app-page .score-display strong { font-size: 38px; }
  .app-page .score-display span { font-size: 7px; max-width: 110px; }
  .app-page .score-display { text-align: left; margin-top: 0; }
  .app-page .egg-meter { grid-template-columns: repeat(5, 1fr); }
  .app-page .egg-cell { height: clamp(34px, 6.5vh, 54px); }
  .app-page .egg { width: min(116%, 55px); }
  .app-page .egg-cell span { display: none; }
  .app-page .egg-cell:nth-child(5) { border-right: 0; }
  .app-page .egg-cell:nth-child(-n+5) { border-bottom: 1px solid var(--line); }
  .app-page .meter-caption { grid-template-columns: 1fr 1fr; }
  .app-page .legal-disclaimer { max-height: 88px; overflow-y: auto; font-size: 9px; }
  .thinking-card { min-height: 260px; grid-template-columns: 125px 1fr; gap: 16px; padding: 22px; }
  .thinking-card img { max-height: 210px; }
  .thought-bubble { left: 31%; top: 20px; }
  .pro-page { height: auto; min-height: 100dvh; overflow: auto; }
  .pro-page .site-header { height: 54px; min-height: 54px; }
  .pro-page .mode-link { display: none; }
  .pro-shell { height: auto; min-height: calc(100dvh - 54px); padding: 10px; }
  .pro-intro .eyebrow { display: none; }
  .pro-intro h1 { font-size: 28px; }
  .pro-grid { grid-template-columns: 1fr; grid-template-rows: 330px minmax(440px, auto); }
  .pro-results-pane { border-left: 1px solid #68655d; border-top: 0; }
  .pro-page .legal-disclaimer { padding-bottom: 4px; font-size: 9px; }
}

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