/* Shared reading scale and aligned page frame. */
@media screen {
  :root { --frame: 1560px; --gutter: 48px; --body-size: 18px; }
  body { font-size: var(--body-size); line-height: 1.95; -webkit-text-size-adjust: 100%; }
  header, .hero, footer { padding-left: max(var(--gutter), calc((100vw - var(--frame)) / 2 + var(--gutter))); padding-right: max(var(--gutter), calc((100vw - var(--frame)) / 2 + var(--gutter))); }
  header { min-height: 80px; height: auto; gap: 24px; }
  .brand { font-size: 13px; }
  .brand img { width: 120px; }
  header nav { font-size: 15px; gap: 20px; }
  header button { font-size: 14px; min-height: 44px; padding: 8px 4px; }
  .hero { padding-top: 64px; padding-bottom: 48px; }
  .hero h1 { font-size: clamp(44px, 4.3vw, 72px); max-width: 1120px; margin: 26px 0; }
  .hero p { font-size: 19px; max-width: 780px; line-height: 1.9; }
  .hero:after { right: max(32px, calc((100vw - var(--frame)) / 2)); top: 40px; font-size: clamp(240px, 24vw, 360px); }
  .hero-actions { margin: 30px 0 38px; }
  .button, .primary, .secondary { font-size: 15px; min-height: 48px; padding: 12px 22px; }
  .hero-bottom { gap: 56px; padding-top: 20px; }
  .hero-bottom b { font-size: 16px; }
  .hero-bottom span { font-size: 13px; }
  .eyebrow, .kicker { font-size: 12px; }
  .page-layout { max-width: var(--frame); padding: 52px var(--gutter); grid-template-columns: 220px minmax(0, 1fr); gap: 64px; }
  .sidebar { top: 108px; font-size: 15px; scrollbar-width: thin; }
  .sidebar a { font-size: 15px; padding: 12px 0; line-height: 1.65; min-height: 44px; }
  .sidebar a span { font-size: 12px; width: 30px; }
  .sidebar .note { font-size: 12px; }
  .chapter { padding-bottom: 60px; margin-bottom: 42px; scroll-margin-top: 110px; }
  .chapter-num { font-size: 13px; margin-bottom: 16px; }
  .chapter-num b { font-size: 12px; }
  h2 { font-size: 38px; line-height: 1.5; margin: 14px 0 24px; }
  h3 { font-size: 25px; line-height: 1.6; margin-top: 32px; }
  h4 { font-size: 19px; }
  p { font-size: var(--body-size); margin: 18px 0; line-height: 1.95; overflow-wrap: break-word; }
  p.lead { font-size: 21px; line-height: 1.95; }
  .chapter > p { max-width: 54rem; }
  ul, ol { font-size: var(--body-size); line-height: 1.95; }
  li { padding: 6px 0; }
  .columns { gap: 32px; }
  .callout { padding: 28px 30px; margin: 30px 0; }
  .callout p, .compare p { font-size: 17px; }
  .tag { font-size: 12px; line-height: 1.75; }
  .source, .figure figcaption { font-size: 13px; line-height: 1.85; }
  .metric .big { font-size: 48px; }
  .metric p { font-size: 15px; }
  .flow div { padding: 25px 18px; }
  .flow span { font-size: 12px; }
  .flow strong { font-size: 19px; }
  .flow p { font-size: 15px; line-height: 1.75; }
  table { font-size: 17px; line-height: 1.85; }
  th { font-size: 14px; }
  th, td { padding: 18px 16px; }
  details { padding: 20px 0; }
  summary { font-size: 19px; min-height: 44px; align-items: center; }
  details p, details li { font-size: 17px; }
  .tab { font-size: 16px; min-height: 48px; padding: 14px 12px; }
  .timeline-step { grid-template-columns: 52px 1fr; gap: 18px; padding: 24px 0; }
  .timeline-step span { font-size: 15px; }
  .timeline-step p { font-size: 17px; }
  .roadmap-stage span { font-size: 13px; padding: 9px 12px; }
  .exercise { padding: 30px; }
  .exercise label { font-size: 18px; margin-top: 24px; }
  .exercise label small { font-size: 14px; line-height: 1.8; margin: 6px 0 10px; }
  .exercise textarea, .exercise input, .exercise select { font-size: 17px; padding: 12px 14px; min-height: 48px; }
  .exercise textarea { min-height: 126px; line-height: 1.85; }
  .exercise select { max-width: 340px; }
  .save-status { font-size: 14px; }
  .actions button { font-size: 15px; padding: 12px 18px; min-height: 48px; }
  footer { font-size: 14px; padding-top: 32px; padding-bottom: 32px; }
  .footer-brand { font-size: 20px; }
  .mobile-jump { display: none; }
  .presenting .page-layout { max-width: 1400px; padding: 40px 5vw 120px; }
  .presentation-controls button { min-height: 44px; font-size: 15px; }
  .modal p { font-size: 15px; }
}
@media screen and (max-width: 1200px) {
  :root { --gutter: 32px; }
  .page-layout { grid-template-columns: 185px minmax(0, 1fr); gap: 36px; }
  .sidebar a { font-size: 14px; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow div:nth-child(2) { border-right: 0; }
  .flow div:nth-child(-n+2) { border-bottom: 1px solid #bfc0bb; }
  .flow div:nth-child(2):after { display: none; }
  .columns { gap: 24px; }
}
@media screen and (max-width: 960px) {
  .page-layout { display: block; max-width: 900px; padding-top: 32px; }
  .sidebar { display: none; }
  .mobile-jump { display: flex; position: sticky; top: 80px; z-index: 19; background: #f8f8f5f5; border-bottom: 1px solid var(--line); padding: 8px var(--gutter); gap: 14px; align-items: center; }
  .mobile-jump label { font-size: 13px; white-space: nowrap; color: var(--muted); }
  .mobile-jump select { width: 100%; min-height: 44px; border: 1px solid #cfd1cb; border-radius: 3px; background: #fff; color: var(--ink); padding: 8px 12px; font-size: 16px; }
  .chapter { scroll-margin-top: 160px; }
  .columns { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 48px; }
  .hero p { max-width: 680px; }
  .hero:after { color: #ffffff04; }
  header nav a { display: none; }
  .presenting .mobile-jump { display: none; }
}
@media screen and (max-width: 720px) {
  :root { --gutter: 22px; --body-size: 17px; }
  html { scroll-padding-top: 135px; }
  header { min-height: 64px; height: 64px; gap: 10px; padding: 0 18px; }
  .brand { flex-shrink: 0; }
  .brand img { width: 84px; }
  header nav { gap: 12px; }
  header button { font-size: 13px; padding: 8px 0; white-space: nowrap; }
  .hero { padding-top: 40px; padding-bottom: 30px; }
  .hero h1 { font-size: clamp(32px, 8.6vw, 42px); line-height: 1.45; letter-spacing: -.035em; margin: 22px 0; }
  .hero p { font-size: 17px; line-height: 1.95; }
  .hero:after { font-size: 220px; top: 75px; right: 0; }
  .eyebrow { font-size: 10px; letter-spacing: .12em; }
  .hero-actions { gap: 10px; margin: 26px 0 28px; }
  .hero-actions .button { font-size: 14px; padding: 12px 15px; }
  .hero-bottom { gap: 16px; display: grid; grid-template-columns: 1fr 1fr; }
  .hero-bottom > div:last-child { grid-column: 1 / -1; }
  .hero-bottom b { font-size: 14px; }
  .hero-bottom span { font-size: 12px; }
  .mobile-jump { top: 64px; padding: 8px 18px; gap: 10px; }
  .mobile-jump label { font-size: 12px; }
  .page-layout { padding-top: 25px; }
  .chapter { scroll-margin-top: 145px; padding-bottom: 38px; margin-bottom: 28px; }
  .chapter-num { font-size: 11px; margin-bottom: 14px; }
  .chapter-num b { font-size: 11px; }
  h2 { font-size: clamp(27px, 6.8vw, 32px); line-height: 1.55; margin: 12px 0 22px; }
  h3 { font-size: 22px; line-height: 1.65; }
  h4 { font-size: 18px; }
  p.lead { font-size: 19px; line-height: 1.95; }
  p { margin: 18px 0; }
  .columns, .compare, .exercise .field-grid { grid-template-columns: 1fr; }
  .callout { padding: 22px; margin: 24px 0; }
  .callout p, .compare p, details p, details li { font-size: 17px; }
  .source, .figure figcaption { font-size: 12px; }
  .compare > div { padding: 22px; }
  .tag { font-size: 11px; }
  .flow div { padding: 20px 13px; min-width: 0; }
  .flow span { font-size: 10px; letter-spacing: .02em; overflow-wrap: anywhere; }
  .flow strong { font-size: 17px; }
  .flow p { font-size: 14px; }
  .metric { padding: 20px 0; }
  .metric .big { font-size: 42px; }
  .metric p { font-size: 14px; }
  .tabs { margin: 22px 0; }
  .tab { font-size: 15px; padding: 13px 8px; }
  .timeline-step { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 22px 0; }
  .timeline-step p { font-size: 17px; }
  summary { font-size: 18px; line-height: 1.75; align-items: flex-start; }
  .table-wrap { overflow: visible; }
  table { display: block; width: 100%; min-width: 0; margin: 24px 0; }
  thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  tbody { display: grid; gap: 16px; }
  tr { display: block; border: 1px solid var(--line); padding: 18px; background: #fff; }
  td { display: block; border: 0; padding: 12px 0 0; font-size: 17px; line-height: 1.85; }
  td:first-child { padding: 0 0 12px; font-size: 18px; border-bottom: 1px solid var(--line); }
  td:not(:first-child):before { content: attr(data-label); display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 5px; }
  .exercise { padding: 20px 18px; margin: 22px 0; }
  .exercise h3 { margin-top: 5px; }
  .exercise label { font-size: 17px; }
  .exercise label small { font-size: 14px; }
  .exercise textarea, .exercise input, .exercise select { font-size: 17px; padding: 12px; }
  .exercise select { max-width: 100%; }
  .exercise textarea { min-height: 140px; }
  .save-status { font-size: 13px; }
  .actions { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .actions button { width: 100%; font-size: 16px; min-height: 48px; }
  .presenting .page-layout { padding: 28px 22px 110px; }
  .presenting h2 { font-size: 29px; }
  .presentation-controls button { font-size: 12px; padding: 8px 10px; }
  footer { font-size: 12px; }
}
@media screen and (max-width: 359px) {
  :root { --gutter: 18px; }
  header { padding: 0 14px; }
  .brand img { width: 70px; }
  header nav { gap: 10px; }
  header button { font-size: 12px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
}
@media print { .mobile-jump { display: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
