:root {
  --bg: #f6f8f5;
  --surface: #ffffff;
  --surface-muted: #eef4f1;
  --text: #17201d;
  --muted: #65716b;
  --line: #dfe7e1;
  --primary: #0f7c72;
  --primary-dark: #095b54;
  --accent: #d58b2a;
  --accent-soft: #fff2df;
  --shadow: 0 18px 50px rgba(22, 33, 29, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 64px);
  background: rgba(246, 248, 245, 0.92);
  border-bottom: 1px solid rgba(223, 231, 225, 0.86);
  backdrop-filter: blur(14px);
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.site-nav a:hover {
  color: var(--primary);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 70px);
  padding: clamp(48px, 7vw, 92px) clamp(20px, 5vw, 64px) clamp(36px, 5vw, 72px);
}

.hero-copy {
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

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

h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.25;
}

h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.lead {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

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

.button.secondary {
  background: #fff;
}

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

.hero-stats div {
  padding: 14px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-stats dt {
  font-size: 22px;
  font-weight: 900;
}

.hero-stats dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-media {
  margin: 0;
}

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

.section {
  padding: clamp(48px, 7vw, 86px) clamp(20px, 5vw, 64px);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-heading p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
}

.diagnosis-section {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.diagnosis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.82fr);
  gap: 24px;
  align-items: start;
}

.diagnosis-form,
.result-panel,
.type-grid article,
.disclosure {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(22, 33, 29, 0.06);
}

.diagnosis-form {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 3vw, 32px);
}

.field {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.field span,
.field legend {
  color: #2d3934;
  font-weight: 800;
}

select,
input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--text);
  background: #fff;
  border: 1px solid #cfdad3;
  border-radius: 8px;
  font: inherit;
}

select:focus,
input:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(15, 124, 114, 0.24);
  outline-offset: 3px;
}

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

.choice-grid label {
  display: flex;
  align-items: center;
  min-height: 48px;
  gap: 9px;
  padding: 10px 12px;
  background: #fbfcfb;
  border: 1px solid #dce5df;
  border-radius: 8px;
  font-weight: 700;
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--primary);
}

.submit-button {
  width: 100%;
  margin-top: 4px;
  font-size: 16px;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.result-panel {
  position: sticky;
  top: 96px;
  min-height: 430px;
  padding: clamp(20px, 3vw, 32px);
}

.result-panel h2 {
  font-size: clamp(24px, 3vw, 34px);
}

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

.result-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  margin: 0 0 14px;
  color: #7a4807;
  background: var(--accent-soft);
  border: 1px solid #f0d2a9;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

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

.result-list li {
  padding: 12px 14px;
  background: var(--surface-muted);
  border-radius: 8px;
  color: #28352f;
  font-weight: 700;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 2px;
}

.result-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: var(--primary-dark);
  background: #e6f3ef;
  border: 1px solid #cde4dd;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.affiliate-box {
  margin-top: 18px;
  padding: 16px;
  background: #16211d;
  color: #f6f8f5;
  border-radius: 8px;
}

.affiliate-box strong {
  display: block;
  margin-bottom: 6px;
}

.affiliate-box p {
  margin: 0;
  color: #d4ddd8;
  font-size: 14px;
}

.affiliate-box small {
  display: block;
  margin-top: 12px;
  color: #b8c6c0;
  font-size: 12px;
  line-height: 1.6;
}

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

.service-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  color: #17201d;
  background: #f6f8f5;
  border: 1px solid #dce5df;
  border-radius: 8px;
}

.service-card:hover {
  border-color: #8fc8bd;
  transform: translateY(-1px);
}

.service-card span {
  width: fit-content;
  padding: 2px 8px;
  color: var(--primary-dark);
  background: #dff0ec;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.service-card strong {
  margin: 0;
  color: #17201d;
  font-size: 16px;
}

.service-card p {
  color: #53635c;
  font-size: 13px;
}

.service-card em {
  color: var(--primary);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

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

.type-grid article {
  padding: 20px;
}

.type-grid p {
  margin: 0;
  color: var(--muted);
}

.articles-section {
  background: #17201d;
  color: #fff;
}

.articles-section .eyebrow {
  color: #8fd9cf;
}

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

.article-list a {
  display: flex;
  align-items: center;
  min-height: 96px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  font-weight: 800;
}

.article-list a:hover {
  background: rgba(255, 255, 255, 0.14);
}

.article-more-button {
  width: fit-content;
  margin-top: 22px;
  color: #17201d;
  background: #fff;
}

.article-hero {
  padding: clamp(52px, 8vw, 112px) clamp(20px, 5vw, 64px) clamp(36px, 6vw, 72px);
  background: #17201d;
  color: #fff;
}

.article-hero .eyebrow {
  color: #8fd9cf;
}

.article-hero .lead {
  max-width: 860px;
  color: #d4ddd8;
}

.article-library-section {
  background: var(--surface);
}

.article-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.filter-button {
  min-height: 40px;
  padding: 0 14px;
  color: var(--primary-dark);
  background: #e6f3ef;
  border: 1px solid #cde4dd;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.article-count {
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 800;
}

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

.article-card {
  display: grid;
  gap: 10px;
  min-height: 238px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(22, 33, 29, 0.06);
}

.article-card:hover {
  border-color: #9ccdc5;
  transform: translateY(-1px);
}

.article-card span,
.article-meta span {
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  color: var(--primary-dark);
  background: #e6f3ef;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.article-card h2 {
  font-size: 21px;
}

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

.article-card small {
  align-self: end;
  color: var(--muted);
  font-weight: 800;
}

.article-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) clamp(20px, 5vw, 40px);
}

.article-detail-header {
  margin-bottom: 36px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--primary);
  font-weight: 900;
}

.article-detail section,
.article-cta {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.article-body {
  display: grid;
  gap: 18px;
}

.article-body h2 {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.article-body ul {
  display: grid;
  gap: 10px;
  padding-left: 24px;
}

.article-link-note {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.article-detail section h2,
.article-body h2,
.article-cta h2 {
  font-size: clamp(24px, 3vw, 32px);
}

.article-detail p,
.article-detail li {
  color: #3d4a44;
  font-size: 17px;
}

.article-detail ol {
  display: grid;
  gap: 10px;
  padding-left: 24px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.article-cta {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(22, 33, 29, 0.06);
}

.ad-slot {
  display: grid;
  place-items: center;
  min-height: 96px;
  margin: 0 auto 28px;
  padding: 18px;
  color: #63716b;
  background: #f3f7f5;
  border: 1px dashed #bfd1ca;
  border-radius: 8px;
  text-align: center;
}

.ad-slot span {
  font-size: 12px;
  font-weight: 900;
}

.ad-slot strong {
  display: block;
  color: #394842;
  font-size: 14px;
}

.ad-slot-wide {
  max-width: 970px;
}

.legal-page {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(44px, 7vw, 86px) clamp(20px, 5vw, 40px);
}

.legal-page section {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.legal-page p,
.legal-page li {
  color: #3d4a44;
  font-size: 17px;
}

.legal-page a {
  color: var(--primary);
  font-weight: 800;
}

.legal-updated {
  margin-top: 32px;
  color: var(--muted);
  font-size: 14px;
}

.disclosure {
  max-width: 980px;
  margin: clamp(36px, 5vw, 72px) auto;
  padding: clamp(20px, 3vw, 32px);
}

.disclosure h2 {
  font-size: 24px;
}

.disclosure p {
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  padding: 24px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 18px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 800;
}

.footer-nav a:hover {
  color: var(--primary);
}

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

  .hero {
    min-height: auto;
  }

  .hero-media {
    order: -1;
  }

  .result-panel {
    position: static;
  }

  .type-grid,
  .article-list,
  .article-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero-stats,
  .choice-grid,
  .type-grid,
  .article-list,
  .article-card-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}
