/* Governance, checks and balances (tools/governance_page.py; STAGING ONLY behind FRAMEWORK_HUB_LIVE). Mobile first: the
   structure as a nested list, the open card under its box; from 900px an org-chart tree with connector lines and the
   open card under the tree. Tiers are told apart by weight and fill, never by RAG colours. */
.gv { --line: var(--ink-3, #9FB6BB); --gap: 24px; display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.gv-box { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--accent-deep); background: var(--surface);
  color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; line-height: 1.3; text-align: left; cursor: pointer; }
.gv-box:hover { background: var(--surface-2); }
.gv-box:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 2px; }
.gv-box.gv-board { background: var(--ink); border-color: var(--ink); color: var(--surface); font-weight: 700; }
.gv-box.gv-bcom { border-width: 2px; border-color: var(--ink); }
.gv-box.gv-exec { border-width: 2px; }
.gv-box.gv-mgmt { border-color: var(--line); }
.gv-box[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--accent-deep); }
.gv-box.gv-board[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--accent-deep), inset 0 0 0 2px var(--surface); }

/* phone: the nested list */
.gv-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gv-list ul ul { margin: 8px 0 0 10px; padding-left: 14px; border-left: 2px solid var(--line); }
.gv-list li { position: relative; }
.gv-list ul ul > li::before { content: ""; position: absolute; left: -14px; top: 24px; width: 12px; border-top: 2px solid var(--line); }
.gv-list .gv-card { margin-top: 8px; }

/* the card */
.gv-pick { margin: 0; padding: 16px; border: 1.5px dashed var(--border-strong, var(--border)); border-radius: 12px; color: var(--ink-2); }
.gv-card { padding: 18px; border-radius: 14px; border: 1px solid var(--border); border-top: 4px solid var(--ink); background: var(--surface); }
.gv-card[hidden] { display: none; }
.gv-ch { margin: 0 0 10px; font-size: 19px; line-height: 1.25; }
.gv-card dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.gv-card dt { font-family: var(--font-data); font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.gv-card dd { margin: 3px 0 0; font-size: 15px; line-height: 1.5; }
.gv-cite, .gv-ill { color: var(--ink-2); font-size: 13.5px; }
.gv-reads { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.gv-reads li { padding: 2px 10px; border-radius: 99px; border: 1.5px solid var(--accent-deep); font-size: 13.5px; font-weight: 600; }
.gv-halden { margin: 18px 0 0; }

@media (min-width: 720px) { .gv-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gv-card dl > div:first-child, .gv-card dl > div:nth-child(2) { grid-column: 1 / -1; } }

/* 900px and up: the drawn chart, one row per tier; governance.js draws the reporting lines in the SVG behind it */
@media (min-width: 900px) {
  .gv-list { display: none; }
  .gv-chart { position: relative; display: flex; flex-direction: column; gap: 34px; padding: 4px 0 8px; }
  .gv-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
  .gv-lines path { fill: none; stroke: var(--line); stroke-width: 2; }
  .gv-lines path.is-on { stroke: var(--accent-deep); stroke-width: 3; }
  .gv-row { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .gv-tl { margin: 0; font-family: var(--font-data); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2);
    background: var(--ground, var(--surface-2)); padding: 0 8px; position: relative; z-index: 1; }
  .gv-row ul { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; position: relative; z-index: 1; }
  .gv-row li { flex: 0 1 220px; min-width: 0; display: flex; }
  .gv-box { text-align: center; display: flex; align-items: center; justify-content: center; min-height: 58px; }
  .gv-row-board li { flex-basis: 360px; }
  .gv-row-board .gv-box { font-size: 17px; min-height: 62px; }
  .gv-row-exec li { flex-basis: 300px; }
  .gv-row-mgmt li, .gv-row-wg li { flex-basis: 190px; }
  .gv-row-wg .gv-box { font-size: 14.5px; }
  .gv-panel { margin-top: 4px; }
  .gv-card { padding: 22px 26px; }
}
@media (min-width: 1200px) { .gv-row li { flex-basis: 240px; } .gv-row-mgmt li, .gv-row-wg li { flex-basis: 200px; } }

.gv-fits { margin: 4px 0 0; max-width: 64ch; font-size: 17px; line-height: 1.5; }
.gv-note { margin: 0; font-size: 13.5px; color: var(--ink-2); }
@media (min-width: 900px) { .gv-lines path[data-gv-skip] { stroke-dasharray: 6 5; } }

/* item H (founder, 25 Oct): the card's frequency as a pill level with the title (it wraps under the title on a phone);
   from 900px every row stays on one line, so the connectors (governance.js) always meet their boxes */
.gv-ctop { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 6px 16px; margin: 0 0 12px; }
.gv-ctop .gv-ch { margin: 0; }
.gv-freq { padding: 3px 10px; border-radius: 99px; border: 1.5px solid var(--accent-deep); background: var(--surface); color: var(--ink);
  font-size: 13px; font-weight: 600; line-height: 1.35; }
@media (min-width: 900px) {
  .gv-row ul { flex-wrap: nowrap; }
  .gv-row-mgmt li, .gv-row-wg li { flex: 1 1 0; max-width: 220px; }
  .gv-row-bcom li { flex: 1 1 0; max-width: 260px; }
}

/* the hub's compact committee chart (tools/governance_page.py mini_chart, item K): static boxes, the same connectors
   (governance.js gvDraw) at every width; the working groups are left off so the management row fits the column */
.gv-mini { margin: 0; gap: 0; }
.gv-mini .gv-chart { position: relative; display: flex; flex-direction: column; gap: 22px; padding: 4px 0; }
.gv-mini .gv-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.gv-mini .gv-lines path { fill: none; stroke: var(--line); stroke-width: 1.5; }
.gv-mini .gv-lines path[data-gv-skip] { stroke-dasharray: 5 4; }
.gv-mini .gv-row { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gv-mini .gv-tl { margin: 0; font-family: var(--font-data); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2);
  background: var(--ground, var(--surface-2)); padding: 0 6px; position: relative; z-index: 1; }
.gv-mini .gv-row ul { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-wrap: nowrap; justify-content: center; gap: 6px; position: relative; z-index: 1; }
.gv-mini .gv-row li { flex: 1 1 0; max-width: 170px; min-width: 0; display: flex; }
.gv-mini .gv-row-board li, .gv-mini .gv-row-exec li { max-width: 230px; }
.gv-mini .gv-box { cursor: default; min-height: 42px; padding: 6px; border-radius: 9px; font-size: 12.5px; line-height: 1.25; text-align: center;
  display: flex; align-items: center; justify-content: center; }
.gv-mini .gv-box:hover { background: var(--surface); }
.gv-mini .gv-box.gv-board:hover { background: var(--ink); }
@media (max-width: 599px) {
  .gv-mini .gv-row ul { gap: 4px; }
  .gv-mini .gv-box { font-size: 10px; padding: 4px 2px; min-height: 38px; border-radius: 7px; }
  .gv-mini .gv-tl { font-size: 9px; }
}
