/* 給湯器の「呼ぶ前の診断書」（inc/kyutouki-shindan.php）。クラスはすべて ks- から始め、テーマの部品とぶつけない。
   見本：docs/design-mock/taste-kyutouki/shindan/index.html（taste-skill の検査 0 FAIL・0 WARN） */
.ks {
  --bg: #1a2039;
  --ink: #1a2039;
  --paper: #ffffff;
  --paper-2: #f1f2f6;
  --muted: #4a5170;
  --accent: #f9a3c0;

  --step-small: 1rem;
  --step-body: clamp(1.125rem, 1.08rem + 0.2vw, 1.25rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(1.75rem, 1.2rem + 2.6vw, 3.5rem);
  --step-display: clamp(96px, 16vw, 240px);

  --margin: 32px;
  --gap-section: 144px;

  --face-text: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
  --face-num: "Imbue", "Times New Roman", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
.ks, .ks *, .ks *::before, .ks *::after { box-sizing: border-box; }
.ks { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--face-text); font-size: var(--step-body); line-height: 1.7; }
.ks img, .ks video { display: block; max-width: 100%; height: auto; }
:where(.ks) a, .ks a:not([class]) { color: inherit; }
.ks :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.ks-wrap { padding-inline: var(--margin); }
.ks h1, .ks h2, .ks h3 { border: 0; padding: 0; background: none; margin: 0; font-weight: 700; line-height: 1.3; }
.ks p { margin: 0; }
.ks-num { font-family: var(--face-num); font-weight: 400; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* ---------- 1. いま起きていること ---------- */
.ks-hero { background: var(--bg); color: #ffffff; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); min-height: min(820px, 88svh); }
.ks-hero__text { padding: 48px var(--margin) 48px; display: grid; align-content: space-between; gap: 40px; }
.ks-hero h1 { font-size: var(--step-head); color: var(--accent); max-width: 9em; }
.ks .ks-hero__go { display: inline-flex; align-items: center; min-height: 56px; padding: 0 24px; background: var(--accent); color: var(--ink); font-weight: 700; text-decoration: none; border-radius: 999px; transition: background-color .2s, transform .15s var(--ease); }
.ks-hero__go:hover { background: #ffffff; }
.ks-hero__go:active { transform: scale(.97); }
.ks-hero__cost { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.ks-hero__cost .ks-num { font-size: var(--step-display); line-height: .85; color: var(--accent); }
.ks-hero__cost span:last-child { font-size: var(--step-lead); }
.ks .ks-hero__src { font-size: var(--step-small); max-width: 30em; margin-top: 24px; }
.ks-hero__pic { overflow: hidden; }
.ks-hero__pic img { width: 100%; height: 100%; object-fit: cover; object-position: 30% center; }

/* ---------- 2. 自分で見る ---------- */
.ks-look { padding-block: var(--gap-section); }
.ks-look h2, .ks-calc h2 { font-size: var(--step-head); max-width: 14em; }
.ks-look__lead { margin-top: 24px; max-width: 34em; font-size: var(--step-lead); line-height: 1.5; }
.ks-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 48px 0 0; padding: 0; list-style: none; }
.ks-chip { min-height: 48px; padding: 0 24px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; border-radius: 999px; transition: background-color .2s, color .2s, transform .15s var(--ease); }
.ks-chip:hover { background: var(--paper-2); }
.ks-chip:active { transform: scale(.96); }
.ks-chip[aria-pressed="true"] { background: var(--ink); color: var(--accent); }
.ks-look__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); margin-top: 48px; align-items: start; }
.ks-answer { background: var(--paper-2); padding: 32px; border-radius: 8px; }
.ks-answer h3 { font-size: var(--step-lead); }
.ks-answer ol { margin: 24px 0 0; padding-left: 24px; }
.ks-answer li { margin-bottom: 16px; }
.ks-answer li strong { display: block; }
.ks-answer__src { margin-top: 24px; font-size: var(--step-small); color: var(--muted); }
.ks-answer.ks-is-swap { animation: swap .45s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.ks-where { margin: 0; }
.ks-where__box { position: relative; }
.ks-where__box img { width: 52%; aspect-ratio: 1920 / 2808; object-fit: cover; }
.ks-where__box svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ks-where text { font-family: var(--face-text); fill: #5a6080; font-size: 52px; font-weight: 700; transition: fill .3s; }
.ks-where line { stroke: #b8bccb; stroke-width: 4; transition: stroke .3s; }
.ks-where circle { fill: #ffffff; stroke: #b8bccb; stroke-width: 6; transition: fill .3s, stroke .3s; }
.ks-where .ks-hit.ks-is-on text { fill: var(--ink); }
.ks-where .ks-hit.ks-is-on line { stroke: var(--ink); stroke-width: 6; }
.ks-where .ks-hit.ks-is-on circle { fill: var(--accent); stroke: var(--ink); }
.ks-where figcaption { margin-top: 12px; font-size: var(--step-small); color: var(--muted); }

/* ---------- 3. 損得 ---------- */
.ks-calc { background: var(--bg); color: #ffffff; padding-bottom: var(--gap-section); }
.ks-calc__band { width: 100%; height: clamp(240px, 42svh, 480px); object-fit: cover; margin-bottom: var(--gap-section); }
.ks-calc h2 { color: var(--accent); }
.ks-calc__lead { margin-top: 24px; max-width: 34em; font-size: var(--step-lead); line-height: 1.5; }
.ks-calc__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); margin-top: 56px; align-items: start; }
.ks-field { display: block; margin-bottom: 32px; }
.ks-field__name { display: block; font-weight: 700; margin-bottom: 8px; }
.ks-field__row { display: flex; align-items: baseline; gap: 12px; border-bottom: 4px solid var(--accent); }
.ks-field input { width: 100%; min-width: 0; min-height: 56px; margin: 0; padding: 0; border: 0; background: transparent; color: #ffffff; font-family: var(--face-num); font-size: var(--step-head); line-height: 1.1; -moz-appearance: textfield; }
.ks-field input::-webkit-outer-spin-button, .ks-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ks-field input:focus-visible { outline: none; }
.ks-field__row:focus-within { border-bottom-color: #ffffff; }
.ks-field__unit { flex: none; font-size: var(--step-lead); }
.ks-field__hint { display: block; margin-top: 8px; font-size: var(--step-small); }
.ks-result__big { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ks-result__big .ks-num { font-size: var(--step-display); line-height: .9; color: var(--accent); }
.ks-result__big span:last-child { font-size: var(--step-lead); }
.ks-result__say { margin-top: 24px; font-size: var(--step-lead); line-height: 1.5; color: var(--accent); }
.ks-result dl { margin: 40px 0 0; display: grid; gap: 16px; }
.ks-result dl div { display: grid; grid-template-columns: 9em 1fr; gap: 16px; padding-top: 16px; border-top: 2px solid #3a4266; }
.ks-result dt { font-weight: 700; }
.ks-result dd { margin: 0; }
.ks-result__src { margin-top: 32px; font-size: var(--step-small); max-width: 36em; }
.ks-calc video { margin-top: 48px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- 4. 業者を確かめる ---------- */
.ks .ks-cta { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); background: var(--accent); color: var(--ink); text-decoration: none; transition: background-color .2s; }
.ks-cta:hover, .ks-cta:focus-visible { background: #ffc2d6; outline: none; }
.ks-cta__text { padding: 64px var(--margin); display: grid; align-content: space-between; gap: 40px; }
.ks-cta__say { font-size: var(--step-lead); line-height: 1.5; max-width: 22em; }
.ks-cta__word { display: flex; align-items: center; gap: 16px; font-size: var(--step-head); font-weight: 700; }
.ks-cta__word svg { width: 48px; height: 48px; flex: none; transition: transform .25s var(--ease); }
.ks-cta:hover .ks-cta__word svg { transform: translate(6px, -6px); }
.ks-cta__pic { overflow: hidden; }
.ks-cta__pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.ks-cta:hover .ks-cta__pic img { transform: scale(1.04); }

/* ---------- たたむ ---------- */
.ks-more { padding-block: var(--gap-section); }
.ks-more details { border-top: 2px solid var(--ink); }
.ks-more details:last-child { border-bottom: 2px solid var(--ink); }
.ks-more summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 72px; font-size: var(--step-lead); font-weight: 700; }
.ks-more summary::-webkit-details-marker { display: none; }
.ks-more summary svg { flex: none; transition: transform .25s var(--ease); }
.ks-more details[open] summary svg { transform: rotate(180deg); }
.ks-more__body { padding-bottom: 32px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 32px; align-items: start; }
.ks-more details:not([open]) .ks-more__body { display: none; }
.ks-more__body img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 32%; }
.ks-more table { width: 100%; border-collapse: collapse; }
.ks-more th, .ks-more td { text-align: left; padding: 12px 8px 12px 0; border-bottom: 1px solid #d5d8e2; vertical-align: top; }
.ks-more th { font-weight: 700; white-space: nowrap; }
.ks-qa dt { font-weight: 700; margin-top: 16px; }
.ks-qa dd { margin: 4px 0 0; }

/* ---------- foot ---------- */
.ks-foot { background: var(--bg); color: #ffffff; padding: 64px var(--margin) 32px; font-size: var(--step-small); }
.ks-foot h2 { font-size: var(--step-body); color: var(--accent); margin-bottom: 8px; }
.ks-foot ul { margin: 0 0 32px; padding-left: 24px; max-width: 40em; }
.ks-foot li { margin-bottom: 4px; }
.ks-foot p { max-width: 40em; margin-bottom: 8px; }

/* ---------- 動き ---------- */
.ks-js [data-in] { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.ks-js [data-in].ks-is-in { opacity: 1; transform: none; }
.ks-hero__pic img { transform: scale(1.06); transition: transform 6s linear; }
.ks-hero.ks-is-in .ks-hero__pic img { transform: scale(1); }
.ks-js .ks-where line { stroke-dasharray: 600; stroke-dashoffset: 600; transition: stroke-dashoffset 1s var(--ease); }
.ks-js .ks-where.ks-is-in line { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) {
  .ks-js [data-in] { opacity: 1; transform: none; transition: none; }
  .ks-hero__pic img, .ks-cta__pic img { transition: none; transform: none; }
  .ks-js .ks-where line { stroke-dasharray: none; stroke-dashoffset: 0; transition: none; }
  .ks-answer.ks-is-swap { animation: none; }
}

/* ---------- スマホ ---------- */
@media (max-width: 760px) {
  .ks { --margin: 16px; --gap-section: 96px; }
    .ks-hero { grid-template-columns: 1fr; min-height: 0; }
  .ks-hero__pic { order: -1; height: 38svh; }
  .ks-hero__text { padding-top: 32px; gap: 32px; }
  .ks-look__grid, .ks-calc__grid, .ks .ks-cta, .ks-more__body { grid-template-columns: 1fr; }
  .ks-answer { padding: 24px 16px; }
  .ks-result dl div { grid-template-columns: 1fr; gap: 4px; }
  .ks-cta__pic { height: 32svh; }
  .ks-cta__text { padding-block: 40px; }
}
/* サイトの頭と足の細い線は、このページでは消す（taste：線は表と入力欄だけ） */
body.ks-page .site-header, body.ks-page .site-footer, body.ks-page .site-footer__copyright { border: 0; box-shadow: none; }
