:root {
  --ink: #0f1b2d;
  --ink-soft: #3c4a5c;
  --muted: #55637a;
  --paper: #ffffff;
  --ground: #f3f6f9;
  --card: #ffffff;
  --rule: #dce2ea;
  --accent: #0b6e5f;
  --accent-ink: #ffffff;
  --accent-soft: #e6f2ef;
  --accent-mid: #7fb8ae;
  --plus: #0b5d52;
  --minus: #a2412b;
  --warn-bg: #fbf1dc;
  --warn-rule: #e0c48a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans JP", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

a { color: var(--accent); }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

.pr {
  background: var(--ink);
  color: #e8e4d9;
  font-size: 12px;
  text-align: center;
  padding: 4px 16px;
}

.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap, .site-foot .wrap, .wrap-wide { max-width: 1120px; }
.wrap-wide { margin: 0 auto; padding: 0 24px; }
.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 20px;
  padding-top: 14px;
  padding-bottom: 12px;
}
.site-name { font-size: 20px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; }
.site-nav a { color: var(--ink); }

main { padding: 28px 0 56px; }

h1 { font-size: 26px; line-height: 1.45; margin: 0 0 12px; }
h2 { font-size: 19px; margin: 40px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--ink); }
h3 { font-size: 16px; margin: 0 0 4px; }
.lead { color: var(--ink-soft); margin: 0 0 24px; }
.small { font-size: 13px; color: var(--ink-soft); }

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 22px;
  margin: 16px 0;
}

.tool-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tool-list .card { margin: 0; display: flex; flex-direction: column; }
.tool-list p { margin: 0 0 16px; color: var(--ink-soft); font-size: 14px; flex: 1; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 8px;
  padding: 12px 22px;
  min-height: 48px;
  box-sizing: border-box;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.1); }
.btn[aria-disabled="true"] { background: #b9b3a5; cursor: default; filter: none; }

.field { margin: 0 0 16px; }
.field label, fieldset legend { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; padding: 0; }
.field .hint { font-size: 12px; color: var(--ink-soft); margin: 2px 0 0; }
.input-unit { display: flex; align-items: center; gap: 8px; }
.input-unit input {
  width: 140px;
  padding: 8px 10px;
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: right;
  border: 1px solid var(--ink-soft);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
}
input:focus-visible, .btn:focus-visible, .choice input:focus-visible + span {
  outline: 3px solid #e0a52b;
  outline-offset: 2px;
}

fieldset { border: 0; padding: 0; margin: 0 0 20px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: block;
  padding: 7px 14px;
  border: 1px solid var(--ink-soft);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}
.choice input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }

.result-figures { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 0 0 8px; }
.figure { background: var(--accent-soft); border-radius: 6px; padding: 14px 16px; }
.figure .label { font-size: 13px; color: var(--ink-soft); }
.figure .value { font-size: 30px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.figure .value small { font-size: 15px; font-weight: 400; }

.table-scroll { overflow-x: auto; }
table.ledger { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ledger th, .ledger td { padding: 8px 10px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
.ledger th { font-size: 13px; color: var(--ink-soft); font-weight: 400; border-bottom: 1px solid var(--ink); }
.ledger th:first-child, .ledger td:first-child { text-align: left; }
.ledger tr.nearest td { background: var(--accent-soft); font-weight: 700; }
.plus { color: var(--plus); }
.minus { color: var(--minus); }

.note { background: var(--warn-bg); border: 1px solid var(--warn-rule); border-radius: 6px; padding: 12px 16px; font-size: 14px; margin: 16px 0; }
.note p { margin: 0; }
.note p + p { margin-top: 6px; }

.offer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-top: 1px solid var(--rule); }
.offer:first-of-type { border-top: 0; }
.offer div { flex: 1 1 280px; }
.offer p { margin: 0; font-size: 14px; color: var(--ink-soft); }
.offer .rank { font-size: 12px; color: var(--accent); font-weight: 700; }

.error { color: var(--minus); font-size: 14px; margin: 0 0 12px; }
[hidden] { display: none !important; }

.article-meta { font-size: 13px; color: var(--ink-soft); margin: 0 0 20px; }
.article p, .article li { max-width: 40em; }
.article .ledger { margin: 12px 0; }
.formula {
  background: var(--card);
  border-left: 4px solid var(--accent);
  padding: 10px 16px;
  margin: 12px 0;
  font-weight: 700;
}
.quote { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 12px 16px; margin: 12px 0; }
.quote p { margin: 0; }
.cta { background: var(--accent-soft); border-radius: 6px; padding: 20px; margin: 40px 0 0; }
.cta h2 { margin: 0 0 6px; padding: 0; border: 0; font-size: 17px; }
.cta p { margin: 0 0 14px; font-size: 14px; }

.article-list { list-style: none; padding: 0; margin: 0; }
.article-list li { border-bottom: 1px solid var(--rule); padding: 12px 0; }
.article-list a { font-weight: 700; text-decoration: none; }
.article-list a:hover { text-decoration: underline; }
.article-list p { margin: 2px 0 0; font-size: 14px; color: var(--ink-soft); }

/* トップページ */
main.home { padding: 0; }
.hero { background: var(--ground); }
.hero-inner { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-top: 56px; padding-bottom: 64px; }
.hero-copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; padding-top: 12px; }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--plus); letter-spacing: 0.08em; }
.hero h1 { font-size: clamp(30px, 4vw + 14px, 44px); line-height: 1.3; margin: 0; }
.hero-lead { margin: 0; font-size: 17px; color: var(--ink-soft); max-width: 30em; }
.points { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.points li { display: flex; gap: 10px; align-items: center; }
.points li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

.calc { flex: 1 1 480px; min-width: 0; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 28px; display: flex; flex-direction: column; gap: 22px; box-shadow: 0 8px 28px rgba(15, 27, 45, 0.08); }
.calc-fields { display: flex; flex-wrap: wrap; gap: 16px; }
.calc-field { flex: 1 1 180px; display: flex; flex-direction: column; gap: 6px; }
.calc-field label { font-size: 14px; font-weight: 700; }
.calc-field .input-unit input { width: 100%; min-width: 0; height: 52px; font-size: 22px; font-weight: 700; border: 2px solid var(--ink); border-radius: 8px; }
.calc-field .input-unit span { flex: none; font-size: 15px; }
.calc-result { display: flex; flex-direction: column; gap: 18px; }
.rate-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.rate-line .label { font-size: 14px; color: var(--ink-soft); }
.rate-big { font-size: 60px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--accent); }
.rate-big small { font-size: 24px; }
.split-bar { display: flex; height: 28px; border-radius: 6px; overflow: hidden; background: #e3e8ee; }
.split-bar .s1 { background: var(--accent); }
.split-bar .s2 { background: var(--accent-mid); }
.split-bar .s3 { background: #c9d1db; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-soft); margin-top: 8px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.what-if { border-top: 1px solid var(--rule); padding-top: 16px; }
.what-if h2 { margin: 0 0 4px; padding: 0; border: 0; font-size: 14px; }
.what-if-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid #eef1f5; font-size: 15px; font-variant-numeric: tabular-nums; }
.what-if-row strong { font-size: 18px; }
.what-if-row .diff { font-weight: 700; margin-left: 8px; }
.btn-next { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; font-size: 17px; text-align: center; }
.calc-note { margin: 0; font-size: 12px; color: var(--muted); }

.home-section { padding-top: 64px; padding-bottom: 24px; }
.home-section > h2 { margin: 0 0 8px; padding: 0; border: 0; font-size: 26px; line-height: 1.4; }
.home-section > p { margin: 0 0 24px; color: var(--ink-soft); max-width: 40em; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat { border: 1px solid var(--rule); border-radius: 10px; padding: 20px; }
.stat.is-key { border: 2px solid var(--accent); padding: 19px; }
.stat .label { font-size: 14px; color: var(--ink-soft); }
.stat.is-key .label { color: var(--plus); font-weight: 700; }
.stat .value { font-size: 34px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: 16px; font-weight: 500; }
.source { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

.band { background: var(--ink); color: #fff; border-radius: 14px; padding: 36px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; margin: 48px 0; }
.band div { flex: 1 1 420px; min-width: 0; }
.band h2 { margin: 0 0 8px; padding: 0; border: 0; font-size: 24px; line-height: 1.4; }
.band p { margin: 0; color: #c9d3e0; font-size: 15px; max-width: 36em; }
.band .btn { background: #fff; color: var(--ink); min-height: 56px; display: inline-flex; align-items: center; padding: 0 28px; font-size: 17px; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; padding-bottom: 72px; }
.post { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--rule); border-radius: 10px; padding: 22px; color: var(--ink); text-decoration: none; }
.post:hover { border-color: var(--accent); }
.post .tag { font-size: 12px; font-weight: 700; color: var(--plus); letter-spacing: 0.06em; }
.post .title { font-size: 18px; font-weight: 700; line-height: 1.5; }
.post .desc { font-size: 14px; color: var(--ink-soft); }

/* エンジニア向けの演出 */
.mono, .rate-big, .stat .value, .what-if-row strong, .what-if-row .diff, .figure .value {
  font-family: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
.site-name::before {
  content: "";
  display: inline-block;
  width: 26px; height: 26px;
  margin-right: 10px;
  vertical-align: -6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%230f1b2d'/%3E%3Cpath d='M12 8c-3 0-3 2-3 4s0 4-2 4c2 0 2 2 2 4s0 4 3 4M20 8c3 0 3 2 3 4s0 4 2 4c-2 0-2 2-2 4s0 4-3 4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='16' cy='16' r='2.2' fill='%235fd3bf'/%3E%3C/svg%3E") no-repeat center / contain;
}

.hero {
  background-image:
    radial-gradient(ellipse 60% 70% at 78% 40%, rgba(11, 110, 95, 0.10), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(15, 27, 45, 0.11) 1px, transparent 0);
  background-size: auto, 24px 24px;
}
.eyebrow { display: flex; align-items: center; gap: 8px; letter-spacing: 0.04em; }
.eyebrow .prompt { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; color: var(--muted); }
.cursor { display: inline-block; width: 8px; height: 16px; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.code-win { background: #0f1b2d; color: #e6ecf4; border-radius: 12px; overflow: hidden; box-shadow: 0 12px 32px rgba(15, 27, 45, 0.22); max-width: 460px; }
.code-win.below { display: none; flex: 1 1 100%; }
.code-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #18263b; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 12px; color: #a9b8cb; }
.code-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a4a61; }
.code-bar span { margin-left: 8px; }
.code-win pre { margin: 0; padding: 16px 18px 18px; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 13.5px; line-height: 1.9; overflow-x: auto; }
.code-win .ln { display: inline-block; width: 1.6em; color: #5d6f87; user-select: none; }
.code-win .kw { color: #7fd4c6; }
.code-win .nu { color: #ffd58a; }
.code-win .cm { color: #9fb1c7; }
.code-win .out { color: #7fd4c6; font-weight: 700; }

.split-bar div { transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.calc { position: relative; }
.calc::before { content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 3px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, var(--accent), #5fd3bf); }

.sec-no { display: block; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.sec-no::after { content: ""; display: inline-block; width: 40px; height: 1px; background: var(--accent); vertical-align: middle; margin-left: 10px; }

.rate-big { letter-spacing: -0.05em; }
.rate-big small { letter-spacing: 0; margin-left: 4px; }
.chart { max-width: 760px; margin: 20px 0 0; border: 1px solid var(--rule); border-radius: 10px; padding: 18px 18px 8px; background: #fff; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .grid { stroke: #e3e8ee; stroke-width: 1; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 600; stroke-dashoffset: 0; }
.chart .dot { fill: #fff; stroke: var(--accent); stroke-width: 3; }
.chart text { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 13px; fill: var(--ink); }
.chart text.axis { fill: var(--ink-soft); font-family: inherit; font-size: 12px; }
.chart figcaption { font-size: 13px; color: var(--ink-soft); margin: 0 0 6px; }

.band { background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.09) 1px, transparent 0); background-size: 22px 22px; }
.band .prompt { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 13px; color: #5fd3bf; display: block; margin-bottom: 6px; }

.post { transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.post:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15, 27, 45, 0.10); }
.post .tag { font-family: "JetBrains Mono", "IBM Plex Sans JP", sans-serif; }
.post .tag::before { content: "#"; opacity: 0.6; }
.btn-next, .band .btn { transition: transform 0.15s ease, filter 0.15s ease; }
.btn-next:hover, .band .btn:hover { transform: translateY(-1px); }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal .line { stroke-dashoffset: 600; transition: stroke-dashoffset 1.4s ease 0.2s; }
.js .reveal.in .line { stroke-dashoffset: 0; }

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
  .split-bar div, .post, .btn-next, .band .btn { transition: none; }
  .js .reveal, .js .reveal .line { opacity: 1; transform: none; transition: none; stroke-dashoffset: 0; }
}

/* イラスト（すべてコードで描いたSVG） */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step { border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.step .art { background: var(--ground); background-image: radial-gradient(circle at 1px 1px, rgba(15, 27, 45, 0.08) 1px, transparent 0); background-size: 18px 18px; padding: 18px; }
.step .art svg { display: block; width: 100%; height: auto; max-height: 170px; }
.step .body { padding: 18px 20px 22px; }
.step .no { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 12px; font-weight: 700; color: var(--accent); }
.step h3 { margin: 2px 0 6px; font-size: 18px; }
.step p { margin: 0; font-size: 14px; color: var(--ink-soft); }
.art .ink { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.art .panel { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.art .soft { fill: var(--accent-soft); }
.art .acc { fill: var(--accent); }
.art .mid { fill: var(--accent-mid); }
.art .gray { fill: #c9d1db; }
.art text { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-weight: 700; fill: var(--ink); }
.art .caret { fill: var(--accent); animation: blink 1.1s steps(1) infinite; }

.band-art { flex: 0 1 260px; min-width: 0; }
.band .band-art { flex: 0 1 260px; }
.band-art svg { display: block; width: 100%; height: auto; }
.band-art .ln { fill: none; stroke: #c9d3e0; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.band-art .scr { fill: #18263b; stroke: #c9d3e0; stroke-width: 2; }
.band-art .t { stroke: #5fd3bf; stroke-width: 3; stroke-linecap: round; fill: none; }
.band-art .y { stroke: #ffd58a; stroke-width: 3; stroke-linecap: round; fill: none; }
.band-art .w { stroke: #8fa3bb; stroke-width: 3; stroke-linecap: round; fill: none; }
.band-art .tf { fill: #5fd3bf; }

.post-ico { width: 44px; height: 44px; padding: 10px; box-sizing: border-box; border-radius: 10px; background: var(--accent-soft); color: var(--accent); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; transition: background 0.18s ease, color 0.18s ease; }
.post:hover .post-ico { background: var(--accent); color: #fff; }

@media (prefers-reduced-motion: reduce) { .art .caret { animation: none; } .post-ico { transition: none; } }

/* 動きのある部品：進み具合の線、実行ログ、構成図 */
.progress { position: fixed; left: 0; top: 0; height: 3px; width: 0; z-index: 50; background: linear-gradient(90deg, var(--accent), #5fd3bf); }
.code-win .typing-caret { display: inline-block; width: 7px; height: 15px; background: #7fd4c6; vertical-align: -2px; animation: blink 0.9s steps(1) infinite; }
.code-log { border-top: 1px solid #24364f; padding: 10px 18px 12px; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 12.5px; line-height: 1.8; color: #9fb1c7; min-height: 78px; }
.code-log div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: log-in 0.25s ease; }
.code-log div:last-child { color: #e6ecf4; }
.code-log b { color: #7fd4c6; font-weight: 700; }
@keyframes log-in { from { opacity: 0; transform: translateY(6px); } }

.arch-sec { background: #0b1524; color: #e6ecf4; margin-top: 64px; padding: 64px 0; background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.07) 1px, transparent 0); background-size: 24px 24px; }
.arch-sec .sec-no { color: #5fd3bf; }
.arch-sec .sec-no::after { background: #5fd3bf; }
.arch-sec h2 { margin: 0 0 8px; padding: 0; border: 0; font-size: 26px; line-height: 1.4; color: #fff; }
.arch-sec > .wrap-wide > p { margin: 0 0 24px; color: #c9d3e0; max-width: 42em; }
.arch-canvas { border: 1px solid #24364f; border-radius: 14px; background: rgba(15, 27, 45, 0.7); overflow-x: auto; }
.arch-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid #24364f; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 12px; color: #a9b8cb; position: sticky; left: 0; }
.arch-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a4a61; }
.arch-bar span { margin-left: 8px; }
.arch-bar em { margin-left: auto; font-style: normal; color: #5fd3bf; }
.arch { display: block; width: 100%; min-width: 680px; height: auto; }
.arch text { font-size: 13px; fill: #e6ecf4; }
.arch text.sub { font-size: 11.5px; fill: #a9b8cb; }
.arch text.mono { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; }
.arch .zone { fill: rgba(95, 211, 191, 0.05); stroke: #5fd3bf; stroke-width: 1.5; stroke-dasharray: 6 5; }
.arch .e { fill: none; stroke: #6f86a3; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 320; stroke-dashoffset: 0; }
.arch .e.no { stroke: #e08a7b; stroke-dasharray: 5 6; }
.arch .glyph { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.arch .pk { fill: #5fd3bf; }
.arch .pk.y { fill: #ffd58a; }
.arch-hint { display: none; margin: 8px 0 0; font-size: 12px; color: #a9b8cb; }
@media (max-width: 720px) { .arch-hint { display: block; } .arch-sec { padding: 40px 0; margin-top: 40px; } }
.arch-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 20px; }
.arch-notes div { border-top: 2px solid #24364f; padding-top: 12px; }
.arch-notes b { display: block; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 12px; color: #5fd3bf; margin-bottom: 2px; }
.arch-notes p { margin: 0; font-size: 14px; color: #c9d3e0; }

.js .reveal .arch .n { opacity: 0; transform: translateY(10px); transition: opacity 0.45s ease, transform 0.45s ease; transition-delay: var(--d, 0s); }
.js .reveal.in .arch .n { opacity: 1; transform: none; }
.js .reveal .arch .e { stroke-dashoffset: 320; transition: stroke-dashoffset 0.7s ease; transition-delay: var(--d, 0s); }
.js .reveal.in .arch .e { stroke-dashoffset: 0; }
.js .reveal .arch .e.no { stroke-dashoffset: 0; opacity: 0; transition: opacity 0.5s ease; transition-delay: var(--d, 0s); }
.js .reveal.in .arch .e.no { opacity: 1; }
.js .reveal .arch .pk { opacity: 0; transition: opacity 0.4s ease 2.2s; }
.js .reveal.in .arch .pk { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .progress, .arch .pk, .code-win .typing-caret { display: none; }
  .code-log div { animation: none; }
  .js .reveal .arch .n, .js .reveal .arch .e, .js .reveal .arch .e.no { opacity: 1; transform: none; stroke-dashoffset: 0; transition: none; }
}

/* 記事の補助部品：パンくず、目次、関連記事、用語集、フッター */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-current] { color: var(--ink-soft); }
.toc { background: var(--ground); border-radius: 10px; padding: 16px 20px; margin: 20px 0 8px; }
.toc p { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--ink-soft); max-width: none; }
.toc ol { margin: 0; padding-left: 1.4em; font-size: 15px; }
.toc li { margin: 2px 0; }
.article h2[id] { scroll-margin-top: 16px; }
.related { margin-top: 48px; }
.related h2 { font-size: 17px; }
.glossary { margin: 0; }
.glossary dt { font-weight: 700; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); scroll-margin-top: 16px; }
.glossary dt:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.glossary dd { margin: 4px 0 0; max-width: 40em; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 10px; }
.foot-nav a { color: var(--ink-soft); padding: 6px 0; }
.foot-note { margin: 0; font-size: 12px; color: var(--muted); max-width: 46em; }

/* 狭い画面では、計算機が早く見えるように余白を詰める */
@media (max-width: 720px) {
  .hero-inner { padding-top: 28px; padding-bottom: 40px; gap: 24px; }
  .hero-copy { gap: 12px; padding-top: 0; }
  .hero-lead { font-size: 15px; }
  .points { flex-direction: row; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
  .calc { padding: 20px; }
  .band .band-art { display: none; }
  .hero-copy .code-win { display: none; }
  .code-win.below { display: block; max-width: none; }
  .rate-big { font-size: 48px; }
  .band { padding: 24px; }
  .wrap-wide { padding: 0 16px; }
}

.site-foot { border-top: 1px solid var(--rule); padding: 20px 0 32px; font-size: 13px; color: var(--ink-soft); }
.site-foot a { color: var(--ink-soft); }
