/* ─── Tech Stack Page ─── v1.0 ─── */

/* ── Container ── */
.ts-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 1024px) {
  .ts-container { padding: 0 40px; }
}

/* ── Hero Section (dark) ── */
#graph-hero {
  background: #0B1D1F;
  color: #F0EDE4;
  position: relative;
  overflow: hidden;
  padding: 24px 0 0;
}
.ts-hero-text {
  margin-bottom: 24px;
}

.ts-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #E8C547;
  margin-bottom: 12px;
}

.ts-h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #F0EDE4;
  margin: 0 0 12px;
}

.ts-subtitle {
  font-size: 16px;
  color: #6b9aa0;
  max-width: 500px;
  margin: 0;
  line-height: 1.5;
}

.ts-stat-row {
  display: flex;
  gap: 32px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.ts-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.ts-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: #E8C547;
  letter-spacing: -0.02em;
}

.ts-stat-label {
  font-size: 12px;
  color: #6b9aa0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

/* ── Filter Pills ── */
#ts-filters {
  margin-bottom: 16px;
}
#ts-filters::-webkit-scrollbar { display: none; }

/* Collapsible filter toggle (small screens) */
.ts-filter-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #1a3a3f;
  background: rgba(15,38,41,0.6);
  color: #a0ada0;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 8px;
}
.ts-filter-toggle:hover {
  border-color: #E8C547;
  color: #F0EDE4;
}
.ts-filter-toggle .ts-filter-toggle-icon {
  transition: transform 0.3s ease;
  color: #E8C547;
}
.ts-filter-toggle.ts-open .ts-filter-toggle-icon {
  transform: rotate(180deg);
}
.ts-filter-toggle .ts-filter-toggle-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #E8C547;
  background: rgba(232,197,71,0.1);
  padding: 2px 8px;
  border-radius: 9999px;
  margin-left: 8px;
}
.ts-filter-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (max-width: 900px) {
  .ts-filter-toggle { display: flex; }
  .ts-filter-wrap {
    max-height: 0;
  }
  .ts-filter-wrap.ts-open {
    max-height: 300px;
  }
}
@media (min-width: 901px) {
  .ts-filter-wrap {
    max-height: none !important;
  }
}

.ts-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 4px;
}
.ts-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid #1a3a3f;
  background: transparent;
  color: #a0ada0;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.ts-filter-pill:hover {
  border-color: #E8C547;
  color: #F0EDE4;
}

.ts-filter-pill.active {
  background: #E8C547;
  color: #0B1D1F;
  border-color: #E8C547;
  font-weight: 600;
}

.ts-filter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Graph Container ── */
#ts-graph-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid #1a3a3f;
  background: #081618;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  margin: 0 auto;
  height: calc(100vh - 200px);
  min-height: 500px;
  max-height: 900px;
}

#ts-graph {
  touch-action: none;
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Graph Tooltip ── */
.ts-tooltip {
  display: none;
  position: absolute;
  z-index: 100;
  background: #0F2629;
  border: 1px solid #1a3a3f;
  border-radius: 12px;
  padding: 14px 16px;
  max-width: 300px;
  min-width: 200px;
  pointer-events: none;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

.ts-tooltip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.ts-tooltip-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}

.ts-tooltip-name {
  font-size: 15px;
  font-weight: 700;
  color: #F0EDE4;
  margin: 0;
  line-height: 1.2;
}

.ts-tooltip-cat {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #E8C547;
  margin-top: 2px;
}

.ts-tooltip-desc {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.55;
  color: #a0ada0;
}

.ts-tooltip-hint {
  margin-top: 8px;
  font-size: 10px;
  color: #3D6166;
  border-top: 1px solid #1a3a3f;
  padding-top: 8px;
}

/* ── Scroll Indicator ── */
.ts-scroll-hint {
  text-align: center;
  padding: 20px 0 8px;
}

.ts-scroll-hint p {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #3D6166;
  margin: 0;
}

.ts-scroll-arrow {
  display: inline-block;
  margin-top: 8px;
  animation: ts-bounce 2s ease infinite;
  color: #E8C547;
}

@keyframes ts-bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
  60% { transform: translateY(-3px); }
}

/* Mobile hint */
.ts-pinch-hint {
  display: none;
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,38,41,0.9);
  border: 1px solid #1a3a3f;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 12px;
  color: #a0ada0;
  z-index: 50;
  transition: opacity 0.5s ease;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .ts-pinch-hint { display: block; }
}

/* ── Mobile Touch Panel (bottom sheet) ── */
.ts-touch-panel {
  display: none; /* shown via JS class on touch devices */
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0F2629;
  border-top: 1px solid #1e4248;
  border-radius: 16px 16px 0 0;
  padding: 8px 20px 28px;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -12px 40px rgba(0,0,0,0.5);
  pointer-events: none;
}
.ts-touch-panel.ts-touch-open {
  transform: translateY(0);
  pointer-events: auto;
}
.ts-touch-panel-drag-bar {
  width: 36px;
  height: 4px;
  background: #2a5560;
  border-radius: 2px;
  margin: 0 auto 12px;
}
.ts-touch-panel-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: #6b9aa0;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 6px;
  transition: background 0.15s;
}
.ts-touch-panel-close:hover { background: rgba(255,255,255,0.07); }
.ts-touch-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.ts-touch-panel-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #1a3a3f;
  flex-shrink: 0;
  object-fit: contain;
  padding: 4px;
}
.ts-touch-panel-name {
  font-size: 16px;
  font-weight: 700;
  color: #F0EDE4;
  line-height: 1.2;
}
.ts-touch-panel-cat {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #E8C547;
  margin-top: 3px;
}
.ts-touch-panel-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #a0ada0;
  margin: 8px 0 14px;
}
.ts-touch-panel-btn {
  display: block;
  width: 100%;
  padding: 11px 16px;
  background: #E8C547;
  color: #0B1D1F;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  letter-spacing: 0.01em;
  transition: background 0.15s;
}
.ts-touch-panel-btn:hover { background: #d4b03a; }
.ts-touch-panel-tap-hint {
  font-size: 11px;
  color: #3D6166;
  text-align: center;
  margin: 10px 0 0;
}

/* Light mode touch panel */
body.ts-light .ts-touch-panel {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.12);
}
body.ts-light .ts-touch-panel-drag-bar { background: #d1d5db; }
body.ts-light .ts-touch-panel-name { color: #111827; }
body.ts-light .ts-touch-panel-desc { color: #4b5563; }
body.ts-light .ts-touch-panel-tap-hint { color: #9ca3af; }
body.ts-light .ts-touch-panel-close { color: #9ca3af; }
body.ts-light .ts-touch-panel-logo { background: #f3f4f6; }

/* ── Dark Section (Tech Catalog) ── */
#tech-catalog {
  background: #0F2629;
  color: #F0EDE4;
  padding: 64px 0 80px;
}

.ts-catalog-header {
  margin-bottom: 40px;
}
.ts-h2 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #F0EDE4;
  margin: 0 0 8px;
}
.ts-catalog-sub {
  font-size: 15px;
  color: #6b9aa0;
  margin: 0;
}

.ts-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ts-section-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #F0EDE4;
  margin: 0;
}

.ts-section-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #6b9aa0;
}

.ts-section-desc {
  font-size: 15px;
  color: #6b9aa0;
  max-width: 600px;
  line-height: 1.6;
  margin: 0 0 40px;
}

/* ── Category Accordion ── */
.ts-category-group {
  border-bottom: 1px solid #1a3a3f;
  opacity: 0;
  transform: translateY(12px);
  animation: ts-fadeUp 0.4s ease forwards;
}

.ts-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 0;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: opacity 0.15s;
}

.ts-category-header:hover {
  opacity: 0.8;
}

.ts-cat-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ts-cat-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ts-cat-title {
  font-size: 20px;
  font-weight: 700;
  color: #F0EDE4;
  margin: 0;
}

.ts-cat-badge {
  font-size: 11px;
  font-weight: 600;
  color: #6b9aa0;
  background: rgba(232,197,71,0.08);
  border-radius: 9999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.ts-chevron {
  color: #6b9aa0;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.ts-category-group.ts-open .ts-chevron {
  transform: rotate(180deg);
  color: #E8C547;
}

.ts-category-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.ts-category-group.ts-open .ts-category-body {
  max-height: 6000px;
}

/* ── Tech Grid ── */
.ts-tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-bottom: 28px;
}

/* ── Tech Card ── */
.ts-tech-card {
  border: 1px solid #1a3a3f;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease, grid-column 0s;
  scroll-margin-top: 100px;
  background: #0B1D1F;
}

.ts-tech-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  border-color: #2a4a4f;
  transform: translateY(-1px);
}

.ts-tech-card.ts-expanded {
  border-color: #E8C547;
  box-shadow: 0 4px 20px rgba(232,197,71,0.12);
  grid-column: 1 / -1;
}

.ts-card-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  gap: 12px;
}

.ts-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ts-tech-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
  object-fit: contain;
  background: rgba(240,237,228,0.08);
  padding: 4px;
}

.ts-tech-info {
  min-width: 0;
}

.ts-tech-name {
  font-size: 15px;
  font-weight: 600;
  color: #F0EDE4;
  margin: 0;
  line-height: 1.3;
}

.ts-tech-oneliner {
  font-size: 12px;
  color: #6b9aa0;
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.ts-card-chevron {
  color: #3D6166;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.ts-tech-card.ts-expanded .ts-card-chevron {
  transform: rotate(180deg);
  color: #E8C547;
}

/* ── Card Details (expanded) ── */
.ts-card-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ts-tech-card.ts-expanded .ts-card-details {
  max-height: 500px;
}

.ts-card-inner {
  padding: 0 16px 16px;
}

.ts-tech-desc {
  font-size: 14px;
  line-height: 1.65;
  color: #a0ada0;
  margin: 0 0 12px;
}

.ts-tech-usage {
  padding: 12px 14px;
  background: rgba(232,197,71,0.05);
  border-radius: 8px;
  border-left: 3px solid #E8C547;
  margin-bottom: 12px;
}

.ts-usage-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #E8C547;
  margin: 0 0 6px;
}

.ts-tech-usage p {
  font-size: 13px;
  line-height: 1.6;
  color: #a0ada0;
  margin: 0;
}

/* Sub-items for consolidated nodes */
.ts-sub-items {
  margin-bottom: 12px;
}

.ts-sub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: #a0ada0;
  border-bottom: 1px solid #1a3a3f;
}

.ts-sub-item:last-child {
  border-bottom: none;
}

.ts-sub-item img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
  background: rgba(240,237,228,0.08);
  padding: 2px;
}

.ts-sub-item strong {
  color: #F0EDE4;
  font-weight: 600;
}

/* ── External Links ── */
.ts-tech-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.ts-ext-link {
  font-size: 13px;
  font-weight: 500;
  color: #E8C547;
  text-decoration: none;
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.ts-ext-link:hover {
  color: #f0d86b;
}

.ts-ext-arrow {
  font-size: 14px;
}

/* ── CTA Section ── */
.ts-cta {
  background: #0B1D1F;
  text-align: center;
  padding: 80px 0;
}
.ts-cta-inner {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}
.ts-cta-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(232,197,71,0.08), transparent 70%);
  pointer-events: none;
}
.ts-cta-heading {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #F0EDE4;
  margin: 0 0 16px;
  position: relative;
}
.ts-cta-sub {
  font-size: 15px;
  color: #6b9aa0;
  max-width: 540px;
  margin: 0 auto 32px;
  line-height: 1.6;
  position: relative;
}
.ts-cta h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #F0EDE4;
  margin: 0 0 16px;
}
.ts-cta p {
  font-size: 15px;
  color: #6b9aa0;
  max-width: 540px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.ts-cta-btn {
  display: inline-block;
  background: #E8C547;
  color: #0B1D1F;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}

.ts-cta-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ── Connection highlight ── */
.ts-node-dimmed { opacity: 0.08 !important; }
.ts-link-dimmed { opacity: 0.03 !important; }
.ts-node-highlighted { opacity: 1 !important; }
.ts-link-highlighted {
  opacity: 0.8 !important;
  stroke: #E8C547 !important;
  stroke-width: 2 !important;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .ts-tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .ts-tech-grid {
    grid-template-columns: 1fr;
  }

  #ts-graph-wrap {
    height: calc(100vh - 180px) !important;
    min-height: 400px !important;
    max-height: 700px !important;
    border-radius: 12px;
  }

  .ts-h1 {
    font-size: 1.75rem;
  }

  .ts-cat-title {
    font-size: 17px;
  }

  .ts-stat-row {
    gap: 20px;
  }

  .ts-stat-num {
    font-size: 22px;
  }

  .ts-tech-oneliner {
    max-width: 140px;
  }

  .ts-tooltip {
    max-width: 220px;
    min-width: 160px;
    padding: 10px 12px;
  }

  .ts-section-title {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .ts-stat-row {
    gap: 16px;
  }

  .ts-tech-card {
    border-radius: 10px;
  }

  .ts-card-toggle {
    padding: 12px 14px;
  }
}

/* ── Breadcrumbs ── */
.ts-breadcrumbs {
  padding-top: 80px;
  margin-bottom: 0;
}
.ts-breadcrumbs .ts-container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #3D6166;
  padding-top: 8px;
  padding-bottom: 8px;
}
.ts-breadcrumbs a {
  color: #6b9aa0;
  text-decoration: none;
  transition: color 0.15s;
}
.ts-breadcrumbs a:hover {
  color: #E8C547;
}
.ts-breadcrumb-sep {
  color: #3D6166;
  font-size: 11px;
}
.ts-breadcrumb-current {
  color: #F0EDE4;
  font-weight: 500;
}

/* ── Graph node glow on hover ── */
.ts-node-glow {
  filter: drop-shadow(0 0 6px currentColor);
}

/* ── Stat bar in hero ── */
.ts-stat-bar {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding: 16px 0 4px;
  margin-top: 8px;
  border-top: 1px solid rgba(232,197,71,0.12);
}
.ts-stat-bar .ts-sbi {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.ts-stat-bar .ts-sbi-num {
  font-size: 26px;
  font-weight: 800;
  color: #E8C547;
  letter-spacing: -0.02em;
}
.ts-stat-bar .ts-sbi-label {
  font-size: 11px;
  color: #6b9aa0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

@keyframes ts-fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.ts-category-group:nth-child(1) { animation-delay: 0s; }
.ts-category-group:nth-child(2) { animation-delay: 0.04s; }
.ts-category-group:nth-child(3) { animation-delay: 0.08s; }
.ts-category-group:nth-child(4) { animation-delay: 0.12s; }
.ts-category-group:nth-child(5) { animation-delay: 0.16s; }
.ts-category-group:nth-child(6) { animation-delay: 0.2s; }
.ts-category-group:nth-child(7) { animation-delay: 0.24s; }
.ts-category-group:nth-child(8) { animation-delay: 0.28s; }
.ts-category-group:nth-child(9) { animation-delay: 0.32s; }
.ts-category-group:nth-child(10) { animation-delay: 0.36s; }
.ts-category-group:nth-child(11) { animation-delay: 0.4s; }
.ts-category-group:nth-child(12) { animation-delay: 0.44s; }
.ts-category-group:nth-child(13) { animation-delay: 0.48s; }
.ts-category-group:nth-child(14) { animation-delay: 0.52s; }
.ts-category-group:nth-child(15) { animation-delay: 0.56s; }

/* ── Tech card expanded no lift ── */
.ts-tech-card.ts-expanded:hover {
  transform: none;
}

/* ═══════════════════════════════════════════
   LIGHT MODE — entire page goes light
   ═══════════════════════════════════════════ */

/* ── Body background override ── */
body.ts-light {
  background: #f5f5f0 !important;
  color: #111827 !important;
}

/* ── Hero section ── */
body.ts-light #graph-hero {
  background: #f5f5f0;
  color: #111827;
}
body.ts-light .ts-label {
  color: #b8970f;
}
body.ts-light .ts-h1 {
  color: #111827;
}
body.ts-light .ts-subtitle {
  color: #6b7280;
}
body.ts-light .ts-stat-bar {
  border-top-color: rgba(0,0,0,0.08);
}
body.ts-light .ts-stat-bar .ts-sbi-num {
  color: #b8970f;
}
body.ts-light .ts-stat-bar .ts-sbi-label {
  color: #6b7280;
}

/* ── Breadcrumbs ── */
body.ts-light .ts-breadcrumbs {
  background: #f5f5f0;
}
body.ts-light .ts-breadcrumbs a {
  color: #6b7280;
}
body.ts-light .ts-breadcrumbs a:hover {
  color: #b8970f;
}
body.ts-light .ts-breadcrumb-sep {
  color: #d1d5db;
}
body.ts-light .ts-breadcrumb-current {
  color: #111827;
}

/* ── Filter pills ── */
body.ts-light .ts-filter-toggle {
  border-color: #d1d5db;
  background: rgba(0,0,0,0.03);
  color: #6b7280;
}
body.ts-light .ts-filter-toggle:hover {
  border-color: #b8970f;
  color: #111827;
}
body.ts-light .ts-filter-toggle .ts-filter-toggle-count {
  color: #b8970f;
  background: rgba(184,151,15,0.1);
}
body.ts-light .ts-filter-toggle .ts-filter-toggle-icon {
  color: #b8970f;
}
body.ts-light .ts-filter-pill {
  border-color: #d1d5db;
  color: #6b7280;
}
body.ts-light .ts-filter-pill:hover {
  border-color: #b8970f;
  color: #111827;
}
body.ts-light .ts-filter-pill.active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

/* ── Graph container ── */
body.ts-light #ts-graph-wrap {
  background: #eaeae4;
  background-image:
    linear-gradient(rgba(0,0,0,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  border-color: #d1d5db;
}

/* ── Tooltip ── */
body.ts-light .ts-tooltip {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
body.ts-light .ts-tooltip-name {
  color: #111827;
}
body.ts-light .ts-tooltip-cat {
  color: #b8970f;
}
body.ts-light .ts-tooltip-desc {
  color: #6b7280;
}
body.ts-light .ts-tooltip-hint {
  color: #9ca3af;
  border-top-color: #e5e7eb;
}

/* ── Pinch hint ── */
body.ts-light .ts-pinch-hint {
  background: rgba(255,255,255,0.92);
  border-color: #d1d5db;
  color: #6b7280;
}

/* ── Scroll down hint ── */
body.ts-light .ts-scroll-down p {
  color: #9ca3af;
}
body.ts-light .ts-scroll-down svg {
  color: #b8970f;
}

/* ── Nav in light mode ── */
body.ts-light nav {
  background: rgba(245,245,240,0.92) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}
body.ts-light nav a,
body.ts-light nav button {
  color: #374151 !important;
}
body.ts-light nav .cta-book-call {
  background: #111827 !important;
  color: #ffffff !important;
}
body.ts-light .ts-theme-toggle-btn {
  border-color: rgba(0,0,0,0.12) !important;
  color: #6b7280 !important;
}
body.ts-light .ts-theme-toggle-btn:hover {
  border-color: rgba(184,151,15,0.4) !important;
  color: #111827 !important;
}
body.ts-light #ts-mobile-toggle {
  border-color: rgba(0,0,0,0.12) !important;
  background: rgba(245,245,240,0.8) !important;
}
body.ts-light #ts-mobile-toggle span {
  background: #111827 !important;
}
body.ts-light #ts-mobile-menu {
  background: #f5f5f0 !important;
  border-top-color: rgba(0,0,0,0.06) !important;
}
body.ts-light #ts-mobile-menu a {
  color: #374151 !important;
}
body.ts-light #ts-mobile-menu a[href="/contact/"] {
  background: #111827 !important;
  color: #ffffff !important;
}

/* ── CTA section ── */
body.ts-light .ts-cta {
  background: #f5f5f0;
}
body.ts-light .ts-cta-heading,
body.ts-light .ts-cta h2 {
  color: #111827;
}
body.ts-light .ts-cta-sub,
body.ts-light .ts-cta p {
  color: #4b5563;
}
body.ts-light .ts-cta .ts-label {
  color: #b8970f;
}

/* ── Catalog section in light mode ── */
body.ts-light #tech-catalog {
  background: #fafaf7;
}
body.ts-light .ts-h2,
body.ts-light .ts-cat-title {
  color: #111827;
}
body.ts-light .ts-catalog-sub,
body.ts-light .ts-section-count {
  color: #6b7280;
}
body.ts-light .ts-category-header {
  color: #374151;
}
body.ts-light .ts-category-group {
  border-bottom-color: #e5e7eb;
}
body.ts-light .ts-cat-badge {
  color: #6b7280;
  background: #f3f4f6;
}
body.ts-light .ts-chevron {
  color: #9ca3af;
}
body.ts-light .ts-tech-card {
  background: #ffffff;
  border-color: #e5e7eb;
}
body.ts-light .ts-tech-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
body.ts-light .ts-tech-card.ts-expanded {
  border-color: #E8C547;
}
body.ts-light .ts-tech-name {
  color: #111827;
}
body.ts-light .ts-tech-oneliner {
  color: #9ca3af;
}
body.ts-light .ts-tech-desc {
  color: #374151;
}
body.ts-light .ts-tech-usage {
  background: #f9fafb;
}
body.ts-light .ts-usage-label {
  color: #9ca3af;
}
body.ts-light .ts-tech-usage p {
  color: #4b5563;
}
body.ts-light .ts-sub-item {
  color: #4b5563;
  border-bottom-color: #f3f4f6;
}
body.ts-light .ts-sub-item strong {
  color: #111827;
}
body.ts-light .ts-ext-link {
  color: #2563eb;
}
body.ts-light .ts-ext-link:hover {
  color: #1d4ed8;
}
body.ts-light .ts-card-chevron {
  color: #d1d5db;
}
body.ts-light .ts-tech-logo {
  background: #1e293b;
}
body.ts-light .ts-sub-item img {
  background: #1e293b;
}
body.ts-light .ts-back-to-graph {
  border-color: rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.92);
  color: #6b7280;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
body.ts-light .ts-back-to-graph:hover {
  border-color: #E8C547;
  color: #111827;
  background: rgba(255,255,255,0.97);
}

/* ── Footer in light mode ── */
body.ts-light footer {
  background: #f0f0ea !important;
  border-top-color: rgba(0,0,0,0.1) !important;
  color: #374151 !important;
}
body.ts-light footer p,
body.ts-light footer h3 {
  color: #374151 !important;
}
body.ts-light footer span {
  color: #374151 !important;
}
body.ts-light footer span[style*="#E8C547"] {
  color: #a07c00 !important;
}
body.ts-light footer a {
  color: #4b5563 !important;
}
body.ts-light footer a:hover {
  color: #111827 !important;
}
body.ts-light footer a[style*="#E8C547"] {
  color: #b8970f !important;
}
body.ts-light footer div[style*="background:#0B1D1F"],
body.ts-light footer div[style*="background: #0B1D1F"] {
  background: #e0e0da !important;
  border-color: rgba(0,0,0,0.12) !important;
}
body.ts-light footer input[type="email"] {
  color: #374151 !important;
}
body.ts-light footer .border-t {
  border-color: rgba(0,0,0,0.1) !important;
}
body.ts-light footer a.rounded-lg {
  border-color: rgba(0,0,0,0.12) !important;
  color: #6b7280 !important;
}
body.ts-light footer a.rounded-lg:hover {
  border-color: rgba(184,151,15,0.4) !important;
  color: #374151 !important;
}

/* ── Back to Graph button ── */
.ts-back-to-graph {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(232,197,71,0.2);
  background: rgba(11,29,31,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #a0ada0;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 90;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.ts-back-to-graph:hover {
  border-color: #E8C547;
  color: #E8C547;
  background: rgba(232,197,71,0.1);
}
.ts-back-to-graph svg {
  color: #E8C547;
}

/* ── Scroll hint styling ── */
.ts-scroll-down {
  text-align: center;
  padding: 24px 0 12px;
}
.ts-scroll-down p {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #3D6166;
  margin: 0;
}
.ts-scroll-down svg {
  display: inline-block;
  margin-top: 6px;
  animation: ts-bounce 2s ease infinite;
  color: #E8C547;
}

/* ── Graph Controls Toolbar ── */
.ts-graph-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ts-gc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(232,197,71,0.15);
  background: rgba(8,22,24,0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #a0ada0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  padding: 0;
}
.ts-gc-btn:hover {
  border-color: rgba(232,197,71,0.5);
  color: #E8C547;
  background: rgba(8,22,24,0.95);
}
.ts-gc-btn.ts-gc-search {
  margin-top: 4px;
  font-size: 13px;
}
.ts-gc-search-wrap {
  position: absolute;
  top: 0;
  right: 40px;
  display: flex;
  align-items: center;
  overflow: hidden;
  max-width: 0;
  transition: max-width 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}
.ts-gc-search-wrap.open {
  max-width: 160px;
  opacity: 1;
}
.ts-gc-search-input {
  background: rgba(8,22,24,0.92);
  border: 1px solid rgba(232,197,71,0.3);
  border-radius: 8px;
  color: #f0ede4;
  font-size: 12px;
  font-family: inherit;
  padding: 6px 10px;
  outline: none;
  width: 150px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.ts-gc-search-input::placeholder {
  color: #4a6a6f;
}
/* Light mode graph controls */
body.ts-light .ts-gc-btn {
  background: rgba(255,255,255,0.88);
  border-color: rgba(0,0,0,0.12);
  color: #6b7280;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
body.ts-light .ts-gc-btn:hover {
  border-color: rgba(184,151,15,0.5);
  color: #111827;
  background: rgba(255,255,255,0.97);
}
body.ts-light .ts-gc-search-input {
  background: rgba(255,255,255,0.95);
  border-color: rgba(184,151,15,0.4);
  color: #111827;
}
body.ts-light .ts-gc-search-input::placeholder {
  color: #9ca3af;
}
body.ts-light .ts-gc-search-wrap.open {
  max-width: 160px;
}

/* ── Column Toggle ── */
.ts-catalog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.ts-catalog-header-text {
  flex: 1;
}
.ts-col-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(232,197,71,0.2);
  background: rgba(11,29,31,0.6);
  color: #a0ada0;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 4px;
  position: relative;
}
.ts-col-toggle:hover {
  border-color: rgba(232,197,71,0.5);
  color: #E8C547;
}
.ts-col-toggle.active {
  border-color: rgba(232,197,71,0.4);
  color: #E8C547;
  background: rgba(232,197,71,0.08);
}
@media (min-width: 768px) {
  .ts-col-toggle { display: inline-flex; }
}
body.ts-light .ts-col-toggle {
  background: rgba(255,255,255,0.7);
  border-color: rgba(0,0,0,0.14);
  color: #6b7280;
}
body.ts-light .ts-col-toggle:hover,
body.ts-light .ts-col-toggle.active {
  border-color: rgba(184,151,15,0.5);
  color: #b8970f;
  background: rgba(255,255,255,0.9);
}

/* Column toggle tooltip */
.ts-col-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  white-space: nowrap;
  background: #E8C547;
  color: #0B1D1F;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 10;
}
.ts-col-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 16px;
  border: 5px solid transparent;
  border-top-color: #E8C547;
}
.ts-col-tip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 2-col catalog body */
@media (min-width: 768px) {
  #ts-catalog-body.ts-two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 32px;
    align-items: start;
  }
  #ts-catalog-body.ts-two-col .ts-category-group {
    break-inside: avoid;
  }
  #ts-catalog-body.ts-two-col .ts-category-group:last-child {
    border-bottom: none;
  }
}
