
:root {
  --paper: #f6ecd2;
  --paper-warm: #dfe4c2;
  --paper-deep: #b8c398;
  --paper-shadow: #8ea070;
  --ink: #261b13;
  --ink-soft: #4f5d46;
  --crimson: #8a3f31;
  --indigo: #2f5f58;
  --indigo-soft: #78a08b;
  --gold: #9f8a45;
  --forest: #5b7b5f;
  --line: rgba(55, 71, 46, 0.18);
  --frame: rgba(97, 118, 76, 0.28);
  --shadow: 0 18px 42px rgba(44, 56, 32, 0.14);
  --shadow-soft: 0 12px 24px rgba(44, 56, 32, 0.11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 6%, rgba(90, 123, 95, 0.13), transparent 20%),
    radial-gradient(circle at 84% 10%, rgba(47, 95, 88, 0.12), transparent 18%),
    linear-gradient(180deg, rgba(243, 238, 216, 0.98), rgba(214, 224, 184, 0.98));
  font-family: "Shippori Mincho", "Times New Roman", serif;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  opacity: 0.34;
  background:
    linear-gradient(90deg, transparent 0, transparent 19px, rgba(94, 120, 72, 0.04) 19px, rgba(94, 120, 72, 0.04) 20px, transparent 20px),
    linear-gradient(180deg, transparent 0, transparent 19px, rgba(94, 120, 72, 0.025) 19px, rgba(94, 120, 72, 0.025) 20px, transparent 20px),
    repeating-radial-gradient(circle at 16% 100%, rgba(47, 95, 88, 0.05) 0 7px, transparent 7px 24px),
    repeating-radial-gradient(circle at 84% 100%, rgba(47, 95, 88, 0.036) 0 8px, transparent 8px 26px);
  background-size: 20px 20px, 20px 20px, auto, auto;
}

body::after {
  inset: 12px;
  border: 1px solid rgba(109, 127, 83, 0.15);
  box-shadow:
    inset 0 0 0 7px rgba(165, 181, 118, 0.06),
    inset 0 0 0 20px rgba(255, 247, 229, 0.12);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
code {
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.92em;
  color: var(--crimson);
  background: rgba(90, 123, 95, 0.1);
  padding: 0.12rem 0.35rem;
  border-radius: 999px;
}

.site-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 54px;
  position: relative;
  z-index: 1;
}

.site-shell::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 14px;
  right: 14px;
  border-left: 1px solid rgba(126, 148, 96, 0.08);
  border-right: 1px solid rgba(126, 148, 96, 0.08);
  pointer-events: none;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  margin-bottom: 24px;
  border: 1px solid rgba(105, 127, 82, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(246, 243, 227, 0.98), rgba(220, 229, 195, 0.96));
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(123, 151, 94, 0.16);
  pointer-events: none;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 8px;
  bottom: 8px;
  background:
    linear-gradient(180deg, rgba(123, 151, 94, 0.16), rgba(123, 151, 94, 0.16)) top / 100% 1px no-repeat,
    linear-gradient(180deg, rgba(123, 151, 94, 0.16), rgba(123, 151, 94, 0.16)) bottom / 100% 1px no-repeat;
  pointer-events: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.brand strong,
.nav-links a,
h1, h2, h3 {
  font-family: "Yuji Syuku", "Shippori Mincho", serif;
}

.brand strong {
  display: block;
  font-size: 1.12rem;
}

.brand small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  aspect-ratio: 1;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(71, 118, 84, 0.96), rgba(41, 77, 61, 0.96));
  border: 1px solid rgba(39, 73, 59, 0.45);
  color: #edf2d7;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  box-shadow: inset 0 0 0 1px rgba(255, 243, 222, 0.16);
}

.nav-links,
.lang-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-links a,
.lang-pill {
  padding: 10px 14px;
  border-radius: 6px;
  color: var(--ink-soft);
  transition: 180ms ease;
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

.nav-links a[aria-current="page"],
.nav-links a:hover,
.lang-pill[aria-current="true"],
.lang-pill:hover {
  color: var(--ink);
  background: rgba(90, 123, 95, 0.1);
  border-color: rgba(90, 123, 95, 0.14);
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
  padding: 20px;
  border: 1px solid rgba(103, 124, 82, 0.24);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(246, 242, 225, 0.96), rgba(219, 229, 190, 0.98));
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(138, 158, 102, 0.14);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(93, 118, 71, 0.88), rgba(65, 90, 56, 0.92)) top 10px left 26px / calc(100% - 52px) 7px no-repeat,
    linear-gradient(180deg, rgba(93, 118, 71, 0.88), rgba(65, 90, 56, 0.92)) bottom 10px left 26px / calc(100% - 52px) 8px no-repeat,
    radial-gradient(circle at 82% 18%, rgba(90, 123, 95, 0.12), transparent 18%),
    linear-gradient(90deg, rgba(159, 121, 60, 0.08), transparent 18%, transparent 82%, rgba(159, 121, 60, 0.08));
  pointer-events: none;
}

.hero-page {
  background:
    radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 16%),
    linear-gradient(180deg, rgba(246, 242, 225, 0.94), color-mix(in srgb, var(--accent-soft) 14%, #dbe4be 86%));
}

.hero-home {
  min-height: 456px;
}

.hero-copy,
.hero-art,
.card-visual {
  position: relative;
  z-index: 1;
}

.hero-copy {
  padding: 34px 34px 30px;
  border: 1px solid rgba(112, 135, 88, 0.16);
  border-radius: 10px 10px 28px 10px;
  background:
    linear-gradient(180deg, rgba(250, 246, 231, 0.92), rgba(228, 236, 204, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 247, 230, 0.3);
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-left: 4px solid rgba(71, 118, 84, 0.2);
  border-top: 1px solid rgba(145, 165, 108, 0.12);
  border-right: 1px solid rgba(145, 165, 108, 0.08);
  border-bottom: 1px solid rgba(145, 165, 108, 0.08);
  border-radius: 6px 6px 22px 6px;
  pointer-events: none;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(71, 118, 84, 0.15);
  box-shadow: inset 0 0 0 6px rgba(71, 118, 84, 0.03);
  pointer-events: none;
}

.hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: 0.96;
  color: var(--ink);
  max-width: 14ch;
}

.hero-copy .lede {
  max-width: 62ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-art {
  display: flex;
  justify-content: flex-end;
  padding: 22px 22px 28px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(248, 244, 228, 0.95), rgba(219, 229, 196, 0.9));
  border: 1px solid rgba(111, 133, 88, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 247, 229, 0.3);
}

.hero-art::before,
.hero-art::after,
.card-visual::before,
.card-visual::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #5c7b52, #3e5a3b);
  box-shadow: inset 0 1px 0 rgba(255, 236, 203, 0.14);
}

.hero-art::before,
.card-visual::before {
  top: 10px;
  height: 7px;
}

.hero-art::after,
.card-visual::after {
  bottom: 10px;
  height: 9px;
}

.hero-art img,
.card-visual img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid rgba(104, 73, 39, 0.22);
  box-shadow: var(--shadow-soft);
  background: #f7ecd0;
}

.hero-source-art img,
.source-thumb img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 14px;
  color: var(--indigo);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-family: "IBM Plex Mono", monospace;
  padding: 4px 10px;
  border: 1px solid rgba(71, 118, 84, 0.14);
  border-radius: 999px;
  background: rgba(255, 248, 235, 0.7);
}

.hero-actions,
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.hero-actions {
  margin-top: 24px;
  flex-wrap: wrap;
}

.button,
.button-secondary,
.text-link,
.pager-link {
  transition: 180ms ease;
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button {
  background: linear-gradient(135deg, #476d57, #315241);
  color: #edf2d7;
  box-shadow: inset 0 0 0 1px rgba(255, 237, 211, 0.12);
  border: 1px solid rgba(44, 77, 60, 0.44);
}

.button-secondary {
  border: 1px solid rgba(111, 133, 88, 0.22);
  color: var(--ink);
  background: rgba(255, 248, 232, 0.56);
}

.button:hover,
.button-secondary:hover,
.text-link:hover,
.pager-link:hover {
  transform: translateY(-1px);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.intro-grid {
  margin-top: 28px;
}

.panel {
  padding: 28px 26px 24px;
  border: 1px solid rgba(111, 133, 88, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(248, 243, 227, 0.94), rgba(223, 232, 198, 0.94));
  box-shadow: var(--shadow);
  position: relative;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(141, 167, 113, 0.08);
  border-radius: 4px;
  pointer-events: none;
}

.panel::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 14px;
  width: 26px;
  height: 26px;
  border: 1.5px solid rgba(71, 118, 84, 0.14);
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px rgba(71, 118, 84, 0.03);
  pointer-events: none;
}

.panel h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.35rem;
  color: var(--ink);
}

.panel p,
.panel li {
  color: var(--ink-soft);
  line-height: 1.74;
  font-size: 1rem;
}

.keyline {
  background:
    linear-gradient(180deg, rgba(236, 231, 206, 0.97), rgba(214, 224, 186, 0.98));
  border-left: 6px solid rgba(103, 131, 88, 0.45);
}

.bullet-list {
  margin: 0;
  padding-left: 1.2rem;
}

.bullet-list li + li {
  margin-top: 12px;
}

.section-head {
  margin-top: 34px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(145, 165, 108, 0.18);
}

.section-head h2 {
  margin: 4px 0 0;
  font-size: 2rem;
}

.text-link {
  color: var(--indigo);
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.84rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card {
  display: grid;
  grid-template-columns: 0.98fr 1.02fr;
  gap: 18px;
  padding: 18px;
  border-radius: 10px;
  border: 1px solid rgba(111, 133, 88, 0.18);
  background:
    linear-gradient(180deg, rgba(245, 241, 223, 0.95), rgba(220, 229, 195, 0.96));
  box-shadow: var(--shadow);
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(141, 167, 113, 0.07);
  border-radius: 4px;
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: calc(48% + 6px);
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(103, 131, 88, 0.24), transparent);
  pointer-events: none;
}

.card-visual {
  padding: 18px 18px 24px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(247, 243, 226, 0.92), rgba(219, 229, 196, 0.88));
  border: 1px solid rgba(111, 133, 88, 0.16);
  align-self: stretch;
}

.card-copy {
  position: relative;
  padding-left: 8px;
}

.card-copy::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: linear-gradient(180deg, rgba(71, 118, 84, 0.34), rgba(47, 95, 88, 0.14));
  border-radius: 999px;
}

.card-copy h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  color: var(--ink);
  line-height: 1.25;
}

.card-copy p {
  margin-top: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.archive-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 20px;
  margin-top: 22px;
  align-items: start;
}

.archive-sidebar {
  display: grid;
  gap: 20px;
  align-content: start;
}

.archive-page-list {
  margin: 0;
  padding-left: 1.15rem;
}

.archive-page-list li + li {
  margin-top: 10px;
}

.archive-page-list a {
  color: var(--ink-soft);
}

.archive-page-list a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

.source-toc-panel nav,
.source-toc-panel .toc {
  position: relative;
  z-index: 1;
}

.source-toc-panel h4,
.source-toc-panel .topic-title {
  margin-top: 0;
  color: var(--ink);
}

.source-toc-panel ul {
  margin: 0;
  padding-left: 1.15rem;
}

.source-toc-panel li + li {
  margin-top: 8px;
}

.source-prose {
  overflow: hidden;
}

.source-prose > * {
  position: relative;
  z-index: 1;
}

.source-prose a {
  color: var(--indigo);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.source-prose h2,
.source-prose h3,
.source-prose h4 {
  scroll-margin-top: 7rem;
  color: var(--ink);
}

.source-prose h2 {
  margin-top: 0;
  font-size: 1.7rem;
}

.source-prose h3 {
  margin-top: 2rem;
  margin-bottom: 0.85rem;
  font-size: 1.32rem;
}

.source-prose h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.7rem;
  font-size: 1.08rem;
}

.source-prose p,
.source-prose li {
  font-size: 1rem;
  line-height: 1.84;
  color: var(--ink-soft);
}

.source-prose ul,
.source-prose ol {
  padding-left: 1.4rem;
}

.source-prose hr {
  border: 0;
  border-top: 1px solid rgba(123, 151, 94, 0.2);
  margin: 1.6rem 0;
}

.source-prose .figure {
  margin: 1.5rem 0 1.75rem;
  padding: 16px 16px 20px;
  border-radius: 8px;
  border: 1px solid rgba(111, 133, 88, 0.18);
  background: linear-gradient(180deg, rgba(247, 243, 226, 0.94), rgba(222, 231, 197, 0.92));
}

.source-prose .figure img {
  width: 100%;
  max-width: min(100%, 760px);
  margin: 0 auto;
  border-radius: 6px;
  border: 1px solid rgba(104, 73, 39, 0.18);
  box-shadow: var(--shadow-soft);
  background: #f7ecd0;
}

.source-prose .caption {
  margin: 14px 0 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.timeline-panel {
  margin-top: 22px;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.pager-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid rgba(111, 133, 88, 0.22);
  background: rgba(255, 247, 229, 0.66);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
}

.pager-link.disabled {
  color: rgba(67, 50, 33, 0.42);
}

.site-footer {
  margin-top: 28px;
  padding: 22px 12px 8px;
  color: var(--ink-soft);
  font-size: 0.94rem;
  border-top: 1px solid rgba(145, 165, 108, 0.16);
}

.site-footer p {
  margin: 6px 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 10px 0;
}

.footer-links a {
  color: var(--indigo);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.policy-art {
  align-items: center;
  justify-content: center;
}

.policy-mark {
  display: grid;
  place-items: center;
  width: min(220px, 58vw);
  aspect-ratio: 1;
  border-radius: 24px;
  border: 1px solid rgba(92, 123, 82, 0.24);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 247, 229, 0.75), transparent 30%),
    linear-gradient(180deg, rgba(92, 123, 82, 0.9), rgba(53, 81, 57, 0.94));
  color: #f4edd7;
  font-family: "Yuji Syuku", "Shippori Mincho", serif;
  font-size: clamp(3rem, 9vw, 5.8rem);
  letter-spacing: 0.08em;
  box-shadow: var(--shadow-soft);
}

@media (max-width: 980px) {
  .topbar,
  .topbar-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 940px) {
  .hero,
  .card,
  .content-grid,
  .card-grid,
  .archive-layout {
    grid-template-columns: 1fr;
  }

  .hero,
  .section-head {
    align-items: flex-start;
  }

  .section-head {
    flex-direction: column;
  }

  .hero {
    padding: 24px;
  }

  .card::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 18px, 1220px);
    padding-top: 10px;
  }

  .topbar {
    border-radius: 18px;
    padding: 14px;
  }

  .hero,
  .panel,
  .card {
    border-radius: 10px;
  }
}
