:root {
  color-scheme: light dark;
  --paper: #f6f2e8;
  --ink: #13243b;
  --ink-2: rgb(19 36 59 / 0.72);
  --ink-3: rgb(19 36 59 / 0.56);
  --hairline: rgb(19 36 59 / 0.12);
  --panel: rgb(255 255 255 / 0.45);
  --accent: #2a338a;
  --coral: #f05959;
  --cyan: #29b8b8;
  --violet: #6e6be0;
  --serif: ui-serif, "New York", "Iowan Old Style", Charter, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #060b13;
    --ink: #f0ebdb;
    --ink-2: rgb(240 235 219 / 0.74);
    --ink-3: rgb(240 235 219 / 0.58);
    --hairline: rgb(240 235 219 / 0.14);
    --panel: rgb(20 31 46 / 0.6);
    --accent: #9d9bff;
    --coral: #ff646e;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--ink); color: var(--paper);
  padding: 0.5rem 0.9rem; border-radius: 999px; text-decoration: none;
}
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2rem, 68rem); margin-inline: auto; }

/* Header */
.site-header { padding-block: 1.25rem; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--ink); text-decoration: none;
  font-family: var(--serif); font-size: 1.25rem; letter-spacing: 0.01em;
}
.brand img { width: 2rem; height: 2rem; border-radius: 0.5rem; }
.site-nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.site-nav a { color: var(--ink-2); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.25rem); margin: 0 0 1.25rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 3rem 0 0.75rem; }
h3 { font-size: 1.25rem; margin: 2rem 0 0.4rem; }
p, ul, ol { margin: 0 0 1rem; }
li + li { margin-top: 0.35rem; }
.eyebrow {
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 1rem;
}
.lede { font-size: clamp(1.15rem, 2vw, 1.35rem); color: var(--ink-2); max-width: 34rem; }
.muted { color: var(--ink-2); }

/* Hero */
.hero { position: relative; padding-block: clamp(3rem, 9vw, 7rem) clamp(2rem, 6vw, 4rem); overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; }
.hero-art {
  position: absolute; inset: 0 -10% auto auto; width: min(70rem, 120%);
  height: 100%; pointer-events: none; opacity: 0.9;
}
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 1.5rem; padding: 0.55rem 1rem;
  border: 1px solid var(--hairline); border-radius: 999px;
  background: var(--panel); color: var(--ink-2); font-size: 0.95rem;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.badge::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--coral); }

/* Features */
.features { padding-block: 2rem 5rem; }
.grid {
  display: grid; gap: 2.5rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  border-top: 1px solid var(--hairline); padding-top: 2.5rem;
}
.grid h3 { margin-top: 0; }
.grid p { color: var(--ink-2); margin: 0; }
.dims { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.dims li { margin: 0; display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--hairline); padding-bottom: 0.6rem; }
.dims span:last-child { color: var(--ink-2); }

.section { padding-block: 1rem 4rem; }
.section > .wrap > h2:first-child { margin-top: 0; }

/* Document pages */
.doc { padding-block: clamp(2.5rem, 7vw, 5rem) 5rem; }
.doc .wrap { max-width: var(--measure); }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.25rem); }
.doc h2 { font-size: 1.55rem; margin-top: 2.75rem; padding-top: 2rem; border-top: 1px solid var(--hairline); }
.updated { color: var(--ink-3); font-size: 0.95rem; margin-bottom: 2.5rem; }
.callout {
  border: 1px solid var(--hairline); background: var(--panel);
  border-radius: 16px; padding: 1.25rem 1.4rem; margin: 1.5rem 0 2rem;
}
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.contact-link { font-size: 1.25rem; }

details { border-bottom: 1px solid var(--hairline); padding-block: 1rem; }
details:first-of-type { border-top: 1px solid var(--hairline); }
summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
details > :not(summary) { color: var(--ink-2); }
details > p:first-of-type, details > ul:first-of-type, details > ol:first-of-type { margin-top: 0.75rem; }
details > :last-child { margin-bottom: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); padding-block: 2rem 3rem; color: var(--ink-3); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

@media (max-width: 30rem) {
  .site-nav { gap: 1rem; font-size: 0.9rem; }
  .hero-art { opacity: 0.45; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-art path { animation: drift 14s ease-in-out infinite alternate; }
  .hero-art path:nth-child(2n) { animation-duration: 18s; }
  @keyframes drift { to { transform: translateY(-10px); } }
}

.section-label { font-family: var(--sans); font-weight: 400; letter-spacing: 0.14em; margin: 0 0 1.5rem; }
.flush { margin-top: 0; }
