:root {
  --ink: #18232c;
  --muted: #5e6a72;
  --paper: #f7f5ef;
  --surface: #fffefa;
  --line: #d7d3c8;
  --navy: #173a52;
  --accent: #9a6231;
  --accent-soft: #eee4d6;
  --max: 1180px;
  --reading: 72ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  line-height: 1.95;
  text-rendering: optimizeLegibility;
}
a { color: var(--navy); text-underline-offset: .2em; }
a:hover { color: var(--accent); }
.reading-progress { position: fixed; z-index: 100; inset: 0 0 auto; height: 3px; }
.reading-progress span { display: block; width: 0; height: 100%; background: var(--accent); }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 68px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(10px);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}
.site-name { display: flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; font-weight: 650; letter-spacing: .02em; }
.mark { display: grid; place-items: center; width: 34px; height: 34px; color: white; background: var(--navy); font: 700 11px/1 sans-serif; letter-spacing: .08em; }
.site-header nav { display: flex; align-self: stretch; gap: 1.5rem; }
.site-header nav a { display: flex; align-items: center; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: .85rem; }
.site-header nav a.active { border-color: var(--accent); color: var(--ink); }

.eyebrow, .rail-label {
  margin: 0 0 .65rem;
  color: var(--accent);
  font: 700 .72rem/1.4 -apple-system, BlinkMacSystemFont, "Yu Gothic", sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.home-intro { max-width: var(--max); margin: 0 auto; padding: clamp(5rem, 10vw, 9rem) 24px 5rem; }
.home-intro h1 { margin: 0; color: var(--navy); font-size: clamp(2.6rem, 7vw, 5.8rem); font-weight: 500; line-height: 1.18; letter-spacing: -.035em; }
.title-line { display: block; white-space: nowrap; }
.lead { max-width: 44em; margin: 2rem 0 0; font-size: clamp(1.05rem, 2vw, 1.28rem); }
.intro-links { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-top: 2.25rem; font-family: -apple-system, BlinkMacSystemFont, "Yu Gothic", sans-serif; font-size: .9rem; }
.primary-link { padding: .65rem 1rem; color: white; background: var(--navy); text-decoration: none; }
.primary-link:hover { color: white; background: var(--accent); }

.era-strip { border-block: 1px solid var(--line); background: var(--surface); }
.era-strip > * { max-width: var(--max); margin-inline: auto; }
.section-heading { padding: 4rem 24px 1.75rem; }
.section-heading h2, .method-band h2 { margin: 0; color: var(--navy); font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 500; line-height: 1.35; }
.section-heading > p:last-child { max-width: 50em; color: var(--muted); }
.era-strip ol { display: grid; grid-template-columns: repeat(6, 1fr); padding: 0 24px 4rem; list-style: none; }
.era-strip li { position: relative; min-height: 7rem; padding: 1rem 1rem 0; border-top: 2px solid var(--navy); }
.era-strip li::before { position: absolute; top: -6px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); content: ""; }
.era-strip time { display: block; color: var(--navy); font: 700 .85rem/1.4 sans-serif; }
.era-strip span { display: block; margin-top: .55rem; font-size: .87rem; line-height: 1.6; }

.archive-grid { max-width: var(--max); margin: 0 auto; padding-bottom: 5rem; }
.device-index { margin: 0 24px; padding: 0; border-top: 1px solid var(--line); list-style: none; counter-reset: devices; }
.device-index li { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; align-items: baseline; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.device-no { color: var(--accent); font: 600 .8rem/1 sans-serif; letter-spacing: .12em; }
.device-index strong { color: var(--navy); font-size: 1.12rem; font-weight: 600; }
.device-index small { margin-left: 1rem; color: var(--muted); font-size: .86rem; }
.method-band { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4rem; max-width: var(--max); margin: 0 auto 5rem; padding: 3.5rem 24px; border-block: 1px solid var(--line); }
.method-band p:last-child { margin: 0; }
.future-media { max-width: var(--max); margin: 0 auto; padding: 0 24px 6rem; }

.media-slot { display: grid; place-items: center; min-height: 220px; padding: 2rem; border: 1px dashed #a9a69d; color: var(--muted); background: repeating-linear-gradient(-45deg, transparent 0 12px, rgba(23,58,82,.025) 12px 24px); text-align: center; }
.media-slot span { color: var(--navy); font: 700 .76rem/1.4 sans-serif; letter-spacing: .12em; }
.media-slot p { max-width: 34em; margin: .7rem 0 0; font-size: .88rem; }

.article-masthead { max-width: var(--max); margin: 0 auto; padding: 4.5rem 24px 2rem; border-bottom: 1px solid var(--line); }
.article-deck { max-width: 48em; margin: 0; font-size: 1.05rem; }
.article-layout { display: grid; grid-template-columns: 250px minmax(0, var(--reading)); gap: clamp(3rem, 7vw, 7rem); max-width: var(--max); margin: 0 auto; padding: 3rem 24px 7rem; }
.article-rail { align-self: start; position: sticky; top: 100px; font-family: -apple-system, BlinkMacSystemFont, "Yu Gothic", sans-serif; }
.article-rail ol { margin: 0; padding: 0; list-style: none; }
.article-rail li { border-top: 1px solid var(--line); }
.article-rail a { display: block; padding: .7rem 0; color: var(--muted); text-decoration: none; font-size: .78rem; line-height: 1.5; }
.article-rail a:hover, .article-rail a.current { color: var(--accent); }
.toc-toggle { display: none; }
.prose { min-width: 0; }
.article-slot { margin-bottom: 3.5rem; min-height: 180px; }
.article-title { margin: 0 0 3rem; color: var(--navy); font-size: clamp(2rem, 4.6vw, 3.65rem); font-weight: 500; line-height: 1.3; letter-spacing: -.025em; }
.section-title { margin: 4.5rem 0 1.4rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--navy); font-size: clamp(1.35rem, 2.5vw, 1.75rem); font-weight: 600; line-height: 1.5; }
.section-title.references { margin-top: 6rem; }
.prose p { margin: 0 0 1.55rem; font-size: 1rem; }
.prose .references ~ p, .prose h2.references + p { padding-left: 1.25rem; text-indent: -1.25rem; font-size: .86rem; line-height: 1.75; overflow-wrap: anywhere; }
.prose a { overflow-wrap: anywhere; }
.prose em { font-family: Georgia, "Times New Roman", serif; }

.site-footer { display: flex; justify-content: space-between; gap: 2rem; max-width: var(--max); margin: 0 auto; padding: 2.5rem 24px; border-top: 1px solid var(--line); color: var(--muted); font-family: sans-serif; font-size: .78rem; }
.site-footer p { margin: 0; }

@media (max-width: 820px) {
  .site-header { position: static; display: block; padding: 14px 20px 0; }
  .site-name { padding-bottom: 12px; }
  .site-header nav { gap: 1.2rem; overflow-x: auto; }
  .site-header nav a { min-height: 42px; white-space: nowrap; }
  .home-intro { padding-top: 4rem; }
  .home-intro h1 { font-size: clamp(2rem, 9vw, 2.65rem); }
  .era-strip ol { grid-template-columns: 1fr; }
  .era-strip li { min-height: auto; padding: .75rem 0 .75rem 1.4rem; border-top: 0; border-left: 2px solid var(--navy); }
  .era-strip li::before { top: 1.15rem; left: -6px; }
  .device-index li { grid-template-columns: 2.7rem 1fr; }
  .device-index small { display: block; margin: .2rem 0 0; }
  .method-band { grid-template-columns: 1fr; gap: 1.5rem; }
  .article-masthead { padding-top: 3rem; }
  .article-layout { display: block; padding-top: 1.5rem; }
  .article-rail { position: static; margin-bottom: 2.5rem; border: 1px solid var(--line); background: var(--surface); }
  .toc-toggle { display: block; width: 100%; padding: 1rem; border: 0; color: var(--navy); background: transparent; font: 600 .85rem sans-serif; text-align: left; }
  .toc-toggle::after { float: right; content: "+"; }
  .toc-toggle[aria-expanded="true"]::after { content: "−"; }
  .toc-panel { display: none; padding: 0 1rem 1rem; }
  .toc-panel.open { display: block; }
  .rail-label { display: none; }
  .article-slot { min-height: 140px; }
  .site-footer { display: block; }
  .footer-note { margin-top: .6rem !important; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }


/* v0.5: restrained archive hierarchy and timeline presentation */
.home-intro { padding-top: clamp(3.5rem, 7vw, 5.5rem); padding-bottom: 3.25rem; }
.home-intro h1 { max-width: 24em; font-size: clamp(1.85rem, 3.3vw, 2.35rem); line-height: 1.45; letter-spacing: 0; }
.lead { max-width: 58em; margin-top: 1.1rem; font-size: 1rem; }
.intro-links { gap: .75rem 1.5rem; margin-top: 1.25rem; }
.intro-links a, .related-link a { text-underline-offset: .22em; }
.timeline-section { padding-bottom: 3.5rem; border-block: 1px solid var(--line); background: var(--surface); }
.timeline-section .section-heading { padding-bottom: 1rem; }
.section-heading h2 { font-size: 1.65rem; }
.section-heading > p:last-child { margin-bottom: .4rem; font-size: .92rem; }
.timeline-legend { display:flex; align-items:center; flex-wrap:wrap; gap:.45rem .9rem; max-width:var(--max); margin:0 auto 1rem; padding-inline:24px; font: .75rem/1.5 -apple-system,BlinkMacSystemFont,"Yu Gothic",sans-serif; color:var(--muted); }
.timeline-legend i { font-style:normal; white-space:nowrap; }
.timeline-legend i::before { display:inline-block; width:.65rem; height:.65rem; margin-right:.35rem; border-radius:50%; background:var(--theme-color); content:""; }
.legend-atomic { --theme-color:#466C98; } .legend-noble { --theme-color:#A27F40; } .legend-molecular { --theme-color:#98648B; }
.legend-cluster { --theme-color:#4C866C; } .legend-environment { --theme-color:#B56F3B; } .legend-imaging { --theme-color:#6879A9; }
.timeline-table { display:grid; grid-template-columns:4.5rem 1fr 1fr 1.18fr; max-width:var(--max); margin-inline:auto; padding-inline:24px; border-top:1px solid var(--line); font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif; }
.timeline-header, .timeline-row { display:contents; }
.timeline-header > span { grid-row:1; position:sticky; top:0; z-index:2; padding:.65rem .7rem; border-bottom:1px solid var(--line); background:var(--paper); color:var(--navy); font-size:.78rem; font-weight:700; }
.timeline-header > span:nth-child(1) { grid-column:1; }
.timeline-header > span:nth-child(2) { grid-column:2; }
.timeline-header > span:nth-child(3) { grid-column:3; }
.timeline-header > span:nth-child(4) { grid-column:4; }
.timeline-year, .timeline-cell { min-width:0; padding:.72rem .7rem; border-bottom:1px solid var(--line); }
.timeline-year { color:var(--navy); font-weight:700; font-size:.78rem; }
.year-suffix { color:var(--muted); font-size:.66rem; font-weight:400; }
.timeline-cell { font-size:.76rem; line-height:1.45; }
.timeline-cell::before { display:none; }
.world-event { margin:0 0 .25rem; }
.timeline-dash { color:#a5a198; }
.theme-cell { display:flex; flex-wrap:wrap; align-content:flex-start; gap:.25rem; }
.theme-tag { display:inline-flex; align-items:center; gap:.35rem; margin:0 0 .15rem; color:var(--ink); font-size:.7rem; line-height:1.35; }
.theme-tag::before { flex:0 0 .35rem; width:.35rem; height:.35rem; border-radius:50%; background:var(--theme-color); content:""; }
.device-cell { display:flex; flex-direction:column; gap:.5rem; }
.device-event { padding-left:.55rem; border-left:3px solid var(--device-color); }
.device-event strong, .whole-row-link { color:var(--navy); font-weight:650; }
.device-event small { display:block; color:var(--muted); font-size:.69rem; line-height:1.4; }
.event-date { color:var(--accent); font-weight:700; white-space:nowrap; }
.timeline-note { max-width:var(--max); margin:1rem auto 0; padding:0 24px; color:var(--muted); font-size:.78rem; }
.archive-grid { padding-bottom:3.5rem; }
.device-index { border-top:1px solid var(--line); }
.device-item { padding:0 !important; }
.device-item-link { display:grid; grid-template-columns:4rem 1fr; gap:1rem; align-items:baseline; width:100%; padding:1.05rem 0; color:inherit; text-decoration:none; }
.device-item-link { grid-column:1 / -1; }
.device-item-link:hover { background:rgba(23,58,82,.035); }
.device-item-link strong { color:var(--navy); }
.device-item-link small { display:block; margin:.2rem 0 0; color:var(--muted); }
.device-item > span:not(.device-no) { display:block; padding:1.05rem 0; }
.device-item > span > strong { color:var(--navy); font-size:1.03rem; }
.device-item > span > small { display:block; margin:.2rem 0 0; color:var(--muted); }
.article-masthead { padding-top:3.1rem; padding-bottom:1.2rem; }
.article-masthead .article-title, .article-title { margin:0; color:var(--navy); font-size:1.9rem; font-weight:600; line-height:1.45; letter-spacing:0; }
.article-deck { margin:1rem 0 .65rem; font-size:1rem; }
.article-layout { grid-template-columns:240px minmax(0,var(--reading)); }
.article-rail a { font-size:.82rem; }
.toc-panel { max-height:calc(100vh - 125px); overflow:auto; }
.section-title { margin-top:3.2rem; padding-top:1.1rem; font-size:1.42rem; line-height:1.5; scroll-margin-top:1.4rem; }
.prose h2.intro-title { margin-top:0; }
.prose p.related-link { margin:2.1rem 0; padding:.9rem 0; border-block:1px solid var(--line); font-size:.9rem; }
.research-layout { align-items:start; }
.research-prose > .article-title { margin:0 0 1.3rem; }
.research-prose h2[id^="research-"] { scroll-margin-top:1.2rem; }
@media (max-width: 820px) {
  .home-intro { padding:3.1rem 20px 2.6rem; }
  .home-intro h1 { font-size:1.62rem; line-height:1.45; }
  .timeline-section .section-heading, .section-heading { padding:2.5rem 20px 1rem; }
  .section-heading h2 { font-size:1.35rem; }
  .timeline-legend { padding-inline:20px; font-size:.72rem; }
  .timeline-table { display:block; padding:0 20px; }
  .timeline-header { display:none; }
  .timeline-row { display:grid; grid-template-columns:1fr; margin:0; padding:.75rem 0; border-bottom:1px solid var(--line); }
  .timeline-year { padding:.2rem 0 .45rem; border:0; font-size:.9rem; }
  .timeline-cell { display:grid; grid-template-columns:7.2rem minmax(0,1fr); gap:.6rem; padding:.4rem 0; border:0; font-size:.82rem; }
  .timeline-cell::before { display:block; content:attr(data-lane); color:var(--muted); font-size:.72rem; font-weight:650; }
  .theme-cell { display:grid; grid-template-columns:7.2rem minmax(0,1fr); align-items:start; }
  .theme-tag { font-size:.76rem; }
  .device-cell { display:grid; grid-template-columns:7.2rem minmax(0,1fr); align-items:start; }
  .device-event { grid-column:2; }
  .timeline-note { padding-inline:20px; }
  .device-index { margin-inline:20px; }
  .device-item-link { grid-template-columns:2.7rem minmax(0,1fr); gap:.65rem; padding:.9rem 0; }
  .device-index strong { font-size:1rem; }
  .article-masthead { padding:2.25rem 20px 1rem; }
  .article-masthead .article-title, .article-title { font-size:1.56rem; line-height:1.45; }
  .article-layout { padding:1.2rem 20px 4rem; }
  .article-rail { margin-bottom:1.5rem; }
  .article-rail a { font-size:.875rem; }
  .toc-panel { max-height:60vh; }
  .section-title { margin:2.6rem 0 1rem; padding-top:.85rem; font-size:1.28rem; line-height:1.5; }
  .prose p { font-size:1rem; }
  .research-layout { display:flex; flex-direction:column; }
  .research-layout .article-rail { order:0; width:100%; }
  .research-prose { order:1; }
  .research-prose > .article-title { font-size:1.56rem; }
}


/* Ver.0.6: approved Ver.7 timeline SVG */
.timeline-section {
  position: relative;
  left: 50%;
  width: min(1500px, calc(100vw - 40px));
  margin: 0;
  padding: 0 0 .75rem;
  transform: translateX(-50%);
}
.timeline-section .timeline-heading {
  max-width: none;
  margin: 0;
  padding: 1.25rem 0 .65rem;
}
.timeline-section .timeline-heading .eyebrow { margin-bottom: .25rem; }
.timeline-section .timeline-heading h2 { font-size: 1.65rem; }
.timeline-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  background: var(--surface);
  scrollbar-gutter: stable;
}
.timeline-svg { display: block; width: 1500px; max-width: none; height: auto; }
.timeline-device-link { cursor: pointer; }
.timeline-device-link:focus-visible { outline: 3px solid #9a6231; outline-offset: 2px; }
@media (max-width: 820px) {
  .timeline-section { width: calc(100vw - 32px); padding-bottom: .5rem; }
  .timeline-section .timeline-heading { padding: .9rem 0 .45rem; }
  .timeline-section .timeline-heading h2 { font-size: 1.3rem; }
}

/* Ver.0.7: fit the complete chronology to the page and offer an original-size view. */
.timeline-section {
  box-sizing: border-box;
  position: static;
  left: auto;
  width: min(100%, 1180px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px .75rem;
  transform: none;
}
.timeline-section .timeline-heading { padding: 1.15rem 0 .5rem; }
.timeline-open {
  display: block;
  margin: 0 0 .35rem auto;
  padding: .42rem .75rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  background: white;
  font: inherit;
  cursor: pointer;
}
.timeline-scroll { overflow: hidden; scrollbar-gutter: auto; }
.timeline-svg { display:block; width:100%; max-width:100%; height:auto; }
.timeline-dialog {
  width: min(96vw, 1600px);
  max-width: none;
  max-height: 94vh;
  padding: .75rem;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}
.timeline-dialog::backdrop { background: rgb(15 30 42 / .78); }
.timeline-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.5rem; }
.timeline-dialog-head p { margin:0; font-weight:600; }
.timeline-dialog-head button { padding:.4rem .8rem; }
.timeline-dialog-scroll { max-width:100%; max-height:calc(94vh - 4.5rem); overflow:auto; }
.timeline-dialog-scroll .timeline-svg { width:1500px; max-width:none; height:auto; }
@media (max-width: 820px) {
  .timeline-section { width:100%; padding:0 16px .5rem; }
  .timeline-section .timeline-heading { padding:.9rem 0 .4rem; }
}

/* Ver.1.0: research-history index follows the pre-existing instrument-history design. */
.research-home { border-bottom:1px solid var(--line); }
.research-home-index { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:2.8rem; list-style:none; padding:0 24px; margin:0; }
.research-home-index li { min-width:0; border-top:1px solid var(--line); }
.research-home-index a { display:grid; grid-template-columns:2.7rem minmax(0,1fr); gap:.75rem; padding:.85rem 0; color:var(--navy); text-decoration:none; font-size:.92rem; line-height:1.6; }
.research-home-index a:hover, .research-topic a:hover { color:var(--accent); text-decoration:underline; text-underline-offset:.18em; }
.research-home-no { color:var(--accent); font-weight:700; font-size:.85rem; font-variant-numeric:tabular-nums; }
.research-topic-index { margin:2.25rem 24px 1rem; padding:1.4rem 0 0; border-top:1px solid var(--line); }
.research-topic-index h3 { margin:0; font-size:1rem; line-height:1.5; color:var(--navy); }
.research-topic-caption { margin:.4rem 0 1rem; font-size:.8rem; color:var(--muted); }
.research-topic { display:grid; grid-template-columns:11rem minmax(0,1fr); gap:1rem; padding:.7rem 0; border-top:1px solid var(--line); scroll-margin-top:95px; }
.research-topic > strong { font-size:.82rem; font-weight:650; color:var(--navy); }
.research-topic-links { display:flex; flex-wrap:wrap; gap:.25rem .9rem; }
.research-topic a { font-size:.79rem; line-height:1.7; color:var(--ink); text-decoration:none; }
.research-topic:target { outline:2px solid var(--accent); outline-offset:4px; }
.timeline-theme-link { cursor:pointer; }
.timeline-theme-link:focus-visible { outline:3px solid #9a6231; outline-offset:2px; }
.timeline-device-link:hover, .timeline-theme-link:hover { filter:brightness(.90); }
@media (max-width:820px) {
  .research-home-index { grid-template-columns:1fr; padding-inline:20px; }
  .research-topic-index { margin:1.5rem 20px 1rem; }
  .research-topic { grid-template-columns:1fr; gap:.2rem; scroll-margin-top:20px; }
  .research-home-index a { font-size:.87rem; }
}

/* Explicit italic for mass-spectrum notation on all pages. */
.mz, .prose em { font-style: italic !important; font-family: "Times New Roman", Georgia, "Liberation Serif", serif; font-synthesis: style; }

/* Keep the site mark and navigation stable with the longer site title. */
.site-name { min-width: 0; }
.site-name .mark { flex: 0 0 34px; }
.site-name > span:last-child { min-width: 0; line-height: 1.5; overflow-wrap: anywhere; }
.site-header nav { flex-shrink: 0; }
.site-header nav a { white-space: nowrap; }
