:root {
    --hub-ink: #0f172a;
    --hub-muted: #334155;
    --hub-line: #dbe3ef;
    --hub-paper: #ffffff;
    --hub-bg: #f8fafc;
    --hub-blue: #0369a1;
    --hub-teal: #0f766e;
    --hub-gold: #b7791f;
    --hub-rose: #be123c;
    --hub-deep: #020617;
}

* {
    box-sizing: border-box;
}

body.topic-hub {
    margin: 0;
    background: var(--hub-bg);
    color: var(--hub-ink);
    font-family: "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.75;
}

.hub-skip-link {
    position: fixed;
    left: 16px;
    top: 12px;
    z-index: 100;
    border-radius: 8px;
    background: var(--hub-deep);
    color: #fff;
    padding: 0.65rem 0.9rem;
    font-weight: 900;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform 0.18s ease;
}

.hub-skip-link:focus {
    transform: translateY(0);
}

.hub-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.hub-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(219, 227, 239, 0.9);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
}

.hub-nav {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.hub-brand {
    color: var(--hub-ink);
    font-size: 0.95rem;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.hub-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    font-size: 0.92rem;
    font-weight: 700;
}

.hub-links a {
    color: var(--hub-muted);
    text-decoration: none;
}

.hub-links a:hover,
.hub-links a[aria-current="page"] {
    color: var(--hub-blue);
}

.hub-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--hub-ink);
    color: #fff !important;
    padding: 0.55rem 1rem;
    text-decoration: none;
}

.hub-hero {
    padding: 72px 0 42px;
}

.hub-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
    gap: 32px;
    align-items: end;
}

.hub-kicker {
    margin: 0 0 14px;
    color: var(--hub-blue);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hub-title {
    margin: 0;
    max-width: 760px;
    font-family: "Noto Serif TC", "Noto Sans TC", system-ui, sans-serif;
    font-size: clamp(2.25rem, 5vw, 4.7rem);
    font-weight: 950;
    letter-spacing: 0;
    line-height: 1.08;
}

.hub-lead {
    margin: 22px 0 0;
    max-width: 760px;
    color: var(--hub-muted);
    font-size: 1.08rem;
}

.hub-updated {
    margin: 18px 0 0;
    color: var(--hub-muted);
    font-size: 0.92rem;
    font-weight: 800;
}

.hub-stat-panel {
    display: grid;
    gap: 12px;
}

.hub-stat {
    border: 1px solid var(--hub-line);
    border-radius: 8px;
    background: var(--hub-paper);
    padding: 18px;
}

.hub-stat strong {
    display: block;
    font-size: 2rem;
    line-height: 1.1;
}

.hub-stat span {
    color: var(--hub-muted);
    font-size: 0.9rem;
}

.hub-section {
    padding: 34px 0;
}

.hub-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.hub-section h2 {
    margin: 0;
    font-size: clamp(1.65rem, 3vw, 2.4rem);
    line-height: 1.18;
}

.hub-section-head p {
    margin: 0;
    max-width: 560px;
    color: var(--hub-muted);
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

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

.hub-card {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    border: 1px solid var(--hub-line);
    border-radius: 8px;
    background: var(--hub-paper);
    padding: 22px;
    color: var(--hub-ink);
    text-decoration: none;
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.hub-card:hover {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 16px 38px rgba(23, 32, 51, 0.1);
}

.hub-card:focus-visible,
.hub-row:focus-visible,
.hub-pill:focus-visible,
.hub-links a:focus-visible,
.hub-cta:focus-visible {
    outline: 3px solid rgba(3, 105, 161, 0.32);
    outline-offset: 3px;
}

.hub-child-group {
    margin-top: 22px;
}

.hub-child-group:first-of-type {
    margin-top: 0;
}

.hub-child-group > h3 {
    margin: 0 0 14px;
    color: var(--hub-muted);
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hub-card small {
    color: var(--hub-blue);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hub-card h3 {
    margin: 10px 0 8px;
    font-size: 1.18rem;
    line-height: 1.35;
}

.hub-card p {
    margin: 0;
    color: var(--hub-muted);
    font-size: 0.95rem;
}

.hub-card .hub-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.hub-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--hub-line);
    border-radius: 999px;
    background: #f8fafc;
    color: var(--hub-muted);
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 800;
}

.hub-list {
    display: grid;
    gap: 10px;
}

.hub-prose {
    display: grid;
    gap: 16px;
    border: 1px solid var(--hub-line);
    border-radius: 8px;
    background: var(--hub-paper);
    padding: clamp(22px, 3vw, 34px);
}

.hub-prose p {
    margin: 0;
    color: #2f3b4f;
    font-size: 1.02rem;
}

.hub-share {
    margin: 8px 0 18px;
}

.hub-share img {
    display: block;
    width: min(100%, 760px);
    height: auto;
    border: 1px solid var(--hub-line);
    border-radius: 8px;
    background: var(--hub-paper);
}

.hub-share figcaption {
    margin-top: 8px;
    color: var(--hub-muted);
    font-size: 0.84rem;
}

.hub-faq {
    display: grid;
    gap: 10px;
}

.hub-faq details {
    border: 1px solid var(--hub-line);
    border-radius: 8px;
    background: var(--hub-paper);
    padding: 16px 18px;
}

.hub-faq summary {
    cursor: pointer;
    color: var(--hub-ink);
    font-weight: 900;
}

.hub-faq p {
    margin: 10px 0 0;
    color: var(--hub-muted);
}

.hub-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--hub-line);
    border-radius: 8px;
    background: var(--hub-paper);
    padding: 16px 18px;
    color: var(--hub-ink);
    text-decoration: none;
}

.hub-row:hover {
    border-color: rgba(37, 99, 235, 0.35);
}

.hub-row strong {
    display: block;
    line-height: 1.45;
}

.hub-row span {
    color: var(--hub-muted);
    font-size: 0.9rem;
}

.hub-row em {
    color: var(--hub-blue);
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.hub-band {
    border: 1px solid var(--hub-line);
    border-radius: 8px;
    background: var(--hub-deep);
    color: #fff;
    padding: 28px;
}

.hub-band p {
    color: rgba(255, 255, 255, 0.76);
}

.hub-footer {
    margin-top: 40px;
    border-top: 1px solid var(--hub-line);
    padding: 30px 0 42px;
    color: var(--hub-muted);
    font-size: 0.9rem;
}

.hub-footer a {
    color: var(--hub-muted);
    text-decoration: none;
}

.hub-footer a:hover {
    color: var(--hub-blue);
}

.search-hero {
    padding-bottom: 24px;
}

.search-section {
    padding-top: 18px;
}

.site-search-form {
    border: 1px solid var(--hub-line);
    border-radius: 8px;
    background: var(--hub-paper);
    padding: 20px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.site-search-form label {
    display: block;
    margin-bottom: 10px;
    color: var(--hub-ink);
    font-weight: 900;
}

.site-search-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.site-search-control input {
    width: 100%;
    border: 1px solid var(--hub-line);
    border-radius: 8px;
    padding: 0.9rem 1rem;
    color: var(--hub-ink);
    font: inherit;
}

.site-search-control input:focus {
    border-color: rgba(3, 105, 161, 0.72);
    outline: 3px solid rgba(3, 105, 161, 0.16);
}

.site-search-control button {
    border: 0;
    border-radius: 8px;
    background: var(--hub-ink);
    color: #fff;
    padding: 0.9rem 1.25rem;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.site-search-control button:focus-visible {
    outline: 3px solid rgba(3, 105, 161, 0.32);
    outline-offset: 3px;
}

.site-search-help {
    margin: 10px 0 0;
    color: var(--hub-muted);
    font-size: 0.92rem;
}

.site-search-summary {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 28px 0 16px;
}

.site-search-summary h2,
.site-search-summary p {
    margin: 0;
}

.site-search-summary p {
    color: var(--hub-muted);
    font-weight: 700;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.search-result-card,
.search-empty {
    border: 1px solid var(--hub-line);
    border-radius: 8px;
    background: var(--hub-paper);
    padding: 20px;
}

.search-result-card {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    gap: 10px;
}

.search-result-meta,
.search-result-footer,
.search-result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-result-meta span,
.search-result-tags span {
    border-radius: 999px;
    background: #e0f2fe;
    color: var(--hub-blue);
    padding: 0.25rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 900;
}

.search-result-meta span + span {
    background: #f1f5f9;
    color: var(--hub-muted);
}

.search-result-card h3 {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.45;
}

.search-result-card h3 a {
    color: var(--hub-ink);
    text-decoration: none;
}

.search-result-card h3 a:hover {
    color: var(--hub-blue);
}

.search-result-card p,
.search-empty p {
    margin: 0;
    color: var(--hub-muted);
}

.search-result-footer {
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.search-result-footer > a {
    color: var(--hub-blue);
    font-weight: 900;
    text-decoration: none;
}

.search-empty {
    grid-column: 1 / -1;
}

.search-empty h3 {
    margin: 0 0 8px;
}

@media (max-width: 900px) {
    .hub-nav {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px 0;
    }

    .hub-links {
        justify-content: flex-start;
    }

    .hub-hero-grid,
    .hub-grid,
    .hub-grid.two,
    .hub-section-head,
    .search-results {
        grid-template-columns: 1fr;
    }

    .hub-section-head {
        display: block;
    }
}

@media (max-width: 560px) {
    .hub-shell {
        width: min(100% - 24px, 1120px);
    }

    .hub-links {
        gap: 12px;
        font-size: 0.85rem;
    }

    .hub-hero {
        padding-top: 46px;
    }

    .hub-row {
        grid-template-columns: 1fr;
    }

    .site-search-control,
    .site-search-summary {
        display: block;
    }

    .site-search-control button {
        width: 100%;
        margin-top: 10px;
    }

    .site-search-summary p {
        margin-top: 6px;
    }
}
