:root {
  color-scheme: light;
  --bg: #f6f8f5;
  --surface: #ffffff;
  --surface-soft: #eef5ef;
  --text: #1f2a24;
  --muted: #5f6e65;
  --line: #d8e1da;
  --primary: #176c5c;
  --primary-dark: #0f5146;
  --accent: #d96c3f;
  --accent-soft: #fff0e9;
  --yellow: #d7a622;
  --red: #b84444;
  --shadow: 0 18px 48px rgba(31, 42, 36, 0.12);
  --radius: 8px;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Hiragino Sans",
    "Yu Gothic",
    "Meiryo",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 248, 245, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  flex: 0 0 auto;
}

.header-nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

.header-nav a,
.text-link {
  color: var(--primary-dark);
  text-decoration-color: rgba(23, 108, 92, 0.35);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.intro-band {
  padding: 64px 0 72px;
  background:
    linear-gradient(120deg, rgba(23, 108, 92, 0.08), rgba(217, 108, 63, 0.07)),
    var(--bg);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  align-items: center;
  gap: 48px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 7vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.6rem);
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 16px;
  font-size: 1.15rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.intro-actions,
.form-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border-radius: var(--radius);
  padding: 11px 18px;
  border: 1px solid transparent;
  font-weight: 700;
  line-height: 1.3;
}

.primary-button {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(23, 108, 92, 0.2);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--primary-dark);
}

.secondary-button {
  background: var(--surface);
  color: var(--primary-dark);
  border-color: var(--line);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: var(--primary);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.text-link:focus-visible,
.header-nav a:focus-visible,
.answer-option input:focus-visible + span {
  outline: 3px solid rgba(23, 108, 92, 0.32);
  outline-offset: 3px;
}

.intro-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.meter-preview {
  position: relative;
  width: min(230px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0 66%, #dfe8e1 66% 100%);
}

.meter-preview::before {
  position: absolute;
  inset: 18px;
  content: "";
  border-radius: 50%;
  background: var(--surface);
}

.meter-preview::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  content: "50";
  color: var(--primary-dark);
  font-size: 4rem;
  font-weight: 800;
}

.meter-preview-fill {
  position: absolute;
  right: 30%;
  bottom: 24%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid var(--surface);
  z-index: 1;
}

.info-band,
.checker-band,
.result-band,
.privacy-band,
.consult-band {
  padding: 56px 0;
}

.info-band,
.privacy-band {
  background: var(--surface);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 48px;
  align-items: start;
}

.prose p {
  margin: 0 0 16px;
  color: var(--muted);
}

.prose p:last-child {
  margin-bottom: 0;
}

.policy-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.policy-list li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
}

.policy-list li::before {
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 10px;
  height: 10px;
  content: "";
  border-radius: 50%;
  background: var(--primary);
}

.policy-list.compact {
  gap: 9px;
}

.checker-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.step-count {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.progress-meter {
  display: block;
  width: 100%;
  height: 10px;
  margin: 22px 0 26px;
  overflow: hidden;
  border-radius: 999px;
  border: 0;
  background: #dde6df;
}

.progress-meter::-webkit-progress-bar {
  border-radius: 999px;
  background: #dde6df;
}

.progress-meter::-webkit-progress-value {
  border-radius: 999px;
  background: var(--primary);
}

.progress-meter::-moz-progress-bar {
  border-radius: 999px;
  background: var(--primary);
}

#check-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.question-list {
  display: grid;
}

.question-row {
  display: grid;
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.question-row:first-child {
  padding-top: 0;
}

.question-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.question-title {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 0;
}

.question-number {
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--primary-dark);
  font-weight: 800;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.answer-option {
  position: relative;
  display: block;
}

.answer-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.answer-option span {
  display: grid;
  min-height: 48px;
  place-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfb;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.answer-option input:checked + span {
  border-color: var(--primary);
  background: var(--surface-soft);
  color: var(--primary-dark);
  box-shadow: inset 0 0 0 2px rgba(23, 108, 92, 0.12);
}

.form-message {
  min-height: 1.7em;
  margin: 16px 0 0;
  color: var(--red);
  font-weight: 700;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 36px;
  align-items: start;
}

.result-summary,
.result-details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.score-circle {
  display: grid;
  place-items: center;
  width: min(230px, 100%);
  aspect-ratio: 1;
  margin: 26px auto;
  border-radius: 50%;
  background: conic-gradient(var(--primary) var(--score-angle, 0deg), #e2ebe4 0);
}

.score-circle span {
  display: block;
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
}

.score-circle small {
  margin-top: -42px;
  color: var(--muted);
  font-weight: 700;
}

.score-meter,
.category-meter {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #e4ece6;
}

.score-meter {
  height: 14px;
  margin: 0 0 22px;
}

.category-meter {
  height: 12px;
}

.score-meter::-webkit-meter-bar,
.category-meter::-webkit-meter-bar {
  border: 0;
  border-radius: 999px;
  background: #e4ece6;
}

.score-meter::-webkit-meter-optimum-value,
.score-meter::-webkit-meter-suboptimum-value,
.score-meter::-webkit-meter-even-less-good-value,
.category-meter::-webkit-meter-optimum-value,
.category-meter::-webkit-meter-suboptimum-value,
.category-meter::-webkit-meter-even-less-good-value {
  border-radius: 999px;
  background: var(--primary);
}

.score-meter::-moz-meter-bar,
.category-meter::-moz-meter-bar {
  border-radius: 999px;
  background: var(--primary);
}

.result-level {
  margin: 0 0 10px;
  font-size: 1.28rem;
  font-weight: 800;
}

.result-comment {
  margin: 0;
  color: var(--muted);
}

.category-results {
  display: grid;
  gap: 18px;
}

.category-row {
  display: grid;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.category-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.category-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.category-name {
  font-weight: 800;
}

.category-score {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.category-comment {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.next-actions {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.next-actions ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.25em;
  color: var(--muted);
}

.is-hidden {
  display: none !important;
}

.risk-low {
  --primary: #176c5c;
  --score-angle: 82deg;
}

.risk-medium {
  --primary: #b17a13;
  --score-angle: 166deg;
}

.risk-high {
  --primary: #d96c3f;
  --score-angle: 250deg;
}

.risk-very-high {
  --primary: #b84444;
  --score-angle: 330deg;
}

.site-footer {
  padding: 30px 0;
  background: var(--text);
  color: rgba(255, 255, 255, 0.78);
}

.site-footer p {
  margin: 0;
  font-size: 0.95rem;
}

@media (max-width: 820px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
  }

  .header-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    white-space: nowrap;
  }

  .intro-band {
    padding: 42px 0 52px;
  }

  .intro-grid,
  .two-column,
  .result-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .intro-panel {
    box-shadow: none;
  }

  .checker-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .answer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #check-form,
  .result-summary,
  .result-details {
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .shell {
    width: min(100% - 24px, 1120px);
  }

  .brand span {
    font-size: 0.96rem;
  }

  .question-title {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .question-number {
    width: 36px;
    min-width: 36px;
    height: 36px;
  }

  .answer-grid {
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button,
  .intro-actions .text-link {
    width: 100%;
    text-align: center;
  }
}

@media print {
  .site-header,
  .intro-band,
  .info-band,
  .checker-band,
  .privacy-band,
  .consult-band,
  .site-footer,
  .result-actions {
    display: none !important;
  }

  body {
    background: #ffffff;
  }

  .result-band {
    display: block !important;
    padding: 0;
  }

  .shell {
    width: 100%;
  }

  .result-layout {
    grid-template-columns: 1fr;
  }

  .result-summary,
  .result-details {
    border: 0;
    box-shadow: none;
  }
}
