:root {
  --ink: #17332d;
  --muted: #64736e;
  --paper: #f7f4eb;
  --paper-deep: #eee9db;
  --white: #fffdf7;
  --green: #153f36;
  --green-2: #1e5a4c;
  --mint: #bcd8c8;
  --lime: #dfe9a8;
  --orange: #df744a;
  --sand: #ddb97d;
  --line: rgba(23, 51, 45, 0.13);
  --shadow: 0 20px 60px rgba(28, 54, 47, 0.1);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
.language-switch{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:0 13px;border:1px solid var(--line);border-radius:999px;background:var(--white);color:var(--green);font-size:13px;font-weight:800;text-decoration:none}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 5% 2%, rgba(223, 233, 168, 0.45), transparent 25rem),
    linear-gradient(180deg, #faf8f1 0%, var(--paper) 35%, #f1ede2 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.topbar {
  width: min(1440px, calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--paper);
  border-radius: 50% 50% 50% 12px;
  background: var(--green);
  font-family: "Songti SC", SimSun, serif;
}

.brand small {
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.privacy-pill,
.sample-badge,
.score-label,
.section-status,
.ai-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  white-space: nowrap;
}

.privacy-pill {
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 253, 247, 0.58);
  font-size: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #55a267;
  box-shadow: 0 0 0 4px rgba(85, 162, 103, 0.12);
}

.ghost-button,
.text-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ghost-button {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
}

.ghost-button:hover {
  border-color: var(--green);
}

main {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  min-height: 330px;
  display: flex;
  align-items: end;
  padding: 68px 2vw 54px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 720px;
  font-family: "Songti SC", "STSong", SimSun, serif;
  font-size: clamp(44px, 6vw, 82px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.hero h1 span {
  color: var(--green-2);
}

.hero-copy {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(360px, 0.76fr) minmax(560px, 1.24fr);
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 247, 0.76);
  box-shadow: var(--shadow);
  overflow: clip;
}

.input-panel {
  padding: 34px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(rgba(255, 253, 247, 0.92), rgba(255, 253, 247, 0.92)),
    repeating-linear-gradient(0deg, transparent, transparent 35px, var(--line) 36px);
}

.panel-heading,
.report-header,
.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

.panel-heading h2,
.report-header h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", SimSun, serif;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.sample-badge {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--green);
  background: var(--mint);
  font-size: 11px;
  font-weight: 700;
}

form {
  margin-top: 30px;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(247, 244, 235, 0.82);
}

.mode-button {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.mode-button.is-active {
  color: var(--white);
  background: var(--green);
  box-shadow: 0 4px 12px rgba(30, 90, 76, 0.16);
}

.mode-button:focus-visible {
  outline: 3px solid rgba(30, 90, 76, 0.18);
  outline-offset: 2px;
}

.mode-help {
  margin: 8px 2px 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

form[data-form-mode="simple"] [data-mode-level="advanced"] {
  display: none;
}

fieldset {
  margin: 0;
  padding: 24px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

legend {
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

legend span,
details summary b {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  margin-right: 8px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--orange);
  font-size: 11px;
}

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

label {
  min-width: 0;
}

label > span:first-child {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.field-help {
  display: block;
  min-height: 16px;
  margin-top: 5px;
  color: #87918d;
  font-size: 10px;
  line-height: 1.45;
}

.money-input,
.suffix-input {
  min-height: 45px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(247, 244, 235, 0.7);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.money-input:focus-within,
.suffix-input:focus-within,
select:focus {
  border-color: var(--green-2);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(30, 90, 76, 0.1);
  outline: none;
}

.money-input:has(input[aria-invalid="true"]),
.suffix-input:has(input[aria-invalid="true"]),
select[aria-invalid="true"] {
  border-color: rgba(184, 77, 61, 0.72);
  background: rgba(223, 116, 74, 0.06);
}

.money-input b,
.suffix-input b {
  padding: 0 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.suffix-input b {
  padding: 0 12px 0 0;
}

input {
  width: 100%;
  min-width: 0;
  padding: 11px 9px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
  font-weight: 680;
}

select {
  width: 100%;
  min-height: 45px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: rgba(247, 244, 235, 0.7);
  font-size: 14px;
  font-weight: 650;
}

details {
  border-top: 1px solid var(--line);
}

details summary {
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.details-grid {
  padding-bottom: 24px;
}

.planning-intro {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(223, 233, 168, 0.35);
}

.planning-intro strong {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 11px;
}

.planning-intro p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.planning-intro span {
  padding: 4px 8px;
  border: 1px solid rgba(21, 63, 54, 0.12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 253, 247, 0.58);
  font-size: 9px;
}

.form-actions {
  padding-top: 26px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.primary-button {
  flex: 1;
  min-height: 52px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 14px;
  color: var(--white);
  background: var(--green);
  cursor: pointer;
  font-weight: 750;
  box-shadow: 0 12px 26px rgba(21, 63, 54, 0.18);
  transition: transform 160ms ease, background 160ms ease;
}

.primary-button:hover {
  background: var(--green-2);
  transform: translateY(-1px);
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button span:last-child {
  font-size: 20px;
}

.text-button {
  padding: 8px 0;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px dashed var(--muted);
}

.storage-controls {
  margin-top: 18px;
  padding: 15px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(247, 244, 235, 0.58);
}

.save-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.save-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.save-toggle > span {
  width: 32px;
  height: 18px;
  position: relative;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #cbc9c0;
  transition: background 160ms ease;
}

.save-toggle > span::after {
  content: "";
  width: 14px;
  height: 14px;
  position: absolute;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 4px rgba(23, 51, 45, 0.22);
  transition: transform 160ms ease;
}

.save-toggle input:checked + span {
  background: var(--green-2);
}

.save-toggle input:checked + span::after {
  transform: translateX(14px);
}

.save-toggle input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(30, 90, 76, 0.16);
}

.save-toggle b {
  font-size: 11px;
}

.clear-data-button {
  padding: 5px 0;
  border: 0;
  border-bottom: 1px dashed var(--muted);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.storage-controls p {
  grid-column: 1 / -1;
  margin: 0 0 0 41px;
  color: #87918d;
  font-size: 9px;
}

.validation-panel {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(184, 77, 61, 0.25);
  border-radius: 14px;
  background: rgba(223, 116, 74, 0.08);
}

.validation-panel[hidden] {
  display: none;
}

.validation-panel strong {
  display: block;
  margin-bottom: 6px;
  color: #a94d39;
  font-size: 11px;
}

.validation-panel ul {
  margin: 0;
  padding-left: 17px;
}

.validation-panel li {
  margin: 4px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.report-panel {
  min-width: 0;
  padding: 38px;
}

.report-header {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.report-header > span {
  color: var(--muted);
  font-size: 11px;
}

.score-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 30px 0;
}

.score-ring {
  --score: 0deg;
  width: 116px;
  height: 116px;
  display: grid;
  place-content: center;
  grid-template-columns: auto auto;
  align-items: baseline;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--white) 61%, transparent 63%),
    conic-gradient(var(--orange) var(--score), var(--paper-deep) 0);
}

.score-ring span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  line-height: 1;
}

.score-ring small {
  color: var(--muted);
  font-size: 11px;
}

.score-label {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--green);
  background: var(--lime);
  font-size: 11px;
  font-weight: 750;
}

.score-copy h3 {
  margin: 12px 0 7px;
  font-family: "Songti SC", "STSong", SimSun, serif;
  font-size: 24px;
  font-weight: 600;
}

.score-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.score-breakdown {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.score-breakdown article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(247, 244, 235, 0.52);
}

.score-breakdown article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.score-breakdown span {
  color: var(--muted);
  font-size: 9px;
}

.score-breakdown strong {
  font-size: 10px;
  white-space: nowrap;
}

.score-breakdown i {
  height: 5px;
  display: block;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-deep);
}

.score-breakdown i b {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--green-2);
  transition: width 500ms ease;
}

.score-breakdown article > small {
  min-height: 24px;
  display: block;
  margin-top: 7px;
  color: #87918d;
  font-size: 8px;
  line-height: 1.45;
}

.score-link {
  margin-top: 7px;
  padding: 0;
  border: 0;
  border-bottom: 1px dashed var(--green-2);
  color: var(--green-2);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
}

.score-link:disabled {
  border-bottom-color: transparent;
  color: #87918d;
  cursor: default;
}

.score-breakdown article[data-level="low"] i b {
  background: var(--orange);
}

.score-breakdown article[data-level="medium"] i b {
  background: var(--sand);
}

.score-footnote {
  margin: 0 0 22px;
  color: #87918d;
  font-size: 9px;
  line-height: 1.5;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.metric-grid article {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(247, 244, 235, 0.52);
}

.metric-grid article:last-child {
  border-right: 0;
}

.metric-grid span,
.metric-grid small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.metric-grid strong {
  display: block;
  margin: 9px 0 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 600;
  white-space: nowrap;
}

.negative {
  color: #b84d3d !important;
}

.overall-summary {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid rgba(30, 90, 76, 0.18);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(223, 233, 168, 0.3), rgba(255, 253, 247, 0.88) 62%),
    var(--white);
}

.overall-summary-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.overall-summary-heading h3 {
  margin: 2px 0 0;
  font-family: "Songti SC", "STSong", SimSun, serif;
  font-size: 22px;
  font-weight: 600;
}

.overall-summary-heading > span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(255, 253, 247, 0.78);
  font-size: 10px;
  font-weight: 750;
}

.overall-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(30, 90, 76, 0.12);
}

.overall-summary-grid p {
  margin: 0;
}

.overall-summary-grid b,
.overall-summary-grid span {
  display: block;
}

.overall-summary-grid b {
  margin-bottom: 7px;
  color: var(--orange);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.overall-summary-grid span {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.65;
}

.report-section,
.action-plan {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.section-title {
  align-items: center;
  margin-bottom: 22px;
}

.section-title h3 {
  margin: 0;
  font-family: "Songti SC", "STSong", SimSun, serif;
  font-size: 22px;
  font-weight: 600;
}

.section-status,
.ai-badge {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--green);
  background: var(--paper-deep);
  font-size: 10px;
  font-weight: 750;
}

.allocation-bar {
  height: 20px;
  display: flex;
  gap: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-deep);
}

.allocation-bar span {
  min-width: 0;
  height: 100%;
  transition: width 500ms cubic-bezier(.2, .7, .2, 1);
}

.allocation-bar span:first-child {
  border-radius: 999px 0 0 999px;
}

.allocation-bar span:last-child {
  border-radius: 0 999px 999px 0;
}

.allocation-legend {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.allocation-legend p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.allocation-legend i {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
}

.allocation-legend strong {
  display: block;
  margin: 5px 0 0 13px;
  color: var(--ink);
  font-size: 13px;
}

.budget-callout {
  margin-top: 20px;
  padding: 15px 17px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  border-radius: 14px;
  background: rgba(223, 233, 168, 0.38);
}

.budget-callout span {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.budget-callout p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-deep);
}

.progress-track span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sand), var(--orange));
  transition: width 500ms ease;
}

.two-column-note {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 14px;
}

.two-column-note p {
  margin: 0;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.two-column-note strong {
  color: var(--ink);
  font-size: 12px;
}

.scenario-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.scenario-grid article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(247, 244, 235, 0.55);
}

.scenario-grid article.recommended {
  color: var(--white);
  border-color: var(--green);
  background: var(--green);
}

.scenario-tag {
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.recommended .scenario-tag {
  color: var(--lime);
}

.scenario-grid h4 {
  margin: 12px 0 6px;
  font-size: 13px;
}

.scenario-grid strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 600;
}

.scenario-grid p {
  margin: 7px 0;
  font-size: 12px;
}

.scenario-grid small {
  color: var(--muted);
  font-size: 10px;
}

.recommended small {
  color: rgba(255, 255, 255, 0.68);
}

.fine-print {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.chart-wrap {
  min-height: 220px;
  padding: 12px 0 0;
}

.fire-basis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.fire-basis p {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(247, 244, 235, 0.52);
}

.fire-basis span,
.fire-basis strong,
.fire-basis small {
  display: block;
}

.fire-basis span {
  color: var(--muted);
  font-size: 9px;
}

.fire-basis strong {
  margin: 6px 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 600;
}

.fire-basis small {
  color: #87918d;
  font-size: 9px;
}

#projectionChart {
  width: 100%;
  height: 220px;
  display: block;
}

.ai-badge {
  background: var(--mint);
}

.action-plan ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.action-plan li {
  padding: 17px 0;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.action-plan li span {
  color: var(--orange);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
}

.action-plan li p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
}

.action-plan li strong {
  color: var(--green-2);
}

.assumptions {
  border-bottom: 0;
}

.assumptions summary {
  color: var(--muted);
  font-size: 12px;
}

.assumptions div {
  padding: 0 0 10px;
}

.assumptions p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.seo-content {
  margin: 72px 0 26px;
  padding: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 247, 0.74);
  box-shadow: var(--shadow);
}

.seo-intro {
  max-width: 100%;
}

.seo-intro h2,
.seo-faq h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", SimSun, serif;
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.seo-intro h2 {
  white-space: nowrap;
}

.seo-intro > p:last-child {
  max-width: 880px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.seo-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.seo-feature-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(247, 244, 235, 0.62);
}

.seo-feature-grid h3 {
  margin: 0;
  font-size: 15px;
}

.seo-feature-grid p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.seo-faq {
  margin-top: 64px;
  padding-top: 50px;
  border-top: 1px solid var(--line);
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin-top: 30px;
}

.faq-grid details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(247, 244, 235, 0.48);
}

.faq-grid summary {
  padding: 18px;
  gap: 16px;
  font-size: 13px;
}

.faq-grid summary::after {
  content: "+";
  color: var(--orange);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 400;
}

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

.faq-grid p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

footer {
  width: min(1440px, calc(100% - 48px));
  min-height: 110px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

footer strong {
  color: var(--ink);
}

footer a {
  color: var(--green-2);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .input-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-grid strong {
    font-size: 22px;
  }

  .score-breakdown {
    grid-template-columns: repeat(5, minmax(100px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .seo-feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .seo-intro h2 {
    white-space: normal;
    text-wrap: balance;
  }
}

@media (max-width: 760px) {
  .topbar,
  main,
  footer {
    width: min(100% - 28px, 1440px);
  }

  .topbar {
    min-height: 66px;
  }

  .brand small,
  .privacy-pill {
    display: none;
  }

  .download-button {
    padding: 8px 11px;
    font-size: 11px;
  }

  .hero {
    min-height: 0;
    padding: 48px 4px 36px;
  }

  .hero h1 {
    font-size: clamp(40px, 14vw, 60px);
  }

  .app-shell {
    border-radius: 20px;
  }

  .input-panel,
  .report-panel {
    padding: 26px 20px;
  }

  .seo-content {
    margin-top: 36px;
    padding: 34px 20px;
  }

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

  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .score-breakdown {
    grid-template-columns: 1fr 1fr;
    overflow: visible;
  }

  .score-breakdown article:last-child {
    grid-column: 1 / -1;
  }

  .metric-grid article:nth-child(2) {
    border-right: 0;
  }

  .metric-grid article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .score-card {
    grid-template-columns: 96px 1fr;
    gap: 18px;
  }

  .score-ring {
    width: 92px;
    height: 92px;
  }

  .score-ring span {
    font-size: 34px;
  }

  .score-copy h3 {
    font-size: 20px;
  }

  .allocation-legend {
    grid-template-columns: 1fr 1fr;
  }

  .overall-summary-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .seo-feature-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .two-column-note {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .fire-basis {
    grid-template-columns: 1fr;
  }

  footer {
    padding: 26px 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }
}

@page {
  size: A4 portrait;
  margin: 11mm 10mm 12mm;
}

@media print {
  html,
  body {
    width: auto;
    min-width: 0;
    margin: 0;
    color: #17332d;
    background: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .topbar,
  .hero,
  .input-panel,
  .seo-content,
  .score-link,
  footer {
    display: none !important;
  }

  main {
    width: 100%;
    margin: 0;
  }

  .app-shell {
    display: block;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    overflow: visible;
  }

  .report-panel {
    width: 100%;
    padding: 0;
  }

  .report-header {
    margin-bottom: 7mm;
    padding-bottom: 4mm;
    border-bottom: 1px solid var(--line);
  }

  .score-card,
  .score-breakdown,
  .metric-grid,
  .overall-summary,
  .allocation-bar,
  .allocation-legend,
  .budget-callout,
  .progress-track,
  .two-column-note,
  .scenario-grid article,
  .fire-basis,
  .action-plan li,
  .assumptions {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .score-breakdown {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: visible;
  }

  .score-breakdown article:last-child {
    grid-column: auto;
  }

  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .metric-grid article {
    padding: 12px;
  }

  .metric-grid article:nth-child(2) {
    border-right: 1px solid var(--line);
  }

  .metric-grid article:nth-child(-n + 2) {
    border-bottom: 0;
  }

  .metric-grid strong {
    font-size: 18px;
  }

  .overall-summary {
    margin-top: 5mm;
    padding: 5mm;
  }

  .overall-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4mm;
  }

  .report-section,
  .action-plan {
    padding: 6mm 0;
  }

  .section-title {
    margin-bottom: 4mm;
    break-after: avoid;
    page-break-after: avoid;
  }

  .allocation-legend {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .scenario-grid {
    grid-template-columns: 1fr 1fr;
  }

  .two-column-note,
  .fire-basis {
    grid-template-columns: 1fr 1fr;
  }

  #projectionChart {
    width: 100% !important;
    height: 52mm !important;
  }

  .action-plan li {
    padding: 4mm 0;
  }

  .assumptions {
    margin-top: 3mm;
  }

  .assumptions summary {
    padding: 4mm 0 2mm;
  }

  .assumptions div {
    display: block !important;
  }
}
