/* CS2 Skinmode — light navy ink + amber gold (distinct from skinmongey dark/cyan). */
:root {
  --bg: #f3f5f8;
  --bg-2: #e8edf4;
  --surface: #ffffff;
  --ink: #152033;
  --muted: #5b6b82;
  --faint: #8a97b0;
  --line: #d5deea;
  --accent: #c98912;
  --accent-deep: #9a6a0c;
  --accent-soft: #fff4d6;
  --navy: #1a2740;
  --sky: #3d6fb8;
  --ok: #2f7d5b;
  --alert: #b45309;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 28px);
  --radius: 14px;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background:
    radial-gradient(900px 380px at 90% -10%, #fff7e0 0%, transparent 55%),
    radial-gradient(700px 320px at 0% 0%, #e7eefc 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--font-body);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--sky); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }
a:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.7rem;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
h3 { font-size: 1.15rem; font-family: var(--font-body); letter-spacing: 0; }
p { margin: 0 0 1rem; }
.wrap { width: min(var(--wrap), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 20;
  background: var(--navy); color: #fff; padding: 8px 12px; border-radius: 8px;
}
.skip:focus { top: 10px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent-deep); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.6rem;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 15;
  background: rgba(243, 245, 248, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-row {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 14px 0;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink); min-width: 180px;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
}
.brand-name {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; line-height: 1.15;
}
.brand-name small {
  display: block; margin-top: 2px;
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 600;
  color: var(--muted); letter-spacing: 0;
}
.main-nav {
  display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.92rem;
  padding: 8px 12px; border-radius: 999px; white-space: nowrap;
}
.main-nav a:hover { background: var(--bg-2); color: var(--ink); }
.main-nav a[aria-current="page"] {
  background: var(--navy); color: #fff;
}
.lang { margin-left: auto; position: relative; }
.lang summary {
  list-style: none; cursor: pointer; user-select: none;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 8px 14px; font-weight: 700; color: var(--ink);
}
.lang summary::-webkit-details-marker { display: none; }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: min(280px, 70vw); max-height: 360px; overflow: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px; box-shadow: 0 16px 40px rgba(21,32,51,.12);
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px; z-index: 30;
}
.lang-list a {
  text-decoration: none; color: var(--ink); font-size: 0.85rem;
  padding: 8px 10px; border-radius: 8px; display: flex; gap: 8px; align-items: center;
}
.lang-list a span {
  font-weight: 700; color: var(--faint); text-transform: uppercase; min-width: 1.6rem;
}
.lang-list a:hover { background: var(--bg-2); }
.lang-list a[aria-current="true"] { background: var(--accent-soft); color: var(--accent-deep); }

/* Hero */
.hero { padding: 36px 0 10px; }
.hero-grid {
  display: grid; gap: 28px;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  align-items: start;
}
.not-official {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff1e8; color: #8a3b12; border: 1px solid #f0c3a4;
  border-radius: 999px; padding: 6px 12px; font-size: 0.86rem; font-weight: 700;
  margin: 0 0 14px;
}
.lead { font-size: 1.12rem; color: var(--muted); max-width: 46rem; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 18px; }
.badges span {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; font-size: 0.82rem; font-weight: 600; color: var(--navy);
}
.disclosure, .independence {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; color: var(--muted); font-size: 0.95rem;
}
.independence { margin-bottom: 12px; border-left: 4px solid var(--accent); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--navy); color: #fff; text-decoration: none;
  border-radius: 999px; padding: 12px 18px; font-weight: 700;
}
.btn:hover { background: var(--accent-deep); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--navy); border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.art {
  background: linear-gradient(160deg, #1a2740, #243552);
  border-radius: 22px; padding: 16px; color: #fff; position: relative; overflow: hidden;
}
.art-kicker { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #f0b429; margin-bottom: 10px; }
.art figure { margin: 0; background: rgba(255,255,255,0.04); border-radius: 16px; overflow: hidden; }
.art figcaption { padding: 12px 4px 0; font-size: 0.9rem; color: #c9d6ef; }
.art-note { margin-top: 12px; font-size: 0.82rem; color: #8a97b0; }

/* Stats */
.stats {
  display: grid; gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 28px 0;
}
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px;
}
.stat strong { display: block; font-size: 1.35rem; font-family: var(--font-display); color: var(--navy); }
.stat span { color: var(--muted); font-size: 0.88rem; }
.stats-note { color: var(--faint); font-size: 0.85rem; margin-top: -12px; margin-bottom: 28px; }

/* Chapter cards */
.section-block { padding: 18px 0 34px; }
.chapter-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.chapter-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 18px 18px 16px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.chapter-card:hover {
  border-color: #c9b07a; transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(21,32,51,.08); color: inherit;
}
.chapter-card .no {
  font-family: var(--font-display); font-size: 0.95rem; color: var(--accent-deep); font-weight: 700;
}
.chapter-card h3 { margin-top: 6px; }
.chapter-card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* Ready list / example / FAQ */
.ready-list, .faq-list, .source-list { display: grid; gap: 10px; }
.ready-item, .source-item, .keybox, .note-box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px;
}
.ready-item b, .source-item b { display: block; margin-bottom: 4px; }
.example-table {
  width: 100%; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.example-table th, .example-table td {
  text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.example-table tr:last-child td, .example-table tr:last-child th { border-bottom: 0; }
.example-table th { font-weight: 600; }
.example-table td { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--navy); }
.faq-list details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 4px 14px;
}
.faq-list summary {
  cursor: pointer; font-weight: 700; padding: 12px 0; list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.cta-band {
  background: var(--navy); color: #fff; border-radius: 22px; padding: 28px;
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
}
.cta-band p { color: #c9d6ef; margin: 0; max-width: 40rem; }
.cta-band h2 { color: #fff; }
.cta-band .btn { background: var(--accent); color: #1a1405; }
.cta-band .btn:hover { background: #ffd56a; color: #1a1405; }

/* Chapter / doc pages */
.page-head { padding: 28px 0 8px; }
.crumbs { color: var(--faint); font-size: 0.9rem; margin-bottom: 10px; }
.crumbs a { color: var(--muted); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--sky); }
.meta { color: var(--faint); font-size: 0.88rem; display: flex; gap: 14px; flex-wrap: wrap; }
.reading {
  display: grid; gap: 28px;
  grid-template-columns: 220px minmax(0, 1fr);
  padding: 18px 0 40px;
}
.toc {
  position: sticky; top: 88px; align-self: start;
  display: grid; gap: 6px;
}
.toc a {
  text-decoration: none; color: var(--muted); font-size: 0.9rem; font-weight: 600;
  padding: 6px 10px; border-radius: 8px;
}
.toc a:hover, .toc a:focus { background: var(--bg-2); color: var(--ink); }
.prose .keybox { margin-bottom: 20px; background: var(--accent-soft); border-color: #e7d19a; }
.prose .keybox ul { margin: 0; padding-left: 1.1rem; }
.prose h2 { margin-top: 1.8rem; }
.prose ol.steps { margin: 0 0 1rem; padding-left: 1.15rem; }
.prose ol.steps li { margin-bottom: 0.7rem; }
.prose .note {
  background: #eef4ff; border: 1px solid #c9daf5; border-radius: 12px; padding: 12px 14px; color: var(--muted);
}
.pager {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line);
}
.doc { padding: 28px 0 48px; max-width: 760px; }
.doc section { margin-top: 1.6rem; }

/* Footer */
.site-footer {
  background: var(--navy); color: #c9d6ef; margin-top: 20px; padding: 36px 0 22px;
}
.site-footer a { color: #f0b429; }
.site-footer a:hover { color: #ffd56a; }
.footer-grid {
  display: grid; gap: 22px;
  grid-template-columns: 1.4fr 1fr 1fr;
}
.site-footer .brand-name, .site-footer .brand { color: #fff; }
.site-footer nav { display: grid; gap: 8px; align-content: start; }
.site-footer nav a { text-decoration: none; font-weight: 600; }
.operator {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px; padding: 14px 16px;
}
.operator h2 { color: #fff; font-size: 1rem; font-family: var(--font-body); }
.operator ul { list-style: none; padding: 0; margin: 0 0 8px; }
.operator li { margin: 2px 0; }
.copy { margin-top: 22px; color: #8a97b0; font-size: 0.85rem; }

@media (max-width: 920px) {
  .hero-grid, .chapter-grid, .reading, .footer-grid, .stats { grid-template-columns: 1fr; }
  .toc { position: static; grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .main-nav { order: 3; flex-basis: 100%; }
}
@media (max-width: 560px) {
  .stats, .toc { grid-template-columns: 1fr; }
  .lang-list { grid-template-columns: 1fr; }
}
