:root {
  --bg: #0c0d0f;
  --paper: #f2efe6;
  --ink: #111214;
  --acid: #d9ff3f;
  --hot: #ff4d32;
  --electric: #5a7cff;
  --muted: #9ea2aa;
  --line: #2a2d33;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
}
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  background-image: radial-gradient(circle at 20% 20%, #fff 0 1px, transparent 1px), radial-gradient(circle at 80% 60%, #fff 0 1px, transparent 1px);
  background-size: 19px 19px, 31px 31px;
  mix-blend-mode: soft-light;
  z-index: 20;
}
.site-header, main, footer { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  padding: 36px 0 24px;
  border-bottom: 1px solid var(--line);
}
.eyebrow, .kicker, label, .rule-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow { color: var(--acid); }
h1 { margin: 4px 0 0; font-size: clamp(48px, 8vw, 88px); line-height: .9; letter-spacing: -.055em; }
h1 span { font-size: .25em; vertical-align: top; margin-left: 4px; }
.tagline { margin: 10px 0 0; font-family: Georgia, serif; font-style: italic; font-size: 19px; }
.header-chip, .mode-pill {
  border: 1px solid var(--paper);
  padding: 8px 10px;
  font-size: 10px;
  letter-spacing: .14em;
  font-weight: 700;
}
main { padding: 28px 0 60px; }
.panel {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
}
.hero {
  padding: 30px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: start;
  margin-bottom: 20px;
  border-top: 4px solid var(--acid);
}
h2 { font-size: clamp(34px, 6vw, 64px); letter-spacing: -.045em; margin: 6px 0 12px; line-height: .95; }
h3 { font-size: 26px; letter-spacing: -.03em; margin: 5px 0 12px; }
.lede { max-width: 760px; color: #d2d3d7; line-height: 1.55; font-size: 17px; }
.mode-pill { color: var(--acid); border-color: var(--acid); white-space: nowrap; }
.workspace-grid { display: grid; grid-template-columns: 1.65fr .85fr; gap: 20px; }
.input-panel, .score-panel { padding: 24px; }
label { display: block; margin: 4px 0 8px; color: #c9cbd1; }
input, textarea {
  width: 100%;
  border: 1px solid #353941;
  background: #111318;
  color: var(--paper);
  padding: 13px 14px;
  font: inherit;
  resize: vertical;
  margin-bottom: 18px;
  outline: none;
}
input:focus, textarea:focus { border-color: var(--acid); box-shadow: 0 0 0 1px var(--acid); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.upload-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px;
  border: 1px dashed #515661;
  margin: 2px 0 16px;
}
.upload-box p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.button {
  appearance: none;
  border: 0;
  padding: 13px 16px;
  font-weight: 900;
  letter-spacing: .06em;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 12px;
}
.button.primary { width: 100%; background: var(--acid); color: #080908; }
.button.primary:hover { filter: brightness(.92); }
.button.secondary { border: 1px solid var(--paper); color: var(--paper); background: transparent; white-space: nowrap; }
.privacy { font-size: 11px; color: #777d87; margin-bottom: 0; }
.preview-wrap { border: 1px solid #30343b; margin: 0 0 16px; padding: 10px; }
.preview-wrap img { display: block; max-height: 280px; max-width: 100%; margin: 0 auto 10px; }
.meta { color: var(--muted); font-size: 12px; }
.hidden { display: none !important; }
.score-panel { position: sticky; top: 12px; align-self: start; }
.score-head { display: flex; justify-content: space-between; align-items: start; }
.score { font-size: 54px; line-height: 1; color: var(--acid); font-weight: 900; }
.meter { height: 8px; background: #202329; overflow: hidden; margin-bottom: 22px; }
.meter span { display: block; height: 100%; width: 0; background: var(--acid); transition: width .5s ease; }
.metric-list { border-top: 1px solid var(--line); }
.metric { padding: 14px 0; display: flex; gap: 10px; justify-content: space-between; border-bottom: 1px solid var(--line); font-size: 13px; }
.metric span { color: #b0b4bd; }
.metric strong { text-align: right; }
.rule-box { margin-top: 22px; border-left: 3px solid var(--hot); padding: 12px 14px; background: rgba(255,77,50,.05); }
.rule-box p { color: #c8cad0; line-height: 1.5; font-size: 13px; margin-bottom: 0; }
.results { margin-top: 20px; display: grid; gap: 16px; }
.result-panel { display: grid; grid-template-columns: 76px 1fr; padding: 24px; gap: 20px; }
.section-number { font-size: 36px; font-weight: 900; color: #4a4f59; }
.output { color: #d8d9dc; line-height: 1.55; }
.output ul { margin: 8px 0 0; padding-left: 20px; }
.output li { margin-bottom: 7px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.h-card { border: 1px solid #383c44; padding: 14px; background: #101216; }
.h-card strong { display: block; color: var(--acid); margin-bottom: 7px; }
.method-panel { padding: 28px; border-top: 4px solid var(--hot); }
.method-panel h3 { max-width: 850px; font-size: 34px; }
footer { border-top: 1px solid var(--line); padding: 20px 0 34px; display: flex; justify-content: space-between; color: #7f848e; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 860px) {
  .site-header, .hero, footer { flex-direction: column; align-items: stretch; }
  .workspace-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .score-panel { position: static; }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .site-header, main, footer { width: min(100% - 18px, 1180px); }
  .hero, .input-panel, .score-panel, .result-panel, .method-panel { padding: 18px; }
  .result-panel { grid-template-columns: 1fr; }
  .section-number { font-size: 24px; }
  .header-chip { display: none; }
}
