/* ───────── Utility · shared design system ───────── */
:root {
  --bg: #090A0A; --surface: #101212; --surface-2: #141717; --line: #252929; --line-2: #1A1D1D;
  --ink: #F1F2EF; --mute: #858C8A; --dim: #5B6260;
  --green: #91D6A5; --amber: #D9B26A; --red: #E2725B;
  --accent: var(--green); --accent-ink: #0B1A10; --accent-soft: rgba(145, 214, 165, .12);
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --nav-h: 64px; --gut: clamp(16px, 3vw, 40px);
  --ease: cubic-bezier(.2, .7, .1, 1); --ease-io: cubic-bezier(.7, 0, .2, 1);
  color-scheme: dark;
}
/* each module brings its own accent; the shell follows it */
body[data-module="parasite"]    { --accent: #8FE3A0; --accent-ink: #062010; --accent-soft: rgba(143, 227, 160, .12); }
body[data-module="auction"]   { --accent: #E6D3B3; --accent-ink: #1C160C; --accent-soft: rgba(230, 211, 179, .10); }
body[data-module="otc"]       { --accent: #C9CDCB; --accent-ink: #111312; --accent-soft: rgba(201, 205, 203, .10); }
body[data-module="agents"]    { --accent: #FF9A4D; --accent-ink: #1B0D02; --accent-soft: rgba(255, 154, 77, .12); }
body[data-module="larpcheck"] { --accent: #F1F2EF; --accent-ink: #090A0A; --accent-soft: rgba(241, 242, 239, .08); }
body[data-module="vampcheck"] { --accent: #B9A7F2; --accent-ink: #120C24; --accent-soft: rgba(185, 167, 242, .12); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 14px/1.55 var(--sans); letter-spacing: -.005em; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 6px 10px; }
.skip:focus { left: 8px; }
.mono { font-family: var(--mono); font-feature-settings: 'zero' 1; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.mute { color: var(--mute); } .dim { color: var(--dim); } .acc { color: var(--accent); }
.up { color: var(--green); } .down { color: var(--red); } .warn { color: var(--amber); }
.label { font: 500 10.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ───────── navigation ───────── */
.nav { position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 40; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 var(--gut); transition: background .4s var(--ease), border-color .4s; border-bottom: 1px solid transparent; }
.nav.solid { background: rgba(9, 10, 10, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom-color: var(--line-2); }
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; }
.brand-mark { display: grid; grid-template-columns: repeat(3, 5px); gap: 2px; }
.brand-mark i { width: 5px; height: 5px; background: var(--ink); opacity: .9; transition: background .5s var(--ease), opacity .5s; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(5) { opacity: .45; }
.brand-mark i:nth-child(3), .brand-mark i:nth-child(4) { opacity: .2; }
.brand:hover .brand-mark i { background: var(--accent); }
.brand-word { font: 500 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.modnav { display: flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(16, 18, 18, .6); }
.modnav a { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); padding: 9px 13px; border-radius: 999px; transition: color .25s, background .25s; }
.modnav a:hover { color: var(--ink); }
.modnav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); }
.nav-right { justify-self: end; display: flex; align-items: center; gap: 10px; }
.net { display: inline-flex; align-items: center; gap: 8px; font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); padding: 9px 10px; border-radius: 999px; }
.net:hover { color: var(--ink); }
.net .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 0 3px rgba(91, 98, 96, .15); }
.net.ok .dot { background: var(--green); box-shadow: 0 0 0 3px rgba(145, 214, 165, .15); }
.net.part .dot { background: var(--amber); box-shadow: 0 0 0 3px rgba(217, 178, 106, .15); }
.wbtn { font: 500 12px/1 var(--sans); padding: 10px 16px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); transition: filter .2s, background .5s var(--ease), color .5s; white-space: nowrap; }
.wbtn:hover { filter: brightness(1.08); }
.wbtn.on { background: transparent; color: var(--ink); border: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; }
.menu-btn { display: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; position: relative; }
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 1px; background: var(--ink); transition: transform .3s var(--ease); }
.menu-btn span:first-child { top: 15px; } .menu-btn span:last-child { top: 21px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

#view { min-height: 100vh; outline: none; }
#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 60; pointer-events: none; display: none; }
#fx.on { display: block; }

/* ───────── shared controls ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); font: 500 13px/1 var(--sans); transition: border-color .2s, background .2s, color .2s; white-space: nowrap; }
.btn:hover { border-color: var(--mute); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.sm { height: 32px; padding: 0 13px; font-size: 12px; }
.btn.sq { border-radius: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.arrow { font-family: var(--mono); font-size: 12px; transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translate(2px, -2px); }
.field { display: grid; gap: 7px; }
.field > span { font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.input, .select, .textarea { width: 100%; height: 42px; padding: 0 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 2px; outline: none; transition: border-color .2s; font-size: 13.5px; }
.textarea { height: auto; min-height: 92px; padding: 11px 13px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); }
.input.mono { font-size: 12.5px; }
.err { color: var(--red); font-size: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); white-space: nowrap; }
.chip.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.chip.bad { color: var(--red); border-color: rgba(226, 114, 91, .35); }
.chip.mid { color: var(--amber); border-color: rgba(217, 178, 106, .35); }
.chip .d { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }
.copy { cursor: copy; border-bottom: 1px dashed var(--dim); }
.ext::after { content: ' ↗'; font-family: var(--mono); font-size: .85em; color: var(--mute); }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; font: 500 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding: 0 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; } .tbl .num { font-family: var(--mono); font-size: 12px; text-align: right; white-space: nowrap; }
.tbl tbody tr[data-href] { cursor: pointer; transition: background .15s; }
.tbl tbody tr[data-href]:hover { background: var(--surface); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* states: offline service, demo data, empty */
.state { border: 1px dashed var(--line); padding: 28px; display: grid; gap: 10px; justify-items: start; }
.state .label { color: var(--amber); }
.state code { font: 12px/1.6 var(--mono); color: var(--ink); background: var(--surface); padding: 10px 12px; display: block; width: 100%; overflow-x: auto; white-space: pre; }
.demo-badge { display: inline-flex; align-items: center; gap: 7px; font: 500 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--amber); border: 1px solid rgba(217, 178, 106, .4); padding: 6px 9px; border-radius: 2px; }
.empty { color: var(--mute); font-size: 13px; padding: 26px 0; }
.skel { background: linear-gradient(90deg, var(--surface) 0, var(--surface-2) 40%, var(--surface) 80%); background-size: 300% 100%; animation: skel 1.6s linear infinite; border-radius: 2px; min-height: 12px; }
@keyframes skel { to { background-position: -300% 0; } }

/* toasts */
.toasts { position: fixed; right: var(--gut); bottom: var(--gut); z-index: 80; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.toast { pointer-events: auto; max-width: min(380px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--accent); padding: 12px 14px; font-size: 12.5px; line-height: 1.45; animation: tin .35s var(--ease); }
.toast.bad { border-left-color: var(--red); } .toast.mid { border-left-color: var(--amber); }
.toast b { font-weight: 500; display: block; margin-bottom: 2px; }
.toast a { text-decoration: underline; text-decoration-color: var(--dim); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* modal */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(5, 6, 6, .72); backdrop-filter: blur(4px); padding: 16px; animation: fin .2s ease; }
@keyframes fin { from { opacity: 0; } }
.dialog { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line); padding: 22px; display: grid; gap: 16px; animation: tin .3s var(--ease); }
.dialog h3 { margin: 0; font: 500 15px/1.3 var(--sans); }
.dialog .x { justify-self: end; margin: -8px -8px 0 0; width: 32px; height: 32px; color: var(--mute); font-family: var(--mono); }
.wlist { display: grid; gap: 6px; }
.wopt { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 2px; text-align: left; transition: border-color .2s, background .2s; }
.wopt:hover { border-color: var(--accent); background: var(--accent-soft); }
.wopt img, .wopt .wi { width: 26px; height: 26px; border-radius: 6px; background: var(--surface-2); flex: none; }
.wopt .wn { flex: 1; font-weight: 500; }
.wopt small { font: 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.steps li { position: relative; padding: 0 0 14px 18px; font-size: 13px; color: var(--mute); }
.steps li::before { content: ''; position: absolute; left: -4px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--bg); border: 1px solid var(--dim); }
.steps li.active { color: var(--ink); } .steps li.active::before { border-color: var(--accent); background: var(--accent); animation: pulse 1.2s ease infinite; }
.steps li.done { color: var(--ink); } .steps li.done::before { background: var(--accent); border-color: var(--accent); }
.steps li.fail { color: var(--red); } .steps li.fail::before { background: var(--red); border-color: var(--red); }
.steps li small { display: block; color: var(--mute); font-size: 12px; margin-top: 3px; word-break: break-word; }
@keyframes pulse { 50% { opacity: .35; } }

/* shared page frame helpers */
.page { padding: calc(var(--nav-h) + 24px) var(--gut) 80px; }
.wrap { max-width: 1320px; margin: 0 auto; }
.foot { border-top: 1px solid var(--line-2); padding: 26px var(--gut); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font: 500 10.5px/1.6 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.foot a:hover { color: var(--ink); }

@media (max-width: 1060px) {
  .nav { grid-template-columns: 1fr auto; }
  .modnav { position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; border-radius: 0; border: 0; border-bottom: 1px solid var(--line); background: rgba(9, 10, 10, .97); padding: 8px var(--gut) 18px; gap: 0; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease); }
  .modnav.open { opacity: 1; transform: none; pointer-events: auto; }
  .modnav a { padding: 15px 0; border-radius: 0; border-bottom: 1px solid var(--line-2); font-size: 12px; }
  .modnav a[aria-current="page"] { background: none; color: var(--accent); }
  .menu-btn { display: inline-block; }
  .net-label { display: none; }
}
@media (max-width: 520px) { .brand-word { font-size: 11.5px; letter-spacing: .1em; } .wbtn { padding: 10px 13px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
.svc-list { display: grid; gap: 10px; } .svc-list > div { display: grid; grid-template-columns: 82px 1fr auto; gap: 12px; align-items: center; font-size: 13px; }
