@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@400;500;600;700&family=M+PLUS+1p:wght@400;500;600;700&display=swap");

:root {
  --ink: #222;
  --muted: #62676c;
  --navy: #303840;
  --navy-deep: #272e35;
  --blue: #285c88;
  --line: #dfe2e5;
  --soft: #f5f6f7;
  --white: #fff;
  --sans: "Inter", "M PLUS 1p", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--white); font-family: var(--sans); line-height: 1.8; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input { font: inherit; }
::selection { color: #fff; background: var(--blue); }
.ambient { display: none; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 8px 12px; color: #fff; background: var(--blue); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 clamp(20px, 4vw, 62px); color: #fff; background: rgba(45,53,61,.97); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.brand { font: 600 20px var(--mono); letter-spacing: .05em; text-decoration: none; white-space: nowrap; }
.brand small { margin-left: 12px; color: rgba(255,255,255,.62); font: 500 10px var(--sans); letter-spacing: .04em; }
.site-header nav { display: flex; align-items: stretch; gap: 6px; height: 64px; }
.site-header nav a, .search-trigger { display: flex; align-items: center; padding: 0 15px; color: rgba(255,255,255,.92); border: 0; border-bottom: 3px solid transparent; background: transparent; font: 500 11px var(--mono); letter-spacing: .04em; text-decoration: none; cursor: pointer; }
.site-header nav a:hover, .site-header nav a[aria-current], .search-trigger:hover { border-bottom-color: #fff; background: rgba(255,255,255,.07); }

.hero { padding: 0; }
.hero-banner { display: grid; grid-template-columns: minmax(150px, 265px) 1fr minmax(150px, 265px); gap: clamp(20px, 7vw, 110px); align-items: center; min-height: 320px; padding: 34px clamp(24px, 5vw, 72px); color: #fff; background: linear-gradient(135deg, #333c45, #252c33); overflow: hidden; }
.hero-banner img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.hero-banner h1 { margin: 0; font: 600 clamp(48px, 6.4vw, 88px)/1.05 var(--mono); letter-spacing: .035em; text-align: center; white-space: nowrap; }
.hero-banner h1 small { display: block; margin-top: 18px; color: rgba(255,255,255,.68); font: 500 clamp(8px, .9vw, 12px) var(--mono); letter-spacing: .16em; }
.hero-intro { max-width: 1160px; margin: 0 auto; padding: 68px clamp(24px, 6vw, 92px) 84px; }
.kicker { margin: 0 0 18px; color: var(--blue); font: 500 12px var(--mono); letter-spacing: .05em; }
.hero-intro h2 { margin: 0 0 28px; font-size: clamp(34px, 4.5vw, 60px); font-weight: 600; letter-spacing: -.035em; line-height: 1.4; }
.hero-intro h2 span { color: var(--blue); }
.lead { max-width: 900px; margin: 0 0 18px; color: #383b3e; font-size: 17px; line-height: 2; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-width: 185px; padding: 12px 22px; border: 1px solid var(--blue); border-radius: 2px; font: 600 12px var(--mono); letter-spacing: .03em; text-decoration: none; transition: background .18s ease, color .18s ease; }
.button.primary { color: #fff; background: var(--blue); }
.button.primary:hover { background: #1f4a70; }
.button.ghost { color: var(--blue); background: #fff; }
.button.ghost:hover { background: #f1f5f8; }

.featured-section, .principles, .archive { padding: 90px clamp(24px, 6vw, 92px); }
.featured-section, .archive { background: var(--soft); }
.section-head { display: grid; grid-template-columns: 1fr minmax(280px, 430px); gap: 30px; align-items: end; max-width: 1180px; margin: 0 auto 42px; }
.section-head > div > span, .manifesto-band > p, .declaration > span, .article-meta, .back-link, .article-toc > span, .article-end > span, .not-found > span { color: var(--blue); font: 500 11px var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.section-head h2 { margin: 7px 0 0; font-size: clamp(30px, 3.8vw, 48px); font-weight: 600; letter-spacing: -.025em; line-height: 1.25; }
.section-head > p { margin: 0; color: var(--muted); font-size: 14px; }
.featured-grid, .article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 1180px; margin: auto; }
.article-card { display: flex; flex-direction: column; min-height: 330px; padding: 26px; border: 1px solid var(--line); border-radius: 2px; background: #fff; box-shadow: 0 2px 7px rgba(0,0,0,.04); transition: transform .16s ease, box-shadow .16s ease; }
.article-card:hover { transform: translateY(-3px); box-shadow: 0 7px 20px rgba(0,0,0,.08); }
.card-meta, .card-foot { display: flex; justify-content: space-between; color: #777d82; font: 400 10px var(--mono); }
.card-meta span { color: var(--blue); font-weight: 700; }
.article-card h3 { margin: 48px 0 16px; font-size: 21px; font-weight: 600; letter-spacing: -.015em; line-height: 1.55; }
.article-card h3 a { text-decoration: none; }
.article-card > p { margin: 0 0 25px; color: var(--muted); font-size: 14px; }
.card-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.card-foot a { color: var(--blue); font-weight: 600; text-decoration: none; }

.manifesto-band { padding: 95px clamp(24px, 9vw, 150px); color: #fff; background: var(--navy-deep); }
.manifesto-band > p { margin: 0 0 22px; color: #aabac7; }
.manifesto-band h2 { max-width: 1050px; margin: 0; font-size: clamp(34px, 5vw, 64px); font-weight: 600; letter-spacing: -.025em; line-height: 1.4; }
.manifesto-band h2 em { color: #d5e8f6; font-style: normal; }
.manifesto-band a { display: inline-block; margin-top: 36px; color: #fff; font-size: 14px; }

.principles { background: #fff; }
.principle-list { max-width: 1180px; margin: 0 auto; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.principle-list li { display: grid; grid-template-columns: 64px minmax(160px,.5fr) 1fr; gap: 24px; align-items: baseline; padding: 23px 0; border-bottom: 1px solid var(--line); }
.principle-list span { color: var(--blue); font-size: 12px; font-weight: 700; }
.principle-list h3 { margin: 0; font-size: 18px; font-weight: 600; }
.principle-list p { margin: 0; color: var(--muted); font-size: 14px; }
.archive-tools { display: flex; flex-direction: column; gap: 5px; }
.archive-tools label { color: var(--muted); font-size: 11px; font-weight: 700; }
.archive-tools input { width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid #aeb4b9; outline: 0; background: transparent; font-size: 14px; }
.archive-tools input:focus { border-color: var(--blue); }
.empty-state { max-width: 1180px; margin: 28px auto 0; color: var(--muted); }

.declaration { padding: 95px clamp(24px, 9vw, 150px); color: #fff; background: #39434c; }
.declaration > span { color: #c9d9e6; }
.declaration h2 { max-width: 930px; margin: 18px 0; font: 600 clamp(36px, 5vw, 66px)/1.25 var(--mono); letter-spacing: -.035em; }
.declaration p { margin: 0 0 34px; color: #d7dadd; }
.declaration .button.primary { border-color: #fff; color: var(--navy); background: #fff; }

.site-footer { display: grid; grid-template-columns: .7fr 2fr auto; gap: 28px; align-items: center; min-height: 120px; padding: 28px clamp(24px, 5vw, 72px); color: #c7ccd0; background: #2c333a; font-size: 12px; }
.site-footer > div { color: #fff; font-weight: 700; }
.site-footer .signal { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #9fc4df; }

.article-hero { padding: 74px clamp(24px, 9vw, 150px) 80px; color: #fff; background: linear-gradient(135deg, #36414a, #262d34); }
.back-link { color: #d4dce2; text-decoration: none; }
.article-meta { display: flex; gap: 20px; margin-top: 68px; color: #c4cbd0; }
.article-meta span:first-child { color: #fff; }
.article-hero h1 { max-width: 1100px; margin: 18px 0; font-size: clamp(36px, 5vw, 66px); font-weight: 600; letter-spacing: -.025em; line-height: 1.35; }
.article-hero > p { max-width: 760px; margin: 0; color: #e2e5e7; font-size: 16px; }
.article-layout { display: grid; grid-template-columns: 210px minmax(0,760px); justify-content: center; gap: clamp(42px, 7vw, 110px); padding: 80px 24px 120px; background: #fff; }
.article-toc { position: sticky; top: 95px; align-self: start; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 125px); overflow: auto; }
.article-toc > span { margin-bottom: 5px; }
.article-toc a { color: #777d82; font-size: 12px; line-height: 1.45; text-decoration: none; }
.article-toc a:hover { color: var(--blue); }
.prose { min-width: 0; color: #2b2d2f; font-size: 16px; line-height: 2.05; }
.prose > p:first-child { font-size: 18px; }
.prose h2 { margin: 3.2em 0 1em; padding-top: .8em; border-top: 1px solid var(--line); font-size: clamp(25px,2.8vw,35px); font-weight: 600; letter-spacing: -.02em; line-height: 1.55; }
.prose h3 { margin: 2.6em 0 .8em; font-size: 20px; font-weight: 600; }
.heading-anchor { margin-left: 8px; color: #aaa; font-size: 13px; text-decoration: none; opacity: 0; }
.prose h2:hover .heading-anchor, .prose h3:hover .heading-anchor, .heading-anchor:focus { opacity: 1; }
.prose a { color: var(--blue); text-underline-offset: 3px; }
.prose code { padding: 2px 5px; background: #f0f2f4; font-family: ui-monospace, monospace; font-size: .88em; }
.prose blockquote { margin: 2.3em 0; padding: 20px 25px; border-left: 4px solid var(--blue); background: #f4f7f9; font-size: 18px; font-weight: 700; }
.prose blockquote p { margin: 0; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li { margin: .5em 0; padding-left: .25em; }
.table-wrap { width: 100%; margin: 2em 0; overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.65; }
.prose th, .prose td { min-width: 140px; padding: 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: #f2f4f5; }
.article-end { padding: 85px clamp(24px, 9vw, 150px); color: #fff; background: var(--navy); }
.article-end > span { color: #c2d8e8; }
.article-end h2 { max-width: 900px; margin: 18px 0 30px; font-size: clamp(31px,4vw,54px); line-height: 1.35; }
.article-end a { color: #fff; }

.search-dialog { width: min(670px,calc(100vw - 32px)); padding: 0; border: 1px solid #bbb; background: #fff; box-shadow: 0 25px 80px rgba(0,0,0,.32); }
.search-dialog::backdrop { background: rgba(0,0,0,.55); }
.search-dialog form { position: absolute; top: 10px; right: 12px; }
.search-dialog form button { border: 0; color: #777; background: transparent; font-size: 23px; cursor: pointer; }
.search-dialog > label { display: block; padding: 25px 28px 0; color: var(--blue); font-size: 11px; font-weight: 700; }
.search-dialog > input { width: calc(100% - 56px); margin: 10px 28px 20px; padding: 11px 0; border: 0; border-bottom: 1px solid #aaa; outline: 0; font-size: 19px; }
.search-results { border-top: 1px solid var(--line); }
.search-result { display: block; padding: 15px 28px; border-bottom: 1px solid var(--line); text-decoration: none; }
.search-result:hover { background: var(--soft); }
.search-result b { display: block; font-size: 14px; }
.search-result small { color: var(--muted); font-size: 11px; }
.search-empty { padding: 28px; color: var(--muted); }
.not-found { min-height: 72vh; padding: 15vh clamp(24px,9vw,150px); }
.not-found h1 { margin: 15px 0; font-size: clamp(45px,7vw,90px); }
.not-found p { margin: 0 0 32px; color: var(--muted); }

@media (max-width: 900px) {
  .site-header nav a:nth-child(3), .site-header nav a:nth-child(4) { display: none; }
  .hero-banner { grid-template-columns: 150px 1fr 150px; gap: 20px; }
  .featured-grid, .article-grid { grid-template-columns: repeat(2,1fr); }
  .article-layout { grid-template-columns: minmax(0,760px); }
  .article-toc { display: none; }
}

@media (max-width: 640px) {
  .site-header { min-height: 58px; }
  .site-header nav { height: 58px; }
  .site-header nav a { display: none; }
  .search-trigger { padding: 0 10px; }
  .hero-banner { grid-template-columns: 72px 1fr; min-height: 190px; padding: 24px; }
  .hero-banner img:last-child { display: none; }
  .hero-banner h1 { font-size: 37px; text-align: left; }
  .hero-banner h1 small { font-size: 10px; }
  .hero-intro { padding-block: 52px 65px; }
  .hero-intro h2 { font-size: 34px; }
  .brand small { display: none; }
  .lead { font-size: 15px; }
  .featured-section, .principles, .archive, .declaration { padding-block: 68px; }
  .section-head { grid-template-columns: 1fr; }
  .featured-grid, .article-grid { grid-template-columns: 1fr; }
  .article-card { min-height: 290px; }
  .principle-list li { grid-template-columns: 40px 1fr; }
  .principle-list p { grid-column: 2; }
  .site-footer { grid-template-columns: 1fr; }
  .article-meta { margin-top: 50px; flex-wrap: wrap; }
  .article-layout { padding-block: 60px 90px; }
  .prose { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
