:root {
  --navy: #1a1a2e;
  --gold: #ffee58;
  --ink: #1a1a2e;
  --muted: #666;
  --muted-light: #ccc;
  --line: #e0e0ea;
  --surface: #f8f9fa;
  --white: #fff;
  --page-width: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--white); font-family: var(--font); }
a { color: inherit; }
.site-header { position: sticky; top: 0; z-index: 5; background: var(--navy); }
.nav-wrap { max-width: var(--page-width); height: 64px; padding: 0 24px; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.brand img { display: block; height: 32px; }
.desktop-nav { display: flex; align-items: center; gap: 28px; }
.desktop-nav a, .mobile-nav a { color: var(--muted-light); text-decoration: none; font-size: 14px; transition: color .15s ease; }
.desktop-nav a:hover, .mobile-nav a:hover, .desktop-nav a.active { color: var(--gold); }
.desktop-nav a.active { border-bottom: 2px solid var(--gold); padding-bottom: 5px; }
.menu-toggle { display: none; padding: 8px; color: #fff; background: none; border: 0; font-size: 23px; cursor: pointer; }
.mobile-nav { display: none; padding: 12px 24px 20px; background: #0e0e1e; }
.mobile-nav.open { display: flex; flex-direction: column; gap: 16px; }
.hero { padding: 72px 24px 58px; background: var(--surface); text-align: center; }
.hero-inner, .content-wrap, .footer-inner { width: min(100%, var(--page-width)); margin: auto; }
.eyebrow { margin: 0 0 14px; color: var(--muted); font-size: 12px; letter-spacing: .18em; }
h1 { margin: 0; font-size: clamp(32px, 5vw, 44px); line-height: 1.2; }
.hero p:last-child { max-width: 640px; margin: 18px auto 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.content-wrap { min-height: 360px; padding: 48px 24px 80px; }
.content-tools { display: flex; justify-content: flex-end; margin-bottom: 20px; }
.content-tools a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 24px; color: #555; font-size: 13px; text-decoration: none; }
.content-tools a:hover { border-color: var(--ink); color: var(--ink); }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.article-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.article-card:hover { transform: translateY(-3px); border-color: #c7c7d5; box-shadow: 0 12px 28px rgba(26,26,46,.08); }
.article-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface); }
.article-card-copy { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: #888; font-size: 12px; }
.article-card h2 { margin: 18px 0 10px; font-size: 20px; line-height: 1.45; }
.article-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.read-more { margin-top: auto; padding-top: 20px; font-size: 13px; font-weight: 600; }
.empty-state { max-width: 760px; margin: 0 auto; padding: 48px 32px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: center; }
.empty-icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 50%; background: #fff; font-size: 21px; }
.empty-state h2 { margin: 18px 0 10px; font-size: 22px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.article-detail { max-width: 820px; margin: 0 auto; }
.back-link { display: inline-block; margin-bottom: 22px; color: #666; font-size: 14px; text-decoration: none; }
.detail-title { margin: 0 0 16px; font-size: clamp(28px, 4vw, 40px); line-height: 1.35; }
.detail-meta { display: flex; gap: 14px; color: #888; font-size: 13px; }
.detail-cover { display: block; width: 100%; max-height: 520px; margin: 28px 0 34px; border-radius: 12px; object-fit: cover; }
.detail-body { color: #333; font-size: 17px; line-height: 1.95; overflow-wrap: anywhere; }
.detail-body p { margin: 0 0 22px; white-space: pre-line; }
.detail-body h2 { margin: 36px 0 14px; font-size: 25px; line-height: 1.5; }
.detail-body blockquote { margin: 26px 0; padding: 4px 0 4px 18px; border-left: 3px solid #d8c94a; color: #666; white-space: pre-line; }
.detail-body img { display: block; max-width: 100%; height: auto; margin: 26px auto; border-radius: 8px; }
.site-footer { padding: 24px; color: var(--muted-light); background: #0e0e1e; text-align: center; font-size: 13px; line-height: 1.8; }
.site-footer p { margin: 0; }
.site-footer a { color: inherit; }
@media (max-width: 900px) { .desktop-nav { gap: 16px; } .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .desktop-nav { display: none; } .menu-toggle { display: block; } .hero { padding: 54px 20px 44px; } .content-wrap { padding: 28px 18px 56px; } .article-grid { grid-template-columns: 1fr; gap: 14px; } .article-card-copy { padding: 20px; } .empty-state { padding: 36px 22px; } .detail-body { font-size: 16px; } }

.admin-wrap { width: min(100%, 960px); margin: auto; padding: 40px 24px 72px; }
.admin-panel { padding: 26px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgba(26,26,46,.04); }
.admin-panel + .admin-panel { margin-top: 22px; }
.admin-panel h2 { margin: 0 0 8px; font-size: 22px; }
.admin-help { margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.admin-form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field textarea, .field select { width: 100%; padding: 11px 12px; border: 1px solid #d4d4df; border-radius: 7px; color: var(--ink); background: #fff; font: inherit; font-size: 14px; }
.field textarea { min-height: 104px; resize: vertical; line-height: 1.7; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid #d8c94a; outline-offset: 1px; }
.admin-actions, .block-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 24px; color: #fff; background: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.button.secondary { color: var(--ink); background: #fff; }
.button:disabled { opacity: .55; cursor: wait; }
.status-message { min-height: 20px; margin: 0; color: #346b45; font-size: 13px; }
.status-message.error { color: #a33232; }
.block-editor { display: grid; gap: 14px; }
.content-block { padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: #fbfbfd; }
.block-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.remove-block { padding: 5px 9px; border: 1px solid #ddd; border-radius: 18px; color: #777; background: white; cursor: pointer; }
.image-preview { display: block; max-width: min(100%, 420px); max-height: 280px; margin-top: 12px; border-radius: 7px; object-fit: contain; background: #eee; }
.article-admin-list { display: grid; gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.article-admin-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
.article-admin-row strong { font-size: 14px; }
.article-admin-row span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.admin-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.admin-topline h1 { font-size: 30px; }
.password-settings { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.password-settings summary { color: #555; font-size: 13px; cursor: pointer; }
.password-settings form { margin-top: 16px; }
@media (max-width: 680px) { .admin-wrap { padding: 26px 16px 52px; } .admin-panel { padding: 20px; } .form-grid { grid-template-columns: 1fr; } .admin-topline { align-items: flex-start; } .admin-topline h1 { font-size: 24px; } .article-admin-row { align-items: flex-start; flex-direction: column; gap: 5px; } }
.traffic-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.traffic-toolbar .admin-help { max-width: 640px; margin: 8px 0 0; }
.traffic-actions { flex-wrap: wrap; align-items: center; }
.traffic-actions label { color: var(--muted); font-size: 14px; }
.traffic-actions select { min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.traffic-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 20px 0; }
.traffic-stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #f9fafc; }
.traffic-stat strong { display: block; color: var(--ink); font-size: 22px; }
.traffic-stat span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.traffic-table-wrap { overflow: auto; max-height: 680px; border: 1px solid var(--line); border-radius: 10px; }
.traffic-table { width: 100%; min-width: 1420px; border-collapse: collapse; font-size: 12px; }
.traffic-table th, .traffic-table td { padding: 10px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.traffic-table th { position: sticky; top: 0; z-index: 1; background: #f4f6f9; color: #526071; font-weight: 650; }
.traffic-table td { max-width: 240px; color: #334155; overflow-wrap: anywhere; }
.traffic-table td small, .traffic-table td details { display: block; margin-top: 4px; color: var(--muted); }
.traffic-table td details summary { cursor: pointer; }
.traffic-table code { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 860px) { .traffic-toolbar { flex-direction: column; } .traffic-actions { justify-content: flex-start; } }
.field[hidden] { display: none; }
.button.danger { color: #a33a3a; border-color: #e6b7b7; }
.button.danger:hover { background: #fff5f5; }
.test-search { max-width: 820px; margin: 0 auto 22px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.test-search label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 14px; font-weight: 650; }
.test-search-row { display: flex; gap: 10px; }
.test-search-row input { flex: 1; min-width: 0; min-height: 42px; padding: 9px 12px; border: 1px solid #d4d4df; border-radius: 8px; color: var(--ink); font: inherit; }
.test-search-row input:focus { outline: 2px solid #d8c94a; outline-offset: 1px; }
.test-search-row .button[hidden] { display: none; }
.test-search > p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.qa-result-count { max-width: 820px; margin: 0 auto 12px; color: var(--muted); font-size: 13px; }
.qa-grid { display: grid; max-width: 1040px; margin: 0 auto; gap: 14px; }
.qa-card { display: grid; gap: 5px; padding: 16px 24px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: inherit; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.qa-card:hover { transform: translateY(-2px); border-color: #c7c7d5; box-shadow: 0 10px 24px rgba(26,26,46,.07); }
.qa-label { margin: 0; color: #7a6a13; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.qa-card h2 { margin: 0; color: var(--ink); font-size: 20px; line-height: 1.5; }
.qa-title-button { display: inline; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.qa-title-button:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.qa-title-button:focus-visible { outline: 2px solid #d8c94a; outline-offset: 3px; }
.qa-title-button::after { content: '⌄'; display: inline-block; margin-left: 8px; color: #8991a3; font-size: 15px; transition: transform .18s ease; }
.qa-title-button[aria-expanded="true"]::after { transform: rotate(180deg); }
.qa-card-answer { max-height: calc(1.8em * 2); margin: 0; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.8; }
.qa-card-answer p { margin: 0; }
.qa-card-answer p + p { margin-top: .55em; }
.qa-card-answer.expanded { max-height: none; overflow: visible; }
.qa-detail { max-width: 820px; margin: 0 auto; padding: 28px clamp(20px, 4vw, 38px); border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.qa-detail .qa-label { margin: 0 0 8px; }
.qa-answer-detail { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.qa-answer-detail h2 { margin: 0 0 10px; color: #62728a; font-size: 15px; }
.qa-answer-detail .detail-body { font-size: 17px; }
@media (max-width: 680px) { .test-search { padding: 16px; } .test-search-row { flex-wrap: wrap; } .test-search-row input { flex-basis: 100%; } .qa-card { padding: 15px 19px; } .qa-card h2 { font-size: 18px; } .qa-detail { padding: 24px 20px; } }
