:root {
  color-scheme: light;
  --ink: #203c3b; --muted: #546865; --green: #265c50; --line: #dce4dd;
  --page: #f8f9f4; --surface: #fff; --soft: #e9eee5; --note: #eef0e9;
  --badge: #e5ecdf; --control-border: #a8b8ac; --highlight-border: #b7c9b4;
  --button: #265c50; --button-text: #fff; --button-hover: #193f36; --focus: #ab6529;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e7eee9; --muted: #b2c2bb; --green: #a3d6bd; --line: #3b5248;
  --page: #14231e; --surface: #1d3028; --soft: #263c31; --note: #20342b;
  --badge: #304b3d; --control-border: #718d7d; --highlight-border: #718d7d;
  --button: #a3d6bd; --button-text: #14231e; --button-hover: #c2e7d3; --focus: #efbb7a;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.65; }
a { color: var(--green); text-underline-offset: 4px; }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
.wrap { width: min(1080px, calc(100% - 40px)); margin-inline: auto; }
header { border-bottom: 1px solid var(--line); }
nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 22px; }
.brand { color: var(--ink); font-size: 1.25rem; font-weight: 750; text-decoration: none; letter-spacing: -.04em; }
header nav > a:not(.brand) { font-size: .9rem; font-weight: 600; }
.hero { padding-block: 76px 52px; max-width: 760px; }
.eyebrow { margin: 0 0 16px; font-size: .75rem; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.08; letter-spacing: -.055em; margin: 0 0 24px; font-weight: 650; }
.intro { max-width: 620px; font-size: 1.12rem; color: var(--muted); }
.status { display: inline-block; font-size: .8rem; border: 1px solid var(--line); border-radius: 30px; padding: 6px 13px; margin-top: 12px; }
.featured { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; padding: 32px; border-radius: 18px; background: var(--soft); }
h2 { font-size: 1.7rem; letter-spacing: -.035em; line-height: 1.25; margin: 0 0 12px; }
.featured p { max-width: 620px; margin: 0; }
.featured .eyebrow { margin-bottom: 10px; }
.button { display: inline-block; background: var(--button); color: var(--button-text); padding: 13px 22px; border-radius: 8px; text-decoration: none; font-weight: 650; white-space: nowrap; }
.button:hover { background: var(--button-hover); }
.catalog { padding-block: 60px; }
.section-intro { color: var(--muted); margin: 0 0 26px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 25px; }
.number { color: var(--muted); font-size: .8rem; letter-spacing: .08em; }
h3 { font-size: 1.1rem; margin: 14px 0 10px; }
.card p { color: var(--muted); font-size: .94rem; margin: 0; }
.card .tip { margin-top: 16px; color: var(--ink); }
.note { border-top: 1px solid var(--line); padding-block: 30px 48px; max-width: 760px; }
.note p { color: var(--muted); margin-bottom: 0; }
footer { border-top: 1px solid var(--line); padding-block: 24px; color: var(--muted); font-size: .8rem; }
footer p { margin: 0; }
.site-footer__content { display: flex; align-items: center; justify-content: space-between; gap: 16px 30px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer__links a { color: var(--muted); }
@media (max-width: 800px) { .grid { grid-template-columns: repeat(2, 1fr); } .featured { grid-template-columns: 1fr; } .button { justify-self: start; } }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } .hero { padding-block: 48px 36px; } .featured { padding: 24px; } .catalog { padding-block: 42px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Product detail pages */
.product-page { max-width: 860px; }
.product-hero { max-width: none; padding-bottom: 32px; }
.product-hero .eyebrow { display: block; }
.product-hero h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
.product-hero .intro { max-width: 720px; }
.video-panel { overflow: hidden; background: #203c3b; border: 1px solid var(--line); border-radius: 18px; aspect-ratio: 16 / 9; }
.video-panel video { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-benefits { display: grid; gap: 18px; padding-block: 28px; }
.benefit { display: flex; align-items: flex-start; gap: 14px; }
.benefit p { margin: 0; }
.check { color: var(--green); font-weight: 750; }
.product-cta { display: block; margin-bottom: 48px; }
.product-cta .button { white-space: normal; }
.product-cta p { margin: 14px 0 0; color: var(--muted); font-size: .85rem; }
.footer-note { max-width: 680px; margin-top: 10px; }
.legal-page { width: min(760px, calc(100% - 40px)); margin-inline: auto; padding-block: 64px; }
.legal-page h1 { font-size: clamp(2.35rem, 5vw, 3.5rem); }
.legal-page h2 { margin-top: 38px; }
.legal-page p, .legal-page li { color: var(--muted); }
.legal-meta { font-size: .85rem; color: var(--muted); }
.legal-page ul { padding-left: 1.25rem; }
@media (max-width: 620px) { .site-footer__content { align-items: flex-start; flex-direction: column; } }
@media (max-width: 520px) { nav { flex-wrap: wrap; } }

/* Educational homepage */
.learning-hero { padding-block: 78px 58px; max-width: 860px; }
.learning-hero h1 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; font-size: clamp(2.6rem, 5.5vw, 4.6rem); letter-spacing: -.045em; line-height: 1.12; }
.learning-hero .intro { max-width: 640px; margin-bottom: 26px; }
.text-link { font-size: .92rem; font-weight: 650; }
.text-link span { margin-left: 12px; }
.featured-lesson { display: grid; grid-template-columns: 1fr 1.1fr; background: var(--soft); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.lesson-art { position: relative; min-height: 340px; padding: 28px; background: #24483f; color: #e8e9cc; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; overflow: hidden; }
.art-label { font-size: .68rem; letter-spacing: .16em; z-index: 1; }
.art-caption { font-family: Georgia, 'Times New Roman', serif; font-size: 2rem; z-index: 1; }
.moon-illustration { position: absolute; width: 175px; height: 175px; top: 65px; right: 75px; border-radius: 50%; background: #e1dfb7; box-shadow: 0 0 0 28px #ffffff06, 0 0 0 57px #ffffff05, 0 0 0 88px #ffffff04; }
.moon-illustration::after { content: ''; position: absolute; width: 155px; height: 155px; top: -16px; right: -24px; border-radius: 50%; background: #24483f; }
.lesson-copy { padding: 38px; align-self: center; }
.lesson-copy h2 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 400; }
.lesson-copy > p:not(.eyebrow) { color: var(--muted); }
.lesson-copy .button { margin-top: 8px; white-space: normal; font-size: .9rem; }
.lesson-copy .lesson-caption { font-size: .75rem; margin-bottom: 0; }
.video-library { position: relative; padding-block: 70px 56px; scroll-margin-top: 24px; }
.legacy-anchor { position: absolute; top: 0; }
.library-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.library-heading .eyebrow { margin-bottom: 10px; }
.library-heading h2 { font-family: Georgia, 'Times New Roman', serif; font-size: 2.3rem; font-weight: 400; }
.library-heading > p { font-size: .85rem; color: var(--muted); }
.article-list { padding: 0; margin: 30px 0 0; list-style: none; border-top: 1px solid var(--line); }
.article-row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 24px; padding-block: 28px; border-bottom: 1px solid var(--line); }
.article-number { align-self: start; padding-top: 3px; color: var(--muted); font-family: Georgia, 'Times New Roman', serif; font-size: 1.15rem; }
.article-copy .article-category { font-size: .65rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.article-copy h3 { font-size: 1.2rem; font-weight: 600; margin: 6px 0; line-height: 1.4; }
.article-copy h3 a { color: var(--ink); text-decoration-thickness: 1px; }
.article-copy p { margin: 0; color: var(--muted); font-size: .9rem; }
.article-state { color: var(--muted); font-size: .73rem; white-space: nowrap; }
.article-state.available { background: var(--badge); color: var(--green); padding: 7px 12px; border-radius: 30px; }
.learning-note { padding: 30px 34px; margin-bottom: 60px; background: var(--note); border-radius: 12px; }
.learning-note .eyebrow { margin-bottom: 12px; }
.learning-note h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; }
.learning-note > p:last-child { max-width: 780px; font-size: .9rem; color: var(--muted); margin-bottom: 0; }
@media (max-width: 760px) {
  .featured-lesson { grid-template-columns: 1fr; }
  .lesson-art { min-height: 280px; }
  .moon-illustration { top: 38px; right: 20%; }
  .library-heading { display: block; }
  .library-heading > p { display: none; }
  .article-row { grid-template-columns: 28px 1fr; gap: 12px; }
  .article-state { grid-column: 2; justify-self: start; }
}
@media (max-width: 520px) {
  .learning-hero { padding-block: 48px 38px; }
  .lesson-copy { padding: 26px; }
  .video-library { padding-block: 44px; }
  .learning-note { padding: 24px; margin-bottom: 40px; }
}

/* Header appearance toggle: icon reflects the current theme. */
header nav { flex-wrap: wrap; }
header nav > .brand { margin-right: auto; }
.theme-toggle { display: inline-grid; place-items: center; position: relative; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--green); cursor: pointer; transition: background-color .2s ease, border-color .2s ease, transform .2s ease; }
.theme-toggle:hover { background: var(--soft); border-color: var(--control-border); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.theme-icon { grid-area: 1 / 1; width: 21px; height: 21px; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.theme-icon--moon { opacity: 0; transform: rotate(-30deg) scale(.7); }
.theme-icon--sun { opacity: 1; transform: rotate(0) scale(1); }
:root[data-theme="dark"] .theme-icon--moon { opacity: 1; transform: rotate(0) scale(1); }
:root[data-theme="dark"] .theme-icon--sun { opacity: 0; transform: rotate(30deg) scale(.7); }
@media (prefers-reduced-motion: reduce) {
  .theme-toggle, .theme-icon { transition: none; }
  .theme-toggle:active { transform: none; }
}

/* Shared page sharing controls */
.header-actions { display: flex; align-items: center; gap: 10px; }
.share-widget { position: relative; }
.share-button, .share-copy { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 15px; border: 1px solid var(--control-border); border-radius: 24px; background: var(--surface); color: var(--green); font: inherit; font-size: .85rem; font-weight: 650; cursor: pointer; }
.share-button:hover, .share-copy:hover { background: var(--soft); }
.share-button svg { width: 19px; height: 19px; }
.share-button:focus-visible, .share-copy:focus-visible, .share-panel input:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.share-panel { position: absolute; z-index: 10; right: 0; top: calc(100% + 12px); width: min(280px, calc(100vw - 40px)); padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 12px 32px #0003; }
.share-panel[hidden] { display: none; }
.share-panel label { display: block; margin-bottom: 10px; font-size: .9rem; font-weight: 650; }
.share-panel input { display: block; width: 100%; min-height: 44px; margin-bottom: 12px; padding: 8px; border: 1px solid var(--control-border); border-radius: 6px; background: var(--page); color: var(--ink); font: inherit; font-size: .85rem; }
.share-copy { width: 100%; }
.share-status { margin: 10px 0 0; font-size: .8rem; color: var(--muted); }
.share-status:empty { display: none; }
@media (max-width: 620px) {
  header nav > a:not(.brand) { order: 3; width: 100%; }
  header nav { gap: 12px; }
  .header-actions { margin-left: auto; }
}
