/* SF Design Agency: cream / maroon editorial theme (Newsreader + Inter) */
:root {
  --cream: #fffcf1;
  --paper: #ffffff;
  --ink: #2e0206;
  --muted: #6d504e;
  --line: #eadfd0;
  --brand: #882221;
  --brand-dark: #660b14;
  --hover: #cb0503;
  --tint: #f7efe0;
  --radius: 16px;
  --serif: Newsreader, Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 17px/1.65 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--hover); }
.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 252, 241, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-icon { width: 26px; height: 26px; flex: none; }
.brand-name { font: 500 19px/1 var(--serif); letter-spacing: -.01em; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { color: var(--brand); border-color: var(--brand); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); transition: transform .3s ease; }
.nav-toggle span:first-child { top: 18px; }
.nav-toggle span:last-child { top: 26px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* hero */
.hero { padding: 64px 0 24px; text-align: center; }
.hero-sm { padding: 48px 0 8px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; line-height: 1.15; margin: 0; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); max-width: 20ch; margin-inline: auto; letter-spacing: -.03em; }
.hero-sm h1 { font-size: clamp(30px, 4.4vw, 44px); max-width: 24ch; }
.lede { max-width: 56ch; margin: 18px auto 0; font-size: 18px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 28px; }
.chips a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--ink); text-decoration: none; }
.chips a:hover { border-color: var(--brand); color: var(--brand); }

/* cards */
.section { padding: 36px 0 24px; }
.section-h { font-size: 22px; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { display: flex; flex-direction: column; gap: 8px; }
.card-thumb { display: block; aspect-ratio: 1200 / 630; background: var(--tint); border-radius: 10px; overflow: hidden; margin-bottom: 6px; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-title { font-size: 21px; line-height: 1.25; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--brand); }
.tag { margin: 0; font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.tag a { color: var(--brand); text-decoration: none; }
.meta { margin: 0; color: var(--muted); font-size: 14px; }

/* post: one centered column */
.narrow { width: min(720px, 100% - 40px); margin-inline: auto; }
.crumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.post-head { padding: 56px 0 24px; text-align: center; }
.post-head h1 { font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -.025em; }
.post-meta { margin-top: 18px; }
.post-body { padding: 8px 0 72px; }
.toc { border: 1px solid var(--line); border-radius: 10px; padding: 12px 18px; margin-bottom: 32px; font-size: 15px; }
.toc summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.toc ol { margin: 12px 0 4px; padding-left: 20px; display: grid; gap: 6px; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--brand); }

.prose { font-size: 18px; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(25px, 3vw, 31px); margin: 52px 0 14px; }
.prose h3 { font-size: 21px; margin: 32px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 20px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--brand); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose code { background: var(--tint); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose pre { background: var(--ink); color: #f5e8e4; border-radius: 10px; padding: 18px 20px; overflow-x: auto; font-size: 14px; line-height: 1.6; margin: 28px 0; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose blockquote { margin: 28px 0; padding: 2px 0 2px 20px; border-left: 3px solid var(--brand); font-family: var(--serif); font-size: 21px; line-height: 1.5; }
.prose blockquote p { margin: 0 0 8px; }
.prose a.ext::after { content: "\2197"; font-size: .75em; margin-left: 2px; }
.table-wrap { overflow-x: auto; margin: 28px -60px; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; min-width: 560px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--tint); font-weight: 600; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
.callout { background: var(--tint); border-radius: 10px; padding: 16px 20px; margin: 28px 0; font-size: 16px; line-height: 1.6; }
.callout > :last-child { margin-bottom: 0; }
.callout p { margin: 0 0 10px; }
.callout-verify { background: #fff4e0; }
.related { margin-top: 64px; padding-top: 8px; }
.related h2 { margin: 0 0 24px; font-size: 22px; }
.related .grid { gap: 28px 24px; }
.related .card-title { font-size: 18px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0 24px; font-size: 14px; color: var(--muted); }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-brand p { max-width: 38ch; margin: 12px 0 0; }
.footer-h { margin: 0 0 12px; font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-bottom { margin-top: 32px; }
.footer-bottom p { margin: 0; }

@media (max-width: 1020px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .table-wrap { margin-inline: 0; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 4px; background: var(--cream); border-bottom: 1px solid var(--line); padding: 12px 20px 20px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; font-size: 16px; }
  .grid, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .post-head { padding-top: 36px; }
  .prose { font-size: 17px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ownership notice, video, downloads */
.banner { margin: 0 0 24px; padding: 12px 16px; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 8px; background: var(--tint); font-size: 15px; line-height: 1.5; }
.banner-draft { border-left-color: #c47a00; background: #fff4e0; }
.video { margin: 28px 0; }
.video-frame { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--tint); }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.download { display: flex; flex-direction: column; gap: 2px; margin: 24px 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; }
.download span { color: var(--muted); font-size: 15px; }
.disclosure-short { font-size: 14px; }

/* archive and home links */
.all-link { margin: 32px 0 0; font-weight: 600; }
.all-link a { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.archive-group { margin-bottom: 40px; }
.archive-group h2 { font-size: 24px; margin-bottom: 12px; }
.archive-group h2 a { color: var(--ink); text-decoration: none; }
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.archive-list a { color: var(--ink); text-decoration: none; }
.archive-list a:hover { color: var(--brand); }
.archive-list .meta { white-space: nowrap; font-size: 13px; }
@media (max-width: 760px) { .archive-list li { flex-direction: column; gap: 2px; } }
