:root {
  --ink: #17232c;
  --muted: #5e6d76;
  --paper: #ffffff;
  --canvas: #f4f7f6;
  --line: #dce4e2;
  --green: #087f6d;
  --green-dark: #075e52;
  --blue: #245aa6;
  --gold: #d99a2b;
  --shadow: 0 14px 36px rgba(23, 35, 44, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.site-header { background: var(--paper); }
.nav-shell { width: min(1180px, calc(100% - 40px)); height: 72px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 40px; background: var(--green); color: #fff; font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.nav-actions { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.nav-actions a:hover { color: var(--green); }
.nav-actions .admin-link { padding: 9px 14px; border: 1px solid var(--green); color: var(--green); }
.hero { position: relative; width: min(1440px, 100%); min-height: 520px; margin: 0 auto; overflow: hidden; isolation: isolate; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(9, 31, 39, .90) 0%, rgba(9, 31, 39, .72) 46%, rgba(9, 31, 39, .12) 100%); }
.hero-content { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 104px 0 116px; color: #fff; }
.hero-kicker, .eyebrow { margin: 0 0 10px; color: #69d4c3; font-size: 12px; font-weight: 800; letter-spacing: 0; }
.hero h1 { margin: 0; max-width: 760px; font-size: clamp(40px, 6vw, 72px); line-height: 1.1; letter-spacing: 0; }
.hero-content > p:not(.hero-kicker) { max-width: 640px; margin: 20px 0 28px; font-size: 18px; line-height: 1.8; color: rgba(255,255,255,.86); }
.hero-search { display: grid; grid-template-columns: minmax(0, 520px) 86px; width: min(606px, 100%); height: 52px; }
.hero-search input { min-width: 0; padding: 0 18px; border: 0; outline: 0; color: var(--ink); background: #fff; }
.hero-search input:focus { box-shadow: inset 0 0 0 3px rgba(105,212,195,.7); }
.hero-search button { border: 0; color: #fff; background: var(--green); cursor: pointer; font-weight: 700; }
.hero-search button:hover { background: var(--green-dark); }
.hero-stats { position: absolute; left: 50%; bottom: 0; width: min(1180px, calc(100% - 40px)); transform: translateX(-50%); display: flex; align-items: center; gap: 28px; padding: 18px 24px; color: #fff; background: rgba(5, 36, 41, .88); border-left: 4px solid var(--gold); backdrop-filter: blur(10px); }
.hero-stats span { display: flex; align-items: baseline; gap: 6px; font-size: 13px; color: rgba(255,255,255,.78); }
.hero-stats strong { font-size: 24px; color: #fff; }
.library { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 74px 0 84px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.section-heading h2, .about-band h2 { margin: 0; font-size: 34px; letter-spacing: 0; }
.section-note { margin: 8px 0 0; color: var(--muted); }
.filter-bar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.filter-bar button { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); background: var(--paper); color: var(--muted); cursor: pointer; }
.filter-bar button:hover, .filter-bar button.active { border-color: var(--green); background: var(--green); color: #fff; }
.result-line { min-height: 26px; margin-bottom: 14px; display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.result-line button { border: 0; background: none; color: var(--green); cursor: pointer; }
.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.case-card { display: grid; grid-template-columns: 42% 58%; min-height: 310px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.case-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.case-cover { position: relative; min-height: 100%; background: #dce8e6; overflow: hidden; }
.case-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.case-card:hover .case-cover img { transform: scale(1.035); }
.case-index { position: absolute; top: 14px; left: 14px; min-width: 36px; height: 28px; padding: 0 8px; display: grid; place-items: center; background: rgba(7, 94, 82, .92); color: #fff; font-size: 12px; font-weight: 800; }
.case-copy { min-width: 0; padding: 24px; display: flex; flex-direction: column; align-items: flex-start; }
.case-category { margin: 0 0 10px; color: var(--green); font-size: 12px; font-weight: 800; }
.case-card h3 { margin: 0; font-size: 20px; line-height: 1.45; }
.case-summary { margin: 12px 0; color: var(--muted); font-size: 14px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.case-meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px 12px; color: #73818a; font-size: 12px; }
.case-open { margin-top: 18px; padding: 0; border: 0; background: none; color: var(--blue); font-weight: 700; cursor: pointer; }
.case-open:hover { text-decoration: underline; }
.empty-state { padding: 64px 24px; text-align: center; border: 1px dashed #b9c8c5; background: var(--paper); }
.empty-state strong { font-size: 20px; }
.empty-state p { color: var(--muted); }
.about-band { padding: 62px max(20px, calc((100% - 1180px) / 2)); display: grid; grid-template-columns: .7fr 1.3fr; gap: 80px; align-items: start; color: #fff; background: #173d47; }
.about-band p:last-child { margin: 0; max-width: 720px; color: #d4e2e2; font-size: 16px; line-height: 1.9; }
.compliance { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 66px 0; }
.compliance h2 { margin: 0 0 24px; font-size: 24px; }
.compliance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.compliance-grid p { margin: 0; color: var(--muted); line-height: 1.8; font-size: 14px; }
.footer { padding: 28px max(20px, calc((100% - 1180px) / 2)); display: flex; justify-content: space-between; align-items: center; gap: 22px; color: #c7d2d3; background: #10282f; font-size: 13px; }
.footer-brand strong, .footer-brand span { display: block; }
.footer-brand span { margin-top: 5px; color: #8ea2a5; }
.footer-beian { display: flex; align-items: center; justify-content: flex-end; gap: 18px; flex-wrap: wrap; }
.footer-beian a { color: #dce6e7; }
.public-security-beian { display: inline-flex; align-items: center; gap: 6px; }
.public-security-beian img { width: 20px; height: 20px; object-fit: contain; flex: 0 0 20px; }
.case-dialog { width: min(820px, calc(100% - 28px)); max-height: min(86vh, 900px); padding: 0; border: 0; color: var(--ink); background: var(--paper); box-shadow: 0 30px 90px rgba(0,0,0,.32); }
.case-dialog::backdrop { background: rgba(5, 20, 25, .72); backdrop-filter: blur(3px); }
.dialog-close { position: sticky; z-index: 2; top: 12px; float: right; width: 38px; height: 38px; margin: 12px 12px -50px 0; border: 0; background: #fff; color: var(--ink); box-shadow: 0 2px 12px rgba(0,0,0,.12); cursor: pointer; font-size: 26px; line-height: 1; }
.dialog-hero { aspect-ratio: 16 / 7; background: #dce8e6; }
.dialog-hero img { width: 100%; height: 100%; object-fit: cover; }
.dialog-body { padding: 36px 42px 44px; }
.dialog-body h2 { margin: 8px 0 12px; font-size: 30px; line-height: 1.35; }
.dialog-meta { display: flex; gap: 8px 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.dialog-summary { margin: 24px 0; padding: 18px 20px; border-left: 3px solid var(--green); background: #eef5f3; color: #43545c; line-height: 1.8; }
.dialog-content-text { color: #3f4e56; line-height: 1.9; white-space: pre-line; }
.download-link { display: inline-flex; margin-top: 24px; padding: 11px 16px; background: var(--green); color: #fff; font-weight: 700; }

/* Admin */
.admin-page { min-height: 100vh; background: #eef3f2; }
.admin-shell { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 64px; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.admin-top h1 { margin: 0; font-size: 30px; }
.back-link { color: var(--green); }
.admin-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr); gap: 22px; align-items: start; }
.admin-panel { padding: 28px; background: #fff; border: 1px solid var(--line); }
.admin-panel h2 { margin: 0 0 20px; font-size: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #cdd8d6; background: #fff; padding: 11px 12px; outline: 0; }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(8,127,109,.12); }
.field small { color: var(--muted); }
.submit-row { margin-top: 22px; display: flex; align-items: center; gap: 14px; }
.primary-button { min-height: 44px; padding: 0 20px; border: 0; background: var(--green); color: #fff; cursor: pointer; font-weight: 700; }
.primary-button:disabled { opacity: .6; cursor: wait; }
.form-status { color: var(--muted); font-size: 13px; }
.admin-help { color: var(--muted); line-height: 1.8; font-size: 14px; }
.admin-help strong { color: var(--ink); }
.admin-list { display: grid; gap: 10px; }
.admin-item { padding: 12px; border: 1px solid var(--line); }
.admin-item strong { display: block; font-size: 13px; line-height: 1.5; }
.admin-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.delete-case { margin-top: 8px; padding: 0; border: 0; background: none; color: #b42318; cursor: pointer; font-size: 12px; }

@media (max-width: 900px) {
  .case-grid { grid-template-columns: 1fr; }
  .case-card { min-height: 280px; }
  .about-band { grid-template-columns: 1fr; gap: 20px; }
  .compliance-grid { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav-shell { width: calc(100% - 28px); height: 64px; }
  .brand strong { font-size: 15px; }
  .nav-actions > a:first-child { display: none; }
  .nav-actions { gap: 10px; }
  .hero { min-height: 500px; }
  .hero-content { width: calc(100% - 28px); padding-top: 82px; }
  .hero h1 { font-size: 40px; }
  .hero-content > p:not(.hero-kicker) { font-size: 16px; }
  .hero-search { grid-template-columns: minmax(0, 1fr) 72px; }
  .hero-stats { width: calc(100% - 28px); gap: 16px; padding: 14px; flex-wrap: wrap; }
  .hero-stats span:last-child { display: none; }
  .library { width: calc(100% - 28px); padding: 54px 0; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .filter-bar { justify-content: flex-start; }
  .case-card { grid-template-columns: 1fr; }
  .case-cover { aspect-ratio: 16 / 9; }
  .case-copy { padding: 20px; }
  .footer { align-items: flex-start; flex-direction: column; }
  .footer-beian { justify-content: flex-start; gap: 10px; }
  .dialog-body { padding: 28px 20px 34px; }
  .dialog-body h2 { font-size: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .admin-panel { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
