/* === PUBLIC SIGNAL — three sub-views === */

.ps-host { position: absolute; inset: 0 0 198px; }
.ps-host svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* Public Signals follows the same portal-to-model frame as every chapter. */
.model-canvas.is-public { top: 182px; bottom: 50px; }
.model-canvas.is-public svg { width: 92%; margin: 0 auto; }

/* ---------- sub-view menu, centred under the canvas ---------- */
.ps-views {
  position: absolute;
  z-index: 6;
  left: 32px;
  right: 32px;
  bottom: 122px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 22px;
}
.ps-views[hidden] { display: none; }
.ps-view {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 4px 2px 8px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 160ms ease;
}
.ps-view:hover { color: var(--ink); }
.ps-view.is-active { color: var(--accent); box-shadow: inset 0 -2px 0 0 var(--accent); }
.ps-view-sep { color: var(--line-strong); font-size: 19px; }

/* ---------- reading line ---------- */
.ps-reading { position: absolute; z-index: 6; left: 32px; right: 32px; bottom: 30px; }
.ps-reading[hidden] { display: none; }
.ps-reading-lead { margin: 0; max-width: 900px; font-family: var(--display); font-size: 17px; font-weight: 300; line-height: 1.3; color: var(--soft-ink, #535250); }
.ps-reading-note { margin: 6px 0 0; font-family: var(--label); font-size: 10px; letter-spacing: 0.04em; color: var(--muted, #858582); }

/* ---------- view A: platform prism ---------- */
.ps-triangle line { stroke: rgba(38, 38, 38, 0.16); stroke-width: 1; }
.ps-triangle text { fill: var(--muted); font-family: var(--label); font-size: 11px; letter-spacing: 0.06em; text-anchor: middle; }

.ps-node { cursor: pointer; outline: none; }
.ps-halo { fill: var(--platform); fill-opacity: 0.07; transition: fill-opacity 180ms ease; }
.ps-disc { fill: var(--platform); fill-opacity: 0.13; stroke: var(--platform); stroke-width: 1.2; transition: fill-opacity 180ms ease, stroke-width 180ms ease; }
.ps-node:hover .ps-disc, .ps-node:focus-visible .ps-disc { fill-opacity: 0.26; stroke-width: 1.8; }
.ps-node:hover .ps-halo { fill-opacity: 0.13; }
.ps-corpus { fill: var(--platform); font-family: var(--display); font-size: 20px; text-anchor: middle; }
.ps-platform { fill: var(--ink); font-family: var(--display); font-size: 24px; font-weight: 300; letter-spacing: -0.02em; }
.ps-role { fill: var(--platform); font-family: var(--label); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; }
.ps-share { fill: var(--muted); font-family: var(--label); font-size: 10px; }

.ps-center circle { fill: rgba(255, 255, 255, 0.5); stroke: var(--line-strong); stroke-dasharray: 3 5; }
.ps-center-label { fill: var(--ink); font-family: var(--display); font-size: 19px; font-weight: 300; text-anchor: middle; }
.ps-center-sub { fill: var(--muted); font-family: var(--label); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; text-anchor: middle; }

/* ---------- platform drill ---------- */
.ps-drill { position: absolute; inset: 0; padding: 34px 40px; display: flex; flex-direction: column; gap: 18px; }
.ps-back {
  align-self: flex-start;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 4px 0;
  color: var(--muted);
  font: 10px var(--label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.ps-back:hover { color: var(--accent); }
.ps-drill-head h2 { margin: 2px 0 0; font-family: var(--display); font-size: 40px; font-weight: 300; letter-spacing: -0.03em; line-height: 1; color: var(--platform); }
.ps-drill-zh { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: 15px; font-weight: 600; color: var(--muted); }
.ps-drill-role { margin: 4px 0 0; color: var(--soft-ink, #535250); font-size: 12px; letter-spacing: 0.06em; }
.ps-drill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 26px; }
.ps-drill-card { border-top: 1px solid var(--line); padding-top: 10px; }
.ps-drill-card.is-limit { border-top-color: var(--accent); }
.ps-drill-card p { margin: 0; color: var(--soft-ink, #535250); font-size: 13px; line-height: 1.45; }
.ps-drill-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 8px; letter-spacing: 0.15em; text-transform: uppercase; }
.ps-metric-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ps-metric { border: 1px solid var(--line); border-radius: 999px; padding: 4px 9px; color: var(--soft-ink, #535250); font-size: 10px; }
.ps-drill-note { margin: 20px 0 0; color: var(--muted); font-size: 10px; }
.ps-drill-note b { color: var(--ink); }

/* ---------- placeholders ---------- */
.ps-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.ps-placeholder b { font-family: var(--display); font-size: 30px; font-weight: 300; color: var(--muted); }
.ps-placeholder p { margin: 0; max-width: 420px; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* ---------- brand selector in the right rail ---------- */
.ps-selector {
  margin: auto 0;
  padding-top: 14px;
  border-top: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 400px;
}
.ps-selector[hidden] { display: none; }
.ps-selector-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 8px; letter-spacing: 0.15em; text-transform: uppercase; }
.ps-selector-list { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.ps-selector-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 6px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  padding: 7px 3px;
  color: var(--muted);
  text-align: left;
  transition: background 150ms ease, color 150ms ease;
}
.ps-selector-item:hover { color: var(--ink); background: rgba(255, 255, 255, 0.55); }
.ps-selector-item.is-active { background: var(--white); }
.ps-selector-item.is-active .ps-selector-name { color: var(--accent); }
.ps-selector-name { font-family: var(--display); font-size: 14px; font-weight: 300; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-selector-note { color: var(--muted); font-size: 9px; white-space: nowrap; }

/* ---------- left column detail ---------- */
#publicSignalDetail { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.ps-detail { margin-top: 16px; border-top: 1px solid var(--line-strong); padding-top: 14px; }
.ps-detail-kicker { color: var(--accent); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; }
.ps-detail-title { margin: 6px 0 0; font-family: var(--display); font-size: 27px; font-weight: 300; letter-spacing: -0.03em; line-height: 0.98; }
.ps-detail-zh { margin: 4px 0 0; font-family: "Songti SC", "STSong", serif; font-size: 13px; font-weight: 600; }
.ps-detail-summary { margin: 10px 0 0; color: var(--soft-ink, #535250); font-family: var(--display); font-size: 14px; font-weight: 300; line-height: 1.28; }
.ps-detail-block { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 9px; }
.ps-detail-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 8px; letter-spacing: 0.15em; text-transform: uppercase; }
.ps-detail-block p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }

/* ---------- view B: concept wheel ---------- */
.ps-ring { fill: none; stroke: rgba(38, 38, 38, 0.26); stroke-width: 1; stroke-dasharray: 2 6; }
.ps-wheel-center circle { fill: rgba(255, 255, 255, 0.62); stroke: var(--line-strong); }
.ps-concept { cursor: pointer; outline: none; }
.ps-concept circle { fill: var(--drift); fill-opacity: 0.18; stroke: var(--drift); stroke-width: 1.4; transition: fill-opacity 160ms ease; }
.ps-concept:hover circle, .ps-concept:focus-visible circle { fill-opacity: 0.42; }
.ps-concept-label { fill: var(--ink); font-family: var(--display); font-size: 14px; text-anchor: middle; }
.ps-concept-zh { fill: var(--muted); font-family: "Songti SC", "STSong", serif; font-size: 11px; text-anchor: middle; }
.ps-legend-item circle { fill: var(--drift); }
.ps-legend-item text { fill: var(--muted); font-family: var(--label); font-size: 10px; }

.ps-concept-detail { position: absolute; inset: 0; padding: 34px 40px; display: flex; flex-direction: column; gap: 16px; }
.ps-concept-head h2 { margin: 4px 0 0; font-family: var(--display); font-size: 38px; font-weight: 300; letter-spacing: -0.03em; line-height: 1; color: var(--drift); }
.ps-concept-status { color: var(--drift); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; }
.ps-concept-zh { margin: 2px 0 0; font-family: "Songti SC", "STSong", serif; font-size: 15px; font-weight: 600; color: var(--muted); }
.ps-concept-note { margin: 4px 0 0; color: var(--soft-ink, #535250); font-size: 12px; }
.ps-concept-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.ps-narratives { border-top: 1px solid var(--line); padding-top: 10px; }
.ps-narratives.is-up { border-top-color: #3f7d52; }
.ps-narratives.is-down { border-top-color: var(--accent); }
.ps-narratives ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.ps-narratives li b { display: block; color: var(--ink); font-size: 12px; font-weight: 600; }
.ps-narratives li span { display: block; margin-top: 2px; color: var(--soft-ink, #535250); font-size: 12px; line-height: 1.4; }
.ps-distribution { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.ps-dist-row { display: grid; grid-template-columns: 78px minmax(0, 1fr) 40px; align-items: center; gap: 10px; font-size: 10px; }
.ps-dist-name { color: var(--platform); }
.ps-dist-bar { height: 5px; background: rgba(38, 38, 38, 0.08); }
.ps-dist-bar i { display: block; height: 100%; background: var(--platform); }
.ps-dist-value { color: var(--muted); text-align: right; }
.ps-focus { margin: 6px 0 0; color: var(--soft-ink, #535250); font-size: 12px; }
.ps-focus b { color: var(--ink); }

/* ---------- view C: gap measures ---------- */
.ps-axis-line { stroke: rgba(38, 38, 38, 0.22); stroke-width: 1; }
.ps-zero { stroke: rgba(38, 38, 38, 0.3); stroke-width: 1; }
.ps-zero-label { fill: var(--muted); font-family: var(--label); font-size: 8px; letter-spacing: 0.16em; }
.ps-lift-brand { fill: #b9945a; }
.ps-lift-public { fill: #262626; }
.ps-drag-brand { fill: rgba(185, 148, 90, 0.42); }
.ps-drag-social { fill: rgba(38, 38, 38, 0.42); }
.ps-axis-label { fill: var(--ink); font-family: var(--display); font-size: 18px; font-weight: 300; text-anchor: middle; }
.ps-axis-sub { fill: var(--muted); font-family: var(--label); font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase; text-anchor: middle; }
.ps-axis-reading { fill: var(--muted); font-family: var(--label); font-size: 9px; text-anchor: middle; }
.ps-gaps-legend text { fill: var(--muted); font-family: var(--label); font-size: 10px; }
