/* Organization: cards (org.js) and hex map (orgmap.js). */

/* ---- shared hero with the Cards | Hex map switch on the right ---- */
.hero.org-hero { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: flex-end; justify-content: space-between; }
.org-hero .seg a { color: var(--ink-2); }
.org-hero .seg a[aria-current] { color: #fff; }
.org-inline:hover { text-decoration: underline; }
.org-inline.accent { color: var(--accent); font-weight: 500; }

/* ---- company card ---- */
.org-lead { margin: 0; max-width: 760px; }
.org-lead .org-inline { color: var(--ink); font-weight: 500; }
.org-heads { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.split[data-org="company"] .split-hl { padding: 20px 30px; justify-content: center; }
.org-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.org-stats a { display: block; min-height: 44px; }
.org-stats a:hover span { text-decoration: underline; }
.org-stats b { display: block; font: 400 34px/1 var(--font-display); letter-spacing: -0.03em; }
.org-stats span { display: block; margin-top: 4px; font-size: 13px; }

/* ---- unit cards ---- */
.org-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; align-items: start; }
.org-unit { padding: 24px 26px; gap: 16px; }
.org-unit-head { display: flex; gap: 14px; align-items: flex-start; }
.org-unit-head .grow { flex: 1; min-width: 0; }
.org-unit-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.org-unit-title h2 { overflow-wrap: anywhere; }
.org-unit .count { color: var(--ink-3); white-space: nowrap; }
.org-counts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.org-counts b { color: var(--ink); font-weight: 600; }
.org-member { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 0; border-top: var(--rule-row); }
.org-member:hover .name { text-decoration: underline; }
.org-member .name { flex: 1 1 auto; min-width: 0; font-weight: 500; }
.org-member .title { flex: 0 1 auto; color: var(--ink-3); font-size: 13px; text-align: right; }
.org-team { background: var(--surface-sunken); border-radius: var(--radius-tile); padding: 14px 16px; }
.org-team-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.org-team-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; min-width: 0; }
.org-team-head .count { font-size: 13px; }
.org-team .members { color: var(--ink-2); font-size: 13px; margin-top: 6px; }
.org-team .members a:hover, .org-team-risk a:hover, .org-risk a:hover { text-decoration: underline; }
.org-team-risk { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; font-size: 12px; color: var(--risk-soft-text); }
.org-team-risk i { flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 2px; background: var(--risk-high); }
.org-risk { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--risk-soft-bg); }
.org-risk i { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 3px; background: var(--risk-high); }
.org-risk .label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--risk-soft-label); }
.org-risk .names { color: var(--risk-soft-text); font-size: 13px; margin-top: 2px; }

/* ---- hex map ---- */
.hx { transition: opacity .15s ease, transform .15s ease; }
.hx:hover { transform: scale(1.04); }
.hx:focus-visible { outline: none; background: var(--ink) !important; }
.hx[aria-pressed="true"]:focus-visible, .hx[data-centre]:focus-visible { background: var(--accent) !important; } /* already has the ink ring */
.hx-pill { margin-top: 2px; font-size: 10px; font-weight: 600; line-height: 1.4; padding: 0 7px; border-radius: 8px; color: var(--ink); white-space: nowrap; }
.hx-pill.high { background: var(--risk-high); } .hx-pill.medium { background: var(--risk-medium); }
.orgmap-card { padding: 24px 28px; gap: 20px; }
.orgmap-filters { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.orgmap-units { display: flex; flex-wrap: wrap; gap: 6px; }
.unit-chip { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 10px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); font-weight: 500; cursor: pointer; }
.unit-chip.all { padding: 0 14px; }
.unit-chip.all[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.unit-chip .n { color: var(--ink-3); font-weight: 400; font-size: 13px; }
.orgmap-card .seg.on-card { background: var(--bg); }
.orgmap-card .seg.on-card button { color: var(--ink-2); }
.orgmap-card .seg.on-card [aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.orgmap-key { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; padding-top: 16px; border-top: var(--rule-row); font-size: 13px; color: var(--ink-2); }
.orgmap-key > span { display: flex; align-items: center; gap: 8px; }
.orgmap-key .ring { position: relative; }
.orgmap-key .ring::after { content: ""; position: absolute; inset: 3px; background: var(--surface); clip-path: var(--hex-clip); }
.split[data-org="sel"] .split-main { flex-direction: row; gap: 16px; align-items: flex-start; padding: 24px 28px; }
.split[data-org="sel"] .body { min-width: 0; flex: 1; }
.split[data-org="sel"] h2 { margin-top: 4px; line-height: 1.2; overflow-wrap: anywhere; }
.split[data-org="sel"] dl { margin: 16px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; }
.split[data-org="sel"] dt { color: var(--ink-3); } .split[data-org="sel"] dd { margin: 0; min-width: 0; }
.split[data-org="sel"] dd a:hover { text-decoration: underline; }
.split[data-org="sel"] .split-hl { padding: 24px 28px; justify-content: space-between; gap: 16px; }
.split[data-org="sel"] .split-hl .eyebrow { padding: 0; }
.split[data-org="sel"] .btn.on-blue { justify-content: space-between; }
@media (max-width: 520px) { .split[data-org="sel"] dl { grid-template-columns: 1fr; gap: 2px; } .split[data-org="sel"] dd { margin-bottom: 8px; } }
