:root {
  color-scheme: dark;
  --ink: #f7f7f2;
  --muted: #a6a8a3;
  --line: #2b2d2b;
  --panel: #151615;
  --panel-2: #1b1d1b;
  --acid: #c7ff45;
  --acid-ink: #11150a;
  --danger: #ffb2a8;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #0b0c0b;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button, select, textarea, input { font: inherit; }

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw;
  border-bottom: 1px solid var(--line);
}

.brand { color: var(--ink); text-decoration: none; font-weight: 900; letter-spacing: -.04em; }
.brand span { color: var(--acid); padding: 0 .18em; }
.trust { color: var(--muted); font-size: .82rem; display: flex; align-items: center; gap: .55rem; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 5px #c7ff4517; }

main { width: min(1440px, 100%); margin: 0 auto; }
.hero { padding: clamp(34px, 5vw, 72px) 4vw 56px; }
.hero-copy { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 30px; margin-bottom: 32px; }
.eyebrow { color: var(--acid); letter-spacing: .16em; font-size: .7rem; font-weight: 800; margin: 0 0 10px; }
h1 { font-size: clamp(3.2rem, 8vw, 8.5rem); letter-spacing: -.075em; line-height: .82; margin: 0; }
.lede { color: #d5d7d2; font-size: clamp(1rem, 1.5vw, 1.35rem); max-width: 610px; margin: 0 0 .3rem; }

.tool-shell { min-height: 520px; border: 1px solid var(--line); background: var(--panel); display: grid; grid-template-columns: .95fr 1.05fr; }
.upload-panel, .results-panel { padding: clamp(18px, 3vw, 40px); min-width: 0; }
.upload-panel { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.dropzone { flex: 1; min-height: 310px; border: 1px dashed #51544f; background: #111211; cursor: pointer; display: grid; place-items: center; overflow: hidden; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.dragover { border-color: var(--acid); background: #151912; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-idle { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); padding: 24px; }
.upload-idle strong { color: var(--ink); font-size: 1.15rem; }
.upload-idle small { margin-top: 12px; }
.upload-icon { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid #50534e; border-radius: 50%; color: var(--acid); font-size: 1.7rem; margin-bottom: 10px; }
.preview-wrap { width: 100%; height: 100%; min-height: 310px; position: relative; }
.preview-wrap img { width: 100%; height: 100%; max-height: 410px; object-fit: contain; display: block; background: #090a09; }
.replace { position: absolute; right: 12px; bottom: 12px; background: #0b0c0be8; border: 1px solid #ffffff33; color: white; padding: 9px 13px; cursor: pointer; }

.controls { display: grid; grid-template-columns: auto minmax(170px, 1fr); gap: 18px; align-items: center; margin-top: 18px; }
.controls label { color: var(--muted); font-size: .84rem; }
select { width: 100%; background: var(--panel-2); color: var(--ink); border: 1px solid #3a3d39; padding: 12px 40px 12px 12px; }
.status-row { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: .78rem; margin-top: 14px; min-height: 1.3em; }
#progress { color: var(--acid); }

.results-panel { background: var(--panel-2); }
.empty-state { height: 100%; min-height: 440px; display: grid; place-content: center; justify-items: center; color: var(--muted); text-align: center; padding: 30px; }
.empty-state span { color: var(--acid); font-size: 5rem; font-weight: 900; letter-spacing: -.08em; opacity: .22; }
.empty-state p { max-width: 330px; }
.result-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 12px; }
.result-heading h2 { margin: 0; font-size: 1.3rem; }
.negative-heading { margin-top: 24px; align-items: center; }
.copy-button { border: 0; background: var(--acid); color: var(--acid-ink); font-weight: 800; padding: 10px 14px; cursor: pointer; white-space: nowrap; }
.copy-button.secondary { background: transparent; color: var(--ink); border: 1px solid #464944; }
textarea { width: 100%; min-height: 185px; resize: vertical; background: #0d0e0d; color: #eef1e9; border: 1px solid #343733; padding: 18px; line-height: 1.65; outline: none; }
textarea:focus { border-color: var(--acid); }
textarea.negative { min-height: 100px; color: #d4d7d1; }
.facts { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.facts span { color: var(--muted); border: 1px solid #393c38; padding: 6px 9px; font-size: .75rem; }

.details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); }
.details article { min-height: 250px; padding: 34px 28px; border-right: 1px solid var(--line); }
.details article:last-child { border-right: 0; }
.details .number { color: var(--acid); font: 800 .72rem ui-monospace, monospace; }
.details h2 { font-size: 1.1rem; margin: 62px 0 10px; }
.details p { color: var(--muted); font-size: .9rem; margin: 0; }
.details strong { color: var(--ink); }

.faq { padding: 80px 4vw 100px; max-width: 1000px; }
.faq > h2 { font-size: clamp(2.2rem, 4vw, 4.2rem); letter-spacing: -.055em; margin: 0 0 35px; }
details { border-top: 1px solid var(--line); padding: 20px 0; }
details:last-child { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 700; }
details p { color: var(--muted); max-width: 760px; margin: 14px 0 0; }

footer { border-top: 1px solid var(--line); padding: 26px 4vw; color: var(--muted); font-size: .78rem; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { color: var(--ink); font-weight: 800; }
.footer-nav { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.footer-nav a, .back-link, .contact-email { color: var(--ink); text-underline-offset: .22em; }
.footer-nav a:hover, .back-link:hover, .contact-email:hover { color: var(--acid); }
.page-main { min-height: calc(100vh - 139px); display: grid; place-items: center; padding: clamp(48px, 8vw, 120px) 4vw; }
.page-shell { width: min(900px, 100%); border: 1px solid var(--line); background: var(--panel); padding: clamp(28px, 6vw, 72px); }
.page-shell h1 { font-size: clamp(3.4rem, 9vw, 7.5rem); margin-bottom: 36px; }
.page-copy { color: #d5d7d2; font-size: clamp(1.05rem, 2vw, 1.4rem); line-height: 1.7; max-width: 740px; }
.page-copy + .page-copy { margin-top: 18px; }
.back-link { display: inline-block; margin-top: 42px; font-weight: 700; }
.contact-email { display: inline-block; font-size: clamp(1.05rem, 3vw, 1.8rem); font-weight: 800; overflow-wrap: anywhere; }
.error-code { color: var(--acid); font: 800 .78rem ui-monospace, monospace; letter-spacing: .15em; }

@media (max-width: 820px) {
  .hero-copy, .tool-shell { grid-template-columns: 1fr; }
  .hero-copy { align-items: start; gap: 22px; }
  .tool-shell { min-height: 0; }
  .upload-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .results-panel { min-height: 360px; }
  .empty-state { min-height: 300px; }
  .details { grid-template-columns: 1fr 1fr; }
  .details article:nth-child(2) { border-right: 0; }
  .details article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 520px) {
  .topbar { padding: 0 18px; }
  .trust { font-size: .7rem; }
  .hero { padding: 32px 16px 42px; }
  h1 { font-size: clamp(3.1rem, 18vw, 5rem); }
  .tool-shell { margin-left: -1px; margin-right: -1px; }
  .upload-panel, .results-panel { padding: 16px; }
  .dropzone, .preview-wrap { min-height: 250px; }
  .controls { grid-template-columns: 1fr; gap: 7px; }
  .result-heading { align-items: center; }
  .copy-button { padding: 9px 11px; font-size: .8rem; }
  textarea { min-height: 210px; }
  .details { grid-template-columns: 1fr; }
  .details article { border-right: 0; border-bottom: 1px solid var(--line); min-height: 210px; }
  .details article:nth-child(2) { border-right: 0; }
  .details h2 { margin-top: 40px; }
  .faq { padding: 60px 18px 76px; }
  footer { padding: 24px 18px; flex-direction: column; align-items: flex-start; }
  .footer-nav { justify-content: flex-start; }
  .page-main { padding: 34px 18px; }
  .page-shell { padding: 28px 22px; }
}

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