/* Site shell, home page, theme pages and the empty project state. Loaded after site.css, which holds the tokens. */
[data-theme=evals] { --theme: var(--t-evals); }
[data-theme=triathlon] { --theme: var(--t-triathlon); }
[data-theme=healthcare] { --theme: var(--t-healthcare); }
body { overflow-x: hidden; }
/* Tight display tracking closes the gaps between words, so the word space is opened again. */
h1, h2, h3, .p-q, .other b, .pnav p { word-spacing: .09em; }
.crumb b { white-space: nowrap; }

/* ---------- navigation ---------- */
.bar nav.themes { margin-left: 14px; gap: 2px; }
.bar nav.side { margin-left: auto; }
.bar nav.themes a { display: inline-flex; align-items: center; gap: 8px; color: var(--text); padding: 9px 12px; border: 1px solid transparent; }
.bar nav.themes a i { width: 7px; height: 7px; background: var(--theme); flex: none; }
.bar nav.themes a:hover { background: var(--bg-3); }
.bar nav.themes a[aria-current] { border-color: var(--theme); background: color-mix(in srgb, var(--theme) 9%, transparent); }
.bar nav.side a[aria-current] { color: var(--text); }

/* ---------- home: identity ---------- */
.hh { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 16px 56px; align-items: end; padding-top: 44px; padding-bottom: 40px; }
.hh h1 { font-size: clamp(60px, 9vw, 136px); }
.hh .kicker { margin-bottom: 22px; }
.hh .lede { margin-top: 0; max-width: 22em; font-size: clamp(21px, 1.9vw, 29px); }
.hh .lede em { color: var(--text); border-bottom: 2px solid var(--theme); }
.hh .hero-body { max-width: 40em; }
.hh .facts { margin-top: 22px; }
.facts dd a { border-bottom: 1px solid var(--line-2); }
.facts dd a:hover { color: var(--sig-2); border-color: var(--sig); }

/* ---------- the rack: three themes, three channels of equal size ---------- */
.rack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rack-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; padding: 12px 0 12px; border-top: 1px solid var(--line); }
.rack-head h2 { font: 400 10.5px/1.4 var(--mono); font-stretch: 87.5%; letter-spacing: .09em; text-transform: uppercase; color: var(--mut); }
.rack-head p { font: 400 10.5px/1.4 var(--mono); font-stretch: 87.5%; color: var(--dim); }
.ch { position: relative; display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line); border-top: 2px solid var(--theme); border-radius: 0 0 3px 3px; transition: border-color .2s; }
.ch:hover, .ch:focus-within { border-color: var(--line-2); border-top-color: var(--theme); }
.ch-bar { display: flex; align-items: center; gap: 12px; padding: 11px 20px 10px; border-bottom: 1px solid var(--line); font: 400 10.5px/1.3 var(--mono); font-stretch: 87.5%; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.ch-bar svg { display: block; flex: none; color: var(--theme); }
.ch-bar .n { color: var(--mut); }
.led { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--mut); text-align: right; }
.led i { width: 8px; height: 8px; border-radius: 50%; flex: none; border: 1.5px solid var(--dim); }
.led.on { color: var(--text); }
.led.on i { background: var(--theme); border-color: var(--theme); box-shadow: 0 0 0 4px color-mix(in srgb, var(--theme) 22%, transparent); }
.ch-body { display: flex; flex-direction: column; flex: 1; padding: 22px 20px 20px; }
.ch h3 { font-size: clamp(40px, 4.6vw, 68px); font-weight: 600; font-stretch: 86%; letter-spacing: -.045em; line-height: .92; }
.ch h3 a { background: linear-gradient(var(--theme), var(--theme)) 0 100% / 0 3px no-repeat; transition: background-size .25s; padding-bottom: 3px; }
.ch h3 a:hover, .ch h3 a:focus-visible { background-size: 100% 3px; }
.ch-lede { margin-top: 14px; font-size: 17px; line-height: 1.3; font-weight: 500; letter-spacing: -.01em; min-height: 3.9em; }
.ch-view { margin-top: 18px; height: 196px; }
.ch-cap { margin-top: 10px; font: 400 10.5px/1.5 var(--mono); font-stretch: 87.5%; color: var(--mut); min-height: 4.5em; }
.ch-rows { margin-top: 14px; border-top: 1px solid var(--line); flex: 1; }
.ch-rows li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 0 8px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.35; color: var(--mut); }
.ch-rows li > span:first-child { font: 400 10px/1.5 var(--mono); font-stretch: 87.5%; color: var(--dim); }
.ch-rows a { color: var(--text); }
.ch-rows a:hover { color: var(--theme); }
.ch-rows b { color: var(--text); font-weight: 500; }
.ch-rows li.open > span:first-child { color: var(--theme); }
.ch .p-more { margin-top: 18px; }
.ch .p-more:hover { color: var(--theme); border-color: var(--theme); }

/* a result view inside a channel (evals) */
.view { position: relative; border: 1px solid var(--line); background: var(--bg); padding: 14px 16px; display: flex; flex-direction: column; justify-content: center; }
.view .ivl-row p > *, .view .ivl-over em { background: var(--bg); }
.view .ivl-plot { padding: 18px 0 22px; }
.view .ivl-row p > :first-child { padding-right: 10px; }
.view .ivl-row p > :last-child { padding-left: 10px; }
.view .ivl-row p b { font-size: 10.5px; }
.view .ivl-over em { left: auto; right: -1px; transform: none; top: -13px; padding: 0 0 0 6px; }
.view .ivl-track .pt { border-color: var(--bg); }
.view-tag { position: absolute; left: 12px; top: -7px; background: var(--bg-2); padding: 0 6px; font: 400 9.5px/1.4 var(--mono); font-stretch: 87.5%; letter-spacing: .09em; text-transform: uppercase; color: var(--theme); }

/* ---------- the empty state: a scope that sweeps and finds no signal ---------- */
.scope { position: relative; overflow: hidden; border: 1px solid var(--line); background:
    linear-gradient(rgba(32, 36, 45, .7) 1px, transparent 1px) 0 -1px / 28px 28px,
    linear-gradient(90deg, rgba(32, 36, 45, .7) 1px, transparent 1px) -1px 0 / 28px 28px, var(--bg); }
.scope .sweep { position: absolute; top: 0; bottom: 0; left: 0; width: 22%; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--theme) 13%, transparent)); border-right: 1px solid color-mix(in srgb, var(--theme) 70%, transparent); transform: translateX(-100%); animation: sweep 5.5s linear infinite; }
@keyframes sweep { to { transform: translateX(455%); } }
.scope .none { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); white-space: nowrap; background: var(--bg); border: 1px solid var(--line-2); padding: 6px 10px 5px; font: 500 10px/1 var(--mono); font-stretch: 87.5%; letter-spacing: .12em; text-transform: uppercase; color: var(--mut); z-index: 2; }
.scope .none i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--theme); margin-right: 8px; }
/* triathlon: three lanes, one per discipline of the sport */
.lanes3 { display: grid; grid-template-rows: repeat(3, 1fr); }
.lanes3 .lane { position: relative; border-bottom: 1px solid var(--line); }
.lanes3 .lane:last-of-type { border-bottom: 0; }
.lanes3 .lane::after { content: ""; position: absolute; left: 64px; right: 0; top: 50%; border-top: 1px dashed var(--line-2); }
.lanes3 .lane span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font: 400 9.5px/1 var(--mono); font-stretch: 87.5%; letter-spacing: .09em; text-transform: uppercase; color: var(--dim); }
/* healthcare: a framed viewport with registration marks, scanned from top to bottom */
.frame .sweep { top: 0; left: 0; right: 0; bottom: auto; width: auto; height: 22%; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--theme) 13%, transparent)); border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--theme) 70%, transparent); transform: translateY(-100%); animation-name: scan; }
@keyframes scan { to { transform: translateY(455%); } }
.frame .port { position: absolute; top: 34px; bottom: 34px; left: 50%; aspect-ratio: 1 / 1; transform: translateX(-50%); }
.frame .port::before, .frame .port::after { content: ""; position: absolute; inset: 0; }
.frame .port::before { background:
    linear-gradient(var(--mut), var(--mut)) 0 0 / 18px 1px, linear-gradient(var(--mut), var(--mut)) 0 0 / 1px 18px,
    linear-gradient(var(--mut), var(--mut)) 100% 0 / 18px 1px, linear-gradient(var(--mut), var(--mut)) 100% 0 / 1px 18px,
    linear-gradient(var(--mut), var(--mut)) 0 100% / 18px 1px, linear-gradient(var(--mut), var(--mut)) 0 100% / 1px 18px,
    linear-gradient(var(--mut), var(--mut)) 100% 100% / 18px 1px, linear-gradient(var(--mut), var(--mut)) 100% 100% / 1px 18px;
  background-repeat: no-repeat; }
.frame .port::after { background: linear-gradient(var(--line-2), var(--line-2)) 50% 50% / 100% 1px no-repeat, linear-gradient(var(--line-2), var(--line-2)) 50% 50% / 1px 100% no-repeat; opacity: .8; }
.frame .axis { position: absolute; font: 400 9.5px/1 var(--mono); font-stretch: 87.5%; letter-spacing: .09em; text-transform: uppercase; color: var(--dim); }
.frame .axis.a { left: 12px; top: 12px; } .frame .axis.b { right: 12px; bottom: 12px; }

/* ---------- theme pages ---------- */
.th { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px 56px; align-items: end; padding-top: 48px; padding-bottom: 36px; }
.th h1 { font-size: clamp(64px, 10.2vw, 156px); }
.th .kicker i { background: var(--theme); }
.th .lede { margin-top: 0; max-width: 24em; }
.th .lede em { color: var(--theme); }
.th .hero-body { max-width: 42em; }
.big-scope { height: clamp(300px, 34vw, 460px); }
.big-scope .none { font-size: 12px; padding: 9px 14px 8px; }
.big-scope.lanes3 .lane span { left: 20px; font-size: 10.5px; }
.big-scope.lanes3 .lane::after { left: 88px; }
.readouts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-top: 0; background: var(--bg-2); }
.readouts > div { padding: 14px 20px 16px; border-right: 1px solid var(--line); min-width: 0; }
.readouts > div:last-child { border-right: 0; }
.readouts dd { margin-top: 6px; font: 500 30px/1 var(--mono); font-stretch: 80%; letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.readouts dd.txt { font: 400 12px/1.45 var(--mono); font-stretch: 87.5%; letter-spacing: 0; color: var(--mut); }
.readouts dd.txt b { color: var(--text); font-weight: 500; }
.sec.tight { padding-top: 72px; }
.two-col { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 56px; align-items: start; }
.two-col > h2, .h-sec { font-size: clamp(30px, 3.2vw, 46px); font-weight: 600; font-stretch: 88%; letter-spacing: -.035em; line-height: 1; }
.prose p { color: var(--mut); max-width: 42em; font-size: 16.5px; }
.prose p + p { margin-top: 12px; }
.prose p b, .prose p strong { color: var(--text); font-weight: 600; }
.prose a, .ledger a { color: var(--text); border-bottom: 1px solid var(--theme); }
.prose a:hover, .ledger a:hover { color: var(--theme); }
.ledger { border-top: 1px solid var(--line-2); }
.ledger > div { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 6px 20px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ledger dt { font: 400 10.5px/1.4 var(--mono); font-stretch: 87.5%; letter-spacing: .09em; text-transform: uppercase; color: var(--dim); }
.ledger dd { font-size: 16.5px; line-height: 1.4; color: var(--mut); }
.ledger dd b { display: block; color: var(--text); font-size: 19px; font-weight: 600; font-stretch: 90%; letter-spacing: -.015em; margin-bottom: 2px; }
.ledger .src { font: 400 10.5px/1.4 var(--mono); font-stretch: 87.5%; color: var(--dim); text-align: right; white-space: nowrap; }
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.slot { border: 1px dashed var(--line-2); border-radius: 3px; padding: 16px 18px 18px; min-height: 148px; display: flex; flex-direction: column; background: repeating-linear-gradient(135deg, rgba(52, 58, 72, .22) 0 1px, transparent 1px 9px); }
.slot .label { color: var(--theme); }
.slot p:not(.label) { margin-top: auto; font: 400 11.5px/1.5 var(--mono); font-stretch: 87.5%; color: var(--mut); }
.others { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.other { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-left: 2px solid var(--theme); background: var(--bg-2); transition: border-color .15s; }
.other:hover { border-color: var(--theme); }
.other b { font-size: 26px; font-weight: 600; font-stretch: 88%; letter-spacing: -.03em; line-height: 1; }
.other span { margin-left: auto; font: 400 10.5px/1.4 var(--mono); font-stretch: 87.5%; color: var(--mut); text-align: right; }

/* evals index: the five areas */
.areas { margin-top: 26px; border-top: 1px solid var(--line); counter-reset: a; }
.areas li { counter-increment: a; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 0 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font: 400 11.5px/1.45 var(--mono); font-stretch: 87.5%; color: var(--mut); }
.areas li::before { content: counter(a); color: var(--sig-2); font-size: 10px; }
.areas b { color: var(--text); font-weight: 500; margin-right: 8px; }
.areas a { border-bottom: 1px solid var(--line-2); }
.areas a:hover { color: var(--sig-2); border-color: var(--sig); }
.hero-copy.ev h1 { font-size: clamp(64px, 9.4vw, 150px); }
.p-bar .repo a { border-bottom: 1px solid var(--line-2); }
.p-bar .repo a:hover { color: var(--sig-2); border-color: var(--sig); }

/* ---------- 404 ---------- */
.lost { padding-top: 56px; padding-bottom: 24px; }
.lost h1 { font-size: clamp(44px, 6.4vw, 96px); white-space: normal; line-height: .9; margin-left: 0; }
.lost .lede { max-width: 40em; }
.sitemap { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto 1fr; gap: 16px; }
.sitemap section:first-child { grid-row: 1 / 3; }
.sitemap .home-row { grid-column: 2 / 4; align-self: start; }
.sitemap .home-row b { font-size: clamp(30px, 4vw, 56px); }
.bar nav.side { margin-right: -10px; }
.sitemap section { border: 1px solid var(--line); border-top: 2px solid var(--theme); background: var(--bg-2); padding: 16px 18px 8px; }
.sitemap h2 { font-size: 26px; font-weight: 600; font-stretch: 88%; letter-spacing: -.03em; margin-bottom: 10px; }
.sitemap li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--mut); }
.sitemap li a { color: var(--text); display: block; }
.sitemap li a:hover, .sitemap h2 a:hover { color: var(--theme); }

@media (max-width: 1180px) {
  .rack { grid-template-columns: minmax(0, 1fr); }
  .ch-lede, .ch-cap { min-height: 0; }
  .hh, .th { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .hh h1 { font-size: clamp(60px, 15vw, 136px); }
}
@media (max-width: 900px) {
  .bar nav.side { display: none; }
  .bar nav.themes { margin-left: auto; }
  .bar nav.themes a { padding: 8px 7px; gap: 6px; }
  .hh { padding-top: 32px; padding-bottom: 28px; }
  .th { padding-top: 32px; padding-bottom: 24px; }
  .two-col, .slots, .others, .sitemap { grid-template-columns: minmax(0, 1fr); }
  .sitemap section:first-child, .sitemap .home-row { grid-row: auto; grid-column: auto; }
  .readouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readouts > div:nth-child(2n) { border-right: 0; }
  .readouts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .readouts dt { min-height: 2.8em; }
  .ledger > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ledger .src { text-align: left; white-space: normal; }
  .sec.tight { padding-top: 56px; }
  .big-scope.lanes3 .lane::after { left: 64px; }
  .big-scope.lanes3 .lane span { left: 12px; }
}
@media (max-width: 420px) {
  .bar { gap: 6px; }
  .bar nav.themes a { font-size: 9.5px; letter-spacing: .02em; padding: 8px 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .scope .sweep { display: none; }
}
