/* =========================================================
   PATENTA THEORY PAGES
   Chapters index + single signal detail
   ========================================================= */

:root {
  --theory-navy: #052f43;
  --theory-navy-2: #063f59;
  --theory-teal: #0c8d96;
  --theory-cyan: #69d7ea;
  --theory-orange: #ffb12e;
  --theory-ink: #102433;
  --theory-muted: #6f8190;
  --theory-line: #dce7ed;
  --theory-bg: #f2f7fa;
  --theory-card: #ffffff;
  --theory-shadow: 0 20px 52px rgba(11, 52, 72, 0.11);
  --theory-shadow-soft: 0 12px 34px rgba(11, 52, 72, 0.08);
  --theory-radius-xl: 30px;
  --theory-radius-lg: 24px;
  --theory-radius-md: 18px;
}

html {
  scroll-behavior: smooth;
}

body.content-page-body.theory-chapters-body,
body.content-page-body.signal-detail-body {
  background:
    radial-gradient(circle at 5% 10%, rgba(105, 215, 234, 0.15), transparent 28rem),
    linear-gradient(180deg, #f8fbfd 0%, var(--theory-bg) 100%);
  color: var(--theory-ink);
  overflow-x: clip;
}

.theory-subpage {
  padding-top: var(--header-height, 64px);
}

.theory-subpage img,
.theory-subpage svg {
  max-width: 100%;
}

.theory-subpage a {
  text-decoration: none;
}

.theory-subpage .content-container {
  width: min(100% - 32px, 1510px);
  max-width: 1510px;
  margin-inline: auto;
}

.reveal-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .55s ease, transform .55s ease;
}

.reveal-up.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------
   CHAPTERS INDEX
   --------------------------------------------------------- */
.chapter-index-hero {
  position: relative;
  padding: clamp(42px, 6vw, 92px) 0 clamp(24px, 3vw, 42px);
  isolation: isolate;
}

.chapter-index-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 100%;
  background:
    radial-gradient(circle at 76% 12%, rgba(105, 215, 234, .17), transparent 24rem),
    linear-gradient(115deg, rgba(255,255,255,.96), rgba(244,249,252,.95));
  z-index: -2;
}

.chapter-index-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -210px;
  width: 470px;
  aspect-ratio: 1;
  border: 1px solid rgba(12, 141, 150, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 74px rgba(12,141,150,.035), 0 0 0 148px rgba(12,141,150,.022);
  z-index: -1;
}

.theory-breadcrumb,
.signal-detail-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: clamp(22px, 3vw, 38px);
  color: #738694;
  font-size: .92rem;
  font-weight: 700;
}

.theory-breadcrumb a,
.signal-detail-breadcrumb a {
  color: #5d7585;
  transition: color .2s ease;
}

.theory-breadcrumb a:hover,
.signal-detail-breadcrumb a:hover {
  color: var(--theory-teal);
}

.theory-breadcrumb svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chapter-index-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(390px, .75fr);
  gap: clamp(30px, 6vw, 100px);
  align-items: end;
}

.chapter-index-hero__copy {
  min-width: 0;
}

.theory-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid rgba(12, 141, 150, .14);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(105, 215, 234, .2), rgba(255,255,255,.9));
  color: #087486;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
  box-shadow: 0 8px 22px rgba(12,141,150,.08);
}

.theory-pill svg,
.chapter-topic-note__icon svg,
.chapter-safety-note__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chapter-index-hero h1 {
  max-width: 760px;
  margin: 18px 0 12px;
  color: var(--theory-navy);
  font-size: clamp(2.7rem, 5.8vw, 5.9rem);
  line-height: .96;
  letter-spacing: -.055em;
  font-weight: 900;
}

.chapter-index-hero__copy > p {
  max-width: 820px;
  margin: 0;
  color: var(--theory-muted);
  font-size: clamp(1rem, 1.5vw, 1.28rem);
  line-height: 1.7;
}

.chapter-topic-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  min-width: 0;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(7, 75, 96, .11);
  border-bottom: 4px solid var(--theory-teal);
  border-radius: var(--theory-radius-lg);
  background: rgba(255,255,255,.9);
  box-shadow: var(--theory-shadow-soft);
  backdrop-filter: blur(12px);
}

.chapter-topic-note__icon {
  display: grid;
  place-items: center;
  width: 54px;
  aspect-ratio: 1;
  border-radius: 16px;
  background: linear-gradient(145deg, #e4fbfc, #f7ffff);
  color: var(--theory-teal);
}

.chapter-topic-note h2 {
  margin: 2px 0 8px;
  color: var(--theory-ink);
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  font-weight: 900;
}

.chapter-topic-note p {
  margin: 0;
  color: var(--theory-muted);
  line-height: 1.65;
}

.chapter-grid-section {
  padding: 18px 0 clamp(70px, 8vw, 120px);
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.1vw, 30px);
}

.chapter-card {
  position: relative;
  display: grid;
  grid-template-columns: clamp(130px, 11vw, 175px) minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 220px;
  padding: clamp(18px, 2vw, 28px);
  border: 1px solid rgba(9, 70, 91, .11);
  border-radius: var(--theory-radius-lg);
  background: linear-gradient(150deg, rgba(255,255,255,.99), rgba(249,252,253,.98));
  box-shadow: var(--theory-shadow-soft);
  overflow: hidden;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.chapter-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--theory-cyan), var(--theory-teal));
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .28s ease;
}

.chapter-card::after {
  content: "";
  position: absolute;
  width: 180px;
  aspect-ratio: 1;
  right: -90px;
  bottom: -105px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(105,215,234,.16), rgba(105,215,234,0) 68%);
  pointer-events: none;
}

.chapter-card:hover,
.chapter-card:focus-within {
  transform: translateY(-6px);
  border-color: rgba(12, 141, 150, .28);
  box-shadow: 0 24px 50px rgba(7, 54, 74, .14);
}

.chapter-card:hover::before,
.chapter-card:focus-within::before {
  transform: scaleY(1);
}

.chapter-card__media {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
}

.chapter-card__image-ring {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(9, 70, 91, .09);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 24%, #fff 0 23%, #f2f7f9 72%, #e8f2f5 100%);
  box-shadow: inset 0 0 0 10px rgba(255,255,255,.8), 0 12px 26px rgba(5, 47, 67, .12);
  transition: transform .3s ease;
}

.chapter-card:hover .chapter-card__image-ring {
  transform: scale(1.035) rotate(-1.5deg);
}

.chapter-card__image-ring img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.chapter-card__content {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding-left: clamp(16px, 2vw, 26px);
}

.chapter-card__title-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.chapter-card__number {
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  border-radius: 11px;
  background: linear-gradient(145deg, #0c9aa3, #076c7c);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(7, 108, 124, .22);
}

.chapter-card h2 {
  margin: 0;
  min-width: 0;
  color: var(--theory-ink);
  font-size: clamp(1.12rem, 1.35vw, 1.42rem);
  line-height: 1.2;
  font-weight: 900;
}

.chapter-card__content > p {
  margin: 14px 0 12px;
  color: var(--theory-muted);
  font-size: .94rem;
  font-weight: 700;
}

.chapter-card__rule {
  display: block;
  width: 100%;
  height: 2px;
  margin-bottom: 14px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--theory-teal), rgba(12,141,150,.12));
}

.chapter-card__action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--theory-navy-2);
  font-weight: 900;
}

.chapter-card__action span {
  display: grid;
  place-items: center;
  width: 40px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #e7f7f8;
  color: var(--theory-teal);
  font-size: 1.25rem;
  transition: transform .24s ease, background .24s ease, color .24s ease;
}

.chapter-card:hover .chapter-card__action span {
  transform: translateX(4px);
  background: var(--theory-teal);
  color: #fff;
}

.chapter-safety-note {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(260px, 420px);
  gap: 22px;
  align-items: center;
  margin-top: clamp(24px, 3vw, 42px);
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(12,141,150,.24);
  border-radius: var(--theory-radius-lg);
  background:
    linear-gradient(100deg, rgba(229,249,251,.96), rgba(255,255,255,.98) 70%),
    #fff;
  box-shadow: var(--theory-shadow-soft);
  overflow: hidden;
}

.chapter-safety-note__icon {
  display: grid;
  place-items: center;
  width: 64px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(145deg, #0aa0aa, #075a70);
  color: #fff;
  box-shadow: 0 12px 26px rgba(7,90,112,.22);
}

.chapter-safety-note h2 {
  margin: 0 0 6px;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  font-weight: 900;
}

.chapter-safety-note p {
  margin: 0;
  color: var(--theory-muted);
  line-height: 1.62;
}

.chapter-safety-note__art {
  position: relative;
  min-height: 100px;
}

.chapter-safety-note__art::before,
.chapter-safety-note__art::after {
  content: "";
  position: absolute;
  inset: auto 0 12px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #7fd8df 25%, #7fd8df 75%, transparent);
  border-radius: 50%;
}

.chapter-safety-note__art::after {
  inset: 20px 45px auto;
  width: 110px;
  height: 58px;
  margin-inline: auto;
  border: 4px solid #078490;
  border-top-width: 13px;
  border-radius: 20px 20px 12px 12px;
  background: rgba(255,255,255,.35);
  box-shadow: 0 44px 0 -36px #078490;
}

/* ---------------------------------------------------------
   SIGNAL DETAIL PAGE
   --------------------------------------------------------- */
.signal-detail-page {
  background: var(--theory-bg);
}

.signal-detail-hero {
  position: relative;
  padding: clamp(34px, 4vw, 66px) 0 clamp(80px, 8vw, 118px);
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 8%, rgba(105,215,234,.18), transparent 28rem),
    linear-gradient(120deg, #063f59, #052f43 68%, #072b3d);
}

.signal-detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  background:
    radial-gradient(circle at 92% 28%, rgba(105,215,234,.85) 0 3px, transparent 4px) 0 0 / 24px 24px,
    linear-gradient(115deg, transparent 0 63%, rgba(255,255,255,.10) 63.2% 63.5%, transparent 63.8%);
  mask-image: linear-gradient(90deg, transparent 0 55%, #000 78%);
}

.signal-detail-hero::after {
  content: "";
  position: absolute;
  width: 620px;
  height: 150px;
  right: 12%;
  bottom: 18px;
  border: 2px solid rgba(255,255,255,.11);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(-11deg);
}

.signal-detail-hero .content-container {
  position: relative;
  z-index: 1;
}

.signal-detail-breadcrumb {
  margin-bottom: 22px;
  color: rgba(255,255,255,.64);
}

.signal-detail-breadcrumb a {
  color: rgba(255,255,255,.78);
}

.signal-detail-breadcrumb strong {
  color: #fff;
}

.signal-detail-hero__title {
  display: flex;
  align-items: center;
  gap: 18px;
}

.signal-detail-hero__icon {
  display: grid;
  place-items: center;
  width: 62px;
  aspect-ratio: 1;
  border: 2px solid rgba(255,255,255,.86);
  border-radius: 21px;
  color: #fff;
}

.signal-detail-hero__icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.signal-detail-hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4.8vw, 4.8rem);
  line-height: 1;
  letter-spacing: -.045em;
  font-weight: 900;
}

.signal-detail-hero p {
  margin: 9px 0 0;
  color: rgba(255,255,255,.74);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  font-weight: 700;
}

.signal-detail-content {
  position: relative;
  z-index: 2;
  margin-top: clamp(-62px, -5vw, -92px);
  padding-bottom: clamp(70px, 8vw, 120px);
}

.signal-detail-card {
  display: grid;
  grid-template-columns: 145px minmax(420px, .92fr) minmax(430px, 1fr);
  grid-template-areas:
    "refs showcase info"
    ". nav nav";
  gap: clamp(22px, 2vw, 32px);
  align-items: stretch;
  padding: clamp(20px, 2.6vw, 38px);
  border: 1px solid rgba(5,47,67,.10);
  border-radius: var(--theory-radius-xl);
  background: rgba(255,255,255,.97);
  box-shadow: var(--theory-shadow);
  backdrop-filter: blur(16px);
}

.reference-slider {
  grid-area: refs;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-self: stretch;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--theory-line);
  border-radius: 20px;
  background: linear-gradient(180deg, #fbfdfe, #f4f8fa);
}

.reference-slider__control {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  margin-inline: auto;
  border: 1px solid #cbd9e0;
  border-radius: 12px;
  background: #fff;
  color: var(--theory-navy-2);
  box-shadow: 0 6px 14px rgba(6,63,89,.08);
  transition: transform .2s ease, color .2s ease, background .2s ease;
}

.reference-slider__control:hover,
.reference-slider__control:focus-visible {
  transform: translateY(-1px);
  background: var(--theory-navy-2);
  color: #fff;
}

.reference-slider__control svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reference-slider__viewport {
  min-height: 0;
  overflow: hidden;
}

.reference-slider__track {
  display: grid;
  gap: 10px;
  align-content: start;
  transition: transform .3s ease;
  touch-action: pan-y;
}

.reference-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.25;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 7px 16px rgba(7,54,74,.08);
  transition: border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}

.reference-thumb:hover {
  transform: translateY(-2px);
}

.reference-thumb.is-active {
  border-color: var(--theory-teal);
  box-shadow: 0 0 0 3px rgba(12,141,150,.13), 0 9px 18px rgba(7,54,74,.12);
}

.reference-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reference-thumb > span {
  position: absolute;
  z-index: 2;
  top: 7px;
  left: 7px;
  display: grid;
  place-items: center;
  width: 26px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(5,47,67,.9);
  color: #fff;
  font-size: .77rem;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(0,0,0,.16);
}

.reference-slider__dots {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.reference-slider__dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cdd9df;
}

.reference-slider__dots i.is-active {
  background: var(--theory-teal);
  transform: scale(1.25);
}

.reference-slider > p {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 2px 0 0;
  color: #7b8b97;
  font-size: .76rem;
  line-height: 1.35;
}

.reference-slider > p svg {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.signal-showcase {
  grid-area: showcase;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(18px, 2vw, 28px);
  border: 1px solid var(--theory-line);
  border-radius: var(--theory-radius-lg);
  background:
    radial-gradient(circle at 50% 42%, rgba(105,215,234,.12), transparent 42%),
    linear-gradient(180deg, #fff, #f8fbfc);
}

.signal-showcase__stage {
  display: grid;
  place-items: center;
  flex: 1;
  min-height: clamp(390px, 36vw, 600px);
  border-radius: 20px;
  overflow: hidden;
}

.signal-showcase__stage img {
  width: min(100%, 620px);
  max-height: 570px;
  object-fit: contain;
  filter: drop-shadow(0 25px 25px rgba(5,47,67,.13));
  transition: transform .35s ease, opacity .28s ease;
}

.signal-showcase__stage.is-changing img {
  opacity: .35;
  transform: scale(.96);
}

.signal-showcase__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

.signal-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid #d6e2e7;
  border-radius: 13px;
  background: #fff;
  color: #385064;
  font-size: .91rem;
  font-weight: 900;
  box-shadow: 0 7px 16px rgba(7,54,74,.07);
  transition: transform .2s ease, border-color .2s ease, color .2s ease;
}

.signal-action-btn:hover,
.signal-action-btn:focus-visible,
.signal-action-btn[aria-pressed="true"] {
  transform: translateY(-2px);
  border-color: rgba(12,141,150,.42);
  color: var(--theory-teal);
}

.signal-action-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.signal-info {
  grid-area: info;
  min-width: 0;
  padding: clamp(4px, 1vw, 12px) clamp(4px, 1vw, 10px);
}

.signal-info__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
}

.signal-info__chips span {
  display: inline-flex;
  align-items: center;
  min-height: 39px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: .84rem;
  font-weight: 900;
}

.signal-info__chips span:first-child {
  background: var(--theory-navy-2);
  color: #fff;
}

.signal-info__chips span:last-child {
  background: #e4f7f8;
  color: #087581;
}

.signal-info h2 {
  margin: 0;
  padding-bottom: 18px;
  border-bottom: 1px solid #cfdae0;
  color: var(--theory-ink);
  font-size: clamp(1.9rem, 3.4vw, 3.15rem);
  line-height: 1.06;
  letter-spacing: -.035em;
  font-weight: 900;
}

.signal-info__description {
  margin-top: 20px;
  color: #455d6f;
  font-size: clamp(.98rem, 1.05vw, 1.1rem);
  line-height: 1.72;
}

.signal-info__description p {
  margin: 0 0 13px;
}

.signal-info__more[hidden] {
  display: none;
}

.signal-audio {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(120px, 180px);
  gap: 14px;
  align-items: center;
  width: 100%;
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid #d7e3e8;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #f7fbfc);
  text-align: left;
  color: var(--theory-ink);
  box-shadow: 0 8px 20px rgba(7,54,74,.06);
}

.signal-audio__play {
  display: grid;
  place-items: center;
  width: 52px;
  aspect-ratio: 1;
  border: 3px solid var(--theory-teal);
  border-radius: 50%;
  color: var(--theory-teal);
}

.signal-audio__play svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.signal-audio__label {
  display: grid;
  gap: 2px;
}

.signal-audio__label strong {
  font-size: .98rem;
  font-weight: 900;
}

.signal-audio__label small {
  color: #7b8b97;
  font-weight: 700;
}

.signal-audio__wave {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  height: 36px;
}

.signal-audio__wave i {
  width: 3px;
  height: 12px;
  border-radius: 99px;
  background: var(--theory-teal);
  opacity: .8;
}

.signal-audio__wave i:nth-child(2n) { height: 24px; }
.signal-audio__wave i:nth-child(3n) { height: 34px; }

.signal-audio[aria-pressed="true"] .signal-audio__wave i {
  animation: theoryWave .7s ease-in-out infinite alternate;
}

.signal-audio[aria-pressed="true"] .signal-audio__wave i:nth-child(2n) { animation-delay: -.25s; }
.signal-audio[aria-pressed="true"] .signal-audio__wave i:nth-child(3n) { animation-delay: -.45s; }

@keyframes theoryWave {
  to { height: 8px; opacity: .45; }
}

.signal-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 12px;
  padding: 0 17px;
  border: 1px solid #d7e3e8;
  border-radius: 12px;
  background: #fff;
  color: var(--theory-ink);
  font-weight: 900;
}

.signal-more-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform .2s ease;
}

.signal-more-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.signal-chapter-nav {
  grid-area: nav;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 2px;
}

.signal-chapter-nav__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  min-height: 86px;
  padding: 12px 16px;
  border: 1px solid #d6e2e7;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #f8fbfc);
  color: var(--theory-ink);
  box-shadow: 0 8px 18px rgba(7,54,74,.05);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.signal-chapter-nav__item:hover {
  transform: translateY(-3px);
  border-color: rgba(12,141,150,.36);
  box-shadow: 0 14px 26px rgba(7,54,74,.09);
}

.signal-chapter-nav__item--next {
  text-align: right;
}

.signal-chapter-nav__arrow {
  display: grid;
  place-items: center;
  width: 46px;
  aspect-ratio: 1;
  border-radius: 12px;
  background: var(--theory-navy-2);
  color: #fff;
  font-size: 1.4rem;
}

.signal-chapter-nav__item small,
.signal-chapter-nav__item strong {
  display: block;
}

.signal-chapter-nav__item small {
  margin-bottom: 3px;
  color: #82919c;
  font-weight: 700;
}

.signal-chapter-nav__item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 900;
}

.signal-chapter-nav__item b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  background: #e6f7f8;
  color: #087581;
  font-size: .84rem;
}

/* reference lightbox */
.reference-lightbox {
  position: fixed;
  z-index: 99999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 24, 35, .82);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

.reference-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.reference-lightbox__dialog {
  position: relative;
  width: min(100%, 980px);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
  overflow: hidden;
}

.reference-lightbox__dialog img {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #eef5f7;
}

.reference-lightbox__caption {
  padding: 15px 20px;
  color: var(--theory-ink);
  font-weight: 800;
}

.reference-lightbox__close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: rgba(5,47,67,.9);
  color: #fff;
  font-size: 1.4rem;
}

/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */
@media (max-width: 1399.98px) {
  .theory-subpage .content-container {
    width: min(100% - 28px, 1260px);
  }

  .chapter-card {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .signal-detail-card {
    grid-template-columns: 125px minmax(380px, .9fr) minmax(380px, 1fr);
  }
}

@media (max-width: 1199.98px) {
  .chapter-index-hero__grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .chapter-topic-note {
    max-width: 820px;
  }

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

  .signal-detail-card {
    grid-template-columns: minmax(0, 1fr) minmax(340px, .92fr);
    grid-template-areas:
      "showcase info"
      "refs info"
      "nav nav";
  }

  .reference-slider {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    align-self: auto;
  }

  .reference-slider__control--prev svg { transform: rotate(-90deg); }
  .reference-slider__control--next svg { transform: rotate(-90deg); }

  .reference-slider__viewport {
    overflow: hidden;
  }

  .reference-slider__track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    touch-action: pan-x;
  }

  .reference-slider__track::-webkit-scrollbar { display: none; }

  .reference-thumb {
    flex: 0 0 120px;
    scroll-snap-align: center;
  }

  .reference-slider__dots,
  .reference-slider > p {
    grid-column: 1 / -1;
  }

  .reference-slider > p {
    justify-content: center;
  }
}

@media (max-width: 991.98px) {
  .theory-subpage {
    padding-top: var(--header-height, 62px);
  }

  .chapter-index-hero h1 {
    max-width: 640px;
  }

  .chapter-safety-note {
    grid-template-columns: auto 1fr;
  }

  .chapter-safety-note__art {
    display: none;
  }

  .signal-detail-hero {
    padding-bottom: 80px;
  }

  .signal-detail-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "showcase"
      "refs"
      "info"
      "nav";
    padding: 22px;
  }

  .signal-showcase__stage {
    min-height: 480px;
  }

  .signal-info {
    padding: 8px 2px 0;
  }
}

@media (max-width: 767.98px) {
  .theory-subpage .content-container {
    width: min(100% - 20px, 680px);
  }

  .chapter-index-hero {
    padding-top: 30px;
  }

  .theory-breadcrumb,
  .signal-detail-breadcrumb {
    gap: 7px;
    font-size: .78rem;
  }

  .chapter-index-hero h1 {
    font-size: clamp(2.45rem, 12vw, 4.25rem);
  }

  .chapter-index-hero__copy > p {
    font-size: .98rem;
  }

  .chapter-topic-note {
    grid-template-columns: 46px 1fr;
    gap: 14px;
    padding: 18px;
  }

  .chapter-topic-note__icon {
    width: 46px;
  }

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

  .chapter-card {
    grid-template-columns: 118px minmax(0, 1fr);
    min-height: 180px;
    padding: 16px;
    border-radius: 20px;
  }

  .chapter-card__content {
    padding-left: 14px;
  }

  .chapter-card__number {
    width: 34px;
  }

  .chapter-card h2 {
    font-size: 1.05rem;
  }

  .chapter-card__content > p {
    margin: 10px 0;
    font-size: .83rem;
  }

  .chapter-card__action {
    font-size: .89rem;
  }

  .chapter-card__action span {
    width: 36px;
  }

  .chapter-safety-note {
    grid-template-columns: 52px 1fr;
    gap: 14px;
    padding: 19px;
  }

  .chapter-safety-note__icon {
    width: 52px;
  }

  .signal-detail-hero {
    padding-top: 26px;
    padding-bottom: 64px;
  }

  .signal-detail-hero__title {
    align-items: flex-start;
    gap: 13px;
  }

  .signal-detail-hero__icon {
    width: 48px;
    border-radius: 15px;
  }

  .signal-detail-hero h1 {
    font-size: clamp(2rem, 11vw, 3.25rem);
  }

  .signal-detail-content {
    margin-top: -46px;
  }

  .signal-detail-card {
    padding: 13px;
    gap: 16px;
    border-radius: 22px;
  }

  .signal-showcase {
    padding: 14px;
    border-radius: 18px;
  }

  .signal-showcase__stage {
    min-height: 340px;
  }

  .signal-showcase__stage img {
    width: min(100%, 440px);
  }

  .signal-showcase__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-action-btn {
    min-width: 0;
    padding-inline: 10px;
    font-size: .79rem;
  }

  .reference-slider {
    padding: 9px;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
  }

  .reference-slider__control {
    width: 38px;
  }

  .reference-thumb {
    flex-basis: 104px;
  }

  .signal-info__chips span {
    min-height: 36px;
    padding-inline: 13px;
  }

  .signal-info h2 {
    font-size: clamp(1.75rem, 8vw, 2.45rem);
  }

  .signal-info__description {
    font-size: .95rem;
  }

  .signal-audio {
    grid-template-columns: auto 1fr;
  }

  .signal-audio__wave {
    grid-column: 1 / -1;
    justify-content: center;
    height: 24px;
  }

  .signal-chapter-nav {
    grid-template-columns: 1fr;
  }

  .signal-chapter-nav__item--next {
    text-align: left;
  }

  .signal-chapter-nav__item--next span:first-child {
    order: 2;
  }

  .signal-chapter-nav__item--next b {
    order: 3;
  }

  .signal-chapter-nav__item--next .signal-chapter-nav__arrow {
    order: 1;
  }
}

@media (max-width: 479.98px) {
  .theory-pill {
    min-height: 38px;
    padding-inline: 13px;
    font-size: .72rem;
  }

  .chapter-card {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 154px;
  }

  .chapter-card__content {
    padding-left: 10px;
  }

  .chapter-card__title-row {
    gap: 8px;
  }

  .chapter-card__number {
    width: 30px;
    border-radius: 9px;
    font-size: .82rem;
  }

  .chapter-card h2 {
    font-size: .95rem;
  }

  .chapter-card__rule {
    margin-bottom: 10px;
  }

  .chapter-safety-note {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .chapter-safety-note__icon {
    margin-inline: auto;
  }

  .signal-detail-card {
    padding: 10px;
  }

  .signal-showcase__stage {
    min-height: 280px;
  }

  .signal-showcase__actions {
    grid-template-columns: 1fr;
  }

  .reference-slider {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
  }

  .reference-slider__control {
    width: 34px;
    border-radius: 10px;
  }

  .reference-thumb {
    flex-basis: 92px;
  }

  .signal-audio__play {
    width: 46px;
  }

  .signal-chapter-nav__item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .signal-chapter-nav__item b {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* =========================================================
   PREVIOUS / NEXT SIGNAL CARDS WITH SIGNAL IMAGES
   ========================================================= */
.signal-chapter-nav__item {
  grid-template-columns: auto 76px minmax(0, 1fr) auto;
  min-height: 108px;
  padding: 12px 14px;
  gap: 13px;
  overflow: hidden;
}

.signal-chapter-nav__item--next {
  grid-template-columns: auto minmax(0, 1fr) 76px auto;
}

.signal-chapter-nav__thumb {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding: 8px;
  border: 1px solid #dce8ec;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff, #f3f8fa);
  box-shadow: 0 8px 18px rgba(7, 54, 74, .08);
  overflow: hidden;
}

.signal-chapter-nav__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .24s ease;
}

.signal-chapter-nav__item:hover .signal-chapter-nav__thumb img {
  transform: scale(1.07);
}

.signal-chapter-nav__copy {
  min-width: 0;
}

.signal-chapter-nav__item--next .signal-chapter-nav__copy {
  text-align: right;
}

@media (max-width: 767.98px) {
  .signal-chapter-nav__item,
  .signal-chapter-nav__item--next {
    grid-template-columns: 58px 64px minmax(0, 1fr);
    min-height: 104px;
    padding: 12px;
    gap: 11px;
    text-align: left;
  }

  .signal-chapter-nav__item b {
    display: none;
  }

  .signal-chapter-nav__thumb {
    width: 64px;
    height: 64px;
    padding: 6px;
    border-radius: 14px;
  }

  .signal-chapter-nav__arrow {
    width: 58px;
    border-radius: 15px;
  }

  .signal-chapter-nav__item--next .signal-chapter-nav__arrow {
    grid-column: 1;
    grid-row: 1;
    order: initial;
  }

  .signal-chapter-nav__item--next .signal-chapter-nav__thumb {
    grid-column: 2;
    grid-row: 1;
  }

  .signal-chapter-nav__item--next .signal-chapter-nav__copy {
    grid-column: 3;
    grid-row: 1;
    text-align: left;
    order: initial;
  }

  .signal-chapter-nav__item strong {
    white-space: normal;
    line-height: 1.18;
  }
}

@media (max-width: 479.98px) {
  .signal-chapter-nav__item,
  .signal-chapter-nav__item--next {
    grid-template-columns: 50px 58px minmax(0, 1fr);
    min-height: 96px;
    gap: 9px;
    padding: 10px;
  }

  .signal-chapter-nav__arrow {
    width: 50px;
    font-size: 1.2rem;
  }

  .signal-chapter-nav__thumb {
    width: 58px;
    height: 58px;
  }

  .signal-chapter-nav__item small {
    font-size: .77rem;
  }

  .signal-chapter-nav__item strong {
    font-size: .92rem;
  }
}
