/* ============================================================
   breath-analysis.jp — design system
   温かいコミュニティ調 / warm research-community tone
   丸岡貴司 運営コミュニティ
   ============================================================ */

:root {
  /* --- warm palette --- */
  --c-ink:        #33302b;   /* warm near-black */
  --c-ink-2:      #4c463d;
  --c-ink-3:      #635b4f;
  --c-mute:       #8c8375;
  --c-mute-2:     #a79d8d;
  --c-line:       #e5ddce;
  --c-line-2:     #efe8db;
  --c-bg:         #fbf7f0;   /* warm cream */
  --c-bg-soft:    #f4ecdd;   /* deeper sand */
  --c-bg-card:    #fffdf9;
  --c-bg-ink:     #2b2822;   /* footer warm brown-black */

  --c-primary:    #2f6f5f;   /* warm forest-teal */
  --c-primary-2:  #255a4d;
  --c-primary-3:  #3a8574;
  --c-accent:     #c26a43;   /* terracotta */
  --c-accent-2:   #a9552f;
  --c-amber:      #d79a3f;
  --c-ok:         #3f7d54;
  --c-soft-green: #eef3ea;

  /* attention scale (旧 threat) — warm, not alarming */
  --a-5:          #b8532e;   /* terracotta, strong */
  --a-4:          #cf7a3a;
  --a-3:          #d9a441;   /* amber */
  --a-2:          #9bab6a;   /* olive */
  --a-1:          #b7ad97;   /* sand */

  --c-tier-1:     #a9552f;
  --c-tier-2:     #b78a2e;
  --c-tier-3:     #6f7d64;

  /* --- type --- */
  --f-sans:  "Noto Sans JP", "Yu Gothic", "Hiragino Sans", "Meiryo", system-ui, sans-serif;
  --f-serif: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", "MS Mincho", serif;
  --f-mono:  "JetBrains Mono", "Menlo", "Consolas", monospace;

  /* --- radius / shadow (soft) --- */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --sh-sm: 0 1px 2px rgba(80,64,40,.05), 0 2px 6px rgba(80,64,40,.05);
  --sh-md: 0 6px 18px -6px rgba(80,64,40,.16);
  --sh-lg: 0 24px 48px -20px rgba(60,46,26,.32);

  --wrap: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-sans);
  color: var(--c-ink);
  background: var(--c-bg);
  font-feature-settings: "palt";
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--c-accent-2); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 { color: var(--c-ink); font-family: var(--f-serif); font-weight: 700; letter-spacing: .01em; }
h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); line-height: 1.4; margin: 0 0 .5em; }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.85rem); line-height: 1.45; margin: 0 0 .5em; }
h3 { font-size: 1.18rem; line-height: 1.5; margin: 0 0 .4em; }
h4 { font-size: 1rem; }
p  { margin: 0 0 1em; }
hr { border: 0; height: 1px; background: var(--c-line); margin: 3rem 0; }
code { font-family: var(--f-mono); font-size: .88em; background: var(--c-bg-soft); padding: .12em .4em; border-radius: 4px; }
::selection { background: rgba(194,106,67,.22); }

/* ----- layout helpers ----- */
.wrap    { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-sm { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.section { padding: 76px 0; }
.section-sm { padding: 44px 0; }
.section.alt { background: var(--c-bg-soft); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-sans);
  font-size: .82rem; font-weight: 700; letter-spacing: .04em;
  color: var(--c-accent-2);
  margin-bottom: .9rem;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; background: var(--c-accent); border-radius: 2px;
}
.section-lead { color: var(--c-ink-3); max-width: 720px; margin-bottom: 2.4rem; font-size: 1.04rem; }

/* ----- header ----- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251,247,240,.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-line);
}
.site-header .inner {
  max-width: var(--wrap); margin: 0 auto; padding: 13px 24px;
  display: flex; align-items: center; gap: 30px;
}
.site-logo {
  font-family: var(--f-serif);
  font-weight: 700; font-size: 1.08rem; letter-spacing: .01em;
  color: var(--c-ink); display: flex; align-items: center; gap: 10px; white-space: nowrap;
}
.site-logo .mark {
  width: 34px; height: 34px;
  background: var(--c-primary);
  border-radius: 10px;
  display: grid; place-items: center;
  color: #fdf6e9;
  box-shadow: 0 2px 5px -1px rgba(37,90,77,.4);
}
.site-logo .mark svg { width: 21px; height: 21px; display: block; }
.site-logo .sub {
  font-family: var(--f-sans);
  font-weight: 500; color: var(--c-mute); font-size: .74rem; letter-spacing: .02em; margin-left: 4px;
}
nav.main-nav { display: flex; gap: 20px; flex: 1; }
nav.main-nav a {
  color: var(--c-ink-2); font-size: .92rem; font-weight: 600; padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
nav.main-nav a:hover { color: var(--c-primary); border-bottom-color: var(--c-accent); text-decoration: none; }
nav.main-nav a.active { color: var(--c-primary); border-bottom-color: var(--c-primary); }
.header-utils { display: flex; gap: 10px; align-items: center; }
.header-utils .lang {
  font-size: .8rem; color: var(--c-mute); padding: 4px 10px;
  border: 1px solid var(--c-line); border-radius: 999px;
}
.header-utils .lang:hover { color: var(--c-primary); border-color: var(--c-primary); text-decoration: none; }
.hamburger { display: none; border: 0; background: transparent; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.hamburger span { display: block; height: 2px; background: var(--c-ink); margin: 4px 0; border-radius: 2px; transition: transform .2s ease; }

/* ----- buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; font-weight: 700; font-size: .95rem; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; transition: all .15s ease; text-decoration: none; line-height: 1.2;
}
.btn-primary { background: var(--c-primary); color: #fdf6e9; }
.btn-primary:hover { background: var(--c-primary-2); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn-outline:hover { background: rgba(47,111,95,.07); color: var(--c-primary-2); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--c-ink-2); border: 1px solid var(--c-line); }
.btn-ghost:hover { background: var(--c-bg-soft); text-decoration: none; }
.btn-accent { background: var(--c-accent); color: #fff; }
.btn-accent:hover { background: var(--c-accent-2); color: #fff; text-decoration: none; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ----- hero ----- */
.hero {
  position: relative;
  background:
    radial-gradient(circle at 88% 8%, rgba(215,154,63,.10), transparent 42%),
    radial-gradient(circle at 6% 96%, rgba(47,111,95,.08), transparent 40%),
    var(--c-bg);
  padding: 78px 0 58px;
  overflow: hidden;
  border-bottom: 1px solid var(--c-line);
}
.hero .inner { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; position: relative; }
.hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.4; margin-bottom: .5em; }
.hero h1 strong {
  color: var(--c-accent-2); font-weight: 700;
  background: linear-gradient(180deg, transparent 66%, rgba(215,154,63,.32) 66%);
  padding: 0 .06em;
}
.hero .lead { max-width: 660px; font-size: 1.08rem; color: var(--c-ink-2); margin-bottom: 2rem; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 3.2rem; }
.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0;
  max-width: 880px;
  background: var(--c-bg-card);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}
.stat-card { padding: 22px 24px; border-right: 1px solid var(--c-line-2); }
.stat-card:last-child { border-right: 0; }
.stat-card .num { font-family: var(--f-serif); font-size: 2.1rem; font-weight: 700; color: var(--c-primary); line-height: 1; margin-bottom: 8px; font-feature-settings: "tnum"; }
.stat-card .num .small { font-size: .95rem; color: var(--c-mute); font-weight: 600; }
.stat-card .lbl { font-size: .85rem; color: var(--c-ink-3); font-weight: 600; }
@media (max-width: 640px){ .stat-card { border-right: 0; border-bottom: 1px solid var(--c-line-2); } .stat-card:last-child{ border-bottom:0; } }

/* ----- grid cards ----- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.card-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 960px) { .card-3 { grid-template-columns: 1fr 1fr; } .card-2 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .card-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--c-bg-card);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: 26px 26px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  height: 100%; display: flex; flex-direction: column;
}
.card:hover { border-color: var(--c-primary-3); box-shadow: var(--sh-md); transform: translateY(-2px); }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--c-ink-3); font-size: .96rem; }
.card .meta { color: var(--c-mute); font-size: .82rem; margin-top: auto; padding-top: 14px; font-family: var(--f-sans); }
/* small labeled marker instead of gradient app-icon */
.card .kicker {
  display: inline-block; font-family: var(--f-sans); font-size: .74rem; font-weight: 700;
  letter-spacing: .06em; color: var(--c-accent-2); margin-bottom: 12px;
}
.card .ico {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(150deg, #fff, var(--c-soft-green));
  color: var(--c-accent);
  display: grid; place-items: center; font-family: var(--f-serif); font-weight: 700; font-size: 1.2rem; margin-bottom: 18px;
  border: 1px solid rgba(194,106,67,.22);
  box-shadow: 0 3px 8px -4px rgba(169,85,47,.4);
}
.card .ico svg { width: 25px; height: 25px; display: block; stroke: var(--c-accent); }
/* knowledge numbered tiles: serif numerals in warm tile */
.card .ico.num { color: var(--c-accent-2); font-family: var(--f-serif); }

/* ----- badges / tags ----- */
.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; }
.badge-tier-1 { background: rgba(169,85,47,.12); color: var(--c-tier-1); }
.badge-tier-2 { background: rgba(183,138,46,.16); color: #90701f; }
.badge-tier-3 { background: rgba(111,125,100,.16); color: #566349; }
.badge-v2 { background: rgba(63,125,84,.15); color: var(--c-ok); margin-left: 6px; }
.badge-country { background: var(--c-bg-soft); color: var(--c-ink-3); }

/* attention dots (旧 threat-*) — warm scale */
.threat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin-right: 6px; }
.threat-5, .attn-5 { background: var(--a-5); }
.threat-4, .attn-4 { background: var(--a-4); }
.threat-3, .attn-3 { background: var(--a-3); }
.threat-2, .attn-2 { background: var(--a-2); }
.threat-1, .attn-1 { background: var(--a-1); }

/* ----- tables ----- */
.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; background: var(--c-bg-card); }
.tbl th, .tbl td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--c-line-2); vertical-align: top; }
.tbl thead th { background: var(--c-bg-soft); color: var(--c-ink-2); font-family: var(--f-sans); font-weight: 700; font-size: .84rem; letter-spacing: .02em; border-bottom: 2px solid var(--c-line); }
.tbl tbody tr:hover { background: rgba(244,236,221,.6); }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--c-line); border-radius: var(--r-md); }

/* ----- footer ----- */
.site-footer { background: var(--c-bg-ink); color: #d8cdb8; padding: 58px 0 30px; margin-top: 84px; font-size: .93rem; }
.site-footer a { color: #d8cdb8; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #f4ecdd; font-family: var(--f-sans); font-size: .82rem; letter-spacing: .06em; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; font-size: .92rem; }
.site-footer .site-logo { color: #f4ecdd; }
.site-footer .site-logo .mark { background: var(--c-accent); color: #fff; }
.site-footer .brand-bottom {
  max-width: var(--wrap); margin: 40px auto 0; padding: 20px 24px 0;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; color: #a99e88; font-size: .82rem;
}

/* ----- page header (secondary pages) ----- */
.page-head { padding: 60px 0 34px; background: var(--c-bg-soft); border-bottom: 1px solid var(--c-line); }
.page-head h1 { margin-bottom: .3em; }
.page-head .lead { color: var(--c-ink-2); max-width: 800px; }
.breadcrumbs { font-size: .84rem; color: var(--c-mute); margin-bottom: 1.2rem; font-family: var(--f-sans); }
.breadcrumbs a { color: var(--c-mute); }
.breadcrumbs a:hover { color: var(--c-primary); }

/* work-in-progress (作成中 / 工事中) markers */
.wip-badge, .tag-soon {
  display: inline-block; font-family: var(--f-sans); font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  color: #8a6a15; background: rgba(215,154,63,.18); border: 1px solid rgba(215,154,63,.5);
  padding: 2px 10px; border-radius: 999px; text-transform: none;
}
.wip-badge::before { content: "🚧 "; }
.card.wip { border-style: dashed; background: var(--c-bg-soft); cursor: default; }
.card.wip:hover { transform: none; box-shadow: none; border-color: var(--c-line); }
.card.wip h3 { color: var(--c-ink-3); }
.card.wip .ico { opacity: .55; }
.wip-note {
  border: 1px dashed var(--c-line); border-left: 3px solid var(--c-amber);
  background: var(--c-bg-soft); border-radius: var(--r-sm); padding: 14px 18px; margin: 0 0 22px;
  color: var(--c-ink-2); font-size: .94rem;
}
.wip-note strong { color: #8a6a15; }

/* segment switch (二軸: 呼気分析 / 疾患スクリーニング) */
.seg-switch { display:inline-flex; background:var(--c-bg-soft); border:1px solid var(--c-line); border-radius:999px; padding:4px; gap:4px; margin-bottom:6px; flex-wrap:wrap; }
.seg-switch button { border:0; background:transparent; padding:9px 18px; border-radius:999px; font-family:var(--f-sans); font-weight:700; font-size:.9rem; color:var(--c-ink-3); cursor:pointer; display:inline-flex; align-items:center; gap:8px; }
.seg-switch button:hover { color:var(--c-primary); }
.seg-switch button.active { background:var(--c-primary); color:#fdf6e9; }
.seg-switch button .c { font-size:.76rem; font-weight:600; opacity:.85; }
.seg-note { font-size:.86rem; color:var(--c-ink-3); margin:0 0 22px; max-width:760px; }

.axis-tag { display:inline-block; font-size:.72rem; font-weight:700; padding:2px 9px; border-radius:999px; letter-spacing:.02em; }
.axis-breath { background:rgba(47,111,95,.13); color:var(--c-primary-2); }
.axis-screen { background:rgba(183,138,46,.17); color:#8a6a15; }

/* ============== DATABASE / directory pages ============== */
.db-toolbar { background: var(--c-bg-card); border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 20px 22px; margin-bottom: 26px; box-shadow: var(--sh-sm); }
.db-search { display: flex; gap: 10px; margin-bottom: 16px; }
.db-search input { flex: 1; padding: 12px 14px; font-size: 1rem; font-family: inherit; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-bg); }
.db-search input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(47,111,95,.14); background: #fff; }
.db-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.db-filters label { font-size: .8rem; font-weight: 700; color: var(--c-ink-3); display: block; margin-bottom: 4px; font-family: var(--f-sans); }
.db-filters select, .db-filters input[type=number] { width: 100%; padding: 9px 10px; font-size: .92rem; font-family: inherit; border: 1px solid var(--c-line); border-radius: var(--r-sm); background: var(--c-bg); }
.db-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.db-chip { padding: 4px 11px 4px 12px; border-radius: 999px; background: var(--c-bg-soft); color: var(--c-ink-3); font-size: .8rem; display: inline-flex; align-items: center; gap: 6px; }
.db-chip button { background: transparent; border: 0; cursor: pointer; color: var(--c-mute); font-size: 1rem; line-height: 1; padding: 0; }
.db-chip button:hover { color: var(--c-accent-2); }

.db-result-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: .92rem; color: var(--c-ink-3); flex-wrap: wrap; gap: 12px; }
.db-result-bar .count { font-family: var(--f-serif); font-weight: 700; color: var(--c-ink); font-size: 1.15rem; }
.db-view-toggle { display: flex; gap: 0; border: 1px solid var(--c-line); border-radius: 999px; overflow: hidden; }
.db-view-toggle button { background: var(--c-bg-card); border: 0; padding: 7px 16px; font-size: .85rem; font-weight: 600; cursor: pointer; color: var(--c-ink-3); }
.db-view-toggle button.active { background: var(--c-primary); color: #fdf6e9; }

.db-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.org-card { background: var(--c-bg-card); border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 18px 20px; cursor: pointer; transition: all .15s ease; display: flex; flex-direction: column; min-height: 176px; }
.org-card:hover { border-color: var(--c-primary); box-shadow: var(--sh-md); transform: translateY(-2px); }
.org-card .head { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 10px; }
.org-card .name { font-family: var(--f-serif); font-weight: 700; color: var(--c-ink); font-size: 1.04rem; line-height: 1.4; margin: 0; }
.org-card .meta-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .78rem; color: var(--c-mute); margin-bottom: 10px; }
.org-card .tech { font-size: .88rem; color: var(--c-ink-3); line-height: 1.6; margin-bottom: 10px; flex: 1; }
.org-card .foot { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: var(--c-mute); border-top: 1px solid var(--c-line-2); padding-top: 10px; }

/* ----- modal ----- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(43,40,34,.5); display: none; z-index: 100; padding: 24px; overflow-y: auto; }
.modal-backdrop.open { display: block; }
.modal { background: var(--c-bg-card); max-width: 880px; margin: 40px auto; border-radius: var(--r-md); box-shadow: var(--sh-lg); overflow: hidden; }
.modal-head { padding: 22px 28px 18px; border-bottom: 1px solid var(--c-line); display: flex; justify-content: space-between; align-items: start; gap: 16px; background: var(--c-bg-soft); }
.modal-head h2 { margin: 0 0 6px; font-size: 1.4rem; }
.modal-head .meta-line { font-size: .88rem; color: var(--c-mute); font-family: var(--f-sans); }
.modal-close { background: transparent; border: 0; font-size: 1.5rem; color: var(--c-mute); cursor: pointer; padding: 4px 8px; }
.modal-close:hover { color: var(--c-ink); }
.modal-body { padding: 24px 28px 30px; }
.modal-section { margin-bottom: 22px; }
.modal-section h3 { font-size: 1rem; color: var(--c-ink-2); margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--c-line-2); }
.modal-kv { display: grid; grid-template-columns: 170px 1fr; gap: 10px 18px; font-size: .93rem; }
.modal-kv dt { color: var(--c-mute); font-weight: 600; font-family: var(--f-sans); }
.modal-kv dd { margin: 0; color: var(--c-ink-2); }
.swot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.swot-box { padding: 12px 14px; border-radius: var(--r-sm); font-size: .9rem; line-height: 1.6; }
.swot-s { background: #eef3ea; color: #35543a; }
.swot-w { background: #f8eee2; color: #7a4a1c; }
.swot-o { background: #eaf0f0; color: #2b5a52; }
.swot-t { background: #f6e9e2; color: #8a4126; }
.swot-box strong { display: block; font-family: var(--f-sans); font-size: .74rem; letter-spacing: .05em; margin-bottom: 4px; }

/* ----- knowledge / article styles ----- */
.article { max-width: 780px; margin: 0 auto; }
.article h2 { margin-top: 2.2em; padding-bottom: .3em; border-bottom: 2px solid var(--c-line); }
.article h3 { margin-top: 1.6em; color: var(--c-accent-2); }
.article ul, .article ol { padding-left: 1.4em; margin-bottom: 1em; }
.article li { margin-bottom: .5em; color: var(--c-ink-2); }
.article blockquote { border-left: 3px solid var(--c-accent); padding: .6em 1.2em; margin: 1.4em 0; background: var(--c-bg-soft); color: var(--c-ink-3); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: .96rem; }
.article .callout { border: 1px solid var(--c-line); border-left: 3px solid var(--c-primary); background: var(--c-bg-card); border-radius: var(--r-sm); padding: 16px 20px; margin: 1.6em 0; }
.article .callout strong { color: var(--c-primary); }

/* ----- news list ----- */
.news-item { padding: 22px 0; border-bottom: 1px solid var(--c-line-2); display: grid; grid-template-columns: 110px 1fr; gap: 28px; align-items: start; }
.news-item time { color: var(--c-mute); font-size: .88rem; font-variant-numeric: tabular-nums; font-family: var(--f-sans); }
.news-item h3 { margin: 0 0 .25em; font-size: 1.1rem; }
.news-item h3 a { color: var(--c-ink); }
.news-item .tag { font-size: .72rem; color: var(--c-accent-2); font-weight: 700; letter-spacing: .04em; margin-bottom: 6px; display: inline-block; font-family: var(--f-sans); }
.news-item p { color: var(--c-ink-3); font-size: .95rem; margin: 0; }
@media (max-width: 640px) { .news-item { grid-template-columns: 1fr; gap: 6px; } }

/* ----- resource list ----- */
.res-list .item { background: var(--c-bg-card); border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 22px 24px; margin-bottom: 14px; display: grid; grid-template-columns: 90px 1fr auto; gap: 20px; align-items: center; }
.res-list .item .tag { font-size: .72rem; color: var(--c-ink-3); font-weight: 700; letter-spacing: .04em; padding: 5px 9px; background: var(--c-bg-soft); border-radius: 999px; text-align: center; font-family: var(--f-sans); }
.res-list .item h3 { margin: 0 0 4px; font-size: 1.05rem; }
.res-list .item p { color: var(--c-ink-3); font-size: .92rem; margin: 0; }
@media (max-width: 640px) { .res-list .item { grid-template-columns: 1fr; } }

/* ----- contact form ----- */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: .88rem; font-weight: 700; color: var(--c-ink-2); margin-bottom: 6px; font-family: var(--f-sans); }
.form-field input, .form-field select, .form-field textarea { width: 100%; padding: 11px 13px; font-size: .95rem; font-family: inherit; border: 1px solid var(--c-line); border-radius: var(--r-sm); background: var(--c-bg); }
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(47,111,95,.14); background:#fff; }

/* ----- mobile ----- */
@media (max-width: 820px) {
  .site-header .inner { gap: 14px; }
  .hamburger { display: block; }
  nav.main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--c-bg-card); flex-direction: column; gap: 0; padding: 6px 0; border-bottom: 1px solid var(--c-line); box-shadow: var(--sh-md); display: none; }
  nav.main-nav.open { display: flex; }
  nav.main-nav a { padding: 12px 24px; border-bottom: 1px solid var(--c-line-2); width: 100%; }
  nav.main-nav a:last-child { border-bottom: 0; }
  .site-logo .sub { display: none; }
  .hero { padding: 54px 0 40px; }
  .section { padding: 56px 0; }
  .modal { margin: 20px auto; }
  .modal-kv { grid-template-columns: 1fr; gap: 2px 0; }
  .modal-kv dt { margin-top: 10px; }
  .swot-grid { grid-template-columns: 1fr; }
}

/* utilities */
.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}.mt-4{margin-top:2rem}
.mb-1{margin-bottom:.5rem}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.5rem}.mb-4{margin-bottom:2rem}
.text-center{text-align:center}.text-mute{color:var(--c-mute)}.text-sm{font-size:.88rem}
.sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}

/* ============================================================
   2026 editorial redesign
   Scientific reference platform / restrained, publication-led UI
   ============================================================ */
:root {
  --c-ink: #17212b;
  --c-ink-2: #334250;
  --c-ink-3: #52616d;
  --c-mute: #71808c;
  --c-mute-2: #9aa5ad;
  --c-line: #d9e0e5;
  --c-line-2: #e8edf0;
  --c-bg: #f7f9fa;
  --c-bg-soft: #eef2f4;
  --c-bg-card: #ffffff;
  --c-bg-ink: #111c25;
  --c-primary: #075c66;
  --c-primary-2: #064850;
  --c-primary-3: #0d7480;
  --c-accent: #cf5d36;
  --c-accent-2: #ac4526;
  --c-amber: #b7852c;
  --c-ok: #28704a;
  --c-soft-green: #eaf1f1;
  --f-sans: "Noto Sans JP", "Yu Gothic", "Hiragino Sans", Meiryo, system-ui, sans-serif;
  --f-serif: "Noto Sans JP", "Yu Gothic", "Hiragino Sans", Meiryo, system-ui, sans-serif;
  --r-sm: 3px;
  --r-md: 5px;
  --r-lg: 8px;
  --sh-sm: 0 1px 1px rgba(17,28,37,.04);
  --sh-md: 0 12px 28px -22px rgba(17,28,37,.55);
  --sh-lg: 0 28px 70px -34px rgba(17,28,37,.55);
  --wrap: 1200px;
}

body { background: var(--c-bg-card); line-height: 1.78; letter-spacing: .008em; }
h1, h2, h3, h4 { letter-spacing: -.025em; }
h1 { font-weight: 700; }
h2 { font-weight: 700; }
a { transition: color .16s ease, border-color .16s ease, background-color .16s ease; }
:focus-visible { outline: 3px solid rgba(13,116,128,.25); outline-offset: 3px; }

.wrap, .wrap-sm { padding-left: 32px; padding-right: 32px; }
.section { padding: 88px 0; }
.section.alt { background: #f3f6f7; border-top: 1px solid var(--c-line-2); border-bottom: 1px solid var(--c-line-2); }
.section > .wrap > h2 { max-width: 760px; font-size: clamp(1.6rem, 2.4vw, 2.25rem); }
.section-lead { max-width: 800px; margin-bottom: 3rem; }
.eyebrow { color: var(--c-primary); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.eyebrow::before { width: 30px; height: 1px; background: var(--c-primary); }

/* precise, publication-style navigation */
.site-header { background: rgba(255,255,255,.96); border-bottom-color: var(--c-line); backdrop-filter: blur(14px); }
.site-header .inner { max-width: 1320px; min-height: 72px; padding: 11px 32px; gap: 36px; }
.site-logo { font-size: 1.04rem; letter-spacing: -.02em; }
.site-logo .mark { width: 35px; height: 35px; border-radius: 2px; background: var(--c-primary); box-shadow: none; }
.site-logo .sub { font-size: .68rem; letter-spacing: .04em; border-left: 1px solid var(--c-line); padding-left: 12px; margin-left: 4px; }
nav.main-nav { gap: 26px; justify-content: flex-end; }
nav.main-nav a { font-size: .84rem; font-weight: 500; color: var(--c-ink-2); padding: 12px 0 10px; border-bottom-width: 1px; }
nav.main-nav a:hover, nav.main-nav a.active { color: var(--c-primary); border-bottom-color: var(--c-primary); }
.header-utils .lang { border: 0; border-radius: 0; padding: 7px 8px; font-weight: 700; letter-spacing: .08em; }
.header-utils .btn { padding: 9px 15px; font-size: .8rem; }

/* buttons read as controls, not decorative pills */
.btn { border-radius: 3px; padding: 11px 18px; font-size: .9rem; box-shadow: none; }
.btn-lg { padding: 13px 20px; font-size: .92rem; }
.btn-primary { background: var(--c-primary); }
.btn-primary:hover { background: var(--c-primary-2); }
.btn-accent { background: var(--c-ink); }
.btn-accent:hover { background: #000; }
.btn-outline { background: #fff; border-color: #9aabb4; color: var(--c-ink); }
.btn-outline:hover { background: var(--c-bg-soft); border-color: var(--c-primary); }

/* homepage: strong editorial opening with a data rail */
.hero { background: #fff; padding: 96px 0 72px; border-bottom: 1px solid var(--c-line); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg,var(--c-primary) 0 68%,var(--c-accent) 68% 76%,transparent 76%); }
.hero .inner { max-width: var(--wrap); padding: 0 32px; display: grid; grid-template-columns: minmax(0,1.7fr) minmax(300px,.75fr); column-gap: 86px; align-items: end; }
.hero .eyebrow, .hero h1, .hero .lead, .hero .cta-row { grid-column: 1; }
.hero h1 { font-size: clamp(2.4rem, 4.6vw, 4.35rem); line-height: 1.2; max-width: 780px; margin-bottom: .5em; }
.hero h1 strong { color: var(--c-primary); background: none; }
.hero .lead { max-width: 750px; font-size: 1.02rem; line-height: 1.9; margin-bottom: 2rem; }
.hero .cta-row { margin: 0; gap: 10px; }
.hero-stats { grid-column: 2; grid-row: 1 / span 4; display: grid; grid-template-columns: 1fr 1fr; align-self: stretch; background: var(--c-bg-soft); border: 0; border-top: 4px solid var(--c-primary); border-radius: 0; box-shadow: none; }
.stat-card { padding: 25px 22px; border-right: 1px solid #d3dce1; border-bottom: 1px solid #d3dce1; display: flex; flex-direction: column; justify-content: flex-end; }
.stat-card:nth-child(even) { border-right: 0; }
.stat-card:nth-last-child(-n+2) { border-bottom: 0; }
.stat-card .num { font-family: var(--f-sans); font-size: 2.35rem; font-weight: 700; letter-spacing: -.05em; }
.stat-card .lbl { font-size: .77rem; font-weight: 500; }

/* content modules use hierarchy and rules instead of floating cards */
.card-3 { gap: 0; border-top: 1px solid var(--c-line); border-left: 1px solid var(--c-line); }
.card-2 { gap: 0; border-top: 1px solid var(--c-line); border-left: 1px solid var(--c-line); }
.card { border: 0; border-right: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); border-radius: 0; padding: 30px; box-shadow: none; }
.card:hover { border-color: var(--c-line); box-shadow: inset 0 3px 0 var(--c-primary); transform: none; }
.card h3 { font-size: 1.08rem; }
.card p { font-size: .91rem; line-height: 1.76; }
.card .meta { font-size: .78rem; padding-top: 18px; }
.card .ico { width: 38px; height: 38px; border: 0; border-radius: 0; background: transparent; box-shadow: none; margin: 0 0 20px; place-items: start; }
.card .ico svg { width: 29px; height: 29px; stroke: var(--c-primary); }
.badge, .axis-tag, .tag-soon, .wip-badge { border-radius: 2px; }

/* book module: credible publisher-style feature */
.book-band { background: #f3f6f7 !important; border-color: var(--c-line) !important; }
.book-band .wrap { padding-top: 44px !important; padding-bottom: 44px !important; }
.book-promo { gap: 36px !important; border: 0 !important; border-left: 4px solid var(--c-accent) !important; border-radius: 0 !important; padding: 26px 30px !important; box-shadow: none !important; }
.book-promo .cover img { width: 112px !important; border-radius: 1px !important; box-shadow: 0 12px 30px -18px rgba(0,0,0,.6) !important; }
.book-promo h3 { font-size: 1.55rem !important; color: var(--c-ink) !important; }
.book-promo .bp-eyebrow { color: var(--c-accent-2) !important; letter-spacing: .12em !important; }

/* secondary pages */
.page-head { padding: 64px 0 42px; background: #f3f6f7; border-top: 3px solid var(--c-primary); }
.page-head h1 { font-size: clamp(2rem, 3.7vw, 3.1rem); }
.breadcrumbs { letter-spacing: .04em; }
.db-toolbar { border-radius: 0; border: 1px solid var(--c-line); border-top: 3px solid var(--c-primary); box-shadow: none; padding: 24px; }
.db-search input, .db-filters select, .db-filters input[type=number], .form-field input, .form-field select, .form-field textarea { border-radius: 2px; background: #fff; }
.seg-switch, .db-view-toggle { border-radius: 3px; padding: 0; gap: 0; overflow: hidden; }
.seg-switch button, .db-view-toggle button { border-radius: 0; }
.db-chip { border-radius: 2px; }
.db-grid { gap: 12px; }
.org-card { border-radius: 2px; box-shadow: none; }
.org-card:hover { transform: none; box-shadow: inset 3px 0 0 var(--c-primary); }
.tbl-wrap { border-radius: 2px; }
.tbl thead th { background: #e8eef0; }
.modal { border-radius: 3px; }
.article { max-width: 820px; }
.article h2 { border-bottom: 1px solid var(--c-line); padding-bottom: .45em; }
.article h3 { color: var(--c-primary); }
.article .callout, .article blockquote { border-radius: 0; }
.res-list .item { border-radius: 2px; box-shadow: none; }
.res-list .item .tag { border-radius: 2px; }

.site-footer { margin-top: 0; padding-top: 64px; background: var(--c-bg-ink); }
.site-footer .site-logo .mark { background: var(--c-primary-3); }
.footer-grid h4 { letter-spacing: .1em; }

@media (max-width: 1040px) {
  .hero .inner { column-gap: 42px; }
  nav.main-nav { gap: 18px; }
  .site-header .inner { padding-left: 24px; padding-right: 24px; }
  .header-utils .btn { display: none; }
}
@media (max-width: 820px) {
  .wrap, .wrap-sm, .hero .inner { padding-left: 22px; padding-right: 22px; }
  .site-header .inner { min-height: 64px; }
  nav.main-nav { justify-content: flex-start; }
  nav.main-nav a { padding: 14px 24px; }
  .hero { padding: 68px 0 48px; }
  .hero .inner { display: block; }
  .hero h1 { font-size: clamp(2.15rem, 10vw, 3.6rem); }
  .hero-stats { margin-top: 42px; }
  .section { padding: 66px 0; }
}
@media (max-width: 640px) {
  .card-3, .card-2 { border-left: 0; }
  .card { border-left: 1px solid var(--c-line); padding: 26px 22px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 20px 16px; }
  .stat-card .num { font-size: 1.95rem; }
  .book-promo { text-align: left !important; align-items: flex-start !important; }
  .book-promo .bp-actions { justify-content: flex-start !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ============================================================
   Low-glare visual layer + documentary hero image
   ============================================================ */
:root {
  --c-bg: #e9eff1;
  --c-bg-soft: #dfe7e9;
  --c-bg-card: #f4f7f8;
  --c-line: #c9d4d8;
  --c-line-2: #d8e1e4;
}

html { background: #dfe7e9; }
body { background: var(--c-bg); }
.site-header { background: rgba(231,238,240,.96); }
.section { background: #e9eff1; }
.section.alt { background: #dfe7e9; }
.card, .tbl, .db-toolbar, .org-card, .res-list .item, .article .callout { background: #f4f7f8; }
.page-head { background: #dce5e8; }
.db-search input, .db-filters select, .db-filters input[type=number],
.form-field input, .form-field select, .form-field textarea { background: #edf2f3; }

/* Top image is deliberately darkened for legibility and lower luminance. */
.hero {
  min-height: 680px;
  color: #eef4f4;
  background-image:
    linear-gradient(90deg, rgba(8,22,29,.94) 0%, rgba(8,24,31,.86) 43%, rgba(8,25,31,.55) 68%, rgba(8,22,28,.36) 100%),
    linear-gradient(180deg, rgba(4,16,21,.10), rgba(4,16,21,.60)),
    url("../img/hero-breath-lab.png");
  background-size: cover;
  background-position: center center;
  display: flex;
  align-items: center;
  border-bottom: 0;
}
.hero::after { background: linear-gradient(90deg,#2da6ad 0 62%,#d47a52 62% 70%,transparent 70%); }
.hero .inner { width: 100%; align-items: center; }
.hero h1, .hero .lead { color: #f4f8f8; text-shadow: 0 2px 24px rgba(0,0,0,.24); }
.hero h1 strong { color: #79d0d3; }
.hero .lead { color: #d7e1e3; }
.hero .eyebrow { color: #8dd6d8; }
.hero .eyebrow::before { background: #8dd6d8; }
.hero .btn-primary { background: #16808a; border-color: #46aeb4; }
.hero .btn-primary:hover { background: #1b929d; }
.hero .btn-accent { background: #d06945; border-color: #dc8a6d; }
.hero .btn-outline { background: rgba(9,30,38,.55); color: #f1f6f6; border-color: rgba(220,235,237,.55); backdrop-filter: blur(5px); }
.hero .btn-outline:hover { background: rgba(237,245,246,.16); border-color: #fff; color: #fff; }
.hero-stats {
  align-self: center;
  min-height: 320px;
  background: rgba(10,29,36,.76);
  border-top-color: #64c5ca;
  color: #eef5f5;
  box-shadow: 0 24px 60px -32px rgba(0,0,0,.9);
  backdrop-filter: blur(10px);
}
.stat-card { border-color: rgba(212,230,232,.19); }
.stat-card .num { color: #83d5d8; }
.stat-card .lbl { color: #c7d6d8; }

.book-band { background: #dce5e8 !important; }
.book-promo { background: #f2f6f7 !important; }
.tbl tbody tr:hover { background: #e5ecee; }
.modal { background: #f4f7f8; }
.modal-head { background: #dfe7e9; }

@media (max-width: 820px) {
  .hero { min-height: auto; background-position: 62% center; }
  .hero-stats { min-height: 0; }
}
@media (max-width: 640px) {
  .hero {
    background-image:
      linear-gradient(180deg, rgba(7,22,29,.88) 0%, rgba(7,22,29,.92) 63%, rgba(7,22,29,.96) 100%),
      url("../img/hero-breath-lab.png");
    background-position: 64% center;
  }
}

/* ============================================================
   Responsive editorial QA: deliberate wrapping + page imagery
   ============================================================ */
h1, h2, h3 { text-wrap: balance; }
.hero h1 {
  max-width: none;
  font-size: clamp(2rem, 3.05vw, 2.45rem);
  line-height: 1.28;
  letter-spacing: -.04em;
  white-space: nowrap;
}
.hero .lead { max-width: 760px; }
html[lang="en"] .hero h1 { max-width: 12em; white-space: normal; font-size: clamp(2.15rem, 4vw, 3.7rem); }

.page-head {
  position: relative;
  isolation: isolate;
  min-height: 310px;
  display: flex;
  align-items: flex-end;
  padding: 72px 0 46px;
  overflow: hidden;
  background-color: #172a32;
  background-size: cover;
  background-position: center;
  border: 0;
}
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(8,23,30,.93) 0%, rgba(8,23,30,.80) 48%, rgba(8,23,30,.45) 100%);
}
.page-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(34vw, 460px);
  height: 3px;
  background: #62c0c5;
}
.page-head-database { background-image: url("../img/pagehead-database.png"); background-position: center 54%; }
.page-head-knowledge { background-image: url("../img/pagehead-knowledge.png"); background-position: center 48%; }
.page-head-community { background-image: url("../img/pagehead-community.png"); background-position: center 46%; }
.page-head h1 {
  max-width: 900px;
  margin-bottom: .32em;
  color: #f1f6f6;
  font-size: clamp(1.85rem, 3vw, 2.8rem);
  line-height: 1.25;
  text-shadow: 0 2px 22px rgba(0,0,0,.26);
}
.page-head .lead { max-width: 820px; color: #d3e0e2; font-size: 1rem; }
.page-head .breadcrumbs, .page-head .breadcrumbs a { color: #b8cbce; }
.page-head .breadcrumbs a:hover { color: #fff; }

/* Keep line lengths and hierarchy controlled across dense pages. */
.article p, .article li { max-width: 74ch; }
.card h3 { line-height: 1.45; }
.card p { max-width: 62ch; }
.tbl th, .tbl td { line-height: 1.55; }
.news-item h3 { line-height: 1.45; }

@media (max-width: 1180px) {
  .hero h1 { font-size: clamp(1.85rem, 3vw, 2.3rem); }
  .hero .inner { column-gap: 34px; }
}
@media (max-width: 920px) {
  .hero h1 { font-size: 2rem; }
  .page-head { min-height: 280px; }
}
@media (max-width: 820px) {
  .hero h1 { white-space: normal; max-width: 14em; }
  .page-head { min-height: 250px; padding: 60px 0 36px; }
  .page-head::before { background: rgba(8,23,30,.78); }
}
@media (max-width: 520px) {
  .hero h1 { font-size: clamp(1.85rem, 9vw, 2.35rem); }
  .page-head h1 { font-size: 1.85rem; }
}

/* SOP一覧: ボタンを縦に並べる */
.btn-stack{display:flex;flex-direction:column;gap:8px;align-items:stretch;min-width:170px}
.btn-stack .btn{white-space:nowrap;text-align:center}
@media (max-width:640px){.btn-stack{min-width:0;width:100%}}

/* 組織名の副題（英語名／日本語名の併記） */
.org-card .name-sub, .modal-head .name-sub { font-size: .8rem; font-weight: 500; color: var(--c-mute); margin-top: 2px; line-height: 1.35; }
