/*
 * 資格デュオ公式サイトのスタイル。
 * 配色はアプリの挿絵に合わせる。紙の色は挿絵の縁の色（#fdf1e0）と同じにして、絵をページに溶け込ませる。
 * 文字と帯は作業着の紺、強調はヘルメットの黄。ダークモードでは夜の挿絵に切り替える。
 * CSPでインラインのスタイルとスクリプトを禁じているため、動きもこのファイルだけで作る。
 */
/* 色の変数を型つきで登録する。配色が切り替わるときに、色そのものをなめらかに変えるため。 */
@property --paper { syntax: '<color>'; inherits: true; initial-value: #fdf1e0; }
@property --paper-deep { syntax: '<color>'; inherits: true; initial-value: #f8e5c8; }
@property --card { syntax: '<color>'; inherits: true; initial-value: #fffaf1; }
@property --ink { syntax: '<color>'; inherits: true; initial-value: #1f2749; }
@property --muted { syntax: '<color>'; inherits: true; initial-value: #595e78; }
@property --line { syntax: '<color>'; inherits: true; initial-value: #ead8ba; }
@property --navy { syntax: '<color>'; inherits: true; initial-value: #1f2a5c; }
@property --navy-deep { syntax: '<color>'; inherits: true; initial-value: #161d42; }
@property --yellow-soft { syntax: '<color>'; inherits: true; initial-value: #fde7a0; }
@property --tag-ink { syntax: '<color>'; inherits: true; initial-value: #644500; }
@property --marker { syntax: '<color>'; inherits: true; initial-value: #f9d44c; }
@property --link { syntax: '<color>'; inherits: true; initial-value: #2c6636; }
@property --green { syntax: '<color>'; inherits: true; initial-value: #3f7534; }
@property --green-soft { syntax: '<color>'; inherits: true; initial-value: #e2edd2; }
@property --red { syntax: '<color>'; inherits: true; initial-value: #ad4622; }
@property --red-soft { syntax: '<color>'; inherits: true; initial-value: #f9dfd1; }
@property --blue { syntax: '<color>'; inherits: true; initial-value: #2b6485; }
@property --step-card { syntax: '<color>'; inherits: true; initial-value: #2a366c; }
:root {
  color-scheme: light dark;
  --paper: #fdf1e0;
  --paper-deep: #f8e5c8;
  --card: #fffaf1;
  --ink: #1f2749;
  --muted: #595e78;
  --line: #ead8ba;
  --navy: #1f2a5c;
  --navy-deep: #161d42;
  --on-navy: #fdf1e0;
  --on-navy-muted: #c5cae0;
  --yellow: #f6c519;
  --yellow-soft: #fde7a0;
  --button-ink: #1f2749;
  --tag-ink: #644500;
  --marker: #f9d44c;
  --link: #2c6636;
  --green: #3f7534;
  --green-soft: #e2edd2;
  --red: #ad4622;
  --red-soft: #f9dfd1;
  --blue: #2b6485;
  --focus: #b4541f;
  --step-card: #2a366c;
  --shadow: 0 1px 2px rgb(31 39 73 / 6%), 0 10px 28px rgb(31 39 73 / 8%);
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", "Noto Serif JP", serif;
  --sans: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  font-family: var(--sans);
  line-height: 1.8;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  transition: --paper .7s, --paper-deep .7s, --card .7s, --ink .7s, --muted .7s, --line .7s, --navy .7s, --navy-deep .7s, --yellow-soft .7s, --tag-ink .7s, --marker .7s, --link .7s, --green .7s, --green-soft .7s, --red .7s, --red-soft .7s, --blue .7s, --step-card .7s;
}
/*
 * ダークモードの配色。お試しの配線の問題で正解を開いている間は、この指定が外れて昼の配色に戻る。
 * 回路がつながると、ページ全体の明かりがつく演出（2026-11-30）。
 */
@media (prefers-color-scheme: dark) {
  :root:has(.pick-ok[open]) { color-scheme: light; }
  :root:not(:has(.pick-ok[open])) {
    --step-card: #1c2450;
    --paper: #141a33;
    --paper-deep: #101529;
    --card: #1e2748;
    --ink: #f4ead8;
    --muted: #b6bbd2;
    --line: #333d68;
    --navy: #0e1330;
    --navy-deep: #0a0e24;
    --yellow-soft: #4b3f14;
    --tag-ink: #fbe08a;
    --marker: #8a6a00;
    --link: #a9d693;
    --green: #a3cf8c;
    --green-soft: #24392b;
    --red: #f0a587;
    --red-soft: #43281f;
    --blue: #8fc3df;
    --focus: #f6c519;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 28px rgb(0 0 0 / 30%);
  }
}

/* 土台 */
* { box-sizing: border-box; }
body { margin: 0; -webkit-text-size-adjust: 100%; }
a { color: var(--link); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: .2rem; }
img, svg { display: block; max-width: 100%; }
img { width: 100%; height: auto; }
.night { display: none; }
figure, h1, h2, h3, p, ul, ol { margin: 0; }
h1, h2, h3 { line-height: 1.35; text-wrap: balance; word-break: auto-phrase; }
h1, h2 { font-family: var(--serif); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.7vw, 2.85rem); letter-spacing: -.02em; }
h3 { font-size: 1.2rem; }
.wrap { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.skip { position: absolute; z-index: 20; left: 1rem; top: -6rem; background: var(--card); padding: .55rem .9rem; border-radius: .4rem; }
.skip:focus { top: 1rem; }

/* ヘッダー */
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 86%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.14rem; font-weight: 800; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand-icon { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.brand-edition { font-size: .8rem; font-weight: 700; color: var(--muted); border-left: 1px solid var(--line); padding-left: .6rem; }
.site-nav { display: flex; gap: .2rem; }
.site-nav a { padding: .4rem .75rem; border-radius: 999px; font-size: .9rem; font-weight: 700; text-decoration: none; color: var(--ink); white-space: nowrap; }
.site-nav a:hover { background: var(--yellow-soft); }

/* ボタンとラベル */
.button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; padding: .6rem 1.5rem; border: 2px solid var(--button-ink); border-radius: 999px; background: var(--yellow); color: var(--button-ink); text-decoration: none; font-weight: 800; box-shadow: 0 4px 0 var(--button-ink); transition: transform .12s, box-shadow .12s; }
.button:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--button-ink); }
.button:active { transform: translateY(4px); box-shadow: none; }
.button-quiet { background: transparent; color: var(--ink); border-color: currentColor; box-shadow: none; }
.button-quiet:hover { transform: none; box-shadow: none; background: color-mix(in srgb, currentColor 10%, transparent); }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.eyebrow, .accent-label { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; font-size: .88rem; font-weight: 800; letter-spacing: .06em; }
.eyebrow::before, .accent-label::before { content: ""; width: 1.6rem; height: 4px; border-radius: 4px; background: var(--yellow); flex: none; }
.tag { display: inline-block; width: fit-content; margin-bottom: .6rem; padding: .12rem .75rem; border-radius: 999px; background: var(--yellow-soft); color: var(--tag-ink); font-size: .78rem; font-weight: 800; }
.availability { margin-top: 1rem; font-size: .875rem; color: var(--muted); }
.section-title { margin-bottom: clamp(1.6rem, 4vw, 2.6rem); }
.section-title h2 + p { margin-top: .8rem; color: var(--muted); }
.split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); align-items: start; gap: 1.5rem clamp(2rem, 6vw, 5rem); }
.split .section-title { margin-bottom: 0; }
.split h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }

/* ヒーロー */
.hero { padding: clamp(2.4rem, 6vw, 5rem) 0 clamp(2.4rem, 5vw, 4rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: .92fr 1.08fr; align-items: center; gap: clamp(1.5rem, 4vw, 4rem); }
.hero h1 { font-size: clamp(3rem, 6.6vw, 5.7rem); letter-spacing: -.05em; line-height: 1.14; }
.marker { background: linear-gradient(transparent 66%, var(--marker) 66%, var(--marker) 92%, transparent 92%); }
.hero-copy { margin: 1.5rem 0 1.8rem; font-size: clamp(1rem, 1.5vw, 1.12rem); color: var(--muted); }
.hero-art { position: relative; }
.hero-art img { -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent); mask-composite: intersect; }
.job-note { position: absolute; left: -3%; bottom: 3%; width: min(15.5rem, 62%); padding: 1rem 1rem .9rem; background: var(--card); border: 1px solid var(--line); border-radius: .3rem; box-shadow: var(--shadow); font-size: .92rem; font-weight: 700; line-height: 1.6; transform: rotate(-3deg); }
.job-note::before { content: ""; position: absolute; top: -.6rem; left: 50%; width: 4.2rem; height: 1.2rem; background: color-mix(in srgb, var(--yellow) 75%, transparent); transform: translateX(-50%) rotate(2deg); }
.job-note-label { display: block; margin-bottom: .15rem; color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .08em; }
.hero-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(2.4rem, 5vw, 4rem); padding: 0; list-style: none; border-top: 1px solid var(--line); }
.hero-points li { padding: 1.2rem 1.4rem 0; color: var(--muted); font-size: .92rem; }
.hero-points li + li { border-left: 1px solid var(--line); }
.hero-points li:first-child { padding-left: 0; }
.hero-points strong { display: block; color: var(--ink); font-family: var(--serif); font-size: 1.35rem; }

/* 悩み */
.voices { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.voice-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; padding: 0; list-style: none; }
.voice-list li { position: relative; padding: 1.4rem 1.4rem 1.2rem; background: var(--card); border: 1px solid var(--line); border-radius: 1.2rem 1.2rem 1.2rem .25rem; box-shadow: var(--shadow); }
.voice { font-size: 1.08rem; font-weight: 700; line-height: 1.65; }
.voice::before { content: "「"; margin-left: -.5em; }
.voice::after { content: "」"; }
.voice-who { margin-top: .7rem; color: var(--muted); font-size: .82rem; font-weight: 700; }
.voices-answer { max-width: 44rem; margin-top: clamp(2rem, 4vw, 3rem); font-size: clamp(1.05rem, 1.8vw, 1.28rem); line-height: 2; }
.voices-answer strong { background: linear-gradient(transparent 62%, var(--marker) 62%, var(--marker) 94%, transparent 94%); }

/* 現場モード */
.field { padding: clamp(3.5rem, 8vw, 6.5rem) 0; background: var(--navy); color: var(--on-navy); }
.field .section-title h2 + p, .field .step-copy p:not(.said), .field .more-jobs p:not(.tag), .field-note { color: var(--on-navy-muted); }
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; padding: 1.3rem 0 0; list-style: none; counter-reset: step; }
.steps::before { content: ""; position: absolute; top: 3.4rem; left: 2rem; right: 2rem; height: 4px; border-radius: 4px; background: var(--yellow); }
.steps li { position: relative; background: var(--step-card); border-radius: 1.1rem; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; z-index: 1; top: -1.3rem; left: 1rem; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 3px solid var(--navy); border-radius: 50%; background: var(--yellow); color: var(--button-ink); font-weight: 800; font-size: 1.1rem; }
.steps img { aspect-ratio: 1; object-fit: cover; border-radius: 1.1rem 1.1rem 0 0; }
.step-copy { padding: 1.1rem 1.15rem 1.3rem; }
.step-copy h3 { margin-bottom: .45rem; }
.step-copy p { font-size: .94rem; }
.field .said { margin-top: .8rem; padding: .65rem .85rem; border-radius: .2rem .9rem .9rem .9rem; background: rgb(253 241 224 / 10%); color: var(--on-navy); font-size: .88rem; line-height: 1.7; }
.more-jobs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; margin-top: 1.1rem; }
.more-jobs article { padding: 1.4rem 1.5rem 1.5rem; border: 1px solid rgb(253 241 224 / 22%); border-radius: 1.1rem; }
.more-jobs h3 { margin-bottom: .45rem; font-size: 1.3rem; font-family: var(--serif); }
.field .tag { background: var(--yellow); color: var(--button-ink); }
.field-note { margin-top: 1rem; font-size: .8rem; }

/* お試し問題 */
.trial { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.trial-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; align-items: start; }
.trial-card { display: flex; flex-direction: column; padding: clamp(1.2rem, 3vw, 1.9rem); background: var(--card); border: 1px solid var(--line); border-radius: 1.3rem; box-shadow: var(--shadow); }
.trial-card h3 { font-size: clamp(1.3rem, 2.4vw, 1.65rem); margin-bottom: .7rem; }
.trial-card .trial-source { margin-top: 1rem; font-size: .84rem; color: var(--muted); }
.trial-connections { display: grid; gap: .35rem; padding: .8rem .9rem; margin: .9rem 0 0; border-radius: .7rem; background: var(--paper); list-style: none; font-size: .88rem; font-weight: 700; }
.trial-connections li { display: grid; grid-template-columns: minmax(7.6em, auto) minmax(.5rem, 1fr) minmax(4em, auto); align-items: center; gap: .5rem; }
.wire { height: 3px; border-radius: 3px; background: var(--ink); }
.wire-neutral { background: var(--blue); }
.trial-next { margin-top: 1.8rem; font-size: 1.05rem; font-weight: 700; }

/* 配線の図。選択肢を開くと、選んだ線が引かれ、回路がつながれば灯る */
.demo { width: 100%; height: auto; margin: .7rem 0 1rem; border-radius: .9rem; background: var(--paper); }
.demo-device, .demo-lamp { fill: var(--card); stroke: var(--ink); stroke-width: 2; }
.demo-lamp { transition: fill .3s .45s; }
.demo-filament, .demo-lever { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.demo-label, .demo-small { fill: var(--ink); font-size: 13px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.demo-small { fill: var(--muted); font-size: 11px; text-anchor: start; }
.demo-wire { fill: none; stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.demo-neutral { stroke: var(--blue); }
.demo-answer { stroke: var(--red); stroke-dasharray: 1; stroke-dashoffset: 1; visibility: hidden; }
.demo-terminal { fill: var(--ink); }
.demo-open { fill: var(--card); stroke: var(--red); stroke-width: 2.5; animation: pulse 1.6s ease-in-out infinite; }
.demo-glow { fill: var(--yellow); opacity: 0; filter: blur(8px); transition: opacity .4s .45s; }
.wiring-trial:has(.pick-a[open]) .demo-answer-a,
.wiring-trial:has(.pick-ok[open]) .demo-answer-ok,
.wiring-trial:has(.pick-c[open]) .demo-answer-c { visibility: visible; animation: draw .5s ease-out forwards; }
.wiring-trial:has(.pick-ok[open], .pick-c[open]) .demo-glow { opacity: .6; }
.wiring-trial:has(.pick-ok[open], .pick-c[open]) .demo-lamp { fill: var(--yellow); }
.wiring-trial:has(.pick-ok[open], .pick-c[open]) .demo-filament { stroke: var(--button-ink); }
.wiring-trial:has(.quiz-choices [open]) .demo-open { animation: none; fill: var(--ink); stroke: none; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse { 50% { stroke-width: 6; stroke-opacity: .35; } }

/* 選択肢 */
.quiz-choices { display: grid; gap: .55rem; margin-top: 1rem; }
.quiz-choices details { border: 2px solid var(--line); border-radius: .85rem; background: var(--card); transition: border-color .15s, background-color .15s; }
.quiz-choices summary { display: flex; align-items: center; gap: .7rem; padding: .78rem .95rem; font-weight: 700; cursor: pointer; list-style: none; border-radius: .7rem; }
.quiz-choices summary::-webkit-details-marker { display: none; }
.quiz-choices summary::before { content: ""; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border: 2px solid var(--muted); border-radius: 50%; flex: none; font-size: .85rem; font-weight: 800; line-height: 1; }
.quiz-choices details:not([open]):hover { border-color: var(--ink); }
.quiz-choices details[open] { border-color: var(--red); background: var(--red-soft); }
.quiz-choices details[open] summary::before { content: "×"; border-color: var(--red); color: var(--red); }
.quiz-choices .trial-correct[open] { border-color: var(--green); background: var(--green-soft); }
.quiz-choices .trial-correct[open] summary::before { content: "○"; border-color: var(--green); color: var(--green); }
.quiz-choices details p { padding: 0 .95rem .85rem 3.15rem; font-size: .93rem; }

/* 学び方 */
.learn { padding: clamp(1rem, 3vw, 2rem) 0 clamp(3.5rem, 8vw, 6.5rem); }
.learn-rows { display: grid; gap: clamp(2.2rem, 5vw, 4rem); }
.learn-rows article { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(1.5rem, 5vw, 4.5rem); }
.learn-rows article > :first-child { width: 100%; max-width: 30rem; justify-self: center; }
.learn-rows article:nth-child(even) > :first-child { order: 2; max-width: 23rem; }
.learn-rows article:nth-child(3) > :first-child { max-width: 23rem; }
.learn-rows img { border-radius: 1.4rem; }
.learn-copy h3 { margin-bottom: .8rem; font-family: var(--serif); font-size: clamp(1.45rem, 2.8vw, 2rem); }
.learn-copy p:not(.tag) { color: var(--muted); font-size: 1.02rem; }

/* 料金 */
.price { padding: clamp(3.5rem, 8vw, 6rem) 0; background: var(--paper-deep); }
.price-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr); gap: 1.3rem; align-items: stretch; }
.price-card { display: flex; flex-direction: column; padding: 1.6rem 1.6rem 1.7rem; background: var(--card); border: 1px solid var(--line); border-radius: 1.3rem; }
.price-card h3 { font-family: var(--serif); font-size: 1.7rem; }
.price-lead { margin: .5rem 0 1rem; color: var(--muted); font-size: .93rem; }
.price-card ul { display: grid; gap: .55rem; padding: 0; list-style: none; font-weight: 700; }
.price-card li { position: relative; padding-left: 1.7rem; line-height: 1.6; }
.price-card li::before { content: ""; position: absolute; left: .15rem; top: .32em; width: .95rem; height: .5rem; border-left: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(-45deg); }
.price-pack { background: var(--navy); border: 2px solid var(--yellow); color: var(--on-navy); }
.price-pack .price-lead, .price-note { color: var(--on-navy-muted); }
.price-pack .tag { background: var(--yellow); color: var(--button-ink); }
.price-pack li::before { border-color: var(--yellow); }
.price-note { margin-top: auto; padding-top: 1.1rem; font-size: .88rem; }
.price-art { align-self: center; }
.price-art img { border-radius: 1.4rem; }

/* コラム */
.guide-preview { padding: clamp(3.5rem, 8vw, 6rem) 0 0; }
.guide-page { max-width: 880px; padding: clamp(2.6rem, 7vw, 5rem) 0; }
.guide-heading h1 { font-size: clamp(1.9rem, 5vw, 3.1rem); overflow-wrap: anywhere; }
.guide-heading .keep-together { white-space: nowrap; }
.guide-heading p { margin-top: .9rem; color: var(--muted); }
.guide-back { display: inline-block; margin-bottom: 1rem; font-weight: 700; }
.guide-list { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: 1rem; }
.guide-card, .wiring-card, .guide-quiz, .guide-next { background: var(--card); border: 1px solid var(--line); border-radius: 1.1rem; }
.guide-card { position: relative; max-width: 760px; padding: 1.4rem 3.4rem 1.4rem 1.5rem; box-shadow: var(--shadow); transition: transform .15s; }
.guide-card:hover { transform: translateY(-2px); }
.guide-card::after { content: "→"; position: absolute; right: 1.3rem; top: 50%; translate: 0 -50%; font-size: 1.3rem; font-weight: 800; color: var(--muted); }
.guide-card :is(h2, h3) { font-family: var(--sans); font-size: clamp(1.12rem, 3vw, 1.4rem); font-weight: 800; letter-spacing: 0; }
.guide-card a { color: var(--ink); text-decoration: none; }
.guide-card a::after { content: ""; position: absolute; inset: 0; border-radius: 1.1rem; }
.guide-card p { color: var(--muted); margin-top: .5rem; }
.guide-more { display: inline-block; margin-top: 1rem; font-weight: 700; }
.guide-section { margin-top: 2.6rem; }
.guide-section h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); margin-bottom: .9rem; }
.wiring-diagrams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.wiring-card { padding: .9rem; }
.wiring-card figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .65rem; font-weight: 800; }
.wiring-card figcaption span, .wiring-key, .wiring-note { color: var(--muted); font-size: .9rem; font-weight: 400; }
.wiring-diagram { display: block; width: 100%; height: auto; }
.wiring-diagram text { fill: var(--ink); font-size: 14px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.wiring-diagram .small { font-size: 11px; }
.wiring-diagram .device { fill: var(--paper); stroke: var(--muted); stroke-width: 1.5; }
.wiring-diagram .junction-box { fill: var(--paper); stroke: var(--muted); stroke-dasharray: 4 3; }
.wiring-diagram .route, .wiring-diagram .conductor { fill: none; stroke: var(--ink); stroke-width: 3; }
.wiring-diagram .neutral { stroke: var(--blue); }
.wiring-diagram .switched { stroke: var(--red); }
.wiring-diagram .joint { fill: var(--ink); stroke: var(--card); stroke-width: 1.5; }
.wiring-key { text-align: center; }
.wiring-note { margin-top: .7rem; }
.wiring-steps { padding-left: 1.6rem; }
.wiring-steps li + li { margin-top: .5rem; }
.guide-quiz, .guide-next { padding: clamp(1.1rem, 4vw, 1.7rem); }
.guide-quiz ul, .guide-references ul { padding-left: 1.35rem; }
.guide-next { margin-top: 2.6rem; }
.guide-next .button { margin-top: 1rem; }

/* よくある質問 */
.faq { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem .2rem; font-size: 1.05rem; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--yellow-soft); color: var(--tag-ink); font-size: 1.2rem; font-weight: 800; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 .2rem 1.2rem; color: var(--muted); }

/* 締め */
.closing { padding: clamp(3.5rem, 8vw, 6rem) 0; background: var(--navy); color: var(--on-navy); }
.closing-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(1.5rem, 5vw, 4.5rem); }
.closing img { border-radius: 1.4rem; }
.closing h2 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
.closing-copy p { margin: 1rem 0 1.6rem; color: var(--on-navy-muted); }
.closing .button { border-color: var(--navy-deep); box-shadow: 0 4px 0 var(--navy-deep); }
.closing .button:hover { box-shadow: 0 2px 0 var(--navy-deep); }
.closing .button-quiet { color: var(--on-navy); border-color: currentColor; box-shadow: none; }

/* フッター */
.site-footer { padding: 3rem 0 2rem; background: var(--navy-deep); color: var(--on-navy-muted); font-size: .9rem; }
.footer-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
.site-footer .brand { color: var(--on-navy); }
.site-footer .brand-edition { color: var(--on-navy-muted); border-color: rgb(253 241 224 / 25%); }
.footer-brand p { margin-top: .8rem; }
.footer-nav { display: grid; gap: .45rem; align-content: start; justify-items: start; }
.footer-heading { margin-bottom: .2rem; color: var(--on-navy); font-size: .8rem; font-weight: 800; letter-spacing: .08em; }
.footer-nav a { color: var(--on-navy-muted); text-decoration: none; }
.footer-nav a:hover { color: var(--on-navy); text-decoration: underline; }
.copyright { margin-top: 2.4rem; padding-top: 1.3rem; border-top: 1px solid rgb(253 241 224 / 15%); font-size: .8rem; }
.sub .site-footer { margin-top: 2rem; }
.sub main { min-height: 62vh; }

/* 規約・お問い合わせ */
.legal { max-width: 760px; padding: clamp(2.6rem, 7vw, 5rem) 0; overflow-wrap: anywhere; }
.legal h1 { font-size: clamp(1.9rem, 5vw, 3.1rem); }
.legal h2 { font-family: var(--sans); font-size: clamp(1.15rem, 3vw, 1.35rem); font-weight: 800; letter-spacing: 0; margin-top: 2.2rem; margin-bottom: .6rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.legal p + p, .legal ul { margin-top: .75rem; }
.legal .revision { margin: .85rem 0 1.6rem; color: var(--muted); font-size: .9rem; }
.legal code { padding: .1rem .4rem; border-radius: .3rem; background: var(--paper-deep); font-size: .92em; }

/* ダークモードでは絵を紙に溶かさず、窓のように見せる */
@media (prefers-color-scheme: dark) {
  :root:not(:has(.pick-ok[open])) .hero-art img { -webkit-mask-image: none; mask-image: none; border-radius: 1.4rem; }
  :root:not(:has(.pick-ok[open])) .night { display: block; }
  :root:not(:has(.pick-ok[open])) .day { display: none; }
}

@media (max-width: 960px) {
  .job-note { bottom: -8%; width: min(13.5rem, 58%); padding: .8rem .85rem .7rem; font-size: .84rem; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.2rem; }
  .steps::before { display: none; }
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-art { grid-column: 1 / -1; grid-row: 1; max-width: 34rem; justify-self: center; }
}
@media (max-width: 760px) {
  :root { scroll-padding-top: 1rem; }
  .wrap { width: calc(100% - 2rem); }
  .site-header { position: static; }
  .bar { flex-direction: column; align-items: stretch; gap: .1rem; padding-top: .7rem; }
  .site-nav { margin-inline: -1rem; padding: .2rem .55rem .55rem; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .split, .hero-grid, .voice-list, .trial-grid, .learn-rows article, .closing-layout, .more-jobs, .wiring-diagrams { grid-template-columns: 1fr; }
  .hero { padding-top: 0; }
  .hero-art { order: -1; margin-inline: -1rem; }
  .hero-art img { border-radius: 0 !important; }
  .job-note { left: 1rem; bottom: -9%; width: min(13.5rem, 60%); padding: .8rem .85rem .7rem; font-size: .84rem; }
  .hero-text { margin-top: 1.6rem; }
  .hero h1 { font-size: clamp(2.9rem, 13vw, 4.4rem); }
  .wide-only { display: none; }
  .hero-points { grid-template-columns: 1fr; }
  .hero-points li, .hero-points li:first-child { padding: 1rem 0; }
  .hero-points li + li { border-left: 0; border-top: 1px solid var(--line); }
  .learn-rows article > :first-child, .learn-rows article:nth-child(even) > :first-child { order: 0; max-width: 22rem; }
  .footer-layout { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .quiz-choices details p { padding-left: .95rem; }
}
@media (max-width: 520px) {
  .steps, .price-grid { grid-template-columns: 1fr; }
  .steps { row-gap: 1.9rem; }
  .steps li { display: grid; grid-template-columns: 7rem minmax(0, 1fr); align-items: start; }
  .steps img { border-radius: 1.1rem 0 1rem; }
  .step-copy { padding: .9rem 1rem 1.1rem; }
  .cta-row .button { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .wiring-trial .demo-answer { stroke-dashoffset: 0; }
}
