:root {
  --bone: #EFEDE4; --bone-2: #E7E4D9; --paper: #F7F5EE;
  --ink: #16140E; --ink-2: #46433B; --ink-3: #6E6A5C;
  --line: rgba(22,20,14,0.14); --line-2: rgba(22,20,14,0.08);
  --green: #1F7A4D; --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --maxw: 1340px; --pad: clamp(1.25rem, 5vw, 4rem);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bone); color: var(--ink); line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); width: 100%; }
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(239,237,228,0.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-bar { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-logo { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 0.5rem; }
.nav-logo-mark { font-family: 'Source Serif 4', serif; font-weight: 600; font-size: 1.25rem; }
.nav-logo-sub { font-size: 0.58rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); border-left: 1px solid var(--line); padding-left: 0.6rem; }
.nav-back { font-size: 0.82rem; font-weight: 500; color: var(--ink); text-decoration: none; }
.nav-back:hover { opacity: 0.7; }
.page { padding: clamp(2.5rem, 6vw, 4.5rem) 0 4rem; }
.eyebrow { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
h1 { font-family: 'Source Serif 4', serif; font-weight: 500; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -0.02em; margin-top: 0.5rem; max-width: 20ch; }
.lead { margin-top: 1rem; max-width: 62ch; color: var(--ink-2); line-height: 1.65; }
.source { margin-top: 0.75rem; font-size: 0.88rem; color: var(--ink-3); }
.source a { color: inherit; }
.toolbar { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; }
.search-wrap { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.search-wrap input {
  width: 100%; height: 42px; padding: 0 0.85rem 0 2.2rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  font: inherit; outline: none;
}
.search-wrap svg { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.btn-outline {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1rem; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink); font: inherit; font-size: 0.82rem; font-weight: 600;
  text-decoration: none; transition: background 0.25s var(--ease);
}
.btn-outline:hover { background: var(--paper); }
.table-wrap { margin-top: 1.25rem; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: white; }
table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 0.92rem; }
thead { background: rgba(22,20,14,0.04); border-bottom: 1px solid var(--line); }
th, td { text-align: left; padding: 0.85rem 1rem; vertical-align: top; }
tbody tr { border-top: 1px solid var(--line-2); }
tbody tr:nth-child(even) { background: rgba(22,20,14,0.02); }
.expand-btn {
  width: 28px; height: 28px; border: none; border-radius: 6px;
  background: var(--green); color: white; cursor: pointer; font-size: 1rem; line-height: 1;
}
.expand-btn:hover { filter: brightness(0.95); }
.detail-box { margin: 0.5rem 0 0.75rem 2.5rem; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.detail-head { background: #dbeafe; padding: 0.55rem 0.85rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #0c4a6e; }
.detail-body { padding: 0.85rem; font-size: 0.88rem; color: var(--ink-2); }
.detail-body dl { display: grid; gap: 0.75rem; }
.detail-body dt { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.detail-body dd { margin-top: 0.15rem; color: var(--ink); line-height: 1.55; }
.detail-body ul { margin: 0.5rem 0 0 1.1rem; }
.detail-body code { font-size: 0.78rem; word-break: break-all; background: var(--paper); padding: 0.15rem 0.35rem; border-radius: 4px; }
.link-row { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; margin-top: 0.35rem; }
.link-row a, .link-row button {
  font-size: 0.78rem; color: var(--ink); background: none; border: none; cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 3px;
}
.filters-panel { margin-top: 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: white; padding: 1rem; }
.filters-title { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.75rem; }
.filters-grid { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
.filters-grid label { font-size: 0.82rem; color: var(--ink-2); display: flex; flex-direction: column; gap: 0.35rem; }
.filters-grid select { height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 0.65rem; font: inherit; background: var(--paper); }
.filters-grid label.wide { grid-column: span 1; }
.flags-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.75rem; }
.flag-btn, .view-btn { border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 0.75rem; font-size: 0.75rem; background: transparent; cursor: pointer; font: inherit; }
.flag-btn.active, .view-btn.active { background: var(--green); border-color: var(--green); color: white; }
.view-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px solid var(--line-2); }
.view-label, .count-label { font-size: 0.72rem; text-transform: uppercase; color: var(--ink-3); }
.count-label { margin-left: auto; }
.classtrib-root { margin-top: 1rem; }
.group-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 0.65rem; background: white; }
.group-head { width: 100%; display: flex; align-items: center; gap: 0.65rem; padding: 0.75rem 1rem; border: none; background: rgba(22,20,14,0.04); cursor: pointer; text-align: left; font: inherit; }
.group-count { margin-left: auto; font-size: 0.75rem; color: var(--ink-3); }
.group-body { border-top: 1px solid var(--line-2); }
.group-row { padding: 0.55rem 1rem; border-top: 1px solid var(--line-2); }
.row-toggle { width: 100%; display: flex; gap: 0.55rem; align-items: flex-start; border: none; background: none; cursor: pointer; text-align: left; font: inherit; font-size: 0.88rem; }
.expand-btn.sm { width: 22px; height: 22px; font-size: 0.85rem; }
.tag { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.45rem; font-size: 0.72rem; margin: 0.1rem; }
.tag-green { border-color: rgba(31,122,77,0.35); background: rgba(31,122,77,0.08); color: #14532d; }
@media (min-width: 768px) { .filters-grid { grid-template-columns: 1fr 2fr 1fr; } }
.note { margin-top: 1rem; font-size: 0.78rem; color: var(--ink-3); line-height: 1.55; max-width: 70ch; }
.empty { text-align: center; color: var(--ink-3); padding: 2rem 1rem; }
.overflow { overflow-x: auto; }
.cff-inline-panel { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line-2); }
.cff-inline-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.65rem; }
.cff-inline-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #14532d; }
.cff-full-link { font-size: 0.78rem; color: var(--ink); text-underline-offset: 3px; }
.cff-inline-search { margin-top: 0.35rem; max-width: 100%; }
.cff-inline-count { margin-top: 0.45rem; font-size: 0.72rem; color: var(--ink-3); }
.cff-inline-scroll { margin-top: 0.55rem; max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.cff-inline-table { min-width: 560px; font-size: 0.78rem; }
.cff-inline-table thead { position: sticky; top: 0; z-index: 1; background: rgba(22,20,14,0.06); }
.cff-inline-table td.mono, .cff-inline-table th { white-space: nowrap; }
.cff-inline-table td.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.74rem; }
.cff-inline-table tr.alt { background: rgba(22,20,14,0.02); }
@media (max-width: 640px) { th, td { padding: 0.7rem 0.65rem; } .detail-box { margin-left: 0.5rem; } }
