/* PrinterTutor: a calm learning-product design. Teal primary, warm yellow for highlights and calls to action,
   white and off-white surfaces with dark slate text. System fonts only. */
:root {
  --teal: #0f766e;
  --teal-d: #115e59;
  --teal-dd: #0b3b38;
  --teal-50: #effaf7;
  --teal-100: #d5f1ea;
  --teal-200: #a7ddd2;
  --yellow: #ffc83d;
  --yellow-d: #f2b200;
  --yellow-50: #fff8e3;
  --yellow-200: #ffe39a;
  --ink: #0f1d2b;
  --text: #2c3a4a;
  --muted: #566577;
  --line: #e2e8ee;
  --line-2: #cfd8e1;
  --paper: #f7f8f4;
  --white: #ffffff;
  --rose: #b4381c;
  --rose-50: #fdf1ec;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 29, 43, .05), 0 6px 20px -12px rgba(15, 29, 43, .18);
  --shadow-h: 0 2px 4px rgba(15, 29, 43, .06), 0 14px 30px -14px rgba(15, 29, 43, .28);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-h: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--text); background: var(--white); text-rendering: optimizeLegibility; }
img, svg { max-width: 100%; }
a { color: var(--teal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-dd); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 6px; box-shadow: 0 0 0 6px var(--yellow-200); }
h1, h2, h3 { font-family: var(--font-h); color: var(--ink); line-height: 1.2; letter-spacing: -0.012em; }
h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin: 0 0 .6rem; font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.85rem); margin: 0 0 .75rem; font-weight: 750; }
h3 { font-size: 1.12rem; margin: 0 0 .35rem; font-weight: 700; }
p { margin: 0 0 1rem; }
.icon { width: 1.2em; height: 1.2em; flex: none; vertical-align: -0.2em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(800px, 100% - 32px); }
.center { text-align: center; }
.small { font-size: .9rem; color: var(--muted); }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--yellow); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 700; z-index: 100; }
.skip-link:focus { top: 10px; }
main:focus { outline: none; }
mark { background: var(--yellow-200); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ---------- Header ---------- */
.masthead { background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.masthead::before { content: ""; display: block; height: 4px; background: var(--teal); }
.masthead-inner { display: flex; align-items: center; gap: 14px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand:hover { color: var(--ink); }
.brand .logo-mark { width: 38px; height: 38px; }
.brand-word { font-family: var(--font-h); font-size: 1.32rem; font-weight: 700; letter-spacing: -0.02em; }
.brand-word b { color: var(--teal); font-weight: 800; }
.primary-nav { display: none; }
.search-link { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-weight: 700; text-decoration: none; font-size: .95rem; }
.search-link:hover, .search-link.is-current { background: var(--yellow-d); color: var(--ink); text-decoration: none; }
.menu-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; background: var(--white); color: var(--ink); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 14px; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; }
.menu-toggle:hover { border-color: var(--teal); }
.menu-toggle .icon-close { display: none; }
.masthead.is-open .menu-toggle .icon-close { display: inline; }
.masthead.is-open .menu-toggle .icon-open { display: none; }
.masthead.is-open .primary-nav { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px -18px rgba(15, 29, 43, .35); padding: 8px 16px 18px; max-height: calc(100vh - 72px); overflow-y: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; }
.nav-main a { display: block; padding: 11px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.nav-main a:hover { background: var(--teal-50); color: var(--teal-d); }
.nav-main a[aria-current] { background: var(--teal-50); color: var(--teal-d); box-shadow: inset 3px 0 0 var(--teal); }
.nav-topics-h { margin: 14px 12px 6px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nav-topics { display: grid; grid-template-columns: 1fr; gap: 2px; }
.nav-topics a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--text); text-decoration: none; }
.nav-topics a:hover, .nav-topics a[aria-current] { background: var(--teal-50); color: var(--teal-d); }
.nav-topics .icon { color: var(--teal); }
@media (min-width: 560px) { .nav-topics { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) {
  .menu-toggle { display: none; }
  .primary-nav, .masthead.is-open .primary-nav { display: block; position: static; padding: 0; box-shadow: none; border: 0; background: none; margin-left: 18px; overflow: visible; max-height: none; }
  .nav-topics-h, .nav-topics { display: none !important; }
  .nav-main { display: flex; gap: 2px; }
  .nav-main a { padding: 8px 12px; border-radius: 999px; font-size: .95rem; }
  .nav-main a[aria-current] { box-shadow: inset 0 0 0 1.5px var(--teal-200); }
}

/* ---------- Buttons and search ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: background-color .15s, transform .15s; }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: var(--yellow-d); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.search-form { width: 100%; }
.search-label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 8px; font-family: var(--font-h); }
.search-row { position: relative; display: flex; align-items: center; gap: 8px; background: var(--white); border: 2px solid var(--line-2); border-radius: 999px; padding: 5px 5px 5px 46px; box-shadow: var(--shadow); transition: border-color .15s; }
.search-row:focus-within { border-color: var(--teal); }
.search-row-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--teal); }
.search-row input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 1.02rem; color: var(--ink); background: transparent; height: 46px; }
.search-row input::placeholder { color: #6b7a8b; }
.search-row:focus-within input:focus-visible { box-shadow: none; }
.search-form-big .search-row { padding-left: 50px; }
.search-form-big .search-row-icon { left: 18px; }

/* ---------- Generic sections ---------- */
.section { padding: 64px 0; }
.section-paper { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 28px; }
.section-head p:last-child { color: var(--muted); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--teal-d); margin: 0 0 8px; }
.kicker { display: flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--teal-d); margin: 0 0 6px; }
.kicker .icon { width: 1.05em; height: 1.05em; }
.meta-line { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .86rem; color: var(--muted); margin: 0; }
.meta-line span { display: inline-flex; align-items: center; gap: 5px; }
.meta-line .icon { width: 1em; height: 1em; color: var(--teal); }
.meta-line-lg { font-size: .95rem; margin-top: 8px; }
.lede { font-size: 1.12rem; color: var(--text); max-width: 760px; }
.more-link-wrap { margin: 26px 0 0; }
.more-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; min-height: 44px; }
.more-link .icon { transition: transform .15s; }
.more-link:hover .icon { transform: translateX(3px); }

/* ---------- Home: hero ---------- */
.hero { background-color: var(--teal-50); background-image: radial-gradient(var(--teal-100) 1.2px, transparent 1.2px); background-size: 22px 22px; border-bottom: 1px solid var(--teal-100); padding: 52px 0 56px; }
.hero-grid { display: grid; gap: 34px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--teal-200); color: var(--teal-d); font-size: .86rem; font-weight: 700; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.pill .icon { color: var(--yellow-d); }
.hero h1 { max-width: 640px; }
.hero .lede { margin-bottom: 26px; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 16px; font-size: .92rem; color: var(--muted); }
.examples ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.examples a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; background: var(--white); border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; }
.examples a:hover { border-color: var(--teal); color: var(--teal-d); }
.pathways { background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.pathways h2 { font-size: 1.2rem; margin-bottom: 12px; }
.pathways ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pathways a { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: border-color .15s, background-color .15s, transform .15s; }
.pathways a:hover { border-color: var(--teal); background: var(--teal-50); transform: translateY(-1px); }
.pw-ic { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--yellow-50); color: var(--ink); border: 1px solid var(--yellow-200); }
.pw-text { display: grid; gap: 2px; flex: 1; }
.pw-text strong { color: var(--ink); font-family: var(--font-h); font-size: 1.04rem; }
.pw-text span { font-size: .9rem; color: var(--muted); line-height: 1.4; }
.pw-arrow { color: var(--teal); }
@media (min-width: 960px) {
  .hero { padding: 72px 0 76px; }
  .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 56px; }
}

/* ---------- Home: start-here track ---------- */
.track { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: none; }
.track li { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 18px 72px; box-shadow: var(--shadow); }
.track-no { position: absolute; left: 18px; top: 18px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: var(--white); font-weight: 800; font-family: var(--font-h); }
.track h3 { font-size: 1.02rem; }
.track h3 a { color: var(--ink); text-decoration: none; }
.track h3 a:hover { color: var(--teal); text-decoration: underline; }
.track .kicker { margin-bottom: 4px; }
@media (min-width: 700px) { .track { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) {
  .track { grid-template-columns: repeat(6, 1fr); gap: 12px; }
  .track li { padding: 64px 16px 18px; }
  .track li::after { content: ""; position: absolute; top: 37px; left: 60px; right: -13px; height: 2px; background: var(--teal-200); }
  .track li:last-child::after { display: none; }
  .track-no { left: 16px; top: 18px; }
}

/* ---------- Home: topics ---------- */
.topic-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 14px; }
.topic-card a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 14px; height: 100%; padding: 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; }
.topic-card a:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); border-color: var(--teal-200); }
.topic-ic { grid-row: 1 / span 3; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: var(--teal-50); color: var(--teal); border: 1px solid var(--teal-100); }
.topic-ic .icon { width: 26px; height: 26px; }
.topic-card strong { font-family: var(--font-h); font-size: 1.08rem; color: var(--ink); }
.topic-tag { font-size: .92rem; color: var(--muted); line-height: 1.45; margin: 2px 0 10px; }
.topic-count { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 700; color: var(--teal-d); }
.topic-count .icon { width: 1em; height: 1em; transition: transform .15s; }
.topic-card a:hover .topic-count .icon { transform: translateX(3px); }
@media (min-width: 640px) { .topic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) {
  .topic-grid { grid-template-columns: repeat(4, 1fr); }
  .topic-card a { grid-template-columns: 1fr; grid-template-rows: auto; }
  .topic-ic { grid-row: auto; margin-bottom: 14px; }
}

/* ---------- Home: featured lessons ---------- */
.feature-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.feature-card { position: relative; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--yellow); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
.feature-card:hover { box-shadow: var(--shadow-h); transform: translateY(-2px); }
.feature-card h3 a { color: var(--ink); text-decoration: none; }
.feature-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.feature-card h3 a:hover { color: var(--teal); }
.feature-card h3 a:focus-visible { outline: none; box-shadow: none; }
.feature-card:focus-within { outline: 3px solid var(--teal); outline-offset: 2px; }
.feature-card > p:not(.kicker):not(.meta-line):not(.feature-sub) { color: var(--muted); font-size: .95rem; }
.feature-sub { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 4px 0 8px; }
.mini-steps { list-style: none; counter-reset: ms; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; }
.mini-steps li { counter-increment: ms; display: flex; gap: 10px; font-size: .92rem; color: var(--text); line-height: 1.4; }
.mini-steps li::before { content: counter(ms); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--teal-50); color: var(--teal-d); border: 1px solid var(--teal-200); display: grid; place-items: center; font-size: .75rem; font-weight: 800; }
.feature-card .meta-line { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
@media (min-width: 700px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Home: learning paths ---------- */
.path-grid { display: grid; gap: 18px; }
.path-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.path-card h3 { display: flex; align-items: center; gap: 10px; }
.path-card h3 .icon { color: var(--teal); }
.path-card > p { color: var(--muted); font-size: .95rem; }
.path-card ol { list-style: none; counter-reset: pc; margin: 0; padding: 0; border-left: 2px solid var(--teal-100); margin-left: 12px; }
.path-card li { counter-increment: pc; position: relative; padding: 0 0 12px 24px; }
.path-card li:last-child { padding-bottom: 0; }
.path-card li::before { content: counter(pc); position: absolute; left: -13px; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--white); border: 2px solid var(--teal); color: var(--teal-d); font-size: .75rem; font-weight: 800; display: grid; place-items: center; }
.path-card li a { font-weight: 600; }
@media (min-width: 900px) { .path-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Lesson lists ---------- */
.lesson-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lesson-row { display: flex; gap: 16px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: border-color .15s, box-shadow .15s; }
.lesson-row:hover { border-color: var(--teal-200); box-shadow: var(--shadow); }
.lesson-ic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--teal-50); color: var(--teal); }
.lesson-no { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--yellow-50); border: 2px solid var(--yellow); color: var(--ink); font-weight: 800; font-family: var(--font-h); }
.lesson-row-text { min-width: 0; }
.lesson-row-text h2, .lesson-row-text h3 { font-size: 1.08rem; margin-bottom: 4px; }
.lesson-row-text h2 a, .lesson-row-text h3 a { color: var(--ink); text-decoration: none; }
.lesson-row-text h2 a:hover, .lesson-row-text h3 a:hover { color: var(--teal); text-decoration: underline; }
.lesson-row-text p:not(.kicker):not(.meta-line) { color: var(--muted); font-size: .95rem; margin-bottom: 8px; }
@media (min-width: 900px) { .lesson-list-2col { grid-template-columns: 1fr 1fr; } }

/* ---------- Home: independence band ---------- */
.section-band { background: var(--yellow-50); border-top: 1px solid var(--yellow-200); }
.section-band h2 { display: flex; align-items: center; gap: 10px; }
.section-band h2 .icon { color: var(--teal); }
.band-grid { display: grid; gap: 28px; align-items: center; }
.band-contact { background: var(--white); border: 1px solid var(--yellow-200); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.band-contact p { margin-bottom: 8px; color: var(--ink); font-weight: 700; }
.email-big { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; word-break: break-word; }
@media (min-width: 900px) { .band-grid { grid-template-columns: 1.6fr 1fr; gap: 48px; } }

/* ---------- Page heroes and breadcrumbs ---------- */
.page-hero { background: var(--paper); border-bottom: 1px solid var(--line); padding: 26px 0 36px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 18px; padding: 0; font-size: .88rem; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--line-2); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--teal); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; }
.chip-list a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--line-2); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; }
.chip-list a:hover { border-color: var(--teal); color: var(--teal-d); }
.chip-list .icon { color: var(--teal); }
.all-list { padding: 36px 0 64px; display: grid; gap: 40px; }
.all-group h2 { display: flex; align-items: center; gap: 12px; }
.all-group h2 a { color: var(--ink); text-decoration: none; }
.all-group h2 a:hover { color: var(--teal); text-decoration: underline; }
.topic-ic-sm { width: 42px; height: 42px; border-radius: 12px; }
.topic-ic-sm .icon { width: 22px; height: 22px; }

/* ---------- Topic pages ---------- */
.topic-hero-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.topic-hero-row h1 { margin: 0; }
.topic-hero-row .eyebrow { margin-bottom: 2px; }
.topic-badge { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--teal); color: var(--white); box-shadow: 0 0 0 6px var(--teal-100); }
.topic-badge .icon { width: 32px; height: 32px; }
.topic-intro { max-width: 780px; }
.topic-layout { display: grid; gap: 32px; padding: 36px 0 64px; }
.lesson-list-numbered { counter-reset: none; }
.aside-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.aside-box h2 { font-size: 1.08rem; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.checks .icon { color: var(--teal); margin-top: 2px; }
.other-topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.other-topics a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 6px 10px; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem; }
.other-topics a:hover { background: var(--white); color: var(--teal-d); }
.other-topics .icon { color: var(--teal); }
.other-topics-row { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; margin: 24px 0; }
.aside-note { font-size: .88rem; color: var(--muted); }
@media (min-width: 960px) { .topic-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; } }

/* ---------- Lesson pages ---------- */
.lesson-hero { padding-bottom: 32px; }
.topic-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; font-size: .88rem; }
.topic-chip a { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; background: var(--teal-50); border: 1px solid var(--teal-100); color: var(--teal-d); text-decoration: none; font-weight: 700; }
.topic-chip a:hover { border-color: var(--teal); }
.topic-chip > span { color: var(--muted); font-weight: 600; }
.lesson-hero h1 { max-width: 900px; }
.goal { display: flex; gap: 12px; align-items: flex-start; max-width: 820px; background: var(--yellow-50); border: 1px solid var(--yellow-200); border-left: 5px solid var(--yellow); border-radius: var(--radius-sm); padding: 14px 16px; margin: 6px 0 20px; }
.goal p { margin: 0; color: var(--ink); }
.goal .icon { color: var(--ink); margin-top: 3px; }
.lesson-facts { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 1000px; }
@media (max-width: 599px) { .lesson-facts li:not(:last-child) { flex-direction: column; gap: 4px; padding: 10px 12px; } }
.lesson-facts li:last-child { grid-column: 1 / -1; }
@media (min-width: 900px) { .lesson-facts { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.7fr); } .lesson-facts li:last-child { grid-column: auto; } }
.lesson-facts li { display: flex; gap: 10px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .92rem; line-height: 1.4; color: var(--ink); }
.lesson-facts .icon { color: var(--teal); margin-top: 1px; }
.fact-label { display: block; font-size: .74rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.byline { font-size: .9rem; color: var(--muted); margin: 0; }
.lesson-layout { display: grid; gap: 28px; padding: 32px 0 56px; }
.toc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 14px; align-self: start; }
.toc h2 { font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; font-family: var(--font); }
.toc ol { list-style: none; counter-reset: toc; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc li { counter-increment: toc; }
.toc li.toc-plain { counter-increment: none; }
.toc li.toc-plain a::before { content: "•"; color: var(--muted); }
.toc a { display: flex; gap: 10px; align-items: baseline; padding: 6px 8px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .93rem; line-height: 1.4; border-left: 3px solid transparent; }
.toc ol a::before { content: counter(toc); flex: none; min-width: 1.4em; font-size: .78rem; font-weight: 800; color: var(--teal); }
.toc a:hover { background: var(--white); color: var(--teal-d); }
.toc a[aria-current] { background: var(--white); color: var(--ink); font-weight: 700; border-left-color: var(--yellow); }
.toc-back { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: .9rem; }
.toc-back a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; min-height: 36px; }
.lesson-body { min-width: 0; max-width: 780px; }
@media (min-width: 1000px) {
  .lesson-layout { grid-template-columns: 270px minmax(0, 1fr); gap: 48px; }
  .toc { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; }
}
.needs { background: var(--teal-50); border: 1px solid var(--teal-100); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 32px; }
.needs h2 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; margin-bottom: 12px; }
.needs h2 .icon { color: var(--teal); }

/* ---------- Prose ---------- */
.prose { font-size: 1.04rem; }
.prose h2 { display: flex; align-items: center; gap: 12px; margin: 2.4rem 0 .9rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.sec-no { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--teal); color: var(--white); font-size: .95rem; font-weight: 800; }
.prose h3 { margin: 1.6rem 0 .5rem; font-size: 1.12rem; }
.prose ul { padding-left: 1.3rem; margin: 0 0 1.1rem; }
.prose ul li { margin-bottom: .45rem; }
.prose ul li::marker { color: var(--teal); }
.prose ol { list-style: none; counter-reset: step; margin: 0 0 1.4rem; padding: 0; }
.prose ol > li { counter-increment: step; position: relative; padding: 14px 16px 14px 62px; margin-bottom: 10px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose ol > li::before { content: counter(step); position: absolute; left: 14px; top: 13px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: var(--ink); font-weight: 800; font-family: var(--font-h); font-size: .95rem; }
.prose ol > li p { margin: .5rem 0 0; }
.prose strong { color: var(--ink); }
.prose blockquote { margin: 1.2rem 0; padding: 12px 18px; border-left: 4px solid var(--line-2); color: var(--muted); }
.callout { position: relative; margin: 1.4rem 0; padding: 14px 18px 14px 18px; border-radius: var(--radius-sm); border: 1px solid; border-left-width: 5px; }
.callout p { margin: 0; }
.callout .callout-label { display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; margin-bottom: 6px; }
.callout-tip { background: var(--teal-50); border-color: var(--teal-100); border-left-color: var(--teal); }
.callout-tip .callout-label { background: var(--teal); color: var(--white); }
.callout-important { background: var(--yellow-50); border-color: var(--yellow-200); border-left-color: var(--yellow-d); }
.callout-important .callout-label { background: var(--yellow); color: var(--ink); }
.callout-caution { background: var(--rose-50); border-color: #f4d3c7; border-left-color: var(--rose); }
.callout-caution .callout-label { background: var(--rose); color: var(--white); }
.callout-issue { background: var(--paper); border-color: var(--line); border-left-color: #5b6b80; }
.callout-issue .callout-label { background: #3e4c5c; color: var(--white); }
.sources { margin-top: 36px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.sources h2 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.sources h2 .icon { color: var(--teal); }
.sources ul { margin: 0; padding-left: 1.2rem; }
.sources li { margin-bottom: 6px; }
.ext::after { content: " ↗"; font-size: .85em; }
.lesson-pager { display: grid; gap: 12px; margin: 32px 0 20px; }
.lesson-pager a { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--white); transition: border-color .15s, box-shadow .15s; }
.lesson-pager a:hover { border-color: var(--teal); box-shadow: var(--shadow); }
.pager-label { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pager-title { font-family: var(--font-h); font-weight: 700; color: var(--ink); line-height: 1.35; }
.pager-next { text-align: right; justify-items: end; }
@media (min-width: 640px) { .lesson-pager { grid-template-columns: 1fr 1fr; } }
.independence { font-size: .92rem; color: var(--muted); background: var(--paper); border-radius: var(--radius-sm); padding: 14px 16px; }
.independence p { margin: 0; }
.related-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.related-list li { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.related-list h3 a { color: var(--ink); text-decoration: none; }
.related-list h3 a:hover { color: var(--teal); text-decoration: underline; }
.related-list p:not(.kicker):not(.meta-line) { font-size: .95rem; color: var(--muted); }
@media (min-width: 900px) { .related-list { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Search ---------- */
.search-results-wrap { padding: 28px 0 56px; }
.search-status { font-weight: 600; color: var(--ink); min-height: 1.6em; }
.search-results { margin-bottom: 32px; }
.h3-like { font-size: 1.12rem; margin-bottom: 4px; }
.notice-inline { background: var(--yellow-50); border: 1px solid var(--yellow-200); padding: 12px 16px; border-radius: var(--radius-sm); }

/* ---------- Document pages (About, legal) ---------- */
.doc-layout { display: grid; gap: 28px; padding: 32px 0 64px; }
.doc-body { max-width: 760px; }
.doc-body section h2 { margin-top: 2rem; }
.doc-body section:first-child h2 { margin-top: 0; }
.doc-body h2 { padding-top: 0; border-top: 0; display: block; }
@media (min-width: 1000px) {
  .doc-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 48px; }
  .doc-layout-single { grid-template-columns: minmax(0, 1fr); }
  .doc-layout .toc { position: sticky; top: 92px; }
}
.contact-layout { display: grid; gap: 28px; padding: 32px 0 64px; }
.contact-card { background: var(--teal-50); border: 1px solid var(--teal-100); border-radius: var(--radius); padding: 24px; align-self: start; }
.contact-card h2 { display: flex; align-items: center; gap: 10px; }
.contact-card h2 .icon { color: var(--teal); }
.contact-layout .prose h2 { display: block; border-top: 0; padding-top: 0; margin-top: 0; }
.contact-layout .prose section + section { margin-top: 2rem; }
@media (min-width: 900px) { .contact-layout { grid-template-columns: 340px minmax(0, 1fr); gap: 48px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-dd); color: #cfe4df; padding: 52px 0 0; font-size: .95rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--yellow); text-decoration: underline; }
.site-footer .brand, .site-footer .brand:hover { color: var(--white); text-decoration: none; }
.site-footer .brand-word b { color: var(--yellow); }
.footer-grid { display: grid; gap: 30px; }
.footer-brand p { margin-top: 14px; max-width: 420px; }
.footer-email { display: flex; gap: 8px; align-items: center; }
.footer-email .icon { color: var(--yellow); }
.footer-col h2 { font-family: var(--font); font-size: .8rem; letter-spacing: .09em; text-transform: uppercase; color: var(--yellow-200); margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-col a { display: inline-block; padding: 4px 0; }
.footer-base { border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 40px; padding: 20px 0 28px; font-size: .86rem; color: #b7d1cb; }
.footer-base p { margin: 0; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; } }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print {
  .masthead, .site-footer, .toc, .lesson-pager, .related, .search-link { display: none !important; }
  body { font-size: 12pt; }
}

/* ---------- Small phones: compact header ---------- */
.hero-grid > *, .topic-layout > *, .lesson-layout > *, .doc-layout > *, .contact-layout > * { min-width: 0; }
@media (max-width: 479px) {
  .masthead-inner { gap: 8px; }
  .brand-word { font-size: 1.14rem; }
  .brand .logo-mark { width: 34px; height: 34px; }
  .search-link, .menu-toggle { width: 44px; padding: 0; justify-content: center; }
  .search-link span, .menu-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
h1, h2, h3 { overflow-wrap: break-word; hyphens: manual; }
@media (max-width: 419px) {
  h1 { font-size: 1.8rem; }
  .topic-badge { width: 48px; height: 48px; border-radius: 14px; box-shadow: 0 0 0 4px var(--teal-100); }
  .topic-badge .icon { width: 26px; height: 26px; }
  .topic-hero-row { gap: 12px; }
}
