/* Forge project site — no build step, system fonts, light and dark. */

:root {
  color-scheme: dark;
  --bg: #17040f;
  --bg-band: #1c0714;
  --surface: #210a19;
  --raised: #2b1021;
  --inset: #190710;
  --border: #553348;
  --border-quiet: #3b1d30;
  --text: #f6eeef;
  --strong: #fff4f0;
  --muted: #d4c0ca;
  --subtle: #c2aaba;
  --orange: #e95420;
  --orange-hover: #f16b3d;
  --orange-text: #ff8a5c;
  --on-orange: #17040f;
  --purple: #be7be6;
  --purple-text: #d3a4f0;
  --focus: #ffd0b7;
  --ok: #9ed5b4;
  --ok-surface: #183127;
  --ok-border: #678c7c;
  --exp-surface: #49251f;
  --exp-border: #b77a5f;
  --exp-text: #ffc1a7;
  --part-surface: #2f1840;
  --part-border: #8a5aa8;
  --part-text: #e2c4f5;
  --info-surface: #2b1021;
  --glow-a: rgba(233, 84, 32, 0.22);
  --glow-b: rgba(190, 123, 230, 0.18);
  --shadow: 0 24px 72px rgba(10, 0, 6, 0.62);

  --font-sans:
    'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial,
    sans-serif;
  --font-mono:
    ui-monospace, 'Cascadia Code', 'Cascadia Mono', 'SF Mono', Menlo, Consolas, 'Liberation Mono',
    monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --wrap: 1180px;
  --gutter: 24px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #fbf6f3;
    --bg-band: #f5ebe7;
    --surface: #ffffff;
    --raised: #f7eeeb;
    --inset: #f3e7e3;
    --border: #d9c2ca;
    --border-quiet: #e8d8dc;
    --text: #2a0d1e;
    --strong: #17040f;
    --muted: #563a4b;
    --subtle: #66495a;
    --orange: #e95420;
    --orange-hover: #d2461a;
    --orange-text: #a83a0d;
    --on-orange: #17040f;
    --purple: #7d3fa8;
    --purple-text: #6d3295;
    --focus: #a83a0d;
    --ok: #1f6b45;
    --ok-surface: #e2f3e9;
    --ok-border: #8cc2a3;
    --exp-surface: #fde6db;
    --exp-border: #e59a78;
    --exp-text: #8a2f0a;
    --part-surface: #f1e3fa;
    --part-border: #c39bdc;
    --part-text: #5a2580;
    --info-surface: #f3e7e3;
    --glow-a: rgba(233, 84, 32, 0.14);
    --glow-b: rgba(125, 63, 168, 0.1);
    --shadow: 0 24px 60px rgba(60, 10, 40, 0.16);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-sans);
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--orange-text);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

main:focus {
  outline: none;
}

code,
pre,
kbd {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

:not(pre) > code {
  background: var(--inset);
  border: 1px solid var(--border-quiet);
  border-radius: 5px;
  padding: 0.05em 0.35em;
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  font-family: var(--font-mono);
  color: var(--strong);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(2.3rem, 5.4vw, 4.2rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.75rem);
  font-weight: 700;
}

h3 {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

.dot {
  color: var(--orange);
}

.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;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--orange);
  color: var(--on-orange);
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.3) blur(12px);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--border-quiet);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--strong);
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  border-radius: 8px;
}

.brand-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.brand-sub {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
  line-height: 1.2;
  max-width: 9.5em;
}

.site-nav {
  margin-left: auto;
  min-width: 0;
}

.site-nav ul {
  display: flex;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a,
.header-gh {
  display: inline-block;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current='true'] {
  color: var(--strong);
  background: var(--raised);
}

.header-gh {
  border: 1px solid var(--border);
  color: var(--strong);
}

.header-gh:hover {
  border-color: var(--orange);
}

@media (max-width: 1040px) {
  .brand-sub {
    display: none;
  }
}

@media (max-width: 880px) {
  .header-bar {
    flex-wrap: wrap;
    gap: 6px 12px;
    padding-top: 10px;
  }
  .header-gh {
    margin-left: auto;
  }
  .site-nav {
    order: 3;
    width: 100%;
    margin: 0 calc(var(--gutter) * -1);
    width: calc(100% + var(--gutter) * 2);
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 var(--gutter) 8px;
  }
  .site-nav::-webkit-scrollbar {
    display: none;
  }
  html {
    scroll-padding-top: 112px;
  }
}

/* Buttons and badges */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
}

.button-primary {
  background: var(--orange);
  color: var(--on-orange);
}

.button-primary:hover {
  background: var(--orange-hover);
}

.button-quiet {
  border-color: var(--border);
  color: var(--strong);
  background: var(--surface);
}

.button-quiet:hover {
  border-color: var(--purple);
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.6;
  white-space: normal;
  color: var(--muted);
  background: var(--info-surface);
  vertical-align: middle;
}

.badge-ok {
  color: var(--ok);
  background: var(--ok-surface);
  border-color: var(--ok-border);
}

.badge-exp {
  color: var(--exp-text);
  background: var(--exp-surface);
  border-color: var(--exp-border);
}

.badge-part {
  color: var(--part-text);
  background: var(--part-surface);
  border-color: var(--part-border);
}

/* Kicker */
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--orange-text);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.kicker::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--orange);
  flex-shrink: 0;
}

/* Hero */
.hero {
  position: relative;
  padding: 72px 0 40px;
  isolation: isolate;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(48rem 26rem at 82% 8%, var(--glow-b), transparent 70%),
    radial-gradient(40rem 24rem at 6% 0%, var(--glow-a), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 56px;
  align-items: center;
}

.lead {
  font-size: 1.14rem;
  color: var(--muted);
  margin: 22px 0 28px;
  max-width: 38em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.hero-note {
  font-size: 0.92rem;
  color: var(--subtle);
  max-width: 36em;
  border-left: 2px solid var(--orange);
  padding-left: 14px;
}

.hero-note .badge {
  margin-right: 6px;
}

.hero-note strong {
  color: var(--strong);
}

.hero-shot {
  margin: 0;
}

.window {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-quiet);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--subtle);
  background: var(--inset);
}

.window-dots {
  display: inline-flex;
  gap: 6px;
}

.window-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.window-dots i:first-child {
  background: var(--orange);
}

.hero-shot figcaption,
.shots figcaption,
.diagram figcaption {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--subtle);
}

.facts {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--border-quiet);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.facts li {
  padding: 18px 18px 20px;
  border-left: 1px solid var(--border-quiet);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.facts li:first-child {
  border-left: 0;
}

.facts strong {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  color: var(--strong);
  letter-spacing: -0.02em;
}

.facts span {
  font-size: 0.84rem;
  color: var(--subtle);
  line-height: 1.4;
}

/* Sections */
.section {
  padding: 88px 0;
}

.section-band {
  background: var(--bg-band);
  border-top: 1px solid var(--border-quiet);
  border-bottom: 1px solid var(--border-quiet);
}

.section-lead {
  max-width: 52em;
  color: var(--muted);
  margin: 18px 0 40px;
  font-size: 1.04rem;
}

.prose {
  color: var(--muted);
}

.prose p:last-child {
  margin-bottom: 0;
}

.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--purple);
  background: var(--surface);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  color: var(--text);
}

.note {
  font-size: 0.9rem;
  color: var(--subtle);
  margin-top: 24px;
  max-width: 56em;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border-quiet);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.card-quiet {
  background: transparent;
  border-style: dashed;
  border-color: var(--border);
}

.cols-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.ticks,
.crosses {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ticks li,
.crosses li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  font-size: 0.95rem;
}

.ticks li::before,
.crosses li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-weight: 700;
}

.ticks li::before {
  content: '+';
  color: var(--orange-text);
}

.crosses li::before {
  content: '–';
  color: var(--purple-text);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 40px;
  margin-top: 28px;
}

.audience {
  display: grid;
  gap: 16px;
  align-content: start;
}

/* Screenshots */
.shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 36px;
}

.shots figure {
  margin: 0;
}

/* One screenshot inside a section, kept narrower than the full content width. */
.shots.shots-single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 960px;
}

.shots img {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--surface);
}

/* Screenshot viewer: each screenshot is a link to its image file (works without JavaScript);
   site.js upgrades the links to open the modal <dialog id="lightbox">. */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.zoom {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
  border-radius: var(--radius);
}

/* The window frame clips overflow, so the focus ring sits inside it. */
.window .zoom {
  border-radius: 0;
}

.window .zoom:focus-visible {
  outline-offset: -6px;
}

.zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  color: var(--strong);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
}

.zoom-hint svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.zoom:hover .zoom-hint,
.zoom:focus-visible .zoom-hint {
  opacity: 1;
}

/* Touch screens have no hover: show a quiet, icon-only magnifier all the time. */
@media (hover: none) {
  .zoom-hint {
    width: 32px;
    padding: 0;
    opacity: 0.85;
  }
  .zoom-hint span {
    display: none;
  }
}

body.lightbox-open {
  overflow: hidden;
  padding-right: var(--lightbox-scrollbar, 0);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  color: var(--text);
}

.lightbox[open] {
  display: flex;
  flex-direction: column;
}

.lightbox::backdrop {
  background: transparent;
}

.lightbox-bar,
.lightbox-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 16px;
  background: var(--surface);
}

.lightbox-bar {
  border-bottom: 1px solid var(--border-quiet);
}

.lightbox-controls {
  justify-content: center;
  border-top: 1px solid var(--border-quiet);
}

.lightbox-title {
  flex: 1 1 16rem;
  max-height: 6.4em;
  margin: 0;
  overflow: auto;
  color: var(--strong);
  font: 600 0.95rem/1.45 var(--font-sans);
  letter-spacing: 0;
}

.lightbox-count {
  margin: 0;
  color: var(--subtle);
  font: 600 0.9rem/1 var(--font-mono);
  white-space: nowrap;
}

.lightbox button.button {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.lightbox .button {
  padding: 0 16px;
}

.lightbox button.button[aria-pressed='true'] {
  border-color: var(--orange);
  background: var(--raised);
}

/* A check mark, not only a colour change, shows that Full size is on. */
.lightbox button.button[aria-pressed='true']::before {
  content: '\2713';
  content: '\2713' / '';
}

.lightbox-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  padding: 12px;
  overflow: auto;
  overscroll-behavior: contain;
}

.lightbox-img {
  grid-area: 1 / 1;
  margin: auto;
  width: auto;
  height: auto;
  max-width: min(100%, 96vw);
  max-height: min(100%, 88vh);
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* Full size: the image's own pixels, scrolled inside the stage. */
.lightbox-stage.is-full .lightbox-img {
  max-width: none;
  max-height: none;
}

.lightbox-stage.is-loading .lightbox-img,
.lightbox-stage.is-error .lightbox-img {
  visibility: hidden;
}

.lightbox-note {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;
  max-width: 28em;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--strong);
  text-align: center;
}

.lightbox-note[hidden] {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .zoom-hint {
    transition: opacity 0.15s ease;
  }
  .lightbox[open] {
    animation: lightbox-fade 0.16s ease-out;
  }
  @keyframes lightbox-fade {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
}

@media (max-width: 640px) {
  .lightbox-bar,
  .lightbox-controls {
    padding: 8px 16px;
  }
  .lightbox-stage {
    padding: 8px;
  }
  /* Counter and Close share the first row; the caption gets the full width below them. */
  .lightbox-count {
    margin-right: auto;
  }
  .lightbox-title {
    order: 1;
    flex-basis: 100%;
    max-height: 5.8em;
  }
}

/* Workspaces */
.ws-grid {
  list-style: none;
  counter-reset: ws;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.ws {
  counter-increment: ws;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-quiet);
  border-radius: var(--radius);
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
}

.ws::before {
  content: counter(ws, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--orange-text);
  margin-bottom: 8px;
}

.ws-tool::before {
  color: var(--purple-text);
}

.ws h3 {
  margin-bottom: 8px;
}

.ws p {
  color: var(--muted);
  font-size: 0.93rem;
}

.ws .ws-model {
  margin: auto 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border-quiet);
  font-size: 0.86rem;
  color: var(--subtle);
}

.ws .ws-model a {
  font-weight: 600;
}

/* Models */
.filters {
  border: 0;
  margin: 0 0 10px;
  padding: 0;
  min-width: 0;
}

.filters legend {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--strong);
  margin-bottom: 12px;
  padding: 0;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-list input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.filter-list label {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.filter-list label:hover {
  border-color: var(--purple);
  color: var(--strong);
}

.filter-list input:checked + label {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--on-orange);
}

.filter-list input:focus-visible + label {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.model-count {
  font-size: 0.88rem;
  color: var(--subtle);
  margin: 12px 0 8px;
}

.legend {
  font-size: 0.84rem;
  color: var(--subtle);
  margin-bottom: 24px;
  line-height: 2;
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}

.model {
  background: var(--surface);
  border: 1px solid var(--border-quiet);
  border-radius: var(--radius);
  padding: 22px 22px 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.model:target {
  border-color: var(--orange);
  box-shadow: 0 0 0 1px var(--orange);
}

.model header {
  display: grid;
  gap: 4px;
  justify-items: start;
  margin-bottom: 10px;
}

.model-ws {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple-text);
}

.model h3 {
  font-size: 1.22rem;
  margin-bottom: 4px;
}

.model-purpose {
  color: var(--text);
  font-size: 0.97rem;
  margin-bottom: 14px;
}

.facts-list {
  margin: 0 0 12px;
  display: grid;
  gap: 0;
  font-size: 0.87rem;
}

.facts-list > div {
  display: grid;
  grid-template-columns: 5.4em minmax(0, 1fr);
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid var(--border-quiet);
}

.facts-list dt {
  color: var(--subtle);
  font-weight: 600;
}

.facts-list dd {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.model :not(pre) > code {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text);
  font-size: 0.86em;
}

.model details {
  border-top: 1px solid var(--border-quiet);
  padding-top: 8px;
  margin-bottom: 10px;
}

.model summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--strong);
  padding: 4px 0;
}

.model summary:hover {
  color: var(--orange-text);
}

.model details ul,
.support-list {
  margin: 8px 0 4px;
  padding-left: 18px;
  font-size: 0.87rem;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.support-list {
  margin-bottom: 14px;
}

.model-src {
  margin: auto 0 0;
  padding-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--subtle);
  overflow-wrap: anywhere;
}

.model-foot {
  margin-top: 28px;
  font-size: 0.92rem;
  color: var(--subtle);
}

/* CSS-only filtering (works without JavaScript). */
.model-browser:has(#f-images:checked) .model:not([data-ws~='images']),
.model-browser:has(#f-3d:checked) .model:not([data-ws~='3d']),
.model-browser:has(#f-worlds:checked) .model:not([data-ws~='worlds']),
.model-browser:has(#f-motion:checked) .model:not([data-ws~='motion']),
.model-browser:has(#f-video:checked) .model:not([data-ws~='video']),
.model-browser:has(#f-music:checked) .model:not([data-ws~='music']),
.model-browser:has(#f-sfx:checked) .model:not([data-ws~='sfx']),
.model-browser:has(#f-voices:checked) .model:not([data-ws~='voices']),
.model-browser:has(#f-seg:checked) .model:not([data-ws~='seg']),
.model-browser:has(#f-game:checked) .model:not([data-ws~='game']),
.model-browser:has(#f-chat:checked) .model:not([data-ws~='chat']),
.model-browser:has(#f-exp:checked) .model:not([data-ws~='exp']),
.model[hidden] {
  display: none;
}

/* Architecture diagram */
.diagram {
  margin: 0 0 12px;
}

.diagram-scroll {
  background: var(--surface);
  border: 1px solid var(--border-quiet);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
}

.arch {
  min-width: 720px;
  width: 100%;
}

.arch .d-group {
  fill: var(--inset);
  stroke: var(--border);
  stroke-dasharray: 5 5;
}

.arch .d-box {
  fill: var(--raised);
  stroke: var(--border);
  stroke-width: 1.2;
}

.arch .d-box-orange {
  stroke: var(--orange);
  stroke-width: 1.6;
}

.arch .d-box-purple {
  stroke: var(--purple);
  stroke-width: 1.6;
}

.arch .d-chip {
  fill: var(--surface);
  stroke: var(--border);
}

.arch text {
  font-family: var(--font-sans);
}

.arch .d-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  fill: var(--subtle);
}

.arch .d-accent {
  fill: var(--orange-text);
}

.arch .d-title {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  fill: var(--strong);
}

.arch .d-sub {
  font-size: 13px;
  fill: var(--muted);
}

.arch .d-mono {
  font-family: var(--font-mono);
}

.arch .d-small {
  font-size: 12px;
  fill: var(--subtle);
}

.arch .d-chip-t {
  font-size: 13px;
  font-weight: 600;
  fill: var(--text);
}

.arch .d-port {
  font-family: var(--font-mono);
  font-weight: 400;
  fill: var(--orange-text);
}

.arch .d-lines path {
  fill: none;
  stroke: var(--subtle);
  stroke-width: 1.6;
}

.arch .d-lines .d-line-purple {
  stroke: var(--purple);
}

.arch .d-arrowhead {
  fill: var(--subtle);
}

/* Queue flow */
.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--border-quiet);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.flow li {
  position: relative;
  padding: 22px 24px;
  border-left: 1px solid var(--border-quiet);
}

.flow li:first-child {
  border-left: 0;
}

.flow li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 28px;
  right: -7px;
  width: 12px;
  height: 12px;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--surface);
  transform: rotate(45deg);
  z-index: 1;
}

.flow-n {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--orange-text);
}

.flow h3 {
  margin: 4px 0 8px;
}

.flow p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

.flow-branch {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 16px 20px;
  border: 1px dashed var(--exp-border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--exp-surface) 45%, transparent);
}

.flow-branch p {
  margin: 0;
  color: var(--text);
  font-size: 0.94rem;
}

/* Storage trees */
.tree {
  margin: 0 0 14px;
  padding: 14px 16px;
  background: var(--inset);
  border: 1px solid var(--border-quiet);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text);
  overflow-x: auto;
}

.tree-card h3 code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 1rem;
}

/* Code blocks */
.code {
  position: relative;
  margin: 0 0 16px;
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 0 8px 0 14px;
  border-bottom: 1px solid var(--border-quiet);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--subtle);
}

.code pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text);
}

.code:not(:has(.code-head)) pre {
  padding-right: 84px;
}

.copy-btn {
  font: 600 0.78rem/1 var(--font-sans);
  color: var(--strong);
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-height: 30px;
  padding: 0 12px;
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--orange);
}

.code > .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
}

/* API grid */
.api-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-quiet);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}

caption {
  text-align: left;
  padding: 14px 16px 6px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--strong);
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 9px 16px;
  border-top: 1px solid var(--border-quiet);
}

thead th {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
  border-top: 0;
}

tbody th {
  color: var(--strong);
  font-weight: 600;
  white-space: nowrap;
}

td {
  color: var(--muted);
}

td code {
  display: inline-block;
  margin: 0 2px 4px 0;
}

.platforms tbody th {
  white-space: normal;
  min-width: 10em;
}

/* Requirements */
.req-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 28px;
}

/* Install steps */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  max-width: 900px;
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding: 22px 24px 8px 76px;
  background: var(--surface);
  border: 1px solid var(--border-quiet);
  border-radius: var(--radius);
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 22px;
  top: 20px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: var(--on-orange);
  font-family: var(--font-mono);
  font-weight: 700;
}

.steps h3 {
  margin: 6px 0 10px;
}

.steps p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Security */
.sec-grid {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* License */
.license {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 40px;
  align-items: start;
}

.license .prose > p {
  margin-bottom: 18px;
}

.stack {
  font-size: 0.9rem;
  color: var(--subtle);
}

/* FAQ */
.faq {
  margin-top: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  max-width: 900px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border-quiet);
  border-radius: var(--radius);
}

.faq details[open] {
  border-color: var(--border);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 52px 16px 20px;
  position: relative;
  font-weight: 700;
  color: var(--strong);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--orange-text);
}

.faq details[open] summary::after {
  content: '–';
}

.faq details p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-quiet);
  padding: 48px 0 56px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
}

.site-footer p {
  color: var(--subtle);
  font-size: 0.9rem;
  margin-top: 12px;
}

.footer-h {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 12px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.site-footer ul a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer ul a:hover {
  color: var(--orange-text);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 1100px) {
  .facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .facts li:nth-child(4) {
    border-left: 0;
  }
  .facts li:nth-child(n + 4) {
    border-top: 1px solid var(--border-quiet);
  }
}

@media (max-width: 960px) {
  .hero {
    padding-top: 48px;
  }
  .hero-grid,
  .about-grid,
  .api-grid,
  .req-grid,
  .license {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .cols-3,
  .sec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flow li:nth-child(3) {
    border-left: 0;
  }
  .flow li:nth-child(n + 3) {
    border-top: 1px solid var(--border-quiet);
  }
  .flow li:nth-child(2)::after {
    display: none;
  }
  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }
  .section {
    padding: 64px 0;
  }
  .shots,
  .cols-3,
  .sec-grid,
  .flow {
    grid-template-columns: minmax(0, 1fr);
  }
  .flow li {
    border-left: 0;
    border-top: 1px solid var(--border-quiet);
  }
  .flow li:first-child {
    border-top: 0;
  }
  .flow li::after {
    display: none;
  }
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .facts li:nth-child(n) {
    border-left: 1px solid var(--border-quiet);
    border-top: 1px solid var(--border-quiet);
  }
  .facts li:nth-child(odd) {
    border-left: 0;
  }
  .facts li:nth-child(-n + 2) {
    border-top: 0;
  }
  .model-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .steps > li {
    padding: 64px 18px 6px;
  }
  .steps > li::before {
    left: 18px;
    top: 18px;
  }
  .header-gh {
    padding: 6px 10px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .button,
  .filter-list label,
  .site-nav a,
  .header-gh,
  .copy-btn {
    transition:
      background-color 0.15s ease,
      border-color 0.15s ease,
      color 0.15s ease;
  }
}

@media print {
  .site-header,
  .skip-link,
  .filters,
  .copy-btn,
  .zoom-hint {
    display: none;
  }
  .model[hidden] {
    display: flex;
  }
}

/* NVIDIA RTX Spark: hardware badge, hardware band and trademark note. The green is an accent
   only; no NVIDIA logo artwork is used. */
:root {
  --spark-green: #76b900;
}

.spark-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--spark-green);
  border-radius: 8px;
  background: var(--info-surface);
  color: var(--muted);
  font-size: 0.88rem;
}

.spark-badge strong {
  color: var(--strong);
}

.spark-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--spark-green);
}

.spark-sep {
  color: var(--subtle);
}

.spark-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.spark-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.spark-stats li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--border-quiet);
  border-left: 3px solid var(--spark-green);
  border-radius: 8px;
  background: var(--surface);
}

.spark-stats strong {
  min-width: 4.2ch;
  color: var(--strong);
  font-size: 1.25rem;
}

.spark-stats span {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .trademark-note {
  font-size: 0.8rem;
  color: var(--subtle);
  max-width: 34em;
}

@media (max-width: 760px) {
  .spark-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

/* === Model weight capacity (site/capacity.js, site/model-capacity.json) === */
.cap-scope,
.cap-compare,
.cap-note {
  max-width: 56em;
  color: var(--muted);
}

.cap-tiles {
  list-style: none;
  margin: 24px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.cap-tiles li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--border-quiet);
  border-left: 3px solid var(--orange);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.cap-tile-label {
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cap-tile-value {
  color: var(--strong);
  font-size: 1.4rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.cap-tile-detail {
  color: var(--muted);
  font-size: 0.88rem;
}

.cap-compare {
  margin: 0 0 24px;
}

.cap-scroll {
  overflow-x: auto;
  border: 1px solid var(--border-quiet);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 18px;
}

.cap-table {
  min-width: 700px;
}

.cap-caption {
  margin: 0 0 8px;
  color: var(--strong);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
}

.cap-table tbody th {
  white-space: normal;
  min-width: 14rem;
}

.cap-table tfoot th,
.cap-table tfoot td {
  color: var(--strong);
  font-weight: 700;
  border-top: 2px solid var(--border);
}

.cap-row-note {
  display: block;
  margin-top: 2px;
  max-width: 32em;
  color: var(--subtle);
  font-size: 0.8rem;
  font-weight: 400;
}

.cap-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cap-table thead th:nth-child(3) {
  text-align: right;
}

/* The unit in a header is GiB, not GIB, so these headings keep their case. */
.cap-table thead th {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.82rem;
}

.cap-share {
  white-space: nowrap;
}

.cap-bar {
  display: inline-block;
  width: 88px;
  height: 8px;
  margin-right: 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--inset);
  vertical-align: middle;
  overflow: hidden;
}

.cap-bar > span {
  display: block;
  height: 100%;
  min-width: 2px;
  background: var(--orange);
}

.cap-share-text {
  font-variant-numeric: tabular-nums;
}

.cap-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -4px -6px;
  padding: 4px 6px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.cap-sort:hover {
  color: var(--strong);
}

.cap-sort-icon::before {
  content: '\2195';
}

th[aria-sort='ascending'] .cap-sort-icon::before {
  content: '\25B2';
}

th[aria-sort='descending'] .cap-sort-icon::before {
  content: '\25BC';
}

th[aria-sort='ascending'],
th[aria-sort='descending'] {
  color: var(--strong);
}

.cap-method {
  max-width: 56em;
  margin-top: 18px;
  padding: 12px 18px;
  border: 1px solid var(--border-quiet);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
}

.cap-method summary {
  color: var(--strong);
  font-weight: 600;
  cursor: pointer;
}

.cap-method p {
  margin: 10px 0 0;
  font-size: 0.92rem;
}
/* === end Model weight capacity === */
