:root {
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-soft: #eef2ff;
  --mint: #5eead4;
  --ink: #0b1220;
  --text: #1e293b;
  --muted: #64748b;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --ai: #dc2626;
  --ai-soft: #fef2f2;
  --maybe: #d97706;
  --maybe-soft: #fffbeb;
  --human: #059669;
  --human-soft: #ecfdf5;
  --unsure: #475569;
  --unsure-soft: #f1f5f9;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; padding-top: 32px; padding-bottom: 64px; }
h1, h2, h3 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 2rem; letter-spacing: -.02em; }
h2 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); }
a:hover { color: var(--brand-2); }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 920px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Header */
.site-header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; }
.brand b { color: var(--brand); font-weight: 700; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { padding: 6px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--ink); background: var(--bg); }
.nav a.is-active { color: var(--brand); background: var(--brand-soft); }
.header-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-right form { margin: 0; }
.lang-switch { font-size: .9rem; text-decoration: none; color: var(--muted); padding: 6px 8px; }
.credits { font-size: .9rem; font-weight: 600; text-decoration: none; color: var(--brand); background: var(--brand-soft); padding: 5px 12px; border-radius: 999px; white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, opacity .15s;
}
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.btn-primary:hover { color: #fff; opacity: .92; }
.btn-ghost { color: var(--ink); background: var(--card); border-color: var(--border); }
.btn-ghost:hover { color: var(--ink); border-color: #cbd5e1; background: var(--bg); }
.btn-lg { padding: 13px 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn.is-static { cursor: default; color: var(--muted); }

/* Hero */
.hero { text-align: center; padding: 24px 0 28px; }
.hero h1 { font-size: 2.4rem; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 640px; margin: 0 auto; }
.page-head { padding: 8px 0 20px; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.card.narrow { max-width: 440px; margin: 32px auto 0; }
.card.narrow h1 { font-size: 1.6rem; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: .95rem; border: 1px solid; }
.alert-error { color: #991b1b; background: var(--ai-soft); border-color: #fecaca; }
.alert-ok { color: #065f46; background: var(--human-soft); border-color: #a7f3d0; }
.alert-warn { color: #92400e; background: var(--maybe-soft); border-color: #fde68a; }

/* Detector form */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg); border-radius: 10px; margin-bottom: 16px; }
.tab { font: inherit; font-weight: 600; font-size: .9rem; padding: 7px 16px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.tab.is-active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 220px; padding: 24px; text-align: center; cursor: pointer;
  border: 2px dashed #cbd5e1; border-radius: var(--radius); background: var(--bg);
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone:focus-within { border-color: var(--brand); }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dz-title { font-weight: 600; color: var(--ink); }
.dz-hint { font-size: .875rem; color: var(--muted); }
.dz-name { font-size: .9rem; font-weight: 600; color: var(--brand); word-break: break-all; }
.preview { max-height: 180px; max-width: 100%; border-radius: 10px; margin-bottom: 6px; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=url], textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--card);
  padding: 11px 14px; border: 1px solid #cbd5e1; border-radius: 10px;
}
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .18); }
textarea { resize: vertical; min-height: 200px; line-height: 1.6; }
.code-input { font-size: 1.6rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.counter { font-size: .85rem; color: var(--muted); margin: -8px 0 16px; }
.cf-turnstile { margin: 16px 0; }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.quota { margin: 0; font-size: .9rem; color: var(--muted); }

/* Features + FAQ */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.feature h2 { font-size: 1.05rem; }
.feature p { margin: 0; font-size: .95rem; color: var(--muted); }
.faq { margin-top: 40px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 600; color: var(--ink); cursor: pointer; }
.faq details p { margin: 10px 0 0; color: var(--muted); }
ul.plain { padding-left: 20px; color: var(--muted); }
ul.plain li { margin-bottom: 6px; }

/* Result */
.verdict { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px; border-radius: var(--radius); border: 1px solid; margin-bottom: 24px; }
.verdict-kicker { margin: 0 0 4px; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.verdict-label { margin: 0 0 6px; font-size: 1.9rem; color: inherit; }
.verdict-sub { margin: 0; opacity: .9; }
.verdict-score { text-align: center; flex-shrink: 0; }
.verdict-score strong { display: block; font-size: 3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.verdict-score small { font-size: 1.4rem; }
.verdict-score span { font-size: .8rem; opacity: .8; }
.verdict-ai { color: #991b1b; background: var(--ai-soft); border-color: #fecaca; }
.verdict-possibly_ai { color: #92400e; background: var(--maybe-soft); border-color: #fde68a; }
.verdict-human { color: #065f46; background: var(--human-soft); border-color: #a7f3d0; }
.verdict-inconclusive { color: #334155; background: var(--unsure-soft); border-color: #cbd5e1; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 0 0 28px; }
.facts dt { font-size: .8rem; color: var(--muted); margin-bottom: 2px; }
.facts dd { margin: 0; font-weight: 600; color: var(--ink); word-break: break-word; }
.badge, .pill, .side { display: inline-block; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge-agree { color: #065f46; background: var(--human-soft); }
.badge-split { color: #92400e; background: var(--maybe-soft); }
.badge-single, .badge-none { color: var(--unsure); background: var(--unsure-soft); }
.pill-ai, .side-ai { color: #991b1b; background: var(--ai-soft); }
.pill-possibly_ai { color: #92400e; background: var(--maybe-soft); }
.pill-human, .side-human { color: #065f46; background: var(--human-soft); }
.pill-inconclusive, .side-none { color: var(--unsure); background: var(--unsure-soft); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { font-size: .8rem; font-weight: 600; color: var(--muted); padding-top: 8px; padding-bottom: 8px; }
tbody th { font-weight: 600; color: var(--ink); white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
th.num, td.num { text-align: right; color: var(--muted); font-size: .9rem; }
.engines td:nth-child(2) { width: 55%; }
.score-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.score-num { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.bar { display: block; width: 100%; height: 6px; }
.bar-bg { fill: var(--border); }
.bar-ai { fill: var(--ai); }
.bar-human { fill: var(--human); }
.evidence { margin: 8px 0 0; padding-left: 18px; font-size: .9rem; color: var(--muted); }
.result p.small { margin: 6px 0 0; }
.note { margin: 24px 0 0; padding: 14px 16px; background: var(--bg); border-radius: 10px; font-size: .9rem; color: var(--muted); }
.history a { font-weight: 600; text-decoration: none; word-break: break-all; }
.empty { margin: 0; text-align: center; color: var(--muted); padding: 24px 0; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8px; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.plan-popular { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow); }
.plan-tag { position: absolute; top: -11px; left: 20px; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan h2 { font-size: 1rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.price { font-size: 2rem; font-weight: 700; color: var(--ink); margin-bottom: 12px; letter-spacing: -.02em; }
.plan ul { list-style: none; padding: 0; margin: 0 0 20px; font-size: .9rem; color: var(--muted); flex: 1; }
.plan li { padding: 5px 0 5px 22px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--human); font-weight: 700; }
.plan form { margin: 0; }

/* Legal */
.prose h1 { font-size: 1.8rem; }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--card); padding: 28px 0; font-size: .9rem; color: var(--muted); }
.footer-inner { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer p { margin: 0; }

@media (max-width: 760px) {
  h1, .hero h1 { font-size: 1.7rem; }
  .card { padding: 20px; }
  .features { grid-template-columns: 1fr; }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .verdict { flex-direction: column; align-items: flex-start; }
  .verdict-score { text-align: left; }
  .nav { order: 3; flex-basis: 100%; }
  .engines td:nth-child(2) { width: auto; }
  .engines th.num, .engines td.num, .history th:last-child, .history td:last-child { display: none; }
}
@media (max-width: 460px) {
  .plans { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
