/* ==========================================================================
   tonari LP — 共通スタイル
   方針: 人が主役／IBM Plex Sans JP（本文）＋ IBM Plex Mono（数値）
         tonari Blue（#3E38F3）は主ボタンと小さな印だけ。面で使わない。
         暗い面はネイビー（#202644）を問い合わせ欄にだけ使う。
   ========================================================================== */
:root {
  --ink: #1B1D29;
  --ink-2: #444857;
  --muted: #656A7B;      /* 白地で 5.2:1 */
  --line: #E1E3EA;
  --line-strong: #C9CCD6;
  --paper: #FFFFFF;
  --soft: #F5F6F8;
  --navy: #202644;
  --navy-2: #2C3358;
  --blue: #3E38F3;
  --blue-deep: #2A25C9;
  --focus: #3E38F3;
  --error: #B42318;
  --radius: 10px;
  --maxw: 1120px;
  --gutter: 24px;
  --sans: "IBM Plex Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
@media (max-width: 640px) { :root { --gutter: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.8;
  font-feature-settings: "palt" 0; -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere; word-break: normal; line-break: strict;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1em; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; text-decoration: none; }
.skip:focus { top: 8px; color: #fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: 42em; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { font-weight: 600; font-size: 20px; letter-spacing: -.01em; text-decoration: none; color: var(--ink); line-height: 1; }
.brand::after { content: "."; color: var(--blue); }
.site-nav { margin-left: auto; display: flex; gap: 22px; align-items: center; font-size: 14px; }
.site-nav a { text-decoration: none; color: var(--ink-2); }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }
.site-nav .btn { color: #fff; }
@media (max-width: 900px) { .site-nav .navlink { display: none; } }
@media (max-width: 640px) { .site-header .wrap { min-height: 56px; } .site-nav .btn { padding: 8px 14px; font-size: 13px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 48px; padding: 12px 24px; border-radius: 8px; border: 1.5px solid var(--blue);
  background: var(--blue); color: #fff; font: inherit; font-weight: 600; font-size: 15px; line-height: 1.4;
  text-decoration: none; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--secondary:hover { background: var(--soft); color: var(--ink); border-color: var(--ink-2); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: start; }
.hero-for { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.hero h1 { font-size: clamp(27px, 4vw, 44px); line-height: 1.42; margin: 0 0 18px; max-width: 16em; }
.hero-sub { font-size: 17px; color: var(--ink-2); max-width: 34em; margin: 0 0 26px; }
.hero .btn-row { margin-bottom: 8px; }
.definition { margin: 32px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.85; color: var(--ink-2); max-width: 40em; }
.definition strong { color: var(--ink); font-weight: 600; }
.hero-figure { margin: 0; }
@media (max-width: 900px) {
  .hero { padding: 28px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-sub { font-size: 16px; margin-bottom: 20px; }
  .hero .btn-row .btn { flex: 1 1 100%; }
}

/* A/B 表示（JS 無しでは A を表示） */
.v-b { display: none; }
html[data-variant="B"] .v-a { display: none; }
html[data-variant="B"] .v-b { display: block; }
html[data-variant="B"] .btn-row.v-b { display: flex; }

/* ---------- figures ---------- */
.figure { margin: 0; }
.figure svg { width: 100%; }
.figure figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.tag-image { display: inline-block; font-size: 12px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 6px; margin-right: 6px; color: var(--ink-2); background: var(--paper); }
.photo-slot {
  aspect-ratio: 16 / 9; border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background: var(--soft); display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--muted); font-size: 13px; padding: 20px;
}

/* ---------- sections ---------- */
.sec { padding: 96px 0; }
.sec--soft { background: var(--soft); }
.sec + .sec:not(.sec--soft):not(.sec--dark) { border-top: 1px solid var(--line); }
.sec h2 { font-size: clamp(22px, 2.7vw, 30px); line-height: 1.5; max-width: 24em; margin: 0 0 20px; }
.answer { font-size: 17px; line-height: 1.9; color: var(--ink); max-width: 40em; margin: 0 0 8px; }
.sec p.body { color: var(--ink-2); max-width: 40em; }
.sec h3 { font-size: 18px; line-height: 1.6; margin: 0 0 8px; }
.source { font-size: 13px; color: var(--muted); margin-top: 18px; max-width: 48em; }
.block { margin-top: 48px; }
@media (max-width: 640px) { .sec { padding: 64px 0; } .answer { font-size: 16px; } .block { margin-top: 36px; } }

/* 場面リスト（順序のない列挙） */
.scene-list { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.scene-list li { padding: 22px 0; border-top: 1px solid var(--line-strong); }
.scene-list strong { display: block; font-weight: 600; font-size: 16.5px; line-height: 1.65; margin-bottom: 6px; }
.scene-list span { color: var(--ink-2); font-size: 15px; }
@media (max-width: 760px) { .scene-list { grid-template-columns: 1fr; } }

/* 用途（上罫線の段組み。箱にしない） */
.uses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 48px; margin-top: 44px; }
.uses.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.use { border-top: 2px solid var(--ink); padding-top: 18px; }
.use p { color: var(--ink-2); font-size: 15px; margin: 0; }
@media (max-width: 860px) { .uses, .uses.three { grid-template-columns: 1fr; gap: 32px; } }

/* 手順（本当に順序があるものだけ番号を振る） */
.steps { list-style: none; counter-reset: step; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.steps li { counter-increment: step; border-top: 1px solid var(--line-strong); padding-top: 16px; }
.steps li::before { content: counter(step); font-family: var(--mono); font-size: 13px; color: var(--blue); display: block; margin-bottom: 6px; }
.steps strong { display: block; font-size: 16px; margin-bottom: 4px; }
.steps span { font-size: 14.5px; color: var(--ink-2); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- 比較表（モバイルでは行ごとのカードに組み替え） ---------- */
.tbl { width: 100%; border-collapse: collapse; margin-top: 36px; font-size: 14.5px; line-height: 1.7; }
.tbl caption { text-align: left; font-size: 13px; color: var(--muted); caption-side: bottom; padding-top: 14px; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 14px 12px; border-bottom: 1px solid var(--line); }
.tbl thead th { font-size: 13px; font-weight: 500; color: var(--muted); border-bottom: 1.5px solid var(--ink); }
.tbl tbody th { font-weight: 600; width: 18%; }
.tbl .is-tonari { background: #F3F3FE; }
.tbl thead .is-tonari { color: var(--ink); font-weight: 600; box-shadow: inset 0 3px 0 var(--blue); }
@media (max-width: 860px) {
  .tbl, .tbl tbody, .tbl tr, .tbl td, .tbl th { display: block; width: 100%; }
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl tr { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; background: var(--paper); overflow: hidden; }
  .tbl tbody th { background: var(--soft); border-bottom: 1px solid var(--line); width: 100%; }
  .tbl td { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 12px; padding: 12px 14px; }
  .tbl td::before { content: attr(data-label); font-size: 12.5px; color: var(--muted); line-height: 1.6; }
  .tbl td:last-child { border-bottom: 0; }
  .tbl .is-tonari { box-shadow: inset 3px 0 0 var(--blue); }
}

/* ---------- 仕様表 ---------- */
.spec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; margin-top: 40px; }
.spec dl { margin: 0; display: grid; grid-template-columns: 11em minmax(0, 1fr); border-top: 1.5px solid var(--ink); }
.spec dt, .spec dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.spec dt { color: var(--muted); padding-right: 12px; }
.spec dd .num { font-size: 15.5px; }
@media (max-width: 860px) { .spec { grid-template-columns: 1fr; gap: 32px; } .spec dl { grid-template-columns: 8.5em minmax(0, 1fr); } }

/* ---------- 前後比較 ---------- */
.ba { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; margin-top: 40px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ba > div { padding: 28px; }
.ba > div + div { border-left: 1px solid var(--line); background: #F7F7FE; }
.ba h3 { font-size: 16px; margin-bottom: 14px; }
.ba ul { margin: 0; padding-left: 1.2em; color: var(--ink-2); font-size: 15px; }
.ba li + li { margin-top: 10px; }
@media (max-width: 760px) { .ba { grid-template-columns: 1fr; } .ba > div + div { border-left: 0; border-top: 1px solid var(--line); } .ba > div { padding: 22px; } }

/* ---------- 計算機 ---------- */
.calc { margin-top: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); padding: 32px; }
.calc-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 24px; margin: 0; padding: 0; border: 0; }
.calc-fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calc-group { border: 0; margin: 0 0 24px; padding: 0; min-width: 0; }
.calc-group legend { font-weight: 600; font-size: 15.5px; padding: 0; margin-bottom: 12px; }
.calc label { display: block; font-size: 14px; color: var(--ink-2); line-height: 1.55; margin-bottom: 6px; }
.calc .unit { color: var(--muted); }
.calc input, .calc select {
  width: 100%; font: inherit; font-family: var(--mono); font-size: 17px; padding: 10px 12px; min-height: 46px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); color: var(--ink);
}
.calc select { font-family: var(--sans); font-size: 16px; }
.calc-out { margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.calc-out .l { font-size: 13px; color: var(--muted); line-height: 1.5; }
.calc-out .v { font-family: var(--mono); font-size: 24px; font-weight: 500; color: var(--navy); line-height: 1.3; margin-top: 6px; font-variant-numeric: tabular-nums; }
.calc-out .total .v { font-size: 30px; }
.calc-out .v.is-empty { font-size: 16px; color: var(--muted); font-weight: 400; }
.calc-hint { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.calc-note { font-size: 13px; color: var(--muted); margin: 16px 0 0; line-height: 1.7; }
.formula { margin-top: 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: var(--ink-2); background: var(--soft); border-radius: 8px; padding: 12px 14px; }
.formula p { margin: 0; }
.calc-next { margin-top: 22px; padding: 18px 20px; border-radius: 8px; border: 1px solid var(--line); background: #F7F7FE; }
.calc-next p { margin: 0 0 12px; font-size: 15px; }
.calc-callout { margin-top: 14px; padding: 14px 16px; border-left: 3px solid var(--navy); background: var(--soft); font-size: 15px; }
@media (max-width: 900px) {
  .calc { padding: 22px 18px; }
  .calc-fields, .calc-fields.two { grid-template-columns: 1fr; }
  .calc-out { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) { .calc-out { grid-template-columns: 1fr; } }

/* ---------- 事例 ---------- */
.case { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; margin-top: 40px; align-items: start; }
.case dl { margin: 16px 0 0; display: grid; grid-template-columns: 7em minmax(0, 1fr); border-top: 1px solid var(--line-strong); }
.case dt, .case dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.case dt { color: var(--muted); }
@media (max-width: 860px) { .case { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- 費用 ---------- */
.price-line { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; margin-top: 28px; padding: 22px 0; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--line); }
.price-line .l { color: var(--muted); font-size: 14px; }
.price-line .v { font-size: 20px; font-weight: 600; }

/* ---------- FAQ ---------- */
.faq { margin-top: 32px; border-top: 1.5px solid var(--ink); max-width: 52em; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative; font-weight: 600; font-size: 16px; line-height: 1.6; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font-family: var(--mono); font-size: 20px; font-weight: 400; color: var(--ink-2); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 20px; color: var(--ink-2); font-size: 15px; max-width: 46em; }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- 問い合わせ ---------- */
.sec--dark { background: var(--navy); color: #fff; }
.contact-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 56px; align-items: start; }
.contact-intro h2 { color: #fff; }
.contact-intro p { color: #D5D8E6; max-width: 30em; }
.contact-intro ul { margin: 20px 0 0; padding-left: 1.2em; color: #D5D8E6; font-size: 15px; }
.contact-intro li + li { margin-top: 8px; }
.form-card { background: var(--paper); color: var(--ink); border-radius: 12px; padding: 32px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 20px; }
.field { min-width: 0; }
.field.full, .form-grid fieldset { grid-column: 1 / -1; }
.field label, .form-grid legend { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.req, .opt { font-size: 12px; font-weight: 400; margin-left: 6px; }
.req { color: var(--error); }
.opt { color: var(--muted); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; min-height: 46px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); color: var(--ink);
}
.field textarea { min-height: 96px; resize: vertical; }
.field [aria-invalid="true"], fieldset[aria-invalid="true"] .choices { border-color: var(--error); }
.field [aria-invalid="true"] { box-shadow: 0 0 0 1px var(--error); }
.form-grid fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.choices { display: grid; gap: 8px; border: 1px solid transparent; border-radius: 8px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 15px; cursor: pointer; }
.choice input { margin-top: 5px; accent-color: var(--blue); width: 18px; height: 18px; flex: none; }
.choice:has(input:checked) { border-color: var(--blue); background: #F5F5FF; }
.choice small { display: block; color: var(--muted); font-size: 13px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.consent input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--blue); flex: none; }
.field-error { color: var(--error); font-size: 13px; margin: 6px 0 0; }
.form-status { margin: 14px 0 0; font-size: 14px; min-height: 1.5em; }
.form-status.is-error { color: var(--error); font-weight: 500; }
.form-actions { margin-top: 22px; }
.form-actions .btn { width: 100%; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } .form-card { padding: 22px 18px; } .form-grid { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { padding: 56px 0 96px; font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.site-footer h2 { font-size: 15px; margin: 0 0 10px; }
.site-footer dl { margin: 0; display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 6px 12px; }
.site-footer dt { color: var(--muted); }
.site-footer dd { margin: 0; }
.site-footer .meta { margin-top: 36px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 20px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } .site-footer dl { grid-template-columns: 7.5em minmax(0, 1fr); } }

/* ---------- 下部固定CTA（ヒーロー通過後だけ出す） ---------- */
.stickycta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .2s ease; visibility: hidden;
}
.stickycta.is-shown { transform: none; visibility: visible; }
.stickycta .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; padding-top: 6px; padding-bottom: 6px; }
.stickycta p { margin: 0; font-size: 14px; color: var(--ink-2); flex: 1; min-width: 0; }
.stickycta .btn { min-height: 42px; padding: 8px 18px; font-size: 14px; flex: none; }
@media (max-width: 640px) { .stickycta p { display: none; } .stickycta .btn { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .stickycta { transition: none; } }

/* ---------- ハブ ---------- */
.hub-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.hub-card { display: block; text-decoration: none; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 28px; }
.hub-card:hover { border-color: var(--ink); color: inherit; }
.hub-card h2 { font-size: 20px; margin: 0 0 10px; }
.hub-card p { color: var(--ink-2); margin: 0 0 14px; font-size: 15px; }
.hub-card .go { font-weight: 600; color: var(--blue); }
@media (max-width: 760px) { .hub-cards { grid-template-columns: 1fr; } }

/* ---------- デバッグ（?debug=1） ---------- */
.debugpanel { position: fixed; left: 8px; bottom: 8px; z-index: 90; width: min(460px, calc(100vw - 16px)); max-height: 40vh; overflow: auto;
  background: #111427; color: #E6E8F2; font: 12px/1.5 var(--mono); border-radius: 8px; padding: 10px 12px; box-shadow: 0 4px 18px rgba(0,0,0,.25); }
.debugpanel-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.debugpanel button { font: inherit; background: #2C3358; color: #fff; border: 1px solid #4A5282; border-radius: 4px; padding: 1px 8px; cursor: pointer; }
.debugpanel ol { margin: 0; padding-left: 1.4em; }
.debugpanel li { word-break: break-all; }

/* ---------- 補助 ---------- */
.definition--plain { border-top: 0; padding-top: 0; margin-top: 0; }
.page-title { font-size: clamp(24px, 3vw, 32px); line-height: 1.5; margin-bottom: 20px; }
/* 2列の単純な表はモバイルでも表のまま */
@media (max-width: 860px) {
  .tbl.tbl--simple { display: table; }
  .tbl--simple thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: table-header-group; }
  .tbl--simple tbody { display: table-row-group; }
  .tbl--simple tr { display: table-row; border: 0; border-radius: 0; margin: 0; background: none; }
  .tbl--simple th, .tbl--simple td { display: table-cell; width: auto; }
  .tbl--simple tbody th { background: none; width: 55%; }
  .tbl--simple td { padding: 14px 12px; }
  .tbl--simple td::before { content: none; }
}
/* 日本語の改行を文節単位に（対応ブラウザのみ。非対応でも崩れない） */
h1, h2, h3, .answer, .hero-sub, .scene-list strong, .tbl thead th { word-break: auto-phrase; }
h1, h2 { text-wrap: balance; }
.contact-intro ul { margin-bottom: 20px; }

/* ---------- R3 ---------- */
/* ヒーロー：PCは［文・図］［定義文・図］、スマートフォンは 文→図→定義文 の順 */
.hero-grid { grid-template-areas: "copy fig" "def fig"; grid-template-rows: auto 1fr; row-gap: 0; }
.hero-copy { grid-area: copy; }
.hero-def { grid-area: def; align-self: start; }
.hero-figure { grid-area: fig; }
@media (max-width: 900px) {
  .hero-grid { grid-template-areas: "copy" "fig" "def"; grid-template-rows: auto; row-gap: 24px; }
  .hero-def { margin-top: 0; }
}
@media (max-width: 640px) {
  .hero .btn-note { display: none; }
  .hero .btn-row { margin-bottom: 0; }
  .hero h1 { margin-bottom: 14px; }
  .hero-sub { margin-bottom: 18px; }
  /* 図中の寸法文字をスマートフォンでも読める大きさに（viewBox単位） */
  .figure svg .dim { font-size: 21px; }
  .figure svg .dim-chip { font-size: 18px; }
}
/* 比較表のキャプションがスマートフォンで1文字幅になる不具合 */
@media (max-width: 860px) {
  .tbl caption { display: block; width: 100%; caption-side: bottom; text-align: left; padding: 4px 0 12px; }
}
/* 算式などの補足を折りたたむ */
details.more { margin-top: 16px; }
details.more > summary { cursor: pointer; font-size: 14px; color: var(--ink-2); font-weight: 500; padding: 6px 0; list-style-position: inside; }
details.more > summary:hover { color: var(--ink); }
details.more ul.calc-note { padding-left: 1.2em; }
details.more ul.calc-note li + li { margin-top: 6px; }
@media (max-width: 640px) {
  .hero-grid { row-gap: 16px; }
  .hero .btn-row { gap: 8px; }
  .hero .btn--secondary { min-height: 44px; padding: 8px 16px; font-size: 14px; }
  .hero-figure svg { max-height: 256px; width: auto; margin: 0 auto; }
  .hero-figure figcaption { font-size: 12.5px; }
}
@media (max-width: 640px) { html .hero .btn-note.v-a, html[data-variant="B"] .hero .btn-note.v-b { display: none; } }
@media (max-width: 860px) { .tbl--simple caption { display: table-caption; width: auto; } }
@media (max-width: 860px) { .tbl td.is-empty { display: none; } }

/* ---------- R4：節の頭（青い細線＋番号＋質問形の見出し） ---------- */
.sec-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.sec-head h2 { margin: 0; }
.sec-no { font-family: var(--mono); font-size: 13px; color: var(--blue); letter-spacing: .04em; line-height: 1; padding-top: .7em; border-top: 2px solid var(--blue); min-width: 48px; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .sec-head { grid-template-columns: 1fr; gap: 12px; } .sec-no { min-width: 0; width: 48px; } }

/* 見出しの改行制御：語をまとめる（auto-phrase 非対応ブラウザ向け） */
.nw { white-space: nowrap; }
.calc .unit { white-space: nowrap; }
@media (max-width: 360px) { .nw { white-space: normal; } }

/* ---------- R4：前後比較（「導入後」を紺で反転、矢印を独立した列に） ---------- */
.ba { grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); border: 0; border-radius: 0; overflow: visible; }
.ba > .ba-now { border: 1px solid var(--line-strong); background: var(--paper); border-radius: var(--radius); padding: 28px; }
.ba > .ba-next { background: var(--navy); color: #fff; border: 1px solid var(--navy); border-radius: var(--radius); padding: 28px; }
.ba > div + div { border-left: 0; }
.ba > .ba-next h3 { color: #C9CCFB; }
.ba > .ba-next ul { color: #fff; }
.ba > .ba-next li::marker { color: #8F8BFF; }
.ba-arrow { display: flex; align-items: center; justify-content: center; padding: 0 !important; background: none !important; border: 0 !important; }
.ba-arrow svg { width: 28px; height: 28px; display: block; }
@media (max-width: 760px) {
  .ba { grid-template-columns: 1fr; }
  .ba-arrow { height: 44px; }
  .ba-arrow svg { transform: rotate(90deg); }
  .ba > div + div { border-top: 0; }
  .ba > .ba-next { border-top: 1px solid var(--navy); }
}

/* ---------- R4：副ボタンは枠線付き（紺） ---------- */
.btn--secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--secondary:hover { background: var(--soft); color: var(--navy); border-color: var(--navy); }

/* ---------- R4：図解 ---------- */
.diagram { margin: 40px 0 8px; }
.diagram img { width: 100%; height: auto; display: block; }
@media (max-width: 860px) { .diagram img { max-width: 390px; margin: 0 auto; } }
.hub-card h2 { font-size: 18px; } .hub-card { padding: 24px; }

/* ---------- R5：写真（3Dレンダー） ---------- */
.photo { margin: 40px 0 8px; }
.photo img { width: 100%; height: auto; display: block; border-radius: var(--radius); background: var(--soft); }
.photo figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.7; max-width: 48em; }
.photo .credit { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.consent-note { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; margin-top: 6px; line-height: 1.7; }
