:root {
  --ink: #f7f0df;
  --muted: #c9bfa9;
  --night: #0d1210;
  --forest: #15221c;
  --line: rgba(247, 240, 223, 0.18);
  --brass: #d39a3a;
  --brass-dark: #8c581c;
  --danger: #d16b58;
  --max: 72rem;
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% -10%, rgba(211, 154, 58, 0.16), transparent 34rem),
    linear-gradient(145deg, #101713, var(--night) 54%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 20; padding: .75rem 1rem; background: var(--ink); color: var(--night); }
.skip-link:focus { top: 1rem; }
.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  min-height: 5.25rem;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font-family: Georgia, serif; font-size: 1.25rem; letter-spacing: .04em; }
.brand img { width: 2.6rem; height: 2.6rem; border-radius: .72rem; }
.site-nav { display: flex; align-items: center; gap: clamp(.85rem, 2vw, 1.7rem); }
.site-nav a { color: var(--muted); font-size: .9rem; text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--ink); }
.hero {
  position: relative;
  min-height: calc(100svh - 5.25rem);
  overflow: hidden;
  display: grid;
  align-items: center;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(90deg, rgba(13,18,16,.98) 0%, rgba(13,18,16,.82) 44%, rgba(13,18,16,.16) 80%), url('/assets/feature-graphic.jpg') center/cover;
  background: linear-gradient(90deg, rgba(13,18,16,.98) 0%, rgba(13,18,16,.82) 44%, rgba(13,18,16,.16) 80%),
              image-set(url('/assets/feature-graphic.avif') type('image/avif'),
                        url('/assets/feature-graphic.webp') type('image/webp'),
                        url('/assets/feature-graphic.jpg') type('image/jpeg')) center/cover;
  transform: scale(1.025);
  animation: settle 1.4s cubic-bezier(.2,.8,.2,1) both;
}
.hero::after { content: ""; position: absolute; inset: auto 0 0; z-index: -1; height: 14rem; background: linear-gradient(transparent, var(--night)); }
.hero-inner { width: min(calc(100% - 2rem), var(--max)); min-width: 0; margin: 0 auto; padding: 5rem 0 8rem; }
.kicker { margin: 0 0 1rem; color: var(--brass); font-size: .8rem; font-weight: 750; letter-spacing: .18em; text-transform: uppercase; }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: 500; line-height: 1.06; text-wrap: balance; }
h1 { max-width: 10ch; margin: 0; font-size: clamp(3.4rem, 10vw, 7.8rem); letter-spacing: -.055em; }
.hero-copy { max-width: min(34rem, 100%); margin: 1.6rem 0 0; overflow-wrap: anywhere; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.button { display: inline-flex; min-height: 3rem; align-items: center; justify-content: center; padding: .75rem 1.15rem; border: 1px solid var(--brass); background: var(--brass); color: #171009; font-weight: 750; text-decoration: none; cursor: pointer; }
.button:hover, .button:focus-visible { background: #edb657; }
.button.secondary { background: rgba(13,18,16,.5); color: var(--ink); border-color: var(--line); }
.button.secondary:hover, .button.secondary:focus-visible { border-color: var(--ink); background: rgba(13,18,16,.82); }
.section { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; padding: clamp(5rem, 10vw, 9rem) 0; border-top: 1px solid var(--line); }
.section h2 { max-width: 12ch; margin: 0; font-size: clamp(2.5rem, 6vw, 5rem); letter-spacing: -.04em; }
.section-lead { max-width: 43rem; margin: 1.4rem 0 0; color: var(--muted); font-size: 1.1rem; }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 7vw, 7rem); margin-top: 4rem; }
.role { display: grid; grid-template-columns: minmax(5rem, 9rem) 1fr; align-items: center; gap: 1.4rem; }
.role img { filter: drop-shadow(0 1.2rem 1.4rem rgba(0,0,0,.4)); }
.role h3 { margin: 0 0 .45rem; font-size: 1.7rem; }
.role p { margin: 0; color: var(--muted); }
.steps { counter-reset: steps; display: grid; gap: 0; margin: 3rem 0 0; padding: 0; list-style: none; }
.steps li { counter-increment: steps; display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.steps li::before { content: "0" counter(steps); color: var(--brass); font-family: Georgia, serif; font-size: 1.25rem; }
.steps strong { display: block; font-size: 1.05rem; }
.steps span { color: var(--muted); }
.page-hero { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; padding: clamp(5rem, 10vw, 8rem) 0 3rem; }
.page-hero h1 { max-width: 12ch; font-size: clamp(3rem, 8vw, 6rem); }
.page-hero p { max-width: 42rem; color: var(--muted); font-size: 1.1rem; }
.content { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; padding: 0 0 7rem; }
.content section { padding: 2rem 0; border-top: 1px solid var(--line); }
.content section > * { max-width: 54rem; }
.content h2 { margin: 0 0 1rem; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.content h3 { margin-top: 1.6rem; font-size: 1.3rem; }
.content p, .content li { color: var(--muted); }
.content strong { color: var(--ink); }
.content a { text-decoration-color: var(--brass); text-underline-offset: .2em; }
.notice { margin: 1.5rem 0; padding: 1rem 1.15rem; border-left: .2rem solid var(--brass); background: rgba(211,154,58,.08); }
.code { display: inline-block; padding: .4rem .65rem; color: var(--ink); background: rgba(255,255,255,.08); font: 700 1.1rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }
/* Breadcrumb trail on interior pages. */
.breadcrumb { margin: 0 0 1.5rem; color: var(--muted); font-size: .85rem; letter-spacing: .04em; }
.breadcrumb a { text-decoration-color: var(--brass); text-underline-offset: .2em; }
.breadcrumb-sep { margin: 0 .55rem; opacity: .5; }

/* Inline SVG board diagrams. The SVG draws its lines and points in
   currentColor, so the figure sets the ink level for the whole drawing. */
.diagram { margin: 2rem 0; }
.diagram .board { width: min(22rem, 100%); height: auto; color: var(--ink); }
.diagram figcaption { max-width: 34rem; margin-top: .9rem; color: var(--muted); font-size: .92rem; line-height: 1.55; }

/* Prose lists inside document pages. */
.content ul, .content ol { margin: 1.1rem 0; padding-left: 1.4rem; }
.content li { margin-bottom: .6rem; }
.content li:last-child { margin-bottom: 0; }
.content li::marker { color: var(--brass); }

.join-panel { margin-top: 2rem; padding: 2rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.join-error { color: #f3a394; }
.site-footer { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; padding: 2.5rem 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1.5rem; color: var(--muted); font-size: .88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.site-footer a { text-underline-offset: .2em; }

/* Document layout with an "on this page" sidebar. Added by site.js on long doc
   pages (privacy, terms, support, account-deletion). Keeps body text in a
   narrower column and gives a sticky table of contents beside it.
   House rule: the grid item spans full height, an inner element is sticky, and
   the document — not the sidebar — owns vertical scrolling (no inner scrollbar). */
.doc-layout {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.doc-layout > .content { width: 100%; margin: 0; }
.toc { min-width: 0; }
.toc-inner { position: sticky; top: 2rem; padding: .5rem 0; }
.toc-title {
  margin: 0 0 .8rem; color: var(--brass);
  font-size: .72rem; font-weight: 750; letter-spacing: .18em; text-transform: uppercase;
}
.toc-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .1rem; }
.toc-list a {
  display: block; padding: .4rem .8rem;
  border-left: 2px solid var(--line);
  color: var(--muted); text-decoration: none; font-size: .92rem; line-height: 1.35;
}
.toc-list a:hover, .toc-list a:focus-visible { color: var(--ink); border-left-color: var(--brass-dark); }
.toc-list a.is-active { color: var(--ink); border-left-color: var(--brass); }
.content section { scroll-margin-top: 2rem; }
@media (max-width: 900px) {
  /* Stack the contents above the article so every link stays reachable. */
  .doc-layout { grid-template-columns: 1fr; gap: 1.25rem; }
  .toc-inner { position: static; padding: 0; }
}

.reveal { animation: rise .75s .1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(1.2rem); } }
@keyframes settle { from { opacity: .35; transform: scale(1.08); } }
@media (max-width: 720px) {
  .site-header { min-height: 4.5rem; }
  .site-nav a:not(:last-child) { display: none; }
  .hero { min-height: calc(100svh - 4.5rem); }
  .hero::before {
    background: linear-gradient(0deg, rgba(13,18,16,.98) 0%, rgba(13,18,16,.75) 62%, rgba(13,18,16,.18) 100%), url('/assets/feature-graphic.jpg') 62% center/cover;
    background: linear-gradient(0deg, rgba(13,18,16,.98) 0%, rgba(13,18,16,.75) 62%, rgba(13,18,16,.18) 100%),
                image-set(url('/assets/feature-graphic.avif') type('image/avif'),
                          url('/assets/feature-graphic.webp') type('image/webp'),
                          url('/assets/feature-graphic.jpg') type('image/jpeg')) 62% center/cover;
  }
  .hero-inner { align-self: end; padding: 12rem 0 4rem; }
  h1 { font-size: clamp(3rem, 14vw, 4.2rem); }
  .roles { grid-template-columns: 1fr; }
  .role { grid-template-columns: 6.2rem 1fr; }
  .site-footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
