:root {
  --cream: #faf7f2;
  --paper: #fffdf9;
  --ink: #1a1a1a;
  --muted: #66635f;
  --line: #e8e0d5;
  --orange: #e85d2a;
  --teal: #0f766e;
  --max: 1120px;
  color-scheme: light;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 0, rgba(255, 107, 53, 0.13), transparent 34rem),
    radial-gradient(circle at 0 60%, rgba(13, 148, 136, 0.1), transparent 32rem),
    var(--cream);
  line-height: 1.72;
}

a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--orange); }

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid rgba(26, 26, 26, 0.08);
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(14px);
}

.site-nav {
  display: flex;
  width: min(calc(100% - 40px), var(--max));
  min-height: 60px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand img { width: 28px; height: 28px; }

.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 650; text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--orange); }

.page-shell {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.hero { padding: 88px 0 64px; text-align: center; }
.eyebrow { color: var(--orange); font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; line-height: 1.18; letter-spacing: -0.025em; }
h1 { max-width: 850px; margin: 16px auto 22px; font-size: clamp(40px, 7vw, 72px); }
.hero-lead { max-width: 720px; margin: 0 auto; color: var(--muted); font-size: clamp(18px, 2.5vw, 22px); }
.updated { display: block; margin-top: 24px; color: #86817b; font-size: 13px; }

.breadcrumb { padding-top: 30px; color: var(--muted); font-size: 13px; }
.breadcrumb ol { display: flex; margin: 0; padding: 0; flex-wrap: wrap; gap: 8px; list-style: none; }
.breadcrumb li + li::before { margin-right: 8px; color: #aaa39a; content: "/"; }

.guide-grid {
  display: grid;
  padding: 10px 0 90px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.guide-card {
  display: flex;
  min-height: 260px;
  padding: 30px;
  flex-direction: column;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 249, 0.82);
  box-shadow: 0 16px 44px rgba(26, 26, 26, 0.04);
  transition: transform 180ms ease, border-color 180ms ease;
}

.guide-card:hover { color: var(--ink); border-color: var(--orange); transform: translateY(-4px); }
.guide-card .meta { color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.guide-card h2 { margin: 24px 0 12px; font-size: 28px; }
.guide-card p { margin: 0 0 24px; color: var(--muted); }
.guide-card .more { margin-top: auto; color: var(--orange); font-weight: 750; }

.article-layout {
  display: grid;
  padding: 0 0 96px;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 64px;
  align-items: start;
}

.article {
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 253, 249, 0.9);
  box-shadow: 0 18px 60px rgba(26, 26, 26, 0.05);
}

.article h2 { margin-top: 56px; scroll-margin-top: 90px; font-size: clamp(28px, 4vw, 38px); }
.article h2:first-child { margin-top: 0; }
.article h3 { margin-top: 34px; font-size: 22px; }
.article p, .article li { color: #494642; }
.article li + li { margin-top: 9px; }
.article strong { color: var(--ink); }
.article pre {
  overflow-x: auto;
  padding: 22px;
  white-space: pre-wrap;
  border: 1px solid #2e2d2a;
  border-radius: 15px;
  color: #f8f4ec;
  background: #1f1e1c;
  font: 14px/1.75 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.callout { margin: 28px 0; padding: 20px 22px; border-left: 4px solid var(--teal); border-radius: 0 14px 14px 0; background: #edf7f5; }
.callout p { margin: 0; }
.steps { padding-left: 0; counter-reset: guide-step; list-style: none; }
.steps > li { position: relative; min-height: 48px; margin: 0 0 24px; padding-left: 62px; counter-increment: guide-step; }
.steps > li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: var(--orange);
  content: counter(guide-step);
  font-weight: 800;
}

.toc { position: sticky; top: 88px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 253, 249, 0.72); }
.toc strong { display: block; margin-bottom: 12px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li + li { margin-top: 8px; }
.toc a { color: var(--muted); font-size: 14px; text-decoration: none; }

.cta { margin-top: 48px; padding: 30px; border-radius: 20px; color: white; background: var(--ink); }
.cta h2 { margin: 0 0 10px; color: white; font-size: 28px; }
.cta p { color: rgba(255,255,255,.72); }
.cta a { display: inline-block; padding: 11px 18px; border-radius: 10px; color: white; background: var(--orange); font-weight: 750; text-decoration: none; }

.site-footer { padding: 42px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; width: min(calc(100% - 40px), var(--max)); margin: 0 auto; justify-content: space-between; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }

@media (max-width: 820px) {
  .article-layout { grid-template-columns: 1fr; gap: 26px; }
  .toc { position: static; grid-row: 1; }
  .guide-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .site-nav { min-height: 56px; }
  .nav-links a:not(:last-child) { display: none; }
  .hero { padding: 62px 0 46px; }
  .article { padding: 25px 20px; border-radius: 20px; }
  .footer-inner { flex-direction: column; }
}

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