/* Default palette remains usable if the selected theme cannot load. */
:root {
    --canvas: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8faff;
    --ink: #172033;
    --muted: #66758f;
    --line: #dce3ee;
    --border-strong: #b7c8e5;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: #eaf2ff;
    --accent-ink: #183763;
    --accent-light: #3b82f6;
    --selected: #dce9ff;
    --focus: #b8d5ff;
    --hero-surface: #edf4ff;
    --art-circle: #dbeafe;
    --art-border: #acc6eb;
    --art-line: #b2c9e9;
    --art-folder: #3979ed;
    --art-label: #c5ddff;
    --art-label-soft: #91bbff;
    --danger: #c93636;
    --shadow: 0 18px 46px rgba(31, 48, 76, 0.10);
}
:root { color-scheme: light; font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { color: var(--ink); background: var(--canvas); font-size: 16px; line-height: 1.6; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.public-shell { min-height: 100vh; display: flex; flex-direction: column; }
.public-header-inner, .public-main, .public-footer-inner { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.public-header { background: var(--surface); border-top: 5px solid var(--accent-light); border-bottom: 1px solid var(--line); }
.public-header-inner { min-height: 106px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; min-width: 0; }
.brand-logo { width: 68px; height: 60px; object-fit: contain; flex-shrink: 0; }
.brand-copy { display: grid; gap: 1px; }
.brand-name { font-size: clamp(1.1rem, 2.3vw, 1.45rem); font-weight: 700; letter-spacing: .04em; overflow-wrap: anywhere; }
.brand-abbreviation { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.public-login { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--accent); font-weight: 700; min-width: 88px; min-height: 44px; padding: 8px 22px; border: 1px solid var(--border-strong); border-radius: 6px; white-space: nowrap; }
.public-login:hover { background: var(--accent-soft); }
.public-main { flex: 1; padding-top: 38px; }
.home-banner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); align-items: center; background: var(--accent-soft); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.exam-illustration { padding: 24px 24px 24px 0; }
.exam-illustration img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: 10px; }
.banner-content { padding: 44px 12px 44px 40px; }
.banner-copy h1 { margin: 0 0 20px; font-size: clamp(1.7rem, 3.1vw, 2.4rem); line-height: 1.4; font-weight: 750; letter-spacing: .035em; }
.banner-copy p { max-width: 40em; margin: 0; color: var(--muted); line-height: 1.9; }
.banner-entry { margin-top: 26px; text-align: left; }
.home-action { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--accent); color: var(--surface); padding: 14px 23px; min-height: 52px; border-radius: 6px; text-decoration: none; font-weight: 700; white-space: nowrap; }
.home-action svg { width: 23px; height: 23px; }
.home-action:hover { background: var(--accent-hover); }
.banner-note { display: block; font-size: .8rem; margin-top: 12px; color: var(--muted); }
.home-announcements { margin: 40px 0 64px; }
.announcements-heading { display: flex; align-items: baseline; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.announcements-heading h2 { margin: 0; padding-left: 14px; border-left: 4px solid var(--accent-light); font-size: 1.35rem; line-height: 1.3; }
.announcements-heading p { margin: 0; font-size: .88rem; color: var(--muted); }
.announcements-empty { display: flex; justify-content: center; align-items: center; text-align: center; min-height: 160px; color: var(--muted); }
.announcements-empty h3 { font-weight: 600; font-size: 1rem; margin: 0 0 6px; color: var(--ink); }
.announcements-empty p { margin: 0; font-size: .9rem; }
.news-content { padding: 24px 0; max-width: 76ch; line-height: 1.9; overflow-wrap: anywhere; }
.news-content h3, .news-content h4, .news-content h5 { color: var(--ink); margin: 1.2em 0 .45em; line-height: 1.5; }
.news-content > :first-child { margin-top: 0; }
.news-content p { margin: .6em 0 1em; }
.news-content ul, .news-content ol { padding-left: 1.8em; }
.news-content li { margin: .25em 0; }
.news-content a { color: var(--accent-hover); text-underline-offset: 3px; }
.news-callout { margin: 16px 0; padding: 16px 20px; border: 1px solid; border-left-width: 4px; border-radius: 6px; }
.news-callout > :first-child { margin-top: 0; }
.news-callout > :last-child { margin-bottom: 0; }
.news-callout-info { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--border-strong); }
.news-callout-success { color: #28563d; background: #f0f6ed; border-color: #6a9767; }
.news-callout-warning { color: #76500d; background: #fff6d9; border-color: #b58a24; }
.news-callout-error { color: #852e28; background: #fff0eb; border-color: #c46c5b; }
.public-footer { background: var(--accent-soft); border-top: 1px solid var(--line); }
.public-footer-inner { display: flex; justify-content: space-between; gap: 16px; padding-block: 24px; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.skip-link { position: absolute; left: 16px; top: -100px; padding: 12px 18px; background: var(--surface); color: var(--accent); z-index: 10; }
.skip-link:focus { top: 12px; }
@media (max-width: 760px) {
    .public-header-inner, .public-main, .public-footer-inner { width: calc(100% - 36px); }
    .public-header-inner { min-height: 90px; gap: 12px; }
    .brand { gap: 9px; }
    .brand-logo { width: 48px; height: 44px; }
    .brand-name { font-size: 1.05rem; letter-spacing: 0; }
    .brand-abbreviation { font-size: .75rem; }
    .public-login { min-width: 64px; padding-inline: 14px; }
    .public-main { padding-top: 22px; }
    .home-banner { grid-template-columns: 1fr; border-radius: 10px; }
    .exam-illustration { padding: 0 18px 18px; }
    .banner-content { padding: 28px 24px 24px; }
    .banner-copy h1 { font-size: clamp(1.45rem, 5.6vw, 1.9rem); }
    .banner-copy p { font-size: .93rem; }
    .banner-entry { text-align: left; }
    .home-action { width: 100%; }
    .banner-note { text-align: center; margin-top: 10px; }
    .desktop-break { display: none; }
    .home-announcements { margin: 30px 0 44px; }
    .announcements-heading { flex-wrap: wrap; gap: 8px 14px; }
    .announcements-heading h2 { font-size: 1.2rem; }
    .public-footer-inner { flex-direction: column; gap: 5px; }
}
