@import url("https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500&family=Unbounded:wght@400;500&display=swap");

:root {
  color-scheme: dark;
  --aegean: #03192f;
  --marble: #f7f9fa;
  --marble-soft: rgba(247, 249, 250, 0.78);
  --marble-muted: rgba(247, 249, 250, 0.62);
  --line: rgba(247, 249, 250, 0.2);
  --focus: #8deaff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--aegean);
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background: var(--aegean);
  color: var(--marble);
  font-family: "Sora", sans-serif;
  font-weight: 300;
  scrollbar-color: rgba(247, 249, 250, 0.34) var(--aegean);
  scrollbar-width: thin;
}

body::-webkit-scrollbar,
.memo-table-wrap::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

body::-webkit-scrollbar-track,
.memo-table-wrap::-webkit-scrollbar-track {
  background: var(--aegean);
}

body::-webkit-scrollbar-thumb,
.memo-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid var(--aegean);
  background: rgba(247, 249, 250, 0.34);
}

::selection {
  background: var(--focus);
  color: #01111f;
}

.memo-stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.memo-return {
  position: fixed;
  top: clamp(22px, 4vw, 44px);
  left: clamp(22px, 4vw, 52px);
  z-index: 4;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--marble);
  font-family: "Unbounded", sans-serif;
  font-size: 0.66rem;
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
}

.memo-return svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 1.4;
}

.memo-return span {
  border-bottom: 1px solid transparent;
  padding: 5px 0;
}

.memo-return:hover span,
.memo-return:focus-visible span {
  border-bottom-color: currentColor;
}

.memo-return:focus-visible,
.memo-record a:focus-visible,
.memo-article a:focus-visible,
.site-footer a:focus-visible {
  outline: 2px solid var(--marble);
  outline-offset: 6px;
}

.memo-index-stage {
  position: relative;
  z-index: 1;
  width: min(940px, calc(100% - 40px));
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(124px, 16svh, 172px) 0 clamp(76px, 10svh, 112px);
}

.memo-index-header {
  margin-bottom: clamp(62px, 9vw, 104px);
  text-align: center;
}

.memo-index-title {
  margin: 0;
  color: var(--marble);
  font-family: "Unbounded", sans-serif;
  font-size: clamp(2.2rem, 6vw, 4.9rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-transform: uppercase;
}

.memo-register {
  width: min(820px, 100%);
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.memo-record {
  position: relative;
  padding: clamp(43px, 7vw, 68px) clamp(4px, 3vw, 26px);
  border-top: 1px solid var(--line);
  text-align: center;
}

.memo-record::before,
.memo-article h2::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(247, 249, 250, 0.68);
  background: var(--aegean);
  transform: translateX(-50%) rotate(45deg);
}

.memo-kind {
  margin: 0 0 18px;
  color: var(--marble-muted);
  font-family: "Unbounded", sans-serif;
  font-size: clamp(0.62rem, 0.82vw, 0.74rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.45;
  text-transform: uppercase;
}

.memo-record h2 {
  max-width: 760px;
  margin: 0 auto;
  color: var(--marble);
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.12rem, 2.4vw, 1.72rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.45;
  text-wrap: balance;
}

.memo-record h2 a {
  min-height: 46px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-block: 6px;
  color: inherit;
  text-decoration-color: rgba(247, 249, 250, 0.34);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.memo-record h2 a:hover,
.memo-record h2 a:focus-visible {
  color: var(--focus);
  text-decoration-color: currentColor;
}

.memo-page {
  position: relative;
  z-index: 1;
  width: min(1060px, calc(100% - 40px));
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(122px, 15svh, 164px) 0 clamp(76px, 10svh, 112px);
}

.memo-article {
  width: 100%;
  margin: 0 auto;
  color: var(--marble-soft);
  font-size: clamp(0.98rem, 1.1vw, 1.06rem);
  line-height: 1.82;
}

.research-title {
  width: min(900px, 100%);
  margin: 0 auto clamp(30px, 5vw, 48px);
  padding: 0 0 clamp(38px, 6vw, 58px);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.research-title .eyebrow {
  margin: 0 0 20px;
  color: var(--marble-muted);
  font-family: "Unbounded", sans-serif;
  font-size: clamp(0.62rem, 0.8vw, 0.74rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.research-title h1 {
  margin: 0 auto;
  color: var(--marble);
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.75rem, 4.8vw, 4.05rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.13;
  text-wrap: balance;
}

.research-title h1 + p {
  max-width: 64ch;
  margin: 24px auto 0;
  color: var(--marble-soft);
  font-size: clamp(0.98rem, 1.25vw, 1.08rem);
  line-height: 1.7;
}

.research-title + p,
.research-title + p + p,
.research-title + p + p + p {
  margin-top: 0.18rem;
  margin-bottom: 0.18rem;
  color: var(--marble-muted);
  text-align: center;
}

.memo-article > p,
.memo-article > ul,
.memo-article > ol,
.memo-article > blockquote,
.memo-article > h2,
.memo-article > h3,
.memo-article > .equation-block {
  width: min(74ch, 100%);
  margin-right: auto;
  margin-left: auto;
}

.memo-article > p {
  margin-top: 1.15rem;
  margin-bottom: 1.15rem;
}

.memo-article h2 {
  position: relative;
  margin-top: clamp(62px, 9vw, 96px);
  margin-bottom: clamp(22px, 3vw, 32px);
  padding-top: clamp(34px, 5vw, 50px);
  border-top: 1px solid var(--line);
  color: var(--marble);
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.35rem, 2.7vw, 2.1rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.35;
  text-wrap: balance;
}

.memo-article h3 {
  margin-top: clamp(36px, 5vw, 54px);
  margin-bottom: 18px;
  color: var(--marble);
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1rem, 1.65vw, 1.26rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.45;
}

.memo-article strong {
  color: var(--marble);
  font-weight: 500;
}

.memo-article em {
  color: rgba(247, 249, 250, 0.9);
}

.memo-article a,
.site-footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--marble);
  text-decoration-color: rgba(247, 249, 250, 0.44);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.memo-article a:hover,
.memo-article a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--focus);
  text-decoration-color: currentColor;
}

.memo-article ul,
.memo-article ol {
  padding-left: clamp(22px, 4vw, 42px);
}

.memo-article li {
  margin-block: 0.7rem;
  padding-left: 0.35rem;
}

.memo-article li::marker {
  color: rgba(247, 249, 250, 0.58);
}

.memo-article blockquote {
  margin-top: 34px;
  margin-bottom: 34px;
  padding: 24px clamp(8px, 4vw, 36px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--marble);
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  font-weight: 400;
  line-height: 1.7;
  text-align: center;
}

.memo-article blockquote p {
  margin: 0;
}

.memo-table-wrap {
  width: min(100%, 1040px);
  margin: clamp(30px, 5vw, 48px) auto;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.memo-table {
  width: 100%;
  min-width: 690px;
  border-collapse: collapse;
  background: transparent;
  color: var(--marble-soft);
  font-size: clamp(0.86rem, 1vw, 0.96rem);
  line-height: 1.65;
}

.memo-table th,
.memo-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.memo-table thead th {
  border-top: 1px solid rgba(247, 249, 250, 0.42);
  border-bottom-color: rgba(247, 249, 250, 0.42);
  color: var(--marble);
  font-family: "Unbounded", sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.memo-table tbody tr:hover {
  background: rgba(247, 249, 250, 0.035);
}

.memo-figure {
  width: min(100%, 1040px);
  margin: clamp(28px, 5vw, 50px) auto;
}

.memo-figure img {
  width: 100%;
  max-height: 780px;
  display: block;
  object-fit: contain;
}

.equation-block,
mjx-container {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  color: var(--marble);
  scrollbar-color: rgba(247, 249, 250, 0.34) var(--aegean);
}

.equation-block {
  margin-top: 28px;
  margin-bottom: 28px;
  padding: 12px 0;
  text-align: center;
}

.site-footer {
  position: relative;
  z-index: 1;
  width: min(1060px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--marble-muted);
  font-size: 0.78rem;
}

@media (max-width: 700px) {
  .memo-return {
    position: absolute;
  }

  .memo-index-stage,
  .memo-page {
    width: calc(100% - 30px);
  }

  .memo-index-stage {
    padding-top: 116px;
  }

  .memo-index-header {
    margin-bottom: 58px;
  }

  .memo-record {
    padding: 40px 2px 46px;
  }

  .memo-page {
    padding-top: 112px;
  }

  .research-title {
    padding-bottom: 38px;
  }

  .memo-article {
    font-size: 0.96rem;
    line-height: 1.78;
  }

  .memo-article h2 {
    margin-top: 62px;
    padding-top: 34px;
  }

  .memo-table-wrap {
    width: calc(100vw - 15px);
    margin-left: 0;
  }

  .memo-table th,
  .memo-table td {
    padding: 12px 13px;
  }

  .site-footer {
    width: calc(100% - 30px);
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .memo-record h2 a {
    transition: none;
  }
}
