/* AI Atlas - swim-lane timeline. Plain CSS, no build step. */

:root {
  color-scheme: light dark;

  --surface: #fcfcfb;
  --surface-2: #f3f3f0;
  --text: #0b0b0b;
  --text-2: #52514e;
  --grid: #e8e7e2;
  --border: #d6d5ce;
  --edge: #0b0b0b;

  /* Lane colours, fixed order: infrastructure, hardware, base models, agentic.
     A new lane needs a new property here and in the dark block, referenced from the table in atlas.js. */
  --layer-1: #2a78d6;
  --layer-2: #eb6834;
  --layer-3: #1baf7a;
  --layer-4: #eda100;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #1a1a19;
    --surface-2: #242423;
    --text: #ffffff;
    --text-2: #c3c2b7;
    --grid: #30302e;
    --border: #42423f;
    --edge: #ffffff;

    --layer-1: #3987e5;
    --layer-2: #d95926;
    --layer-3: #199e70;
    --layer-4: #c98500;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 15px/1.5 var(--font);
}

a { color: inherit; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.wrap { max-width: 1440px; margin: 0 auto; padding: 0 20px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- Site header ---------- */

.site-header { border-bottom: 1px solid var(--border); }
.site-header-inner {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 6px 28px; padding-top: 14px; padding-bottom: 14px;
}
.site-name { font-weight: 700; font-size: 17px; text-decoration: none; letter-spacing: -0.01em; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--text-2); text-decoration: none; padding: 4px 0; display: inline-block; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current] { color: var(--text); font-weight: 600; box-shadow: 0 2px 0 var(--text); }

/* ---------- Intro ---------- */

.intro { padding: 28px 0 8px; max-width: 76ch; }
h1 { font-size: 30px; line-height: 1.15; margin: 0 0 8px; letter-spacing: -0.02em; }
.intro p { margin: 0; color: var(--text-2); }

/* ---------- Filters ---------- */

.filters {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  gap: 14px 22px; padding: 18px 0 10px;
}
.field { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-label { font-size: 12px; color: var(--text-2); padding: 0; }
.field-search { flex: 1 1 200px; max-width: 280px; }

input[type="search"], select, .btn {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px;
  height: 34px; padding: 0 10px;
}
input[type="search"] { width: 100%; }
.btn { cursor: pointer; }
.btn:hover, select:hover { background: var(--surface-2); }

.segmented { display: flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: block; height: 32px; line-height: 32px; padding: 0 11px;
  font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-2);
}
.segmented label + label span { border-left: 1px solid var(--border); }
.segmented input:checked + span { background: var(--text); color: var(--surface); }
.segmented input:focus-visible + span { outline: 2px solid var(--text); outline-offset: -4px; }
.segmented label:hover input:not(:checked) + span { background: var(--surface-2); }

.checks { display: flex; flex-wrap: wrap; gap: 4px 14px; min-height: 34px; align-items: center; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; min-height: 34px; white-space: nowrap; }
.check input { margin: 0; width: 15px; height: 15px; accent-color: var(--text); }
.check .count { color: var(--text-2); font-variant-numeric: tabular-nums; }

.swatch {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none;
  background: var(--lane, var(--text-2));   /* --lane is set inline from the lane table in atlas.js */
}

.status { margin: 0 0 12px; color: var(--text-2); font-size: 13px; min-height: 1.5em; }

/* ---------- Cards and layout ---------- */

.stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1100px) {
  .stage { grid-template-columns: minmax(0, 1fr) 350px; }
  .detail-card { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
}

.card { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-width: 0; background: var(--surface); }
.card-title { font-size: 16px; margin: 0 0 2px; }
.card-sub { margin: 0 0 12px; color: var(--text-2); font-size: 13px; max-width: 90ch; }
.card-note { margin: 10px 0 0; color: var(--text-2); font-size: 13px; }
.card-note button { font: inherit; color: var(--text); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

/* ---------- Chart ---------- */

.chart-scroll { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
.chart-inner { position: relative; min-width: 760px; }
#chart { display: block; width: 100%; touch-action: pan-x pan-y; cursor: default; border-radius: 4px; }
#chart.pointing { cursor: pointer; }
#chart:focus-visible { outline-offset: -2px; }

/* Lane titles are HTML so they stay put while the chart scrolls sideways. */
.lane-labels { position: sticky; left: 0; width: 0; height: 0; z-index: 2; }
.lane-label {
  position: absolute; left: 0; display: flex; align-items: baseline; gap: 7px;
  white-space: nowrap; font-size: 13px; line-height: 20px; pointer-events: none;
  background: var(--surface); padding-right: 8px;
}
.lane-label .swatch { align-self: center; }
.lane-label strong { font-weight: 650; }
.lane-label span.meta { color: var(--text-2); font-size: 12px; }
.lane-label.narrow { flex-wrap: wrap; white-space: normal; line-height: 18px; gap: 0 7px; }
.lane-label.narrow .axis { flex-basis: 100%; }

.grid-line { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.lane-base { stroke: var(--border); stroke-width: 1; shape-rendering: crispEdges; }
.tick { fill: var(--text-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.tick.y { font-size: 10px; }

.dot { fill: var(--lane, var(--text-2)); stroke: var(--surface); stroke-width: 2; transition: opacity 120ms linear; }
#chart.focused .dot { opacity: 0.16; }
#chart.focused .dot.on { opacity: 1; }

.ring { fill: none; stroke: var(--text); stroke-width: 2; pointer-events: none; }
.ring.hover { stroke-width: 1.5; }

.edge { fill: none; stroke: var(--edge); stroke-width: 1.5; stroke-linecap: round; opacity: 0.7; pointer-events: none; }
.edge.all { stroke-width: 1; opacity: 0.22; }

.dot-label {
  font-size: 11px; fill: var(--text); pointer-events: none;
  paint-order: stroke; stroke: var(--surface); stroke-width: 3.5px; stroke-linejoin: round;
}
.dot-label.strong { font-weight: 650; }

@media (prefers-reduced-motion: reduce) { .dot { transition: none; } }

/* ---------- Tooltip ---------- */

.tooltip {
  position: fixed; z-index: 20; pointer-events: none; max-width: 280px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.18); font-size: 12.5px; line-height: 1.4;
}
.tooltip .tt-name { font-weight: 650; font-size: 13.5px; }
.tooltip .tt-row { color: var(--text-2); }
.tooltip .tt-lane { display: flex; align-items: center; gap: 6px; }
.tooltip .tt-hint { color: var(--text-2); margin-top: 4px; }

/* ---------- Detail panel ---------- */

.detail-card h2 { font-size: 19px; line-height: 1.25; margin: 0 0 4px; overflow-wrap: anywhere; }
.detail-kicker { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.detail-empty { color: var(--text-2); margin: 0; }
.detail-empty + .detail-empty { margin-top: 8px; }
.detail-org { color: var(--text-2); margin: 0 0 12px; }
.detail-actions { display: flex; gap: 8px; margin: 0 0 12px; }
.detail-card h3 { font-size: 13px; margin: 16px 0 6px; }
.detail-card p { margin: 0 0 8px; overflow-wrap: anywhere; }

.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 13.5px; }
.facts dt { color: var(--text-2); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.meter { height: 6px; border-radius: 3px; background: var(--grid); margin: 6px 0 4px; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 3px; background: var(--text-2); }
.metric-note { color: var(--text-2); font-size: 12.5px; }

.conn-list, .source-list { list-style: none; margin: 0; padding: 0; }
.conn-list li { padding: 8px 0; border-top: 1px solid var(--grid); }
.conn-list li:first-child { border-top: 0; padding-top: 2px; }
.conn-head { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.conn-head .swatch { align-self: center; }
.link-btn {
  font: inherit; font-weight: 600; color: var(--text); background: none; border: 0; padding: 0;
  text-align: left; text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
  overflow-wrap: anywhere;
}
.conn-meta { color: var(--text-2); font-size: 12px; }
.conn-notes { color: var(--text-2); font-size: 13px; margin: 2px 0 0 17px; }
.source-list li { margin: 0 0 4px; overflow-wrap: anywhere; font-size: 13.5px; }

/* ---------- Table ---------- */

.table-card { margin-top: 16px; }
.table-scroll { overflow: auto; max-height: 520px; border: 1px solid var(--grid); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--grid); vertical-align: top; }
thead th {
  position: sticky; top: 0; background: var(--surface-2); z-index: 1;
  font-weight: 600; white-space: nowrap; padding: 0; border-bottom: 1px solid var(--border);
}
thead th button {
  font: inherit; font-weight: 600; color: var(--text); background: none; border: 0;
  padding: 8px 10px; cursor: pointer; width: 100%; text-align: left; white-space: nowrap;
}
thead th button::after { content: " \2195"; color: var(--text-2); font-weight: 400; }
thead th[aria-sort="ascending"] button::after { content: " \2191"; color: var(--text); }
thead th[aria-sort="descending"] button::after { content: " \2193"; color: var(--text); }
td.num, th.num button { text-align: right; font-variant-numeric: tabular-nums; }
td.nowrap { white-space: nowrap; font-variant-numeric: tabular-nums; }
td .cell-layer { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
tbody tr:hover { background: var(--surface-2); }
tbody tr.selected { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--text); }
td.name { min-width: 180px; }
td.empty { color: var(--text-2); padding: 18px 10px; }

/* ---------- Footer ---------- */

.page-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 40px;
  padding: 28px 0 40px; color: var(--text-2); font-size: 13.5px;
}
.foot-title { font-size: 13px; margin: 0 0 4px; color: var(--text); }
.foot-list { margin: 0; padding-left: 18px; }
.foot-note { margin: 0; max-width: 60ch; }

@media (max-width: 600px) {
  .wrap { padding: 0 14px; }
  h1 { font-size: 25px; }
  .card { padding: 12px; }
  .field-search { max-width: none; flex-basis: 100%; }
}

/* Second row of the header: the pages of the Atlas */
.site-subnav { display: flex; flex-wrap: wrap; gap: 2px 18px; list-style: none; margin: 0; padding: 0 0 10px; font-size: .93rem; }
.site-subnav a { color: var(--text-2); text-decoration: none; padding: 3px 0; display: inline-block; }
.site-subnav a:hover { color: var(--text); }
.site-subnav a[aria-current="page"] { color: var(--text); box-shadow: 0 2px 0 var(--text-3); }
