:root {
  --ink: #09090b;
  --canvas: #f7f0e5;
  --violet: #7557ff;
  --violet-text: #6847f5;
  --lavender: #c8baff;
  --muted: #5e5e64;
  --line: rgba(9, 9, 11, 0.16);
  --page: min(1180px, calc(100% - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--violet-text); outline-offset: 4px; }

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(247, 240, 229, 0.95);
  backdrop-filter: blur(18px);
}
.lockup { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.lockup img { width: 36px; height: 36px; }
.wordmark { display: grid; color: var(--ink); line-height: 0.88; letter-spacing: -0.04em; }
.wordmark small { margin: 0 0 5px 2px; font-size: 8px; font-weight: 850; letter-spacing: 0.28em; }
.wordmark strong { font-size: 20px; font-weight: 900; }
.edition { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.17em; }
.edition span { margin-left: 10px; padding: 4px 7px; background: var(--violet); color: white; }
.site-link { justify-self: end; color: var(--ink); font-size: 11px; font-weight: 800; text-decoration: none; }
.site-link:hover { color: var(--violet-text); }

.hero { position: relative; overflow: hidden; background: var(--ink); color: white; }
.hero::after {
  content: "";
  position: absolute;
  width: 540px;
  height: 540px;
  right: -120px;
  bottom: -350px;
  border-radius: 50%;
  background: var(--violet);
  filter: blur(10px);
  opacity: 0.75;
}
.hero-inner { position: relative; z-index: 1; width: var(--page); margin: auto; padding: 104px 0 92px; }
.eyebrow { margin: 0 0 24px; color: var(--lavender); font-size: 10px; font-weight: 850; letter-spacing: 0.2em; }
h1 { max-width: 900px; margin: 0; font-size: clamp(64px, 9vw, 118px); font-weight: 620; line-height: 0.88; letter-spacing: -0.07em; }
h1 span { color: var(--lavender); font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400; }
.hero-copy { max-width: 660px; margin: 36px 0 0; color: #d1cdc7; font-size: clamp(18px, 2vw, 23px); line-height: 1.5; letter-spacing: -0.02em; }

.document { width: var(--page); display: grid; grid-template-columns: 292px minmax(0, 1fr); gap: clamp(50px, 7vw, 96px); margin: 0 auto; padding: 90px 0 110px; }
.contents { position: sticky; top: 112px; align-self: start; max-height: calc(100vh - 136px); overflow-y: auto; padding-right: 10px; scrollbar-gutter: stable; }
.contents > p { margin: 0 0 20px; color: var(--muted); font-size: 11px; font-weight: 850; letter-spacing: 0.18em; text-transform: uppercase; }
.contents nav { display: grid; border-top: 1px solid var(--line); }
.contents a { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 750; line-height: 1.4; text-decoration: none; }
.contents a span { color: var(--violet-text); font: 850 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.contents a:hover { color: var(--ink); }

.terms { min-width: 0; }
.terms-heading { padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.terms-heading p { margin: 0 0 8px; color: var(--violet-text); font-size: 9px; font-weight: 850; letter-spacing: 0.18em; text-transform: uppercase; }
.terms-heading h2 { max-width: 720px; margin: 0; font-size: clamp(38px, 5vw, 62px); font-weight: 620; line-height: 1; letter-spacing: -0.055em; }
.term { scroll-margin-top: 112px; display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 22px; padding: 48px 0; border-bottom: 1px solid var(--line); }
.term-number { color: var(--violet-text); font: 850 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.term h2 { margin: -5px 0 22px; font-size: clamp(25px, 3vw, 36px); line-height: 1.08; letter-spacing: -0.045em; }
.term h3 { margin: 28px 0 8px; color: var(--ink); font-size: 17px; line-height: 1.35; letter-spacing: -0.02em; }
.term h2 + h3 { margin-top: 0; }
.term p { margin: 0; color: var(--muted); }
.term p + p { margin-top: 18px; }
.term ol { margin: 20px 0 0; padding-left: 24px; color: var(--muted); }
.term li { padding-left: 7px; }
.term li + li { margin-top: 16px; }
.term a { color: var(--violet-text); font-weight: 750; text-underline-offset: 3px; overflow-wrap: anywhere; }

.contact { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; margin-top: 54px; padding: 34px; background: var(--lavender); }
.contact span { color: var(--ink); font-size: 9px; font-weight: 900; letter-spacing: 0.17em; }
.contact h2 { margin: 10px 0 0; font-size: 27px; line-height: 1.12; letter-spacing: -0.04em; }
.contact a { min-height: 50px; display: inline-flex; align-items: center; padding: 0 18px; background: var(--ink); color: white; font-size: 11px; font-weight: 850; text-decoration: none; }

footer { background: var(--ink); color: white; }
.footer-inner { width: var(--page); min-height: 132px; display: flex; align-items: center; justify-content: space-between; gap: 28px; margin: auto; }
.footer-inner strong { font-size: 12px; letter-spacing: 0.08em; }
.footer-inner p, .footer-inner a { margin: 0; color: #aaa6a0; font-size: 10px; letter-spacing: 0.1em; text-decoration: none; }
.footer-inner a:hover { color: var(--lavender); }

@media (max-width: 820px) {
  .topbar { grid-template-columns: 1fr auto; padding-inline: 18px; }
  .edition { display: none; }
  .hero-inner { padding: 76px 0 68px; }
  .document { grid-template-columns: 1fr; padding-top: 64px; }
  .contents { display: none; }
}

@media (max-width: 560px) {
  :root { --page: calc(100% - 38px); }
  .site-link { font-size: 0; }
  .site-link::after { content: "Main site ↗"; font-size: 10px; }
  h1 { font-size: clamp(56px, 19vw, 82px); }
  .hero-copy { font-size: 17px; }
  .document { padding: 52px 0 76px; }
  .term { grid-template-columns: 1fr; gap: 14px; padding: 38px 0; }
  .term h2 { margin-top: 0; }
  .contact { grid-template-columns: 1fr; padding: 26px; }
  .contact a { justify-content: center; }
  .footer-inner { min-height: 170px; flex-direction: column; align-items: flex-start; justify-content: center; }
}

@media print {
  @page { size: A4; margin: 16mm; }
  body { background: white; font-size: 11pt; }
  .topbar, .contents, footer { display: none; }
  .hero { background: white; color: var(--ink); }
  .hero::after { display: none; }
  .hero-inner { width: 100%; padding: 0 0 14mm; }
  .eyebrow, h1 span { color: var(--ink); }
  h1 { font-size: 44pt; }
  .hero-copy { color: var(--muted); }
  .document { width: 100%; display: block; padding: 0; }
  .terms-heading { display: none; }
  .term { break-inside: avoid; padding: 8mm 0; }
  .contact { break-inside: avoid; }
}
