
:root {
  color-scheme: light;
  --ink: #172233;
  --muted: #66758a;
  --line: #dce3eb;
  --surface: #ffffff;
  --canvas: #f3f6f9;
  --primary: #164c7e;
  --primary-deep: #0d365d;
  --primary-soft: #eaf3fa;
  --warm: #a55b13;
  --warm-soft: #fff4e8;
  --danger: #b42318;
  --focus: #f5a623;
  --shadow: 0 18px 48px rgba(21, 46, 75, 0.09);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.6;
}

button, input { font: inherit; }

.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.hero {
  color: #fff;
  background: var(--primary-deep);
  border-bottom: 5px solid #d59a45;
}

.hero__inner { padding-block: 54px 48px; }
.hero__topline { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 8px; }
.hero__topline .eyebrow { margin-bottom: 0; }
.language-switch { display: inline-flex; padding: 3px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(5,28,50,.3); }
.language-switch button { min-height: 36px; padding: 5px 13px; border: 0; border-radius: 999px; color: #d5e3ef; background: transparent; cursor: pointer; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.language-switch button[aria-pressed="true"] { color: var(--primary-deep); background: #fff; }
.language-switch button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.eyebrow {
  margin: 0 0 8px;
  color: #d8aa68;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 12px; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.15; letter-spacing: -0.03em; }
.hero__copy { max-width: 680px; margin-bottom: 20px; color: #d5e3ef; font-size: 1.05rem; }
.source-chip { display: inline-flex; margin: 0; padding: 7px 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: #d9e7f2; font-size: .82rem; }

.main-layout { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(360px, .94fr); gap: 24px; align-items: start; padding-block: 34px; }
.panel { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.controls-panel { padding: 28px; }
.results-panel { position: sticky; top: 20px; padding: 28px; color: #eef6fc; background: var(--primary-deep); border-color: var(--primary-deep); }

.section-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 26px; }
.section-heading h2 { margin-bottom: 3px; font-size: 1.28rem; line-height: 1.3; }
.section-heading p { margin: 0; color: var(--muted); font-size: .9rem; }
.section-heading--light p { color: #bcd0e1; }
.step { display: grid; flex: 0 0 38px; height: 38px; place-items: center; border-radius: 10px; color: var(--primary); background: var(--primary-soft); font-size: .78rem; font-weight: 800; }

.field-block { margin-bottom: 26px; }
.field-label, legend { display: block; margin-bottom: 9px; color: var(--ink); font-weight: 800; }
.area-input-wrap { display: flex; align-items: center; border: 1px solid #b8c5d2; border-radius: 12px; background: #fff; overflow: hidden; }
.area-input-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,76,126,.14); }
.area-input-wrap input { width: 100%; min-width: 0; height: 52px; padding: 0 14px; border: 0; outline: 0; color: var(--ink); font-size: 1.12rem; font-weight: 700; }
.area-input-wrap span { padding: 0 16px; color: var(--muted); border-left: 1px solid var(--line); }
.field-help, .field-error { margin: 7px 0 0; font-size: .82rem; }
.field-help { color: var(--muted); }
.field-error { color: var(--danger); font-weight: 700; }
.field-error:empty { display: none; }
input[aria-invalid="true"] { background: #fff6f5; }

.choice-group { margin: 0 0 26px; padding: 0; border: 0; }
.choice-group:last-child { margin-bottom: 0; }
.choice-grid { display: grid; gap: 10px; }
.choice-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-card { position: relative; min-width: 0; cursor: pointer; }
.choice-card input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice-card span { display: flex; min-height: 74px; flex-direction: column; justify-content: center; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.choice-card strong { font-size: .91rem; line-height: 1.35; }
.choice-card small { margin-top: 4px; color: var(--muted); font-size: .72rem; line-height: 1.35; }
.choice-card--compact span { min-height: 52px; text-align: center; }
.choice-card input:checked + span { border-color: var(--primary); color: var(--primary-deep); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.choice-card input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.primary-result { padding: 24px; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; background: rgba(255,255,255,.08); }
.rate-status { margin: -10px 0 16px 52px; padding: 9px 12px; border-left: 3px solid #d7a04f; color: #dce9f3; background: rgba(255,255,255,.07); font-size: .75rem; line-height: 1.45; }
.rate-status[data-state="cache"], .rate-status[data-state="unavailable"] { color: #ffe1b8; background: rgba(165,91,19,.22); }
.rate-status[hidden] { display: none; }
.primary-result p { margin-bottom: 3px; color: #c8dbea; font-size: .88rem; }
.primary-result strong { display: block; margin-bottom: 3px; color: #fff; font-size: clamp(2.15rem, 5vw, 3.35rem); line-height: 1.12; letter-spacing: -0.04em; }
.primary-result span { color: #bcd0e1; font-size: .78rem; }
.breakdown { margin-top: 24px; }
.breakdown h3 { margin-bottom: 9px; color: #fff; font-size: .96rem; }
.breakdown dl { margin: 0; }
.breakdown dl div { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.breakdown dt { color: #bcd0e1; font-size: .83rem; }
.breakdown dd { margin: 0; color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; }
.empty-state { margin: 18px 0 0; padding: 11px 13px; border-radius: 9px; color: #6c4519; background: #ffe8c7; font-size: .82rem; }
.empty-state[hidden] { display: none; }

.notes { padding-block: 12px 54px; }
.notes__heading { margin-bottom: 18px; }
.notes__heading .eyebrow { color: var(--warm); }
.notes__heading h2 { font-size: 1.45rem; }
.notes__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.notes article { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.notes article h3 { margin-bottom: 8px; font-size: .95rem; }
.notes article p { margin: 0; color: var(--muted); font-size: .84rem; }
.disclaimer { margin: 16px 0 0; padding: 13px 16px; border-left: 4px solid var(--warm); color: #70461c; background: var(--warm-soft); font-size: .84rem; }
.footer { color: #aebdca; background: #112b45; }
.footer .shell { display: flex; justify-content: space-between; gap: 20px; padding-block: 20px; font-size: .75rem; }

@media (max-width: 860px) {
  .main-layout { grid-template-columns: 1fr; }
  .results-panel { position: static; }
  .notes__grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 24px, 1180px); }
  .hero__inner { padding-block: 38px 34px; }
  .hero__topline { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .hero__topline .eyebrow { max-width: 150px; }
  .language-switch { flex-shrink: 0; margin-left: auto; }
  .language-switch button { min-height: 34px; padding-inline: 10px; }
  .hero__copy { font-size: .94rem; }
  .main-layout { gap: 14px; padding-block: 18px; }
  .controls-panel, .results-panel { padding: 20px; border-radius: 14px; }
  .choice-grid--three { grid-template-columns: 1fr 1fr; }
  .choice-grid--three .choice-card:last-child { grid-column: 1 / -1; }
  .rate-status { margin-left: 0; }
  .footer .shell { flex-direction: column; gap: 2px; }
}

html[lang="fr"], html[lang="en"] { font-family: Arial, "Segoe UI", sans-serif; }
html[lang="fr"] .choice-card strong, html[lang="en"] .choice-card strong { font-size: .82rem; }
html[lang="fr"] .choice-card--compact span, html[lang="en"] .choice-card--compact span { min-height: 64px; }

@media (max-width: 560px) {
  html[lang="fr"] .hero__topline .eyebrow, html[lang="en"] .hero__topline .eyebrow { max-width: 185px; font-size: .68rem; letter-spacing: .11em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  .hero { border-bottom-width: 2px; }
  .panel { box-shadow: none; }
  .results-panel { break-inside: avoid; }
}

    