/* Reading takes priority over decorative contrast. Shared text pairs keep
   a strong contrast in both appearances; component surfaces inherit these tokens. */
:root:has(body.premium-site), body.premium-site {
  --paper: #fcfbfd;
  --surface: #ffffff;
  --ink: #211a2a;
  --body: #3d3547;
  --muted: #5e5369;
  --line: #c9bfD2;
  --control-line: #867393;
  --teal: #503568;
  --teal-dark: #39224e;
  --sage: #f0ebf4;
  --lime: #e0d5eb;
  --coral: #69417e;
  --coral-soft: #f0ebf4;
  --on-accent: #ffffff;
  --iris: #8c769e;
  --success-text: #165934;
  --success-surface: #edf8f0;
  --warning-text: #744204;
  --warning-surface: #fff5df;
  --error-text: #8b2536;
  --error-surface: #fff0f2;
}
:root[data-theme="dark"]:has(body.premium-site),
html[data-theme="dark"] body.premium-site {
  --paper: #211b2a;
  --surface: #2d2637;
  --ink: #ffffff;
  --body: #e3dceb;
  --muted: #d0c6dc;
  --line: #6d5c7c;
  --control-line: #a38bb6;
  --teal: #e0c8f5;
  --teal-dark: #f0dcff;
  --sage: #393043;
  --lime: #51405e;
  --coral: #e0c8f5;
  --coral-soft: #393043;
  --on-accent: #251930;
  --iris: #c4a5da;
  --success-text: #b5f0c9;
  --success-surface: #193b2b;
  --warning-text: #ffe0a1;
  --warning-surface: #49351a;
  --error-text: #ffd1da;
  --error-surface: #4b2432;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):has(body.premium-site),
  html:not([data-theme="light"]) body.premium-site {
    --paper: #211b2a; --surface: #2d2637; --ink: #ffffff;
    --body: #e3dceb; --muted: #d0c6dc; --line: #6d5c7c;
    --control-line: #a38bb6; --teal: #e0c8f5; --teal-dark: #f0dcff;
    --sage: #393043; --lime: #51405e; --coral: #e0c8f5;
    --coral-soft: #393043; --on-accent: #251930; --iris: #c4a5da;
    --success-text: #b5f0c9; --success-surface: #193b2b;
    --warning-text: #ffe0a1; --warning-surface: #49351a;
    --error-text: #ffd1da; --error-surface: #4b2432;
  }
}
body.premium-site { font-size: 16px; line-height: 2.05; }
body.premium-site :is(.prose, .article-prose) { font-size: 17px; line-height: 2.2; }
body.premium-site :is(.prose, .article-prose) :is(p, li) { color: var(--body); }
body.premium-site :is(.prose, .article-prose) a { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }
body.premium-site :is(.page-heading, .section-heading, .account-page-heading) p { font-size: 16px; color: var(--body); line-height: 2.1; }
body.premium-site :is(.small, .eyebrow, .muted, .breadcrumb, .learning-breadcrumb, .section-context) { color: var(--muted); }
body.premium-site :is(.small, .eyebrow, .breadcrumb, .learning-breadcrumb, .learning-kicker,
  .editorial-kicker, .editorial-count, .journal-meta, .learning-card-topline,
  .learning-card-meta, .course-meta, .learning-cover-caption, .learning-instructor small,
  .learning-course-facts small, .learning-enrollment-price small,
  .course-checkup-date, .course-checkup-copy p, .course-checkup-lock-label,
  .course-checkup-waiting, .course-checkups-access p, .course-learning-progress > small,
  .lesson-completed-badge, .learning-history-course, .learning-history-copy > small,
  .learning-history-note, .account-nav-group, .account-count, .account-course-meta,
  .account-course-state, .account-learning-action > span, .account-help-note p,
  .account-overview-item small, .account-overview-item strong span, .account-navigation .account-person small,
  .auth-account-note, .auth-secure, .auth-local-code small, .auth-progress li,
  .auth-experience .auth-trust, .auth-experience .auth-back,
  .free-enrollment-benefit small, .free-enrollment-terms, .free-enrollment-rules,
  .field small, .form-message, .form-panel > p, .landing-card small,
  .order-info > div, .account-item small, .comment-date, .comment-author small,
  .media-error-note, .media-progress-status, .podcast-info p, .listening-note,
  .listening-feature-top, .listening-feature-category, .listening-feature-main p,
  .listening-row-copy > span, .listening-file, .editorial-inline-link) {
  font-size: 14px;
  line-height: 1.95;
}
body.premium-site :is(.learning-card-badge, .status-pill, .pill, .lesson-number, .auth-step-number) { font-size: 13px; line-height: 1.8; }
body.premium-site :is(.button, .learning-card-cta, .text-link, .learning-filters a,
  .editorial-filters a, .folder-nav a, .content-tabs a, .learning-detail-tabs a) { font-size: 15px; }
body.premium-site :is(.desktop-nav a, .mobile-menu a, .header-actions > .button) { font-size: 14px; }
body.premium-site .bottom-nav a > span { font-size: 12px; }
body.premium-site :is(.field label, .field > span, .field legend, .quiz-question legend,
  .quiz-options label, .checkout-choice > span, .checkout-choice strong) { font-size: 15px; line-height: 2; color: var(--ink); }
body.premium-site :is(input:not([type=hidden]), select, textarea) { font-size: 16px; border-color: var(--control-line); }
body.premium-site .landing-card input:not([type=checkbox]) { border-color: var(--control-line); }
body.premium-site .auth-experience .field input[aria-invalid=true] { border-color: var(--error-text); box-shadow: 0 0 0 2px var(--error-surface); }
body.premium-site :is(input[type=checkbox], input[type=radio]) { accent-color: var(--teal); }
body.premium-site :is(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
body.premium-site :is(input, textarea):disabled { opacity: .8; }
body.premium-site :is(.button-outline, .button-secondary, .learning-card-cta,
  .editorial-filters a, .learning-filters a, .folder-nav a, .content-tabs a) { border-color: var(--control-line); }
body.premium-site :is(a, button, input, select, textarea, summary, audio):focus-visible {
  outline: 3px solid var(--teal); outline-offset: 4px;
}
body.premium-site .prose :is(h2,h3,h4) { line-height: 1.9; }
body.premium-site :is(.status-success, .notice.success, .form-message.success,
  .auth-experience .form-message.success, .free-enrollment-card .form-message.success) {
  background: var(--success-surface); color: var(--success-text); border-color: var(--success-text);
}
body.premium-site :is(.status-pending, .notice.warning) {
  background: var(--warning-surface); color: var(--warning-text); border-color: var(--warning-text);
}
body.premium-site :is(.status-failed, .notice.error, .form-message,
  .auth-experience .form-message, .free-enrollment-card .form-message) {
  background: var(--error-surface); color: var(--error-text); border-color: var(--error-text);
}
/* Keep .success after the default error panel, including nested auth dialogs. */
body.premium-site :is(.form-message.success, .auth-experience .form-message.success,
  .free-enrollment-card .form-message.success) { background: var(--success-surface); color: var(--success-text); border-color: var(--success-text); }
body.premium-site :is(.pagination, .pagination .button, .result-note) { font-size: 14px; }
body.premium-site .site-footer { --muted: #d2c8df; --body: #e4dbea; }
body.premium-site .site-footer :is(.footer-intro p, .footer-note p,
  .footer-note .eyebrow, .footer-main h2, .footer-main > div > a:not(.footer-brand),
  .footer-explore, .footer-bottom) { font-size: 14px; line-height: 2; }
body.premium-site .site-footer .footer-main { gap: 36px; }
/* The home keeps its dark composition, with brighter supporting copy. */
body.premium-site.premium-home { --hero-ink: #292335; --hero-text: #ffffff; --hero-soft: #e0d5ea; }
body.premium-site.premium-home :is(.hero-coordinates, .hero-intro, .hero-description,
  .hero-bottom, .hero-bottom p, .scroll-invitation, .art-note, .art-caption,
  .hero-audio-link, .hero-signature) { color: #e0d5ea; }
body.premium-site.premium-home :is(.hero-intro, .hero-bottom, .hero-bottom p,
  .scroll-invitation, .art-note, .art-caption, .hero-audio-link) { font-size: 14px; }
body.premium-site.premium-home .hero-coordinates { font-size: 12px; }
body.premium-site.premium-home .hero-description { font-size: 17px; line-height: 2.1; }
body.premium-site.premium-home .hero-actions { gap: 24px; }
body.premium-site.premium-home .hero-primary { font-size: 16px; }
body.premium-site.premium-home .hero-audio-link { gap: 10px; }
body.premium-site.premium-home .section-context { font-size: 14px; }
body.premium-site.premium-home :is(.within-footnote, .path-intro > p:last-child,
  .path-panel p, .mentor-copy > p:not(.section-context), .premium-journal-grid .journal-card p) { color: var(--body); font-size: 16px; }
body.premium-site.premium-home :is(.path-tabs button, .text-link,
  .premium-course-list .learning-card-topline, .premium-course-list .learning-card-meta,
  .premium-course-list .learning-card-cta, .premium-journal-grid .journal-meta,
  .premium-journal-grid .editorial-inline-link, .mentor-portrait figcaption) { font-size: 14px; }
body.premium-site.premium-home .path-panel h3 { font-size: 26px; }
body.premium-site.premium-home .premium-course-list .learning-card h3 { font-size: 24px; }
body.premium-site.premium-home .premium-course-list .learning-card-bottom { min-width: 0; }
body.premium-site.premium-home .premium-course-list .learning-card-meta { flex-wrap: wrap; }
body.premium-site.premium-home .premium-course-list .learning-card-price small { font-size: 13px; }
body.premium-site.premium-home .premium-course-list .learning-card-badge { font-size: 12px; }
body.premium-site.premium-home .premium-course-list .learning-card-badge ~ .learning-card-bottom { padding-top: 30px; }
body.premium-site.premium-home .premium-listening :is(.section-context, .listening-copy > p,
  .listening-copy .text-link, .podcast-now, .premium-podcast > p) { color: #e0d5ea; }
body.premium-site.premium-home .listening-copy > p:not(.section-context) { font-size: 16px; }
body.premium-site.premium-home :is(.podcast-now, .premium-podcast > p) { font-size: 14px; }
body.premium-site.premium-home .begin-section .section-context { color: #503d60; }
body.premium-site.premium-home :is(.site-header, .immersion-hero, .premium-listening) :is(a,button,audio):focus-visible { outline-color: #f0dfff; }
@media (max-width: 1000px) {
  body.premium-site.premium-home .hero-actions { gap: 18px; }
  body.premium-site.premium-home .hero-primary { font-size: 15px; }
}
@media (max-width: 800px) {
  body.premium-site.premium-home .premium-course-list .learning-card h3 { font-size: 21px; }
  body.premium-site.premium-home .premium-course-list .learning-card-bottom { padding-top: 18px; }
}
@media (max-width: 767px) {
  body.premium-site :is(.prose, .article-prose) { font-size: 16px; }
  body.premium-site .header-actions > .button { font-size: 13px; padding-inline: 12px; }
  body.premium-site .brand strong { font-size: 16px; }
  body.premium-site .brand small { font-size: 10px; }
  body.premium-site .footer-main { gap: 28px; }
  body.premium-site :is(.learning-search .button, .learning-filters a, .editorial-filters a) { font-size: 14px; }
  body.premium-site .learning-card h3 { font-size: 21px; }
  body.premium-site.premium-home .hero-description { font-size: 16px; }
}
@media (max-width: 540px) {
  body.premium-site.premium-home .hero-actions { gap: 14px; flex-wrap: wrap; }
  body.premium-site.premium-home .hero-audio-link { min-height: 44px; }
  body.premium-site.premium-home .hero-coordinates { flex-wrap: wrap; }
  body.premium-site.premium-home .hero-coordinates > span:last-child { display: none; }
  body.premium-site.premium-home .art-caption { display: none; }
  body.premium-site.premium-home .hero-bottom { gap: 14px; flex-wrap: wrap; }
  body.premium-site.premium-home .hero-signature { font-size: 16px; }
  body.premium-site.premium-home .premium-course-list .learning-card { grid-template-columns: 90px minmax(0,1fr); gap: 16px; }
  body.premium-site.premium-home .premium-course-list .learning-card h3 { font-size: 20px; }
  body.premium-site.premium-home .premium-course-list .learning-card-topline { font-size: 14px; }
  body.premium-site.premium-home .premium-course-list .learning-card-meta { font-size: 14px; line-height: 1.9; }
  body.premium-site.premium-home .premium-course-list .learning-card-bottom { flex-wrap: wrap; gap: 12px; }
  body.premium-site.premium-home .premium-course-list .learning-card-price strong { font-size: 18px; }
  body.premium-site.premium-home .premium-course-list .learning-card-cta { font-size: 14px; min-height: 44px; padding-inline: 14px; }
  body.premium-site.premium-home .premium-course-list .learning-card-badge ~ .learning-card-bottom { padding-top: 18px; }
  body.premium-site.premium-home .path-tabs { gap: 8px; flex-wrap: wrap; }
  body.premium-site.premium-home .path-tabs button { font-size: 14px; white-space: normal; min-height: 50px; }
  body.premium-site.premium-home .path-tabs button::after { bottom: 0; }
  body.premium-site.premium-home .begin-link { font-size: 15px; }
}
@media (max-width: 380px) {
  body.premium-site .brand small { display: none; }
  body.premium-site .brand-logo { width: 27px; }
  body.premium-site .brand strong { font-size: 15px; }
  body.premium-site .header-actions > .button { padding-inline: 9px; font-size: 12px; }
}
@media (forced-colors: active) {
  body.premium-site :is(.button, .learning-card-cta, .status-pill) { border: 1px solid ButtonText; }
  body.premium-site :is(input, select, textarea) { border: 1px solid FieldText; }
}
