.guide-shell {
  width: min(var(--theme-shell-max), calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2.6rem 0 5rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--theme-accent);
}

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

.guide-hero {
  max-width: 38rem;
  margin-bottom: 3.5rem;
}

.guide-hero h1 {
  margin: 0;
  max-width: 36rem;
  font-family: var(--theme-font-ui);
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
  font-weight: 600;
  color: var(--theme-text);
}

.hero-copy {
  max-width: 32rem;
  margin: 1.2rem 0 0;
  font-size: 1.03rem;
  line-height: 1.85;
  color: var(--theme-text-muted);
}

.hero-copy code {
  font-size: 0.9em;
  color: var(--theme-accent);
}

/* ---- Token sections ---- */

.token-section {
  margin-bottom: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--theme-border);
}

.token-section h2 {
  margin: 0 0 1.5rem;
  font-family: var(--theme-font-ui);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--theme-text);
}

/* ---- Color swatches ---- */

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.swatch-card {
  display: grid;
  gap: 0.6rem;
}

.swatch-well {
  height: 4.5rem;
  border-radius: var(--theme-radius-md);
  border: 1px solid var(--theme-border);
}

.swatch-name {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--theme-text-muted);
  word-break: break-all;
}

/* ---- Surfaces ---- */

.surface-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.surface-card {
  display: grid;
  align-items: end;
  min-height: 6rem;
  padding: 1rem;
  border-radius: var(--theme-radius-md);
  border: 1px solid var(--theme-border);
}

.surface-card span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--theme-text-muted);
}

/* ---- Typography ---- */

.type-specimens {
  display: grid;
  gap: 0;
}

.type-row {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--theme-border);
}

.type-row:last-child {
  border-bottom: 0;
}

.type-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--theme-text-soft);
  padding-top: 0.15rem;
}

.type-sample {
  color: var(--theme-text);
  font-family: var(--theme-font-ui);
}

.type-display {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.type-heading {
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.type-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--theme-text-muted);
}

.type-caption {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--theme-text-soft);
}

.type-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--theme-accent);
}

/* ---- Radius ---- */

.radius-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.radius-card {
  display: grid;
  place-items: center;
  min-height: 5.5rem;
  border: 1px solid var(--theme-border-strong);
  background: var(--theme-surface-strong);
}

.radius-card span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--theme-text-muted);
}

/* ---- Shadow ---- */

.shadow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}

.shadow-card {
  display: grid;
  place-items: center;
  min-height: 5.5rem;
  border-radius: var(--theme-radius-md);
  background: var(--theme-surface-strong);
}

.shadow-card span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--theme-text-muted);
}

/* ---- Spacing ---- */

.spacing-list {
  display: grid;
  gap: 0.75rem;
}

.spacing-row {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1rem;
  align-items: center;
}

.spacing-bar {
  display: block;
  height: 1.2rem;
  min-width: 4px;
  border-radius: var(--theme-radius-pill);
  background: var(--theme-accent);
}

.spacing-row > span:last-child {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--theme-text-muted);
}

/* ---- Principles ---- */

.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.principles-grid div {
  display: grid;
  align-content: start;
  gap: 0.5rem;
}

.principles-grid strong {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--theme-text);
}

.principles-grid span {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--theme-text-muted);
}

/* ---- Responsive ---- */

@media (max-width: 980px) {
  .swatch-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .surface-grid,
  .radius-grid,
  .shadow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }

  .type-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}

@media (max-width: 600px) {
  .swatch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
