:root {
  --bg: #f7f9f6;
  --surface: #ffffff;
  --surface-soft: #eef5ef;
  --text: #17211b;
  --muted: #627069;
  --border: #dbe5dc;
  --accent: #16734a;
  --accent-strong: #0d5f3c;
  --warm: #b95b20;
  --danger: #b3261e;
  --shadow: 0 16px 48px rgba(32, 52, 41, 0.08);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(219, 229, 220, 0.86);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(1120px, calc(100% - 32px));
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
}

.brand {
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 2px;
  overflow-x: auto;
}

.nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  color: var(--muted);
  padding: 8px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.hero {
  padding: 44px 0 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.62fr);
  gap: 34px;
  align-items: center;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 8px 0 14px;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.08;
}

.lead {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.hero-actions,
.action-row,
.program-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button,
button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  padding: 9px 15px;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.button.secondary,
button.secondary {
  background: #fff;
  color: var(--accent);
}

.button.secondary:hover,
button.secondary:hover {
  background: var(--surface-soft);
}

.button.small {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 14px;
}

.hero-media {
  margin: 0;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.section {
  padding: 50px 0;
}

.muted {
  border-block: 1px solid var(--border);
  background: var(--surface-soft);
}

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

.metrics-grid div,
.plain-panel,
.filter-panel,
.results-panel,
.feedback-form,
.program-card,
.source-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metrics-grid div {
  padding: 18px;
}

.metrics-grid strong {
  display: block;
  font-size: 32px;
  font-weight: 650;
  line-height: 1.1;
}

.metrics-grid span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.app-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.filter-panel,
.results-panel,
.plain-panel,
.feedback-form {
  padding: 22px;
}

.filter-panel {
  position: sticky;
  top: 88px;
}

.filter-panel h2,
.section-head h2,
.plain-panel h2 {
  margin: 5px 0 0;
  font-size: 28px;
  font-weight: 650;
  line-height: 1.25;
}

.filters {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 10px 11px;
  font-weight: 400;
}

.field textarea {
  min-height: 128px;
  resize: vertical;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-actions button {
  min-height: 36px;
  border-color: var(--border);
  background: #fff;
  color: var(--text);
  padding: 7px 10px;
  font-size: 14px;
}

.source-note {
  margin-top: 18px;
  border-left: 3px solid var(--warm);
  padding-left: 12px;
}

.source-note strong {
  color: var(--warm);
}

.source-note p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.program-list {
  display: grid;
  gap: 12px;
}

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

.action-card {
  min-height: 190px;
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  padding: 20px;
  text-decoration: none;
}

.action-card:hover {
  border-color: rgba(22, 115, 74, 0.35);
  transform: translateY(-1px);
}

.action-card span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
}

.action-card strong {
  font-size: 20px;
  font-weight: 650;
  line-height: 1.35;
}

.action-card p {
  margin: 0;
  color: var(--muted);
}

.program-card {
  padding: 18px;
}

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

.source-card {
  padding: 18px;
}

.source-card h3 {
  margin: 10px 0 12px;
  font-size: 18px;
  font-weight: 620;
  line-height: 1.45;
}

.source-card h3 a {
  text-decoration: none;
}

.source-card h3 a:hover {
  color: var(--accent);
}

.source-title,
.section-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.program-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 650;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 650;
}

.status-pill.ok {
  border: 1px solid rgba(22, 115, 74, 0.25);
  background: #eef7f1;
  color: var(--accent-strong);
}

.status-pill.ng {
  border: 1px solid rgba(179, 38, 30, 0.25);
  background: #fff2f0;
  color: var(--danger);
}

.program-card h3 {
  margin: 10px 0 6px;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.35;
}

.program-card p {
  margin: 0;
  color: var(--muted);
}

.program-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}

.program-facts div {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px;
}

.program-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.program-facts dd {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.text-link {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.two-column,
.feedback-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: 22px;
  align-items: start;
}

.plain-panel p {
  color: var(--muted);
}

.ordered-list,
.check-list {
  margin: 14px 0 0;
  padding-left: 1.3em;
  color: var(--muted);
}

.ordered-list li + li,
.check-list li + li {
  margin-top: 9px;
}

.link-stack {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.link-stack a {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 13px 14px;
  text-decoration: none;
}

.link-stack a:hover {
  border-color: rgba(22, 115, 74, 0.35);
  color: var(--accent);
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.comparison-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.comparison-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  border-bottom: 1px solid var(--border);
  padding: 15px 16px;
  text-align: left;
  vertical-align: top;
}

.comparison-table thead th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.comparison-table tbody th {
  width: 160px;
  font-weight: 650;
}

.comparison-table tbody th a {
  color: var(--accent);
  text-decoration: none;
}

.comparison-table tbody th a:hover {
  text-decoration: underline;
}

.comparison-table tr:last-child th,
.comparison-table tr:last-child td {
  border-bottom: 0;
}

.checklist-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.checklist-panel {
  position: sticky;
  top: 88px;
}

.checklist-output {
  display: grid;
  gap: 24px;
}

.checklist-block h2 {
  margin: 5px 0 12px;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.3;
}

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

.question-list li {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  padding: 13px 14px;
}

.script-box {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 14px;
  white-space: pre-wrap;
}

.copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.feedback-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.feedback-form .full {
  grid-column: 1 / -1;
}

.feedback-form button {
  justify-self: start;
}

.form-note {
  margin: 0;
  color: var(--muted);
  align-self: center;
}

.hp-field {
  position: absolute;
  left: -9999px;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #fff;
}

.footer-grid {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-grid span {
  color: var(--text);
  font-weight: 650;
  margin-right: auto;
}

.footer-grid a {
  color: var(--muted);
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--accent);
}

.page-head {
  padding: 46px 0 22px;
}

.page-head h1 {
  margin: 8px 0 10px;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 650;
  line-height: 1.12;
}

.page-head p {
  max-width: 780px;
  color: var(--muted);
}

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

@media (max-width: 900px) {
  .hero-grid,
  .app-grid,
  .action-grid,
  .checklist-grid,
  .two-column,
  .feedback-grid,
  .metrics-grid,
  .directory-grid,
  .source-grid {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
  }

  .checklist-panel {
    position: static;
  }

  .hero-media {
    order: -1;
  }
}

@media (max-width: 1080px) and (min-width: 901px) {
  .action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .header-inner {
    min-height: auto;
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 10px 0 9px;
  }

  .brand {
    width: 100%;
    font-size: 14px;
  }

  .nav {
    width: 100%;
    margin-inline: -6px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    padding-inline: 9px;
    font-size: 13px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-copy h1 {
    font-size: 31px;
    font-weight: 620;
    line-height: 1.13;
  }

  .page-head h1 {
    font-size: 32px;
    font-weight: 620;
  }

  .lead {
    font-size: 16px;
  }

  .program-facts,
  .feedback-form {
    grid-template-columns: 1fr;
  }

  .button,
  .hero-actions .button,
  .program-actions .button {
    width: 100%;
  }

  .comparison-table {
    min-width: 0;
  }

  .comparison-table thead {
    display: none;
  }

  .comparison-table,
  .comparison-table tbody,
  .comparison-table tr,
  .comparison-table th,
  .comparison-table td {
    display: block;
  }

  .comparison-table tr {
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
  }

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

  .comparison-table th,
  .comparison-table td {
    border-bottom: 0;
  }

  .comparison-table tbody th {
    width: auto;
    padding: 8px 16px 6px;
    font-size: 18px;
  }

  .comparison-table td {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 12px;
    padding: 7px 16px;
  }

  .comparison-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .site-footer,
  .page-head,
  .checklist-panel,
  .copy-row,
  .hero-actions,
  .source-note {
    display: none !important;
  }

  .container {
    width: 100%;
  }

  .section {
    padding: 0;
  }

  .checklist-grid {
    display: block;
  }

  .results-panel,
  .plain-panel,
  .program-card,
  .source-card,
  .comparison-table-wrap {
    border: 0;
    box-shadow: none;
  }

  .results-panel {
    padding: 0;
  }

  .checklist-block {
    break-inside: avoid;
  }

  .question-list li,
  .script-box {
    border-color: #999;
  }
}
