/* ケミカルRA：GHSのひし形（赤）× 安全緑 × 鋼のグレー。介護LP（帳票・明朝・朱印）とは別系統 */
:root {
  --steel: #eef1ef;
  --paper: #ffffff;
  --ink: #1b2420;
  --ink-2: #3d4a44;
  --muted: #5b6862;
  --rule: #c5cec9;
  --ghs: #d4251c;
  --go: #17734a;
  --go-dark: #0f5a39;
  --go-wash: #e3f1e9;
  --focus: #1f5fd1;
  --font: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.85; color: var(--ink); background: var(--paper); }
a { color: var(--go-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.35; margin: 0; word-break: auto-phrase; }
p { margin: 0 0 1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; text-decoration: none; color: var(--ink); }
.logo svg { width: 26px; height: 26px; }

/* buttons */
.btn { display: inline-block; background: var(--go); color: #fff; font-weight: 700; text-decoration: none; border: 0; border-radius: 6px; padding: 14px 26px; font: inherit; font-weight: 700; cursor: pointer; }
.btn:hover { background: var(--go-dark); }
.btn-sm { padding: 8px 16px; font-size: 15px; }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* hero */
.hero { background: var(--steel); padding: 56px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1fr; gap: 44px; }
.hero h1 { font-weight: 700; font-size: clamp(30px, 5.6vw, 44px); letter-spacing: -.01em; line-height: 1.25; }
.hero .lead { font-size: 18px; color: var(--ink-2); margin: 22px 0 28px; max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .note { font-size: 14px; color: var(--muted); margin-top: 14px; }
@media (min-width: 960px) {
  .hero { padding: 64px 0 88px; }
  .hero .wrap { grid-template-columns: 1.15fr 1fr; align-items: start; gap: 56px; }
}

/* SDS → 判定 */
.demo { display: grid; gap: 14px; }
.sds, .result { background: var(--paper); border-radius: 4px; padding: 20px 22px; }
.sds { border: 1px solid var(--rule); font-size: 14px; line-height: 1.7; }
.sds-title { font-weight: 700; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.sds .sec { display: flex; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--rule); }
.sds .sec b { flex: none; width: 2.4em; color: var(--muted); font-weight: 700; }
.sds .picts { display: flex; gap: 8px; margin-top: 6px; }
.sds .picts svg { width: 40px; height: 40px; }
.sds mark { background: none; color: inherit; box-shadow: inset 0 -.55em 0 #ffe9a8; }
.flow { text-align: center; font-size: 13px; color: var(--muted); }
.flow svg { display: block; margin: 0 auto 2px; width: 18px; height: 18px; }
.result { border: 2px solid var(--ink); }
.result h2 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.result .task { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.level { display: grid; grid-template-columns: 4.5em 1fr; align-items: center; gap: 8px 12px; font-size: 14px; }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.meter i { height: 12px; background: var(--steel); border-radius: 2px; }
.meter i.on { background: var(--ink); }
.meter i.on.hi { background: var(--ghs); }
.meter-label { grid-column: 2; font-size: 13px; color: var(--muted); margin-top: -4px; }
.todo { list-style: none; padding: 0; margin: 14px 0 0; font-size: 14px; }
.todo li { position: relative; padding: 6px 0 6px 28px; border-top: 1px solid var(--steel); }
.todo li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 16px; height: 16px; border-radius: 3px; background: var(--go); }
.todo li::after { content: ""; position: absolute; left: 7px; top: 13px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.demo-cap { font-size: 12px; color: var(--muted); text-align: right; margin: 0; }

/* 1回だけの読み込み演出：SDS の行に印がつき、判定が出る */
@media (prefers-reduced-motion: no-preference) {
  .sds mark { animation: hl .6s ease-out .5s both; }
  .meter i.on { animation: fill .35s ease-out both; }
  .meter i.on:nth-child(1) { animation-delay: 1.2s; }
  .meter i.on:nth-child(2) { animation-delay: 1.35s; }
  .meter i.on:nth-child(3) { animation-delay: 1.5s; }
  .todo li { animation: show .4s ease-out both; }
  .todo li:nth-child(1) { animation-delay: 1.9s; }
  .todo li:nth-child(2) { animation-delay: 2.05s; }
  .todo li:nth-child(3) { animation-delay: 2.2s; }
}
@keyframes hl { from { box-shadow: inset 0 0 0 #ffe9a8; } }
@keyframes fill { from { transform: scaleX(0); transform-origin: left; } }
@keyframes show { from { opacity: 0; } }

/* sections */
section.block { padding: 72px 0; }
section.block.alt { background: var(--steel); }
.block h2 { font-size: clamp(24px, 4.2vw, 34px); font-weight: 700; margin-bottom: 12px; }
.block .sub { color: var(--muted); max-width: 40em; margin-bottom: 32px; }
/* 先行登録：見出し・説明・フォームをひとまとまりで中央に置く（文字は左揃えのまま） */
.wrap.apply-wrap { max-width: calc(640px + 40px); }

/* 困りごと */
.pains { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 46em; }
.pains li { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 18px; }
.pains li:first-child { border-top: 1px solid var(--rule); }
.pains svg { flex: none; width: 22px; height: 22px; margin-top: 5px; }

/* 物質数の推移 */
.grow { display: grid; gap: 32px; }
@media (min-width: 900px) { .grow { grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: end; } }
.grow p { color: var(--ink-2); }
.bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; height: 260px; border-bottom: 2px solid var(--ink); }
.bars div { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; }
.bars span { display: block; font-weight: 700; font-size: clamp(15px, 2.6vw, 22px); margin-bottom: 6px; }
.bars i { display: block; background: var(--ink); border-radius: 3px 3px 0 0; }
.bars div:last-child i { background: var(--ghs); }
.bars-x { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: center; font-size: 13px; color: var(--muted); margin-top: 8px; }
.grow .fine { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* 入力 → 下書き */
.io { display: grid; gap: 16px; }
@media (min-width: 900px) { .io { grid-template-columns: 1fr 1.25fr; gap: 28px; } }
.io h3 { font-size: 15px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.io pre { margin: 0; white-space: pre-wrap; font: inherit; font-size: 15px; line-height: 1.8; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 18px 20px; }
.io .out pre { border: 2px solid var(--go); background: var(--go-wash); }

/* できること */
.feats { display: grid; gap: 0; border-top: 2px solid var(--ink); }
@media (min-width: 760px) { .feats { grid-template-columns: 1fr 1fr; column-gap: 48px; } }
.feats div { padding: 22px 0; border-bottom: 1px solid var(--rule); }
.feats h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.feats p { margin: 0; color: var(--ink-2); font-size: 16px; }

/* 使い方（順番がある） */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; counter-reset: s; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.steps li { counter-increment: s; position: relative; padding-top: 52px; }
.steps li::before { content: counter(s); position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; display: grid; place-items: center; }
.steps h3 { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 16px; }

/* 料金 */
.incl { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 34em; }
.incl li { position: relative; padding-left: 28px; }
.incl li::before { content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 8px; border: solid var(--go); border-width: 0 0 3px 3px; transform: rotate(-45deg); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-child { border-top: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 24px; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 18px; color: var(--ink-2); }

/* フォーム */
.form { background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; padding: 28px 22px; max-width: 640px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.req { display: inline-block; font-size: 12px; font-weight: 700; color: var(--ghs); margin-left: 8px; }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 16px; padding: 11px 12px; border: 1px solid #9aa6a0; border-radius: 4px; background: #fff; color: var(--ink); }
.field textarea { min-height: 110px; }
.hp { position: absolute; left: -9999px; }
.agree { font-size: 14px; color: var(--muted); }
.form .btn { width: 100%; padding: 16px; font-size: 18px; }
.msg { margin: 12px 0 0; font-size: 15px; }
.msg.err { color: var(--ghs); font-weight: 700; }

/* footer, 下層ページ */
.foot { border-top: 1px solid var(--rule); padding: 28px 0; font-size: 14px; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.foot a { color: var(--muted); }
.doc { padding: 56px 0 80px; }
.doc h1 { font-size: 28px; font-weight: 700; margin-bottom: 20px; }
.doc h2 { font-size: 19px; margin: 28px 0 8px; }
