.subpage-shell {
  padding: 72px 0 112px;
}

.subpage-intro {
  max-width: 880px;
  margin-bottom: 48px;
}

.subpage-intro h1 {
  max-width: none;
  margin: 0 0 18px;
  font-size: clamp(2.8rem, 6vw, 5rem);
  text-align: left;
}

.subpage-intro .subtitle,
.subpage-intro > p:last-child {
  max-width: 760px;
  margin: 0;
  color: #aeb9c9;
  font-size: 1.08rem;
}

.back-link {
  margin: 0 0 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--identity);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--ink);
  transform: none;
}

.quick-nav {
  position: sticky;
  top: 82px;
  z-index: 30;
  margin: 0 0 38px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(13, 18, 26, 0.86);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.quick-nav h4 {
  display: none;
}

.quick-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-nav-links a {
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.quick-nav-links a:hover,
.quick-nav-links a:focus-visible {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface-strong);
}

.gallery-section,
.subpage-section {
  margin: 0;
  padding: 70px 0;
  border-top: 1px solid var(--line);
}

.gallery-section h2,
.subpage-section h2,
.subpage-shell .title.is-4 {
  margin: 0 0 14px;
  padding: 0;
  display: block;
  border: 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.gallery-section > p,
.subpage-section > p,
.subpage-shell .content {
  max-width: 880px;
  color: #aeb9c9;
}

.section-divider {
  display: none;
}

.video-grid,
.video-grid-large,
.video-grid-2col,
.comparison-grid,
.marquee-gallery {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.video-grid-large,
.video-grid-2col,
.comparison-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.video-card,
.comparison-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.video-card:hover,
.comparison-card:hover {
  border-color: rgba(94, 234, 212, 0.34);
  box-shadow: none;
  transform: translateY(-2px);
}

.video-card video,
.comparison-card video,
.marquee-gallery .video-card video {
  width: 100%;
  height: auto;
  aspect-ratio: 20 / 11;
  object-fit: cover;
  background: #05070b;
}

.video-card .caption,
.comparison-card .header {
  min-height: 58px;
  padding: 15px 17px;
  border: 0;
  border-top: 1px solid var(--line);
  color: #cbd5e1;
  background: var(--surface);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
}

.featured-grid .video-card .caption {
  min-height: 74px;
  padding: 16px 18px 18px;
}

.caption strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 0.95rem;
}

.caption small {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.featured-grid .reference-thumb {
  width: 64px;
}

.gallery-tabs {
  margin: 26px 0 20px;
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}

.gallery-tab {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.gallery-tab:hover,
.gallery-tab.active {
  border-color: rgba(94, 234, 212, 0.45);
  color: var(--ink);
  background: rgba(94, 234, 212, 0.1);
}

.gallery-tab-content {
  display: none;
}

.gallery-tab-content.active {
  display: block;
}

.badge,
.badge-alt {
  margin-left: 6px;
  padding: 3px 7px;
  border: 1px solid rgba(94, 234, 212, 0.25);
  border-radius: 999px;
  color: var(--identity);
  background: rgba(94, 234, 212, 0.08);
  font-size: 0.66rem;
}

.badge-alt {
  border-color: rgba(251, 113, 133, 0.25);
  color: #fda4af;
  background: rgba(251, 113, 133, 0.08);
}

.metric-summary {
  margin: 30px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-summary > div {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(13, 18, 26, 0.74);
}

.metric-summary strong {
  display: block;
  color: var(--ink);
  font-size: 1.45rem;
}

.metric-summary span {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.columns.is-multiline {
  margin-top: 22px;
}

.metric-card {
  height: 100%;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: none;
}

.metric-card h4 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 1rem;
}

.metric-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.table-container {
  margin-top: 28px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.styled-table {
  width: 100%;
  min-width: 820px;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  border-radius: 0;
  color: var(--text);
  background: transparent;
  box-shadow: none;
  font-size: 0.82rem;
}

.styled-table th {
  padding: 14px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: #dbe6f4 !important;
  background: #111823 !important;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.styled-table td {
  padding: 12px;
  border: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.08);
  color: #b8c4d4;
  background: transparent;
  text-align: center;
  white-space: nowrap;
}

.styled-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.styled-table .section-header,
.styled-table .section-header:hover {
  background: #0a0f16;
}

.styled-table .section-header td {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.styled-table .method-name {
  color: var(--ink);
  text-align: left;
}

.styled-table .ours-row,
.styled-table .ours-row:hover {
  background: rgba(94, 234, 212, 0.08);
}

.styled-table .ours-row td {
  color: #dce8e7;
}

.styled-table .best-value,
.highlight-blue {
  color: var(--identity) !important;
  font-weight: 700 !important;
}

.rank-first,
.rank-second,
.rank-third {
  font-weight: 700;
}

.rank-first { color: #fdba74; }
.rank-second { color: #fde68a; }
.rank-third { color: #cbd5e1; }

.table-note {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.key-finding,
.highlight-box-blue {
  margin: 22px 0 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--identity);
  border-radius: 16px;
  color: #b8c4d4;
  background: rgba(13, 18, 26, 0.82);
}

.key-finding h4,
.highlight-box-blue b {
  color: var(--ink);
}

.key-finding ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.key-finding li {
  margin-bottom: 7px;
}

.key-finding li:last-child {
  margin-bottom: 0;
}

.subpage-footer {
  padding-top: 48px;
  border-top: 1px solid var(--line);
  text-align: center;
}

@media (max-width: 900px) {
  .featured-grid,
  .video-grid,
  .marquee-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .subpage-shell {
    padding: 54px 0 82px;
  }

  .quick-nav {
    position: static;
  }

  .gallery-section,
  .subpage-section {
    padding: 56px 0;
  }

  .featured-grid,
  .video-grid,
  .video-grid-large,
  .video-grid-2col,
  .comparison-grid,
  .marquee-gallery {
    grid-template-columns: 1fr;
  }

  .metric-summary {
    grid-template-columns: 1fr 1fr;
  }

  .nav-links a:nth-child(2),
  .nav-links a:nth-child(4) {
    display: inline;
  }
}
