:root {
  --bg: #f6f3ec;
  --ink: #17211f;
  --muted: #62706c;
  --line: #dde4de;
  --panel: #ffffff;
  --green: #1f7a5b;
  --blue: #315fc4;
  --gold: #c88718;
  --red: #c84c3c;
  --shadow: 0 22px 60px rgba(24, 33, 31, 0.1);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
a { color: inherit; }
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 28px;
  border-bottom: 1px solid rgba(23, 33, 31, 0.1);
  background: rgba(246, 243, 236, 0.88);
  backdrop-filter: blur(16px);
}
.logo {
  font-weight: 900;
  text-decoration: none;
}
.site-nav nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.site-nav nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  font-weight: 750;
  font-size: 0.9rem;
}
.hero {
  min-height: 42vh;
  display: grid;
  align-content: center;
  padding: 72px 28px 42px;
  background:
    linear-gradient(110deg, rgba(31, 122, 91, 0.13), transparent 45%),
    linear-gradient(290deg, rgba(49, 95, 196, 0.12), transparent 48%),
    #fffaf0;
  border-bottom: 1px solid var(--line);
}
.hero > * {
  width: min(1120px, 100%);
  margin-left: auto;
  margin-right: auto;
}
.kicker {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: 0;
}
.hero p:last-child {
  max-width: 760px;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}
.content-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 28px auto 80px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
}
.content-shell.no-toc {
  display: block;
}
.content-shell.no-toc .prose {
  width: 100%;
}
.toc {
  position: sticky;
  top: 82px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.toc span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}
.toc a {
  display: block;
  padding: 7px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  line-height: 1.25;
}
.toc a:hover { color: var(--green); }
.toc .level-2 { padding-left: 10px; }
.prose {
  min-width: 0;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.prose h1, .prose h2, .prose h3 {
  line-height: 1.15;
  letter-spacing: 0;
}
.prose h1 { font-size: 2.4rem; margin-top: 0; }
.prose h2 {
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 1.65rem;
}
.prose h3 {
  margin-top: 30px;
  font-size: 1.18rem;
}
.prose p, .prose li { color: #33413d; }
.prose code {
  padding: 2px 5px;
  border-radius: 6px;
  background: #eef4f1;
}
blockquote {
  margin: 20px 0;
  padding: 18px 20px;
  border-left: 5px solid var(--green);
  background: #f1f7f4;
  border-radius: 8px;
  font-weight: 700;
}
.table-card {
  overflow-x: auto;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}
th, td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  background: #f1f7f4;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}
tr:last-child td { border-bottom: 0; }
.repertoire-section {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.repertoire-section summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}
.repertoire-section summary::-webkit-details-marker {
  display: none;
}
.repertoire-section summary::after {
  content: "+";
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green);
  font-size: 1.1rem;
}
.repertoire-section[open] summary {
  border-bottom: 1px solid var(--line);
  background: #f8fbf8;
}
.repertoire-section[open] summary::after {
  content: "−";
}
.repertoire-section-body {
  padding: 2px 16px 16px;
}
.repertoire-section-body .table-card {
  margin-bottom: 0;
  box-shadow: none;
}
.home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stat, .feature-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.stat {
  padding: 18px;
}
.stat span {
  color: var(--muted);
  font-weight: 850;
  font-size: 0.85rem;
}
.stat strong {
  display: block;
  margin: 8px 0;
  font-size: 2.4rem;
  line-height: 1;
}
.stat p {
  margin: 0;
  color: var(--muted);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.feature-card {
  display: block;
  padding: 26px;
  text-decoration: none;
}
.feature-card span {
  color: var(--gold);
  font-weight: 950;
}
.feature-card h2 {
  margin: 10px 0 8px;
  font-size: 1.8rem;
}
.feature-card p {
  margin: 0;
  color: var(--muted);
}
@media (max-width: 980px) {
  .content-shell { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; }
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .site-nav { align-items: stretch; flex-direction: column; padding: 14px 16px; }
  .hero { padding: 54px 18px 32px; }
  .prose { padding: 22px; }
  .home-grid, .feature-grid { grid-template-columns: 1fr; }
}
