/* Japan Medical Bridge — v2 design system
   Approved direction (2026-08-02): deep petrol green × paper ground × brass numerals,
   Lora (EN headings) / Inter (body) / Noto Sans JP (JA), squared surfaces, hairline rules,
   asymmetric editorial layout. No pills, no gradients on CTAs. Dark theme fully designed. */


/* ---------- tokens ---------- */
:root {
  --paper: #F4F5F2;
  --surface: #FFFFFF;
  --ink: #17221E;
  --muted: #4E5C55;
  --line: #DCE0DA;
  --line-2: #C6CCC3;
  --accent: #0E3B36;        /* petrol green — authority, calm */
  --accent-soft: #1C544C;
  --btn-bg: #0E3B36;
  --btn-fg: #F4F5F2;
  --brass: #8A6629;         /* reserved for credentials & signature marks only */
  --band: #0E3B36;          /* story band ground */
  --band-ink: #EAF1EE;
  --danger: #8C2F2F;        /* emergency callouts */
  --danger-bg: #F9EFEA;
  --serif: "Lora", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --sans-ja: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --serif-ja: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E1512; --surface: #141D19; --ink: #E9ECE7; --muted: #9BA79F;
    --line: #26312B; --line-2: #34423B;
    --accent: #78BEB0; --accent-soft: #5FA99B;
    --btn-bg: #173029; --btn-fg: #EAF1EE;
    --brass: #C79A54; --band: #0B211D; --band-ink: #E6EFEB;
    --danger: #D98A7A; --danger-bg: #2A1A16;
  }
}
:root[data-theme="light"] {
  --paper: #F4F5F2; --surface: #FFFFFF; --ink: #17221E; --muted: #4E5C55;
  --line: #DCE0DA; --line-2: #C6CCC3;
  --accent: #0E3B36; --accent-soft: #1C544C;
  --btn-bg: #0E3B36; --btn-fg: #F4F5F2;
  --brass: #8A6629; --band: #0E3B36; --band-ink: #EAF1EE;
  --danger: #8C2F2F; --danger-bg: #F9EFEA;
}
:root[data-theme="dark"] {
  --paper: #0E1512; --surface: #141D19; --ink: #E9ECE7; --muted: #9BA79F;
  --line: #26312B; --line-2: #34423B;
  --accent: #78BEB0; --accent-soft: #5FA99B;
  --btn-bg: #173029; --btn-fg: #EAF1EE;
  --brass: #C79A54; --band: #0B211D; --band-ink: #E6EFEB;
  --danger: #D98A7A; --danger-bg: #2A1A16;
}

/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); line-height: 1.68;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
html[lang="ja"] body { font-family: var(--sans-ja); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
a { color: inherit; text-decoration: none; }
p a, li a, .prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
p a:hover, li a:hover { color: var(--accent-soft); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.16; text-wrap: balance; }
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3 { font-family: var(--sans-ja); font-weight: 700; letter-spacing: 0; line-height: 1.4; }
.eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-soft); }
html[lang="ja"] .eyebrow { letter-spacing: .22em; }
.rule { height: 1px; background: var(--line); border: 0; }
.num { font-family: var(--sans); font-variant-numeric: tabular-nums; }

/* ---------- skip link / focus ---------- */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--btn-fg); padding: 10px 18px; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- header ---------- */
header.top { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px); z-index: 20; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 16px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.mark { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; white-space: nowrap; }
.mark b { color: var(--accent); font-weight: 600; }
nav.nav { display: flex; gap: 22px; align-items: center; font-size: .85rem; color: var(--muted); flex-wrap: wrap; row-gap: 8px; }
nav.nav a:hover { color: var(--accent); }
.nav .lang { border: 1px solid var(--line); padding: 5px 12px; font-size: .78rem; white-space: nowrap; }
.nav .lang a { color: var(--accent); }
.nav .lang strong { color: var(--ink); font-weight: 600; }
.nav .navcta { border: 1px solid var(--accent); color: var(--accent); padding: 8px 16px; font-weight: 600; }
.nav .navcta:hover { background: var(--accent); color: var(--btn-fg); }
/* Mobile nav: wrap links onto a second row (never hide them; no hamburger needed for 5 links) */
@media (max-width: 860px) {
  .top .wrap { flex-wrap: wrap; padding-bottom: 10px; }
  nav.nav { width: 100%; order: 3; justify-content: flex-start; gap: 10px 14px; font-size: .82rem; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 11px; }
  nav.nav .lang { margin-right: auto; }
  nav.nav .navcta { margin-left: auto; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--btn-bg); color: var(--btn-fg); font-weight: 600; font-size: 1rem; padding: 15px 26px; border: 1px solid var(--btn-bg); transition: background .15s ease; }
.btn:hover { background: var(--accent-soft); border-color: var(--accent-soft); }
.btn .arw { transition: transform .15s ease; }
.btn:hover .arw { transform: translateX(4px); }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-ghost:hover { background: var(--accent); color: var(--btn-fg); }
.microcopy { margin-top: 14px; font-size: .82rem; color: var(--muted); }

/* ---------- hero (home) ---------- */
.hero { padding: 76px 0 20px; }
.hero .grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.5rem); line-height: 1.08; margin-top: 18px; }
html[lang="ja"] .hero h1 { line-height: 1.32; font-size: clamp(1.9rem, 4.6vw, 3rem); }
.hero h1 em { font-style: italic; color: var(--accent); }
html[lang="ja"] .hero h1 em { font-style: normal; color: var(--accent); }
.hero .sub { margin: 22px 0 28px; font-size: 1.08rem; color: var(--muted); max-width: 34em; }
.hero .sub b { color: var(--ink); font-weight: 600; }
.portrait { position: relative; }
.portrait .frame { position: relative; }   /* corner marks frame the photo, not the caption */
.portrait img { width: 100%; height: auto; display: block; filter: grayscale(.12) contrast(1.02); border: 1px solid var(--line-2); }
.portrait .tick { position: absolute; top: -1px; left: -1px; width: 26px; height: 26px; border-top: 2px solid var(--brass); border-left: 2px solid var(--brass); }
.portrait .tick.br { top: auto; left: auto; bottom: -1px; right: -1px; border: 0; border-bottom: 2px solid var(--brass); border-right: 2px solid var(--brass); }
.portrait figcaption { margin-top: 12px; font-size: .8rem; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.portrait figcaption b { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) { .hero .grid { grid-template-columns: 1fr; gap: 34px; } .portrait { order: -1; max-width: 340px; } }

/* signature motif: vessel line */
.vessel { display: block; width: 100%; height: 40px; color: var(--line-2); margin-top: 8px; }

/* ---------- stats (credentials strip) ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 40px; }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 30px 26px 26px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .n { font-family: var(--sans); font-weight: 700; font-size: 2.1rem; letter-spacing: -.02em; color: var(--brass); font-variant-numeric: tabular-nums; line-height: 1; }
.stat .l { margin-top: 9px; font-size: .82rem; color: var(--muted); line-height: 1.45; }
.stat .l b { color: var(--ink); font-weight: 600; }
.foot-note { font-size: .72rem; color: var(--muted); padding: 10px 0 14px; }
@media (max-width: 720px) {
  .stats .wrap { grid-template-columns: 1fr 1fr; }
  .stat { border-top: 1px solid var(--line); }
  .stat:nth-child(1), .stat:nth-child(2) { border-top: 0; }
  .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
}

/* ---------- sections ---------- */
section { padding: 74px 0; }
.sec-h { font-size: clamp(1.6rem, 3.2vw, 2.05rem); }
.lead { color: var(--muted); max-width: 56ch; margin-top: 14px; font-size: 1.02rem; }

/* ---------- story band ---------- */
.band { background: var(--band); color: var(--band-ink); }
.band .wrap { padding: 78px 32px; }
.band blockquote { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.55rem, 3.4vw, 2.25rem); line-height: 1.4; max-width: 24ch; color: #fff; }
html[lang="ja"] .band blockquote { font-family: var(--serif-ja); font-style: normal; line-height: 1.6; max-width: 26ch; }
:root[data-theme="dark"] .band blockquote { color: var(--band-ink); }
.band p { margin-top: 22px; max-width: 60ch; color: color-mix(in srgb, var(--band-ink) 82%, transparent); font-size: .98rem; }
html[lang="ja"] .band p { line-height: 1.9; }

/* ---------- condition cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.cards.cols2 { grid-template-columns: 1fr 1fr; }
.card { padding: 28px 26px 30px; border-left: 1px solid var(--line); background: var(--surface); display: block; }
.card:first-child { border-left: 0; }
.card .k { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-soft); font-weight: 600; }
.card h3 { font-size: 1.24rem; margin-top: 12px; }
.card p { margin-top: 12px; font-size: .92rem; color: var(--muted); }
.card .go { margin-top: 16px; font-size: .84rem; color: var(--accent); font-weight: 600; }
a.card:hover h3 { color: var(--accent); }
@media (max-width: 860px) { .cards, .cards.cols2 { grid-template-columns: 1fr; } .card { border-left: 0; border-top: 1px solid var(--line); } .card:first-child { border-top: 0; } }

/* condition chip list (hub) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chips a { border: 1px solid var(--line-2); padding: 9px 16px; font-size: .88rem; font-weight: 600; color: var(--ink); background: var(--surface); }
.chips a:hover { border-color: var(--accent); color: var(--accent); }

/* guide grid (conditions hub) */
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.guide-card { border: 1px solid var(--line); background: var(--surface); padding: 24px 24px 26px; display: block; }
.guide-card .ico, .card .ico { display: block; color: var(--accent); margin-bottom: 14px; }
.guide-card .ico svg, .card .ico svg { width: 30px; height: 30px; display: block; }
.guide-card .k { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-soft); font-weight: 600; }
.guide-card h3 { font-size: 1.14rem; margin-top: 10px; line-height: 1.24; }
.guide-card p { font-size: .9rem; color: var(--muted); margin-top: 10px; }
.guide-card .go { margin-top: 14px; font-size: .82rem; color: var(--accent); font-weight: 600; }
.guide-card:hover h3 { color: var(--accent); }
@media (max-width: 860px) { .guide-grid { grid-template-columns: 1fr; } }
@media (min-width: 1100px) { .guide-grid { grid-template-columns: repeat(4, 1fr); } }

/* steps (consultation) */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 30px; }
.step { border: 1px solid var(--line); background: var(--surface); padding: 22px 20px 24px; }
.step .n { font-family: var(--sans); font-weight: 700; font-size: 1.1rem; color: var(--brass); font-variant-numeric: tabular-nums; }
.step h3 { font-size: 1.02rem; margin-top: 10px; }
.step p { font-size: .88rem; color: var(--muted); margin-top: 8px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* pricing detail */
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; }
.pricing-card { border: 1px solid var(--line); background: var(--surface); padding: 28px 28px 30px; }
.pricing-card.lead-card { border-top: 3px solid var(--accent); }
.pricing-card .tier { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-soft); font-weight: 600; }
.pricing-card .amt { font-family: var(--serif); font-size: 2.2rem; font-weight: 600; color: var(--ink); margin-top: 8px; }
html[lang="ja"] .pricing-card .amt { font-family: var(--sans-ja); }
.pricing-card .amt .cur { font-size: 1.1rem; color: var(--brass); }
.pricing-card .per { font-size: .9rem; color: var(--muted); margin-top: 4px; }
.pricing-card ul { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.pricing-card li { font-size: .9rem; padding-left: 18px; position: relative; }
.pricing-card li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 1px; background: var(--brass); }
@media (max-width: 720px) { .pricing-grid { grid-template-columns: 1fr; } }
.policy { border: 1px solid var(--line); background: var(--surface); padding: 26px 30px; margin-top: 24px; }
.policy h3 { font-size: 1.05rem; }
.policy p { font-size: .92rem; color: var(--muted); margin-top: 10px; line-height: 1.7; }
html[lang="ja"] .policy p { line-height: 1.9; }

/* ---------- why (editorial contrast) ---------- */
.why { display: grid; grid-template-columns: 1fr 1fr; margin-top: 30px; border: 1px solid var(--line); }
.why .col { padding: 30px 30px 34px; }
.why .col.j { background: var(--surface); border-left: 1px solid var(--line); }
.why .col .k { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin-bottom: 16px; }
.why .col.g .k { color: var(--muted); }
.why .col.j .k { color: var(--accent); }
.why ul { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.why li { font-size: .94rem; padding-left: 20px; position: relative; }
.why li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 1px; background: var(--line-2); }
.why .col.j li::before { background: var(--brass); }
.why .col.g li { color: var(--muted); }
@media (max-width: 720px) { .why { grid-template-columns: 1fr; } .why .col.j { border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- pricing ---------- */
.price { border: 1px solid var(--line); background: var(--surface); padding: 26px 30px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; margin-top: 8px; }
.price .p { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }
html[lang="ja"] .price .p { font-family: var(--sans-ja); font-weight: 700; }
.price .p b { color: var(--brass); }
.price .d { color: var(--muted); font-size: .92rem; }

/* ---------- final CTA ---------- */
.final .wrap { border: 1px solid var(--line); background: var(--surface); padding: 52px 40px; display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.final h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); max-width: 18ch; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0 60px; color: var(--muted); font-size: .82rem; }
footer .wrap { display: flex; flex-direction: column; gap: 12px; }
footer .r { display: flex; gap: 22px; flex-wrap: wrap; }
footer a:hover { color: var(--accent); }
.disc { max-width: 70ch; line-height: 1.6; }

/* ================= article pages (condition guides) ================= */
.article-head { padding: 56px 0 8px; }
.crumbs { font-size: .78rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--line-2); }
.article-head h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); margin-top: 16px; max-width: 24ch; }
html[lang="ja"] .article-head h1 { line-height: 1.36; }
.byline { margin-top: 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.byline img { width: 44px; height: 44px; object-fit: cover; object-position: top; border: 1px solid var(--line-2); }
.byline a.author { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--brass); }
.byline a.author:hover { color: var(--accent); }
.byline .dates { font-variant-numeric: tabular-nums; }

/* emergency callout */
.emergency { border: 1px solid var(--danger); border-left: 4px solid var(--danger); background: var(--danger-bg); padding: 18px 22px; margin: 28px 0 0; font-size: .95rem; line-height: 1.7; }
.emergency b, .emergency strong { color: var(--danger); }
.emergency ul { margin: 8px 0 0 18px; }

/* prose */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 44px; font-size: 1.45rem; padding-top: 20px; border-top: 1px solid var(--line); }
.prose h2:first-of-type { border-top: 0; padding-top: 0; }
.prose h3 { margin-top: 26px; font-size: 1.08rem; }
.prose p { margin-top: 14px; font-size: .98rem; }
html[lang="ja"] .prose p { line-height: 1.95; }
.prose ul, .prose ol { margin: 14px 0 0 20px; color: var(--ink); }
.prose li { margin-top: 8px; font-size: .95rem; }
.prose .note { font-size: .85rem; color: var(--muted); border-left: 2px solid var(--line-2); padding-left: 14px; margin-top: 14px; }

/* figure (original diagrams) */
figure.diagram { margin: 30px 0 6px; border: 1px solid var(--line); background: var(--surface); padding: 26px 26px 18px; }
figure.diagram svg { width: 100%; height: auto; display: block; }
figure.diagram figcaption { margin-top: 14px; font-size: .8rem; color: var(--muted); line-height: 1.6; border-top: 1px solid var(--line); padding-top: 10px; }
figure.diagram figcaption b { color: var(--ink); }

/* Q&A / FAQ */
.qa dt { font-weight: 600; color: var(--accent-soft); margin-top: 20px; font-size: .98rem; }
.qa dd { margin: 8px 0 0; color: var(--muted); font-size: .94rem; }
html[lang="ja"] .qa dd { line-height: 1.9; }

/* takeaway questions block (signature JMB section) */
.take { border: 1px solid var(--line); background: var(--surface); padding: 24px 28px; margin-top: 26px; }
.take .k { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); font-weight: 600; }
.take ol { margin: 14px 0 0 20px; }
.take li { margin-top: 10px; font-size: .95rem; }

/* references */
.refs { font-size: .8rem; color: var(--muted); margin-top: 40px; border-top: 1px solid var(--line); padding-top: 16px; }
.refs h2 { font-size: .95rem; border: 0; padding: 0; margin: 0 0 6px; }
.refs ol { margin-left: 18px; }
.refs li { margin-top: 7px; line-height: 1.6; }
.refs a { color: var(--accent); }

/* author footer card (article end) */
.author-card { display: flex; gap: 20px; align-items: center; border: 1px solid var(--line); background: var(--surface); padding: 22px 26px; margin-top: 36px; }
.author-card img { width: 72px; height: 72px; object-fit: cover; object-position: top; border: 1px solid var(--line-2); flex: 0 0 72px; }
.author-card .who b { display: block; font-size: 1rem; color: var(--ink); }
.author-card .who span { font-size: .84rem; color: var(--muted); }
.author-card .who a { font-size: .84rem; color: var(--accent); font-weight: 600; text-decoration: none; display: inline-block; margin-top: 6px; }
.author-card .who a:hover { text-decoration: underline; }

/* related guides */
.related { margin-top: 40px; }
.related .k { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-soft); font-weight: 600; margin-bottom: 14px; }

/* article CTA */
.article-cta { border: 1px solid var(--accent); background: var(--surface); padding: 30px 32px; margin-top: 40px; }
.article-cta h2 { border: 0; padding: 0; margin: 0; font-size: 1.3rem; }
.article-cta p { color: var(--muted); font-size: .92rem; margin-top: 10px; max-width: 56ch; }
.article-cta .btn { margin-top: 18px; }

/* ---------- about-the-doctor (profile hub) ---------- */
.profile-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; margin-top: 34px; }
@media (max-width: 860px) { .profile-grid { grid-template-columns: 1fr; } }
.cv { border: 1px solid var(--line); background: var(--surface); }
.cv .row { padding: 18px 24px; border-top: 1px solid var(--line); display: flex; gap: 16px; }
.cv .row:first-child { border-top: 0; }
.cv .row .y { flex: 0 0 84px; font-size: .8rem; color: var(--brass); font-weight: 600; font-variant-numeric: tabular-nums; }
.cv .row .t { font-size: .92rem; }
.cv .row .t small { display: block; color: var(--muted); margin-top: 3px; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(14px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
  .rise.d1 { animation-delay: .06s } .rise.d2 { animation-delay: .12s } .rise.d3 { animation-delay: .18s }
  @keyframes rise { to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .rise { opacity: 1 !important; transform: none !important; }   /* never leave content hidden when motion is off */
}

/* ---------- large desktop ---------- */
@media (min-width: 1240px) {
  .wrap { max-width: 1180px; }
  section { padding: 88px 0; }
}
