/* ==========================================================================
   DaedalMap site.css
   Built against site_design.md
   Every value traces to a token or a documented decision.
   ========================================================================== */


/* ==========================================================================
   1. TOKENS
   ========================================================================== */

:root {

  /* Surfaces */
  --bg:               #07111a;
  --bg-deep:          #02060b;
  --bg-mid:           #0a1620;
  --panel:            rgba(7, 18, 28, 0.84);
  --panel-strong:     rgba(9, 22, 34, 0.95);
  --panel-elevated:   rgba(13, 31, 45, 0.96);

  /* Text */
  --text:             #edf4fb;
  --text-strong:      #f7fbff;
  --muted:            #8da1b1;
  --muted-strong:     #a7bfce;

  /* Cyan - signal, navigation, system clarity */
  --cyan:             #8cecff;
  --cyan-strong:      #2dcfff;
  --cyan-deep:        #10384c;
  --cyan-soft:        rgba(45, 207, 255, 0.13);

  /* Amber - action, emphasis */
  --amber:            #ffbe5c;
  --amber-strong:     #ff7f1f;
  --amber-soft:       rgba(255, 190, 92, 0.15);

  /* Borders and dividers */
  --line:             rgba(116, 185, 224, 0.2);
  --line-strong:      rgba(116, 185, 224, 0.42);
  --line-soft:        rgba(116, 185, 224, 0.1);

  /* Glows and shadows */
  --glow-cyan:        0 0 0 1px rgba(140, 236, 255, 0.2), 0 0 20px rgba(45, 207, 255, 0.14);
  --glow-amber:       0 0 0 1px rgba(255, 190, 92, 0.22), 0 0 24px rgba(255, 127, 31, 0.13);
  --shadow:           0 30px 90px rgba(0, 0, 0, 0.44);
  --shadow-card:      0 14px 38px rgba(0, 0, 0, 0.22);

  /* Semantic status (chips only) */
  --status-live:      #72e1b9;
  --status-live-bg:   rgba(43, 125, 95, 0.18);
  --status-dev:       #7ecfff;
  --status-dev-bg:    rgba(30, 80, 130, 0.2);
  --status-planned:   rgba(180, 160, 230, 0.85);
  --status-planned-bg: rgba(100, 80, 160, 0.15);
  --status-error:     #ff7f7f;
  --status-ok:        #6ec97a;

  /* Typography */
  --type-base:        "IBM Plex Sans", "Segoe UI Variable Text", "Aptos", sans-serif;
  --type-header:      "IBM Plex Sans", "Segoe UI Variable Text", "Aptos", sans-serif;
  --type-mono:        "Cascadia Code", "Consolas", "SFMono-Regular", monospace;

  /* Type scale */
  --text-display:     clamp(3.5rem, 7vw, 6rem);
  --text-headline:    clamp(2.2rem, 4vw, 3.5rem);
  --text-title:       1.5rem;
  --text-card:        1.25rem;
  --text-body:        0.9375rem;
  --text-label:       0.75rem;

  /* Spacing (4pt grid, rem) */
  --sp-1:   0.25rem;
  --sp-2:   0.5rem;
  --sp-3:   0.75rem;
  --sp-4:   1rem;
  --sp-5:   1.25rem;
  --sp-6:   1.5rem;
  --sp-7:   1.75rem;
  --sp-8:   2rem;
  --sp-10:  2.5rem;
  --sp-12:  3rem;
  --sp-14:  3.5rem;
  --sp-16:  4rem;
  --sp-20:  5rem;

  /* Desktop shell. Wide enough for map/data workbenches; prose keeps its own
     readable line-length caps. */
  --site-max-width: 90rem;

  /* Border radius */
  --radius-sm:   12px;
  --radius-md:   20px;
  --radius-lg:   28px;
  --radius-pill: 9999px;

  /* Catalog blue - link/active accent on the data surfaces (packs, feeds,
     geometry, research projects). Distinct from --cyan-strong, which is the
     marketing accent. Both are intentional; do not collapse them. */
  --blue:            #63b9ff;
  --blue-bright:     #c8e8ff;
  --blue-line:       rgba(99, 185, 255, 0.45);
  --blue-soft:       rgba(99, 185, 255, 0.14);
  --blue-faint:      rgba(99, 185, 255, 0.06);
  --blue-text:       rgba(99, 185, 255, 0.9);

  /* Entity profile surfaces - the detail pages under a catalog. Slightly
     warmer/bluer than the catalog cards on purpose: a profile is a document
     about one thing, not a tile in a grid. */
  --profile-panel:       rgba(14, 38, 66, 0.5);
  --profile-panel-mid:   rgba(14, 38, 66, 0.45);
  --profile-panel-soft:  rgba(14, 38, 66, 0.4);
  --profile-line:        rgba(110, 196, 255, 0.1);
  --profile-line-soft:   rgba(110, 196, 255, 0.08);
  --profile-label:       rgba(160, 210, 255, 0.5);
  --profile-value:       #c8e8ff;
  --profile-text:        #c0d8f0;
  --profile-text-strong: #d8ecff;
  --profile-text-bright: #e0f0ff;
  --profile-link:        #8dcaff;

  /* Catalog surfaces */
  --card-face:       linear-gradient(180deg, rgba(11, 28, 41, 0.98), rgba(6, 15, 24, 0.88));
  --card-face-hover: linear-gradient(180deg, rgba(13, 32, 46, 0.99), rgba(7, 18, 28, 0.9));
  --card-line:       rgba(116, 185, 224, 0.16);
  --card-line-hover: rgba(116, 185, 224, 0.32);
  --card-inset:      inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 14px 38px rgba(0, 0, 0, 0.18);
  --bar-face:        linear-gradient(90deg, rgba(99, 185, 255, 0.05), transparent 48%), rgba(6, 16, 25, 0.56);
  --pill-face:       linear-gradient(180deg, rgba(9, 24, 38, 0.8), rgba(5, 12, 18, 0.74));
  --head-face:       rgba(8, 20, 32, 0.9);
  --head-face-hover: rgba(12, 28, 42, 0.95);
  --input-face:      rgba(5, 14, 22, 0.82);
}


/* ==========================================================================
   2. RESET AND BASE
   ========================================================================== */

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

html {
  min-height: 100%;
  /* Background: gradient + two color blobs. Nothing else. */
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 127, 31, 0.18), transparent 22%),
    radial-gradient(circle at 88% 10%, rgba(45, 207, 255, 0.16), transparent 22%),
    linear-gradient(180deg, #091520 0%, #051018 50%, #02060b 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--type-base);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
}

h1, h2, h3, h4, h5, h6,
p, ul, ol, figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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


/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1 {
  font-family: var(--type-header);
  font-size: var(--text-display);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

/* Page hero h1 - interior pages */
.page-hero h1 {
  font-size: var(--text-headline);
  line-height: 1.05;
  max-width: 32ch;
}

/* Deliberate second-line accent for short hero headlines. Keep the first line
   white so the gradient reads as one focal statement, not decorative color. */
.hero-gradient-line {
  display: inline-block;
  background: linear-gradient(135deg, #8cecff 0%, #ffbe5c 100%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Amber accent span - homepage only */
.hero-home h1 span {
  color: var(--amber);
}

h2 {
  font-family: var(--type-header);
  font-size: var(--text-title);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}

h3 {
  font-family: var(--type-header);
  font-size: var(--text-card);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}

p {
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--muted-strong);
}

/* Prose links */
p a {
  color: var(--cyan);
  font-weight: 500;
}

p a:hover {
  color: var(--text);
}

code {
  font-family: var(--type-mono);
  font-size: 0.875em;
  color: var(--cyan);
  background: var(--cyan-soft);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}


/* ==========================================================================
   4. LAYOUT SHELL
   ========================================================================== */

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header,
.site-footer,
main {
  width: min(var(--site-max-width), calc(100% - 2.5rem));
  margin-inline: auto;
}

main {
  flex: 1;
  padding-bottom: var(--sp-14);
}


/* ==========================================================================
   5. NAV
   ========================================================================== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding: var(--sp-6) 0 var(--sp-5);
  position: relative;
  z-index: 10;
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-1);
  text-decoration: none;
  font-family: var(--type-base);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: opacity 160ms ease;
}

.brand:hover {
  opacity: 0.8;
}

.brand-mark {
  color: var(--muted);
}

.brand-name {
  color: var(--text);
}

.brand:focus-visible {
  outline: 2px solid rgba(127, 231, 255, 0.5);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* Nav toggle (mobile) */
.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle:focus-visible {
  outline: 2px solid rgba(127, 231, 255, 0.5);
  outline-offset: 2px;
}

.nav-toggle-line {
  width: 18px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: currentColor;
}

/* Nav links */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}

.site-nav a,
.site-footer a {
  text-decoration: none;
}

.site-nav a {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--panel);
  color: var(--muted);
  font-family: var(--type-base);
  font-size: var(--text-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.site-nav a:hover {
  color: var(--text);
  border-color: rgba(127, 231, 255, 0.35);
  transform: translateY(-1px);
  box-shadow: var(--glow-cyan);
}

.site-nav a.is-active {
  color: var(--cyan);
  border-color: rgba(127, 231, 255, 0.35);
  background: rgba(15, 39, 59, 0.98);
  box-shadow: var(--glow-cyan);
}

.site-nav a:focus-visible {
  outline: 2px solid rgba(127, 231, 255, 0.5);
  outline-offset: 2px;
}

/* Nav dropdown */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid rgba(255, 190, 92, 0.42);
  border-radius: var(--radius-pill);
  background: rgba(255, 190, 92, 0.06);
  color: var(--amber);
  font-family: var(--type-base);
  font-size: var(--text-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-dropdown-trigger::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 160ms ease;
}

.nav-dropdown:hover .nav-dropdown-trigger::after,
.nav-dropdown-trigger[aria-expanded="true"]::after {
  transform: rotate(-135deg) translate(-1px, -1px);
}

.nav-dropdown-trigger:hover,
.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown-trigger[aria-expanded="true"],
.nav-dropdown-trigger.is-active {
  color: var(--amber);
  border-color: rgba(255, 190, 92, 0.6);
  background: rgba(255, 190, 92, 0.14);
  transform: translateY(-1px);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  list-style: none;
  margin: 0;
  padding: var(--sp-2);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  min-width: 130px;
  z-index: 200;
  flex-direction: column;
  gap: var(--sp-1);
}

.nav-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 10px;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown[data-open="true"] .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-menu a {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  border: none;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: rgba(127, 231, 255, 0.06);
  box-shadow: none;
  transform: none;
}

/* Primary nav CTA */
.nav-cta {
  color: #081018 !important;
  border-color: rgba(255, 179, 71, 0.48) !important;
  background: linear-gradient(90deg, var(--amber), #ffd28c) !important;
  box-shadow: var(--glow-amber) !important;
}

.nav-cta:hover {
  background: linear-gradient(90deg, #ffc05d, #ffe0af) !important;
  transform: translateY(-1px);
}

.site-nav .nav-try {
  color: var(--cyan);
  border-color: rgba(127, 231, 255, 0.42);
}

.site-nav .nav-try:hover,
.site-nav .nav-try:focus-visible,
.site-nav .nav-try.is-active {
  color: var(--text-strong);
  border-color: rgba(140, 236, 255, 0.68);
  background: rgba(20, 52, 76, 0.98);
  box-shadow: 0 0 0 1px rgba(140, 236, 255, 0.2), 0 0 24px rgba(45, 207, 255, 0.22);
}


/* ==========================================================================
   6. FOOTER
   ========================================================================== */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-6) 0 var(--sp-8);
  color: var(--muted);
  font-size: var(--text-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.site-footer a {
  color: var(--muted);
  transition: color 160ms ease;
}

.site-footer a:hover {
  color: var(--text);
}


/* ==========================================================================
   7. PAGE SECTIONS - Hero and story blocks
   ========================================================================== */

/* Shared section chrome */
.hero,
.page-hero,
.story-block,
.feature-grid,
.content-grid,
.comparison-grid,
.pricing-grid,
.docs-grid,
.docs-layout {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(11, 26, 39, 0.92), rgba(5, 12, 18, 0.9));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* Default section spacing */
.hero,
.page-hero,
.story-block,
.feature-grid,
.content-grid,
.comparison-grid,
.pricing-grid,
.docs-grid,
.docs-layout {
  margin-top: var(--sp-6);
}

/* Homepage hero */
.hero {
  padding: var(--sp-20) clamp(1.5rem, 5vw, 4rem) var(--sp-12);
  min-height: clamp(320px, 38vh, 460px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-home {
  min-height: clamp(340px, 40vh, 460px);
}

/* Page hero (interior pages) */
.page-hero {
  padding: var(--sp-12) clamp(1.5rem, 5vw, 4rem) var(--sp-10);
  display: flex;
  flex-direction: column;
}

.page-hero-tight {
  padding-top: var(--sp-8);
  padding-bottom: var(--sp-7);
}

.page-hero-with-cta {
  padding-top: var(--sp-12);
  padding-bottom: var(--sp-10);
}

.page-hero-roomy {
  padding-top: var(--sp-16);
  padding-bottom: var(--sp-14);
}

/* Hero copy */
.hero-copy {
  max-width: 44rem;
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-6);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--muted-strong);
}

.page-hero .hero-copy,
.hero-home .hero-copy {
  max-width: 84rem;
  font-size: var(--text-body);
  margin-top: var(--sp-12);
  margin-bottom: 0;
}

.hero-home .hero-rail {
  margin-top: var(--sp-14);
}

/* CTA group */
.cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

/* Story block */
.story-block {
  padding: var(--sp-12) clamp(1.5rem, 5vw, 2.75rem);
}

.story-block-home {
  padding-top: var(--sp-10);
  padding-bottom: var(--sp-10);
}

.story-copy {
  max-width: 88rem;
}

/* Eyebrow / kicker - story-blocks and page heroes only */
.eyebrow,
.story-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  font-family: var(--type-base);
  font-size: var(--text-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.eyebrow::before,
.story-kicker::before {
  content: "";
  width: 2rem;
  height: 1px;
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--amber), transparent);
}


/* ==========================================================================
   8. GRID LAYOUTS
   ========================================================================== */

.feature-grid,
.content-grid,
.comparison-grid,
.pricing-grid,
.docs-grid,
.docs-layout {
  display: grid;
  gap: var(--sp-5);
  padding: var(--sp-6);
}

/* Column configurations */
.feature-grid,
.comparison-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-grid-home {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.docs-grid,
.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Sub-element grids (inside sections, not standalone sections) */
.hero-rail,
.modes-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5);
}

.docs-layout {
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.9fr);
  align-items: start;
}

.content-grid-duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-grid-trio {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-grid-quad {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.docs-grid-index {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-access-grid {
  grid-template-columns: 0.95fr 1.1fr 0.95fr;
  align-items: stretch;
  padding-top: var(--sp-8);
  padding-bottom: var(--sp-8);
}

.pricing-details-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Docs aside */
.docs-aside {
  display: grid;
  gap: var(--sp-5);
  align-content: start;
}


/* ==========================================================================
   9. CARDS
   ========================================================================== */

.feature-card,
.content-card,
.comparison-card,
.pricing-card,
.docs-card,
.docs-article,
.docs-note {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--sp-7);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(11, 28, 41, 0.98), rgba(6, 15, 24, 0.88));
  box-shadow: var(--shadow-card);
}

/* Card heading */
.feature-card h2,
.content-card h2,
.comparison-card h2,
.pricing-card h2,
.docs-card h2,
.docs-note h2 {
  font-size: var(--text-card);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-strong);
  margin-bottom: var(--sp-3);
}

/* docs-article gets title-size h2 since it's a full article, not a card */
.docs-article h2 {
  font-size: var(--text-title);
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
}

.docs-article h2:first-child {
  margin-top: 0;
}

.docs-article h3 {
  font-size: var(--text-card);
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-3);
}

/* Card body */
.feature-card p,
.content-card p,
.comparison-card p,
.pricing-card p,
.docs-card p,
.docs-article p,
.docs-note p {
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: var(--sp-4);
}

.feature-card p:last-child,
.content-card p:last-child,
.comparison-card p:last-child,
.pricing-card p:last-child,
.docs-card p:last-child,
.docs-article p:last-child,
.docs-note p:last-child {
  margin-bottom: 0;
}

/* Accent card variant - amber glow only, same surface as other cards */
.comparison-card-accent,
.pricing-card-featured {
  box-shadow: var(--glow-amber);
}

.pricing-card-featured {
  transform: translateY(-0.625rem) scale(1.03);
  z-index: 1;
}

/* Pricing card footer */
.pricing-card-footer {
  margin-top: auto;
  padding-top: var(--sp-6);
  text-align: center;
  color: var(--muted-strong);
}

/* Card hover modifiers - opt in only for linked cards */
.card-lift {
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.card-lift:hover {
  transform: translateY(-0.125rem);
}

.card-glow-cyan {
  transition: box-shadow 160ms ease;
}

.card-glow-cyan:hover {
  box-shadow: var(--glow-cyan);
}

.card-glow-amber {
  transition: box-shadow 160ms ease;
}

.card-glow-amber:hover {
  box-shadow: var(--glow-amber);
}

/* Combine lift with glow correctly */
.card-lift.card-glow-cyan,
.card-lift.card-glow-amber {
  transition: transform 160ms ease, box-shadow 160ms ease;
}

/* Docs index navigation cards: subtle button affordance, scoped away from packs and content cards. */
.docs-nav-grid > a.docs-card {
  isolation: isolate;
  min-height: 100%;
  padding-right: calc(var(--sp-7) + 2.25rem);
  background:
    linear-gradient(135deg, rgba(45, 207, 255, 0.1), transparent 38%),
    rgba(9, 24, 36, 0.98);
  border: 1px solid rgba(140, 236, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 12px 28px rgba(0, 0, 0, 0.18);
}

.docs-nav-grid > a.docs-card::after {
  content: ">";
  position: absolute;
  right: var(--sp-5);
  bottom: var(--sp-5);
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  border: 1px solid rgba(140, 236, 255, 0.34);
  background: rgba(45, 207, 255, 0.08);
  color: var(--cyan);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.docs-nav-grid > a.docs-card:hover,
.docs-nav-grid > a.docs-card:focus-visible {
  transform: translateY(-0.2rem);
  border-color: rgba(140, 236, 255, 0.46);
  background:
    linear-gradient(135deg, rgba(45, 207, 255, 0.12), transparent 44%),
    rgba(12, 31, 45, 0.94);
  box-shadow: 0 0 0 1px rgba(140, 236, 255, 0.12), 0 18px 44px rgba(0, 0, 0, 0.24), var(--glow-cyan);
  outline: none;
}

.docs-nav-grid > a.docs-card:hover::after,
.docs-nav-grid > a.docs-card:focus-visible::after {
  transform: translateX(0.15rem);
  border-color: rgba(140, 236, 255, 0.6);
  background: rgba(45, 207, 255, 0.14);
}

/* Hero rail cards */
.hero-rail-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--sp-6);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(10, 25, 37, 0.96), rgba(6, 15, 24, 0.88));
  box-shadow: var(--shadow-card);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.hero-rail-card:hover {
  transform: translateY(-0.125rem);
  box-shadow: var(--glow-amber);
}

.hero-rail-card h2 {
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-2);
}

.hero-rail-body {
  flex: 1;
  padding: var(--sp-5) 0;
}

.hero-rail-card p {
  color: var(--muted-strong);
  font-size: var(--text-body);
  line-height: 1.7;
  margin: 0;
}

.hero-rail-btn {
  margin-top: auto;
  width: fit-content;
}

/* Mode cards */
.mode-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-5) var(--sp-6);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 26, 38, 0.95), rgba(5, 13, 20, 0.88));
}

.mode-label {
  font-size: var(--text-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-strong);
}

.mode-desc {
  font-size: var(--text-label);
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* Status chips */
.mode-status {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.625rem;
  border-radius: var(--radius-pill);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  width: fit-content;
  border: 1px solid transparent;
}

.mode-status-live {
  color: var(--status-live);
  background: var(--status-live-bg);
  border-color: rgba(114, 225, 185, 0.28);
}

.mode-status-dev {
  color: var(--status-dev);
  background: var(--status-dev-bg);
  border-color: rgba(99, 185, 255, 0.26);
}

.mode-status-planned {
  color: var(--status-planned);
  background: var(--status-planned-bg);
  border-color: rgba(180, 160, 230, 0.22);
}


/* ==========================================================================
   10. BUTTONS
   ========================================================================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 var(--sp-6);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--type-base);
  font-size: var(--text-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, opacity 160ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: 2px solid rgba(127, 231, 255, 0.5);
  outline-offset: 3px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #081018;
  background: linear-gradient(90deg, var(--amber), #ffd28c);
  border-color: rgba(255, 179, 71, 0.48);
  box-shadow: var(--glow-amber);
}

.btn-primary:hover {
  background: linear-gradient(90deg, #ffc05d, #ffe0af);
  border-color: rgba(255, 210, 140, 0.6);
}

.btn-secondary {
  color: var(--text);
  background: linear-gradient(180deg, rgba(8, 21, 32, 0.9), rgba(5, 12, 18, 0.82));
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  border-color: rgba(127, 231, 255, 0.5);
  box-shadow: var(--glow-cyan);
}


/* ==========================================================================
   11. COMPONENTS
   ========================================================================== */

/* Docs link - inline text CTA */
.docs-link {
  display: inline-block;
  margin-top: auto;
  padding-top: var(--sp-4);
  color: var(--cyan);
  font-size: var(--text-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color 160ms ease;
}

.docs-link:hover {
  color: var(--text);
}

/* Next-steps sidebar links with glow on hover */
.docs-next-link {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 160ms ease, text-shadow 160ms ease;
}

.docs-next-link:hover {
  color: var(--text-strong);
  text-shadow: 0 0 10px rgba(140, 236, 255, 0.7);
}

/* Accordion for client setup sections */
.docs-accordion {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 8px;
  background: var(--bg-mid);
}

.docs-accordion summary {
  list-style: none;
  padding: 12px 16px;
  cursor: pointer;
  color: var(--cyan);
  font-size: 0.95rem;
  font-weight: 500;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.docs-accordion summary::before {
  content: '+';
  font-size: 1rem;
  color: var(--muted-strong);
  transition: transform 160ms ease;
  display: inline-block;
  width: 14px;
  text-align: center;
}

.docs-accordion[open] summary::before {
  content: '-';
}

.docs-accordion summary:hover {
  color: var(--text-strong);
  text-shadow: 0 0 8px rgba(140, 236, 255, 0.5);
}

.docs-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

.docs-card .story-kicker {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  margin-bottom: 0;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  opacity: 0.5;
}

.docs-card .story-kicker::before {
  display: none;
}

.docs-accordion-body {
  padding: 4px 16px 16px 16px;
  border-top: 1px solid var(--line-soft);
}

/* Detail list */
.detail-list {
  padding-left: var(--sp-5);
  margin-top: var(--sp-4);
  color: var(--muted);
  font-size: var(--text-body);
  line-height: 1.7;
}

.detail-list li + li {
  margin-top: var(--sp-2);
}

/* Docs callout - amber tinted info block */
.docs-callout {
  margin: var(--sp-7) 0;
  padding: var(--sp-5) var(--sp-6);
  border: 1px solid rgba(255, 179, 71, 0.24);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(36, 24, 11, 0.78), rgba(8, 18, 28, 0.82));
  box-shadow: inset 0 0 0 1px rgba(255, 179, 71, 0.05);
}

/* Code block */
.code-block {
  margin: var(--sp-6) 0 var(--sp-8);
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(5, 15, 24, 0.72);
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  white-space: pre-wrap;
}

.code-block code {
  font-family: var(--type-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text);
  background: none;
  padding: 0;
  border-radius: 0;
}

/* Table */
.docs-table-wrap {
  margin-top: var(--sp-6);
  padding: var(--sp-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11, 26, 39, 0.92), rgba(5, 12, 18, 0.9));
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 48rem;
}

.docs-table th,
.docs-table td {
  padding: var(--sp-4);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(109, 170, 209, 0.14);
}

.docs-table th {
  color: var(--cyan);
  font-size: var(--text-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.docs-table td {
  color: var(--muted);
  font-size: var(--text-body);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: var(--sp-3);
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(5, 15, 24, 0.46);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: var(--sp-5) 3.375rem var(--sp-5) var(--sp-5);
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--text);
  position: relative;
  transition: color 160ms ease;
}

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

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: var(--sp-5);
  top: 50%;
  transform: translateY(-50%);
  color: var(--amber);
  font-size: 1.25rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-answer {
  margin: 0 var(--sp-4) var(--sp-4);
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(8, 20, 31, 0.78);
}

.faq-item[open] .faq-answer {
  border-color: rgba(127, 231, 255, 0.3);
  box-shadow: var(--glow-cyan);
  animation: faq-open 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-answer p {
  margin: 0;
  color: var(--muted);
}

@keyframes faq-open {
  from {
    opacity: 0;
    transform: translateY(-0.75rem) scaleY(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

/* Modes strip */
.modes-strip {
  margin-top: var(--sp-8);
}

.modes-eyebrow {
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-4);
}

/* Waitlist form */
.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.waitlist-input-row {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.waitlist-input {
  flex: 1;
  min-width: 13.75rem;
  padding: var(--sp-3) var(--sp-5);
  background: rgba(7, 20, 31, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: var(--text-body);
  font-family: var(--type-base);
  outline: none;
  transition: border-color 160ms ease;
}

.waitlist-input:focus {
  border-color: rgba(127, 231, 255, 0.4);
}

.waitlist-input::placeholder {
  color: var(--muted);
}

.waitlist-input-sm {
  min-width: 11.25rem;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-label);
}

.waitlist-status {
  font-size: var(--text-label);
  color: var(--muted);
  min-height: 1.125rem;
  margin: 0;
}

.waitlist-status.ok  { color: var(--status-ok); }
.waitlist-status.err { color: var(--status-error); }

/* Media blocks */
.media-expand-link {
  display: block;
  margin: var(--sp-6) 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: zoom-in;
}

.media-card-gif {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  transition: opacity 160ms ease;
}

.media-expand-link:hover .media-card-gif {
  opacity: 0.85;
}

.media-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 2px dashed rgba(116, 185, 224, 0.25);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(116, 185, 224, 0.02);
  margin: var(--sp-6) 0;
  color: rgba(116, 185, 224, 0.4);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: var(--sp-4);
}

.media-with-text {
  display: flex;
  gap: var(--sp-8);
  align-items: center;
  margin: var(--sp-6) 0;
}

.media-slot {
  flex: 0 0 62%;
  aspect-ratio: 16 / 9;
  border: 2px dashed rgba(116, 185, 224, 0.25);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(116, 185, 224, 0.02);
  color: rgba(116, 185, 224, 0.4);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: var(--sp-3);
}

.media-caption {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.media-caption h3 {
  font-size: var(--text-card);
  font-weight: 600;
  color: var(--text-strong);
  margin: 0;
}

.media-caption p {
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--muted-strong);
  margin: 0;
}


/* ==========================================================================
   12. REDUCED MOTION
   ========================================================================== */

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


/* ==========================================================================
   13. RESPONSIVE - Tablet (960px)
   ========================================================================== */

@media (max-width: 960px) {
  .feature-grid-home,
  .docs-grid-index,
  .pricing-grid,
  .docs-grid,
  .docs-layout,
  .pricing-access-grid,
  .pricing-details-grid {
    grid-template-columns: 1fr;
  }

  .content-grid-quad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pricing-card-featured {
    transform: none;
    filter: none;
  }

  .pricing-card-featured:hover {
    transform: translateY(-0.25rem);
  }
}


/* ==========================================================================
   14. RESPONSIVE - Mobile (760px)
   ========================================================================== */

@media (max-width: 760px) {
  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header {
    gap: var(--sp-4);
  }

  .nav-toggle {
    display: inline-flex;
    position: absolute;
    top: var(--sp-6);
    right: 0;
  }

  .brand {
    max-width: calc(100% - 4.5rem);
  }

  .site-nav {
    display: none;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-2);
    padding: var(--sp-4);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel-strong);
    box-shadow: var(--shadow);
  }

  .site-header.nav-open .site-nav {
    display: grid;
  }

  .site-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.875rem;
    padding: var(--sp-2) var(--sp-3);
    text-align: center;
  }

  .site-nav .nav-cta {
    grid-column: 1 / -1;
  }

  .site-nav .nav-dropdown {
    grid-column: 1 / -1;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
  }

  .site-nav .nav-dropdown-trigger {
    display: inline-flex;
    width: 100%;
    justify-content: center;
  }

  .site-nav .nav-dropdown-menu {
    display: none;
    position: static;
    width: 100%;
    flex-direction: column;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    min-width: 0;
  }

  .site-nav .nav-dropdown[data-open="true"] .nav-dropdown-menu {
    display: flex;
  }

  .site-nav .nav-dropdown-menu li {
    display: block;
    list-style: none;
  }

  .site-nav .nav-dropdown-menu a {
    min-height: 2.875rem;
    justify-content: center;
    text-align: center;
  }

  .feature-grid,
  .content-grid,
  .comparison-grid,
  .pricing-grid,
  .docs-grid,
  .docs-layout,
  .hero-rail,
  .modes-row {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2.8rem, 16vw, 4.6rem);
  }

  .hero,
  .page-hero,
  .story-block {
    border-radius: var(--radius-md);
    padding-left: var(--sp-6);
    padding-right: var(--sp-6);
  }

  .hero {
    padding-top: var(--sp-12);
    padding-bottom: var(--sp-8);
  }

  .page-hero {
    padding-top: var(--sp-8);
    padding-bottom: var(--sp-6);
  }

  .feature-card,
  .content-card,
  .comparison-card,
  .pricing-card,
  .docs-card,
  .docs-article,
  .docs-note {
    padding: var(--sp-6);
  }

  .media-with-text {
    flex-direction: column;
  }

  .media-slot {
    flex: none;
    width: 100%;
  }

  .site-footer-links {
    gap: var(--sp-3);
  }
}

/* Pack chips - source/dataset tags used to show which packs answer a query */
.pack-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}

.pack-chip {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--cyan-soft);
  color: var(--cyan);
  font-family: var(--type-base);
  font-size: var(--text-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.pack-chip code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font-family: var(--type-mono);
  font-size: 0.85em;
  letter-spacing: 0.04em;
}

.pack-chip-key {
  background: var(--amber-soft);
  border-color: rgba(255, 190, 92, 0.32);
  color: var(--amber);
}

.pack-chip-arrow {
  color: var(--muted);
  font-family: var(--type-mono);
  font-size: var(--text-label);
  padding: 0 var(--sp-1);
}

/* Research sessions - extends faq-item with a richer summary */
.research-sessions {
  margin-top: var(--sp-6);
}

.research-session > summary {
  padding: var(--sp-5) 3.375rem var(--sp-5) var(--sp-5);
  display: block;
}

.research-session .session-question {
  display: block;
  font-size: var(--text-card);
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-transform: none;
}

.research-session .session-chips {
  margin-top: var(--sp-3);
}

.research-session .faq-answer {
  color: var(--muted-strong);
}

/* Closing hero variant - same as page-hero but used as a final CTA block */
.research-close h2 {
  font-family: var(--type-header);
  font-weight: 700;
  font-size: var(--text-headline);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 var(--sp-5);
  color: var(--text-strong);
}


/* ==========================================================================
   17. CATALOG BROWSER
   --------------------------------------------------------------------------
   Shared archetype for every index-over-entities page: /packs, /feeds,
   /geometry, /research/projects. Structure is always the same - a filter bar,
   optional collapsible sections, and a responsive grid of entity cards.

   Page templates should contribute content, not chrome. If a page needs a
   visual variant, add a modifier here rather than a local <style> block.
   ========================================================================== */

/* Browser shell */
.catalog-browser {
  max-width: none;
  margin-top: 24px;
  padding: 0;
}

.catalog-library-body {
  margin-top: 20px;
  padding-inline: 2px;
}

/* Filter bar. Base is layout only; the two modifiers carry panel chrome. */
.catalog-bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.catalog-bar-panel {
  padding: 18px 22px 20px;
  border-top: 1px solid var(--line-soft);
  background: var(--bar-face);
}

.catalog-bar-boxed {
  padding: 18px 22px 20px;
  border: 1px solid rgba(116, 185, 224, 0.12);
  border-radius: 16px;
  background: var(--bar-face);
}

.catalog-search-wrap,
.catalog-filter-block {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.catalog-control-label {
  color: rgba(167, 191, 206, 0.58);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.catalog-search-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  padding: 10px 15px;
  background: var(--input-face);
  border: 1px solid rgba(116, 185, 224, 0.22);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.catalog-search-input::placeholder {
  color: rgba(140, 190, 230, 0.4);
}

.catalog-search-input:focus {
  border-color: rgba(110, 196, 255, 0.45);
}

/* Category pills */
.catalog-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.catalog-pill {
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(116, 185, 224, 0.2);
  background: var(--pill-face);
  color: rgba(167, 191, 206, 0.78);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalog-pill:hover {
  border-color: rgba(110, 196, 255, 0.4);
  color: var(--blue-bright);
}

.catalog-pill.active {
  background: var(--blue-soft);
  border-color: var(--blue-line);
  color: var(--blue);
}

.catalog-pill-count {
  margin-left: 6px;
  color: currentColor;
  font-size: 0.9em;
  opacity: 0.58;
}

/* Result count line above the grid */
.catalog-count {
  margin-bottom: 20px;
  font-size: 12px;
  color: rgba(167, 191, 206, 0.56);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-height: 16px;
  position: relative;
  z-index: 1;
}

/* Collapsible section wrapper (details/summary) */
.catalog-section {
  margin-top: 20px;
  border: 1px solid rgba(116, 185, 224, 0.14);
  border-radius: 16px;
  overflow: hidden;
}

.catalog-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: var(--head-face);
  transition: background 0.12s;
}

.catalog-section-head::-webkit-details-marker {
  display: none;
}

.catalog-section-head:hover {
  background: var(--head-face-hover);
}

.catalog-section-label {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.catalog-section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d8eaf8;
}

.catalog-section-note {
  font-size: 12px;
  color: rgba(167, 191, 206, 0.45);
}

.catalog-section-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.catalog-section-count {
  font-size: 11px;
  color: rgba(167, 191, 206, 0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.catalog-section-toggle {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(140, 190, 230, 0.4);
  font-size: 12px;
  transition: transform 0.18s;
}

.catalog-section-toggle::before {
  content: "+";
  display: block;
  line-height: 1;
}

details[open] > .catalog-section-head .catalog-section-toggle::before {
  content: "-";
}

.catalog-section-body {
  padding: 20px;
  border-top: 1px solid var(--line-soft);
}

/* Card grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  position: relative;
  z-index: 1;
}

.catalog-grid-wide {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.catalog-loading {
  color: rgba(110, 196, 255, 0.4);
  font-size: 14px;
  grid-column: 1/-1;
}

.catalog-empty {
  grid-column: 1/-1;
  padding: 40px 0;
  text-align: center;
  color: rgba(140, 190, 230, 0.4);
  font-size: 14px;
}

/* Entity card */
.catalog-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  box-sizing: border-box;
  padding: 22px;
  background: var(--card-face);
  border: 1px solid var(--card-line);
  border-radius: var(--radius-md);
  box-shadow: var(--card-inset);
  overflow: hidden;
  position: relative;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.catalog-card[hidden] {
  display: none !important;
}

.catalog-card:hover,
.catalog-card:focus-within {
  transform: translateY(-2px);
  border-color: var(--card-line-hover);
  background: var(--card-face-hover);
}

/* Reserve headroom for the wrapping badge row these cards use */
.catalog-card-tall {
  min-height: 280px;
  gap: 12px;
  padding-top: 60px;
}

/* Badges tucked into the card's top-right corner. Offsets match the card's own
   22px padding so the first badge shares a top edge with the title and the
   stack lines up with the card's right content edge - inset them further and
   the badges read as floating above a card that is taller than it needs to be. */
.catalog-card-badges {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: calc(100% - 44px);
}

/* Stacked variant: one badge per line, right-aligned, filling from the top.
   Nothing is pinned to a slot, so a card carrying a single badge still sits
   at the top of the corner rather than below empty rows. */
.catalog-card-badges-stack {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-end;
}

/* Stacked badges are read as words rather than codes, so they keep the casing
   they were written with - "Download", "Live", "MCP" - instead of being
   shouted. Inline chip rows elsewhere on a card stay uppercase. */
.catalog-card-badges-stack .catalog-badge {
  text-transform: none;
  letter-spacing: 0.04em;
}

/* Cards using the stack keep their text clear of the badge column instead of
   reserving headroom above it, so the stack costs no vertical space. */
.catalog-card-badged {
  --badge-gutter: 4.75rem;
}

.catalog-card-badged .catalog-card-header,
.catalog-card-badged .catalog-card-head,
.catalog-card-badged > .catalog-card-title,
.catalog-card-badged .catalog-source-row {
  padding-right: var(--badge-gutter);
}

.catalog-card-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  min-height: 0;
}

.catalog-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-card-header {
  display: block;
}

/* Inline row of badges/chips inside a card body (not the footer) */
.catalog-chip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.catalog-card-title {
  margin: 0;
}

/* The card title link owns the whole-card hit area via ::before. Any other
   interactive element inside the card needs position/z-index above it -
   .catalog-card-main and the link classes below already do. */
.catalog-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.catalog-card-name-lg {
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0.02em;
}

.catalog-card-name::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  z-index: 0;
}

.catalog-card-name:hover {
  color: var(--blue-bright);
}

.catalog-card-desc {
  margin: 0;
  font-size: 13px;
  color: rgba(167, 191, 206, 0.78);
  line-height: 1.5;
  flex: 1;
  position: relative;
  z-index: 1;
}

.catalog-card-desc-roomy {
  color: rgba(188, 211, 226, 0.72);
  line-height: 1.65;
}

/* Source attribution row */
.catalog-source-row {
  display: grid;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.catalog-source-kicker {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(167, 191, 206, 0.5);
}

.catalog-source-link,
.catalog-source-label {
  color: var(--blue-text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
  position: relative;
  z-index: 1;
}

.catalog-source-label {
  color: rgba(200, 232, 255, 0.86);
}

.catalog-source-link:hover {
  color: var(--blue-bright);
}

.catalog-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(116, 185, 224, 0.09);
}

.catalog-source-links a {
  font-size: 11px;
  color: rgba(99, 185, 255, 0.88);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.catalog-source-links a:hover {
  color: var(--blue-bright);
}

/* Key/value metadata rows inside a card */
.catalog-card-meta {
  display: grid;
  gap: 8px;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.catalog-meta-row {
  display: grid;
  grid-template-columns: minmax(86px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}

.catalog-meta-row span {
  color: rgba(167, 191, 206, 0.48);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.catalog-meta-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: rgba(237, 244, 251, 0.84);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 500;
}

/* Card footer */
.catalog-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.catalog-card-footer-split {
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: nowrap;
}

.catalog-card-note {
  font-size: 11px;
  color: rgba(200, 232, 255, 0.72);
  line-height: 1.45;
}

.catalog-card-meta-line {
  font-size: 11px;
  color: rgba(167, 191, 206, 0.56);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalog-card-link {
  margin-left: auto;
  font-size: 12px;
  color: var(--blue);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.catalog-card-link:hover {
  color: var(--blue-bright);
}

.catalog-card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-left: auto;
}

/* Badges. Base plus status modifiers shared across catalog surfaces. */
.catalog-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(116, 185, 224, 0.18);
}

.catalog-badge-sm {
  padding: 3px 8px;
  font-size: 9px;
  letter-spacing: 0.12em;
  pointer-events: auto;
}

.catalog-badge-ok {
  color: var(--status-live);
  background: rgba(43, 125, 95, 0.18);
  border-color: rgba(114, 225, 185, 0.28);
}

.catalog-badge-good {
  color: #9ce7bd;
  background: rgba(96, 205, 151, 0.11);
  border-color: rgba(96, 205, 151, 0.28);
}

.catalog-badge-live {
  color: #a9f0ba;
  background: rgba(86, 214, 120, 0.1);
  border-color: rgba(86, 214, 120, 0.32);
}

/* Same amber as the Modes/Data nav dropdown triggers. */
.catalog-badge-download {
  color: var(--amber);
  background: rgba(255, 190, 92, 0.14);
  border-color: rgba(255, 190, 92, 0.42);
}

.catalog-badge-warn {
  color: #ffd166;
  background: rgba(161, 106, 16, 0.2);
  border-color: rgba(255, 207, 107, 0.26);
}

.catalog-badge-blocked {
  color: #ff9b8f;
  background: rgba(125, 47, 43, 0.18);
  border-color: rgba(255, 155, 143, 0.24);
}

.catalog-badge-neutral {
  color: rgba(200, 232, 255, 0.82);
  background: rgba(99, 185, 255, 0.08);
  border-color: rgba(99, 185, 255, 0.18);
}

.catalog-badge-info {
  background: var(--blue-soft);
  border-color: rgba(99, 185, 255, 0.3);
  color: #9fd7ff;
}

/* Stage badge the catalog deliberately does not surface */
.catalog-badge-ready {
  display: none;
}

.catalog-badge-soft {
  background: rgba(167, 191, 206, 0.08);
  border-color: rgba(167, 191, 206, 0.18);
  color: rgba(188, 211, 226, 0.78);
}

/* Purple - MCP publication on /packs, forecast feeds on /feeds. One rule so
   the two surfaces cannot drift to different purples. */
.catalog-badge-mcp,
.catalog-badge-forecast {
  color: #d3bfff;
  background: rgba(163, 123, 255, 0.12);
  border-color: rgba(163, 123, 255, 0.32);
}

.catalog-badge-quiet {
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(99, 185, 255, 0.88);
  background: var(--blue-faint);
  border-color: rgba(99, 185, 255, 0.14);
}

/* Inline action button used inside cards (routes into an app surface) */
.catalog-card-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(99, 185, 255, 0.52);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(99, 185, 255, 0.24), rgba(41, 111, 164, 0.22));
  box-shadow: inset 0 1px 0 rgba(220, 243, 255, 0.12), 0 5px 15px rgba(0, 0, 0, 0.14);
  color: #d7f0ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.catalog-card-button:hover {
  background: linear-gradient(180deg, rgba(116, 205, 255, 0.34), rgba(48, 128, 189, 0.3));
  border-color: rgba(157, 224, 255, 0.76);
  color: #fff;
  transform: translateY(-1px);
}

/* Full-width promo link to a sibling catalog surface */
.catalog-crosslink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding: 22px 26px;
  background: var(--card-face);
  border: 1px solid rgba(116, 185, 224, 0.18);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}

.catalog-crosslink:hover {
  transform: translateY(-2px);
  border-color: rgba(116, 185, 224, 0.34);
  background: var(--card-face-hover);
}

.catalog-crosslink-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.catalog-crosslink-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(167, 191, 206, 0.6);
}

.catalog-crosslink-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.catalog-crosslink-arrow {
  font-size: 28px;
  color: rgba(99, 185, 255, 0.7);
  line-height: 1;
}

/* Marker hero: an unordered side rail used for compact orientation and proof. */
.catalog-marker-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.95fr);
  gap: var(--sp-8);
  align-items: center;
  min-height: 20rem;
  padding-top: var(--sp-6);
  padding-bottom: var(--sp-8);
}

.catalog-marker-copy {
  max-width: 44rem;
  padding-top: var(--sp-12);
}

.catalog-marker-hero .catalog-marker-copy > .eyebrow {
  position: absolute;
  top: calc(var(--sp-8) + var(--sp-3));
  left: clamp(1.5rem, 5vw, 4rem);
  margin-bottom: 0;
}

.catalog-marker-panel {
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-8);
}

.catalog-markers {
  display: grid;
}

.catalog-marker {
  display: grid;
  grid-template-columns: var(--sp-4) minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-3) 0;
}

.catalog-marker::before {
  content: "";
  width: var(--sp-4);
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
}

.catalog-marker + .catalog-marker {
  border-top: 1px solid var(--line-soft);
}

.catalog-marker p {
  margin: 0;
}

.catalog-marker strong,
.catalog-marker small {
  display: block;
}

.catalog-marker strong {
  color: var(--text-strong);
  font-size: var(--text-body);
  line-height: 1.3;
}

.catalog-marker small {
  margin-top: var(--sp-1);
  color: var(--muted);
  font-size: var(--text-label);
  line-height: 1.5;
}

.catalog-marker-link {
  grid-template-columns: var(--sp-4) minmax(0, 1fr) auto;
  margin-inline: calc(var(--sp-3) * -1);
  padding-inline: var(--sp-3);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.catalog-marker-link strong,
.catalog-marker-action {
  color: var(--cyan);
}

.catalog-marker-action {
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.catalog-marker-link:hover,
.catalog-marker-link:focus-visible {
  background: var(--cyan-soft);
  box-shadow: var(--glow-cyan);
  outline: none;
}

.catalog-marker-link:hover strong,
.catalog-marker-link:focus-visible strong {
  color: var(--text-strong);
}

.catalog-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.catalog-hero-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 100%;
  padding: 18px 18px 20px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(120, 208, 255, 0.08), rgba(120, 208, 255, 0) 34%),
    linear-gradient(180deg, rgba(9, 22, 35, 0.72), rgba(5, 13, 21, 0.52));
  border: 1px solid rgba(116, 185, 224, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.catalog-hero-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(126, 206, 255, 0.7);
}

.catalog-hero-card strong {
  color: #edf6ff;
  font-size: 14px;
  line-height: 1.65;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Stat variant - big number over a label, centered */
.catalog-hero-stat {
  gap: 8px;
  min-height: 104px;
  align-content: center;
  padding: 18px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(120, 208, 255, 0.08), rgba(120, 208, 255, 0) 34%),
    rgba(6, 16, 25, 0.62);
  border-color: rgba(116, 185, 224, 0.14);
  box-shadow: none;
}

.catalog-hero-stat span {
  color: #edf6ff;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
}

.catalog-hero-stat strong {
  color: rgba(167, 191, 206, 0.7);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Three-up reference link row below a catalog */
.catalog-links-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.catalog-links-row a {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(116, 185, 224, 0.14);
  border-radius: 16px;
  background: rgba(7, 18, 28, 0.7);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.catalog-links-row a:hover {
  border-color: var(--card-line-hover);
  background: rgba(10, 25, 38, 0.86);
}

.catalog-links-row span {
  color: rgba(110, 196, 255, 0.7);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.catalog-links-row strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
}

@media (max-width: 980px) {
  .catalog-marker-hero {
    grid-template-columns: 1fr;
  }

  .catalog-marker-panel {
    padding: var(--sp-6) 0 0;
    border-top: 1px solid var(--line-soft);
  }

  .catalog-hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .catalog-marker-hero .catalog-marker-copy > .eyebrow {
    left: var(--sp-6);
  }
}

@media (max-width: 860px) {
  .catalog-links-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-section-label {
    display: grid;
    gap: 6px;
  }
}

@media (max-width: 600px) {
  .catalog-hero-grid,
  .catalog-links-row {
    grid-template-columns: 1fr;
  }

  .catalog-grid,
  .catalog-grid-wide {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-section-note {
    display: none;
  }

  .catalog-section-head {
    padding: 14px 16px;
  }

  .catalog-section-body {
    padding: 14px;
  }

  .catalog-bar-panel,
  .catalog-bar-boxed {
    padding: 16px;
  }

  .catalog-meta-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 430px) {
  .catalog-card-footer-split {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-card-actions {
    align-items: flex-start;
    margin-left: 0;
  }
}


/* ==========================================================================
   18. RESEARCH PROJECT PAGES
   --------------------------------------------------------------------------
   Shared archetype for /research/projects and the project write-ups under it.
   These pages exist to show the evidence, so they deliberately reuse the
   .docs-* document chrome and add only what a project page needs on top:
   the report viewer (tabs + embedded artifact), method lists, and process
   cards.

   Like the docs pages, project pages should carry no <style> block of their
   own. If a project needs a new visual element, add it here.
   ========================================================================== */

/* Back link in a project hero - opts out of the .docs-link arrow chrome */
.project-hero-back-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.project-hero-back-link::before {
  content: none;
  background: none;
}

/* Numbered/bulleted method steps inside a project article */
.project-method-list {
  margin: 1rem 0 1.3rem;
  padding-left: 1.35rem;
}

.project-method-list li + li {
  margin-top: 0.8rem;
}

/* Report viewer shell - wraps the tab strip and the artifact frame */
.project-report-shell {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(10, 26, 38, 0.94), rgba(5, 13, 20, 0.88));
  overflow: hidden;
}

.project-report-pending {
  padding: var(--sp-7);
}

.project-report-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px var(--sp-6);
  border-bottom: 1px solid var(--line-soft);
}

.project-report-tab {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  padding: 8px 14px;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.project-report-tab:hover {
  border-color: var(--cyan);
}

.project-report-tab.is-active {
  border-color: var(--cyan);
  background: rgba(102, 221, 255, 0.14);
  color: var(--cyan);
}

/* Embedded report artifact. Light background is intentional - the reports are
   authored as documents, not as part of the dark site chrome. */
.project-report-frame {
  width: 100%;
  min-height: 1180px;
  border: 0;
  background: rgba(255, 255, 255, 0.96);
}

/* Server-rendered markdown report shown inline instead of in a frame */
.project-report-markdown {
  padding: var(--sp-7);
}

.project-report-markdown h1,
.project-report-markdown h2,
.project-report-markdown h3,
.project-report-markdown h4 {
  margin-top: 1.4em;
}

.project-report-markdown h1:first-child,
.project-report-markdown h2:first-child,
.project-report-markdown h3:first-child,
.project-report-markdown h4:first-child {
  margin-top: 0;
}

.project-report-markdown p,
.project-report-markdown ul,
.project-report-markdown ol,
.project-report-markdown pre {
  margin: 0 0 1rem;
}

.project-report-markdown ul,
.project-report-markdown ol {
  padding-left: 1.4rem;
}

.project-report-markdown pre,
.project-report-markdown code {
  font-family: var(--type-mono);
}

.project-report-markdown pre {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  overflow-x: auto;
}

.project-report-markdown-table {
  overflow-x: auto;
  margin: 0 0 1rem;
}

.project-report-markdown-table table {
  width: 100%;
  border-collapse: collapse;
}

.project-report-markdown-table th,
.project-report-markdown-table td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.project-report-markdown-table th {
  color: var(--cyan);
}

.project-artifact-section {
  margin-top: var(--sp-8);
}

/* Process cards - the question -> corpus -> finding steps on method-heavy
   project pages. Amber-edged to read as method rather than as data. */
.project-process-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin: 1.2rem 0 1.4rem;
}

.project-process-card {
  border: 1px solid rgba(255, 190, 92, 0.34);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 8px;
  padding: 1rem;
}

.project-process-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.project-process-card p {
  margin: 0;
}

/* Simple spaced list used by the geometry packages write-up */
.project-package-list li + li {
  margin-top: 0.7rem;
}

/* Project index cards - amber-edged variant of the shared .docs-card so the
   projects grid reads as credibility work rather than reference docs. */
.projects-grid a.docs-card {
  border-color: rgba(255, 190, 92, 0.42);
  box-shadow: 0 0 0 1px rgba(255, 190, 92, 0.08), 0 0 24px -8px rgba(255, 179, 71, 0.28);
}

.projects-grid a.docs-card:hover {
  border-color: rgba(255, 190, 92, 0.7);
  box-shadow: var(--glow-amber);
}

.projects-grid a.docs-card .story-kicker {
  color: var(--amber);
}

/* Linked section headings inside a document article */
.docs-article h2 a {
  color: inherit;
  text-decoration: none;
  transition: color 120ms ease, text-shadow 120ms ease;
}

.docs-article h2 a:hover {
  color: var(--amber);
  text-shadow: 0 0 18px rgba(255, 190, 92, 0.28);
}

@media (max-width: 760px) {
  .project-report-frame {
    min-height: 780px;
  }
}


/* ==========================================================================
   19. ENTITY PROFILE
   --------------------------------------------------------------------------
   Shared archetype for the detail page under any catalog surface:
   /packs/{id}, /feeds/{id}, /geometry/{id}.

   Structure is always the same - a hero with metadata tags and CTAs, a main
   column of document blocks, and a sticky sidebar of key/value facts. These
   pages exist to show the data, so the chrome stays quiet and identical
   across all three.

   Page templates contribute content, not chrome. New visual elements go here.
   ========================================================================== */

/* --- Hero ---------------------------------------------------------------- */

.profile-back-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.profile-back-link::before {
  content: none;
  background: none;
}

.profile-back-link:hover {
  color: var(--profile-text-bright);
}

.profile-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.profile-hero-meta-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 14px;
}

.profile-hero-meta-cta .profile-meta-row {
  margin-top: 0;
}

.profile-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.profile-hero-subline {
  margin: 10px 0 0;
  color: rgba(99, 185, 255, 0.86);
  font-size: 14px;
  font-weight: 500;
}

/* --- Metadata tags ------------------------------------------------------- */

.profile-tag {
  background: rgba(99, 185, 255, 0.1);
  border: 1px solid rgba(99, 185, 255, 0.2);
  color: var(--blue);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
}

.profile-tag-ok {
  color: var(--status-live);
  background: rgba(43, 125, 95, 0.18);
  border-color: rgba(114, 225, 185, 0.28);
}

.profile-tag-warn {
  color: #ffcf6b;
  background: rgba(161, 106, 16, 0.2);
  border-color: rgba(255, 207, 107, 0.32);
}

.profile-tag-err {
  color: #ff9b8f;
  background: rgba(125, 47, 43, 0.18);
  border-color: rgba(255, 155, 143, 0.24);
}

/* --- Call-to-action buttons ---------------------------------------------- */

.profile-btn-map {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, rgba(255, 177, 59, 0.95), rgba(240, 150, 40, 0.95));
  color: #1c1306;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  transition: filter 0.15s;
}

.profile-btn-map:hover {
  filter: brightness(1.08);
}

.profile-btn-alt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(99, 185, 255, 0.12);
  border: 1px solid rgba(99, 185, 255, 0.4);
  border-radius: 8px;
  color: var(--profile-link);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.profile-btn-alt:hover {
  background: rgba(99, 185, 255, 0.2);
  color: var(--profile-text-bright);
}

/* Small inline map link inside a source block */
.profile-btn-map-sm {
  display: inline-flex;
  align-items: center;
  margin: 2px 0 12px;
  background: rgba(255, 177, 59, 0.12);
  border: 1px solid rgba(255, 177, 59, 0.4);
  color: #ffc878;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.profile-btn-map-sm:hover {
  background: rgba(255, 177, 59, 0.22);
  color: #ffe2b3;
}

/* --- Layout -------------------------------------------------------------- */

.profile-layout {
  width: 100%;
  margin: 0 auto;
  padding: 0 0 60px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}

.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 24px;
}

.profile-main {
  display: grid;
  gap: 20px;
  min-width: 0;
}

/* --- Sidebar cards ------------------------------------------------------- */

.profile-card {
  background: var(--profile-panel);
  border: 1px solid var(--profile-line);
  border-radius: 10px;
  padding: 16px 18px;
}

.profile-card h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--profile-label);
  margin: 0 0 6px;
}

.profile-grid {
  display: grid;
  gap: 10px;
}

.profile-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.profile-row > span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--profile-label);
}

.profile-value {
  font-size: 14px;
  color: var(--profile-value);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.profile-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--blue);
  text-decoration: none;
}

.profile-link:hover {
  color: var(--profile-value);
}

/* Flush variant - used where the link is the card's only content */
.profile-link-flush {
  margin-top: 0;
  font-size: 13px;
}

/* --- Document blocks ----------------------------------------------------- */

.profile-blocks {
  width: 100%;
  margin: 0 auto 36px;
  padding: 0;
  display: grid;
  gap: 20px;
}

.profile-block {
  background: var(--profile-panel-mid);
  border: 1px solid var(--profile-line);
  border-radius: 10px;
  padding: 18px 20px;
}

.profile-block h2,
.profile-block h3 {
  margin-top: 0;
}

.profile-lead {
  margin: 0;
  color: var(--profile-value);
  font-size: 15px;
  line-height: 1.6;
}

/* Shared small-caps label above a sub-block */
.profile-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--profile-label);
  margin-bottom: 8px;
}

/* Divided sub-block inside a card (usage, citation, upstream, notes) */
.profile-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--profile-line-soft);
}

/* --- Key/value summary grids --------------------------------------------- */

.profile-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px 18px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--profile-line-soft);
}

.profile-summary-item {
  display: grid;
  gap: 4px;
}

.profile-summary-item span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--profile-label);
}

.profile-summary-item strong {
  color: var(--profile-text-strong);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.profile-summary-note {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--profile-line-soft);
  color: rgba(200, 232, 255, 0.74);
  font-size: 13px;
  line-height: 1.55;
}

/* Definition-list metadata */
.profile-meta {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.profile-meta-flush {
  margin: 0;
}

.profile-meta > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--profile-line-soft);
}

.profile-meta-wide > div {
  grid-template-columns: 150px minmax(0, 1fr);
}

.profile-meta-flush > div:first-child {
  padding-top: 0;
  border-top: none;
}

.profile-meta dt {
  color: rgba(160, 210, 255, 0.55);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profile-meta dd {
  margin: 0;
  color: var(--profile-value);
  overflow-wrap: anywhere;
}

.profile-meta a,
.profile-agencies a,
.profile-table a {
  color: var(--blue);
  text-decoration: none;
}

.profile-meta a:hover,
.profile-agencies a:hover,
.profile-table a:hover {
  color: var(--profile-value);
}

/* Boxed tile variant - short values that read better as tiles than as rows */
.profile-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-tile {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--profile-line);
  border-radius: 10px;
  background: var(--profile-panel-soft);
}

.profile-tile span {
  color: var(--profile-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.profile-tile strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--profile-text-strong);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
}

/* --- Source and sub-source cards ----------------------------------------- */

.profile-panels {
  display: grid;
  gap: 16px;
}

.profile-panels-tight {
  gap: 14px;
}

.profile-source-card {
  background: var(--profile-panel-soft);
  border: 1px solid var(--profile-line-soft);
  border-radius: 10px;
  padding: 16px 18px;
}

.profile-source-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.profile-source-head h3 {
  margin: 0;
  font-size: 18px;
  color: var(--profile-text-bright);
}

.profile-source-head a {
  color: var(--profile-link);
  text-decoration: none;
}

.profile-source-head a:hover {
  text-decoration: underline;
}

.profile-source-copy {
  margin: 10px 0 0;
  color: var(--profile-text);
  line-height: 1.5;
}

.profile-source-desc {
  margin: 0 0 10px;
  color: var(--profile-text);
  line-height: 1.5;
}

/* --- Tab strip ----------------------------------------------------------- */

.profile-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 185, 255, 0.56) rgba(7, 20, 31, 0.4);
}

.profile-tabs::-webkit-scrollbar {
  height: 10px;
}

.profile-tabs::-webkit-scrollbar-track {
  background: rgba(7, 20, 31, 0.38);
  border-radius: var(--radius-pill);
}

.profile-tabs::-webkit-scrollbar-thumb {
  border-radius: var(--radius-pill);
  border: 2px solid rgba(7, 20, 31, 0.38);
  background: linear-gradient(
    90deg,
    rgba(123, 231, 255, 0.34) 0%,
    rgba(99, 185, 255, 0.74) 55%,
    rgba(77, 155, 230, 0.52) 100%
  );
}

.profile-tabs::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    90deg,
    rgba(255, 210, 143, 0.38) 0%,
    rgba(255, 178, 77, 0.92) 55%,
    rgba(242, 144, 65, 0.7) 100%
  );
}

.profile-tab {
  appearance: none;
  border: 1px solid rgba(110, 196, 255, 0.15);
  background: var(--profile-panel-mid);
  color: rgba(200, 232, 255, 0.82);
  border-radius: var(--radius-pill);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.profile-tab:hover {
  border-color: rgba(99, 185, 255, 0.3);
  color: var(--profile-text-bright);
}

.profile-tab.is-active {
  background: rgba(99, 185, 255, 0.15);
  border-color: rgba(99, 185, 255, 0.38);
  color: var(--blue);
}

.profile-panel {
  min-width: 0;
}

.profile-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.profile-panel-head h3 {
  margin: 0;
  font-size: 18px;
  color: var(--profile-text-bright);
}

.profile-panel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* --- Upstream provenance ------------------------------------------------- */

.profile-upstream-list {
  display: grid;
  gap: 10px;
}

.profile-upstream-item {
  display: grid;
  gap: 4px;
}

.profile-upstream-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--profile-text-strong);
}

.profile-upstream-head a {
  color: var(--profile-link);
  text-decoration: none;
}

.profile-upstream-head a:hover {
  text-decoration: underline;
}

.profile-upstream-note {
  color: #a9c6df;
  font-size: 13px;
  line-height: 1.45;
}

/* --- Chips and pills ----------------------------------------------------- */

.profile-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-chip {
  background: rgba(99, 185, 255, 0.07);
  border: 1px solid rgba(99, 185, 255, 0.15);
  color: rgba(160, 210, 255, 0.7);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
}

.profile-related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-related-list a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid rgba(116, 185, 224, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(99, 185, 255, 0.08);
  color: #bfe4ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.profile-related-list a:hover {
  border-color: rgba(116, 185, 224, 0.36);
  background: rgba(99, 185, 255, 0.14);
  color: #edf6ff;
}

/* --- Lists --------------------------------------------------------------- */

.profile-list {
  margin: 0;
  padding-left: 18px;
  color: var(--profile-text-strong);
  line-height: 1.5;
}

.profile-list li + li {
  margin-top: 8px;
}

.profile-list-tight li + li {
  margin-top: 4px;
}

.profile-list-quiet {
  color: var(--profile-text);
}

.profile-note-box {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(110, 196, 255, 0.12);
  border-radius: 8px;
  background: rgba(110, 196, 255, 0.05);
}

.profile-note-box ul {
  margin: 0;
  padding-left: 18px;
  color: var(--profile-text-strong);
  line-height: 1.45;
}

.profile-note-box li + li {
  margin-top: 6px;
}

.profile-agencies {
  margin-top: 18px;
}

.profile-agencies ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--profile-text);
  line-height: 1.5;
}

.profile-muted {
  margin: 0;
  color: rgba(160, 210, 255, 0.6);
  font-size: 14px;
}

.profile-citation-text {
  color: var(--profile-text);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* Pull-quote style citation used on geometry profiles */
.profile-citation {
  margin: 14px 0 0;
  padding: 14px;
  border-left: 2px solid rgba(116, 185, 224, 0.34);
  background: rgba(6, 16, 25, 0.52);
  color: rgba(188, 211, 226, 0.74);
  font-size: 14px;
  line-height: 1.65;
}

.profile-inline-link {
  display: inline-flex;
  margin-top: 14px;
  color: #9fd7ff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.profile-inline-link:hover {
  color: #dff4ff;
}

/* --- Tables -------------------------------------------------------------- */

.profile-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.profile-table th {
  text-align: left;
  padding: 8px 10px;
  color: rgba(160, 210, 255, 0.6);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--profile-line);
}

.profile-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(110, 196, 255, 0.05);
  color: var(--profile-text);
  vertical-align: top;
}

.profile-table-sub {
  margin-top: 4px;
  color: rgba(160, 210, 255, 0.52);
  font-size: 12px;
}

.profile-table-desc {
  font-size: 13px;
  line-height: 1.5;
}

.profile-table-missing {
  color: rgba(255, 207, 107, 0.78);
}

/* --- Snapshot stats ------------------------------------------------------ */

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.profile-stat {
  background: rgba(14, 38, 66, 0.55);
  border: 1px solid var(--profile-line);
  border-radius: 8px;
  padding: 14px 16px;
}

.profile-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--profile-label);
  margin-bottom: 6px;
}

.profile-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--profile-text-bright);
  line-height: 1.2;
}

.profile-stat-sub {
  font-size: 11px;
  color: rgba(160, 210, 255, 0.55);
  margin-top: 3px;
}

.profile-api-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--profile-line-soft);
  font-size: 12px;
  color: rgba(160, 210, 255, 0.6);
  line-height: 1.5;
}

.profile-api-note code {
  background: rgba(99, 185, 255, 0.08);
  border: 1px solid rgba(99, 185, 255, 0.14);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12px;
  color: var(--profile-link);
}

/* Freshness badge - hidden until a state class is applied */
.profile-freshness {
  display: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 20px;
  line-height: 1.6;
}

.profile-freshness.is-fresh,
.profile-freshness.is-stale,
.profile-freshness.is-old {
  display: inline-block;
}

.profile-freshness.is-fresh {
  color: var(--status-live);
  background: rgba(43, 125, 95, 0.18);
  border: 1px solid rgba(114, 225, 185, 0.28);
}

.profile-freshness.is-stale {
  color: #ffd166;
  background: rgba(161, 106, 16, 0.2);
  border: 1px solid rgba(255, 207, 107, 0.32);
}

.profile-freshness.is-old {
  color: #ff9b8f;
  background: rgba(125, 47, 43, 0.18);
  border: 1px solid rgba(255, 155, 143, 0.24);
}

.profile-snap-row .profile-value {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* --- Cross-surface callout ----------------------------------------------- */

.profile-callout {
  width: min(1120px, 100%);
  margin: -12px auto 26px;
  padding: 22px;
  border: 1px solid rgba(110, 196, 255, 0.18);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(13, 38, 59, 0.88), rgba(7, 17, 27, 0.92));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.profile-callout h2 {
  margin: 6px 0 10px;
  color: #e8f7ff;
}

.profile-callout p {
  margin: 0;
  color: rgba(218, 239, 255, 0.76);
  line-height: 1.6;
}

.profile-callout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.profile-callout-card {
  padding: 16px;
  border: 1px solid rgba(110, 196, 255, 0.12);
  border-radius: 16px;
  background: rgba(4, 13, 22, 0.52);
}

.profile-callout-card h3 {
  margin: 0 0 8px;
  color: #f2fbff;
  font-size: 16px;
}

.profile-callout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* --- Edge cases ---------------------------------------------------------- */

.profile-error {
  max-width: 600px;
  margin: 60px auto;
  text-align: center;
  color: var(--profile-label);
}

.profile-error a {
  color: var(--blue);
  font-size: 14px;
}

.profile-noscript {
  width: 100%;
  margin: 0 auto 18px;
  padding: 0;
  color: rgba(200, 232, 255, 0.72);
  font-size: 13px;
}

/* --- Profile variants ----------------------------------------------------
   Treatments that only one profile surface needs today, kept in the shared
   namespace so a second surface can adopt them without another copy-paste. */

/* Undivided sub-block - spacing only, no rule above it */
.profile-subsection {
  margin-top: 16px;
}

.profile-subsection-title {
  margin: 16px 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--profile-label);
}

/* Flush stack of rows that supply their own separators */
.profile-stack {
  display: grid;
  gap: 0;
}

.profile-prose {
  margin: 0;
  color: rgba(188, 211, 226, 0.74);
  font-size: 14px;
  line-height: 1.65;
}

/* Eyebrow-style back link, for heroes without the docs-link chrome */
.profile-back-link-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  color: rgba(126, 206, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.profile-back-link-kicker:hover {
  color: #dff4ff;
}

/* Hero metadata rendered as bare spans rather than tagged elements */
.profile-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.profile-pill-row span {
  padding: 6px 10px;
  border: 1px solid rgba(116, 185, 224, 0.2);
  border-radius: var(--radius-pill);
  background: rgba(99, 185, 255, 0.08);
  color: #9fd7ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Boxed table variant - full border and rounded corners */
.profile-table-boxed {
  overflow: hidden;
  border: 1px solid rgba(116, 185, 224, 0.12);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.profile-table-boxed th,
.profile-table-boxed td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(116, 185, 224, 0.1);
  color: rgba(237, 244, 251, 0.82);
  font-size: 12px;
  line-height: 1.45;
}

.profile-table-boxed th {
  color: rgba(167, 191, 206, 0.58);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: rgba(6, 16, 25, 0.7);
}

.profile-table-boxed tr:last-child td {
  border-bottom: none;
}

@media (max-width: 820px) {
  .profile-callout-grid {
    grid-template-columns: 1fr;
  }

  .profile-meta > div,
  .profile-meta-wide > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .profile-table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 760px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-sidebar {
    position: static;
  }
}

@media (max-width: 620px) {
  .profile-tile-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   20. PORTRAIT MOBILE FLOW
   --------------------------------------------------------------------------
   These rules intentionally live after every shared component and only apply
   to phone-sized viewports. Desktop and tablet composition stays unchanged.
   ========================================================================== */

@media (max-width: 760px) {
  /* Keep every public page inside the portrait viewport, including long IDs,
     URLs, and inline code supplied by catalog metadata. */
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  p code,
  li code,
  dd code {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* A focused dropdown must still obey its explicit open state on touch.
     Otherwise :focus-within keeps it visually open after a second tap. */
  .site-nav .nav-dropdown:not([data-open="true"]) .nav-dropdown-menu {
    display: none;
  }

  .site-footer {
    gap: var(--sp-5);
  }

  .site-footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .site-footer a {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
  }

  /* Calls to action read as a vertical decision in portrait rather than a row
     of differently sized pills. */
  .cta-group,
  .profile-hero-cta {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .cta-group > .btn,
  .profile-hero-cta > a {
    justify-content: center;
    width: 100%;
  }

  .profile-hero-meta-cta {
    align-items: stretch;
    flex-direction: column;
  }

  /* Catalog introductions stack copy first and proof/actions second. Remove
     desktop-oriented height and rail spacing once the columns collapse. */
  .catalog-marker-hero {
    min-height: 0;
    gap: var(--sp-5);
  }

  .catalog-marker-copy {
    padding-top: var(--sp-10);
  }

  .catalog-marker-panel {
    padding-top: var(--sp-4);
  }

  .catalog-marker-link {
    grid-template-columns: var(--sp-4) minmax(0, 1fr);
  }

  .catalog-marker-action {
    grid-column: 2;
    white-space: normal;
  }

  /* Key facts are orientation, not an appendix. On desktop they remain the
     sticky right rail; in portrait they become the first block after hero. */
  .profile-layout {
    gap: var(--sp-5);
    padding-bottom: var(--sp-8);
  }

  .profile-sidebar {
    order: -1;
  }

  .profile-hero-meta-cta .profile-meta-row {
    order: -1;
  }

  .profile-source-head,
  .profile-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  /* All tables remain semantically intact and scroll within their own card;
     the page itself never becomes a wide desktop canvas. */
  .docs-table-wrap,
  .profile-table-wrap,
  .project-report-markdown-table {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .profile-table {
    width: max-content;
    min-width: 100%;
  }

  .project-report-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .project-report-tab {
    flex: 0 0 auto;
    min-height: 2.75rem;
  }
}

@media (max-width: 600px) {
  .site-header,
  .site-footer,
  main {
    width: calc(100% - 1.5rem);
  }

  .site-header {
    padding-top: var(--sp-4);
  }

  .nav-toggle {
    top: var(--sp-4);
  }

  .site-nav {
    grid-template-columns: 1fr;
    padding: var(--sp-3);
  }

  .site-nav .nav-cta,
  .site-nav .nav-dropdown {
    grid-column: auto;
  }

  .hero,
  .page-hero,
  .story-block {
    padding-left: var(--sp-4);
    padding-right: var(--sp-4);
  }

  .page-hero h1 {
    font-size: clamp(2rem, 10.5vw, 2.65rem);
    overflow-wrap: anywhere;
  }

  .page-hero .hero-copy,
  .hero-home .hero-copy {
    margin-top: var(--sp-6);
  }

  .feature-grid,
  .content-grid,
  .comparison-grid,
  .pricing-grid,
  .docs-grid,
  .docs-layout {
    gap: var(--sp-3);
    padding: var(--sp-3);
  }

  .feature-card,
  .content-card,
  .comparison-card,
  .pricing-card,
  .docs-card,
  .docs-article,
  .docs-note {
    padding: var(--sp-5);
  }

  .docs-nav-grid > a.docs-card {
    padding-right: calc(var(--sp-5) + 2.25rem);
  }

  .docs-callout,
  .code-block {
    padding: var(--sp-4);
  }

  .docs-table-wrap {
    padding: 0;
    border-radius: var(--radius-sm);
  }

  .docs-table {
    min-width: 40rem;
  }

  .docs-table th,
  .docs-table td {
    padding: var(--sp-3);
  }

  .catalog-browser {
    margin-top: var(--sp-4);
  }

  .catalog-section-head {
    align-items: stretch;
    flex-direction: column;
    gap: var(--sp-2);
  }

  .catalog-section-meta {
    justify-content: space-between;
    width: 100%;
  }

  .catalog-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 8px 13px;
  }

  .catalog-card,
  .catalog-card-tall {
    min-height: 0;
    padding: 18px;
  }

  /* Badges become normal-flow context above the title. The desktop corner
     stack and its title gutter are too narrow for a portrait card. */
  .catalog-card-badges,
  .catalog-card-badges-stack {
    position: static;
    max-width: none;
    flex-flow: row wrap;
    justify-content: flex-start;
    align-items: center;
  }

  .catalog-card-badged .catalog-card-header,
  .catalog-card-badged .catalog-card-head,
  .catalog-card-badged > .catalog-card-title,
  .catalog-card-badged .catalog-source-row {
    padding-right: 0;
  }

  .catalog-card-footer,
  .catalog-card-footer-split {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-card-link,
  .catalog-card-actions {
    align-items: flex-start;
    margin-left: 0;
  }

  .catalog-card-button {
    justify-content: center;
    min-height: 2.75rem;
    width: 100%;
  }

  .profile-main {
    gap: var(--sp-4);
  }

  /* Entity articles are transparent wrappers around the visible profile
     panels. Drop their desktop reading inset so those panels share the same
     edges as the overview/sidebar cards in portrait. */
  .profile-main > .docs-article {
    padding-inline: 0;
  }

  .profile-card,
  .profile-block,
  .profile-source-card,
  .profile-callout {
    padding: var(--sp-4);
  }

  .profile-row {
    grid-template-columns: 1fr;
    gap: 3px;
    padding-top: 10px;
    border-top: 1px solid var(--profile-line-soft);
  }

  .profile-row:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .profile-summary-grid,
  .profile-stat-grid {
    grid-template-columns: 1fr;
  }

  .profile-callout {
    margin-top: 0;
  }

  .project-report-tabs,
  .project-report-markdown,
  .project-report-pending {
    padding: var(--sp-4);
  }
}
