:root {
  color-scheme: light;
  --paper: #faf9f6;
  --ink: #182b40;
  --muted: #526171;
  --copper: #ac7254;
  --rule: #d8cbbf;
  --reading-width: 760px;
  --figure-width: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.8;
}

flecto-site-header {
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  overflow-wrap: anywhere;
}

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

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 5px;
}

.cover {
  position: relative;
  isolation: isolate;
  background: #091626;
  color: #faf9f6;
  border-bottom: 1px solid var(--copper);
}

.cover-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}

.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(5 17 32 / 96%) 0%, rgb(5 17 32 / 86%) 31%, rgb(5 17 32 / 40%) 56%, rgb(5 17 32 / 4%) 100%);
}

.cover-inner {
  max-width: 1320px;
  margin-inline: auto;
  padding: 30px 44px 78px;
}

.article-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.04em;
}

.article-nav a {
  padding-block: 10px;
  text-decoration-color: #bca58d;
}

.cover-title {
  max-width: 690px;
  padding-top: 84px;
}

.cover-title::before {
  content: "";
  display: block;
  width: 76px;
  height: 2px;
  margin-bottom: 30px;
  background: #c38d6c;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 4.2vw, 60px);
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 400;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.reading-surface {
  padding: 72px 32px 112px;
}

.introduction,
.paper-section > h2,
.paper-section > p {
  width: 100%;
  max-width: var(--reading-width);
  margin-inline: auto;
}

.introduction {
  padding-bottom: 14px;
  font-size: 22px;
  line-height: 1.7;
}

.introduction::before {
  content: "";
  display: block;
  width: 92px;
  height: 2px;
  margin-bottom: 30px;
  background: var(--copper);
}

p {
  margin-block: 0 1.5em;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.paper-section {
  margin-top: 60px;
  scroll-margin-top: 32px;
}

h2 {
  padding-top: 24px;
  margin-block: 0 30px;
  border-top: 1px solid var(--rule);
  font-size: 31px;
  line-height: 1.35;
  letter-spacing: -0.018em;
  font-weight: 400;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.paper-figure,
.table-scroll {
  max-width: var(--figure-width);
  margin: 42px auto;
}

.figure-scroll,
.table-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: #a28772 #eee9e1;
  scrollbar-width: auto;
}

.figure-scroll {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--rule);
}

.paper-figure img {
  display: block;
  width: 100%;
  min-width: 1017px;
  height: auto;
}

figcaption,
caption {
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.75;
  text-align: start;
  text-wrap: pretty;
}

figcaption {
  max-width: var(--reading-width);
  margin: 18px auto 0;
}

.table-scroll {
  max-width: 940px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

caption {
  caption-side: bottom;
  padding: 18px 0 0;
}

th,
td {
  padding: 18px 18px;
  text-align: end;
  border-bottom: 1px solid var(--rule);
}

thead th {
  border-top: 2px solid var(--copper);
  border-bottom: 1px solid var(--copper);
  vertical-align: bottom;
  font-size: 13px;
  font-weight: 600;
}

th:first-child {
  text-align: start;
}

tbody th {
  font-weight: 500;
  white-space: nowrap;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 1px solid var(--copper);
}

html:lang(ja) body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 17px;
  line-height: 1.9;
  line-break: strict;
}

html:lang(ja) h1,
html:lang(ja) h2 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  line-height: 1.45;
}

html:lang(ja) h1 {
  font-size: clamp(32px, 3.5vw, 49px);
  letter-spacing: -0.025em;
}

html:lang(ja) h2 {
  font-size: 28px;
}

html:lang(ja) .introduction {
  font-size: 19px;
  line-height: 1.9;
}

html:lang(ja) table,
html:lang(ja) figcaption,
html:lang(ja) caption {
  font-family: inherit;
  line-height: 1.9;
}

@media (min-width: 1100px) {
  .cover-inner {
    min-height: 620px;
  }
}

@media (max-width: 1099px) {
  .cover-inner {
    min-height: 540px;
    padding: 22px 40px 64px;
  }

  .cover-title {
    max-width: 610px;
    padding-top: 68px;
  }

  .cover::after {
    background: linear-gradient(90deg, rgb(5 17 32 / 96%), rgb(5 17 32 / 78%) 55%, rgb(5 17 32 / 18%));
  }
}

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

  .cover-inner {
    min-height: 570px;
    padding: 16px 24px 54px;
  }

  .cover-image {
    object-position: 62% center;
  }

  .cover::after {
    background: linear-gradient(90deg, rgb(5 17 32 / 94%), rgb(5 17 32 / 74%));
  }

  .cover-title {
    padding-top: 66px;
  }

  h1 {
    font-size: clamp(32px, 9.7vw, 46px);
    line-height: 1.2;
  }

  .reading-surface {
    padding: 46px 24px 72px;
  }

  .introduction {
    font-size: 20px;
  }

  .paper-section {
    margin-top: 46px;
  }

  h2 {
    font-size: 27px;
    margin-bottom: 24px;
  }

  html:lang(ja) h1 {
    font-size: 32px;
  }

  html:lang(ja) h2 {
    font-size: 25px;
  }

  html:lang(ja) .introduction {
    font-size: 18px;
  }

  .paper-figure,
  .table-scroll {
    margin-block: 32px;
  }

  .figure-scroll {
    padding: 12px;
  }
}

.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; } }
