:root {
  color-scheme: light;
  --paper: #f8f5ee;
  --ink: #202b32;
  --muted: #566166;
  --navy: #071b2b;
  --amber: #eeb263;
  --rule: #d9d5ca;
  --link: #285f6c;
  --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: 2rem;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

flecto-site-header {
  display: block;
  background: var(--navy);
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid #a16522;
  outline-offset: 5px;
}

.hero {
  color: #fffdf7;
  background-color: var(--navy);
  background-image: linear-gradient(90deg, rgba(4, 18, 32, 0.5), rgba(4, 18, 32, 0.25) 58%, rgba(4, 18, 32, 0.08)), url('assets/bg_hero.png');
  background-size: cover;
  background-position: center;
}

.hero-inner {
  max-width: 1280px;
  min-height: 646px;
  padding: 38px 40px 68px;
  margin-inline: auto;
}

.edition-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #dfdfd8;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.languages {
  background: rgba(4, 18, 32, 0.94);
  padding-inline: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.languages a {
  display: inline-block;
  padding-block: 8px;
  color: #fffdf7;
  text-decoration: none;
}

.languages a[aria-current='page'] {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 0.5em;
}

.languages span {
  color: #a3aeb6;
}

.hero h1 {
  max-width: 850px;
  margin: 86px 0 30px;
  font-family: var(--serif);
  font-size: clamp(42px, 4.5vw, 64px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.hero h1::before {
  display: block;
  width: 48px;
  height: 3px;
  margin-bottom: 28px;
  background: var(--amber);
  content: '';
}

.paper-identity {
  color: #dfdfd8;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.manuscript {
  width: calc(100% - 80px);
  max-width: 760px;
  margin: 0 auto;
  padding: 68px 0 112px;
}

p {
  margin: 0 0 1.45em;
}

.introduction > p:first-child {
  color: #172b38;
}

.source-note {
  margin-top: 30px;
  margin-bottom: 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}

.article-section {
  position: relative;
  margin-top: 80px;
  padding-top: 30px;
  border-top: 1px solid var(--rule);
}

.article-section::before {
  position: absolute;
  top: 36px;
  left: -90px;
  color: #8c642e;
  content: attr(data-number);
  font-size: 13px;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

.coverage-anchor {
  display: block;
  height: 0;
}

h2 {
  max-width: 730px;
  margin: 0 0 28px;
  color: #122e3e;
  font-family: var(--serif);
  font-size: 35px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.article-section > p:last-child {
  margin-bottom: 0;
}

code {
  padding: 0.08em 0.25em;
  background: #ebe7dd;
  color: #253e47;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.88em;
}

figure {
  position: relative;
  left: 50%;
  width: min(1080px, calc(100vw - 80px));
  max-width: none;
  margin: 44px 0 42px;
  transform: translateX(-50%);
}

.figure-image {
  display: block;
  border: 1px solid var(--rule);
  background: #fff;
  cursor: zoom-in;
}

.figure-image:hover {
  border-color: #8b753e;
}

.figure-image img {
  display: block;
  width: 100%;
  height: auto;
}

.figure-tools {
  display: flex;
  justify-content: flex-end;
  margin: 10px 0 16px;
  font-size: 14px;
  line-height: 1.6;
}

.figure-tools a {
  padding-block: 4px;
}

figcaption {
  max-width: 760px;
  margin-inline: auto;
  color: #4c585d;
  font-size: 18px;
  line-height: 1.8;
}

html[lang='ja'] {
  --serif: 'Hiragino Mincho ProN', 'Yu Mincho', YuMincho, 'Noto Serif CJK JP', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
}

html[lang='ja'] body {
  line-height: 2.05;
  line-break: strict;
  overflow-wrap: anywhere;
}

html[lang='ja'] .hero h1 {
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

html[lang='ja'] h2 {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0;
}

html[lang='ja'] figcaption {
  line-height: 2;
}

@media (max-width: 1080px) {
  .article-section::before {
    position: static;
    display: block;
    margin-bottom: 12px;
  }

  .hero-inner {
    min-height: 600px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 17px;
    line-height: 1.85;
  }

  .hero {
    background-image: linear-gradient(90deg, rgba(4, 18, 32, 0.86), rgba(4, 18, 32, 0.7)), url('assets/bg_hero.png');
    background-position: 62% center;
  }

  .hero-inner {
    min-height: 560px;
    padding: 24px 24px 54px;
  }

  .edition-line {
    gap: 12px;
    font-size: 12px;
    letter-spacing: 0;
  }

  .languages {
    gap: 11px;
  }

  .hero h1 {
    margin-top: 65px;
    margin-bottom: 28px;
    font-size: 40px;
    line-height: 1.15;
  }

  .hero h1::before {
    width: 36px;
    margin-bottom: 26px;
  }

  .paper-identity {
    font-size: 12px;
  }

  .manuscript {
    width: calc(100% - 40px);
    padding-top: 42px;
    padding-bottom: 72px;
  }

  .source-note {
    margin-top: 26px;
    padding-top: 22px;
  }

  .article-section {
    margin-top: 58px;
    padding-top: 22px;
  }

  h2 {
    margin-bottom: 24px;
    font-size: 29px;
    line-height: 1.3;
  }

  figure {
    width: calc(100vw - 40px);
    margin-top: 30px;
    margin-bottom: 30px;
  }

  figcaption {
    font-size: 17px;
  }

  .figure-tools {
    margin-bottom: 14px;
    font-size: 13px;
  }

  html[lang='ja'] .hero h1 {
    font-size: 32px;
    line-height: 1.55;
  }

  html[lang='ja'] h2 {
    font-size: 26px;
    line-height: 1.6;
  }
}
