
/* ==================================================
   Color palette and base
   ================================================== */
:root {
    --navy: #142d49;
    --navy-light: #203f5d;
    --gold: #d6b36a;
    --gold-light: #f6edd9;
    --ink: #293b4c;
    --muted: #788592;
    --paper: #ffffff;
    --background: #f1f0eb;
    --border: #e4e2db;
    --old: #426c59;
    --old-light: #edf3ed;
    --new: #94504c;
    --new-light: #f7eeeb;
    --topic: #70608d;
    --topic-light: #f1eef7;
}
* { box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}
body {
    margin: 0;
    background: var(--background);
    color: var(--ink);
    font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.85;
}
a {
    color: inherit;
    text-decoration: none;
}
a:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}
main {
    width: min(1080px, calc(100% - 48px));
    margin: 0 auto;
}

/* ==================================================
   Hero — navy and gold
   ================================================== */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 340px;
    padding: 20px max(24px, calc((100% - 1080px) / 2)) 16px;
    background: var(--navy);
    color: #fff;
}
.hero::before,
.hero::after {
    position: absolute;
    content: "";
    pointer-events: none;
    border: 1px solid rgba(214, 179, 106, 0.18);
    border-radius: 50%;
}
.hero::before {
    width: 460px;
    height: 460px;
    top: -280px;
    right: -80px;
}
.hero::after {
    width: 340px;
    height: 340px;
    right: -20px;
    bottom: -270px;
}
.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    pointer-events: none;
    background-image: repeating-linear-gradient(135deg, transparent 0, transparent 38px, rgba(255, 255, 255, 0.12) 39px, transparent 40px);
}
.hero-nav,
.hero-content,
.hero-bottom {
    position: relative;
    z-index: 1;
}
.hero-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1080px;
    margin: 0 auto;
}
.home-link {
    padding: 5px 13px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    color: #f3e7cb;
    font-size: 13px;
}
.home-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.hero-label {
    color: var(--gold);
    font-family: Arial, sans-serif;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-align: right;
}
.hero-content {
    padding: 42px 0 34px;
    text-align: center;
}
.hero-cross {
    display: grid;
    width: 38px;
    height: 38px;
    margin: 0 auto 13px;
    place-items: center;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
    font-size: 19px;
}
.hero-kicker {
    margin: 0 0 8px;
    color: #d9c9a7;
    font-size: 13px;
    letter-spacing: 0.16em;
}
.hero h1 {
    margin: 0;
    color: #fffaf0;
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: clamp(30px, 5vw, 46px);
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.5;
}
.gold-rule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 17px auto 12px;
}
.gold-rule::before,
.gold-rule::after {
    width: 48px;
    height: 1px;
    background: var(--gold);
    content: "";
}
.gold-rule span {
    width: 6px;
    height: 6px;
    background: var(--gold);
    transform: rotate(45deg);
}
.hero-description {
    margin: 0;
    color: #d2dbe2;
    font-size: 13px;
    letter-spacing: 0.12em;
}
.hero-bottom {
    color: rgba(255, 255, 255, 0.48);
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-align: center;
}

/* ==================================================
   Shared section titles
   ================================================== */
.updates-section {
    margin: 38px 0 30px;
}
.section-title {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 18px;
}
.title-icon {
    display: grid;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    place-items: center;
    border-radius: 5px;
    font-family: Arial, sans-serif;
    font-size: 25px;
}
.updates-icon {
    background: #e9dfc9;
    color: #8a6a30;
}
.section-eyebrow {
    margin: 0 0 1px;
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.17em;
}
.section-title h2,
.library-intro h2 {
    margin: 0;
    color: var(--navy);
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.5;
}

/* ==================================================
   Recent updates — full-width panel
   ================================================== */
.updates-feature {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid #e2d9c7;
    border-top: 4px solid var(--gold);
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(54, 48, 35, 0.05);
}
.updates-intro {
    order: 2;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 24px;
    background: #eee5d3;
    border-top: 1px solid #e2d5bc;
}
.intro-mark {
    flex: 0 0 auto;
    height: auto;
    color: #b29152;
    font-family: Georgia, serif;
    font-size: 34px;
    line-height: 1.4;
}
.updates-intro p {
    margin: 0;
    color: #5e5546;
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 13px;
    line-height: 1.9;
}
.intro-caption {
    display: none;
}
.updates-content {
    order: 1;
    min-width: 0;
    padding: 20px 24px;
}
.updates-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--navy);
    color: var(--navy);
    font-size: 14px;
    font-weight: 600;
}
.updates-badge {
    padding: 3px 7px;
    background: var(--navy);
    color: var(--gold);
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 0.08em;
}
.updates-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.update-item {
    display: grid;
    grid-template-columns: 115px minmax(0, 1fr) 88px;
    align-items: center;
    column-gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid #eeeae2;
}
.update-item:last-child {
    border-bottom: none;
}
.update-book {
    color: #8a6a30;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.update-book:hover {
    color: var(--navy);
    text-decoration: underline;
}
.update-name {
    min-width: 0;
    color: #475664;
    font-size: 13px;
    overflow-wrap: anywhere;
}
.update-item time {
    color: #8a9299;
    font-family: Arial, sans-serif;
    font-size: 11px;
    text-align: right;
    white-space: nowrap;
}
.no-updates {
    color: var(--muted);
}

/* ==================================================
   Domain notice — gold accent
   ================================================== */
.announcement {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 30px 0 54px;
    padding: 19px 23px;
    background: #fff8e8;
    border: 1px solid #e8d5a8;
    border-left: 5px solid #bd9546;
    border-radius: 3px;
}
.announcement-symbol {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 50%;
    background: #bd9546;
    color: #fff;
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: bold;
}
.announcement-text strong {
    color: #7a5924;
    font-size: 15px;
}
.announcement-text p {
    margin: 4px 0 0;
    color: #665b48;
    font-size: 13px;
    overflow-wrap: anywhere;
}
.announcement-text a {
    color: #8c5f19;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.announcement-text .old-domain {
    color: #8c5f19;
    font-family: Arial, sans-serif;
}
.announcement-text .wechat-note {
    margin-top: 7px;
    color: #8c8271;
    font-size: 12px;
}

/* ==================================================
   Library introduction and category navigation
   ================================================== */
.library-section {
    margin-bottom: 48px;
}

.category-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 36px;
}
.category-nav a {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 17px;
    background: #fff;
    border: 1px solid var(--border);
    border-bottom: 3px solid var(--gold);
    color: var(--navy);
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
}
.category-nav a:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
}
.nav-number {
    color: #b18c48;
    font-family: Georgia, serif;
    font-size: 19px;
}

/* ==================================================
   Category panels
   ================================================== */
.category-section {
    margin: 0 0 34px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(25, 43, 58, 0.035);
    scroll-margin-top: 20px;
}
.category-heading {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.category-number {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    border-radius: 3px;
    color: #fff;
    font-family: Georgia, serif;
    font-size: 21px;
}
.category-en {
    margin: 0;
    font-family: Arial, sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.16em;
}
.category-heading h3 {
    margin: 0;
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 23px;
    font-weight: 600;
    line-height: 1.5;
}
.category-count {
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}
.old-section {
    border-top: 4px solid var(--old);
}
.old-section .category-number {
    background: var(--old);
}
.old-section .category-en {
    color: var(--old);
}
.new-section {
    border-top: 4px solid var(--new);
}
.new-section .category-number {
    background: var(--new);
}
.new-section .category-en {
    color: var(--new);
}
.topic-section {
    border-top: 4px solid var(--topic);
}
.topic-section .category-number {
    background: var(--topic);
}
.topic-section .category-en {
    color: var(--topic);
}

/* ==================================================
   Sermon directory — two-column index
   ================================================== */
.sermon-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px 24px 16px;
    column-gap: 28px;
}
.sermon-entry {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
    padding: 13px 5px;
    border-bottom: 1px solid #efefec;
    transition: background 0.18s, padding 0.18s;
}
.sermon-entry:hover {
    padding-right: 10px;
    padding-left: 10px;
    background: #f8f7f3;
}
.entry-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border: 2px solid #c3a365;
    border-radius: 50%;
}
.entry-content {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}
.entry-title {
    color: #344b5d;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.7;
    overflow-wrap: anywhere;
}
.entry-speaker {
    margin-top: 2px;
    color: #8b9298;
    font-size: 11px;
    line-height: 1.6;
}
.entry-arrow {
    flex: 0 0 auto;
    color: #b49a66;
    font-family: Arial, sans-serif;
    font-size: 17px;
    transition: transform 0.18s;
}
.sermon-entry:hover .entry-arrow {
    transform: translateX(4px);
}
.old-section .entry-dot {
    border-color: var(--old);
}
.new-section .entry-dot {
    border-color: var(--new);
}
.topic-section .entry-dot {
    border-color: var(--topic);
}

/* ==================================================
   Footer — return to navy
   ================================================== */
.site-footer {
    padding: 34px 20px 30px;
    background: var(--navy);
    color: #d8e0e6;
    text-align: center;
}
.footer-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--gold);
    font-size: 13px;
}
.footer-ornament span {
    width: 48px;
    height: 1px;
    background: rgba(214, 179, 106, 0.55);
}
.footer-title {
    margin: 9px 0 0;
    color: #fff8e9;
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 19px;
    letter-spacing: 0.08em;
}
.footer-english {
    margin: 3px 0 18px;
    color: #9cabb8;
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 0.14em;
}
.stats-link {
    display: inline-block;
    padding: 4px 15px;
    border: 1px solid rgba(214, 179, 106, 0.5);
    border-radius: 2px;
    color: #e4ca91;
    font-size: 12px;
}
.stats-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.visitor-count {
    margin: 11px 0 0;
    color: #9cabb8;
    font-family: Arial, sans-serif;
    font-size: 11px;
}

/* ==================================================
   Responsive
   ================================================== */
@media (max-width: 760px) {
    main {
        width: calc(100% - 32px);
    }
    .hero {
        min-height: 310px;
        padding-right: 20px;
        padding-left: 20px;
    }
    .updates-content {
        padding: 18px;
    }
    .updates-intro {
        padding: 16px 20px;
    }
    .sermon-list {
        column-gap: 18px;
        padding-right: 18px;
        padding-left: 18px;
    }
    .category-heading {
        padding: 17px 18px;
    }
}

@media (max-width: 520px) {
    body {
        font-size: 14px;
    }
    .hero {
        min-height: 280px;
        padding: 16px;
    }
    .hero-label {
        max-width: 160px;
        font-size: 8px;
        line-height: 1.6;
    }
    .hero-content {
        padding: 38px 0 30px;
    }
    .hero h1 {
        font-size: 30px;
        letter-spacing: 0.07em;
    }
    .hero-kicker {
        font-size: 11px;
        letter-spacing: 0.08em;
    }
    .hero-description {
        font-size: 11px;
    }
    main {
        width: calc(100% - 24px);
    }
    .updates-section {
        margin-top: 26px;
    }
    .section-title h2 {
        font-size: 23px;
    }
    .updates-content {
        padding: 15px 12px;
    }
    .updates-heading {
        gap: 8px;
        font-size: 13px;
    }
    .updates-badge {
        padding: 3px 5px;
        font-size: 8px;
    }
    .update-item {
        grid-template-columns: 76px minmax(0, 1fr) 76px;
        gap: 6px;
        padding: 10px 0;
    }
    .update-book {
        font-size: 12px;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .update-name {
        font-size: 12px;
    }
    .update-item time {
        font-size: 10px;
    }
    .updates-intro {
        gap: 9px;
        padding: 14px 15px;
    }
    .intro-mark {
        font-size: 27px;
    }
    .updates-intro p {
        font-size: 12px;
    }
    .announcement {
        gap: 11px;
        margin: 24px 0 38px;
        padding: 14px;
    }
    .announcement-symbol {
        width: 25px;
        height: 25px;
        flex-basis: 25px;
    }
    .library-intro {
        padding: 21px 18px;
    }
    .library-intro h2 {
        font-size: 25px;
    }
    .category-nav {
        gap: 7px;
        margin-bottom: 26px;
    }
    .category-nav a {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        padding: 10px;
        font-size: 13px;
    }
    .nav-number {
        font-size: 16px;
    }
    .category-section {
        margin-bottom: 25px;
    }
    .category-heading {
        gap: 11px;
        padding: 14px 12px;
    }
    .category-number {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        font-size: 18px;
    }
    .category-heading h3 {
        font-size: 20px;
    }
    .category-en {
        font-size: 8px;
        letter-spacing: 0.1em;
    }
    .category-count {
        font-size: 10px;
    }
    .sermon-list {
        grid-template-columns: 1fr;
        padding: 5px 14px 12px;
    }
    .sermon-entry {
        padding: 12px 3px;
    }
    .entry-title {
        font-size: 14px;
    }
    .site-footer {
        padding: 28px 12px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
