/* PreHealth client hub: structure only. Every colour and font comes from --hub-* tokens set in the
   client's theme.css. Do not put a client hex in this file. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--hub-ground);
  color: var(--hub-ink-soft);
  font: 400 1rem/1.6 var(--hub-font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--hub-link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--hub-link-hover); }
:focus-visible { outline: 3px solid var(--hub-focus, var(--hub-accent)); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--hub-font-display); color: var(--hub-heading, var(--hub-ink)); margin: 0; font-weight: var(--hub-heading-weight, 500); letter-spacing: -0.015em; }
p { margin: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:root { --rail-w: 272px; --gutter: clamp(20px, 4vw, 56px); --measure: 1080px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--hub-rail) var(--rail-w), var(--hub-ground) var(--rail-w)); }
.main { min-width: 0; display: flex; flex-direction: column; }
.main > .content { flex: 1; }

/* ---------- rail ---------- */
.rail {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--hub-rail); color: var(--hub-rail-ink);
  display: flex; flex-direction: column;
  scrollbar-width: thin; scrollbar-color: var(--hub-rail-line) transparent;
}
.rail-brand {
  display: block; padding: 32px 28px 28px; text-decoration: none; color: var(--hub-rail-ink);
  border-bottom: 1px solid var(--hub-rail-line);
}
.rail-brand:hover { color: var(--hub-rail-ink); }
.rail-brand .wordmark { display: block; font: 600 1.625rem/1 var(--hub-font-display); letter-spacing: -0.03em; }
.rail-brand .sub { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 0.8125rem; color: var(--hub-rail-ink-soft); }
.rail-brand .sub::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--hub-rail-mark, var(--hub-accent)); }
.rail-nav { padding: 8px 0 24px; flex: 1; }
.rail-nav a.top, .rail-nav summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 28px; min-height: 52px;
  font: 600 0.9375rem/1.2 var(--hub-font-ui, var(--hub-font-display)); letter-spacing: 0;
  color: var(--hub-rail-ink); text-decoration: none; cursor: pointer; list-style: none;
  border-bottom: 1px solid var(--hub-rail-line); border-left: 4px solid transparent;
}
.rail-nav summary::-webkit-details-marker { display: none; }
.rail-nav summary::after {
  content: ""; width: 8px; height: 8px; margin-right: 4px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; opacity: .7;
}
.rail-nav details[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.rail-nav a.top:hover, .rail-nav summary:hover { background: rgba(var(--hub-light-rgb, 231, 236, 228), 0.06); color: var(--hub-rail-ink); }
.rail-nav ul { list-style: none; margin: 0; padding: 6px 0 10px; border-bottom: 1px solid var(--hub-rail-line); }
.rail-nav ul a {
  display: block; padding: 9px 28px 9px 40px; font-size: 0.9375rem; line-height: 1.35;
  color: var(--hub-rail-ink-soft); text-decoration: none; border-left: 4px solid transparent;
}
.rail-nav ul a:hover { color: var(--hub-rail-ink); background: rgba(var(--hub-light-rgb, 231, 236, 228), 0.06); }
.rail-nav [aria-current="page"] { color: var(--hub-rail-ink) !important; border-left-color: var(--hub-accent) !important; background: color-mix(in srgb, var(--hub-accent) 14%, transparent); }
.rail-nav ul a[aria-current="page"] { font-weight: 600; }
.rail-foot { padding: 20px 28px 28px; font-size: 0.8125rem; color: var(--hub-rail-ink-soft); border-top: 1px solid var(--hub-rail-line); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 64px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--hub-ground) 92%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hub-line);
}
.topbar .crumb { font-size: 0.875rem; color: var(--hub-ink-faint); }
.topbar .crumb strong { color: var(--hub-ink); font-weight: 600; }
.menu-btn { display: none; color: var(--hub-ink); background: transparent; }
.search-btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 14px 0 12px;
  background: var(--hub-surface); color: var(--hub-ink-faint);
  border: 1px solid var(--hub-line-strong); border-radius: 8px; font: inherit; font-size: 0.9375rem; cursor: pointer;
  min-width: min(320px, 100%);
}
.search-btn:hover { border-color: var(--hub-brand); color: var(--hub-ink); }
.search-btn svg { flex: none; }
.search-btn kbd {
  margin-left: auto; font: 500 0.75rem var(--hub-font-body); padding: 2px 6px; border-radius: 4px;
  border: 1px solid var(--hub-line-strong); color: var(--hub-ink-faint);
}

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; min-height: clamp(440px, 62vh, 640px); display: flex; align-items: center; overflow: hidden; background: var(--hub-brand-deep); container-type: inline-size; }
.hero picture, .hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero img.bg { object-fit: cover; object-position: 78% 40%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hub-hero-scrim); }
.hero-copy { padding: 56px var(--gutter); width: 44cqw; color: var(--hub-on-dark); }
.hero-copy .label { display: inline-flex; align-items: center; gap: 10px; font-size: 0.9375rem; font-weight: var(--hub-eyebrow-weight, 400); text-transform: var(--hub-eyebrow-case, none); letter-spacing: var(--hub-eyebrow-tracking, 0); margin-bottom: 20px; color: var(--hub-on-dark); opacity: .9; }
.hero-copy .label::before { content: ""; width: 28px; height: 2px; background: var(--hub-rule, var(--hub-accent)); }
.hero h1 { color: var(--hub-on-dark); font-weight: 600; font-size: clamp(2.25rem, 4.9cqw, 3.75rem); line-height: 1.02; letter-spacing: -0.03em; text-wrap: balance; }
.hero p { margin-top: 22px; font-size: 1.1875rem; line-height: 1.55; color: var(--hub-on-dark); opacity: .9; max-width: 30ch; }

/* ---------- home blocks ---------- */
.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }
.block { padding: clamp(48px, 7vw, 88px) 0; }
.rule { border: 0; border-top: 1px solid var(--hub-line-strong); margin: 0; color: var(--hub-line-strong); }
.eyebrow { font: var(--hub-eyebrow-weight, 500) 0.875rem/1 var(--hub-font-ui, var(--hub-font-display)); text-transform: var(--hub-eyebrow-case, none); letter-spacing: var(--hub-eyebrow-tracking, 0); color: var(--hub-eyebrow, var(--hub-accent-active)); margin-bottom: 14px; display: block; }
.block h2 { font-size: clamp(1.75rem, 2.6vw, 2.25rem); line-height: 1.12; font-weight: 600; text-wrap: balance; }
.block .lede { margin-top: 14px; font-size: 1.125rem; line-height: 1.6; max-width: 46ch; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.split .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 22px;
  font: var(--hub-button-weight, 600) 0.9375rem var(--hub-font-ui, var(--hub-font-display)); text-decoration: none; border-radius: 8px; border: 1.5px solid transparent; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn.primary { background: var(--hub-button, var(--hub-accent)); color: var(--hub-on-accent); }
.btn.primary:hover { background: var(--hub-button-hover, var(--hub-accent-hover)); color: var(--hub-on-accent); }
.btn.primary:active { background: var(--hub-button-hover, var(--hub-accent-active)); color: var(--hub-on-accent); }
.btn.secondary { background: transparent; color: var(--hub-brand); border-color: var(--hub-brand); }
.btn.secondary:hover { background: var(--hub-brand); color: var(--hub-on-dark); }
.btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 0.875rem; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font: 600 0.9375rem var(--hub-font-ui, var(--hub-font-display)); text-decoration: none; color: var(--hub-link); }
.link-arrow::after { content: "→"; transition: transform .15s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

/* palette strip: the "illustration" for the brand-kit block */
.palette-strip { border: 1px solid var(--hub-line-strong); display: grid; grid-template-columns: 2.4fr 1.3fr 1fr 1fr 0.7fr; height: 280px; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 48px -24px rgba(var(--hub-shade-rgb, 30, 19, 41), 0.45); }
.palette-strip span { display: flex; align-items: flex-end; padding: 14px; font: 500 0.8125rem var(--hub-font-ui, var(--hub-font-display)); }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 88px); text-align: center; }
.pair .cell { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.pair .cell p { max-width: 38ch; }
.pair h3 { font-size: 1.625rem; font-weight: 600; }
.cutouts { display: flex; align-items: flex-end; justify-content: center; height: 230px; margin-bottom: 4px; }
.cutouts img { height: 100%; width: auto; min-width: 0; max-width: 25%; object-fit: contain; margin: 0 -6px; filter: drop-shadow(0 14px 14px rgba(var(--hub-shade-rgb, 30, 19, 41), 0.22)); }
.fan { position: relative; width: min(420px, 100%); aspect-ratio: 1.91; margin-bottom: 14px; }
.fan img { position: absolute; width: 66%; border-radius: 8px; box-shadow: 0 18px 36px -14px rgba(var(--hub-shade-rgb, 30, 19, 41), 0.5); border: 1px solid rgba(var(--hub-shade-rgb, 30, 19, 41), 0.12); }
.fan img:nth-child(1) { left: 0; top: 14%; transform: rotate(-6deg); }
.fan img:nth-child(2) { left: 17%; top: 0; z-index: 2; }
.fan img:nth-child(3) { right: 0; top: 18%; transform: rotate(6deg); }

.ornament { display: flex; align-items: center; gap: 28px; padding: 8px 0; color: var(--hub-line-strong); }
.ornament::before, .ornament::after { content: ""; flex: 1; border-top: 1px solid var(--hub-line-strong); }
.ornament svg { flex: none; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.card {
  display: flex; flex-direction: column; gap: 10px; padding: 24px 26px 22px;
  background: var(--hub-surface); border: 1px solid var(--hub-line-strong); border-radius: 10px;
  text-decoration: none; color: var(--hub-ink-soft); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
a.card:hover { border-color: var(--hub-brand); box-shadow: 0 14px 32px -18px rgba(var(--hub-shade-rgb, 30, 19, 41), 0.5); transform: translateY(-2px); color: var(--hub-ink-soft); }
.card h3 { font-size: 1.1875rem; font-weight: 600; }
.card .link-arrow { margin-top: auto; padding-top: 6px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

.updates { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--hub-line-strong); }
.updates li { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 24px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--hub-line); }
.updates time { font: 500 0.875rem var(--hub-font-ui, var(--hub-font-display)); color: var(--hub-ink-faint); font-variant-numeric: tabular-nums; }
.updates strong { color: var(--hub-ink); font: 600 1rem var(--hub-font-display); display: block; }
.updates span { font-size: 0.9375rem; }

/* ---------- interior pages ---------- */
.band { background: var(--hub-band); border-bottom: 1px solid var(--hub-line); }
.band .wrap { padding-top: clamp(36px, 5vw, 64px); padding-bottom: 32px; }
.crumbs { font-size: 0.9375rem; color: var(--hub-ink-faint); margin-bottom: 14px; }
.crumbs a { color: var(--hub-ink-faint); text-decoration: none; } .crumbs a:hover { color: var(--hub-ink); text-decoration: underline; }
.band h1 { font-size: clamp(2.25rem, 4.2vw, 3.5rem); font-weight: 600; line-height: 1.04; letter-spacing: -0.03em; }
.band .lede { margin-top: 16px; font-size: 1.1875rem; max-width: 60ch; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.jump a { display: inline-block; padding: 6px 14px; font: 500 0.875rem var(--hub-font-ui, var(--hub-font-display)); border: 1px solid var(--hub-line-strong); border-radius: 999px; text-decoration: none; color: var(--hub-ink); background: var(--hub-ground); }
.jump a:hover { border-color: var(--hub-brand); background: var(--hub-brand); color: var(--hub-on-dark); }
.page { padding: clamp(32px, 5vw, 56px) 0 clamp(56px, 8vw, 104px); }
.page section { margin-top: clamp(40px, 6vw, 72px); }
.page section:first-child { margin-top: 0; }
.page h2 { font-size: 1.75rem; font-weight: 600; margin-bottom: 8px; }
.page .sec-lede { max-width: 62ch; margin-bottom: 28px; }
.panel { background: var(--hub-surface); border: 1px solid var(--hub-line-strong); border-radius: 12px; padding: clamp(20px, 3vw, 36px); box-shadow: 0 1px 0 rgba(var(--hub-shade-rgb, 30, 19, 41), 0.04); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font: 500 0.8125rem/1.4 var(--hub-font-ui, var(--hub-font-display)); border: 1px solid var(--hub-line-strong); color: var(--hub-ink); background: var(--hub-surface); white-space: nowrap; }
.chip.review { border-color: var(--hub-mark, var(--hub-accent-active)); color: var(--hub-mark, var(--hub-accent-active)); }
.chip.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* logo slots */
.logo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.logo-card { display: flex; flex-direction: column; background: var(--hub-surface); border: 1px solid var(--hub-line-strong); border-radius: 10px; overflow: hidden; }
.logo-stage { aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 24px; position: relative; }
.logo-stage.light { background: var(--hub-surface); }
.logo-stage.dark { background: var(--hub-brand-deep); color: var(--hub-on-dark); }
.logo-stage .slot { width: 78%; height: 62%; display: grid; place-items: center; text-align: center; border: 1.5px dashed currentColor; border-radius: 8px; opacity: .55; font: 500 0.875rem var(--hub-font-ui, var(--hub-font-display)); padding: 12px; }
.logo-stage img { max-height: 70%; max-width: 78%; }
.logo-meta { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; border-top: 1px solid var(--hub-line); }
.logo-meta h3 { font-size: 1.0625rem; font-weight: 600; }
.logo-meta .row { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; flex-wrap: wrap; align-items: center; }
.inuse { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.inuse figure { margin: 0; }
.inuse .crop { aspect-ratio: var(--hub-inuse-ratio, 2.6); border-radius: 8px; background-size: var(--hub-inuse-zoom, 300%) auto; background-position: 0 0; background-repeat: no-repeat; border: 1px solid var(--hub-line-strong); }
.inuse .crop { --fade: linear-gradient(90deg, #000 60%, transparent 98%), linear-gradient(180deg, #000 55%, transparent 98%); -webkit-mask-image: var(--hub-inuse-mask, var(--fade)); mask-image: var(--hub-inuse-mask, var(--fade)); -webkit-mask-composite: source-in; mask-composite: intersect; }      /* a detail crop of the lockup corner, faded so the cut reads as deliberate; a client whose crop holds only the lockup sets --hub-inuse-mask: none */
figcaption { font-size: 0.875rem; color: var(--hub-ink-faint); margin-top: 8px; }
.rules-list { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.rules-list li { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--hub-line-strong); border-radius: 8px; background: var(--hub-surface); font-size: 0.9375rem; }
.rules-list li::before { content: "×"; font: 700 1rem var(--hub-font-display); color: var(--hub-mark, var(--hub-accent-active)); }

/* colour */
.group-title { display: flex; align-items: baseline; gap: 14px; margin: 36px 0 14px; }
.group-title:first-of-type { margin-top: 0; }
.group-title h3 { font-size: 1.125rem; font-weight: 600; }
.swatches { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 18px; }
.swatch { background: var(--hub-surface); border: 1px solid var(--hub-line-strong); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.swatch .chipbox { height: 128px; padding: 14px 16px; display: flex; align-items: flex-end; justify-content: space-between; font: 600 1.375rem var(--hub-font-display); border-bottom: 1px solid var(--hub-line); }
.swatch .chipbox small { font: 500 0.75rem var(--hub-font-body); opacity: .9; text-align: right; line-height: 1.35; }
.swatch .info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.swatch h4 { font-size: 1.0625rem; font-weight: 600; }
.swatch .note { font-size: 0.875rem; line-height: 1.45; }
.copy {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 38px; padding: 0 12px; margin-top: auto;
  font: 500 0.9375rem var(--hub-font-body); font-variant-numeric: tabular-nums; color: var(--hub-ink); background: var(--hub-ground);
  border: 1px solid var(--hub-line-strong); border-radius: 6px; cursor: pointer; letter-spacing: 0.02em;
}
.copy:hover { border-color: var(--hub-brand); }
.copy .hint { font: 500 0.75rem var(--hub-font-body); color: var(--hub-ink-faint); letter-spacing: 0; }
.copy.done .hint { color: var(--hub-mark, var(--hub-accent-active)); font-weight: 700; }
.balance { display: flex; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--hub-line-strong); }
.balance span { display: flex; align-items: flex-end; padding: 8px 12px; font: 500 0.8125rem var(--hub-font-ui, var(--hub-font-display)); }
.pairings { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pairing { border-radius: 10px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--hub-line-strong); }
.pairing .aa { font: 600 2rem/1 var(--hub-font-display); }
.pairing .meta { display: flex; justify-content: space-between; gap: 8px; font-size: 0.8125rem; opacity: .92; }
.dl-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* type */
.specimens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.specimen { background: var(--hub-surface); border: 1px solid var(--hub-line-strong); border-radius: 12px; padding: 28px; display: flex; flex-direction: column; gap: 18px; overflow: hidden; }
.specimen .big { font-size: clamp(5rem, 9vw, 8rem); line-height: .9; color: var(--hub-brand); letter-spacing: -0.04em; }
.specimen .name { font-size: 1.25rem; font-weight: 600; font-family: var(--hub-font-display); color: var(--hub-ink); }
.specimen .glyphs { font-size: 1.125rem; line-height: 1.5; word-break: break-all; color: var(--hub-ink); }
.specimen .weights { display: grid; gap: 8px; border-top: 1px solid var(--hub-line); padding-top: 16px; }
.specimen .weights div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 1.375rem; color: var(--hub-ink); }
.specimen .weights small { font: 500 0.8125rem var(--hub-font-body); color: var(--hub-ink-faint); white-space: nowrap; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table th { text-align: left; font: 500 0.8125rem var(--hub-font-ui, var(--hub-font-display)); color: var(--hub-ink-faint); padding: 10px 14px; border-bottom: 1px solid var(--hub-line-strong); }
.table td { padding: 14px; border-bottom: 1px solid var(--hub-line); vertical-align: top; }
.table td:first-child { color: var(--hub-ink); font-weight: 500; }
.table-wrap { overflow-x: auto; }
.prose-sample { font-size: 1.0625rem; line-height: 1.65; max-width: 60ch; color: var(--hub-ink-soft); }
.prose-sample h4 { font: 500 1.75rem/1.15 var(--hub-font-display); color: var(--hub-ink); margin-bottom: 12px; }

/* imagery */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.steps figure { margin: 0; }
.steps .frame { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; border: 1px solid var(--hub-line-strong); background: var(--hub-brand-deep); }
.steps .frame img { width: 100%; height: 100%; object-fit: cover; }
.steps .frame.bw img { filter: grayscale(1); }
.steps .frame.grad::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--hub-brand-deep) 0%, rgba(var(--hub-shade-rgb, 30, 19, 41), 0) 100%); opacity: .25; mix-blend-mode: normal; }
.steps .frame.grad.strong::after { opacity: .25; }
.steps .num { font: 600 0.875rem var(--hub-font-ui, var(--hub-font-display)); color: var(--hub-mark, var(--hub-accent-active)); margin-bottom: 6px; display: block; }
.dodont { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.dodont h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.dodont ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.dodont li { padding: 12px 0 12px 30px; border-top: 1px solid var(--hub-line); position: relative; font-size: 0.9375rem; line-height: 1.5; }
.dodont li::before { position: absolute; left: 0; top: 11px; font: 700 1rem var(--hub-font-display); }
.dodont .do li::before { content: "✓"; color: var(--hub-brand); }
.dodont .dont li::before { content: "×"; color: var(--hub-mark, var(--hub-accent-active)); font-size: 1.25rem; top: 8px; }
.traits { display: flex; flex-wrap: wrap; gap: 10px; }
.traits .t { font: 500 1.125rem var(--hub-font-ui, var(--hub-font-display)); padding: 10px 18px; border-radius: 999px; background: var(--hub-brand); color: var(--hub-on-dark); }
.callout { padding: 20px 22px; border-radius: 10px; background: var(--hub-brand-deep); color: var(--hub-on-dark); display: grid; gap: 6px; }
.callout strong { font: 600 1.5rem var(--hub-font-display); color: var(--hub-on-dark); }
.callout span { font-size: 0.875rem; opacity: .8; }

/* characters */
.lineup { border-radius: 14px; overflow: hidden; border: 1px solid var(--hub-line-strong); background: var(--hub-stage, #fff); }
.lineup img { width: 100%; height: auto; }
.cast { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.cast-card { background: var(--hub-brand-deep); color: var(--hub-on-dark); border-radius: 12px; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; border: 1px solid var(--hub-brand-deep); transition: transform .15s ease, box-shadow .15s ease; }
.cast-card:hover { transform: translateY(-3px); box-shadow: 0 20px 36px -18px rgba(var(--hub-shade-rgb, 30, 19, 41), .6); color: var(--hub-on-dark); }
.cast-card .tile { aspect-ratio: 4 / 5; position: relative; overflow: hidden; }
.cast-card .tile img { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); height: 92%; width: auto; max-width: none; filter: drop-shadow(0 10px 12px rgba(var(--hub-shade-rgb, 0, 0, 0), .25)); }
.cast-card .cap { padding: 16px 18px 20px; display: grid; gap: 4px; }
.cast-card .cap strong { font: 600 1.125rem var(--hub-font-display); }
.cast-card .cap span { font-size: 0.875rem; opacity: .85; line-height: 1.45; }
.profile { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.profile .stage { position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden; max-width: 460px; width: 100%; margin: 0 auto; }
.profile .stage img { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); height: 88%; width: auto; max-width: none; filter: drop-shadow(0 16px 20px rgba(var(--hub-shade-rgb, 0, 0, 0), .3)); }
.facts { display: grid; gap: 18px; }
.facts dt { font: 500 0.8125rem var(--hub-font-ui, var(--hub-font-display)); color: var(--hub-ink-faint); margin-bottom: 4px; }
.facts dd { margin: 0; color: var(--hub-ink); font-size: 1.125rem; line-height: 1.5; }
.plates { align-items: start; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.plate { background: var(--hub-surface); border: 1px solid var(--hub-line-strong); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.plate .img { position: relative; aspect-ratio: 1; background: repeating-conic-gradient(var(--hub-checker, #f3f1ea) 0% 25%, var(--hub-stage, #fff) 0% 50%) 0 0 / 20px 20px; }
.plate .img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.plate .img.photo img { object-fit: cover; }
.plate .meta { padding: 14px 16px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--hub-line); }
.plate .meta strong { display: block; color: var(--hub-ink); font: 600 0.9375rem var(--hub-font-display); }
.plate .meta span { font-size: 0.8125rem; color: var(--hub-ink-faint); }
.sibs { display: flex; flex-wrap: wrap; gap: 10px; }

/* templates */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filters button { font: var(--hub-button-weight, 500) 0.9375rem var(--hub-font-ui, var(--hub-font-display)); padding: 8px 16px; border-radius: 999px; border: 1px solid var(--hub-line-strong); background: var(--hub-surface); color: var(--hub-ink); cursor: pointer; }
.filters button:hover { border-color: var(--hub-brand); }
.filters button[aria-pressed="true"] { background: var(--hub-brand); border-color: var(--hub-brand); color: var(--hub-on-dark); }
.filters .count { opacity: .7; margin-left: 6px; font-variant-numeric: tabular-nums; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.tpl { background: var(--hub-surface); border: 1px solid var(--hub-line-strong); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.tpl[hidden] { display: none; }
.tpl .shot { display: block; width: 100%; padding: 0; border: 0; background: var(--hub-brand-deep); cursor: zoom-in; position: relative; }
.tpl .shot img { width: 100%; height: auto; aspect-ratio: 1.91; object-fit: cover; }
.tpl .shot.sq img { aspect-ratio: 1; }
.tpl .shot.sq { max-height: 360px; display: grid; place-items: center; }
.tpl .shot.sq img { max-height: 360px; width: auto; margin: 0 auto; }
.tpl .shot.tall { display: grid; place-items: center; background: var(--hub-band); padding: 14px 0; }
.tpl .shot.tall img { aspect-ratio: auto; object-fit: contain; width: auto; max-width: 100%; height: 440px; margin: 0 auto; box-shadow: 0 1px 3px rgba(var(--hub-shade-rgb, 0, 0, 0), .12); }
.tpl .shot:hover::after { content: "Enlarge"; position: absolute; right: 12px; bottom: 12px; font: 600 0.75rem var(--hub-font-ui, var(--hub-font-display)); padding: 4px 10px; border-radius: 999px; background: var(--hub-surface); color: var(--hub-ink); }
.tpl .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tpl h3 { font-size: 1.0625rem; font-weight: 600; }
.tpl .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl p { font-size: 0.875rem; line-height: 1.5; }
.tpl p.lead { color: var(--hub-ink); font-weight: 500; font-size: 0.9375rem; }
.tpl p.rest { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--hub-ink-faint); }
.tpl .row { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 0.8125rem; color: var(--hub-ink-faint); }
.pending-preview { aspect-ratio: 1.91; display: grid; place-items: center; background: var(--hub-band); color: var(--hub-ink-faint); font: 500 0.875rem var(--hub-font-ui, var(--hub-font-display)); }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 92vh; }
dialog.lightbox::backdrop { background: rgba(var(--hub-shade-rgb, 30, 19, 41), 0.82); }
dialog.lightbox img { width: 100%; height: auto; max-height: 86vh; object-fit: contain; border-radius: 10px; }
dialog.lightbox.tall { overflow-y: auto; }      /* a long email or a page: shown at reading width and scrolled, not shrunk to the viewport */
dialog.lightbox.tall img { max-height: none; width: auto; max-width: min(720px, 90vw); }
dialog.lightbox .cap { color: var(--hub-on-dark); padding: 12px 2px 0; display: flex; justify-content: space-between; gap: 16px; font-size: .9375rem; }
dialog.lightbox button { background: var(--hub-surface); color: var(--hub-ink); border: 0; border-radius: 8px; padding: 8px 14px; font: 600 .875rem var(--hub-font-ui, var(--hub-font-display)); cursor: pointer; }

/* downloads */
.dl-group { margin-top: 36px; }
.dl-group:first-child { margin-top: 0; }
.dl-group h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 12px; display: flex; align-items: baseline; gap: 12px; }
.dl-group h3 small { font: 400 0.875rem var(--hub-font-body); color: var(--hub-ink-faint); }
.table .thumb { width: 56px; height: 40px; border-radius: 4px; object-fit: cover; border: 1px solid var(--hub-line); background: var(--hub-band); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td.act { text-align: right; white-space: nowrap; }

/* footer */
.foot { background: var(--hub-brand-deep); color: var(--hub-on-dark); margin-top: auto; }
.foot .wrap { padding-top: 56px; padding-bottom: 40px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; }
.foot h2 { color: var(--hub-on-dark); font-size: 1.5rem; font-weight: 600; max-width: 22ch; text-wrap: balance; }
.foot p { margin-top: 12px; max-width: 46ch; opacity: .82; }
.foot .ask { margin-top: 0; font: 600 1rem var(--hub-font-ui, var(--hub-font-display)); opacity: 1; }
.foot .actions { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }
.foot .btn.secondary { color: var(--hub-on-dark); border-color: rgba(var(--hub-light-rgb, 231, 236, 228), .5); }
.foot .btn.secondary:hover { background: var(--hub-on-dark); color: var(--hub-brand-deep); }
.foot nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px 28px; align-content: start; }
.foot nav .fg { display: flex; flex-direction: column; gap: 2px; }
.foot nav .fg strong { font: 600 .8125rem var(--hub-font-ui, var(--hub-font-display)); letter-spacing: .04em; text-transform: uppercase; opacity: .6; margin-bottom: 6px; }
.foot nav a { color: var(--hub-on-dark); opacity: .82; text-decoration: none; font-size: .9375rem; padding: 4px 0; }
.foot nav a:hover { opacity: 1; text-decoration: underline; color: var(--hub-on-dark); }
.foot .legal { grid-column: 1 / -1; border-top: 1px solid var(--hub-rail-line); padding-top: 20px; font-size: .8125rem; opacity: .65; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* search */
dialog.search { border: 0; padding: 0; width: min(640px, 92vw); margin: 12vh auto auto; border-radius: 14px; background: var(--hub-surface); box-shadow: 0 40px 80px -20px rgba(var(--hub-shade-rgb, 30, 19, 41), .6); }
dialog.search::backdrop { background: rgba(var(--hub-shade-rgb, 30, 19, 41), .55); backdrop-filter: blur(3px); }
dialog.search input { width: 100%; border: 0; border-bottom: 1px solid var(--hub-line-strong); padding: 20px 22px; font: 500 1.125rem var(--hub-font-body); color: var(--hub-ink); background: transparent; border-radius: 14px 14px 0 0; }
dialog.search input:focus-visible { outline: none; }
dialog.search ul { list-style: none; margin: 0; padding: 8px; max-height: 52vh; overflow: auto; }
dialog.search li a { display: grid; gap: 2px; padding: 12px 14px; border-radius: 8px; text-decoration: none; color: var(--hub-ink-soft); }
dialog.search li a strong { color: var(--hub-ink); font: 600 1rem var(--hub-font-display); }
dialog.search li a small { color: var(--hub-ink-faint); font-size: .8125rem; }
dialog.search li a:hover, dialog.search li a[aria-selected="true"] { background: var(--hub-band); }
dialog.search .empty { padding: 20px 22px; color: var(--hub-ink-faint); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .swatches { --cols: 2 !important; }
  .cast { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .updates li { grid-template-columns: 100px minmax(0, 1fr); } .updates li .link-arrow { grid-column: 2; }
}
@media (max-width: 900px) {
  .shell { display: block; }
  .rail { position: fixed; inset: 0 auto 0 0; width: min(88vw, 320px); z-index: 60; transform: translateX(-102%); transition: transform .25s ease; box-shadow: 0 0 0 100vmax rgba(var(--hub-shade-rgb, 30, 19, 41), 0); }
  body.nav-open .rail { transform: none; box-shadow: 0 0 0 100vmax rgba(var(--hub-shade-rgb, 30, 19, 41), .55); }
  .menu-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; background: transparent; border: 1px solid var(--hub-line-strong); border-radius: 8px; font: 600 .9375rem var(--hub-font-ui, var(--hub-font-display)); color: var(--hub-ink); cursor: pointer; }
  .topbar .crumb { display: none; }
  .search-btn { min-width: 0; flex: none; } .search-btn .label-t, .search-btn kbd { display: none; } .search-btn { padding: 0 12px; }
  .topbar { justify-content: space-between; }
  .hero { min-height: 0; align-items: flex-end; }
  .hero img.bg { object-position: 50% 0; }
  .hero::after { background: var(--hub-hero-scrim-m, linear-gradient(0deg, rgba(var(--hub-shade-rgb, 30, 19, 41), .94) 0%, rgba(var(--hub-shade-rgb, 30, 19, 41), .78) 36%, rgba(var(--hub-shade-rgb, 30, 19, 41), 0) 70%)); }
  .hero { aspect-ratio: 4 / 5; max-height: 86vh; }
  .hero-copy { padding: 0 var(--gutter) 36px; width: auto; }
  .hero p { font-size: 1.0625rem; }
  .split, .pair, .profile { grid-template-columns: 1fr; }
  .palette-strip { height: 180px; }
  .logo-grid, .specimens, .dodont, .cards, .foot .wrap { grid-template-columns: 1fr; }
    .plates, .inuse { grid-template-columns: 1fr; }
  .inuse .crop { aspect-ratio: 3; }
  .updates li { grid-template-columns: 1fr; gap: 4px; } .updates li .link-arrow { grid-column: auto; }
}
@media (max-width: 560px) {
  .cast { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cast-card .cap span { display: none; }
  .tpl-grid { grid-template-columns: 1fr; }
  .swatches { --cols: 2 !important; gap: 12px; }
  .swatch .chipbox { font-size: 1.125rem; }
  .foot nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- round 2 ---------- */
.kit-grid { display: grid; grid-template-columns: repeat(var(--kit-cols, 5), minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.kit-tile { display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 18px; background: var(--hub-surface); border: 1px solid var(--hub-line-strong); border-radius: 10px; text-decoration: none; color: var(--hub-ink-soft); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.kit-tile:hover { border-color: var(--hub-brand); transform: translateY(-2px); box-shadow: 0 14px 28px -18px rgba(var(--hub-shade-rgb, 30, 19, 41), .5); color: var(--hub-ink-soft); }
.kit-tile strong { font: 600 1.0625rem var(--hub-font-display); color: var(--hub-ink); margin-top: 10px; }
.kit-tile > span:last-child { font-size: .875rem; line-height: 1.4; }
.kit-art { height: 84px; border-radius: 6px; display: flex; overflow: hidden; align-items: center; justify-content: center; background: var(--hub-brand); color: var(--hub-on-dark); }
.kit-art i { flex: 1; align-self: stretch; }
.kit-art b { font: 600 2.25rem/1 var(--hub-font-display); }
.kit-art .mk { width: 62%; height: 56%; display: grid; place-items: center; border: 1.5px dashed currentColor; border-radius: 6px; font: 500 .875rem var(--hub-font-ui, var(--hub-font-display)); opacity: .7; }
.kit-art .im { position: relative; width: 100%; height: 100%; }
.kit-art .im img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.kit-art .im::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--hub-brand-deep) 0%, rgba(var(--hub-shade-rgb, 30, 19, 41), 0) 100%); opacity: .45; }
.kit-art .qt { font-size: 3.25rem; color: var(--hub-on-dark); opacity: .9; line-height: .8; padding-top: 14px; }
[data-zoom] { cursor: zoom-in; }
.ramp { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: .8125rem; color: var(--hub-ink-faint); }
.ramp i { flex: 1; height: 10px; border-radius: 5px; background: linear-gradient(90deg, rgba(var(--hub-shade-rgb, 30, 19, 41), 0), var(--hub-brand-deep)); border: 1px solid var(--hub-line); }
.pairings { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pairing.avoid { border-style: dashed; border-width: 2px; }
.accent-row { display: flex; align-items: center; gap: 12px; }
.accent-row .dot { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--hub-line-strong); flex: none; }
.sibs .mini { display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; background: var(--hub-surface); border: 1px solid var(--hub-line-strong); border-radius: 999px; text-decoration: none; color: var(--hub-ink); }
.sibs .mini:hover { border-color: var(--hub-brand); }
.sibs .mini .th { width: 48px; height: 48px; border-radius: 50%; position: relative; overflow: hidden; flex: none; }
.sibs .mini .th img { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); height: 96%; width: auto; max-width: none; }
.sibs .mini strong { font: 600 .9375rem var(--hub-font-display); }
.cast-card .cap em { font: 600 .875rem var(--hub-font-display); font-style: normal; margin-top: 8px; color: var(--hub-on-dark); display: inline-flex; gap: 8px; }
.cast-card .cap em::after { content: "→"; transition: transform .15s ease; }
.cast-card:hover .cap em::after { transform: translateX(4px); }
.logo-stage + .logo-meta { border-top: 1px solid var(--hub-line); }

/* mobile: tables stack, hero stacks, nothing clips */
@media (max-width: 900px) {
  .shell { background: none; }
  .kit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kit-tile:last-child { grid-column: 1 / -1; }
  .pairings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { aspect-ratio: auto; max-height: none; flex-direction: column; align-items: stretch; background: var(--hub-brand-deep); }
  .hero picture, .hero img.bg { position: static; display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; z-index: auto; }
  .hero img.bg { object-fit: cover; object-position: 50% 0; }
  .hero::after { display: none; }
  .hero-copy { padding: 8px var(--gutter) 40px; width: auto; }
  .hero h1 { font-size: clamp(2.25rem, 9vw, 3rem); }
  .table-wrap { overflow: visible; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 14px 6px; border-bottom: 1px solid var(--hub-line); }
  .table td { padding: 2px 8px; border: 0; }
  .table td.num, .table td.act { text-align: left; }
  .table td.act { padding-top: 10px; }
  .table td[data-l]::before { content: attr(data-l) ": "; color: var(--hub-ink-faint); font-size: .8125rem; }
}
@media (max-width: 560px) {
  .swatch .chipbox small { display: block; font-size: .6875rem; }
  .swatch .chipbox { height: 112px; }
  .kit-grid { gap: 12px; }
}

.steps .frame.layer { background: repeating-conic-gradient(var(--hub-checker-2, #e9e6dc) 0% 25%, var(--hub-stage, #fff) 0% 50%) 0 0 / 16px 16px; }
.steps .frame.layer .lyr { position: absolute; inset: 0; background: linear-gradient(0deg, var(--hub-brand-deep) 0%, rgba(var(--hub-shade-rgb, 30, 19, 41), 0) 100%); }
.tpl details.rest { font-size: .875rem; }
.tpl details.rest summary { cursor: pointer; color: var(--hub-link); font: 500 .875rem var(--hub-font-ui, var(--hub-font-display)); list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.tpl details.rest summary::-webkit-details-marker { display: none; }
.tpl details.rest summary::after { content: "+"; font-weight: 700; }
.tpl details.rest[open] summary::after { content: "−"; }
.tpl details.rest p { margin-top: 8px; color: var(--hub-ink-faint); }
@media (max-width: 1100px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .inuse[style] { grid-template-columns: 1fr !important; } .inuse .crop[style] { aspect-ratio: 2.2 !important; } .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card .actions-row { margin-top: auto; padding-top: 10px; display: flex; }
@media (min-width: 1101px) { .cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.top-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }

/* ---------- prefixai-driven additions ---------- */
.rail-brand .logo { display: block; width: 100%; max-width: 190px; height: auto; }
.rail-foot { display: flex; align-items: center; }
.powered { display: inline-flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--hub-rail-ink-soft); font: 500 .6875rem var(--hub-font-ui, var(--hub-font-display)); letter-spacing: .08em; text-transform: uppercase; }
.powered img { display: block; width: 140px; height: auto; opacity: .92; }
.powered:hover img { opacity: 1; }
.foot .legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 28px; border-top: 1px solid rgba(var(--hub-light-rgb, 231, 236, 228), .2); font-size: .8125rem; opacity: .85; }
.foot .legal .powered { color: var(--hub-on-dark); }
.foot .legal .powered img { filter: invert(1); }  /* black mark on the dark footer reads white */
.kit-art .lg { max-height: 26px; max-width: 84%; width: auto; height: auto; object-fit: contain; }
.fav-row { display: flex; align-items: flex-end; gap: 28px; padding: 28px; background: var(--hub-surface); border: 1px solid var(--hub-line-strong); border-radius: 10px; }
.fav-row img { display: block; border-radius: 6px; }
.split.rev { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.webshot { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--hub-line-strong); box-shadow: 0 18px 40px -22px rgba(var(--hub-shade-rgb, 25, 24, 26), .45); }
.webshot img { display: block; width: 100%; height: auto; }
.mini-grid { display: grid; grid-template-columns: repeat(var(--mini-cols, 3), minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.mini-card { display: flex; flex-direction: column; background: var(--hub-surface); border: 1px solid var(--hub-line-strong); border-radius: 10px; overflow: hidden; text-decoration: none; color: var(--hub-ink); transition: border-color .15s, transform .15s; }
.mini-card:hover { border-color: var(--hub-brand); transform: translateY(-2px); color: var(--hub-ink); }
.mini-card .thumb { display: block; aspect-ratio: 16 / 9; background: var(--hub-brand-deep); overflow: hidden; }
.mini-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.mini-card .txt { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.mini-card strong { font: 600 1.0625rem var(--hub-font-display); }
.mini-card .txt span { font-size: .875rem; color: var(--hub-ink-faint); line-height: 1.45; }
.tpl .links { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; justify-content: flex-end; }
.ui-grid { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.ui-grid .shot img { aspect-ratio: auto; height: auto; max-height: 440px; object-fit: contain; object-position: top; background: var(--hub-brand-deep); }
.ui-grid .shot { max-height: 440px; overflow: hidden; }
.deck-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.deck .shot img { aspect-ratio: 16 / 9; }
.op-grid { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.op .spread { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--hub-line-strong); }
.op .pg { padding: 0; border: 0; background: var(--hub-surface); cursor: zoom-in; display: block; }
.op .pg img { display: block; width: 100%; height: auto; }
/* design tokens */
.tk-group { margin: 28px 0 8px; }
.tk-group h3 { display: flex; align-items: baseline; gap: 12px; font-size: 1.125rem; margin-bottom: 8px; }
.tk-group h3 small { font: 500 .8125rem var(--hub-font-body); color: var(--hub-ink-faint); }
.tk-row { display: grid; grid-template-columns: 120px minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--hub-line); }
.tk-vis { display: flex; align-items: center; min-height: 28px; }
.tk-sw { width: 56px; height: 28px; border-radius: 6px; border: 1px solid var(--hub-line-strong); display: block; }
.tk-fam, .tk-size { font-family: var(--hub-font-display); color: var(--hub-ink); line-height: 1; }
.tk-bar { display: block; height: 10px; background: var(--hub-brand); border-radius: 2px; }
.tk-rad { width: 40px; height: 28px; background: var(--hub-brand-soft); border: 2px solid var(--hub-brand); display: block; }
.tk-shadow { width: 44px; height: 28px; background: var(--hub-surface); border-radius: 6px; display: block; }
.tk-name { all: unset; cursor: pointer; font: 500 .8125rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--hub-link); overflow-wrap: anywhere; }
.tk-name:hover { text-decoration: underline; }
.tk-name:focus-visible { outline: 2px solid var(--hub-focus, var(--hub-accent)); outline-offset: 2px; }
.tk-val { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tk-val code { font: 400 .8125rem var(--hub-font-body); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; white-space: normal; }
.tk-val small { font-size: .75rem; color: var(--hub-ink-faint); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split.rev { grid-template-columns: 1fr; }
  .tk-row { grid-template-columns: 72px minmax(0, 1fr); }
  .tk-val { grid-column: 2; }
  .ui-grid, .op-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .mini-grid { grid-template-columns: 1fr; }
  .rail-foot { padding: 18px 20px 22px; }
}

.logo-plate { display: inline-block; background: var(--hub-stage, #fff); border-radius: 6px; padding: 8px 12px; }
.logo-plate .logo { max-width: 166px; }
.rail-brand .wordmark { font: 600 1.375rem/1.1 var(--hub-font-display); letter-spacing: -0.02em; }
.op-spread { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 16px; }
.op-spread .pg { padding: 0; border: 1px solid var(--hub-line-strong); border-radius: 8px; overflow: hidden; background: var(--hub-surface); cursor: zoom-in; display: block; }
.op-spread .pg img { display: block; width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }

/* ---- brain-wide logo library, design-system docs and brand guide ---- */
.lg-family { margin-top: 36px; }
.lg-family:first-of-type { margin-top: 0; }
.lg-family > h3 { font-size: 1.125rem; font-weight: 600; display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.lg-family > h3 small { font: 400 .875rem var(--hub-font-body); color: var(--hub-ink-faint); }
.lg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.lg-tile { margin: 0; display: flex; flex-direction: column; background: var(--hub-surface); border: 1px solid var(--hub-line-strong); border-radius: 10px; overflow: hidden; min-width: 0; }
.lg-tile .stage { aspect-ratio: 16 / 10; display: grid; place-items: center; padding: 18px; }
.lg-tile .stage.light { background: var(--hub-stage, #fff); }
.lg-tile .stage.dark { background: var(--hub-brand-deep); }
.lg-tile .stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lg-tile .stage.is-mark img { max-height: 70%; }
.lg-tile .meta { padding: 10px 12px 12px; border-top: 1px solid var(--hub-line); display: flex; flex-direction: column; gap: 6px; }
.lg-tile .meta b { font: 600 .8125rem/1.3 var(--hub-font-ui, var(--hub-font-display)); overflow-wrap: anywhere; }
.lg-tile .meta span { font-weight: 500; display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: .75rem; color: var(--hub-ink-faint); }
.lg-tile .meta a { font: 600 .75rem var(--hub-font-ui, var(--hub-font-display)); color: var(--hub-link); }
.prose { max-width: 78ch; font-size: 1rem; line-height: 1.65; color: var(--hub-ink-soft); }
.prose h1 { display: none; }
.prose h2 { font: 600 1.375rem/1.25 var(--hub-font-display); color: var(--hub-heading, var(--hub-ink)); margin: 1.8em 0 .5em; }
.prose h3 { font: 600 1.125rem/1.3 var(--hub-font-display); color: var(--hub-heading, var(--hub-ink)); margin: 1.5em 0 .4em; }
.prose h4 { font: 600 1rem var(--hub-font-display); color: var(--hub-heading, var(--hub-ink)); margin: 1.2em 0 .3em; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose .table-wrap, .prose pre { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .25em 0; }
.prose code { font: 500 .875em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--hub-band); padding: 1px 5px; border-radius: 4px; }
.prose pre { background: var(--hub-band); padding: 14px 16px; border-radius: 8px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { border-left: 3px solid var(--hub-mark, var(--hub-accent-active)); padding: 2px 0 2px 16px; color: var(--hub-ink); }
.prose hr { border: 0; border-top: 1px solid var(--hub-line); margin: 1.6em 0; }
.prose table { width: 100%; }
.prose a { color: var(--hub-link); }
.doc-block { padding-bottom: 8px; border-bottom: 1px solid var(--hub-line); margin-bottom: 36px; }
.doc-block:last-child { border-bottom: 0; }
.doc-block > h2 { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.guide-grid figure { margin: 0; background: var(--hub-surface); border: 1px solid var(--hub-line-strong); border-radius: 10px; overflow: hidden; }
.guide-grid img { width: 100%; display: block; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: var(--hub-band); }
.guide-grid figcaption { padding: 9px 12px 11px; font: 500 .8125rem var(--hub-font-ui, var(--hub-font-display)); border-top: 1px solid var(--hub-line); }
.embed { width: 100%; height: 72vh; min-height: 480px; border: 1px solid var(--hub-line-strong); border-radius: 10px; background: var(--hub-stage, #fff); }
.note-panel { background: var(--hub-band); border: 1px solid var(--hub-line); border-radius: 10px; padding: 18px 20px; max-width: 78ch; }
.tk-table { width: 100%; }
@media (max-width: 700px) { .lg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.embed--tall { height: calc(100vh - 150px); min-height: 560px; }
/* the converted interactive guide: the client's own component CSS is scoped under .gd; these keep it inside the hub frame */
.gd { color: var(--hub-ink); }
.gd > section.section { padding: 8px 0 56px; }      /* beats the guide's own .section padding, which loads after */
.gd .section-head { margin-bottom: 24px; }
.gd img { max-width: 100%; height: auto; }
.gd-sec { scroll-margin-top: 80px; }
.gd h1 { font-size: clamp(2rem, 4.2vw, 3.5rem); line-height: 1.06; }
.gd, .gd * { min-width: 0; }
.gd { overflow-x: clip; }
@media (max-width: 900px) { .gd .section-head { grid-template-columns: 1fr; } .gd .spec-grid, .gd .three-col, .gd .two-col, .gd .do-dont { grid-template-columns: 1fr; } }
.gd > p:first-child { margin: 0 0 20px; }
.gd .source-note { display: none; }

/* live artifacts pulled into the brain, shown as pages */
.snap { max-width: none; }
.snap section { padding: 36px 0; border-top: 1px solid var(--hub-line); }
.snap section:first-child { border-top: 0; padding-top: 0; }
.snap img { max-width: 100%; height: auto; border-radius: 8px; display: block; }
.snap figure { margin: 0 0 28px; }
.snap figcaption { margin-top: 12px; color: var(--hub-ink-soft); }
.snap figcaption h3 { margin: 0 0 4px; }
.snap a > img { border: 1px solid var(--hub-line); }
.snap dl { display: grid; gap: 0; }
.snap dl > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 20px; padding: 12px 0; border-top: 1px solid var(--hub-line); }
.snap dt { font: 600 .875rem var(--hub-font-ui, var(--hub-font-display)); color: var(--hub-ink-faint); }
.snap dd { margin: 0; }
.snap ol { padding-left: 1.4em; }
.snap table { width: 100%; border-collapse: collapse; }
.snap th, .snap td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--hub-line); }
@media (max-width: 700px) { .snap dl > div { grid-template-columns: 1fr; gap: 4px; } }
.snap figcaption h3 span { display: block; margin-top: 4px; font: 400 .875rem var(--hub-font-body); opacity: .7; }
.ph-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 20px; color: var(--hub-ink-soft); font-size: .9375rem; }
.ds-strip { height: 112px; margin: 0 0 40px; box-shadow: none; }
.tk-sw.tk-grad { width: 100%; max-width: 96px; }
.mini-grid.centred { display: flex; flex-wrap: wrap; justify-content: center; }      /* an uneven last row sits centred, not ragged */
.mini-grid.centred > * { flex: 0 1 calc((100% - 2 * 20px) / 3); }
@media (max-width: 900px) { .mini-grid.centred > * { flex-basis: calc((100% - 20px) / 2); } }
@media (max-width: 560px) { .mini-grid.centred > * { flex-basis: 100%; } }
.tpl .shot, button.shot { color: var(--hub-ink); }
.rail-brand .logo.mark { width: 44px; height: auto; }
.kit-art .lg.mark { max-height: 56px; width: auto; }

/* ---------- scene hero (opt-in: hub.json hero.scene) ---------- */
.hero.scene { min-height: clamp(540px, 76vh, 800px); background: var(--hub-brand-deep); }
.hero.scene::after { background:
  linear-gradient(90deg, color-mix(in srgb, var(--hub-brand-deep) 96%, transparent) 0%, color-mix(in srgb, var(--hub-brand-deep) 78%, transparent) 26%, transparent 60%),
  linear-gradient(0deg, color-mix(in srgb, var(--hub-brand-deep) 70%, transparent) 0%, transparent 22%); }
.scene-stage { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.scene-plate { position: absolute; inset: -3%; width: 106%; height: 106%; max-width: none; object-fit: cover; object-position: var(--scene-focus, 70% 50%);
  transform: translate3d(calc(var(--px, 0) * -16px), calc(var(--py, 0) * -9px), 0);
  transition: transform .9s cubic-bezier(.16, 1, .3, 1); animation: scene-plate-in 1.8s cubic-bezier(.16, 1, .3, 1) both; }
.scene-fly { position: absolute; inset: 0; pointer-events: none; }
.fly-in { position: absolute; right: 5cqw; top: 50%; translate: 0 -50%; width: min(44cqw, 760px); transform-origin: 40% 55%;
  animation: scene-fly-in 2.6s cubic-bezier(.16, 1, .3, 1) .35s both; }
.fly-par { transform: translate3d(calc(var(--px, 0) * 22px), calc(var(--py, 0) * 12px), 0); transition: transform .9s cubic-bezier(.16, 1, .3, 1); }
.fly-img { display: block; width: 100%; height: auto; filter: drop-shadow(0 34px 46px rgba(1, 6, 52, .55));
  animation: scene-hover 7s ease-in-out 3s infinite alternate; }
.hero.scene .hero-copy { width: 47cqw; }
.hero.scene h1 { font-size: clamp(2.4rem, 4.5cqw, 4.25rem); letter-spacing: -0.035em; max-width: 14ch; }
@keyframes scene-plate-in { from { opacity: 0; filter: blur(10px); scale: 1.06; } to { opacity: 1; filter: none; scale: 1; } }
@keyframes scene-fly-in {
  0%   { transform: translate3d(-96cqw, 9cqw, 0) rotate(-11deg) scale(.58); opacity: 0; filter: blur(8px); }
  14%  { opacity: 1; }
  58%  { transform: translate3d(-28cqw, -3cqw, 0) rotate(-4deg) scale(.88); filter: blur(0); }
  100% { transform: none; opacity: 1; filter: none; } }
@keyframes scene-hover { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(-14px) rotate(1.1deg); } }
@media (max-width: 900px) {
  .hero.scene { display: block; min-height: 0; aspect-ratio: auto; max-height: none; }
  .hero.scene::after { display: none; }
  .scene-stage { position: relative; inset: auto; z-index: auto; aspect-ratio: 5 / 4; }
  .fly-in { right: 2cqw; top: auto; bottom: 4%; translate: none; width: 66cqw; }
  .hero.scene .hero-copy { width: auto; padding: 28px var(--gutter) 44px; }
  .hero.scene h1 { font-size: clamp(2.25rem, 9vw, 3rem); }
}
@media (prefers-reduced-motion: reduce) {
  .scene-plate, .fly-in, .fly-img { animation: none; }
  .scene-plate, .fly-par { transition: none; transform: none; }
}
