/* Deepfake Check. Original direction B with v2's colour meanings; the system is docs/DESIGN.md. */
:root {
  --bg: #0b0f14; --panel: #121820; --panel2: #161e28; --line: #232d3a;
  --text: #e7ecf2; --muted: #8a96a6;
  --accent: #5eead4;            /* brand, actions, focus, the lip-sync check */
  --face: #a9c4ff;              /* the face check, mouth opening */
  --sound: #f2b544;             /* the voice check, loudness */
  --alert: #f87171;             /* fakes and shortcuts only */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text);
  background: var(--bg);
  font: 16px/1.55 Geist, system-ui, sans-serif;
}
a { color: var(--accent); }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }
.small { font-size: 13px; color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #04211d; padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* nav */
.nav { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; position: relative; }
.brand { font-weight: 600; color: var(--text); text-decoration: none; }
.nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.nav ul a { color: var(--muted); text-decoration: none; }
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--text); }
.menu { display: none; font: inherit; font-size: 14px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; cursor: pointer; }

/* buttons, pill */
.btn { display: inline-block; padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; font-size: 15px; border: 0; cursor: pointer; font-family: inherit; }
.btn.primary { background: var(--accent); color: #04211d; }
.btn.ghost { border: 1px solid var(--line); color: var(--text); background: transparent; }

/* hero */
.hero { padding: 56px 0 40px; text-align: center; }
h1 { font-weight: 700; font-size: clamp(38px, 5vw, 60px); line-height: 1.08; letter-spacing: -.02em; margin: 0 auto 16px; max-width: 18ch; }
.h1-sm { font-size: clamp(36px, 4.6vw, 56px); margin: 24px 0 14px; max-width: none; }
.lede { color: var(--muted); font-size: 19px; max-width: 58ch; margin: 0 auto; }
.page-head { padding: 40px 0 16px; }
.page-head .lede { margin: 0; }
.links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; }

/* sections */
.block { padding: 56px 0; border-top: 1px solid var(--line); }
.hero + .block { border-top: 0; }
h2 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.12; letter-spacing: -.02em; font-weight: 700; margin: 0 0 12px; }
.h2-sub { margin-top: 40px; }
.h3, h3 { font-size: 18px; margin: 0 0 6px; }
.intro { color: var(--muted); max-width: 64ch; margin: 0 0 28px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin: 0; }
.lbl { font-size: 14px; color: var(--muted); }
.narrow { max-width: 640px; }

/* detector */
.detector { max-width: 760px; margin: 36px auto 0; text-align: left; }
.drop { display: grid; gap: 6px; justify-items: center; text-align: center; border: 1px dashed #33414f; border-radius: 14px; padding: 34px 22px; color: var(--muted); background: #0e141bcc; cursor: pointer; transition: border-color .15s, background .15s; }
.drop strong { color: var(--text); font-size: 17px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: -3px; }  /* inside the box, so a phone-width edge never clips it */
.drop.over { border-color: var(--accent); background: #0f1d1f; }
.status { min-height: 1.6em; margin: 12px 2px; font-size: 14px; color: var(--muted); }
.result { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.outcome { font: 600 22px/1.2 Geist, system-ui, sans-serif; margin: 0 0 6px; }
.outcome.signs { color: var(--alert); }
.outcome.none { color: var(--text); }
.outcome.unsure, .outcome.cant, .outcome.pending { color: var(--muted); }
.result.none { box-shadow: inset 0 0 0 1px var(--accent); }
.result p { color: var(--muted); margin: 6px 0 0; }
.crow { border-bottom: 1px solid var(--line); font-size: 14px; }
.cline { display: grid; grid-template-columns: 90px 1fr 104px 14px; gap: 12px; align-items: center; padding: 10px 0; cursor: pointer; list-style: none; }
.cline::-webkit-details-marker { display: none; }
.cline::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); justify-self: center; transition: transform .15s; }
.crow[open] .cline::after { transform: rotate(225deg); }
.cline:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.cbody { padding: 0 0 12px; color: var(--muted); display: grid; gap: 4px; }
.cbody p { margin: 0; }
.cbody .strong { color: var(--alert); font-weight: 700; }
.crow.file .cname { color: var(--text); }
.cfile { color: var(--muted); }
.crow.file.raised .cfile { color: var(--alert); font-weight: 700; }
.checkhead { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; font-size: 14px; font-weight: 600; }
.tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-left: 6px; padding: 0; border: 1px solid var(--muted); border-radius: 50%; background: transparent; color: var(--muted); font: 600 11px/1 inherit; cursor: help; vertical-align: middle; }
.tip:hover, .tip:focus-visible { color: var(--text); border-color: var(--text); outline: none; }
.tip .bubble { display: none; position: absolute; z-index: 20; top: 24px; left: 50%; transform: translateX(-50%); width: min(280px, 80vw); padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); color: var(--text); font-size: 13px; font-weight: 400; line-height: 1.45; text-align: left; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.tip:hover .bubble, .tip:focus .bubble { display: block; }
.readrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.heattools { display: flex; align-items: center; gap: 4px; }
.crow:last-of-type { border-bottom: 0; }
.crow .cname { font-weight: 600; }
.crow.face .cname, .crow.gen .cname { color: var(--face); } .crow.voice .cname { color: var(--sound); } .crow.sync .cname { color: var(--accent); }
.crow .ctrack { height: 8px; background: #0e141b; border-radius: 4px; overflow: hidden; }
.crow .ctrack i { display: block; height: 100%; background: var(--muted); }
.crow.raised .ctrack i { background: var(--alert); }
.crow .cval { text-align: right; color: var(--muted); white-space: nowrap; }
.checks { margin-top: 14px; }
.sure { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.where { font-size: 14px; color: var(--muted, inherit); }
.filecheck { font-weight: 600; }

/* check page */
.check-layout { max-width: 880px; padding-bottom: 56px; }
.check-layout .detector { margin: 8px 0 0; max-width: none; }
.answers dt { font-weight: 600; margin-top: 12px; }
.answers dt:first-child { margin-top: 0; }
.answers dd { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.answers .ans-signs { color: var(--alert); }
.answers.wide { max-width: 70ch; }
.answers.wide dd { font-size: 16px; }

/* three checks */
.checks3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.check3 { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--panel); }
.check3 p { margin: 0; color: var(--muted); font-size: 15px; }
.check3.face h3 { color: var(--face); } .check3.voice h3 { color: var(--sound); } .check3.sync h3 { color: var(--accent); }

/* bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.b { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.big { grid-column: span 3; grid-row: span 2; } .mid { grid-column: span 3; } .sm { grid-column: span 2; }
.stat { font-weight: 600; font-size: 40px; line-height: 1.1; margin: 8px 0 6px; }
.sm .stat { font-size: 30px; }
.stat.bad { color: var(--alert); } .stat.ok { color: var(--accent); } .stat.warn { color: var(--sound); }
.b p { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.bars { margin-top: 22px; }
.bar { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 14px; }
.bar-name { width: 92px; flex: none; }
.bar .track { flex: 1; height: 8px; background: #0e141b; border-radius: 4px; overflow: hidden; }
.bar .track i { display: block; height: 100%; background: var(--alert); }

/* dumbbell */
.dumbbell { display: grid; gap: 18px; margin-top: 18px; }
.db-row, .db-axis { display: grid; grid-template-columns: 120px 1fr 130px; gap: 16px; align-items: center; }
.db-name { font-weight: 600; }
.db-track { position: relative; height: 24px; }
.db-track::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: var(--line); }
.db-seg { position: absolute; top: 10px; height: 4px; background: linear-gradient(90deg, var(--face), var(--alert)); opacity: .35; border-radius: 2px; }
.db-dot { position: absolute; top: 4px; width: 16px; height: 16px; border-radius: 50%; transform: translateX(-50%); }
.db-dot.raw { background: var(--alert); } .db-dot.clean { background: var(--face); }
.db-vals { text-align: right; color: var(--muted); font-size: 14px; }
.db-ticks { display: flex; justify-content: space-between; }
.key { display: inline-flex; gap: 18px; flex-wrap: wrap; }
.k::before { content: ""; display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; background: currentColor; }
.k.raw { color: var(--alert); } .k.clean { color: var(--face); }
.k.sound { color: var(--sound); } .k.face { color: var(--face); }
.key .k { font-size: 14px; }

/* trace */
.scope svg { display: block; width: 100%; height: auto; }
.legend { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.toggle { display: inline-flex; background: var(--bg); border-radius: 8px; padding: 3px; }
.toggle button { font: inherit; font-size: 14px; color: var(--muted); background: none; border: 0; padding: 7px 12px; border-radius: 6px; cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--line); color: var(--text); }
.readout { margin-top: 10px; color: var(--muted); min-height: 1.5em; }

/* research */
.results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.res { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: var(--panel); }
.res p { color: var(--muted); margin: 0; font-size: 15px; }
.res-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.tag { font-size: 14px; font-weight: 600; }
.res.miss .tag { color: var(--alert); } .res.hold .tag { color: var(--accent); } .res.weak .tag { color: var(--text); }
.callout ul { color: var(--muted); max-width: 72ch; padding-left: 20px; }
.callout li { margin: 8px 0; }
.callout strong { color: var(--text); }

/* about, contact */
.people { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.person { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--panel); }
.person p { margin: 0; }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.form input, .form textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.form button { justify-self: start; }
.hp { position: absolute; left: -9999px; }
.notice { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--panel); }
.notice.ok { box-shadow: inset 0 0 0 1px var(--accent); }

footer.footer { border-top: 1px solid var(--line); padding: 26px 0 44px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .wrap { padding: 0 16px; }
  .menu { display: inline-block; }
  .nav-cta { display: none; }
  .nav ul { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; z-index: 5; }
  .nav ul.open { display: flex; }
  .nav ul a { display: block; padding: 10px 12px; }
  .hero { padding-top: 40px; }
  .bento { grid-template-columns: 1fr; }
  .big, .mid, .sm { grid-column: auto; grid-row: auto; }
  .checks3, .results, .people { grid-template-columns: 1fr; }
  .db-row, .db-axis { grid-template-columns: 84px 1fr 96px; gap: 10px; }
  .cline { grid-template-columns: 70px 1fr 92px 12px; gap: 8px; }
  .tip .bubble { left: auto; right: -8px; transform: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.scope { max-width: 820px; }
.checks3 + .intro { margin-top: 16px; }

/* the result trace: loudness line and per-window lip-sync misfit */
.tracebox { margin: 14px 0 0; }
.tracebox .trace { width: 100%; height: 60px; display: block; border-bottom: 1px solid var(--line); }
.tracebox figcaption { margin-top: 6px; color: var(--muted); }

/* answer card: which part decided, and any AI label found in the file */
.where { font-size: 14px; color: var(--muted); }
.filecheck { font-weight: 600; }

/* live input: record a video or a voice, or take a picture */
.live-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.btn-live { font: inherit; font-size: 14px; color: var(--text); background: transparent; border: 1px solid #33414f; border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.btn-live:hover, .btn-live:focus-visible { border-color: var(--text); }
.btn-live.primary { background: var(--text); color: #0e141b; border-color: var(--text); }
.btn-live:disabled { opacity: .5; cursor: default; }
.live { margin-top: 14px; display: grid; gap: 10px; justify-items: center; text-align: center; }
.live video { width: 100%; max-width: 420px; border-radius: 12px; background: #000; }
.live-actions { display: flex; gap: 8px; }
.live[hidden], .live video[hidden] { display: none; }   /* display:grid above would otherwise override hidden */
.scale { margin-top: 8px; color: var(--muted); }

/* result: the flag line on each bar, and the preview with its scored timeline */
.ctrack { position: relative; }
.flagtick { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .8; }
.preview { margin: 14px 0 6px; display: grid; gap: 8px; }
.preview video, .preview img { width: 100%; max-height: 360px; border-radius: 10px; background: #000; object-fit: contain; }
.preview audio { width: 100%; }
.timeline { position: relative; height: 28px; border-radius: 6px; background: #1b232c; cursor: pointer; touch-action: none; }
.timeline:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.timeline .seg { position: absolute; top: 0; bottom: 0; border-right: 1px solid #0e141b; }
.seg.ok, .key.ok::before { background: #2f8f5b; }
.seg.unsure, .key.unsure::before { background: #c9a227; }
.seg.flag, .key.flag::before { background: #d64545; }
.seg.none, .key.none::before { background: #3a4552; }
.timeline .cursor { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1px; background: #fff; border-radius: 2px; pointer-events: none; }
.readout { font-size: 13px; min-height: 1.4em; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; }
.key::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
.picked { display: grid; gap: 10px; margin-top: 4px; }
.picked-media video, .picked-media img { width: 100%; max-height: 420px; border-radius: 14px; background: #000; object-fit: contain; display: block; }
.picked-media audio { width: 100%; }
.picked-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.picked-name { color: var(--muted); overflow-wrap: anywhere; }
.picked-actions { display: flex; gap: 8px; }
.heatbox { margin: 14px 0 0; }
.heatlead { margin: 0 0 6px; padding: 10px 12px; border-left: 3px solid var(--face); border-radius: 6px; background: rgba(169, 196, 255, 0.08); color: var(--text); font-weight: 600; }
.heatlead.raised { border-left-color: var(--alert); background: rgba(248, 113, 113, 0.12); }
.heatlead strong { font-weight: 800; color: var(--face); }
.heatlead.raised strong { color: var(--alert); }
.heatnote { color: var(--muted); margin: 6px 0; }
.heattoggle { font: inherit; font-size: 14px; color: var(--text); background: transparent; border: 1px solid #33414f; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.heattoggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.heatpanel { margin-top: 10px; }
.heatrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.heat { display: grid; gap: 4px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; cursor: pointer; overflow: hidden; text-align: left; }
.heat img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.heat span { padding: 0 6px 6px; overflow-wrap: anywhere; }
.heat:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.footlinks { display: flex; gap: 16px; }
[data-detector] [hidden] { display: none !important; }
