/* CLAWDER wiki — CAT-361 / CAT-817
   KissyKat dark arcade tokens. Press Start 2P is for h1/h2 only.
   Body copy is VT323, with a clean sans fallback if the font is blocked. */

:root {
  --bg: #0a0a0f;
  --bg2: #10101a;
  --bg3: #16162a;
  --teal: #00C8E0;
  --purple: #C7A8FF;
  --pink: #FF4789;
  --gold: #FFD700;
  --green: #39FF14;
  --text: #F0F0F0;
  --text2: rgba(255, 255, 255, 0.66);
  --font: "Press Start 2P", monospace;
  --body: "VT323", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 0px;
  --sidebar: 248px;
  --topbar: 58px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 22px;
  line-height: 1.35;
  overflow-x: hidden;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--pink); }

img { max-width: 100%; height: auto; }

h1, h2 {
  font-family: var(--font);
  font-weight: 400;
}

h1 {
  font-size: 22px;
  line-height: 1.6;
  color: var(--teal);
  margin-bottom: 16px;
}

h2 {
  font-size: 13px;
  line-height: 1.65;
  color: var(--purple);
  margin: 36px 0 14px;
}

h3 {
  font-family: var(--body);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--gold);
  margin: 0 0 8px;
}

p, ul, ol { margin-bottom: 16px; }
ul, ol { padding-left: 1.2em; }
li { margin-bottom: 6px; }
strong { color: #fff; font-weight: 400; }

.nav-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.wiki-top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--topbar);
  padding: 12px 16px;
  background: rgba(10, 10, 15, 0.94);
  border-bottom: 2px solid rgba(199, 168, 255, 0.25);
}

.wiki-brand {
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.4;
  color: var(--purple);
}

.wiki-brand:hover { color: var(--pink); }

.wiki-top-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wiki-top-links a,
.nav-toggle {
  font-family: var(--font);
  font-size: 9px;
  line-height: 1.4;
  color: var(--text2);
}

.nav-toggle {
  display: none;
  cursor: pointer;
  border: 2px solid var(--teal);
  color: var(--teal);
  background: transparent;
  padding: 8px 10px;
  box-shadow: 3px 3px 0 rgba(0, 200, 224, 0.35);
}

.nav-toggle:hover { color: var(--pink); border-color: var(--pink); }

.nav-toggle-input:checked ~ .wiki-top .nav-toggle {
  color: #0a0a0f;
  background: var(--teal);
  border-color: var(--teal);
}

.nav-toggle-input:focus-visible ~ .wiki-top .nav-toggle {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.wiki-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  align-items: stretch;
  min-height: calc(100vh - var(--topbar));
}

.wiki-sidebar {
  background: var(--bg2);
  border-right: 2px solid rgba(199, 168, 255, 0.25);
}

.wiki-nav {
  position: sticky;
  top: var(--topbar);
  max-height: calc(100vh - var(--topbar));
  overflow: auto;
  padding: 18px 14px 28px;
}

.sidebar-label {
  font-family: var(--font);
  font-size: 8px;
  line-height: 1.6;
  color: var(--gold);
  margin: 16px 8px 8px;
}

.sidebar-label:first-child { margin-top: 0; }

.wiki-sidebar a {
  display: block;
  font-family: var(--font);
  font-size: 8px;
  line-height: 1.55;
  color: var(--text2);
  padding: 8px;
  margin-bottom: 2px;
}

.wiki-sidebar a:hover { color: var(--teal); background: rgba(0, 200, 224, 0.06); }

.wiki-sidebar a[aria-current="page"] {
  color: #0a0a0f;
  background: var(--teal);
  box-shadow: 3px 3px 0 var(--purple);
}

.wiki-sidebar a[aria-current="page"]:hover { color: #0a0a0f; }

.wiki-main {
  min-width: 0;
  padding: 32px 32px 16px;
  max-width: 920px;
}

.crumbs {
  font-family: var(--font);
  font-size: 8px;
  line-height: 1.8;
  color: var(--text2);
  margin-bottom: 18px;
}

.crumbs a { color: var(--text2); }
.crumbs a:hover { color: var(--teal); }

.lede {
  font-size: 24px;
  color: var(--text);
  margin-bottom: 22px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 8px 0 28px;
}

.card {
  display: block;
  background: var(--bg2);
  border: 2px solid rgba(199, 168, 255, 0.35);
  box-shadow: 4px 4px 0 var(--purple);
  padding: 16px 16px 14px;
  color: var(--text);
  transition: transform 0.12s, box-shadow 0.12s;
}

.card:hover {
  color: var(--text);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--pink);
}

.card p {
  font-size: 20px;
  color: var(--text2);
  margin: 0;
}

.table-wrap { overflow-x: auto; margin: 0 0 24px; }

.ref-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.ref-table th,
.ref-table td {
  border: 2px solid rgba(199, 168, 255, 0.28);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.ref-table th {
  font-family: var(--font);
  font-size: 8px;
  line-height: 1.6;
  color: var(--gold);
  background: var(--bg3);
}

.ref-table td { font-size: 20px; }

figure.shot { margin: 8px 0 24px; }
figure.shot img {
  width: min(280px, 100%);
  border: 2px solid rgba(199, 168, 255, 0.35);
  box-shadow: 6px 6px 0 rgba(0, 200, 224, 0.25);
}
figure.shot figcaption {
  font-size: 20px;
  color: var(--text2);
  margin-top: 10px;
  max-width: 36em;
}

.changelog { list-style: none; padding: 0; }
.changelog li {
  background: var(--bg2);
  border-left: 4px solid var(--green);
  padding: 10px 14px;
  margin-bottom: 8px;
}
.changelog time { color: var(--gold); }

.wiki-footer {
  grid-column: 1 / -1;
  border-top: 2px solid rgba(199, 168, 255, 0.25);
  padding: 28px 20px 36px;
  text-align: center;
}

.wiki-footer p { margin-bottom: 12px; }

.footer-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a { font-family: var(--font); font-size: 9px; line-height: 1.6; }

.footer-copy {
  font-family: var(--font);
  font-size: 8px;
  line-height: 1.8;
  color: var(--text2);
}

@media (min-width: 768px) {
  .nav-toggle-input { display: none; }
}

@media (max-width: 767px) {
  body { font-size: 20px; }
  h1 { font-size: 16px; }
  h2 { font-size: 11px; }
  h3 { font-size: 24px; }
  .lede { font-size: 22px; }

  .nav-toggle { display: inline-block; }

  .wiki-shell { display: block; }

  .wiki-sidebar {
    display: none;
    border-right: 0;
    border-bottom: 2px solid rgba(199, 168, 255, 0.25);
  }

  .wiki-nav {
    position: static;
    max-height: none;
  }

  .nav-toggle-input:checked ~ .wiki-shell .wiki-sidebar { display: block; }

  .wiki-main { padding: 22px 16px 8px; }

  .card-grid { grid-template-columns: 1fr; }

  .wiki-footer { padding: 24px 16px 32px; }
}
