/* ==========================================================================
   OCT 视界 — 主题雷达
   ========================================================================== */

.radar-page {
  padding-top: 34px;
  padding-bottom: 90px;
}

.radar-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 48px;
  align-items: center;
  padding: 18px 0 42px;
  border-bottom: 1px solid var(--line);
}

.radar-hero h1 {
  margin: 10px 0 16px;
  font-family: var(--serif);
  font-size: clamp(38px, 4.4vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 15ch;
}

.radar-nowrap {
  white-space: nowrap;
}

.radar-hero .page-dek {
  max-width: 62ch;
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
}

.radar-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 22px;
}

.radar-hero-panel {
  position: relative;
  min-height: 300px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 78% 20%, rgba(223, 92, 56, 0.28), transparent 42%),
    linear-gradient(145deg, #0a3a36, #061f1d 64%, #041514);
  color: #f7f5ef;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.radar-orbit {
  position: absolute;
  border: 1px solid rgba(143, 220, 205, 0.2);
  border-radius: 50%;
}

.radar-orbit--one {
  width: 300px;
  height: 300px;
  right: -90px;
  top: -110px;
}

.radar-orbit--two {
  width: 210px;
  height: 210px;
  right: -40px;
  top: -60px;
}

.radar-orbit--three {
  width: 370px;
  height: 370px;
  right: -160px;
  bottom: -230px;
}

.radar-hero-panel-label {
  position: relative;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: rgba(244, 250, 246, 0.64);
}

.radar-hero-panel-value {
  position: relative;
  margin-top: 34px;
  font-family: var(--serif);
  font-size: 76px;
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: #f4e3cf;
}

.radar-hero-panel-caption {
  position: relative;
  margin-top: 12px;
  max-width: 24ch;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(244, 250, 246, 0.74);
}

.radar-hero-panel-foot {
  position: absolute;
  left: 28px;
  bottom: 24px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(244, 250, 246, 0.46);
}

.radar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.radar-search {
  flex: 1 1 280px;
  min-width: 240px;
}

.radar-search input,
.radar-select select {
  width: 100%;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.radar-search input:focus,
.radar-select select:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.radar-select {
  display: flex;
  align-items: center;
  gap: 10px;
}

.radar-select select {
  width: 130px;
}

.radar-control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.radar-control-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.radar-seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.radar-seg button {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.radar-seg button.is-active {
  background: var(--brand-deep);
  color: var(--on-brand);
}

.radar-note {
  flex: 1 1 100%;
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.radar-main {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 30px;
  padding: 36px 0 22px;
  align-items: start;
}

.radar-feature {
  position: sticky;
  top: 92px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.radar-feature-name {
  margin: 8px 0 4px;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.radar-feature-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 18px;
}

.radar-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
  flex: 0 0 auto;
}

.radar-badge--rising {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.radar-badge--new {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.radar-badge--declining {
  background: var(--surface-3);
  color: var(--ink-soft);
}

.radar-feature-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.radar-stat {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.radar-stat span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.radar-stat strong {
  display: block;
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
}

.radar-chart {
  width: 100%;
  height: auto;
  display: block;
  margin: 4px 0 10px;
}

.radar-chart-axis {
  stroke: var(--line);
  stroke-width: 1;
}

.radar-chart-grid {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 2 4;
  opacity: 0.7;
}

.radar-chart-label {
  fill: var(--muted);
  font-size: 9px;
  font-family: var(--sans);
}

.radar-chart-area {
  fill: var(--brand-soft);
  opacity: 0.55;
}

.radar-chart-line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.radar-chart-dot {
  fill: var(--accent);
}

.radar-feature-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 18px;
}

.radar-app-chip {
  display: inline-flex;
  height: 24px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  color: var(--ink-soft);
}

.radar-feature-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}

.radar-feature-link:hover {
  text-decoration: underline;
}

.radar-list {
  min-width: 0;
}

.radar-list-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.radar-list-head h2 {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1;
}

.radar-count {
  font-size: 12px;
  color: var(--muted);
}

.radar-table-wrap {
  max-height: 780px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.radar-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.radar-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.radar-table tbody tr {
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}

.radar-table tbody tr:hover,
.radar-table tbody tr.is-active {
  background: var(--brand-soft);
}

.radar-table tbody tr:last-child {
  border-bottom: 0;
}

.radar-table td {
  padding: 11px 12px;
  vertical-align: middle;
}

.radar-rank {
  width: 40px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.radar-topic-name {
  display: block;
  font-weight: 600;
  line-height: 1.3;
}

.radar-topic-key {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

.radar-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.radar-spark {
  display: block;
  width: 126px;
  height: 30px;
}

.radar-spark-line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.radar-spark-area {
  fill: var(--brand-soft);
  opacity: 0.6;
}

.radar-growth {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.radar-growth--up {
  color: var(--accent-deep);
}

.radar-growth--down {
  color: var(--muted);
}

.radar-growth--new {
  color: var(--accent-deep);
}

.radar-emerging {
  padding: 46px 0 20px;
  border-top: 1px solid var(--line);
  margin-top: 34px;
}

.radar-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.radar-section-head h2 {
  margin: 4px 0 8px;
  font-family: var(--serif);
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.05;
}

.radar-section-head p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.65;
}

.radar-emerging-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.radar-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.radar-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.radar-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.radar-card-name {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
}

.radar-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.radar-card-spark {
  width: 100%;
  height: 34px;
}

.radar-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}

.radar-method {
  padding-top: 46px;
  margin-top: 30px;
  border-top: 1px solid var(--line);
}

.radar-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
}

.radar-method-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.radar-method-num {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 700;
}

.radar-method-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.radar-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1100px) {
  .radar-hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .radar-hero-panel {
    min-height: 220px;
  }

  .radar-main {
    grid-template-columns: 1fr;
  }

  .radar-feature {
    position: static;
    max-width: 520px;
  }

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

@media (max-width: 720px) {
  .radar-page {
    padding-top: 20px;
  }

  .radar-hero h1 {
    font-size: 30px;
    line-height: 1.04;
    max-width: none;
  }
  .radar-hero-panel {
    min-height: 190px;
    padding: 22px;
  }

  .radar-hero-panel-value {
    font-size: 58px;
  }

  .radar-controls {
    gap: 12px;
  }

  .radar-search,
  .radar-select,
  .radar-control-group {
    flex: 1 1 100%;
  }

  .radar-select select {
    width: 100%;
  }

  .radar-table th:nth-child(5),
  .radar-table td:nth-child(5),
  .radar-table th:nth-child(7),
  .radar-table td:nth-child(7) {
    display: none;
  }

  .radar-emerging-grid {
    grid-template-columns: 1fr;
  }

  .radar-method-grid {
    grid-template-columns: 1fr;
  }

  .radar-section-head {
    align-items: start;
    flex-direction: column;
  }
}

/* Keyword co-occurrence graph */
.radar-graph {
  padding: 46px 0 20px;
  border-top: 1px solid var(--line);
  margin-top: 34px;
}

.radar-graph-stat {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.radar-graph-stat strong {
  font-size: 16px;
  color: var(--ink);
}

.radar-graph-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.radar-cluster-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.radar-cluster-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.radar-cluster-chip:hover {
  border-color: var(--line-strong);
}

.radar-cluster-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.radar-cluster-chip em {
  font-style: normal;
  font-size: 10px;
  color: var(--muted);
}

.radar-cluster-chip.is-active {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: var(--on-brand);
}

.radar-cluster-chip.is-active em {
  color: rgba(255, 255, 255, 0.66);
}

.radar-graph-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.radar-graph-canvas {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: auto;
  min-height: 480px;
}

.radar-graph-canvas svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 620px;
}

.radar-graph-edge {
  stroke: var(--line-strong);
  transition: opacity 0.15s ease;
}

.radar-graph-edge.is-dim {
  opacity: 0.035 !important;
}

.radar-graph-node {
  cursor: pointer;
  stroke: var(--surface);
  stroke-width: 1.4;
  transition: opacity 0.15s ease, stroke 0.15s ease;
}

.radar-graph-node:hover {
  stroke: var(--ink);
  stroke-width: 2.2;
}

.radar-graph-node.is-dim {
  opacity: 0.12;
}

.radar-graph-node.is-active {
  stroke: var(--ink);
  stroke-width: 2.6;
}

.radar-graph-node.is-bridge {
  stroke: var(--accent);
  stroke-width: 1.8;
}

.radar-graph-label {
  fill: var(--ink-soft);
  font-size: 10px;
  font-family: var(--sans);
  pointer-events: none;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.radar-graph-label.is-dim {
  opacity: 0.1;
}

.radar-graph-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.radar-graph-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.radar-graph-panel-title {
  margin: 4px 0 8px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.radar-graph-help {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

.radar-graph-detail-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.radar-cluster-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
}

.radar-graph-neighbors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 12px 0 14px;
}

.radar-graph-neighbors > span:first-child {
  width: 100%;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.radar-graph-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.radar-graph-small {
  font-size: 10px;
  color: var(--muted);
}

.radar-bridge-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.radar-bridge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.radar-bridge-item:hover {
  background: var(--surface-2);
}

.radar-bridge-item.is-active {
  background: var(--brand-soft);
}

.radar-bridge-rank {
  width: 18px;
  flex: 0 0 auto;
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.radar-bridge-name {
  flex: 1;
  font-size: 12px;
  line-height: 1.3;
}

.radar-bridge-name small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

.radar-bridge-share {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}

.radar-graph-note {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .radar-graph-layout {
    grid-template-columns: 1fr;
  }

  .radar-graph-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 720px) {
  .radar-graph-stat {
    text-align: left;
    white-space: normal;
  }

  .radar-graph-controls {
    align-items: flex-start;
    flex-direction: column;
  }

  .radar-graph-side {
    grid-template-columns: 1fr;
  }

  .radar-graph-canvas {
    min-height: 0;
  }

  .radar-graph-canvas svg {
    width: 760px;
    max-width: none;
    height: auto;
  }

  .radar-graph-label {
    font-size: 11px;
  }
}
