:root {
  --paper: #e8f5f3;
  --paper-deep: #d8eeea;
  --white: #fffefb;
  --ink: #18354a;
  --ink-soft: #456174;
  --blue: #176b9b;
  --blue-dark: #0d4f78;
  --blue-line: #7fb5cc;
  --pink: #f5aabd;
  --pink-pale: #fde7ed;
  --orange: #f4ae63;
  --orange-pale: #ffebd4;
  --mint: #9fdccb;
  --mint-pale: #ddf4ed;
  --lavender: #c6b6e8;
  --lavender-pale: #eee8fa;
  --yellow: #f5df67;
  --danger: #8d2940;
  --success: #1d684f;
  --focus: #8a3ffc;
  --font-display: "Fredoka", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", "Avenir Next", Avenir, sans-serif;
  --shadow: 0 10px 28px rgba(24, 53, 74, .10);
  --shadow-small: 0 5px 16px rgba(24, 53, 74, .09);
  --radius: 22px;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: var(--font-body); font-size: 16px; line-height: 1.65; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .28; background-image: radial-gradient(rgba(23,107,155,.12) .65px, transparent .65px); background-size: 8px 8px; z-index: -1; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: var(--blue-dark); text-underline-offset: .2em; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.view h1[tabindex="-1"]:focus { outline: none; }
::selection { color: var(--ink); background: var(--yellow); }
.shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.view[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 9999; top: 10px; left: 12px; transform: translateY(-150%); padding: 10px 16px; border-radius: 8px; color: #fff; background: var(--blue-dark); font-weight: 800; }
.skip-link:focus { transform: none; }

h1, h2, h3 { margin: 0; font-family: var(--font-display); line-height: 1.08; letter-spacing: -.025em; color: var(--ink); }
h1 { font-size: clamp(2.35rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
.eyebrow { margin: 0 0 .65rem; color: var(--blue-dark); font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: .55rem; border: 2px solid var(--blue-dark); border-radius: 12px 12px 12px 4px; padding: .72rem 1.1rem; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); box-shadow: var(--shadow-small); }
.button-primary { color: #fff; background: var(--blue-dark); }
.button-primary:hover { background: #093f61; }
.button-secondary { color: var(--ink); background: var(--white); }
.button-link { border: 0; padding: 3px; color: var(--blue-dark); background: transparent; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.text-link { font-weight: 800; white-space: nowrap; }

.site-header { position: sticky; z-index: 1000; top: 0; border-bottom: 2px solid rgba(23,107,155,.26); background: rgba(255,254,251,.97); box-shadow: 0 2px 10px rgba(24,53,74,.06); }
.header-inner { display: flex; width: min(calc(100% - 32px), 1240px); min-height: 68px; align-items: center; justify-content: space-between; gap: 1rem; margin: auto; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; }
.brand img { width: 44px; border: 2px solid var(--blue-line); border-radius: 50%; }
.brand span { display: grid; line-height: 1.05; }
.brand strong { font-family: var(--font-display); font-size: 1.12rem; }
.brand small { margin-top: 3px; color: var(--ink-soft); font-size: .7rem; font-weight: 800; }
.site-nav { display: flex; align-items: stretch; gap: .2rem; }
.site-nav a { position: relative; display: grid; min-height: 44px; place-items: center; padding: .45rem .75rem; color: var(--ink); font-size: .92rem; font-weight: 800; text-decoration: none; }
.site-nav a::after { content: ""; position: absolute; right: .65rem; bottom: 2px; left: .65rem; height: 3px; border-radius: 3px; background: var(--pink); transform: scaleX(0); transition: transform .18s ease; }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.hero { display: grid; grid-template-columns: minmax(260px, .76fr) 1.24fr; min-height: 680px; align-items: center; gap: clamp(3rem, 8vw, 7rem); padding-block: clamp(3rem, 7vw, 6.5rem); }
.hero-art { position: relative; width: min(100%, 420px); justify-self: end; }
.cover-frame { position: relative; z-index: 2; width: 79%; margin: auto; padding: 10px; border: 3px solid var(--blue-dark); border-radius: 8px 20px 20px 8px; background: var(--white); box-shadow: -16px 18px 0 var(--pink), 0 26px 40px rgba(24,53,74,.17); transform: rotate(-2deg); }
.cover-frame::before { content: ""; position: absolute; top: 3%; bottom: 3%; left: 6px; width: 2px; background: rgba(23,107,155,.25); }
.cover-frame img { border-radius: 3px 12px 12px 3px; }
.hero-art::before { content: ""; position: absolute; width: 92%; aspect-ratio: 1; top: -11%; left: -4%; border: 3px dashed var(--blue-line); border-radius: 50%; }
.doodle { position: absolute; z-index: 3; display: grid; width: 72px; height: 72px; place-items: center; border: 2px solid var(--ink); border-radius: 50%; font-family: var(--font-display); font-weight: 700; box-shadow: 5px 5px 0 var(--ink); }
.doodle-one { top: 4%; right: -2%; background: var(--yellow); transform: rotate(8deg); }
.doodle-two { right: 2%; bottom: 5%; width: 56px; height: 56px; background: var(--mint); transform: rotate(-8deg); }
.hero-copy { position: relative; z-index: 1; max-width: 690px; }
.hero-copy h1 { max-width: 680px; }
.hero-copy h1::after { content: ""; display: block; width: 140px; height: 9px; margin: .75rem 0 1.2rem; border-radius: 50%; border-top: 5px solid var(--orange); transform: rotate(-2deg); }
.hero-lead { max-width: 670px; color: var(--ink-soft); font-size: clamp(1.08rem, 2vw, 1.28rem); line-height: 1.65; }
.byline { color: var(--ink); font-size: .95rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

.value-section { padding: 1rem 0 5rem; }
.section-kicker { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--blue-line); padding-bottom: 1rem; }
.section-kicker span { color: var(--ink-soft); font-weight: 800; }
.value-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.value-card { position: relative; display: flex; min-height: 190px; align-items: center; gap: 1rem; overflow: hidden; border: 2px solid var(--ink); border-radius: var(--radius) var(--radius) var(--radius) 6px; padding: 1.35rem; box-shadow: 5px 6px 0 rgba(24,53,74,.82); }
.value-card img { width: 84px; flex: 0 0 auto; border-radius: 50%; mix-blend-mode: multiply; }
.value-card > div > span { font-family: var(--font-display); font-size: .78rem; font-weight: 700; }
.value-card h3 { margin: .15rem 0 .45rem; font-size: 1.55rem; }
.value-card p { margin: 0; line-height: 1.45; }
.pink-card { background: var(--pink-pale); }
.orange-card { background: var(--orange-pale); }
.mint-card, .green-card { background: var(--mint-pale); }
.blue-card { background: #dceef7; }
.purple-card { background: var(--lavender-pale); }
.trust-panel { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.7rem; margin-bottom: 6rem; border: 3px solid var(--blue-dark); border-radius: 8px var(--radius) var(--radius) var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--white); box-shadow: 9px 10px 0 var(--mint); }
.trust-icon { width: 112px; padding: 8px; border-radius: 50%; background: var(--mint-pale); }
.trust-panel h2 { margin-bottom: .6rem; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.trust-panel p:not(.eyebrow) { max-width: 760px; margin: 0; color: var(--ink-soft); }

.learning-paths { margin-bottom: 5.5rem; border-block: 3px solid var(--blue-dark); padding-block: clamp(2.2rem,5vw,3.8rem); }
.paths-heading { display: grid; grid-template-columns: minmax(280px,.8fr) minmax(320px,1.2fr); align-items: end; gap: 2rem; margin-bottom: 2rem; }
.paths-heading > p { max-width: 650px; margin: 0; color: var(--ink-soft); font-size: 1.08rem; }
.paths-list { display: grid; gap: 1rem; }
.path-card { display: grid; grid-template-columns: minmax(180px,.55fr) minmax(230px,.8fr) minmax(300px,1.15fr); align-items: center; gap: 1.5rem; border: 2px solid var(--ink); border-radius: 5px 18px 18px 18px; padding: 1.25rem 1.4rem; background: var(--white); box-shadow: 5px 6px 0 var(--blue-line); }
.path-card:nth-child(2) { margin-left: clamp(0px,4vw,54px); box-shadow-color: var(--orange); }
.path-card:nth-child(3) { margin-right: clamp(0px,4vw,54px); box-shadow-color: var(--lavender); }
.path-marker { display: grid; gap: .2rem; }
.path-marker span { color: var(--blue-dark); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.path-marker strong { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.1; }
.path-card > p { margin: 0; color: var(--ink-soft); line-height: 1.5; }
.path-card nav { display: flex; flex-wrap: wrap; gap: .45rem; }
.path-card nav a { border: 1.5px solid var(--blue-line); border-radius: 7px; padding: .32rem .52rem; color: var(--ink); background: var(--paper); font-size: .8rem; font-weight: 800; text-decoration: none; }
.path-card nav a:hover { border-color: var(--blue-dark); background: var(--mint-pale); }
.sources-invite { margin: 1.5rem 0 0; text-align: right; }

.page-intro { padding: clamp(3rem, 7vw, 5.5rem) 0 2.2rem; }
.page-intro h1 { max-width: 850px; }
.page-intro > p:last-child { max-width: 690px; margin-top: 1rem; color: var(--ink-soft); font-size: 1.15rem; }
.explorer { display: grid; grid-template-columns: 265px minmax(0, 1fr); align-items: start; gap: 2rem; padding-bottom: 6rem; }
.filters { position: sticky; top: 88px; border: 2px solid var(--blue-dark); border-radius: 6px 18px 18px 18px; padding: 1.2rem; background: var(--white); box-shadow: 6px 7px 0 var(--orange); }
.filter-heading { display: flex; align-items: start; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; }
.filter-heading h2 { font-size: 1.25rem; }
.filter-heading .button-link { font-size: .75rem; }
.filters label, .filters legend { color: var(--ink); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.search-wrap { position: relative; margin: .45rem 0 1.2rem; }
.search-wrap span { position: absolute; top: 50%; left: .75rem; font-size: 1.3rem; transform: translateY(-52%); }
.search-wrap input { width: 100%; min-height: 46px; border: 2px solid var(--blue-line); border-radius: 9px; padding: .6rem .7rem .6rem 2.25rem; color: var(--ink); background: #fff; }
.filters fieldset { margin: 0 0 1rem; border: 0; border-top: 1px dashed var(--blue-line); padding: .9rem 0 0; }
.filters legend { padding-right: .5rem; }
.filter-options { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.filter-chip { position: relative; }
.filter-chip input { position: absolute; opacity: 0; pointer-events: none; }
.filter-chip label { display: block; border: 1.5px solid var(--blue-line); border-radius: 8px; padding: .34rem .55rem; color: var(--ink); background: var(--paper); font-size: .78rem; font-weight: 800; text-transform: none; letter-spacing: 0; cursor: pointer; }
.filter-chip input:checked + label { border-color: var(--blue-dark); color: #fff; background: var(--blue-dark); }
.filter-chip input:focus-visible + label { outline: 4px solid var(--focus); outline-offset: 2px; }
.local-progress { border-top: 1px dashed var(--blue-line); padding-top: .9rem; color: var(--ink-soft); font-size: .82rem; }
.local-progress p { margin-bottom: .4rem; }
.results-head { display: flex; min-height: 40px; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.results-head p { margin: 0; font-weight: 800; }
.route-line { height: 2px; flex: 1; background-image: linear-gradient(to right, var(--blue-line) 50%, transparent 50%); background-size: 12px 2px; }
.chapters-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.chapter-card { position: relative; display: grid; grid-template-columns: 76px minmax(0,1fr); min-height: 190px; align-items: center; gap: 1rem; overflow: hidden; border: 2px solid var(--ink); border-radius: 5px 19px 19px 19px; padding: 1.15rem; color: var(--ink); text-decoration: none; box-shadow: 4px 5px 0 rgba(24,53,74,.74); transition: transform .2s ease, box-shadow .2s ease; }
.chapter-card:hover { transform: translate(-2px,-3px) rotate(-.25deg); box-shadow: 7px 9px 0 rgba(24,53,74,.8); }
.chapter-card img { width: 72px; height: 72px; border: 2px solid rgba(24,53,74,.22); border-radius: 50%; object-fit: cover; }
.chapter-card-copy { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.chapter-number { position: absolute; top: .65rem; right: .75rem; font-family: var(--font-display); font-size: .75rem; font-weight: 700; }
.chapter-card h2 { padding-right: 1.2rem; font-size: 1.28rem; }
.chapter-card p { margin: .45rem 0 .7rem; color: var(--ink-soft); font-size: .88rem; line-height: 1.42; }
.card-meta { display: flex; flex-wrap: wrap; gap: .4rem; color: var(--ink); font-size: .72rem; font-weight: 800; }
.card-meta span { border-bottom: 2px solid currentColor; }
.completed-mark { position: absolute; right: .75rem; bottom: .65rem; padding: .12rem .35rem; color: var(--success); background: rgba(255,255,255,.72); font-size: .72rem; font-weight: 800; }
.chapter-quiz-mark { position: absolute; left: .75rem; bottom: .65rem; padding: .12rem .35rem; color: var(--blue-dark); background: rgba(255,255,255,.78); font-size: .7rem; font-weight: 800; }
.empty-state { border: 2px dashed var(--blue-dark); border-radius: var(--radius); padding: 3rem 1rem; text-align: center; background: rgba(255,255,255,.6); }
.empty-state img { width: 110px; margin: auto; border-radius: 50%; }
.empty-state h2 { margin: .8rem 0 .45rem; font-size: 1.7rem; }

.authors-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; padding-bottom: 6rem; }
.author-card { grid-column: span 6; position: relative; min-height: 250px; border: 2px solid var(--ink); border-radius: 5px 20px 20px 20px; padding: 1.7rem; background: var(--white); box-shadow: 5px 6px 0 var(--author-color, var(--pink)); }
.author-card:nth-child(3n) { grid-column: 3 / span 8; }
.author-index { display: inline-block; margin-bottom: 1.2rem; border-bottom: 3px solid var(--author-color, var(--pink)); font-family: var(--font-display); font-weight: 700; }
.author-card h2 { font-size: 1.8rem; }
.author-role { margin: .25rem 0 1rem; color: var(--blue-dark); font-weight: 800; }
.author-bio { margin: 0; color: var(--ink-soft); }

.book-page { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; align-items: center; gap: clamp(3rem, 8vw, 7rem); min-height: 720px; padding-block: 4rem 6rem; }
.book-visual { position: relative; width: 82%; justify-self: end; border: 3px solid var(--ink); border-radius: 6px 18px 18px 6px; padding: 9px; background: var(--white); box-shadow: -14px 15px 0 var(--lavender), 0 25px 38px rgba(24,53,74,.15); transform: rotate(-1.5deg); }
.book-visual img { border-radius: 2px 10px 10px 2px; }
.book-story { max-width: 680px; }
.book-story > p:not(.eyebrow,.config-note) { margin-top: 1.2rem; color: var(--ink-soft); font-size: 1.15rem; }
.credits { margin: 2rem 0; border-top: 2px solid var(--blue-line); }
.credits div { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; border-bottom: 1px dashed var(--blue-line); padding: .8rem 0; }
.credits dt { font-weight: 800; }
.credits dd { margin: 0; color: var(--ink-soft); }
.config-note { color: var(--ink-soft); font-size: .9rem; font-style: italic; }
.editorial-qr-link { margin-top: 2rem; border-top: 2px dashed var(--blue-line); padding: 1.4rem 0 0 1.15rem; box-shadow: inset 5px 0 0 var(--pink); }
.editorial-qr-link h2 { max-width: 560px; font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
.editorial-qr-link > p:not(.eyebrow) { margin: .65rem 0 .5rem; color: var(--ink-soft); font-size: .95rem; }
.policy-page { min-height: 680px; padding-block: clamp(3rem, 7vw, 5.5rem) 6rem; }
.policy-page > h1 { max-width: 780px; }
.policy-paper { max-width: 820px; margin-top: 2rem; border: 3px solid var(--blue-dark); border-radius: 7px 24px 24px 24px; padding: clamp(1.4rem, 5vw, 3rem); background: var(--white); box-shadow: 9px 10px 0 var(--mint); }
.policy-paper h2 { margin: 1.7rem 0 .6rem; font-size: 1.5rem; }
.policy-paper h2:first-child { margin-top: 0; }
.policy-paper p { color: var(--ink-soft); }

.sources-page { min-height: 720px; padding-block: clamp(3rem,7vw,5.5rem) 6rem; }
.sources-intro { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(300px,.85fr); gap: .8rem 3rem; align-items: end; border-bottom: 3px solid var(--blue-dark); padding-bottom: 2rem; }
.sources-intro .eyebrow, .sources-intro h1 { grid-column: 1; }
.sources-intro > p:not(.eyebrow,.editorial-check) { grid-column: 2; grid-row: 1 / span 2; margin: 0; color: var(--ink-soft); font-size: 1.08rem; }
.editorial-check { grid-column: 1 / -1; margin: .7rem 0 0; color: var(--blue-dark); }
.sources-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.2rem; padding-block: 2rem; }
.sources-groups section { position: relative; border: 2px solid var(--ink); border-radius: 5px 20px 20px 20px; padding: 1.6rem; background: var(--white); box-shadow: 5px 6px 0 var(--mint); }
.sources-groups section:nth-child(2) { box-shadow-color: var(--pink); }
.sources-groups section:nth-child(3) { box-shadow-color: var(--orange); }
.sources-groups section:nth-child(4) { box-shadow-color: var(--lavender); }
.source-number { color: var(--blue-dark); font-family: var(--font-display); font-size: .8rem; font-weight: 700; }
.sources-groups h2 { margin: .25rem 0 1rem; font-size: 1.7rem; }
.sources-groups ul { margin: 0; padding: 0; list-style: none; }
.sources-groups li { border-top: 1px dashed var(--blue-line); padding: .9rem 0; }
.sources-groups li:first-child { border-top: 0; padding-top: 0; }
.sources-groups li:last-child { padding-bottom: 0; }
.sources-groups a { font-weight: 800; }
.sources-groups li p { margin: .35rem 0 0; color: var(--ink-soft); font-size: .9rem; line-height: 1.5; }
.external-mark { white-space: nowrap; }
.sources-note { border-left: 6px solid var(--orange); padding: 1rem 1.3rem; background: var(--orange-pale); }
.sources-note h2 { margin-bottom: .4rem; font-size: 1.25rem; }
.sources-note p { margin: 0; }

.chapter-reader { position: relative; padding: 2.3rem 0 6rem; }
.reader-progress { position: fixed; z-index: 1001; top: 68px; left: 0; width: 100%; height: 5px; background: transparent; }
.reader-progress span { display: block; width: 0; height: 100%; background: var(--pink); transition: width .08s linear; }
.chapter-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.back-link { font-weight: 800; text-decoration: none; }
.chapter-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.tool-button { min-height: 42px; border: 2px solid var(--blue-dark); border-radius: 8px; padding: .4rem .7rem; color: var(--ink); background: var(--white); font-weight: 800; cursor: pointer; }
.tool-button[aria-pressed="true"] { color: #fff; background: var(--success); border-color: var(--success); }
.share-status { min-height: 1.5rem; margin: -.6rem 0 .5rem; color: var(--success); font-size: .85rem; font-weight: 800; text-align: right; }
.chapter-paper { display: grid; grid-template-columns: 150px minmax(0,760px); justify-content: center; gap: 2rem; border: 3px solid var(--blue-dark); border-radius: 8px 28px 28px 28px; padding: clamp(1.5rem, 5vw, 4.4rem); background: var(--white); box-shadow: 10px 12px 0 var(--chapter-accent, var(--orange)); }
.chapter-aside { position: sticky; top: 100px; align-self: start; text-align: center; }
.chapter-aside img { width: 116px; height: 116px; margin: auto; border: 3px solid var(--blue-line); border-radius: 50%; object-fit: cover; }
.chapter-count { display: inline-block; margin-top: .8rem; color: var(--ink-soft); font-family: var(--font-display); font-size: .78rem; font-weight: 700; }
.chapter-main { min-width: 0; }
.chapter-main header { border-bottom: 2px dashed var(--blue-line); padding-bottom: 1.7rem; }
.chapter-main h1 { font-size: clamp(2.2rem, 5vw, 4.1rem); }
.chapter-summary { margin: 1rem 0 0; color: var(--ink-soft); font-size: 1.12rem; }
.chapter-meta { display: flex; flex-wrap: wrap; gap: .65rem 1rem; margin-top: .8rem; color: var(--blue-dark); font-size: .86rem; font-weight: 800; }
.chapter-body { padding-top: 2rem; font-size: 1.08rem; line-height: 1.78; }
.chapter-body p { margin: 0 0 1.25rem; }
.chapter-body strong { color: var(--blue-dark); }
.chapter-body h2, .chapter-body h3 { margin: 2rem 0 .8rem; font-size: 1.55rem; }
.chapter-body ul, .chapter-body ol { padding-left: 1.4rem; }
.chapter-body li { margin-bottom: .45rem; }
.chapter-body blockquote { margin: 1.7rem 0 !important; border-left: 5px solid var(--orange) !important; border-radius: 0 12px 12px 0 !important; padding: 1.2rem 1.4rem !important; color: var(--ink) !important; background: var(--orange-pale) !important; }
.chapter-body pre { overflow-x: auto; border: 3px solid var(--ink); border-radius: 6px 16px 16px 16px; padding: 1.2rem; color: #f4fafb; background: #102d3e; box-shadow: 5px 5px 0 var(--mint); font-size: .9rem; line-height: 1.55; }
.chapter-body a { font-weight: 800; }
.web-extra { margin-top: 3.2rem; border-top: 3px solid var(--blue-dark); padding-top: 1.5rem; font-size: 1rem; line-height: 1.65; }
.web-extra-header { position: relative; margin-bottom: 1rem; border-bottom: 2px dashed var(--blue-line); padding: 1.2rem 1.3rem 1.35rem 1.55rem; background: var(--paper); box-shadow: inset 7px 0 0 var(--pink); }
.web-extra-header::after { content: ""; position: absolute; top: -7px; right: 22px; width: 74px; height: 17px; background: rgba(245,223,103,.78); transform: rotate(2deg); }
.web-extra-label { margin: 0 0 .45rem; color: var(--blue-dark); font-size: .75rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.web-extra-header h2 { font-size: clamp(1.75rem,3.4vw,2.45rem); }
.web-extra-header > p:last-child { max-width: 650px; margin: .65rem 0 0; color: var(--ink-soft); }
.extra-card { margin-top: 1rem; border: 2px solid var(--ink); border-radius: 5px 17px 17px 17px; padding: clamp(1.15rem,3.5vw,1.65rem); background: var(--white); }
.extra-card h3 { margin: 0 0 .75rem; font-size: clamp(1.35rem,2.6vw,1.75rem); }
.extra-card h4 { margin: 1.15rem 0 .45rem; font-family: var(--font-display); font-size: 1rem; }
.extra-card p:last-child { margin-bottom: 0; }
.extra-insight { border-color: var(--blue-dark); box-shadow: 5px 6px 0 var(--lavender); }
.extra-lab { box-shadow: 5px 6px 0 var(--mint); }
.extra-quiz { box-shadow: 5px 6px 0 var(--orange); }
.extra-reflection { box-shadow: 5px 6px 0 var(--lavender); }
.extra-reflection ol { margin-bottom: 0; }
.extra-reflection li { margin-bottom: .8rem; }
.extra-card-kicker { margin: 0 0 .35rem; color: var(--blue-dark); font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.lab-meta { display: flex; flex-wrap: wrap; gap: .45rem; margin: .9rem 0 1.1rem; }
.lab-meta span { border: 1.5px solid var(--blue-line); border-radius: 7px; padding: .32rem .55rem; color: var(--ink); background: var(--paper); font-size: .82rem; line-height: 1.4; }
.materials-list { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: 0; padding-left: 1.2rem; }
.lab-steps { counter-reset: lab-step; margin: .7rem 0 1.2rem; padding: 0; list-style: none; }
.lab-steps li { position: relative; min-height: 32px; margin: 0 0 .7rem; padding-left: 2.65rem; counter-increment: lab-step; }
.lab-steps li::before { content: counter(lab-step); position: absolute; top: -.1rem; left: 0; display: grid; width: 30px; height: 30px; place-items: center; border: 2px solid var(--blue-dark); border-radius: 50%; color: var(--ink); background: var(--yellow); font-family: var(--font-display); font-size: .82rem; font-weight: 700; }
.lab-debrief { border-left: 5px solid var(--pink); border-radius: 0 8px 8px 0; padding: .85rem 1rem; background: var(--pink-pale); }
.chapter-quiz-progress { color: var(--success); font-size: .84rem; font-weight: 800; }
.web-quiz-container { margin-top: .8rem; }
.quiz-was-completed::before { content: "✓ Completato su questo dispositivo"; display: block; margin-bottom: .65rem; color: var(--success); font-size: .8rem; font-weight: 800; }
.web-extra-unavailable { margin-top: 2.5rem; border: 2px dashed var(--blue-line); padding: 1.2rem; background: var(--paper); }
.web-extra-unavailable h2 { font-size: 1.4rem; }
.web-extra-unavailable p { margin: .5rem 0 0; }
.interactive-zone { margin: 2rem 0; border: 2px solid var(--blue-dark); border-radius: 5px 18px 18px 18px; padding: 1.4rem; background: var(--paper); }
.interactive-zone h3 { color: var(--ink) !important; }
.quiz-container + .quiz-container { margin-top: 1.5rem; }
.quiz-question { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.quiz-answers { display: grid; gap: .65rem; }
.btn-answer { min-height: 48px; border: 2px solid var(--blue-dark); border-radius: 9px; padding: .65rem .9rem; color: var(--ink); background: var(--white); font-weight: 800; text-align: left; cursor: pointer; }
.btn-answer:hover:not(:disabled) { background: var(--orange-pale); transform: translateX(3px); }
.btn-answer:disabled { opacity: .64; cursor: not-allowed; }
.btn-answer.answer-selected { opacity: 1; }
.btn-answer.answer-correct { color: #103f31; background: #bee9d8; border-color: var(--success); }
.btn-answer.answer-wrong { color: #651b2c; background: #f8d5dd; border-color: var(--danger); }
.quiz-feedback { margin-top: .8rem; border-left: 5px solid currentColor; border-radius: 6px; padding: .75rem .9rem; font-weight: 800; }
.quiz-feedback.is-correct { color: var(--success); background: #ddf3e9; }
.quiz-feedback.is-wrong { color: var(--danger); background: #fbe5ea; }
.quiz-reset { margin-top: .7rem; border: 0; padding: .25rem 0; color: var(--blue-dark); background: transparent; font-weight: 800; text-decoration: underline; cursor: pointer; }
.chapter-qr-card { position: relative; display: grid; grid-template-columns: 180px minmax(0,1fr); align-items: center; gap: clamp(1.2rem,4vw,2.2rem); margin-top: 3rem; border-top: 2px dashed var(--blue-line); border-bottom: 2px dashed var(--blue-line); padding: 2rem 0; }
.chapter-qr-visual { position: relative; width: 180px; padding: 10px; background: var(--white); box-shadow: -7px 7px 0 var(--pink), 7px -7px 0 var(--orange); }
.chapter-qr-visual::after { content: ""; position: absolute; right: -13px; bottom: -13px; width: 28px; height: 28px; border-right: 3px solid var(--blue-dark); border-bottom: 3px solid var(--blue-dark); pointer-events: none; }
.chapter-qr-visual img { width: 160px; height: 160px; background: #fff; image-rendering: pixelated; }
.chapter-qr-copy { min-width: 0; }
.chapter-qr-copy h2 { margin: 0 0 .65rem; font-size: clamp(1.55rem,3vw,2.15rem); }
.chapter-qr-copy > p:not(.eyebrow) { margin-bottom: .7rem; color: var(--ink-soft); line-height: 1.55; }
.chapter-qr-url { display: block; overflow-wrap: anywhere; color: var(--blue-dark); font-size: .78rem; line-height: 1.35; }
.chapter-qr-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.chapter-qr-actions .button { min-height: 44px; padding: .55rem .8rem; font-size: .86rem; }
.chapter-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.chapter-pagination a { display: flex; min-height: 80px; flex-direction: column; justify-content: center; border: 2px solid var(--ink); border-radius: 5px 14px 14px 14px; padding: .8rem 1rem; color: var(--ink); background: var(--white); text-decoration: none; box-shadow: 4px 4px 0 var(--blue-line); }
.chapter-pagination a:last-child { text-align: right; }
.chapter-pagination span { color: var(--ink-soft); font-size: .75rem; font-weight: 800; text-transform: uppercase; }

.noscript { margin-block: 3rem; border: 2px solid var(--ink); border-radius: 16px; padding: 2rem; background: var(--white); }
.noscript ol { columns: 2; }
.site-footer { border-top: 3px solid var(--blue-dark); color: var(--ink); background: var(--white); }
.footer-inner { display: grid; grid-template-columns: .7fr .6fr 1.35fr; gap: 2rem; padding-block: 2.8rem; }
.footer-brand { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; text-decoration: none; }
.footer-inner nav { display: grid; align-content: start; gap: .4rem; }
.footer-inner nav a { font-weight: 800; }
.footer-note h2 { margin-bottom: .5rem; font-size: 1rem; }
.footer-note p, .footer-inner > div > p { margin: 0; color: var(--ink-soft); font-size: .85rem; }
.copyright { margin: 0; border-top: 1px solid var(--paper-deep); padding: .8rem 20px; color: var(--ink-soft); font-size: .78rem; text-align: center; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 290px 1fr; gap: 3rem; min-height: 590px; }
  .value-card { align-items: flex-start; flex-direction: column; }
  .path-card { grid-template-columns: minmax(160px,.55fr) 1.45fr; }
  .path-card nav { grid-column: 1 / -1; }
  .sources-intro { grid-template-columns: 1fr; }
  .sources-intro .eyebrow, .sources-intro h1, .sources-intro > p:not(.eyebrow,.editorial-check), .editorial-check { grid-column: 1; grid-row: auto; }
  .trust-panel { grid-template-columns: 90px 1fr; }
  .trust-panel .text-link { grid-column: 2; }
  .explorer { grid-template-columns: 1fr; }
  .filters { position: static; }
  .chapter-paper { grid-template-columns: 110px minmax(0,1fr); gap: 1.4rem; }
  .author-card, .author-card:nth-child(3n) { grid-column: span 6; }
}

@media (max-width: 700px) {
  .shell { width: min(calc(100% - 28px), var(--max)); }
  .header-inner { width: 100%; min-height: 60px; padding-left: 12px; align-items: stretch; }
  .brand { flex: 0 0 auto; }
  .brand img { width: 38px; height: 38px; }
  .brand small { display: none; }
  .brand strong { font-size: .92rem; }
  .site-nav { overflow-x: auto; justify-content: flex-start; padding-right: 10px; }
  .site-nav a { min-height: 60px; padding-inline: .55rem; font-size: .8rem; white-space: nowrap; }
  .hero { grid-template-columns: 1fr; gap: 3rem; padding-block: 2.6rem 4rem; }
  .hero-art { width: min(82%, 330px); justify-self: center; order: 2; }
  .hero-copy { order: 1; }
  .hero-actions .button { flex: 1 1 210px; }
  .value-strip { grid-template-columns: 1fr; }
  .paths-heading { grid-template-columns: 1fr; gap: 1rem; }
  .path-card, .path-card:nth-child(2), .path-card:nth-child(3) { grid-template-columns: 1fr; margin-inline: 0; gap: .8rem; }
  .path-card nav { grid-column: auto; }
  .sources-invite { text-align: left; }
  .value-card { min-height: 150px; flex-direction: row; align-items: center; }
  .section-kicker { align-items: start; flex-direction: column; }
  .trust-panel { grid-template-columns: 1fr; text-align: left; }
  .trust-icon { width: 88px; }
  .trust-panel .text-link { grid-column: auto; }
  .page-intro { padding-top: 3rem; }
  .chapters-grid { grid-template-columns: 1fr; }
  .chapter-card { min-height: 174px; }
  .authors-grid { display: grid; grid-template-columns: 1fr; }
  .author-card, .author-card:nth-child(3n) { grid-column: auto; }
  .book-page { grid-template-columns: 1fr; min-height: auto; gap: 3rem; padding-top: 3rem; }
  .sources-groups { grid-template-columns: 1fr; }
  .book-visual { width: min(72%, 320px); justify-self: center; order: 2; }
  .book-story { order: 1; }
  .chapter-reader { padding-top: 1.2rem; }
  .reader-progress { top: 60px; }
  .chapter-toolbar { align-items: flex-start; flex-direction: column; }
  .chapter-tools { width: 100%; justify-content: flex-start; }
  .share-status { text-align: left; }
  .chapter-paper { grid-template-columns: 1fr; padding: 1.3rem; box-shadow: 6px 7px 0 var(--chapter-accent, var(--orange)); }
  .chapter-aside { position: static; display: flex; align-items: center; gap: .7rem; text-align: left; }
  .chapter-aside img { width: 72px; height: 72px; margin: 0; }
  .chapter-qr-card { grid-template-columns: 145px minmax(0,1fr); gap: 1.4rem; }
  .chapter-qr-visual { width: 145px; }
  .chapter-qr-visual img { width: 125px; height: 125px; }
  .chapter-pagination { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.4rem; }
  .noscript ol { columns: 1; }
}

@media (max-width: 420px) {
  .brand img { display: none; }
  .header-inner { padding-left: 10px; }
  .site-nav a { padding-inline: .45rem; }
  .chapter-card { grid-template-columns: 64px minmax(0,1fr); padding: 1rem; }
  .chapter-card img { width: 60px; height: 60px; }
  .chapter-card p { font-size: .84rem; }
  .chapter-quiz-mark { left: .55rem; bottom: .45rem; }
  .completed-mark { right: .55rem; bottom: .45rem; }
  .web-extra-header, .extra-card { padding-inline: 1rem; }
  .lab-meta { display: grid; }
  .tool-button { flex: 1; }
  .chapter-qr-card { grid-template-columns: 1fr; padding: 1.6rem 0; }
  .chapter-qr-visual { width: 154px; }
  .chapter-qr-visual img { width: 134px; height: 134px; }
  .chapter-qr-actions { display: grid; }
  .chapter-qr-actions .button { width: 100%; }
}

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

@media print {
  .site-header, .site-footer, .chapter-toolbar, .reader-progress, .chapter-pagination, .share-status { display: none !important; }
  body { background: #fff; }
  body::before { display: none; }
  .chapter-reader { padding: 0; }
  .chapter-paper { display: block; border: 0; box-shadow: none; padding: 0; }
  .chapter-aside { position: static; text-align: left; }
  .chapter-aside img { width: 70px; }
  .chapter-qr-card { grid-template-columns: 34mm 1fr; gap: 8mm; break-inside: avoid; page-break-inside: avoid; }
  .chapter-qr-visual { width: 34mm; padding: 2mm; box-shadow: none; }
  .chapter-qr-visual::after { display: none; }
  .chapter-qr-visual img { width: 30mm; height: 30mm; }
  .chapter-qr-actions { display: none; }
  .extra-card { break-inside: avoid; page-break-inside: avoid; box-shadow: none; }
}
