/* =====================================================================
   Gig charts (js/gig-charts.js) - colours by job, never by script:
     host / highlight = the theme accent   (emphasis form)
     everything else  = one quiet neutral
     money taken away = the theme's rust, as a wash
   Every colour is a theme token, so all palettes repaint for free.
   ===================================================================== */

.gc-chart { width: 100%; min-height: 120px; }
.gc-svg { display: block; width: 100%; height: auto; overflow: visible; }

.gc-svg .gc-eyebrow {
    font: 700 10.5px 'Courier Prime', 'Courier New', monospace;
    letter-spacing: 0.14em;
    fill: var(--color-text-400, #a08d71);
}
.gc-svg .gc-label { font: 500 13px 'Rubik', system-ui, sans-serif; fill: var(--text-secondary, #decdb4); }
.gc-svg .gc-label-strong { font-weight: 600; fill: var(--text-primary, #f4ebdc); }
.gc-svg .gc-value {
    font: 600 12.5px 'Rubik', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    fill: var(--text-primary, #f4ebdc);
}
.gc-svg .gc-tick {
    font: 500 11px 'Rubik', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    fill: var(--color-text-400, #a08d71);
}
.gc-svg .gc-grid line { stroke: rgba(var(--glass-overlay-color, 255, 255, 255), 0.12); stroke-width: 1; }
.gc-svg .gc-connector { stroke: rgba(var(--glass-overlay-color, 255, 255, 255), 0.35); stroke-width: 1; }

/* Marks: neutral by default, accent for the highlighted row. */
.gc-svg .gc-bar { fill: rgba(var(--gray-rgb, 160, 141, 113), 0.55); transition: fill 0.15s ease; }
.gc-svg .gc-dot {
    fill: var(--color-text-300, #c7b597);
    stroke: var(--bg-primary, #1b120a);
    stroke-width: 2;
}
.gc-svg .gc-row.is-hl .gc-bar { fill: var(--color-accent, #f0a32f); }
.gc-svg .gc-row.is-hl .gc-dot { fill: var(--color-accent-dark, #c87f1b); }
.gc-svg .gc-row.is-dim { opacity: 0.55; }

/* Waterfall: start/total in accent, what you lose as a rust wash. */
.gc-svg .gc-wf-start .gc-bar,
.gc-svg .gc-wf-plus .gc-bar { fill: rgba(var(--accent-rgb, 240, 163, 47), 0.45); }
.gc-svg .gc-wf-minus .gc-bar { fill: rgba(var(--secondary-rgb, 226, 105, 74), 0.5); }
.gc-svg .gc-wf-total .gc-bar { fill: var(--color-accent, #f0a32f); }
.gc-wf-app .gc-svg .gc-wf-start .gc-bar { fill: rgba(var(--gray-rgb, 160, 141, 113), 0.55); }
.gc-wf-app .gc-svg .gc-wf-total .gc-bar { fill: var(--color-text-300, #c7b597); }

/* Split bar: paid time = accent, unpaid = neutral, costs = rust. */
.gc-svg .gc-seg-paid .gc-bar { fill: var(--color-accent, #f0a32f); }
.gc-svg .gc-seg-unpaid .gc-bar { fill: rgba(var(--gray-rgb, 160, 141, 113), 0.5); }
.gc-svg .gc-seg-prep .gc-bar { fill: rgba(var(--accent-rgb, 240, 163, 47), 0.4); }
.gc-svg .gc-seg-cost .gc-bar { fill: rgba(var(--secondary-rgb, 226, 105, 74), 0.5); }
.gc-svg .gc-seg-label { font: 500 11.5px 'Rubik', system-ui, sans-serif; fill: var(--text-secondary, #decdb4); }

/* Hit areas: invisible, bigger than the marks; the row lifts on hover. */
.gc-svg .gc-hit { fill: transparent; cursor: default; outline: none; }
.gc-svg .gc-row:hover .gc-hit,
.gc-svg .gc-hit:focus-visible { fill: rgba(var(--glass-overlay-color, 255, 255, 255), 0.05); }
.gc-svg .gc-hit:focus-visible { stroke: var(--color-accent, #f0a32f); stroke-width: 2; }
.gc-svg .gc-seg .gc-hit:hover { fill: rgba(var(--glass-overlay-color, 255, 255, 255), 0.06); }

/* Tooltip: value leads, name follows. */
.gc-tip {
    position: fixed;
    z-index: 9000;
    pointer-events: none;
    max-width: 260px;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    background: var(--bg-secondary, #2a1d10);
    border: 1px solid rgba(var(--glass-overlay-color, 255, 255, 255), 0.18);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: var(--text-primary, #f4ebdc);
    font: 400 13px/1.35 'Rubik', system-ui, sans-serif;
}
.gc-tip-value { font-weight: 700; font-size: 15px; }
.gc-tip-name { color: var(--text-secondary, #decdb4); }
.gc-tip-note { color: var(--color-text-400, #a08d71); font-size: 12px; margin-top: 0.2rem; }

/* Table twin */
.gc-table-toggle {
    margin-top: 0.75rem;
    font: 700 0.72rem 'Courier Prime', 'Courier New', monospace;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: none;
    border: 0;
    padding: 0.4rem 0;
    color: var(--link-color, var(--color-accent, #f0a32f));
    cursor: pointer;
}
.gc-table-toggle:hover { text-decoration: underline; }
.gc-table-wrap { overflow-x: auto; margin-top: 0.5rem; }
.gc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
}
.gc-table caption {
    text-align: left;
    font-weight: 600;
    padding-bottom: 0.4rem;
    color: var(--text-primary, #f4ebdc);
}
.gc-table th, .gc-table td {
    text-align: left;
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid rgba(var(--glass-overlay-color, 255, 255, 255), 0.1);
    vertical-align: top;
}
.gc-table thead th {
    font: 700 0.7rem 'Courier Prime', 'Courier New', monospace;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-400, #a08d71);
}

@media (forced-colors: active) {
    .gc-svg .gc-bar { fill: CanvasText; }
    .gc-svg .gc-row.is-hl .gc-bar, .gc-svg .gc-seg-paid .gc-bar { fill: Highlight; }
}
@media (prefers-reduced-motion: reduce) {
    .gc-svg .gc-bar { transition: none; }
}
