
:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --ink: #202124;
  --muted: #666b70;
  --line: #d9dadd;
  --danger: #a51d24;
  --danger-soft: #fff0f0;
  --accent: #263b4b;
  --accent-soft: #eaf0f4;
  --support: #165b45;
  --support-soft: #edf8f3;
  --warning: #8a4d00;
  --warning-soft: #fff6e8;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(20, 27, 34, .08);
  --content: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 18px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
a { color: #174f78; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { max-width: 100%; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 12px; top: 12px; z-index: 9999; background: #fff; padding: 10px 14px; }
.site-header { background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: var(--content); margin: auto; min-height: 76px; display: flex; align-items: center; gap: 24px; padding: 10px 22px; }
.brand { text-decoration: none; color: var(--ink); min-width: 190px; }
.brand-main { display: block; font-size: 30px; font-weight: 900; letter-spacing: -.04em; line-height: 1.1; }
.brand-sub { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; margin-top: 4px; }
.main-nav { display: flex; gap: 16px; align-items: center; margin-left: auto; font-size: 15px; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 700; }
.nav-cta, .button-primary { background: var(--danger); color: white !important; border: 0; border-radius: 999px; padding: 12px 20px; text-decoration: none; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.menu-button { display: none; margin-left: auto; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 12px; }
.container { width: min(calc(100% - 36px), var(--content)); margin-inline: auto; }
.narrow { width: min(calc(100% - 36px), 820px); margin-inline: auto; }
.hero { background: linear-gradient(135deg, #fff 0%, #f5ecec 100%); border-bottom: 1px solid var(--line); }
.hero-inner { max-width: var(--content); margin: auto; padding: 72px 22px 64px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 38px; align-items: center; }
.eyebrow { display: inline-flex; background: var(--danger-soft); color: var(--danger); border: 1px solid #eac9cb; border-radius: 999px; padding: 5px 12px; font-size: 14px; font-weight: 800; }
h1 { font-size: clamp(38px, 5.6vw, 68px); line-height: 1.16; letter-spacing: -.04em; margin: 18px 0 20px; }
.article h1 { font-size: clamp(34px, 4vw, 52px); }
h2 { font-size: clamp(28px, 3.5vw, 40px); line-height: 1.3; letter-spacing: -.025em; margin: 62px 0 22px; }
h3 { font-size: 24px; line-height: 1.45; margin-top: 38px; }
.lead { font-size: 21px; line-height: 1.8; }
.hero-copy strong { color: var(--danger); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.button-secondary { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 12px 20px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 800; text-decoration: none; }
.hero-note { font-size: 14px; color: var(--muted); margin-top: 12px; }
.hero-number { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 28px; border-radius: 24px; }
.hero-number .minus { font-weight: 900; font-size: 52px; color: var(--danger); line-height: 1.1; }
.hero-number small { color: var(--muted); }
.section { padding: 72px 0; }
.section-white { background: #fff; }
.section-dark { background: #202a32; color: white; }
.section-dark a { color: white; }
.section-title { max-width: 760px; }
.stat-grid, .card-grid, .three-grid { display: grid; gap: 18px; }
.stat-grid { grid-template-columns: repeat(3, 1fr); margin-top: 32px; }
.card-grid { grid-template-columns: repeat(3, 1fr); }
.three-grid { grid-template-columns: repeat(3, 1fr); }
.stat-card, .card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 4px 16px rgba(20, 27, 34, .04); }
.stat-card strong { display: block; font-size: 38px; color: var(--danger); line-height: 1.2; margin: 8px 0; }
.card h3 { margin: 0 0 8px; }
.card p { margin-bottom: 0; }
.card a.stretched { display: inline-block; margin-top: 12px; font-weight: 800; }
.warning-box, .support-box, .source-box, .assumption-box, .conclusion-box { padding: 22px 24px; border-radius: var(--radius); margin: 28px 0; }
.warning-box { background: var(--danger-soft); border-left: 6px solid var(--danger); }
.support-box { background: var(--support-soft); border-left: 6px solid var(--support); }
.source-box { background: #f1f4f7; border: 1px solid #d5dee5; font-size: 15px; }
.assumption-box { background: var(--warning-soft); border-left: 6px solid var(--warning); }
.conclusion-box { background: var(--accent-soft); border-left: 6px solid var(--accent); }
.breadcrumbs { font-size: 14px; color: var(--muted); padding-top: 24px; }
.breadcrumbs a { color: var(--muted); }
.article { padding: 16px 0 78px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; color: var(--muted); margin: 16px 0 30px; }
.article p { max-width: 78ch; }
.article ul, .article ol { max-width: 76ch; padding-left: 1.3em; }
.article li { margin: 7px 0; }
.table-wrap { overflow-x: auto; margin: 24px 0; }
table { border-collapse: collapse; width: 100%; background: #fff; font-size: 16px; }
th, td { border: 1px solid var(--line); padding: 13px 14px; text-align: left; vertical-align: top; }
th { background: #eef1f3; }
.diagnosis-wrap { background: white; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
.diagnosis-header { background: #202a32; color: white; padding: 26px 28px; }
.diagnosis-form { padding: 28px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.field label { display: block; font-weight: 800; margin-bottom: 6px; }
.field small { display: block; color: var(--muted); margin-top: 5px; }
.field input, .field select { width: 100%; border: 2px solid #c8ccd0; border-radius: 12px; padding: 13px 14px; background: #fff; }
.field input:focus, .field select:focus { outline: 3px solid #dcebf7; border-color: #2d6f9e; }
.form-actions { margin-top: 24px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.form-error { color: var(--danger); font-weight: 800; min-height: 1.5em; }
.result { border-top: 1px solid var(--line); padding: 28px; background: #fbfbfb; }
.result[hidden] { display: none; }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.result-metric { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.result-metric span { display: block; color: var(--muted); font-size: 14px; }
.result-metric strong { display: block; font-size: 30px; line-height: 1.25; margin-top: 6px; }
.result-main { margin-top: 18px; padding: 24px; border-radius: 16px; background: var(--danger-soft); border: 1px solid #e8c4c7; }
.result-main .age { font-size: clamp(42px, 7vw, 70px); color: var(--danger); font-weight: 900; line-height: 1; margin: 8px 0; }
.scenarios { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.scenario-button { border: 1px solid #bbc1c6; background: #fff; border-radius: 999px; padding: 10px 15px; font-weight: 800; }
.scenario-button.active { background: var(--accent); color: white; }
.asset-chart { width: 100%; min-height: 250px; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-top: 20px; }
.help-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.help-links a { display: block; background: white; color: var(--ink); border: 1px solid rgba(255,255,255,.35); border-radius: 12px; padding: 16px; font-weight: 800; text-decoration: none; }
.site-footer { background: #151c21; color: #e8ecef; padding: 52px 0 90px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 28px; }
.site-footer h2, .site-footer h3 { margin: 0 0 12px; font-size: 19px; }
.site-footer a { color: #e8ecef; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: 7px 0; }
.small { font-size: 14px; color: var(--muted); }
.site-footer .small { color: #aeb8bf; }
.mobile-bar { display: none; }
.tag { display: inline-block; border-radius: 999px; padding: 3px 9px; background: #eef1f3; font-size: 13px; font-weight: 800; }
.source-list li { margin-bottom: 14px; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--line); }
.checklist input { width: 22px; height: 22px; margin-top: 4px; }
.next-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 26px 0; }
.next-actions a { text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; font-weight: 800; }
@media (max-width: 920px) {
  body { font-size: 17px; }
  .main-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; background: white; padding: 20px; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; }
  .main-nav.open { display: flex; }
  .menu-button { display: block; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 50px; }
  .stat-grid, .card-grid, .three-grid, .footer-grid, .help-links, .next-actions { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { padding-bottom: 66px; }
  .header-inner { min-height: 66px; padding-inline: 16px; }
  .brand-main { font-size: 26px; }
  .brand-sub { display: none; }
  .main-nav { top: 66px; }
  .hero-inner { padding: 42px 18px 46px; }
  h1 { font-size: 42px; }
  h2 { margin-top: 48px; }
  .section { padding: 52px 0; }
  .stat-grid, .card-grid, .three-grid, .footer-grid, .help-links, .next-actions, .result-grid { grid-template-columns: 1fr; }
  .diagnosis-form, .result { padding: 20px; }
  .hero-actions a { width: 100%; }
  .mobile-bar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 120; background: #fff; border-top: 1px solid var(--line); }
  .mobile-bar a { text-align: center; padding: 11px 5px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 800; }
  .mobile-bar a:last-child { background: var(--danger); color: #fff; }
  table { min-width: 620px; }
}
@media print {
  .site-header, .mobile-bar, .site-footer, .hero-actions, .main-nav, .menu-button, .scenarios { display: none !important; }
  body { background: #fff; font-size: 12pt; padding: 0; }
  .container, .narrow { width: 100%; }
  .diagnosis-wrap, .result, .result-main, .result-metric { box-shadow: none; break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}

.number-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin:24px 0; }
.number-card { background:#fff; border:1px solid var(--line); border-radius:14px; padding:18px; }
.number-card span { display:block; color:var(--muted); font-size:14px; }
.number-card strong { display:block; color:var(--danger); font-size:30px; line-height:1.25; margin-top:4px; }
.formula-box { background:#202a32; color:#fff; border-radius:16px; padding:24px; margin:28px 0; font-size:20px; }
.formula-box strong { display:block; font-size:28px; margin-bottom:6px; }
.case-nav { background:#fff; border:1px solid var(--line); border-radius:16px; padding:20px; margin:30px 0; }
.case-nav > strong { display:block; margin-bottom:12px; }
.case-nav div { display:flex; flex-wrap:wrap; gap:10px; }
.case-nav a { text-decoration:none; border:1px solid var(--line); border-radius:999px; padding:8px 13px; font-weight:800; color:var(--ink); }
.case-nav a.current { background:var(--accent); color:#fff; }
.article .key-sentence { font-size:22px; font-weight:900; line-height:1.55; padding:18px 20px; border-left:6px solid var(--danger); background:var(--danger-soft); margin:26px 0; }
.check-steps { counter-reset:step; list-style:none; padding:0 !important; }
.check-steps li { counter-increment:step; position:relative; padding:15px 16px 15px 58px; margin:10px 0 !important; background:#fff; border:1px solid var(--line); border-radius:12px; }
.check-steps li::before { content:counter(step); position:absolute; left:16px; top:14px; width:28px; height:28px; border-radius:50%; display:grid; place-items:center; background:var(--accent); color:#fff; font-weight:900; }
@media (max-width: 920px) { .number-grid { grid-template-columns:1fr 1fr; } }
@media (max-width: 640px) { .number-grid { grid-template-columns:1fr; } .formula-box { font-size:17px; } .formula-box strong { font-size:23px; } }

/* Phase 5 calculators */
.calc-panel { background:#fff; border:1px solid var(--line); border-radius:18px; padding:24px; margin:30px 0; box-shadow:0 4px 16px rgba(20,27,34,.04); }
.calc-panel h2 { margin-top:0; }
.calc-output { margin-top:20px; padding:18px 20px; border-radius:14px; background:var(--accent-soft); border-left:6px solid var(--accent); font-size:20px; font-weight:900; }
.calc-output-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-top:20px; }
@media (max-width:920px){ .calc-output-grid { grid-template-columns:1fr 1fr; } }
@media (max-width:640px){ .calc-output-grid { grid-template-columns:1fr; } }

/* Publication-ready trust layer */
.article-meta a { color: var(--muted); }
.policy-status { display:inline-flex; padding:4px 10px; border-radius:999px; background:var(--support-soft); color:var(--support); font-size:13px; font-weight:800; }
.contact-button { margin:20px 0; }
@media print { [data-clear-diagnosis], [data-clear-diagnosis-status] { display:none !important; } }
