:root {
  --bg: #f2eee6;
  --panel: #fffdf9;
  --panel-warm: #fbf6ee;
  --panel-cool: #f4f8fc;
  --ink: #1b2330;
  --muted: #5b6471;
  --line: rgba(28, 35, 48, 0.12);
  --blue: #214f94;
  --blue-deep: #163659;
  --blue-soft: #dbe8f7;
  --gold: #b18d33;
  --gold-soft: #f3e4b3;
  --brick-soft: #efe1dc;
  --shadow: 0 22px 55px rgba(20, 33, 53, 0.1);
  --max-width: 1180px;
  --article-width: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(33, 79, 148, 0.11), transparent 22%),
    radial-gradient(circle at top right, rgba(177, 141, 51, 0.12), transparent 18%),
    linear-gradient(180deg, #f7f3ea, var(--bg));
  font-family: Georgia, "Times New Roman", serif;
}

a {
  color: var(--blue);
}

a:hover {
  color: var(--blue-deep);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--ink);
  color: white;
  padding: 0.7rem 0.9rem;
  z-index: 10;
}

.site-shell {
  width: min(var(--max-width), calc(100vw - 28px));
  margin: 0 auto;
  padding: 20px 0 40px;
}

.site-header,
.hero-panel,
.content-panel,
.article-header,
.article-body,
.side-card,
.site-footer,
.continuity-note,
.feature-card,
.section-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.site-header,
.site-footer,
.hero-panel,
.content-panel,
.article-header,
.article-body,
.side-card {
  padding: 22px 24px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
  border-top: 4px solid var(--gold);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 253, 249, 0.92));
  backdrop-filter: blur(8px);
}

.brand-kicker,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  font: 700 0.78rem/1.2 "Helvetica Neue", Arial, sans-serif;
  margin: 0 0 8px;
}

.brand-title {
  display: inline-block;
  text-decoration: none;
  color: var(--ink);
  font: 700 clamp(1.7rem, 3vw, 2.2rem)/1.05 "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.02em;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-copy {
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: clamp(58px, 8vw, 82px);
  height: clamp(58px, 8vw, 82px);
  border-radius: 18px;
  padding: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 252, 0.9));
  border: 1px solid rgba(22, 54, 89, 0.12);
  box-shadow: 0 14px 28px rgba(20, 33, 53, 0.1);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-summary,
.site-footer p,
.continuity-note p,
.feature-card p,
.section-card p,
.article-note,
.article-meta,
.article-sidebar li span {
  color: var(--muted);
}

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

.top-nav a,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none;
  font: 600 0.95rem/1.2 "Helvetica Neue", Arial, sans-serif;
}

.top-nav a,
.button-link.button-link-secondary {
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

.button-link,
.top-nav a:first-child {
  background: linear-gradient(180deg, var(--blue), var(--blue-deep));
  border-color: transparent;
  color: white;
}

.hero-panel {
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(135deg, rgba(33, 79, 148, 0.08), transparent 42%),
    linear-gradient(180deg, #fffefb, #faf6ee);
  border-top: 5px solid var(--blue);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -7% -32px auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(177, 141, 51, 0.18), transparent 68%);
  pointer-events: none;
}

.hero-grid,
.article-layout {
  display: grid;
  gap: 20px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
  align-items: start;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-panel h1,
.article-header h1 {
  margin: 0 0 14px;
  font: 700 clamp(2rem, 4vw, 3rem)/1.05 "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.03em;
}

.lede {
  font-size: 1.08rem;
  line-height: 1.72;
  color: var(--muted);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.continuity-note {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 248, 252, 0.9));
  border: 1px solid rgba(22, 54, 89, 0.12);
}

.hero-note {
  position: relative;
  z-index: 1;
}

.content-panel {
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

.content-panel h2,
.continuity-note h2,
.side-card h2 {
  margin-top: 0;
  font: 700 1.2rem/1.2 "Helvetica Neue", Arial, sans-serif;
}

.lead-panel {
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.98), rgba(251, 246, 238, 0.98));
  border-top: 5px solid var(--gold);
}

.direction-panel {
  background:
    linear-gradient(180deg, rgba(244, 248, 252, 0.98), rgba(255, 255, 255, 0.98));
  border-top: 5px solid var(--blue-soft);
}

.roadmap-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 241, 233, 0.98));
  border-top: 5px solid rgba(177, 141, 51, 0.45);
}

.preview-panel {
  background:
    linear-gradient(180deg, rgba(244, 248, 252, 0.92), rgba(255, 255, 255, 0.96));
}

.feature-grid,
.section-grid {
  display: grid;
  gap: 16px;
}

.feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.section-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.feature-card,
.section-card {
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.feature-card h3,
.section-card h3 {
  margin-top: 0;
  font: 700 1.02rem/1.3 "Helvetica Neue", Arial, sans-serif;
}

.feature-card::before,
.section-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: var(--gold);
  opacity: 0.85;
}

.lead-panel .feature-card:nth-child(4n + 1),
.direction-panel .feature-card:nth-child(3n + 1),
.section-card:nth-child(4n + 1) {
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.98), white);
}

.lead-panel .feature-card:nth-child(4n + 2),
.direction-panel .feature-card:nth-child(3n + 2),
.section-card:nth-child(4n + 2) {
  background: linear-gradient(180deg, rgba(244, 248, 252, 0.98), white);
}

.lead-panel .feature-card:nth-child(4n + 3),
.direction-panel .feature-card:nth-child(3n + 3),
.section-card:nth-child(4n + 3) {
  background: linear-gradient(180deg, rgba(239, 225, 220, 0.55), white);
}

.lead-panel .feature-card:nth-child(4n + 4),
.section-card:nth-child(4n + 4) {
  background: linear-gradient(180deg, rgba(243, 228, 179, 0.32), white);
}

.article-layout {
  grid-template-columns: minmax(0, var(--article-width)) minmax(250px, 1fr);
  align-items: start;
}

.article-header {
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.98), rgba(255, 255, 255, 0.98));
  border-top: 5px solid var(--gold);
}

.article-body {
  line-height: 1.78;
  font-size: 1.08rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(251, 247, 240, 0.98));
  border-top: 4px solid rgba(33, 79, 148, 0.18);
}

.article-body p,
.article-body li,
.article-body blockquote {
  max-width: 68ch;
}

.article-body h2,
.article-body h3 {
  margin-top: 2rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.2;
  color: var(--blue-deep);
}

.article-body h2 {
  font-size: 1.45rem;
}

.article-body h3 {
  font-size: 1.15rem;
}

.article-body blockquote {
  margin: 1.4rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--gold);
  background: rgba(177, 141, 51, 0.08);
}

.article-body code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
  background: rgba(23, 56, 102, 0.08);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.claim-block {
  margin-bottom: 1.8rem;
  padding: 1.35rem 1.4rem 1.1rem;
  border: 1px solid rgba(22, 54, 89, 0.12);
  border-left: 6px solid var(--blue);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(219, 232, 247, 0.55), rgba(255, 255, 255, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.claim-block h2 {
  margin-top: 0;
  margin-bottom: 0.9rem;
  color: var(--blue-deep);
}

.claim-block p:first-of-type {
  margin-top: 0;
  font-size: 1.22rem;
  line-height: 1.55;
  color: var(--ink);
}

.claim-block p:first-of-type::before {
  content: "Claim at issue";
  display: block;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  font: 700 0.76rem/1.2 "Helvetica Neue", Arial, sans-serif;
}

.response-block {
  margin-bottom: 1.6rem;
}

.article-sidebar {
  position: sticky;
  top: 18px;
}

.side-card {
  margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 252, 0.92));
}

.side-card-links {
  border-top: 4px solid var(--blue);
}

.side-card-hooks {
  border-top: 4px solid var(--gold);
}

.link-list {
  padding-left: 1.1rem;
}

.link-list li + li {
  margin-top: 0.8rem;
}

.article-meta,
.article-note,
.footer-note {
  font-size: 0.95rem;
  line-height: 1.6;
}

.meta-link {
  word-break: break-word;
}

.site-footer {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.86);
  background:
    linear-gradient(180deg, #223247, #142236);
  border-color: rgba(255, 255, 255, 0.08);
}

.site-footer h2 {
  margin-top: 0;
  color: white;
  font: 700 1.1rem/1.2 "Helvetica Neue", Arial, sans-serif;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.88);
}

.site-footer a,
.site-footer strong,
.footer-note {
  color: rgba(255, 255, 255, 0.9);
}

.compact-list {
  margin: 0;
  padding-left: 1rem;
}

.compact-list li + li {
  margin-top: 0.5rem;
}

.notebook-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1rem 0 1.5rem;
  background: rgba(255, 255, 255, 0.84);
}

.notebook-panel h2,
.notebook-panel h3 {
  margin-top: 0;
}

.notebook-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.notebook-panel .meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.plain-list {
  padding-left: 1rem;
}

.plain-list li + li {
  margin-top: 0.5rem;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #e5b748;
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .site-header,
  .hero-grid,
  .article-layout,
  .notebook-grid {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }

  .site-header {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(var(--max-width), calc(100vw - 18px));
    padding-top: 12px;
  }

  .site-header,
  .site-footer,
  .hero-panel,
  .content-panel,
  .article-header,
  .article-body,
  .side-card {
    padding: 18px;
    border-radius: 18px;
  }

  .top-nav {
    width: 100%;
  }

  .brand-row {
    align-items: flex-start;
    gap: 12px;
  }

  .brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 14px;
  }

  .top-nav a,
  .button-link {
    width: 100%;
  }
}
