@font-face { font-family:'Creepster'; font-style:normal; font-weight:400; font-display:swap;
  src:url('assets/fonts/creepster.woff2') format('woff2'); }
@font-face { font-family:'IM Fell English'; font-style:normal; font-weight:400; font-display:swap;
  src:url('assets/fonts/imfell.woff2') format('woff2'); }
@font-face { font-family:'IM Fell English'; font-style:italic; font-weight:400; font-display:swap;
  src:url('assets/fonts/imfell-italic.woff2') format('woff2'); }
@font-face { font-family:'VT323'; font-style:normal; font-weight:400; font-display:swap;
  src:url('assets/fonts/vt323.woff2') format('woff2'); }
:root {
  --bg:#0a0812; --panel:#14101f; --inset:#0c0a16; --border:#322a4d;
  --bone:#e8e4d8; --dim:#8a80a8;
  --phos:#7dffa8; --violet:#b78cff; --blood:#ff5470; --candle:#e8b34b; --blue:#6fa8ff;
}
* { box-sizing:border-box }
body { background:var(--bg); color:var(--bone); font-family:'VT323',ui-monospace,monospace; font-size:19px; line-height:1.45; margin:0 }
body::before { content:''; position:fixed; inset:0; pointer-events:none; z-index:5;
  background:repeating-linear-gradient(0deg, rgba(0,0,0,.25) 0 1px, transparent 1px 3px) }
body::after { content:''; position:fixed; inset:0; pointer-events:none; z-index:4;
  background:radial-gradient(ellipse at 50% 30%, transparent 55%, rgba(0,0,0,.6)); animation:flick 7s infinite }
@keyframes flick { 0%,100%{opacity:1} 92%{opacity:1} 93%{opacity:.85} 94%{opacity:1} 97%{opacity:.93} 98%{opacity:1} }
input, textarea { cursor:text }
a { color:var(--violet) } a:hover { color:var(--phos) }
main { max-width:720px; margin:40px auto; padding:0 16px }

h1 { font-family:'Creepster',cursive; font-weight:400; font-size:54px; margin:0; letter-spacing:3px;
  text-shadow:0 0 22px rgba(183,140,255,.45) }
h1 .sk { display:inline-block; animation:sway 5s ease-in-out infinite }
@keyframes sway { 0%,100%{transform:rotate(-9deg)} 50%{transform:rotate(9deg)} }
h1 .zap { color:var(--violet); animation:zap 4s infinite }
@keyframes zap { 0%,100%{opacity:1} 88%{opacity:1} 89%{opacity:.15} 90%{opacity:1} 93%{opacity:.35} 94%{opacity:1} }
h2 { font-family:'IM Fell English',serif; font-weight:400; font-size:24px; color:var(--candle);
  letter-spacing:1px; margin:34px 0 6px }
.tag { color:var(--bone); margin:4px 0 0; font-size:21px }
.explain { color:var(--dim); margin:6px 0 0; font-size:17px; line-height:1.4 }
.lbl { display:block; color:var(--dim); font-size:15px; letter-spacing:3px; margin-top:24px; text-transform:uppercase }

form { display:flex; gap:10px; margin:6px 0 10px }
input { background:var(--inset); border:1px solid var(--border); color:var(--phos); padding:10px 14px;
  border-radius:4px; flex:1; font-family:inherit; font-size:20px; min-width:0;
  box-shadow:inset 0 0 14px rgba(0,0,0,.65) }
input::placeholder { color:#4d4570 }
input:focus { outline:none; border-color:var(--violet);
  box-shadow:inset 0 0 14px rgba(0,0,0,.65), 0 0 12px rgba(183,140,255,.25) }
button { font-family:inherit; font-size:20px; background:var(--phos); color:#06130b; border:0;
  padding:10px 22px; border-radius:4px; cursor:pointer; box-shadow:0 0 16px rgba(125,255,168,.28) }
button:hover { box-shadow:0 0 24px rgba(125,255,168,.55) }
button.ghost { background:transparent; color:var(--violet); border:1px solid var(--violet); box-shadow:none }
button.ghost:hover { background:rgba(183,140,255,.12) }

pre { background:var(--inset); border:1px solid var(--border); padding:12px; border-radius:4px;
  overflow-x:auto; font-size:16px; white-space:pre-wrap; word-break:break-all; color:var(--phos);
  box-shadow:inset 0 0 14px rgba(0,0,0,.5) }
code { background:var(--inset); padding:2px 6px; border-radius:3px; font-size:16px; color:var(--phos) }
.dim { color:var(--dim); font-size:16px }

.ticker { border-top:1px solid var(--border); border-bottom:1px solid var(--border);
  background:var(--inset); overflow:hidden; margin:18px 0 4px; padding:7px 0;
  box-shadow:inset 0 0 14px rgba(0,0,0,.5) }
.tape { display:inline-flex; white-space:nowrap; animation:tape 75s linear infinite; will-change:transform }
.ticker:hover .tape { animation-play-state:paused }
@keyframes tape { from{transform:translateX(0)} to{transform:translateX(-50%)} }
.tape span { display:inline-block }
.tape a { color:var(--dim); text-decoration:none; margin-right:34px; font-size:16px; letter-spacing:1px }
.tape a:hover { color:var(--phos) }
.tape .ix { color:var(--candle) }
.tape .doomed .ix { color:var(--blood) }
.tape .hale .ix { color:var(--phos) }
.tape .sep { color:#4d4570; margin-right:34px }

#result { display:none }
.plate { display:inline-block; background:linear-gradient(#3d3320,#241d10); border:1px solid #554524;
  color:var(--candle); font-size:14px; letter-spacing:4px; padding:2px 16px; border-radius:3px;
  position:relative; z-index:2; margin:18px 0 -9px 14px }
.bezel { border:8px solid #1c1626; border-radius:10px; padding:10px; background:var(--inset);
  box-shadow:0 0 0 1px var(--border), 0 0 34px rgba(183,140,255,.12), inset 0 0 26px rgba(0,0,0,.7) }
.bezel img { display:block; width:100%; border-radius:4px }

.steps { counter-reset:step; padding-left:0; list-style:none }
.steps li { margin:16px 0; padding-left:32px; position:relative }
.steps li::before { counter-increment:step; content:counter(step); position:absolute; left:0; top:3px;
  width:20px; height:20px; background:var(--inset); border:1px solid var(--violet); border-radius:50%;
  font-size:14px; display:flex; align-items:center; justify-content:center; color:var(--violet) }
details { margin-top:26px; border:1px solid var(--border); border-radius:6px; padding:12px 16px; background:var(--panel) }
summary { cursor:pointer; color:var(--bone) }
details.ward { margin:8px 0 0; border:0; background:transparent; padding:0 }
details.ward summary { color:var(--dim); font-size:15px }
details.ward input { margin-top:8px; width:min(420px,100%) }
.row { display:flex; gap:8px; flex-wrap:wrap; margin:10px 0 }
.card-bar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:12px 0 18px; flex-wrap:wrap }
.card-bar #summary { margin:0; flex:1; min-width:200px }
.card-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap }
.btn-action, .btn-x {
  display:inline-flex; align-items:center; gap:7px; background:var(--panel); color:var(--bone);
  border:1px solid var(--border); border-radius:4px; padding:7px 13px; font-family:inherit; font-size:17px;
  text-decoration:none; cursor:pointer; white-space:nowrap; box-shadow:inset 0 0 10px rgba(0,0,0,.5); transition:all .15s ease;
}
.btn-action:hover, .btn-x:hover {
  color:var(--phos); border-color:var(--violet); background:rgba(183,140,255,.12);
  box-shadow:0 0 16px rgba(183,140,255,.25), inset 0 0 10px rgba(0,0,0,.5);
}
.btn-action svg, .btn-x svg { width:15px; height:15px; fill:currentColor }

.audit-panel {
  border:1px solid var(--border); border-radius:6px; padding:14px 16px;
  background:var(--panel); margin:16px 0 24px; box-shadow:inset 0 0 18px rgba(0,0,0,.45);
}
.audit-head { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:10px }
.verdict { font-size:15px; letter-spacing:2px; padding:2px 10px; border-radius:3px; border:1px solid var(--border) }
.verdict.alive { color:var(--phos); border-color:rgba(125,255,168,.5); background:rgba(125,255,168,.08) }
.verdict.mixed { color:var(--candle); border-color:rgba(232,179,75,.5); background:rgba(232,179,75,.08) }
.verdict.rot { color:var(--blood); border-color:rgba(255,84,112,.5); background:rgba(255,84,112,.08) }
.audit-note { color:var(--dim); font-size:16px; margin:0 0 12px }
.audit-grid { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:8px }
.audit-stat { background:var(--inset); border:1px solid var(--border); border-radius:4px; padding:8px 10px }
.audit-stat b { display:block; color:var(--bone); font-weight:400; font-size:21px }
.audit-stat span { color:var(--dim); font-size:14px; text-transform:uppercase; letter-spacing:1px }
.repo-focus {
  margin-top:10px; padding:8px 10px; background:var(--inset);
  border:1px solid var(--border); border-left:3px solid var(--violet);
  border-radius:4px; font-size:16px; color:var(--bone);
}

.badge-preview {
  padding:12px 14px; background:var(--inset); border:1px solid var(--border);
  border-radius:4px; margin:10px 0; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px;
}

#status { color:var(--phos); font-size:17px }
#status:not(:empty) { min-height:24px }
#status.err { color:var(--blood) }
#status:not(:empty)::after { content:' ▌'; animation:blink 1s steps(1) infinite }
@keyframes blink { 50%{opacity:0} }
footer { margin:52px 0 24px; color:var(--dim); font-size:15px; border-top:1px solid var(--border); padding-top:16px; display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap }
footer .fleft { flex:1; min-width:0 }
footer .fright { color:var(--candle); text-decoration:none; font-size:14px; padding:4px 10px; border:1px solid var(--border); border-radius:4px; background:rgba(232,179,75,0.06); white-space:nowrap; flex-shrink:0 }
footer .fright:hover { color:var(--blood); border-color:var(--candle) }
footer .fright[hidden] { display:none }
footer .fright::before { content:"⚰ "; opacity:0.7 }

.wisp { position:fixed; bottom:-10px; border-radius:50%; background:var(--violet); opacity:0;
  filter:blur(1.5px); animation:rise 11s linear infinite; z-index:3; pointer-events:none }
.wisp:nth-child(1) { left:8%; width:5px; height:5px; animation-delay:0s }
.wisp:nth-child(2) { left:22%; width:4px; height:4px; animation-delay:3s; animation-duration:13s }
.wisp:nth-child(3) { left:41%; width:6px; height:6px; animation-delay:6s; animation-duration:10s }
.wisp:nth-child(4) { left:58%; width:4px; height:4px; animation-delay:1.5s; animation-duration:14s }
.wisp:nth-child(5) { left:74%; width:5px; height:5px; animation-delay:8s; animation-duration:12s }
.wisp:nth-child(6) { left:90%; width:4px; height:4px; animation-delay:4.5s; animation-duration:9s }
@keyframes rise { 0%{transform:translateY(0);opacity:0} 12%{opacity:.45} 85%{opacity:.25} 100%{transform:translateY(-105vh) translateX(36px);opacity:0} }
@media (prefers-reduced-motion:reduce) {
  body::after, h1 .sk, h1 .zap, .tape, .wisp, #status:not(:empty)::after { animation:none }
  .wisp { display:none }
}
@media (max-width:600px) { .audit-grid { grid-template-columns:repeat(2, minmax(0,1fr)) } }
