:root {
  --tool-bg: #f4f0e8;
  --tool-card: #fffefa;
  --tool-ink: #172330;
  --tool-muted: #53606c;
  --tool-line: #d8d0c3;
  --tool-accent: #e84a32;
  --tool-accent-dark: #b92f1f;
  --tool-navy: #173447;
  --tool-teal: #087f8c;
  --tool-focus: #0969da;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--tool-ink);
  background: var(--tool-bg);
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  line-height: 1.7;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--tool-focus);
  outline-offset: 3px;
}
.skip-link { position: fixed; top: -80px; left: 12px; z-index: 100; background: #fff; padding: 8px 12px; }
.skip-link:focus { top: 12px; }
.tool-wrap { width: min(1080px, calc(100% - 32px)); margin-inline: auto; }
.tool-header { background: #fff; border-bottom: 1px solid var(--tool-line); }
.tool-header-inner, .tool-footer-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.tool-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.tool-brand span { display: grid; line-height: 1.35; }
.tool-brand strong { font-size: 1rem; }
.tool-brand small { color: var(--tool-muted); }
.tool-header-link { min-height: 44px; display: inline-flex; align-items: center; color: var(--tool-accent-dark); font-weight: 700; }
.tool-hero { color: #fff; background: var(--tool-navy); padding: clamp(36px, 7vw, 76px) 0; }
.tool-hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: 48px; align-items: center; }
.tool-eyebrow { display: inline-block; margin: 0 0 12px; color: #ffb19e; font-weight: 800; letter-spacing: .06em; }
.tool-hero h1 { margin: 0; font-size: clamp(2.25rem, 6vw, 4.5rem); line-height: 1.16; letter-spacing: -.035em; }
.tool-lead { max-width: 42rem; margin: 22px 0 0; font-size: clamp(1rem, 2vw, 1.18rem); color: #e7eef2; }
.tool-summary { padding: 24px; border: 1px solid rgba(255,255,255,.22); border-radius: 18px; background: rgba(255,255,255,.08); }
.tool-summary strong { font-size: 1.25rem; }
.tool-summary ul { margin: 12px 0 0; padding-left: 1.25em; }
.tool-section { padding: 36px 0 72px; }
.tool-intro { margin-bottom: 28px; padding: 20px 22px; border-left: 5px solid var(--tool-accent); background: #fff; box-shadow: 0 8px 30px rgba(23,35,48,.06); }
.tool-intro p { margin: 0; }
.tool-intro p + p { margin-top: 8px; color: var(--tool-muted); }
.check-progress { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; margin-bottom: 18px; padding: 12px 16px; border: 1px solid var(--tool-line); border-radius: 14px; background: rgba(255,254,250,.96); backdrop-filter: blur(8px); font-weight: 800; }
.check-progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e4ded4; }
.check-progress-track span { display: block; width: 0; height: 100%; background: var(--tool-accent); transition: width .2s ease; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.check-card { min-width: 0; margin: 0; padding: 22px; border: 1px solid var(--tool-line); border-radius: 18px; background: var(--tool-card); box-shadow: 0 7px 24px rgba(23,35,48,.05); }
.check-card legend { width: 100%; padding: 0; font-size: 1.1rem; font-weight: 800; }
.check-card legend span { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-right: 8px; border-radius: 50%; color: #fff; background: var(--tool-navy); font-size: .83rem; }
.check-card > p { min-height: 3.4em; margin: 12px 0 18px; color: var(--tool-muted); }
.state-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.state-options label { position: relative; cursor: pointer; }
.state-options input { position: absolute; opacity: 0; pointer-events: none; }
.state-options span { min-height: 48px; display: grid; place-items: center; padding: 8px 6px; border: 1px solid var(--tool-line); border-radius: 10px; background: #fff; text-align: center; font-size: .9rem; font-weight: 700; }
.state-options input:checked + span { color: #fff; border-color: var(--tool-teal); background: var(--tool-teal); }
.state-options input:focus-visible + span { outline: 3px solid var(--tool-focus); outline-offset: 2px; }
.check-card.is-invalid { border-color: #b42318; box-shadow: 0 0 0 2px rgba(180,35,24,.16); }
.form-error { margin: 18px 0 0; color: #a11d15; font-weight: 800; }
.form-actions, .result-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
.primary-button, .secondary-button, .ghost-button, .text-button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; padding: 12px 20px; border-radius: 999px; font-weight: 800; text-decoration: none; cursor: pointer; }
.primary-button { color: #fff; border: 1px solid var(--tool-accent); background: var(--tool-accent); }
.primary-button:hover { background: var(--tool-accent-dark); }
.secondary-button { color: #fff; border: 1px solid var(--tool-navy); background: var(--tool-navy); }
.ghost-button { color: var(--tool-navy); border: 1px solid var(--tool-navy); background: #fff; }
.text-button { color: var(--tool-muted); border: 0; background: transparent; text-decoration: underline; }
.check-result { margin-top: 42px; padding: clamp(24px, 5vw, 46px); border-radius: 22px; color: #fff; background: var(--tool-navy); box-shadow: 0 16px 42px rgba(23,35,48,.16); }
.result-kicker { margin: 0 0 4px; color: #73d4dc; font-weight: 800; letter-spacing: .12em; }
.check-result h2 { margin: 0; font-size: clamp(1.65rem, 4vw, 2.5rem); line-height: 1.3; }
.check-result h3 { margin: 26px 0 10px; }
.result-counts { color: #ffb19e; font-weight: 800; }
.question-list { display: grid; gap: 10px; padding-left: 1.4em; }
.question-list li { padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.09); }
.result-note { padding: 14px 16px; border-left: 4px solid #73d4dc; background: rgba(255,255,255,.08); }
.check-result .primary-button { border-color: #ff6a51; background: #ff5138; }
.check-result .secondary-button { border-color: #fff; background: #fff; color: var(--tool-navy); }
.check-result .ghost-button { border-color: rgba(255,255,255,.55); color: #fff; background: transparent; }
.check-result small { display: block; margin-top: 14px; color: #dfe8ec; }
.tool-limitations { margin-top: 32px; padding: 22px; border: 1px solid var(--tool-line); border-radius: 16px; background: #ece7de; }
.tool-limitations h2 { margin: 0 0 8px; font-size: 1.1rem; }
.tool-limitations p { margin: 0; }
.tool-footer { padding: 18px 0; border-top: 1px solid var(--tool-line); background: #fff; color: var(--tool-muted); }
.tool-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.tool-footer a { min-height: 44px; display: inline-flex; align-items: center; }

@media (max-width: 760px) {
  .tool-wrap { width: min(100% - 24px, 680px); }
  .tool-header-inner { min-height: 68px; }
  .tool-brand small, .tool-header-link { display: none; }
  .tool-hero { padding: 32px 0; }
  .tool-hero-grid, .check-grid { grid-template-columns: 1fr; gap: 14px; }
  .tool-summary { padding: 18px; }
  .check-card { padding: 18px 16px; }
  .check-card > p { min-height: auto; }
  .state-options { gap: 6px; }
  .state-options span { font-size: .82rem; }
  .form-actions > *, .result-actions > * { width: 100%; }
  .tool-footer-inner { align-items: flex-start; flex-direction: column; }
}

@media print {
  body { background: #fff; }
  .tool-header, .tool-hero, .tool-intro, .check-form, .tool-limitations, .tool-footer, .result-actions, #pcd-internal-badge { display: none !important; }
  .tool-section { padding: 0; }
  .tool-wrap { width: 100%; }
  .check-result { display: block !important; margin: 0; padding: 0; color: #000; background: #fff; box-shadow: none; }
  .result-kicker, .result-counts { color: #000; }
  .question-list li, .result-note { color: #000; background: #fff; border: 1px solid #999; }
  .check-result small { color: #000; }
}
