/* The graph page (graph.html). Colours and type come from app.css. */
.g-counts { margin-left: auto; font-size: 13px; white-space: nowrap; }
.g-layout { flex: 1; min-height: 0; display: flex; position: relative; }
.g-canvas { flex: 1; min-width: 0; position: relative; overflow: hidden; cursor: grab; }
.g-canvas:active { cursor: grabbing; }
.g-canvas canvas { display: block; }

.g-side {
  flex: none;
  width: 232px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-right: 1px solid var(--line);
  background: var(--panel);
  font-size: 13px;
  overflow-y: auto;
}
.g-kinds { display: flex; flex-direction: column; gap: 3px; }
.g-kind { display: flex; align-items: center; gap: 8px; padding: 2px 4px; border-radius: 6px; cursor: pointer; }
.g-kind:hover { background: var(--panel-2); }
.g-kind input, .g-opt input { accent-color: var(--accent); margin: 0; }
.g-kind .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.g-kind .n { margin-left: auto; color: var(--faint); font: 12px var(--mono); }
.g-opt { display: flex; align-items: center; gap: 8px; color: var(--muted); cursor: pointer; }
.g-buttons { display: flex; gap: 8px; }
.g-buttons .ghost { flex: 1; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: none; }
.g-buttons .ghost:hover { background: var(--panel-2); }
.g-legend { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.g-legend span { display: flex; align-items: center; gap: 8px; }
.g-legend i { display: inline-block; width: 22px; height: 0; border-top: 2px solid; flex: none; }
.g-legend i.dash { border-top-style: dashed; }
.g-ticker {
  list-style: none;
  margin: auto 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  min-height: 150px;
}
.g-ticker li { cursor: pointer; line-height: 1.3; }
.g-ticker li:hover { color: var(--text); }
.g-ticker time { font-family: var(--mono); color: var(--faint); margin-right: 5px; }
.g-ticker b { color: var(--text); font-weight: 600; }

.g-panel {
  flex: none;
  width: 380px;
  max-width: 92vw;
  border-left: 1px solid var(--line);
  background: var(--panel);
  overflow-y: auto;
  padding: 14px 16px 24px;
  font-size: 13.5px;
}
.g-panel h2 { margin: 0; font-size: 19px; display: flex; align-items: baseline; gap: 8px; }
.g-panel h2 small { font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.g-panel .close { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; padding: 0 4px; }
.g-panel .sub { color: var(--muted); margin: 2px 0 10px; }
.g-panel h3 { margin: 16px 0 6px; font-size: 12px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: 0.07em; }
.g-facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; }
.g-facts dt { color: var(--muted); }
.g-facts dd { margin: 0; font-family: var(--mono); font-size: 12.5px; }
.g-rels { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.g-rel { padding: 5px 6px; border-radius: 7px; }
.g-rel:hover { background: var(--panel-2); }
.g-rel.ended { opacity: 0.62; }
.g-rel .line { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.g-rel a.to { color: var(--accent); text-decoration: none; font-weight: 600; cursor: pointer; }
.g-rel a.to:hover { text-decoration: underline; }
.g-rel .meta { color: var(--faint); font-size: 12px; font-family: var(--mono); margin-left: auto; white-space: nowrap; }
.g-rel button.why { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 0; text-decoration: underline dotted; }
.g-rel button.why:hover { color: var(--text); }
/* How a relationship was come by is the mark every page draws (.st, in app.css). This sheet had the marks a second
   time, in slightly other colours: a release reads app.css last and the page as written reads it first, so the
   graph's marks were drawn one way as built and another as written. Only the status no other page has is here,
   and under a selector that outweighs app.css's own whichever is read last. */
.g-panel .st.observed { color: #4ade80; border-color: rgba(74, 222, 128, 0.45); }
.g-why { list-style: none; margin: 6px 0 2px; padding: 0 0 0 10px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 7px; }
.g-why li { font-size: 12.5px; }
.g-why time { font-family: var(--mono); color: var(--faint); margin-right: 6px; }
.g-why q { display: block; color: var(--text); quotes: none; margin-top: 1px; }
.g-why a { color: var(--accent); text-decoration: none; }
.g-heard { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.g-heard time { font-family: var(--mono); color: var(--faint); margin-right: 6px; font-size: 12px; }
.g-heard a { color: var(--text); text-decoration: none; }
.g-heard a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .g-side { position: absolute; z-index: 2; left: 0; top: 0; bottom: 0; width: 200px; opacity: 0.94; }
  .g-ticker { display: none; }
  .g-panel { position: absolute; z-index: 3; right: 0; top: 0; bottom: 0; }
  .g-counts { display: none; }
}
