:root {
  --bg: #f6f7fb;
  --panel: rgba(255, 255, 255, 0.86);
  --card: rgba(255, 255, 255, 0.95);
  --card-solid: #ffffff;
  --text: #0b0c0f;
  --text-2: #1f2633;
  --muted: #5b6474;
  --border: #e1e6ef;
  --border-strong: #cdd5e3;
  --accent: #0ea5e9;
  --accent-2: #a78bfa;
  --accent-3: #f59e0b;
  --accent-soft: #d4effb;
  --accent-2-soft: #f1ecfe;
  --accent-3-soft: #fdf0d5;
  --link: #0369a1;
  --link-hover: #075985;
  --h1-grad: linear-gradient(90deg, #0284c7, #7c3aed 55%, #d97706);
  --line-grad: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  --bg-1: #dbeafe;
  --bg-2: #fae8ff;
  --bg-3: #fef3c7;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-1: 0 2px 10px rgba(16, 24, 40, 0.08);
  --shadow-2: 0 14px 30px rgba(16, 24, 40, 0.16);
  --shadow-glow: 0 0 0 1px rgba(14, 165, 233, 0.25), 0 12px 35px rgba(14, 165, 233, 0.18);
  --container: 1180px;
  --measure: 44rem;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0a0f1c;
  --panel: rgba(13, 19, 34, 0.84);
  --card: rgba(17, 24, 41, 0.92);
  --card-solid: #111829;
  --text: #eef1f7;
  --text-2: #d3d9e5;
  --muted: #a1abbe;
  --border: #243049;
  --border-strong: #33405c;
  --accent-soft: #0b3550;
  --accent-2-soft: #2a2152;
  --accent-3-soft: #3b2a0c;
  --link: #7dd3fc;
  --link-hover: #bae6fd;
  --h1-grad: linear-gradient(90deg, #38bdf8, #c4b5fd 55%, #fbbf24);
  --bg-1: #0d2547;
  --bg-2: #2c1340;
  --bg-3: #2a1d08;
  --shadow-1: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 14px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 0 1px rgba(56, 189, 248, 0.3), 0 12px 35px rgba(56, 189, 248, 0.16);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at -10% -20%, var(--bg-1) 0%, transparent 50%),
    radial-gradient(900px 600px at 110% 0%, var(--bg-2) 0%, transparent 55%),
    radial-gradient(900px 700px at 50% 120%, var(--bg-3) 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  font: 16px/1.6 var(--font);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-inline-size: 100%;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 10px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0.1px;
}

h1 {
  font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.25rem);
  background: var(--h1-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.06em;
}

h2 {
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.9rem);
}

h3 {
  font-size: 1.08rem;
}

p {
  margin: 0 0 1em;
}

kbd {
  font-family: var(--mono);
  font-size: 0.82em;
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--card-solid);
  color: var(--text);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  background: var(--card-solid);
  color: var(--text);
  font-weight: 700;
  box-shadow: var(--shadow-2);
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

main {
  flex: 1;
  padding-bottom: 24px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--panel);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.15px;
  white-space: nowrap;
}

.brand:hover {
  color: var(--text);
}

.brand svg {
  width: 32px;
  height: 32px;
  flex: none;
}

.site-nav ul {
  display: flex;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  color: var(--text-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.93rem;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.site-nav a:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.site-nav a[aria-current="page"],
.site-nav a[data-current="true"] {
  background: linear-gradient(90deg, var(--accent-soft), var(--accent-2-soft));
  color: var(--text);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  padding: 0;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: transform 0.16s var(--ease), border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.icon-btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent-2);
  box-shadow: 0 10px 26px rgba(167, 139, 250, 0.25);
  color: var(--text);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.menu-btn {
  display: none;
}

.theme-btn .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-btn .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-btn .icon-moon {
  display: none;
}

@media (max-width: 1120px) {
  .menu-btn {
    display: inline-grid;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    background: var(--card-solid);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-2);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    padding: 10px 16px 16px;
    max-width: var(--container);
    margin-inline: auto;
  }

  .site-nav a {
    padding: 11px 14px;
    font-size: 1rem;
  }
}

.breadcrumbs {
  padding-top: 22px;
  font-size: 0.9rem;
  color: var(--muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs li + li::before {
  content: "/";
  color: var(--border-strong);
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--link);
  text-decoration: underline;
}

.hero {
  text-align: center;
  padding: 60px 0 30px;
  display: grid;
  justify-items: center;
  gap: 14px;
}

.hero h1 {
  font-size: clamp(2.6rem, 1.6rem + 4vw, 4.4rem);
  letter-spacing: -0.5px;
}

.hero .tagline {
  max-width: 62ch;
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
  color: var(--muted);
  margin: 0;
}

.search-form {
  inline-size: min(760px, 100%);
  margin: 10px auto 0;
  position: relative;
}

.search {
  inline-size: 100%;
  padding: 14px 120px 14px 46px;
  font: inherit;
  font-size: 1.02rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-1);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.search::placeholder {
  color: var(--muted);
  opacity: 0.9;
}

.search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft);
  transform: translateY(-1px);
}

.search-form .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

.search-form .search-submit {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
}

.search-form.compact .search {
  padding-right: 16px;
}

.search-tip {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 6px 2px 0;
  text-align: left;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  appearance: none;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, var(--card-solid), var(--accent-soft));
  color: var(--text);
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.15px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.1);
  transition: transform 0.14s var(--ease), box-shadow 0.14s var(--ease), border-color 0.14s var(--ease), background 0.14s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  color: var(--text);
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--card-solid), var(--accent-2-soft));
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.18), 0 0 0 3px var(--accent-soft);
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  border-color: transparent;
  color: #ffffff;
  background: linear-gradient(90deg, #0284c7, #7c3aed);
}

.btn-primary:hover {
  color: #ffffff;
  background: linear-gradient(90deg, #0369a1, #6d28d9);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.tags-label {
  color: var(--muted);
  font-size: 0.92rem;
  margin-right: 2px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--card-solid), var(--accent-soft));
  color: var(--text);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: var(--shadow-1);
  transition: transform 0.16s var(--ease), border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.tag:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.18);
}

.tag[aria-pressed="true"] {
  border-color: transparent;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent-2-soft));
  box-shadow: inset 0 0 0 1px var(--accent), 0 8px 22px rgba(167, 139, 250, 0.25);
}

.tag.clear {
  opacity: 0.85;
}

.tag .count {
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.dot {
  inline-size: 9px;
  block-size: 9px;
  border-radius: 50%;
  background: var(--c, var(--accent));
  flex: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, var(--accent)) 22%, transparent);
}

.section {
  margin-top: 56px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.more-link {
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.more-link:hover {
  text-decoration: underline;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  align-items: stretch;
}

.grid.wide {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-1);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
  overflow: hidden;
  min-width: 0;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2), var(--accent-3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.22;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: var(--shadow-2), var(--shadow-glow);
}

.card[hidden] {
  display: none;
}

.card-type {
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.card-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.card-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.08rem;
  line-height: 1.3;
  overflow-wrap: break-word;
  hyphens: manual;
}

.card-title a {
  color: var(--text);
  text-decoration: none;
}

.card-title a:hover {
  color: var(--link);
}

.card-title a.stretched::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card p {
  margin: 10px 0 12px;
  color: var(--text-2);
  font-size: 0.96rem;
  line-height: 1.55;
}

.card .link-button {
  margin-top: auto;
}

.card-accent {
  height: 5px;
  margin-top: 12px;
  border-radius: var(--radius-pill);
  background: var(--line-grad);
  opacity: 0.92;
}

.pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.card-head .pills {
  justify-content: flex-start;
  max-width: 100%;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.3;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: linear-gradient(90deg, var(--card-solid), var(--accent-soft));
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.12);
}

a.pill:hover {
  border-color: var(--accent);
  color: var(--text);
}

.pill .dot {
  inline-size: 7px;
  block-size: 7px;
  box-shadow: none;
}

.pills.lg .pill {
  font-size: 13.5px;
  padding: 6px 12px;
}

.link-button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  text-decoration: none;
  color: var(--link);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  font-size: 0.94rem;
  transition: transform 0.18s var(--ease), color 0.18s var(--ease);
  position: relative;
  z-index: 2;
}

.link-button:hover {
  transform: translateX(2px);
  color: var(--link-hover);
}

.link-button svg {
  width: 15px;
  height: 15px;
}

.card .details {
  margin-top: 10px;
}

.card .details blockquote {
  margin: 0;
  padding-left: 12px;
  border-left: 3px solid var(--border-strong);
  font-style: italic;
  color: var(--text-2);
  font-size: 0.93rem;
}

.card .details .source-line {
  margin: 10px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-1);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

a.stat:hover {
  transform: translateY(-2px);
  color: var(--text);
  box-shadow: var(--shadow-2), var(--shadow-glow);
}

.stat strong {
  display: block;
  font-size: 1.9rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  background: var(--h1-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  color: var(--muted);
  font-size: 0.92rem;
}

.topic-card .topic-count {
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.page-head {
  padding: 34px 0 6px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.page-head .dek {
  max-width: 68ch;
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0;
}

.page-head.left {
  text-align: left;
  justify-items: start;
}

.filter-bar {
  margin: 22px auto 8px;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.filter-bar .search {
  padding-right: 16px;
}

.filter-status {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  margin: 4px 0 0;
  min-height: 1.4em;
}

.az-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 18px 0 6px;
  padding: 0;
  list-style: none;
}

.az-nav a,
.az-nav span {
  min-inline-size: 36px;
  block-size: 36px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow: var(--shadow-1);
}

.az-nav a:hover,
.az-nav a[aria-current="page"] {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--card-solid), var(--accent-soft));
}

.az-nav span {
  color: var(--muted);
  opacity: 0.45;
  box-shadow: none;
}

.letter-group {
  margin-top: 34px;
}

.letter-group[hidden] {
  display: none;
}

.letter-group > h2 {
  font-size: 1.6rem;
  padding-bottom: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.letter-group > h2 .letter-badge {
  display: inline-grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #7c3aed);
  font-size: 1.3rem;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 30px 0;
}

.entry-header {
  padding: 18px 0 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 750;
  color: var(--muted);
  margin-bottom: 10px;
}

.eyebrow .sep {
  inline-size: 4px;
  block-size: 4px;
  border-radius: 50%;
  background: var(--border-strong);
}

.entry-header h1 {
  max-width: 24ch;
}

.aka {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.entry-header .pills {
  margin-top: 16px;
}

.accent-bar {
  height: 6px;
  border-radius: var(--radius-pill);
  margin-top: 18px;
  background: var(--line-grad);
}

.entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 36px;
  align-items: start;
  margin-top: 28px;
}

@media (max-width: 980px) {
  .entry-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.lead {
  font-size: 1.24rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 22px;
  max-width: var(--measure);
  font-weight: 450;
}

.prose {
  max-width: var(--measure);
}

.prose p {
  font-size: 1.065rem;
  line-height: 1.78;
  color: var(--text-2);
  margin: 0 0 1.15em;
}

.prose h2 {
  margin: 1.9em 0 0.6em;
  font-size: 1.55rem;
}

.prose ul {
  padding-left: 1.2em;
  margin: 0 0 1.2em;
}

.prose li {
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 0.45em;
}

.prose a,
.lead a {
  font-weight: 550;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-1);
}

.panel + .panel {
  margin-top: 18px;
}

.panel h2,
.panel-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin: 0 0 12px;
  font-weight: 750;
}

.keypoints {
  margin: 30px 0;
  max-width: var(--measure);
  position: relative;
}

.keypoints::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  inline-size: 4px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--accent), var(--accent-2), var(--accent-3));
}

.keypoints ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.keypoints li {
  position: relative;
  padding-left: 22px;
  margin: 0 0 10px;
  line-height: 1.6;
  color: var(--text-2);
}

.keypoints li:last-child {
  margin-bottom: 0;
}

.keypoints li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.source-quote {
  margin: 30px 0;
  max-width: var(--measure);
}

.source-quote blockquote {
  margin: 0;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--accent-2);
  font-style: italic;
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--text-2);
}

.source-quote figcaption {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: var(--measure);
  margin: 26px 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--accent-3) 45%, var(--border));
  background: var(--accent-3-soft);
  color: var(--text-2);
  font-size: 0.95rem;
}

.notice svg {
  inline-size: 20px;
  block-size: 20px;
  flex: none;
  margin-top: 2px;
  color: #b45309;
}

[data-theme="dark"] .notice svg {
  color: #fbbf24;
}

.notice p {
  margin: 0;
}

.aside {
  position: sticky;
  top: 86px;
}

@media (max-width: 980px) {
  .aside {
    position: static;
  }
}

.glance dl {
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr;
  gap: 9px 14px;
  margin: 0;
  font-size: 0.94rem;
}

.glance dt {
  color: var(--muted);
}

.glance dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.ext {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ext svg {
  inline-size: 14px;
  block-size: 14px;
  flex: none;
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.link-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.link-list a:hover {
  text-decoration: underline;
}

.link-list svg {
  inline-size: 14px;
  block-size: 14px;
  flex: none;
}

.cite-box {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.55;
  background: color-mix(in srgb, var(--accent-soft) 45%, var(--card-solid));
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-2);
  overflow-wrap: anywhere;
  margin: 0;
}

.copy-btn {
  margin-top: 10px;
}

.backlinks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.backlinks a {
  display: inline-block;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--card);
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text);
}

.backlinks a:hover {
  border-color: var(--accent);
  color: var(--link);
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 48px;
}

.pager a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-1);
  transition: transform 0.16s var(--ease), border-color 0.16s var(--ease);
}

.pager a:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--text);
}

.pager small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 2px;
}

.pager .next {
  text-align: right;
  grid-column: 2;
}

.pager strong {
  font-weight: 700;
}

.topic-hero {
  display: grid;
  gap: 12px;
  padding: 20px 0 0;
}

.topic-swatch {
  inline-size: 54px;
  block-size: 54px;
  border-radius: 16px;
  background: var(--c);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--c) 40%, transparent);
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.05rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 0.9rem;
  color: var(--text-2);
}

.chips strong {
  font-variant-numeric: tabular-nums;
}

.bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.bars li {
  display: grid;
  grid-template-columns: 150px 1fr 36px;
  gap: 10px;
  align-items: center;
  font-size: 0.92rem;
}

.bars a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bars a:hover {
  color: var(--link);
}

.bar {
  block-size: 10px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--border) 60%, transparent);
  overflow: hidden;
}

.bar span {
  display: block;
  block-size: 100%;
  border-radius: inherit;
  background: var(--c);
}

.bars .num {
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 14px 18px;
  box-shadow: var(--shadow-1);
}

.faq details + details {
  margin-top: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 1.3rem;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.2s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin: 10px 0 0;
  color: var(--text-2);
  line-height: 1.7;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

@media (max-width: 900px) {
  .two-col {
    grid-template-columns: minmax(0, 1fr);
  }
}

.article {
  max-width: 780px;
  margin-inline: auto;
}

.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 780px);
  gap: 44px;
  justify-content: center;
  align-items: start;
  margin-top: 30px;
}

@media (max-width: 1040px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    position: static !important;
  }
}

.toc {
  position: sticky;
  top: 90px;
  font-size: 0.92rem;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
}

.toc a {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-2);
  line-height: 1.35;
}

.toc a::before {
  content: counter(toc);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.toc a:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 12px;
}

.takeaways {
  margin: 34px 0;
}

.takeaways ol {
  margin: 0;
  padding-left: 1.3em;
}

.takeaways li {
  margin-bottom: 8px;
  line-height: 1.65;
  color: var(--text-2);
}

.timeline {
  position: relative;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 76px;
  top: 6px;
  bottom: 6px;
  inline-size: 3px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--accent), var(--accent-2), var(--accent-3));
  opacity: 0.6;
}

.timeline > li {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 34px;
  margin-bottom: 14px;
}

.timeline .year {
  font-weight: 800;
  font-size: 1.05rem;
  text-align: right;
  padding-top: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.timeline .event {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow-1);
}

.timeline .event::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 18px;
  inline-size: 13px;
  block-size: 13px;
  border-radius: 50%;
  background: var(--c, var(--accent));
  border: 3px solid var(--card-solid);
  box-shadow: 0 0 0 1px var(--border-strong);
}

.timeline .event p {
  margin: 0 0 6px;
  color: var(--text-2);
}

.timeline .event .event-links {
  margin: 0;
  font-size: 0.92rem;
}

.timeline .event a {
  font-weight: 650;
  font-size: 0.92rem;
  text-decoration: none;
}

.timeline .event a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .timeline::before {
    left: 8px;
  }

  .timeline > li {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-left: 30px;
  }

  .timeline .year {
    text-align: left;
    padding-top: 0;
  }

  .timeline .event::before {
    left: -28px;
    top: -22px;
  }
}

.decade-grid .card strong {
  font-size: 1.5rem;
}

.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.entry-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

.entry-list .row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}

.entry-list a {
  font-weight: 700;
  text-decoration: none;
  font-size: 1.02rem;
}

.entry-list a:hover {
  text-decoration: underline;
}

.entry-list p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.94rem;
}

.type-badge {
  font-size: 0.7rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
}

.directory-cols {
  columns: 3 260px;
  column-gap: 32px;
}

.directory-cols section {
  break-inside: avoid;
  margin-bottom: 26px;
}

.directory-cols h3 {
  margin-bottom: 8px;
}

.directory-cols ul {
  margin: 0;
  padding-left: 1.1em;
}

.directory-cols li {
  margin-bottom: 3px;
}

.viz-wrap {
  position: relative;
  margin-top: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.viz {
  inline-size: 100%;
  block-size: min(82vh, 880px);
  min-block-size: 480px;
  touch-action: none;
  cursor: grab;
}

.viz.chord {
  cursor: default;
}

.viz:active {
  cursor: grabbing;
}

.viz text {
  font-family: var(--font);
  fill: var(--text);
}

.viz-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
}

.viz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--text-2);
}

.viz-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.viz-help {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 12px 0 0;
}

.zoom-controls {
  position: absolute;
  right: 12px;
  top: 12px;
  display: grid;
  gap: 6px;
  z-index: 3;
}

.chord-tooltip {
  position: absolute;
  z-index: 5;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  padding: 10px 12px;
  min-width: 180px;
  max-width: 300px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s var(--ease);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.chord-tooltip.is-visible {
  opacity: 1;
}

.chord-tooltip__title {
  font-weight: 800;
  margin-bottom: 4px;
  font-size: 14px;
}

.chord-tooltip__meta {
  color: var(--muted);
  margin-bottom: 8px;
}

.chord-tooltip__sub {
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}

.chord-tooltip__list {
  display: grid;
  gap: 4px;
}

.chord-tooltip__row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.chord-tooltip__cat {
  font-weight: 600;
}

.chord-tooltip__val {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.error-hero {
  text-align: center;
  padding: 70px 0 20px;
  display: grid;
  justify-items: center;
  gap: 14px;
}

.error-code {
  font-size: clamp(5rem, 3rem + 10vw, 9rem);
  font-weight: 850;
  line-height: 1;
  background: var(--h1-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -2px;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--muted);
}

.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 40px 20px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 28px;
}

@media (max-width: 860px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

.footer-brand p {
  margin: 12px 0 0;
  max-width: 42ch;
  font-size: 0.94rem;
}

.site-footer h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text);
  margin: 4px 0 12px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
  transition: color 0.16s var(--ease);
}

.site-footer a:hover {
  color: var(--text);
}

.site-footer .brand,
.site-footer .brand:hover {
  color: var(--text);
}

.footer-bottom {
  max-width: var(--container);
  margin-inline: auto;
  padding: 18px 20px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
}

.footer-accent {
  height: 3px;
  background: var(--line-grad);
  opacity: 0.8;
}

.to-top {
  position: fixed;
  inset-block-end: 18px;
  inset-inline-end: 18px;
  z-index: 90;
  inline-size: 46px;
  block-size: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s, border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  border-color: var(--accent);
  box-shadow: 0 14px 34px rgba(14, 165, 233, 0.28);
  transform: translateY(-2px);
}

.to-top svg {
  width: 20px;
  height: 20px;
}

.muted {
  color: var(--muted);
}

.center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

.narrow {
  max-width: 820px;
  margin-inline: auto;
}

.results-meta {
  text-align: center;
  color: var(--muted);
  margin: 14px 0 20px;
  min-height: 1.5em;
}

.show-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

mark {
  background: color-mix(in srgb, var(--accent-3) 35%, transparent);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

@media (max-width: 640px) {
  .hero {
    padding-top: 40px;
  }

  .search {
    padding-right: 16px;
  }

  .search-form .search-submit {
    display: none;
  }

  .bars li {
    grid-template-columns: 110px 1fr 30px;
  }

  .pager {
    grid-template-columns: 1fr;
  }

  .pager .next {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .to-top,
  .skip-link,
  .breadcrumbs,
  .pager,
  .copy-btn,
  .filter-bar {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  h1 {
    color: #000000;
    background: none;
  }

  .card,
  .panel {
    box-shadow: none;
    break-inside: avoid;
  }

  .entry-layout {
    grid-template-columns: 1fr;
  }

  .aside {
    position: static;
  }
}
