:root {
  --background-color: #111113;
  --surface-color: #1a1a1e;
  --text-color: #e2e0dc;
  --text-muted: #a5a09a;
  --accent-color: #c8102e;
  --accent-text: #f84a5c;
  --accent-hover: #ff6b76;
  --accent-cw: #b478f7;
  --border-color: #2a2a2e;
  --blockquote-text: #9a9690;
  --code-bg: #1e1e22;
  --code-text: #e2a0a8;
  --warning-bg: #0d0d0f;
  --warning-text: #b8b4b0;
  --accent-color-faint: color-mix(in oklab, var(--accent-color) 20%, transparent);
}

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

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

body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: "Mona Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "ss01", "ss02", "kern";
  font-size: clamp(1rem, 1rem + 0.25vw, 1.15rem);
  line-height: 1.75;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  max-width: 44em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
}

/* rheo appends endnotes as the last body child; bump the footer's order so
   notes slot between main content and footer. */
body > .site-footer {
  order: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0.75rem 1rem;
  background: var(--accent-color);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-120%);
  transition: transform 0.15s ease;
  z-index: 100;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid #fff;
  outline-offset: -4px;
}

.page-title,
.post-title {
  margin-top: 0;
}

.post-title {
  font-family: "Familjen Grotesk", "Hubot Sans", ui-sans-serif, system-ui, sans-serif;
  font-variation-settings: normal;
  line-height: 1.05;
  margin-bottom: 0.5em;
  text-wrap: pretty;
}

main > :first-child {
  margin-top: 0;
}

/* rheo wraps block elements in <p>, which adds unwanted vertical margin.
   Strip it for the cases where the wrapped element is itself block-level. */
main > p:has(> img.post-banner),
main > p:has(> .og-card),
main > p:has(> script) {
  margin: 0;
}

p {
  margin: 0 0 1.2em;
  text-wrap: pretty;
}

@media print {
  p { orphans: 3; widows: 3; }
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Hubot Sans", "Mona Sans", ui-sans-serif, system-ui, sans-serif;
  color: var(--text-color);
  font-weight: 700;
  line-height: 1.15;
  margin-top: 2.2em;
  margin-bottom: 0.6em;
  text-wrap: balance;
  letter-spacing: -0.02em;
  font-variation-settings: "wdth" 105;
}

h1 {
  font-size: 2.4em;
  color: var(--accent-color);
  letter-spacing: -0.03em;
}

h2 {
  font-size: 1.8em;
  color: var(--accent-color);
  margin-top: 1.5em;
}

h3 {
  font-size: 1.35em;
  color: var(--text-color);
}

h4 {
  font-size: 1.1em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 700;
}

h5, h6 {
  font-size: 1em;
}

em {
  font-style: italic;
  color: inherit;
}

strong {
  font-weight: 700;
  color: var(--text-color);
}

a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in oklab, var(--accent-text) 40%, transparent);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease, text-decoration-thickness 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 3px;
  border-radius: 2px;
}

hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 3em auto;
  width: 40%;
  max-width: 12em;
}

ul, ol {
  padding-left: 1.75em;
  margin: 0.8em 0 1.2em;
}

li {
  margin-bottom: 0.3em;
  text-wrap: pretty;
}

li::marker {
  color: var(--accent-color);
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.75em 0;
  border-radius: 4px;
}

code {
  font-family:
    "JetBrains Mono",
    "Fira Code",
    "Cascadia Code",
    "SF Mono",
    ui-monospace,
    "Courier New",
    monospace;
  background-color: var(--code-bg);
  color: var(--code-text);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.875em;
  border: 1px solid var(--border-color);
}

pre {
  background-color: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.25em 1.5em;
  overflow-x: auto;
  margin: 1.5em 0;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875em;
  color: var(--text-color);
}

blockquote {
  position: relative;
  margin: 2.25em 0;
  padding: 1.75em 1.75em 1.5em 2.75em;
  background-color: color-mix(in oklab, var(--accent-color) 7%, var(--surface-color));
  color: var(--blockquote-text);
  border-radius: 4px;
  font-size: 0.95em;
  line-height: 1.65;
}

blockquote::before {
  content: "\201C";
  position: absolute;
  left: 0.5em;
  top: 0.2em;
  font-size: 2.75em;
  line-height: 1;
  color: var(--accent-color);
  font-family: Georgia, "Times New Roman", serif;
  font-style: normal;
  font-weight: 700;
  pointer-events: none;
  user-select: none;
  opacity: 0.85;
}

blockquote > :first-child {
  margin-top: 0;
}

blockquote > :last-child {
  margin-bottom: 0;
}

blockquote cite,
blockquote footer {
  display: block;
  margin-top: 1em;
  padding-top: 0.75em;
  border-top: 1px solid var(--accent-color);
  font-size: 0.82em;
  font-style: normal;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-align: right;
}

.site-header {
  display: flex;
  align-items: center;
  background-color: var(--accent-color);
  margin: -3rem -2rem 0;
  padding: 0 2rem 0 0;
  gap: 1rem;
  height: 4rem;
  line-height: 1;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

/* Typst wraps html.elem output in <p>; make those wrappers invisible to flex. */
.site-header p,
.site-branding p {
  display: contents;
  margin: 0;
}

.site-logo-wrap {
  flex-shrink: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  line-height: 0;
}

.site-logo {
  height: 100%;
  width: 4rem;
  object-fit: cover;
  display: block;
  margin: 0;
  border-radius: 0;
  user-select: none;
  -webkit-user-drag: none;
}

.site-branding {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.site-tagline {
  display: block;
  font-size: 0.75em;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.01em;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.1rem;
  line-height: 1.2;
}

.site-title {
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  font-family: "Hubot Sans", "Mona Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.5em;
  font-weight: 800;
  font-variation-settings: "wdth" 110;
  color: #fff;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  line-height: 1.1;
}

/* Outer wrapper exists so rheo doesn't auto-wrap the inline <a> in a <p> —
   the anchor holds block children, which would otherwise produce invalid HTML.
   Safari has longstanding flex bugs around `display: contents`, so the wrapper
   is itself a flex item that carries the sizing; the anchor fills it. */
.site-brand-wrap {
  display: flex;
  flex: 1;
  min-width: 0;
  align-self: stretch;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: inherit;
  text-decoration: none;
  flex: 1;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
}

.site-brand:hover .site-title,
.site-brand:focus-visible .site-title {
  color: rgba(255, 255, 255, 0.8);
}

.site-brand:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.875em;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.25rem;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: #fff;
}

.warning-banners {
  display: flex;
  flex-direction: column;
  background-color: var(--warning-bg);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
  margin: 0 -2rem 1.5rem;
  padding: 0.5rem 0;
}

.warning-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 2rem;
}

.warning-badge {
  font-size: 0.7em;
  font-weight: 800;
  letter-spacing: 0.06em;
  border: 2px solid;
  border-radius: 3px;
  padding: 0.2em 0.5em;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.warning-badge--age {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.warning-badge--cw {
  color: var(--accent-cw);
  border-color: var(--accent-cw);
}

.warning-text {
  font-size: 0.8em;
  color: var(--warning-text);
  line-height: 1.4;
}

.warning-highlight {
  color: var(--accent-cw);
  font-weight: 700;
}

.sticker-callout {
  display: flex;
  align-items: stretch;
  margin: 2rem 0;
  border: 1px solid var(--callout-border, var(--border-color));
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--callout-bg, var(--surface-color));
  color: var(--text-color);
  min-height: 6.5rem;
}

.sticker-callout--right {
  flex-direction: row-reverse;
}

.sticker-callout-image {
  display: flex;
  flex-shrink: 0;
  width: 8rem;
  align-items: flex-end;
  justify-content: flex-start;
  padding-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.sticker-callout--right .sticker-callout-image {
  padding-left: 0;
  padding-right: 0.5rem;
  justify-content: flex-end;
}

.sticker-callout--flush .sticker-callout-image {
  padding: 0;
}

.sticker-callout-sticker {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  border-radius: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.sticker-callout-body {
  flex: 1;
  min-width: 0;
  padding: 1rem 1.25rem;
  align-self: center;
}

.sticker-callout-body > p:first-child {
  margin-top: 0;
}

.sticker-callout-body > p:last-child {
  margin-bottom: 0;
}

.sticker-callout--danger {
  --callout-border: color-mix(in oklab, var(--accent-color) 55%, var(--border-color));
  --callout-bg: color-mix(in oklab, var(--accent-color) 12%, var(--surface-color));
}

.sticker-callout--warning {
  --callout-border: color-mix(in oklab, #d4a017 55%, var(--border-color));
  --callout-bg: color-mix(in oklab, #d4a017 12%, var(--surface-color));
}

.sticker-callout--success {
  --callout-border: color-mix(in oklab, #3fa163 55%, var(--border-color));
  --callout-bg: color-mix(in oklab, #3fa163 12%, var(--surface-color));
}

.sticker-callout--info {
  --callout-border: color-mix(in oklab, #4a8fb8 55%, var(--border-color));
  --callout-bg: color-mix(in oklab, #4a8fb8 12%, var(--surface-color));
}

@media (max-width: 720px) {
  .sticker-callout,
  .sticker-callout--right {
    flex-direction: column-reverse;
  }
  .sticker-callout-image,
  .sticker-callout--right .sticker-callout-image {
    width: 6rem;
    padding: 0;
    justify-content: flex-start;
  }
  .sticker-callout-body {
    padding: 0.75rem 1rem;
  }
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 1em 0 0;
}

.post-list li {
  display: flex;
  align-items: baseline;
  gap: 1.25em;
  border-bottom: 1px solid var(--border-color);
}

.post-list li:first-child {
  border-top: 1px solid var(--border-color);
}

.post-list li::marker {
  content: none;
}

.post-date {
  font-size: 0.8em;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.post-list a {
  display: block;
  flex: 1;
  padding: 0.65em 0;
  color: var(--text-color);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in oklab, var(--text-color) 25%, transparent);
  text-underline-offset: 3px;
}

.post-list a:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover);
}

.model-caption {
  font-size: 0.8em;
  color: var(--text-muted);
  text-align: center;
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

.model-caption a {
  color: var(--text-muted);
  text-decoration-color: color-mix(in oklab, var(--text-muted) 50%, transparent);
}

.model-caption a:hover {
  color: var(--text-color);
}

.model-viewer {
  width: calc(100% + 4rem);
  height: clamp(260px, 55vw, 420px);
  margin: 1.5rem -2rem;
  background-color: transparent;
  --poster-color: transparent;
}

dl.faq {
  margin: 0;
}

dl.faq dt {
  font-weight: 700;
  color: var(--accent-color);
  margin-top: 1.5em;
}

dl.faq dt:first-child {
  margin-top: 0;
}

dl.faq dd {
  margin: 0.3em 0 0 0;
  color: var(--text-color);
  line-height: 1.7;
}

.post-banner {
  width: 100%;
  max-height: 24em;
  object-fit: cover;
  border-radius: 0;
  margin: 0.5em 0 0;
}

.post-meta {
  font-size: 0.85em;
  color: var(--text-muted);
  margin-top: 0.5em;
  margin-bottom: 1rem;
  font-style: italic;
}

sup[role="doc-noteref"],
sup[role="doc-backlink"] {
  font-size: 0.75em;
  line-height: 0;
  margin: 0 0.1em;
}

sup[role="doc-noteref"] a,
sup[role="doc-backlink"] a {
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 600;
  padding: 0 0.15em;
}

sup[role="doc-noteref"] a:hover,
sup[role="doc-backlink"] a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

section[role="doc-endnotes"] {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.85em;
  color: var(--text-muted);
  line-height: 1.6;
}

section[role="doc-endnotes"]::before {
  content: "Notes";
  display: block;
  font-family: "Familjen Grotesk", "Hubot Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-color);
  margin-bottom: 0.75rem;
}

section[role="doc-endnotes"] ol {
  padding-left: 0;
  margin: 0;
}

section[role="doc-endnotes"] li {
  margin-bottom: 0.6em;
}

section[role="doc-endnotes"] li:last-child {
  margin-bottom: 0;
}

section[role="doc-endnotes"] sup[role="doc-backlink"] {
  margin-right: 0.35em;
}


.og-card {
  display: flex;
  align-items: stretch;
  margin: 1.75em 0;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--surface-color);
  color: var(--text-color);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
  min-height: 6.5rem;
}

/* Typst wraps nested html.elem output in <p>; neutralize them so flex holds. */
.og-card > p,
.og-card-content > p,
.og-card-image > p {
  display: contents;
  margin: 0;
}

.og-card:hover {
  border-color: var(--accent-color);
  color: var(--text-color);
  text-decoration: none;
  transform: translateY(-1px);
}

.og-card:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.og-card-image {
  display: block;
  flex-shrink: 0;
  width: 9rem;
  background-color: var(--background-color);
  overflow: hidden;
}

.og-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
  border-radius: 0;
}

.og-card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  min-width: 0;
  flex: 1;
}

.og-card-site {
  display: block;
  font-size: 0.7em;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.og-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.95em;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.3;
}

.og-card-description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.82em;
  color: var(--text-muted);
  line-height: 1.4;
}

@media (max-width: 600px) {
  .og-card-image { width: 6.5rem; }
  .og-card-content { padding: 0.65rem 0.85rem; }
}

.discussion-note {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px dashed var(--border-color);
  display: grid;
  gap: 0.85rem;
  justify-items: start;
}

.discussion-note-label {
  display: inline-block;
  font-size: 0.72em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.discussion-note-body {
  margin: 0;
  font-size: 0.92em;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 55ch;
}

.discussion-note-link {
  --bsky-blue: #0085ff;
  --bsky-blue-text: #4fa8ff;
  --bsky-blue-hover: #78bdff;

  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.55rem 1rem;
  background-color: color-mix(in oklab, var(--bsky-blue) 16%, transparent);
  color: var(--bsky-blue-text);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95em;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.discussion-note-link:hover {
  background-color: color-mix(in oklab, var(--bsky-blue) 26%, transparent);
  color: var(--bsky-blue-hover);
  text-decoration: none;
  transform: translateY(-1px);
}

.discussion-note-link:focus-visible {
  outline: 2px solid var(--bsky-blue);
  outline-offset: 2px;
}

/* Butterfly rendered via CSS mask so the anchor body stays pure text — rheo
   would otherwise wrap inline SVG in a <p> inside the <a>, which the HTML
   parser splits apart via the adoption agency algorithm. */
.discussion-note-link::before {
  content: "";
  display: block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 530'><path d='M135.72 44.03C202.216 93.951 273.74 195.17 300 249.49c26.262-54.316 97.782-155.54 164.28-205.46C512.26 8.009 590 -19.862 590 68.825c0 17.712-10.155 148.79-16.111 170.07-20.703 73.984-96.144 92.854-163.25 81.433 117.3 19.964 147.14 86.092 82.697 152.22-122.39 125.59-175.91-31.511-189.63-71.766-2.514-7.38-3.69-10.832-3.708-7.896-.017-2.936-1.193.516-3.707 7.896-13.714 40.255-67.233 197.36-189.63 71.766-64.444-66.128-34.605-132.26 82.697-152.22-67.108 11.421-142.55-7.45-163.25-81.433C20.156 217.612 10 86.536 10 68.825c0-88.687 77.742-60.816 125.72-24.795Z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 530'><path d='M135.72 44.03C202.216 93.951 273.74 195.17 300 249.49c26.262-54.316 97.782-155.54 164.28-205.46C512.26 8.009 590 -19.862 590 68.825c0 17.712-10.155 148.79-16.111 170.07-20.703 73.984-96.144 92.854-163.25 81.433 117.3 19.964 147.14 86.092 82.697 152.22-122.39 125.59-175.91-31.511-189.63-71.766-2.514-7.38-3.69-10.832-3.708-7.896-.017-2.936-1.193.516-3.707 7.896-13.714 40.255-67.233 197.36-189.63 71.766-64.444-66.128-34.605-132.26 82.697-152.22-67.108 11.421-142.55-7.45-163.25-81.433C20.156 217.612 10 86.536 10 68.825c0-88.687 77.742-60.816 125.72-24.795Z'/></svg>");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* rheo wraps each block-level child of <aside> in a <p>. Reset margins, but
   don't use `display: contents` — it would flatten the body paragraph's
   inline children into separate grid cells. */
.discussion-note > p {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.9em;
}

th {
  color: var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
  padding: 0.5em 0.75em;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 0.5em 0.75em;
  border-bottom: 1px solid var(--border-color);
}

tr:last-child td {
  border-bottom: none;
}

::selection {
  background-color: color-mix(in oklab, var(--accent-color) 35%, transparent);
  color: var(--text-color);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background-color);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

.age-gate-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  margin: -3rem -2rem -5rem;
  padding: 1rem;
  box-sizing: border-box;
}

.age-gate {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  max-width: 38em;
  width: 100%;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.age-gate .warning-banners {
  margin: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  border-radius: 0;
}

.age-gate-body {
  padding: 1.5rem 2rem 2rem;
  text-align: center;
}

form.age-gate-body > p {
  margin: 0;
}

.age-gate-field {
  margin-bottom: 1rem;
}

.age-gate-field > p {
  margin: 0;
}

.age-gate label {
  display: block;
  color: var(--text-muted);
  font-size: 0.9em;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.age-gate-selects {
  display: flex;
  gap: 0.5rem;
}

.age-gate-selects select option {
  color: #fff;
}

.age-gate-selects select {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  background: var(--background-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.75rem 2rem 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238a8680' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px 8px;
}

.age-gate input[type="text"] {
  background: var(--background-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.age-gate input[type="text"]:focus-visible,
.age-gate-selects select:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
  border-color: var(--accent-color);
}

.age-gate-radio-group {
  border: none;
  padding: 0;
  margin: 0;
}

.age-gate-radio-group legend {
  color: var(--text-muted);
  font-size: 0.9em;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.age-gate-radios {
  display: flex;
  gap: 0.5rem;
}

/* rheo emits stray <span style="white-space: pre-wrap"> whitespace between
   sibling html.elem calls — collapse them so flex gap isn't doubled. */
.age-gate-radios > span[style*="pre-wrap"] {
  display: none;
}

.age-gate-radio {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: var(--text-color);
  cursor: pointer;
  transition: border-color 0.15s ease;
  font-style: normal;
  text-transform: none;
}

.age-gate-radio:has(input:checked) {
  border-color: var(--accent-color);
  background: color-mix(in oklab, var(--accent-color) 10%, transparent);
  color: #fff;
}

/* Visually hidden but kept in the a11y tree; the label is the visible target. */
.age-gate-radio input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.age-gate-radio:has(input:focus-visible) {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.age-gate-radio:has(input[value="based"]:checked) {
  font-weight: 700;
  animation: based-shake 0.4s ease infinite;
}

@keyframes based-shake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-1px, 1px); }
  20% { transform: translate(1px, -1px); }
  30% { transform: translate(-1px, -1px); }
  40% { transform: translate(1px, 1px); }
  50% { transform: translate(-1px, 0); }
  60% { transform: translate(1px, 0); }
  70% { transform: translate(0, -1px); }
  80% { transform: translate(0, 1px); }
  90% { transform: translate(1px, -1px); }
}

.age-gate-error {
  color: var(--accent-color);
  font-size: 0.85em;
  min-height: 1.2em;
}

.age-gate button {
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  width: 100%;
  margin-top: 0.25rem;
}

.age-gate button:hover {
  background: var(--accent-hover);
}

.age-gate button:active {
  transform: scale(0.98);
}

form.age-gate-body > p.age-gate-footer {
  color: var(--text-muted);
  font-size: 0.8em;
  margin-top: 1.75rem;
  line-height: 1.5;
}

.site-footer {
  display: flex;
  justify-content: center;
  margin-top: 3em;
  padding: 1.5em 0;
  border-top: 1px solid var(--border-color);
}

.site-footer-bsky {
  color: var(--text-muted);
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem;
}

.site-footer-bsky:hover {
  color: #fff;
}

@media (max-width: 600px) {
  body {
    padding: 1.25rem 1rem 3rem;
  }

  .site-header {
    margin: -1.25rem -1rem 0;
    padding: 0 1rem 0 0;
    height: 3.25rem;
    gap: 0.5rem;
  }

  .site-brand {
    gap: 0.5rem;
  }

  .site-logo {
    width: 3.25rem;
  }

  .site-title {
    font-size: 1.1em;
    letter-spacing: -0.02em;
  }

  .site-tagline {
    font-size: 0.6em;
  }

  .warning-banners {
    margin: 0 -1rem 2rem;
  }

  .warning-banner {
    padding: 0.5rem 1rem;
  }

  .model-viewer {
    width: calc(100% + 2rem);
    margin: 1.5rem -1rem;
  }

  h1 { font-size: 1.55em; }
  h2 { font-size: 1.25em; }

  .age-gate-page {
    margin: -1.25rem -1rem -3rem;
    padding: 0;
    align-items: stretch;
  }

  .age-gate {
    border-radius: 0;
    border: none;
    max-width: none;
    box-shadow: none;
  }

  .age-gate-radio {
    font-size: 0.8rem;
    padding: 0.6rem 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
