:root {
  --bg: #f6efe7;
  --paper: rgba(255, 251, 246, 0.94);
  --ink: #231815;
  --muted: #68554a;
  --line: rgba(72, 44, 32, 0.14);
  --accent: #c95f3c;
  --shadow: 0 28px 70px rgba(73, 44, 32, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(201, 95, 60, 0.12), transparent 30%),
    linear-gradient(180deg, #fcf8f2 0%, var(--bg) 52%, #efe1d4 100%);
  font-family: "BIZ UDPMincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
}

html {
  scroll-behavior: smooth;
}

p,
h1,
h2,
h3 {
  margin: 0;
}

.article-shell {
  width: min(940px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 72px;
}

.site-nav {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 251, 246, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.site-brand {
  color: var(--accent);
  font-family: "Aptos", "Yu Gothic UI", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.toc-menu {
  position: relative;
}

.toc-menu summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}

.toc-menu summary::-webkit-details-marker {
  display: none;
}

.toc-menu summary span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

.toc-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  display: grid;
  gap: 8px;
  width: min(320px, calc(100vw - 48px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 251, 246, 0.97);
  box-shadow: var(--shadow);
}

.toc-panel a {
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.6;
}

.toc-panel a:hover {
  background: rgba(201, 95, 60, 0.08);
  color: var(--ink);
}

.article-hero,
.article-body {
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.article-hero {
  padding: 34px 28px 30px;
}

.article-kicker {
  color: var(--accent);
  font-family: "Aptos", "Yu Gothic UI", sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.article-hero h1 {
  margin-top: 14px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.article-lead-heading {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.9;
}

.article-body {
  margin-top: 18px;
  padding: 30px 28px 40px;
}

.article-section {
  margin-top: 42px;
  scroll-margin-top: 104px;
}

.article-section:first-child {
  margin-top: 0;
}

.article-section h2 {
  padding-top: 30px;
  border-top: 1px solid var(--line);
  color: var(--accent);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
  line-height: 1.5;
}

.article-subheading {
  margin-top: 24px;
  font-size: clamp(1.12rem, 2vw, 1.38rem);
  line-height: 1.5;
}

.article-line {
  margin-top: 14px;
  font-size: 1.03rem;
  line-height: 2;
}

.body,
.qa,
.colophon {
  color: var(--muted);
}

.bullet {
  padding-left: 1.2rem;
  text-indent: -1.2rem;
}

.qa {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(72, 44, 32, 0.08);
}

.colophon {
  font-family: "Aptos", "Yu Gothic UI", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.article-divider {
  margin: 34px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

strong {
  color: var(--ink);
}

@media (max-width: 720px) {
  .article-shell {
    width: min(100%, calc(100% - 20px));
    padding: 20px 0 40px;
  }

  .site-nav {
    top: 8px;
    padding: 10px 12px;
  }

  .site-brand {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
  }

  .article-hero,
  .article-body {
    padding-left: 18px;
    padding-right: 18px;
    border-radius: 24px;
  }

  .article-body {
    padding-top: 24px;
    padding-bottom: 28px;
  }

  .article-line {
    font-size: 0.98rem;
  }

  .article-section {
    scroll-margin-top: 92px;
  }
}
