:root {
  --ink: #071d3f;
  --muted: #556173;
  --line: #d9e1ea;
  --soft: #f5f8fb;
  --green: #06a33a;
  --green-deep: #07812f;
  --blue: #0d5fb8;
  --amber: #f59e0b;
  --red: #dc2626;
  --white: #fff;
  --shadow: 0 18px 44px rgba(7, 29, 63, .1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fbfd, #eef4f0 54%, #f8fafc);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.8;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.site-header {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  background: #061a37;
  color: #fff;
}

.brand {
  font-size: 1.1rem;
  font-weight: 950;
  text-decoration: none;
}

.top-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.top-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 850;
}

.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 28px 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 28px;
  align-items: start;
}

.hero-main,
.diagnostic-panel {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 950;
  color: #102744;
}

h1 {
  margin: 0;
  font-size: clamp(2.85rem, 5vw, 4.65rem);
  line-height: 1.05;
  font-weight: 950;
  word-break: normal;
  overflow-wrap: anywhere;
}

.lead {
  margin: 18px 0 0;
  max-width: 900px;
  font-size: clamp(1.2rem, 2.1vw, 1.55rem);
  line-height: 1.55;
  font-weight: 900;
}

.summary {
  max-width: 880px;
  margin: 14px 0 0;
  color: #253751;
  font-size: 1.05rem;
}

.branch-buttons {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.branch-buttons a {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(6,163,58,.42);
  border-radius: 8px;
  background: #fff;
  color: var(--green-deep);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(7,29,63,.06);
}

.branch-buttons a:nth-child(4) {
  border-color: rgba(13,95,184,.42);
  color: var(--blue);
}

.branch-buttons a:nth-child(5) {
  border-color: rgba(245,158,11,.48);
  color: #a25f00;
}

.branch-buttons a:nth-child(6) {
  border-color: rgba(220,38,38,.35);
  color: var(--red);
}

.diagnostic-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.diagnostic-panel h2 {
  margin: 0;
  padding: 16px 18px;
  background: #061a37;
  color: #fff;
  font-size: 1.15rem;
}

.progress-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 22px 18px 12px;
}

.progress-row span {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #d6dce5;
  color: #fff;
  font-weight: 950;
}

.progress-row .active {
  background: var(--green);
}

.diagnostic-panel p {
  margin: 0 18px 18px;
  padding: 14px;
  border-radius: 8px;
  background: #edf8ef;
  color: #153b22;
  font-weight: 800;
}

.content-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

.content-main,
.side-column {
  min-width: 0;
}

.section,
.answer-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 26px rgba(7,29,63,.06);
}

.section,
.answer-card {
  margin-bottom: 18px;
  padding: 28px;
}

.answer-card {
  border-color: rgba(6,163,58,.4);
  background: linear-gradient(135deg, #f0fbf3, #fff);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  margin-bottom: 18px;
  border-bottom: 4px solid var(--ink);
}

.section-head p {
  margin: 0;
  color: var(--green-deep);
  font-weight: 950;
}

.section h2,
.answer-card h2,
.side-card h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.9vw, 2.05rem);
  line-height: 1.28;
}

.section p,
.answer-card p {
  margin: 12px 0 0;
  font-size: 1.03rem;
}

.flow-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.flow-cards div {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid #d6e5da;
  border-radius: 8px;
  background: #fff;
}

.flow-cards b,
.step-list span {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 950;
}

.flow-cards strong {
  font-size: 1.05rem;
  font-weight: 950;
}

.flow-cards span {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.5;
}

.step-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.step-list div {
  display: flex;
  gap: 12px;
  min-height: 148px;
  padding: 18px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #fff;
}

.step-list p {
  margin: 0;
}

.diagnosis-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
}

.diagnosis-table th,
.diagnosis-table td {
  border: 1px solid #dde4ec;
  padding: 14px;
  text-align: left;
  vertical-align: top;
}

.diagnosis-table th {
  background: #061a37;
  color: #fff;
}

.danger {
  border-color: rgba(220,38,38,.35);
  background: linear-gradient(135deg, #fff8ed, #fff);
}

.danger .section-head {
  border-color: var(--amber);
}

.danger .section-head p {
  color: #c76d00;
}

.danger-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.danger-list div {
  min-height: 158px;
  padding: 18px;
  border: 1px solid rgba(220,38,38,.28);
  border-radius: 8px;
  background: #fff;
}

.danger-list strong {
  display: block;
  color: var(--red);
  font-size: 1.08rem;
}

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

.memo-table label {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dde4ec;
  border-radius: 8px;
  background: #fff;
  font-weight: 850;
}

.memo-table input {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.source-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.source-links a {
  min-height: 66px;
  display: flex;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  font-weight: 850;
  line-height: 1.45;
}

.side-column {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
}

.side-card {
  padding: 18px;
}

.side-card h2 {
  font-size: 1.22rem;
  margin-bottom: 10px;
}

.side-card ul {
  margin: 8px 0 0;
  padding-left: 1.1em;
}

.side-card li {
  margin: 5px 0;
  font-weight: 850;
}

.danger-mini {
  border-color: rgba(220,38,38,.3);
}

.danger-mini h2,
.danger-mini li {
  color: var(--red);
}

.side-card a {
  display: block;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  font-weight: 850;
  line-height: 1.45;
}

.ad-slot {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border: 1px dashed #cdd7e3;
  border-radius: 8px;
  background: rgba(255,255,255,.7);
}

.footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer a {
  color: var(--ink);
  font-weight: 950;
  text-decoration: none;
}

@media (max-width: 1040px) {
  .hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .side-column {
    position: static;
  }

  .branch-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

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

  .top-nav a {
    justify-content: center;
  }

  .hero,
  .content-grid {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero {
    padding-top: 28px;
  }

  h1 {
    font-size: clamp(2.55rem, 12.5vw, 3.45rem);
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .eyebrow {
    font-size: 1.25rem;
  }

  .branch-buttons,
  .flow-cards,
  .step-list,
  .danger-list,
  .memo-table,
  .source-links {
    grid-template-columns: 1fr;
  }

  .section,
  .answer-card {
    padding: 20px 16px;
  }

  .section-head {
    display: block;
  }

  .diagnosis-table {
    display: block;
    overflow-x: auto;
  }
}
