/* 健康診断の受診票・判定結果票を下敷きにした見た目。目立たせるのは判定の判子だけにする */
:root {
  --paper: #f4f7f9;
  --sheet: #ffffff;
  --ink: #1b2a3a;
  --ink-soft: #4b5b6b;
  --rule: #b9c4ce;
  --rule-soft: #dde4ea;
  --fail: #b8322a;
  --warn: #a86a12;
  --pass: #2e7563;
  --link: #1f5fa8;
  --font: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  font-feature-settings: "palt" 1;
}
a { color: var(--link); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .6em; font-weight: 700; }
/* 見出しは語の途中で折り返さない（句読点と空白でだけ折り返す）。長すぎるときだけ途中で折る */
h1, h2, h3, h4, .brand, .site-header nav a { word-break: keep-all; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); letter-spacing: .02em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
small { display: block; color: var(--ink-soft); font-size: .8rem; font-weight: 400; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.section { padding: 56px 20px; }
.section > h2 { padding-bottom: .4em; border-bottom: 2px solid var(--ink); }
.muted, .note { color: var(--ink-soft); font-size: .9rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ヘッダーとフッター */
.site-header { background: var(--sheet); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 16px; }
.brand { color: var(--ink); text-decoration: none; font-weight: 700; }
.site-header nav { display: flex; gap: 20px; flex-shrink: 0; }
.site-header nav a { color: var(--ink); text-decoration: none; font-size: .9rem; white-space: nowrap; }
.site-header nav a:hover { text-decoration: underline; }
.site-footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; font-size: .85rem; color: var(--ink-soft); }
.site-footer a { margin-right: 20px; color: var(--ink-soft); }

/* 用紙。角は落とさず、罫線で区切る（書類の見た目） */
.sheet {
  background: var(--sheet);
  border: 1px solid var(--ink);
  padding: 28px;
}
.sheet-title {
  font-size: 1.2rem;
  letter-spacing: .3em;
  text-align: center;
  border-bottom: 3px double var(--ink);
  padding-bottom: .5em;
  margin-bottom: 1.2em;
}

/* ヒーロー: 左に見出し、右に受診票 */
.hero { padding: 48px 0 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: start; }
.hero .lead { font-size: 1.05rem; color: var(--ink-soft); max-width: 32em; }
.stamp-sample { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.stamp-caption { color: var(--ink-soft); font-size: .85rem; }

/* 判子（判定）。このページでいちばん目立たせるもの */
.stamp {
  --c: var(--ink);
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 4px solid var(--c);
  border-radius: 50%;
  color: var(--c);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  transform: rotate(-8deg);
  box-shadow: inset 0 0 0 3px var(--sheet), inset 0 0 0 5px var(--c);
}
.grade-a, .grade-b { --c: var(--pass); }
.grade-c { --c: var(--warn); }
.grade-d, .grade-e { --c: var(--fail); }
.verdict .stamp { animation: press .35s ease-out both; }
@keyframes press {
  from { transform: rotate(-8deg) scale(1.35); opacity: 0; }
  to { transform: rotate(-8deg) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .verdict .stamp { animation: none; } }

/* 受診票の入力欄 */
.field { display: grid; grid-template-columns: 9.5em 1fr; border-top: 1px solid var(--rule); }
.field:last-of-type { border-bottom: 1px solid var(--rule); }
.field label { padding: 12px 12px 12px 0; font-weight: 700; font-size: .95rem; border-right: 1px solid var(--rule-soft); }
.field input, .field select, .field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px dotted transparent;
  padding: 12px;
  font: inherit;
  color: inherit;
  background: transparent;
}
.field input::placeholder { color: #8a97a4; }
.field textarea { resize: vertical; }
.form-error { border-left: 4px solid var(--fail); padding: 8px 12px; color: var(--fail); background: #fbefee; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* 問診（質問票） */
.monshin { margin: 20px 0; border: 1px solid var(--rule); }
.monshin summary { cursor: pointer; padding: 12px 14px; font-weight: 700; }
.monshin summary span { margin-left: .8em; font-weight: 400; font-size: .85rem; color: var(--ink-soft); }
.monshin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.monshin-table th, .monshin-table td { border-top: 1px solid var(--rule-soft); padding: 10px 14px; text-align: left; vertical-align: top; font-weight: 400; }
.monshin-table th { width: 58%; }
.qno { display: inline-block; min-width: 1.6em; font-weight: 700; }
.choice { display: inline-flex; align-items: center; gap: 4px; margin: 0 12px 4px 0; white-space: nowrap; }

.consent { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; font-size: .85rem; color: var(--ink-soft); }
.consent input { margin-top: .45em; }

.btn-primary, .btn-secondary {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  padding: 12px 22px;
  border: 2px solid var(--ink);
}
.btn-primary { background: var(--ink); color: var(--sheet); width: 100%; text-align: center; }
.btn-primary:hover { background: #2c4259; }
.btn-secondary { background: var(--sheet); color: var(--ink); margin: 4px 8px 4px 0; }
.btn-secondary:hover { background: var(--paper); }
.cta-band .btn-primary { width: auto; margin-right: 8px; }

/* 3つの要点 */
.band { background: var(--sheet); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.points { display: grid; grid-template-columns: repeat(3, 1fr); }
.point { padding: 32px 24px; border-left: 1px solid var(--rule-soft); }
.point:first-child { border-left: 0; padding-left: 0; }
.point p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* 罫線の表（検査項目・料金・結果） */
.ruled { width: 100%; border-collapse: collapse; background: var(--sheet); border: 1px solid var(--ink); }
.ruled th, .ruled td { border-bottom: 1px solid var(--rule); padding: 14px 16px; text-align: left; vertical-align: top; }
.ruled thead th { background: var(--paper); font-size: .85rem; border-bottom: 1px solid var(--ink); }
.ruled tbody th { width: 11em; }
.table-scroll { overflow-x: auto; }
.plans td p { margin-bottom: .4em; }
.plans ul { margin: 0; padding-left: 1.2em; color: var(--ink-soft); font-size: .9rem; }
.plans .price { white-space: nowrap; font-weight: 700; }
.plans .is-free { background: #f1f7f5; }
.plan-cta { white-space: nowrap; }
.tag { display: block; width: fit-content; margin-top: 6px; padding: 0 6px; border: 1px solid var(--warn); color: var(--warn); font-size: .75rem; font-weight: 700; }

.flow { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.flow li { counter-increment: step; padding: 18px 20px 18px 0; border-top: 3px solid var(--ink); margin-right: 20px; }
.flow li::before { content: counter(step); display: block; font-weight: 700; font-size: 1.6rem; line-height: 1.2; margin-bottom: 6px; }

.faq { margin: 0; }
.qa { border-bottom: 1px solid var(--rule); padding: 18px 0; }
.qa dt { font-weight: 700; margin-bottom: 6px; }
.qa dd { margin: 0; color: var(--ink-soft); }

/* 結果ページ */
.report-head { display: flex; justify-content: space-between; gap: 24px; align-items: center; border-bottom: 3px double var(--ink); padding-bottom: 16px; margin-bottom: 24px; }
.domain-line { font-size: 1.2rem; font-weight: 700; margin: 0; word-break: break-all; }
.verdict { text-align: center; }
.verdict p { margin: 10px 0 0; }
.alert { border: 2px solid var(--fail); color: var(--fail); padding: 12px 16px; font-weight: 700; }
.report h2 { margin-top: 1.6em; padding-left: 10px; border-left: 6px solid var(--ink); }
.report h2.urgent { border-left-color: var(--fail); color: var(--fail); }
.todos { padding-left: 1.4em; margin: 0; }
.todos > li { padding: 10px 0 14px; border-bottom: 1px solid var(--rule-soft); }
.todos h4 { margin-bottom: .2em; font-size: 1.05rem; }
.todo-meta { color: var(--ink-soft); font-size: .85rem; margin-bottom: .4em; }
.steps { font-size: .95rem; }
.breakdown td { text-align: center; font-weight: 700; }
.st-fail { color: var(--fail); }
.st-warn { color: var(--warn); }
.st-pass { color: var(--pass); }
.st-unknown { color: var(--ink-soft); }
.badge { white-space: nowrap; font-weight: 700; }
.findings td:last-child { font-size: .9rem; }
.cta-band { margin: 32px 0; padding: 28px; border: 2px solid var(--ink); background: #eaf1f6; }
.details-sheet summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; }
.details-sheet h3 { margin-top: 1.4em; }
.scope { font-size: .9rem; color: var(--ink-soft); }
.pending { text-align: center; }
.progress { height: 6px; background: var(--rule-soft); overflow: hidden; margin-top: 20px; }
.progress span { display: block; width: 30%; height: 100%; background: var(--ink); animation: slide 1.6s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
@media (prefers-reduced-motion: reduce) { .progress span { animation: none; width: 100%; opacity: .3; } }
.legal h2 { font-size: 1.1rem; margin-top: 1.6em; }

@media (max-width: 480px) {
  .brand { font-size: .9rem; }
  .site-header nav { gap: 14px; }
  .site-header nav a { font-size: .8rem; }
  .stamp { width: 72px; height: 72px; font-size: 2.3rem; }
}

@media (max-width: 820px) {
  .hero-grid, .points, .flow { grid-template-columns: 1fr; }
  .point { border-left: 0; padding: 20px 0; border-top: 1px solid var(--rule-soft); }
  .point:first-child { border-top: 0; }
  .field { grid-template-columns: 1fr; }
  .field label { border-right: 0; padding-bottom: 0; }
  .sheet { padding: 20px; }
  .monshin-table th, .monshin-table td { display: block; width: auto; }
  .monshin-table td { border-top: 0; padding-top: 0; }
  .report-head { align-items: flex-start; }
  .ruled tbody th { width: auto; }
}
