* { box-sizing: border-box; }
body { margin: 0; color: #1c1e21; font: 17px/1.85 "Noto Sans TC","Open Sans","Microsoft JhengHei",Arial,sans-serif; }
a { color: #004533; text-underline-offset: .22em; }
a:focus-visible { outline: 3px solid #00865f; outline-offset: 3px; }
.reading-header { border-bottom: 1px solid #d7e1da; }
.reading-header nav { max-width: 1080px; margin: auto; padding: 14px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.reading-header img { display: block; max-width: 34vw; height: auto; }
.reading-header a { padding: 5px 0; font-size: 15px; }
main { width: min(100%, 740px); margin: auto; padding: clamp(32px,6vw,68px) clamp(20px,5vw,46px) 55px; }
h1,h2 { color: #18372b; font-family: "GenYoGothic TW","Noto Sans TC",sans-serif; text-wrap: balance; }
h1 { margin: 8px 0 18px; font-size: clamp(30px,5.3vw,46px); line-height: 1.3; }
h2 { font-size: clamp(21px,3vw,27px); margin: 1.55em 0 .45em; line-height: 1.45; }
p { margin: .6em 0 1em; }
.access-label { margin: 0; color: #004533; font-size: 14px; font-weight: 700; }
.reading-title { display: grid; grid-template-columns: minmax(0, 1fr) clamp(64px, 18vw, 96px); align-items: center; gap: clamp(12px, 3vw, 24px); }
.reading-title h1 { margin-bottom: 0; }
.reading-title img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.summary { font-size: 1.12em; color: #43524b; margin-bottom: 1.55em; overflow-wrap: anywhere; }
article header { border-bottom: 1px solid #ccd8d0; }
ul,ol { padding-left: 1.5em; }
li { margin-bottom: .55em; }
.reading-gate { margin: 28px 0 0; padding: clamp(20px,4vw,32px); background: #ebf4eb; }
.reading-gate h2 { margin: 0; }
.gate-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; }
.gate-actions a { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; }
.primary { background: #004533; border-radius: 4px; color: white; padding: 8px 16px; text-decoration: none; }
footer { border-top: 1px solid #ccd8d0; margin-top: 36px; padding-top: 20px; }
.reading-header nav > div, .reading-related nav { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.reading-header a, .reading-related nav a { display: inline-flex; align-items: center; min-height: 44px; }
.reading-header nav > div { margin-left: auto; }
.reading-header .training-entry { padding: 6px 14px; justify-content: center; }
.byline, .archive-row time, .archive-heading span, .video-link small { color: #4a4f55; font-size: 14px; }
.byline { margin-top: 16px; }
.reading-size { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; margin-inline-start: 4px; vertical-align: middle; }
.reading-size-mark { border: 1px solid #ccd8d0; border-radius: 5px; padding: 3px 6px; font-weight: 700; line-height: 1.2; }
/* Keep the native picker available to touch, keyboard and assistive technology. */
.reading-size select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.reading-size:hover .reading-size-mark { background: #f4f7f3; }
.reading-size:focus-within .reading-size-mark { outline: 2px solid #00865f; outline-offset: 2px; }
.article-tags { display: flex; gap: 2px 12px; flex-wrap: wrap; margin: 5px 0; }
.article-tags a { font-size: 14px; }
.reading-body { overflow-wrap: anywhere; display: flow-root; }
.reading-body img, .reading-body video { max-width: 100% !important; height: auto !important; }
.reading-body iframe, .reading-body figure, .reading-body div { max-width: 100% !important; }
.reading-body iframe { border: 0; }
.reading-body table { display: block; overflow-x: auto; max-width: 100%; }
.reading-body pre { white-space: pre-wrap; }
.reading-body blockquote { margin: 1.25em 0; padding: 10px 20px; border-left: 3px solid #004533; background: #f2f6f2; }
.reading-body blockquote p { margin: .4em 0; }
.related-row, .video-link { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 14px; padding: 12px 0; text-decoration: none; }
.related-row { border-bottom: 1px solid #e1e6e1; }
.related-row img { object-fit: cover; background: #ebf4eb; }
.video-link { grid-template-columns: minmax(76px, 28%) 1fr; margin: 18px 0; padding: 16px; background: #ebf4eb; }
.video-link img { width: 100%; height: auto; }
.video-link strong, .video-link small { display: block; }
.reading-related nav { justify-content: space-between; }
.reading-related h2 { margin: 0 0 6px; }
.library-page { width: min(100%, 1140px); }
.library-mast { padding: clamp(20px,4vw,48px); background: #ebf4eb; }
.library-mast h1 { margin-top: 0; }
.library-mast p { color: #43524b; }
.library-search { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr) auto; gap: 5px 10px; align-items: end; }
.library-search label { font-size: 14px; font-weight: bold; }
.library-search label:nth-of-type(2) { grid-column: 2; grid-row: 1; }
.library-search input, .library-search select, .library-search button { grid-row: 2; font: inherit; font-size: 16px; padding: 8px 12px; min-width: 0; min-height: 46px; border: 1px solid #7c8980; border-radius: 4px; }
.library-search button { border-color: #004533; cursor: pointer; }
.library-columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(230px,.95fr); gap: clamp(20px,5vw,55px); margin-top: 32px; }
.archive-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-bottom: 2px solid #004533; }
.library-columns h2 { margin: 0 0 .45em; }
.archive-row { display: grid; grid-template-columns: clamp(68px,12vw,104px) minmax(0,1fr); gap: 16px; border-bottom: 1px solid #d7e1da; padding: 20px 0; }
.square img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block; }
.archive-row { overflow-wrap: anywhere; }
.archive-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.archive-access { color: #004533; font-size: 14px; font-weight: 600; }
.library-jumps { display: flex; gap: 20px; flex-wrap: wrap; padding-top: 18px; }
.library-jumps a { font-size: 15px; }
.archive-row h3 { font-size: clamp(18px,2.3vw,22px); margin: 3px 0; line-height: 1.5; }
.archive-row h3 a, .monthly a { text-decoration: none; }
.archive-row h3 a:hover, .monthly a:hover, .related-row:hover strong { text-decoration: underline; }
.archive-row p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 4px 0; font-size: 15px; }
.monthly { align-self: start; border-top: 3px solid #004533; padding: 16px 16px 4px; background: #f4f7f3; }
.monthly ol, .pagination { list-style: none; padding: 0; }
.monthly li { display: flex; gap: 14px; border-top: 1px solid #d7e1da; padding: 12px 0; margin: 0; }
.monthly li span { color: #004533; font-variant-numeric: tabular-nums; font-weight: bold; }
.pagination { display: flex; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-block; padding: 7px 12px; }
.pagination .active a { background: #004533; color: white; }
@media (max-width: 720px) {
    .library-columns { display: flex; flex-direction: column; }
    .monthly { width: 100%; }
    .library-search { grid-template-columns: minmax(0,1fr) auto; }
    .library-search label:first-child, .library-search input { grid-column: 1/-1; }
    .library-search label:nth-of-type(2) { grid-column: 1; grid-row: 3; }
    .library-search select, .library-search button { grid-row: 4; }
    .reading-header nav { gap: 8px; padding: 8px 16px; }
    .reading-header nav > div { gap: 8px; }
    .reading-header img { width: 100px; }
}
@media (max-width: 560px) {
    .reading-header nav { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; }
    .reading-header nav > div { grid-row: 2; grid-column: 1 / -1; margin-left: 0; gap: 20px; }
    .reading-header .training-entry { grid-row: 1; grid-column: 2; }
}
.neighbor-links { display: grid; gap: 8px; padding: 12px 0; margin-bottom: 10px; border-bottom: 1px solid #d7e1da; font-size: 15px; }

[data-public-reading] a:focus,
[data-public-reading] a:hover { color: #004533; }
[data-public-reading] .training-entry:focus,
[data-public-reading] .training-entry:hover { color: #fff; }
.knowledge-language { flex-basis: 100%; margin-top: 12px; font-size: 14px; color: #4a4f55; }
.knowledge-language summary { cursor: pointer; }
.knowledge-language summary:focus-visible { outline: 3px solid #00865f; outline-offset: 3px; }
.knowledge-language nav { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-block: 8px; }
.reading-related .knowledge-language nav { justify-content: flex-start; }
.knowledge-language [aria-current="true"] { font-weight: 700; }
.archive-byline { display: flex; flex-wrap: wrap; gap: 4px 16px; color: #4a4f55; font-size: 14px; }
.library-guest-links { margin: 14px 0; font-size: 15px; }
.library-guest-links a { font-weight: 700; }
.library-footer { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.public-reader .reading-title h1, .public-reader .reading-related h2 { font-weight: 700; }
.public-reader .reading-body h3 { font-size: 1.5em; }
.reader-edit { display: inline-block; margin: 6px 0 12px; font-size: 14px; }
.reader-share { margin-top: 28px; font-size: 15px; }
.reader-share p { margin: 0 0 8px; }
.reader-share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.reader-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 6px 12px;
    border: 1px solid #7c8980;
    border-radius: 6px;
    background: #fff;
    color: #004533;
    font-weight: 600;
    text-decoration: none;
}
.reader-share-button:hover { background: #ebf4eb; }
.reader-author { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: start; gap: 12px; padding: 18px 0; border-top: 1px solid #ccd8d0; }
.reader-author > img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.reading-recommendations { margin-block: 32px; }
.reading-recommendations h2 { margin: 0 0 12px; font-size: 22px; }
.reading-recommendations ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0; }
.reading-recommendations li { margin: 0; min-width: 0; }
.reading-recommendations li > a { display: flex; align-items: center; gap: 12px; height: 100%; min-height: 66px; padding: 10px; border: 1px solid #d7e1da; border-radius: 6px; text-decoration: none; }
.reading-recommendations img { flex-shrink: 0; width: 76px; height: 64px; object-fit: contain; border-radius: 3px; background: #f4f7f3; }
.reading-recommendations small, .reading-recommendations strong { display: block; overflow-wrap: anywhere; }
.reading-recommendations small { color: #4a4f55; font-size: 14px; }
.reading-recommendations strong { font-size: 16px; line-height: 1.45; }
.reading-recommendations a:hover strong, .reading-recommendations a:focus-visible strong { text-decoration: underline; }

@media (max-width: 720px), (pointer: coarse) {
    .article-tags a, .library-jumps a, .archive-reset, .library-footer > a, .knowledge-language nav a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        min-width: 44px;
    }
    .pagination a, .pagination span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        min-width: 44px;
    }
    .neighbor-links a { display: block; min-height: 44px; padding: 8px 0; }
    .knowledge-language summary { min-height: 44px; padding-block: 9px; }
}
