:root {
  --bg: #f5efe6;
  --bg-soft: #fbf7f1;
  --surface: rgba(255, 250, 244, 0.84);
  --surface-strong: rgba(255, 252, 248, 0.96);
  --surface-muted: rgba(244, 236, 227, 0.9);
  --text: #211611;
  --muted: #6b584d;
  --border: rgba(91, 65, 56, 0.18);
  --accent: #a9342c;
  --accent-strong: #7f1d18;
  --accent-soft: rgba(169, 52, 44, 0.12);
  --gold: #8f6d39;
  --gold-soft: rgba(143, 109, 57, 0.15);
  --ok: #22604f;
  --ok-soft: rgba(34, 96, 79, 0.14);
  --caution: #9a5d17;
  --caution-soft: rgba(154, 93, 23, 0.13);
  --high: #8a2d1f;
  --high-soft: rgba(138, 45, 31, 0.14);
  --critical: #6f1712;
  --critical-soft: rgba(111, 23, 18, 0.2);
  --shadow: 0 18px 48px rgba(53, 28, 20, 0.1);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --wrap: min(1120px, calc(100vw - 32px));
  --font-display-en: "DM Serif Display", serif;
  --font-body-en: "DM Sans", sans-serif;
  --font-display-zh: "Noto Serif SC", serif;
  --font-body-zh: "Noto Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(169, 52, 44, 0.13), transparent 30%),
    radial-gradient(circle at right 20%, rgba(143, 109, 57, 0.16), transparent 24%),
    linear-gradient(180deg, #f8f2ea 0%, #f3ece2 100%);
  min-height: 100vh;
}

body.locale-en {
  font-family: var(--font-body-en);
}

body.locale-zh {
  font-family: var(--font-body-zh);
}

body.locale-en h1,
body.locale-en h2,
body.locale-en h3,
body.locale-en h4,
body.locale-en .brand-mark,
body.locale-en .metric-value,
body.locale-en .score-number {
  font-family: var(--font-display-en);
}

body.locale-zh h1,
body.locale-zh h2,
body.locale-zh h3,
body.locale-zh h4,
body.locale-zh .brand-mark,
body.locale-zh .metric-value,
body.locale-zh .score-number {
  font-family: var(--font-display-zh);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

ul,
ol {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.7;
}

li + li {
  margin-top: 0.55rem;
}

main {
  padding-bottom: 72px;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(91, 65, 56, 0.1);
  background: rgba(245, 239, 230, 0.78);
}

.nav-inner,
.section-inner,
.footer-inner {
  width: var(--wrap);
  margin: 0 auto;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d66b4f 0%, #8f1d17 100%);
  box-shadow: 0 0 0 7px rgba(169, 52, 44, 0.12);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-mark {
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

.brand-subtitle {
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links a,
.lang-switch a,
.lang-switch span {
  font-size: 0.95rem;
  color: var(--muted);
}

.nav-links a:hover,
.lang-switch a:hover {
  color: var(--text);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 252, 247, 0.65);
}

.lang-switch .is-active {
  color: var(--text);
  font-weight: 700;
}

.section {
  padding: 32px 0;
}

.hero {
  padding: 42px 0 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 28px;
  align-items: stretch;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.eyebrow::before,
.section-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.hero h1,
.section-title {
  margin: 14px 0 16px;
  font-size: clamp(2.8rem, 6vw, 5.1rem);
  line-height: 0.94;
  letter-spacing: -0.03em;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.hero-lead,
.section-intro {
  max-width: 62ch;
  font-size: 1.08rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
button:hover {
  transform: translateY(-1px);
}

.button-primary,
button {
  background: linear-gradient(135deg, #b94836 0%, #8a231c 100%);
  color: #fff8f5;
  box-shadow: 0 16px 28px rgba(138, 35, 28, 0.2);
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 251, 246, 0.88);
  border: 1px solid var(--border);
}

.hero-meta,
.card-grid,
.article-grid,
.warning-grid,
.faq-grid,
.summary-grid,
.footer-grid {
  display: grid;
  gap: 16px;
}

.hero-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 32px;
}

.metric-card,
.content-card,
.warning-card,
.article-card,
.faq-card,
.summary-card,
.article-body,
.tool-form,
.result-panel,
.subscribe-card,
.blog-hero,
.article-hero,
.note-card,
.source-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card,
.content-card,
.warning-card,
.article-card,
.faq-card,
.summary-card,
.subscribe-card,
.note-card,
.source-card {
  padding: 22px;
}

.metric-label,
.mini-label,
.chip-note,
.article-meta,
.meta-row,
.detail-label {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.metric-value {
  font-size: 2rem;
  line-height: 1;
  margin: 10px 0 8px;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 32px;
  border: 1px solid rgba(127, 29, 24, 0.14);
  background:
    radial-gradient(circle at top right, rgba(185, 72, 54, 0.18), transparent 32%),
    linear-gradient(160deg, rgba(255, 250, 246, 0.98) 0%, rgba(246, 237, 229, 0.95) 100%);
  box-shadow: 0 24px 56px rgba(71, 33, 23, 0.12);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -30px -60px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(169, 52, 44, 0.18) 0%, rgba(169, 52, 44, 0) 70%);
}

.hero-panel > * {
  position: relative;
  z-index: 1;
}

.hero-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.hero-panel-title {
  font-size: 1.5rem;
  margin: 10px 0 12px;
}

.hero-pulse {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(127, 29, 24, 0.1) 0%, rgba(127, 29, 24, 0.02) 55%, transparent 56%),
    radial-gradient(circle, rgba(185, 72, 54, 0.6) 0%, rgba(185, 72, 54, 0.08) 46%, transparent 47%);
  position: relative;
}

.hero-pulse::before,
.hero-pulse::after {
  content: "";
  position: absolute;
  inset: 50%;
  border: 1px solid rgba(127, 29, 24, 0.2);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  animation: pulse-ring 2.6s ease-out infinite;
}

.hero-pulse::after {
  animation-delay: 1.3s;
}

@keyframes pulse-ring {
  0% {
    width: 20px;
    height: 20px;
    opacity: 0.9;
  }
  100% {
    width: 96px;
    height: 96px;
    opacity: 0;
  }
}

.mini-stack {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.mini-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 251, 247, 0.85);
  border: 1px solid rgba(91, 65, 56, 0.12);
}

.mini-card strong {
  font-size: 1rem;
}

.summary-grid,
.card-grid,
.warning-grid,
.article-grid,
.faq-grid,
.footer-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-title,
.article-card h3,
.warning-card h3,
.faq-card h3,
.content-card h3,
.summary-card h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 251, 247, 0.72);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
}

.chip.emphasis {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.tool-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: 18px;
  margin-top: 28px;
}

.tool-form {
  padding: 24px;
}

.tool-form form {
  display: grid;
  gap: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 9px;
}

.field label,
.field legend,
.group-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.field input[type="number"],
.field select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 252, 247, 0.92);
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
}

.field input:focus,
.field select:focus,
.chip-option input:focus + span {
  outline: none;
  border-color: rgba(169, 52, 44, 0.38);
  box-shadow: 0 0 0 4px rgba(169, 52, 44, 0.08);
}

.checkbox-group {
  display: grid;
  gap: 10px;
  padding: 0;
  border: none;
  margin: 0;
}

.option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-option {
  position: relative;
}

.chip-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.chip-option span {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 251, 247, 0.86);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.chip-option input:checked + span {
  background: rgba(169, 52, 44, 0.12);
  color: var(--accent-strong);
  border-color: rgba(169, 52, 44, 0.32);
  transform: translateY(-1px);
}

.group-hint {
  font-size: 0.92rem;
}

.tool-note {
  padding: 18px;
  border-radius: 18px;
  background: rgba(250, 246, 240, 0.85);
  border: 1px solid var(--border);
}

.result-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
  position: sticky;
  top: 92px;
}

.result-panel[data-state="idle"] .result-ready {
  display: none;
}

.result-panel[data-state="ready"] .result-placeholder {
  display: none;
}

.result-shell {
  display: grid;
  gap: 12px;
}

.score-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.score-number {
  font-size: clamp(3.4rem, 10vw, 5rem);
  line-height: 0.9;
}

.score-caption {
  font-size: 0.95rem;
  color: var(--muted);
}

.band-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
}

.result-panel.risk-low .band-pill,
.result-panel.risk-low .warning-item {
  background: var(--ok-soft);
  color: var(--ok);
}

.result-panel.risk-caution .band-pill,
.result-panel.risk-caution .warning-item {
  background: var(--caution-soft);
  color: var(--caution);
}

.result-panel.risk-high .band-pill,
.result-panel.risk-high .warning-item {
  background: var(--high-soft);
  color: var(--high);
}

.result-panel.risk-critical .band-pill,
.result-panel.risk-critical .warning-item {
  background: var(--critical-soft);
  color: var(--critical);
}

.score-bar {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(91, 65, 56, 0.12);
}

.score-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #347a68 0%, #ae6a24 45%, #9f2319 100%);
  transition: width 220ms ease;
}

.result-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 251, 247, 0.74);
  border: 1px solid var(--border);
}

.detail-title {
  margin: 0;
  font-size: 1.05rem;
}

.warning-list {
  display: grid;
  gap: 10px;
  list-style: none;
  padding: 0;
}

.warning-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 16px;
  font-weight: 600;
}

.warning-item::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  flex: 0 0 auto;
}

.warning-card,
.faq-card,
.article-card,
.content-card,
.summary-card {
  backdrop-filter: blur(8px);
}

.warning-card strong,
.article-card strong,
.content-card strong {
  color: var(--text);
}

.checklist-list {
  display: grid;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin-top: 22px;
}

.checklist-list li {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 251, 247, 0.76);
  border: 1px solid var(--border);
}

.checklist-list li::before {
  content: "";
  width: 11px;
  height: 11px;
  margin-top: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d97d53 0%, #8a231c 100%);
  box-shadow: 0 0 0 5px rgba(169, 52, 44, 0.11);
  flex: 0 0 auto;
}

.faq-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.faq-item {
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255, 251, 247, 0.78);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 22px;
  font-weight: 700;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 22px 20px;
}

.article-card {
  display: grid;
  gap: 14px;
}

.article-card p {
  margin-bottom: 4px;
}

.article-link {
  width: fit-content;
  font-weight: 700;
  color: var(--accent-strong);
}

.subscribe-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.footer {
  border-top: 1px solid rgba(91, 65, 56, 0.14);
  padding: 22px 0 40px;
}

.footer-grid {
  grid-template-columns: 1.4fr 1fr 1fr;
}

.footer p,
.footer li,
.footer a {
  font-size: 0.95rem;
}

.footer-list {
  list-style: none;
  padding: 0;
}

.footer-list li + li {
  margin-top: 0.45rem;
}

.muted-note,
.tiny-note {
  font-size: 0.92rem;
  color: var(--muted);
}

.tiny-note {
  font-size: 0.82rem;
}

.blog-hero,
.article-hero,
.article-body {
  padding: 28px;
}

.article-layout {
  display: grid;
  gap: 18px;
}

.article-hero h1 {
  margin: 16px 0 18px;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 0.96;
}

.article-body h2 {
  margin: 34px 0 14px;
  font-size: 1.7rem;
}

.article-body h3 {
  margin: 24px 0 10px;
  font-size: 1.2rem;
}

.article-body p + p,
.article-body p + ul,
.article-body ul + p,
.article-body h2 + p,
.article-body h3 + p {
  margin-top: 14px;
}

.article-body blockquote {
  margin: 18px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  border-radius: 0 18px 18px 0;
  background: rgba(169, 52, 44, 0.08);
  color: var(--text);
}

.article-body strong {
  color: var(--text);
}

.cta-panel {
  display: grid;
  gap: 16px;
  margin-top: 26px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(169, 52, 44, 0.08) 0%, rgba(143, 109, 57, 0.08) 100%);
  border: 1px solid rgba(169, 52, 44, 0.16);
}

.source-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.source-card a {
  color: var(--accent-strong);
  font-weight: 700;
}

.blog-list {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.article-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(143, 109, 57, 0.12);
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
}

.inline-link {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: rgba(127, 29, 24, 0.3);
}

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.centered {
  text-align: center;
  justify-items: center;
}

.split-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

@media (max-width: 1024px) {
  .hero-grid,
  .tool-shell,
  .summary-grid,
  .card-grid,
  .warning-grid,
  .article-grid,
  .footer-grid,
  .subscribe-card {
    grid-template-columns: 1fr;
  }

  .result-panel {
    position: static;
  }

  .nav-inner {
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }

  .section {
    padding: 26px 0;
  }

  .hero {
    padding-top: 24px;
  }

  .hero h1,
  .section-title,
  .article-hero h1 {
    letter-spacing: -0.02em;
  }

  .hero-meta,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .tool-form,
  .result-panel,
  .blog-hero,
  .article-hero,
  .article-body {
    padding: 20px;
  }

  .subscribe-card {
    align-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
