:root {
    color: #171717;
    background: #f7f7f5;
    font-family: Inter, "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
    font-synthesis: none;
    --ink: #171717;
    --paper: #f7f7f5;
    --white: #fff;
    --line: #d8d8d3;
    --red: #c92a3e;
    --red-dark: #a91f31;
    --green: #176b5b;
    --muted: #70706c;
    --content: 1200px;
    --reading: 760px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    overflow-x: hidden;
    background: var(--paper);
    color: var(--ink);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

h1,
h2,
h3,
p,
figure,
dl,
dd {
    margin: 0;
}

h1,
h2,
h3 {
    letter-spacing: 0;
}

p {
    line-height: 1.72;
}

.content-width {
    width: min(calc(100% - 48px), var(--content));
    margin-inline: auto;
}

.article-reading-width {
    width: min(calc(100% - 48px), var(--reading));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    background: var(--ink);
    color: var(--white);
    transform: translateY(-160%);
}

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

.site-header {
    position: sticky;
    z-index: 100;
    top: 0;
    height: 72px;
    border-bottom: 1px solid rgb(23 23 23 / 12%);
    background: rgb(247 247 245 / 96%);
    backdrop-filter: blur(12px);
}

.header-inner {
    display: grid;
    width: min(calc(100% - 48px), var(--content));
    height: 100%;
    margin-inline: auto;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 26px;
}

.brand {
    display: inline-flex;
    min-width: max-content;
    align-items: center;
    gap: 11px;
}

.brand-mark {
    position: relative;
    display: grid;
    width: 32px;
    height: 32px;
    border: 2px solid currentcolor;
    place-items: center;
}

.brand-mark::before,
.brand-mark::after {
    position: absolute;
    width: 8px;
    height: 2px;
    background: var(--paper);
    content: "";
}

.brand-mark::before {
    top: -2px;
    left: 5px;
}

.brand-mark::after {
    right: 5px;
    bottom: -2px;
}

.brand-mark span {
    width: 9px;
    height: 9px;
    background: var(--red);
}

.brand-copy {
    display: grid;
    gap: 1px;
}

.brand-copy strong {
    font-size: 19px;
    line-height: 1.1;
}

.brand-copy small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.desktop-nav {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.desktop-nav a {
    position: relative;
    padding-block: 26px;
    color: #373733;
    font-size: 14px;
    font-weight: 650;
}

.desktop-nav a::after {
    position: absolute;
    right: 0;
    bottom: 17px;
    left: 0;
    height: 2px;
    background: var(--red);
    content: "";
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
}

.desktop-nav a:hover::after,
.desktop-nav a:focus-visible::after,
.desktop-nav a.is-active::after {
    transform: scaleX(1);
}

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

.language-switcher {
    position: relative;
    min-width: 122px;
}

.language-switcher summary,
.mobile-menu summary {
    list-style: none;
    cursor: pointer;
}

.language-switcher summary::-webkit-details-marker,
.mobile-menu summary::-webkit-details-marker {
    display: none;
}

.language-switcher summary {
    display: flex;
    min-height: 42px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 6px;
    align-items: center;
    gap: 8px;
    background: var(--white);
    font-size: 13px;
    font-weight: 750;
}

.language-switcher summary span,
.language-switcher a span {
    color: var(--red-dark);
    font-size: 10px;
    font-weight: 850;
}

.language-switcher summary::after {
    margin-left: auto;
    content: "⌄";
}

.language-switcher[open] summary {
    border-color: #b7b7b0;
}

.language-switcher > div {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 190px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    box-shadow: 0 18px 48px rgb(23 23 23 / 14%);
}

.language-switcher a {
    display: flex;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 4px;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.language-switcher a:hover,
.language-switcher a[aria-current="page"] {
    background: #f5eded;
}

.primary-button,
.light-button {
    display: inline-flex;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid var(--red);
    border-radius: 5px;
    align-items: center;
    justify-content: center;
    background: var(--red);
    color: var(--white);
    font-size: 14px;
    font-weight: 800;
}

.primary-button:hover {
    border-color: var(--red-dark);
    background: var(--red-dark);
}

.mobile-menu {
    display: none;
}

.knowledge-hero {
    position: relative;
    display: grid;
    min-height: 460px;
    overflow: hidden;
    align-items: end;
    background: #ddd;
}

.knowledge-hero > img,
.knowledge-hero-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.knowledge-hero > img {
    object-fit: cover;
    object-position: center 47%;
}

.knowledge-hero-shade {
    background: linear-gradient(90deg, rgb(10 10 10 / 82%) 0%, rgb(10 10 10 / 52%) 48%, rgb(10 10 10 / 10%) 100%);
}

.knowledge-hero-content {
    position: relative;
    z-index: 1;
    padding-block: 84px 70px;
    color: var(--white);
    animation: rise-in 620ms cubic-bezier(.22, 1, .36, 1) both;
}

.section-label {
    color: var(--red);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.knowledge-hero .section-label {
    color: #ff9baa;
}

.knowledge-hero h1 {
    max-width: 780px;
    margin-top: 12px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
}

.knowledge-hero-content > p:last-child {
    max-width: 650px;
    margin-top: 22px;
    color: #efefeb;
    font-size: 18px;
}

.article-index,
.related-section {
    padding-block: 96px 112px;
}

.article-index-heading {
    display: flex;
    min-height: 58px;
    border-bottom: 1px solid var(--line);
    align-items: center;
    justify-content: space-between;
}

.article-index-heading h2 {
    font-size: 24px;
}

.article-index-heading > span {
    color: var(--muted);
    font-weight: 750;
}

.category-filter {
    display: flex;
    overflow-x: auto;
    padding-block: 22px 34px;
    gap: 8px;
    scrollbar-width: none;
}

.category-filter::-webkit-scrollbar {
    display: none;
}

.category-filter a {
    display: inline-flex;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 5px;
    align-items: center;
    background: var(--white);
    color: #444;
    font-size: 13px;
    font-weight: 750;
    white-space: nowrap;
}

.category-filter a:hover,
.category-filter a.is-active {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--white);
}

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

.article-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
    animation: rise-in 520ms cubic-bezier(.22, 1, .36, 1) both;
}

.article-card:nth-child(2) {
    animation-delay: 80ms;
}

.article-card:nth-child(3) {
    animation-delay: 160ms;
}

.article-card:hover {
    border-color: #aaa9a3;
    box-shadow: 0 14px 34px rgb(23 23 23 / 9%);
    transform: translateY(-3px);
}

.article-image-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #ececea;
}

.article-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 420ms cubic-bezier(.22, 1, .36, 1);
}

.article-card:hover .article-image-link img {
    transform: scale(1.025);
}

.article-card-body {
    display: grid;
    min-height: 320px;
    padding: 22px;
    align-content: start;
}

.article-card-meta {
    display: flex;
    min-height: 25px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
}

.article-card-meta strong {
    color: var(--red-dark);
}

.article-card h2 {
    margin-top: 14px;
    font-size: 22px;
    line-height: 1.35;
}

.article-card h2 a:hover {
    color: var(--red-dark);
}

.article-card-body > p {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 13px;
    color: #555552;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.article-card-footer {
    display: flex;
    margin-top: auto;
    padding-top: 24px;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
}

.article-card-footer a {
    color: var(--red-dark);
    font-size: 13px;
    font-weight: 800;
}

.knowledge-empty {
    padding: 70px 20px;
    border-block: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
}

.knowledge-pagination {
    display: flex;
    margin-top: 42px;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.knowledge-pagination a,
.knowledge-pagination > span {
    display: grid;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 5px;
    place-items: center;
}

.knowledge-pagination > span {
    color: #aaa;
}

.article-header {
    padding-block: 80px 58px;
    border-bottom: 1px solid var(--line);
    background: var(--white);
}

.article-back {
    display: inline-flex;
    margin-bottom: 38px;
    align-items: center;
    gap: 8px;
    color: #555;
    font-size: 14px;
    font-weight: 750;
}

.article-back:hover {
    color: var(--red-dark);
}

.article-header h1 {
    margin-top: 13px;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.12;
}

.article-lead {
    margin-top: 24px;
    color: #4c4c48;
    font-size: 19px;
}

.article-meta {
    display: flex;
    margin-top: 34px;
    gap: 32px;
}

.article-meta div {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.article-meta dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.article-meta dd {
    font-size: 13px;
    font-weight: 800;
}

.article-cover {
    overflow: hidden;
    margin-top: 56px;
    border-radius: 6px;
    background: #e8e8e5;
    aspect-ratio: 16 / 8.5;
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-body {
    padding-block: 72px 116px;
    font-size: 17px;
    line-height: 1.85;
}

.article-body > * + * {
    margin-top: 24px;
}

.article-body h2 {
    margin-top: 64px;
    font-size: 31px;
    line-height: 1.3;
}

.article-body h3 {
    margin-top: 40px;
    font-size: 22px;
    line-height: 1.4;
}

.article-body p,
.article-body li {
    color: #383835;
}

.article-body ul,
.article-body ol {
    display: grid;
    padding-left: 24px;
    gap: 10px;
}

.article-body a {
    color: var(--red-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-body blockquote {
    margin: 38px 0;
    padding: 20px 24px;
    border-left: 4px solid var(--green);
    background: #eaf3f0;
}

.article-body blockquote p {
    color: #24463f;
}

.article-body code {
    padding: 2px 5px;
    border-radius: 3px;
    background: #e9e9e6;
    font-size: .9em;
}

.related-section {
    border-top: 1px solid var(--line);
    background: var(--white);
}

.related-section .article-index-heading {
    margin-bottom: 34px;
}

.knowledge-cta {
    padding-block: 70px;
    background: var(--red);
    color: var(--white);
}

.cta-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 48px;
}

.knowledge-cta .section-label {
    color: #ffd1d7;
}

.knowledge-cta h2 {
    max-width: 720px;
    margin-top: 10px;
    font-size: 34px;
    line-height: 1.24;
}

.knowledge-cta p:last-child {
    max-width: 690px;
    margin-top: 12px;
    color: #ffe8eb;
}

.light-button {
    min-width: 150px;
    border-color: var(--white);
    background: var(--white);
    color: var(--red-dark);
}

.site-footer {
    background: var(--ink);
    color: var(--white);
}

.footer-shell {
    padding-block: 56px 28px;
}

.footer-lead {
    display: grid;
    padding-bottom: 46px;
    grid-template-areas: "brand statement action";
    grid-template-columns: auto minmax(280px, 1fr) auto;
    align-items: center;
    gap: 48px;
}

.brand-inverse {
    grid-area: brand;
    color: var(--white);
}

.brand-inverse .brand-mark::before,
.brand-inverse .brand-mark::after {
    background: var(--ink);
}

.brand-inverse .brand-copy small {
    color: #aeadad;
}

.footer-statement {
    max-width: 620px;
    grid-area: statement;
    justify-self: center;
    color: #f2f2ef;
    font-size: 25px;
    font-weight: 650;
    line-height: 1.42;
}

.footer-cta {
    display: inline-flex;
    min-height: 46px;
    padding-inline: 18px;
    grid-area: action;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid #555550;
    border-radius: 6px;
    color: var(--white);
    font-size: 14px;
    font-weight: 750;
    transition:
        border-color 180ms ease,
        background-color 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}

.footer-cta-arrow {
    font-size: 18px;
    line-height: 1;
}

.footer-cta:hover,
.footer-cta:focus-visible {
    border-color: var(--white);
    background: var(--white);
    color: var(--ink);
    transform: translateY(-2px);
}

.footer-capabilities {
    display: grid;
    margin: 0;
    padding: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-block: 1px solid #3d3d39;
    list-style: none;
}

.footer-capabilities li {
    display: flex;
    min-width: 0;
    min-height: 72px;
    align-items: center;
    gap: 20px;
    color: #d1d1cc;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.footer-capabilities li:not(:last-child)::after {
    height: 1px;
    min-width: 24px;
    flex: 1;
    margin-right: 20px;
    background: #555550;
    content: "";
}

.footer-meta {
    display: flex;
    padding-top: 26px;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 26px;
}

.site-footer nav a {
    color: #d1d1cc;
    font-size: 13px;
    font-weight: 600;
}

.site-footer nav a:hover,
.site-footer nav a:focus-visible {
    color: var(--white);
}

.footer-legal {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    white-space: nowrap;
}

.footer-legal a {
    color: var(--white);
    font-size: 13px;
    font-weight: 750;
}

.footer-legal small {
    color: #8f8f8a;
    font-size: 11px;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1080px) {
    .desktop-nav {
        gap: 15px;
    }

    .desktop-nav a {
        font-size: 13px;
    }

    .header-actions .primary-button {
        display: none;
    }

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

@media (max-width: 900px) {
    .site-header {
        height: 64px;
    }

    .header-inner,
    .content-width,
    .article-reading-width {
        width: min(calc(100% - 36px), var(--content));
    }

    .header-inner {
        grid-template-columns: auto 1fr auto;
    }

    .desktop-nav,
    .header-actions {
        display: none;
    }

    .mobile-menu {
        position: relative;
        display: block;
        grid-column: 3;
    }

    .mobile-menu > summary {
        display: flex;
        min-height: 42px;
        padding: 8px 10px;
        border: 1px solid var(--line);
        border-radius: 5px;
        align-items: center;
        gap: 9px;
        background: var(--white);
        font-size: 13px;
        font-weight: 800;
    }

    .menu-lines,
    .menu-lines::before,
    .menu-lines::after {
        display: block;
        width: 17px;
        height: 2px;
        background: currentcolor;
        content: "";
    }

    .menu-lines {
        position: relative;
    }

    .menu-lines::before {
        position: absolute;
        top: -5px;
    }

    .menu-lines::after {
        position: absolute;
        top: 5px;
    }

    .mobile-menu-panel {
        position: fixed;
        z-index: 90;
        top: 64px;
        right: 0;
        left: 0;
        display: grid;
        max-height: calc(100svh - 64px);
        overflow-y: auto;
        padding: 24px 18px 34px;
        border-top: 1px solid var(--line);
        background: var(--paper);
        box-shadow: 0 20px 40px rgb(23 23 23 / 12%);
    }

    .mobile-menu-panel nav {
        display: grid;
    }

    .mobile-menu-panel nav a {
        padding: 16px 0;
        border-bottom: 1px solid var(--line);
        font-size: 18px;
        font-weight: 750;
    }

    .mobile-menu-panel nav a.is-active {
        color: var(--red-dark);
    }

    .mobile-languages {
        display: flex;
        padding-block: 22px;
        gap: 8px;
    }

    .mobile-languages a {
        padding: 8px 10px;
        border: 1px solid var(--line);
        border-radius: 5px;
        background: var(--white);
        font-size: 12px;
        font-weight: 750;
    }

    .mobile-languages a[aria-current="page"] {
        border-color: var(--ink);
        background: var(--ink);
        color: var(--white);
    }

    .mobile-menu-panel > .primary-button {
        width: 100%;
    }

    .knowledge-hero {
        min-height: 410px;
    }

    .article-index,
    .related-section {
        padding-block: 72px 84px;
    }

    .article-header {
        padding-block: 62px 48px;
    }

    .article-cover {
        width: calc(100% - 36px);
        margin-top: 38px;
    }

    .article-body {
        padding-block: 58px 88px;
    }

    .footer-lead {
        grid-template-areas:
            "brand action"
            "statement statement";
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 30px 40px;
    }

    .footer-statement {
        justify-self: start;
    }

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

    .footer-capabilities li {
        min-height: 62px;
        white-space: normal;
    }

    .footer-capabilities li::after {
        display: none;
    }

    .footer-capabilities li:nth-child(odd) {
        border-right: 1px solid #3d3d39;
    }

    .footer-capabilities li:nth-child(even) {
        padding-left: 24px;
    }

    .footer-capabilities li:nth-child(-n + 2) {
        border-bottom: 1px solid #3d3d39;
    }

    .footer-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-legal {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 640px) {
    .content-width,
    .article-reading-width {
        width: min(calc(100% - 28px), var(--content));
    }

    .brand-copy strong {
        font-size: 17px;
    }

    .brand-mark {
        width: 29px;
        height: 29px;
    }

    .mobile-menu > summary > span:last-child {
        display: none;
    }

    .knowledge-hero {
        min-height: 370px;
    }

    .knowledge-hero-shade {
        background: linear-gradient(0deg, rgb(10 10 10 / 82%) 0%, rgb(10 10 10 / 48%) 76%, rgb(10 10 10 / 15%) 100%);
    }

    .knowledge-hero-content {
        padding-block: 54px 48px;
    }

    .knowledge-hero h1 {
        font-size: 44px;
    }

    .knowledge-hero-content > p:last-child {
        font-size: 16px;
    }

    .article-index,
    .related-section {
        padding-block: 58px 70px;
    }

    .category-filter {
        margin-right: -14px;
        padding-bottom: 28px;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .article-card-body {
        min-height: 290px;
        padding: 20px;
    }

    .article-header {
        padding-block: 46px 40px;
    }

    .article-back {
        margin-bottom: 28px;
    }

    .article-header h1 {
        font-size: 38px;
    }

    .article-lead {
        font-size: 17px;
    }

    .article-meta {
        flex-wrap: wrap;
        gap: 14px 24px;
    }

    .article-cover {
        width: calc(100% - 28px);
        aspect-ratio: 4 / 3;
    }

    .article-body {
        padding-block: 48px 72px;
        font-size: 16px;
    }

    .article-body h2 {
        margin-top: 48px;
        font-size: 26px;
    }

    .article-body h3 {
        font-size: 20px;
    }

    .cta-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .knowledge-cta h2 {
        font-size: 28px;
    }

    .light-button {
        width: 100%;
    }

    .footer-shell {
        padding-block: 46px 24px;
    }

    .footer-lead {
        padding-bottom: 38px;
        grid-template-areas:
            "brand"
            "statement"
            "action";
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-statement {
        font-size: 22px;
    }

    .footer-cta {
        width: 100%;
    }

    .footer-capabilities li {
        padding-block: 16px;
        font-size: 12px;
    }

    .footer-capabilities li:nth-child(even) {
        padding-left: 16px;
    }

    .footer-meta {
        padding-top: 24px;
        gap: 26px;
    }

    .site-footer nav {
        gap: 14px 20px;
    }

    .footer-legal {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
