/* TubeCF's shared glyphs and final surface details. */
:root {
  --detail-line: rgb(255 255 255 / 14%);
  --detail-paper-line: rgb(53 27 33 / 19%);
  --detail-text: #ded8dc;
  --detail-red: #a50a19;
  --icon-accent: #ff7480;
}

.icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.detail-icon {
  display: block;
  flex: none;
  fill: none;
  color: inherit;
}

:is(.button, .header-cta, .mobile-nav-action, .contact-link) .detail-icon {
  translate: 0 0;
  transition: translate 240ms var(--v3-ease);
}

.button:hover .link-icon,
.contact-link:not(.is-placeholder):hover .link-icon {
  transform: none;
  translate: -2px -2px;
}

.nav-toggle .nav-toggle-glyph {
  inset: auto;
  position: relative;
  display: grid;
  width: 20px;
  height: 20px;
}

.nav-toggle[aria-expanded="true"] > span.nav-toggle-glyph {
  opacity: 1;
  transform: none;
}

.nav-toggle-glyph .detail-icon {
  grid-area: 1 / 1;
  color: #f7f1f3;
  transition: opacity 180ms ease, transform 240ms var(--v3-ease);
}

.nav-symbol-close,
.nav-toggle[aria-expanded="true"] .nav-symbol {
  opacity: 0;
  transform: scale(.8);
}

.nav-toggle[aria-expanded="true"] .nav-symbol-close {
  opacity: 1;
  transform: none;
}

.scene-cue {
  min-height: 44px;
  padding-inline: 9px;
  color: #e2d6dc;
}

.cue-symbol {
  color: var(--icon-accent);
}

.primary-nav :is(.nav-links, .nav-panel-heading) p {
  color: #d3c9cf;
}

/* Three clearly identified interruptions inside one film-monitor surface. */
.problem .overload-visual {
  display: grid;
  align-self: center;
  height: auto;
  margin: 0;
  overflow: visible;
  contain: none;
}

.problem .overload-stage {
  position: relative;
  inset: auto;
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3.2vw, 42px);
  border: 1px solid #554047;
  border-radius: 16px;
  box-shadow: 0 20px 58px rgb(55 21 30 / 15%);
  background:
    radial-gradient(ellipse at 92% 4%, #3a1922, transparent 65%),
    #141115;
}

.problem .overload-stage::before,
.problem .overload-stage::after {
  display: none;
}

.problem .overload-stage-head,
.problem .overload-stage-foot {
  position: relative;
  inset: auto;
  min-width: 0;
  padding: 0;
  color: #efdee4;
  font-size: .88rem;
}

.problem .overload-stage-head {
  align-items: baseline;
  gap: 9px 16px;
  flex-wrap: wrap;
}

.overload-stage-head strong b {
  color: var(--icon-accent);
  font-variant-numeric: tabular-nums;
}

.problem .overload-streams {
  position: relative;
  inset: auto;
  border-block: 1px solid var(--detail-line);
}

.problem .overload-stream {
  position: relative;
  inset: auto;
  display: grid;
  grid-template-columns: 24px 36px minmax(0, 1fr);
  gap: clamp(8px, 1.6vw, 19px);
  min-height: clamp(65px, 6vw, 92px);
  height: auto;
  padding: 9px 2px;
  backface-visibility: visible;
}

.problem .overload-stream + .overload-stream {
  border-block-start: 1px solid var(--detail-line);
}

.overload-stream-name {
  color: #f6edf1;
  font-size: clamp(1.03rem, 1.6vw, 1.32rem);
  font-weight: 700;
}

.overload-stage-foot span::before {
  display: none;
}

.problem .overload-stream-index {
  transform: none;
  color: #cab6bf;
  font-size: .79rem;
}

.overload-status-icon {
  color: #f4e9ee;
}

.problem .overload-stage-foot {
  justify-content: flex-start;
  gap: 7px;
  min-height: 24px;
  border: 0;
  color: #ffd2d8;
  font-weight: 700;
}

.problem .problem-prompts p {
  min-height: 0;
  padding-block: 12px;
  color: #383036;
  border-color: var(--detail-paper-line);
}

.problem .problem-prompts p:hover {
  padding-inline-start: 0;
  color: #383036;
}

.problem .problem-prompts p:hover::before {
  width: 18px;
}

.problem-index {
  --icon-accent: var(--detail-red);
  display: inline-grid;
  justify-items: center;
  align-self: start;
  gap: 7px;
  padding-block-start: 2px;
  color: var(--detail-red);
  font-size: .76rem;
  font-variant-numeric: tabular-nums;
}

.problem-chapters h3 {
  line-height: 1.35;
  text-wrap: pretty;
}

.problem-chapters article p {
  line-height: 1.85;
}

.transformation-copy h2 {
  max-width: none;
  font-size: clamp(2.45rem, 4.8vw, 5.3rem);
  line-height: 1.1;
  text-wrap: balance;
}

/* The track remains native scroll. A visible scroll thumb signals more categories. */
.uses,
.challenges {
  min-height: 0;
  padding-block: clamp(82px, 10vw, 145px);
}

.uses-explorer,
.challenge-explorer {
  margin-block-start: clamp(32px, 5vw, 68px);
}

:is(.use-tabs, .challenge-tabs) button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 2ch;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 15px;
  transition: color 170ms ease, background-color 170ms ease;
}

:is(.use-tabs, .challenge-tabs) button:hover,
:is(.use-tabs, .challenge-tabs) button[aria-selected="true"] {
  padding: 10px 15px;
}

:is(.use-tabs, .challenge-tabs) button span {
  min-width: 0;
  text-align: start;
  line-height: 1.5;
}

:is(.use-tabs, .challenge-tabs) button b {
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

.category-icon {
  color: #c4b6be;
}

[aria-selected="true"] .category-icon {
  color: #fff6fa;
}

.use-tabs button[aria-selected="true"] {
  background: #2c1620;
}

.use-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  align-content: start;
  gap: clamp(20px, 3.1vw, 41px) 24px;
  min-height: 464px;
  padding: clamp(28px, 5vw, 72px);
  background:
    radial-gradient(ellipse at 100% 0%, #3d1b26, transparent 69%),
    #111013;
}

.use-panel::before,
.use-panel::after {
  display: none;
}

.use-number {
  position: static;
  grid-area: 1 / 2 / 2 / 3;
  justify-self: end;
  align-self: center;
  color: #bb8a99;
  font-variant-numeric: tabular-nums;
  font-size: clamp(3rem, 7vw, 7.2rem);
  letter-spacing: -.035em;
  line-height: .95;
}

.use-panel > div:not(.use-signal) {
  grid-area: 2 / 1 / 3 / -1;
  align-self: center;
  max-width: 66ch;
  margin: 0;
}

.use-panel h3 {
  max-width: none;
  font-size: clamp(1.85rem, 4vw, 4.3rem);
  line-height: 1.16;
  text-wrap: pretty;
}

.use-panel p {
  max-width: 60ch;
  margin-block-start: 14px;
  color: var(--detail-text);
  line-height: 1.85;
}

.use-panel .use-signal {
  position: static;
  grid-area: 1 / 1 / 2 / 2;
  width: fit-content;
  height: auto;
  min-height: 0;
  padding-block-end: 10px;
  border-block-end: 1px solid #814853;
  transform: none;
  color: #fff3f7;
}

.use-feature-icon {
  width: clamp(53px, 7vw, 88px);
  height: auto;
}

.challenges-heading > strong {
  -webkit-text-stroke-color: #735966;
}

.challenges::before {
  height: clamp(82px, 8vw, 112px);
  background: linear-gradient(180deg, var(--v3-paper), #d6c2c7 16%, #583843 49%, #1b1018 77%, transparent);
  pointer-events: none;
}

.challenge-explorer {
  border: 0;
  gap: clamp(18px, 3.5vw, 54px);
}

.challenge-tabs {
  border-inline-end: 0;
}

.challenge-reader {
  padding: clamp(21px, 3.5vw, 46px);
  min-height: clamp(394px, 36vw, 510px);
  border: 1px solid #3f343b;
  border-radius: 14px;
  background: #161317;
}

.challenge-reader .challenge-progress {
  inset: 0 0 auto;
  height: 2px;
  width: auto;
}

.challenge-reader .challenge-progress span {
  width: calc(100% / 7);
  height: 100%;
  transform: translateX(calc(var(--challenge-index, 0) * -100%));
}

.challenge-panel header {
  align-items: center;
  gap: clamp(10px, 1.3vw, 18px);
  padding-block-end: 18px;
}

.reader-icon {
  width: clamp(24px, 3vw, 36px);
  height: auto;
  color: #f4e8ee;
}

.challenge-panel h3 {
  font-size: clamp(1.4rem, 2.7vw, 2.6rem);
  line-height: 1.2;
}

.challenge-panel ol {
  margin-top: 8px;
  column-gap: 24px;
}

.challenge-panel li {
  min-height: 0;
  padding-block: 13px;
  color: var(--detail-text);
}

/* Three matching glyphs and a shared route leave copy room on every screen. */
.journey-cinema {
  min-height: 0;
  padding-block: clamp(30px, 4vw, 60px) clamp(130px, 12vw, 185px);
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 83% 0%, #3a1922, transparent 62%),
    #151216;
  box-shadow: 0 22px 52px rgb(40 20 23 / 16%);
}

.journey-cinema::before {
  display: none;
}

.journey-step {
  padding-inline: clamp(17px, 3.35vw, 49px);
}

.journey-step + .journey-step {
  border-inline-start: 1px solid var(--detail-line);
}

.journey-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "number visual" "copy copy";
  align-items: start;
  gap: 16px 9px;
  min-height: 0;
}

.journey-copy {
  padding: 0;
}

.journey-copy h3 {
  font-size: clamp(1.42rem, 2.25vw, 2.3rem);
  line-height: 1.27;
  text-wrap: pretty;
}

.journey-copy p {
  margin-block-start: 10px;
  max-width: 42ch;
  color: var(--detail-text);
}

.journey-panel .process-number {
  padding-block-end: 6px;
}

.journey-panel .journey-visual {
  width: clamp(58px, 6vw, 86px);
  min-width: 0;
  height: auto;
  aspect-ratio: 1;
  border: 1px solid #69434e;
  border-radius: 14px;
  background: linear-gradient(149deg, #371d27, #1f161c);
  color: #fff1f5;
  box-shadow: none;
}

.journey-feature-icon {
  width: 66%;
  height: auto;
}

.journey-ribbon-bed {
  stroke: #5e3641;
}

.journey-ribbon-shadow {
  display: none;
}

.journey-direction path {
  stroke-width: 2;
  opacity: .78;
}

.journey-traveler circle {
  stroke-width: 2.25px;
}

.contact {
  min-height: 0;
  padding-block-end: clamp(85px, 9vw, 140px);
}

.contact-layout {
  gap: clamp(28px, 5vw, 70px) clamp(30px, 6vw, 94px);
}

.contact-statement h2 {
  max-width: 20ch;
  line-height: 1.09;
}

.contact-brand-lead {
  display: block;
  margin-block-end: .2em;
  font-size: .6em;
  white-space: nowrap;
}

.contact-copy,
.contact-action {
  border-color: var(--detail-line);
}

.contact-copy p,
.contact-action p,
.scope-note,
.copyright {
  color: var(--detail-text);
}

.contact-action {
  justify-content: flex-start;
  align-items: flex-start;
  gap: 19px;
}

.contact-link {
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  padding: 12px 17px;
  line-height: 1.4;
  text-align: start;
}

.contact-link.is-placeholder {
  background: #20171e;
  color: #e1d4dc;
}

.contact-link.is-placeholder .detail-icon {
  opacity: .8;
}

.site-footer .footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-footer .footer-nav a::after {
  bottom: 4px;
}

@media (max-width: 960px) {
  :is(.use-tabs, .challenge-tabs) {
    scrollbar-width: thin;
    scrollbar-color: #b85b68 #242024;
    scroll-snap-type: none;
    padding-block-end: 4px;
  }

  .use-tabs::-webkit-scrollbar,
  .challenge-tabs::-webkit-scrollbar {
    display: block;
    height: 5px;
  }

  :is(.use-tabs, .challenge-tabs)::-webkit-scrollbar-thumb {
    background-color: #b85b68;
    border-radius: 5px;
  }

  :is(.use-tabs, .challenge-tabs) button {
    flex-basis: clamp(152px, 29vw, 206px);
    min-height: 64px;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 9px;
  }

  :is(.use-tabs, .challenge-tabs) button b {
    display: none;
  }

  .use-panel {
    min-height: 346px;
  }

  .challenge-reader {
    min-height: 350px;
  }

  .journey-cinema {
    gap: 0;
    padding: 13px 58px 15px 20px;
  }

  .journey-step {
    min-height: 0;
    padding: 19px 0 22px;
  }

  .journey-step + .journey-step {
    border-inline-start: 0;
    border-block-start: 1px solid var(--detail-line);
  }

  .journey-panel {
    grid-template-areas: "number visual" "copy copy";
    gap: 9px;
  }

  .journey-panel .journey-visual {
    width: 60px;
  }

  .journey-copy p {
    max-width: 59ch;
  }
}

@media (max-width: 700px) {
  .problem .overload-visual {
    width: 100%;
  }

  .problem .overload-stage {
    gap: 12px;
  }

  .problem .overload-stream {
    grid-template-columns: 22px 30px minmax(0, 1fr);
    min-height: 61px;
  }

  .overload-status-icon {
    width: 27px;
    height: 27px;
  }

  .use-panel {
    gap: 18px 16px;
    min-height: 315px;
    padding: 23px;
  }

  .challenge-reader {
    min-height: 470px;
  }

  .challenges-heading > strong {
    display: none;
  }

  .challenge-panel ol {
    grid-template-columns: 1fr;
  }

  .challenge-panel li {
    padding-block: 10px;
  }

  .journey-cinema {
    padding-inline-start: 51px;
    padding-inline-end: 16px;
  }

  .contact-layout {
    gap: 25px;
  }

  .contact-link {
    width: 100%;
    justify-content: space-between;
  }

  .site-footer .footer-nav {
    gap: 6px 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle-glyph .detail-icon,
  :is(.button, .header-cta, .mobile-nav-action, .contact-link) .detail-icon {
    transition: none;
  }
}
