.tech-target {
  appearance: none;
  display: inline;
  margin: 0;
  border: 0;
  border-bottom: 1px dotted rgba(237, 169, 99, 0.72);
  border-radius: 2px;
  padding: 0 0.08em;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: inherit;
  cursor: help;
}

.tech-target:hover,
.tech-target:focus-visible,
.tech-target[aria-expanded="true"] {
  background: rgba(208, 137, 72, 0.14);
  color: var(--cream);
  border-bottom-color: var(--copper-hot);
}

code.tech-target {
  border: 1px solid var(--line-soft);
  border-bottom-color: rgba(237, 169, 99, 0.72);
  padding: 0.08em 0.38em;
}

.tech-plot {
  position: relative;
}

.tech-hotspots {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.tech-hotspot {
  position: absolute;
  pointer-events: auto;
  appearance: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  cursor: help;
}

.tech-hotspot:hover,
.tech-hotspot:focus-visible,
.tech-hotspot[aria-expanded="true"] {
  border-color: rgba(237, 169, 99, 0.75);
  background: rgba(208, 137, 72, 0.10);
  box-shadow: 0 0 0 2px rgba(13, 16, 20, 0.72);
}

.tech-figure-hint {
  display: block;
  margin-top: 0.55rem;
  color: var(--soft);
}

.tech-figure-hint::before {
  content: "inspect · ";
  color: var(--copper);
}

.tech-inspector {
  position: fixed;
  z-index: 1000;
  width: min(25.5rem, calc(100vw - 1.5rem));
  max-height: min(38rem, calc(100vh - 1.5rem));
  overflow: auto;
  border: 1px solid rgba(237, 169, 99, 0.55);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(27, 33, 41, 0.98), rgba(13, 16, 20, 0.99));
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(0, 0, 0, 0.45);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.48;
  overscroll-behavior: contain;
}

.tech-inspector[hidden] {
  display: none;
}

.tech-inspector-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.9rem 0.95rem 0.8rem;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 22, 28, 0.98);
}

.tech-inspector-kicker {
  margin: 0 0 0.18rem;
  color: var(--copper);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.tech-inspector-title {
  margin: 0;
  color: var(--cream);
  font-size: 1rem;
  line-height: 1.25;
}

.tech-inspector-context {
  margin: 0.25rem 0 0;
  color: var(--faint);
  font-size: 0.66rem;
}

.tech-inspector-close {
  appearance: none;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  color: var(--soft);
  font: 1rem/1 var(--mono);
  cursor: pointer;
}

.tech-inspector-close:hover {
  border-color: var(--copper);
  color: var(--cream);
}

.tech-inspector-body {
  padding: 0.9rem 0.95rem 1rem;
}

.tech-inspector-summary {
  margin: 0 0 0.8rem;
  color: var(--soft);
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.55;
}

.tech-inspector-label {
  margin: 0 0 0.38rem;
  color: var(--faint);
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.tech-inspector-source {
  margin: 0 0 0.85rem;
  padding: 0.72rem 0.78rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0b0e12;
  color: var(--cream);
  font: 0.69rem/1.5 var(--mono);
  white-space: pre;
}

.tech-platform-tabs {
  display: flex;
  gap: 0.35rem;
  margin: 0 0 0.62rem;
  overflow-x: auto;
}

.tech-platform-tab {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.58rem;
  background: var(--panel);
  color: var(--faint);
  font: 0.65rem/1.2 var(--mono);
  cursor: pointer;
}

.tech-platform-tab:hover,
.tech-platform-tab[aria-selected="true"] {
  border-color: var(--copper);
  background: var(--copper-dim);
  color: var(--cream);
}

.tech-platform-panel {
  min-height: 6.9rem;
  padding: 0.72rem 0.78rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(11, 14, 18, 0.72);
}

.tech-platform-panel[hidden] {
  display: none;
}

.tech-platform-asm {
  margin: 0 0 0.55rem;
  color: var(--copper-hot);
  font: 0.72rem/1.5 var(--mono);
  white-space: pre-wrap;
}

.tech-platform-detail {
  margin: 0;
  color: var(--soft);
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.5;
}

.tech-inspector-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin-top: 0.75rem;
}

.tech-inspector-links a {
  color: var(--soft);
  font-size: 0.66rem;
  border-bottom-color: var(--line);
}

.tech-inspector-links a:hover {
  color: var(--copper-hot);
}

.tech-inspector-pin {
  margin: 0.7rem 0 0;
  color: var(--faint);
  font-size: 0.62rem;
}

@media (max-width: 700px), (hover: none) {
  .tech-inspector {
    inset: auto 0.5rem 0.5rem 0.5rem !important;
    width: auto;
    max-height: 72vh;
  }

  .tech-hotspot:focus-visible,
  .tech-hotspot[aria-expanded="true"] {
    background: rgba(208, 137, 72, 0.18);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .tech-inspector:not([hidden]) {
    animation: tech-inspector-in 120ms ease-out;
  }

  @keyframes tech-inspector-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
  }
}
