/* Computer Kong — shared styles */
:root {
  --bg: #ffffff;
  --bg-soft: #f4f5f7;
  --card: #ffffff;
  --text: #15171a;
  --muted: #5b6370;
  --line: #e2e5ea;
  --accent: #f2b705;      /* banana yellow */
  --accent-ink: #1b1400;
  --accent-soft: #fff4cc;
  --ok: #1f9d55;
  --ok-soft: #dcf5e7;
  --bad: #d64545;
  --bad-soft: #fde2e2;
  --key: #eef0f3;
  --key-line: #cfd4db;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111317; --bg-soft: #191c22; --card: #1a1d23; --text: #eef0f3; --muted: #a3abb8;
    --line: #2b3039; --accent-soft: #3a3110; --ok-soft: #12321f; --bad-soft: #3a1717;
    --key: #23272f; --key-line: #353b46; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111317; --bg-soft: #191c22; --card: #1a1d23; --text: #eef0f3; --muted: #a3abb8;
  --line: #2b3039; --accent-soft: #3a3110; --ok-soft: #12321f; --bad-soft: #3a1717;
  --key: #23272f; --key-line: #353b46; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: .2em 0 .3em; }
h2 { font-size: 1.4rem; margin: 2em 0 .5em; }
h3 { font-size: 1.1rem; margin: 1.5em 0 .4em; }
code, kbd { font-family: var(--mono); font-size: .92em; }
kbd { background: var(--key); border: 1px solid var(--key-line); border-bottom-width: 2px; border-radius: 5px; padding: 0 .35em; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }

/* Header */
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.site-head .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; font-size: 1.15rem; letter-spacing: -.02em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; padding: 6px 10px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--bg-soft); }
.theme-btn { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; width: 36px; height: 36px; cursor: pointer; display: grid; place-items: center; }
.theme-btn svg { width: 18px; height: 18px; }
@media (max-width: 520px) { .brand span { display: none; } .nav a { padding: 6px 8px; } }

/* Footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 64px; padding: 28px 0 40px; color: var(--muted); font-size: .92rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.site-foot a { color: var(--muted); }

main { padding-top: 24px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 680px; margin: 0 0 1.2em; }
.crumbs { font-size: .9rem; color: var(--muted); margin-top: 8px; }
.crumbs a { color: var(--muted); }

/* Buttons & form bits */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; text-decoration: none; min-height: 44px; }
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.05); border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: default; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
input[type="number"], select { font: inherit; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); min-height: 44px; }

/* Cards & panels */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { display: block; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card h3 { margin: 10px 0 4px; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; font-size: 22px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { background: var(--bg-soft); border-radius: 10px; padding: 12px 14px; }
.stat b { display: block; font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); }
.note { background: var(--accent-soft); border-radius: 10px; padding: 12px 16px; margin: 16px 0; }
.ok { color: var(--ok); } .bad { color: var(--bad); }
.hero { padding: 24px 0 8px; }
.hero .lead { font-size: 1.25rem; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); }
.muted { color: var(--muted); }
.prose { max-width: 720px; }
.prose li { margin: .3em 0; }
.faq dt { font-weight: 700; margin-top: 1em; }
.faq dd { margin: .2em 0 0; color: var(--muted); }
table.simple { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
table.simple th, table.simple td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
