:root {
  --ink: #000000;
  --paper: #ffffff;
  --wash: #f2f2f2;
  --edge: rgba(0, 0, 0, 0.16);
  --edge-inv: rgba(255, 255, 255, 0.34);
  --radius: 28px;
  --gut: 20px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 84px 0 122px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Josefin Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.masthead {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 60;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font-family: "Cinzel", Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.22s ease;
}

.mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.mark:hover {
  transform: rotate(-8deg);
}

main {
  display: block;
}

section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gut);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 30px 22px;
  border-radius: var(--radius);
  background-color: var(--ink);
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1.7px);
  background-size: 20px 20px;
  color: var(--paper);
}

.brandline {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.hero h1 {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(28px, 7.4vw, 46px);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.005em;
}

.hero-media {
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  min-height: 190px;
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  border-radius: 20px;
  transform: scale(1.06);
  will-change: transform;
  transition: transform 0.25s ease-out;
}

.hero-plate {
  width: 100%;
  height: 100%;
  min-height: 190px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
}

.content {
  min-width: 0;
}

.content > article {
  padding: 34px 0;
  border-top: 1px solid var(--edge);
  scroll-margin-top: 96px;
}

.content > article:first-child {
  border-top: 0;
  padding-top: 4px;
}

.content h2 {
  margin: 0 0 16px;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(22px, 5vw, 31px);
  font-weight: 600;
  line-height: 1.3;
  scroll-margin-top: 96px;
}

.content h2 > span {
  display: inline;
}

.content h2 > span::before {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-right: 0.5em;
  vertical-align: 0.06em;
  background: var(--ink);
}

.content h3 {
  margin: 30px 0 12px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.45;
}

.content h3 > span::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 2px;
  margin-right: 0.6em;
  vertical-align: 0.35em;
  background: var(--ink);
}

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

.content ul,
.content ol {
  margin: 0 0 18px;
  padding-left: 1.25em;
}

.content li {
  margin: 0 0 9px;
}

.content a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.content a:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.content blockquote {
  margin: 0 0 18px;
  padding: 18px 20px;
  border-left: 3px solid var(--ink);
  border-radius: 0 18px 18px 0;
  background: var(--wash);
}

.content blockquote p:last-child {
  margin: 0;
}

.content img {
  display: block;
  margin: 0 0 18px;
  border-radius: 18px;
}

.content table {
  width: 100%;
  margin: 0 0 18px;
  border-collapse: collapse;
  font-size: 16px;
}

.content th,
.content td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--edge);
  text-align: left;
  vertical-align: top;
}

.content th {
  font-weight: 600;
}

.content hr {
  height: 1px;
  margin: 28px 0;
  border: 0;
  background: var(--edge);
}

.toc {
  align-self: start;
  padding: 22px 20px;
  border-radius: var(--radius);
  background: var(--wash);
  scroll-margin-top: 96px;
}

.toc h2 {
  margin: 0 0 12px;
  font-family: "Cinzel", Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
  border-top: 1px solid var(--edge);
}

.toc li:first-child {
  border-top: 0;
}

.toc a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-height: 44px;
  padding: 11px 0;
  font-size: 16px;
  line-height: 1.45;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  flex: 0 0 auto;
  font-family: "Cinzel", Georgia, serif;
  font-size: 16px;
  opacity: 0.45;
}

.toc a:hover {
  padding-left: 6px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.totop {
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--edge);
  font-size: 16px;
  text-decoration: none;
  letter-spacing: 0.12em;
}

.totop:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 70;
  border-radius: var(--radius);
  background: var(--ink);
}

.nav ol {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 8px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav ol::-webkit-scrollbar {
  display: none;
}

.nav li {
  flex: 0 0 auto;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 22px;
  color: var(--paper);
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.22s ease, color 0.22s ease;
}

.nav a svg {
  flex: 0 0 auto;
  opacity: 0.82;
}

.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current="true"] {
  background: var(--paper);
  color: var(--ink);
}

.nav a:hover svg,
.nav a[aria-current="true"] svg {
  opacity: 1;
}

.foot {
  width: calc(100% - 24px);
  max-width: 1200px;
  margin: 56px auto 0;
  padding: 38px 22px 26px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
}

.foot-brand {
  margin: 0 0 30px;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(42px, 13.5vw, 118px);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.02em;
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--edge-inv);
}

.foot dl {
  margin: 0;
}

.foot dt {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: 0.26em;
  color: rgba(255, 255, 255, 0.68);
}

.foot dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--paper);
  text-decoration: none;
}

.foot a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.foot-note {
  margin: 30px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--edge-inv);
  font-size: 16px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.68);
}

@media (min-width: 640px) {
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 920px) {
  body {
    font-size: 17.5px;
    padding-top: 96px;
  }

  .masthead {
    top: 20px;
    left: 24px;
  }

  section {
    grid-template-columns: minmax(0, 1fr) 288px;
    column-gap: 56px;
    row-gap: 40px;
    padding: 0 24px;
  }

  .hero {
    grid-column: 1 / -1;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 44px;
    min-height: 70vh;
    padding: 46px 42px;
  }

  .hero-media,
  .hero-img,
  .hero-plate {
    min-height: 320px;
    height: 100%;
  }

  .content {
    grid-column: 1;
  }

  .toc {
    grid-column: 2;
    position: sticky;
    top: 96px;
    margin-top: 4px;
  }

  .nav ol {
    justify-content: center;
  }

  .foot {
    padding: 52px 36px 30px;
  }

  .foot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }
}

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

  .hero-img,
  .mark,
  .nav a,
  .toc a {
    transition: none;
  }

  .hero-img {
    transform: none;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
