/* GPTGone — site styles */

/* Light theme values. The black theme below overrides the same tokens and
   is the default: it applies unless js/theme.js sets data-theme="light" on
   <html>, for a visitor who chose light (so without JavaScript it's black). */
:root {
  color-scheme: light;

  --bg: #f6f5f1;
  --bg-2: #eeece5;
  --surface: #ffffff;
  --surface-2: #fdfdfb;
  --ink: #1e1d1a;
  --ink-2: #45443f;
  --muted: #74726b;
  --line: #e4e1d8;
  --line-2: #d4d0c4;

  --brand: #4f46e5;
  --brand-ink: #3b33c9;
  --brand-soft: #e5e3fd;
  --brand-tint: #f3f2fe;

  --human: #16875a;
  --human-ink: #0f6b46;
  --human-soft: #d8f1e5;
  --mixed: #c48510;
  --mixed-ink: #8a5c06;
  --mixed-soft: #fbecc9;
  --ai: #dc4a2c;
  --ai-ink: #a3321a;
  --ai-soft: #fddcd3;
  --ai-tint: #fff0eb;

  /* Text on highlighted sentences, and the chart's shaded areas */
  --s-ai-ink: #4a1a0e;
  --s-maybe-ink: #4a3205;
  --human-fill: rgba(22, 135, 90, 0.1);
  --human-err: rgba(22, 135, 90, 0.35);
  --ai-fill: rgba(220, 74, 44, 0.1);
  --ai-err: rgba(220, 74, 44, 0.35);

  /* Primary buttons, and the dark bands (privacy section, closing call to action) */
  --btn-bg: #23221e;
  --btn-ink: #ffffff;
  --btn-hover: #000000;
  --band: #23221e;
  --band-2: #2b2a25;
  --band-line: #3a3933;

  --header-bg: rgba(246, 245, 241, 0.86);
  --glow: rgba(79, 70, 229, 0.1);
  --feature-line: #e3e3ef;
  --feature-top: #eceef8;
  --feature-bottom: #f6f6fb;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(30, 28, 20, 0.05), 0 12px 32px -16px rgba(30, 28, 20, 0.2);
  --shadow-lg: 0 2px 4px rgba(30, 28, 20, 0.04), 0 28px 64px -24px rgba(30, 28, 20, 0.3);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --container: 1200px;
  --header-h: 68px;
}

/* Black theme: true black page, cards lifted just enough to read as layers,
   and lighter accent colours so they keep their contrast on black. */
:root:not([data-theme="light"]) {
  color-scheme: dark;

  --bg: #000000;
  --bg-2: #171717;
  --surface: #0d0d0d;
  --surface-2: #111111;
  --ink: #f4f3ef;
  --ink-2: #d2d0c9;
  --muted: #9d9b93;
  --line: #232323;
  --line-2: #373737;

  --brand: #8f88ff;
  --brand-ink: #b0abff;
  --brand-soft: #25224f;
  --brand-tint: #110f2b;

  --human: #3fcf8e;
  --human-ink: #6ee0aa;
  --human-soft: #0f2c1f;
  --mixed: #f2b23e;
  --mixed-ink: #f7c96b;
  --mixed-soft: #3d2d0c;
  --ai: #ff6b4d;
  --ai-ink: #ff9a82;
  --ai-soft: #4a1d13;
  --ai-tint: #1d0d08;

  --s-ai-ink: #ffe3dc;
  --s-maybe-ink: #fdecc4;
  --human-fill: rgba(63, 207, 142, 0.12);
  --human-err: rgba(63, 207, 142, 0.38);
  --ai-fill: rgba(255, 107, 77, 0.12);
  --ai-err: rgba(255, 107, 77, 0.38);

  --btn-bg: #f4f3ef;
  --btn-ink: #000000;
  --btn-hover: #ffffff;
  --band: #0b0b0b;
  --band-2: #141414;
  --band-line: #262626;

  --header-bg: rgba(0, 0, 0, 0.8);
  --glow: rgba(143, 136, 255, 0.14);
  --feature-line: #24242e;
  --feature-top: #111118;
  --feature-bottom: #0a0a0c;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 12px 32px -16px rgba(0, 0, 0, 0.9);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.5), 0 28px 64px -24px rgba(0, 0, 0, 0.95);
}

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

/* Set for one frame while the theme switches, so every colour changes at once. */
.no-transitions *,
.no-transitions *::before,
.no-transitions *::after { transition: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }

.icon {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.center { text-align: center; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--btn-bg); color: var(--btn-ink); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-dark { background: var(--btn-bg); color: var(--btn-ink); }
.btn-dark:hover { background: var(--btn-hover); }
/* Sits on the dark call-to-action band in both themes */
.btn-light { background: #fff; color: #1e1d1a; }
.btn-light:hover { background: #f3f2fe; }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn .icon { transition: transform .15s; }
.btn:hover .icon { transform: translateX(2px); }

.btn-text {
  display: inline-flex; align-items: center;
  padding: 8px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--ink-2);
}
.btn-text:hover { background: var(--bg-2); color: var(--ink); }

.text-link { color: var(--brand-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Announcement ---------- */

.announce { background: var(--brand-tint); border-bottom: 1px solid var(--brand-soft); color: var(--brand-ink); font-size: 14.5px; }
.announce-inner { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding-top: 8px; padding-bottom: 8px; text-align: center; }
.announce a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.announce-icon { color: var(--brand); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(30, 28, 20, .35); }

.nav { display: flex; align-items: center; gap: 10px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; margin-right: 18px; }
.logo { display: block; width: auto; height: 28px; }
.logo-dark,
:root:not([data-theme="light"]) .logo-light { display: none; }
:root:not([data-theme="light"]) .logo-dark { display: block; }

.nav-panel { display: flex; align-items: center; justify-content: space-between; flex: 1; gap: 16px; }
.nav-main { display: flex; align-items: center; gap: 2px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px; border: 0; border-radius: 8px; background: none;
  font-size: 14.5px; font-weight: 500; color: var(--ink-2);
}
.nav-link:hover { background: var(--bg-2); color: var(--ink); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.nav-toggle,
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 42px; height: 42px; padding: 0;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink);
  transition: border-color .15s, background-color .15s;
}
.nav-toggle:hover,
.theme-toggle:hover { border-color: var(--ink-2); }

.nav-toggle { display: none; }
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: inline-block; }

/* Moon while light (press for black), sun while black. Hidden without
   JavaScript, since the button can't do anything then. */
.theme-toggle { width: 38px; height: 38px; }
.theme-toggle .icon { width: 19px; height: 19px; }
.theme-toggle .icon-sun,
:root:not([data-theme="light"]) .theme-toggle .icon-moon,
:root:not([data-theme]) .theme-toggle { display: none; }
:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: inline-block; }

/* ---------- Hero ---------- */

/* clip, not hidden: a hidden box can still be scrolled sideways by scrollIntoView */
.hero { padding: 64px 0 72px; position: relative; overflow: hidden; overflow: clip; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: start; }

.hero h1 {
  font-size: clamp(38px, 5.2vw, 60px);
  line-height: 1.05; letter-spacing: -0.04em; font-weight: 600;
  margin-bottom: 22px; padding-top: 8px;
}
.hl {
  background: var(--brand-soft); color: var(--brand-ink);
  padding: 0 0.1em; border-radius: 6px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.lead { font-size: 18.5px; line-height: 1.6; color: var(--muted); max-width: 32em; }

.stats { display: flex; margin: 36px 0 30px; }
.stats > div { padding: 0 28px; border-left: 1px solid var(--line-2); }
.stats > div:first-child { padding-left: 0; border-left: 0; }
.stats dt { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }
.stats dd { margin: 0; font-size: 14px; color: var(--muted); }

.hero-points { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.hero-points li { display: flex; align-items: center; gap: 12px; font-size: 15.5px; font-weight: 500; color: var(--ink-2); }
.tick {
  display: grid; place-items: center; flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--human-soft); color: var(--human-ink);
}
.tick .icon { width: 14px; height: 14px; stroke-width: 2.6; }

/* ---------- Detector card ---------- */

.detector-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden;
}

.tabs { display: flex; gap: 4px; padding: 8px 14px 0; border-bottom: 1px solid var(--line); }
.tabs [role="tab"] {
  padding: 12px 12px; border: 0; background: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-size: 14.5px; font-weight: 600; color: var(--muted);
}
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }

.input-wrap { position: relative; }
.input-wrap textarea {
  display: block; width: 100%; height: 290px; min-height: 180px; resize: vertical;
  padding: 20px 22px; border: 0; outline: none; background: transparent;
  font: inherit; font-size: 15.5px; line-height: 1.65; color: var(--ink);
}
.input-wrap.dragging { background: var(--brand-tint); box-shadow: inset 0 0 0 2px var(--brand); }
.input-empty {
  position: absolute; top: 20px; left: 22px; right: 22px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  color: var(--muted); font-size: 15.5px; pointer-events: none;
}
.input-wrap.has-text .input-empty { display: none; }
.upload-btn {
  pointer-events: auto; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--ink); background: var(--surface);
}
.upload-btn:hover { border-color: var(--ink-2); }
.input-hint { flex-basis: 100%; font-size: 13px; }
.input-empty input:focus-visible + .upload-btn,
.upload-btn:focus-within { outline: 2px solid var(--brand); }

.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 22px 16px; font-size: 13.5px; color: var(--muted); }
.chip {
  padding: 5px 10px; border: 0; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--ink-2); background: var(--bg-2);
  transition: filter .15s, transform .15s;
}
.chip:hover { filter: brightness(0.95); }
:root:not([data-theme="light"]) .chip:hover { filter: brightness(1.35); }
.chip-ai { background: var(--ai-tint); color: var(--ai-ink); }
.chip-human { background: var(--human-soft); color: var(--human-ink); }
.chip-mixed { background: var(--brand-tint); color: var(--brand-ink); }

.form-msg { padding: 0 22px 12px; font-size: 13.5px; color: var(--ai-ink); }
.form-msg:empty { display: none; }
.form-msg.is-status { color: var(--muted); }

.detector-foot { display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 22px; border-top: 1px solid var(--line); }
.count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.count.near { color: var(--ai-ink); }
#scan { margin-left: auto; min-width: 112px; }
#scan.busy { pointer-events: none; opacity: .85; }
#scan.busy .icon { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.privacy-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--muted); }

.model-status {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 10px;
  min-height: 22px; margin-top: 16px; font-size: 13px; color: var(--muted); text-align: center;
}
.model-status:empty { display: none; }
.model-status[data-state="ready"] .icon { color: var(--human); }
.model-status[data-state="loading"] { color: var(--ink-2); }
.ms-body { display: contents; }
.ms-bar { position: relative; width: 120px; height: 6px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.ms-bar span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--brand); transition: width .2s; }
.ms-skip {
  padding: 2px 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface);
  font-size: 12.5px; font-weight: 600; color: var(--ink);
}
.ms-skip:hover { border-color: var(--ink-2); }

/* ---------- Results ---------- */

.results { padding: 8px 0 72px; scroll-margin-top: calc(var(--header-h) + 8px); }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.results-head h2 { font-size: 26px; letter-spacing: -0.02em; font-weight: 600; }
.results-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.card-sub { font-size: 15px; font-weight: 600; margin: 28px 0 4px; }

.verdict-tag {
  display: inline-block; margin-top: 14px; padding: 4px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
}
.verdict--ai .verdict-tag { background: var(--ai-soft); color: var(--ai-ink); }
.verdict--mixed .verdict-tag { background: var(--mixed-soft); color: var(--mixed-ink); }
.verdict--human .verdict-tag { background: var(--human-soft); color: var(--human-ink); }
.verdict h3 { font-size: 26px; line-height: 1.2; letter-spacing: -0.025em; font-weight: 600; margin: 12px 0 8px; }
.confidence { color: var(--muted); font-size: 15px; }

.prob-bar { display: flex; height: 12px; margin: 22px 0 12px; border-radius: 999px; overflow: hidden; background: var(--bg-2); gap: 2px; }
.seg { display: block; height: 100%; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.seg-ai { background: var(--ai); }
.seg-mixed { background: var(--mixed); }
.seg-human { background: var(--human); }
.prob-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 0; margin: 0; list-style: none; font-size: 14px; color: var(--ink-2); }
.prob-legend li { display: inline-flex; align-items: center; gap: 7px; }
.prob-legend strong { color: var(--ink); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-ai { background: var(--ai); }
.dot-mixed { background: var(--mixed); }
.dot-human { background: var(--human); }

.signal-list { list-style: none; padding: 0; margin: 0; }
.signal-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.signal-list li:last-child { border-bottom: 0; }
.signal-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.signal-name { font-weight: 600; font-size: 14.5px; }
.signal-list p { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.lean { padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.lean-ai { background: var(--ai-soft); color: var(--ai-ink); }
.lean-human { background: var(--human-soft); color: var(--human-ink); }
.lean-neutral { background: var(--bg-2); color: var(--muted); }
.meter {
  position: relative; height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--human-soft), var(--bg-2) 50%, var(--ai-soft));
}
.meter::after { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line-2); }
.meter-dot {
  position: absolute; top: 50%; z-index: 1; width: 14px; height: 14px; border-radius: 50%;
  transform: translate(-50%, -50%); border: 2px solid var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.meter-dot--ai { background: var(--ai); }
.meter-dot--human { background: var(--human); }
.meter-dot--neutral { background: var(--muted); }

.disclaimer { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--bg); font-size: 13px; color: var(--muted); }

.ai-share { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.ai-share strong { font-size: 40px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.ai-share span { font-size: 14.5px; color: var(--ink-2); }
.verdict--ai .ai-share strong { color: var(--ai-ink); }
.verdict--mixed .ai-share strong { color: var(--mixed-ink); }
.verdict--human .ai-share strong { color: var(--human-ink); }

.notes { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; }
.note .icon { margin-top: 1px; }
.note-warn { background: var(--ai-tint); color: var(--ai-ink); border: 1px solid var(--ai-soft); }
.note-info { background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }

.engine { display: flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.engine .icon { color: var(--brand); }

.hl-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.hl-head .card-sub { margin: 0; }
.hl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; padding: 0; margin: 0; font-size: 12.5px; color: var(--muted); }
.hl-legend li { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.key-ai { background: var(--ai-soft); }
.key-maybe { background: var(--mixed-soft); }
.key-human { background: var(--surface); border: 1px solid var(--line-2); }
.hl-summary { margin: 6px 0 16px; font-size: 14px; color: var(--muted); }
.hl-text {
  max-height: 640px; overflow: auto;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
  font-size: 16px; line-height: 1.9; color: var(--ink-2);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.s-ai, .s-maybe { border-radius: 4px; padding: 2px 1px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.s-ai { background: var(--ai-soft); color: var(--s-ai-ink); }
.s-maybe { background: var(--mixed-soft); color: var(--s-maybe-ink); }

.phrase-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 10px 0 0; }
.phrase-chips li { padding: 4px 11px; border-radius: 999px; background: var(--ai-tint); border: 1px solid var(--ai-soft); color: var(--ai-ink); font-size: 13px; }

/* Writing stats */
.ease-score { display: flex; align-items: baseline; gap: 6px; margin-top: 14px; }
.ease-score strong { font-size: 56px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.ease-score span { color: var(--muted); }
.ease-card h3 { font-size: 24px; letter-spacing: -0.02em; font-weight: 600; margin: 14px 0 8px; }
.ease-bar {
  position: relative; height: 10px; margin: 24px 0 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--ai), var(--mixed) 45%, var(--human));
}
.ease-bar span {
  position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--ink); transform: translate(-50%, -50%);
}
.ease-scale { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat-tile { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.stat-tile span { display: block; font-size: 13px; color: var(--muted); }
.stat-tile b { display: block; margin-top: 4px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }

/* ---------- Tool strip ---------- */

.toolstrip { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.toolstrip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tool-tile {
  display: flex; align-items: flex-start; gap: 12px; padding: 24px 22px;
  font-size: 14.5px; color: var(--muted); border-left: 1px solid var(--line);
  transition: background-color .15s;
}
.tool-tile:first-child { border-left: 0; }
.tool-tile:hover { background: var(--bg); }
.tool-tile .icon { width: 22px; height: 22px; color: var(--brand); margin-top: 1px; }
.tool-tile strong { color: var(--ink); font-weight: 600; }

/* ---------- Sections ---------- */

.section { padding: 104px 0; }
.section-tight { padding: 72px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: clamp(30px, 3.8vw, 46px); line-height: 1.1; letter-spacing: -0.035em; font-weight: 600; }
.section-sub { margin-top: 16px; font-size: 17.5px; color: var(--muted); max-width: 38em; }
.center .section-sub, .section-sub.center { margin-left: auto; margin-right: auto; }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: 1040px; margin: 56px auto 0; }
.feature {
  display: flex; flex-direction: column; gap: 12px; min-height: 236px; padding: 28px;
  border: 1px solid var(--feature-line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--feature-top) 0%, var(--feature-bottom) 100%);
  transition: transform .2s, box-shadow .2s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature h3 { display: flex; justify-content: space-between; gap: 16px; font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -0.015em; }
.feature h3 .icon { width: 24px; height: 24px; color: var(--ink-2); }
.feature p { flex: 1; font-size: 14.5px; color: var(--muted); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; }
.link-arrow .icon { transition: transform .15s; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* How it works */
.how-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 36px; }
.how-head p { max-width: 380px; color: var(--muted); font-size: 15px; }
.how-card {
  display: grid; grid-template-columns: 340px minmax(0, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow); overflow: hidden;
}
.how-steps { list-style: none; margin: 0; padding: 12px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.how-step {
  display: block; width: 100%; text-align: left; padding: 16px 18px;
  border: 1px solid transparent; border-radius: 14px; background: none;
  transition: background-color .15s, border-color .15s;
}
.how-step:hover { background: var(--bg); }
.how-step[aria-pressed="true"] { background: var(--bg); border-color: var(--line); }
.how-step small { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.how-step strong { display: block; margin: 4px 0 6px; font-size: 17px; font-weight: 600; }
.how-step span { display: block; font-size: 14px; color: var(--muted); }
.how-step[aria-pressed="false"] span { opacity: .75; }

.how-viz { padding: 28px 32px; display: flex; flex-direction: column; }
.viz-legend { display: flex; gap: 18px; list-style: none; padding: 0; margin: 0 0 8px; font-size: 13px; color: var(--ink-2); }
.viz-legend li { display: inline-flex; align-items: center; gap: 7px; }
#dist-chart { width: 100%; height: auto; overflow: visible; }
#dist-chart .axis { stroke: var(--line-2); stroke-width: 1.5; }
#dist-chart .axis-label { font-size: 12px; fill: var(--muted); font-family: var(--font); }
#dist-chart .curve { stroke-width: 2; transition: opacity .5s; }
#dist-chart .curve-human { fill: var(--human-fill); stroke: var(--human); }
#dist-chart .curve-ai { fill: var(--ai-fill); stroke: var(--ai); }
#dist-chart .err { transition: opacity .5s; }
#dist-chart .err-human { fill: var(--human-err); }
#dist-chart .err-ai { fill: var(--ai-err); }
#dist-chart .pt { transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
#dist-chart .pt-human { fill: var(--human); }
#dist-chart .pt-ai { fill: var(--ai); }
#dist-chart .threshold { transition: opacity .5s; }
#dist-chart .threshold line { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 5 4; }
#dist-chart .threshold rect { fill: var(--ink); }
#dist-chart .threshold text { fill: var(--surface); font-size: 11.5px; font-weight: 600; font-family: var(--font); }
#dist-chart .legend text { font-size: 12px; fill: var(--ink-2); font-family: var(--font); }
#dist-chart[data-step="1"] .curve,
#dist-chart[data-step="1"] .err,
#dist-chart[data-step="1"] .threshold,
#dist-chart[data-step="2"] .err,
#dist-chart[data-step="2"] .threshold { opacity: 0; }
#dist-chart[data-step="2"] .pt,
#dist-chart[data-step="3"] .pt { opacity: .55; }

.how-controls { display: flex; align-items: center; gap: 16px; margin-top: 18px; font-size: 14px; font-weight: 600; }
.how-controls input { flex: 1; accent-color: var(--ink); }
.how-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; }
.how-stats > div { padding: 14px 16px; border-radius: 12px; background: var(--bg); }
.how-stats dt { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.how-stats dd { margin: 0; font-size: 12.5px; color: var(--muted); }
.viz-note { margin-top: 12px; font-size: 12.5px; color: var(--muted); }

/* Free */
.free-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 64px; align-items: center; }
.free-copy .section-title { margin-top: 12px; }
.free-copy .section-sub { margin-bottom: 32px; }
.free-card { padding: 32px; border: 1px solid var(--line); border-radius: 22px; background: var(--bg); }
.free-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.free-price strong { font-size: 46px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; }
.free-price span { color: var(--muted); font-size: 15px; }
.free-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; list-style: none; padding: 0; margin: 22px 0 0; }
.free-list li { display: flex; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.free-list .icon { color: var(--human); margin-top: 2px; }

/* Use cases */
.usecase-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 56px; }
.usecase { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.uc-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-tint); color: var(--brand); }
.uc-icon .icon { width: 22px; height: 22px; }
.usecase h3 { margin: 18px 0 8px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.usecase p { font-size: 14.5px; color: var(--muted); }

/* Privacy (a dark band in both themes) */
.privacy { background: var(--band); color: #f1efe8; }
:root:not([data-theme="light"]) .privacy { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.privacy-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.privacy-head p { max-width: 420px; color: #b9b6ac; font-size: 16px; }
.privacy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 48px; }
.privacy-item { padding: 28px; border: 1px solid var(--band-line); border-radius: var(--radius); background: var(--band-2); }
.privacy-item .icon { width: 28px; height: 28px; color: #a5a0ff; }
.privacy-item h3 { margin: 18px 0 8px; font-size: 18px; font-weight: 600; }
.privacy-item p { color: #b9b6ac; font-size: 14.5px; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 64px; align-items: start; }
.faq-intro p { margin-top: 16px; color: var(--muted); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .icon { color: var(--muted); transition: transform .2s; }
.faq-list details[open] summary .icon { transform: rotate(45deg); }
.faq-list details p { padding: 0 36px 24px 0; color: var(--ink-2); }

/* CTA */
.cta-band {
  padding: 64px 32px; border-radius: 28px; text-align: center; color: #fff;
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(165, 160, 255, .35), transparent 60%),
    radial-gradient(500px 300px at 90% 100%, rgba(220, 74, 44, .25), transparent 60%),
    var(--band);
}
:root:not([data-theme="light"]) .cta-band { border: 1px solid var(--line); }
.cta-band h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -0.035em; font-weight: 600; line-height: 1.15; }
.cta-band p { margin: 14px auto 28px; color: #cfccc2; font-size: 17px; max-width: 32em; }

/* ---------- Accuracy report page ---------- */

.report-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.report { max-width: 1000px; padding-top: 48px; padding-bottom: 88px; }
.report h1 { font-size: clamp(32px, 4.6vw, 50px); line-height: 1.08; letter-spacing: -0.04em; font-weight: 600; margin: 10px 0 14px; }
.report h2 { font-size: 22px; line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; margin: 52px 0 10px; }
.report > p { color: var(--ink-2); margin: 10px 0; max-width: 74ch; }
.report > p.lead { color: var(--muted); }
.report ul { color: var(--ink-2); padding-left: 20px; max-width: 74ch; }
.report li { margin: 6px 0; }
.report code { font-size: 0.92em; padding: 1px 5px; border-radius: 5px; background: var(--bg-2); }
.report-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 30px 0 4px; }
.report-kpis div { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.report-kpis b { display: block; font-size: 30px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.report-kpis span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.report-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.report-table th, .report-table td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.report-table th { font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--bg); }
.report-table td:first-child { font-weight: 500; }
.report-table tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 700px) {
  .report { padding-top: 32px; }
  .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-actions .btn-text { display: none; }
}
/* The smallest phones: logo and theme button only (the logo links home) */
@media (max-width: 359px) {
  .report-actions .btn { display: none; }
}

/* ---------- Footer ---------- */

.site-footer { padding: 64px 0 32px; background: var(--surface); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand p { margin-top: 12px; color: var(--muted); font-size: 14.5px; max-width: 280px; }
.site-footer h3 { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14.5px; }
.site-footer ul a:hover { color: var(--brand-ink); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .lead { max-width: none; }
}

@media (max-width: 900px) {
  /* Phone and tablet header: logo, then the theme button and menu button on the right */
  .nav-toggle { display: inline-flex; order: 2; }
  .theme-toggle { width: 42px; height: 42px; margin-left: auto; }
  .nav-panel {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 8px;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    padding: 12px 16px 20px; background: var(--bg);
    border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px -20px rgba(0, 0, 0, .25);
  }
  .nav-panel.open { display: flex; }
  .nav-main { flex-direction: column; align-items: stretch; }
  .nav-link { width: 100%; padding: 12px; font-size: 16px; }
  .nav-actions { flex-direction: column; align-items: stretch; padding-top: 12px; border-top: 1px solid var(--line); }
  .nav-actions .btn { height: 44px; font-size: 15px; }

  .results-grid { grid-template-columns: 1fr; }
  .toolstrip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-tile:nth-child(3) { border-left: 0; }
  .tool-tile:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .feature-grid, .usecase-grid, .privacy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-head, .privacy-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .how-card { grid-template-columns: 1fr; }
  .how-steps { border-right: 0; border-bottom: 1px solid var(--line); }
  .free-wrap { grid-template-columns: 1fr; gap: 36px; }
  .faq-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .section { padding: 80px 0; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .brand { margin-right: 0; }
  .announce { font-size: 13.5px; }
  .announce-icon { display: none; }
  .hero { padding: 40px 0 56px; }
  .stats > div { padding: 0 16px; }
  .stats dt { font-size: 24px; }
  .hero-points li { font-size: 15px; }
  .input-wrap textarea { height: 240px; padding: 16px; }
  .input-empty { top: 16px; left: 16px; right: 16px; }
  .examples { padding: 4px 16px 14px; }
  .form-msg { padding: 0 16px 12px; }
  .detector-foot { padding: 12px 12px 12px 16px; gap: 8px; }
  .card { padding: 20px; }
  .toolstrip-grid { grid-template-columns: 1fr; }
  .tool-tile { border-left: 0; padding: 18px 16px; }
  .tool-tile:nth-child(n + 2) { border-top: 1px solid var(--line); }
  .feature-grid, .usecase-grid, .privacy-grid { grid-template-columns: 1fr; }
  .feature { min-height: 0; }
  .how-viz { padding: 20px 16px; }
  .how-stats dt { font-size: 19px; }
  .free-card { padding: 24px 20px; }
  .free-price strong { font-size: 40px; }
  .free-list { grid-template-columns: 1fr; gap: 12px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-band { padding: 48px 20px; }
  .section { padding: 64px 0; }
  .section-tight { padding: 48px 0; }
}

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