/* assets/graph3d.css — the forward-network pages (dev/graph.html and
   /explore/telegram-network/). The 3D viewport is deliberately dark (an
   instrument panel, navy per DESIGN 2026-11-01); everything around it uses the
   shared light theme. Moved out of dev/graph.html in plan Task 10 so both pages
   share one stylesheet. */

/* Graph-tab-only styles. The 3D viewport is deliberately dark (an
   instrument panel); everything around it uses the shared light theme. */
.g3d-mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
#g3d-loading { color: var(--muted); padding: 2rem 0; }

.g3d-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 1rem 0; }
.g3d-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.g3d-tile b { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums;
              font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.g3d-tile span { font-size: 0.8rem; color: var(--muted); }
.g3d-tile.hero b { color: var(--navy); }
.g3d-asof { color: var(--muted); font-size: 0.8rem; }

#g3d-stage { position: relative; border-radius: var(--radius); overflow: hidden;
             border: 1px solid var(--line); background: #070a12; margin: 0.75rem 0 1.25rem; }
#g3d-gl { display: block; width: 100%; height: 64vh; min-height: 420px; cursor: grab; touch-action: none; }
#g3d-gl.drag { cursor: grabbing; }
#g3d-hud { position: absolute; inset: 0; pointer-events: none; }
.g3d-lab { position: absolute; transform: translate(-50%, -140%); color: #cfd6e4; font-size: 11px;
           font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
           text-shadow: 0 1px 3px #000, 0 0 6px #000; white-space: nowrap; }
.g3d-lab.sel { color: #ffd97a; font-weight: 700; font-size: 12px; }
.g3d-ring { position: absolute; border: 1.5px solid #ffd97a; border-radius: 50%;
            transform: translate(-50%,-50%); box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
.g3d-panel { position: absolute; left: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: 8px;
             pointer-events: none; max-width: calc(100% - 24px); }
.g3d-panel > * { pointer-events: auto; }
.g3d-ctl { background: rgba(10,14,24,.82); border: 1px solid #2a3450; border-radius: 7px; color: #dfe4ee;
           font-size: 12.5px; padding: 6px 9px; display: flex; align-items: center; gap: 7px; }
.g3d-ctl select { background: #0e1526; color: #eef0f4; border: 1px solid #334061; border-radius: 5px;
                  font: inherit; padding: 2px 5px; min-height: 44px; }
.g3d-ctl label { display: flex; align-items: center; gap: 5px; cursor: pointer; margin: 0; }
.g3d-ctl button { background: #1a2440; color: #dfe4ee; border: 1px solid #334061; border-radius: 5px;
                  font: inherit; padding: 2px 9px; min-height: 44px; min-width: 44px; cursor: pointer; }
.g3d-ctl button:hover { background: #24325a; }
.g3d-seg { display: flex; padding: 0; }
.g3d-seg button { border-radius: 0; border-right-width: 0; padding: 6px 10px; }
.g3d-seg button:first-child { border-radius: 7px 0 0 7px; }
.g3d-seg button:last-child { border-radius: 0 7px 7px 0; border-right-width: 1px; }
.g3d-seg button.on { background: var(--red); color: #ffffff; font-weight: 600; }
#g3d-legend { position: absolute; right: 12px; bottom: 12px; background: rgba(10,14,24,.82);
              border: 1px solid #2a3450; border-radius: 7px; padding: 8px 11px; color: #cfd6e4;
              font-size: 12px; display: flex; flex-direction: column; gap: 5px; }
#g3d-legend .row { display: flex; align-items: center; gap: 7px; }
#g3d-legend .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
#g3d-legend .rampbar { width: 130px; height: 8px; border-radius: 4px;
                       background: linear-gradient(90deg,#1d3f7a,#5b8de0,#dbe6fa); } /* centrality: blue lightness ramp, low to high */
.g3d-hint { position: absolute; left: 12px; bottom: 12px; color: #7d8aa5; font-size: 11.5px;
            text-shadow: 0 1px 2px #000; }
#g3d-tt { position: absolute; background: rgba(8,11,20,.94); border: 1px solid #334061; border-radius: 7px;
          padding: 8px 11px; color: #eef0f4; font-size: 12.5px; pointer-events: none; max-width: 260px; z-index: 5; }
#g3d-tt .h { font-weight: 700; font-size: 13px;
             font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
#g3d-tt .tt-metrics { color: #b9c2d4; font-size: 11.5px; margin-top: 4px; line-height: 1.6;
                      font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
                      font-variant-numeric: tabular-nums; }
.g3d-stub { color: #7d8aa5; }
.g3d-nogl { color: #cfd6e4; padding: 2rem; }

.g3d-chip { display: inline-block; border-radius: 10px; padding: 0 8px; font-size: 11px;
            font-weight: 600; line-height: 18px; }
.g3d-chip.attributed { background: #e3edfa; color: #164db5; }
.g3d-chip.institutional { background: #fdeae2; color: #c8481a; }
.g3d-chip.discovered { background: #efe8fc; color: #7a4bdc; }
.g3d-chip.unknown { background: #e0f4ec; color: #157a56; }
#g3d-tt .g3d-chip.attributed { background: #16283f; color: #6aa5ee; }
#g3d-tt .g3d-chip.institutional { background: #3a1d10; color: #ef8c60; }
#g3d-tt .g3d-chip.discovered { background: #241540; color: #b393f5; }
#g3d-tt .g3d-chip.unknown { background: #0d2c20; color: #35c491; }

/* fullscreen mode: the stage takes over the display */
#g3d-stage:fullscreen { border-radius: 0; margin: 0; border: 0; }
#g3d-stage:fullscreen #g3d-gl, #g3d-stage:-webkit-full-screen #g3d-gl {
  height: 100vh; min-height: 100vh; }

/* stratum glossary in the notes card */
.g3d-strata { margin: 0 0 0.9rem; }
.g3d-strata .srow { display: flex; gap: 9px; margin: 0 0 0.55rem; align-items: flex-start; }
.g3d-strata .dot { width: 10px; height: 10px; border-radius: 50%; flex: none;
                   margin-top: 0.32em; }
.g3d-strata p { margin: 0; font-size: 0.85rem; color: var(--ink); max-width: 62ch; }
.g3d-strata b { font-size: 0.85rem; }

.g3d-cols { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
@media (min-width: 980px) { .g3d-cols { grid-template-columns: 1.6fr 1fr; } }
.g3d-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
            padding: 1.1rem 1.25rem; }
.g3d-card h2 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.g3d-sub { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.75rem; }
.g3d-tbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.g3d-tbar input { background: var(--bg); border: 1px solid var(--line); color: var(--ink);
                  border-radius: 6px; padding: 6px 10px; font: inherit; font-size: 0.85rem; width: 230px; }
.g3d-tbar .cnt { color: var(--muted); font-size: 0.8rem; }
.g3d-tscroll { overflow-x: auto; }
#g3d-tbl { border-collapse: collapse; width: 100%; font-size: 0.85rem; }
#g3d-tbl th, #g3d-tbl td { text-align: right; padding: 6px 10px; border-bottom: 1px solid var(--line);
                           white-space: nowrap; }
#g3d-tbl th:nth-child(2), #g3d-tbl td:nth-child(2) { text-align: left; }
#g3d-tbl th { color: var(--muted); font-weight: 600; font-size: 0.78rem; cursor: pointer;
              user-select: none; position: sticky; top: 0; background: var(--card); }
#g3d-tbl th.on { color: var(--blue); text-decoration: underline; }
#g3d-tbl td.n { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
                font-variant-numeric: tabular-nums; }
#g3d-tbl tbody tr { cursor: pointer; }
#g3d-tbl tbody tr:hover { background: var(--accent-soft); }
.g3d-handle { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.82rem; }
.g3d-notes p { margin: 0 0 0.6rem; color: var(--ink); max-width: 68ch; font-size: 0.9rem; }
.g3d-method { font-size: 0.8rem; color: var(--muted); border-top: 1px solid var(--line);
              padding-top: 0.75rem; margin-top: 0.9rem; }
.g3d-method p { margin: 0 0 0.5rem; max-width: 78ch; }
