/* TC Component Visualizer */
.tccv {
  --tccv-accent: #FF7900;
  --tccv-bg: #171A1C;
  --tccv-surface: #262B2F;
  --tccv-ink: #FFFFFF;
  --tccv-muted: #AEB5BB;
  --tccv-line: rgba(174, 181, 187, .18);
  --tccv-clip: 14px;
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 56px);
  background: var(--tccv-bg);
  color: var(--tccv-ink);
  font-family: Inter, sans-serif;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}
.tccv *, .tccv *::before, .tccv *::after { box-sizing: border-box; }

/* Heading */
.tccv-head { max-width: 760px; margin-bottom: clamp(24px, 3vw, 40px); position: relative; }
.tccv-eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 14px;
  font: 600 15px/1.2 "Barlow Condensed", sans-serif;
  letter-spacing: .14em; text-transform: uppercase; color: var(--tccv-muted);
}
.tccv-dash { width: 34px; height: 3px; background: var(--tccv-accent); flex: none; }
.tccv .tccv-title {
  margin: 0 0 14px;
  font: 400 clamp(34px, 4.6vw, 58px)/1.02 Anton, sans-serif;
  text-transform: uppercase; letter-spacing: .01em; color: var(--tccv-ink);
}
.tccv-orange { color: var(--tccv-accent); }
.tccv-sub { margin: 0; max-width: 620px; font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, .78); }

/* Three-column layout */
.tccv-body {
  display: grid;
  grid-template-columns: minmax(200px, 270px) minmax(0, 1fr) minmax(280px, 380px);
  gap: clamp(16px, 2vw, 28px);
  align-items: stretch;
}

/* Component list */
.tccv-list {
  display: flex; flex-direction: column;
  background: var(--tccv-surface);
  padding: 8px;
  align-self: start;
}
.tccv-item {
  appearance: none; -webkit-appearance: none;
  display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 50px; margin: 0; padding: 10px 14px;
  border: 0; border-bottom: 1px solid var(--tccv-line); border-radius: 0;
  background: transparent; color: var(--tccv-ink);
  font: 600 18px/1.1 "Barlow Condensed", sans-serif; letter-spacing: .06em; text-transform: uppercase;
  text-align: left; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.tccv-item:last-child { border-bottom-color: transparent; }
.tccv-item:hover { color: var(--tccv-accent); background: transparent; }
.tccv-item:focus-visible { outline: 2px solid var(--tccv-accent); outline-offset: -2px; }
.tccv-item.is-active {
  background: var(--tccv-accent); color: #FFFFFF; border-bottom-color: transparent;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--tccv-clip)), calc(100% - var(--tccv-clip)) 100%, 0 100%);
}
.tccv-item-icon { width: 26px; height: 26px; flex: none; display: grid; place-items: center; color: var(--tccv-muted); }
.tccv-item.is-active .tccv-item-icon, .tccv-item:hover .tccv-item-icon { color: currentColor; }
.tccv-item-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.tccv-item-label { flex: 1; }
.tccv-item-arrow { width: 14px; height: 14px; opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; }
.tccv-item-arrow svg { width: 14px; height: 14px; display: block; }
.tccv-item.is-active .tccv-item-arrow { opacity: 1; transform: none; }

/* Drawing */
.tccv-stage {
  position: relative; min-height: 380px;
  display: flex; flex-direction: column; justify-content: center;
  border: 1px solid var(--tccv-line);
  background:
    linear-gradient(var(--tccv-line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--tccv-line) 1px, transparent 1px) 0 0 / 40px 40px;
  background-color: rgba(38, 43, 47, .35);
}
.tccv-svg { display: block; flex: 1 1 auto; width: 100%; height: 100%; min-height: 340px; padding: 18px 14px 6px; overflow: visible; }
.tccv-svg [data-part] { cursor: pointer; }
.tccv-hint {
  display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 16px 14px;
  font: 600 13px/1.2 "Barlow Condensed", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--tccv-muted);
}
.tccv-hint-dot { width: 8px; height: 8px; background: var(--tccv-accent); flex: none; animation: tccv-pulse 1.8s ease-in-out infinite; }
@keyframes tccv-pulse { 50% { opacity: .25; } }

/* SVG parts */
.tccv-ground { fill: rgba(0, 0, 0, .35); stroke: var(--tccv-line); stroke-width: .06; }
.tccv-tube { stroke: var(--tccv-muted); stroke-width: .24; stroke-linecap: round; fill: none; transition: stroke .25s, opacity .25s; }
.tccv-tube--rail { stroke-width: .3; }
.tccv-tube--thin { stroke-width: .16; }
.tccv-tube--hat { stroke-width: .2; stroke: #8E969D; }
.tccv-panel { stroke-width: .05; transition: fill .25s, stroke .25s, opacity .25s; }
.tccv-panel--l { fill: #2E3439; stroke: #2E3439; }
.tccv-panel--r { fill: var(--tccv-surface); stroke: var(--tccv-surface); }
.tccv-rib { stroke: rgba(174, 181, 187, .38); stroke-width: .07; fill: none; transition: stroke .25s, opacity .25s; }
.tccv-ridge { stroke-width: .05; transition: fill .25s, opacity .25s; }
.tccv-ridge--l { fill: #474E54; stroke: #474E54; }
.tccv-ridge--r { fill: #3B4247; stroke: #3B4247; }
.tccv-trim { stroke: #5C646A; stroke-width: .26; stroke-linecap: round; fill: none; transition: stroke .25s, opacity .25s; }

/* Dim the other parts with solid colors: transparent tube pieces would look dotted where they overlap. */
.tccv-tube.is-off { stroke: #6B7278; }
.tccv-tube--hat.is-off { stroke: #5B6268; }
.tccv-trim.is-off { stroke: #4A5157; }
.tccv-tube.is-on, .tccv-trim.is-on { stroke: var(--tccv-accent); stroke-width: .34; opacity: 1; }
.tccv-tube--thin.is-on { stroke-width: .26; }
.tccv-panel.is-on { fill: var(--tccv-accent); stroke: var(--tccv-accent); }
.tccv-panel--l.is-on { fill: #E56D00; stroke: #E56D00; }
.tccv-rib.is-on { stroke: rgba(255, 255, 255, .45); }
.tccv-ridge.is-on { fill: var(--tccv-accent); stroke: var(--tccv-accent); }
.tccv-ridge--r.is-on { fill: #E56D00; stroke: #E56D00; }
.tccv-ghost { stroke: var(--tccv-accent) !important; stroke-width: .2 !important; opacity: .3; stroke-dasharray: .35 .25; pointer-events: none; }

/* Detail card */
.tccv-info { position: relative; background: var(--tccv-surface); }
.tccv-card { padding: 26px 26px 28px; height: 100%; display: flex; flex-direction: column; }
.tccv-card[hidden] { display: none; }
.tccv-card.is-active { animation: tccv-in .35s ease both; }
@keyframes tccv-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tccv-rule { display: block; width: 48px; height: 4px; background: var(--tccv-accent); margin-bottom: 16px; }
.tccv-count { margin: 0 0 6px; font: 600 14px/1 "Barlow Condensed", sans-serif; letter-spacing: .14em; color: var(--tccv-muted); }
.tccv .tccv-card-title { margin: 0 0 12px; font: 400 clamp(28px, 2.6vw, 36px)/1.05 Anton, sans-serif; text-transform: uppercase; color: var(--tccv-ink); }
.tccv-card-text { margin: 0 0 18px; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .8); }
.tccv-figure {
  display: grid; place-items: center; margin: 0 0 18px; padding: 14px;
  background: var(--tccv-bg); border: 1px solid var(--tccv-line); aspect-ratio: 20 / 9;
}
.tccv-figure svg { width: 100%; height: 100%; max-height: 150px; }
.tccv-figure svg .o { fill: none; stroke: var(--tccv-accent); stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; }
.tccv-figure svg .g { fill: none; stroke: var(--tccv-muted); stroke-width: 1.4; stroke-dasharray: 4 4; opacity: .7; }
.tccv-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tccv-bullets { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.tccv-bullets li { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 15px; line-height: 1.4; color: var(--tccv-ink); }
.tccv-check { width: 20px; height: 20px; flex: none; display: grid; place-items: center; background: var(--tccv-accent); color: #FFFFFF; margin-top: 1px; }
.tccv-check svg { width: 13px; height: 13px; }
.tccv .tccv-btn {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px 14px 22px;
  background: var(--tccv-accent); color: #FFFFFF; text-decoration: none;
  font: 600 17px/1 "Barlow Condensed", sans-serif; letter-spacing: .08em; text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--tccv-clip)), calc(100% - var(--tccv-clip)) 100%, 0 100%);
  transition: background-color .2s;
}
.tccv .tccv-btn:hover, .tccv .tccv-btn:focus-visible { background: #FFFFFF; color: var(--tccv-bg); }
.tccv-btn svg { width: 14px; height: 14px; }

/* Tablet: list becomes a scrolling row above the drawing */
@media (max-width: 1024px) {
  .tccv-body { grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); }
  .tccv-list {
    grid-column: 1 / -1; flex-direction: row; overflow-x: auto; scroll-snap-type: x proximity;
    padding: 6px; gap: 4px; scrollbar-width: thin;
  }
  .tccv-item { width: auto; flex: none; border-bottom: 0; white-space: nowrap; padding: 10px 16px; scroll-snap-align: start; }
  .tccv-item-arrow { display: none; }
}

/* Phone: everything stacks */
@media (max-width: 720px) {
  .tccv { padding: 28px 16px; }
  .tccv-body { grid-template-columns: minmax(0, 1fr); }
  .tccv-stage { min-height: 0; }
  .tccv-svg { padding: 12px 6px 4px; height: auto; min-height: 0; aspect-ratio: 4 / 3; }
  .tccv-item { font-size: 16px; min-height: 44px; padding: 8px 14px; }
  .tccv-card { padding: 22px 18px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .tccv-hint-dot, .tccv-card.is-active { animation: none; }
  .tccv-p, .tccv-item, .tccv-item-arrow { transition: none; }
}

/* Phone navigator: replaces the scrolling tab row */
.tccv-mnav { display: none; }
@media (max-width: 720px) {
  .tccv-list { display: none; }
  .tccv-mnav { position: relative; display: flex; align-items: stretch; gap: 6px; width: 100%; z-index: 20; padding: 8px; background: var(--tccv-surface); }
  .tccv .tccv-mnav button { margin: 0; border-radius: 0; cursor: pointer; font-family: "Barlow Condensed", sans-serif; box-shadow: none; }
  .tccv .tccv-mnav-step {
    flex: none; width: 48px; min-height: 52px; padding: 0; display: grid; place-items: center;
    background: transparent; color: #FFFFFF; border: 1px solid rgba(174, 181, 187, .4);
  }
  .tccv .tccv-mnav-step:hover, .tccv .tccv-mnav-step:focus-visible { background: transparent; color: var(--tccv-accent); border-color: var(--tccv-accent); outline: none; }
  .tccv-mnav-step svg { width: 16px; height: 16px; }
  .tccv .tccv-mnav-current {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 14px; min-height: 52px; text-align: left;
    background: var(--tccv-accent); color: #FFFFFF; border: 0;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  }
  .tccv .tccv-mnav-current:hover, .tccv .tccv-mnav-current:focus { background: var(--tccv-accent); color: #FFFFFF; }
  .tccv-mnav-icon { flex: none; width: 24px; height: 24px; display: grid; place-items: center; }
  .tccv-mnav-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tccv-mnav-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
  .tccv-mnav-count { font: 600 11px/1 "Barlow Condensed", sans-serif; letter-spacing: .14em; opacity: .85; }
  .tccv-mnav-label { font: 600 18px/1.1 "Barlow Condensed", sans-serif; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tccv-mnav-caret { flex: none; width: 16px; height: 16px; display: grid; transition: transform .2s; }
  .tccv-mnav-caret svg { width: 16px; height: 16px; }
  .tccv-mnav.is-open .tccv-mnav-caret { transform: rotate(180deg); }
  .tccv-mnav-menu {
    position: absolute; left: 62px; right: 62px; top: calc(100% - 2px); display: grid;
    background: #FFFFFF; border-top: 4px solid var(--tccv-accent); box-shadow: 0 14px 30px rgba(0, 0, 0, .4);
  }
  .tccv-mnav-menu[hidden] { display: none; }
  .tccv .tccv-mnav-item {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 16px; min-height: 50px; text-align: left;
    background: #FFFFFF; color: var(--tccv-bg); border: 0; border-bottom: 1px solid rgba(174, 181, 187, .3);
    font: 600 16px/1.1 "Barlow Condensed", sans-serif; letter-spacing: .05em; text-transform: uppercase;
  }
  .tccv .tccv-mnav-item:last-child { border-bottom: 0; }
  .tccv .tccv-mnav-item:hover { background: rgba(255, 121, 0, .08); color: var(--tccv-bg); }
  .tccv .tccv-mnav-item .tccv-mnav-icon { color: var(--tccv-accent); }
  .tccv .tccv-mnav-item.is-active { background: rgba(255, 121, 0, .1); color: var(--tccv-accent); box-shadow: inset 4px 0 0 var(--tccv-accent); }
  .tccv .tccv-mnav-item:focus-visible { outline: 2px solid var(--tccv-accent); outline-offset: -2px; }
}
