/* chanops.org v5 — light and simple. No external resources. */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/geist-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/geist-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/geist-mono-latin.woff2") format("woff2"); }

:root {
  --bg: #ffffff; --soft: #f5f7fa; --soft2: #eef2f7; --fg: #1b2330; --muted: #5b6676; --line: #e1e6ee;
  --accent: #1d5fd6; --accent-dk: #164aa8; --accent-bg: #eaf1fe;
  --anope: #6b3fc9; --anope-bg: #f1ecfc; --ircd: #0e7a55; --ircd-bg: #e6f5ef;
  --ok: #16a34a; --bad: #dc2626; --radius: 12px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dk); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.02em; }
p { margin: 0 0 .7em; }
code { font-family: var(--mono); font-size: .86em; background: var(--soft2); padding: .12em .4em; border-radius: 5px; overflow-wrap: anywhere; }
small { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
.icon { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 20px; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--fg); text-decoration: none; font-weight: 700; font-size: 1.12rem; }
.brand .dim { color: var(--muted); font-weight: 500; }
.logo { width: 28px; height: 28px; }
.logo-bg { fill: var(--accent); } .logo-hash { stroke: #fff; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; padding: 7px 11px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { background: var(--soft); color: var(--fg); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-bg); font-weight: 600; }
.net { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--muted); white-space: nowrap; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #c3cad5; flex: none; }
.dot.ok { background: var(--ok); } .dot.down { background: var(--bad); }

/* hero */
.hero { padding: 56px 0 28px; max-width: 720px; }
.hero-sm { padding: 44px 0 8px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: .9rem; margin-bottom: 10px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 14px; }
.hero-p { font-size: 1.15rem; color: #334155; }
.hint { color: var(--muted); font-size: .9rem; margin-top: 10px; }

/* join form */
.join { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; max-width: 560px; }
.join input { flex: 1 1 220px; min-width: 0; font: inherit; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--fg); }
.join input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-bg); }
.join button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; padding: 13px 22px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; }
.join button:hover, .btn:hover { background: var(--accent-dk); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .9rem; border-radius: 8px; }
.form-msg { flex-basis: 100%; margin: 0; color: var(--bad); font-size: .9rem; min-height: 0; }
.form-msg:empty { display: none; }

/* sections */
.sec { padding: 40px 0 8px; border-top: 1px solid var(--line); margin-top: 32px; }
.hero + .sec { border-top: 0; margin-top: 8px; }
.sec h2 { font-size: 1.7rem; margin-bottom: 8px; }
.sec h3 { font-size: 1.1rem; margin: 26px 0 10px; }
.lead { color: var(--muted); margin-bottom: 18px; max-width: 680px; }
.note { background: #fff8e6; border: 1px solid #f3dfa6; color: #6b4e00; padding: 12px 16px; border-radius: 10px; font-size: .95rem; margin-top: 18px; }

/* tags */
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; vertical-align: middle; letter-spacing: .01em; white-space: nowrap; }
.tag-anope { color: var(--anope); background: var(--anope-bg); }
.tag-ircd { color: var(--ircd); background: var(--ircd-bg); }

/* cards */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 10px; }
.card { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 6px 0 8px; font-size: 1.2rem; }
.card-ircd { border-top: 4px solid var(--ircd); } .card-anope { border-top: 4px solid var(--anope); }
.rule { margin-top: 18px; font-size: 1.1rem; text-align: center; background: var(--accent-bg); padding: 14px; border-radius: var(--radius); }

/* generator + steps */
.gen { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
.gen label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.gen input { width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--fg); }
.gen input:focus { border-color: var(--accent); outline: none; }
.gen-in { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; }
.gen-in span { padding-left: 12px; color: var(--muted); font-weight: 600; }
.gen-in input { border: 0; padding-left: 4px; }
.gen-in:focus-within { border-color: var(--accent); }
.gen .form-msg { grid-column: 1 / -1; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding-left: 46px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .95rem; }
.steps li p { margin: 4px 0 6px; font-weight: 500; }

/* command box */
.cmd { display: flex; align-items: stretch; gap: 0; margin: 6px 0 10px; background: #0f172a; border-radius: 10px; overflow: hidden; max-width: 760px; }
.cmd code { flex: 1; background: none; color: #e2e8f0; padding: 11px 14px; font-size: .9rem; border-radius: 0; }
.cmd .copy { display: inline-flex; align-items: center; gap: 6px; border: 0; background: #1e293b; color: #cbd5e1; padding: 0 14px; font: inherit; font-size: .82rem; cursor: pointer; }
.cmd .copy:hover { background: #334155; color: #fff; }
.cmd .copy.copied { background: var(--ok); color: #fff; }

/* tables */
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 4px 0 14px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--soft); font-size: .85rem; color: var(--muted); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }
td:first-child { white-space: nowrap; }

/* ladder */
.ladder { list-style: none; padding: 0; margin: 6px 0 18px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.ladder li { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.ladder li b { font-size: 1.02rem; }
.ladder li span { color: var(--muted); font-size: .88rem; }
.ladder li:nth-child(n+4) { border-color: #f1c7c7; background: #fdf3f3; }

/* rooms + apps */
.rooms, .apps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.rooms { grid-template-columns: repeat(3, 1fr); }
.room { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; }
.room-n { font-weight: 700; font-size: 1.15rem; margin-bottom: 4px; }
.room-a { margin-top: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .9rem; }
.apps { grid-template-columns: repeat(3, 1fr); }
.app { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.app img { aspect-ratio: 16 / 10; object-fit: cover; border-bottom: 1px solid var(--line); }
.app-b { padding: 14px 16px; }
.app-n { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 2px; }
.app-a { display: flex; gap: 16px; margin: 0; font-size: .92rem; }
.app-a a { display: inline-flex; align-items: center; gap: 5px; }

/* faq */
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 0 16px; margin-bottom: 10px; background: #fff; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; }
.faq details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }

/* toc + plays */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.toc a { text-decoration: none; background: var(--soft); border: 1px solid var(--line); color: var(--fg); padding: 6px 13px; border-radius: 999px; font-size: .9rem; }
.toc a:hover { border-color: var(--accent); color: var(--accent); }
.plays { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.play h3 { margin: 0 0 10px; }
.play ol { margin: 0; padding-left: 20px; }
.play li { margin-bottom: 8px; }

/* footer */
.foot { margin-top: 64px; border-top: 1px solid var(--line); background: var(--soft); }
.foot-in { padding: 26px 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .92rem; color: var(--muted); }
.foot-in p { margin: 0; }
.foot-links { display: flex; gap: 18px; }

@media (max-width: 860px) {
  .top-in { flex-wrap: wrap; gap: 6px 14px; padding-top: 10px; padding-bottom: 8px; }
  .net { margin-left: auto; }
  .nav { order: 3; width: 100%; margin: 0 -11px; }
  .two, .gen, .plays { grid-template-columns: 1fr; }
  .rooms, .apps { grid-template-columns: 1fr 1fr; }
  .ladder { grid-template-columns: 1fr 1fr; }
  html { scroll-padding-top: 120px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .rooms, .apps { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .join button { width: 100%; }
  td code { white-space: normal; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* v5.1 — readable commands */
var { font-style: normal; color: #c2410c; font-weight: 600; }
.cmd var { color: #fdba74; }
.legend { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: 10px 14px; font-size: .95rem; margin: 0 0 18px; }
.legend > var { background: #ffedd5; padding: 0 .3em; border-radius: 4px; }
.ana { display: grid; grid-template-columns: repeat(5, auto); gap: 8px; justify-content: start; margin: 4px 0 10px; }
.ana-p { display: flex; flex-direction: column; gap: 2px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ana-p code { background: none; padding: 0; font-size: 1rem; font-weight: 600; }
.ana-p b { font-size: .88rem; } .ana-p span { font-size: .8rem; color: var(--muted); }
.ana-ex { font-size: .95rem; }
.ev { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ev-i { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; }
.ev-d { margin: 0 0 6px; } .ev-c { margin: 0 0 10px; }
.ev-c code { font-size: .95rem; }
.ev-x { margin: 0; } .ev-x > span { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.ev-x .cmd { margin: 4px 0 0; }
@media (max-width: 860px) { .ev { grid-template-columns: 1fr; } .ana { grid-template-columns: 1fr 1fr; } }

/* v5.2 — full lists */
.full { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 12px; background: #fff; }
.full > summary { cursor: pointer; padding: 15px 18px; font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: 10px; list-style: none; }
.full > summary::-webkit-details-marker { display: none; }
.full > summary::before { content: "+"; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--accent-bg); color: var(--accent); font-weight: 700; flex: none; }
.full[open] > summary::before { content: "−"; }
.full[open] > summary { border-bottom: 1px solid var(--line); }
.cnt { margin-left: auto; font-size: .82rem; font-weight: 500; color: var(--muted); }
.full-b { padding: 4px 18px 10px; }
.full-b h3 { margin-top: 18px; }

/* v5.3 — guide cards, wrapping mobile nav */
.guides { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.guide { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); text-decoration: none; color: var(--fg); }
.guide:hover { border-color: var(--accent); color: var(--fg); background: var(--accent-bg); }
.guide b { font-size: 1.08rem; } .guide .muted { font-size: .88rem; }
@media (max-width: 860px) { .guides { grid-template-columns: 1fr 1fr; } .nav { flex-wrap: wrap; overflow: visible; } }
@media (max-width: 560px) { .guides { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .top { position: static; } html { scroll-padding-top: 12px; } }
