/*
  foundation.css
  BlastVector Website

  Created by HELM Coders LLC on 2026-10-28 (Central).
  Purpose: Website Foundation Redesign 001 (staged). One franchise-wide system layered on site.css: design tokens
           (type scale, spacing, widths, surfaces, status colours), the shared header with a real mobile menu, the
           shared footer, buttons and cards, and the two rebuilt pages (Universe home, Games hub). Linked only by the
           review and main-preview builds from /foundation/; never part of public/ until the redesign is released.
           Section experiences stay distinct: Games bold and image-led, Chronicles keep their serif reading layout
           (chronicles-art.css), Universe keeps its structured archive pages.
  Change log:
   2026-10-28 — Website Foundation Redesign 001: first version.
   2026-10-28 — Foundation 001 approved as the baseline: the "Universe" tag beside the header logo removed.
   2026-10-28 — App Store Badge Integration: .badge-button from the HELM Coders website (the unused SVG badge slot removed).
   2026-10-28 — Encyclopedia Content Integration: .g-figure (record art shown full-frame, never cropped or overlaid) and
                .g-enc-layer (the neutral Encyclopedia layer above a Terran Intelligence file).
   2026-10-30 — Prelaunch cleanup, pass 1: record grids draw each card's own border instead of painting the grid
                background, so no grey filler appears in an unfilled last row (People, Places, Technology, History,
                Ships, Encyclopedia lists); Universe hub entry tiles and featured Chronicles card; Universe → Worlds grid.
   2026-10-30 — Spanish Localization Phase 1: Intel tiles stack name and class in .tile-text; the class may use two
                lines before the ellipsis, so longer Spanish classes are no longer cut to one line.
   2026-10-31 — Footer HELM Coders logo 2.5× larger (92px → 230px wide; owner request), capped to the column width.
*/

/* ---------- tokens ---------- */
:root {
  /* type scale (display face: the existing heavy condensed sans; reading face: --serif from site.css) */
  --t-display: clamp(2.7rem, 6.6vw, 6rem);
  --t-h1: clamp(2.4rem, 5.2vw, 4.6rem);
  --t-h2: clamp(1.9rem, 3.6vw, 3rem);
  --t-h3: clamp(1.2rem, 1.1rem + .5vw, 1.5rem);
  --t-lead: clamp(1.05rem, 1rem + .45vw, 1.32rem);
  --t-body: 1rem;
  --t-small: .875rem;
  --t-label: .72rem;
  /* spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --u-section: clamp(56px, 7.5vw, 112px);
  /* widths: page (site.css --max), text column, reading column (Chronicles) */
  --u-text: 40em;
  /* surfaces and lines */
  --surface-1: #070c16;
  --surface-2: #0b1322;
  --surface-3: #111c30;
  --header-bg: #020409;
  /* status */
  --live: #4fe3a2;
  --soon: var(--amber);
  --concept: var(--ink-3);
  --header-h: 64px;
}

/* ---------- header ---------- */
.site-header.uh { background: var(--header-bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
.uh-bar { display: flex; align-items: center; gap: var(--s5); min-height: var(--header-h); }
.uh-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.uh-brand .brand-logo { width: 140px; }
.uh-nav { flex: 1; }
.uh-nav ul { display: flex; flex-wrap: wrap; gap: 2px; list-style: none; margin: 0; padding: 0; }
.uh-nav a { display: block; padding: 10px 14px; color: var(--ink-2); text-decoration: none; font-weight: 750; font-size: .8rem;
  letter-spacing: .14em; text-transform: uppercase; border-bottom: 2px solid transparent; }
.uh-nav a:hover { color: var(--ink); }
.uh-nav a[aria-current] { color: var(--ink); border-bottom-color: var(--amber); }
.uh .lang-switch { flex: none; }
.uh-toggle { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; margin-left: var(--s2);
  font: 800 .74rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink);
  background: transparent; border: 1px solid var(--line-2); cursor: pointer; }
.uh-toggle:hover { border-color: var(--ink-2); }
.uh-icon, .uh-icon::before, .uh-icon::after { display: block; width: 18px; height: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.uh-icon { position: relative; }
.uh-icon::before, .uh-icon::after { content: ""; position: absolute; left: 0; }
.uh-icon::before { top: -6px; }
.uh-icon::after { top: 6px; }
.uh.is-open .uh-icon { background: transparent; }
.uh.is-open .uh-icon::before { transform: translateY(6px) rotate(45deg); }
.uh.is-open .uh-icon::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .uh-bar { flex-wrap: wrap; gap: 0 var(--s3); }
  .uh-brand .brand-logo { width: 124px; }
  .uh .lang-switch { margin-left: auto; }
  /* without JavaScript: destinations wrap onto a second row (no sideways scrolling) */
  .uh-nav { order: 3; flex-basis: 100%; }
  .uh-nav ul { padding: 0 0 6px; }
  .uh-nav a { padding: 8px 10px; font-size: .74rem; }
  /* with JavaScript: a proper menu panel */
  .uh.has-menu .uh-toggle { display: inline-flex; }
  .uh.has-menu .uh-nav { display: none; }
  .uh.has-menu.is-open .uh-nav { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--header-bg);
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-2); box-shadow: 0 30px 60px rgba(0, 0, 0, .6);
    max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
  .uh.has-menu.is-open .uh-nav ul { display: block; padding: var(--s2) var(--gutter) var(--s5); }
  .uh.has-menu.is-open .uh-nav li + li { border-top: 1px solid var(--line); }
  .uh.has-menu.is-open .uh-nav a { padding: 18px 0; font-size: 1.05rem; letter-spacing: .12em; border-bottom: 0; }
  .uh.has-menu.is-open .uh-nav a[aria-current] { color: var(--amber); }
}
@media (max-width: 420px) {
  .uh-toggle .uh-label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .uh-toggle { padding: 0 12px; }
}
html.menu-open { overflow: hidden; }
@media (min-width: 901px) { html.menu-open { overflow: auto; } }

/* ---------- footer ---------- */
.site-footer.uf { padding: var(--s8) 0 var(--s6); background: var(--void); border-top: 1px solid var(--line); }
.uf-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: var(--s7); }
.uf-brand p { color: var(--ink-2); font-size: var(--t-small); max-width: 30em; margin: var(--s4) 0 var(--s5); }
.uf-wordmark { width: 168px; height: auto; }
.uf-brand .helm img { width: 230px; max-width: 100%; height: auto; opacity: .9; }
.uf-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); }
.uf-h { color: var(--ink-3); margin: 0 0 var(--s4); font-size: var(--t-label); }
.uf-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.uf-col a { color: var(--ink); text-decoration: none; font-weight: 650; font-size: .95rem; }
.uf-col a:hover { color: var(--amber); }
.uf-base { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line); }
.uf-base .fine { margin: 0; color: var(--ink-3); font-size: .78rem; }
@media (max-width: 860px) {
  .uf-grid { grid-template-columns: 1fr; gap: var(--s6); }
}
@media (max-width: 560px) {
  .uf-links { grid-template-columns: 1fr 1fr; }
  .uf-links .uf-col:last-child { grid-column: 1 / -1; }
  .uf-base { flex-direction: column-reverse; align-items: flex-start; }
}

/* ---------- shared section scaffolding ---------- */
.u-section { padding: var(--u-section) 0; }
.u-section + .u-section { border-top: 1px solid var(--line); }
.u-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s5); margin-bottom: var(--s6); }
.u-head h2 { font-size: var(--t-h2); margin: 0; }
.u-intro { color: var(--ink-2); max-width: var(--u-text); margin: var(--s3) 0 0; font-size: 1.05rem; }
.u-more { margin: 0; flex: none; }
.u-more .text-link { color: var(--amber); }
.u-pagehead { padding: clamp(48px, 8vw, 104px) 0 var(--s5); background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.u-pagehead h1 { font-size: var(--t-h1); }
.u-pagehead .lead { color: var(--ink-2); max-width: var(--u-text); font-size: var(--t-lead); margin: 0; }
@media (max-width: 700px) { .u-head { flex-direction: column; align-items: flex-start; } }

/* ---------- home hero ---------- */
.uhero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: min(92vh, 900px); min-height: min(92svh, 900px); overflow: hidden; background: var(--void); }
.uhero-media { position: absolute; inset: 0; z-index: -2; }
.uhero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.uhero-shade { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(1, 3, 7, .92) 0%, rgba(1, 3, 7, .7) 38%, rgba(1, 3, 7, .1) 75%),
              linear-gradient(0deg, var(--bg) 0%, rgba(4, 7, 14, 0) 45%); }
.uhero-content { padding-top: var(--s9); padding-bottom: clamp(40px, 6vw, 80px); }
.uhero h1 { font-size: var(--t-display); max-width: 9.5em; margin-bottom: var(--s4); }
.uhero .lead { font-size: var(--t-lead); color: var(--ink); max-width: 30em; margin: 0; }
.uhero .actions { margin-top: var(--s6); }
.uhero-live { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--line-2); max-width: 680px; }
.uhero-live p { margin: 0; color: var(--live); }
.uhero-live ul { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); list-style: none; margin: 0; padding: 0; }
.uhero-live a { color: var(--ink); font-weight: 750; text-decoration: none; border-bottom: 1px solid var(--line-2); }
.uhero-live a::after { content: " ↗"; color: var(--ink-3); }
.uhero-live a:hover { color: var(--live); border-color: var(--live); }
@media (max-width: 700px) {
  .uhero { min-height: 0; }
  .uhero-media img { object-position: center 30%; }
  .uhero-shade { background: linear-gradient(0deg, var(--bg) 8%, rgba(4, 7, 14, .78) 52%, rgba(4, 7, 14, .25) 100%); }
  .uhero-content { padding-top: 44vh; }
}

/* ---------- game cards (Games: bold, image-led) ---------- */
.uc-status { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 var(--s3); font-size: var(--t-label); color: var(--concept); }
.uc-status .dot { width: 7px; height: 7px; background: currentColor; box-shadow: 0 0 10px currentColor; }
.is-live .uc-status { color: var(--live); }
.is-soon .uc-status { color: var(--soon); }
.is-concept .uc-status .dot { box-shadow: none; background: transparent; border: 1px solid currentColor; }
.uc-sub { font-weight: 800; color: var(--ink); margin: 0 0 var(--s2); letter-spacing: .01em; }
.uc-sum { color: var(--ink-2); margin: 0 0 var(--s4); }
.uc-platforms { color: var(--ink-3); font-size: .64rem; letter-spacing: .12em; margin: 0; }
.uc-card .actions, .uc-feature .actions { margin-top: var(--s5); }

.uc-feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); background: var(--surface-1); border: 1px solid var(--line); margin-bottom: var(--s5); }
.uc-feature-art { display: block; position: relative; min-height: 100%; overflow: hidden; background: var(--void); }
.uc-feature-art picture, .uc-feature-art img { width: 100%; height: 100%; }
.uc-feature-art img { object-fit: cover; aspect-ratio: 16 / 9; transition: transform .5s ease; }
.uc-feature:hover .uc-feature-art img { transform: scale(1.03); }
.uc-feature-body { padding: clamp(24px, 3.4vw, 48px); align-self: center; }
.uc-logo-title { margin: 0 0 var(--s4); }
.uc-logo { width: min(300px, 80%); height: auto; }
.uc-feature .uc-sub { font-size: var(--t-h3); text-transform: uppercase; font-weight: 900; line-height: 1.1; }
@media (max-width: 860px) { .uc-feature { grid-template-columns: 1fr; } }

.uc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); list-style: none; margin: 0; padding: 0; }
.uc-card { display: flex; flex-direction: column; background: var(--surface-1); border: 1px solid var(--line); }
.uc-card.is-live { border-top: 2px solid var(--live); }
.uc-art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--void); border-bottom: 1px solid var(--line); }
.uc-art picture, .uc-art img { width: 100%; height: 100%; }
.uc-art img { object-fit: cover; }
.uc-art-empty { display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 120%, rgba(102, 231, 255, .12), transparent 60%),
              repeating-linear-gradient(90deg, rgba(150, 190, 230, .05) 0 1px, transparent 1px 48px),
              repeating-linear-gradient(0deg, rgba(150, 190, 230, .05) 0 1px, transparent 1px 48px), var(--surface-2); }
.uc-art-empty span { color: var(--ink-3); letter-spacing: .3em; font-size: .7rem; }
.uc-body { display: flex; flex-direction: column; padding: var(--s5); flex: 1; }
.uc-name { font-size: var(--t-h3); margin: 0 0 var(--s2); }
.uc-body .actions { margin-top: auto; padding-top: var(--s5); }
.uc-card .cmd { width: 100%; }
@media (max-width: 1000px) { .uc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .uc-grid { grid-template-columns: 1fr; } }

/* Games hub: titles at h2 size inside cards */
.u-hub .uc-name { font-size: clamp(1.35rem, 1.2rem + .6vw, 1.75rem); }

/* ---------- Chronicles on the home page (cards keep the Chronicles look: whole-frame art, serif line) ---------- */
.u-vols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
.u-vols .vol-card a { height: 100%; }
.u-vols .vol-card-title { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.6rem); }
@media (max-width: 760px) { .u-vols { grid-template-columns: 1fr; } }

/* ---------- Explore the Universe (Universe: structured archive) ---------- */
.ux-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); list-style: none; margin: 0; padding: 0; }
.ux-tile a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: var(--surface-1); border: 1px solid var(--line); }
.ux-tile a:hover { border-color: var(--line-2); }
.ux-art { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--void); border-bottom: 1px solid var(--line); }
.ux-art picture, .ux-art img { width: 100%; height: 100%; }
.ux-art img { object-fit: cover; object-position: center 25%; transition: transform .5s ease; }
.ux-tile a:hover .ux-art img { transform: scale(1.04); }
.ux-body { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s5); }
.ux-count { color: var(--cyan); font-size: var(--t-label); }
.ux-name { font-weight: 900; text-transform: uppercase; font-size: var(--t-h3); line-height: 1.05; }
.ux-name::after { content: " →"; color: var(--amber); }
.ux-text { color: var(--ink-2); font-size: var(--t-small); }
@media (max-width: 900px) { .ux-grid { grid-template-columns: 1fr; } .ux-tile a { display: grid; grid-template-columns: 38% 1fr; } .ux-art { aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--line); } }
@media (max-width: 480px) { .ux-tile a { grid-template-columns: 1fr; } .ux-art { aspect-ratio: 3 / 2; border-right: 0; border-bottom: 1px solid var(--line); } }

/* ---------- Latest from the Universe ---------- */
.ul-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ul-list li { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr) auto; gap: var(--s3) var(--s6); align-items: baseline; padding: var(--s5) 0; border-bottom: 1px solid var(--line); }
.ul-list p { margin: 0; }
.ul-k { color: var(--ink-3); font-size: var(--t-label); }
.ul-list li[data-availability] .ul-k { color: var(--live); }
.ul-text { font-size: 1.05rem; }
.ul-link .text-link { color: var(--amber); }
.ul-link .uc-store::after { content: " ↗"; }
@media (max-width: 760px) { .ul-list li { grid-template-columns: 1fr; } }

/* ---------- breadcrumbs under the new page head ---------- */
.u-pagehead + .crumbs, .u-pagehead + nav.crumbs { margin-top: 0; }

/* ---------- content graph (Content Architecture M2): related listings, spoiler badges and notices, record facts ---------- */
.g-related { border-top: 1px solid var(--line); }
.g-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s5) var(--s6); }
.g-h { color: var(--ink-3); font-size: var(--t-label); margin: 0 0 var(--s3); }
.g-links { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.g-links li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.g-links .text-link { color: var(--ink); }
.g-links .text-link:hover { color: var(--amber); }
.g-k { color: var(--ink-3); font-size: .6rem; }
.g-nolink { color: var(--ink-2); }
.g-spoilers { margin-top: var(--s3); }
.g-spoilers summary { cursor: pointer; color: var(--amber); font-size: var(--t-label); }
.g-spoilers[open] summary { margin-bottom: var(--s2); }
.sp-badge { display: inline-block; padding: 1px 6px; font-size: .56rem; letter-spacing: .12em; border: 1px solid currentColor; }
.sp-campaign { color: var(--amber); }
.sp-chronicle { color: #c9a8ff; }
.sp-notice { margin: var(--s4) 0 0; padding: 10px 14px; font-size: .66rem; border-left: 2px solid currentColor; background: rgba(255, 181, 71, .06); }
.sp-notice.sp-chronicle { background: rgba(201, 168, 255, .06); }
.g-facts { margin-bottom: var(--s5); }
.g-layer { margin-top: var(--s5); }
.g-layer-k { color: var(--cyan); font-size: var(--t-label); margin-bottom: var(--s3); }
.g-intelligence { padding: var(--s5); border: 1px solid rgba(255, 61, 80, .3); }
.g-intelligence .g-layer-k { color: var(--hostile); }
.g-figure { margin: var(--s5) auto 0; max-width: 1100px; }
.g-figure img { display: block; width: 100%; height: auto; object-fit: contain; border: 1px solid var(--line, rgba(255, 255, 255, .12)); }
.g-enc-layer .g-layer-k { color: var(--cyan); font-size: var(--t-label); margin-bottom: var(--s3); }
.g-enc-layer p + p { margin-top: var(--s3); }
.g-intel-note { margin-top: var(--s5); padding-top: var(--s3); border-top: 1px solid rgba(255, 61, 80, .3); color: var(--muted, #9aa4b2); font-size: var(--t-label); }
.records .record .g-k { display: block; margin-bottom: 4px; }
.records .record .sp-badge { margin-left: 8px; vertical-align: middle; }

/* ---------- Universe (Content Architecture M3): in-section bar, layers, tile spoiler tags ---------- */
.u-bar { border-bottom: 1px solid var(--line); background: var(--bg-2); }
.u-bar ul { display: flex; flex-wrap: wrap; gap: 2px var(--s2); list-style: none; margin: 0; padding: var(--s2) 0; }
.u-bar a { display: block; padding: 8px 10px; color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; border-bottom: 2px solid transparent; }
.u-bar a:hover { color: var(--ink); }
.u-bar a[aria-current] { color: var(--ink); border-bottom-color: var(--cyan); }
.u-layer { padding-top: var(--u-section); }
.u-layer-intel { border-top: 0; }
.u-layer h2 a, .theatre h2 a { color: inherit; text-decoration: none; }
.u-shelf + .u-shelf { margin-top: var(--s6); }
.ship-tile a { position: relative; }
.ship-tile .tile-text { position: absolute; left: 10px; right: 10px; bottom: 8px; z-index: 2; display: flex; flex-direction: column; gap: 3px; }
.ship-tile .tile-text .tile-name, .ship-tile .tile-text .tile-class { position: static; }
.ship-tile .tile-text .tile-class { white-space: normal; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.tile-sp { position: absolute; top: 8px; right: 8px; z-index: 2; background: rgba(0, 0, 0, .7); }
.contact-card .tile-sp { position: static; margin: 4px 0; align-self: flex-start; }
.faction-cards.records .record a { height: 100%; }

/* ---------- generated product pages (Content Architecture M4) ---------- */
.gp-hero { position: relative; isolation: isolate; background: var(--void); }
.gp-art { position: relative; max-height: 62vh; overflow: hidden; }
.gp-art picture, .gp-art img { width: 100%; }
.gp-art img { object-fit: cover; aspect-ratio: 32 / 10; max-height: 62vh; }
.gp-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 0%, rgba(4, 7, 14, 0) 45%); }
.gp-text { position: relative; margin-top: -72px; padding-bottom: var(--s6); }
.gp-text h1 { font-size: var(--t-h1); margin-bottom: var(--s2); }
.gp-sub { font-weight: 800; font-size: var(--t-h3); text-transform: uppercase; margin: 0 0 var(--s3); }
.gp-text .lead { max-width: 36em; color: var(--ink-2); font-size: var(--t-lead); }
.gp-text .uc-platforms { margin-top: var(--s4); }
.is-live .uc-status { color: var(--live); }
.gp-about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s7); }
.gp-about h2 { font-size: var(--t-h2); }
.gp-lead { color: var(--ink-2); font-size: 1.05rem; }
.gp-features { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.gp-features li { padding-left: 22px; position: relative; color: var(--ink); }
.gp-features li::before { content: ""; position: absolute; left: 0; top: .6em; width: 10px; height: 2px; background: var(--amber); }
.gp-shots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.gp-shots img { width: 100%; height: auto; border: 1px solid var(--line); }
.uc-name a { color: inherit; text-decoration: none; }
.uc-name a:hover { color: var(--amber); }
.uc-card .actions { display: grid; gap: var(--s2); }
@media (max-width: 860px) { .gp-about-grid { grid-template-columns: 1fr; gap: var(--s5); } .gp-shots { grid-template-columns: 1fr; } .gp-text { margin-top: -32px; } .gp-art img { aspect-ratio: 16 / 9; } }

/* ---------- static search (Content Architecture M5) ---------- */
.s-form { max-width: 760px; }
.s-label { display: block; color: var(--ink-3); margin-bottom: var(--s2); }
.s-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); }
.s-row input, .s-row select { min-height: 48px; padding: 0 14px; font: 500 1rem var(--sans); color: var(--ink); background: var(--surface-1); border: 1px solid var(--line-2); border-radius: 0; }
.s-row input:focus, .s-row select:focus { border-color: var(--amber); outline: none; }
.s-row select { -webkit-appearance: none; appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.s-toggle { display: inline-flex; align-items: center; gap: 8px; margin-top: var(--s3); color: var(--ink-2); font-size: var(--t-label); cursor: pointer; }
.s-status { color: var(--ink-3); margin: var(--s5) 0 var(--s3); min-height: 1em; }
.s-results { list-style: none; margin: 0 0 var(--s7); padding: 0; max-width: 860px; border-top: 1px solid var(--line); }
.s-results:empty { border: 0; }
.s-results li { padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.s-results a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; text-decoration: none; color: var(--ink); }
.s-results a:hover .s-name { color: var(--amber); }
.s-name { font-weight: 800; font-size: 1.1rem; }
.s-results p { margin: 6px 0 0; color: var(--ink-2); font-size: var(--t-small); }
.s-browse { margin-top: var(--s6); }
@media (max-width: 560px) { .s-row { grid-template-columns: 1fr; } }

/* ---------- Content Presentation Refinement: compact rows, register filters, grouped search ---------- */
.records.compact { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.records.compact .record a { padding: var(--s4); min-height: 0; }
.records.compact .record-sum { font-size: var(--t-small); }
.f-group .records.compact { margin-top: var(--s4); }
.r-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3) var(--s4); margin: var(--s5) 0 0; padding: var(--s4); border: 1px solid var(--line); background: var(--surface-1); }
.r-filters[hidden] { display: none; }
.r-filters label { display: grid; gap: 6px; }
.r-filters label > span { color: var(--ink-3); font-size: var(--t-label); }
.r-filters select { min-height: 44px; min-width: 170px; padding: 0 34px 0 12px; font: 600 .92rem var(--sans); color: var(--ink); background-color: var(--bg); border: 1px solid var(--line-2); border-radius: 0;
  -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.r-filters select:focus { border-color: var(--amber); outline: none; }
.r-filters .r-sp { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink-2); font-size: var(--t-label); cursor: pointer; }
.r-status { flex-basis: 100%; margin: 0; color: var(--ink-3); }
li[data-category][hidden], .contact-grid[hidden], .intel-scope[hidden], .h-label[hidden] { display: none !important; }
@media (max-width: 640px) { .r-filters label { flex: 1 1 100%; } .r-filters select { width: 100%; } }

.s-results { border-top: 0; }
.s-group { margin-bottom: var(--s6); }
.s-group-h { margin: 0 0 var(--s2); padding-bottom: var(--s2); border-bottom: 1px solid var(--line-2); font-size: var(--t-label); color: var(--ink-2); }
.s-group-list { list-style: none; margin: 0; padding: 0; }
.s-group-list > li { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.s-group-list > li[hidden] { display: none; }
.s-chip { display: inline-block; padding: 2px 7px; font-size: .58rem; letter-spacing: .12em; border: 1px solid currentColor; color: var(--ink-3); }
.s-t-game .s-chip { color: var(--amber); }
.s-t-faction .s-chip { color: var(--hostile); }
.s-t-ship .s-chip, .s-t-vehicle .s-chip { color: var(--cyan); }
.s-t-lifeform .s-chip { color: var(--native); }
.s-t-world .s-chip { color: #8fb7ff; }
.s-t-chronicle-volume .s-chip, .s-t-chronicle-chapter .s-chip { color: #c9a8ff; }
.s-more { margin-top: var(--s3); }
.records.compact { background: none; border: 0; gap: var(--s3); }
.records.compact .record { border: 1px solid var(--line); background: var(--surface-1); }
.records.compact .record a { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.records .record .sp-badge { align-self: flex-start; margin-left: 0; }

/* ---------- App Store badge (App Store Badge Integration) ----------
   Reused from the HELM Coders website (assets/site.css .badge-button): black pill, grey keyline, Apple logo character,
   "Download on the / App Store". Product pages only. */
.badge-button { display: inline-flex; align-items: center; gap: 12px; background: #000; border: 1px solid #666; border-radius: 10px;
  padding: 8px 15px; text-decoration: none; color: #fff; min-width: 185px; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif; }
.badge-button .apple { font-size: 28px; line-height: 1; }
.badge-button small { display: block; font-size: 9px; line-height: 1; text-transform: uppercase; letter-spacing: .05em; }
.badge-button strong { display: block; font-size: 19px; line-height: 1.15; font-weight: 600; }
.badge-button:hover { border-color: #aaa; color: #fff; }
.badge-button:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---------- game-page sections (Game Pages Implementation 001): shared by every game record with page.sections ---------- */
.gs-hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: min(86vh, 860px); min-height: min(86svh, 860px); overflow: hidden; background: var(--void); }
.gs-hero-media { position: absolute; inset: 0; z-index: -2; }
.gs-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.gs-hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(1, 3, 7, .9) 0%, rgba(1, 3, 7, .55) 42%, rgba(1, 3, 7, 0) 75%), linear-gradient(0deg, var(--bg) 0%, rgba(4, 7, 14, 0) 45%); }
.gs-hero-text { padding-top: var(--s9); padding-bottom: clamp(36px, 6vw, 72px); }
.gs-hero h1 { font-size: var(--t-display); margin: 0 0 var(--s2); }
.gs-line { font-weight: 900; text-transform: uppercase; font-size: var(--t-h3); margin: 0 0 var(--s3); }
.gs-hero .lead { max-width: 34em; color: var(--ink); font-size: var(--t-lead); }
.gs-hero .actions { align-items: center; margin-top: var(--s5); }
.gs-chips { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; margin: var(--s5) 0 0; padding: 0; }
.gs-chips li { padding: 5px 10px; border: 1px solid var(--line-2); font-size: .64rem; color: var(--ink-2); background: rgba(0, 0, 0, .35); }
.gs-narrow { max-width: 46em; }
.gs h2 { font-size: var(--t-h2); }
.gs-prose p { font-size: 1.12rem; color: var(--ink); max-width: 40em; }
.gs-reflist { margin-top: var(--s4); }
.gs-cross { background: var(--bg-2); }
.gs-statement { font-size: clamp(1.25rem, 1.05rem + 1vw, 1.9rem); font-weight: 700; line-height: 1.35; max-width: 30em; margin: 0 0 var(--s6); }
.gs-xcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s4); list-style: none; margin: 0; padding: 0; }
.gs-xcard a { display: block; text-decoration: none; color: var(--ink); background: var(--surface-1); border: 1px solid var(--line); }
.gs-xcard a:hover { border-color: var(--amber); }
.gs-xcard img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.gs-xbody { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: var(--s4); }
.gs-xname { font-weight: 900; text-transform: uppercase; font-size: 1.1rem; }
.gs-frame video { width: 100%; height: auto; background: #000; }
.gs-feature { display: grid; gap: var(--s7); align-items: center; }
.gs-feature.has-media { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.gs-feature.has-media.flip .gs-media { order: -1; }
.gs-feature.has-media.flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.gs-media img, .gs-gallery img { width: 100%; height: auto; border: 1px solid var(--line); }
.gs-stats { margin: var(--s5) 0; }
.gs-items { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; gap: var(--s4); }
.gs-items li { padding-left: var(--s4); border-left: 2px solid var(--amber); }
.gs-items h3 { font-size: 1.05rem; margin: 0 0 4px; }
.gs-items p { margin: 0; color: var(--ink-2); }
.gs-items .gs-itemref { margin-top: 6px; }
.gs-cols { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gs-note { color: var(--ink-3); margin-top: var(--s4); font-size: var(--t-label); }
.gs-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s4); list-style: none; margin: var(--s6) 0 0; padding: 0; }
.gs-ref { color: var(--amber); }
.gs-reflist .sp-badge, .gs-itemref .sp-badge, .gs-rbody .sp-badge { margin-left: 6px; }
.gs-rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s4); list-style: none; margin: var(--s6) 0 0; padding: 0; }
.gs-rcard { background: var(--surface-1); border: 1px solid var(--line); display: flex; flex-direction: column; }
.gs-rcard figure { margin: 0; background: var(--void); }
.gs-rcard img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gs-rbody { padding: var(--s4) var(--s5) var(--s5); }
.gs-rlabel { color: var(--hostile); font-size: var(--t-label); margin: 0 0 4px; }
.gs-rbody h3 { font-size: var(--t-h3); margin: 0 0 var(--s2); }
.gs-rbody p { color: var(--ink-2); margin: 0; }
.gs-rbody .gs-itemref { margin-top: var(--s3); }
.gs-badgegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--s4); list-style: none; margin: var(--s5) 0 0; padding: 0; }
.gs-badgegrid img { width: 100%; height: auto; border-radius: 50%; }
.gs-values { background: var(--bg-2); }
.gs-cta { padding: var(--u-section) 0; text-align: center; background: radial-gradient(ellipse at 50% 120%, rgba(255, 181, 71, .12), transparent 60%), var(--bg); border-top: 1px solid var(--line); }
.gs-cta h2 { font-size: var(--t-h1); margin: 0 0 var(--s2); }
.gs-cta .actions { justify-content: center; }
.gs-support { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s5); list-style: none; margin: var(--s5) 0 0; padding: 0; }
@media (max-width: 860px) {
  .gs-feature.has-media, .gs-feature.has-media.flip { grid-template-columns: 1fr; gap: var(--s5); }
  .gs-feature.has-media.flip .gs-media { order: 0; }
}
@media (max-width: 700px) {
  .gs-hero { min-height: 0; }
  .gs-hero-shade { background: linear-gradient(0deg, var(--bg) 10%, rgba(4, 7, 14, .82) 55%, rgba(4, 7, 14, .2) 100%); }
  .gs-hero-text { padding-top: 46vh; }
  .gs-rgrid { grid-template-columns: 1fr; }
}
/* capped section images (small store screenshots shown at or below their real size) */
.gs-media.is-capped { justify-self: center; width: 100%; }
.gs-platforms .gs-media { margin-top: var(--s6); }

/* ---------- Prelaunch cleanup, pass 1 (2026-10-30) ----------
   Content-driven record grids: cards carry their own border; the grid itself is transparent, so only real entries
   render and an unfilled last row is simply empty space (no grey filler cells). */
.records { background: none; border: 0; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.records .record { border: 1px solid var(--line); background: var(--surface-1); }
.records .record a { height: 100%; }
.records .record a:hover, .records .record a:focus-visible { background: var(--bg-2); }
.records + .h-label { margin-top: var(--s6); }   /* space between grouped grids (e.g. Places: Regions, Sites, Planets) */

/* Universe hub: entry tiles fill the row on wide screens (3 or 4 sections), the featured Chronicles card below. */
@media (min-width: 901px) { .u-hub-explore .ux-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
/* Tablet: two image-topped tiles per row with a fixed art shape, so a tall portrait never stretches one tile. */
@media (min-width: 600px) and (max-width: 900px) {
  .u-hub-explore .ux-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .u-hub-explore .ux-tile a { display: flex; flex-direction: column; }
  .u-hub-explore .ux-art { aspect-ratio: 3 / 2; border-right: 0; border-bottom: 1px solid var(--line); }
}
.u-feature-card { margin-top: var(--s2); }
.u-feature-cta { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s5) 0 0; }

/* Universe → Worlds: three across on desktop, two on tablet, one on phones; real Worlds only. */
.u-world-tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--s3); }
.u-worlds-more { margin: var(--s5) 0 0; }
