
:root {
  --bg: #f5f9fd;
  --surface: #ffffff;
  --surface-soft: #f0f6fc;
  --line: #d9e6f2;
  --text: #18324a;
  --muted: #5f7488;
  --brand: #0e67b2;
  --brand-strong: #0a4f89;
  --brand-soft: #e8f3fb;
  --accent: #23a1d8;
  --success: #0f8c6b;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(11, 45, 77, .08);
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fbfe 0%, #f3f8fc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  line-height: 1.75;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.container {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(217, 230, 242, .9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

/* ロゴなし: brand-mark非表示 */
.brand-mark { display: none; }

.brand-copy strong { display: block; font-size: 15px; color: var(--text); }
.brand-copy span { display: block; font-size: 12px; color: var(--muted); }

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
}

.top-nav a {
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  transition: background .15s;
}

.top-nav a:hover {
  background: var(--brand-soft);
  color: var(--brand);
  text-decoration: none;
}

.top-nav a.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

/* ===== HERO (TOP PAGE) ===== */
.hero { padding: 56px 0 28px; }

.hero-panel {
  display: grid;
  grid-template-columns: 1.45fr .95fr;
  gap: 22px;
  align-items: stretch;
}

.hero-card,
.panel,
.card,
.stat,
.list-card,
.doc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy { padding: 34px; }

.hero-copy .kicker,
.section-kicker,
.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.2;
}

.hero-copy p.lead {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.hero-meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
}

.hero-side {
  padding: 26px;
  background: linear-gradient(160deg, #0e67b2 0%, #0a4f89 100%);
  color: #fff;
  border-radius: var(--radius);
}

.hero-side h2 { margin-top: 0; font-size: 22px; }
.hero-side p, .hero-side li { opacity: .96; }
.hero-side ul { padding-left: 18px; }

.search-box {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box input,
.filter-select {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  transition: border-color .15s;
}

.search-box input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--brand);
}

.search-box input { max-width: 540px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}

.btn:hover {
  background: var(--brand-strong);
  text-decoration: none;
}

.btn.secondary {
  background: #fff;
  color: var(--brand);
  border: 1px solid rgba(255, 255, 255, .35);
}

/* ===== SECTIONS ===== */
.section { padding: 26px 0; }

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

.section-head h2 { margin: 0; font-size: 26px; }
.section-head p { margin: 6px 0 0; color: var(--muted); }

/* ===== GRID ===== */
.grid { display: grid; gap: 18px; }
.grid.cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ===== CARDS ===== */
.card,
.list-card,
.doc-card,
.panel {
  padding: 22px;
}

.card h3,
.list-card h3,
.doc-card h3,
.panel h3 {
  margin: 0 0 8px;
}

.card p,
.list-card p,
.doc-card p,
.panel p {
  margin: 0;
  color: var(--muted);
}

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  background: #eef6fd;
  color: #31597c;
  border: 1px solid #d7e6f4;
}

.card a.stretched,
.list-card a.stretched {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card a.stretched:hover,
.list-card a.stretched:hover {
  text-decoration: none;
}

.card:hover,
.list-card:hover,
.doc-card:hover {
  border-color: #b8d4eb;
  transform: translateY(-2px);
  transition: all .18s ease;
  box-shadow: 0 14px 36px rgba(11, 45, 77, .12);
}

/* ===== PAGE HERO ===== */
.page-hero { padding: 36px 0 12px; }
.page-hero p { margin: 8px 0 0; color: var(--muted); }

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
  padding-top: 18px;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }

/* ===== CONTENT LAYOUT ===== */
.content-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  margin-top: 20px;
}

.sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
}

.filter-group { padding: 18px; }
.filter-group h3 { margin: 0 0 12px; font-size: 16px; }
.filter-group label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 6px;
}

.list-stack { display: grid; gap: 16px; }

/* ===== STAT ===== */
.stat-wrap {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat { padding: 18px; }
.stat strong { display: block; font-size: 28px; color: var(--brand-strong); }
.stat span { font-size: 13px; color: var(--muted); }

/* ===== DETAIL SHELL ===== */
.detail-shell {
  display: grid;
  gap: 22px;
  grid-template-columns: 1.5fr .9fr;
}

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

.key-item {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.key-item strong { display: block; font-size: 13px; margin-bottom: 4px; }
.table-like { display: grid; gap: 10px; }

/* ===== FOOTER ===== */
.site-footer {
  margin-top: 34px;
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* ===== PROSE ===== */
.prose p,
.prose li { color: var(--muted); }
.prose h2,
.prose h3 { margin-top: 28px; }

/* ===== NOTICE ===== */
.notice {
  padding: 14px 16px;
  border-left: 4px solid var(--brand);
  background: #edf6fd;
  border-radius: 0 14px 14px 0;
  color: var(--text);
}

/* ===== UTILS ===== */
.small { font-size: 13px; color: var(--muted); }

/* ===== CARD ICON ===== */
.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.card-icon svg {
  width: 30px;
  height: 30px;
  color: var(--brand);
  stroke: var(--brand);
  fill: none;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.card-header-text {
  flex: 1;
  min-width: 0;
}

/* ===== LINK BADGES (disease / feature cross-links) ===== */
.link-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.link-badge-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  width: 100%;
  margin-bottom: 2px;
}

.link-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-soft);
  color: var(--brand-strong);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .12s;
  cursor: pointer;
}

.link-badge:hover {
  background: var(--brand-soft);
  border-color: #a8cde8;
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--brand-strong);
}

.link-badge svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  opacity: .7;
}

/* disease badge colour variations */
.link-badge.d-af        { background:#eef6fd; border-color:#c5dff4; }
.link-badge.d-heart_failure { background:#fef0f0; border-color:#f4c3c3; color:#7a2222; }
.link-badge.d-hypertension  { background:#fff4e6; border-color:#f4d5a0; color:#7a4c00; }
.link-badge.d-depression    { background:#f3eeff; border-color:#c9b8f0; color:#4a2a8a; }
.link-badge.d-mci           { background:#e8f9f3; border-color:#b0e0ca; color:#1a5e40; }
.link-badge.d-sleep_apnea   { background:#e8f4ff; border-color:#a8d4f0; color:#1a3e6a; }
.link-badge.d-diabetes      { background:#fff8e6; border-color:#f4e090; color:#6a4800; }
.link-badge.d-cancer_fatigue{ background:#f4f4f4; border-color:#c8c8c8; color:#444; }

/* feature badge */
.link-badge.feat { background:#eef6fd; border-color:#c0d8ee; color:#1a4060; }
.link-badge.feat:hover { background: var(--brand-soft); }

/* ===== MOBILE NAV TOGGLE ===== */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .hero-panel,
  .content-layout,
  .detail-shell {
    grid-template-columns: 1fr;
  }

  .sidebar { position: static; }
}

@media (max-width: 680px) {
  .nav-toggle { display: flex; align-items: center; gap: 6px; }

  .top-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 12px 20px;
    gap: 4px;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
  }

  .top-nav.open { display: flex; }

  .top-nav a { padding: 10px 12px; }

  .header-inner { position: relative; }

  .hero-copy { padding: 22px; }
  .hero-copy h1 { font-size: 28px; }
}
