:root {
  color-scheme: light;
  --paper: #faf9f6;
  --ink: #203e32;
  --forest: #0b241a;
  --muted: #536357;
  --brass: #a58a50;
  --rule: #c8b994;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); scroll-padding-top: 32px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}
flecto-site-header { display: block; }
main, article, section { min-width: 0; }
.cover {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--paper);
  background: var(--forest);
}
.cover-image {
  position: absolute;
  z-index: -2;
  width: 100%;
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: center 58%;
}
.cover::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 25, 17, 0.82) 0%, rgba(6, 25, 17, 0.58) 42%, rgba(6, 25, 17, 0.08) 76%);
}
.cover-inner {
  width: min(1280px, calc(100% - 112px));
  min-height: 650px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-block: 25px;
  border-bottom: 1px solid rgba(200, 185, 148, 0.55);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.025em;
}
.article-nav a {
  color: inherit;
  text-decoration-color: rgba(250, 249, 246, 0.45);
  text-underline-offset: 5px;
}
.cover-title {
  width: min(690px, 59%);
  margin-block: auto;
  padding-block: 72px 90px;
}
h1, h2 {
  font-weight: 400;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(40px, 4.25vw, 64px);
  line-height: 1.14;
  letter-spacing: -0.032em;
}
.reading-width { width: min(760px, 100%); margin-inline: auto; }
.lead {
  width: min(760px, calc(100% - 64px));
  margin-block: 70px 0;
  padding-bottom: 54px;
  border-bottom: 1px solid var(--rule);
  font-size: 23px;
  line-height: 1.7;
}
p { margin-block: 0 1.35em; overflow-wrap: anywhere; text-wrap: pretty; }
.lead p, .paper-section > p:last-child { margin-bottom: 0; }
.paper-section {
  width: min(1100px, calc(100% - 64px));
  margin-inline: auto;
  padding-top: 62px;
}
h2 {
  margin-block: 0 28px;
  font-family: var(--serif);
  font-size: clamp(29px, 2.5vw, 37px);
  line-height: 1.3;
  letter-spacing: -0.022em;
}
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--brass);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 5px; }
.paper-figure { margin: 42px 0 44px; }
.figure-scroll {
  width: 100%;
  padding: 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  background: #fff;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  scrollbar-color: var(--brass) #eeeadf;
  scrollbar-width: thin;
}
.figure-scroll img {
  display: block;
  width: 100%;
  min-width: 1054px;
  height: auto;
  margin-inline: auto;
}
figcaption {
  padding-top: 18px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.paper-section:last-child { padding-bottom: 100px; }
.paper-section:last-child > p:last-child { padding-top: 25px; border-top: 1px solid var(--rule); }
html[lang="ja"] {
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic", Meiryo, sans-serif;
  line-break: strict;
}
html[lang="ja"] body { font-family: var(--sans); font-size: 17px; line-height: 1.9; }
html[lang="ja"] h1 {
  font-size: clamp(36px, 3.55vw, 54px);
  line-height: 1.45;
  letter-spacing: -0.025em;
}
html[lang="ja"] h2 {
  font-size: clamp(26px, 2.2vw, 32px);
  line-height: 1.5;
  letter-spacing: -0.015em;
}
html[lang="ja"] .lead { font-size: 20px; line-height: 1.9; }
html[lang="ja"] figcaption { line-height: 1.9; }

@media (max-width: 1000px) {
  .cover-inner { width: calc(100% - 64px); min-height: 600px; }
  .cover-title { width: 66%; }
  .cover-image { object-position: 60% center; }
  .cover::after {
    background: linear-gradient(90deg, rgba(6, 25, 17, 0.91), rgba(6, 25, 17, 0.62) 58%, rgba(6, 25, 17, 0.15));
  }
  .lead { margin-top: 54px; }
}

@media (max-width: 600px) {
  body { font-size: 18px; }
  .cover-inner { width: calc(100% - 40px); min-height: 560px; }
  .article-nav { gap: 12px; padding-block: 20px; font-size: 12px; letter-spacing: 0; }
  .cover-title { width: 100%; padding-block: 62px 76px; }
  h1 { font-size: clamp(34px, 9.8vw, 46px); line-height: 1.2; }
  .cover-image { object-position: 68% center; }
  .cover::after {
    background: linear-gradient(90deg, rgba(6, 25, 17, 0.92), rgba(6, 25, 17, 0.7));
  }
  .lead { width: calc(100% - 40px); margin-top: 38px; padding-bottom: 36px; font-size: 21px; }
  .paper-section { width: calc(100% - 40px); padding-top: 42px; }
  h2 { margin-bottom: 22px; font-size: 28px; }
  .paper-figure { margin-block: 30px; }
  .figure-scroll { padding: 12px; }
  figcaption { font-size: 13px; }
  .paper-section:last-child { padding-bottom: 64px; }
  html[lang="ja"] body { font-size: 16px; }
  html[lang="ja"] h1 { font-size: clamp(30px, 8.25vw, 38px); line-height: 1.5; }
  html[lang="ja"] h2 { font-size: 25px; line-height: 1.5; }
  html[lang="ja"] .lead { font-size: 18px; }
}

.keep-equation { white-space: nowrap; }
.scroll-hint { font-size: 13px; line-height: 1.6; color: #595653; margin: .6rem auto; max-width: 760px; }
.table-note { font-size: 14px; line-height: 1.8; color: #595653; margin: 1rem 0 1.8rem; }
@media (min-width: 1200px) { .scroll-hint { display: none; } }
