:root {
  --bg: #FFFFFF;
  --inset: #F6F7F9;
  --border: #E2E6EE;
  --border-active: #0D1117;
  --ink: #0D1117;
  --ink-muted: #525C6E;
  --cobalt: #1D4ED8;
  --cobalt-hover: #1E40AF;
  --cobalt-soft: #EFF4FF;
  --cobalt-border: #BFDBFE;
  --warn-ink: #9A3412;
  --warn-bg: #FFF7ED;
  --warn-border: #FED7AA;
  --radius: 8px;
  --radius-sm: 6px;
  --font-sans: "Inter", "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  background: var(--bg);
  color: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Masthead */
.masthead {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
}

.brand__name {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.brand__tld {
  color: var(--cobalt);
}

.brand__tag {
  margin-left: 4px;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--inset);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.masthead__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.nav-link {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.btn-nav {
  min-height: 36px;
  padding: 7px 13px;
  font-size: 0.82rem;
}

.btn-cobalt {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #FFFFFF;
}

.btn-cobalt:hover {
  background: var(--cobalt-hover);
  border-color: var(--cobalt-hover);
}

.btn-outline {
  background: var(--bg);
  border-color: var(--border);
  color: var(--ink);
}

.btn-outline:hover {
  border-color: var(--border-active);
}

/* Typography & Section Rhythm */
.main {
  padding-top: 38px;
  padding-bottom: 56px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--cobalt);
  text-transform: uppercase;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.mono-date {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.mono-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--cobalt);
  font-variant-numeric: tabular-nums;
}

/* Hero */
.hero {
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

.hero__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.hero__count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.hero__title {
  margin: 0 0 14px;
  max-width: 820px;
  font-size: clamp(1.95rem, 4.4vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 850;
  color: var(--ink);
}

.hero__lead {
  margin: 0 0 24px;
  max-width: 720px;
  font-size: 1.04rem;
  color: var(--ink-muted);
  line-height: 1.58;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Sections */
.section {
  padding-top: 40px;
}

.section-head {
  margin-bottom: 18px;
}

.section-title {
  margin: 4px 0 6px;
  font-size: 1.48rem;
  line-height: 1.18;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--ink);
}

.section-sub {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
  max-width: 680px;
}

/* Interactive Slide & Eligibility Decoder */
.decoder-shell {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 16px;
  align-items: start;
}

.decoder-controls {
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.decoder-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.decoder-block--ruled {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.reset-link {
  background: none;
  border: 0;
  padding: 2px 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  text-decoration: underline;
  cursor: pointer;
}

.reset-link:hover {
  color: var(--cobalt);
}

.dec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.dec-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.dec-pill:hover {
  border-color: var(--border-active);
}

.dec-pill.is-active {
  background: var(--cobalt-soft);
  border-color: var(--cobalt);
}

.dec-pill--issue.is-active {
  background: var(--warn-bg);
  border-color: var(--warn-ink);
}

.dec-pill__title {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
}

.dec-pill.is-active .dec-pill__title {
  color: var(--cobalt);
}

.dec-pill--issue.is-active .dec-pill__title {
  color: var(--warn-ink);
}

.dec-pill__sub {
  font-size: 0.74rem;
  color: var(--ink-muted);
  line-height: 1.3;
}

.decoder-panel {
  background: var(--bg);
  border: 1px solid var(--border-active);
  border-radius: var(--radius);
  padding: 20px;
}

.decoder-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.score-pill {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cobalt-border);
  background: var(--cobalt-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--cobalt);
  font-variant-numeric: tabular-nums;
}

.score-pill.is-warn {
  border-color: var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn-ink);
}

.decoder-panel__title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.decoder-panel__copy {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.decoder-list {
  margin: 0 0 14px;
  padding-left: 18px;
  font-size: 0.84rem;
  color: var(--ink);
}

.decoder-list li {
  margin-bottom: 6px;
}

.decoder-guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.decoder-guide-links:empty {
  display: none;
}

.decoder-guide-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--inset);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--cobalt);
  text-decoration: none;
}

.decoder-guide-chip:hover {
  border-color: var(--cobalt);
}

.decoder-cta {
  width: 100%;
}

/* Glossary Table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.gloss-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.gloss-table th,
.gloss-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.gloss-table thead th {
  background: var(--inset);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.gloss-table tbody tr:last-child th,
.gloss-table tbody tr:last-child td {
  border-bottom: 0;
}

.gloss-name {
  font-weight: 750;
  color: var(--ink);
  white-space: nowrap;
}

.gloss-link-cell {
  white-space: nowrap;
}

.inline-cobalt {
  color: var(--cobalt);
  font-weight: 650;
  text-decoration: none;
}

.inline-cobalt:hover {
  text-decoration: underline;
}

.inline-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--border);
}

.inline-link:hover {
  color: var(--cobalt);
  text-decoration-color: var(--cobalt);
}

/* Editorial Recommendation Callout */
.rec-callout {
  background: var(--inset);
  border: 1px solid var(--border-active);
  border-radius: var(--radius);
  padding: 24px;
}

.rec-callout__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.rec-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cobalt-border);
  background: var(--cobalt-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--cobalt);
}

.rec-callout__title {
  margin: 0 0 8px;
  font-size: 1.32rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.rec-callout__body {
  margin: 0 0 18px;
  font-size: 0.94rem;
  color: var(--ink-muted);
  max-width: 780px;
}

.rec-callout__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* 20-Article Editorial Library */
.library-group + .library-group {
  margin-top: 38px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.article-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.14s ease;
}

.article-card:hover {
  border-color: var(--border-active);
}

.article-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.article-card__title {
  margin: 0 0 7px;
  font-size: 1rem;
  line-height: 1.28;
  letter-spacing: -0.02em;
  font-weight: 750;
}

.article-card__title a {
  color: var(--ink);
  text-decoration: none;
}

.article-card__title a:hover {
  color: var(--cobalt);
}

.article-card__desc {
  margin: 0 0 12px;
  font-size: 0.84rem;
  color: var(--ink-muted);
  line-height: 1.48;
  flex: 1 0 auto;
}

.article-card__read {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--cobalt);
  text-decoration: none;
}

.article-card__read:hover {
  text-decoration: underline;
}

/* Global Directory Box */
.dir-box {
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.dir-row--ruled {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.dir-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.dir-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.dir-pill:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
}

.dir-pill--all {
  background: var(--cobalt-soft);
  border-color: var(--cobalt-border);
  color: var(--cobalt);
}

.dir-code {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--cobalt);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--inset);
  padding: 13px 16px;
}

.faq-item summary {
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  color: var(--ink);
}

.faq-item p {
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: var(--inset);
  padding: 24px 0 36px;
}

.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.footer__brand {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__nav a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
}

.footer__nav a:hover {
  color: var(--cobalt);
}

.disclaimer {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

@media (max-width: 820px) {
  .decoder-shell,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .brand__tag {
    display: none;
  }
}

@media (max-width: 520px) {
  .dec-grid {
    grid-template-columns: 1fr;
  }

  .masthead__nav {
    gap: 10px;
  }

  .gloss-name {
    white-space: normal;
  }
}
