/* Same tokens as the main acetate.lol site - single source of design. */
:root {
  --bg: #0d0d0f;
  --raised: #1c1c20;
  --raised-2: #232328;
  --border: #272729;
  --border-hi: #333337;
  --text: #e8e8ec;
  --text-2: #888892;
  --text-3: #4a4a55;
  --accent: oklch(0.7 0.14 187);
  --accent-dim: oklch(0.7 0.14 187 / 0.12);
  --accent-border: oklch(0.7 0.14 187 / 0.35);
  --acid-amber: #ffb040;
  --acid-magenta: #c254ff;
  --acid-pink: #ff5cb5;
  --pass: oklch(0.78 0.13 150);
  --pass-bg: oklch(0.78 0.13 150 / 0.12);
  --pass-border: oklch(0.78 0.13 150 / 0.3);
  --watch: #ffb040;
  --watch-bg: rgba(255, 176, 64, 0.12);
  --watch-border: rgba(255, 176, 64, 0.35);
  --fail: #ff5c6c;
  --fail-bg: rgba(255, 92, 108, 0.1);
  --fail-border: rgba(255, 92, 108, 0.4);
  --max-w: 1080px;
  --pad-x: 28px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  font-size: 15px;
  background-image:
    radial-gradient(ellipse at top, oklch(0.7 0.14 187 / 0.04), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(255, 176, 64, 0.025), transparent 50%);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent); }

::selection { background: var(--accent-dim); color: var(--text); }

h1, h2, h3 { font-weight: 500; letter-spacing: -0.01em; }
h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 500; }
h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; }
h3 { font-size: 17px; }

.mono { font-family: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace; }
.dim { color: var(--text-3); }
.muted { color: var(--text-2); }
.amber { color: var(--acid-amber); font-style: italic; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ============================================================
   Top nav (sticky, blurred - matches main site .top)
   ============================================================ */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  background: rgba(13, 13, 15, 0.72);
  border-bottom: 1px solid var(--border);
}
.top__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  /* horizontal padding comes from .container - do not override with shorthand */
}
.brand { font-size: 14px; letter-spacing: 0.04em; color: var(--text); }
.brand:hover { color: var(--accent); }
.top__links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 12px;
  color: var(--text-2);
}
.top__links a:hover { color: var(--accent); }

/* ============================================================
   Hero - staggered reveal animation
   ============================================================ */
.hero { padding: 96px 0 56px; border-bottom: 1px solid var(--border); }
.hero__h {
  letter-spacing: -0.03em;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 1.02;
}
.hero__line {
  display: block;
  animation: lineIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  clip-path: inset(0 100% 0 0);
}
.hero__line:nth-child(1) { animation-delay: 0.05s; }
.hero__line:nth-child(2) { animation-delay: 0.22s; }
.hero__line:nth-child(3) { animation-delay: 0.39s; }
.hero__sub {
  max-width: 60ch;
  margin-top: 26px;
  font-size: 16px;
  line-height: 1.55;
  animation: fadeUp 0.6s 0.65s both;
}

@keyframes lineIn {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Section labels
   ============================================================ */
.section-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 18px;
}
.section-label .rec-dot { margin-left: 0.5em; }

/* ============================================================
   Mode picker
   ============================================================ */
.mode-picker { padding: 56px 0 32px; }
.mode-picker__opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.mode-opt {
  display: block;
  padding: 22px 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--raised);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
  position: relative;
}
.mode-opt:active { transform: translateY(1px); }
.mode-opt input { position: absolute; opacity: 0; pointer-events: none; }
.mode-opt:hover { border-color: var(--border-hi); }
.mode-opt:has(input:checked) {
  border-color: var(--accent-border);
  background: linear-gradient(180deg, var(--accent-dim), transparent 70%), var(--raised);
}
.mode-opt:has(input:checked)::after {
  content: "✓";
  position: absolute;
  top: 18px;
  right: 18px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}
.mode-opt__title {
  display: block;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.mode-opt__sub { display: block; font-size: 13px; }

@media (max-width: 640px) {
  .mode-picker__opts { grid-template-columns: 1fr; }
}

/* ============================================================
   Drop zone
   ============================================================ */
.drop-section { padding: 16px 0 32px; }
.drop-zone {
  padding: 64px 24px;
  border: 1px dashed var(--border-hi);
  border-radius: 12px;
  background: var(--raised);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.drop-zone:hover,
.drop-zone:focus,
.drop-zone.drag-over {
  border-color: var(--accent-border);
  border-style: solid;
  background: linear-gradient(180deg, var(--accent-dim), transparent 70%), var(--raised);
  outline: none;
}
.drop-zone__head {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.drop-zone__formats {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--text-2);
  margin-bottom: 14px;
}
.drop-zone__hint { font-size: 13px; }

/* ============================================================
   Analyzing
   ============================================================ */
.analyzing {
  padding: 72px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}
.analyzing__stage {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 14px 0 10px;
  color: var(--text);
}
.analyzing__hint { font-size: 12px; letter-spacing: 0.04em; }
.analyzing__privacy {
  margin-top: 18px;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.04em;
  opacity: 0;
  animation: fadeUp 0.5s 0.8s both;
}
.rec-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--fail);
  border-radius: 50%;
  vertical-align: 0.1em;
  animation: blink 1.2s steps(2, start) infinite;
}
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0.25; } }

/* ============================================================
   Results: verdict
   ============================================================ */
.results { padding-top: 48px; animation: fadeUp 0.5s both; }

.verdict {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 32px;
  margin-bottom: 28px;
  background: var(--raised);
  overflow: hidden;
}
.verdict::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: var(--border-hi);
}
.verdict__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.verdict__tag {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-3);
}
.stage-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.05em;
  border: 1px solid var(--border-hi);
  color: var(--text-2);
  background: var(--bg);
}
.stage-chip--master { color: var(--acid-amber); border-color: rgba(255, 176, 64, 0.35); }
.stage-chip--mix { color: var(--accent); border-color: var(--accent-border); }
.stage-chip--uncertain { color: var(--text-3); }
.verdict__title {
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-bottom: 14px;
}
.verdict__sub { color: var(--text-2); max-width: 55ch; font-size: 16px; line-height: 1.5; }

.verdict--pass { border-color: var(--pass-border); }
.verdict--pass::after { background: var(--pass); }
.verdict--pass .verdict__title { color: var(--pass); }
.verdict--watch { border-color: var(--watch-border); }
.verdict--watch::after { background: var(--watch); }
.verdict--watch .verdict__title { color: var(--watch); }
.verdict--fail {
  border-color: var(--fail-border);
  background: linear-gradient(180deg, var(--fail-bg), transparent 80%), var(--raised);
}
.verdict--fail::after { background: var(--fail); }
.verdict--fail .verdict__title { color: var(--fail); }

/* ============================================================
   Spectral overview chart - bars at top of results
   ============================================================ */
.spectrum {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 28px;
  background: var(--raised);
}
.spectrum__title {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 18px;
}
.spectrum__bars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  height: 140px;
  margin-bottom: 16px;
}
.spectrum__bar {
  position: relative;
  background: var(--border);
  border-radius: 4px 4px 0 0;
  height: 100%;
  overflow: hidden;
}
.spectrum__bar-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  transition: height 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  animation: barGrow 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes barGrow {
  from { height: 0 !important; }
}
.spectrum__bar-target {
  position: absolute;
  left: -2px;
  right: -2px;
  border-top: 1px dashed var(--text-3);
  pointer-events: none;
  z-index: 2;
}
.spectrum__bar-fill--pass { background: var(--pass); }
.spectrum__bar-fill--watch { background: var(--watch); }
.spectrum__bar-fill--fail { background: var(--fail); }
.spectrum__labels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-align: center;
  color: var(--text-3);
}
.spectrum__caption {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 14px;
  font-family: "DM Mono", monospace;
}

/* ============================================================
   Criterion rows
   ============================================================ */
.criteria {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--raised);
  overflow: hidden;
}
.criteria__section-head {
  padding: 14px 24px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-3);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-family: "DM Mono", monospace;
}
.criterion {
  display: grid;
  grid-template-columns: 88px 1fr 160px;
  gap: 24px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.criterion:last-child { border-bottom: none; }

.criterion__grade {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 6px 0;
  text-align: center;
  height: fit-content;
  border-radius: 6px;
}
.criterion__grade--pass { background: var(--pass-bg); color: var(--pass); border: 1px solid var(--pass-border); }
.criterion__grade--watch { background: var(--watch-bg); color: var(--watch); border: 1px solid var(--watch-border); }
.criterion__grade--fail { background: var(--fail-bg); color: var(--fail); border: 1px solid var(--fail-border); }

.criterion__body { min-width: 0; }
.criterion__headline {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.005em;
  margin-bottom: 6px;
}
.criterion__consequence { color: var(--text-2); font-size: 14px; margin-bottom: 6px; line-height: 1.5; }
.criterion__action { color: var(--accent); font-size: 14px; font-weight: 500; }
.criterion__action::before { content: "→ "; }
.criterion__numbers { font-size: 12px; margin-top: 12px; }
.criterion__numbers summary {
  cursor: pointer;
  color: var(--text-3);
  letter-spacing: 0.04em;
  list-style: none;
  user-select: none;
  font-family: "DM Mono", monospace;
}
.criterion__numbers summary::-webkit-details-marker { display: none; }
.criterion__numbers summary::before { content: "+ "; color: var(--text-3); }
.criterion__numbers[open] summary::before { content: "− "; color: var(--accent); }
.criterion__numbers pre {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  white-space: pre;
  overflow-x: auto;
}

/* Per-row visual zone bar */
.criterion__zone {
  position: relative;
  height: 28px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.criterion__zone-track {
  position: absolute;
  top: 50%;
  left: 8%;
  right: 8%;
  height: 4px;
  transform: translateY(-50%);
  background: linear-gradient(
    90deg,
    var(--fail) 0%,
    var(--watch) 30%,
    var(--pass) 50%,
    var(--watch) 70%,
    var(--fail) 100%
  );
  border-radius: 2px;
  opacity: 0.35;
}
.criterion__zone-marker {
  position: absolute;
  top: 4px; bottom: 4px;
  width: 3px;
  background: var(--text);
  border-radius: 1px;
  box-shadow: 0 0 0 2px var(--raised);
  transform: translateX(-50%);
}
.criterion__zone-marker--pass { background: var(--pass); box-shadow: 0 0 0 2px var(--raised), 0 0 8px var(--pass-border); }
.criterion__zone-marker--watch { background: var(--watch); box-shadow: 0 0 0 2px var(--raised), 0 0 8px var(--watch-border); }
.criterion__zone-marker--fail { background: var(--fail); box-shadow: 0 0 0 2px var(--raised), 0 0 8px var(--fail-border); }
.criterion__zone-label {
  position: absolute;
  bottom: 2px;
  right: 6px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  color: var(--text-3);
}

@media (max-width: 720px) {
  .criterion { grid-template-columns: 64px 1fr; gap: 14px; padding: 16px; }
  .criterion__zone { grid-column: 1 / -1; margin-top: 4px; }
}

/* ============================================================
   CTA
   ============================================================ */
.cta {
  margin-top: 36px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  background:
    linear-gradient(135deg, var(--accent-dim), transparent 60%),
    var(--raised);
  position: relative;
}
.cta__tag {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 14px;
}
.cta__head {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.cta__body {
  color: var(--text-2);
  font-size: 15px;
  max-width: 55ch;
  margin-bottom: 22px;
  line-height: 1.55;
}
.cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text);
  color: var(--bg) !important;
  text-decoration: none;
  padding: 13px 22px;
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid var(--text);
  transition: background 0.15s, color 0.15s, transform 0.05s;
}
.cta__btn:hover {
  background: #fff;
  color: var(--bg) !important;
}
.cta__btn:active { transform: translateY(1px); }
.cta__secondary {
  display: block;
  margin-top: 14px;
  color: var(--text-2);
  font-size: 14px;
}
.cta__secondary:hover { color: var(--accent); }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  margin-top: 96px;
  padding: 56px 0 40px;
  border-top: 1px solid var(--border);
}
.footer__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer__brand .logo { font-size: 14px; letter-spacing: 0.04em; }
.footer__links {
  display: flex;
  gap: 24px;
  font-size: 12px;
  color: var(--text-2);
}
.footer__links a:hover { color: var(--accent); }

@media (max-width: 600px) {
  .footer__row { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   noscript
   ============================================================ */
.noscript-warn {
  background: var(--fail);
  color: #fff;
  padding: 14px;
  text-align: center;
  font-size: 13px;
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero__line { clip-path: inset(0 0 0 0); opacity: 1; }
}
