:root {
    color-scheme: light;
    --navy: #163f67;
    --navy-deep: #092b49;
    --teal: #267caf;
    --teal-soft: #e7f2fa;
    --gold: #d6a647;
    --gold-soft: #fff7e3;
    --ink: #182b3a;
    --muted: #5e7384;
    --line: #d6e4ef;
    --surface: #ffffff;
    --canvas: #dcecf8;
    --shadow: 0 18px 48px rgba(14, 56, 91, 0.13);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    font-size: 16px;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--canvas);
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 0%, rgba(48, 132, 190, 0.24), transparent 34rem),
        radial-gradient(circle at 96% 18%, rgba(103, 169, 216, 0.18), transparent 30rem),
        linear-gradient(180deg, #eaf5fc 0, var(--canvas) 30rem, #edf5fa 100%);
}

img {
    max-width: 100%;
}

a {
    color: #176a9f;
    text-underline-offset: 0.18em;
}

a:hover {
    color: #a05c0a;
}

a:focus-visible {
    outline: 3px solid rgba(214, 166, 71, 0.78);
    outline-offset: 3px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: fixed;
    top: -5rem;
    left: 1rem;
    z-index: 100;
    padding: 0.72rem 1rem;
    border-radius: 0 0 10px 10px;
    color: #ffffff;
    background: var(--navy-deep);
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

.site-shell {
    width: min(100%, 1480px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 24px;
}

.legacy-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 104px;
    margin-bottom: 24px;
    padding: 18px 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 22px;
    color: #ffffff;
    background:
        radial-gradient(circle at 82% 10%, rgba(214, 166, 71, 0.24), transparent 19rem),
        linear-gradient(120deg, var(--navy-deep), var(--navy) 58%, #24618f);
    box-shadow: var(--shadow);
}

.modern-brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    color: #ffffff;
    text-decoration: none;
}

.modern-brand:hover {
    color: #ffffff;
}

.brand-mark {
    width: 58px;
    height: 66px;
    padding: 4px;
    border-radius: 14px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.brand-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.brand-copy strong {
    font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
    font-size: clamp(1.35rem, 2.1vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.brand-copy small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.76rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}

.header-actions a {
    padding: 0.72rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 160ms ease, background-color 160ms ease;
}

.header-actions a:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
}

.header-actions .primary-action {
    border-color: var(--gold);
    color: #2f290f;
    background: #f2ce7b;
}

.legacy-layout {
    display: grid;
    grid-template-columns: minmax(248px, 280px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    width: 100%;
}

.legacy-sidebar {
    position: sticky;
    top: 20px;
    padding: 20px;
    border: 1px solid rgba(21, 58, 74, 0.09);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 38px rgba(22, 52, 63, 0.09);
    backdrop-filter: blur(12px);
}

.sidebar-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 14px;
    padding: 0 5px 14px;
    border-bottom: 1px solid var(--line);
}

.sidebar-heading span {
    color: var(--navy);
    font-size: 1.04rem;
    font-weight: 800;
}

.sidebar-heading small {
    color: #8a989e;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.13em;
}

.section-navigation {
    display: grid;
    gap: 8px;
}

.side-button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18px;
    gap: 12px;
    align-items: center;
    min-height: 62px;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 13px;
    color: var(--ink);
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.side-button:hover {
    transform: translateX(3px);
    border-color: #c6dceb;
    color: var(--navy);
    background: #f1f7fc;
    box-shadow: 0 7px 16px rgba(21, 58, 74, 0.07);
}

.side-button.is-current {
    border-color: #b8d4e7;
    color: #154f78;
    background: linear-gradient(115deg, var(--teal-soft), #f7fbfe);
    box-shadow: inset 4px 0 0 var(--teal), 0 8px 18px rgba(38, 124, 175, 0.11);
}

.side-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.side-copy strong {
    overflow: hidden;
    font-size: 0.94rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-copy small {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-arrow {
    color: #8ca0a7;
    font-size: 1.45rem;
    line-height: 1;
}

.content-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(21, 58, 74, 0.08);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.intro-heading {
    padding: clamp(28px, 4vw, 52px) clamp(28px, 5vw, 68px) 30px;
    color: #ffffff;
    background:
        radial-gradient(circle at 88% 20%, rgba(214, 166, 71, 0.24), transparent 17rem),
        linear-gradient(118deg, #123d67, #2676a3);
}

.eyebrow {
    margin: 0 0 8px !important;
    color: #f2ce7b;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.intro-heading h1 {
    margin: 0;
    font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
    font-size: clamp(1.75rem, 3vw, 2.7rem);
    line-height: 1.3;
}

.intro-summary {
    max-width: 48rem;
    margin: 10px 0 22px !important;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.intro-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.intro-nav-link {
    padding: 0.58rem 0.86rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.intro-nav-link:hover,
.intro-nav-link[aria-current="page"] {
    border-color: #f2ce7b;
    color: #243318;
    background: #f2ce7b;
}

.article-body {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: clamp(34px, 5vw, 68px);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
    font-size: 1.06rem;
    line-height: 1.9;
}

.article-body p {
    margin: 0 0 1.25em;
}

.article-body > p:not(.section-lead):not(.eyebrow),
.article-body > ol,
.article-body > ul {
    max-width: 82ch;
}

.article-body > ol {
    display: grid;
    gap: 16px;
    margin: 24px 0 0;
    padding: 0;
    counter-reset: archive-item;
    list-style: none;
}

.article-body > ol > li {
    position: relative;
    padding: 22px 24px 22px 62px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fbfdff;
    box-shadow: 0 8px 22px rgba(21, 58, 74, 0.05);
    counter-increment: archive-item;
}

.article-body > ol > li::before {
    position: absolute;
    top: 20px;
    left: 20px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--teal);
    content: counter(archive-item);
    font-size: 0.86rem;
    font-weight: 800;
}

.page-title,
.section-title {
    margin: 0 0 14px;
    color: var(--navy);
    font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
    font-size: clamp(1.85rem, 3.3vw, 2.8rem);
    font-weight: 750;
    line-height: 1.35;
}

.page-title::after,
.section-title::after {
    display: block;
    width: 54px;
    height: 4px;
    margin-top: 13px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--teal), var(--gold));
    content: "";
}

.byline {
    display: inline-flex;
    margin: 0 0 24px;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    color: #315a78;
    background: var(--teal-soft);
    font-size: 0.88rem;
    font-weight: 700;
}

.historical-paragraph {
    text-indent: 2em;
}

.section-page {
    max-width: 1160px;
}

.section-lead {
    margin-bottom: 28px !important;
    color: var(--muted);
    font-size: 1.12rem;
}

.section-page h2,
.board-section h1,
.board-section h2 {
    margin: 38px 0 14px;
    color: var(--navy);
    font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
    font-size: 1.45rem;
    line-height: 1.45;
}

.section-page h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-page h2::before {
    width: 6px;
    height: 1.15em;
    border-radius: 4px;
    background: linear-gradient(var(--teal), var(--gold));
    content: "";
}

.section-page h3 {
    margin: 24px 0 8px;
    color: #254f72;
    font-size: 1.08rem;
}

.section-page ul,
.section-page ol {
    margin: 0 0 1.2em;
    padding-left: 1.5em;
}

.section-page li {
    margin-bottom: 0.5em;
}

.legacy-subnav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 0 0 30px;
    padding: 18px;
    border: 1px solid #cfdfeb;
    border-radius: 16px;
    background: linear-gradient(135deg, #f2f8fd, #fffaf0);
}

.legacy-subnav div {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-width: 0;
    min-height: 58px;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: var(--teal);
    background: rgba(255, 255, 255, 0.46);
}

.legacy-subnav div::before {
    margin-top: 0.1em;
    color: var(--teal);
    content: "◆";
    font-size: 0.72rem;
    line-height: 1.75;
}

.legacy-subnav .subnav-label {
    display: block;
    min-width: 0;
    line-height: 1.65;
}

.legacy-subnav .subnav-separator {
    color: #8ba4b7;
}

.legacy-subnav div:hover {
    border-color: #c8ddec;
    background: rgba(255, 255, 255, 0.8);
}

.legacy-subnav a {
    font-weight: 650;
    text-decoration: none;
}

.table-scroll {
    max-width: 100%;
    margin: 12px 0 26px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(21, 58, 74, 0.06);
}

.archive-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    background: #ffffff;
}

.archive-table th,
.archive-table td {
    padding: 13px 15px;
    border: 0;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    text-align: left;
}

.archive-table tr:last-child th,
.archive-table tr:last-child td {
    border-bottom: 0;
}

.archive-table tbody tr:nth-child(even) {
    background: #f5f9fc;
}

.archive-table tbody tr:hover {
    background: #eaf4fb;
}

.archive-table th {
    color: #ffffff;
    background: var(--navy);
    font-weight: 700;
}

.archive-table caption {
    padding: 10px 2px;
    color: var(--navy);
    font-weight: 800;
    text-align: left;
}

.archive-note {
    margin: 30px 0;
    padding: 18px 20px;
    border: 1px solid #efd99f;
    border-left: 5px solid var(--gold);
    border-radius: 12px;
    color: #564621;
    background: var(--gold-soft);
}

.source-list {
    display: grid;
    gap: 8px;
    padding-left: 1.25em !important;
    font-size: 0.94rem;
}

.source-list a {
    overflow-wrap: anywhere;
}

.film-title {
    text-align: center;
}

.film-title::after {
    margin-right: auto;
    margin-left: auto;
}

.portrait {
    float: left;
    width: 150px;
    height: auto;
    margin: 6px 24px 14px 0;
    border: 7px solid #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(21, 58, 74, 0.18);
}

.charter {
    max-width: 100%;
    margin: 0;
    padding: clamp(20px, 4vw, 40px);
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    white-space: pre-wrap;
    color: #27363c;
    background: #fafcfb;
    font: 0.98rem/1.9 "Noto Serif TC", "PMingLiU", serif;
}

.board-section {
    padding: 4px 0 22px;
    border-bottom: 1px solid var(--line);
}

.board-section + .board-section {
    margin-top: 18px;
}

.board-section h1,
.board-section h2 {
    display: block;
}

.back-to-top {
    clear: both;
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.back-to-top a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0.55rem 0.9rem;
    border: 1px solid #bed6e7;
    border-radius: 999px;
    color: var(--teal);
    background: #f2f8fc;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
}

.back-to-top a:hover {
    color: #ffffff;
    background: var(--teal);
}

.back-to-top img {
    width: 60px;
    height: 25px;
}

.intro-landing-page {
    width: 100%;
    padding: clamp(28px, 5vw, 62px);
    background:
        radial-gradient(circle at 88% 10%, rgba(214, 166, 71, 0.18), transparent 20rem),
        linear-gradient(145deg, #f1f8fd, #ffffff 55%, #fffaf0);
}

.intro-landing-hero {
    display: block;
    width: min(100%, 760px);
    height: auto;
    margin: 0 auto 26px;
    border-radius: 18px;
    box-shadow: 0 16px 38px rgba(21, 58, 74, 0.14);
}

.intro-divider {
    width: 70px;
    height: 4px;
    margin: 0 auto 30px;
    border: 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--teal), var(--gold));
}

.intro-landing {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    max-width: 850px;
    margin: 0 auto;
}

.intro-landing .landing-photo {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(21, 58, 74, 0.13);
}

.intro-landing nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.intro-landing nav div {
    min-width: 0;
}

.intro-landing nav img {
    display: none;
}

.intro-landing nav a {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.95rem;
    border: 1px solid #cadfec;
    border-radius: 12px;
    color: var(--navy);
    background: rgba(255, 255, 255, 0.78);
    font-weight: 750;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.intro-landing nav a::after {
    color: var(--teal);
    content: "→";
}

.intro-landing nav a:hover {
    transform: translateY(-2px);
    border-color: var(--teal);
    box-shadow: 0 8px 20px rgba(38, 124, 175, 0.12);
}

.archive-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 22px clamp(28px, 5vw, 68px);
    border-top: 1px solid var(--line);
    color: #6b7b81;
    background: #f4f9fc;
    font-size: 0.8rem;
}

.archive-footer strong {
    color: var(--navy);
}

@media (max-width: 980px) {
    .site-shell {
        padding: 14px;
    }

    .legacy-layout {
        grid-template-columns: 1fr;
    }

    .legacy-sidebar {
        position: static;
    }

    .section-navigation {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .side-copy small,
    .side-arrow {
        display: none;
    }

    .side-button {
        grid-template-columns: minmax(0, 1fr);
        min-height: 54px;
    }
}

@media (max-width: 720px) {
    .legacy-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
        padding: 18px;
        border-radius: 17px;
    }

    .brand-mark {
        width: 48px;
        height: 56px;
    }

    .brand-copy strong {
        font-size: 1.25rem;
    }

    .header-actions {
        width: 100%;
    }

    .header-actions a {
        flex: 1;
        text-align: center;
    }

    .section-navigation {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .legacy-subnav {
        grid-template-columns: 1fr;
    }

    .article-body {
        padding: 30px 22px 38px;
        font-size: 1rem;
        line-height: 1.82;
    }

    .article-body > ol > li {
        padding: 54px 18px 20px;
    }

    .article-body > ol > li::before {
        top: 16px;
        left: 18px;
    }

    .intro-heading {
        padding: 30px 22px 26px;
    }

    .intro-landing {
        grid-template-columns: 1fr;
    }

    .intro-landing .landing-photo {
        width: min(100%, 320px);
        margin: 0 auto;
    }

    .archive-footer {
        flex-direction: column;
    }
}

@media (max-width: 460px) {
    .site-shell {
        padding: 8px;
    }

    .legacy-header,
    .legacy-sidebar,
    .content-panel {
        border-radius: 14px;
    }

    .brand-copy small {
        display: none;
    }

    .intro-landing nav {
        grid-template-columns: 1fr;
    }

    .side-button {
        grid-template-columns: minmax(0, 1fr);
        min-height: 48px;
        padding: 9px 11px;
    }

    .side-copy strong {
        font-size: 0.82rem;
    }

    .page-title,
    .section-title {
        font-size: 1.72rem;
    }

    .portrait {
        float: none;
        display: block;
        margin: 0 auto 24px;
    }

    .charter {
        padding: 18px;
        font-size: 0.86rem;
    }
}

@media print {
    body {
        background: #ffffff;
    }

    .site-shell {
        width: 100%;
        padding: 0;
    }

    .skip-link,
    .legacy-header,
    .legacy-sidebar,
    .intro-heading,
    .back-to-top,
    .archive-footer {
        display: none !important;
    }

    .legacy-layout,
    .content-panel,
    .article-body {
        display: block;
        width: 100%;
        max-width: none;
        border: 0;
        box-shadow: none;
    }

    .article-body {
        padding: 0;
        font-size: 12pt;
        line-height: 1.6;
    }
}
