/* Full-width home composition. Design tokens live in site.css. */

.home-dense .home-block,
.home-dense .home-band-inner,
.home-dense .home-hero-grid,
.home-dense .home-cta,
.home-dense .site-footer {
  width: min(100%, var(--content-max));
  margin-inline: auto;
}

.home-dense .home-block {
  padding: clamp(72px, 7vw, 104px) clamp(20px, 4vw, 48px);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.home-dense .section-title {
  max-width: 12ch;
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.home-dense .section-lead {
  max-width: 44ch;
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
}

.home-block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.home-block-head > div { min-width: 0; }

/* Navigation */
.site-header {
  height: var(--header-h);
  padding: 0 clamp(20px, 3vw, 42px);
}

.site-header.scrolled {
  border-color: var(--line);
  background: rgba(5, 5, 6, 0.78);
  backdrop-filter: blur(20px) saturate(1.2);
}

.header-nav {
  max-width: 62vw;
  gap: 4px;
}

.header-nav a {
  position: relative;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  transition: color 0.2s, background 0.2s;
}

.header-nav a:hover,
.header-nav a.on,
.header-nav a.active,
.header-nav a[aria-current="page"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.header-nav a.on::after,
.header-nav a.active::after,
.header-nav a[aria-current="page"]::after {
  position: absolute;
  right: 14px;
  bottom: 4px;
  left: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  content: "";
}

/* Hero */
.home-hero {
  position: relative;
  display: flex;
  min-height: 72vh;
  min-height: 72dvh;
  align-items: center;
  padding: calc(var(--header-h) + 40px) clamp(20px, 4vw, 48px) 56px;
  overflow: hidden;
}

/* Above-the-fold entrance. Staggered in CSS so the page needs no animation
   library just to fade the hero in. */
.hero-enter {
  animation: heroEnter 0.75s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  animation-delay: calc(var(--enter-i, 0) * 0.08s);
}

@keyframes heroEnter {
  from { opacity: 0; transform: translate3d(0, 20px, 0); }
  to { opacity: 1; transform: none; }
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 56% 54% at 12% 12%, rgba(41, 151, 255, 0.13), transparent 60%),
    radial-gradient(ellipse 45% 45% at 93% 75%, rgba(41, 151, 255, 0.055), transparent 62%),
    linear-gradient(180deg, #050506, #070708);
  pointer-events: none;
}

.home-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(380px, 0.9fr) minmax(560px, 1.1fr);
  gap: clamp(52px, 7vw, 104px);
  align-items: center;
}

.home-hero-copy { max-width: 650px; }

.home-brand {
  margin-bottom: 18px;
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.home-hero-title {
  margin: 0 0 22px;
  font-size: clamp(50px, 5.7vw, 82px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.home-hero-title em {
  color: var(--accent);
  font-style: normal;
}

.home-hero-lead {
  max-width: 38ch;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.55;
}

.home-hero-cta,
.home-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-hero-cta { margin-bottom: 22px; }

.hero-latest {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 13px;
  transition: border-color 0.2s, background 0.2s;
}

.hero-latest:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}

.hero-latest-tag {
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-latest-text { color: var(--text); font-weight: 600; }
.hero-latest-tool { opacity: 0.72; }
.hero-latest-arrow { margin-left: auto; color: var(--accent); }

/* Integrated hero dashboard */
.hero-dash {
  position: relative;
  min-height: 460px;
  padding: clamp(18px, 2.2vw, 26px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015) 42%, transparent),
    rgba(14, 14, 16, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
}

.hero-dash::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 80% 5%, rgba(41, 151, 255, 0.1), transparent 35%);
  content: "";
  pointer-events: none;
}

.hero-dash > * { position: relative; z-index: 1; }

.hero-dash-top,
.hero-dash-cloud-head,
.cloud-analytics-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-dash-top { margin-bottom: 18px; align-items: flex-start; }

.hero-dash-top h2 {
  margin: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-dash-sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.hero-dash-all {
  flex-shrink: 0;
  margin-top: 2px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(41, 151, 255, 0.35);
  background: rgba(41, 151, 255, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.hero-dash-all:hover {
  border-color: rgba(41, 151, 255, 0.55);
  background: rgba(41, 151, 255, 0.18);
}

/* Alternating wide bands */
.home-band {
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.home-band:nth-of-type(even) { background: rgba(255, 255, 255, 0.012); }

.home-band-inner {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.48fr);
  gap: clamp(44px, 6vw, 88px);
  align-items: center;
  padding: clamp(78px, 7vw, 108px) clamp(20px, 4vw, 48px);
}

.home-band-copy {
  align-self: center;
  max-width: 430px;
}

.home-band-copy .section-label { margin-bottom: 12px; }
.home-band-copy .section-lead { margin-bottom: 26px; }
.home-band-visual { min-width: 0; }

.home-band--solver {
  background:
    radial-gradient(ellipse 55% 80% at 92% 50%, rgba(245, 158, 11, 0.08), transparent 62%),
    rgba(255, 255, 255, 0.012);
}

.solver-home-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #0a0a0c;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.solver-home-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.solver-home-row div {
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.solver-home-row b {
  display: block;
  font-family: var(--mono);
  font-size: 18px;
  color: #f59e0b;
  margin-bottom: 4px;
}

.solver-home-row span {
  font-size: 11px;
  color: var(--muted);
}

.solver-home-code {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #050506;
  color: #e5e7eb;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  overflow-x: auto;
}

/* Licensed tools */
.licensed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.lic-card {
  position: relative;
  display: flex;
  min-height: 210px;
  flex-direction: column;
  gap: 13px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--card-color) 8%, transparent), transparent 48%),
    var(--surface);
  color: inherit;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}

.lic-card:hover {
  border-color: color-mix(in srgb, var(--card-color) 42%, var(--line));
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--card-color) 12%, transparent), transparent 52%),
    var(--surface-2);
  transform: translateY(-3px);
}

.lic-card-preview {
  height: 108px;
  margin: -20px -20px 3px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.lic-card-preview img { width: 100%; height: 100%; object-fit: cover; }

.lic-card-top { display: flex; align-items: flex-start; gap: 12px; }

.lic-card-icon,
.free-card-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.32);
}

.lic-card-icon { width: 44px; height: 44px; border-radius: 12px; }
.lic-card-icon img, .lic-card-icon svg { width: 23px; height: 23px; }
.lic-card h3 { margin-top: 5px; font-size: 16px; letter-spacing: -0.02em; }

.lic-card-desc {
  display: -webkit-box;
  flex: 1;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.lic-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lic-card-meta { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.lic-card-action { color: var(--accent); font-size: 12px; font-weight: 700; }

/* Cloud visual */
.cloud-analytics {
  display: block;
}

.cloud-analytics-main {
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 46%),
    var(--surface);
}

.cloud-analytics-main { padding: clamp(22px, 2.4vw, 32px); }

.cloud-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.cloud-stat-cell {
  min-height: 108px;
  padding: 17px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.24);
}

.cloud-stat-cell b {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: clamp(20px, 2vw, 29px);
  letter-spacing: -0.04em;
}

.cloud-stat-cell span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Free tools */
#freeHome { border-top: 1px solid var(--line); }

.free-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.free-card {
  display: flex;
  min-height: 108px;
  align-items: center;
  gap: 15px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: inherit;
  transition: transform 0.22s, border-color 0.22s, background 0.22s;
}

.free-card:hover {
  border-color: color-mix(in srgb, var(--card-color) 38%, var(--line));
  background: var(--surface-2);
  transform: translateY(-2px);
}

.free-card-icon { width: 42px; height: 42px; border-radius: 12px; }
.free-card-icon img, .free-card-icon svg { width: 21px; height: 21px; }
.free-card h3 { margin-bottom: 4px; font-size: 15px; }
.free-card p { color: var(--muted); font-size: 12px; line-height: 1.4; }

/* Updates */
.home-updates-list {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface);
}

.home-update-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  transition: background 0.2s;
}

.home-update-row:last-child { border-bottom: 0; }
.home-update-row:hover { background: rgba(255, 255, 255, 0.035); }
.home-update-ver { color: var(--accent); font-family: var(--mono); font-size: 12px; font-weight: 700; }
.home-update-row h3 { margin-bottom: 4px; font-size: 14px; }

.home-update-row p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-update-meta { color: var(--muted); font-size: 11px; text-align: right; white-space: nowrap; }
.home-update-more { display: block; margin-top: 5px; color: var(--accent); font-weight: 700; }

/* Lower sections */
.home-docs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-doc-card {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  color: inherit;
  transition: transform 0.22s, border-color 0.22s, background 0.22s;
}

.home-doc-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.home-doc-card h3 { margin-bottom: 9px; font-size: 16px; }

.home-doc-card p {
  display: -webkit-box;
  min-height: 58px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.home-doc-card span { color: var(--accent); font-size: 12px; font-weight: 700; }

.home-dense .projects-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-dense .project-card { border-radius: 20px; }

.home-dense .faq-list { max-width: none; }
.home-dense .faq-section { display: grid; grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1.45fr); column-gap: 72px; }
.home-dense .faq-section .section-label,
.home-dense .faq-section .section-title,
.home-dense .faq-section .section-lead { grid-column: 1; }
.home-dense .faq-section .faq-list { grid-column: 2; grid-row: 1 / span 3; }

.home-dense .home-cta { padding: 8px clamp(20px, 4vw, 48px) 76px; }

.home-dense .home-cta-inner {
  padding: 38px 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.home-dense .site-footer { padding: 34px clamp(20px, 4vw, 48px) 54px; }

@media (max-width: 1180px) {
  .home-hero-grid { grid-template-columns: minmax(330px, 0.82fr) minmax(500px, 1.18fr); gap: 42px; }
  .home-band-inner { grid-template-columns: minmax(240px, 0.62fr) minmax(0, 1.38fr); gap: 38px; }
}

@media (max-width: 900px) {
  .home-hero { min-height: auto; }
  .home-hero-grid,
  .home-band-inner { grid-template-columns: 1fr; }
  .home-hero-grid { gap: 38px; }
  .home-hero-copy,
  .home-band-copy { max-width: 650px; }
  .home-band-inner { gap: 32px; }
  .home-band-copy .section-title { max-width: none; }
  .solver-home-row { grid-template-columns: 1fr; }
  .licensed-grid { grid-template-columns: repeat(2, 1fr); }
  .free-grid,
  .home-docs-grid,
  .home-dense .projects-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-dense .faq-section { display: block; }
  .home-dense .faq-section .section-lead { margin-bottom: 26px; }
}

@media (max-width: 680px) {
  .header-nav { display: none; }
  .home-hero { padding-top: calc(var(--header-h) + 34px); }
  .home-hero-title { font-size: clamp(42px, 13vw, 62px); }
  .hero-dash { min-height: 0; padding: 18px; }
  .cloud-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .licensed-grid,
  .free-grid,
  .home-docs-grid,
  .home-dense .projects-row { grid-template-columns: 1fr; }
  .home-update-row { grid-template-columns: 62px minmax(0, 1fr); }
  .home-update-meta { grid-column: 2; text-align: left; }
  .home-block-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 420px) {
  .cloud-stat-grid { grid-template-columns: 1fr; }
  .hero-latest-tool { display: none; }
}

/* Hero changelog — release stream */
.hero-changelog {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}
.hero-change {
  position: relative;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  grid-template-areas:
    "pulse meta go"
    "pulse title go"
    "pulse body go";
  column-gap: 12px;
  row-gap: 4px;
  padding: 14px 14px 14px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.hero-change--latest {
  border-color: rgba(41, 151, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(41, 151, 255, 0.12), transparent 55%),
    rgba(0, 0, 0, 0.35);
}
.hero-change:hover {
  border-color: rgba(41, 151, 255, 0.35);
  background: rgba(255, 255, 255, 0.035);
  transform: translateX(2px);
}
.hero-change-pulse {
  grid-area: pulse;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}
.hero-change--latest .hero-change-pulse {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(41, 151, 255, 0.18), 0 0 18px rgba(41, 151, 255, 0.45);
}
.hero-change-meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.hero-change-tag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(41, 151, 255, 0.3);
  background: rgba(41, 151, 255, 0.12);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.hero-change-meta time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
}
.hero-change h3 {
  grid-area: title;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.hero-change p {
  grid-area: body;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-change-go {
  grid-area: go;
  align-self: center;
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  opacity: 0.55;
  transition: opacity 0.2s, transform 0.2s;
}
.hero-change:hover .hero-change-go {
  opacity: 1;
  transform: translateX(3px);
}

/* 3D fan deck — fixed pin, cards unfold while the section is locked. */
.fan-section {
  position: relative;
  z-index: 3;
  border-top: 1px solid var(--line);
  background: #050506;
}
.fan-spacer {
  width: 100%;
  height: 235vh;
  pointer-events: none;
}
.fan-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  z-index: 4;
  pointer-events: none;
}
.fan-stage.is-before {
  position: absolute;
  top: 0;
  bottom: auto;
}
.fan-stage.is-pinned {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  width: 100%;
  z-index: 6;
}
.fan-stage.is-after {
  position: absolute;
  top: auto;
  bottom: 0;
}
.fan-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 48% 38% at 50% 50%, rgba(41, 151, 255, 0.1), transparent 62%),
    #050506;
  pointer-events: none;
}
.fan-hint {
  position: absolute;
  top: calc(var(--header-h) + 16px);
  left: 50%;
  z-index: 8;
  margin: 0;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
  pointer-events: none;
}
.fan-world {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}
.fan-world a,
.fan-panel {
  pointer-events: auto;
}
.fan-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  width: min(52vw, 460px);
  height: min(46vh, 360px);
  margin: 0;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.02) 40%, transparent 70%),
    rgba(12, 12, 14, 0.94);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  transform: translate3d(-50%, -50%, 0);
  overflow: hidden;
  will-change: transform, opacity;
  backface-visibility: hidden;
  pointer-events: auto;
}
.fan-panel[data-fan="0"] { z-index: 1; }
.fan-panel[data-fan="1"] { z-index: 2; }
.fan-panel[data-fan="2"] { z-index: 3; }

/* Head keeps its size, the list below absorbs the remaining space. */
.fan-panel > .stack-panel-head { flex: 0 0 auto; }
.fan-panel > .stack-tool-list,
.fan-panel > .stack-free-grid,
.fan-panel > .stack-cloud-stats { flex: 1 1 auto; min-height: 0; }

.stack-panel-head,
.fan-panel .stack-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.stack-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.stack-panel-head a {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.stack-panel-head a:hover { color: var(--accent); }

.stack-tool-list,
.stack-update-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stack-tool-row,
.stack-update-row,
.stack-free-card {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.stack-tool-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
.stack-tool-row:hover,
.stack-free-card:hover,
.stack-update-row:hover {
  border-color: color-mix(in srgb, var(--card-color, var(--accent)) 40%, var(--line));
  background: rgba(255, 255, 255, 0.03);
}
.stack-tool-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}
.stack-tool-icon img,
.stack-tool-icon svg { width: 20px; height: 20px; }
.stack-tool-row strong,
.stack-free-card strong,
.stack-update-row strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.stack-tool-row span,
.stack-free-card span,
.stack-update-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.stack-tool-row em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.stack-cloud-tag {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.stack-cloud-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.stack-cloud-stats div {
  min-height: 110px;
  padding: 18px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
}
.stack-cloud-stats b {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.04em;
}
.stack-cloud-stats span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.35;
}
.stack-free-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.stack-free-card {
  grid-template-columns: 36px minmax(0, 1fr);
  min-height: 72px;
}
.stack-update-row { grid-template-columns: 56px minmax(0, 1fr) auto; }
.stack-update-ver {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}
.stack-update-row time {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.stack-update-row span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Panel-scoped density overrides. These must sit above the responsive block —
   `.fan-panel .stack-*` outranks a bare `.stack-*` regardless of media query. */
.fan-panel .stack-cloud-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.fan-panel .stack-cloud-stats div {
  min-height: 0;
  padding: 14px 12px;
}
.fan-panel .stack-cloud-stats b {
  font-size: clamp(18px, 2vw, 26px);
}
.fan-panel .stack-free-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .fan-panel {
    width: min(78vw, 400px);
    height: min(42vh, 320px);
    padding: 14px;
  }
  .fan-panel .stack-free-grid,
  .fan-panel .stack-cloud-stats { grid-template-columns: 1fr; }
  .stack-free-grid { grid-template-columns: 1fr; }
  .stack-cloud-stats { grid-template-columns: 1fr; }
  .stack-cloud-stats div { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fan-panel { will-change: auto; }
}

/* Alt Gen promo page */
.promo-body { background: var(--bg); }
.promo-shell {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: calc(var(--header-h) + 48px) clamp(20px, 4vw, 48px) 80px;
}
.promo-hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  margin: 0 0 18px;
}
.promo-hero .section-lead { margin-bottom: 28px; max-width: 46ch; }
.promo-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 56px; }
.promo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 56px;
}
.promo-card {
  padding: 22px 22px 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-md);
}
.promo-card h2 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.promo-card p { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0; }
.promo-steps { padding-top: 8px; }
.promo-steps h2 { font-size: 20px; margin-bottom: 16px; }
.promo-steps ol {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 15px;
}
.promo-footer {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 24px clamp(20px, 4vw, 48px) 48px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.altgen-preview {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 22px;
}
.altgen-preview .k { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.altgen-preview .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.altgen-preview .row:last-child { border-bottom: 0; }
.altgen-preview b { font-weight: 650; }

@media (max-width: 720px) {
  .promo-grid { grid-template-columns: 1fr; }
}
