:root {
  --site-purple: #68246d;
  --site-purple-deep: #43174a;
  --site-red: #e30613;
  --site-ink: #211d22;
  --site-muted: #68616a;
  --site-line: #ded8df;
  --site-paper: #ffffff;
  --site-wash: #f7f3f7;
  --site-max: 1180px;
  --site-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --site-display: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

html { scroll-behavior: smooth; }
body { min-width: 0; }
a { color: var(--site-purple); text-underline-offset: .18em; }
a:hover { color: var(--site-red); }

.site-nav {
  position: relative;
  z-index: 150;
  border-bottom: 1px solid var(--site-line);
  background: rgba(255,255,255,.98);
}
.site-nav__inner {
  width: min(var(--site-max), calc(100% - 2rem));
  margin: 0 auto;
  min-height: 3.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-nav__brand {
  color: var(--site-purple-deep);
  font-family: var(--site-display);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav__links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem;
  flex-wrap: wrap;
}
.site-nav__links a {
  border-radius: 999px;
  padding: .42rem .68rem;
  color: var(--site-muted);
  font-size: .86rem;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
}
.site-nav__links a:hover { background: var(--site-wash); color: var(--site-purple); }
.site-nav__links a[aria-current="page"] { background: var(--site-purple); color: #fff; }

.site-footer {
  border-top: 0;
  background: var(--site-ink);
  color: #fff;
}
.site-footer::before {
  content: "";
  display: block;
  height: 9px;
  background: linear-gradient(90deg, var(--site-purple) 0 64%, var(--site-red) 64% 100%);
}
.site-footer__inner {
  width: min(var(--site-max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.3rem 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  font-size: .9rem;
}
.site-footer__authors { font-weight: 750; }
.site-footer__nav { display: flex; gap: .35rem .8rem; flex-wrap: wrap; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #ffd9dc; }

/* Companion guide */
.guide-page {
  margin: 0;
  background:
    radial-gradient(circle at 100% 0, rgba(227,6,19,.08), transparent 28rem),
    linear-gradient(#fff, #faf8fa 38rem);
  color: var(--site-ink);
  font-family: var(--site-body);
  font-size: 17px;
  line-height: 1.65;
}
.guide-page .skip {
  position: absolute;
  left: .75rem;
  top: -8rem;
  z-index: 300;
  padding: .7rem 1rem;
  background: var(--site-red);
  color: #fff;
  font-weight: 800;
}
.guide-page .skip:focus { top: .75rem; }
.guide-hero {
  border-top: 9px solid var(--site-purple);
  border-bottom: 1px solid var(--site-line);
  background: rgba(255,255,255,.92);
}
.guide-hero::after {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--site-purple) 0 64%, var(--site-red) 64% 100%);
}
.guide-hero__inner {
  width: min(var(--site-max), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.35rem, 4vw, 3rem) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 18rem);
  gap: 1.5rem;
  align-items: end;
}
.guide-kicker {
  margin: 0 0 .35rem;
  color: var(--site-red);
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.guide-hero h1 {
  margin: 0;
  color: var(--site-purple-deep);
  font-family: var(--site-display);
  font-size: clamp(2.15rem, 6vw, 4.6rem);
  line-height: 1;
  letter-spacing: -.035em;
}
.guide-hero h1 em { color: var(--site-red); font-weight: 600; }
.guide-deck { margin: .8rem 0 0; max-width: 65ch; color: var(--site-muted); font-weight: 650; }
.guide-badge {
  border-left: 5px solid var(--site-red);
  padding: .85rem 1rem;
  background: var(--site-wash);
  color: var(--site-purple-deep);
  font-size: .92rem;
}
.guide-shell { width: min(var(--site-max), calc(100% - 2rem)); margin: 0 auto; padding: 1.25rem 0 4rem; }
.guide-tabs {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  gap: .42rem;
  margin: 0 0 1.25rem;
  padding: .65rem;
  overflow-x: auto;
  border: 1px solid var(--site-line);
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 14px 38px -32px rgba(67,23,74,.75);
  scrollbar-width: thin;
}
.guide-tab {
  flex: 0 0 auto;
  min-height: 2.65rem;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: .55rem .82rem;
  background: transparent;
  color: var(--site-muted);
  font: 800 .9rem/1.2 var(--site-body);
  cursor: pointer;
}
.guide-tab:hover { border-color: var(--site-line); color: var(--site-purple); }
.guide-tab[aria-selected="true"] { background: var(--site-purple); color: #fff; }
.guide-panel[hidden] { display: none; }
.guide-panel {
  width: 100%;
  max-width: none;
  margin: 0;
  animation: guide-rise .24s ease both;
}
@keyframes guide-rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.guide-panel__lead {
  margin: 0 0 1rem;
  border-left: 9px solid var(--site-purple-deep);
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.2rem;
  background: var(--site-red);
  color: #fff;
  font-family: var(--site-display);
  font-size: clamp(1.5rem, 3.4vw, 1.85rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.012em;
  box-shadow: 0 12px 28px -24px rgba(67,23,74,.9);
}
.guide-panel__lead strong { color: inherit; }
.guide-accordion {
  margin: .75rem 0;
  overflow: hidden;
  border: 1px solid var(--site-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 14px 34px -32px rgba(67,23,74,.7);
}
.guide-accordion[open] { border-color: #bbaabd; }
.guide-accordion summary {
  position: relative;
  padding: 1.05rem 3.4rem 1.05rem 1.1rem;
  color: var(--site-purple-deep);
  font-family: var(--site-display);
  font-size: clamp(1.2rem, 2.8vw, 1.5rem);
  font-weight: 800;
  line-height: 1.22;
  cursor: pointer;
  list-style: none;
}
.guide-accordion summary::-webkit-details-marker { display: none; }
.guide-accordion summary::after {
  content: "+";
  position: absolute;
  right: 1rem;
  top: 50%;
  translate: 0 -50%;
  color: var(--site-red);
  font-family: var(--site-body);
  font-size: 1.7rem;
}
.guide-accordion[open] summary { background: var(--site-wash); }
.guide-accordion[open] summary::after { content: "−"; }
.guide-accordion__body { padding: .35rem 1.1rem 1.2rem; font-size: 1rem; line-height: 1.68; }
.guide-panel h2, .guide-panel h3, .guide-panel h4 {
  color: var(--site-purple-deep);
  font-family: var(--site-display);
  line-height: 1.24;
}
.guide-panel h3 { margin-top: 1.45rem; font-size: 1.17rem; }
.guide-panel h4 { font-size: 1.02rem; }
.guide-panel p, .guide-panel li { max-width: none; }
.guide-panel blockquote {
  margin: 1rem 0;
  padding: .75rem 1rem;
  border-left: 5px solid var(--site-red);
  background: #fff0f1;
  color: var(--site-purple-deep);
  font-family: var(--site-display);
  font-size: 1.04rem;
}
.guide-panel table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .92rem; }
.guide-panel th, .guide-panel td { border: 1px solid var(--site-line); padding: .55rem .65rem; text-align: left; vertical-align: top; }
.guide-panel th { background: #f5edf6; color: var(--site-purple-deep); }
.guide-panel hr { margin: 1.4rem 0; border: 0; border-top: 1px solid var(--site-line); }
.guide-panel code { border-radius: 4px; padding: .08em .28em; background: var(--site-wash); }
.guide-panel a { overflow-wrap: anywhere; }

button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--site-red);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(104,36,109,.15);
}

@media (max-width: 760px) {
  .site-nav__inner { align-items: flex-start; flex-direction: column; padding: .75rem 0; }
  .site-nav__links { justify-content: flex-start; }
  .guide-hero__inner { grid-template-columns: 1fr; }
  .guide-tabs { top: 0; margin-inline: -.25rem; border-radius: 10px; }
  .site-footer__inner { align-items: flex-start; flex-direction: column; }
}
@media print {
  .site-nav, .guide-tabs, .site-footer { display: none !important; }
  .guide-panel[hidden] { display: block; }
  .guide-panel { max-width: none; }
  .guide-accordion { break-inside: avoid; box-shadow: none; }
  .guide-accordion > * { display: block !important; }
}
