:root {
  --bg: #f7f6f3;
  --bg-alt: #ffffff;
  --ink: #1a1a1a;
  --muted: #5b5b5b;
  --line: #e2e0da;
  --accent: #0a5c4a;
  --accent-ink: #ffffff;
  --warn-bg: #fff7e6;
  --warn-line: #e8c97a;
  --code-bg: #f1efe9;
  --maxw: 1080px;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,0.06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* Header */
.site-header { background: var(--bg-alt); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.brand-tag { font-size: 0.78rem; color: var(--muted); }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 0.95rem; }
.site-nav a:hover { background: var(--bg); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 0.95rem; cursor: pointer; }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--ink); }
.hero-img-wrap img { width: 100%; object-fit: cover; }
.hero-content {
  position: absolute; inset: 0; display: flex; align-items: center; padding: 48px 24px;
  background: linear-gradient(90deg, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.25) 55%, transparent 100%);
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; width: 100%; color: #fff; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); line-height: 1.12; margin: 0 0 16px; max-width: 18ch; letter-spacing: -0.02em; }
.hero p.lede { font-size: clamp(1.05rem, 2.5vw, 1.35rem); max-width: 44ch; margin: 0 0 24px; color: #f0f0ee; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 1rem;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-secondary { background: rgba(255,255,255,0.92); color: var(--ink); }
.hero-note { margin-top: 18px; font-size: 0.85rem; color: #ddd; }

/* Sections */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 12px; letter-spacing: -0.02em; }
.section .sub { color: var(--muted); margin: 0 0 32px; max-width: 70ch; font-size: 1.05rem; }
.lead { font-size: 1.12rem; color: var(--muted); }

/* Cards / grids */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.card a.card-link { display: inline-block; margin-top: 12px; font-weight: 600; }

/* Callout */
.callout { border-left: 4px solid var(--accent); background: var(--bg-alt); padding: 18px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 24px 0; }
.callout-warn { border-left-color: var(--warn-line); background: var(--warn-bg); }
.callout h3 { margin: 0 0 6px; font-size: 1.05rem; }
.callout p { margin: 0; }

/* Steps */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 28px 52px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.steps h3 { margin: 0 0 6px; }
.steps p { margin: 0; color: var(--muted); }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--bg-alt); }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg); font-weight: 600; }
td.num { font-variant-numeric: tabular-nums; }

/* Code / fixtures */
.fixture { background: var(--code-bg); border: 1px dashed var(--line); border-radius: 8px; padding: 14px 16px; font-size: 0.9rem; }
.fixture .tag { display: inline-block; font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 8px; border-radius: 4px; margin-bottom: 6px; }
.tag-illustrative { background: var(--warn-bg); color: #7a5a00; border: 1px solid var(--warn-line); }
.tag-actual { background: #e3f2ec; color: var(--accent); }
code { background: var(--code-bg); padding: 2px 5px; border-radius: 4px; font-size: 0.9em; }
pre { background: var(--code-bg); padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 0.88rem; }

/* Media figure */
figure { margin: 24px 0; }
figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 8px; }
.img-support { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* Footer */
.site-footer { background: var(--ink); color: #cfcfca; margin-top: 0; padding: 48px 0 24px; }
.site-footer a { color: #eaeae6; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 32px; padding-bottom: 24px; }
.footer-heading { font-weight: 700; color: #fff; margin: 0 0 10px; }
.footer-brand { font-size: 1.15rem; font-weight: 700; color: #fff; margin: 0 0 8px; }
.footer-col p:not(.footer-heading):not(.footer-brand) { margin: 0; font-size: 0.92rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col ul li { margin-bottom: 6px; }
.footer-legal { border-top: 1px solid #333; padding-top: 16px; font-size: 0.85rem; color: #999; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-legal p { margin: 0; }

/* Breadcrumb */
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin: 24px 0 0; }
.breadcrumb ol { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; flex-wrap: wrap; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

/* Page header */
.page-header { padding: 40px 0 8px; }
.page-header h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 12px; letter-spacing: -0.02em; }
.page-header .lede { color: var(--muted); font-size: 1.12rem; max-width: 72ch; margin: 0; }
.meta-line { color: var(--muted); font-size: 0.85rem; margin-top: 12px; }

@media (max-width: 860px) {
  .grid-3, .grid-2, .img-support { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding-top: 8px; }
  .header-inner { flex-wrap: wrap; }
  .hero-content { background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.35) 70%, transparent 100%); align-items: flex-end; }
  .hero h1 { max-width: 22ch; }
}