/* V-THREE site — design tokens & base */
:root {
  --c-navy: #0E2A47;
  --c-navy-2: #163657;
  --c-cyan: #1FA2C2;
  --c-cyan-2: #157E97;
  --c-amber: #F1B500;
  --c-ink: #0B1B2D;
  --c-mute: #4A5C72;
  --c-line: #E3E8EE;
  --c-bg: #F6F8FB;
  --c-bg-2: #ECF1F6;
  --c-white: #FFFFFF;
  --c-warn-bg: #FFF7E0;
  --c-warn-line: #F1B500;
  --c-danger: #B23A3A;
  --shadow-sm: 0 1px 2px rgba(14, 42, 71, .06), 0 1px 3px rgba(14, 42, 71, .04);
  --shadow-md: 0 4px 12px rgba(14, 42, 71, .08), 0 2px 4px rgba(14, 42, 71, .04);
  --r-md: 10px;
  --r-lg: 16px;
}

* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: clip; }
body { overflow-wrap: break-word; word-wrap: break-word; }
img, video, svg { max-width: 100%; height: auto; }
body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  color: var(--c-navy);
  letter-spacing: .01em;
  margin: 0;
  line-height: 1.35;
  font-weight: 700;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p { margin: 0; }
a { color: var(--c-cyan-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--c-line);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px; color: var(--c-navy);
  font-family: "Noto Serif JP", serif; font-weight: 700; font-size: 1.15rem;
  text-decoration: none;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, var(--c-navy), var(--c-cyan));
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-family: "Noto Serif JP", serif; font-size: 13px; font-weight: 800;
  letter-spacing: .02em;
}
.nav { display: flex; gap: 6px; align-items: center; }
.nav a:not(.btn) {
  display: inline-block; padding: 8px 12px; border-radius: 8px;
  color: var(--c-mute); font-size: 14px; font-weight: 500; text-decoration: none;
}
.nav a:not(.btn):hover { background: var(--c-bg-2); color: var(--c-navy); text-decoration: none; }
.nav a.active:not(.btn) { color: var(--c-navy); background: var(--c-bg-2); }
.nav .btn { margin-left: 8px; }
.nav a.btn-primary { color: #fff; }
.nav a.btn-primary:hover { color: #fff; text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--c-line); border-radius: 8px; padding: 8px 10px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none;
  transition: transform .04s ease, background .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--c-navy); color: white; }
.btn-primary:hover { background: var(--c-navy-2); text-decoration: none; }
.btn-accent { background: var(--c-cyan); color: white; }
.btn-accent:hover { background: var(--c-cyan-2); text-decoration: none; }
.btn-ghost { background: white; color: var(--c-navy); border-color: var(--c-line); }
.btn-ghost:hover { background: var(--c-bg-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }

/* Hero */
.hero {
  position: relative; padding: 80px 0 64px;
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(31,162,194,.18), transparent 60%),
    radial-gradient(800px 300px at -10% 20%, rgba(14,42,71,.08), transparent 60%),
    linear-gradient(180deg, #fff, var(--c-bg));
  border-bottom: 1px solid var(--c-line);
}
.hero h1 { font-size: 2.6rem; line-height: 1.25; }
.hero .lead { font-size: 1.05rem; color: var(--c-mute); margin-top: 14px; max-width: 680px; }
.hero .meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tag {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: white; border: 1px solid var(--c-line); color: var(--c-navy);
}
.tag.amber { background: var(--c-warn-bg); border-color: var(--c-warn-line); color: #8a6500; }
.tag.cyan { background: rgba(31,162,194,.1); border-color: rgba(31,162,194,.4); color: var(--c-cyan-2); }
.tag.dark { background: var(--c-navy); color: white; border-color: var(--c-navy); }
.cta-row { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

/* Section */
section { padding: 64px 0; }
section.alt { background: var(--c-bg-2); }
.section-head { margin-bottom: 28px; }
.eyebrow { color: var(--c-cyan-2); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.section-head h2 { margin-top: 6px; }
.section-head .lead { color: var(--c-mute); margin-top: 8px; max-width: 760px; }

/* Cards */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 900px) { .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; } }
.card {
  background: white; border: 1px solid var(--c-line); border-radius: var(--r-lg);
  padding: 22px; box-shadow: var(--shadow-sm);
}
/* When a card is itself an anchor, suppress default link colors / underlines. */
a.card { color: inherit; text-decoration: none; transition: background .15s ease, border-color .15s ease, transform .04s ease; }
a.card:hover { background: var(--c-bg-2); border-color: rgba(31,162,194,.4); text-decoration: none; }
a.card:active { transform: translateY(1px); }
a.card h3 { color: var(--c-navy); }
.card h3 { margin-bottom: 8px; }
.card .icon-box {
  width: 40px; height: 40px; border-radius: 10px; display: inline-flex;
  align-items: center; justify-content: center; background: var(--c-bg-2);
  color: var(--c-cyan-2); margin-bottom: 12px;
}
.card.dark { background: var(--c-navy); color: white; border-color: var(--c-navy); }
.card.dark h3 { color: white; }
.card.dark .muted { color: rgba(255,255,255,.7); }
.card.dark .icon-box { background: rgba(255,255,255,.1); color: var(--c-cyan); }

.muted { color: var(--c-mute); }

/* Callout */
.callout {
  border-left: 4px solid var(--c-cyan); background: white;
  padding: 16px 20px; border-radius: 0 var(--r-md) var(--r-md) 0;
  box-shadow: var(--shadow-sm);
}
.callout.warn { border-color: var(--c-amber); background: var(--c-warn-bg); }
.callout.danger { border-color: var(--c-danger); background: #fdecec; }
.callout h4 { color: var(--c-navy); margin-bottom: 6px; }

/* Table */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--r-md); overflow: hidden; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--c-line); font-size: 14px; vertical-align: top; word-break: break-word; }
.table th { background: var(--c-bg-2); color: var(--c-navy); font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }
.table.compact th, .table.compact td { padding: 10px 12px; }

/* Footer */
.site-footer { background: var(--c-navy); color: rgba(255,255,255,.85); padding: 48px 0 24px; }
.site-footer h4 { color: white; font-family: "Noto Serif JP", serif; margin-bottom: 12px; font-size: 1rem; }
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer .grid { gap: 32px; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.15); margin-top: 32px; padding-top: 16px; font-size: 12px; color: rgba(255,255,255,.6); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* HCP layout — sidebar */
/* Do NOT set max-width here — .container already caps to 1180px on the same element. */
.hcp-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; padding-top: 32px; padding-bottom: 64px; min-width: 0; }
.hcp-shell > main { min-width: 0; }
.hcp-section { min-width: 0; }
.hcp-section figure, .hcp-section .table-wrap, .hcp-section .pair, .hcp-section .mech-grid { min-width: 0; }
.hcp-section .pair > * { min-width: 0; }
/* Standalone figures (not inside .pair) — cap width so they don't dominate the column */
.hcp-section > figure.fig { max-width: 760px; margin-left: auto; margin-right: auto; }
@media (max-width: 900px) { .hcp-section > figure.fig { max-width: 100%; } }
@media (max-width: 1000px) { .hcp-shell { grid-template-columns: 1fr; } .hcp-side { position: static !important; } }
.hcp-side {
  position: sticky; top: 84px; align-self: start;
  background: white; border: 1px solid var(--c-line); border-radius: var(--r-lg);
  padding: 14px;
}
.hcp-side h5 { margin: 0 0 8px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-mute); padding: 0 6px; }
.hcp-side a {
  display: block; padding: 8px 10px; border-radius: 8px; color: var(--c-mute);
  font-size: 14px; text-decoration: none;
}
.hcp-side a:hover { background: var(--c-bg-2); color: var(--c-navy); }
.hcp-side a.active { background: var(--c-bg-2); color: var(--c-navy); font-weight: 600; }

.hcp-section { scroll-margin-top: 96px; padding: 36px 0; border-top: 1px solid var(--c-line); }
.hcp-section:first-child { border-top: 0; padding-top: 8px; }
.hcp-section h2 { font-size: 1.7rem; }
.hcp-section .eyebrow { display: block; margin-bottom: 6px; }

/* Mechanism diagram */
.mech-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .mech-grid { grid-template-columns: 1fr; } }
.mech-card { padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--c-line); background: white; box-shadow: var(--shadow-sm); }
.mech-card .num { font-family: "Noto Serif JP", serif; font-size: 28px; color: var(--c-cyan-2); font-weight: 700; }
.mech-card h3 { margin-top: 4px; }

/* Evidence card */
.evidence {
  background: white; border: 1px solid var(--c-line); border-radius: var(--r-lg);
  padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.evidence .meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.evidence .meta .tag { font-size: 11px; }
.evidence h4 { font-family: "Noto Sans JP", sans-serif; font-size: 1rem; margin-bottom: 6px; color: var(--c-navy); }
.evidence p { font-size: 14px; color: var(--c-mute); }

/* Evidence detail (text + paper capture) */
.evidence-detail {
  display: grid; grid-template-columns: 1.35fr .9fr; gap: 24px; align-items: start;
  background: white; border: 1px solid var(--c-line); border-radius: var(--r-lg);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.evidence-detail-body h4 {
  font-family: "Noto Sans JP", sans-serif; font-size: 1.05rem; color: var(--c-navy); margin-bottom: 12px;
}
.evidence-points { margin: 0; padding-left: 1.1em; }
.evidence-points li { font-size: 14px; color: var(--c-ink); line-height: 1.85; margin-bottom: 10px; }
.evidence-cite { margin-top: 14px; font-size: 12px; font-style: italic; color: var(--c-mute); }
.evidence-detail-fig { margin: 0; border: 1px solid var(--c-line); border-radius: 10px; overflow: hidden; background: var(--c-bg); }
.evidence-detail-fig img { display: block; width: 100%; height: auto; }
.evidence-detail-fig figcaption { padding: 8px 12px; font-size: 12px; color: var(--c-mute); border-top: 1px solid var(--c-line); }
@media (max-width: 900px) { .evidence-detail { grid-template-columns: 1fr; } }

/* HCP gate */
.gate-overlay {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1000px 600px at 50% -20%, rgba(31,162,194,.18), transparent 60%),
    linear-gradient(180deg, #fff, var(--c-bg));
  padding: 24px;
}
.gate-card {
  width: 100%; max-width: 520px; background: white; border: 1px solid var(--c-line);
  border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow-md); text-align: left;
}
.gate-card .brand-mark { width: 36px; height: 36px; border-radius: 8px; }
.gate-card h1 { font-size: 1.5rem; margin: 12px 0 6px; }
.gate-card p { color: var(--c-mute); font-size: 14px; }
.gate-actions { display: flex; gap: 10px; margin-top: 22px; }

/* Form */
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
label { font-size: 13px; color: var(--c-navy); font-weight: 600; display: block; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--c-line); border-radius: 10px;
  background: white; color: var(--c-ink); font: inherit;
}
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(31,162,194,.35); border-color: var(--c-cyan); }
.required::after { content: " *"; color: var(--c-danger); }

/* Disclaimer strip */
.disclaimer-strip {
  background: var(--c-warn-bg); color: #6b4d00; font-size: 13px;
  border-bottom: 1px solid var(--c-warn-line);
  padding: 8px 0;
}
.disclaimer-strip .inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }

/* Back-to-public link in HCP nav */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--c-mute); padding: 6px 10px;
  border-radius: 8px; text-decoration: none; border: 1px solid var(--c-line);
  background: white;
}
.back-link:hover { background: var(--c-bg-2); color: var(--c-navy); text-decoration: none; }

/* Mobile nav */
@media (max-width: 820px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: white;
         flex-direction: column; align-items: stretch; padding: 12px; border-bottom: 1px solid var(--c-line); }
  .nav.open { display: flex; }
  .nav a { padding: 10px 12px; }
  .nav-toggle { display: inline-flex; }
}

/* Figures */
figure { margin: 0; }
figure.fig {
  background: white; border: 1px solid var(--c-line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
figure.fig img { display: block; width: 100%; height: auto; }
figure.fig figcaption {
  padding: 12px 16px; font-size: 13px; color: var(--c-mute);
  border-top: 1px solid var(--c-line); background: var(--c-bg);
}

/* Hero with product image */
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-image {
  background: white; border: 1px solid var(--c-line); border-radius: var(--r-lg);
  padding: 18px; box-shadow: var(--shadow-md);
}
.hero-image img { display: block; width: 100%; height: auto; border-radius: 8px; }

/* Mechanism — paired layout (text + figure) */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .pair { grid-template-columns: 1fr; } }
.pair.reverse > *:first-child { order: 2; }
@media (max-width: 900px) { .pair.reverse > *:first-child { order: 0; } }

/* Utilities */
.spacer-8 { height: 8px; } .spacer-16 { height: 16px; } .spacer-32 { height: 32px; }

/* ================================================
 * Mobile responsiveness
 * ================================================ */

/* HCP sidebar — collapse to horizontal chip nav on tablet/mobile */
@media (max-width: 1000px) {
  .hcp-side {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 12px; margin-bottom: 12px;
  }
  .hcp-side h5 {
    width: 100%; margin: 0 0 4px; padding: 0;
  }
  .hcp-side a {
    padding: 6px 12px; font-size: 13px;
    border: 1px solid var(--c-line); border-radius: 999px;
    background: var(--c-bg);
  }
  .hcp-side a.active {
    background: var(--c-cyan); color: white; border-color: var(--c-cyan);
  }
  .hcp-shell { padding-top: 16px; gap: 12px; }
}

/* Tablet adjustments */
@media (max-width: 900px) {
  .hero h1 { font-size: 2rem; }
  .hero { padding: 56px 0 40px; }
  section { padding: 48px 0; }
  .form-grid { grid-template-columns: 1fr; }
}

/* Phone */
@media (max-width: 720px) {
  body { font-size: 15px; line-height: 1.65; }

  /* Container — tighter side padding */
  .container, .container-narrow { padding: 0 16px; }

  /* Type scale */
  h1 { font-size: 1.7rem; line-height: 1.3; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.05rem; }
  .lead { font-size: 0.95rem; }

  /* Section padding */
  section { padding: 36px 0; }
  .hero { padding: 36px 0 28px; }
  .hcp-section { padding: 24px 0; scroll-margin-top: 72px; }
  .section-head { margin-bottom: 18px; }
  .spacer-32 { height: 20px; }

  /* Header */
  .site-header .inner { height: 56px; }
  .brand { gap: 8px; font-size: 0.95rem; min-width: 0; overflow: hidden; }
  .brand > span:not(.brand-mark) {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw;
  }
  .brand-mark { width: 26px; height: 26px; font-size: 11px; flex-shrink: 0; border-radius: 5px; }

  /* Mobile nav (already shown via .open at <=820px) */
  .nav { padding: 10px; gap: 4px; top: 56px; }
  .nav a, .nav .btn, .nav .back-link {
    width: 100%; justify-content: center; padding: 11px 12px;
    font-size: 14px; text-align: center;
  }
  .nav .back-link { margin: 4px 0; }

  /* Hero */
  .hero .meta-row { gap: 6px; }
  .tag { font-size: 11px; padding: 3px 8px; }
  .cta-row { flex-direction: column; gap: 8px; align-items: stretch; }
  .cta-row .btn { width: 100%; justify-content: center; }

  /* Hero grid (HCP) — image on top of text */
  .hero-grid { gap: 20px; }
  .hero-image { padding: 12px; }

  /* Cards */
  .card { padding: 16px; }
  .card .icon-box { width: 36px; height: 36px; margin-bottom: 10px; }
  .mech-card { padding: 18px; }
  .evidence { padding: 16px 16px; }

  /* Tables */
  .table th, .table td { padding: 9px 10px; font-size: 13px; }
  .table.compact th, .table.compact td { padding: 8px 10px; }

  /* Callout */
  .callout { padding: 14px 16px; }

  /* Form */
  textarea { min-height: 110px; }

  /* Gate */
  .gate-card { padding: 24px; }
  .gate-card h1 { font-size: 1.3rem; }
  .gate-actions { flex-direction: column; gap: 8px; }
  .gate-actions .btn { width: 100%; justify-content: center; }

  /* Disclaimer strip — stack on mobile */
  .disclaimer-strip { font-size: 11px; line-height: 1.5; padding: 6px 0; }
  .disclaimer-strip .inner {
    flex-direction: column; align-items: flex-start; gap: 2px;
  }

  /* Footer */
  .site-footer { padding: 32px 0 16px; }
  .site-footer .grid { gap: 24px; }
  .site-footer h4 { font-size: 0.95rem; margin-bottom: 8px; }
  .site-footer .legal { font-size: 11px; flex-direction: column; align-items: flex-start; gap: 4px; }

  /* Pair (text + figure) — already stacks at 900px, ensure tight gap */
  .pair { gap: 14px; }

  /* Mech grid stays 1-col on mobile (already 1fr below 900px) */

  /* Side nav scroll-margin offset */
  .hcp-section { scroll-margin-top: 72px; }
}

/* Very narrow phones */
@media (max-width: 360px) {
  h1, .hero h1 { font-size: 1.55rem; }
  .container, .container-narrow { padding: 0 12px; }
  .brand > span:not(.brand-mark) { max-width: 50vw; }
}
.text-center { text-align: center; }
.lead { font-size: 1.05rem; color: var(--c-mute); }
.kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--c-bg-2); padding: 1px 6px; border-radius: 4px; font-size: .9em; }
ul.checks { list-style: none; padding: 0; margin: 0; }
ul.checks li { padding-left: 26px; position: relative; margin: 6px 0; color: var(--c-ink); }
ul.checks li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 16px; height: 16px;
  background: var(--c-cyan); border-radius: 50%;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center/contain no-repeat;
}
