:root {
  color-scheme: dark;
  --ink: #f5f5f3;
  --muted: #a7a7a2;
  --canvas: #0b0b0c;
  --surface: #171719;
  --surface-raised: #202023;
  --line: #343438;
  --focus: #8ecbff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 100%;
  line-height: 1.55;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--canvas); scroll-behavior: smooth; }

body {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
}

a { color: inherit; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 0.14em; }

:focus-visible {
  outline: 0.18rem solid var(--focus);
  outline-offset: 0.22rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  color: #09090a;
  background: #fff;
}
.skip-link:focus { top: 1rem; }

.site-header,
main,
footer {
  width: min(100% - 2rem, 92rem);
  margin-inline: auto;
}

.site-header { padding-block: 1.35rem; }
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.7rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

main > * { margin-block: clamp(3.5rem, 9vw, 8rem); }
.hero { max-width: 60rem; }
.hero h1,
.detail h1 {
  max-width: 17ch;
  margin: 0.3rem 0 1.25rem;
  font-size: clamp(2.6rem, 7vw, 6rem);
  font-weight: 650;
  line-height: 0.96;
  letter-spacing: -0.065em;
}

h2, h3 { line-height: 1.12; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.65rem, 4vw, 2.8rem); }
h3 { margin-block: 0.25rem 0.65rem; font-size: 1.35rem; }
.lede { color: #d7d7d3; font-size: clamp(1.08rem, 2.2vw, 1.38rem); }
.eyebrow {
  margin-block: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.section-heading > p { max-width: 34rem; color: var(--muted); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 2rem 1.1rem;
}
.compact-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }

.elixir-card { min-width: 0; overflow: hidden; background: transparent; }
.elixir-card img,
.detail-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 0.35rem;
  background: #111;
}
.card-body { padding: 0.95rem 0.15rem 0; }
.card-body > p:not(.eyebrow) { min-height: 4.8em; }
.compact-card { display: flex; min-width: 0; flex-direction: column; height: 100%; }
.compact-card .card-body { display: flex; flex: 1; flex-direction: column; }
.compact-card .card-body > p:not(.eyebrow) { min-height: 0; }
.compact-card .card-promise { color: #d4d4d0; }
.compact-card .primary-action { align-self: start; margin-top: auto; }

.fit-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.9rem 0;
  padding: 0;
  list-style: none;
}
.fit-signals li,
.badges span {
  border: 1px solid var(--line);
  border-radius: 100vmax;
  padding: 0.2rem 0.62rem;
  color: var(--muted);
  font-size: 0.75rem;
}
.card-status { color: #858581; font-size: 0.75rem; text-transform: capitalize; }

.spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
  overflow: hidden;
  border-radius: 0.5rem;
  background: var(--surface);
}
.spotlight > * { min-width: 0; }
.spotlight-art { min-height: 27rem; }
.spotlight-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.spotlight-body { align-self: center; padding: clamp(1.5rem, 5vw, 4rem); }
.spotlight h2 { max-width: 14ch; margin-block: 0.45rem 1rem; font-size: clamp(2.2rem, 5vw, 4.8rem); }

.shelf-library > .section-heading { margin-bottom: 3rem; }
.catalogue-shelf { min-width: 0; margin-block: 3.5rem; }
.shelf-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.shelf-heading h2 { margin-block: 0.2rem; }
.shelf-heading p { max-width: 50rem; margin-block: 0.35rem; color: var(--muted); }
.shelf-controls { display: flex; justify-content: end; gap: 0.5rem; min-height: 2.75rem; margin-block: 0.4rem; }
.shelf-controls button { min-width: 3rem; padding-inline: 0.7rem; }
.shelf-controls button:disabled { cursor: default; opacity: 0.35; }
.shelf-track {
  display: grid;
  grid-auto-columns: clamp(17rem, 27vw, 22rem);
  grid-auto-flow: column;
  gap: 1rem;
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 0.35rem 0.2rem 1.2rem;
  scroll-snap-type: inline mandatory;
  scrollbar-color: #555 transparent;
}
.shelf-item { min-width: 0; scroll-snap-align: start; list-style: none; }

.handoff-panel,
.play-overview,
.detail-facts,
.source-panel,
.trust-panel,
.related-panel,
.lifecycle-notice,
.trust-note {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 1.4rem 1rem;
  margin-block: 1.25rem;
}
.fact-grid div { min-width: 0; border-top: 1px solid var(--line); padding-top: 0.65rem; }
.fact-grid dt { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; }
.fact-grid dd { margin: 0.18rem 0 0; overflow-wrap: anywhere; }

.primary-action,
.button-link,
button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #f1f1ee;
  border-radius: 0.3rem;
  padding: 0.65rem 0.95rem;
  color: #0a0a0b;
  background: #f1f1ee;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.secondary-action,
.button-link { color: var(--ink); border-color: var(--line); background: transparent; }
.primary-action:hover,
button:hover { background: #fff; }
.secondary-action:hover,
.button-link:hover { border-color: #777; background: var(--surface-raised); }

input[type="search"],
select,
textarea {
  width: 100%;
  border: 1px solid #4a4a4f;
  border-radius: 0.3rem;
  padding: 0.7rem 0.8rem;
  color: var(--ink);
  background: #101012;
  font: inherit;
}
input[type="search"], select { min-height: 2.8rem; }

.catalogue-controls {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(10rem, 1fr);
  gap: 0.5rem 1rem;
  margin-bottom: 1.5rem;
}
.catalogue-controls > label { margin: 0; }
.catalogue-controls > p,
.filter-panel { grid-column: 1 / -1; }
.filter-panel { border: 1px solid var(--line); border-radius: 0.4rem; padding: 0.9rem; }
.filter-panel fieldset { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; border: 0; margin: 0.75rem 0; padding: 0; }
.filter-panel legend { width: 100%; color: var(--muted); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.filter-option { margin: 0; font-weight: 500; }
.filter-option input { inline-size: 1.2rem; block-size: 1.2rem; vertical-align: middle; }
.collection-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }

.how-it-works ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1rem; padding-left: 1.25rem; }
.how-it-works li { padding: 0.5rem; }
.trust-note { padding: clamp(1rem, 4vw, 2rem); }
.trust-note p { max-width: 70rem; }

nav { margin-bottom: 1.5rem; color: var(--muted); font-size: 0.88rem; }
.detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(1.5rem, 4vw, 4rem); }
.detail > * { min-width: 0; }
.detail-art { align-self: start; }
.detail-intro { align-self: center; }
.play-overview,
.detail-facts,
.handoff-panel,
.source-panel,
.trust-panel,
.related-panel,
.lifecycle-notice { grid-column: 1 / -1; padding: clamp(1rem, 4vw, 2.2rem); }

.play-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0;
}
.play-facts div { min-width: 0; border-top: 1px solid var(--line); padding-top: 0.7rem; }
.play-facts dt { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; }
.play-facts dd { margin: 0.22rem 0 0; }

.badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
label { display: block; margin-block: 1rem 0.35rem; font-weight: 700; }
textarea { display: block; max-width: 100%; resize: vertical; }
.versioned-link { overflow-wrap: anywhere; }
.delivery-steps { max-width: 62rem; padding-left: 1.4rem; }
.delivery-steps li { margin-block: 0.45rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-block: 1rem; }
.copy-status { min-height: 1.6em; color: var(--muted); }

details { border-top: 1px solid var(--line); padding-top: 1rem; }
summary { min-height: 2.75rem; cursor: pointer; font-weight: 700; }
.disclosure-panel { padding: 1.1rem clamp(1rem, 4vw, 2.2rem); }
.disclosure-panel > summary { display: list-item; min-height: 0; font-size: 1.05rem; }
.disclosure-content { padding-top: 1rem; }
.disclosure-content > h2 { margin-top: 0; font-size: clamp(1.35rem, 3vw, 2rem); }
.prompt-details { margin-top: 1.25rem; }
pre {
  max-width: 100%;
  max-height: 38rem;
  overflow: auto;
  border: 1px solid var(--line);
  padding: 1rem;
  color: #e4e4df;
  background: #0a0a0b;
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

footer { border-top: 1px solid var(--line); padding-block: 1.5rem 3rem; color: var(--muted); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1rem; }
.related-grid article { border-top: 1px solid var(--line); padding-top: 1rem; }
.trust-panel dd,
.trust-panel p { overflow-wrap: anywhere; }

@media (max-width: 42rem) {
  .section-heading,
  .shelf-heading { display: block; }
  .catalogue-controls { grid-template-columns: minmax(0, 1fr); }
  .catalogue-controls > * { grid-column: 1; }
  .detail,
  .spotlight { grid-template-columns: minmax(0, 1fr); }
  .play-facts { grid-template-columns: minmax(0, 1fr); }
  .spotlight-art { min-height: 0; }
  .shelf-track { grid-auto-columns: min(82vw, 21rem); }
  .detail-art,
  .detail-intro,
  .play-overview,
  .detail-facts,
  .handoff-panel,
  .source-panel,
  .trust-panel,
  .related-panel,
  .lifecycle-notice { grid-column: 1; }
  .card-body > p:not(.eyebrow) { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
