/* Layers B (researchers and companies) and C (science museum) of the Wagatsuma Lab site.
   Dark and white layouts follow the LE2026 invited-talk deck (slate #1c2529, red accent). No grey body text. */
:root {
  --slate: #1c2529; --slate2: #26323a; --slate3: #304048; --line-d: #46565f;
  --paper: #ffffff; --soft: #f2f4f5; --line-l: #d5dbde;
  --ink: #111111; --white: #ffffff;
  --red: #ff6a5c; --red-ink: #c0281e; --band: #3c2427; --band-line: #9c4038;
  --blue: #1d79e3; --blue-d: #7fb6ff;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, "Noto Sans Mono", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.85; color: var(--ink); background: var(--paper); }
html[lang="en"] body { line-height: 1.7; }
img, svg { max-width: 100%; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- layer bar (shared by A, B, C) ---------- */
.lb { position: sticky; top: 0; z-index: 50; background: var(--slate); color: var(--white); border-bottom: 1px solid var(--line-d); }
.lb__in { max-width: 1120px; margin: 0 auto; padding: 8px 24px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lb__brand { font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; margin-right: auto; }
.lb__brand small { font-weight: 500; font-size: 12px; margin-left: 8px; }
.lb__layers { display: flex; gap: 6px; flex-wrap: wrap; }
.lb__layers a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-d); font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.lb__layers a b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--white); color: var(--slate); font-size: 12px; }
.lb__layers a[aria-current="page"] { background: var(--white); color: var(--slate); border-color: var(--white); }
.lb__layers a[aria-current="page"] b { background: var(--red-ink); color: var(--white); }
.lb__layers a:hover { border-color: var(--white); }
.lb__lang { font-size: 13.5px; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--red-ink); text-decoration: none; white-space: nowrap; }
@media (max-width: 760px) {
  .lb__in { padding: 8px 14px; gap: 8px; }
  .lb__brand small { display: none; }
  .lb__layers a { padding: 4px 9px; font-size: 12.5px; }
  .lb__layers a span { display: none; }
  .lb__layers a[aria-current="page"] span { display: inline; }
}

/* ---------- sections ---------- */
.sec { padding: 84px 0; }
.sec.dark { background: var(--slate); color: var(--white); }
.sec.light { background: var(--paper); color: var(--ink); }
.sec.soft { background: var(--soft); color: var(--ink); }
.kicker { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; padding: 3px 12px; border-radius: 999px; border: 1.5px solid currentColor; margin-bottom: 18px; }
h1, h2, h3 { line-height: 1.35; margin: 0; }
h1 { font-size: clamp(34px, 5.4vw, 60px); font-weight: 800; letter-spacing: .01em; }
h2 { font-size: clamp(25px, 3.2vw, 36px); font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; gap: 14px; }
h2 .no { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--red-ink); color: var(--white); font-size: 21px; }
h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.sub { font-size: 17px; font-weight: 600; margin: 4px 0 28px; }
.dark .sub { color: var(--white); }
.lead { font-size: 18.5px; font-weight: 500; max-width: 54em; }
p { margin: 0 0 1em; }
.big { font-size: clamp(24px, 3vw, 34px); font-weight: 800; line-height: 1.5; margin: 0 0 14px; }
.red { color: var(--red-ink); }
.dark .red { color: var(--red); }
.mono { font-family: var(--mono); }

/* hero */
.hero { padding: 96px 0 72px; position: relative; overflow: hidden; }
.hero .meta { font-size: 15px; font-weight: 600; margin: 20px 0 26px; }
.hero h1 + .h1sub { font-size: clamp(19px, 2.4vw, 26px); font-weight: 700; margin-top: 12px; }
.hero__fig { position: absolute; right: -60px; top: 40px; width: 520px; opacity: .22; pointer-events: none; }
@media (max-width: 900px) { .hero__fig { display: none; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.chips a { text-decoration: none; font-size: 14px; font-weight: 700; padding: 6px 14px; border-radius: 999px; border: 1.5px solid currentColor; }
.chips a:hover { background: var(--white); color: var(--slate); }
.light .chips a:hover { background: var(--ink); color: var(--white); }

/* cards and grids */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 960px) { .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .g2, .g4, .g5 { grid-template-columns: 1fr; } }
.card { border-radius: 12px; padding: 22px 22px 18px; }
.dark .card { background: var(--slate2); border: 1px solid var(--line-d); }
.light .card { background: var(--soft); border: 1px solid var(--line-l); }
.soft .card { background: var(--paper); border: 1px solid var(--line-l); }
.card .tag { font-size: 13px; font-weight: 800; letter-spacing: .04em; margin-bottom: 6px; }
.dark .card .tag { color: var(--red); }
.light .card .tag, .soft .card .tag { color: var(--red-ink); }
.card p:last-child { margin-bottom: 0; }
.card ul { margin: 0; padding-left: 1.2em; }
.card li { margin: .25em 0; }
.ico { width: 56px; height: 56px; margin-bottom: 10px; }

/* stats */
.stat { text-align: center; border-radius: 12px; padding: 20px 12px 16px; }
.dark .stat { background: var(--slate2); border: 1px solid var(--line-d); }
.light .stat, .soft .stat { background: var(--soft); border: 1px solid var(--line-l); }
.stat__n { font-size: clamp(30px, 4vw, 44px); font-weight: 800; line-height: 1.15; }
.stat__n small { font-size: .5em; margin-left: 3px; }
.stat__l { font-size: 14.5px; font-weight: 600; margin-top: 6px; line-height: 1.5; }

/* the red band (as on the dark slides) */
.band { margin-top: 26px; padding: 18px 24px; border-radius: 10px; font-weight: 700; font-size: 18px; text-align: center; }
.dark .band { background: var(--band); border: 1.5px solid var(--band-line); color: var(--white); }
.light .band, .soft .band { background: #fff1ef; border: 1.5px solid var(--red-ink); color: var(--ink); }

/* table */
.tbl { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.tbl th { background: var(--slate); color: var(--white); font-weight: 700; padding: 10px 12px; text-align: left; }
.tbl td { border-bottom: 1px solid var(--line-l); padding: 12px; vertical-align: top; }
.dark .tbl td { border-bottom-color: var(--line-d); }
.dark .tbl th { background: var(--slate3); }
.tbl td.pit { color: var(--red-ink); font-weight: 600; }
.dark .tbl td.pit { color: var(--red); }
.tbl td:first-child { font-weight: 800; white-space: nowrap; }
@media (max-width: 760px) { .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; } .tbl thead { display: none; } .tbl tr { border-bottom: 2px solid var(--line-l); padding: 8px 0; } .tbl td { border: 0; padding: 4px 0; white-space: normal !important; } }

/* figures */
.fig { margin: 30px 0 6px; }
.fig svg { display: block; width: 100%; height: auto; }
.fig figcaption { font-size: 14.5px; font-weight: 600; margin-top: 8px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 36px; align-items: center; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }

/* timeline */
.tl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .tl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tl__i { border-radius: 10px; padding: 14px 16px; }
.dark .tl__i { background: var(--slate2); border: 1px solid var(--line-d); }
.light .tl__i { background: var(--soft); border: 1px solid var(--line-l); }
.tl__y { font-size: 24px; font-weight: 800; }
.tl__y small { font-size: 14px; color: var(--red); margin-left: 8px; }
.light .tl__y small { color: var(--red-ink); }
.tl__t { font-size: 15px; font-weight: 600; line-height: 1.55; }

/* sources */
.src { font-size: 13.5px; font-weight: 500; margin-top: 22px; }

/* next links */
.next { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 24px; }
.next a { display: block; text-decoration: none; border-radius: 12px; padding: 18px 20px; border: 1.5px solid currentColor; font-weight: 700; }
.next a span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.next a:hover { background: var(--white); color: var(--slate); }
.light .next a:hover, .soft .next a:hover { background: var(--ink); color: var(--white); }

/* footer */
.ft { background: #0f1517; color: var(--white); padding: 40px 0 46px; font-size: 14.5px; }
.ft a { color: var(--white); }
.ft p { margin: .2em 0; }

/* ---------- C: science museum ---------- */
.mu { background: #020504; color: #e8fff0; }
.mu .sec { padding: 72px 0; }
.mu-hero { position: relative; height: calc(100vh - 52px); min-height: 520px; overflow: hidden; background: #020504; }
.mu-hero iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mu-gate { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px;
  background: radial-gradient(ellipse at center, rgba(8, 40, 24, .55) 0%, rgba(2, 5, 4, .92) 70%); }
.mu-gate h1 { color: #ffffff; font-size: clamp(30px, 5vw, 58px); }
.mu-gate .mu-sub { font-size: clamp(16px, 2vw, 22px); font-weight: 700; color: #3dff8a; margin: 14px 0 6px; }
.mu-gate p { color: #ffffff; max-width: 34em; font-weight: 500; }
.mu-btn { display: inline-block; margin-top: 18px; padding: 14px 34px; border-radius: 999px; border: 2px solid #3dff8a; background: rgba(61, 255, 138, .12); color: #ffffff; font-size: 18px; font-weight: 800; cursor: pointer; text-decoration: none; font-family: var(--sans); }
.mu-btn:hover, .mu-btn:focus-visible { background: #3dff8a; color: #02150a; }
.mu-btn.small { font-size: 14px; padding: 8px 18px; margin: 0; background: rgba(2, 5, 4, .72); }
.mu-rain { position: absolute; inset: 0; pointer-events: none; opacity: .5; }
.mu-tools { position: absolute; left: 14px; top: 14px; display: none; gap: 8px; z-index: 3; }
.mu-hero.on .mu-tools { display: flex; }
.mu h2 { color: #ffffff; }
.mu .lead, .mu p, .mu li { color: #e8fff0; }
.mu .sec.alt { background: #06110b; }
.seed { border-radius: 14px; padding: 20px 20px 16px; background: #071a10; border: 1px solid #13492b; position: relative; }
.seed__dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: -1px; box-shadow: 0 0 12px currentColor; }
.seed__tag { font-family: var(--mono); font-size: 12.5px; font-weight: 700; }
.seed h3 { color: #ffffff; font-size: 21px; margin: 8px 0 6px; }
.seed .mirai { font-weight: 700; color: #ffffff; }
.seed dl { margin: 10px 0 0; font-size: 14.5px; }
.seed dt { font-weight: 800; color: #ffffff; margin-top: 8px; }
.seed dd { margin: 0; color: #e8fff0; }
.seed .eq { font-family: "STIX Two Math", "Cambria Math", "Times New Roman", serif; font-size: 16px; color: #ffffff; }
.levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; counter-reset: lv; }
@media (max-width: 760px) { .levels { grid-template-columns: 1fr; } }
.levels div { border-radius: 12px; padding: 14px 14px 12px; border: 1px solid #13492b; background: #071a10; }
.levels b { display: block; color: #3dff8a; font-size: 22px; }
.levels strong { color: #ffffff; }
.gest { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .gest { grid-template-columns: 1fr; } }
.gest div { border-radius: 12px; padding: 18px; background: #071a10; border: 1px solid #13492b; }
.gest svg { width: 64px; height: 64px; display: block; margin-bottom: 8px; }
.skies { display: flex; flex-wrap: wrap; gap: 8px; }
.skies span { padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; color: #ffffff; border: 1px solid #2a6a47; }
.credits { font-size: 13.5px; color: #e8fff0; }
.credits li { margin: .3em 0; }
.mu .next a { color: #ffffff; border-color: #3dff8a; }
.mu .next a:hover { background: #3dff8a; color: #02150a; }

/* ---------- A: three doors on the top page ---------- */
.doors { max-width: 1120px; margin: 60px auto 20px; padding: 0 24px; font-family: var(--sans); }
.doors * { font-size: inherit; color: inherit; font-family: inherit; }
.doors__h { font-size: 28px !important; font-weight: 800; color: #1D79E3 !important; text-align: center; margin: 0 0 6px; line-height: 1.4; }
.doors__s { font-size: 15px !important; font-weight: 600; text-align: center; margin: 0 0 22px; color: #111 !important; }
.doors__g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .doors__g { grid-template-columns: 1fr; } }
.door { display: block; text-decoration: none; border-radius: 16px; padding: 22px 22px 18px; border: 2px solid #ccdcf6; background: #fff; color: #111 !important; font-size: 15px !important; line-height: 1.7; }
.door:hover { border-color: #1D79E3; }
.door b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #1D79E3; color: #fff !important; font-size: 15px !important; margin-right: 8px; }
.door strong { font-size: 19px !important; font-weight: 800; }
.door span { display: block; margin-top: 8px; font-size: 14.5px !important; }
.door.b { background: #1c2529; border-color: #1c2529; color: #fff !important; }
.door.b b { background: #c0281e; }
.door.b span, .door.b strong { color: #fff !important; }
.door.c { background: #020504; border-color: #13492b; color: #e8fff0 !important; }
.door.c b { background: #00873f; }
.door.c span, .door.c strong { color: #ffffff !important; }
.light .fig .inv, .soft .fig .inv { fill: #ffffff; }
.dark .fig .inv { fill: #1c2529; }
@media (max-width: 680px) { .fig { overflow-x: auto; -webkit-overflow-scrolling: touch; } .fig svg { min-width: 620px; } }

/* 2026-11-24 w8: four entrances (A-D) in the layer bar. Give the bar more width on PC and hide the brand's
   sub-title on narrower PC screens, so that the "English" button stays on the same line. */
@media (min-width: 761px) { .lb__in { max-width: 1240px; } }
@media (min-width: 761px) and (max-width: 1299px) { .lb__brand small { display: none; } }
/* below 1100px: the brand and the language button share the first row, the four entrances take the second row */
@media (max-width: 1099px) {
  .lb__brand { order: 0; }
  .lb__lang { order: 1; }
  .lb__layers { order: 2; flex-basis: 100%; }
}
/* below 900px: only the current entrance keeps its name (as on phones) */
@media (max-width: 900px) {
  .lb__layers a span { display: none; }
  .lb__layers a[aria-current="page"] span { display: inline; }
}
