/* ==========================================================================
   peel-chat.css — additive styles for the Peel page's ONE system: clicking
   the cube. Holds the topic picker (loads any tree into the cube), the recall
   glow on a clicked cell, and the real connector graph shown for that cell.
   No conversational chat. Uses dive.css tokens (--ink/--muted/--blue/--green/
   --purple/--line/--radius/--teal/--dim/--panel). Nothing here changes the
   resting cube; the .cube-glow rules only fire when the render loop lights a
   recalled cell. Fully offline — no external assets.
   ========================================================================== */

/* ---- recall glow on a cube cell (driven by --glow in cube.js render) ---- */
.cube-cell.cube-glow {
  box-shadow:
    0 0 12px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 0 calc(10px + var(--glow, 0) * 34px) calc(var(--glow, 0) * 10px) rgba(255, 255, 255, 0.85),
    0 0 calc(18px + var(--glow, 0) * 52px) calc(var(--glow, 0) * 16px) rgba(100, 210, 255, 0.75);
  filter: brightness(calc(1 + var(--glow, 0) * 1.1));
}

/* ---- the topic picker that sits under the cube ---- */
.peel-topic-picker {
  max-width: 1080px;
  margin: 30px auto 0;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(41, 151, 255, 0.06), transparent 60%),
    #0b0b12;
}
.peel-topic-picker h3 {
  margin: 0 0 4px;
  font-size: 18px;
  color: var(--ink);
}
.peel-topic-picker p {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--muted);
}
.peel-topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.peel-topic-chip {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.peel-topic-chip:hover { border-color: var(--blue); transform: translateY(-1px); }
.peel-topic-chip[aria-pressed="true"] {
  border-color: var(--green);
  background: rgba(48, 209, 88, 0.12);
  color: var(--ink);
}
.peel-topic-status { margin-top: 12px; font-size: 12.5px; color: var(--dim); min-height: 1em; }

/* ---- the real tile connector graph (inline SVG), shown on cell click ---- */
.peel-graph-wrap { margin: 16px 0 4px; }
.peel-graph-hd { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--dim); margin: 0 0 8px; }
.peel-graph {
  width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px;
  background: #0a0a0f; display: block;
}
.peel-graph text { font-family: "Inter", -apple-system, sans-serif; }
.peel-graph .g-node-lbl { fill: var(--ink); font-size: 11px; font-weight: 600; }
.peel-graph .g-center-lbl { fill: var(--ink); font-size: 11.5px; font-weight: 700; }
.peel-graph .g-edge-lbl { font-size: 9px; font-weight: 700; letter-spacing: 0.03em; }
.peel-graph-legend {
  display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 8px;
  font-size: 11px; color: var(--muted);
}
.peel-graph-legend span { display: inline-flex; align-items: center; gap: 5px; }
.peel-graph-legend i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.peel-graph-more { font-size: 11.5px; color: var(--dim); margin-top: 6px; }

/* ---- per-tile connector popovers on the inspector's conversation path ----
   Every path row is a real dataset tile; its toggle slides open that tile's
   meta line and connector graph. */
.cube-path .peel-tile-toggle {
  display: inline-block;
  margin: 6px 0 0 10px;
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--teal);
  background: rgba(100, 210, 255, 0.08);
  border: 1px solid rgba(100, 210, 255, 0.35);
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.cube-path .peel-tile-toggle:hover { background: rgba(100, 210, 255, 0.16); border-color: var(--teal); }
.cube-path .peel-tile-toggle[aria-expanded="true"] {
  color: var(--green);
  background: rgba(48, 209, 88, 0.12);
  border-color: rgba(48, 209, 88, 0.5);
}
.peel-tile-graph {
  margin: 10px 0 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 10px;
  background: #0a0a0f;
  overflow: hidden;
}
.peel-tile-graph:not([hidden]) { animation: peel-tile-slide .22s ease; }
@keyframes peel-tile-slide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .peel-tile-graph:not([hidden]) { animation: none; }
}
.peel-tile-meta { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.peel-tile-graph .peel-graph-wrap { margin-top: 4px; }

/* ---- the hybrid architecture section on the page ---- */
.peel-hybrid { max-width: 1080px; }
.peel-hybrid .peel-hybrid-diagram {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 0;
  margin: 26px 0 8px; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #0b0b12;
}
.peel-hybrid .hy-col { padding: 22px 22px; }
.peel-hybrid .hy-col h3 { margin: 0 0 8px; font-size: 16px; }
.peel-hybrid .hy-col p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.peel-hybrid .hy-symbolic { background: rgba(48, 209, 88, 0.05); }
.peel-hybrid .hy-symbolic h3 { color: var(--green); }
.peel-hybrid .hy-model { background: rgba(191, 90, 242, 0.05); }
.peel-hybrid .hy-model h3 { color: var(--purple); }
.peel-hybrid .hy-arrow {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 14px; color: var(--teal); font-size: 22px; border-left: 1px solid var(--line);
  border-right: 1px solid var(--line); background: rgba(100, 210, 255, 0.04);
}
.peel-hybrid .hy-arrow span { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); margin-top: 6px; writing-mode: horizontal-tb; }
.peel-hybrid .hy-fallback {
  margin-top: 14px; font-size: 13px; color: var(--muted);
  border-left: 3px solid var(--teal); padding: 4px 0 4px 14px;
}
@media (max-width: 720px) {
  .peel-hybrid .peel-hybrid-diagram { grid-template-columns: 1fr; }
  .peel-hybrid .hy-arrow { border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px; flex-direction: row; gap: 10px; }
  .peel-hybrid .hy-arrow span { margin-top: 0; }
}
