/* CGHRONOS components. Every value comes from tokens.css; change tokens, not this file. */
:root { --margin: var(--margin-sm); --gutter: var(--gutter-sm); }
@media (min-width: 640px) { :root { --margin: var(--margin-md); --gutter: var(--gutter-md); } }
@media (min-width: 1024px) { :root { --margin: var(--margin-lg); } }

.cgh-btn, .cgh-link, .cgh-field__input, .cgh-marker, .cgh-unit { outline: 0 solid transparent; }
.cgh-btn:focus-visible, .cgh-link:focus-visible, .cgh-field__input:focus-visible, .cgh-marker:focus-visible, .cgh-unit:focus-visible, .cgh-logo-link:focus-visible {
  outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset);
}
.cgh-tabular { font-variant-numeric: tabular-nums; }
.cgh-container { max-width: var(--container); margin: 0 auto; padding: 0 var(--margin); box-sizing: content-box; }
.cgh-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Button */
.cgh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; box-sizing: border-box;
  height: var(--control-height); padding: 0 20px; border-radius: var(--radius-m);
  border: var(--border-width) solid var(--accent); background: var(--accent); color: var(--on-accent);
  font: 600 15px/20px var(--font-sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-ui), border-color var(--duration-fast) var(--ease-ui), transform var(--duration-fast) var(--ease-ui);
}
.cgh-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.cgh-btn:active { background: var(--accent-pressed); border-color: var(--accent-pressed); transform: scale(0.98); }
.cgh-btn--secondary { background: transparent; border-color: var(--border-control); color: var(--text); }
.cgh-btn--secondary:hover, .cgh-btn--secondary:active { background: var(--fill-subtle); border-color: var(--border-control); }
.cgh-btn:disabled, .cgh-btn[aria-disabled="true"] { background: var(--fill-subtle); border-color: var(--fill-subtle); color: var(--disabled); cursor: not-allowed; transform: none; }
.cgh-btn--secondary:disabled, .cgh-btn--secondary[aria-disabled="true"] { background: transparent; border-color: var(--border); }
.cgh-btn[aria-busy="true"] { cursor: progress; }
.cgh-btn[aria-busy="true"]::before { content: ""; width: 14px; height: 14px; box-sizing: border-box; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: cgh-spin 800ms linear infinite; }
@keyframes cgh-spin { to { transform: rotate(360deg); } }

/* Link */
.cgh-link { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; border-radius: 2px; }
.cgh-link:hover { text-decoration-thickness: 2px; }
.cgh-link--nav { color: var(--text); text-decoration: none; font: 600 15px/20px var(--font-sans); }
.cgh-link--nav:hover, .cgh-link--nav[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

/* TextField */
.cgh-field { display: flex; flex-direction: column; gap: 6px; }
.cgh-field__label { font: 500 13px/16px var(--font-sans); color: var(--text); }
.cgh-field__input {
  box-sizing: border-box; width: 100%; height: var(--control-height); padding: 0 var(--space-3);
  border-radius: var(--radius-m); border: var(--border-width) solid var(--border-control);
  background: var(--surface); color: var(--text); font: 400 16px/24px var(--font-sans);
  transition: border-color var(--duration-fast) var(--ease-ui);
}
textarea.cgh-field__input { height: auto; min-height: 96px; padding: 10px var(--space-3); resize: vertical; }
.cgh-field__input::placeholder { color: var(--muted); opacity: 1; }
.cgh-field__input:focus-visible { border-color: var(--text); }
.cgh-field__hint { font: 400 13px/20px var(--font-sans); color: var(--muted); }
.cgh-field__error { display: flex; align-items: center; gap: 6px; font: 400 13px/20px var(--font-sans); color: var(--error); }
.cgh-field__error svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cgh-field--error .cgh-field__input { border-color: var(--error); }
.cgh-field__input:disabled { border-color: var(--border); color: var(--disabled); cursor: not-allowed; }
.cgh-field--disabled .cgh-field__label { color: var(--disabled); }

/* Notice */
.cgh-notice { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-s); border: var(--border-width) solid var(--border); background: var(--surface); color: var(--text); font: 400 14px/20px var(--font-sans); }
.cgh-notice svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cgh-notice__title { font-weight: 600; }
.cgh-notice--success { border-color: var(--success); } .cgh-notice--success svg { color: var(--success); }
.cgh-notice--error { border-color: var(--error); } .cgh-notice--error svg { color: var(--error); }

/* Status */
.cgh-status { display: inline-flex; align-items: center; gap: var(--space-2); font: 400 13px/20px var(--font-sans); color: var(--text); white-space: nowrap; }
.cgh-status--pill { height: 28px; padding: 0 var(--space-3); box-sizing: border-box; border-radius: var(--radius-pill); border: var(--border-width) solid var(--border); }
.cgh-status__dot { width: 10px; height: 10px; flex: none; border-radius: 50%; color: var(--status-available); background: currentColor; }
.cgh-status--reserved .cgh-status__dot { color: var(--status-reserved); background: linear-gradient(90deg, currentColor 50%, transparent 50%); box-shadow: inset 0 0 0 2px currentColor; }
.cgh-status--unavailable .cgh-status__dot { color: var(--status-unavailable); background: none; box-shadow: inset 0 0 0 2px currentColor; }

/* Icon */
.cgh-icon { width: var(--icon-l); height: var(--icon-l); flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cgh-icon--m { width: var(--icon-m); height: var(--icon-m); }
.cgh-icon--s { width: var(--icon-s); height: var(--icon-s); }

/* Marker */
.cgh-marker { position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--hit-area); height: var(--hit-area); padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.cgh-marker::before { content: ""; width: var(--marker-render); height: var(--marker-render); border-radius: 50%; background: var(--cinnabar); transition: width var(--duration-fast) var(--ease-ui), height var(--duration-fast) var(--ease-ui), box-shadow var(--duration-fast) var(--ease-ui); }
.cgh-marker--map::before { width: var(--marker-map); height: var(--marker-map); }
.cgh-marker--outlined::before { box-shadow: 0 0 0 2px var(--graphite); }
.cgh-marker[aria-pressed="true"]::before { width: var(--marker-active); height: var(--marker-active); box-shadow: 0 0 0 4px var(--marker-ring); }
.cgh-marker--outlined[aria-pressed="true"]::before { box-shadow: 0 0 0 2px var(--graphite), 0 0 0 6px var(--marker-ring); }
.cgh-marker-label { display: inline-flex; align-items: center; gap: var(--space-3); padding: 6px 10px; border-radius: var(--radius-s); background: var(--graphite); color: var(--warm-white); font: 600 13px/16px var(--font-sans); }
.cgh-marker-label .cgh-status { color: var(--warm-white); font-weight: 400; }

/* Card */
.cgh-card { box-sizing: border-box; padding: var(--space-5); border-radius: var(--radius-l); background: var(--surface); color: var(--text); font: 400 16px/24px var(--font-sans); }
.cgh-card--outlined { border: var(--border-width) solid var(--border); }

/* Stat, Testimonial, CaseCard, LogoRow, IntegrationList, Steps */
.cgh-stat { display: flex; flex-direction: column; gap: var(--space-4); }
.cgh-stat__figure { font: 600 54px/54px var(--font-display); font-variant-numeric: tabular-nums; color: var(--text); }
.cgh-stat__context { font: 400 15px/22px var(--font-sans); color: var(--muted); }
.cgh-quote { margin: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.cgh-quote__text { margin: 0; font: 400 18px/28px var(--font-sans); color: var(--text); }
.cgh-quote__by { font: 400 13px/20px var(--font-sans); color: var(--muted); }
.cgh-case { display: flex; flex-direction: column; gap: var(--space-4); text-decoration: none; color: var(--text); }
.cgh-case__media { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-s); background: var(--fill-subtle); }
.cgh-case__title { font: 600 16px/24px var(--font-sans); }
.cgh-case__meta { margin-top: var(--space-1); font: 400 13px/20px var(--font-sans); color: var(--muted); }
.cgh-logos { display: flex; flex-direction: column; gap: var(--space-4); }
.cgh-logos__label { font: 400 13px/20px var(--font-sans); color: var(--muted); }
.cgh-logos__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--space-4) var(--space-6); align-items: center; }
.cgh-logos__grid img, .cgh-logos__grid svg { height: 32px; width: auto; max-width: 100%; }
.cgh-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: 0; margin: 0; list-style: none; }
.cgh-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 var(--space-3); box-sizing: border-box; border-radius: var(--radius-s); border: var(--border-width) solid var(--border); font: 400 13px/20px var(--font-sans); color: var(--text); }
.cgh-steps { margin: 0; padding: 0; list-style: none; counter-reset: cgh-step; display: flex; flex-direction: column; gap: 10px; font: 400 15px/22px var(--font-sans); color: var(--text); }
.cgh-steps li { counter-increment: cgh-step; display: flex; gap: var(--space-2); }
.cgh-steps li::before { content: counter(cgh-step) "."; font-weight: 600; min-width: 1.2em; }
.cgh-placeholder { display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: var(--space-3); border-radius: var(--radius-s); border: var(--border-width) dashed var(--border-control); background: var(--fill-subtle); color: var(--muted); font: 400 13px/20px var(--font-sans); text-align: center; }

/* Logo and Header */
cgh-logo { display: inline-block; height: 28px; color: var(--text); line-height: 0; vertical-align: middle; }
cgh-logo svg { display: block; height: 100%; width: auto; }
.cgh-logo-link { display: inline-flex; border-radius: 2px; }
.cgh-header { position: sticky; top: 0; z-index: var(--z-header); background: var(--bg-veil); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cgh-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); height: var(--header-height); }
.cgh-header__nav { display: flex; align-items: center; gap: 28px; }
@media (max-width: 719px) { .cgh-header__nav .cgh-link--nav { display: none; } .cgh-header cgh-logo { height: 22px; } .cgh-header .cgh-btn { padding: 0 14px; } }

/* Hero */
.cgh-hero { padding: var(--space-5) 0 var(--space-9); color: var(--text); }
.cgh-hero__media { position: relative; display: block; width: 100%; height: min(68vh, 640px); object-fit: cover; border-radius: var(--radius-l); background: var(--fill-subtle); }
.cgh-hero__title { margin: var(--space-7) 0 var(--space-4); max-width: 14ch; font: 600 40px/44px var(--font-display); letter-spacing: -0.01em; }
.cgh-hero__lead { margin: 0 0 var(--space-6); max-width: 52ch; font: 400 18px/28px var(--font-sans); color: var(--muted); }
.cgh-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }
@media (min-width: 1024px) { .cgh-hero__title { font-size: 61px; line-height: 64px; } .cgh-hero__lead { font-size: 20px; line-height: 30px; } }

/* Form */
.cgh-form { display: grid; gap: var(--space-5); max-width: 560px; }
.cgh-form__row { display: grid; gap: var(--space-4); }
@media (min-width: 640px) { .cgh-form__row { grid-template-columns: 1fr 1fr; } }

/* Embedded viewer: the client's brand leads. Set the six --embed-* variables on the root. */
[data-cgh-embed] {
  --accent: var(--embed-accent, #151515); --accent-hover: var(--embed-accent, #151515); --accent-pressed: var(--embed-accent, #151515);
  --on-accent: var(--embed-on-accent, #FFFFFF); --link: var(--embed-accent, #151515);
  --bg: var(--embed-bg, #FFFFFF); --surface: var(--embed-bg, #FFFFFF); --raised: var(--embed-bg, #FFFFFF);
  --text: var(--embed-text, #151515); --focus: var(--embed-text, #151515);
  --radius-m: var(--embed-radius, 8px); --font-sans: var(--embed-font, Inter, Arial, sans-serif);
  background: var(--bg); color: var(--text); font-family: var(--font-sans);
}
.cgh-unit { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); width: 100%; box-sizing: border-box; padding: 10px var(--space-3); border-radius: var(--radius-m); border: var(--border-width) solid var(--border); background: var(--surface); color: var(--text); font: 400 14px/20px var(--font-sans); text-align: left; cursor: pointer; }
.cgh-unit:hover { border-color: var(--border-control); }
.cgh-unit[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cgh-unit__name { font-weight: 600; }
.cgh-unit .cgh-status__dot { width: 8px; height: 8px; }
.cgh-unit-list { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.cgh-select-ring { box-sizing: border-box; width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--accent); background: rgba(255, 255, 255, 0.7); }
.cgh-powered { display: inline-flex; align-items: center; gap: var(--space-2); font: 400 12px/16px var(--font-sans); color: var(--muted); text-decoration: none; }
.cgh-powered cgh-logo { height: 11px; color: var(--text); }

/* ---------- Working tools ---------- */
/* Inside an app the primary button is graphite and red means only "selected". */
[data-cgh-app] { --accent: var(--action); --accent-hover: var(--action-hover); --accent-pressed: var(--action-hover); --on-accent: var(--on-action); }
[data-density="compact"] { --control-height: var(--control-height-compact); --row-height: var(--row-height-compact); }
[data-density="compact"] .cgh-btn { padding: 0 var(--space-3); font-size: 13px; }
[data-density="compact"] .cgh-field__input { font-size: 14px; padding: 0 10px; }
.cgh-mono { font-family: var(--font-mono); font-size: 0.93em; }
.cgh-overlay { background: var(--raised); border: var(--border-width) solid var(--border-control); border-radius: var(--radius-m); box-shadow: var(--shadow-overlay); color: var(--text); }
.cgh-iconbtn { display: inline-flex; align-items: center; justify-content: center; width: var(--control-height); height: var(--control-height); padding: 0; box-sizing: border-box; border-radius: var(--radius-m); border: var(--border-width) solid var(--border-control); background: var(--surface); color: var(--text); cursor: pointer; }
.cgh-iconbtn:hover { background: var(--fill-subtle); }
.cgh-iconbtn[aria-pressed="true"] { background: var(--action); border-color: var(--action); color: var(--on-action); }
.cgh-iconbtn--ghost { border-color: transparent; background: transparent; }
.cgh-iconbtn:focus-visible, .cgh-tab:focus-visible, .cgh-menu__item:focus-visible, .cgh-fchip:focus-visible, .cgh-pin:focus-visible, .cgh-table th button:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset); }
.cgh-iconbtn svg, .cgh-fchip svg, .cgh-menu__item svg, .cgh-search svg, .cgh-tag svg, .cgh-actor svg, .cgh-prov svg, .cgh-empty svg, .cgh-code__bar svg, .cgh-delta svg { width: var(--icon-m); height: var(--icon-m); flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Table */
.cgh-table-wrap { border: var(--border-width) solid var(--border); border-radius: var(--radius-m); background: var(--surface); overflow: auto; }
.cgh-table { width: 100%; border-collapse: collapse; font: 400 14px/20px var(--font-sans); color: var(--text); }
.cgh-table th { height: var(--row-height); padding: 0 var(--space-3); text-align: left; font: 500 13px/16px var(--font-sans); color: var(--muted); border-bottom: var(--border-width) solid var(--border-control); white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
.cgh-table th button { all: unset; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; border-radius: 2px; }
.cgh-table th[aria-sort] { color: var(--text); }
.cgh-table td { height: var(--row-height); padding: 0 var(--space-3); border-bottom: var(--border-width) solid var(--border); }
.cgh-table tr:last-child td { border-bottom: 0; }
.cgh-table tbody tr:hover td { background: var(--fill-subtle); }
.cgh-table tr[aria-selected="true"] td { background: var(--fill-subtle); box-shadow: inset 0 1px 0 var(--text), inset 0 -1px 0 var(--text); }
.cgh-table .cgh-num { text-align: right; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.cgh-delta { display: inline-flex; align-items: center; gap: 2px; font-variant-numeric: tabular-nums; }
.cgh-delta svg { width: 14px; height: 14px; }
.cgh-delta--up { color: var(--positive); } .cgh-delta--down { color: var(--negative); }

/* Tabs */
.cgh-tabs { display: flex; gap: var(--space-5); border-bottom: var(--border-width) solid var(--border); }
.cgh-tab { height: var(--control-height); padding: 0; border: 0; background: none; cursor: pointer; font: 500 14px/20px var(--font-sans); color: var(--muted); box-shadow: inset 0 -2px 0 transparent; border-radius: 2px 2px 0 0; }
.cgh-tab:hover { color: var(--text); }
.cgh-tab[aria-selected="true"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--text); }
.cgh-tab__count { margin-left: 6px; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 400; }

/* Search and filter bar */
.cgh-search { display: flex; align-items: center; gap: var(--space-2); height: var(--control-height); padding: 0 var(--space-3); box-sizing: border-box; border-radius: var(--radius-m); border: var(--border-width) solid var(--border-control); background: var(--surface); color: var(--muted); }
.cgh-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: 400 14px/20px var(--font-sans); }
.cgh-search:focus-within { border-color: var(--text); outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset); }
.cgh-filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.cgh-fchip { display: inline-flex; align-items: center; gap: 6px; height: var(--control-height-compact); padding: 0 var(--space-3); box-sizing: border-box; border-radius: var(--radius-pill); border: var(--border-width) solid var(--border-control); background: var(--surface); color: var(--text); font: 500 13px/16px var(--font-sans); white-space: nowrap; cursor: pointer; }
.cgh-fchip svg { width: 16px; height: 16px; }
.cgh-fchip:hover { background: var(--fill-subtle); }
.cgh-fchip[aria-pressed="true"] { background: var(--action); border-color: var(--action); color: var(--on-action); }

/* Menu, Popover, Dialog */
.cgh-menu { min-width: 200px; padding: var(--space-1); margin: 0; list-style: none; }
.cgh-menu__item { display: flex; align-items: center; gap: var(--space-2); width: 100%; height: 36px; padding: 0 var(--space-3); box-sizing: border-box; border: 0; border-radius: var(--radius-s); background: none; color: var(--text); font: 400 14px/20px var(--font-sans); text-align: left; cursor: pointer; }
.cgh-menu__item:hover, .cgh-menu__item[aria-current="true"] { background: var(--fill-subtle); }
.cgh-menu__item[aria-disabled="true"] { color: var(--disabled); cursor: not-allowed; }
.cgh-menu__sep { height: 1px; margin: var(--space-1) 0; background: var(--border); }
.cgh-menu__hint { margin-left: auto; color: var(--muted); font: 400 12px/16px var(--font-mono); }
.cgh-popover { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); font: 400 14px/20px var(--font-sans); }
.cgh-dialog { width: min(480px, 100%); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); font: 400 14px/20px var(--font-sans); }
.cgh-dialog__title { margin: 0; font: 600 20px/28px var(--font-sans); }
.cgh-dialog__actions { display: flex; justify-content: flex-end; gap: var(--space-3); margin-top: var(--space-2); }
.cgh-scrim { background: var(--scrim); }

/* Empty state, Skeleton */
.cgh-empty { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); padding: var(--space-6); border: var(--border-width) dashed var(--border-control); border-radius: var(--radius-m); color: var(--text); font: 400 14px/20px var(--font-sans); }
.cgh-empty svg { width: var(--icon-l); height: var(--icon-l); color: var(--muted); }
.cgh-empty__title { font: 600 16px/24px var(--font-sans); }
.cgh-empty__text { color: var(--muted); max-width: 48ch; }
.cgh-skeleton { display: block; height: 12px; border-radius: var(--radius-s); background: var(--fill-subtle); animation: cgh-pulse 1.4s ease-in-out infinite; }
@keyframes cgh-pulse { 50% { opacity: 0.45; } }

/* Tag, Fact, RangeBar, Breakdown, Provenance */
.cgh-tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 var(--space-2); box-sizing: border-box; border-radius: var(--radius-s); border: var(--border-width) solid var(--border); background: var(--surface); color: var(--text); font: 400 12px/16px var(--font-sans); white-space: nowrap; }
.cgh-tag__shape { width: 8px; height: 8px; flex: none; background: currentColor; }
.cgh-tag__shape--triangle { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.cgh-tag__shape--diamond { transform: rotate(45deg) scale(0.85); }
.cgh-tag__shape--circle { border-radius: 50%; }
.cgh-tag__shape--bar { height: 3px; }
.cgh-fact { display: flex; flex-direction: column; gap: 2px; padding: var(--space-2) 0; border-top: var(--border-width) solid var(--border); }
.cgh-fact__label { font: 400 12px/16px var(--font-sans); color: var(--muted); }
.cgh-fact__value { font: 600 16px/24px var(--font-sans); font-variant-numeric: tabular-nums lining-nums; color: var(--text); }
.cgh-range { position: relative; height: 44px; font: 400 12px/16px var(--font-sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.cgh-range__track { position: absolute; left: 0; right: 0; top: 16px; height: 8px; border-radius: var(--radius-s); background: var(--fill-subtle); }
.cgh-range__band { position: absolute; top: 16px; height: 8px; border-radius: var(--radius-s); background: var(--muted); }
.cgh-range__likely { position: absolute; top: 10px; width: 2px; height: 20px; margin-left: -1px; background: var(--text); }
.cgh-range__point { position: absolute; top: 12px; width: 16px; height: 16px; margin-left: -8px; box-sizing: border-box; border-radius: 50%; background: var(--selected); border: 2px solid var(--surface); }
.cgh-range__label { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.cgh-range__label--top { top: -4px; color: var(--text); } .cgh-range__label--bottom { top: 30px; }
.cgh-breakdown { display: flex; height: 12px; border-radius: 2px; overflow: hidden; gap: 2px; }
.cgh-breakdown > * { display: block; min-width: 2px; }
.cgh-swatch { display: inline-block; width: 8px; height: 8px; margin-right: var(--space-2); }
.cgh-shade-1 { background: var(--text); } .cgh-shade-2 { background: var(--muted); } .cgh-shade-3 { background: var(--status-unavailable); } .cgh-shade-4 { background: var(--border-control); } .cgh-shade-5 { background: var(--border); }
.cgh-prov { display: inline-flex; align-items: center; gap: 6px; font: 400 12px/16px var(--font-sans); color: var(--muted); }
.cgh-prov svg { width: 14px; height: 14px; }
.cgh-prov time, .cgh-prov b { color: var(--text); font-weight: 500; }
.cgh-prov--stale { color: var(--warning); } .cgh-prov--stale time { color: inherit; }

/* Map */
.cgh-pin { position: relative; display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border: 0; border-radius: var(--radius-pill); background: var(--text); color: var(--bg); font: 600 12px/16px var(--font-sans); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; }
.cgh-pin::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; margin-left: -4px; background: inherit; transform: rotate(45deg); }
.cgh-pin[aria-pressed="true"] { background: var(--selected); color: var(--graphite); box-shadow: 0 0 0 4px var(--marker-ring); }
.cgh-pin--seen { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-control); }
.cgh-cluster { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--text); color: var(--bg); font: 600 13px/16px var(--font-sans); font-variant-numeric: tabular-nums; box-shadow: 0 0 0 5px var(--border); cursor: pointer; }
.cgh-mapnote { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: var(--radius-s); background: var(--warm-white); color: var(--graphite); box-shadow: inset 0 0 0 1.5px var(--graphite); cursor: pointer; }
.cgh-mapnote svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cgh-parcel { fill: var(--surface); stroke: var(--border-control); stroke-width: 1; }
.cgh-parcel--selected { fill: var(--marker-ring); stroke: var(--selected); stroke-width: 2.5; }
.cgh-area { fill: rgba(21, 21, 21, 0.04); stroke: var(--text); stroke-width: 2; stroke-dasharray: 7 5; }
.cgh-data-1 { fill: var(--data-1); background: var(--data-1); } .cgh-data-2 { fill: var(--data-2); background: var(--data-2); } .cgh-data-3 { fill: var(--data-3); background: var(--data-3); } .cgh-data-4 { fill: var(--data-4); background: var(--data-4); } .cgh-data-5 { fill: var(--data-5); background: var(--data-5); }
.cgh-legend { width: 220px; padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); font: 400 12px/16px var(--font-sans); color: var(--muted); }
.cgh-legend__title { font: 500 13px/16px var(--font-sans); color: var(--text); }
.cgh-legend__ramp { display: flex; height: 10px; } .cgh-legend__ramp > * { flex: 1; }
.cgh-legend__ends { display: flex; justify-content: space-between; }
.cgh-legend__row { display: flex; align-items: center; gap: var(--space-2); }
.cgh-mapctl { display: inline-flex; flex-direction: column; gap: var(--space-2); }
.cgh-mapctl__zoom { display: flex; flex-direction: column; }
.cgh-mapctl__zoom .cgh-iconbtn:first-child { border-radius: var(--radius-m) var(--radius-m) 0 0; }
.cgh-mapctl__zoom .cgh-iconbtn:last-child { border-radius: 0 0 var(--radius-m) var(--radius-m); border-top: 0; }

/* Agents */
.cgh-actor { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px 0 4px; border-radius: var(--radius-s); border: var(--border-width) solid var(--border-control); color: var(--text); font: 500 12px/16px var(--font-sans); white-space: nowrap; }
.cgh-actor svg { width: 14px; height: 14px; }
.cgh-actor--agent { border-style: dashed; }
.cgh-conn { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4); border: var(--border-width) solid var(--border); border-radius: var(--radius-m); background: var(--surface); color: var(--text); font: 400 14px/20px var(--font-sans); }
.cgh-conn__body { flex: 1; min-width: 0; }
.cgh-conn__name { font: 600 16px/24px var(--font-sans); }
.cgh-conn__meta { color: var(--muted); font: 400 13px/20px var(--font-sans); }
.cgh-state { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/16px var(--font-sans); white-space: nowrap; }
.cgh-state::before { content: ""; width: 8px; height: 8px; box-sizing: border-box; border-radius: 50%; background: currentColor; }
.cgh-state--on { color: var(--success); }
.cgh-state--working { color: var(--info); } .cgh-state--working::before { animation: cgh-pulse 1.4s ease-in-out infinite; }
.cgh-state--paused { color: var(--muted); } .cgh-state--paused::before { background: none; border: 2px solid currentColor; }
.cgh-state--error { color: var(--error); } .cgh-state--error::before { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.cgh-key { display: flex; align-items: center; gap: var(--space-3); min-height: var(--control-height); padding: 0 var(--space-3); border: var(--border-width) solid var(--border-control); border-radius: var(--radius-m); background: var(--surface); color: var(--text); }
.cgh-key code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 13px/20px var(--font-mono); }
.cgh-scopes { margin: 0; padding: 0; list-style: none; border: var(--border-width) solid var(--border); border-radius: var(--radius-m); background: var(--surface); font: 400 14px/20px var(--font-sans); color: var(--text); }
.cgh-scopes li { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: var(--border-width) solid var(--border); }
.cgh-scopes li:last-child { border-bottom: 0; }
.cgh-scopes input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--action); flex: none; }
.cgh-scopes__name { font-weight: 600; } .cgh-scopes__text { color: var(--muted); font-size: 13px; }
.cgh-scopes__level { margin-left: auto; white-space: nowrap; }
.cgh-log { margin: 0; padding: 0; list-style: none; font: 400 14px/20px var(--font-sans); color: var(--text); }
.cgh-log li { display: grid; grid-template-columns: 72px 84px 1fr auto; gap: var(--space-3); align-items: baseline; padding: var(--space-2) 0; border-bottom: var(--border-width) solid var(--border); }
.cgh-log time { color: var(--muted); font: 400 12px/16px var(--font-mono); }
.cgh-log__result { color: var(--muted); font-size: 13px; white-space: nowrap; }
.cgh-meter { display: flex; flex-direction: column; gap: 6px; font: 400 13px/20px var(--font-sans); color: var(--text); }
.cgh-meter__row { display: flex; justify-content: space-between; gap: var(--space-3); font-variant-numeric: tabular-nums; }
.cgh-meter__track { height: 8px; border-radius: var(--radius-s); background: var(--fill-subtle); overflow: hidden; }
.cgh-meter__fill { display: block; height: 100%; background: var(--text); }
.cgh-meter--near .cgh-meter__fill { background: var(--warning); }
.cgh-meter__note { color: var(--muted); } .cgh-meter--near .cgh-meter__note { color: var(--warning); }
.cgh-code { border: var(--border-width) solid var(--border); border-radius: var(--radius-s); background: var(--surface); color: var(--text); overflow: hidden; }
.cgh-code__bar { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 var(--space-2) 0 var(--space-3); border-bottom: var(--border-width) solid var(--border); font: 500 12px/16px var(--font-sans); color: var(--muted); }
.cgh-code__copy { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 var(--space-2); border: 0; border-radius: var(--radius-s); background: none; color: var(--text); font: 500 12px/16px var(--font-sans); cursor: pointer; }
.cgh-code__copy:hover { background: var(--fill-subtle); }
.cgh-code__bar svg { width: 14px; height: 14px; }
.cgh-code pre { margin: 0; padding: var(--space-3); overflow: auto; font: 400 13px/20px var(--font-mono); tab-size: 2; }

@media (prefers-reduced-motion: reduce) {
  .cgh-btn, .cgh-field__input, .cgh-marker::before { transition: none; }
  .cgh-skeleton, .cgh-state--working::before { animation: none; }
  .cgh-btn:active { transform: none; }
  .cgh-btn[aria-busy="true"]::before { animation: none; border-right-color: currentColor; opacity: 0.6; }
}
