@font-face {
  font-family: "Noto Sans SC";
  src: url("./assets/NotoSansSC-juwei.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #eeefed;
  --surface: #f8f8f6;
  --surface-strong: #dfe1de;
  --ink: #211c1b;
  --muted: #5b5250;
  --line: rgba(33, 28, 27, .18);
  --accent: #9b2923;
  --accent-strong: #731c18;
  --accent-soft: rgba(155, 41, 35, .09);
  --accent-medium: rgba(155, 41, 35, .16);
  --radius: 12px;
  --max: 1240px;
  font-family: "Noto Sans SC", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); line-height: 1.65; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .3; background-image: linear-gradient(rgba(33, 28, 27, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(33, 28, 27, .035) 1px, transparent 1px); background-size: 30px 30px; }
a { color: inherit; text-underline-offset: .22em; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }

.skip-link { position: fixed; top: 10px; left: 10px; z-index: 20; padding: 9px 13px; background: var(--ink); color: var(--bg); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-header { width: min(var(--max), calc(100% - 32px)); min-height: 70px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { font-size: 1.05rem; font-weight: 900; letter-spacing: -.03em; text-decoration: none; }
.site-header nav { display: flex; gap: 22px; font-size: .82rem; font-weight: 780; white-space: nowrap; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover, .site-header nav a:focus-visible { color: var(--accent); }
main, footer { width: min(var(--max), calc(100% - 32px)); margin-inline: auto; }

.hero { min-height: min(760px, calc(100dvh - 70px)); display: grid; grid-template-columns: minmax(0, .95fr) minmax(460px, 1.05fr); gap: clamp(42px, 6vw, 76px); align-items: center; padding: 54px 0; }
.kicker { margin: 0 0 16px; color: var(--accent); font-size: .74rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { letter-spacing: -.055em; }
h1 { margin-bottom: 22px; font-size: clamp(3.8rem, 5.8vw, 5.4rem); line-height: .98; font-weight: 920; }
h1 span { white-space: nowrap; }
h1 mark { color: var(--accent); background: transparent; }
.hero-intro { max-width: 24ch; margin-bottom: 0; color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.button { min-height: 44px; padding: 10px 17px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--ink); font-weight: 850; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .18s ease, color .18s ease, border-color .18s ease, background-color .18s ease; }
.button:hover, .button:focus-visible { border-color: var(--accent); color: var(--accent); }
.button:active { transform: translateY(1px); }
.button.primary { border-color: var(--accent); background: var(--accent); color: #fff8f6; }
.button.primary:hover, .button.primary:focus-visible { border-color: var(--accent-strong); background: var(--accent-strong); color: #fff8f6; }
.hero-visual { margin: 0; align-self: stretch; min-height: 440px; display: flex; flex-direction: column; justify-content: center; }
.hero-visual img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); box-shadow: 0 24px 80px rgba(47, 23, 19, .17); }
.hero-visual figcaption { margin-top: 9px; color: var(--muted); font-size: .7rem; }

.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric-strip article { min-height: 158px; padding: 22px; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.metric-strip article:first-child { padding-left: 0; }
.metric-strip article:last-child { padding-right: 0; border-right: 0; }
.metric-strip span, .metric-strip small { color: var(--muted); }
.metric-strip span { font-size: .74rem; font-weight: 800; }
.metric-strip strong { margin: auto 0 3px; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", monospace; font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1; letter-spacing: -.06em; }
.metric-strip small { font-size: .72rem; }

.section { padding-top: 108px; }
.section-heading { max-width: 820px; margin-bottom: 38px; }
.section-heading h2 { margin-bottom: 14px; font-size: clamp(2.8rem, 5.3vw, 5.1rem); line-height: 1.02; }
.section-heading > p:last-child { max-width: 66ch; margin-bottom: 0; color: var(--muted); font-size: 1rem; }

.identity-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.identity-grid article { min-height: 310px; padding: clamp(25px, 4vw, 42px); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.identity-primary { background: var(--accent-soft) !important; }
.identity-grid span { color: var(--accent); font-size: .74rem; font-weight: 900; }
.identity-grid h3 { margin: auto 0 15px; font-size: clamp(1.8rem, 3.4vw, 3.25rem); line-height: 1.08; letter-spacing: -.045em; }
.identity-grid p { max-width: 58ch; margin-bottom: 18px; color: var(--muted); font-size: .86rem; }
.identity-grid a { width: fit-content; color: var(--accent); font-size: .78rem; font-weight: 850; }

.answer-layout { display: grid; grid-template-columns: 1.35fr .65fr; gap: 16px; align-items: stretch; }
.price-waterfall { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--ink); border-left: 1px solid var(--line); }
.price-waterfall article { min-height: 184px; padding: 23px; display: flex; flex-direction: column; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 78%, transparent); }
.price-waterfall .waterfall-main { grid-row: span 2; min-height: 368px; background: var(--accent); color: #fff8f6; }
.price-waterfall .waterfall-profit { background: var(--accent-medium); }
.price-waterfall span { color: var(--muted); font-size: .73rem; font-weight: 800; }
.price-waterfall .waterfall-main span, .price-waterfall .waterfall-main p { color: rgba(255, 248, 246, .88); }
.price-waterfall strong { margin: auto 0 8px; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", monospace; font-size: clamp(1.8rem, 3.4vw, 3.6rem); line-height: 1; letter-spacing: -.055em; }
.price-waterfall .waterfall-main strong { color: #fff8f6; }
.price-waterfall p { margin: 0; color: var(--muted); font-size: .73rem; }
.hard-truth { padding: clamp(26px, 4vw, 42px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.hard-truth h3 { max-width: 12ch; font-size: clamp(2rem, 4vw, 4rem); line-height: 1.02; letter-spacing: -.055em; color: var(--accent); }
.hard-truth p { color: var(--muted); font-size: .88rem; }
.hard-truth p:last-child { margin-bottom: 0; }

.calculator-shell { display: grid; grid-template-columns: .9fr 1.1fr; gap: 16px; }
.calculator-form, .live-results { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
.calculator-form label { display: block; min-width: 0; }
.calculator-form label > span { display: block; margin-bottom: 7px; font-size: .77rem; font-weight: 850; }
.calculator-form label > small { display: block; min-height: 2.7em; margin-top: 6px; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.input-unit { position: relative; }
.input-unit input { width: 100%; min-height: 48px; padding: 10px 76px 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); font-family: ui-monospace, SFMono-Regular, Consolas, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", monospace; font-variant-numeric: tabular-nums; }
.input-unit input:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.input-unit i { position: absolute; top: 50%; right: 12px; color: var(--muted); font-size: .7rem; font-style: normal; transform: translateY(-50%); pointer-events: none; }
details { margin: 22px 0; padding-top: 18px; border-top: 1px solid var(--line); }
summary { color: var(--accent); font-size: .8rem; font-weight: 850; cursor: pointer; }
.advanced-grid { margin-top: 18px; }
.fixed-cost-inputs { margin-top: 26px; padding: 22px; border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line)); border-radius: var(--radius); background: var(--accent-soft); }
.fixed-cost-heading { margin-bottom: 18px; }
.fixed-cost-heading h3 { margin: 0 0 7px; color: var(--accent); font-size: 1rem; }
.fixed-cost-heading p { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.55; }
.fixed-cost-inputs .input-unit input { background: var(--surface); }
.form-error { margin: 0 0 14px; padding: 12px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); font-size: .78rem; font-weight: 800; }
.calculator-form > .button { width: 100%; }
.live-results { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.live-results article { min-height: 188px; padding: 21px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.live-results .result-main { background: var(--accent); color: #fff8f6; }
.live-results article span { color: var(--muted); font-size: .74rem; font-weight: 800; }
.live-results .result-main span { color: rgba(255, 248, 246, .9); }
.live-results article strong { margin-top: auto; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", monospace; font-size: clamp(1.9rem, 3.3vw, 3.3rem); line-height: 1; letter-spacing: -.055em; }
.live-results .result-main strong { color: #fff8f6; }
.live-results article p { margin: 9px 0 0; color: var(--muted); font-size: .72rem; }
.live-results .result-main p { color: rgba(255, 248, 246, .9); }
.allocation-breakdown { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.allocation-breakdown header { grid-column: 1 / -1; padding: 18px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: var(--accent-soft); }
.allocation-breakdown header span { color: var(--accent); font-size: .78rem; font-weight: 850; }
.allocation-breakdown header strong { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", monospace; font-size: 1.45rem; }
.allocation-breakdown > div { padding: 14px 18px; display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.allocation-breakdown > div:nth-of-type(odd) { border-right: 1px solid var(--line); }
.allocation-breakdown > div span { color: var(--muted); font-size: .72rem; }
.allocation-breakdown > div b { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Consolas, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", monospace; font-size: .78rem; }
.allocation-breakdown small { grid-column: 1 / -1; padding: 12px 18px; color: var(--muted); font-size: .67rem; }
.result-explain { grid-column: 1 / -1; min-height: 64px; padding: 16px 18px; border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--muted); font-size: .82rem; }
.result-explain.danger, .result-explain.warning { color: var(--accent); font-weight: 760; }

.scenario-matrix { margin-top: 16px; border-top: 1px solid var(--ink); }
.scenario-matrix > div { display: grid; grid-template-columns: 1.05fr repeat(4, 1fr); gap: 18px; align-items: center; min-height: 82px; padding: 14px 8px; border-bottom: 1px solid var(--line); }
.scenario-matrix .matrix-head { min-height: 48px; color: var(--muted); font-size: .71rem; font-weight: 800; }
.scenario-matrix strong { font-size: 1rem; }
.scenario-matrix span, .scenario-matrix em { font-family: ui-monospace, SFMono-Regular, Consolas, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", monospace; font-variant-numeric: tabular-nums; }
.scenario-matrix em { width: fit-content; padding: 5px 8px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); font-size: .71rem; font-style: normal; }
.scenario-matrix .base-row { background: var(--accent-soft); }
.scenario-matrix .base-row strong, .scenario-matrix .base-row em, .scenario-matrix .loss-row strong, .scenario-matrix .loss-row em { color: var(--accent); }

.store-overview { display: grid; grid-template-columns: .72fr 1.28fr; gap: 16px; margin-bottom: 16px; }
.store-answer { min-height: 360px; padding: clamp(26px, 4vw, 42px); display: flex; flex-direction: column; border-radius: var(--radius); background: var(--accent); color: #fff8f6; }
.store-answer span, .store-answer p { color: rgba(255, 248, 246, .88); }
.store-answer span { font-size: .75rem; font-weight: 800; }
.store-answer strong { margin: auto 0 14px; font-family: ui-monospace, SFMono-Regular, Consolas, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", monospace; font-size: clamp(3.2rem, 6.8vw, 6.8rem); line-height: .94; letter-spacing: -.065em; }
.store-answer p { margin-bottom: 0; font-size: .82rem; }
.store-ledger { display: grid; grid-template-columns: 1.25fr .75fr; border-top: 1px solid var(--ink); border-left: 1px solid var(--line); }
.store-ledger article { min-height: 120px; padding: 18px; display: flex; flex-direction: column; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 78%, transparent); }
.store-ledger span, .store-ledger p { color: var(--muted); }
.store-ledger span { font-size: .71rem; font-weight: 800; }
.store-ledger strong { margin: auto 0 0; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", monospace; font-size: clamp(1.45rem, 2.6vw, 2.7rem); line-height: 1; }
.store-ledger p { margin: 4px 0 0; font-size: .69rem; }
.store-calculator { margin-top: 16px; }

.decision-grid { display: grid; grid-template-columns: 1.2fr .8fr; border-top: 1px solid var(--ink); border-left: 1px solid var(--line); }
.decision-grid article { min-height: 265px; padding: 27px; display: flex; flex-direction: column; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 76%, transparent); }
.decision-grid article:nth-child(2), .decision-grid article:nth-child(3) { background: var(--accent-soft); }
.decision-grid span { color: var(--accent); font-size: .74rem; font-weight: 900; }
.decision-grid h3 { margin: auto 0 12px; max-width: 19ch; font-size: clamp(1.35rem, 2.6vw, 2.5rem); line-height: 1.12; letter-spacing: -.035em; }
.decision-grid p { margin: 0; color: var(--muted); font-size: .8rem; }

.source-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border: 1px solid var(--line); background: var(--line); }
.source-list article { min-height: 210px; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 18px; padding: 24px; background: var(--surface); }
.source-list article:last-child { grid-column: 1 / -1; }
.source-list article > b { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", monospace; font-size: 1.05rem; }
.source-list h3 { margin-bottom: 6px; font-size: .98rem; }
.source-list p { margin-bottom: 7px; color: var(--muted); font-size: .79rem; }
.source-list a { color: var(--accent); font-size: .76rem; font-weight: 850; }
.source-list time { grid-column: 2; color: var(--muted); font-size: .72rem; }

.method-note { margin: 108px 0 72px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.method-note h2 { margin-bottom: 12px; font-size: 1.45rem; }
.method-note p { max-width: 1020px; color: var(--muted); font-size: .8rem; }
.method-note p:last-child { margin-bottom: 0; }
footer { min-height: 120px; display: flex; align-items: center; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
footer p { margin: 0 auto 0 0; }

@media (prefers-color-scheme: dark) {
  :root { --bg: #151211; --surface: #211b19; --surface-strong: #302624; --ink: #f2ebe8; --muted: #b8a9a5; --line: rgba(242, 235, 232, .17); --accent: #ef766d; --accent-strong: #ff9188; --accent-soft: rgba(239, 118, 109, .10); --accent-medium: rgba(239, 118, 109, .16); }
  body::before { opacity: .18; }
  .hero-visual img { box-shadow: 0 24px 80px rgba(0, 0, 0, .35); }
  .button.primary, .price-waterfall .waterfall-main, .store-answer, .live-results .result-main { color: #24100e; }
  .button.primary:hover, .button.primary:focus-visible { color: #24100e; }
  .price-waterfall .waterfall-main strong, .store-answer strong, .live-results .result-main strong { color: #24100e; }
  .price-waterfall .waterfall-main span, .price-waterfall .waterfall-main p, .store-answer span, .store-answer p, .live-results .result-main span, .live-results .result-main p { color: rgba(36, 16, 14, .82); }
}

@media (max-width: 1020px) {
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 36px; padding-top: 64px; }
  .hero-visual { min-height: auto; }
  .hero-visual img { max-height: 580px; }
  .identity-grid, .answer-layout, .calculator-shell, .store-overview { grid-template-columns: 1fr; }
  .identity-grid article { min-height: 280px; }
  .hard-truth h3 { max-width: 18ch; }
  .store-answer { min-height: 300px; }
}

@media (max-width: 780px) {
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric-strip article:nth-child(2) { border-right: 0; }
  .metric-strip article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .metric-strip article:first-child, .metric-strip article:last-child { padding: 22px; }
  .decision-grid { grid-template-columns: 1fr; }
  .decision-grid article:nth-child(3) { background: color-mix(in srgb, var(--surface) 76%, transparent); }
  .decision-grid article:nth-child(4) { background: var(--accent-soft); }
}

@media (max-width: 660px) {
  .site-header { min-height: 62px; }
  .site-header nav { gap: 13px; font-size: .7rem; }
  .site-header nav a:nth-child(2), .site-header nav a:nth-child(3) { display: none; }
  .hero { padding: 52px 0 46px; }
  h1 { font-size: clamp(3rem, 14vw, 4rem); }
  .hero-actions { display: grid; }
  .hero-actions .button { width: 100%; }
  .hero-visual img { aspect-ratio: 4 / 3; }
  .metric-strip { grid-template-columns: 1fr; }
  .metric-strip article, .metric-strip article:first-child, .metric-strip article:last-child { min-height: 124px; padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .section { padding-top: 80px; }
  .section-heading h2 { font-size: clamp(2.65rem, 12vw, 3.8rem); }
  .identity-grid article, .hard-truth, .calculator-form, .live-results, .method-note { padding: 22px; }
  .price-waterfall, .input-grid, .live-results, .store-ledger { grid-template-columns: 1fr; }
  .fixed-cost-inputs { padding: 18px; }
  .allocation-breakdown { grid-template-columns: 1fr; }
  .allocation-breakdown header, .allocation-breakdown small { grid-column: 1; }
  .allocation-breakdown > div:nth-of-type(odd) { border-right: 0; }
  .price-waterfall .waterfall-main { grid-row: auto; min-height: 240px; }
  .price-waterfall article { min-height: 150px; }
  .calculator-form label > small { min-height: auto; }
  .result-explain { grid-column: 1; }
  .scenario-matrix { overflow-x: auto; }
  .scenario-matrix > div { min-width: 650px; }
  .store-ledger article { min-height: 110px; }
  .decision-grid article { min-height: 230px; padding: 22px; }
  .source-list { grid-template-columns: 1fr; }
  .source-list article, .source-list article:last-child { grid-column: 1; grid-template-columns: 34px minmax(0, 1fr); }
  footer { flex-wrap: wrap; align-items: flex-start; padding: 28px 0; }
  footer p { width: 100%; margin: 0; }
}

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

@media print {
  :root { color-scheme: light; --bg: white; --surface: white; --ink: black; --muted: #444; --line: #aaa; --accent: #7b201c; }
  body::before, .site-header, .hero-actions, .calculator-form, footer { display: none; }
  main { width: 100%; }
  .hero { min-height: auto; padding: 28px 0; }
  .section { padding-top: 44px; }
}
