html[data-style="editorial"] {
  color-scheme: light;
  --paper: #ffffff; --ink: #222529; --muted: #555d63; --line: #d8dadc;
  --accent: #9c4b26; --accent-hover: #793414; --pale: #f6ede7; --surface: #f7f8f8;
  --button: #222529; --button-text: #ffffff; --navy: #222529; --error: #ab3535;
  --sans: 'Noto Sans TC', 'PingFang TC', sans-serif;
  --tool-accent: #f1c5a8;
}
html[data-style="calm"] {
  color-scheme: light;
  --paper: #eef5f1; --ink: #183c33; --muted: #4b655e; --line: #d1e1d9;
  --accent: #14644e; --accent-hover: #0c503d; --pale: #e0efe7; --surface: #ffffff;
  --button: #14644e; --button-text: #ffffff; --navy: #143f34; --error: #ab3535;
  --sans: 'Noto Sans TC', 'PingFang TC', sans-serif;
  --tool-accent: #b9e4d4;
}
@media (prefers-color-scheme: dark) {
  html[data-style="editorial"]:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #1b1d20; --ink: #f0f0ed; --muted: #c3c5c7; --line: #43464b;
    --accent: #edb28d; --accent-hover: #f5ccb3; --pale: #3b2d26; --surface: #25282c;
    --button: #edb28d; --button-text: #211a17; --navy: #121416; --error: #ffadad;
  }
  html[data-style="calm"]:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #132820; --ink: #e8f3eb; --muted: #b7cfc2; --line: #375346;
    --accent: #94d6b7; --accent-hover: #b0e6cc; --pale: #244337; --surface: #1b3429;
    --button: #94d6b7; --button-text: #132820; --navy: #0c241a; --error: #ffb0a9;
  }
}
html[data-style="editorial"][data-theme="dark"] {
  color-scheme: dark;
  --paper: #1b1d20; --ink: #f0f0ed; --muted: #c3c5c7; --line: #43464b;
  --accent: #edb28d; --accent-hover: #f5ccb3; --pale: #3b2d26; --surface: #25282c;
  --button: #edb28d; --button-text: #211a17; --navy: #121416; --error: #ffadad;
}
html[data-style="calm"][data-theme="dark"] {
  color-scheme: dark;
  --paper: #132820; --ink: #e8f3eb; --muted: #b7cfc2; --line: #375346;
  --accent: #94d6b7; --accent-hover: #b0e6cc; --pale: #244337; --surface: #1b3429;
  --button: #94d6b7; --button-text: #132820; --navy: #0c241a; --error: #ffb0a9;
}
html:is([data-style="editorial"], [data-style="calm"]) ::selection { background: var(--pale); color: var(--ink); }
html:is([data-style="editorial"], [data-style="calm"]) .brand-mark { background: var(--button); color: var(--button-text); }
html:is([data-style="editorial"], [data-style="calm"]) .tool-card .eyebrow { color: var(--tool-accent); }
html:is([data-style="editorial"], [data-style="calm"]) .tool-card > p { color: #e4e9e7; }
html:is([data-style="editorial"], [data-style="calm"]) .tool-card > .tool-note { color: #cbd6d1; }
html:is([data-style="editorial"], [data-style="calm"]) .tool-symbol { color: var(--tool-accent); }
html:is([data-style="editorial"], [data-style="calm"]) .retirement-copy .tool-symbol { color: var(--accent); }
html:is([data-style="editorial"], [data-style="calm"]) .button.light { color: var(--navy); }
html:is([data-style="editorial"], [data-style="calm"]) .button.light:hover { background: #ecf0ef; border-color: #ecf0ef; }

html[data-style="editorial"] :is(h1, h2, h3) { font-family: 'Noto Serif TC', 'Songti TC', serif; font-weight: 600; }
html[data-style="editorial"] .brand-mark { border-radius: 0; }
html[data-style="editorial"] .site-navigation { border-top: 2px solid var(--ink); }
html[data-style="editorial"] #main-nav > a { border-radius: 0; border-bottom: 3px solid transparent; }
html[data-style="editorial"] #main-nav > a[aria-current] { background: transparent; color: var(--accent); border-bottom-color: var(--accent); }
html[data-style="editorial"] .opening { padding-block: 32px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
html[data-style="editorial"] .opening h1 { letter-spacing: .02em; }
html[data-style="editorial"] :is(.lead-visual, .story-visual, .article-cover img, .tool-card, .retirement-feature, .calculator-form, .calculator-results, .button, .filter-button) { border-radius: 0; }
html[data-style="editorial"] .lead-copy { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
html[data-style="editorial"] .section-heading { border-bottom: 1px solid var(--ink); padding-bottom: 16px; }
html[data-style="editorial"] .story-card { padding-block: 28px; }
html[data-style="editorial"] .story-copy h3 { line-height: 1.65; }
html[data-style="editorial"] .takeaway { background: var(--surface); border-left-width: 2px; }
html[data-style="editorial"] .site-footer { border-top: 2px solid var(--ink); }

html[data-style="calm"] .site-navigation { background: var(--surface); }
html[data-style="calm"] #main-nav > a { border-radius: 24px; }
html[data-style="calm"] .brand-mark { border-radius: 12px; }
html[data-style="calm"] .opening { padding-block: 36px 28px; }
html[data-style="calm"] .opening h1 { font-weight: 600; line-height: 1.5; }
html[data-style="calm"] .lead-story { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
html[data-style="calm"] .lead-visual { border-radius: 0; }
html[data-style="calm"] .lead-copy { padding: 18px 22px 20px; }
html[data-style="calm"] .reader-sidebar { gap: 20px; }
html[data-style="calm"] .tool-card { border-radius: 20px; padding: 28px; }
html[data-style="calm"] .topic-directory { background: var(--surface); padding: 22px; border: 1px solid var(--line); border-radius: 20px; }
html[data-style="calm"] .topic-directory > a:last-child { border-bottom: 0; padding-bottom: 0; min-height: 44px; }
html[data-style="calm"] .section-heading { border-bottom: 1px solid var(--line); }
html[data-style="calm"] .story-grid { gap: 20px; margin-top: 20px; }
html[data-style="calm"] .story-card { grid-template-columns: 72px minmax(0, 1fr); gap: 0 14px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
html[data-style="calm"] .story-visual { border-radius: 10px; }
html[data-style="calm"] .story-copy h3 { font-weight: 600; }
html[data-style="calm"] :is(.button, .filter-button, .field input, .field select) { border-radius: 10px; }
html[data-style="calm"] :is(.retirement-feature, .calculator-form, .calculator-results, .takeaway) { border-radius: 16px; }
html[data-style="calm"] .retirement-feature { background: var(--surface); }
html[data-style="calm"] .takeaway { border-left-width: 4px; }
html[data-style="calm"] .planning-links { border: 0; gap: 16px; }
html[data-style="calm"] .planning-links > a { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
html[data-style="calm"] .home-sections { gap: 48px; }

@media (min-width: 900px) {
  html[data-style="editorial"] .featured-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  html[data-style="editorial"] .lead-story { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: center; }
  html[data-style="editorial"] .lead-visual { max-height: none; aspect-ratio: 4 / 3; }
  html[data-style="editorial"] .lead-copy { padding-top: 0; border-bottom: 0; }
  html[data-style="editorial"] .lead-copy h2 { font-size: 32px; line-height: 1.6; }
  html[data-style="editorial"] .reader-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; align-items: start; }
  html[data-style="editorial"] .topic-directory > a { padding-block: 16px; }
  html[data-style="editorial"] .home-sections { gap: 56px; }
  html[data-style="calm"] .featured-layout { gap: 28px; }
  html[data-style="calm"] .lead-copy { padding: 22px 28px 24px; }
  html[data-style="calm"] .planning-links > a { padding: 24px; }
}
@media print {
  html:is([data-style="editorial"], [data-style="calm"]) { --paper: #fff; --ink: #000; --muted: #333; --surface: #fff; --pale: #f5f5f5; }
}
