/* Scoped to the category index. Other pages keep their existing theme. */
.ld-categories {
    --ld-paper: #f6f4ee; --ld-card: #fffefb; --ld-ink: #233f36;
    --ld-muted: #69756d; --ld-line: #dedfd5;
    background: var(--ld-paper); color: var(--ld-ink);
    padding: 72px 28px 56px; min-height: 80vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.ld-categories * { box-sizing: border-box; }
.ld-categories-inner { width: min(1120px, 100%); margin: 0 auto; }
.ld-categories-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding-bottom: 34px; border-bottom: 1px solid var(--ld-line); margin-bottom: 32px; }
.ld-categories-kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-size: 12px; letter-spacing: 3px; color: var(--ld-muted); }
.ld-categories-kicker::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.ld-categories h1 { margin: 0; color: var(--ld-ink); font-family: "Songti SC", "Noto Serif CJK SC", "SimSun", serif; font-size: clamp(34px, 4vw, 48px); font-weight: 600; letter-spacing: 6px; line-height: 1.4; }
.ld-categories-intro { margin: 0 0 6px; color: var(--ld-muted); font-size: 15px; line-height: 1.9; text-align: right; }
.ld-categories-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ld-category { --ld-accent: #406856; position: relative; display: flex; flex-direction: column; background: var(--ld-card); border: 1px solid var(--ld-line); border-radius: 10px; padding: 25px 27px 21px; min-width: 0; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.ld-category--yuxiu { --ld-accent: #597360; }
.ld-category--fengya { --ld-accent: #957044; }
.ld-category--chunchi { --ld-accent: #9d6460; }
.ld-category--qinghuan { --ld-accent: #7d754d; }
.ld-category--yunmou { --ld-accent: #627f92; }
.ld-category-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ld-muted); font-size: 12px; letter-spacing: 1px; margin-bottom: 20px; }
.ld-category-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--ld-line); border-radius: 50%; font-family: "Songti SC", "SimSun", serif; font-size: 17px; color: var(--ld-accent); }
.ld-category h2 { margin: 0 0 10px; color: var(--ld-ink); font-family: "Songti SC", "Noto Serif CJK SC", "SimSun", serif; font-size: 33px; line-height: 1.4; font-weight: 600; letter-spacing: 4px; }
.ld-category h2 a { color: inherit; text-decoration: none; }
.ld-category h2 a::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.ld-category h2 a:focus-visible { outline: none; }
.ld-category h2 a:focus-visible::after { outline: 3px solid var(--ld-accent); outline-offset: 4px; }
.ld-category-motto { margin: 0 0 12px; color: var(--ld-accent); font-size: 14px; letter-spacing: 1px; line-height: 1.8; }
.ld-category-description { margin: 0 0 24px; color: var(--ld-muted); font-size: 14px; line-height: 1.9; flex: 1; }
.ld-category-bottom { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--ld-line); padding-top: 16px; gap: 12px; color: var(--ld-muted); font-size: 12px; line-height: 1.5; }
.ld-category-enter { color: var(--ld-accent); }
.ld-category-enter span { display: inline-block; margin-left: 7px; font-size: 18px; }
.ld-category:not(.ld-category--empty):hover { transform: translateY(-3px); border-color: var(--ld-accent); box-shadow: 0 9px 25px rgba(35, 63, 54, .07); }
.ld-categories-end { display: flex; justify-content: space-between; gap: 20px; color: var(--ld-muted); border-top: 1px solid var(--ld-line); margin-top: 32px; padding-top: 22px; font-size: 13px; line-height: 1.8; }
.ld-categories-end p { margin: 0; }
.ld-categories-end a { color: var(--ld-ink); text-decoration: none; border-bottom: 1px solid var(--ld-line); }
.ld-categories-end a:focus-visible { outline: 2px solid var(--ld-ink); outline-offset: 4px; }
/* Balance the existing bright navigation on this page only. */
body:has(.ld-categories) #gh-head:not(.is-header-hidden) { background: #f6f4ee; color: #233f36; border-bottom: 1px solid #dedfd5; }
body:has(.ld-categories) #gh-head .gh-head-logo, body:has(.ld-categories) #gh-head .gh-head-link, body:has(.ld-categories) #gh-head .gh-search { color: inherit; }
body:has(.ld-categories) #gh-head .gh-burger::before, body:has(.ld-categories) #gh-head .gh-burger::after { background: currentColor; }
body:has(.ld-categories) #gh-head .gh-head-button { background: #233f36; color: #fffefb; }
body:has(.ld-categories) .site-footer { background: #f6f4ee; color: #69756d; padding-top: 26px; padding-bottom: 40px; }
body:has(.ld-categories) .site-footer .inner, body:has(.ld-categories) .site-footer .copyright, body:has(.ld-categories) .site-footer a { color: inherit; }
body:has(.ld-categories) .site-footer a:hover { text-decoration: underline; }
body:has(.ld-categories) .site-footer-nav li:not(:first-child) a::before { background: currentColor; }
@media (max-width: 960px) { .ld-categories-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
    .ld-categories { padding: 38px 20px 36px; }
    .ld-categories-header { display: block; margin-bottom: 24px; padding-bottom: 25px; }
    .ld-categories-intro { text-align: left; margin-top: 16px; font-size: 14px; }
    .ld-categories-grid { grid-template-columns: 1fr; gap: 16px; }
    .ld-category { padding: 22px 24px 18px; }
    .ld-category-top { margin-bottom: 14px; }
    .ld-category-description { margin-bottom: 20px; }
    .ld-categories-end { flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { .ld-category { transition: none; } .ld-category:not(.ld-category--empty):hover { transform: none; } }
html.dark-mode .ld-categories { --ld-paper: #17211d; --ld-card: #1e2b25; --ld-ink: #e7e9df; --ld-muted: #b0bbaf; --ld-line: #3d4b41; }
html.dark-mode .ld-category { --ld-accent: #b5c6a7; }
html.dark-mode body:has(.ld-categories) #gh-head:not(.is-header-hidden), html.dark-mode body:has(.ld-categories) .site-footer { background: #17211d; color: #e7e9df; border-color: #3d4b41; }
html.dark-mode body:has(.ld-categories) #gh-head .gh-head-button { background: #e7e9df; color: #17211d; }
@media (prefers-color-scheme: dark) {
    html.auto-color .ld-categories { --ld-paper: #17211d; --ld-card: #1e2b25; --ld-ink: #e7e9df; --ld-muted: #b0bbaf; --ld-line: #3d4b41; }
    html.auto-color .ld-category { --ld-accent: #b5c6a7; }
    html.auto-color body:has(.ld-categories) #gh-head:not(.is-header-hidden), html.auto-color body:has(.ld-categories) .site-footer { background: #17211d; color: #e7e9df; border-color: #3d4b41; }
    html.auto-color body:has(.ld-categories) #gh-head .gh-head-button { background: #e7e9df; color: #17211d; }
}
