/*
Theme Name: 出海雷达
Description: 出海雷达跨境电商公开情报前台主题。
Version: 0.4.1
Requires at least: 6.8
Requires PHP: 8.2
*/

:root {
  --ink: #122033;
  --muted: #5b6879;
  --brand: #075985;
  --brand-deep: #083344;
  --brand-soft: #e7f7fb;
  --accent: #ea580c;
  --surface: #f6f8fa;
  --line: #dbe2e8;
  --warning: #b54708;
  --danger: #b42318;
  --radius: 18px;
  --shadow: 0 18px 60px rgb(15 40 55 / 8%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #fff; font: 16px/1.75 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
button, input { font: inherit; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 1000; padding: 10px 16px; background: #fff; }
.skip-link:focus { top: 12px; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgb(219 226 232 / 80%); background: rgb(255 255 255 / 94%); backdrop-filter: blur(14px); }
.header-inner { min-height: 78px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--brand-deep); font-size: 1.06rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.brand-logo { width: 46px; height: 46px; object-fit: contain; flex: 0 0 auto; }
.brand-name { font-size: 1.12rem; letter-spacing: -.02em; }
.menu { display: flex; align-items: center; gap: 22px; padding: 0; margin: 0; list-style: none; }
.menu a { color: #344054; font-size: .92rem; font-weight: 650; text-decoration: none; }
.header-search, .hero-search { display: flex; gap: 8px; }
.header-search input, .hero-search input { min-width: 230px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; }
.header-search button, .hero-search button, .button { padding: 10px 17px; border: 0; border-radius: 10px; color: #fff; background: var(--brand); font-weight: 750; text-decoration: none; cursor: pointer; }
.site-main { min-height: 65vh; padding-block: 52px 76px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .65fr); gap: 64px; align-items: center; padding: 56px; border-radius: 28px; color: #fff; background: radial-gradient(circle at 10% 20%, #0e7490, transparent 42%), linear-gradient(135deg, #083344, #082f49 65%, #0c4a6e); box-shadow: var(--shadow); }
.eyebrow { margin: 0 0 8px; color: #0e7490; font-size: .75rem; font-weight: 850; letter-spacing: .14em; }
.hero .eyebrow { color: #a5f3fc; }
.hero h1 { margin: 0; max-width: 780px; font-size: clamp(2.45rem, 5.8vw, 5.25rem); line-height: 1.04; letter-spacing: -.045em; }
.hero-copy { max-width: 670px; margin: 24px 0; color: #dff6fb; font-size: 1.08rem; }
.hero-search input { width: min(440px, 64vw); }
.hero-search button { color: var(--brand-deep); background: #fff; }
.trust-panel { padding: 28px; border: 1px solid rgb(255 255 255 / 20%); border-radius: var(--radius); background: rgb(255 255 255 / 8%); }
.trust-panel strong { font-size: 1.08rem; }
.trust-panel ol { padding-left: 1.4rem; margin-bottom: 0; color: #dff6fb; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 72px 0 24px; }
.section-heading h2, .browse-panel h2, .sources-section h2 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.2; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { min-width: 0; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 8px 30px rgb(15 40 55 / 5%); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h2 { margin: 16px 0 10px; font-size: 1.22rem; line-height: 1.42; }
.card h2 a { color: var(--ink); text-decoration: none; }
.card p { color: var(--muted); }
.card-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 22px; color: var(--muted); font-size: .84rem; }
.read-more { font-weight: 750; white-space: nowrap; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; align-items: center; min-height: 27px; padding: 3px 9px; border-radius: 99px; color: #075985; background: var(--brand-soft); font-size: .78rem; font-weight: 750; }
.badge-neutral { color: #475467; background: #f2f4f7; }
.risk-high, .risk-critical { color: #9a3412; background: #ffedd5; }
.risk-critical { color: #991b1b; background: #fee2e2; }
.risk-low { color: #166534; background: #dcfce7; }
.browse-panel { display: grid; grid-template-columns: .7fr 1.3fr; gap: 64px; margin-top: 76px; padding: 42px; border-radius: 24px; background: var(--surface); }
.browse-panel p { color: var(--muted); }
.browse-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.browse-groups h3 { margin-top: 0; }
.term-link { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.term-link span { color: var(--muted); }
.listing-header, .article-header { min-width: 0; max-width: 900px; margin-bottom: 38px; }
.listing-header h1, .article-header h1 { margin: 4px 0 14px; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.13; letter-spacing: -.035em; overflow-wrap: anywhere; word-break: break-word; }
.listing-header p, .article-times { color: var(--muted); }
.breadcrumbs { display: flex; gap: 9px; margin-bottom: 32px; color: var(--muted); font-size: .88rem; overflow: hidden; white-space: nowrap; }
.breadcrumbs [aria-current] { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.article-header .badge-row { margin-bottom: 18px; }
.article-times { display: flex; flex-wrap: wrap; gap: 16px; font-size: .9rem; }
.classification-panel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-bottom: 46px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.classification-panel div { min-width: 0; padding: 18px; background: var(--surface); }
.classification-panel span, .classification-panel strong { display: block; }
.classification-panel span { color: var(--muted); font-size: .8rem; }
.classification-panel strong { margin-top: 5px; font-size: .95rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, 820px) minmax(240px, 1fr); gap: 64px; align-items: start; }
.article-body { font-size: 1.05rem; }
.article-body section { margin-block: 38px; }
.article-body h2 { margin-top: 0; font-size: 1.55rem; line-height: 1.3; }
.article-body li + li { margin-top: 10px; }
.article-body small { color: var(--muted); }
.answer-card { padding: 28px; border: 1px solid #a5d8e5; border-radius: var(--radius); background: linear-gradient(135deg, #ecfeff, #f0f9ff); }
.answer-card h2 { color: #0e7490; font-size: .85rem; letter-spacing: .08em; }
.answer-card p { margin-bottom: 0; font-size: 1.12rem; font-weight: 630; }
.uncertainties { padding: 24px; border-left: 4px solid var(--warning); border-radius: 0 14px 14px 0; background: #fffaeb; }
.article-aside { position: sticky; top: 108px; display: grid; gap: 14px; }
.aside-card { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.aside-card p { color: var(--muted); font-size: .9rem; }
.sources-section { margin-top: 56px; padding-top: 36px; border-top: 1px solid var(--line); }
.source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.source-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: 15px; }
.source-card-head { display: flex; justify-content: space-between; gap: 16px; }
.source-card h3 { margin: 0; font-size: 1rem; }
.source-card-head span { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.source-card dl div { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: .84rem; }
.source-card dt { color: var(--muted); }
.source-card dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.policy-page { max-width: 800px; }
.case-form { display: grid; gap: 20px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.case-form label { display: grid; gap: 7px; font-weight: 700; }
.case-form input, .case-form textarea { width: 100%; padding: 11px 13px; border: 1px solid #cbd5e1; border-radius: 9px; color: var(--ink); background: #fff; font: inherit; }
.case-form small, .form-note { color: var(--muted); font-size: .84rem; font-weight: 400; }
.case-form button { width: fit-content; padding: 11px 20px; border: 0; border-radius: 9px; color: #fff; background: var(--brand); font-weight: 800; cursor: pointer; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.empty-state, .status-page { padding: 64px 32px; border-radius: var(--radius); text-align: center; background: var(--surface); }
.empty-inline, .muted { color: var(--muted); }
.status-code { margin: 0; color: #cbd5e1; font-size: 5rem; font-weight: 900; line-height: 1; }
.status-page h1 { font-size: 2.2rem; }
.status-page .button { display: inline-block; margin-top: 16px; }
.pagination { margin-top: 38px; }
.nav-links { display: flex; gap: 8px; }
.page-numbers { display: grid; min-width: 38px; min-height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; }
.page-numbers.current { color: #fff; border-color: var(--brand); background: var(--brand); }
.site-footer { color: #dcebf0; background: var(--brand-deep); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 54px; padding-block: 46px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo { width: 52px; height: 52px; object-fit: contain; flex: 0 0 auto; }
.footer-brand strong { font-size: 1.05rem; }
.footer-grid p { max-width: 440px; color: #a9c8d2; }
.footer-grid nav { display: grid; align-content: start; gap: 8px; }
.footer-grid a { color: #dcebf0; text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-block: 18px; border-top: 1px solid rgb(255 255 255 / 12%); color: #91b7c2; font-size: .82rem; }
.footer-filing { padding: 0 0 18px; text-align: center; font-size: .82rem; }
.footer-filing a { color: #a9c8d2; text-decoration: none; }
.footer-filing a:hover, .footer-filing a:focus-visible { color: #fff; text-decoration: underline; }

@media (max-width: 980px) {
  .header-inner { grid-template-columns: auto 1fr; }
  .header-search { display: none; }
  .hero { grid-template-columns: 1fr; padding: 42px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .browse-panel, .article-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; grid-template-columns: repeat(2, 1fr); }
  .classification-panel { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .shell { width: min(100% - 28px, 1180px); }
  .site-header { position: static; }
  .header-inner { min-height: auto; padding-block: 14px; grid-template-columns: 1fr; gap: 12px; }
  .menu { flex-wrap: wrap; gap: 8px 16px; }
  .site-main { padding-block: 28px 54px; }
  .hero { padding: 28px 22px; border-radius: 20px; }
  .hero h1 { font-size: 2.65rem; }
  .listing-header h1, .article-header h1 { font-size: clamp(2rem, 9.5vw, 2.5rem); }
  .hero-search { flex-direction: column; }
  .hero-search input { width: 100%; min-width: 0; }
  .card-grid, .source-grid, .browse-groups, .footer-grid { grid-template-columns: 1fr; }
  .browse-panel { padding: 28px 22px; gap: 28px; }
  .classification-panel { grid-template-columns: 1fr; }
  .article-aside { grid-template-columns: 1fr; }
  .card-footer, .source-card-head, .footer-bottom { align-items: flex-start; flex-direction: column; }
  .footer-grid { gap: 24px; }
}
