main .article-detail-board {
    --article-top-offset: 76px;
    --article-heading: #000;
    --article-accent: #24647e;
    --article-border: #dce5e9;
    --article-tint: #f4f8fa;
    /* 保留橫幅裁切，同時讓目錄以頁面為捲動容器。 */
    overflow: clip;
}

.article-detail-board .blog-detail-content {
    width: 100%;
}

.blog-detail-content > .blog-article-title {
    margin: 0;
    color: var(--article-heading);
}

.article-breadcrumb {
    margin-block-end: .75rem;
    color: var(--article-accent);
    font-size: .875rem;
    overflow-wrap: anywhere;
}

.article-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-breadcrumb li + li::before {
    content: "›" / "";
    margin-inline-end: .5rem;
}

.article-breadcrumb a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: .2em;
}

.article-breadcrumb [aria-current="page"] {
    color: var(--article-heading);
    font-weight: 600;
    text-decoration: none;
}

.article-breadcrumb a:focus-visible,
.article-table-scroll:focus-visible {
    outline: 2px solid var(--article-accent);
    outline-offset: 2px;
}

.blog-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .5rem 1rem;
    margin-block-start: .5rem;
}

.blog-article-byline {
    margin: 0;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.blog-article-byline a {
    text-decoration: underline;
}

.blog-article-dates {
    margin-inline-start: auto;
    color: #525252;
    font-size: .875rem;
    line-height: 1.5;
    text-align: end;
}

/* 覆蓋 CKEditor 產出的 inline style 固定寬高。 */
.blog-article-detail img:not(.article-author-avatar) {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
}

.article-rich-text h2 {
    color: var(--article-heading);
}

.article-rich-text :is(ul, ol) {
    padding-inline-start: 1.75em;
    margin-block: .75em;
}

.article-rich-text ul {
    list-style-type: disc;
}

.article-rich-text ul ul {
    list-style-type: circle;
}

.article-rich-text ul ul ul {
    list-style-type: square;
}

.article-rich-text ol:not([type]) {
    list-style-type: decimal;
}

.article-rich-text li > :is(ul, ol) {
    margin-block: .25em;
}

.article-table-scroll {
    max-inline-size: 100%;
    margin-block: 1em;
    overflow-x: auto;
}

.article-rich-text figure.table {
    margin-inline: 0;
}

.article-rich-text table {
    width: 100% !important;
    height: auto !important;
    border-collapse: collapse;
    border: 1px solid var(--article-border);
    background: #fff;
    color: #525252;
    font-size: .95em;
    line-height: 1.5;
}

.article-rich-text :is(th, td) {
    border: 1px solid var(--article-border);
    padding: .5em .75em;
    text-align: start;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.article-table-scroll :is(th, td) {
    min-inline-size: 5rem;
}

.article-rich-text tbody > tr:nth-child(even) > :is(th, td) {
    background: var(--article-tint);
}

.article-rich-text th {
    color: var(--article-heading);
}

.article-rich-text thead > tr > :is(th, td) {
    background: var(--article-accent);
    color: #fff;
}

.article-body :is([id], a[name]) {
    scroll-margin-top: var(--article-top-offset);
}

.article-contents {
    box-sizing: border-box;
    margin-block: 1.5rem;
    padding: 1.125rem 1.25rem;
    border: 1px solid var(--article-border);
    border-radius: 4px;
    background: var(--article-tint);
    color: var(--article-accent);
    font-size: 1rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.article-contents > h2,
.article-faq > h2,
.article-author > h2 {
    width: fit-content;
    margin: 0 0 .75rem;
    padding-bottom: .375rem;
    border-bottom: 2px solid #ffd077;
    color: var(--article-heading);
}

.article-contents ol {
    margin: 0;
    padding-inline-start: 1.5rem;
}

.article-contents a {
    display: block;
    padding-block: .375rem;
    color: inherit;
    text-decoration: none;
}

.article-contents a:hover,
.article-contents a:focus-visible {
    text-decoration: underline;
    text-underline-offset: .2em;
}

.article-contents a:focus-visible,
.article-faq-item > summary:focus-visible {
    outline: 2px solid var(--article-accent);
    outline-offset: -2px;
}

.article-faq {
    margin-block-start: 2.5rem;
}

.article-faq > h2,
.article-author > h2 {
    margin-bottom: 1rem;
}

.article-author {
    margin-block-start: 2.5rem;
    padding: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid var(--article-border);
    border-radius: 4px;
    background: var(--article-tint);
    color: #525252;
    font-size: 1rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.article-author-profile {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
}

.blog-article-detail img.article-author-avatar {
    flex: none;
    width: 72px;
    height: auto;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
}

.article-author-copy {
    flex: 1 1 14rem;
    min-width: 0;
}

.article-author-copy > p {
    margin: .25rem 0 0;
}

.article-author-copy > :first-child {
    margin-top: 0;
}

.article-author-name {
    color: var(--article-accent);
    font-weight: 600;
}

.article-author-name a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: .2em;
}

.article-author-name a:focus-visible {
    outline: 2px solid var(--article-accent);
    outline-offset: 2px;
}

.article-faq-item {
    margin-block-start: .75rem;
    border: 1px solid var(--article-border);
    border-radius: 4px;
}

.article-faq-item > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .875rem 1rem;
    color: var(--article-accent);
    font-weight: 600;
    list-style: none;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.article-faq-item > summary::-webkit-details-marker {
    display: none;
}

.article-faq-item[open] > summary,
.article-faq-item > summary:hover {
    background: var(--article-tint);
}

.article-faq-item > summary::after {
    content: "";
    flex: 0 0 .5rem;
    height: .5rem;
    margin-inline-end: .25rem;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.article-faq-item[open]:not([data-closing]) > summary::after {
    transform: rotate(225deg);
}

.article-faq-answer {
    display: flow-root;
    overflow: clip;
}

.article-faq-answer-content {
    display: flow-root;
    padding: 1rem;
    color: #525252;
    overflow-wrap: anywhere;
}

.article-faq-answer-content > :first-child {
    margin-block-start: 0;
}

.article-faq-answer-content > :last-child {
    margin-block-end: 0;
}

@media (prefers-reduced-motion: no-preference) {
    :root {
        scroll-behavior: smooth;
    }

    .article-faq-item > summary::after {
        transition: transform 220ms ease;
    }
}

@media (min-width: 1000px) {
    .blog-article-detail:has(> .article-contents) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) clamp(13rem, 21vw, 17rem);
        column-gap: clamp(1.5rem, 3vw, 3rem);
    }

    .article-contents {
        grid-area: 1 / 2;
        align-self: start;
        position: sticky;
        top: var(--article-top-offset);
        max-height: calc(100vh - var(--article-top-offset) - 1rem);
        max-height: calc(100dvh - var(--article-top-offset) - 1rem);
        margin-block: 0;
        overflow-y: auto;
    }
}

@media (min-width: 1480px) {
    main .article-detail-board {
        --article-top-offset: 116px;
    }
}
