/* AI Fake Defense — demo UI.
   Palette taken from the colormaps the pipeline itself renders evidence in:
   magma magenta for the accent, viridis teal for "clean", magma amber/red for
   the alarming end. Neutrals are graphite with a slight blue bias, so nothing
   reads as an unconsidered grey. Type is one family (IBM Plex) in three roles. */

:root{
  --ground:#eceef2; --surface:#fff; --surface-2:#f5f6f9; --sunk:#e3e6ec;
  --ink:#161a21; --ink-2:#464f5e; --muted:#767e8d; --rule:#d9dde4;
  --accent:#a8336f; --accent-soft:#f4e4ee;
  --ok:#1b8479; --warn:#b8790a; --crit:#c9463f;
  --shadow:0 1px 2px rgba(20,24,32,.05), 0 10px 28px -18px rgba(20,24,32,.3);
  --radius:12px;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --ground:#0d1015; --surface:#151920; --surface-2:#1b2029; --sunk:#0f1319;
    --ink:#e7eaf0; --ink-2:#aab2c0; --muted:#79828f; --rule:#262c36;
    --accent:#e0709f; --accent-soft:#31202a;
    --ok:#3fb5a7; --warn:#dda63f; --crit:#ec6f68;
    --shadow:0 1px 2px rgba(0,0,0,.4), 0 12px 30px -20px rgba(0,0,0,.8);
  }
}
:root[data-theme="dark"]{
  --ground:#0d1015; --surface:#151920; --surface-2:#1b2029; --sunk:#0f1319;
  --ink:#e7eaf0; --ink-2:#aab2c0; --muted:#79828f; --rule:#262c36;
  --accent:#e0709f; --accent-soft:#31202a;
  --ok:#3fb5a7; --warn:#dda63f; --crit:#ec6f68;
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 12px 30px -20px rgba(0,0,0,.8);
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--ground); color:var(--ink);
  font:400 16px/1.6 "IBM Plex Sans","Segoe UI",system-ui,-apple-system,sans-serif;
  -webkit-font-smoothing:antialiased;
}
.wrap{max-width:960px; margin:0 auto; padding:0 22px 80px}
h1,h2,h3{font-family:"IBM Plex Sans Condensed","IBM Plex Sans",system-ui,sans-serif;
  font-weight:700; margin:0; text-wrap:balance; letter-spacing:-.01em}
h1{font-size:clamp(30px,5vw,46px); line-height:1.05}
h2{font-size:20px; line-height:1.2}
h3{font-size:16px; font-weight:600}
p{margin:0 0 1em}
a{color:var(--accent); text-underline-offset:3px}
.mono,code{font-family:"IBM Plex Mono",ui-monospace,monospace}
.num{font-variant-numeric:tabular-nums}

header.top{padding:44px 0 26px}
.brand{display:flex; align-items:baseline; gap:12px; flex-wrap:wrap}
.eyebrow{font-family:"IBM Plex Mono",monospace; font-size:11px; letter-spacing:.16em;
  text-transform:uppercase; color:var(--accent)}
.lede{color:var(--ink-2); max-width:620px; margin-top:14px; font-size:17px}

/* ---------- upload ---------- */
.drop{
  /* a <label> is inline by default: without display:block the padding, border
     and centring all resolve against a line box and the zone falls apart */
  display:block;
  margin-top:28px; background:var(--surface); border:1.5px dashed var(--rule);
  border-radius:var(--radius); padding:44px 26px; text-align:center;
  transition:border-color .15s, background .15s; cursor:pointer;
}
.drop:hover,.drop.hot{border-color:var(--accent); background:var(--accent-soft)}
.drop:focus-visible{outline:2px solid var(--accent); outline-offset:3px}
.drop .big{font-family:"IBM Plex Sans Condensed",sans-serif; font-size:21px;
  font-weight:600; margin-bottom:6px}
.drop .hint{color:var(--muted); font-size:13.5px}
.drop input[type=file]{display:none}
.btn{
  display:inline-block; margin-top:18px; padding:11px 24px; border-radius:8px;
  background:var(--accent); color:#fff; border:0; font:600 15px "IBM Plex Sans",sans-serif;
  cursor:pointer; font-family:inherit;
}
.btn:hover{filter:brightness(1.08)}
.btn[disabled]{opacity:.55; cursor:progress}
.btn.ghost{background:transparent; color:var(--accent); border:1px solid var(--rule)}

.samples{margin-top:26px}
.samples .row{display:flex; gap:10px; flex-wrap:wrap; margin-top:12px}
.samples button{
  padding:0; border:1px solid var(--rule); background:var(--surface);
  border-radius:10px; overflow:hidden; cursor:pointer; width:98px;
}
.samples button:hover{border-color:var(--accent)}
.samples img{display:block; width:100%; height:98px; object-fit:cover}
.samples span{display:block; font-family:"IBM Plex Mono",monospace; font-size:10.5px;
  padding:5px 0; color:var(--muted)}

.label{font-family:"IBM Plex Mono",monospace; font-size:11px; letter-spacing:.13em;
  text-transform:uppercase; color:var(--muted)}

/* ---------- verdict ---------- */
.verdict{
  margin-top:26px; background:var(--surface); border:1px solid var(--rule);
  border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden;
  display:grid; grid-template-columns:minmax(0,240px) 1fr;
}
.verdict .shot{background:var(--sunk); display:flex; align-items:center; justify-content:center}
.verdict .shot img{width:100%; height:100%; max-height:340px; object-fit:cover; display:block}
.verdict .body{padding:22px 24px}
.score{font-family:"IBM Plex Sans Condensed",sans-serif; font-size:52px; font-weight:700;
  line-height:1; font-variant-numeric:tabular-nums}
.meter{height:9px; background:var(--sunk); border-radius:99px; margin:14px 0 16px;
  overflow:hidden; position:relative}
.meter i{display:block; height:100%; border-radius:99px}
.tag{display:inline-block; padding:4px 11px; border-radius:99px; font-size:12.5px;
  font-weight:600; margin-right:7px}
.t-ok{background:color-mix(in srgb,var(--ok) 15%,transparent); color:var(--ok)}
.t-warn{background:color-mix(in srgb,var(--warn) 18%,transparent); color:var(--warn)}
.t-bad{background:color-mix(in srgb,var(--crit) 15%,transparent); color:var(--crit)}
.why{margin-top:16px; padding-left:0; list-style:none}
.why li{position:relative; padding-left:17px; font-size:14.5px; color:var(--ink-2);
  margin-bottom:6px}
.why li::before{content:""; position:absolute; left:2px; top:.62em; width:5px; height:5px;
  border-radius:1px; background:var(--accent)}
.meta{margin-top:16px; font-size:12.5px; color:var(--muted); font-family:"IBM Plex Mono",monospace}

section{margin-top:40px}
section > .label{margin-bottom:12px; display:block}

/* ---------- evidence ---------- */
.plates{display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:14px}
.plate{background:var(--surface); border:1px solid var(--rule); border-radius:10px;
  overflow:hidden}
.plate img{display:block; width:100%; background:#000}
.plate .cap{padding:10px 12px; font-size:12.5px; color:var(--ink-2)}
.plate .cap b{display:block; font-family:"IBM Plex Mono",monospace; font-size:11px;
  color:var(--accent); margin-bottom:4px; letter-spacing:.04em}
pre{background:var(--sunk); border:1px solid var(--rule); border-radius:8px; padding:11px;
  overflow:auto; font-size:11.5px; max-height:190px; margin:0}

/* ---------- detector table ---------- */
.tablewrap{overflow-x:auto; background:var(--surface); border:1px solid var(--rule);
  border-radius:10px}
table{width:100%; border-collapse:collapse; font-size:14px}
th{text-align:left; font-family:"IBM Plex Mono",monospace; font-size:10.5px;
  letter-spacing:.1em; text-transform:uppercase; color:var(--muted); font-weight:400;
  padding:11px 14px; border-bottom:1px solid var(--rule); white-space:nowrap}
td{padding:11px 14px; border-bottom:1px solid var(--rule); vertical-align:top}
tr:last-child td{border-bottom:0}
td.n{font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums;
  white-space:nowrap; text-align:right}
.bar{height:6px; background:var(--sunk); border-radius:99px; margin-top:5px; width:82px;
  margin-left:auto; overflow:hidden}
.bar i{display:block; height:100%}
.note{color:var(--muted); font-size:12.5px; margin-top:4px}
.na{color:var(--muted)}

.caveat{border-left:3px solid var(--warn); background:color-mix(in srgb,var(--warn) 7%,transparent);
  padding:16px 18px; border-radius:0 10px 10px 0; font-size:14.5px; color:var(--ink-2)}
.caveat b{color:var(--ink)}
.caveat p:last-child{margin-bottom:0}

footer{margin-top:56px; padding-top:20px; border-top:1px solid var(--rule);
  font-size:13px; color:var(--muted)}

@media (max-width:640px){
  .verdict{grid-template-columns:1fr}
  .verdict .shot img{max-height:220px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
