:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #625f59;
  --line: #d7d3ca;
  --paper: #f7f6f2;
  --surface: #ffffff;
  --accent: #bd3f2c;
  --code: #20201e;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

.guide-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 246, 242, 0.96);
  backdrop-filter: blur(12px);
}

.guide-brand,
.guide-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 700;
}

.guide-brand {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 4px;
  background: var(--ink);
  color: #ffffff;
  font-size: 11px;
}

.guide-hero {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.guide-hero-inner,
.guide-layout,
.guide-footer-inner {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
}

.guide-hero-inner {
  padding: 64px 0 52px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
li,
th,
td {
  letter-spacing: 0;
}

h1 {
  max-width: 840px;
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.02;
}

.lede {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-actions a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 5px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.hero-actions .primary {
  background: var(--ink);
  color: #ffffff;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 72px;
  padding: 54px 0 80px;
}

.guide-article {
  min-width: 0;
}

.guide-article section {
  padding: 6px 0 42px;
  border-bottom: 1px solid var(--line);
}

.guide-article section + section {
  padding-top: 42px;
}

.guide-article h2 {
  margin: 0 0 18px;
  font-size: 28px;
  line-height: 1.2;
}

.guide-article h3 {
  margin: 28px 0 10px;
  font-size: 18px;
}

.guide-article p,
.guide-article li {
  color: #343330;
  font-size: 16px;
  line-height: 1.75;
}

.guide-article ul,
.guide-article ol {
  padding-left: 22px;
}

.guide-article li + li {
  margin-top: 7px;
}

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

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

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

th {
  background: #eeece6;
  font-size: 12px;
  text-transform: uppercase;
}

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

pre {
  overflow-x: auto;
  margin: 18px 0;
  padding: 18px;
  border-radius: 6px;
  background: var(--code);
  color: #f6f3ec;
  font-size: 13px;
  line-height: 1.6;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

p code,
li code {
  padding: 2px 5px;
  border-radius: 3px;
  background: #e9e6df;
  color: var(--ink);
  font-size: 0.9em;
}

.callout {
  margin: 22px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--accent);
  background: var(--surface);
}

.callout p {
  margin: 0;
}

.guide-visual {
  display: block;
  width: 100%;
  height: auto;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 20px 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.metric {
  min-width: 0;
  padding: 18px 14px;
  background: var(--surface);
}

.metric strong,
.metric span {
  display: block;
}

.metric strong {
  font-size: 25px;
  line-height: 1;
}

.metric span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.guide-toc {
  position: sticky;
  top: 86px;
  align-self: start;
}

.guide-toc strong {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  text-transform: uppercase;
}

.guide-toc a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
}

.guide-toc a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.guide-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.guide-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 820px) {
  .guide-topbar {
    padding: 0 14px;
  }

  .guide-brand > span:last-child {
    display: none;
  }

  .guide-nav {
    gap: 10px;
  }

  .guide-nav a:last-child {
    display: none;
  }

  .guide-hero-inner,
  .guide-layout,
  .guide-footer-inner {
    width: min(100% - 28px, 680px);
  }

  .guide-hero-inner {
    padding: 44px 0 38px;
  }

  h1 {
    overflow-wrap: anywhere;
    font-size: 36px;
  }

  .lede {
    font-size: 17px;
  }

  .guide-layout {
    display: block;
    padding-top: 36px;
  }

  .guide-toc {
    display: none;
  }

  .guide-footer-inner {
    display: block;
  }

  .guide-footer-inner span {
    display: block;
    margin-top: 8px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
