/* Companion to homepage.css: shared presentation for the existing application pages.
   No selectors change visibility, routing, storage or learning state. */
body[data-page]:not([data-page="home"]) { background:#faf9f6; }
body[data-page]:not([data-page="home"]) :is(.dashboard-main,.games-main,.account-layout) {
  --canvas:#faf9f6; --surface:#fff; --surface-raised:#f1f5f4;
  --text:#0f172a; --copy:#485662; --edge:#d8e1dc; --accent:#18664d;
  --action:#18664d; --action-text:#fff; --ink:var(--text); --muted:var(--copy);
  --paper:var(--canvas); --line:var(--edge); --green:var(--accent);
  color:var(--text); color-scheme:light;
}
/* The section rhythm stays consistent with the homepage in both themes.
   Shared dialogs still inherit the saved light/dark theme from the root. */
body[data-page]:not([data-page="home"]) :is(.site-header,.site-footer,.dashboard-hero,.module-intro,.arcade-intro,.account-story,.next-card) {
  --text:#f9faf7; --copy:#c1cece; --accent:#8cddb1; --edge:#35504e;
  --surface:#102d32; --surface-raised:#19383b; --action:#f3cf78; --action-text:#061923;
  --ink:var(--text); --muted:var(--copy); --green:var(--accent);
  background:#061923; color:var(--text); color-scheme:dark;
}
body[data-page]:not([data-page="home"]) :is(h1,h2,h3) { font-weight:750; letter-spacing:-.04em; }
body[data-page]:not([data-page="home"]) .eyebrow { font-size:10px; font-weight:800; letter-spacing:2px; }
body[data-page]:not([data-page="home"]) :is(.dashboard-hero,.module-intro,.arcade-intro,.account-story,.next-card) .eyebrow { color:#f3cf78; }
body[data-page]:not([data-page="home"]) .button { border-radius:999px; font-size:12px; font-weight:750; min-height:46px; padding:12px 22px; }
body[data-page]:not([data-page="home"]) .button.secondary { background:transparent; color:var(--text); border-color:var(--edge); }
body[data-page]:not([data-page="home"]) :is(.dashboard-main,.games-main,.account-layout) :is(input,select) { border-radius:9px; }
body[data-page]:not([data-page="home"]) :is(.dashboard-main,.games-main,.account-layout) :is(a,button,input,select,summary):focus-visible { outline:3px solid #96701e; outline-offset:4px; }
body[data-page]:not([data-page="home"]) .header-inner { min-height:78px; gap:22px; width:min(1400px,calc(100% - 48px)); }
body[data-page]:not([data-page="home"]) .site-header .brand { font-size:21px; }
body[data-page]:not([data-page="home"]) .brand-mark { background:#22c55e; color:#061923; }
body[data-page]:not([data-page="home"]) .brand-dot { color:#22c55e; }
body[data-page]:not([data-page="home"]) .top-nav { gap:15px; }
body[data-page]:not([data-page="home"]) .top-nav a { font-size:11px; }
body[data-page]:not([data-page="home"]) .top-nav a[aria-current] { color:#f3cf78; }
body[data-page]:not([data-page="home"]) .top-nav a::after { background:#f3cf78; }
body[data-page]:not([data-page="home"]) .header-preferences { gap:10px; }
body[data-page]:not([data-page="home"]) .site-header select { color:var(--text); }
body[data-page]:not([data-page="home"]) .navigation-panel { background:#061923; }
body[data-page]:not([data-page="home"]) .site-footer .footer-legal { background:#04131b; }
body[data-page]:not([data-page="home"]) .dashboard-main { max-width:1280px; padding-top:42px; }
body[data-page]:not([data-page="home"]) .dashboard-main.lesson-main { max-width:1000px; }
body[data-page]:not([data-page="home"]) .dashboard-main.certificate-main { max-width:1180px; }
body[data-page]:not([data-page="home"]) .welcome { margin-bottom:26px; padding:30px; border-radius:18px; background:#d0eadb; border:1px solid #b0d6be; }
body[data-page]:not([data-page="home"]) .welcome h1 { font-size:clamp(30px,3.5vw,44px); }
body[data-page]:not([data-page="home"]) .dashboard-hero { border:0; border-radius:20px; overflow:hidden; }
body[data-page]:not([data-page="home"]) .dashboard-hero h2 { font-size:clamp(28px,3vw,40px); }
body[data-page]:not([data-page="home"]) .dashboard-hero img { filter:none; }
body[data-page]:not([data-page="home"]) .dashboard-hero .hero-actions .button { background:#f3cf78; color:#061923; border-color:#f3cf78; }
body[data-page]:not([data-page="home"]) .dashboard-section-nav { display:flex; flex-wrap:wrap; gap:8px; margin:25px 0; padding:14px 0; border-block:1px solid var(--edge); }
body[data-page]:not([data-page="home"]) .dashboard-section-nav a { padding:9px 15px; border:1px solid var(--edge); border-radius:999px; font-size:12px; color:var(--accent); background:#fff; text-decoration:none; }
body[data-page]:not([data-page="home"]) .dashboard-section-nav a:hover { background:#e7efe7; }
body[data-page]:not([data-page="home"]) :is(#progress,#practice,#tools,#certificates) { scroll-margin-top:100px; }
body[data-page]:not([data-page="home"]) .progress-overview { --text:#fff; --copy:#d4e9dc; --accent:#c0ebcf; padding:30px; background:#14543d; color:white; border:1px solid #14543d; border-radius:18px; }
body[data-page]:not([data-page="home"]) .stat-grid > .metric-card { background:#e1f1e7; border:1px solid #d8e1dc; border-radius:12px; color:#0f172a; box-shadow:none; }
body[data-page]:not([data-page="home"]) .metric-card :is(strong,small) { color:#174b39; }
body[data-page]:not([data-page="home"]) .metric-card > span { color:#485662; }
body[data-page]:not([data-page="home"]) .level-pill { background:#e1ece3; color:#18664d; border-color:#c7daca; }
body[data-page]:not([data-page="home"]) .path-panel { background:transparent; border-color:#d8e1dc; }
body[data-page]:not([data-page="home"]) .path-steps a { background:#fff; color:#18664d; border-color:#c7daca; }
body[data-page]:not([data-page="home"]) .path-steps a.done { background:#18664d; color:white; }
body[data-page]:not([data-page="home"]) .learning-card { --module-bg:#d6eddf; --module-ink:#174b39; background:var(--module-bg); color:#0f172a; border:1px solid #d8e1dc; border-radius:15px; box-shadow:none; }
body[data-page]:not([data-page="home"]) .learning-card.featured { background:var(--module-bg); border-color:var(--module-ink); box-shadow:inset 0 5px var(--module-ink); }
body[data-page]:not([data-page="home"]) .learning-card:is(.is-active,.is-complete) { background:var(--module-bg); border-color:var(--module-ink); }
body[data-page]:not([data-page="home"]) .learning-card:hover { background:var(--module-bg); border-color:var(--module-ink); box-shadow:0 8px 22px #123a2814; }
body[data-page]:not([data-page="home"]) .learning-card :is(h3,.module-index,.module-card-progress strong) { color:#0f172a; }
body[data-page]:not([data-page="home"]) .learning-card :is(p,.module-meta,.module-card-progress) { color:#485662; }
body[data-page]:not([data-page="home"]) .learning-card :is(.status,.module-number) { background:transparent; color:#18664d; }
body[data-page]:not([data-page="home"]) .learning-card.featured :is(.module-card-content p,.module-meta,.module-card-progress > div,.module-index) { color:#485662; }
body[data-page]:not([data-page="home"]) .learning-card .card-navigation { background:var(--module-ink); border-color:var(--module-ink); color:white; border-radius:999px; padding:12px 20px; }
body[data-page]:not([data-page="home"]) :is(.next-card,.goal-card,.practice-card,.planned-card,.panel,.certificate-mini,.money-card) { border-radius:16px; box-shadow:none; }
body[data-page]:not([data-page="home"]) .next-card .button { background:#f3cf78; border-color:#f3cf78; color:#061923; }
body[data-page]:not([data-page="home"]) .goal-card { background:#cce7d4; }
body[data-page]:not([data-page="home"]) .practice-section { padding:30px; background:#d0eadb; border:1px solid #b0d6be; border-radius:18px; }
body[data-page]:not([data-page="home"]) .practice-card { background:#fff; }
body[data-page]:not([data-page="home"]) .tools-section { --text:#fff; --copy:#d4e9dc; --accent:#c0ebcf; padding:30px; background:#123e35; color:#fff; border-radius:18px; }
body[data-page]:not([data-page="home"]) .tool-card.premium-card { --text:#0f172a; --copy:#354d49; --accent:#18664d; background:#d6eddf; color:#0f172a; border:1px solid #d8e1dc; border-radius:15px; }
body[data-page]:not([data-page="home"]) .tool-card.premium-card:nth-child(2) { background:#d9e9f5; }
body[data-page]:not([data-page="home"]) .tool-card.premium-card:nth-child(3) { background:#f3dfbd; }
body[data-page]:not([data-page="home"]) .tool-card.premium-card:nth-child(4) { background:#e6def2; }
body[data-page]:not([data-page="home"]) .tool-card.premium-card:nth-child(5) { background:#cce9e5; }
body[data-page]:not([data-page="home"]) .tool-card.premium-card :is(p,.card-index,.availability) { color:#485662; }
body[data-page]:not([data-page="home"]) .tool-card.premium-card .line-icon { color:#18664d; }
body[data-page]:not([data-page="home"]) .tool-card.premium-card:hover { border-color:#76a68c; box-shadow:0 9px 22px #0002; }
body[data-page]:not([data-page="home"]) .certificate-mini { background:#fffaf0; border:1px solid #d9cbaa; }
body[data-page]:not([data-page="home"]) .certificate-mini.is-earned { background:#d6eddf; border-color:#7aa58b; }
body[data-page]:not([data-page="home"]) progress,body[data-page]:not([data-page="home"]) progress::-webkit-progress-bar { background:#dce6df; border-radius:6px; }
body[data-page]:not([data-page="home"]) progress::-webkit-progress-value { background:#238450; border-radius:6px; }
body[data-page]:not([data-page="home"]) progress::-moz-progress-bar { background:#238450; }
body[data-page]:not([data-page="home"]) .module-intro { background:#14543d; border-radius:18px; padding:35px; border:0; }
body[data-page]:not([data-page="home"]) .module-intro h1 { font-size:clamp(32px,4vw,48px); }
body[data-page]:not([data-page="home"]) .module-intro :is(p,li,.module-progress-label) { color:#c1cece; }
body[data-page]:not([data-page="home"]) .panel { background:#fff; border-color:#d8e1dc; }
body[data-page]:not([data-page="home"]) .lesson-navigation a { border-radius:999px; font-size:12px; }
body[data-page]:not([data-page="home"]) .real-example { background:#f5f0e3; border-left-color:#b99542; border-radius:0 12px 12px 0; }
body[data-page]:not([data-page="home"]) .real-example :is(h3,p) { color:#61502e; }
body[data-page]:not([data-page="home"]) .takeaway { background:#e7efe7; border-radius:12px; }
body[data-page]:not([data-page="home"]) .takeaway :is(strong,p) { color:#24563d; }
body[data-page]:not([data-page="home"]) .flashcard { background:#cce7d4; border-radius:14px; color:#0f172a; }
body[data-page]:not([data-page="home"]) .flashcard[aria-pressed="true"] { background:#f5f0e3; }
body[data-page]:not([data-page="home"]) .test-result { background:#f5f0e3; color:#0f172a; }
body[data-page]:not([data-page="home"]) :is(.test-result.pass,.earned-banner) { background:#e7efe7; color:#174b39; border-color:#aac7b1; }
body[data-page]:not([data-page="home"]) :is(.error,.field-error,.check-feedback.incorrect) { color:#a32e29; }
body[data-page]:not([data-page="home"]) dialog :is(.error,.field-error) { color:var(--text); }
body[data-page]:not([data-page="home"]) .account-layout { gap:40px; align-items:stretch; }
body[data-page]:not([data-page="home"]) .account-story { background:#14543d; position:relative; top:auto; padding:40px; border-radius:20px; overflow:hidden; }
body[data-page]:not([data-page="home"]) .account-story h1 { color:white; }
body[data-page]:not([data-page="home"]) .account-story-art { opacity:.8; filter:none; }
body[data-page]:not([data-page="home"]) .account-card { background:white; border-color:#d8e1dc; box-shadow:0 12px 35px #06192308; }
body[data-page]:not([data-page="home"]) .account-notice { background:#f1f5f4; border-color:#18664d; }
body[data-page]:not([data-page="home"]) .arcade-intro { background:#14543d; padding:40px; border-radius:20px; border:0; }
body[data-page]:not([data-page="home"]) .arcade-intro h1 { font-weight:800; }
body[data-page]:not([data-page="home"]) .arcade-emblem { background:#12362e; border-color:#3c6954; color:#8cddb1; }
body[data-page]:not([data-page="home"]) .game-tile { background:#d6eddf; border-color:#d8e1dc; border-radius:16px; }
body[data-page]:not([data-page="home"]) .game-art { background:#a9d6bb; color:#18664d; }
body[data-page]:not([data-page="home"]) .sorting-art { background:#e9cb94; }
body[data-page]:not([data-page="home"]) .scam-art { background:#b5d6e9; }
body[data-page]:not([data-page="home"]) .game-panel { background:#fff; }
body[data-page]:not([data-page="home"]) .certificate-paper { border-color:#b8a56f; box-shadow:0 15px 40px #0619230c; }

/* Color belongs to the whole section/card, not just a small decorative marker. */
body[data-page]:not([data-page="home"]) .learning-card:nth-child(5n + 2) { --module-bg:#d9e9f5; --module-ink:#245572; }
body[data-page]:not([data-page="home"]) .learning-card:nth-child(5n + 3) { --module-bg:#f3dfbd; --module-ink:#755021; }
body[data-page]:not([data-page="home"]) .learning-card:nth-child(5n + 4) { --module-bg:#e6def2; --module-ink:#5f477d; }
body[data-page]:not([data-page="home"]) .learning-card:nth-child(5n + 5) { --module-bg:#cce9e5; --module-ink:#225e59; }
body[data-page]:not([data-page="home"]) .learning-card :is(.module-index,.module-number) { color:var(--module-ink); }
body[data-page]:not([data-page="home"]) .progress-overview :is(h2,.overall-progress-label,.overall-progress-label strong) { color:#fff; }
body[data-page]:not([data-page="home"]) .progress-overview .metric-card:nth-child(2) { background:#f3dfbd; }
body[data-page]:not([data-page="home"]) .progress-overview .metric-card:nth-child(3) { background:#d9e9f5; }
body[data-page]:not([data-page="home"]) .progress-overview .metric-card:nth-child(4) { background:#e6def2; }
body[data-page]:not([data-page="home"]) .progress-overview .metric-card .line-icon { color:#24563d; }
body[data-page]:not([data-page="home"]) .progress-overview .level-pill { background:#d6eddf; color:#174b39; }
body[data-page]:not([data-page="home"]) .tools-section > .section-heading :is(h2,p) { color:#f0f7f2; }
body[data-page]:not([data-page="home"]) .tools-section > .section-heading .eyebrow { color:#f3cf78; }
body[data-page]:not([data-page="home"]) #certificates.dashboard-section { padding:30px; border:1px solid #e3d3ae; border-radius:18px; background:#f2e6cb; }
body[data-page]:not([data-page="home"]) .practice-card:nth-child(2) { background:#e0eee6; }
body[data-page]:not([data-page="home"]) .objectives.panel { background:#d6eddf; border-color:#a9d0b7; }
body[data-page]:not([data-page="home"]) .lesson.panel:nth-child(2) { background:#e7f0f7; border-color:#bdd2e0; }
body[data-page]:not([data-page="home"]) .lesson.panel:nth-child(3) { background:#f6efdf; border-color:#e0d3b4; }
body[data-page]:not([data-page="home"]) #flashcards.panel { background:#d6eddf; border-color:#a9d0b7; }
body[data-page]:not([data-page="home"]) #assessment.panel { background:#e6def2; border-color:#cbbbdc; }
body[data-page]:not([data-page="home"]) .answer-option { background:#ffffffc9; }
body[data-page]:not([data-page="home"]) .game-tile:nth-child(2) { background:#f3dfbd; }
body[data-page]:not([data-page="home"]) .game-tile:nth-child(3) { background:#d9e9f5; }
body[data-page]:not([data-page="home"]) .plan-card { background:#d6eddf; border-color:#a9d0b7; }
@media(max-width:600px) {
 body[data-page]:not([data-page="home"]) .welcome { padding:22px; }
 body[data-page]:not([data-page="home"]) #certificates.dashboard-section { padding:18px; }
}

@media (max-width:1199px) {
 body[data-page]:not([data-page="home"]) .top-nav a { font-size:14px; }
}
@media (max-width:700px) {
 body[data-page]:not([data-page="home"]) .account-layout { gap:25px; }
 body[data-page]:not([data-page="home"]) :is(.account-story,.arcade-intro) { padding:27px; }
 body[data-page]:not([data-page="home"]) .account-story { margin-bottom:25px; }
}
@media (max-width:600px) {
 body[data-page]:not([data-page="home"]) .header-inner { width:calc(100% - 36px); min-height:68px; }
 body[data-page]:not([data-page="home"]) .dashboard-main { padding:30px 20px 45px; }
 body[data-page]:not([data-page="home"]) :is(.progress-overview,.practice-section,.tools-section) { padding:18px; }
 body[data-page]:not([data-page="home"]) .module-intro { padding:25px; }
 body[data-page]:not([data-page="home"]) .dashboard-section-nav { gap:6px; }
 body[data-page]:not([data-page="home"]) .dashboard-section-nav a { padding:8px 11px; font-size:11px; }
 body[data-page]:not([data-page="home"]) .button { padding:11px 16px; }
}
@media print {
 body[data-page="certificate"] { background:white; }
 body[data-page="certificate"] .certificate-paper { box-shadow:none; }
}

/* Dedicated destinations render only their own content. */
body[data-page="dashboard"][data-view] .focused-heading { margin-bottom:30px; }
body[data-view] .dashboard-section:first-of-type { margin-top:0; }
body[data-view="progress"] .progress-overview { margin-top:0; }
body[data-view="progress"] .progress-breakdown { margin-top:28px; }
.progress-rows { display:grid; gap:0; }
.progress-row { display:grid; grid-template-columns:1.2fr 1fr 48px; align-items:center; gap:24px; padding:20px 0; border-bottom:1px solid var(--edge); text-decoration:none; color:var(--text); }
.progress-row:last-child { border-bottom:0; }
.progress-row small { display:block; color:var(--copy); margin-top:6px; font-size:11px; }
.progress-row progress { width:100%; height:9px; margin:0; }
.progress-row strong { font-size:13px; text-align:right; }
body[data-view="coach"] #main { padding-bottom:0; }
body[data-view="coach"] .ai-workspace { padding-top:0; }
body[data-page="about"] .about-main { max-width:1180px; margin-inline:auto; }
body[data-page="about"] .about-hero,body[data-page="about"] .about-ai.panel {
 --text:#fff; --copy:#d4e9dc; --accent:#b5e6c5; --action:#f3cf78; --action-text:#061923;
 background:#14543d; color:#fff; border-radius:20px; padding:42px;
}
body[data-page="about"] .about-hero h1 { font-size:clamp(34px,4.5vw,56px); line-height:1.1; max-width:760px; }
body[data-page="about"] .about-hero p { max-width:800px; line-height:1.85; }
body[data-page="about"] .about-hero .eyebrow { color:#f3cf78; }
body[data-page="about"] .about-hero .button { margin-top:15px; }
body[data-page="about"] .panel { margin-top:28px; line-height:1.85; }
body[data-page="about"] .panel h2 { line-height:1.3; font-size:26px; }
body[data-page="about"] .about-learn.panel { background:#d6eddf; }
body[data-page="about"] .about-steps.panel { background:#f3dfbd; }
body[data-page="about"] .about-steps li { padding:8px 0 8px 10px; }
body[data-page="about"] .about-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
body[data-page="about"] .about-grid .panel:first-child { background:#d9e9f5; }
body[data-page="about"] .about-grid .panel:last-child { background:#e6def2; }
body[data-page="about"] .about-storage.panel { background:#f1f5f4; }
body[data-page="about"] .about-faq summary { cursor:pointer; padding:18px 0; font-weight:750; }
body[data-page="about"] .about-faq details+details { border-top:1px solid var(--edge); }
@media(max-width:600px) {
 .progress-row { grid-template-columns:1fr 48px; gap:12px; }
 .progress-row progress { grid-column:1; grid-row:2; }
 .progress-row strong { grid-column:2; grid-row:2; }
 body[data-page="about"] :is(.about-hero,.about-ai.panel) { padding:26px; }
 body[data-page="about"] .about-grid { grid-template-columns:1fr; gap:0; }
}

/* Learning discovery uses the existing module cards and progress state. */
body[data-view="modules"] .expanded-columns { grid-template-columns:minmax(0,1fr); }
body[data-view="modules"] .module-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
body[data-view="modules"] .learning-card { min-height:350px; padding:25px; }
body[data-view="modules"] .learning-card h3 { font-size:25px; }
body[data-view="modules"] .learning-card .card-top { margin-bottom:20px; }
body[data-view="modules"] .learning-card .module-index { font-size:25px; }
body[data-view="modules"] .learning-card .card-arrow { width:27px; height:27px; }
body[data-view="modules"] .learning-aside { display:grid; grid-template-columns:1fr 1fr; gap:22px; }
body[data-view="modules"] .learning-aside .tip-card { grid-column:1 / -1; }
body[data-view="modules"] .learning-aside .next-card { margin:0; }
body[data-view="modules"] .module-discovery { margin:22px 0; }
body[data-view="modules"] .module-discovery label { display:block; font-size:13px; font-weight:700; margin-bottom:10px; }
body[data-view="modules"] #module-search { display:block; max-width:560px; width:100%; min-height:48px; padding:12px 16px; border:1px solid #a5bdae; background:#fff; color:#0f172a; font-size:15px; }
body[data-view="modules"] .module-filters { display:flex; flex-wrap:wrap; gap:8px; margin:17px 0 12px; }
body[data-view="modules"] .module-filters button { padding:9px 17px; min-height:42px; border:1px solid #bfd2c6; background:#fff; color:#215a42; border-radius:999px; font-size:12px; }
body[data-view="modules"] .module-filters button[aria-pressed="true"] { background:#14543d; border-color:#14543d; color:#fff; }
body[data-view="modules"] #module-match-count { font-size:12px; margin:12px 0 0; }
body[data-view="modules"] :is(.module-card,.module-empty)[hidden] { display:none !important; }
body[data-view="modules"] .module-empty { background:#f1f5f4; }
body[data-page="dashboard"][data-view] .focused-heading { background:transparent; padding:0 0 28px; border:0; border-bottom:1px solid #d0ddd5; border-radius:0; }
body[data-page="dashboard"][data-view] .focused-heading h1 { margin:12px 0; font-size:clamp(32px,4vw,48px); }
body[data-page="dashboard"][data-view] .focused-heading p:last-child { max-width:650px; line-height:1.8; margin:0; }
body[data-view="tools"] .tool-card.premium-card { min-height:320px; padding:27px; }
body[data-view="tools"] .tool-card.premium-card h3 { font-size:27px; margin-top:25px; }
body[data-view="tools"] .tool-card .premium-card-bottom { border-top-color:#789c8638; }
body[data-view="tools"] .tool-card .card-arrow { width:30px; height:30px; }
body[data-view="coach"] .money-card { box-shadow:0 8px 25px #06192306; }
body[data-view="coach"] .money-card h2 { font-size:29px; }
@media(max-width:1000px) {
 body[data-view="modules"] .module-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
 body[data-view="modules"] .module-grid { grid-template-columns:1fr; }
 body[data-view="modules"] .learning-aside { grid-template-columns:1fr; }
 body[data-view="modules"] .learning-card { min-height:320px; }
 body[data-view="modules"] .module-filters { gap:7px; }
 body[data-view="modules"] .module-filters button { padding:9px 12px; font-size:11px; }
}
