/* Shared storybook palette and controls for the website. */
:root.adventure-theme {
    --adventure-page: #f6f0df;
    --adventure-paper: #fff9eb;
    --adventure-soft: #eee6ce;
    --adventure-forest: #365c39;
    --adventure-leaf: #548c3c;
    --adventure-gold: #e7ba59;
    --adventure-heading-background: #fff3cf;
    --adventure-outline: #c6b68b;
    --adventure-ink: #303d2c;
    --adventure-muted: #677058;
    --theme-page: var(--adventure-page);
    --theme-surface: var(--adventure-paper);
    --theme-text: var(--adventure-ink);
    --theme-muted: var(--adventure-muted);
    --theme-border: var(--adventure-outline);
    --theme-fg-purple: var(--adventure-forest);
    --purple: var(--adventure-forest);
    --purple-dark: var(--adventure-forest);
    --purple-light: var(--adventure-soft);
    --violet: var(--adventure-forest);
    --violet-soft: var(--adventure-soft);
    --border: var(--adventure-outline);
    --line: var(--adventure-outline);
    --ink: var(--adventure-ink);
    --muted: var(--adventure-muted);
    --surface: var(--adventure-paper);
    --surface-soft: var(--adventure-soft);
    --nav-panel-bg: var(--adventure-paper);
    --crp-bg-ffffff: var(--adventure-paper);
    --crp-bg-faf5ff: var(--adventure-paper);
    --crp-bg-f5f3ff: var(--adventure-soft);
    --crp-bg-ede9fe: var(--adventure-soft);
    --crp-bg-f8fafc: var(--adventure-paper);
    --crp-border-ddd6fe: var(--adventure-outline);
    --crp-border-c4b5fd: var(--adventure-outline);
    --crp-border-a78bfa: var(--adventure-leaf);
    --crp-border-7c3aed: var(--adventure-forest);
    --crp-fg-6d28d9: var(--adventure-forest);
    --crp-fg-7c3aed: var(--adventure-forest);
    --crp-fg-111827: var(--adventure-ink);
    --crp-fg-374151: var(--adventure-ink);
    --crp-fg-4b5563: var(--adventure-muted);
}
:root.adventure-theme[data-theme="dark"] {
    --adventure-page: #1e2921;
    --adventure-heading-background: #493b23;
    --adventure-paper: #29372c;
    --adventure-soft: #354430;
    --adventure-forest: #b1d5a2;
    --adventure-leaf: #9cbd80;
    --adventure-outline: #718063;
    --adventure-ink: #f4efda;
    --adventure-muted: #c8cfb8;
}
body.adventure-site { color: var(--adventure-ink); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.adventure-site :is(h1, h2, h3, .logo, .learning-nav-label) {
    font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
}
.adventure-site :is(a, button, input):focus-visible { outline: 3px solid var(--adventure-leaf); outline-offset: 3px; }
.adventure-site .site-header { border-bottom: 1px solid var(--adventure-outline); }
.adventure-site .logo { color: var(--adventure-forest); }
.adventure-site .site-nav :is(a, .nav-parent-link) { color: var(--adventure-ink); }
.adventure-site .site-nav a:is(.active, .nav-highlight),
.adventure-site .site-nav a:hover { background: var(--adventure-soft); border-color: var(--adventure-outline); color: var(--adventure-forest); }
.adventure-site .site-nav a.active:not(.nav-highlight) { border-bottom-color: var(--adventure-leaf); }
.adventure-site :is(.nav-submenu, .menu-toggle) { background: var(--adventure-paper); border-color: var(--adventure-outline); color: var(--adventure-forest); }
body.adventure-site > main .site-page-banner {
    position: relative;
    overflow: hidden;
    padding: 26px 30px;
    border: 0;
    outline: 0;
    box-shadow: none;
    border-radius: 20px;
    background: var(--adventure-heading-background);
}
.adventure-site .exercise-page-heading-content { position: relative; z-index: 1; padding-right: 150px; }
body.adventure-site > main .site-page-banner .site-page-banner-title { color: var(--adventure-forest); font-size: clamp(30px, 3vw, 42px); }
body.adventure-site > main .site-page-banner .site-page-banner-copy { color: var(--adventure-muted); max-width: 700px; }
body.adventure-site > main .site-page-banner .adventure-eyebrow { margin: 0 0 8px; color: var(--adventure-forest); font-size: 11px; font-weight: 800; letter-spacing: .12em; line-height: 1.4; text-transform: uppercase; }
.adventure-banner-art { position: absolute; inset: 0 22px 0 auto; width: 132px; display: flex; align-items: center; justify-content: center; gap: 4px; transform: rotate(-6deg); pointer-events: none; }
.adventure-banner-art img { object-fit: contain; width: 68px; height: 78px; }
.adventure-banner-art img:last-child { width: 46px; height: 85px; transform: rotate(12deg) translateY(-5px); }
.adventure-site :is(.map-side-column, .course-map) { border-color: var(--adventure-outline); background: var(--adventure-paper); box-shadow: none; }
.adventure-site .learning-nav-column { padding: 10px; border-radius: 18px; }
.adventure-site .learning-rail { gap: 5px; scrollbar-color: var(--adventure-outline) transparent; }
.adventure-site .learning-nav-link {
    min-height: 58px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--adventure-ink);
    border-radius: 12px;
    box-shadow: none;
    font-size: 12px;
    letter-spacing: .025em;
    transition: transform 160ms ease-out, opacity 160ms ease-out, background-color 160ms ease-out;
}
.adventure-site .learning-nav-link:is(.is-active, :hover, :focus-visible) { border-color: var(--adventure-outline); background: var(--adventure-soft); color: var(--adventure-forest); box-shadow: none; animation: none; }
.adventure-site .learning-nav-link.is-active { border-left: 4px solid var(--adventure-leaf); padding-left: 9px; }
.adventure-site .learning-nav-link .learning-nav-icon { animation: none; }
.adventure-site .learning-nav-icon::before, .adventure-site .site-nav-icon { filter: none; }
.adventure-site .learning-nav-link:active { transform: scale(.985); opacity: .9; }
.adventure-site .learning-nav-group-toggle, .adventure-site .learning-nav-submenu { color: var(--adventure-ink); border-color: var(--adventure-outline); background: var(--adventure-paper); }
.adventure-site .course-map { padding: 20px; border-radius: 20px; animation: none; }
.adventure-site .map-header { border-bottom: 1px solid var(--adventure-outline); padding-bottom: 16px; margin-bottom: 18px; }
.adventure-site .map-header h1 { color: var(--adventure-forest); font-size: clamp(23px, 2.3vw, 30px); line-height: 1.35; }
.adventure-site .map-subtitle { color: var(--adventure-muted); font-size: 13px; margin-top: 8px; }
.adventure-site .map-progress-rail { border-radius: 18px; }
.adventure-site .exercise-account-cover { position: relative; min-height: 310px; padding: 28px 16px; border: 0; border-radius: 0; background: transparent; color: var(--adventure-ink); }
.adventure-site .exercise-account-cover .adventure-progress-art { width: 76px; height: 76px; object-fit: contain; margin-bottom: 4px; }
.adventure-site .exercise-account-cover p { color: var(--adventure-muted); }
.adventure-site .exercise-account-cover h2 { font-size: 22px; color: var(--adventure-forest); }
.adventure-site .exercise-account-cover a { background: #365c39; color: #fff9eb; border: 2px solid #2b482d; border-radius: 12px; min-height: 46px; }
/* The guest cover participates in layout; hidden account data must not leave a tall empty rail. */
.adventure-site:not(.exercise-signed-in) .exercise-account-content { display: none; }
.adventure-site :is(.exercise-player-card, .rail-section, .exercise-side-panel) { background: var(--adventure-paper); border-color: var(--adventure-outline); box-shadow: none; }
.adventure-site .exercise-player-avatar { border-color: var(--adventure-gold); }
.adventure-site .rail-section h3 { color: var(--adventure-forest); }
.adventure-site :is(.stat, .saved-word-stat) { border-color: var(--adventure-outline); background: var(--adventure-soft); color: var(--adventure-ink); box-shadow: none; }
.adventure-site :is(.stat strong, .saved-word-stat strong) { color: var(--adventure-forest); }
.adventure-site .stat-icon-xp { background: #f4dda4; color: #795515; }
.adventure-site :is(.daily-goal-panel, .health-panel) { background: var(--adventure-paper); border-color: var(--adventure-outline); box-shadow: none; }
.adventure-site :is(.daily-goal-panel, .health-panel):is(:hover, :focus-within) { border-color: var(--adventure-leaf); box-shadow: none; transform: none; }
.adventure-site :is(.daily-goal-panel h2, .health-panel h2) { color: var(--adventure-forest); }
.adventure-site :is(.daily-goal-countdown, .health-countdown) { background: var(--adventure-soft); border-color: var(--adventure-outline); color: var(--adventure-ink); }
.adventure-site .daily-goal-icon { background: #f4dda4; color: #795515; }
.adventure-site .daily-goal-fill { background: #548c3c; }
.adventure-site .exercise-auth-prompt { background: var(--adventure-paper); border-color: var(--adventure-outline); color: var(--adventure-ink); box-shadow: none; }
/* Match the map's palette while preserving answer feedback and lesson controls. */
.adventure-site :is(.practice, .exercise-shell, .completion-card) { background: var(--adventure-paper); border-color: var(--adventure-outline); box-shadow: none; }
.adventure-site .practice-view .exercise-shell { border-radius: 20px; }
.adventure-site .primary-action, .adventure-site .secondary-action.map-back-button { background: #365c39; border-color: #2b482d; color: #fff9eb; box-shadow: none; }
.adventure-site .primary-action:hover:not(:disabled) { background: #29492c; }
.adventure-site .secondary-action:not(.map-back-button) { background: var(--adventure-soft); border-color: var(--adventure-outline); color: var(--adventure-ink); box-shadow: none; }
.adventure-site .practice-view .exercise-shell #speakButton { background: var(--adventure-soft); border-color: var(--adventure-outline); color: var(--adventure-forest); }
.adventure-site .practice-view .exercise-shell #speakButton:is(:hover, :focus-visible) { background: var(--adventure-paper); border-color: var(--adventure-leaf); }
body.adventure-site .practice-view .exercise-shell .toggle-button { background: var(--adventure-paper); color: var(--adventure-muted); border-color: var(--adventure-outline); box-shadow: none; }
body.adventure-site .practice-view .exercise-shell .toggle-button.active { background: var(--adventure-soft); color: var(--adventure-forest); border-color: var(--adventure-leaf); }
.adventure-site .practice-view .grammar-rule { border-left-color: var(--adventure-leaf); color: var(--adventure-forest); }
body.adventure-site .practice-view .exercise-shell #choices button.choice:not(.correct):not(.incorrect) { border-color: var(--adventure-outline); background: var(--adventure-paper); color: var(--adventure-ink); }
body.adventure-site .practice-view .exercise-shell #choices button.choice.selected:not(.correct):not(.incorrect) { border-color: var(--adventure-leaf); background: var(--adventure-soft); }
.adventure-site .practice-view .choice-art.is-number { color: var(--adventure-forest); }
.adventure-site .practice-view .choice-caption { color: var(--adventure-muted); }
.adventure-site .practice-view .choice.correct .choice-caption { color: #166534; }
.adventure-site .practice-view .choice.incorrect .choice-caption { color: #991b1b; }
.adventure-site .lesson-progress-track { background: var(--adventure-soft); }
.adventure-site .lesson-progress-fill { background: #548c3c; }
.adventure-site .lesson-progress-count { color: var(--adventure-forest); }
@media (max-width: 820px) {
    body.adventure-site > main .site-page-banner { padding: 20px; border-radius: 16px; }
    .adventure-site .exercise-page-heading-content { padding-right: 0; }
    .adventure-banner-art { display: none; }
    .adventure-site .course-map { padding: 14px; border-radius: 16px; }
    .adventure-site .learning-nav-link { min-height: 48px; }
    .adventure-site .exercise-account-cover { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .adventure-site .learning-nav-link { transition: none; transform: none; }
}
:root.adventure-theme {
    --site-chrome-background: var(--adventure-paper);
    --crp-action-primary: #365c39;
    --crp-action-primary-hover: #29492c;
    --crp-action-secondary: var(--adventure-soft);
    --crp-action-secondary-hover: var(--adventure-paper);
    --crp-action-secondary-text: var(--adventure-ink);
    --crp-action-secondary-border: var(--adventure-outline);
}
.adventure-site .adventure-eyebrow { text-align: left; }
.adventure-site .placement-start-link { color: var(--adventure-forest); }
.adventure-site .placement-popup { --placement-purple: #365c39; background: var(--adventure-paper); color: var(--adventure-ink); }
.adventure-site .learning-rail .learning-nav-toggle { width: calc(100% - 18px); margin-left: 18px; box-shadow: none !important; }
.adventure-site .learning-rail .learning-nav-toggle:hover:not(:focus-visible) { outline: none; }
@media (max-width: 820px) {
    .adventure-site .learning-nav-column { padding: 6px; }
    .adventure-site .learning-rail .learning-nav-toggle { width: 100%; margin-left: 0; }
    .adventure-site .learning-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; max-height: none; overflow: visible; padding: 0; }
    .adventure-site .learning-rail .learning-nav-group { display: contents; }
    .adventure-site .learning-rail .learning-nav-link { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 76px; padding: 7px 2px; font-size: 10px; letter-spacing: 0; text-align: center; }
    .adventure-site .learning-nav-link.is-active { border-left-width: 1px; border-bottom: 3px solid var(--adventure-leaf); }
    .adventure-site .learning-nav-chevron { position: absolute; top: 9px; right: 7px; width: 6px; height: 6px; }
    .adventure-site .learning-nav-submenu { grid-column: 1 / -1; grid-row: 4; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 0; padding: 6px; }
    .adventure-site .learning-nav-child { font-size: 11px; }
}

.adventure-site .practice-view .prompt-kind { color: var(--adventure-ink); }
.adventure-site .crp-sound-tip { background: var(--adventure-paper); border-color: var(--adventure-outline); color: var(--adventure-ink); box-shadow: 0 6px 18px #303d2c18; }
.adventure-site .crp-sound-tip-close { background: var(--adventure-soft); color: var(--adventure-forest); }
.adventure-site .practice-view :is(.prompt-pinyin, .prompt-traditional, .exercise-example-heading) { color: var(--adventure-muted); }
.adventure-site .practice-view .prompt-main:not(.is-new-word) { color: var(--adventure-ink); }
.adventure-site .site-footer a { color: var(--adventure-forest); }
@media (max-width: 820px) { .adventure-site .learning-rail > .learning-nav-link:last-child { grid-column: 2; } }
.adventure-site .crp-floating-xp { border-color: #bd933e !important; background: #f4dda4 !important; color: #604519 !important; box-shadow: none !important; text-shadow: none; }
html[data-theme="dark"] .adventure-site .practice-view .choice.correct .choice-caption { color: #b1d5a2; }
html[data-theme="dark"] .adventure-site .practice-view .choice.incorrect .choice-caption { color: #fecaca; }

:root.adventure-theme {
    --text: var(--adventure-ink);
    --blog-ink: var(--adventure-ink);
    --blog-muted: var(--adventure-muted);
    --blog-line: var(--adventure-outline);
    --blog-purple: var(--adventure-forest);
    --blog-purple-soft: var(--adventure-soft);
    --grey-panel: var(--adventure-soft);
    --grey-panel-strong: var(--adventure-soft);
    --grey-card: var(--adventure-paper);
    --panel: var(--adventure-paper);
    --purple-soft: var(--adventure-soft);
    --crp-bg-f3f4f6: var(--adventure-soft);
    --crp-bg-eef2f7: var(--adventure-soft);
    --crp-bg-f1f5f9: var(--adventure-soft);
    --crp-bg-eef2ff: var(--adventure-soft);
    --crp-bg-e9d5ff: var(--adventure-soft);
    --crp-bg-f3e8ff: var(--adventure-soft);
    --crp-bg-fbfaff: var(--adventure-paper);
    --crp-bg-7c3aed: #365c39;
    --crp-bg-6d28d9: #365c39;
    --crp-bg-5b21b6: #29492c;
    --crp-border-e5e7eb: var(--adventure-outline);
    --crp-border-cbd5e1: var(--adventure-outline);
    --crp-border-d1d5db: var(--adventure-outline);
    --crp-border-d8b4fe: var(--adventure-outline);
    --crp-border-e9d5ff: var(--adventure-outline);
    --crp-fg-5b21b6: var(--adventure-forest);
    --crp-fg-4c1d95: var(--adventure-forest);
    --crp-fg-64748b: var(--adventure-muted);
    --crp-fg-475569: var(--adventure-muted);
    --crp-fg-6b7280: var(--adventure-muted);
    --adventure-hsk-text: #795515;
}
:root.adventure-theme[data-theme="dark"] {
    --adventure-hsk-text: #f3d48b;
    --text: var(--adventure-ink) !important;
    --ink: var(--adventure-ink) !important;
    --muted: var(--adventure-muted) !important;
    --surface: var(--adventure-paper) !important;
    --surface-soft: var(--adventure-soft) !important;
    --border: var(--adventure-outline) !important;
    --line: var(--adventure-outline) !important;
    --nav-panel-bg: var(--adventure-paper) !important;
    --blog-ink: var(--adventure-ink) !important;
    --blog-muted: var(--adventure-muted) !important;
    --blog-line: var(--adventure-outline) !important;
}
.adventure-site :is(h1, h2, h3, h4, .learning-title, .settings-section-title) { color: var(--adventure-forest); }
.adventure-site a:not(.primary-action):not(.btn-primary):not(.button):not(.leagues-action):not(.news-card):not(.crp-level-choice):not(.learning-nav-link):not(.learning-nav-child) { color: var(--adventure-forest); }
.adventure-site :is(.panel, .card, .hero, .learning-page-content, .learning-card, .learning-stat, .learning-nav-column,
    .notification-settings-panel, .account-profile-card, .account-total-xp-card, .account-badges-card, .avatar-card,
    .saved-articles-panel, .referral-panel, .profile-card, .achievement-card, .leaderboard-card, .leaderboard-panel,
    .shop-card, .product-card, .practice-menu-card, .premium-feature, .article-level-card, .article-card,
    .blog-article, .blog-article-shell, .reader-panel, .reader-settings, .flashcard, .flashcard-panel) {
    background: var(--adventure-paper);
    border-color: var(--adventure-outline);
    border-radius: 16px;
    box-shadow: none;
}
html:not(.crp-native) body.adventure-site[data-learning-page="achievements"] .achievement-card {
    background: #fff;
}
.adventure-site .learning-rail { display: grid; }
.adventure-site :is(.learning-dashboard-top, .story-reader-page-header, .blog-hero, .premium-hero) { border-color: var(--adventure-outline); }
.adventure-site .learning-title { color: var(--adventure-forest); }
.adventure-site .learning-copy { color: var(--adventure-muted); }
.adventure-site :is(.learning-card h2, .learning-stat strong, .stat-value) { color: var(--adventure-forest); }
.adventure-site :is(.hero, .blog-hero, .premium-hero) { background: var(--adventure-heading-background); border: 0; outline: 0; box-shadow: none; border-radius: 18px; padding: 24px; }
.adventure-site .learning-dashboard-top:not(.story-reader-page-header) { padding-bottom: 16px; border-bottom: 2px solid var(--adventure-outline); }
.adventure-site .premium-plans .card { background: var(--adventure-paper); border-color: var(--adventure-outline); box-shadow: none; }
.adventure-site .premium-plans .card.pro { border-color: #bd933e; }
.adventure-site .premium-plans .card h4::after { background: var(--adventure-gold); }
.adventure-site .premium-plans .badge { background: #f4dda4; border-color: #bd933e; color: #604519; }
.adventure-site :is(.plans-tab[aria-selected="true"], .tab-button.active, .account-auth-mode.is-active, .account-auth-mode.active, .filter-button.active) { background: var(--adventure-soft); border-color: var(--adventure-leaf); color: var(--adventure-forest); }
.adventure-site :is(.story-edition-heading, .story-edition-more, .story-edition-card, .news-archive-divider) { border-color: var(--adventure-outline); }
.adventure-site .story-edition-copy strong { color: var(--adventure-ink); }
.adventure-site :is(.story-edition-copy h3 > span, .story-edition-copy p, .story-reader-meta) { color: var(--adventure-muted); }
.adventure-site .story-reader-shell { background: var(--adventure-paper); border-color: var(--adventure-outline); }
.adventure-site .story-reader-content { color: var(--adventure-ink); }
.adventure-site :is(.story-reader-title, .story-edition-read, .story-edition-premium) { color: var(--adventure-forest); }
.adventure-site .news-card { background: var(--adventure-paper); border-color: var(--adventure-outline); color: var(--adventure-ink); box-shadow: none; }
.adventure-site .news-card:is(:hover, :focus-visible) { border-color: var(--adventure-leaf); box-shadow: none; }
.adventure-site :is(.news-filter, .news-archive-column, .news-archive-panel, .news-static-article, .news-study-guide) { background: var(--adventure-paper); border-color: var(--adventure-outline); }
.adventure-site .news-content button { background: var(--adventure-paper); color: var(--adventure-forest); border-color: var(--adventure-outline); }
.adventure-site :is(.news-tab.active, .news-tab[aria-selected="true"], .news-category.active) { background: var(--adventure-soft); color: var(--adventure-forest); border-color: var(--adventure-leaf); }
.adventure-site :is(.account-auth-field input, .auth-fields input, select, textarea, input[type="text"], input[type="email"], input[type="password"], input[type="search"]) { background: var(--adventure-paper); color: var(--adventure-ink); border-color: var(--adventure-outline); }
.adventure-site :is(.primary-action, .btn-primary, .button.primary, .button:not(.secondary), .feature-action-button, .checkout-button.primary) { background: #365c39; border-color: #2b482d; color: #fff9eb; box-shadow: none; }
.adventure-site :is(.primary-action, .btn-primary, .button.primary, .button:not(.secondary), .feature-action-button):hover:not(:disabled) { background: #29492c; color: #fff9eb; box-shadow: none; }
.adventure-site :is(.secondary-action, .button.secondary, .btn-secondary) { background: var(--adventure-soft); color: var(--adventure-ink); border-color: var(--adventure-outline); box-shadow: none; }
.adventure-site :is(.news-content, .learning-page-content, .panel) :is(button, input, select, textarea):focus-visible { outline-color: var(--adventure-leaf); }
/* HSK badges and filters use warm gold accents and capsule geometry. */
.adventure-site .crp-level-options .crp-level-choice:not([aria-pressed="true"]),
.adventure-site :is(.news-hsk, .hsk-reading-level-badge, .story-reader-tooltip-hsk) { color: var(--adventure-hsk-text); }
@media (max-width: 820px) {
    .adventure-site .learning-rail { display: grid; }
    .adventure-site .learning-rail .learning-nav-label { font-size: 10px; }
    .adventure-site .learning-nav-link { min-width: 0; margin: 0; }
    .adventure-site :is(.hero, .blog-hero, .premium-hero) { padding: 20px; }
}
.adventure-site .learning-dashboard-top:not(.story-reader-page-header) { background: var(--adventure-heading-background); border: 0; outline: 0; box-shadow: none; border-radius: 16px; padding: 20px; margin-bottom: 24px; }
.adventure-site .news-archive-panel h2 { background: var(--adventure-soft); color: var(--adventure-forest); border-radius: 10px; }
.adventure-site :is(.news-related-label, .news-replay, .news-image-dialog .news-grammar-body a) { color: var(--adventure-forest); border-color: var(--adventure-outline); }
.adventure-site .news-archive-panel nav a[aria-current="page"], .adventure-site .news-sections a[aria-current="page"] { background: var(--adventure-soft); color: var(--adventure-forest); }
.adventure-site :is(.news-study-guide button, .news-quiz-submit) { background: #365c39; border-color: #2b482d; color: #fff9eb; }
.adventure-site .settings-section-icon { background: var(--adventure-soft); color: var(--adventure-forest); border-color: var(--adventure-outline); }
.adventure-site.account-page .account-shell .panel { box-shadow: none; }
.adventure-site .article-title-link { background: var(--adventure-paper); border-color: var(--adventure-outline); box-shadow: none; }
.adventure-site .article-title-link:hover { background: var(--adventure-soft); box-shadow: none; }
html:not(.crp-native) .adventure-site [data-blog-article-menu] .article-title-link {
    background: #fff;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
}
html:not(.crp-native) .adventure-site [data-blog-article-menu] .article-cta {
    grid-column: 2;
    justify-self: start;
    align-self: end;
    background: var(--adventure-gold, #e7ba59);
}
@media (min-width: 821px) {
    html:not(.crp-native) .adventure-site [data-blog-article-menu] .article-cta {
        width: 70px;
    }
}
.adventure-site .article-index { background: #365c39; }
.adventure-site .article-cta { background: var(--adventure-soft); color: var(--adventure-forest); border-color: var(--adventure-outline); box-shadow: none; }
.adventure-site[data-learning-page="letters"] .letters-mode-tabs .letters-mode-button.is-active { background: #365c39; border-color: #365c39; color: #fff9eb; }
.adventure-site .practice-pinyin-toggle input:checked { background: #365c39; border-color: #365c39; }
.adventure-site .practice-pinyin-options button[aria-pressed="true"] { box-shadow: inset 0 -3px var(--adventure-leaf); }
.adventure-site .letters-listening-symbol circle { fill: var(--adventure-soft); }
.adventure-site .letters-listening-symbol rect { fill: var(--adventure-forest); }
.adventure-site:has(.reminder-shell) { min-width: 0; }
.adventure-site .reminder-panel { background: var(--adventure-paper); border-color: var(--adventure-outline); box-shadow: none; }
.adventure-site .reminder-primary { background: #365c39; border-color: #2b482d; color: #fff9eb; }
.adventure-site .reminder-header img { box-shadow: none; }
body.adventure-site { background: var(--adventure-page) !important; }
body.adventure-site > main .site-page-banner .site-page-banner-context { color: var(--adventure-forest); }
.adventure-site .reading-reader-toolbar { background: var(--adventure-soft); color: var(--adventure-ink); }
.adventure-site .crp-analytics-choice { background: var(--adventure-paper); border-color: var(--adventure-outline); color: var(--adventure-ink); box-shadow: none; }
.adventure-site .crp-analytics-choice button[data-choice] { border-color: var(--adventure-outline); }
.adventure-site .crp-analytics-choice button[data-choice="yes"] { background: #365c39; border-color: #2b482d; color: #fff9eb; }
.adventure-site .crp-analytics-choice button[data-choice="no"] { background: var(--adventure-paper); color: var(--adventure-forest); }
.adventure-site .hsk-flashcard-level { background: var(--crp-hsk-tint); border-color: var(--crp-hsk-border); color: var(--crp-hsk-text); }
.adventure-site .crp-level-picker-label { color: var(--crp-hsk-text); }

/* Guest sign-in remains readable against its forest action background. */
.adventure-site .exercise-account-cover a { color: #fff9eb !important; }

/* Writing uses the same solid primary action as the other practice modes. */
.adventure-site .write-primary-button { background: #365c39; border-color: #2b482d; color: #fff9eb; box-shadow: none; }
.adventure-site .write-primary-button:hover:not(:disabled) { background: #29492c; }

.adventure-site .write-primary-button::after { content: none !important; display: none; background: none; }

/* Native News cards match the white Stories catalogue cards. */
html.news-native .news-content .news-card{background:#fff!important}

/* Match the native Stories titles and keep outlined exercise panels white. */
.adventure-site .news-card :is(h2,h3,.news-card-english),html.news-native .news-card :is(h2,h3,.news-card-english){color:#000!important}
html.crp-native .course-map{background:#fff!important}

/* White study surfaces keep Exercises and every Practice activity consistent. */
body.adventure-site .practice-view :is(.practice, .exercise-shell) { background: #fff !important; }
body.adventure-site[data-learning-page="practice"],
body.adventure-site:is([data-learning-page="listen"], [data-learning-page="write"], [data-learning-page="letters"], [data-learning-page="flashcards"]) {
    --adventure-paper: #fff;
    --theme-surface: #fff;
    --surface: #fff;
    --crp-bg-ffffff: #fff;
}
body.adventure-site:is([data-learning-page="practice"], [data-learning-page="listen"], [data-learning-page="write"], [data-learning-page="letters"], [data-learning-page="flashcards"]) :is(.learning-page-content, .learning-card, .practice-menu-card, .hsk-flashcard-game, .hsk-flashcard-card) { background: #fff !important; }

body.adventure-site:is([data-learning-page="listen"], [data-learning-page="write"], [data-learning-page="letters"], [data-learning-page="flashcards"]) :is(.write-drill-shell, .write-canvas-shell, .write-canvas-wrap, .write-toolbar, .letters-drill-shell, .practice-stage) { background: #fff !important; }
body.adventure-site .practice-view .exercise-shell #choices button.choice:not(.selected):not(.correct):not(.incorrect) { background: #fff; }

/* Copy Listening's solid action colors across study Check controls. */
body.adventure-site :is(#checkButton, #practiceNextButton, #writeCheckButton, #writeNextButton, #lettersNextButton) {
    height: 48px !important; min-height: 48px !important; box-sizing: border-box;
    border: 1px solid #16a34a; border-radius: 13px;
    background: #16a34a; background-image: none; color: #fff;
    box-shadow: none; animation: none;
}
body.adventure-site :is(#checkButton, #practiceNextButton, #writeCheckButton, #writeNextButton, #lettersNextButton):disabled {
    border-color: #cbd5e1; background: #e5e7eb; color: #677058;
    opacity: 1; box-shadow: none; animation: none;
}
body.adventure-site :is(#checkButton, #practiceNextButton, #writeCheckButton, #writeNextButton, #lettersNextButton)::after { display: none; }
body.adventure-site :is(#checkButton, #practiceNextButton, #writeCheckButton, #writeNextButton, #lettersNextButton):hover:not(:disabled) { background: #15803d; border-color: #15803d; color: #fff; }

/* Progress always uses green, including empty tracks and completed goals. */
html body :is(.lesson-progress-track, .practice-lesson-progress-track, .write-exercise-progress-track, .letters-lesson-progress-track, .hsk-flashcard-progress-track, .hsk-reading-story-progress-track, .achievement-progress-track, .daily-goal-track, .story-reader-word-goal-track, .story-quiz-progress) {
    background: #dcfce7 !important; background-image: none !important; border-color: #86efac !important;
}
html body :is(.lesson-progress-fill, .practice-lesson-progress-fill, .write-exercise-progress-fill, .letters-lesson-progress-fill, .hsk-flashcard-progress-fill, .hsk-reading-story-progress-fill, .achievement-progress-fill, .daily-goal-fill, .story-reader-word-goal-fill, .story-quiz-progress-fill) {
    background: #16a34a !important; background-image: none !important; border-color: #16a34a !important;
}
html body progress { accent-color: #16a34a !important; }
html body progress::-webkit-progress-bar { background: #dcfce7 !important; }
html body progress::-webkit-progress-value { background: #16a34a !important; }
html body progress::-moz-progress-bar { background: #16a34a !important; }

/* Keep the whole exercise, including progress and reporting, inside its grey outline. */
body.adventure-site .practice-view > .practice { border: 1px solid #cbd5e1 !important; }

/* Section headers use the Achievements typeface at two-thirds of its original size. */
body.adventure-site > main .site-page-banner[data-section-heading] {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: none;
    margin: 0 0 24px;
    padding: 20px;
    border: 0;
    outline: 0;
    box-shadow: none;
    border-radius: 16px;
    background: var(--adventure-heading-background);
    text-align: left;
}
body.adventure-site > main .site-page-banner[data-section-heading] h1 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .15em .45em;
    margin: 0;
    color: var(--adventure-forest);
    font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
    font-size: clamp(22.6667px, 3.333333vw, 38.6667px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: normal;
    text-decoration: none;
    border: 0;
    overflow-wrap: anywhere;
}
body.adventure-site > main .site-page-banner[data-section-heading] h1 > span {
    min-width: 0;
    max-width: 100%;
    font: inherit;
    letter-spacing: inherit;
}
body.adventure-site > main .site-page-banner[data-section-heading]::after,
body.adventure-site > main .site-page-banner[data-section-heading] h1::after {
    content: none;
}
