@import url("https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&family=Geist+Mono:wght@500;600;700&display=swap");

:root {
  --ink: #1a1a2e;
  --muted: #666779;
  --paper: #fbf9f4;
  --surface: #ffffff;
  --surface-low: #f5f2eb;
  --line: #e6e1d6;
  --blue: #003594;
  --blue-soft: rgba(0, 53, 148, 0.08);
  --night: #0f1b2d;
  --amber: #8a5a00;
  --green: #146c43;
  --clay: #a92d2d;
  --radius: 14px;
  --radius-small: 10px;
  --shadow: 0 12px 30px rgba(26, 26, 46, 0.07);
  color: var(--ink);
  background: var(--paper);
  font-family: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 53, 148, 0.07), transparent 30rem),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgba(0, 53, 148, 0.28);
  outline-offset: 3px;
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 2px rgba(26, 26, 46, 0.05);
  backdrop-filter: blur(14px) saturate(1.04);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  width: fit-content;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--radius-small);
  color: #ffffff;
  background: var(--blue);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: -0.04em;
}

.header-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.header-links a {
  border-radius: 9px;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.header-links .header-cta {
  color: #ffffff;
  background: var(--blue);
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.breadcrumb a {
  color: inherit;
}

.article-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.32fr);
  gap: 28px;
  align-items: end;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 62px);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.article-hero > *,
.article-layout > *,
.article-body,
.toc,
.related,
.article-cta {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--ink);
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 5.7vw, 5rem);
  line-height: 0.98;
}

.lede {
  max-width: 760px;
  margin: 0;
  color: #38394a;
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
  line-height: 1.55;
}

.article-meta {
  display: grid;
  gap: 10px;
  border-left: 3px solid var(--blue);
  padding: 4px 0 4px 18px;
}

.article-meta span,
.article-meta time {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.article-meta strong {
  font-size: 1rem;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 780px) minmax(230px, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 18px;
}

.article-body {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 4.5vw, 54px);
  background: var(--surface);
  overflow: hidden;
}

.article-body > :first-child {
  margin-top: 0;
}

.article-body p,
.article-body li {
  color: #303143;
  font-size: 1.03rem;
  line-height: 1.72;
}

.article-body p {
  margin: 0 0 1.2em;
}

.article-body h2 {
  margin: 2.1em 0 0.72em;
  padding-top: 0.2em;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.08;
  scroll-margin-top: 100px;
}

.article-body h3 {
  margin: 1.65em 0 0.55em;
  font-size: 1.28rem;
  line-height: 1.2;
}

.article-body ul,
.article-body ol {
  display: grid;
  gap: 8px;
  margin: 0 0 1.4em;
  padding-left: 1.3em;
}

.article-body strong {
  color: var(--ink);
}

.quick-answer,
.note,
.example {
  margin: 0 0 28px;
  border: 1px solid rgba(0, 53, 148, 0.18);
  border-radius: var(--radius-small);
  padding: 20px;
  background: var(--blue-soft);
}

.quick-answer strong,
.note strong,
.example strong {
  display: block;
  margin-bottom: 7px;
  color: var(--blue);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.quick-answer p,
.note p,
.example p {
  margin-bottom: 0;
}

.note {
  border-color: rgba(138, 90, 0, 0.24);
  background: rgba(138, 90, 0, 0.07);
}

.note strong {
  color: var(--amber);
}

.example {
  border-color: var(--line);
  background: var(--surface-low);
}

.example strong {
  color: var(--ink);
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  margin: 22px 0 30px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
  line-height: 1.45;
}

th {
  color: var(--ink);
  background: var(--surface-low);
  font-size: 0.86rem;
}

td {
  color: #38394a;
  font-size: 0.94rem;
}

tr:last-child td {
  border-bottom: 0;
}

pre {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 22px 0 30px;
  overflow-x: auto;
  border-radius: var(--radius-small);
  padding: 18px;
  color: #eff4ff;
  background: var(--night);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  white-space: pre;
}

.checklist {
  padding-left: 0 !important;
  list-style: none;
}

.checklist li {
  position: relative;
  border-bottom: 1px solid var(--line);
  padding: 11px 12px 11px 42px;
}

.checklist li::before {
  position: absolute;
  top: 13px;
  left: 10px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 7px;
  color: #ffffff;
  background: var(--green);
  content: "✓";
  font-size: 0.78rem;
  font-weight: 800;
}

.toc {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--surface);
}

.toc strong {
  font-size: 0.9rem;
}

.toc ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.2em;
}

.toc a {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.source-list {
  margin-top: 36px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.source-list h2 {
  margin-top: 0;
  font-size: 1.35rem;
}

.source-list li,
.source-list p {
  font-size: 0.92rem;
}

.related {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 42px);
  background: var(--surface);
}

.related h2 {
  margin-bottom: 18px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.related-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  padding: 20px;
  color: var(--ink);
  background: var(--surface-low);
  text-decoration: none;
}

.related-card span {
  color: var(--blue);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.related-card strong {
  font-size: 1.16rem;
  line-height: 1.2;
}

.related-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.article-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-top: 18px;
  border-radius: var(--radius);
  padding: clamp(26px, 4vw, 44px);
  color: #ffffff;
  background: var(--night);
}

.article-cta h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
}

.article-cta p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--blue);
  background: #ffffff;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.site-footer {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 30px 4px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer nav {
  display: flex;
  gap: 14px;
}

.site-footer a {
  color: inherit;
}

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

  .article-meta {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding: 18px 0 0;
  }

  .toc {
    position: static;
    grid-row: 1;
  }
}

@media (max-width: 680px) {
  .site-shell {
    width: 100%;
    padding: 10px;
  }

  .site-header {
    top: 8px;
  }

  .header-links a:not(.header-cta) {
    display: none;
  }

  .breadcrumb {
    padding: 0 4px;
    overflow: hidden;
    white-space: nowrap;
  }

  .breadcrumb span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .article-hero,
  .article-body,
  .related,
  .article-cta {
    border-radius: 12px;
  }

  h1 {
    font-size: clamp(2.15rem, 11vw, 3.4rem);
  }

  .article-body p,
  .article-body li {
    font-size: 1rem;
  }

  .related-grid,
  .article-cta {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
