/* Caracol IA — escola aberta. Local assets and system fonts only. */
:root {
  --cream: #f7f5ec;
  --forest: #183e36;
  --terracotta: #ce5c39;
  --sage: #d8e5d7;
  --ink: #233b33;
  --muted: #5c685e;
  --line: #d5dbcf;
  --paper: #fffef9;
  --soft: #e9eee4;
  --rust: #a74329;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Arial, Helvetica, sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --radius: 5px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 112px; }
body { margin: 0; min-width: 0; background: var(--cream); color: var(--ink); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
main, section, article, aside, nav, div { min-width: 0; }
img { display: block; max-width: 100%; height: auto; }
svg { max-width: 100%; }
a { color: inherit; text-decoration: none; text-underline-offset: .23em; }
button, input, select, textarea { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
input, select, textarea { max-width: 100%; color: var(--forest); }
input[type='checkbox'], input[type='range'], progress { accent-color: var(--forest); }
input[type='checkbox'] { width: 20px; height: 20px; flex: 0 0 20px; margin: 3px 0 0; }
select { min-height: 48px; padding: 10px 38px 10px 15px; border: 1px solid #8a9a8b; border-radius: var(--radius); background: var(--paper); }
p { margin: 0 0 1.15em; }
h1, h2, h3 { margin: 0; color: var(--forest); font-weight: 400; }
h1, h2 { font-family: var(--serif); letter-spacing: -.045em; }
h1 { font-size: clamp(2.8rem, 5vw, 4.5rem); line-height: 1.08; }
h2 { font-size: clamp(2.2rem, 3.4vw, 3.3rem); line-height: 1.15; }
h3 { font-size: 1.35rem; line-height: 1.35; font-weight: 600; letter-spacing: -.025em; }
h1 em, h2 em { color: var(--rust); font-weight: 400; }
strong, b { font-weight: 600; }
ul, ol { padding-left: 1.4em; }
li + li { margin-top: .45em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
::selection { background: var(--sage); color: var(--forest); }
:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 4px; }
[hidden] { display: none !important; }
.container { width: min(calc(100% - 96px), 1280px); margin-inline: auto; }
.section { padding-block: 104px; }
.section-soft { background: var(--soft); }
.eyebrow { display: block; margin-bottom: 19px; color: var(--muted); font: 600 10px/1.6 var(--sans); letter-spacing: .15em; text-transform: uppercase; }
.small-note, .microcopy { font-size: 12px; line-height: 1.7; color: var(--muted); }
.icon { display: inline-block; flex: 0 0 21px; width: 21px; height: 21px; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: 10px; left: 18px; z-index: 1000; padding: 12px 22px; transform: translateY(-180%); background: var(--forest); color: white; border-radius: 3px; }
.skip:focus { transform: translateY(0); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 17px; min-height: 52px; padding: 14px 22px; border: 1px solid transparent; border-radius: 3px; font-size: 13px; line-height: 1.4; font-weight: 600; text-align: center; transition: background .18s, color .18s, border-color .18s; }
.button.primary { background: var(--forest); color: var(--cream); }
.button.primary:hover { background: #2c5548; }
.button.outline { background: transparent; color: var(--forest); border-color: #91a08f; }
.button.outline:hover { background: var(--sage); border-color: var(--forest); }
.button.light { background: var(--cream); color: var(--forest); }
.button.light:hover { background: var(--sage); }
.text-link { display: inline-flex; align-items: center; gap: 10px; color: var(--forest); font-size: 13px; line-height: 1.5; font-weight: 600; }
.text-link:hover { text-decoration: underline; }
.text-link .icon { width: 18px; height: 18px; flex-basis: 18px; }
.round-icon { display: grid; place-items: center; width: 51px; height: 51px; border: 1px solid #a5b5a1; border-radius: 50%; color: var(--forest); }
.round-icon .icon { width: 23px; height: 23px; }

/* Shared navigation */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--cream); border-bottom: 1px solid rgba(24, 62, 54, .12); }
.nav-shell { display: flex; align-items: center; justify-content: space-between; gap: 26px; min-height: 88px; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; color: var(--forest); line-height: 1; }
.brand img { width: 36px; height: 36px; }
.brand > span { display: inline-flex; align-items: baseline; font: 600 31px/1 var(--serif); letter-spacing: -.055em; }
.brand-suffix { margin-left: 2px; font: 400 12px/1 var(--sans); letter-spacing: -.03em; }
#nav-principal { display: flex; align-items: center; gap: 25px; }
#nav-principal > a { position: relative; padding: 10px 0; font-size: 12px; font-weight: 500; white-space: nowrap; }
#nav-principal > a::after { content: ''; position: absolute; right: 0; bottom: 3px; left: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .18s; }
#nav-principal > a:hover::after, #nav-principal > a[aria-current='page']::after { transform: scaleX(1); }
#nav-principal .author-nav { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.author-nav .icon { width: 13px; height: 13px; flex-basis: 13px; }
.nav-cta { display: inline-flex; align-items: center; gap: 12px; min-height: 43px; padding: 11px 15px; border: 1px solid var(--forest); border-radius: 3px; color: var(--forest); font-size: 11px; font-weight: 600; white-space: nowrap; }
.nav-cta:hover { background: var(--sage); }
.nav-cta .icon { width: 16px; height: 16px; flex-basis: 16px; }
.menu-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--forest); }

/* Opening composition */
.hero { padding: 82px 0 78px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); align-items: center; gap: 58px; }
.hero-copy { min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 30px; color: var(--muted); font-size: 9px; line-height: 1.5; font-weight: 600; letter-spacing: .1em; }
.pill > span, .caption-dot { flex: 0 0 6px; width: 6px; height: 6px; background: var(--terracotta); border-radius: 50%; }
.hero h1 { margin: 23px 0 24px; font-size: clamp(3.5rem, 6vw, 5.25rem); line-height: 1.04; letter-spacing: -.057em; }
.hero h1 em { color: var(--rust); }
.hero-lead { max-width: 420px; margin-bottom: 27px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.hero-secondary { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; }
.hero-secondary:hover { text-decoration: underline; }
.hero-secondary .icon { width: 17px; height: 17px; flex-basis: 17px; }
.hero .microcopy { display: flex; align-items: center; gap: 6px; margin: 14px 0 33px; font-size: 10px; }
.microcopy .icon { width: 14px; height: 14px; flex-basis: 14px; }
.hero-metrics { display: flex; gap: 35px; padding-top: 22px; border-top: 1px solid var(--line); }
.hero-metrics > div { display: flex; flex-direction: column; gap: 2px; }
.hero-metrics strong { font: 400 27px/1.2 var(--serif); letter-spacing: -.04em; }
.hero-metrics span { color: var(--muted); font-size: 9px; }
.hero-art { position: relative; padding-top: 10px; }
.hero-art > img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px 4px 80px 4px; }
.art-caption { display: flex; align-items: center; gap: 8px; margin-top: 15px; color: var(--muted); font-size: 10px; }
.art-index { display: block; margin-top: 8px; text-align: right; color: #6d7769; font-size: 8px; letter-spacing: .13em; }
.principle { padding-block: 57px; background: var(--forest); color: var(--cream); }
.principle-inner { display: grid; grid-template-columns: .65fr 1.8fr 1.2fr 48px; align-items: center; gap: 36px; }
.principle .eyebrow { margin: 0; color: #c3d3bd; font-size: 9px; }
.principle h2 { color: var(--cream); font-size: 34px; line-height: 1.18; letter-spacing: -.035em; }
.principle p { margin: 0; color: #d3decf; font-size: 12px; line-height: 1.85; }
.principle-inner > a { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid #8b9f8e; border-radius: 50%; }
.principle-inner > a:hover { background: #315548; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 42px; }
.section-heading .eyebrow { margin-bottom: 15px; }
.section-heading > p { max-width: 360px; margin: 0 0 3px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.section-heading > .text-link { margin-bottom: 6px; flex: 0 0 auto; }
.path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.path-card { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--paper); border-radius: 5px; overflow: hidden; }
.path-art { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.path-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.path-card:hover .path-art img { transform: scale(1.035); }
.path-art > span { position: absolute; bottom: 15px; left: 18px; display: grid; place-items: center; width: 35px; height: 35px; border-radius: 50%; background: var(--cream); color: var(--forest); font: 400 15px/1 var(--serif); }
.peach { background: #eed8c4; }
.sage { background: var(--sage); }
.sand { background: #e9e2d2; }
.path-content { display: flex; flex: 1; flex-direction: column; padding: 26px 27px 30px; }
.path-content .eyebrow { font-size: 8px; margin-bottom: 14px; }
.path-content h3 { margin-bottom: 15px; font: 400 29px/1.15 var(--serif); letter-spacing: -.035em; }
.path-content p { margin-bottom: 26px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.path-content .text-link { margin-top: auto; font-size: 11px; }
.method-preview { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 100px; }
.method-preview > div:first-child > p { max-width: 430px; margin: 24px 0 28px; color: var(--muted); font-size: 14px; line-height: 1.85; }
.cycle-preview { position: relative; min-height: 438px; max-width: 480px; width: 100%; margin-inline: auto; }
.cycle-preview::before { content: ''; position: absolute; inset: 47px 60px 78px; border: 1px solid #8fa68d; border-radius: 50%; }
.cycle-center { position: absolute; top: 44%; left: 50%; transform: translate(-50%, -50%); width: 180px; text-align: center; font: 400 22px/1.4 var(--serif); letter-spacing: -.025em; }
.cycle-center strong { font-weight: 400; font-style: italic; }
.cycle-preview > div { position: absolute; display: flex; align-items: center; flex-direction: column; gap: 6px; min-width: 100px; padding: 4px 5px; background: var(--soft); }
.cycle-preview > div b { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 50%; background: var(--forest); color: var(--cream); font-size: 10px; font-weight: 500; }
.cycle-preview > div span { font-size: 11px; }
.cycle-preview > div:nth-of-type(1) { top: 0; left: 50%; transform: translateX(-50%); }
.cycle-preview > div:nth-of-type(2) { top: 40%; right: 0; }
.cycle-preview > div:nth-of-type(3) { bottom: 47px; left: 50%; transform: translateX(-50%); }
.cycle-preview > div:nth-of-type(4) { top: 40%; left: 0; }
.cycle-note { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 325px); color: var(--muted); font-size: 10px; line-height: 1.6; text-align: center; }
.resource-home { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; }
.resource-large { display: flex; align-items: flex-start; flex-direction: column; padding: 38px; background: var(--sage); border-radius: 5px; }
.resource-large .round-icon { margin-bottom: 31px; }
.resource-large .eyebrow { font-size: 9px; margin-bottom: 16px; }
.resource-large h3 { margin-bottom: 20px; font: 400 39px/1.15 var(--serif); letter-spacing: -.04em; }
.resource-large p { max-width: 350px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.resource-large .text-link { margin-top: 16px; }
.resource-stack { display: grid; align-content: center; }
.resource-stack > a { display: grid; grid-template-columns: 30px 1fr 22px; align-items: center; gap: 17px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.resource-stack > a:first-child { border-top: 1px solid var(--line); }
.resource-stack > a:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.resource-stack h3 { font-size: 15px; margin-bottom: 5px; }
.resource-stack p { margin: 0; font-size: 12px; color: var(--muted); }
.final-call { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding-block: 103px; }
.final-call h2 { font-size: clamp(2.5rem, 4vw, 3.8rem); }
.final-call p { color: var(--muted); margin: 23px 0 0; font-size: 14px; }
.final-call > .button { flex: 0 0 auto; }

/* Lesson catalogue */
.page-heading { padding-top: 81px; padding-bottom: 62px; }
.page-heading h1 { max-width: 1040px; }
.page-heading > p { max-width: 650px; margin: 26px 0 0; color: var(--muted); font-size: 15px; line-height: 1.85; }
.course-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); align-items: start; gap: 65px; padding-bottom: 110px; }
.course-aside { position: sticky; top: 120px; }
.course-aside h2 { margin-bottom: 16px; font: 400 29px/1.2 var(--serif); }
.course-aside > p { font-size: 13px; color: var(--muted); line-height: 1.8; }
.course-aside > ol { padding: 0; margin: 26px 0 34px; list-style: none; counter-reset: path; }
.course-aside > ol li { position: relative; padding: 0 0 22px 36px; margin: 0; counter-increment: path; }
.course-aside > ol li::before { content: '0' counter(path); position: absolute; top: 0; left: 0; color: var(--rust); font-size: 11px; }
.course-aside > ol b { display: block; font-size: 12px; }
.course-aside > ol span { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); }
.progress-box { padding: 22px; background: var(--sage); border-radius: 4px; }
.progress-box > span { display: block; font-size: 10px; color: var(--muted); }
.progress-box > strong { display: block; margin: 7px 0 13px; font: 400 25px/1.3 var(--serif); }
.progress-box progress { display: block; width: 100%; height: 5px; margin-bottom: 18px; border: none; background: #bdcdb8; }
progress::-webkit-progress-bar { background: #bdcdb8; }
progress::-webkit-progress-value { background: var(--forest); }
progress::-moz-progress-bar { background: var(--forest); }
.progress-box .text-link { font-size: 11px; }
.resume-link { line-height: 1.6; }
.progress-box small { display: block; margin-top: 18px; font-size: 10px; line-height: 1.7; color: var(--muted); }
.search-field { display: flex; align-items: center; gap: 13px; padding: 13px 17px; border: 1px solid #93a08e; background: var(--paper); border-radius: 4px; }
.search-field:focus-within { outline: 2px solid var(--forest); outline-offset: 3px; }
.search-field > .icon { color: #64765f; }
.search-field input { min-width: 0; width: 100%; min-height: 25px; padding: 0; border: 0; outline: none; background: transparent; font-size: 13px; }
.search-field input::placeholder { color: #6d796a; opacity: 1; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 23px; }
.filter-tabs button { display: inline-flex; align-items: center; gap: 10px; min-height: 39px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); background: transparent; font-size: 11px; }
.filter-tabs button[aria-pressed='true'] { color: var(--cream); background: var(--forest); border-color: var(--forest); }
.filter-tabs button span { opacity: .8; }
.results-note { margin: 19px 0; color: var(--muted); font-size: 11px; }
.lesson-list { border-top: 1px solid var(--line); }
.lesson-card { display: grid; grid-template-columns: 45px minmax(0, 1fr) 27px; gap: 18px; align-items: start; padding: 28px 12px 28px 0; border-bottom: 1px solid var(--line); transition: background .18s; }
.lesson-card:hover { background: #edf0e5; }
.lesson-number { padding-top: 3px; color: var(--rust); font: 400 25px/1 var(--serif); }
.lesson-tag { display: block; margin-bottom: 8px; font-size: 8px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lesson-card h3 { margin-bottom: 9px; font-size: 17px; line-height: 1.4; }
.lesson-card p { max-width: 650px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.lesson-state { display: grid; place-items: center; margin-top: 25px; }
.lesson-card.is-complete .lesson-state::before { content: '✓'; font-weight: 600; color: var(--forest); }
.lesson-card.is-complete .lesson-state .icon { display: none; }
.empty-state { padding: 36px 24px; border: 1px dashed #97a58f; color: var(--muted); font-size: 14px; text-align: center; }

/* The reading room */
.breadcrumb { display: flex; align-items: center; gap: 11px; padding-block: 31px; color: var(--muted); font-size: 11px; }
.breadcrumb .icon { width: 13px; height: 13px; flex-basis: 13px; }
.breadcrumb a:hover { text-decoration: underline; }
.lesson-layout { display: grid; grid-template-columns: 260px minmax(0, 780px); align-items: start; justify-content: space-between; gap: 65px; padding-bottom: 104px; }
.lesson-sidebar { position: sticky; top: 114px; max-height: calc(100dvh - 143px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #adbca7 transparent; padding: 3px 13px 16px 1px; }
.lesson-sidebar > .text-link { display: flex; padding-bottom: 24px; font-size: 12px; }
.lesson-sidebar details { border-top: 1px solid var(--line); padding-block: 14px; }
.lesson-sidebar summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; cursor: pointer; color: var(--forest); font-size: 12px; font-weight: 600; }
summary::-webkit-details-marker { display: none; }
.lesson-sidebar summary .icon { width: 15px; height: 15px; flex-basis: 15px; }
.lesson-sidebar details[open] > summary .icon { transform: rotate(90deg); }
.lesson-sidebar ol { list-style: none; margin: 16px 0 0; padding: 0; }
.lesson-sidebar li + li { margin: 2px 0 0; }
.lesson-sidebar li a { display: grid; grid-template-columns: 23px minmax(0, 1fr); gap: 7px; padding: 9px 7px; border-left: 2px solid transparent; font-size: 11px; line-height: 1.55; color: var(--muted); }
.lesson-sidebar li a > span { color: #78866e; font-size: 10px; }
.lesson-sidebar li a:hover { color: var(--forest); background: #e9ecdf; }
.lesson-sidebar li a[aria-current='page'] { border-left-color: var(--terracotta); background: var(--sage); color: var(--forest); font-weight: 600; }
.lesson-sidebar a.is-complete > span { color: var(--forest); }
.lesson-sidebar a.is-complete > span::after { content: ' ·'; font-weight: 700; }
.lesson-article { width: 100%; max-width: 780px; }
.lesson-title { padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.lesson-title .eyebrow { font-size: 9px; }
.lesson-title h1 { font-size: clamp(2.4rem, 3.6vw, 3.5rem); line-height: 1.1; overflow-wrap: break-word; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 23px; color: var(--muted); font-size: 10px; }
.lesson-toc { margin: 25px 0 42px; padding: 15px 19px; border: 1px solid var(--line); background: #eff1e7; border-radius: 3px; }
.lesson-toc summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: 12px; font-weight: 600; cursor: pointer; list-style: none; }
.lesson-toc .icon { width: 16px; height: 16px; }
.lesson-toc[open] summary .icon { transform: rotate(90deg); }
.lesson-toc ol { margin: 17px 0 3px; font-size: 12px; line-height: 1.8; }
.lesson-toc a:hover { text-decoration: underline; }
.article-prose { color: #34433a; font-size: 17px; line-height: 1.85; }
.article-prose > section { scroll-margin-top: 115px; margin-bottom: 52px; }
.article-prose h2 { margin-bottom: 22px; font-size: 31px; line-height: 1.25; }
.article-prose h3 { margin: 30px 0 17px; font-size: 20px; }
.article-prose p { margin: 0 0 22px; overflow-wrap: break-word; }
.article-prose ul { margin: 20px 0 28px; padding-left: 23px; }
.article-prose li { padding-left: 5px; }
.article-prose li + li { margin-top: 11px; }
.article-prose a, .legal-prose p a { text-decoration: underline; }
code { padding: .12em .3em; border-radius: 3px; background: #e6eadf; color: #254b3c; font: .83em/1.7 var(--mono); overflow-wrap: anywhere; }
.code-block { margin: 28px 0 34px; border: 1px solid #284e42; border-radius: 4px; overflow: hidden; background: #17382f; }
.code-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 11px 18px; color: #d5e3ce; background: #244b3f; font-size: 10px; line-height: 1.5; }
.copy-code { display: inline-flex; align-items: center; gap: 7px; min-height: 29px; padding: 4px 8px; border: 1px solid #748c74; border-radius: 3px; background: transparent; color: #f4f5e9; font-size: 10px; }
.copy-code:hover { background: #3d6351; }
.copy-code .icon { width: 13px; height: 13px; flex-basis: 13px; }
.code-block pre { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; margin: 0; padding: 23px; scrollbar-width: thin; tab-size: 2; }
.code-block pre code { display: block; padding: 0; border-radius: 0; background: none; color: #e5edda; font: 14px/1.8 var(--mono); white-space: pre; overflow-wrap: normal; word-break: normal; }
.table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; margin: 28px 0 33px; border: 1px solid var(--line); border-radius: 3px; scrollbar-width: thin; background: var(--paper); }
table { width: 100%; min-width: 540px; border-collapse: collapse; text-align: left; font-size: 14px; line-height: 1.7; }
th, td { padding: 13px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
th:last-child, td:last-child { border-right: 0; }
tr:last-child td { border-bottom: 0; }
th { background: var(--sage); color: var(--forest); font-size: 13px; font-weight: 600; }
tbody tr:nth-child(even) { background: #f1f3eb; }
td code { font-size: 12px; }
.lesson-figure { max-width: 100%; overflow-x: auto; margin: 35px 0; padding: 18px; border: 1px solid var(--line); border-radius: 4px; background: #fff; scrollbar-width: thin; }
.lesson-figure img { width: 100%; min-width: 550px; max-width: none; height: auto; }
figcaption { display: block; margin-top: 18px; color: var(--muted); font: 12px/1.75 var(--sans); overflow-wrap: break-word; }
figcaption strong { color: var(--forest); }
.solution { margin-top: 27px; border: 1px solid #b1c1a9; border-radius: 4px; background: #edf2e6; }
.solution summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; padding: 16px 20px; font-size: 13px; font-weight: 600; color: var(--forest); list-style: none; }
.solution summary .icon { width: 16px; height: 16px; flex-basis: 16px; }
.solution[open] summary .icon { transform: rotate(90deg); }
.solution > div { padding: 5px 20px 4px; font-size: 15px; }
.lesson-sources { padding-block: 27px; margin-bottom: 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lesson-sources h2 { font: 400 24px/1.3 var(--serif); }
.lesson-sources p { margin: 9px 0 16px; color: var(--muted); font-size: 12px; }
.lesson-sources > a { display: inline-flex; align-items: center; gap: 10px; margin: 0 8px 7px 0; padding: 6px 12px; background: var(--sage); border-radius: 3px; font-size: 11px; }
.lesson-sources > a .icon { width: 14px; height: 14px; flex-basis: 14px; }
.complete-panel { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 26px; border-radius: 4px; background: var(--sage); }
.complete-panel strong { display: block; font-size: 14px; line-height: 1.55; }
.complete-panel p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.complete-panel .button { min-width: 190px; font-size: 10px; padding-inline: 15px; }
.complete-lesson.is-complete { background: #eaf0df; border-color: var(--forest); color: var(--forest); }
.complete-lesson.is-complete:hover { background: var(--cream); }
.lesson-pagination { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 25px; margin: 35px 0 23px; padding-block: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lesson-pagination > a:last-child { text-align: right; }
.lesson-pagination a > span { display: block; margin-bottom: 9px; color: var(--muted); font-size: 8px; line-height: 1.6; letter-spacing: .12em; }
.lesson-pagination strong { display: block; font-size: 12px; line-height: 1.7; font-weight: 500; }
.lesson-pagination .icon { width: 14px; height: 14px; }
.lesson-pagination a:hover strong { text-decoration: underline; }

/* Method explorers */
.method-intro { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 80px; padding-block: 12px 25px; }
.method-image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px 60px 4px 4px; }
.method-intro h2 { font-size: 39px; }
.method-intro p { color: var(--muted); font-size: 14px; line-height: 1.9; margin-top: 22px; }
.four-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px; }
.four-steps article { padding-top: 23px; border-top: 1px solid #95a88f; }
.four-steps article > span { display: block; margin-bottom: 25px; color: var(--rust); font: italic 400 35px/1 var(--serif); }
.four-steps h3 { margin-bottom: 14px; font-size: 16px; }
.four-steps p { color: var(--muted); font-size: 12px; line-height: 1.85; }
.maturity-explorer { display: grid; grid-template-columns: 1.5fr 1fr; gap: 45px; align-items: stretch; }
.level-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.level-tabs button { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 7px; min-height: 102px; padding: 16px 19px; border: 1px solid #adbea6; border-radius: 3px; background: transparent; color: var(--forest); text-align: left; }
.level-tabs button b { font: 400 25px/1 var(--serif); }
.level-tabs button span { font-size: 10px; }
.level-tabs button:hover { background: var(--sage); }
.level-tabs button[aria-pressed='true'] { background: var(--forest); color: var(--cream); border-color: var(--forest); }
.level-detail { display: flex; flex-direction: column; justify-content: center; padding: 39px; border: 1px solid #b1bda7; border-radius: 4px; background: var(--cream); }
.level-detail .eyebrow { color: var(--rust); margin-bottom: 16px; font-size: 12px; }
.level-detail h3 { margin-bottom: 17px; font: 400 34px/1.2 var(--serif); }
.level-detail p { margin-bottom: 29px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.maturity-explorer + .small-note { margin: 24px 0 0; }
.maturity-lab { display: grid; grid-template-columns: 1.7fr 1fr; gap: 48px; }
.range-item { display: grid; grid-template-columns: minmax(0, 1fr) 165px 35px; align-items: center; gap: 22px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.range-item:first-child { border-top: 1px solid var(--line); }
.range-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.maturity-range { width: 100%; min-height: 30px; margin: 0; }
.range-item output { font: 400 22px/1 var(--serif); text-align: right; }
.maturity-result { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 34px; border-radius: 4px; background: var(--sage); text-align: center; }
.maturity-result > span { font-size: 11px; }
.maturity-result strong { margin: 13px 0 12px; font: 400 88px/1 var(--serif); letter-spacing: -.07em; }
.maturity-result p { max-width: 220px; color: var(--muted); font-size: 12px; }
.maturity-result small { max-width: 230px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.gate-cards, .profile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.gate-cards { margin: 42px 0 31px; }
.gate-cards article { padding: 29px; background: var(--cream); border: 1px solid #c5d1bd; border-radius: 4px; }
.gate-dot { display: block; width: 10px; height: 10px; margin-bottom: 24px; border-radius: 50%; }
.gate-dot.green { background: #356744; }
.gate-dot.amber { background: #956a12; }
.gate-dot.red { background: #b34930; }
.gate-cards h3 { margin-bottom: 14px; font: 400 27px/1.2 var(--serif); }
.gate-cards p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.85; }
.profile-grid article { border-top: 1px solid #91a589; padding-top: 23px; }
.profile-grid article > span { color: var(--rust); font-size: 9px; letter-spacing: .12em; }
.profile-grid h3 { margin: 23px 0 15px; font: 400 28px/1.2 var(--serif); }
.profile-grid p { color: var(--muted); font-size: 12px; line-height: 1.85; }
.profile-grid .text-link { margin-top: 14px; font-size: 11px; }

/* Practice and forms */
.practice-layout { display: grid; grid-template-columns: minmax(0, 1fr) 265px; gap: 65px; padding-bottom: 100px; align-items: start; }
.quiz-panel { padding: 31px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); }
.quiz-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.quiz-header .eyebrow { margin: 0; font-size: 9px; }
.quiz-header > span:last-child { color: var(--muted); font-size: 11px; white-space: nowrap; }
#quiz-topic { width: 100%; margin-bottom: 28px; font-size: 12px; }
.quiz-topic { display: block; margin-bottom: 13px; color: var(--rust); font-size: 10px; letter-spacing: .07em; }
#quiz-content h2 { margin-bottom: 26px; font: 400 28px/1.45 var(--serif); letter-spacing: -.025em; scroll-margin-top: 120px; }
.quiz-options { display: grid; gap: 10px; margin-bottom: 22px; }
.quiz-option { display: grid; grid-template-columns: 27px minmax(0, 1fr) auto; align-items: start; gap: 13px; width: 100%; padding: 16px; border: 1px solid #c7d1c0; border-radius: 4px; background: var(--cream); color: var(--ink); font-size: 15px; line-height: 1.7; text-align: left; }
.quiz-option > span { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid #aebda5; border-radius: 50%; font-size: 10px; line-height: 1; }
.quiz-option > b { color: #275b38; }
.quiz-option:not(:disabled):hover { background: #e7eedf; border-color: #6d8968; }
.quiz-option:disabled { cursor: default; opacity: 1; }
.quiz-option.answer-correct, .quiz-option.is-correct { border-color: #4f7a4e; background: #e4efdc; color: #23452c; }
.quiz-option.answer-wrong, .quiz-option.is-incorrect { border-color: #ac5c42; background: #f8e6db; color: #6a3426; }
.quiz-option.answer-correct > span { border-color: #4f7a4e; background: #d2e3c7; }
.quiz-option.answer-wrong > span { border-color: #ac5c42; }
.quiz-feedback { margin-top: 26px; padding: 22px; border-left: 3px solid #4f7a4e; border-radius: 0 4px 4px 0; background: #edf3e5; font-size: 13px; line-height: 1.85; }
.quiz-feedback.correct { border-color: #4f7a4e; background: #edf3e5; }
.quiz-feedback.review { border-color: var(--terracotta); background: #f6eadd; }
.quiz-feedback > strong { display: block; margin-bottom: 11px; font-size: 14px; color: var(--forest); }
.quiz-feedback p { margin-bottom: 13px; }
.quiz-feedback .text-link { font-size: 11px; }
.quiz-retry { display: block; margin-top: 18px; min-height: 35px; padding: 5px 0; border: 0; background: transparent; color: var(--forest); text-decoration: underline; text-underline-offset: 4px; font-size: 11px; }
.quiz-controls { display: flex; justify-content: space-between; gap: 14px; margin-top: 29px; padding-top: 24px; border-top: 1px solid var(--line); }
.quiz-controls .button { min-height: 45px; font-size: 11px; padding: 12px 17px; }
.practice-aside { padding-top: 10px; }
.practice-aside .round-icon { margin-bottom: 25px; }
.practice-aside h2 { font-size: 32px; margin-bottom: 21px; }
.practice-aside p { color: var(--muted); font-size: 12px; line-height: 1.9; }
.practice-aside .text-link { margin-top: 11px; font-size: 11px; }
.gate-lab { display: grid; grid-template-columns: 1.35fr 1fr; gap: 50px; align-items: stretch; }
#gate-form { display: grid; align-content: start; gap: 10px; }
#gate-form label { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; color: var(--ink); font-size: 13px; line-height: 1.7; }
#gate-form .button { justify-self: start; margin-top: 14px; }
.gate-result { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 37px; border: 1px solid #9fb392; border-radius: 4px; background: var(--cream); }
.gate-result .eyebrow { margin-bottom: 20px; font-size: 9px; }
.gate-result h3 { margin-bottom: 22px; color: #953f2c; font: 400 37px/1.2 var(--serif); overflow-wrap: break-word; }
#gate-verdict[data-verdict='LIBERADO'] { color: #2f603c; }
#gate-verdict[data-verdict='LIBERADO COM RESSALVAS'] { color: #735011; }
.gate-result p { font-size: 13px; line-height: 1.9; }
.gate-result small { display: block; margin: 4px 0 22px; color: var(--muted); font-size: 10px; line-height: 1.8; }
.gate-result .text-link { font-size: 11px; }
.download-feature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 75px; }
.download-feature > div:first-child img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px 70px 4px 4px; }
.download-feature h2 { font-size: 42px; margin-bottom: 23px; }
.download-feature p { color: var(--muted); font-size: 14px; line-height: 1.9; }
.download-feature .small-note { font-size: 11px; }
.download-feature .text-link { display: flex; margin-top: 19px; font-size: 11px; }

/* Downloads, diagrams, and references */
.library-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.download-card { display: flex; align-items: flex-start; flex-direction: column; padding: 45px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); }
.download-card .round-icon { margin-bottom: 32px; }
.download-card h2 { margin-bottom: 23px; font-size: 39px; }
.download-card p { color: var(--muted); font-size: 13px; line-height: 1.85; }
.download-card small { display: block; margin-top: 21px; color: var(--muted); font-size: 10px; line-height: 1.8; }
.download-card > .button { margin-top: auto; }
.book-download { position: relative; min-height: 490px; padding: 45px; border-color: var(--forest); background: var(--forest); color: var(--cream); }
.book-download::after { content: ''; position: absolute; top: 27px; right: 27px; bottom: 27px; left: 27px; pointer-events: none; border: 1px solid #75947d; border-radius: 2px; }
.book-download > * { position: relative; z-index: 1; }
.book-download .eyebrow { margin-bottom: 47px; color: #cedfc6; font-size: 9px; }
.book-download h2 { color: var(--cream); font-size: 70px; line-height: .98; margin-bottom: 17px; }
.book-download .book-subtitle { color: #dbe6d0; font: italic 400 21px/1.4 var(--serif); }
.book-author { display: block; margin: 13px 0 35px; font-size: 9px; letter-spacing: .17em; }
.download-meta { display: flex; flex-wrap: wrap; gap: 19px; margin-bottom: 28px; color: #cfddc5; font-size: 10px; }
.clean-list { display: grid; gap: 9px; margin: 9px 0 30px; padding: 0; list-style: none; }
.clean-list li { display: flex; align-items: flex-start; gap: 9px; margin: 0; color: var(--muted); font-size: 12px; }
.clean-list .icon { width: 15px; height: 15px; flex-basis: 15px; margin-top: 2px; }
.notice { display: flex; align-items: flex-start; gap: 17px; margin-top: 40px; padding: 23px; background: var(--sage); border-radius: 4px; }
.notice .icon { margin-top: 3px; }
.notice p { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.9; }
.diagram-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 39px 30px; }
.diagram-grid article { border-bottom: 1px solid #bdc9b4; padding-bottom: 27px; }
.diagram-grid article > a { display: grid; place-items: center; min-height: 280px; padding: 14px; border: 1px solid #cad2c1; border-radius: 4px; background: white; }
.diagram-grid img { width: 100%; max-height: 310px; object-fit: contain; }
.diagram-grid h3 { margin: 21px 0 13px; font-size: 17px; }
.diagram-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.reference-list { border-top: 1px solid var(--line); }
.reference-list details { scroll-margin-top: 111px; border-bottom: 1px solid var(--line); }
.reference-list summary { display: grid; grid-template-columns: 45px minmax(0, 1fr) 20px; align-items: center; gap: 19px; padding: 24px 0; list-style: none; cursor: pointer; }
.reference-list summary > span { color: var(--rust); font: 400 22px/1 var(--serif); }
.reference-list summary strong { font-size: 14px; line-height: 1.6; font-weight: 500; }
.reference-list summary .icon { width: 17px; height: 17px; flex-basis: 17px; }
.reference-list details[open] > summary .icon { transform: rotate(90deg); }
.reference-list details > div { max-width: 850px; padding: 0 0 27px 64px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.reference-list details .small-note { font-size: 11px; }
.reference-list details .text-link { margin-top: 5px; font-size: 11px; }

/* A glossary with room to read */
.glossary-wrap { padding-bottom: 110px; }
.glossary-wrap > .search-field { max-width: 740px; }
.glossary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 28px; }
.glossary-grid article { display: flex; flex-direction: column; padding: 29px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); scroll-margin-top: 110px; }
.glossary-grid h2 { margin-bottom: 20px; font: 400 30px/1.2 var(--serif); letter-spacing: -.035em; overflow-wrap: break-word; }
.glossary-grid article > p { font-size: 14px; line-height: 1.9; }
.term-example { padding-top: 17px; margin-top: auto; border-top: 1px solid var(--line); }
.term-example > span { color: var(--rust); font-size: 8px; font-weight: 600; letter-spacing: .11em; }
.term-example p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.9; overflow-wrap: anywhere; }
.term-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 23px; }
.term-links a { display: inline-flex; align-items: center; gap: 5px; color: var(--forest); font-size: 10px; font-weight: 600; }
.term-links a:hover { text-decoration: underline; }
.term-links .icon { width: 14px; height: 14px; flex-basis: 14px; }

/* Real covers, kept whole */
.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; }
.book-card { min-width: 0; }
.book-art { display: flex; align-items: center; justify-content: center; min-height: 398px; padding: 29px 24px; border-radius: 4px; background: #e7e8da; }
.book-art-0 { background: #e6e9dd; }
.book-art-1 { background: #e7e2d9; }
.book-art-2 { background: #e6e4d7; }
.book-art img { width: auto; max-width: 100%; height: 340px; object-fit: contain; transition: transform .25s; }
.book-art:hover img { transform: translateY(-5px); }
.book-info { padding-top: 26px; }
.book-info .eyebrow { margin-bottom: 11px; font-size: 8px; }
.book-info h2 { margin-bottom: 12px; font: 400 29px/1.2 var(--serif); letter-spacing: -.035em; }
.book-info p { min-height: 42px; margin-bottom: 15px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.book-info .text-link { font-size: 11px; }
.home-books .book-art { min-height: 370px; padding-block: 15px; }
.store-books { padding-bottom: 70px; }
.store-note { display: flex; align-items: flex-start; gap: 25px; max-width: 850px; padding: 30px; border: 1px solid var(--line); border-radius: 4px; background: #edf0e5; }
.store-note .round-icon { flex: 0 0 51px; }
.store-note h2 { margin-bottom: 10px; font: 400 26px/1.3 var(--serif); }
.store-note p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }

/* Quiet utility pages and close */
.legal-prose { max-width: 850px; padding-bottom: 110px; font-size: 16px; line-height: 1.85; }
.legal-prose h2 { margin: 42px 0 20px; font-size: 30px; }
.legal-prose h2:first-child { margin-top: 0; }
.legal-prose p { color: var(--muted); }
.legal-prose li { color: var(--muted); }
.not-found { padding-block: 115px 140px; }
.not-found h1 { font-size: clamp(3.5rem, 7vw, 6rem); }
.not-found p { margin: 26px 0 31px; color: var(--muted); }
.site-footer { background: var(--forest); color: var(--cream); padding-top: 62px; }
.footer-main { display: grid; grid-template-columns: 1.2fr .7fr .7fr 1.1fr; gap: 50px; padding-bottom: 52px; }
.site-footer .brand { color: var(--cream); }
.site-footer .brand img { filter: none; }
.footer-brand > p { margin: 23px 0 0; color: #c9d8c3; font-size: 12px; line-height: 1.9; }
.footer-main h2 { margin-bottom: 22px; color: #f0f3e4; font: 600 11px/1.5 var(--sans); letter-spacing: .02em; }
.footer-main > div:not(.footer-brand) > a { display: block; width: fit-content; margin: 10px 0; color: #cbd9c4; font-size: 11px; }
.footer-main a:hover { text-decoration: underline; }
.footer-main a .icon { width: 13px; height: 13px; flex-basis: 13px; }
.footer-note .eyebrow { margin-bottom: 19px; color: #cbd9c4; font-size: 9px; }
.footer-note p { color: #cbd9c4; font-size: 12px; line-height: 1.9; }
.footer-note a { margin-top: 21px !important; color: #f1f3e4 !important; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding-block: 23px; border-top: 1px solid #4d6e59; color: #bccfb7; font-size: 9px; line-height: 1.8; }
.footer-bottom > div { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-bottom a:hover { text-decoration: underline; }
.site-footer :focus-visible, .principle :focus-visible, .code-block :focus-visible { outline-color: #f5c17b; }
.toast { position: fixed; z-index: 200; bottom: 23px; left: 50%; transform: translate(-50%, 20px); width: max-content; max-width: min(calc(100% - 32px), 560px); padding: 15px 23px; border: 1px solid #6c8b70; border-radius: 4px; background: var(--forest); color: var(--cream); font-size: 12px; line-height: 1.7; text-align: center; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* Tablet: the navigation opens as an explicit, keyboard-accessible panel. */
@media (max-width: 1100px) {
  .container { width: min(calc(100% - 64px), 1280px); }
  .nav-shell { min-height: 78px; gap: 18px; }
  .menu-toggle { display: inline-flex; order: 3; }
  .nav-cta { order: 2; margin-left: auto; }
  #nav-principal { display: none; position: absolute; top: calc(100% - 1px); left: 0; right: 0; max-height: calc(100dvh - 104px); overflow-y: auto; align-items: stretch; flex-direction: column; gap: 0; padding: 18px 24px; border: 1px solid #b2bfa8; border-radius: 0 0 4px 4px; background: var(--cream); }
  #nav-principal.is-open, .site-header.is-open #nav-principal, .menu-toggle[aria-expanded='true'] + #nav-principal { display: flex; }
  #nav-principal > a { width: 100%; padding: 13px 0; font-size: 14px; white-space: normal; }
  #nav-principal > a + a { border-top: 1px solid var(--line); }
  #nav-principal > a::after { display: none; }
  #nav-principal > a[aria-current='page'] { color: var(--rust); font-weight: 600; }
  .hero { padding-block: 62px; }
  .hero-grid { gap: 35px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero h1 { font-size: clamp(3.1rem, 6.1vw, 4.5rem); }
  .hero-lead { font-size: 13px; }
  .hero-actions { gap: 18px; }
  .hero .button { padding-inline: 17px; font-size: 11px; }
  .hero-secondary { font-size: 11px; }
  .hero-metrics { gap: 24px; }
  .principle-inner { grid-template-columns: 1.5fr 1fr 45px; gap: 26px; }
  .principle .eyebrow { grid-column: 1 / -1; }
  .principle h2 { font-size: 31px; }
  .section { padding-block: 80px; }
  .section-heading h2 { font-size: 40px; }
  .path-grid { gap: 19px; }
  .path-content { padding: 23px 21px; }
  .path-content h3 { font-size: 26px; }
  .method-preview { grid-template-columns: minmax(0, 1fr); gap: 45px; }
  .method-preview h2 { font-size: 39px; }
  .resource-home { gap: 35px; }
  .resource-large { padding: 30px; }
  .resource-large h3 { font-size: 34px; }
  .book-grid { gap: 23px; }
  .book-art { padding-inline: 18px; }
  .book-info h2 { font-size: 26px; }
  .course-layout { grid-template-columns: 225px minmax(0, 1fr); gap: 38px; }
  .lesson-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 35px; }
  .lesson-title h1 { font-size: 40px; }
  .article-prose { font-size: 16px; }
  .article-prose h2 { font-size: 29px; }
  .complete-panel { align-items: flex-start; flex-direction: column; }
  .method-intro { gap: 43px; }
  .method-intro h2 { font-size: 34px; }
  .four-steps { gap: 24px; }
  .maturity-explorer { gap: 27px; grid-template-columns: 1.4fr 1fr; }
  .level-tabs button { padding: 14px; }
  .level-detail { padding: 27px; }
  .maturity-lab { gap: 32px; grid-template-columns: 1.6fr 1fr; }
  .range-item { grid-template-columns: minmax(0, 1fr) 125px 31px; gap: 15px; font-size: 12px; }
  .gate-cards, .profile-grid { gap: 23px; }
  .gate-cards article { padding: 25px; }
  .practice-layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 33px; }
  .quiz-panel { padding: 26px; }
  #quiz-content h2 { font-size: 26px; }
  .practice-aside h2 { font-size: 30px; }
  .gate-lab { gap: 34px; }
  .gate-result { padding: 29px; }
  .download-feature { gap: 42px; }
  .download-feature h2 { font-size: 36px; }
  .download-card { padding: 35px; }
  .book-download h2 { font-size: 60px; }
  .glossary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-main { gap: 32px; grid-template-columns: 1fr .65fr .65fr 1fr; }
  .footer-main .brand > span { font-size: 27px; }
  .footer-main .brand img { width: 30px; height: 30px; }
}

/* Mobile: readable pages and bounded horizontal scrollers. */
@media (max-width: 768px) {
  html { scroll-padding-top: 95px; }
  body { font-size: 15px; }
  .container { width: calc(100% - 40px); }
  .nav-shell { min-height: 72px; gap: 14px; }
  .brand > span { font-size: 30px; }
  .brand img { width: 34px; height: 34px; }
  .nav-cta { display: none; }
  .menu-toggle { margin-left: auto; }
  #nav-principal { padding: 13px 20px; max-height: calc(100dvh - 90px); }
  h1 { font-size: 44px; }
  h2 { font-size: 35px; }
  .eyebrow { font-size: 9px; }
  .hero { padding: 43px 0 47px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero h1 { max-width: 590px; font-size: clamp(3.3rem, 8.5vw, 4.4rem); margin-top: 22px; }
  .hero-lead { max-width: 520px; font-size: 14px; line-height: 1.8; }
  .pill { font-size: 8px; letter-spacing: .08em; }
  .hero-actions { gap: 23px; }
  .hero .button { min-height: 49px; font-size: 12px; padding-inline: 20px; }
  .hero-secondary { font-size: 12px; }
  .hero .microcopy { margin-bottom: 27px; }
  .hero-metrics { max-width: 480px; justify-content: space-between; gap: 12px; }
  .hero-metrics strong { font-size: 29px; }
  .hero-metrics span { font-size: 9px; }
  .hero-art { padding-top: 0; }
  .hero-art > img { border-bottom-right-radius: 55px; }
  .art-caption { font-size: 10px; }
  .principle { padding-block: 37px; }
  .principle-inner { grid-template-columns: minmax(0, 1fr) 45px; gap: 22px; }
  .principle .eyebrow { grid-column: 1 / -1; }
  .principle h2 { font-size: 31px; grid-column: 1 / -1; }
  .principle p { font-size: 12px; }
  .section { padding-block: 63px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 23px; margin-bottom: 31px; }
  .section-heading h2 { font-size: 35px; }
  .section-heading > p { max-width: 530px; font-size: 12px; }
  .section-heading > .text-link { font-size: 12px; margin: 0; }
  .path-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .path-art { aspect-ratio: 3 / 2; }
  .path-content { padding: 27px; }
  .path-content h3 { font-size: 32px; }
  .path-content p { font-size: 13px; }
  .path-content .text-link { font-size: 12px; }
  .method-preview { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .method-preview h2 { font-size: 35px; }
  .method-preview > div:first-child > p { max-width: 560px; }
  .cycle-preview { max-width: 430px; min-height: 405px; }
  .cycle-preview::before { inset: 45px 58px 73px; }
  .cycle-center { width: 160px; font-size: 21px; }
  .resource-home { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .resource-large { padding: 30px; }
  .resource-large h3 { font-size: 36px; }
  .resource-large p { max-width: 500px; font-size: 13px; }
  .resource-stack > a { padding: 24px 0; }
  .resource-stack h3 { font-size: 15px; }
  .book-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .book-art, .home-books .book-art { min-height: 395px; padding-block: 27px; }
  .book-art img { height: 340px; }
  .book-info { padding-top: 23px; }
  .book-info h2 { font-size: 30px; }
  .book-info p { min-height: 0; font-size: 13px; }
  .book-info .text-link { font-size: 12px; }
  .final-call { padding-block: 65px; align-items: flex-start; flex-direction: column; gap: 28px; }
  .final-call h2 { font-size: 39px; }
  .final-call p { font-size: 13px; margin-top: 19px; }
  .page-heading { padding-top: 49px; padding-bottom: 43px; }
  .page-heading h1 { font-size: clamp(2.7rem, 7.3vw, 3.7rem); }
  .page-heading > p { font-size: 14px; margin-top: 23px; }
  .course-layout { grid-template-columns: minmax(0, 1fr); gap: 37px; padding-bottom: 68px; }
  .course-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 0 27px; }
  .course-aside h2, .course-aside > p { grid-column: 1 / -1; }
  .course-aside > p { max-width: 540px; }
  .course-aside > ol { margin-block: 17px 0; }
  .progress-box { margin-top: 13px; }
  .filter-tabs { gap: 7px; }
  .filter-tabs button { padding-inline: 11px; font-size: 10px; }
  .lesson-card { grid-template-columns: 32px minmax(0, 1fr) 18px; gap: 12px; padding-block: 24px; padding-right: 0; }
  .lesson-number { font-size: 24px; }
  .lesson-card h3 { font-size: 16px; }
  .lesson-card p { font-size: 12px; }
  .lesson-state .icon { width: 18px; height: 18px; }
  .breadcrumb { padding-block: 24px; }
  .lesson-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-bottom: 65px; }
  .lesson-sidebar { position: static; max-height: 270px; padding: 17px 15px; background: #eaf0e2; border: 1px solid #c4d0ba; border-radius: 4px; }
  .lesson-sidebar > .text-link { padding-bottom: 15px; }
  .lesson-sidebar summary { font-size: 12px; }
  .lesson-sidebar li a { font-size: 12px; padding-block: 10px; }
  .lesson-title h1 { font-size: 40px; }
  .lesson-title { padding-bottom: 24px; }
  .lesson-meta { font-size: 10px; }
  .lesson-toc { margin: 23px 0 34px; }
  .article-prose { font-size: 16px; line-height: 1.85; }
  .article-prose h2 { font-size: 29px; line-height: 1.25; }
  .article-prose > section { margin-bottom: 39px; scroll-margin-top: 95px; }
  .code-block pre { padding: 18px; }
  .code-block pre code { font-size: 14px; }
  .code-toolbar { padding-inline: 15px; }
  .lesson-figure { padding: 12px; }
  .lesson-figure img { min-width: 550px; }
  figcaption { font-size: 11px; line-height: 1.8; }
  .solution summary { padding-inline: 16px; }
  .solution > div { padding-inline: 16px; font-size: 14px; }
  .complete-panel { padding: 23px; }
  .complete-panel .button { min-width: 0; width: 100%; font-size: 11px; }
  .lesson-pagination { gap: 20px; }
  .lesson-pagination strong { font-size: 11px; }
  .method-intro { grid-template-columns: minmax(0, 1fr); gap: 33px; padding-top: 0; padding-bottom: 10px; }
  .method-intro h2 { font-size: 35px; }
  .method-intro p { font-size: 14px; }
  .four-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 33px 26px; }
  .four-steps article > span { font-size: 32px; margin-bottom: 18px; }
  .four-steps h3 { font-size: 15px; }
  .maturity-explorer { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .level-tabs { gap: 7px; }
  .level-tabs button { min-height: 90px; padding: 14px; }
  .level-tabs button span { font-size: 9px; }
  .level-detail { padding: 30px; min-height: 260px; }
  .level-detail h3 { font-size: 32px; }
  .maturity-lab { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .range-item { grid-template-columns: minmax(0, 1fr) 135px 31px; gap: 15px; }
  .maturity-result { min-height: 255px; }
  .maturity-result strong { font-size: 75px; }
  .gate-cards, .profile-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .gate-cards article { padding: 28px; }
  .gate-cards h3 { font-size: 29px; }
  .gate-cards p, .profile-grid p { max-width: 520px; font-size: 13px; }
  .profile-grid h3 { font-size: 29px; }
  .practice-layout { grid-template-columns: minmax(0, 1fr); gap: 34px; padding-bottom: 65px; }
  .quiz-panel { padding: 22px; }
  .quiz-header { gap: 10px; }
  .quiz-header .eyebrow { font-size: 8px; }
  #quiz-content h2 { font-size: 26px; scroll-margin-top: 100px; }
  .quiz-option { padding: 14px; gap: 10px; font-size: 15px; }
  .quiz-feedback { padding: 19px; font-size: 12px; }
  .quiz-controls .button { padding-inline: 13px; font-size: 10px; }
  .practice-aside { padding: 27px; border-top: 1px solid var(--line); background: #edf0e5; border-radius: 3px; }
  .practice-aside .round-icon { margin-bottom: 20px; }
  .practice-aside h2 { font-size: 31px; }
  .practice-aside p { max-width: 520px; font-size: 13px; }
  .gate-lab { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  #gate-form label { font-size: 13px; }
  #gate-form .button { justify-self: stretch; }
  .gate-result { padding: 29px; min-height: 320px; }
  .gate-result h3 { font-size: 35px; }
  .download-feature { grid-template-columns: minmax(0, 1fr); gap: 33px; }
  .download-feature h2 { font-size: 36px; }
  .download-feature .button { font-size: 12px; }
  .library-grid { grid-template-columns: minmax(0, 1fr); gap: 27px; }
  .download-card { padding: 32px; }
  .download-card h2 { font-size: 35px; }
  .book-download { min-height: 490px; padding: 42px; }
  .book-download h2 { font-size: 65px; }
  .download-card > .button { margin-top: 15px; }
  .book-download > .button { margin-top: auto; }
  .notice { padding: 22px; gap: 13px; }
  .diagram-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .diagram-grid article > a { min-height: 230px; padding: 12px; }
  .diagram-grid img { max-height: none; }
  .reference-list summary { grid-template-columns: 33px minmax(0, 1fr) 17px; gap: 13px; padding-block: 21px; }
  .reference-list summary strong { font-size: 12px; }
  .reference-list details > div { padding-left: 0; font-size: 12px; }
  .glossary-wrap { padding-bottom: 70px; }
  .glossary-grid { gap: 20px; }
  .glossary-grid article { padding: 24px; }
  .glossary-grid h2 { font-size: 28px; }
  .store-books { padding-bottom: 48px; }
  .store-note { padding: 23px; gap: 18px; }
  .store-note .round-icon { width: 40px; height: 40px; flex-basis: 40px; }
  .store-note h2 { font-size: 25px; }
  .legal-prose { padding-bottom: 68px; font-size: 15px; }
  .legal-prose h2 { font-size: 29px; }
  .not-found { padding-block: 80px 100px; }
  .site-footer { padding-top: 47px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 36px 28px; padding-bottom: 38px; }
  .footer-brand, .footer-note { grid-column: 1 / -1; }
  .footer-brand > p { font-size: 12px; }
  .footer-note p { max-width: 470px; }
  .footer-main h2 { margin-bottom: 17px; }
  .footer-main > div:not(.footer-brand) > a { font-size: 12px; margin-block: 12px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 14px; padding-block: 24px; font-size: 9px; }
  .toast { bottom: 15px; padding: 14px 19px; font-size: 11px; }
}
@media (max-width: 480px) {
  .container { width: calc(100% - 36px); }
  .hero h1 { font-size: 52px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 19px; }
  .hero .microcopy { font-size: 9px; }
  .hero-metrics { gap: 9px; }
  .hero-metrics span { font-size: 8px; }
  .hero-metrics strong { font-size: 27px; }
  .section-heading h2, .method-preview h2 { font-size: 33px; }
  .cycle-preview { min-height: 365px; }
  .cycle-preview::before { inset: 41px 47px 69px; }
  .cycle-center { width: 127px; font-size: 19px; }
  .cycle-preview > div { min-width: 85px; padding-inline: 2px; }
  .cycle-preview > div b { width: 33px; height: 33px; font-size: 9px; }
  .cycle-preview > div span { font-size: 9px; }
  .cycle-note { max-width: 290px; font-size: 9px; }
  .course-aside { grid-template-columns: minmax(0, 1fr); }
  .course-aside > ol { display: none; }
  .progress-box { padding: 20px; }
  .lesson-title h1 { font-size: 35px; }
  .lesson-pagination { gap: 17px; }
  .lesson-pagination strong { font-size: 10px; }
  .range-item { grid-template-columns: minmax(0, 1fr) 36px; gap: 9px; }
  .range-item > span { grid-column: 1; }
  .range-item output { grid-column: 2; grid-row: 1; }
  .range-item input { grid-column: 1 / -1; grid-row: 2; }
  .quiz-panel { padding: 18px; }
  .quiz-controls { flex-wrap: wrap; }
  .quiz-controls .button { flex: 1 1 auto; }
  .quiz-option { grid-template-columns: 24px minmax(0, 1fr) auto; padding: 12px; font-size: 15px; }
  .quiz-option > span { width: 23px; height: 23px; }
  .glossary-grid { grid-template-columns: minmax(0, 1fr); }
  .glossary-grid article { padding: 26px; }
  .glossary-grid article > p { font-size: 14px; }
  .term-example p { font-size: 13px; }
  .level-tabs button { min-height: 85px; padding: 12px 9px; }
  .level-tabs button span { font-size: 8px; overflow-wrap: break-word; }
  .book-download { padding: 36px; }
  .book-download::after { inset: 20px; }
  .book-download h2 { font-size: 59px; }
  .download-card { padding: 28px; }
  .download-meta { gap: 13px; }
  .store-note { flex-direction: column; }
  .four-steps { column-gap: 20px; }
  .four-steps h3 { font-size: 14px; }
  .four-steps p { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .path-card:hover .path-art img, .book-art:hover img { transform: none; }
}
