/*
 * THE GLASS SHELL — layout sheet for the old AppLayout surfaces wearing the
 * macro-lab `glass-cleaned` dress (Lane 0 of the glass weave, 2026-09-25).
 *
 * LAYOUT ONLY. Every colour comes from the --md-* contract in
 * `src/styles/macro-lab/macro-themes.css`; zero hex, zero rgba here. One local
 * token is declared because the contract has no name for it:
 *   · --gs-serif — glass-cleaned resolves --md-font-serif to Inter, but the
 *     hero headline is a serif line (walkthrough `.brief h1`). Same face the
 *     platform's block grammar already uses on glass-cleaned (`--pf-serif`,
 *     Playfair Display, loaded globally by src/index.css). A theme that DOES
 *     carry a serif (`fresh`, `warm`) keeps its own via [data-md-title="serif"].
 */

.gs-root {
  --gs-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  min-width: 0;
}

/* The page canvas: transparent keeps the AppLayout background (identical to
 * glass-cleaned's --md-bg in both modes); "paint" uses the lab canvas. */
.gs-root.gs-canvas-app {
  background: transparent;
}

/* ─────────────────────────────────────────────────────────── the hero */

.gs-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 8px;
  padding: 22px 24px;
  min-width: 0;
}
@media (max-width: 767px) {
  .gs-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px 16px;
    gap: 16px;
  }
}
/* No figure: the so-what takes the right-hand slot (a quiet aside) … */
.gs-hero-aside {
  align-self: center;
  border-left: 1px solid var(--md-border);
  padding-left: 22px;
  min-width: 0;
}
.gs-hero-aside-label {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--md-text-muted);
}
.gs-hero-aside-text {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 550;
  color: var(--md-text);
  max-width: 34ch;
  text-wrap: pretty;
}
/* … and with no so-what either, the sentence spans the hero. */
.gs-hero-span {
  grid-template-columns: minmax(0, 1fr);
}
.gs-hero-span .gs-headline {
  max-width: 34ch;
}
.gs-hero-span .gs-body {
  max-width: 78ch;
}
@media (max-width: 767px) {
  .gs-hero-aside {
    border-left: none;
    border-top: 1px solid var(--md-border);
    padding-left: 0;
    padding-top: 14px;
  }
}
.gs-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--md-text-muted);
}
.gs-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--md-accent-gradient);
  display: inline-block;
  flex: none;
}
.gs-headline {
  font-family: var(--gs-serif);
  font-weight: 600;
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--md-text);
  margin: 12px 0 10px;
  max-width: 22ch;
  text-wrap: balance;
}
.md-root[data-md-title="serif"] .gs-headline {
  font-family: var(--md-font-serif);
}
.gs-headline em {
  font-style: normal;
  color: var(--md-accent-text, var(--md-accent));
}
.gs-body {
  color: var(--md-text-secondary);
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 52ch;
}
.gs-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}
.gs-stat {
  align-self: center;
  border-left: 1px solid var(--md-border);
  padding-left: 22px;
  min-width: 0;
}
@media (max-width: 767px) {
  .gs-stat {
    border-left: none;
    border-top: 1px solid var(--md-border);
    padding-left: 0;
    padding-top: 14px;
  }
}
.gs-stat-value {
  font-family: var(--md-font-display);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  font-size: clamp(40px, 5vw, 60px);
  color: var(--md-text);
}
.gs-stat-label {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--md-text-secondary);
}
.gs-sowhat {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--md-text-secondary);
}
.gs-sowhat b {
  color: var(--md-text);
  font-weight: 700;
}

/* ─────────────────────────────────────────────────────────── buttons */

.gs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--md-radius-sm);
  padding: 8px 14px;
  border: 1px solid var(--md-border-strong);
  background: var(--md-surface-3);
  color: var(--md-text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: filter 120ms ease, background-color 120ms ease;
  white-space: nowrap;
}
.gs-btn:hover {
  background: var(--md-surface-2);
  color: var(--md-text);
}
.gs-btn:focus-visible {
  outline: 2px solid var(--md-accent);
  outline-offset: 2px;
}
.gs-btn:disabled,
.gs-btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}
.gs-btn-primary {
  background: var(--md-accent-gradient);
  border-color: transparent;
  color: white;
}
.gs-btn-primary:hover {
  background: var(--md-accent-gradient);
  color: white;
  filter: brightness(1.06);
}
.gs-btn-ink {
  background: var(--md-text);
  border-color: var(--md-text);
  color: var(--md-bg);
}
.gs-btn-ink:hover {
  background: var(--md-text);
  color: var(--md-bg);
  filter: brightness(1.15);
}
.gs-btn-accent {
  background: var(--md-accent-soft);
  border-color: transparent;
  color: var(--md-accent-text, var(--md-accent));
}

/* ─────────────────────────────────────────────────────────── tabs */

.gs-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--md-border);
  min-width: 0;
}
.gs-tabs::-webkit-scrollbar {
  display: none;
}
.gs-tab {
  position: relative;
  flex: none;
  padding: 10px 12px 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--md-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.gs-tab:hover {
  color: var(--md-text);
}
.gs-tab:focus-visible {
  outline: 2px solid var(--md-accent);
  outline-offset: -2px;
  border-radius: var(--md-radius-sm);
}
.gs-tab[aria-selected="true"] {
  color: var(--md-text);
}
.gs-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--md-accent-gradient);
}
.gs-tab-data {
  margin-left: auto;
}

/* ─────────────────────────────────────────────────────────── sections */

.gs-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  min-width: 0;
}
/* Phones: the "see all" button wraps under the title instead of squeezing the
 * title and lede into a narrow column beside it (lane C's page fix, promoted
 * to the shell 2026-09-26), and long titles break rather than overflow. */
@media (max-width: 640px) {
  .gs-section-head {
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 8px;
  }
  .gs-section-title {
    font-size: 17px;
  }
}
.gs-section-title,
.gs-section-lede,
.gs-headline {
  overflow-wrap: anywhere;
}
.gs-section-title {
  font-family: var(--gs-serif);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--md-text);
  margin: 4px 0 0;
}
.md-root[data-md-title="serif"] .gs-section-title {
  font-family: var(--md-font-serif);
}
.gs-section-lede {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--md-text-secondary);
  line-height: 1.5;
  max-width: 64ch;
}
.gs-empty {
  border: 1px dashed var(--md-border-strong);
  border-radius: var(--md-radius-sm);
  padding: 18px 16px;
  background: var(--md-surface-2);
}
.gs-empty-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--md-text);
}
.gs-empty-body {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--md-text-muted);
  max-width: 60ch;
}
.gs-fresh {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 550;
  color: var(--md-text-muted);
}
.gs-fresh-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  display: inline-block;
  flex: none;
}

/* ─────────────────────────────────────────────────────────── action row */

.gs-actrow {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px 4px;
  border-top: 1px solid var(--md-border);
  min-width: 0;
}
.gs-actrow:first-child {
  border-top: none;
}
.gs-actrow-lead {
  background: var(--md-surface-2);
  border-radius: var(--md-radius);
  border-top: none;
  padding: 14px;
}
.gs-actrow-lead + .gs-actrow {
  border-top: none;
}
@media (max-width: 767px) {
  .gs-actrow {
    grid-template-columns: 30px minmax(0, 1fr);
  }
  .gs-actrow-buttons {
    grid-column: 1 / -1;
  }
}
.gs-actn {
  width: 34px;
  height: 34px;
  border-radius: var(--md-radius-sm);
  display: grid;
  place-items: center;
  font-family: var(--md-font-display);
  font-weight: 800;
  font-size: 13px;
  background: var(--md-accent-soft);
  color: var(--md-accent-text, var(--md-accent));
}
.gs-actrow-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--md-text);
  text-wrap: balance;
}
.gs-why {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--md-text-secondary);
}
.gs-why-label {
  font-weight: 750;
  letter-spacing: 0.12em;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--md-text-muted);
  margin-right: 4px;
}
.gs-why-arrow {
  color: var(--md-text-muted);
  margin: 0 2px;
  white-space: pre;
}
.gs-actrow-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}
.gs-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 650;
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--md-surface-3);
  border: 1px solid var(--md-border);
  color: var(--md-text-secondary);
}
.gs-actrow-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}
.gs-actrow-status {
  font-size: 12px;
  font-weight: 700;
  color: var(--md-text-secondary);
}
.gs-actrow-status[data-tone="positive"] {
  color: var(--md-positive);
}
.gs-actrow-status[data-tone="negative"] {
  color: var(--md-negative);
}

/* ─────────────────────────────────────────────────────────── clip strip */

.gs-clipstrip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 9px;
  min-width: 0;
}
.gs-clipstrip-compact {
  grid-template-columns: repeat(auto-fill, 36px);
  gap: 6px;
}
.gs-clipstrip-compact .gs-clip-play {
  left: 50%;
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  font-size: 7px;
}
.gs-clip {
  display: block;
  border-radius: var(--md-radius-sm);
  overflow: hidden;
  background: var(--md-surface-3);
  border: 1px solid var(--md-border);
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.gs-clip:focus-visible {
  outline: 2px solid var(--md-accent);
  outline-offset: 2px;
}
.gs-clip-art {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--md-surface-2);
  overflow: hidden;
}
.gs-clip-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gs-clip-play {
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--md-surface-3);
  color: var(--md-text);
  font-size: 9px;
}
.gs-clip-cap {
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--md-text);
}
.gs-clip-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gs-clip-sub {
  display: block;
  font-size: 10px;
  font-weight: 550;
  color: var(--md-text-muted);
  margin-top: 2px;
}
