/*
 * LuminalShine GH-Pages — NortheBridge aurora design system
 * Matches gitdocs.northebridge.com aesthetic
 */

:root {
  --bg-base: #04060f;
  --bg-deep: #070b1f;
  --aurora-1: #1ec8ff;
  --aurora-2: #4a7dff;
  --aurora-3: #8a5cff;
  --aurora-4: #00e0c6;
  --aurora-warn: #ffb454;
  --text-primary: #f3f6ff;
  --text-secondary: rgba(225, 232, 255, 0.68);
  --text-muted: rgba(180, 195, 230, 0.55);
  --glass-bg: rgba(20, 30, 60, 0.35);
  --glass-bg-strong: rgba(20, 30, 60, 0.55);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-hover: rgba(120, 200, 255, 0.45);
  --glass-highlight: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(ellipse 60% 50% at 15% 20%, rgba(30, 200, 255, 0.35), transparent 60%),
    radial-gradient(ellipse 50% 45% at 85% 15%, rgba(138, 92, 255, 0.32), transparent 60%),
    radial-gradient(ellipse 70% 55% at 50% 95%, rgba(0, 224, 198, 0.22), transparent 65%),
    radial-gradient(ellipse 45% 40% at 90% 80%, rgba(74, 125, 255, 0.28), transparent 60%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-base) 100%);
  filter: blur(40px) saturate(125%);
  animation: aurora-drift 28s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.6;
  pointer-events: none;
  mix-blend-mode: overlay;
}

@keyframes aurora-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-2%, 1.5%, 0) scale(1.05); }
  100% { transform: translate3d(2%, -1%, 0) scale(1.02); }
}

/* ===== Layout ===== */

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 6rem 1.5rem 5rem;
  position: relative;
}

.container.narrow { max-width: 820px; }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  margin: 0 auto;
  max-width: 1080px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.site-nav::before {
  content: "";
  position: absolute;
  inset: 0.5rem 0.75rem;
  background: rgba(7, 11, 31, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  z-index: -1;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.25s ease;
  padding: 0.35rem 0.65rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--aurora-1);
  outline: none;
}

.site-nav .nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  padding-left: 0.5rem;
}

.site-nav .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding-right: 0.5rem;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aurora-1), var(--aurora-4));
  box-shadow: 0 0 12px rgba(30, 200, 255, 0.7);
}

/* ===== Hero ===== */

header.hero {
  margin-bottom: 4rem;
  max-width: 780px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.9rem 0.4rem 0.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  text-decoration: none;
}

.brand-mark:hover { color: var(--text-primary); }

.brand-mark .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aurora-1), var(--aurora-4));
  box-shadow: 0 0 12px rgba(30, 200, 255, 0.7);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.85); }
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
  margin: 0 0 1.25rem;
  font-weight: 600;
  letter-spacing: -0.035em;
  background: linear-gradient(135deg, #ffffff 0%, #cfe4ff 45%, #8ecbff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--text-primary);
}

h4 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-primary);
}

.lead {
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 0 1.5rem;
  font-weight: 400;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.hero-badges img { display: block; height: 22px; }

.section-label {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 3.5rem 0 1.5rem;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--glass-border), transparent);
}

.section-intro {
  color: var(--text-secondary);
  max-width: 720px;
  margin: -0.5rem 0 1.75rem;
  font-size: 1.02rem;
}

/* ===== Cards ===== */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.cards-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.75rem 1.5rem;
  border-radius: 22px;
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-border);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.4s ease,
    box-shadow 0.5s ease,
    background 0.4s ease;
  box-shadow:
    0 1px 0 var(--glass-highlight) inset,
    0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.card.card-block { padding: 2rem 2.25rem; }

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(120, 200, 255, 0.18), transparent 55%),
    radial-gradient(120% 80% at 100% 100%, rgba(138, 92, 255, 0.14), transparent 55%);
  opacity: 0.85;
  z-index: -1;
  transition: opacity 0.5s ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(120, 200, 255, 0.55), rgba(138, 92, 255, 0.0) 35%, rgba(0, 224, 198, 0.0) 65%, rgba(120, 200, 255, 0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

a.card:hover,
a.card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--glass-border-hover);
  box-shadow:
    0 1px 0 var(--glass-highlight) inset,
    0 0 0 1px rgba(120, 200, 255, 0.18),
    0 25px 55px -20px rgba(30, 120, 220, 0.45),
    0 40px 80px -30px rgba(138, 92, 255, 0.35);
  outline: none;
}

a.card:hover::before,
a.card:focus-visible::before { opacity: 1; }

a.card:hover::after,
a.card:focus-visible::after { opacity: 1; }

.card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(30, 200, 255, 0.22), rgba(138, 92, 255, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--aurora-1);
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.card-icon svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  flex: 1;
}

.card-desc + .card-desc { margin-top: 0.85rem; }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.tag.tag-official {
  color: var(--aurora-1);
  border-color: rgba(30, 200, 255, 0.35);
  background: rgba(30, 200, 255, 0.08);
}

.tag.tag-community {
  color: var(--aurora-warn);
  border-color: rgba(255, 180, 84, 0.35);
  background: rgba(255, 180, 84, 0.08);
}

.tag.tag-soon {
  color: var(--aurora-3);
  border-color: rgba(138, 92, 255, 0.35);
  background: rgba(138, 92, 255, 0.08);
}

.card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--aurora-1);
  font-size: 0.85rem;
  font-weight: 500;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.3s ease;
  flex-shrink: 0;
}

.card-arrow svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

a.card:hover .card-arrow svg,
a.card:focus-visible .card-arrow svg {
  transform: translate(3px, -3px);
}

/* ===== Buttons ===== */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.1rem;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  text-decoration: none;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.btn:hover,
.btn:focus-visible {
  border-color: var(--glass-border-hover);
  background: rgba(30, 200, 255, 0.08);
  color: var(--text-primary);
  outline: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(30, 200, 255, 0.22), rgba(138, 92, 255, 0.22));
  border-color: rgba(120, 200, 255, 0.45);
  color: var(--text-primary);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: linear-gradient(135deg, rgba(30, 200, 255, 0.35), rgba(138, 92, 255, 0.32));
  border-color: rgba(120, 200, 255, 0.7);
}

.btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== Long-form content ===== */

.prose {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
}

.prose p { margin: 0 0 1.1rem; }
.prose strong { color: var(--text-primary); font-weight: 600; }
.prose em { color: var(--text-primary); font-style: italic; }
.prose a {
  color: var(--aurora-1);
  text-decoration: none;
  border-bottom: 1px solid rgba(30, 200, 255, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.prose a:hover { color: var(--aurora-4); border-bottom-color: var(--aurora-4); }

.prose ul, .prose ol { margin: 0 0 1.25rem; padding-left: 1.3rem; }
.prose ul li, .prose ol li { margin-bottom: 0.55rem; }
.prose ul li::marker { color: var(--aurora-1); }

.prose h2, .prose h3, .prose h4 { color: var(--text-primary); }
.prose h2 { margin: 2.4rem 0 0.9rem; font-size: 1.55rem; }
.prose h3 { margin: 1.9rem 0 0.7rem; font-size: 1.2rem; }

.prose code {
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cfe4ff;
}

.prose pre {
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: rgba(7, 11, 31, 0.6);
  border: 1px solid var(--glass-border);
  overflow-x: auto;
  margin: 0 0 1.25rem;
  white-space: pre;
  line-height: 1.55;
}
.prose pre code { background: none; border: 0; padding: 0; }

.prose blockquote {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1.15rem;
  border-left: 3px solid var(--aurora-1);
  background: rgba(30, 200, 255, 0.06);
  border-radius: 0 12px 12px 0;
  color: var(--text-secondary);
}
.prose blockquote p:last-child { margin-bottom: 0; }

/* ===== Tables ===== */

.spec-table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 var(--glass-highlight) inset, 0 30px 60px -30px rgba(0, 0, 0, 0.5);
}

table.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  color: var(--text-secondary);
}

.spec-table thead th {
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 1rem 1.25rem;
  background: rgba(7, 11, 31, 0.4);
  border-bottom: 1px solid var(--glass-border);
}

.spec-table tbody td {
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

.spec-table tbody tr:last-child td { border-bottom: 0; }

.spec-table tbody td:first-child {
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
}

/* ===== Feature list (compact card) ===== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.feature {
  position: relative;
  padding: 1.25rem 1.35rem;
  border-radius: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  transition: border-color 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.feature:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
}

.feature-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-primary);
}

.feature-title .feature-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aurora-1), var(--aurora-3));
  box-shadow: 0 0 8px rgba(30, 200, 255, 0.55);
  flex-shrink: 0;
}

.feature-body {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.feature-soon {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aurora-3);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(138, 92, 255, 0.35);
  background: rgba(138, 92, 255, 0.08);
  vertical-align: middle;
}

/* ===== Client compatibility chips ===== */

.client-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.client-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem 0.25rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.platform-chip svg,
.platform-chip img {
  width: 14px;
  height: 14px;
  opacity: 0.85;
}

.platform-chip img { filter: brightness(0) invert(1); opacity: 0.85; }

/* ===== Footer ===== */

footer.site-footer {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
}

footer.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.25s ease;
}

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

/* ===== Utility ===== */

.eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--aurora-1);
  margin-bottom: 0.55rem;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
  margin: 4rem 0;
  border: 0;
}

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color 0.25s ease;
}

.back-link:hover { color: var(--aurora-1); }

.back-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== Comparison Matrix ===== */

table.compare-table {
  width: 100%;
  table-layout: fixed;
  font-size: 0.82rem;
  /* Force wrapping on EVERY descendant so no long label / hyphenated
     phrase can punch out of its column under table-layout: fixed. */
  word-break: normal;
  overflow-wrap: anywhere;
}

/* Column widths come from the <colgroup>. Under table-layout: fixed
   the browser strictly honours <col> widths, which is more reliable
   than width declarations on thead th alone. Label column gets ~22%
   so multi-word row headers ("Local-admin single-file credential
   hijack") have actual room; the five project columns share the
   remaining 78% (15.6% each). */
.compare-table col.compare-col-label   { width: 22%; }
.compare-table col.compare-col-project { width: 15.6%; }

.compare-table thead th {
  text-align: left;
  vertical-align: bottom;
  padding: 0.95rem 0.55rem;
  font-size: 0.7rem;
  word-break: normal;
  overflow-wrap: anywhere;
}

.compare-table thead th.compare-col-self {
  color: var(--aurora-1);
}

.compare-table tbody td {
  padding: 0.75rem 0.55rem;
  vertical-align: top;
  font-size: 0.82rem;
  word-break: normal;
  overflow-wrap: anywhere;
}

.compare-table tbody td.compare-col-self {
  background: rgba(30, 200, 255, 0.04);
}

/* Override .spec-table tbody td:first-child { white-space: nowrap; }
   which is inherited because compare-table also carries spec-table.
   Without this, the label column refuses to wrap and long row headers
   ("Local-admin single-file credential hijack", "Win 11 Insider
   Preview (Canary/Dev)", "Approx. GitHub stars (at time of writing)")
   render on one line and overflow into the LuminalShine column. */
.compare-table tbody td:first-child {
  white-space: normal;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Pill labels are usually short; allow them to wrap onto a second line
   inside narrow cells rather than overflow the column. */
.compare-table .compare-status {
  white-space: normal;
  text-align: left;
}

/* The wrapping div should never scroll horizontally now that the table
   is constrained to its container. Keep auto as a defensive fallback
   in case future content somehow exceeds the box. */
.spec-table-wrap:has(.compare-table) { overflow-x: hidden; }

/* ===== Comparison Matrix — narrow viewports =====
   Convert the table to a stacked "card per row" layout. Each row gets
   a card; each cell stacks under a generated project-name label so the
   reader can scan top-to-bottom without horizontal scroll. */
@media (max-width: 760px) {
  .spec-table-wrap:has(.compare-table) {
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  table.compare-table,
  .compare-table thead,
  .compare-table tbody,
  .compare-table tr,
  .compare-table th,
  .compare-table td {
    display: block;
    width: 100% !important;
  }
  .compare-table thead { display: none; }
  .compare-table tr {
    margin-bottom: 1rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
  }
  .compare-table td {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: transparent !important;
  }
  .compare-table td:first-child {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.98rem;
    letter-spacing: -0.01em;
    border-bottom: 1px solid var(--glass-border);
    margin: 0 0 0.4rem;
    padding-bottom: 0.55rem;
  }
  .compare-table td:last-child { border-bottom: 0; }
  .compare-table td:not(:first-child)::before {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .compare-table td:nth-child(2)::before { content: "LuminalShine"; color: var(--aurora-1); }
  .compare-table td:nth-child(3)::before { content: "Sunshine";     color: #ffd166; }
  .compare-table td:nth-child(4)::before { content: "Apollo";       color: #c084fc; }
  .compare-table td:nth-child(5)::before { content: "Vibeshine";    color: #fb7185; }
  .compare-table td:nth-child(6)::before { content: "Vibepollo";    color: #f97316; }
}

.compare-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}

.compare-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.compare-yes {
  color: var(--aurora-4);
  border-color: rgba(0, 224, 198, 0.35);
  background: rgba(0, 224, 198, 0.08);
}

.compare-no {
  color: rgba(255, 140, 140, 0.95);
  border-color: rgba(255, 140, 140, 0.3);
  background: rgba(255, 140, 140, 0.06);
}

.compare-partial {
  color: var(--aurora-warn);
  border-color: rgba(255, 180, 84, 0.35);
  background: rgba(255, 180, 84, 0.06);
}

.compare-na {
  color: var(--text-muted);
  border-color: var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
}

.compare-note {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

/* ===== Project chip ===== */

.proj-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.22rem 0.7rem 0.22rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
}

.proj-chip .proj-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.proj-chip-self { color: var(--aurora-1); border-color: rgba(30, 200, 255, 0.4); background: rgba(30, 200, 255, 0.08); }
.proj-chip-self .proj-dot { background: linear-gradient(135deg, var(--aurora-1), var(--aurora-4)); }
.proj-chip-sunshine .proj-dot { background: #ffd166; }
.proj-chip-apollo .proj-dot { background: #c084fc; }
.proj-chip-vibeshine .proj-dot { background: #fb7185; }
.proj-chip-vibepollo .proj-dot { background: #f97316; }

/* ===== Lineage diagram ===== */

.lineage {
  position: relative;
  padding: 2rem 1.5rem;
  border-radius: 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  overflow-x: auto;
}

.lineage pre {
  margin: 0;
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-secondary);
  white-space: pre;
}

.lineage pre strong {
  color: var(--aurora-1);
  font-weight: 600;
}

.lineage pre em {
  color: var(--text-muted);
  font-style: normal;
}

/* ===== Quote callout ===== */

.quote-card {
  position: relative;
  padding: 1.5rem 1.65rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--aurora-warn);
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.65;
}

.quote-card cite {
  display: block;
  margin-top: 0.85rem;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.quote-card cite a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px dashed rgba(180, 195, 230, 0.35);
}

.quote-card cite a:hover { color: var(--aurora-1); border-bottom-color: var(--aurora-1); }

/* ===== Docs Modal ===== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal.is-open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 15, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: modal-fade 0.25s ease both;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 2rem 2rem 1.75rem;
  border-radius: 22px;
  background: rgba(20, 30, 60, 0.85);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-border-hover);
  box-shadow:
    0 1px 0 var(--glass-highlight) inset,
    0 30px 90px -20px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(120, 200, 255, 0.18);
  animation: modal-pop 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.modal-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(120, 200, 255, 0.55), rgba(138, 92, 255, 0.0) 35%, rgba(0, 224, 198, 0.0) 65%, rgba(120, 200, 255, 0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(30, 200, 255, 0.22), rgba(138, 92, 255, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--aurora-1);
  margin-bottom: 1.1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.modal-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-title {
  margin: 0 0 0.6rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.modal-body {
  margin: 0 0 1.5rem;
  color: var(--text-secondary);
  font-size: 0.97rem;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0;
}

.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  color: var(--text-primary);
  border-color: var(--glass-border-hover);
  background: rgba(30, 200, 255, 0.08);
  outline: none;
}

.modal-close svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

body.modal-open { overflow: hidden; }

@media (max-width: 640px) {
  .container { padding: 4rem 1.25rem 3rem; }
  header.hero { margin-bottom: 3rem; }
  .card { padding: 1.5rem 1.35rem 1.25rem; }
  .site-nav { flex-direction: column; gap: 0.75rem; align-items: flex-start; padding: 0.85rem 1.1rem; }
  .site-nav::before { inset: 0.35rem 0.5rem; }
  .section-label { margin-top: 2.5rem; }
  .modal-dialog { padding: 1.65rem 1.5rem 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .brand-mark .dot { animation: none; }
  .card, .card-arrow svg, .feature, .btn { transition: none; }
  .modal-backdrop, .modal-dialog { animation: none; }
}
