/*!
 * age-gap-chart.css — styles for age-gap-chart.js
 *
 * Everything is scoped under .ag-chart / .ag-list-root. The look is flat and
 * editorial (square corners, hairlines, no shadows or gradients). Colours and
 * fonts are CSS custom properties, so a host page can re-theme the chart
 * without touching this file.
 */

.ag-chart,
.ag-list-root {
  --ag-bg: #080503;
  --ag-panel: #100b07;
  --ag-text: #f1e7da;
  --ag-text-2: #c2b4a6;
  --ag-muted: #94877b;
  --ag-grid: #1f1812;
  --ag-border: #2a211b;
  --ag-border-2: #403229;
  --ag-connector: #6a645a;
  --ag-subject: #d9885a;
  --ag-partner: #c2b4a6;
  --ag-high: #e23b52;
  --ag-gold: #f2c230;
  --ag-font: Archivo, Helvetica, Arial, sans-serif;
  --ag-display: "Instrument Serif", Georgia, serif;
  --ag-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  box-sizing: border-box;
  color: var(--ag-text);
  font-family: var(--ag-font);
  font-size: 14px;
  line-height: 1.4;
}
.ag-chart *,
.ag-chart *::before,
.ag-chart *::after,
.ag-list-root *,
.ag-list-root *::before,
.ag-list-root *::after {
  box-sizing: border-box;
}

.ag-chart { position: relative; background: var(--ag-bg); padding: 20px; }

.ag-title { font-family: var(--ag-display); font-size: 34px; line-height: 1.05; margin-bottom: 12px; }
.ag-tone-subject { color: var(--ag-subject); }
.ag-tone-partner { color: var(--ag-partner); }
.ag-tone-high { color: var(--ag-high); }

.ag-legend {
  display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 14px;
  font-family: var(--ag-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ag-muted);
}
.ag-legend-item { display: inline-flex; align-items: center; gap: 8px; }
.ag-key-line { flex: 0 0 auto; width: 18px; height: 2px; background: var(--ag-subject); }
.ag-key-line-partner { background: var(--ag-partner); }
.ag-key-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; }
.ag-key-subject { background: var(--ag-subject); }
.ag-key-partner { background: var(--ag-text); }

.ag-scroll { overflow-x: auto; overflow-y: hidden; }
.ag-stage { position: relative; }
.ag-abs > * { position: absolute; }

/* gap tiers (timeline and ledger) */
.ag-tier-low { --ag-tier: var(--ag-muted); }
.ag-tier-mid { --ag-tier: var(--ag-subject); }
.ag-tier-high { --ag-tier: var(--ag-high); }
.ag-key-dot[class*="ag-tier-"] { background: var(--ag-tier); }

/* ------------------------------------------------------------------ *
 * columns
 * ------------------------------------------------------------------ */
.ag-tick { background: var(--ag-border-2); }
.ag-cross { background: var(--ag-text); opacity: 0.22; pointer-events: none; }
.ag-cross[hidden] { display: none; }
.ag-grid { height: 1px; background: var(--ag-grid); pointer-events: none; }
.ag-baseline { background: var(--ag-border-2); }
.ag-ylabel, .ag-xlabel { font-family: var(--ag-mono); font-size: 11px; color: var(--ag-muted); }
.ag-ylabel { transform: translateY(-50%); text-align: right; }
.ag-xlabel { text-align: center; }
.ag-limit { height: 1px; background: var(--ag-high); opacity: 0.55; }
.ag-limit-label { color: var(--ag-high); }

.ag-line { height: 2px; background: var(--ag-subject); transform-origin: 0 50%; pointer-events: none; }
.ag-runon { opacity: 0.35; }
.ag-pline {
  height: 2px; background: var(--ag-partner); transform-origin: 0 50%; cursor: pointer;
  transition: opacity 0.15s ease;
}
.ag-dot, .ag-pdot {
  width: 10px; height: 10px; transform: translate(-50%, -50%); border-radius: 50%;
  background: var(--ag-subject); border: 2px solid var(--ag-bg); z-index: 2;
}
.ag-pdot { background: var(--ag-partner); cursor: pointer; transition: opacity 0.15s ease; }
.ag-pdot.ag-peak { background: var(--ag-high); }
/* hit areas larger than the marks */
.ag-pline::after, .ag-pdot::after { content: ""; position: absolute; left: 0; right: 0; top: -6px; bottom: -6px; }
.ag-pdot::after { left: -6px; right: -6px; }
.ag-value {
  transform: translate(-50%, -50%); font-family: var(--ag-mono); font-size: 11px; line-height: 1;
  white-space: nowrap; z-index: 4; color: var(--ag-text); transition: opacity 0.15s ease;
}
.ag-value-subject { color: var(--ag-text-2); pointer-events: none; }
.ag-value-partner { cursor: pointer; }
.ag-value-backed { background: var(--ag-bg); padding: 2px 3px; }

.ag-leader { width: 1px; background: var(--ag-connector); pointer-events: none; transition: opacity 0.15s ease; }
.ag-leader-subject { background: var(--ag-subject); opacity: 0.6; }

/* names attached to the lines */
.ag-tag {
  display: flex; align-items: center; gap: 6px; padding: 1px 4px; margin: 0; width: max-content;
  border: none; border-radius: 0; background: var(--ag-bg); color: var(--ag-text); cursor: pointer;
  font-family: var(--ag-display); font-size: 17px; line-height: 1.1; text-align: left; white-space: nowrap;
  transition: opacity 0.15s ease, color 0.15s ease; z-index: 3;
}
.ag-tag:hover { color: var(--ag-subject); }
.ag-tag:focus-visible { outline: 2px solid var(--ag-subject); outline-offset: 1px; }
.ag-tag-subject, .ag-tag-subject:hover { color: var(--ag-subject); cursor: default; }
.ag-stacked .ag-name > span { display: block; }
.ag-portrait {
  position: relative; width: 28px; height: 28px; overflow: hidden; flex: 0 0 auto;
  background: var(--ag-panel); border: 1px solid var(--ag-border-2);
}
.ag-tag-subject .ag-portrait { border-color: var(--ag-subject); }
.ag-initials {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.ag-portrait img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: center top; filter: grayscale(1) contrast(1.05); background: var(--ag-panel);
}

.ag-readout {
  position: absolute; z-index: 90; pointer-events: none; min-width: 180px; max-width: 280px;
  padding: 10px 12px; background: var(--ag-panel); border: 1px solid var(--ag-border-2);
}
.ag-readout-when { font-family: var(--ag-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ag-subject); }
.ag-readout-when + .ag-readout-row { margin-top: 6px; }
.ag-readout-row { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 8px; font-size: 13px; }
.ag-readout-row i { justify-self: center; }
.ag-readout-row b { font-family: var(--ag-mono); font-weight: 500; }
.ag-readout-row small, .ag-detail-born { display: block; font-family: var(--ag-mono); font-size: 11px; color: var(--ag-muted); }
.ag-readout-gap { margin: 1px 0 4px 26px; font-size: 13px; font-weight: 600; }
.ag-readout-none { margin-top: 4px; font-size: 12px; color: var(--ag-muted); }

/* ------------------------------------------------------------------ *
 * milestone icons — plain CSS shapes in a 20px box
 * ------------------------------------------------------------------ */
.ag-icon {
  display: inline-block; position: relative; flex: 0 0 auto; width: 20px; height: 20px;
  padding: 0; margin: 0; border: none; border-radius: 50%; background: var(--ag-bg); color: var(--ag-text);
}
.ag-icon > i { position: absolute; display: block; }
.ag-abs > .ag-icon { position: absolute; transform: translate(-50%, -50%); cursor: pointer; z-index: 3; transition: opacity 0.15s ease; }
.ag-abs > .ag-icon:hover { outline: 1px solid var(--ag-border-2); }
.ag-icon:focus-visible { outline: 2px solid var(--ag-subject); outline-offset: 1px; }

/* engagement: a slim ring topped with a diamond */
.ag-i-ring > i:first-child { left: 4.5px; top: 7px; width: 11px; height: 11px; border: 1.5px solid currentColor; border-radius: 50%; }
.ag-i-ring > i:last-child {
  left: 5.5px; top: 1px; width: 9px; height: 8px; background: currentColor;
  clip-path: polygon(22% 0, 78% 0, 100% 34%, 50% 100%, 0 34%);
}

/* marriage: a broad wedding band, seen at a slight angle, gold whatever the theme */
.ag-i-band > i:first-child {
  left: 3px; top: 4.5px; width: 14px; height: 12px; border: 3px solid var(--ag-gold); border-radius: 50%;
  transform: rotate(-24deg);
}
.ag-i-band > i:last-child {
  left: 5px; top: 6px; width: 7px; height: 4px; border-top: 1px solid var(--ag-bg); border-radius: 50%;
  transform: rotate(-30deg); opacity: 0.7;
}

/* break-up or divorce: a heart split down a jagged line */
.ag-i-heart { color: var(--ag-high); }
.ag-i-heart > i { left: 2px; top: 3px; width: 16px; height: 15px; background: currentColor; }
.ag-i-heart > i:first-child {
  transform: translateX(-1px) rotate(-6deg);
  clip-path: polygon(50% 20%, 38% 4%, 20% 1%, 5% 12%, 0 30%, 5% 52%, 50% 100%, 40% 72%, 55% 55%, 38% 38%);
}
.ag-i-heart > i:last-child {
  transform: translateX(1px) rotate(6deg);
  clip-path: polygon(50% 20%, 62% 4%, 80% 1%, 95% 12%, 100% 30%, 95% 52%, 50% 100%, 40% 72%, 55% 55%, 38% 38%);
}

/* a divorce apart from the break-up: a wedding band snapped in two */
.ag-i-split { color: var(--ag-high); }
.ag-i-split > i { left: 3px; top: 4px; width: 14px; height: 14px; border: 3px solid currentColor; border-radius: 50%; transform-origin: 50% 90%; }
/* still joined at the bottom, snapped and sprung apart in a jagged break on top */
.ag-i-split > i:first-child {
  transform: rotate(-15deg);
  clip-path: polygon(0 0, 52% 0, 32% 12%, 52% 24%, 54% 100%, 0 100%);
}
.ag-i-split > i:last-child {
  transform: rotate(15deg);
  clip-path: polygon(100% 0, 66% 0, 46% 12%, 66% 24%, 46% 100%, 100% 100%);
}

/* child born: a baby's head with a curl, eyes and a smile */
.ag-i-baby > i:first-child { left: 3px; top: 5px; width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 50%; }
.ag-i-baby > i:first-child::before {
  content: ""; position: absolute; left: 2.5px; top: 4px; width: 2px; height: 2px; border-radius: 50%;
  background: currentColor; box-shadow: 4px 0 0 currentColor;
}
.ag-i-baby > i:first-child::after {
  content: ""; position: absolute; left: 3px; top: 6.5px; width: 5px; height: 3px;
  border-bottom: 1.5px solid currentColor; border-radius: 0 0 50% 50%;
}
.ag-i-baby > i:last-child {
  left: 8px; top: 1.5px; width: 6px; height: 6px; border: 1.5px solid currentColor; border-radius: 50%;
  border-color: currentColor currentColor transparent transparent; transform: rotate(-50deg);
}

/* ended by death: a headstone with a cross, standing on a line of ground */
.ag-i-grave { color: var(--ag-text-2); }
.ag-i-grave > i:first-child { left: 4px; top: 2px; width: 12px; height: 14px; background: currentColor; border-radius: 6px 6px 0 0; }
.ag-i-grave > i:first-child::before,
.ag-i-grave > i:first-child::after { content: ""; position: absolute; background: var(--ag-bg); }
.ag-i-grave > i:first-child::before { left: 5px; top: 3px; width: 2px; height: 8px; }
.ag-i-grave > i:first-child::after { left: 3px; top: 5px; width: 6px; height: 2px; }
.ag-i-grave > i:last-child { left: 2px; top: 16px; width: 16px; height: 2px; background: currentColor; }

/* the same moments, listed with a relationship */
.ag-milestones { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ag-milestones li { display: flex; align-items: center; gap: 10px; }
.ag-milestones li > span:last-child { display: flex; flex-wrap: wrap; column-gap: 10px; font-size: 13px; }
.ag-milestones b { font-weight: 600; }
.ag-milestones li > span:last-child > span { color: var(--ag-muted); }

/* narrow containers */
.ag-compact .ag-tag { font-size: 15px; }
.ag-compact .ag-portrait { width: 22px; height: 22px; }

/* ------------------------------------------------------------------ *
 * timeline
 * ------------------------------------------------------------------ */
.ag-track { background: var(--ag-border-2); }
.ag-axis, .ag-v-timeline .ag-tick { background: var(--ag-border); }
.ag-tick-label { transform: translateX(-50%); font-family: var(--ag-mono); font-size: 11px; color: var(--ag-muted); }
.ag-span { background: var(--ag-tier); opacity: 0.75; cursor: pointer; }
.ag-stem { background: var(--ag-tier); pointer-events: none; }
.ag-node {
  width: 13px; height: 13px; transform: translate(-50%, -50%); border-radius: 50%;
  background: var(--ag-tier); border: 2px solid var(--ag-bg); cursor: pointer; z-index: 2;
}
.ag-flag {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 12px;
  text-align: left; font: inherit; color: var(--ag-text); cursor: pointer; overflow: hidden;
  background: var(--ag-bg); border: 1px solid var(--ag-border); border-left: 3px solid var(--ag-tier);
  transition: opacity 0.15s ease, background-color 0.12s ease;
}
.ag-flag:hover { background: var(--ag-panel); }
.ag-flag:focus-visible { outline: 2px solid var(--ag-subject); outline-offset: 2px; }
.ag-flag-name { max-width: 100%; font-family: var(--ag-display); font-size: 20px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-flag-gap { font-size: 13px; font-weight: 600; }
.ag-flag-meta { font-family: var(--ag-mono); font-size: 10px; letter-spacing: 0.04em; color: var(--ag-muted); white-space: nowrap; }

.ag-vertical .ag-vrow { position: relative; display: grid; grid-template-columns: 44px 26px minmax(0, 1fr); align-items: center; padding: 6px 0; }
.ag-vertical .ag-vrow::before { content: ""; position: absolute; left: 55.5px; top: 0; bottom: 0; width: 3px; background: var(--ag-border-2); }
.ag-vertical .ag-vyear { font-family: var(--ag-mono); font-size: 11px; color: var(--ag-muted); }
.ag-vertical .ag-node { position: relative; justify-self: center; transform: none; }

/* ------------------------------------------------------------------ *
 * ledger
 * ------------------------------------------------------------------ */
.ag-v-ledger .ag-scroll { overflow: visible; }
.ag-row {
  display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(0, 2fr) 92px; align-items: center; column-gap: 20px;
  padding: 16px 4px; border-top: 1px solid var(--ag-border); cursor: pointer; transition: opacity 0.15s ease, background-color 0.12s ease;
}
.ag-row:last-child { border-bottom: 1px solid var(--ag-border); }
.ag-row:not(.ag-row-head):hover { background: var(--ag-panel); }
.ag-row-head {
  cursor: default; padding-top: 0; padding-bottom: 8px; border-top: none;
  font-family: var(--ag-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ag-muted);
}
.ag-row-name { font-family: var(--ag-display); font-size: 28px; line-height: 1.1; color: var(--ag-text); text-decoration: none; overflow-wrap: anywhere; }
a.ag-row-name:hover { color: var(--ag-subject); }
.ag-row-meta { margin-top: 4px; font-family: var(--ag-mono); font-size: 11px; color: var(--ag-muted); }
/* the inset keeps marks and their numbers inside the cell at the extremes */
.ag-track-cell { position: relative; height: 34px; margin: 0 26px; }
.ag-row-head .ag-track-cell { height: 16px; }
.ag-scale { position: absolute; top: 0; transform: translateX(-50%); }
.ag-gridline { position: absolute; top: -16px; bottom: -16px; width: 1px; background: var(--ag-grid); }
.ag-between { position: absolute; top: 50%; height: 2px; margin-top: -1px; background: var(--ag-tier); }
.ag-mark { position: absolute; top: 50%; width: 13px; height: 13px; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid var(--ag-bg); }
.ag-mark-subject { background: var(--ag-subject); }
.ag-mark-partner { background: var(--ag-text); }
.ag-mark-partner.ag-same { width: 21px; height: 21px; background: transparent; border-color: var(--ag-text); }
.ag-age { position: absolute; top: 50%; font-family: var(--ag-mono); font-size: 12px; line-height: 1; white-space: nowrap; }
.ag-age-left { transform: translate(calc(-100% - 11px), -50%); }
.ag-age-right { transform: translate(11px, -50%); }
.ag-age-left.ag-age-wide { transform: translate(calc(-100% - 15px), -50%); }
.ag-age-right.ag-age-wide { transform: translate(15px, -50%); }
.ag-row-gap { text-align: right; }
.ag-gap-number { display: block; font-family: var(--ag-display); font-size: 48px; line-height: 0.95; color: var(--ag-tier); }
.ag-gap-caption { font-family: var(--ag-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ag-muted); }

/* ------------------------------------------------------------------ *
 * highlighting one partner
 * ------------------------------------------------------------------ */
.ag-focusing .ag-pline:not(.ag-hi),
.ag-focusing .ag-pdot:not(.ag-hi),
.ag-focusing .ag-abs > .ag-icon:not(.ag-hi),
.ag-focusing .ag-value-partner:not(.ag-hi),
.ag-focusing .ag-leader:not(.ag-hi):not(.ag-leader-subject),
.ag-focusing .ag-tag:not(.ag-hi):not(.ag-tag-subject),
.ag-focusing .ag-span:not(.ag-hi),
.ag-focusing .ag-stem:not(.ag-hi),
.ag-focusing .ag-flag:not(.ag-hi),
.ag-focusing .ag-abs > .ag-node:not(.ag-hi) { opacity: 0.28; }
.ag-focusing .ag-leader.ag-hi { background: var(--ag-text); }
.ag-focusing .ag-pline.ag-hi { height: 3px; background: var(--ag-text); }
.ag-focusing .ag-pdot.ag-hi:not(.ag-peak) { background: var(--ag-text); }

/* popup */
.ag-popup {
  position: absolute; z-index: 100; width: 340px; max-width: calc(100% - 16px);
  max-height: 340px; overflow: auto; padding: 18px 20px;
  background: var(--ag-bg); border: 1px solid var(--ag-border-2);
}
.ag-popup-close {
  position: absolute; top: 6px; right: 8px; width: 28px; height: 28px;
  border: none; background: transparent; color: var(--ag-muted); font-size: 20px; line-height: 1; cursor: pointer;
}
.ag-popup-close:hover { color: var(--ag-text); }
.ag-popup .ag-detail + .ag-detail { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--ag-border); }
.ag-popup .ag-detail-head { padding-right: 22px; }

/* relationship details (popup and list) */
.ag-detail-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.ag-detail-name { font-family: var(--ag-display); font-size: 26px; line-height: 1.1; color: var(--ag-text); text-decoration: none; }
a.ag-detail-name:hover { color: var(--ag-subject); }
.ag-detail-kind {
  font-family: var(--ag-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--ag-border-2); padding: 2px 6px; color: var(--ag-text-2);
}
.ag-detail-born { margin-top: 4px; }
.ag-detail-span { margin-top: 6px; font-family: var(--ag-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--ag-subject); }
.ag-detail-ages { margin-top: 8px; font-size: 15px; color: var(--ag-text-2); }
.ag-detail-gap { margin-top: 2px; font-size: 15px; font-weight: 600; }
.ag-detail-desc { margin: 8px 0 0; font-size: 15px; color: var(--ag-text-2); white-space: pre-line; overflow-wrap: anywhere; max-width: 68ch; }
.ag-detail-source { display: inline-block; margin-top: 8px; font-family: var(--ag-mono); font-size: 12px; color: var(--ag-subject); }

.ag-empty { padding: 56px 24px; text-align: center; color: var(--ag-muted); }

/* list (AgeGapChart.renderList) */
.ag-list { list-style: none; margin: 14px 0 0; padding: 0; }
/* the same faint wash as the creepy region, reaching a little past the text */
.ag-list > .ag-creepy-row { background: rgba(217, 136, 90, 0.135); box-shadow: -10px 0 0 rgba(217, 136, 90, 0.135), 10px 0 0 rgba(217, 136, 90, 0.135); }
.ag-list-item { padding: 20px 0; border-top: 1px solid var(--ag-border); }
.ag-list-item:last-child { border-bottom: 1px solid var(--ag-border); }
.ag-list-meta { margin-top: 8px; font-family: var(--ag-mono); font-size: 12px; color: var(--ag-muted); }
.ag-list-action { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

@media (max-width: 640px) {
  .ag-chart { padding: 12px 4px; }
  .ag-title { font-size: 26px; }
  .ag-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
  .ag-row .ag-track-cell { grid-column: 1 / -1; grid-row: 2; }
  .ag-row-head { display: none; }
  .ag-gridline { top: 0; bottom: 0; }
  .ag-row-name { font-size: 24px; }
  .ag-gap-number { font-size: 38px; }
}

/* ------------------------------------------------------------------ *
 * scatter plot
 * ------------------------------------------------------------------ */
.ag-g-male { --ag-gender: #3d8bff; }
.ag-g-female { --ag-gender: #e5548f; }
.ag-g-another { --ag-gender: #b08cf0; }
.ag-g-unknown { --ag-gender: #94877b; }
.ag-key-dot[class*="ag-g-"] { background: var(--ag-gender); }
.ag-toggle { padding: 4px 0; border: none; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.ag-toggle:hover { color: var(--ag-text); }
.ag-toggle[aria-pressed="false"] { opacity: 0.4; text-decoration: line-through; }
.ag-toggle:focus-visible { outline: 2px solid var(--ag-subject); outline-offset: 2px; }
.ag-scatter .ag-stage { cursor: crosshair; }
.ag-point { width: 8px; height: 8px; border-radius: 50%; background: var(--ag-gender); opacity: 0.85; box-shadow: 0 0 0 1px var(--ag-bg); }
/* A profession's icon in place of the dot, in the same gender colour. */
.ag-job-actor { --ag-job: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M3 3h18v8c0 6-4 10-9 10S3 17 3 11zM6.5 7.5h4v2.5h-4zM13.5 7.5h4v2.5h-4zM7 13.5h10c-1 3-3 4.5-5 4.5s-4-1.5-5-4.5z'/%3E%3C/svg%3E"); }
.ag-job-musician { --ag-job: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M9 3l12-2v14.5a3.5 3 0 1 1-2.5-2.9V6.2l-7 1.2v11.1a3.5 3 0 1 1-2.5-2.9z'/%3E%3C/svg%3E"); }
.ag-job-director { --ag-job: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M2 10h20v12H2zM2 8.5L1.3 4.3 20.6 1l.7 4.2zM6 3.5l2.5 3.8 3.2-.5-2.5-3.9zM13 2.3l2.5 3.8 3.2-.5-2.5-3.9z'/%3E%3C/svg%3E"); }
.ag-job-producer { --ag-job: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 1a11 11 0 1 0 0 22 11 11 0 1 0 0-22zM12 3.5a3 3 0 1 1 0 6 3 3 0 1 1 0-6zM12 14.5a3 3 0 1 1 0 6 3 3 0 1 1 0-6zM6.5 9a3 3 0 1 1 0 6 3 3 0 1 1 0-6zM17.5 9a3 3 0 1 1 0 6 3 3 0 1 1 0-6z'/%3E%3C/svg%3E"); }
.ag-job-writer { --ag-job: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M2 17.5V22h4.5L18 10.5 13.5 6zM15 4.5L19.5 9l2.2-2.2a1.5 1.5 0 0 0 0-2.1l-2.4-2.4a1.5 1.5 0 0 0-2.1 0z'/%3E%3C/svg%3E"); }
.ag-job-model { --ag-job: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 0c1.5 7 5 10.5 12 12-7 1.5-10.5 5-12 12-1.5-7-5-10.5-12-12C7 10.5 10.5 7 12 0z'/%3E%3C/svg%3E"); }
.ag-job-personality { --ag-job: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M2 7h20v16H2zM5 10v10h14V10zM6 1.8L7.8.2 12 4.4 16.2.2 18 1.8 12.8 7h-1.6z'/%3E%3C/svg%3E"); }
.ag-job-comedian { --ag-job: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M2 2h20v15H11.5L5 23v-6H2zM6.5 7c0 3.5 2.5 6 5.500 6s5.500-2.500 5.500-6z'/%3E%3C/svg%3E"); }
.ag-job-dancer { --ag-job: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 0a3.2 3.2 0 1 1 0 6.4 3.2 3.2 0 1 1 0-6.4zM1 7l2-2.500 6 4h6l6-4L23 7l-7.500 6v2.500l5.500 6-2.800 2.500L12 17.500 5.800 24 3 21.500l5.500-6V13z'/%3E%3C/svg%3E"); }
.ag-job-athlete { --ag-job: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M6 1h12v2.500h5V7c0 3-2.200 5.200-5 5.500-.900 1.700-2.500 2.900-4 3.300V19h4v4H6v-4h4v-3.200c-1.500-.400-3.100-1.600-4-3.300C3.200 12.200 1 10 1 7V3.500h5zM3.500 6v1c0 1.500 1 2.700 2.500 3V6zM18 6v4c1.500-.3 2.500-1.5 2.500-3V6z'/%3E%3C/svg%3E"); }
.ag-job-politician { --ag-job: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 0l11 6.500V9H1V6.500zM3 11h3.500v8H3zM10.250 11h3.500v8h-3.500zM17.500 11H21v8h-3.500zM1 20.500h22V24H1z'/%3E%3C/svg%3E"); }
.ag-job-business { --ag-job: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M8 6V2.500h8V6h7v16H1V6zM10.500 5v1h3V5zM1 12.500v1.800h22v-1.800z'/%3E%3C/svg%3E"); }
.ag-job-artist { --ag-job: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 1C5.500 1 1 6 1 12s4.700 11 10.500 11c2 0 3-1.100 3-2.500 0-1.600-1.300-1.900-1.300-3.200 0-1.100.9-1.800 2.200-1.800h3.100c2.800 0 4.500-1.900 4.500-5C23 5 18 1 12 1zM6.500 9.500a2.200 2.200 0 1 1 0 4.400 2.200 2.200 0 1 1 0-4.400zM9.500 4.500a2.200 2.200 0 1 1 0 4.400 2.200 2.200 0 1 1 0-4.400zM16 5.500a2.200 2.200 0 1 1 0 4.400 2.200 2.200 0 1 1 0-4.400z'/%3E%3C/svg%3E"); }
.ag-job-other { --ag-job: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 1l11 11-11 11L1 12z'/%3E%3C/svg%3E"); }
.ag-point.ag-job, .ag-key-dot.ag-job {
  width: 14px; height: 14px; border-radius: 0; box-shadow: none;
  -webkit-mask: var(--ag-job) center / contain no-repeat; mask: var(--ag-job) center / contain no-repeat;
}
.ag-key-job { --ag-gender: var(--ag-text); }
.ag-c-creepy { --ag-gender: #d9885a; }
.ag-c-fine { --ag-gender: #6f8fc4; }
.ag-key-dot[class*="ag-c-"] { background: var(--ag-gender); }
/* A flag (or, without an image, its code), ringed in the point's colour. */
.ag-point.ag-pin, .ag-key-dot.ag-pin {
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  width: 18px; height: 12px; border-radius: 1px; background: var(--ag-bg); color: var(--ag-text);
  box-shadow: 0 0 0 1.5px var(--ag-gender);
  font: 600 8px/1 var(--ag-mono); font-style: normal; letter-spacing: 0;
}
.ag-key-dot.ag-key-job.ag-pin { background: var(--ag-bg); }
.ag-pin-state { text-decoration: underline; text-underline-offset: 1px; }
.ag-pin img { width: 100%; height: 100%; object-fit: cover; }
.ag-jobs { max-height: 132px; overflow-y: auto; }
/* The creepy region: a faint wash of the subject's color. */
.ag-creepy { position: absolute; background: rgba(217, 136, 90, 0.135); pointer-events: none; }
.ag-creepy-track { position: absolute; top: 0; bottom: 0; left: 0; background: rgba(217, 136, 90, 0.135); pointer-events: none; }
.ag-key-creepy { flex: 0 0 auto; width: 16px; height: 11px; background: rgba(217, 136, 90, 0.324); }
.ag-creepy-note { color: #d9885a !important; }
/* A key entry that explains itself on hover or focus. */
.ag-hint { position: relative; cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.ag-hint:focus-visible { outline: 2px solid var(--ag-subject); outline-offset: 2px; }
.ag-hint::after {
  content: attr(data-hint); position: absolute; left: 0; top: calc(100% + 6px); z-index: 20;
  width: max-content; max-width: min(280px, 70vw); padding: 7px 10px; background: var(--ag-bg); color: var(--ag-text);
  border: 1px solid var(--ag-border-2); font: 400 12px/1.4 var(--ag-mono); letter-spacing: 0; text-transform: none;
  text-decoration: none; display: none; pointer-events: none;
}
.ag-hint:hover::after, .ag-hint:focus::after { display: block; }
.ag-vzero { background: var(--ag-connector); }
/* Best-fit curves: a line in each colour over its range, shaded in layers that
   build up towards the middle share of the points. */
.ag-curve { height: 2.5px; background: var(--ag-gender); transform-origin: 0 50%; pointer-events: none; }
.ag-band { background: var(--ag-gender); opacity: 0.055; pointer-events: none; }
.ag-band.ag-band-all { opacity: 0.1; }
.ag-key-cover { flex: 0 0 auto; width: 16px; height: 11px; background: var(--ag-text); }
.ag-place { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; }
.ag-flag-img { width: 16px; height: 11px; object-fit: cover; flex: 0 0 auto; }
.ag-key-dot.ag-key-job { background: var(--ag-gender); }
.ag-jobs { margin-top: 6px; }
.ag-path { height: 1px; background: var(--ag-muted); opacity: 0.35; transform-origin: 0 50%; pointer-events: none; }
.ag-path.ag-quiet { opacity: 0; }
.ag-path.ag-lit { height: 2px; background: var(--ag-text); opacity: 1; }
.ag-ring { width: 22px; height: 22px; transform: translate(-50%, -50%); border: 2px solid var(--ag-text); border-radius: 50%; pointer-events: none; }
.ag-ring[hidden] { display: none; }
.ag-zero { background: var(--ag-connector); }
.ag-vgrid { width: 1px; background: var(--ag-grid); pointer-events: none; }
.ag-axis-title { text-align: center; font-family: var(--ag-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ag-muted); }
.ag-note { font-family: var(--ag-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ag-muted); pointer-events: none; }
.ag-scatter-tip.ag-pinned { pointer-events: auto; }
.ag-scatter-row { display: grid; grid-template-columns: 14px 1fr; gap: 8px; align-items: baseline; margin-top: 8px; }
.ag-scatter-row small { display: block; font-size: 12px; color: var(--ag-muted); }
.ag-scatter-name { color: var(--ag-text); font-size: 13px; font-weight: 600; }
.ag-table-view { margin-top: 18px; }
.ag-table-view summary { cursor: pointer; font-family: var(--ag-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ag-muted); }
.ag-table-scroll { max-height: 420px; overflow: auto; margin-top: 12px; }
.ag-table-view table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ag-table-view th, .ag-table-view td { padding: 6px 10px 6px 0; text-align: left; border-bottom: 1px solid var(--ag-border); }
.ag-table-view th { font-family: var(--ag-mono); font-size: 10px; text-transform: uppercase; color: var(--ag-muted); }
.ag-table-view a { color: var(--ag-text); }
