/*
   每日大赛官网 - 内容型站点样式
   配色：暗砖红 #B9473F / 暖琥珀 #D89A45 / 深炭黑灰 #1E2026
   仅使用系统字体与原生 CSS，无外部框架与字体依赖。
*/
:root {
    --brand: #B9473F;
    --brand-deep: #93372F;
    --amber: #D89A45;
    --amber-soft: #F3DFC1;
    --accent: #E06A3B;
    --ink: #1E2026;
    --text: #2B2D31;
    --muted: #6F706F;
    --paper: #F7F4EF;
    --paper-2: #EEE9E2;
    --paper-3: #E4DED5;
    --line: #D7D0C7;
    --white: #FFFFFF;
    --shadow: 0 18px 46px rgba(30, 32, 38, .10);
    --shadow-soft: 0 8px 28px rgba(30, 32, 38, .07);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --max: 1220px;
    --header-h: 78px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 0%, rgba(216, 154, 69, .08), transparent 26rem),
        linear-gradient(180deg, #FAF8F4 0%, var(--paper) 52%, #F4F0EA 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.72;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
::selection { background: rgba(185, 71, 63, .2); }

.section-shell { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }
.site-main { min-height: 62vh; }
.sr-only {
    position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important;
    margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
.skip-link {
    position: fixed; left: 18px; top: 14px; z-index: 9999; transform: translateY(-160%);
    padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--white); font-weight: 700;
}
.skip-link:focus { transform: none; }

/* Header */
.header-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }
.site-header {
    position: sticky; top: 0; z-index: 1000; min-height: var(--header-h);
    background: rgba(247, 244, 239, .93); border-bottom: 1px solid rgba(215, 208, 199, .74);
    backdrop-filter: blur(16px); transition: box-shadow .2s ease, background .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 28px rgba(30, 32, 38, .08); background: rgba(247, 244, 239, .98); }
.header-inner { min-height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: max-content; }
.brand img { width: 48px; height: 48px; object-fit: contain; border-radius: 13px; background: var(--paper-2); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; gap: 5px; }
.brand-copy strong { color: var(--ink); font-size: 1rem; letter-spacing: .01em; }
.brand-copy small { color: var(--muted); font-size: .72rem; }
.desktop-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.desktop-nav a { padding: 9px 11px; border-radius: 9px; color: #4F5052; font-size: .93rem; font-weight: 650; }
.desktop-nav a:hover, .desktop-nav a[aria-current="page"] { color: var(--brand); background: rgba(185, 71, 63, .08); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .menu-button, .button-reset { border: 0; background: transparent; cursor: pointer; }
.icon-button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 10px; border-radius: 10px; font-weight: 700; }
.icon-button:hover { background: var(--paper-2); }
.menu-button { display: none; width: 42px; height: 42px; border-radius: 10px; padding: 10px; }
.menu-button span:not(.sr-only) { display: block; width: 100%; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }
.mobile-nav { border-top: 1px solid var(--line); background: var(--paper); }
.mobile-nav[hidden] { display: none !important; }
.mobile-nav-inner { padding-block: 14px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mobile-nav a { padding: 12px 14px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); font-weight: 650; }

/* Shared typography */
.eyebrow { margin: 0 0 12px; color: var(--brand); font-size: .78rem; line-height: 1.2; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { color: var(--ink); line-height: 1.18; margin-top: 0; letter-spacing: -.025em; }
h1 { font-size: clamp(2.35rem, 5vw, 4.85rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.6rem); }
h3 { font-size: 1.18rem; }
p { margin-top: 0; }
.lead, .hero-lead { font-size: 1.08rem; color: #505155; line-height: 1.78; }
.section-heading { max-width: 760px; margin-bottom: 34px; }
.section-heading.narrow { max-width: 700px; }
.section-heading h2 { margin-bottom: 14px; }
.section-heading p:last-child { color: var(--muted); margin-bottom: 0; }

.button-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 18px;
    border-radius: 12px; border: 1px solid var(--brand); background: var(--brand); color: var(--white);
    font-weight: 780; cursor: pointer; transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
    box-shadow: 0 8px 20px rgba(185, 71, 63, .16);
}
.button:hover { transform: translateY(-1px); background: var(--brand-deep); box-shadow: 0 10px 24px rgba(185, 71, 63, .22); }
.button-secondary { background: transparent; color: var(--brand); box-shadow: none; }
.button-secondary:hover { background: rgba(185, 71, 63, .06); }
.text-link {
    display: inline-flex; align-items: center; gap: 7px; color: var(--brand); font-weight: 760;
    text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.text-link:hover { color: var(--brand-deep); }
.text-link span { transition: transform .18s ease; }
.text-link:hover span { transform: translateX(3px); }

/* Search modal */
.search-modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: start center; padding: 12vh 24px 40px; }
.search-modal[hidden] { display: none !important; }
.search-backdrop { position: absolute; inset: 0; background: rgba(30, 32, 38, .66); backdrop-filter: blur(6px); }
.search-dialog {
    position: relative; width: min(680px, 100%); padding: 34px; border-radius: 22px; background: var(--paper);
    box-shadow: 0 30px 90px rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.28);
}
.search-dialog h2 { margin-bottom: 10px; }
.search-dialog > p:not(.eyebrow) { color: var(--muted); }
.search-close {
    position: absolute; right: 16px; top: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0;
    background: var(--paper-2); font-size: 1.65rem; line-height: 1; cursor: pointer;
}
.search-form { margin-top: 24px; display: flex; gap: 10px; }
.search-form input {
    flex: 1; min-width: 0; min-height: 48px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px;
    background: var(--white); color: var(--ink); outline: none;
}
.search-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(185,71,63,.11); }

/* Home hero */
.home-hero { padding-top: 74px; padding-bottom: 66px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 58px; align-items: center; }
.hero-copy h1 { max-width: 760px; margin-bottom: 20px; }
.hero-lead { max-width: 720px; }
.hero-media { margin: 0; position: relative; }
.hero-media::before {
    content: ""; position: absolute; width: 74%; height: 74%; right: -18px; top: -20px; border-radius: 30px;
    background: linear-gradient(145deg, rgba(185,71,63,.20), rgba(216,154,69,.18)); transform: rotate(3deg); z-index: -1;
}
.hero-media img { width: 100%; aspect-ratio: 1.22 / 1; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); background: var(--paper-2); }
.hero-media figcaption { margin-top: 12px; color: var(--muted); font-size: .86rem; }
.hero-facts { margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hero-facts div { padding: 13px 0; border-top: 1px solid var(--line); }
.hero-facts dt { color: var(--muted); font-size: .76rem; }
.hero-facts dd { margin: 4px 0 0; color: var(--ink); font-weight: 720; font-size: .9rem; }

/* Home routes */
.home-routes { padding-block: 70px; }
.route-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.route-card { overflow: hidden; border-radius: var(--radius-md); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.route-card img { width: 100%; aspect-ratio: 1.55 / 1; object-fit: cover; background: var(--paper-2); }
.route-card-body { padding: 22px; }
.route-card h3 { margin-bottom: 10px; }
.route-card h3 a:hover { color: var(--brand); }
.route-card p { color: var(--muted); font-size: .94rem; min-height: 4.5em; }

/* Home editorial sections */
.home-editorial {
    margin-block: 18px; padding-block: 68px; border-top: 1px solid var(--line);
    display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center;
}
.home-editorial.has-media { grid-template-columns: 1.03fr .97fr; }
.home-editorial:nth-of-type(even).has-media .home-editorial-copy { order: 2; }
.home-editorial:nth-of-type(even).has-media .home-editorial-media { order: 1; }
.home-editorial-copy { max-width: 740px; }
.home-editorial-copy h2 { margin-bottom: 18px; }
.home-editorial-copy p { color: #4E4F52; }
.home-editorial-media { margin: 0; }
.home-editorial-media img { width: 100%; aspect-ratio: 1.52 / 1; object-fit: cover; border-radius: 22px; background: var(--paper-2); box-shadow: var(--shadow-soft); }
.inline-links { display: flex; flex-wrap: wrap; gap: 12px 18px; margin-top: 22px; }
.inline-links a { display: inline-flex; gap: 6px; align-items: center; color: var(--brand); font-weight: 750; }
.inline-links a:hover { color: var(--brand-deep); }
.home-faq { padding-block: 72px 90px; border-top: 1px solid var(--line); }
.center-link { margin-top: 26px; text-align: center; }


.home-question-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 980px; }
.home-question-list a { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.72); font-weight: 720; }
.home-question-list a:hover { color: var(--brand); border-color: rgba(185,71,63,.42); }
.home-question-list a span:last-child { color: var(--brand); }

/* Inner pages */
.breadcrumb { display: flex; gap: 9px; align-items: center; padding-top: 28px; color: var(--muted); font-size: .84rem; }
.breadcrumb a:hover { color: var(--brand); }
.inner-hero { padding-block: 52px 62px; display: grid; grid-template-columns: 1.04fr .96fr; align-items: center; gap: 54px; }
.inner-hero-copy h1 { margin-bottom: 20px; font-size: clamp(2.15rem, 4.4vw, 4.15rem); }
.inner-hero-media { margin: 0; }
.inner-hero-media img { width: 100%; aspect-ratio: 1.45 / 1; object-fit: cover; border-radius: 24px; background: var(--paper-2); box-shadow: var(--shadow-soft); }
.article-flow { border-top: 1px solid var(--line); }
.content-section { padding-block: 60px; border-bottom: 1px solid var(--line); }
.content-section-media { display: grid; grid-template-columns: 1.02fr .98fr; gap: 54px; align-items: center; }
.content-section-media:nth-child(even) .section-copy { order: 2; }
.content-section-media:nth-child(even) .section-media { order: 1; }
.section-copy { max-width: 820px; }
.section-copy h2 { margin-bottom: 19px; }
.section-copy p { color: #4A4B4E; }
.section-copy p:last-of-type { margin-bottom: 0; }
.section-media { margin: 0; }
.section-media img { width: 100%; aspect-ratio: 1.52 / 1; object-fit: cover; border-radius: 20px; background: var(--paper-2); box-shadow: var(--shadow-soft); }
.check-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.check-list li { position: relative; padding: 13px 16px 13px 44px; border-radius: 12px; background: rgba(238,233,226,.72); }
.check-list li::before { content: "✓"; position: absolute; left: 16px; top: 12px; color: var(--brand); font-weight: 900; }

.related { padding-block: 76px 88px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.related-card { padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.64); }
.related-card h3 { margin-bottom: 10px; }
.related-card h3 a:hover { color: var(--brand); }
.related-card p:not(.card-kicker) { color: var(--muted); font-size: .93rem; }
.card-kicker { margin-bottom: 8px; color: var(--amber); font-size: .76rem; font-weight: 850; letter-spacing: .08em; }

/* FAQ */
.faq-section { padding-block: 64px; }
.faq-list { display: grid; gap: 10px; }
.faq-list-compact { max-width: 940px; }
.faq-item { border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.74); overflow: hidden; }
.faq-item h3 { margin: 0; font-size: 1rem; }
.faq-question { width: 100%; border: 0; background: transparent; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; text-align: left; cursor: pointer; font-weight: 760; }
.faq-question:hover { background: rgba(238,233,226,.58); }
.faq-icon { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-2); color: var(--brand); font-size: 1.2rem; }
.faq-answer { padding: 0 20px 20px; color: var(--muted); }
.faq-answer[hidden] { display: none !important; }
.faq-answer p { margin-bottom: 12px; }

/* Search page */
.search-page { padding-block: 56px 90px; }
.search-page-head { max-width: 820px; }
.search-page-head h1 { margin-bottom: 16px; font-size: clamp(2.1rem, 4vw, 3.5rem); }
.search-page-head > p:last-child { color: var(--muted); }
.search-form-page { display: block; max-width: 800px; margin-block: 28px 44px; }
.search-form-page label { display: block; margin-bottom: 8px; font-weight: 760; }
.search-form-row { display: flex; gap: 10px; }
.search-empty { padding: 30px; border-radius: 18px; background: var(--paper-2); max-width: 820px; }
.search-empty h2 { font-size: 1.5rem; }
.tag-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.tag-links a { padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font-weight: 700; }
.tag-links a:hover { border-color: var(--brand); color: var(--brand); }
.search-results { display: grid; gap: 14px; max-width: 960px; }
.results-meta { margin-bottom: 8px; }
.results-meta h2 { font-size: 1.45rem; margin-bottom: 6px; }
.results-meta p { color: var(--muted); }
.search-result { padding: 24px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.72); }
.search-result h3 { margin-bottom: 8px; }
.search-result h3 a:hover { color: var(--brand); }
.search-result > p:not(.card-kicker) { color: var(--muted); }

/* 404 */
.error-panel { padding-block: 110px 130px; max-width: 840px; }
.error-code { margin-bottom: 8px; color: var(--brand); font-weight: 900; letter-spacing: .18em; }
.error-panel h1 { font-size: clamp(2.4rem, 6vw, 5rem); margin-bottom: 18px; }
.error-panel > p:not(.error-code) { max-width: 680px; color: var(--muted); font-size: 1.08rem; }

/* Footer */
.site-footer { margin-top: 20px; background: var(--ink); color: #DAD9D6; }
.footer-grid { padding-block: 58px 42px; display: grid; grid-template-columns: 1.45fr repeat(3, 1fr); gap: 42px; }
.brand-footer .brand-copy strong { color: var(--white); }
.brand-footer .brand-copy small { color: #AFAEAB; }
.footer-intro p { margin: 18px 0 0; max-width: 420px; color: #BDBCB8; font-size: .93rem; }
.footer-grid h2 { margin-bottom: 16px; color: var(--white); font-size: .92rem; letter-spacing: .05em; }
.footer-grid > div:not(.footer-intro) { display: flex; flex-direction: column; align-items: flex-start; }
.footer-grid > div:not(.footer-intro) a { margin: 4px 0; color: #C6C5C1; font-size: .9rem; }
.footer-grid a:hover { color: var(--amber); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-block: 22px 30px; border-top: 1px solid rgba(255,255,255,.1); color: #93928F; font-size: .82rem; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: #C6C5C1; }

/* Responsive */
@media (max-width: 1120px) {
    .desktop-nav { gap: 2px; }
    .desktop-nav a { padding-inline: 8px; font-size: .88rem; }
    .brand-copy small { display: none; }
    .home-hero { gap: 40px; }
    .route-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1.35fr repeat(3, 1fr); gap: 26px; }
}

@media (max-width: 960px) {
    :root { --header-h: 70px; }
    .desktop-nav { display: none; }
    .header-actions { margin-left: auto; }
    .menu-button { display: block; }
    .home-hero, .inner-hero { grid-template-columns: 1fr; }
    .home-hero { padding-top: 50px; }
    .hero-copy { max-width: 820px; }
    .hero-media { max-width: 780px; }
    .home-editorial.has-media, .content-section-media { grid-template-columns: 1fr; }
    .home-editorial.has-media .home-editorial-copy,
    .home-editorial:nth-of-type(even).has-media .home-editorial-copy,
    .content-section-media .section-copy,
    .content-section-media:nth-child(even) .section-copy { order: 1; }
    .home-editorial.has-media .home-editorial-media,
    .home-editorial:nth-of-type(even).has-media .home-editorial-media,
    .content-section-media .section-media,
    .content-section-media:nth-child(even) .section-media { order: 2; }
    .home-editorial-media, .section-media { max-width: 780px; }
    .inner-hero-media { max-width: 780px; }
    .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
    .footer-grid > div:last-child { grid-column: 2 / 4; }
}

@media (max-width: 760px) {
    .section-shell { width: min(calc(100% - 32px), var(--max)); }
    h1 { font-size: clamp(2.15rem, 10vw, 3.45rem); }
    h2 { font-size: clamp(1.55rem, 7vw, 2.15rem); }
    .button-label { display: none; }
    .header-inner { gap: 14px; }
    .brand img { width: 42px; height: 42px; }
    .route-grid, .related-grid { grid-template-columns: 1fr; }
    .home-question-list { grid-template-columns: 1fr; }
    .hero-facts { grid-template-columns: 1fr; }
    .hero-facts div { padding-block: 10px; }
    .home-routes, .home-editorial, .home-faq, .related { padding-block: 52px; }
    .inner-hero { padding-block: 40px 48px; gap: 30px; }
    .content-section { padding-block: 48px; }
    .search-form, .search-form-row { flex-direction: column; }
    .search-form .button { width: 100%; }
    .search-dialog { padding: 28px 22px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-intro { grid-column: 1 / 3; }
    .footer-grid > div:last-child { grid-column: auto; }
}

@media (max-width: 540px) {
    .section-shell { width: min(calc(100% - 24px), var(--max)); }
    .brand-copy strong { font-size: .92rem; }
    .icon-button { padding-inline: 8px; }
    .home-hero { padding-top: 38px; padding-bottom: 42px; }
    .hero-media::before { right: -6px; top: -10px; }
    .button-row { align-items: stretch; }
    .button-row .button { width: 100%; }
    .button-row .text-link { padding-block: 8px; }
    .route-card-body { padding: 18px; }
    .home-editorial, .content-section { gap: 26px; }
    .mobile-nav-inner { grid-template-columns: 1fr; }
    .breadcrumb { padding-top: 20px; }
    .inner-hero-copy h1 { font-size: clamp(2rem, 10vw, 2.9rem); }
    .search-modal { padding-inline: 12px; padding-top: 8vh; }
    .search-dialog { border-radius: 18px; }
    .faq-question { padding: 16px; }
    .faq-answer { padding: 0 16px 18px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-intro, .footer-grid > div:last-child { grid-column: auto; }
    .footer-bottom { flex-direction: column; }
}

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