:root {
  --bg: #0b0f1c; --panel: #121a2e; --panel2: #0e1526; --line: #1e2a44;
  --text: #e6ecf8; --muted: #8b98b8; --accent: #22d3ee; --good: #34d399;
  --warn: #fbbf24; --bad: #f87171; --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.5; }
header { display: flex; justify-content: space-between; align-items: center; padding: 18px 5vw; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(11,15,28,.85); backdrop-filter: blur(8px); z-index: 5; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: .4px; }
.logo { color: var(--accent); margin-right: 6px; }
header a { color: var(--muted); text-decoration: none; font-size: 14px; }
header a:hover { color: var(--accent); }
.hero { text-align: center; padding: 64px 5vw 40px; background: radial-gradient(ellipse 70% 60% at 50% 0%, #14233f 0%, var(--bg) 70%); }
.hero h1 { font-size: clamp(30px, 4.5vw, 52px); line-height: 1.12; font-weight: 800; }
.hero em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--good)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { max-width: 680px; margin: 18px auto 0; color: var(--muted); font-size: 16px; }
.badges { display: flex; gap: 10px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.badges span { border: 1px solid var(--line); background: var(--panel2); color: var(--muted); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-family: var(--mono); }
main { max-width: 1180px; margin: 0 auto; padding: 24px 4vw 80px; display: flex; flex-direction: column; gap: 22px; }
.grid { display: grid; gap: 22px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h2 { font-size: 18px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.card h3 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 10px 0 8px; }
.stepn { display: inline-flex; width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), #2563eb); color: #04121f; font-weight: 800; font-size: 14px; align-items: center; justify-content: center; }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 26px 14px; text-align: center; color: var(--muted); cursor: pointer; transition: .15s; font-size: 14px; }
.drop:hover, .drop.over { border-color: var(--accent); color: var(--text); background: #0f1a30; }
canvas { display: block; margin: 12px auto 0; max-width: 100%; background: var(--panel2); border-radius: 10px; }
.samplerow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
button { font-family: var(--font); font-size: 14px; border-radius: 10px; border: none; cursor: pointer; padding: 10px 16px; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, color .16s ease, background .16s ease; will-change: transform; }
button:not(:disabled):active { transform: translateY(0) scale(.97); }
button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
button.ghost { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
button.ghost:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 0 0 1px var(--accent), 0 0 14px rgba(34, 211, 238, .35), 0 8px 20px rgba(0, 0, 0, .35); }
.status { margin-top: 10px; font-size: 13px; color: var(--muted); font-family: var(--mono); }
.runcard { text-align: center; }
#btn-run { background: linear-gradient(135deg, var(--accent), #2563eb); color: #04121f; font-weight: 800; font-size: 16px; padding: 14px 44px; margin: 6px 0 18px; }
#btn-run:not(:disabled):hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 0 0 2px rgba(34, 211, 238, .65), 0 0 26px rgba(34, 211, 238, .45), 0 14px 34px rgba(37, 99, 235, .4); }
#btn-run:disabled { opacity: .35; cursor: not-allowed; }
.stages { list-style: none; max-width: 620px; margin: 0 auto; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.stages li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.stages .note { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
.stages li[data-state="run"] .dot { background: var(--accent); animation: pulse 1s infinite; }
.stages li[data-state="ok"] .dot { background: var(--good); }
.stages li[data-state="fail"] .dot { background: var(--bad); }
@keyframes pulse { 50% { opacity: .3; } }
.verdictrow { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
#trust-ring { width: 128px; height: 128px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: conic-gradient(var(--line) 360deg, var(--line) 0deg); flex: none; }
#trust-ring .inner { width: 100px; height: 100px; border-radius: 50%; background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; }
#trust-num { font-size: 34px; font-weight: 800; font-family: var(--mono); }
#trust-ring small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
#verdict-label { font-size: 26px; font-weight: 800; letter-spacing: .04em; }
#verdict-label[data-verdict="VERIFIED"] { color: var(--good); }
#verdict-label[data-verdict="NEEDS REVIEW"] { color: var(--warn); }
#verdict-label[data-verdict="REJECTED"] { color: var(--bad); }
.verdictmeta { flex: 1; min-width: 260px; }
.fine { color: var(--muted); font-size: 13px; margin: 8px 0 12px; }
#score-breakdown { display: flex; flex-direction: column; gap: 8px; }
.brow { display: grid; grid-template-columns: 180px 130px 1fr; gap: 12px; align-items: center; font-size: 13px; }
.brow .mono { font-family: var(--mono); color: var(--muted); }
.bar { height: 8px; background: var(--panel2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--good)); border-radius: 99px; }
#fields-table { width: 100%; border-collapse: collapse; font-size: 13px; }
#fields-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
#fields-table td:first-child { color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.mono { font-family: var(--mono); }
#forensic-notes { padding-left: 18px; color: var(--muted); font-size: 13px; }
#cam-wrap { margin-top: 12px; text-align: center; }
#cam { width: 100%; max-width: 380px; border-radius: 10px; }
#btn-capture { margin-top: 8px; background: var(--accent); color: #04121f; font-weight: 700; }
#btn-capture:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px rgba(34, 211, 238, .55), 0 0 18px rgba(34, 211, 238, .4); }
#btn-download-report:hover { border-color: var(--good); box-shadow: 0 0 0 1px var(--good), 0 0 14px rgba(52, 211, 153, .35), 0 8px 20px rgba(0, 0, 0, .35); }
.about p { color: var(--muted); font-size: 14px; }
.about b { color: var(--text); }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 5vw 40px; border-top: 1px solid var(--line); }
.hidden { display: none !important; }
@media (max-width: 640px) { .brow { grid-template-columns: 1fr; gap: 4px; } .verdictrow { justify-content: center; text-align: center; } }
