@layer reset, tokens, base, layout, components, variants, utilities, responsive;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body, h1, h2, h3, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
  ol, ul { padding: 0; }
  img { display: block; max-width: 100%; }
  button, input { font: inherit; }
  a { color: inherit; }
}

@layer tokens {
  :root {
    --paper: #f6f7f8;
    --surface: #ffffff;
    --ink: #171b1f;
    --muted: #68717d;
    --line: #e2e6ea;
    --accent: #1d5145;
    --accent-2: #bd5e3f;
    --accent-text: color-mix(in srgb, var(--accent-2) 70%, var(--ink));
    --dark: #18201d;
    --soft: #eef1f3;
    --container: min(1160px, calc(100vw - 40px));
    --container-wide: min(1280px, calc(100vw - 32px));
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
    --serif: var(--sans);
    --shadow: 0 8px 24px rgb(18 27 23 / 7%);
    --step--1: clamp(.75rem, .73rem + .08vw, .81rem);
    --step-0: clamp(.94rem, .91rem + .12vw, 1rem);
    --step-1: clamp(1.12rem, 1.05rem + .28vw, 1.3rem);
    --step-2: clamp(1.55rem, 1.4rem + .62vw, 2rem);
    --step-3: clamp(2rem, 1.73rem + 1.05vw, 2.75rem);
    --step-4: clamp(2.75rem, 2.28rem + 1.85vw, 4rem);
  }
}

@layer base {
  body { min-width: 320px; background: #fff; color: var(--ink); font-family: var(--sans); line-height: 1.65; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
  h1, h2, h3 { font-family: var(--sans); font-weight: 750; line-height: 1.24; letter-spacing: -.025em; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
  p, li, dd { word-break: keep-all; overflow-wrap: anywhere; text-wrap: pretty; }
  a { text-decoration-thickness: 1px; text-underline-offset: .18em; }
  :focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 76%, white); outline-offset: 3px; }
}

@layer layout {
  .container { width: var(--container); margin-inline: auto; }
  .container-wide { width: var(--container-wide); margin-inline: auto; }
  .section { padding-block: clamp(52px, 6vw, 84px); }
  .section--paper { background: #f6f7f8; }
  .section--dark { background: var(--dark); color: #f7f3e9; }
  .grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 1.8vw, 24px); }
  .grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2vw, 26px); }
  .grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.5vw, 32px); }
}

@layer components {
  .skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; translate: 0 -160%; background: var(--surface); padding: 10px 16px; }
  .skip-link:focus { translate: 0; }

  .utility { background: var(--dark); color: #f5f7f6; font-size: .8125rem; letter-spacing: .01em; }
  .utility__inner { min-height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
  .utility__inner p::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 9px; border-radius: 50%; background: var(--accent-2); }
  .utility a { text-decoration: none; opacity: .78; }

  .site-header { position: relative; z-index: 20; background: rgb(255 255 255 / 97%); border-bottom: 1px solid var(--line); }
  .site-header__inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
  .brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
  .brand__mark { width: 36px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: white; font-family: var(--sans); font-size: .8125rem; font-weight: 800; }
  .brand__text { display: grid; line-height: 1.05; }
  .brand__text strong { font-size: .88rem; letter-spacing: .05em; }
  .brand__text small { margin-top: 5px; color: var(--muted); font-size: .8125rem; letter-spacing: .01em; }
  .navigation { display: flex; align-items: center; gap: clamp(18px, 2.3vw, 32px); }
  .navigation a { position: relative; color: #30363d; font-size: .8rem; font-weight: 700; text-decoration: none; }
  .navigation a::after { content: ""; position: absolute; right: 0; bottom: -8px; left: 0; height: 2px; background: var(--accent); scale: 0 1; transition: scale .2s ease; }
  .navigation a:hover::after { scale: 1; }
  .menu-button { display: none; width: 42px; height: 42px; border: 0; background: none; cursor: pointer; }
  .menu-button span { display: block; width: 24px; height: 1px; margin: 7px auto; background: currentColor; transition: rotate .2s, translate .2s; }
  .menu-button[aria-expanded="true"] span:first-child { translate: 0 4px; rotate: 35deg; }
  .menu-button[aria-expanded="true"] span:last-child { translate: 0 -4px; rotate: -35deg; }

  .topic-strip { overflow: hidden; border-bottom: 1px solid var(--line); background: #fafbfc; }
  .topic-strip__inner { min-height: 38px; display: flex; align-items: center; gap: 20px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
  .topic-strip__inner::-webkit-scrollbar { display: none; }
  .topic-strip strong { color: var(--accent); font-size: .8125rem; letter-spacing: .05em; }
  .topic-strip span { color: #59616c; font-size: .8125rem; }

  .hero { position: relative; min-height: min(520px, 48vw); display: grid; align-items: end; overflow: hidden; isolation: isolate; background: var(--dark); color: white; }
  .hero > .media-image, .hero > .media-fallback { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .hero > .media-fallback { background: radial-gradient(circle at 78% 26%, color-mix(in srgb, var(--accent-2) 75%, white), transparent 22%), linear-gradient(135deg, color-mix(in srgb, var(--accent) 65%, #101915), var(--dark) 65%); }
  .hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgb(7 13 11 / 78%) 0%, rgb(7 13 11 / 42%) 54%, rgb(7 13 11 / 12%) 82%), linear-gradient(0deg, rgb(7 13 11 / 38%), transparent 48%); }
  .hero__content { padding-block: clamp(54px, 6vw, 76px); }
  .eyebrow, .section-kicker { color: var(--accent-text); font-size: .8125rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
  .hero .eyebrow, .section--dark .section-kicker, .site-footer .section-kicker { color: color-mix(in srgb, var(--accent-2) 52%, white); }
  .hero h1 { max-width: 850px; margin-top: 14px; font-size: var(--step-4); }
  .hero__dek { max-width: 680px; margin-top: 18px; color: rgb(255 255 255 / 86%); font-size: var(--step-0); }
  .text-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--accent); font-size: .875rem; font-weight: 800; text-decoration: none; }
  .text-link--light { color: white; border-bottom: 1px solid rgb(255 255 255 / 56%); padding-bottom: 5px; }

  .intro-grid { padding-block: clamp(48px, 5.5vw, 72px); display: grid; grid-template-columns: 1.05fr repeat(3, 1fr); gap: clamp(16px, 1.8vw, 24px); align-items: start; }
  .intro-grid__copy h2 { margin-top: 14px; font-size: var(--step-2); }
  .intro-grid__copy > p:last-child { max-width: 32ch; margin-top: 14px; color: var(--muted); font-size: .9rem; }

  .section-heading { margin-bottom: clamp(24px, 3vw, 36px); display: flex; align-items: end; justify-content: space-between; gap: 28px; }
  .section-heading h2 { margin-top: 8px; font-size: var(--step-3); }
  .section-heading__note { max-width: 34ch; color: var(--muted); font-size: .86rem; }
  .section--dark .section-heading__note { color: rgb(255 255 255 / 62%); }

  .story-card { min-width: 0; overflow: hidden; border: 1px solid #e2e6ea; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 2px 10px rgb(18 27 23 / 3%); transition: border-color .2s ease, box-shadow .2s ease, translate .2s ease; }
  .story-card__media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, var(--soft), color-mix(in srgb, var(--accent) 18%, var(--paper))); text-decoration: none; }
  .media-fallback { position: relative; overflow: hidden; isolation: isolate; background: var(--soft); }
  .media-fallback::before { content: ""; position: absolute; z-index: 0; width: 52%; aspect-ratio: 1; top: -14%; right: -9%; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 50%; background: color-mix(in srgb, var(--accent-2) 14%, transparent); }
  .media-fallback::after { content: ""; position: absolute; z-index: 0; right: 10%; bottom: 13%; left: 10%; height: 1px; background: color-mix(in srgb, var(--accent) 42%, transparent); box-shadow: 0 -9px color-mix(in srgb, var(--accent) 15%, transparent), 0 9px color-mix(in srgb, var(--accent) 15%, transparent); }
  .media-fallback__code { position: absolute; z-index: 1; left: 10%; bottom: 20%; color: color-mix(in srgb, var(--accent) 72%, var(--ink)); font-family: var(--sans); font-size: clamp(.72rem, .67rem + .28vw, 1rem); font-weight: 800; letter-spacing: .04em; }
  .media-fallback--2 { background: color-mix(in srgb, var(--paper) 70%, var(--accent-2)); }
  .media-fallback--2::before { right: auto; left: -14%; border-radius: 0; rotate: 24deg; }
  .media-fallback--3 { background: linear-gradient(145deg, var(--soft), color-mix(in srgb, var(--surface) 76%, var(--accent))); }
  .media-fallback--3::after { inset: 14% auto 14% 18%; width: 1px; height: auto; box-shadow: 9px 0 color-mix(in srgb, var(--accent) 15%, transparent), -9px 0 color-mix(in srgb, var(--accent) 15%, transparent); }
  .media-fallback--4 { background: repeating-linear-gradient(135deg, var(--paper) 0 18px, var(--soft) 18px 19px); }
  .media-fallback--4::before { top: 18%; right: 14%; width: 31%; border-radius: 0; rotate: 45deg; }
  .media-fallback--5 { background: linear-gradient(115deg, color-mix(in srgb, var(--accent) 14%, var(--paper)) 0 49%, var(--soft) 49%); }
  .media-fallback--5::before { top: auto; right: 7%; bottom: -22%; width: 63%; }
  .story-card__media .media-fallback { position: absolute; inset: 0; }
  .story-card__media img { width: 100%; height: 100%; object-fit: cover; transition: scale .45s cubic-bezier(.2,.7,.2,1); }
  .story-card:hover .story-card__media img { scale: 1.035; }
  .story-card:hover { border-color: color-mix(in srgb, var(--accent) 32%, var(--line)); box-shadow: var(--shadow); translate: 0 -2px; }
  .story-card:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); }
  .story-card__tag { position: absolute; top: 10px; left: 10px; padding: 6px 9px; border-radius: 4px; background: rgb(20 27 24 / 90%); color: white; font-size: .8125rem; font-weight: 800; letter-spacing: .02em; }
  .story-card__body { padding: 15px 16px 17px; }
  .story-card__eyebrow { color: var(--accent-text); font-size: .8125rem; font-weight: 800; letter-spacing: .04em; }
  .story-card h3 { margin-top: 7px; font-size: clamp(1.02rem, .98rem + .22vw, 1.2rem); }
  .story-card h3 a { text-decoration: none; }
  .story-card__body > p:not(.story-card__eyebrow) { margin-top: 9px; color: var(--muted); font-size: .8rem; line-height: 1.6; }
  .story-card__meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: .8125rem; }
  .story-card__meta span + span::before { content: "·"; margin-right: 11px; }
  .story-card--compact .story-card__body > p:not(.story-card__eyebrow), .story-card--compact .story-card__meta { display: none; }

  .latest-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
  .latest-item { min-height: 78px; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); text-decoration: none; }
  .latest-item__number { color: var(--accent-text); font-family: var(--sans); font-size: .8125rem; font-weight: 800; }
  .latest-item small { display: block; margin-bottom: 4px; color: var(--muted); font-size: .8125rem; letter-spacing: .03em; }
  .latest-item strong { font-family: var(--sans); font-size: clamp(.94rem, .91rem + .16vw, 1.06rem); font-weight: 700; }
  .latest-item__arrow { font-size: 1.1rem; transition: translate .2s; }
  .latest-item:hover .latest-item__arrow { translate: 5px -3px; }

  .feature-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: clamp(20px, 2.5vw, 32px); }
  .feature-grid > .story-card .story-card__media { aspect-ratio: 16 / 9; }
  .feature-stack { display: grid; gap: 20px; }
  .section--dark .story-card__body > p:not(.story-card__eyebrow), .section--dark .story-card__meta { color: var(--muted); }

  .read-grid { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); }
  .read-card { min-height: 210px; padding: 24px; position: relative; text-decoration: none; background: #fff; }
  .read-card + .read-card { border-left: 1px solid var(--line); }
  .read-card > span { position: absolute; top: 22px; right: 22px; color: var(--accent-text); font-family: var(--sans); font-size: .72rem; font-weight: 800; }
  .read-card small { color: var(--accent); font-size: .62rem; font-weight: 800; letter-spacing: .08em; }
  .read-card h3 { margin-top: 34px; font-size: var(--step-1); }
  .read-card p { margin-top: 12px; color: var(--muted); font-size: .8rem; }

  .principles { padding-block: clamp(52px, 6vw, 84px); display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(34px, 6vw, 82px); }
  .principles h2 { margin-top: 14px; font-size: var(--step-3); }
  .principles ol { list-style: none; counter-reset: standard; border-top: 1px solid var(--line); }
  .principles li { counter-increment: standard; padding: 20px 0 20px 60px; position: relative; border-bottom: 1px solid var(--line); font-size: .86rem; }
  .principles li::before { content: "0" counter(standard); position: absolute; left: 0; color: var(--accent-text); font-family: var(--sans); font-size: .8125rem; font-weight: 800; }

  .page-hero { padding-block: clamp(54px, 6vw, 82px) clamp(38px, 4vw, 58px); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #f6f7f8, #fff); }
  .page-hero h1 { max-width: 1000px; margin-top: 16px; font-size: clamp(2.2rem, 1.95rem + 1.15vw, 3rem); }
  .page-hero > p:last-child { max-width: 700px; margin-top: 16px; color: var(--muted); font-size: var(--step-0); }
  .directory { padding-block: clamp(44px, 5vw, 72px); }
  .directory-group { padding-block: 36px; display: grid; grid-template-columns: .65fr 1.8fr; gap: clamp(28px, 4vw, 56px); border-top: 1px solid var(--line); }
  .directory-group__intro span { color: var(--accent-text); font-family: var(--sans); font-size: .8125rem; font-weight: 800; }
  .directory-group__intro h2 { margin-top: 14px; font-size: var(--step-2); }
  .directory-group__intro p { margin-top: 16px; color: var(--muted); }
  .directory-group__stories { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

  .article-header { padding-block: clamp(48px, 5vw, 72px) clamp(34px, 4vw, 52px); }
  .breadcrumb { display: flex; gap: 10px; color: var(--muted); font-size: .8125rem; }
  .article-header .eyebrow { margin-top: 34px; }
  .article-header h1 { max-width: 960px; margin-top: 12px; font-size: clamp(2.35rem, 2.05rem + 1.4vw, 3.25rem); }
  .article-header__dek { max-width: 760px; margin-top: 18px; color: var(--muted); font-size: var(--step-0); }
  .article-meta { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 9px 18px; color: var(--muted); font-size: .8125rem; }
  .article-hero img, .article-hero .media-fallback { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 75%, black), color-mix(in srgb, var(--accent-2) 70%, var(--paper))); }
  .article-hero figcaption { margin-top: 10px; color: var(--muted); font-size: .8125rem; text-align: right; }
  .article-layout { padding-block: clamp(44px, 5vw, 76px); display: grid; grid-template-columns: 120px minmax(0, 760px); justify-content: center; gap: clamp(28px, 4vw, 58px); }
  .article-content { min-width: 0; }
  .article-rail { color: var(--muted); font-size: .8125rem; letter-spacing: .04em; }
  .article-rail strong { display: block; margin-bottom: 15px; color: var(--accent-text); letter-spacing: .1em; }
  .article-lead { padding-bottom: 28px; border-bottom: 1px solid var(--line); font-family: var(--sans); font-size: clamp(1.04rem, 1rem + .15vw, 1.14rem); font-weight: 500; line-height: 1.8; }
  .article-lead p + p { margin-top: 18px; }
  .fact-box { margin-block: 30px 42px; padding: 22px 24px; border: 1px solid #e2e6ea; border-top: 3px solid var(--accent); border-radius: 8px; background: #f6f7f8; }
  .fact-box dl { margin-top: 18px; }
  .fact-box dl div { padding: 10px 0; display: grid; grid-template-columns: 120px 1fr; gap: 18px; border-top: 1px solid var(--line); font-size: .82rem; }
  .fact-box dt { font-weight: 800; }
  .fact-box dd { color: var(--muted); }
  .article-section { margin-top: 44px; }
  .article-section h2 { font-size: var(--step-2); }
  .article-section p { margin-top: 16px; font-size: .98rem; line-height: 1.82; }
  .article-tool { margin-top: 44px; }
  .article-tool > h2 { font-size: var(--step-2); }
  .article-tool > p { margin-top: 12px; color: var(--muted); }
  .table-scroll__hint { display: none; }
  .table-scroll { width: 100%; max-width: 100%; margin-top: 18px; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
  .table-scroll:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 58%, white); outline-offset: 3px; }
  .article-tool table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: .875rem; line-height: 1.6; }
  .article-tool caption { padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); text-align: left; font-size: .8125rem; }
  .article-tool th, .article-tool td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
  .article-tool thead th { background: color-mix(in srgb, var(--paper) 82%, white); color: var(--ink); font-weight: 800; }
  .article-tool tbody th { width: 24%; color: var(--accent); font-weight: 800; }
  .article-tool tbody tr:last-child > * { border-bottom: 0; }
  .tool-note { font-size: .8125rem; }
  .article-tool--checklist ul, .article-tool--steps ol { margin-top: 18px; display: grid; gap: 10px; padding: 0; list-style: none; counter-reset: tool-step; }
  .article-tool--checklist li, .article-tool--steps li { position: relative; padding: 14px 16px 14px 50px; border: 1px solid var(--line); border-radius: 9px; background: color-mix(in srgb, var(--paper) 76%, white); }
  .article-tool--checklist li::before { content: "✓"; position: absolute; left: 18px; top: 13px; color: var(--accent); font-weight: 900; }
  .article-tool--steps li { counter-increment: tool-step; }
  .article-tool--steps li::before { content: counter(tool-step); position: absolute; left: 16px; top: 13px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: white; font-size: .8125rem; font-weight: 800; }
  .article-callout { margin-top: 28px; padding: 20px 22px; border: 1px solid color-mix(in srgb, var(--accent-2) 38%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--accent-2) 8%, white); }
  .article-callout p { margin-top: 8px; color: var(--muted); }
  .editor-note { margin-top: 44px; padding: 20px 22px; border-left: 3px solid var(--accent-2); background: color-mix(in srgb, var(--paper) 78%, white); }
  .editor-note p { margin-top: 8px; color: var(--muted); font-size: .84rem; }
  .sources { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); }
  .sources h2 { font-size: var(--step-1); }
  .sources ul { margin-top: 17px; list-style: none; }
  .sources li { padding: 10px 0; border-top: 1px solid var(--line); }
  .sources a { display: flex; justify-content: space-between; text-decoration: none; }
  .sources > p { margin-top: 12px; color: var(--muted); font-size: .8125rem; }
  .author-box { margin-top: 44px; padding: 24px; display: grid; grid-template-columns: 50px 1fr; gap: 18px; border-radius: 10px; background: var(--accent); color: white; }
  .author-box__mark { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--paper); color: var(--accent); font-family: var(--serif); font-weight: 700; }
  .author-box small { color: rgb(255 255 255 / 82%); }
  .author-box h2 { margin-top: 3px; font-size: var(--step-1); }
  .author-box p { margin-top: 10px; color: rgb(255 255 255 / 88%); font-size: .875rem; }
  .related { padding-block: clamp(48px, 5vw, 72px); }

  .prose-page { max-width: 800px; padding-block: clamp(46px, 5vw, 72px); }
  .prose-page h2 { margin-top: 40px; font-size: var(--step-2); }
  .prose-page h2:first-child { margin-top: 0; }
  .prose-page p, .prose-page li { margin-top: 16px; line-height: 1.82; }
  .prose-page ol, .prose-page ul { padding-left: 24px; }
  .notice { margin-top: 34px; padding: 22px; border: 1px solid var(--line); background: var(--paper); }
  .notice p { color: var(--muted); }
  .not-found { min-height: 65vh; display: grid; align-content: center; padding-block: 100px; }
  .not-found h1 { margin-top: 12px; font-size: var(--step-4); }
  .not-found > p:not(.section-kicker) { margin-top: 24px; color: var(--muted); }
  .button { width: fit-content; margin-top: 26px; padding: 12px 18px; background: var(--accent); color: white; font-weight: 800; text-decoration: none; }

  .site-footer { padding-top: clamp(48px, 5vw, 72px); background: var(--dark); color: #f4f6f5; }
  .site-footer__lead { padding-bottom: clamp(36px, 4vw, 52px); display: grid; grid-template-columns: 1.2fr .8fr; gap: 54px; align-items: end; border-bottom: 1px solid rgb(255 255 255 / 13%); }
  .site-footer__lead h2 { margin-top: 14px; font-size: var(--step-3); }
  .site-footer__lead > p { color: rgb(255 255 255 / 60%); }
  .site-footer__grid { padding-block: 36px; display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 36px; }
  .site-footer__grid h3 { margin-bottom: 15px; font-family: var(--sans); font-size: .8125rem; letter-spacing: .08em; }
  .site-footer__grid > div:not(:first-child) { display: flex; flex-direction: column; align-items: start; }
  .site-footer__grid a { margin-top: 8px; color: rgb(255 255 255 / 78%); font-size: .8125rem; text-decoration: none; }
  .site-footer__brand p { max-width: 30ch; margin-top: 20px; color: rgb(255 255 255 / 76%); font-size: .875rem; }
  .site-footer .brand__text small { color: rgb(255 255 255 / 76%); }
  .site-footer__bottom { min-height: 60px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgb(255 255 255 / 14%); color: rgb(255 255 255 / 72%); font-size: .8125rem; }
}

@layer variants {
  html[data-layout="atlas"] .hero__content { border-left: 3px solid var(--accent-2); padding-left: clamp(20px, 3vw, 38px); }

  html[data-layout="stage"] .brand__mark,
  html[data-layout="stage"] .story-card__tag { border-radius: 5px; }
  html[data-layout="stage"] .hero > .media-fallback { background: radial-gradient(circle at 74% 22%, var(--accent-2), transparent 16%), repeating-linear-gradient(112deg, transparent 0 80px, rgb(255 255 255 / 5%) 81px 83px), linear-gradient(135deg, var(--accent), var(--dark) 64%); }
  html[data-layout="stage"] .latest-item__number { color: var(--accent); }

  html[data-layout="clinic"] h1,
  html[data-layout="clinic"] h2,
  html[data-layout="clinic"] h3 { letter-spacing: -.02em; }
  html[data-layout="clinic"] .hero { align-items: center; }
  html[data-layout="clinic"] .hero__content { width: var(--container); }
  html[data-layout="clinic"] .hero__content > * { max-width: 720px; }
  html[data-layout="clinic"] .story-card,
  html[data-layout="clinic"] .fact-box,
  html[data-layout="clinic"] .author-box { border-radius: 14px; }
  html[data-layout="clinic"] .read-card { background: var(--surface); }

  html[data-layout="notebook"] body { background: #fbfcfd; }
  html[data-layout="notebook"] .hero { margin: 16px auto 0; width: var(--container-wide); border-radius: 16px; }
  html[data-layout="notebook"] .story-card { border-radius: 8px 16px 8px 8px; }
  html[data-layout="notebook"] .fact-box { border-left: 4px solid var(--accent); }

  html[data-layout="ledger"] .story-card { border-top: 2px solid var(--accent); border-radius: 4px; }
  html[data-layout="ledger"] .read-card > span,
  html[data-layout="ledger"] .latest-item__number { font-family: var(--sans); font-style: normal; font-variant-numeric: tabular-nums; }

  html[data-layout="calculator"] .hero > .media-fallback { background: linear-gradient(90deg, transparent 49.7%, rgb(255 255 255 / 8%) 50%), linear-gradient(0deg, transparent 49.7%, rgb(255 255 255 / 8%) 50%), linear-gradient(135deg, var(--accent), var(--dark)); background-size: 52px 52px, 52px 52px, auto; }
  html[data-layout="calculator"] .latest-item__number,
  html[data-layout="calculator"] .fact-box dt { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-style: normal; }
  html[data-layout="calculator"] .story-card,
  html[data-layout="calculator"] .read-card { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); }

  html[data-layout="docket"] .site-header { border-top: 3px solid var(--accent); }
  html[data-layout="docket"] .hero__content { border-left: 3px solid rgb(255 255 255 / 72%); padding-left: clamp(20px, 3vw, 38px); }
  html[data-layout="docket"] .story-card__tag { top: auto; bottom: 0; left: 0; }
  html[data-layout="docket"] .article-section h2 { padding-bottom: 10px; border-bottom: 2px solid var(--accent); }
}

@layer utilities {
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  [hidden] { display: none !important; }
}

@layer responsive {
  @media (max-width: 1040px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .intro-grid { grid-template-columns: 1fr 1fr; }
    .intro-grid__copy { grid-row: span 2; }
    .hero { min-height: 500px; }
    .site-footer__grid { grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; }
  }

  @media (max-width: 820px) {
    :root { --container: min(100% - 34px, 720px); --container-wide: min(100% - 24px, 780px); }
    .utility { display: none; }
    .site-header__inner { min-height: 62px; }
    .menu-button { display: block; }
    .navigation { position: absolute; top: 100%; right: 0; left: 0; display: none; padding: 10px max(17px, calc((100vw - 720px) / 2)) 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
    .navigation[data-open] { display: grid; }
    .navigation a { padding: 11px 3px; border-bottom: 1px solid var(--line); font-size: .92rem; }
    .hero { min-height: 480px; }
    .hero::after { background: linear-gradient(0deg, rgb(7 13 11 / 86%), rgb(7 13 11 / 15%) 88%); }
    .hero__content { padding-block: 48px; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .feature-grid, .principles, .site-footer__lead { grid-template-columns: 1fr; }
    .feature-stack { grid-template-columns: repeat(2, 1fr); }
    .read-grid { grid-template-columns: 1fr; }
    .read-card { min-height: 180px; }
    .read-card + .read-card { border-top: 1px solid var(--line); border-left: 0; }
    .directory-group { grid-template-columns: 1fr; }
    .article-layout { grid-template-columns: 1fr; }
    .article-rail { display: none; }
    .article-hero img, .article-hero .media-fallback { aspect-ratio: 16 / 9; }
    .site-footer__grid { grid-template-columns: 1.3fr 1fr 1fr; }
    .site-footer__brand { grid-column: 1 / -1; }
  }

  @media (max-width: 620px) {
    :root { --step-4: clamp(2.15rem, 1.9rem + 2vw, 2.75rem); }
    .intro-grid, .grid-4, .grid-3, .grid-2, .feature-stack, .directory-group__stories { grid-template-columns: 1fr; }
    .intro-grid__copy { grid-row: auto; }
  }

  @media (max-width: 560px) {
    :root { --container: calc(100% - 32px); --container-wide: 100%; }
    .brand__mark { width: 32px; border-radius: 8px; }
    .brand__text strong { font-size: .8rem; }
    .brand__text small { font-size: .8125rem; }
    .topic-strip__inner { min-height: 36px; gap: 16px; }
    .hero { min-height: 440px; }
    .hero__content { padding-block: 42px; }
    .hero h1 { margin-top: 11px; }
    .hero__dek { margin-top: 14px; }
    .intro-grid { padding-block: 40px; }
    .intro-grid .story-card--compact { display: block; }
    .intro-grid .story-card--compact .story-card__media { aspect-ratio: 16 / 9; }
    .intro-grid .story-card--compact .story-card__body { padding: 14px 15px 16px; }
    .section-heading { align-items: start; flex-direction: column; gap: 10px; }
    .section-heading__note { display: none; }
    .latest-item { min-height: 72px; grid-template-columns: 36px 1fr auto; gap: 9px; }
    .latest-item small { font-size: .8125rem; }
    .feature-grid { display: block; }
    .feature-stack { margin-top: 24px; }
    .article-header { padding-block: 38px 30px; }
    .article-header .eyebrow { margin-top: 28px; }
    .article-hero img, .article-hero .media-fallback { aspect-ratio: 16 / 9; }
    .article-hero figcaption { padding-inline: 16px; }
    .article-layout { padding-block: 38px 54px; }
    .table-scroll__hint { display: block; font-size: .8125rem; }
    .table-scroll__hint + .table-scroll { margin-top: 9px; }
    .fact-box { padding: 18px 16px; }
    .fact-box dl div { grid-template-columns: 82px 1fr; gap: 12px; }
    .article-section { margin-top: 38px; }
    .author-box { grid-template-columns: 1fr; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .site-footer__brand { grid-column: 1 / -1; }
    .site-footer__bottom { padding-block: 20px; align-items: start; flex-direction: column; gap: 5px; }
    html[data-layout="atlas"] .hero__content,
    html[data-layout="docket"] .hero__content { border-left: 0; padding-left: 0; }
    html[data-layout="notebook"] .hero { margin-top: 10px; border-radius: 0; }
  }

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