:root {
  --paper: #f7f7f4;
  --surface: #ffffff;
  --ink: #161816;
  --muted: #646963;
  --line: #cfd2cc;
  --line-strong: #8e948d;
  --sage: #dfe8dc;
  --rust: #9a452e;
  --blue: #24597a;
  --dark: #1d211e;
  --max: 1220px;
  --reading: 760px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  transform: translateY(-150%);
  background: var(--ink);
  color: white;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 244, .96);
  backdrop-filter: blur(10px);
}
.header-inner {
  width: min(var(--max), calc(100% - 48px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 30px;
}
.brand {
  display: grid;
  text-decoration: none;
  line-height: 1.2;
}
.brand strong {
  font-family: Georgia, "Yu Mincho", serif;
  font-size: 17px;
  font-weight: 400;
}
.brand span { color: var(--muted); font-size: 10px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.site-nav a { font-size: 13px; text-decoration: none; }
.site-nav a:not(.header-cta):hover { text-decoration: underline; text-underline-offset: 5px; }
.header-cta, .button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: white;
  text-decoration: none;
}
.header-cta:hover, .button:hover { background: transparent; color: var(--ink); }
.menu-button { display: none; margin-left: auto; border: 0; background: transparent; cursor: pointer; }

.shell { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.eyebrow {
  margin: 0 0 20px;
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  line-height: 1.4;
  text-transform: uppercase;
}
h1, h2, h3, h4 {
  margin-top: 0;
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-weight: 400;
  line-height: 1.35;
}

.home-hero {
  min-height: 700px;
  padding: 70px 0 54px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.hero-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 68px; align-items: start; }
.home-hero h1 { max-width: 10em; margin-bottom: 28px; font-size: 64px; line-height: 1.12; }
.hero-lead { max-width: 680px; margin: 0; color: #3d423e; font-size: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 34px; }
.button-secondary { background: transparent; color: var(--ink); }
.button-secondary:hover { background: var(--ink); color: white; }
.research-plate { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
.research-plate figure { min-width: 0; margin: 0; padding: 12px; }
.research-plate img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: white; }
.research-plate figcaption { margin-top: 10px; color: var(--muted); font-size: 11px; }
.domain-strip { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 48px; border-top: 1px solid var(--ink); }
.domain-strip div { min-width: 0; padding: 16px 12px 8px 0; border-right: 1px solid var(--line); }
.domain-strip div + div { padding-left: 12px; }
.domain-strip div:last-child { border-right: 0; }
.domain-strip span { display: block; color: var(--muted); font-size: 10px; }
.domain-strip strong { font-family: Georgia, serif; font-size: 14px; font-weight: 400; }

.band { padding-block: 110px; }
.band-white { background: var(--surface); }
.band-sage { background: var(--sage); }
.band-dark { background: var(--dark); color: white; }
.section-head { max-width: 860px; margin-bottom: 58px; }
.section-head h2 { margin-bottom: 0; font-size: 48px; }
.section-head p:last-child { max-width: 700px; color: var(--muted); font-size: 18px; }
.band-dark .eyebrow, .band-dark .section-head p:last-child { color: #bec5bf; }

.ruled-list { border-top: 1px solid var(--ink); }
.ruled-row {
  display: grid;
  grid-template-columns: 80px 1.2fr 2fr;
  gap: 26px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.ruled-row > span { color: var(--muted); font-family: Consolas, monospace; font-size: 11px; }
.ruled-row h3 { margin: 0; font-size: 25px; }
.ruled-row p { margin: 0; color: var(--muted); }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #5b625c; }
.metric-grid article { padding: 30px 26px 30px 0; border-right: 1px solid #5b625c; }
.metric-grid article + article { padding-left: 26px; }
.metric-grid article:last-child { border-right: 0; }
.metric { margin: 0 0 42px; font-family: Georgia, serif; font-size: 60px; line-height: 1; }
.metric-grid h3 { font-size: 17px; }
.metric-grid p:last-child { color: #c7ccc8; font-size: 14px; }

.link-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.link-item { min-width: 0; padding: 30px 28px 34px 0; border-right: 1px solid var(--line); }
.link-item + .link-item { padding-left: 28px; }
.link-item:last-child { border-right: 0; }
.link-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 24px; background: #e7e9e5; }
.link-item h3 { min-height: 2.7em; font-size: 25px; }
.link-item p { color: var(--muted); }
.text-link { text-underline-offset: 5px; }

.page-hero { padding: 86px 0 72px; border-bottom: 1px solid var(--line); background: var(--surface); }
.page-hero h1 { max-width: 900px; margin-bottom: 22px; font-size: 54px; }
.page-hero p:last-child { max-width: 700px; margin: 0; color: var(--muted); font-size: 18px; }
.page-content { padding-block: 90px 130px; }
.prose { width: 100%; margin-inline: 0; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { margin: 92px 0 16px; padding-top: 24px; border-top: 1px solid var(--ink); font-size: 36px; }
.prose h3 { margin: 58px 0 14px; font-size: 27px; }
.prose h4 { margin: 40px 0 12px; font-size: 21px; }
.prose p { margin: 0 0 24px; }
.prose img { width: auto; max-height: 760px; margin: 34px auto; object-fit: contain; }
.prose hr { height: 1px; margin: 70px 0; border: 0; background: var(--line); }
.prose table { width: 100%; margin: 36px 0; border-collapse: collapse; }
.prose td, .prose th { padding: 12px; border: 1px solid var(--line); vertical-align: top; }
.prose blockquote { margin: 36px 0; padding: 8px 0 8px 24px; border-left: 3px solid var(--rust); color: var(--muted); }
.prose ul, .prose ol { padding-left: 24px; }
.prose a { text-underline-offset: 4px; overflow-wrap: anywhere; }

.services-intro { margin-bottom: 72px; padding: 28px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.services-intro p { max-width: 800px; margin: 0; font-size: 20px; }
.source-content > table:first-of-type { table-layout: fixed; }
.source-content > table:first-of-type td { border: 0; }

.news-list { border-top: 1px solid var(--ink); }
.news-item { display: grid; grid-template-columns: 160px 1fr 180px; gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.news-item time { color: var(--muted); font-family: Consolas, monospace; font-size: 11px; }
.news-item h2 { margin: 0 0 10px; font-size: 24px; }
.news-item p { margin: 0; color: var(--muted); }
.news-item img { width: 180px; aspect-ratio: 16 / 10; object-fit: cover; background: #e3e6e2; }
.pagination { display: flex; gap: 16px; margin-top: 44px; }

.contact-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; }
.contact-layout h2 { font-size: 34px; }
.contact-layout p { color: var(--muted); }
.contact-form { border-top: 1px solid var(--ink); }
.contact-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form button:disabled { cursor: wait; opacity: .65; }
.field { padding: 18px 0; border-bottom: 1px solid var(--line); }
.field label { display: block; margin-bottom: 8px; font-size: 13px; }
.field input, .field textarea { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 0; background: white; }
.field textarea { min-height: 180px; resize: vertical; }
.form-note { margin-top: 14px; font-size: 12px; }

.site-footer { padding: 60px 0; background: var(--dark); color: white; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 50px; }
.footer-brand { display: grid; }
.footer-brand strong { font-family: Georgia, serif; font-size: 22px; font-weight: 400; }
.footer-brand span, .site-footer small { color: #adb4ae; font-size: 11px; }
.footer-nav { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 28px; }
.footer-nav a { color: #d9ddd9; font-size: 13px; }
.site-footer small { display: block; margin-top: 46px; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 920px) {
  .menu-button { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 12px 24px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }
  .site-nav.is-open { display: grid; }
  .site-nav a { padding: 12px 4px; }
  .site-nav .header-cta { grid-column: 1 / -1; margin-top: 10px; }
  .hero-layout, .contact-layout { grid-template-columns: 1fr; }
  .research-plate { max-width: 700px; }
  .domain-strip { grid-template-columns: repeat(3, 1fr); }
  .domain-strip div:nth-child(3) { border-right: 0; }
  .domain-strip div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid article:nth-child(2) { border-right: 0; }
  .metric-grid article:nth-child(n+3) { border-top: 1px solid #5b625c; }
  .news-item { grid-template-columns: 120px 1fr; }
  .news-item img { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .header-inner, .shell { width: min(100% - 32px, var(--max)); }
  .brand strong { font-size: 15px; }
  .home-hero { min-height: 0; padding-top: 48px; }
  .home-hero h1 { font-size: 42px; }
  .research-plate figure { padding: 8px; }
  .hero-lead { font-size: 17px; }
  .domain-strip { grid-template-columns: 1fr 1fr; }
  .domain-strip div:nth-child(2n) { border-right: 0; }
  .domain-strip div:nth-child(3) { border-right: 1px solid var(--line); }
  .domain-strip div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .band { padding-block: 76px; }
  .section-head h2 { font-size: 36px; }
  .ruled-row { grid-template-columns: 44px 1fr; gap: 12px; }
  .ruled-row p { grid-column: 2; }
  .metric-grid, .link-grid { grid-template-columns: 1fr; }
  .metric-grid article, .metric-grid article + article { padding: 24px 0; border-right: 0; border-top: 1px solid #5b625c; }
  .link-item, .link-item + .link-item { padding: 28px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .page-hero { padding: 58px 0 48px; }
  .page-hero h1 { font-size: 38px; overflow-wrap: anywhere; }
  .page-content { padding-block: 62px 90px; }
  .prose h2 { margin-top: 64px; font-size: 30px; }
  .prose h3 { font-size: 24px; }
  .prose table { display: block; overflow-x: auto; }
  .source-content > table:first-of-type, .source-content > table:first-of-type tbody, .source-content > table:first-of-type tr, .source-content > table:first-of-type td { display: block; width: 100%; }
  .news-item { grid-template-columns: 1fr; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
