:root {
  color-scheme: light;

  --paper: #ffffff;
  --surface: #ffffff;
  --field: #f5f7f8;
  --tint: #f6f8f9;
  --ink: #16212b;
  --ink-2: #4c5a67;
  --rule: #dde3e7;
  --petrol: #1b6670;
  --amber: #b07419;
  --amber-ink: #7f5310;
  --focus: #1b6670;

  --h1: #e4eff0;
  --h2: #bcd8db;
  --h3: #86bac0;
  --h4: #2f7a83;
  --h5: #185b64;
  --h-ink-dark: #16212b;
  --h-ink-light: #ffffff;

  --font: 'BIZ UDPGothic', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', Meiryo, sans-serif;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.6rem, 1.2rem + 1.8vw, 2.2rem);
  --space: 1.5rem;
  --radius-tile: 6px;
}

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

html {
  background: var(--paper);
  color: var(--ink);
  accent-color: var(--petrol);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.8;
  font-variant-numeric: tabular-nums;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-break: strict;
  font-feature-settings: 'palt' 0;
}

a { color: var(--petrol); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.wrap {
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 48rem) { .wrap { padding-inline: 2rem; } }

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 1rem; z-index: 1; }

h1, h2 { line-height: 1.4; font-weight: 700; letter-spacing: 0.01em; word-break: keep-all; overflow-wrap: anywhere; }
h1 { font-size: var(--step-3); margin: 0 0 1rem; }
h2 { font-size: var(--step-1); margin: 0 0 0.75rem; }
p { margin: 0 0 1rem; max-width: 40em; }

/* ---------- header / footer ---------- */
.site-head { border-bottom: 1px solid var(--rule); background: var(--surface); }
.site-head__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 0.75rem;
}
.site-name { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.15rem; display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.75rem; }
.site-tag { font-weight: 400; font-size: 0.8125rem; color: var(--ink-2); }
.site-head nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; font-size: 0.9rem; }
.site-head nav a { white-space: nowrap; }

.site-foot {
  margin-top: 4rem;
  border-top: 1px solid var(--rule);
  background: var(--tint);
  color: var(--ink-2);
  font-size: 0.85rem;
  padding-block: 2rem 3rem;
}
.site-foot p { max-width: 52em; }
.credit { color: var(--ink-2); font-size: 0.85rem; }

/* ---------- top: hero ---------- */
.hero {
  display: grid;
  gap: 2rem;
  padding-block: 2.5rem 1rem;
  align-items: start;
}
@media (min-width: 60rem) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); gap: 3rem; padding-block: 3.5rem 1.5rem; }
}
.lead { font-size: 1.1rem; }
.lead strong { font-size: 1.25em; }

.timeline {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--ink-2);
  border-left: 3px solid var(--amber);
  padding-left: 0.9rem;
}
.timeline time { display: inline-block; min-width: 7.5em; color: var(--amber-ink); font-weight: 700; }

.tilemap { margin: 0; }
.tilemap__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(7, auto);
  gap: 4px;
}
.tile {
  aspect-ratio: 1;
  max-width: 100%;
  border-radius: var(--radius-tile);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  line-height: 1.15;
  padding: 2px;
  transition: transform 120ms ease-out;
}
.tile:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile:hover { transform: none; } }
.tile__name { font-size: clamp(0.7rem, 0.5rem + 0.7vw, 0.85rem); font-weight: 700; white-space: nowrap; }
.tile__value { font-size: clamp(0.66rem, 0.48rem + 0.6vw, 0.8rem); white-space: nowrap; letter-spacing: -0.01em; }

.heat-1 { background: var(--h1); color: var(--h-ink-dark); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--petrol) 30%, transparent); }
.heat-2 { background: var(--h2); color: var(--h-ink-dark); }
.heat-3 { background: var(--h3); color: var(--h-ink-dark); }
.heat-4 { background: var(--h4); color: var(--h-ink-light); }
.heat-5 { background: var(--h5); color: var(--h-ink-light); }

.tilemap figcaption { margin-top: 0.75rem; font-size: 0.85rem; color: var(--ink-2); display: grid; gap: 0.35rem; }
.legend { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; }
.legend__item { display: inline-flex; align-items: center; gap: 0.35rem; }
.swatch { width: 0.9rem; height: 0.9rem; border-radius: 3px; display: inline-block; box-shadow: inset 0 0 0 1px rgba(22, 33, 43, 0.28); }

/* ---------- blocks / tables ---------- */
.block { margin-top: 3rem; }
.note { font-size: 0.875rem; color: var(--ink-2); }

.table-scroll { position: relative; overflow-x: auto; margin-block: 0.75rem 1rem; }
.table-scroll:focus-visible { outline-offset: 4px; }
.data {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  background: var(--surface);
  font-size: 0.92rem;
  line-height: 1.5;
}
.data--compact { min-width: 0; max-width: 32rem; }
.data caption { text-align: left; font-size: 0.875rem; color: var(--ink-2); padding-bottom: 0.4rem; }
.data th, .data td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.data thead th { font-size: 0.8125rem; color: var(--ink-2); font-weight: 700; text-align: right; border-bottom: 2px solid var(--ink); vertical-align: bottom; }
.data thead th:first-child { text-align: left; }
.data td { text-align: right; }
.data tbody th { text-align: left; font-weight: 700; }
.data tr.is-current { background: color-mix(in srgb, var(--amber) 14%, transparent); }

/* ---------- ward page ---------- */
.crumbs { font-size: 0.85rem; color: var(--ink-2); padding-top: 1.25rem; display: flex; gap: 0.5rem; }
.ward-head { padding-top: 1rem; }

.figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1.5rem 0 0;
  border-top: 2px solid var(--ink);
}
@media (min-width: 48rem) { .figures { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.figures > div { padding: 0.9rem 0.75rem 0.9rem 0; border-bottom: 1px solid var(--rule); }
.figures dt { font-size: 0.8rem; color: var(--ink-2); }
.figures dd { margin: 0; font-size: var(--step-2); font-weight: 700; line-height: 1.3; }

.chart-box { margin: 0.5rem 0 1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: 1rem 0.75rem 0.75rem; }
.chart { display: block; width: 100%; height: auto; }
.chart--compact { display: none; }
@media (max-width: 36rem) {
  .chart--wide { display: none; }
  .chart--compact { display: block; }
}
.c-grid { stroke: var(--rule); stroke-width: 1; }
.c-tick { fill: var(--ink-2); font-family: var(--font); }
.c-hike { stroke: var(--amber); stroke-width: 1.5; stroke-dasharray: 4 3; }
.c-hike.is-future { opacity: 0.6; }
.c-hike-label { fill: var(--amber-ink); font-family: var(--font); font-weight: 700; }
.c-dot { fill: var(--ink-2); opacity: 0.45; }
.c-dot.is-incomplete { fill: none; stroke: var(--ink-2); stroke-width: 1.5; }
.c-line { fill: none; stroke: var(--petrol); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.c-line-end { fill: var(--petrol); }
/* グラフの数値表示（chart-tip.js） */
.chart-box { position: relative; }
.chart[data-tip-chart] { touch-action: pan-y; cursor: crosshair; -webkit-tap-highlight-color: transparent; }
.chart[data-tip-chart]:focus { outline: none; }
.chart[data-tip-chart]:focus-visible { outline: 2px solid var(--petrol); outline-offset: 4px; border-radius: 2px; }
.c-hit { fill: #000; fill-opacity: 0; pointer-events: all; }
.c-guide { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.c-focus { fill: var(--surface); stroke: var(--petrol); stroke-width: 2.5; pointer-events: none; }
.c-focus--2 { stroke: var(--ink-2); stroke-width: 2; }
[data-tip-chart="risk"] .c-focus--2 { stroke: var(--amber); }
.chart-tip {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  display: grid;
  gap: 0.1rem;
  min-width: 12.5rem;
  max-width: calc(100% - 8px);
  padding: 0.55rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(22, 33, 43, 0.06), 0 8px 24px rgba(22, 33, 43, 0.1);
  font-size: 0.8rem;
  line-height: 1.5;
}
.chart-tip strong { font-size: 0.85rem; margin-bottom: 0.15rem; }
.chart-tip__row { display: flex; justify-content: space-between; gap: 1rem; }
.chart-tip__row > span:first-child { color: var(--ink-2); white-space: nowrap; }
.chart-tip__row > span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.chart-hint { flex-basis: 100%; }

.chart-box figcaption { display: flex; flex-wrap: wrap; gap: 0.3rem 1.25rem; font-size: 0.8rem; color: var(--ink-2); margin-top: 0.5rem; }
.key { display: inline-flex; align-items: center; gap: 0.4rem; }
.key__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-2); opacity: 0.6; }
.key__line { width: 18px; height: 3px; background: var(--petrol); border-radius: 2px; }
.key__hike { width: 0; height: 14px; border-left: 2px dashed var(--amber); }

details { margin-top: 0.5rem; }
summary { cursor: pointer; color: var(--petrol); font-size: 0.9rem; }

/* ---------- calculator ---------- */
.calc__form {
  display: grid;
  gap: 1rem 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.25rem;
  margin-block: 1rem;
}
.field { display: grid; gap: 0.3rem; align-content: start; margin: 0; }
.field > label, .field legend { font-size: 0.85rem; font-weight: 700; color: var(--ink-2); padding: 0; }
.unit-input { display: flex; align-items: center; gap: 0.4rem; }
.unit-input input, .field select {
  font: inherit;
  width: 100%;
  min-width: 0;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--field);
  color: var(--ink);
  text-align: right;
}
.field select { text-align: left; }
.unit-input span { font-size: 0.9rem; color: var(--ink-2); flex: none; white-space: nowrap; }

.rates { border: 0; padding: 0; min-inline-size: 0; grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.rates legend { margin-bottom: 0.3rem; float: left; width: 100%; }
.rate { position: relative; }
.rate input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rate span {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.95rem;
  background: var(--surface);
}
.rate input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 700; }
.rate input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.calc__result { grid-column: 1 / -1; display: grid; gap: 0.15rem; border-top: 1px solid var(--rule); padding-top: 1rem; }
.calc__label { font-size: 0.85rem; color: var(--ink-2); }
.calc__value { font-size: var(--step-3); font-weight: 700; line-height: 1.25; }
.calc__sub { font-size: 0.9rem; color: var(--ink-2); }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 0.95rem; }

/* ---------- prose ---------- */
.prose { padding-top: 2rem; }
.prose h2 { margin-top: 2.5rem; }
.prose ul { padding-left: 1.25rem; max-width: 42em; }
.prose li { margin-bottom: 0.5rem; }

/* ---------- latest (monthly) ---------- */
.latest { border-top: 1px solid var(--rule); padding-top: 1.5rem; }
.data tbody th .sub { display: block; font-weight: 400; font-size: 0.8125rem; color: var(--ink-2); white-space: normal; line-height: 1.4; }
.data tr.is-total th, .data tr.is-total td { border-top: 2px solid var(--ink); font-weight: 700; }

/* ---------- simulator ---------- */
h3 { font-size: 1.05rem; line-height: 1.5; margin: 2rem 0 0.5rem; word-break: keep-all; overflow-wrap: anywhere; }
.field-note { flex-basis: 100%; margin: 0.2rem 0 0; }
.unit-conv { display: block; min-height: 1.4em; margin-top: 0.2rem; font-size: 0.85rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sim__result { gap: 1rem; }
.sim__row { display: grid; gap: 0.1rem; }
.sim__wards { display: grid; gap: 0.4rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
}
.chip span { font-size: 0.8125rem; color: var(--ink-2); }
.chip:hover { border-color: var(--petrol); }
.prose-list { padding-left: 1.25rem; max-width: 42em; font-size: 0.92rem; }
.prose-list li { margin-bottom: 0.4rem; }

/* ---------- rate field / rises ---------- */
.rate-input { flex-basis: 100%; max-width: 12rem; margin-top: 0.25rem; }
.rate-input input { text-align: right; }
.rise-title { margin-top: 0.75rem; }
.rises { display: grid; gap: 0.25rem; }
.rise { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.25rem 1rem; align-items: baseline; padding: 0.35rem 0; border-bottom: 1px solid var(--rule); font-size: 0.92rem; }
.rise__rate { color: var(--ink-2); }
.rise__pay { font-weight: 700; }
.rise__diff { color: var(--amber-ink); min-width: 6.5em; text-align: right; }
.sim-table-title { margin-top: 2.5rem; }
/* 届く駅 */
.stations { margin-top: 2.5rem; }
.station-search { display: grid; gap: 0.35rem; margin-block: 1rem; max-width: 36rem; }
.station-search label { font-size: 0.9rem; font-weight: 700; }
.station-search input { font: inherit; font-size: 1rem; padding: 0.6rem 0.75rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--field); color: var(--ink); width: 100%; }
.station-search input:focus-visible { outline: 2px solid var(--petrol); outline-offset: 1px; background: var(--surface); }
.station-card { display: grid; gap: 0.6rem; margin-top: 0.4rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 1px 2px rgba(22, 33, 43, 0.04), 0 4px 16px rgba(22, 33, 43, 0.04); }
.station-card p { margin: 0; }
.station-card__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.9rem; }
.station-card__head strong { font-size: 1.25rem; }
.station-card__head span { font-size: 0.85rem; color: var(--ink-2); }
.station-card__status { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; font-size: 0.92rem; }
.reach-tag { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 0.1rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.station-card__facts { display: grid; gap: 0.5rem 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); margin: 0; }
.station-card__facts > div { border-top: 1px solid var(--rule); padding-top: 0.45rem; }
.station-card__facts dt { font-size: 0.8125rem; color: var(--ink-2); }
.station-card__facts dd { margin: 0; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.station-card__facts dd.sub { font-size: 0.8125rem; font-weight: 400; color: var(--ink-2); }
.station-card__link { font-size: 0.9rem; }
.station-table tr.group-row th { background: var(--surface); font-size: 0.85rem; color: var(--petrol); padding-top: 1rem; border-bottom: 1px solid var(--ink); }
.station-table tbody tr.group-row ~ tr.group-row th { color: var(--amber-ink); }
.station-table.is-collapsed tr.is-extra { display: none; }
.station-table td.empty { text-align: left; color: var(--ink-2); }
.station-table tbody th { white-space: normal; min-width: 7em; }
.more-button { font: inherit; font-size: 0.9rem; font-weight: 700; margin-top: 0.6rem; padding: 0.45rem 1rem; border: 1px solid var(--petrol); border-radius: 999px; background: var(--surface); color: var(--petrol); cursor: pointer; }
.stations .more-button + .note, .stations .table-scroll + .note { margin-top: 0.9rem; }
.more-button:hover { background: color-mix(in srgb, var(--petrol) 8%, var(--surface)); }
.data tr.is-within { background: color-mix(in srgb, var(--petrol) 9%, transparent); }
.within { display: inline-block; margin-left: 0.5rem; font-size: 0.75rem; font-weight: 700; color: var(--petrol); border: 1px solid currentColor; border-radius: 999px; padding: 0 0.45rem; line-height: 1.6; }
.rise__rate { word-break: keep-all; overflow-wrap: anywhere; }

/* ---------- layout switch ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.layout-switch { margin: 0.5rem 0 0.25rem; }
.layout-table[data-layout]:not([data-layout="all"]) { display: none; }
.layout-block:has(input[name="layout"]:not([value="all"]):checked) .layout-table[data-layout="all"] { display: none; }
.layout-block:has(input[name="layout"][value="1LDK"]:checked) .layout-table[data-layout="1LDK"],
.layout-block:has(input[name="layout"][value="2LDK"]:checked) .layout-table[data-layout="2LDK"],
.layout-block:has(input[name="layout"][value="3LDK"]:checked) .layout-table[data-layout="3LDK"] { display: block; }

.about { display: grid; gap: 0.75rem; max-width: 42em; }
.about div { display: grid; grid-template-columns: 7em 1fr; gap: 1rem; border-bottom: 1px solid var(--rule); padding-bottom: 0.75rem; }
.about dt { color: var(--ink-2); font-size: 0.9rem; }
.about dd { margin: 0; }

/* ---------- rate risk ---------- */
.rate small { display: block; font-size: 0.75rem; color: var(--ink-2); line-height: 1.3; }
.rate input:checked + span small { color: inherit; opacity: 0.8; }
.custom-scenario { display: none; flex-basis: 100%; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.25rem; }
.custom-scenario.is-open { display: flex; }
.custom-scenario .unit-input { max-width: 12rem; }
.custom-scenario label { font-size: 0.85rem; color: var(--ink-2); white-space: nowrap; }
.c-line--alt { stroke: var(--amber); stroke-dasharray: 6 4; }
.key__line--alt { background: repeating-linear-gradient(90deg, var(--amber) 0 6px, transparent 6px 9px); }
.risk-table td { min-width: 11em; }

/* ---------- upkeep ---------- */
.upkeep { display: block; grid-column: 1 / -1; }
.upkeep legend { margin-bottom: 0.4rem; }
.upkeep__grid { display: grid; gap: 0.75rem 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.upkeep__grid select { font-size: 0.85rem; }
.upkeep__rows { display: grid; gap: 0.25rem; }
.rise--total { border-bottom: 2px solid var(--ink); }
.rise--total .rise__rate, .rise--total .rise__pay { color: var(--ink); font-weight: 700; }
.rise--warn .rise__rate { color: var(--amber-ink); }

/* ---------- souba ---------- */
.souba__result { display: grid; gap: 0.2rem; background: color-mix(in srgb, var(--petrol) 5%, var(--surface)); border: 1px solid color-mix(in srgb, var(--petrol) 25%, var(--surface)); border-radius: 6px; padding: 1rem 1.25rem; margin-block: 1rem; }
.souba__pay { display: grid; gap: 0.35rem; margin-block: 1rem; }
.souba__pay .rise { grid-template-columns: minmax(0, 1fr) auto; }
.rise__plus { display: block; font-size: 0.8rem; font-weight: 400; color: var(--amber-ink); text-align: right; }
.data--budget td:nth-child(3), .data--budget td:nth-child(4) { font-weight: 700; }
@media (max-width: 36rem) {
  .data--budget th, .data--budget td { padding-inline: 0.45rem; }
  .data--budget th:first-child { padding-left: 0; }
}
.souba__pay .note { margin-top: 0.25rem; }
.souba__pos { background: var(--tint); border: 1px solid var(--rule); padding: 0.6rem 0.9rem; border-radius: 4px; }

/* ---------- programs ---------- */
[hidden] { display: none !important; }
.programs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.program { min-width: 0; overflow-wrap: anywhere; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: 1rem 1.25rem; }
.program h3 { margin: 0.4rem 0 0.5rem; font-size: 1.05rem; }
.program p { margin-bottom: 0.6rem; }
.badges { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.badge { font-size: 0.75rem; padding: 0.1rem 0.5rem; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); }
.badge--level { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 700; }
.badge--kids { border-color: var(--amber); color: var(--amber-ink); }
.program__facts { display: grid; gap: 0.4rem; margin: 0 0 0.6rem; }
.program__facts div { display: grid; grid-template-columns: 6.5em 1fr; gap: 0.75rem; font-size: 0.92rem; }
.program__facts dt { color: var(--ink-2); }
.program__facts dd { margin: 0; }
.program__changed { background: color-mix(in srgb, var(--amber) 16%, transparent); padding: 0.5rem 0.75rem; border-radius: 4px; font-size: 0.9rem; }
.program__source { font-size: 0.85rem; color: var(--ink-2); margin: 0.6rem 0 0; }
.shien-filter { margin-top: 1.5rem; }
.badge--closed { border-color: var(--ink-2); background: var(--rule); color: var(--ink); }
.shien-filter [data-shien-count] { grid-column: 1 / -1; }

/* ---------- top: income calculator ---------- */
.sim-head { padding-block: 2rem 0.5rem; }
.sim-head h1 { font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.5rem); }
.sim-layout { display: grid; gap: 1.25rem; align-items: start; margin-block: 1rem 1.5rem; }
@media (min-width: 64rem) {
  .sim-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); }
  .sim-results { position: sticky; top: 1rem; }
}
.sim-layout .calc__form { margin: 0; }
.sim-results { display: grid; gap: 1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 1.25rem; }
.sim__keys { display: grid; gap: 0.75rem; }
@media (min-width: 40rem) and (max-width: 63.99rem) { .sim__keys { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sim__keys .calc__value { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); }
.sim-map { display: grid; gap: 0.5rem; }
.sim-map__grid { gap: 3px; }
.sim-map .tile { transition: background-color 160ms ease-out, color 160ms ease-out; }
@media (prefers-reduced-motion: reduce) { .sim-map .tile { transition: none; } }
.reach-yes { background: var(--petrol); color: #fff; }
.reach-near { background: color-mix(in srgb, var(--petrol) 18%, var(--surface)); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--petrol); }
.reach-no { background: var(--field); color: var(--ink-2); outline: 1px solid var(--rule); outline-offset: -1px; }
.sim-map .legend { font-size: 0.8rem; color: var(--ink-2); }
.next-steps { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-block: 0.5rem 1rem; }
.next-steps a { font-weight: 700; }

.sim-map .tile__value { white-space: nowrap; font-size: clamp(0.5rem, 0.28rem + 0.95vw, 0.74rem); letter-spacing: -0.01em; }
.sim-sticky {
  position: fixed; left: 0.75rem; right: 0.75rem; bottom: 0.75rem; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.6rem 0.9rem; border-radius: 10px;
  background: var(--ink); color: var(--paper); text-decoration: none; font-size: 0.8rem;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--ink) 25%, transparent);
  transition: transform 180ms ease-out, opacity 180ms ease-out;
}
.sim-sticky span { display: grid; line-height: 1.3; }
.sim-sticky strong { font-size: 1.05rem; }
.sim-sticky__go { font-weight: 700; white-space: nowrap; }
.sim-sticky.is-hidden { transform: translateY(150%); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .sim-sticky { transition: none; } }
@media (min-width: 64rem) { .sim-sticky { display: none; } }

/* ---------- white theme ---------- */
.calc__form, .sim-results, .chart-box, .program, .souba__result { box-shadow: 0 1px 2px rgba(22, 33, 43, 0.04), 0 4px 16px rgba(22, 33, 43, 0.04); }
.data thead th { background: var(--surface); }
.data tbody tr:nth-child(even) { background: var(--tint); }
.data tr.is-current, .data tr.is-within { background: color-mix(in srgb, var(--petrol) 9%, transparent); }

.sim-rise-note { font-size: 0.9rem; color: var(--ink-2); border-top: 1px solid var(--rule); padding-top: 0.75rem; }
.sim-rise-note strong { color: var(--ink); }

p, li, dd, caption { text-wrap: pretty; }

/* 文章の横幅はページ内でそろえる（表やカードと同じ幅まで使う） */
p, .prose ul, .prose-list, .about, .site-foot p { max-width: none; }

/* ---------- データの時点の補足（成約データの公表の遅れ） ---------- */
.notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  margin-block: 1.25rem;
  padding: 0.9rem 1rem;
  background: color-mix(in srgb, var(--petrol) 5%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--petrol) 22%, var(--surface));
  border-radius: 8px;
  font-size: 0.92rem;
}
.notice__icon { width: 1.2rem; height: 1.2rem; margin-top: 0.15rem; color: var(--petrol); }
.notice p { margin: 0; }
.notice__body > * + * { margin-top: 0.45rem; }
.notice__title { font-weight: 700; color: var(--ink); }
.notice details { margin-top: 0.45rem; }
.notice summary { font-size: 0.86rem; }
.notice__list { margin: 0.5rem 0 0; padding-left: 1.2em; display: grid; gap: 0.35rem; color: var(--ink-2); font-size: 0.86rem; }
.notice--compact { padding: 0.7rem 0.9rem; font-size: 0.88rem; }
.lag { margin-top: 0.6rem; }
.lag__bar { position: relative; display: flex; height: 10px; margin-top: 1.35rem; border-radius: 5px; background: var(--rule); }
.lag__data { background: var(--petrol); border-radius: 5px 0 0 5px; }
.lag__gap { border-radius: 0 5px 5px 0; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--ink-2) 30%, transparent) 0 3px, transparent 3px 7px); }
.lag__hike { position: absolute; top: -5px; bottom: -5px; border-left: 2px dashed var(--amber); }
.lag__hike span { position: absolute; bottom: calc(100% + 1px); left: 0; transform: translateX(-50%); font-size: 0.72rem; font-weight: 700; color: var(--amber-ink); white-space: nowrap; }
.lag__labels { display: flex; gap: 0.5rem; margin-top: 0.35rem; font-size: 0.8rem; color: var(--ink-2); line-height: 1.4; }
.lag__labels span { min-width: 0; }
.lag__labels span:first-child { flex: none; }
.lag__labels span:last-child { flex: 1; text-align: right; }

/* ---------- 修繕積立金の値上がり ---------- */
.cost { margin-block: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.cost__title { margin: 0 0 0.35rem; font-size: 1.1rem; }
.cost > p { margin: 0 0 0.5rem; }
.cost-switch { margin-block: 0.75rem 0.5rem; }
.cost-lead { margin: 0.5rem 0; font-weight: 700; }
.c-line--base { stroke: var(--ink-2); stroke-width: 2; stroke-dasharray: 5 4; opacity: 0.75; }
.key__line--base { background: repeating-linear-gradient(90deg, var(--ink-2) 0 5px, transparent 5px 9px); }
[data-tip-chart="cost"] .c-focus--2 { stroke: var(--ink-2); }

/* ---------- 物件探しへの導線 ---------- */
.cta {
  margin-block: 2rem 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(22, 33, 43, 0.04), 0 4px 16px rgba(22, 33, 43, 0.04);
}
.cta__title { margin: 0 0 0.25rem; font-size: 1.15rem; }
.cta__cond { margin: 0 0 0.9rem; font-size: 0.9rem; color: var(--ink-2); }
.cta__buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cta__btn {
  flex: 1 1 13rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0.55rem 1.1rem;
  border: 1.5px solid var(--petrol);
  border-radius: 8px;
  background: var(--surface);
  color: var(--petrol);
  font-weight: 700;
  text-decoration: none;
}
.cta__btn:hover { background: color-mix(in srgb, var(--petrol) 8%, var(--surface)); }
.cta__btn--primary { background: var(--petrol); color: #fff; }
.cta__btn--primary:hover { background: color-mix(in srgb, var(--petrol) 85%, #000); }
.cta__btn:focus-visible, .cta__copy:focus-visible { outline: 2px solid var(--petrol); outline-offset: 2px; }
.cta__ext { font-size: 0.75rem; font-weight: 400; opacity: 0.85; white-space: nowrap; }
.cta__pr { font-size: 0.7rem; padding: 0 0.35rem; border: 1px solid currentColor; border-radius: 3px; }
.cta__consult { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 1rem; padding-top: 0.9rem; border-top: 1px dashed var(--rule); }
.cta__consult p { flex: 1 1 16rem; margin: 0; font-size: 0.9rem; }
.cta__copy { font: inherit; font-size: 0.88rem; font-weight: 700; padding: 0.45rem 0.95rem; border: 1px solid var(--ink-2); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; }
.cta__copy:hover { border-color: var(--petrol); color: var(--petrol); }
.cta .note { margin: 0.75rem 0 0; }
.station-card__portals { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin: 0; font-size: 0.88rem; }
.station-card__portals > span { flex-basis: 100%; color: var(--ink-2); }
.station-card__portals a { font-weight: 700; }
.station-card__portals .cta__ext { margin-left: 0.3rem; }

/* ---------- 表：横スクロールの手がかり・先頭列の固定・文字の列は左寄せ（table-ui.js） ---------- */
.table-wrap { position: relative; }
.table-wrap::before, .table-wrap::after { content: ''; position: absolute; top: 0; bottom: 0; width: 1.25rem; pointer-events: none; opacity: 0; transition: opacity 150ms; z-index: 2; }
.table-wrap::before { left: 0; background: linear-gradient(to right, rgba(22, 33, 43, 0.12), transparent); }
.table-wrap::after { right: 0; background: linear-gradient(to left, rgba(22, 33, 43, 0.12), transparent); }
.table-wrap[data-more-left]::before, .table-wrap[data-more-right]::after { opacity: 1; }
.table-wrap[data-scrollable] .data tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--rule); }
.table-wrap[data-scrollable] .data thead th:first-child { position: sticky; left: 0; z-index: 1; }
.table-wrap[data-scrollable] .data tbody tr:nth-child(even) th { background: var(--tint); }
.table-wrap[data-scrollable] .data tr.is-current th, .table-wrap[data-scrollable] .data tr.is-within th { background: color-mix(in srgb, var(--petrol) 9%, var(--surface)); }
.table-wrap[data-scrollable] .station-table tr.group-row th { position: static; box-shadow: none; }
.table-hint { display: none; margin: 0.25rem 0 0; font-size: 0.8125rem; color: var(--ink-2); }
.table-wrap[data-more-right] + .table-hint, .table-wrap[data-more-left] + .table-hint { display: block; }
.data th.is-text, .data td.is-text { text-align: left; }
@media (prefers-reduced-motion: reduce) { .table-wrap::before, .table-wrap::after { transition: none; } }

/* 物件探しのボタンは、どのサイトも同じ見た目にする（特定のサイトを勧めているように見せない） */
.cta__btn--primary { background: var(--surface); color: var(--petrol); }
.cta__btn--primary:hover { background: color-mix(in srgb, var(--petrol) 8%, var(--surface)); }
.table-wrap[data-scrollable] .data caption { position: sticky; left: 0; width: max-content; max-width: calc(100vw - 2.5rem); white-space: normal; }

/* グラフ：結論の見出し・副題・出典、公表待ちの帯、最新値のラベル */
.chart-title { margin-bottom: 0.25rem; }
.chart-sub { margin: 0 0 0.5rem; font-size: 0.875rem; color: var(--ink-2); }
.chart-source { flex-basis: 100%; font-size: 0.8125rem; color: var(--ink-2); line-height: 1.6; }
.c-hike { stroke-width: 1.2; opacity: 0.7; }
.c-end-label { font-family: var(--font); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.key__pending { width: 14px; height: 12px; border: 1px solid var(--rule); background: repeating-linear-gradient(135deg, #9aa5ae 0 1.5px, transparent 1.5px 5px); }
.notice__meta { font-size: 0.8125rem; color: var(--ink-2); }

/* 年収から計算：安心の一文・円で入れた時の案内・前提の条件（スマホは畳む）・変化の差分・共有リンク */
.sim-privacy { grid-column: 1 / -1; margin: 0; font-size: 0.875rem; color: var(--ink-2); }
.sim-more { grid-column: 1 / -1; }
.sim-more > summary { display: grid; gap: 0.15rem; padding: 0.7rem 0.9rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--field); cursor: pointer; list-style: none; }
.sim-more > summary::-webkit-details-marker { display: none; }
.sim-more__label { font-size: 0.875rem; font-weight: 700; color: var(--petrol); }
.sim-more__label::after { content: ' ▾'; }
.sim-more[open] .sim-more__label::after { content: ' ▴'; }
.sim-more__values { font-size: 0.875rem; color: var(--ink-2); }
.sim-more__body { display: grid; gap: 1rem 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); margin-top: 1rem; }
@media (min-width: 64rem) {
  .sim-more > summary { display: none; }
  .sim-more__body { margin-top: 0; }
}
.delta { display: inline-block; margin-left: 0.5rem; font-size: 0.875rem; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.delta.is-up { color: var(--petrol); }
.delta.is-down { color: var(--ink); }
.delta:not(:empty) { animation: delta-in 180ms ease-out; }
@keyframes delta-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .delta:not(:empty) { animation: none; } }
.sim-context { display: block; }
.sim-share { display: grid; gap: 0.35rem; justify-items: start; border-top: 1px solid var(--rule); padding-top: 0.75rem; }
.sim-share .note { margin: 0; }

/* 差分は数字の右に並べ、出たり消えたりしても高さを変えない */
.sim__row { grid-template-columns: max-content minmax(0, 1fr); align-items: baseline; column-gap: 0.6rem; }
.sim__row > .calc__label, .sim__row > .calc__sub { grid-column: 1 / -1; }
.sim__row > .delta { margin-left: 0; }
[data-yen-hint]:empty { display: none; }
/* スマホのヘッダー：サイトの説明を隠し、メニューを1行で横にスクロール */
@media (max-width: 40rem) {
  .site-tag { display: none; }
  .site-head__inner { gap: 0.35rem; }
  .site-head nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -1rem; padding-inline: 1rem; padding-block: 0.15rem 0.3rem; mask-image: linear-gradient(to right, #000 85%, transparent); }
  .site-head nav::-webkit-scrollbar { display: none; }
}

/* ---------- 区ページ：順位・目次・価格の近い区 ---------- */
.figures dd.figures__sub { margin-top: 0.15rem; font-size: 0.8125rem; font-weight: 400; color: var(--ink-2); line-height: 1.4; }
.toc { margin-block: 1.25rem 0; padding: 0.8rem 1rem; border: 1px solid var(--rule); border-radius: 6px; }
.toc__title { margin: 0 0 0.4rem; font-size: 0.875rem; font-weight: 700; color: var(--ink-2); }
.toc ol { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin: 0; padding: 0; list-style: none; font-size: 0.92rem; }
.toc a { white-space: nowrap; }
[id] { scroll-margin-top: 1rem; }
.similar { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); margin: 0.75rem 0 0; padding: 0; list-style: none; }
.similar a { display: grid; gap: 0.2rem; height: 100%; padding: 0.85rem 1rem; border: 1px solid var(--rule); border-radius: 6px; color: var(--ink); text-decoration: none; }
.similar a:hover { border-color: var(--petrol); }
.similar strong { color: var(--petrol); font-size: 1.05rem; }
.similar__price { font-weight: 700; font-variant-numeric: tabular-nums; }
.similar__price span { font-weight: 400; font-size: 0.875rem; color: var(--ink-2); }
.similar__meta { font-size: 0.875rem; color: var(--ink-2); }

/* ---------- 23区の表：推移の線・上がり幅のバー・並べ替え ---------- */
.spark-cell { padding-block: 0.2rem; }
.spark { display: block; margin-left: auto; }
.bar-cell { display: inline-grid; grid-template-columns: 3.5rem 4.2em; align-items: center; gap: 0.5rem; text-align: right; }
.bar { display: inline-block; width: 3.5rem; height: 0.55rem; border-radius: 2px; background: linear-gradient(to right, var(--petrol) calc(var(--v) * 100%), color-mix(in srgb, var(--petrol) 10%, transparent) 0); }
.sort-btn { font: inherit; font-weight: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 0.25rem; text-align: inherit; }
.sort-btn:hover { color: var(--petrol); }
.sort-btn:focus-visible { outline: 2px solid var(--petrol); outline-offset: 2px; border-radius: 2px; }
.sort-btn__icon::after { content: '↕'; font-size: 0.75em; opacity: 0.45; }
th[aria-sort="descending"] .sort-btn__icon::after { content: '↓'; opacity: 1; }
th[aria-sort="ascending"] .sort-btn__icon::after { content: '↑'; opacity: 1; }

/* ---------- 言葉の説明（点線の下線を押すと小窓） ---------- */
.term { color: inherit; text-decoration: underline dotted color-mix(in srgb, var(--petrol) 70%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 0.28em; cursor: help; }
.term:hover { color: var(--petrol); }
.term-pop {
  max-width: min(30rem, calc(100vw - 2rem));
  padding: 1rem 1.15rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 4px 10px rgba(22, 33, 43, 0.08), 0 16px 40px rgba(22, 33, 43, 0.16);
  font-size: 0.95rem;
  line-height: 1.75;
}
.term-pop::backdrop { background: rgba(22, 33, 43, 0.18); }
.term-pop p { margin: 0 0 0.5rem; }
.term-pop__title { font-weight: 700; font-size: 1.05rem; color: var(--petrol); }
.term-pop__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin: 0.75rem 0 0 !important; font-size: 0.875rem; }
.term-pop__close { font: inherit; font-weight: 700; padding: 0.35rem 1rem; border: 1px solid var(--ink-2); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; }
@media (max-width: 40rem) {
  .term-pop { inset: auto 0.75rem 0.75rem; margin: 0; max-width: none; width: auto; }
}
.glossary { display: grid; gap: 0; margin: 0; }
.glossary > div { padding: 0.9rem 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 1rem; }
.glossary dt { font-weight: 700; font-size: 1.05rem; }
.glossary dd { margin: 0.25rem 0 0; }
.glossary > div:target { background: color-mix(in srgb, var(--petrol) 6%, transparent); }

/* ---------- 言語の切り替えと英語版 ---------- */
.site-head__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; }
.lang-switch { font-size: 0.85rem; white-space: nowrap; padding: 0.1rem 0.65rem; border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; line-height: 1.6; }
.lang-switch:hover { border-color: var(--petrol); }
@media (max-width: 40rem) {
  .site-head__top { width: 100%; flex-wrap: nowrap; justify-content: space-between; }
}
/* 英語は単語の途中で折り返さない（日本語向けの overflow-wrap: anywhere を戻す） */
:lang(en) body { word-break: normal; }
:lang(en) body, :lang(en) h1, :lang(en) h2, :lang(en) h3 { overflow-wrap: break-word; }
:lang(en) body { line-height: 1.65; }
/* 英語の区名はタイルの幅に合わせて文字を小さくする（長い区名は2行に分けてある） */
:lang(en) .tile { container-type: inline-size; }
:lang(en) .tile__name { font-size: min(0.8rem, 20cqi); line-height: 1.05; letter-spacing: -0.01em; }

/* ---------- 2026-09-15 競合比較を受けた改修 ---------- */
.foot-updated { font-size: 0.85rem; color: var(--ink-2); }
.features li { margin-block: 0.35rem; }
.more-rows { margin-top: 0.5rem; }
.more-rows > summary { cursor: pointer; font-weight: 700; color: var(--petrol); padding-block: 0.4rem; }
.ward-picker__title { font-size: var(--step-1, 1.15rem); margin-bottom: 0.5rem; }
.ward-picker ul { display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; margin: 0; padding: 0; list-style: none; }
.ward-picker a { display: inline-block; padding: 0.3rem 0.65rem; border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; font-size: 0.92rem; }
.ward-picker a:hover { border-color: var(--petrol); }
.two-tables { display: grid; gap: 1rem; }
@media (min-width: 64rem) { .two-tables { grid-template-columns: 1fr 1fr; } }
.steps { padding-left: 1.4rem; }
.steps li, .checklist li { margin-block: 0.45rem; }
.checklist { padding-left: 1.2rem; }
.souba__verdict { margin-block: 0.75rem; padding: 0.8rem 1rem; border-radius: 6px; border: 1px solid var(--rule); }
.souba__verdict p { margin: 0.3rem 0; }
.souba__verdict-head { font-weight: 700; }
.souba__badge { display: inline-block; margin-right: 0.5rem; padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.85rem; background: var(--paper-2, #f3f4f4); }
.souba__verdict--high { border-color: #c98a2b; }
.souba__verdict--high .souba__badge { background: #fbeed8; color: #7a4a06; }
.souba__verdict--low { border-color: #3d7ea6; }
.souba__verdict--low .souba__badge { background: #e2eef6; color: #1f4f6e; }
.souba__verdict--mid .souba__badge { background: #e6f2ea; color: #1f5a33; }
.souba__conf { display: block; margin-top: 0.35rem; font-size: 0.92rem; }
.souba__conf .note { display: block; }
.souba__warn { padding: 0.6rem 0.85rem; border-left: 3px solid #c98a2b; background: #fdf7ec; }
.souba__links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; }
.souba__sub-title { margin-top: 1.25rem; font-size: 1.05rem; }
.risk-conclusion { margin-block: 1rem; padding: 0.85rem 1rem; border: 1px solid var(--petrol); border-radius: 6px; }
.risk-conclusion p { margin: 0.2rem 0; }
.risk-table__ref th, .risk-table__ref td { color: var(--ink-2); }
.c-line--fixed { stroke: var(--ink-2); stroke-width: 2; stroke-dasharray: 2 4; }
.key__line--fixed { border-top-style: dotted !important; border-top-color: var(--ink-2) !important; }
@media (max-width: 40rem) {
  .risk-scroll { overflow-x: visible; }
  .risk-table thead { display: none; }
  .risk-table, .risk-table tbody, .risk-table tr, .risk-table th, .risk-table td { display: block; width: 100%; }
  .risk-table td { min-width: 0; padding-left: 0; }
  .risk-table td[data-label]::before { content: attr(data-label) "：" ; color: var(--ink-2); font-size: 0.85rem; display: block; }
  .risk-table tr { padding-block: 0.5rem; border-bottom: 1px solid var(--rule); }
}
.diagram { margin-block: 1rem; }
.diagram svg { max-width: 520px; display: block; }
.dg-principal { fill: #9cc3cf; }
.dg-interest { fill: #e2a24a; }
.dg-label { font-size: 12px; fill: currentColor; }
.diagram .swatch { display: inline-block; width: 0.9em; height: 0.9em; margin-right: 0.3em; vertical-align: -0.1em; }
.diagram figcaption { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.85rem; color: var(--ink-2); }
.flow { list-style: none; padding: 0; counter-reset: flow; }
.flow > li { position: relative; padding: 0.2rem 0 1rem 2.6rem; border-left: 2px solid var(--rule); margin-left: 0.9rem; }
.flow > li:last-child { border-left-color: transparent; }
.flow > li::before { counter-increment: flow; content: counter(flow); position: absolute; left: -0.95rem; top: 0; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--petrol); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; }
.flow h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.flow p { margin: 0.2rem 0; }
.flow .flow__meta { font-size: 0.88rem; color: var(--ink-2); }
.cost-calc__rows { display: grid; gap: 0.15rem; }
.qa details { border-bottom: 1px solid var(--rule); padding-block: 0.4rem; }
.qa summary { cursor: pointer; font-weight: 700; padding-block: 0.4rem; }
.qa details > div { padding-bottom: 0.5rem; }
.income-quick td, .income-quick th { white-space: nowrap; }
.mk { display: inline-block; min-width: 3.6em; padding: 0.05rem 0.4rem; margin-right: 0.35rem; border-radius: 4px; font-size: 0.78rem; font-weight: 700; text-align: center; }
.mk--yes { background: #d9efe1; color: #1f5a33; }
.mk--near { background: #fbeed8; color: #7a4a06; }
.mk--no { background: #eef0f1; color: #5b6468; }
.mk-price { font-variant-numeric: tabular-nums; }
.badge--timing { background: #e2eef6; color: #1f4f6e; }
.badge--residency { background: #fbeed8; color: #7a4a06; }
.program__official { margin: 0.15rem 0 0; font-size: 0.85rem; color: var(--ink-2); }
.program__terms { font-size: 0.9rem; }
#timing details { margin-block: 0.35rem; }
#timing summary { cursor: pointer; font-weight: 700; }
.hiyou-table td:nth-child(3) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.hiyou-total { margin-top: 0.6rem; }
.two-tables > * { min-width: 0; }
@media (max-width: 40rem) {
  .risk-table { min-width: 0 !important; width: 100% !important; }
  .risk-table th, .risk-table td { min-width: 0 !important; white-space: normal !important; }
}
.hiyou-more { grid-column: 1 / -1; border: 1px solid var(--rule); border-radius: 6px; padding: 0.4rem 0.8rem; }
.hiyou-more > summary { cursor: pointer; font-weight: 700; color: var(--petrol); padding-block: 0.35rem; }
.hiyou-more__body { display: grid; gap: 0.75rem; padding-block: 0.5rem; }
@media (min-width: 48rem) { .hiyou-more__body { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.risk-conclusion__list { margin: 0.25rem 0 0; }
.risk-conclusion__list li { margin-block: 0.25rem; }
@media (max-width: 40rem) { .risk-table td { text-align: left; } }
.hiyou-note { grid-column: 1 / -1; margin: 0; }

/* ---------- 2026-09-16 見た目の整理（文字が単調に並んで見える点の改善） ---------- */
/* 見出し：大きさを上げ、区切りの印を付けて、どこから新しい話かを目で追えるようにする */
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
.block { margin-top: 3.25rem; }
.block > h2, .prose h2 { position: relative; padding-top: 0.9rem; }
.block > h2::before, .prose h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 2.25rem;
  height: 4px;
  border-radius: 2px;
  background: var(--petrol);
}
.lead { color: var(--ink-2); }
.lead strong { color: var(--ink); }

/* ヘッダー：メニューを押しやすい形にし、今いるページを塗りで示す */
.site-head nav { flex-basis: 100%; min-width: 0; gap: 0.3rem 0.35rem; margin-top: 0.15rem; }
.site-head nav a { text-decoration: none; color: var(--ink); padding: 0.32rem 0.7rem; border-radius: 999px; line-height: 1.7; }
.site-head nav a:hover { background: color-mix(in srgb, var(--petrol) 12%, transparent); color: var(--petrol); text-decoration: none; }
.site-head nav a[aria-current='page'] { background: var(--petrol); color: #fff; }
.site-head nav a[aria-current='page']:hover { background: var(--petrol); color: #fff; }

/* 表：見出し行に色を敷き、表題を本文と区別する */
.data caption { font-weight: 700; color: var(--ink); font-size: 0.9rem; padding-bottom: 0.5rem; }
.data thead th { background: color-mix(in srgb, var(--petrol) 8%, #fff); color: var(--ink); border-bottom: 2px solid color-mix(in srgb, var(--petrol) 55%, #fff); }
.table-wrap[data-scrollable] .data thead th:first-child { background: color-mix(in srgb, var(--petrol) 8%, #fff); }

/* 区ページなどの主要な数字：枠で囲んで、表の連なりから浮かせる */
.figures { border-top: none; gap: 0.6rem; }
.figures > div { border: 1px solid var(--rule); border-bottom: 1px solid var(--rule); border-radius: 10px; background: var(--tint); padding: 0.8rem 0.9rem; }
.figures dt { font-weight: 700; }
.figures dd { font-size: 1.45rem; }

/* よくある質問：一問ずつ枠に入れ、開閉が分かる印を付ける */
.qa details { border: 1px solid var(--rule); border-bottom: 1px solid var(--rule); border-radius: 10px; background: var(--surface); margin-block: 0.5rem; padding: 0.2rem 1rem; }
.qa details[open] { background: color-mix(in srgb, var(--petrol) 4%, #fff); }
.qa summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '＋'; color: var(--petrol); font-weight: 700; flex: none; }
.qa details[open] > summary::after { content: '−'; }
.qa summary:hover { color: var(--petrol); }

/* 下の帯：本文との境目をはっきりさせる */
.site-foot { background: color-mix(in srgb, var(--petrol) 6%, #fff); }

/* 表：1つずつ枠に入れ、続けて並んでも区切りが分かるようにする */
.table-scroll { border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
.data caption { padding: 0.7rem 0.85rem 0.55rem; }
.data th, .data td { padding-inline: 0.85rem; }
.data tbody tr:last-child > th, .data tbody tr:last-child > td { border-bottom: none; }

/* 目次・グラフ・制度カード：角と色を他の部品とそろえる */
.toc { background: var(--tint); border-radius: 10px; }
.toc__title { color: var(--petrol); }
.chart-box, .program { border-radius: 10px; }
.prose h2 { margin-top: 3rem; }

/* 年収から計算：結果の欄に薄い色を敷いて、入力欄と役割の違いを示す */
.sim-results { background: color-mix(in srgb, var(--petrol) 4%, var(--surface)); border-radius: 10px; }
.calc__form { border-radius: 10px; }

/* 支援制度の絞り込み：説明文が細い列に押し込まれて改行が崩れていたので、横幅いっぱいに置く */
.shien-filter > .note { grid-column: 1 / -1; }

/* 表の横スクロールを減らす：見出しと文字の列は折り返す（数字は折り返さない） */
.data thead th { white-space: normal; }
.data th.is-text, .data td.is-text { white-space: normal; }
.data td.is-text { max-width: 24em; }
/* 2つ並べた表は、列の幅を内容に合わせて詰める（34remの下限で横スクロールが出ていた） */
.two-tables .data { min-width: 0; }

/* スマホで主な項目だけ表示する表の、隠す列と切り替えボタン */
.data th[hidden], .data td[hidden] { display: none !important; }
.cols-toggle { display: inline-block; margin: 0.1rem 0 0.75rem; padding: 0.35rem 0.9rem; font: inherit; font-size: 0.9rem; font-weight: 700; color: var(--petrol); background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; cursor: pointer; }
.cols-toggle:hover { border-color: var(--petrol); }
@media (max-width: 40rem) {
  /* スマホでは表の幅の下限（34rem）を外し、左端の見出しも折り返す。文字の列は狭くなりすぎないようにする */
  .data { min-width: 0; }
  .data th, .data td { padding-inline: 0.6rem; }
  .data tbody th { white-space: normal; }
  .data th.is-text, .data td.is-text { min-width: 4.5em; }
  .data[data-cols-sp][data-all-cols='1'] { min-width: 34rem; }
  .data[data-cols-sp][data-all-cols='1'] th, .data[data-cols-sp][data-all-cols='1'] td { white-space: nowrap; }
}
