/*
 * Kickopedia Knowledge Depth Pack v12.3
 * Additive layouts for decision guides, worked cases and browser audio comparisons.
 */

.depth-shell {
  padding-block: clamp(2.5rem, 6vw, 5.5rem);
}

.depth-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  margin: 0 0 2rem;
  color: var(--text-faint);
  font-size: .78rem;
}

.depth-breadcrumbs a {
  color: var(--text-soft);
  text-decoration: none;
}

.depth-breadcrumbs a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.depth-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, .55fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: end;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: clamp(1.2rem, 3vw, 2.4rem);
  background:
    radial-gradient(circle at 88% 14%, color-mix(in srgb, var(--accent-soft) 72%, transparent) 0, transparent 32%),
    var(--bg-raised);
  box-shadow: var(--shadow-sm);
}

.depth-hero h1 {
  max-width: 13ch;
  margin-bottom: 1.35rem;
  font-size: clamp(3rem, 7.5vw, 6.8rem);
  letter-spacing: -.06em;
}

.depth-hero .depth-lede {
  max-width: 46rem;
  margin: 0;
  color: var(--text-soft);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.depth-hero-meta {
  display: grid;
  gap: .65rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--bg-raised) 88%, transparent);
}

.depth-hero-meta span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem .2rem;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
}

.depth-hero-meta span:last-child {
  border-bottom: 0;
}

.depth-hero-meta strong {
  color: var(--text);
  font-size: 1.35rem;
}

.depth-jump {
  position: sticky;
  z-index: 20;
  top: 4.25rem;
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  margin: 1rem 0 3.5rem;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(14px);
  scrollbar-width: thin;
}

.depth-jump a {
  flex: 0 0 auto;
  padding: .55rem .75rem;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: .78rem;
  font-weight: 680;
  text-decoration: none;
}

.depth-jump a:hover {
  background: var(--bg-raised);
  color: var(--text);
}

.depth-section {
  margin-block: clamp(4rem, 10vw, 8rem);
  scroll-margin-top: 8rem;
}

.depth-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(16rem, .55fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

.depth-section-head h2 {
  max-width: 15ch;
  margin: 0;
}

.depth-section-head > p {
  margin: 0;
  color: var(--text-soft);
}

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

.depth-card,
.depth-chapter,
.depth-case,
.depth-demo,
.depth-method {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--shadow-sm);
}

.depth-card {
  display: flex;
  min-height: 18rem;
  flex-direction: column;
  padding: 1.5rem;
  color: var(--text);
  text-decoration: none;
}

.depth-card:hover {
  border-color: var(--line-strong);
  color: var(--text);
  transform: translateY(-2px);
}

.depth-card-index,
.depth-kicker,
.depth-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 1.8rem;
  padding: .32rem .62rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-soft);
  font-size: .68rem;
  font-weight: 780;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}

.depth-card h3 {
  margin: 2.4rem 0 .8rem;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.depth-card p {
  margin-bottom: 1.5rem;
  color: var(--text-soft);
}

.depth-card em {
  margin-top: auto;
  color: var(--accent-strong);
  font-size: .8rem;
  font-style: normal;
  font-weight: 720;
}

.depth-method {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.depth-method div {
  min-height: 13rem;
  padding: 1.5rem;
  border-right: 1px solid var(--line);
}

.depth-method div:last-child {
  border-right: 0;
}

.depth-method strong {
  display: block;
  margin-bottom: .65rem;
  color: var(--accent-strong);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.depth-method p {
  margin: 0;
  color: var(--text-soft);
  font-size: .92rem;
}

.depth-callout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: var(--radius-lg);
  background: var(--bg-accent);
}

.depth-callout h2 {
  margin-bottom: .7rem;
}

.depth-callout p {
  max-width: 48rem;
  margin: 0;
  color: var(--text-soft);
}

.depth-article-head {
  max-width: 58rem;
  margin-bottom: 3rem;
}

.depth-article-head h1 {
  max-width: 14ch;
  margin-bottom: 1.4rem;
}

.depth-article-head .depth-lede {
  color: var(--text-soft);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.depth-chapters,
.depth-cases,
.depth-demos {
  display: grid;
  gap: 1.25rem;
}

.depth-chapter,
.depth-case {
  padding: clamp(1.5rem, 4vw, 3rem);
  scroll-margin-top: 8rem;
}

.depth-chapter-head,
.depth-case-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 2rem;
}

.depth-chapter-number {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-size: .8rem;
  font-weight: 800;
}

.depth-chapter h2,
.depth-case h2 {
  margin: 0 0 .5rem;
  font-size: clamp(1.75rem, 4vw, 3.15rem);
}

.depth-chapter-head p,
.depth-case-head p {
  max-width: 50rem;
  margin: 0;
  color: var(--text-soft);
}

.depth-immediate {
  margin: 0 0 2rem;
  padding: 1.25rem 1.35rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--bg-accent);
}

.depth-immediate strong {
  display: block;
  margin-bottom: .35rem;
  color: var(--accent-strong);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.depth-immediate p {
  margin: 0;
  font-size: 1.04rem;
}

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

.depth-panel {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}

.depth-panel h3 {
  margin-bottom: .75rem;
}

.depth-panel p:last-child,
.depth-panel ul:last-child,
.depth-panel ol:last-child {
  margin-bottom: 0;
}

.depth-panel li {
  padding-left: .2rem;
}

.depth-decision-table {
  width: 100%;
  margin: 1.2rem 0 2rem;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: .9rem;
}

.depth-decision-table th,
.depth-decision-table td {
  padding: .85rem 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.depth-decision-table th:last-child,
.depth-decision-table td:last-child {
  border-right: 0;
}

.depth-decision-table tr:last-child td {
  border-bottom: 0;
}

.depth-decision-table th {
  background: var(--bg-subtle);
  color: var(--text-soft);
  font-size: .68rem;
  letter-spacing: .07em;
  text-transform: uppercase;
}

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

.depth-case-step {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}

.depth-case-step strong {
  display: block;
  margin-bottom: .5rem;
  color: var(--accent-strong);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.depth-case-step p {
  margin: 0;
  color: var(--text-soft);
  font-size: .9rem;
}

.depth-note {
  margin: 1.25rem 0 0;
  color: var(--text-faint);
  font-size: .82rem;
}

.depth-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, .58fr);
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  scroll-margin-top: 8rem;
}

.depth-demo h2 {
  margin: .6rem 0 .65rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.depth-demo p {
  margin: 0;
  color: var(--text-soft);
}

.depth-demo-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.depth-demo-button,
.depth-stop-all {
  min-height: 3rem;
  padding: .65rem .8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  color: var(--text);
  font-weight: 720;
  cursor: pointer;
}

.depth-demo-button:hover,
.depth-demo-button[aria-pressed="true"] {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.depth-demo-status {
  grid-column: 1 / -1;
  min-height: 1.45rem;
  margin: .25rem 0 0;
  color: var(--text-faint);
  font-size: .78rem;
}

.depth-stop-all {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.depth-stop-all:hover {
  background: var(--accent);
  color: #fff;
}

.depth-audio-notice {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}

.depth-audio-notice p {
  margin: 0;
  color: var(--text-soft);
  font-size: .9rem;
}

.depth-sources {
  max-width: 56rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.depth-sources h2 {
  margin-bottom: 1rem;
  font-size: 1.45rem;
}

.depth-sources li {
  color: var(--text-soft);
  font-size: .9rem;
}

.depth-sources a {
  overflow-wrap: anywhere;
}

@media (max-width: 58rem) {
  .depth-hero,
  .depth-section-head,
  .depth-demo {
    grid-template-columns: 1fr;
  }

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

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

  .depth-method div:nth-child(2) {
    border-right: 0;
  }

  .depth-method div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 39rem) {
  .depth-shell {
    padding-top: 1.5rem;
  }

  .depth-hero {
    padding: 1.35rem;
  }

  .depth-hero h1 {
    font-size: clamp(2.6rem, 15vw, 4.2rem);
  }

  .depth-jump {
    top: 4rem;
    margin-bottom: 2.5rem;
  }

  .depth-grid,
  .depth-columns,
  .depth-case-grid,
  .depth-method {
    grid-template-columns: 1fr;
  }

  .depth-method div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .depth-method div:last-child {
    border-bottom: 0;
  }

  .depth-callout,
  .depth-audio-notice {
    grid-template-columns: 1fr;
  }

  .depth-chapter,
  .depth-case {
    padding: 1.25rem;
  }

  .depth-chapter-head,
  .depth-case-head {
    grid-template-columns: 1fr;
  }

  .depth-decision-table {
    display: block;
    overflow-x: auto;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .depth-card {
    transition: transform 160ms ease, border-color 160ms ease;
  }
}
