:root {
  --blue: #1d5f8f;
  --blue-soft: #e9f4fb;
  --green: #2f8f6b;
  --green-soft: #eaf7f1;
  --ink: #173044;
  --muted: #5d7080;
  --line: #d7e5ec;
  --paper: #ffffff;
  --bg: #f5fbfd;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "YuGothic", "Meiryo", sans-serif;
  line-height: 1.75;
}

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

.hero {
  background: linear-gradient(135deg, #eff9fc 0%, #f8fffb 100%);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 34px;
}

.eyebrow {
  color: var(--green);
  font-weight: 700;
  margin: 0 0 8px;
}

h1, h2, h3 {
  line-height: 1.35;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(30px, 5vw, 52px);
  margin: 0 0 18px;
}

h2 {
  font-size: clamp(22px, 3vw, 32px);
  margin: 0 0 18px;
  color: var(--blue);
}

.lead {
  max-width: 860px;
  font-size: 18px;
  color: var(--muted);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.hero-grid > div,
.message,
.note,
.chart-box,
.principles > div {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-grid > div {
  padding: 18px;
}

.label {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.hero-grid strong {
  display: block;
  margin: 6px 0;
  font-size: 28px;
  color: var(--blue);
}

.hero-grid small {
  color: var(--muted);
}

.section {
  padding: 42px 0;
}

.section-lead {
  margin-top: -6px;
  color: var(--muted);
}

.section h3 {
  font-size: 18px;
  color: var(--blue);
  margin: 26px 0 12px;
}

.note ul,
.message ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.note li,
.message li {
  margin: 4px 0;
}

.message {
  padding: 22px;
  background: #ffffff;
}

.message p,
.note p {
  margin: 0 0 12px;
}

.message p:last-child,
.note p:last-child {
  margin-bottom: 0;
}

.note {
  margin-top: 16px;
  padding: 18px;
  background: var(--green-soft);
}

.principles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.principles > div {
  padding: 18px;
}

.principles strong {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
}

.principles span {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-wrap + .table-wrap,
.table-wrap + .chart-box,
.chart-box + .table-wrap {
  margin-top: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 14px;
}

.compact table {
  min-width: 620px;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--blue-soft);
  color: var(--blue);
  white-space: nowrap;
}

td.num,
th.num {
  text-align: right;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

.chart-box {
  padding: 18px;
  height: 420px;
}

.chart-box canvas {
  width: 100% !important;
  height: 100% !important;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.caution {
  background: #f7fcff;
}

.caution ul,
.steps ol {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 24px 20px 42px;
}

.steps li,
.caution li {
  margin: 7px 0;
}

.footer {
  color: var(--muted);
  font-size: 13px;
  padding: 24px 0 50px;
}

@media (max-width: 620px) {
  /* スマホでは表をカード型（1行ずつ縦積み・項目見出し付き）に切り替え */
  .table-wrap {
    overflow-x: visible;
    padding: 4px;
  }

  table,
  .compact table {
    min-width: 0;
    font-size: 14px;
  }

  table thead {
    display: none;
  }

  table tr {
    display: block;
    padding: 4px 6px 8px;
    border-bottom: 2px solid var(--line);
  }

  table tr:last-child {
    border-bottom: 0;
  }

  table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    border: 0;
    padding: 6px 6px;
    text-align: right;
    white-space: normal;
  }

  table td::before {
    content: attr(data-label);
    flex: 0 0 40%;
    text-align: left;
    font-weight: 700;
    color: var(--blue);
    white-space: normal;
  }

  table td:first-child {
    margin-top: 2px;
    font-weight: 700;
  }

  table td.num,
  table th.num {
    white-space: normal;
  }
}

@media (max-width: 820px) {
  .hero {
    padding-top: 34px;
  }

  .hero-grid,
  .principles,
  .two-col {
    grid-template-columns: 1fr;
  }

  .chart-box {
    height: 340px;
    padding: 12px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  body {
    background: #fff;
    color: #111;
  }

  .hero,
  .section {
    padding: 18px 0;
  }

  .message,
  .note,
  .table-wrap,
  .chart-box,
  .caution ul,
  .steps ol {
    break-inside: avoid;
  }

  .wrap {
    width: 100%;
  }

  .chart-box {
    height: 300px;
  }

  table {
    font-size: 11px;
  }
}
