:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f7f7f7;
  --ink: #2b3636;
  --muted: #586263;
  --quiet: #9a9488;
  --line: #e7e7e7;
  --accent: #4c829b;
  --accent-ink: #3f7188;
  --accent-soft: #e2edf2;
  --gold: #a77c31;
  --max: 1120px;
  --measure: 720px;
  font-family: Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0;
  overflow-x: hidden;
  font-weight: 400;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(231, 231, 231, 0.86);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(var(--max), calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: nowrap;
}

.brand {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.brand img {
  display: block;
  width: 42px;
  height: 42px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  font-size: 0.88rem;
  flex: 0 0 auto;
  white-space: nowrap;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: rgba(247, 247, 247, 0.9);
}

main {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

main:has(> .hero:first-child) {
  width: 100%;
}

main:has(> .hero:first-child) > .section {
  width: min(var(--max), calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.category-page main {
  width: 100%;
}

.category-page main > .content-grid {
  width: min(var(--max), calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.hero {
  position: relative;
  height: clamp(310px, 35vw, 370px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(46px, 6vw, 70px) 0 clamp(38px, 5vw, 56px);
  isolation: isolate;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.hero::before {
  inset: 0 0 36px;
  background:
    linear-gradient(90deg, rgba(76, 130, 155, 0.03), transparent 72%),
    linear-gradient(rgba(25, 24, 21, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 24, 21, 0.04) 1px, transparent 1px);
  background-size: auto, 46px 46px, 46px 46px;
  mask-image: linear-gradient(90deg, transparent, black 2%, black 98%, transparent);
}

.hero::after {
  inset: clamp(-18px, -2vw, -6px) 0 auto auto;
  width: min(76vw, 1020px);
  height: min(36vw, 390px);
  background: var(--accent);
  -webkit-mask: url("assets/wavepacket.png") center / contain no-repeat;
  mask: url("assets/wavepacket.png") center / contain no-repeat;
  opacity: 0.96;
  transform: translateX(17%);
}

.hero > div {
  position: relative;
  width: min(880px, 100%);
  margin-left: max(20px, calc((100vw - var(--max)) / 2));
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-ink);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(3.8rem, 10vw, 8.6rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-title-lockup {
  display: inline-grid;
  width: max-content;
  max-width: 100%;
}

.hero-title-lockup h1 {
  max-width: none;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", Georgia, serif;
  font-size: clamp(3.8rem, 10vw, 4.6rem);
}

.lead {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.08rem);
  font-weight: 400;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
  font-family: Arial, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.9rem;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.button.primary {
  background: var(--ink);
  color: #ffffff;
}

.button:hover {
  transform: translateY(-2px);
}

.small-index {
  position: relative;
  display: grid;
  gap: 10px;
  margin-top: 52px;
  font-family: Arial, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 0.86rem;
  color: var(--muted);
}

.small-index span {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(231, 231, 231, 0.86);
  padding-bottom: 10px;
}

.section {
  padding: clamp(58px, 8vw, 104px) 0;
}

.hero + .section,
.section + .section {
  padding-top: clamp(34px, 5vw, 62px);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(160px, 0.34fr) minmax(0, 0.66fr);
  gap: clamp(24px, 6vw, 76px);
  align-items: start;
  margin-bottom: 18px;
}

.section h2 {
  margin: 0;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", Georgia, serif;
  font-size: clamp(1.7rem, 3.4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.18;
}

.section-head p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
}

.category-list,
.article-list {
  display: grid;
}

.grouped-article-list {
  gap: clamp(34px, 5vw, 58px);
}

.category-intro {
  max-width: var(--measure);
  margin: 0 0 clamp(36px, 5vw, 58px);
  color: #2f3b3d;
  font-size: 0.98rem;
  font-weight: 300;
  line-height: 1.85;
}

.category-intro p {
  margin: 0;
}

.grouped-article-list .article-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.grouped-article-list .article-group h2 {
  margin: 0;
  padding-bottom: 12px;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.25;
  letter-spacing: 0;
}

.grouped-article-list .group-items {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.article-subgroup {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 2px 0 8px;
}

.article-subgroup h3 {
  display: flex;
  min-height: 42px;
  align-items: flex-end;
  margin: 0;
  padding: 0 0 6px;
  color: var(--ink);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: clamp(1.12rem, 1.45vw, 1.28rem);
  font-weight: 600;
  letter-spacing: 0;
}

.empty-article-subgroup {
  margin-bottom: 0;
}

.subgroup-items {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
}

.subgroup-items::before {
  content: "";
  position: absolute;
  top: 32px;
  bottom: 32px;
  left: calc(0.34rem - 1.5px);
  width: 3px;
  background: color-mix(in srgb, var(--accent) 38%, transparent);
}

.article-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
  min-height: 0;
  border-bottom: 1px solid var(--line);
  color: var(--accent-ink);
  padding: 20px 0;
  position: relative;
  transition: color 180ms ease;
}

.grouped-article-list .article-row::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 1;
  box-sizing: border-box;
  width: 0.68rem;
  height: 0.68rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px #fff;
  transform: translateY(-50%);
}

.grouped-article-list a.article-row:hover::before {
  background: currentColor;
  border-color: currentColor;
}

.grouped-article-list .planned-article-row::before {
  border-color: var(--quiet);
  background: #fff;
}

.grouped-article-list .article-group .article-row,
.grouped-article-list .article-subgroup .article-row {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  border-bottom: 0;
  padding-left: 2rem;
}

.grouped-article-list .article-group .row-title,
.grouped-article-list .article-subgroup .row-title {
  display: block;
  width: 100%;
  max-width: none;
  overflow: hidden;
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: baseline;
  min-height: 86px;
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  transition: color 180ms ease;
}

a.category-row {
  color: var(--accent-ink);
  font-weight: 600;
}

div.category-row {
  color: var(--ink);
}

.category-row.is-disabled {
  color: var(--ink);
  cursor: default;
}

.category-row.is-disabled:hover {
  color: var(--ink);
}

a.category-row:hover,
.article-row:hover {
  color: var(--accent-ink);
}

.planned-article-row,
.planned-article-row:hover {
  color: var(--ink);
  cursor: default;
}

.meta,
.count,
.tagline {
  color: var(--muted);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
}

.article-row .meta {
  display: grid;
  gap: 3px;
  line-height: 1.45;
}

.article-row .meta,
.article-row .row-date {
  padding-left: 1.45rem;
}

.row-title {
  font-size: clamp(1.05rem, 1.65vw, 1.24rem);
  font-weight: 500;
  line-height: 1.45;
}

a.article-row .row-title {
  font-weight: 600;
}

a.category-row .row-title {
  font-weight: 600;
}

.category-row .row-title::before,
.article-list:not(.grouped-article-list) .article-row .row-title::before {
  content: "";
  display: inline-block;
  width: 0.38em;
  height: 0.38em;
  margin-right: 0.78em;
  border-top: 0.16em solid currentColor;
  border-right: 0.16em solid currentColor;
  transform: translateY(-0.08em) rotate(45deg);
}

.row-date {
  display: block;
  margin-top: 6px;
  color: var(--quiet);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 0.74rem;
  font-weight: 400;
  line-height: 1.4;
}

.updates-section {
  padding-top: clamp(34px, 5vw, 62px);
}

.update-row .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.section-link {
  margin: 18px 0 0;
  font-size: 0.9rem;
}

.compact-section {
  padding-top: clamp(18px, 4vw, 42px);
}

.full-update-list .update-row .row-title {
  max-width: 880px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 0.78rem;
}

.page-title {
  position: relative;
  max-width: var(--measure);
  padding: clamp(28px, 4vw, 44px) 0 clamp(38px, 7vw, 76px);
}

.category-page .page-title {
  max-width: none;
  min-height: clamp(170px, 22vw, 250px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(30px, 4.4vw, 54px) 0 clamp(38px, 5.6vw, 68px);
  margin-bottom: clamp(18px, 3vw, 34px);
  isolation: isolate;
}

.category-page .page-title::before,
.category-page .page-title::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.category-page .page-title::before {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(76, 130, 155, 0.035), transparent 68%),
    linear-gradient(rgba(25, 24, 21, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 24, 21, 0.035) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
  mask-image: linear-gradient(90deg, transparent, black 2%, black 98%, transparent);
}

.category-page .page-title::after {
  top: 10px;
  right: 0;
  width: min(70vw, 840px);
  height: min(26vw, 240px);
  background: var(--accent);
  -webkit-mask: url("assets/wavepacket.png") center / contain no-repeat;
  mask: url("assets/wavepacket.png") center / contain no-repeat;
  opacity: 0.43;
  transform: translateX(10%);
}

.category-page .page-title h1,
.category-page .category-formulas {
  width: min(var(--max), calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.category-formulas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.category-formulas span {
  position: absolute;
  color: rgba(76, 130, 155, 0.23);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.86rem, 1.45vw, 1.14rem);
  font-weight: 400;
  white-space: nowrap;
}

.category-formulas span:nth-child(1) {
  right: 28%;
  top: 62%;
}

.category-formulas span:nth-child(2) {
  right: 12%;
  top: 38%;
  opacity: 0.72;
}

.category-formulas span:nth-child(3) {
  right: 2%;
  top: 70%;
  opacity: 0.56;
}

.page-title h1 {
  font-size: clamp(2.25rem, 5.8vw, 5rem);
  font-weight: 600;
  line-height: 1.08;
}

.page-title p {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.about-page .page-title {
  max-width: none;
  min-height: clamp(300px, 42vw, 470px);
  display: grid;
  align-content: center;
  padding: clamp(58px, 8vw, 104px) 0 clamp(54px, 7vw, 90px);
  isolation: isolate;
}

.about-page .page-title::before,
.about-page .page-title::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.about-page .page-title::before {
  inset: 26px calc(50% - 50vw) 30px;
  background:
    linear-gradient(90deg, rgba(76, 130, 155, 0.032), transparent 70%),
    linear-gradient(rgba(25, 24, 21, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 24, 21, 0.035) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 88%, transparent);
}

.about-page .page-title::after {
  top: 34px;
  right: calc(50% - 54vw);
  width: min(70vw, 840px);
  height: min(30vw, 310px);
  background: var(--accent);
  -webkit-mask: url("assets/wavepacket.png") center / contain no-repeat;
  mask: url("assets/wavepacket.png") center / contain no-repeat;
  opacity: 0.31;
  transform: translateX(18%);
}

.about-page .page-title h1 {
  max-width: 820px;
}

.about-page .page-title p {
  max-width: 660px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 80px);
  padding-bottom: 96px;
}

.content-grid.compact-index {
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.side-label {
  position: relative;
  color: var(--quiet);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-page .side-label {
  padding-left: 18px;
}

.about-page .side-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 2px;
  height: 46px;
  background: linear-gradient(var(--accent), rgba(76, 130, 155, 0));
}

.compact-index .side-label {
  padding-bottom: 0;
}

.prose {
  max-width: var(--measure);
  font-size: 1.04rem;
}

.prose h2 {
  margin: 44px 0 12px;
  font-size: 1.55rem;
  line-height: 1.35;
}

.prose p {
  margin: 0 0 18px;
}

.about-actions {
  justify-content: center;
}

.contact-section {
  position: relative;
  padding-top: 0;
  padding-bottom: 82px;
}

.about-page .contact-section::before {
  content: "";
  position: absolute;
  inset: -22px calc(50% - 50vw) 38px;
  border-top: 1px solid rgba(231, 231, 231, 0.86);
  border-bottom: 1px solid rgba(231, 231, 231, 0.86);
  background:
    linear-gradient(90deg, rgba(76, 130, 155, 0.03), transparent 58%),
    linear-gradient(rgba(25, 24, 21, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 24, 21, 0.024) 1px, transparent 1px);
  background-size: auto, 38px 38px, 38px 38px;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 88%, transparent);
  pointer-events: none;
  z-index: -1;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid rgba(76, 130, 155, 0.42);
  color: var(--accent-ink);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 0.94rem;
  font-weight: 600;
}

.text-link:hover {
  border-color: currentColor;
}

.note-box {
  margin: 34px 0;
  border-left: 2px solid var(--accent);
  padding: 8px 0 8px 22px;
  color: var(--muted);
}

.article-shell {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 58px) 0 96px;
}

.article-hero {
  margin-bottom: 48px;
}

.article-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  margin-bottom: 30px;
  color: var(--accent-ink);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.9;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.article-breadcrumb a {
  color: inherit;
}

.article-breadcrumb span {
  color: var(--quiet);
  font-weight: 400;
  letter-spacing: 0;
}

.article-breadcrumb a:hover {
  color: var(--ink);
}

.article-hero h1 {
  max-width: min(100%, var(--measure));
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1.95rem, 4vw, 2.55rem);
  font-weight: 700;
  line-height: 1.18;
}

.article-body {
  max-width: var(--measure);
  margin: 0 auto;
  color: #2f3b3d;
  font-size: 0.98rem;
  line-height: 1.85;
  font-weight: 300;
}

.article-body h2 {
  margin: 52px 0 16px;
  font-size: clamp(1.38rem, 2.5vw, 1.9rem);
  font-weight: 600;
  line-height: 1.35;
}

.article-body h3 {
  margin: 36px 0 12px;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.45;
}

.article-body b,
.article-body strong {
  font-weight: 600;
}

.article-body p {
  margin: 0 0 22px;
}

.article-body blockquote {
  margin: 30px 0;
  border-left: 2px solid var(--accent);
  padding: 8px 0 8px 22px;
  color: var(--muted);
}

.definition-panel {
  display: grid;
  gap: 18px;
  margin: 28px 0 32px;
  padding: 0;
}

.definition-item {
  border: 2px solid var(--accent);
  background: #fff;
  min-width: 0;
  padding: 0 26px 24px;
}

.definition-item + .definition-item {
  padding-top: 0;
  border-top: 2px solid var(--accent);
}

.article-body .definition-item p {
  margin: 0 0 14px;
}

.article-body .definition-item .math-block {
  margin: 8px 0 10px;
  padding: 1px 0;
}

.article-body .definition-item .definition-label {
  display: block;
  margin: 0 -26px 24px;
  border-bottom: 0;
  background: var(--accent);
  padding: 11px 24px 12px;
  color: #fff;
  font-family: Arial, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.45;
}

.article-body .definition-item p:last-child {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.8;
}

.article-body .definition-item ul,
.article-body .definition-item ol {
  margin-bottom: 0;
}

.article-body .definition-item li:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .definition-item {
    padding: 0 18px 20px;
  }

  .article-body .definition-item .definition-label {
    margin: 0 -18px 20px;
    padding: 10px 16px 11px;
  }
}

.article-body ul,
.article-body ol {
  margin: 0 0 24px;
  padding-left: 1.45rem;
}

.article-body li {
  margin: 0 0 8px;
}

.article-body a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.article-body table {
  width: 100%;
  margin: 24px 0 28px;
  border-collapse: collapse;
  font-size: 0.96rem;
  line-height: 1.6;
}

.article-body th,
.article-body td {
  border: 1px solid rgba(76, 130, 155, 0.25);
  padding: 10px 12px;
  text-align: center;
  vertical-align: middle;
}

.article-body th {
  background: rgba(76, 130, 155, 0.07);
  font-weight: 600;
}

.article-body .math-block {
  margin: 8px 0 10px;
  overflow-x: auto;
  padding: 2px 0;
  color: var(--ink);
  line-height: 1.65;
}

.article-body mjx-container {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
}

.article-body .math-block mjx-container[display="true"] {
  margin: 0.1em 0 !important;
}

.note-figure {
  margin: 38px auto;
}

.compact-note-figure {
  margin: 30px 24px;
  font-size: 0.92rem;
}

.compact-note-figure blockquote {
  margin: 0;
  border-left: 0;
  border-radius: 6px;
  background: rgba(76, 130, 155, 0.07);
  padding: 18px 22px;
}

.axiom-quote-figure blockquote {
  position: relative;
  border-left: 0;
  border-radius: 0;
  padding-left: 28px;
}

.axiom-quote-figure blockquote::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--accent);
  border-radius: 0;
}

.compact-note-figure p {
  margin-bottom: 16px;
}

.compact-note-figure p:last-child {
  margin-bottom: 0;
}

.term-equations {
  display: grid;
  gap: 4px;
  margin: 16px 0 16px clamp(18px, 4vw, 34px);
  color: var(--ink);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 0.92rem;
  line-height: 1.8;
  white-space: normal;
}

.term-equations span {
  display: block;
}

.note-figure img,
.article-body figure img {
  display: block;
  width: min(100%, 720px);
  height: auto;
  margin: 0 auto;
}

.note-figure figcaption,
.article-body figcaption {
  margin-top: 10px;
  color: var(--quiet);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 0.82rem;
  line-height: 1.7;
  text-align: center;
}

.embed-card {
  margin: 34px 0;
  padding: 8px 0;
  font-family: Arial, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
}

.embed-card a {
  color: var(--ink);
  text-decoration: none;
}

.embed-card a::after {
  content: " ->";
  color: var(--quiet);
}

.article-mini-toc {
  width: min(860px, calc(100% - 40px));
  margin: 120px auto 0;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-family: Arial, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
}

.article-mini-toc-group {
  display: grid;
  gap: 0;
  margin-top: 20px;
}

.article-mini-toc-group:first-of-type {
  margin-top: 0;
}

.article-mini-toc-group h3 {
  margin: 0;
  padding-bottom: 8px;
  color: var(--ink);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-mini-toc-items {
  display: grid;
  position: relative;
}

.article-mini-toc-items::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: calc(0.23rem - 1px);
  width: 2px;
  background: color-mix(in srgb, var(--accent) 32%, transparent);
}

@media (min-width: 820px) {
  .article-mini-toc {
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr);
    column-gap: 40px;
    row-gap: 26px;
  }

  .article-mini-toc-group {
    margin-top: 0;
  }
}

.article-toc-row {
  display: block;
  padding: 12px 0;
  padding-left: 1.42rem;
  position: relative;
  color: var(--accent-ink);
  text-decoration: none;
}

.article-toc-row::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 1;
  box-sizing: border-box;
  width: 0.46rem;
  height: 0.46rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px #fff;
  transform: translateY(-50%);
}

a.article-toc-row:hover::before,
.article-toc-row.is-current::before {
  background: currentColor;
  border-color: currentColor;
}

.article-toc-row.is-planned::before {
  border-color: var(--quiet);
  background: #fff;
}

a.article-toc-row:hover {
  color: var(--accent-ink);
}

.article-toc-row.is-current {
  text-decoration: none;
}

.article-toc-row.is-planned {
  text-decoration: none;
}

.article-toc-row .row-title {
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.9;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-toc-row.is-current .row-title {
  color: var(--ink);
  font-weight: 300;
}

.article-toc-row.is-planned .row-title {
  color: var(--ink);
  font-weight: 300;
}

.site-footer {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 28px 0 42px;
  font-family: Arial, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.9;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 16px;
}

.footer-contact-links {
  display: contents;
}

.site-footer a {
  width: max-content;
  color: var(--accent-ink);
  justify-self: center;
}

.site-footer .footer-x-link {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--quiet);
}

.footer-x-mark {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  font-family: "Times New Roman", "Hiragino Mincho ProN", serif;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
}

.footer-x-mark::before {
  content: "\1D54F";
}

.site-footer a:hover {
  color: var(--ink);
}

@media (max-width: 820px) {
  .section-head,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    height: 252px;
    padding: 42px 0 40px;
  }

  .hero::before {
    inset: 0 0 24px;
    background-size: auto, 34px 34px, 34px 34px;
    mask-image: linear-gradient(90deg, transparent, black 2%, black 94%, transparent);
  }

  .hero::after {
    top: -4px;
    width: 112vw;
    height: 250px;
    opacity: 0.58;
    transform: translateX(42%);
  }

  .category-row {
    grid-template-columns: 1fr;
    gap: 4px;
    min-height: 0;
  }

  .article-toc-row .row-title {
    white-space: normal;
  }

}

@media (max-width: 640px) {
  .grouped-article-list .article-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .grouped-article-list .article-group h2 {
    padding-top: 0;
  }

  .site-header {
    position: static;
  }

  .category-page .page-title {
    min-height: clamp(142px, 30vw, 185px);
    padding: 28px 0 34px;
    margin-bottom: 22px;
  }

  .category-page .page-title::before {
    background-size: auto, 32px 32px, 32px 32px;
    mask-image: linear-gradient(90deg, transparent, black 2%, black 96%, transparent);
  }

  .category-page .page-title::after {
    top: 8px;
    right: 0;
    width: 88vw;
    height: 170px;
    opacity: 0.22;
    transform: translateX(30%);
  }

  .category-formulas span {
    font-size: 0.8rem;
  }

  .category-formulas span:nth-child(1) {
    right: 24%;
    top: 66%;
  }

  .category-formulas span:nth-child(2) {
    right: 4%;
    top: 42%;
  }

  .category-formulas span:nth-child(3) {
    display: none;
  }

  .about-page .page-title {
    min-height: 360px;
    padding: 54px 0 50px;
  }

  .about-page .page-title::before {
    inset: 18px calc(50% - 50vw) 24px;
    background-size: auto, 34px 34px, 34px 34px;
    mask-image: linear-gradient(90deg, transparent, black 2%, black 96%, transparent);
  }

  .about-page .page-title::after {
    top: 28px;
    width: 106vw;
    height: 230px;
    opacity: 0.18;
    transform: translateX(40%);
  }

  .about-page .side-label {
    padding-left: 14px;
  }

  .about-page .contact-section::before {
    inset: -18px calc(50% - 50vw) 36px;
    background-size: auto, 32px 32px, 32px 32px;
    mask-image: linear-gradient(90deg, transparent, black 2%, black 96%, transparent);
  }

  .nav {
    width: min(var(--max), calc(100% - 28px));
    min-height: 50px;
    gap: 8px;
  }

  .brand {
    width: 34px;
    height: 34px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .nav-links {
    gap: 0;
    overflow-x: auto;
    font-size: 0.78rem;
  }

  .nav-links a {
    padding: 4px 6px;
  }

  .site-footer {
    padding-bottom: max(64px, env(safe-area-inset-bottom));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 18px;
  }

  .article-hero h1 {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
