@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap");
:root {
  font-family: "DM Sans", system-ui, sans-serif;
  color: #292c28;
  background: #faf9f5;
  font-synthesis: none;
  --ink: #292c28;
  --muted: #6d7069;
  --line: #dedfd7;
  --accent: #9c4130;
  --paper: #fffefa;
  --soft: #f2f0e9;
  --mono: "IBM Plex Mono", monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #b8543c;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.skip {
  position: absolute;
  left: 10px;
  top: -100px;
  background: white;
  padding: 15px;
  z-index: 10;
}
.skip:focus {
  top: 10px;
}
.site-header {
  max-width: 1440px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 20px 40px;
  border-bottom: 1px solid var(--line);
}
.site-header > span {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  flex: 1;
}
.brand {
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 0 40px;
}
.intro {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 42px;
  padding: 42px 0 34px;
}
h1 {
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.1;
  margin: 9px 0 18px;
}
h2 {
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.035em;
  margin: 8px 0 12px;
  font-weight: 600;
}
h3 {
  font-size: 15px;
  margin: 6px 0 12px;
  line-height: 1.4;
}
.intro p:not(.eyebrow) {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 0;
}
.eyebrow,
.small-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.runtime-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  background: var(--soft);
  font-size: 11px;
  border-radius: 5px;
}
.runtime-bar > span:not(.status-dot) {
  color: var(--muted);
  margin-left: auto;
}
.runtime-bar strong {
  font-weight: 500;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.quiet {
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.quiet:hover {
  background: var(--soft);
}
.mobile-experiment {
  display: none;
}
#workspace {
  min-width: 0;
  scroll-margin-top: 20px;
}
.experiment-head {
  max-width: 710px;
}
.experiment-head > p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 20px;
}
.query-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px;
}
.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
label > span {
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
  margin-left: 6px;
}
select,
textarea {
  display: block;
  border: 1px solid #c6d0c3;
  border-radius: 4px;
  background: white;
  padding: 10px 12px;
  width: 100%;
  margin-top: 7px;
  font-size: 13px;
}
textarea {
  resize: vertical;
  line-height: 1.55;
  min-height: 72px;
}
.field {
  margin-top: 18px;
}
.ideas {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.chip {
  font-size: 11px;
  background: #f4f5ef;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 10px;
}
.chip:hover {
  background: #e0e9dc;
}
.run-row {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 20px;
}
.primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fffefa;
  border-radius: 4px;
  padding: 12px 19px;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.primary:hover {
  background: #7d3426;
}
.run-row > span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
progress {
  width: 100%;
  height: 6px;
  margin-top: 17px;
  accent-color: var(--accent);
}
#error {
  font-size: 13px;
  color: #9b352b;
  background: #fbede5;
  padding: 12px;
  border-radius: 4px;
}
.hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}
.lesson {
  font-size: 12px;
  line-height: 1.6;
  padding: 12px 16px;
  border-left: 2px solid #aa5a42;
  margin: 18px 0 28px;
  background: #f1eee5;
}
.query-preview {
  margin: 16px 0;
  display: flex;
  max-height: 190px;
  align-items: center;
}
.query-preview img {
  width: 160px;
  height: 155px;
  object-fit: contain;
  background: #eee;
  border-radius: 4px;
}
.query-preview video {
  width: 100%;
  max-width: 290px;
  max-height: 175px;
}
.query-preview .audio-preview {
  width: 100%;
  max-width: 450px;
  height: 130px;
}
.upload {
  font-size: 11px;
  color: var(--muted);
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
input[type="file"] {
  font-size: 11px;
  max-width: 100%;
}
.check {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 11px;
}
.check input {
  accent-color: var(--accent);
}
.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.results-heading h2 {
  font-size: 20px;
  margin: 0 0 6px;
}
.results-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.results-heading label {
  max-width: 135px;
  flex: none;
  font-size: 10px;
}
.results-heading select {
  font-family: var(--mono);
  font-size: 11px;
  padding: 7px;
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.result-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  min-width: 0;
}
.card-media {
  height: 148px;
  background: #eeeae3;
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.card-media video {
  width: 100%;
  height: 100%;
  background: #1e2923;
}
.card-body {
  padding: 13px;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
}
.card-top .small-label {
  font-size: 9px;
}
.score {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
}
.rank {
  color: #95a18f;
  font-size: 12px;
  font-family: var(--mono);
}
.score-track {
  height: 3px;
  background: #e7ece2;
  margin: 10px 0 13px;
}
.score-track > span {
  height: 100%;
  background: #8ba37c;
  display: block;
}
.card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.card-actions button {
  font-size: 10px;
  padding: 6px;
}
.text-preview {
  padding: 17px;
  font-size: 12px;
  line-height: 1.7;
  height: 100%;
  overflow: auto;
  background: #f0f0e7;
  color: #4d5c51;
}
.code-preview {
  font-family: var(--mono);
  font-size: 10px;
  white-space: pre-wrap;
  background: #e9eee8;
}
.audio-preview {
  background: #e6ece4;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100%;
  gap: 10px;
}
.audio-preview svg {
  height: 42px;
  width: 130px;
  stroke: #6e8b69;
  stroke-width: 2;
  stroke-linecap: round;
}
.audio-preview > span {
  font-size: 10px;
  color: var(--muted);
}
audio {
  max-width: 100%;
  width: 100%;
  height: 30px;
}
.audio-preview audio {
  width: 95%;
}
.empty {
  grid-column: 1/-1;
  padding: 42px 20px;
  text-align: center;
  border: 1px dashed #bcc9b5;
  border-radius: 5px;
  background: #f1f2eb;
  color: var(--muted);
}
.empty p {
  font-size: 19px;
  color: var(--ink);
  margin: 12px 0;
}
.empty > span:last-child {
  font-size: 12px;
}
.fineprint {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
#more {
  margin-top: 20px;
}
.inspector {
  margin-top: 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 6px;
  scroll-margin-top: 20px;
}
.inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.inspector h2 {
  font-size: 20px;
}
.inspector > p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.vector-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 20px 0;
}
.vector-pair > div {
  min-width: 0;
}
.vector-pair h3 {
  font-size: 11px;
  font-weight: 500;
}
canvas {
  width: 100%;
  display: block;
}
#coordinate-range {
  font-size: 11px;
  font-family: var(--mono);
  margin-top: 20px;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  margin: 15px 0;
}
.table-scroll {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
}
th {
  font-weight: 500;
  background: var(--soft);
}
td,
th {
  padding: 8px 9px;
  border-bottom: 1px solid var(--line);
}
td:last-child {
  color: var(--accent);
  font-weight: 500;
}
th:first-child,
td:first-child {
  text-align: left;
  color: var(--muted);
}
.dot-total {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 17px;
  background: #edf1e5;
  margin-top: 15px;
  font-size: 12px;
  line-height: 1.6;
}
.dot-total strong {
  font-family: var(--mono);
  font-size: 14px;
}
details {
  font-size: 12px;
  margin-top: 16px;
}
summary {
  cursor: pointer;
  font-weight: 500;
  padding: 8px 0;
}
pre {
  background: #edf0e8;
  border: 1px solid var(--line);
  padding: 15px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.65;
}
#map {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 5px;
  margin-top: 20px;
}
#map svg {
  width: 100%;
  display: block;
}
.map-point {
  cursor: pointer;
}
.map-point:hover circle,
.map-point:focus circle {
  stroke: #29372d;
  stroke-width: 3;
}
.cluster {
  padding: 16px;
  background: #eaf0e3;
  border-top: 2px solid #788e6f;
}
.cluster-item {
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
  border: 0;
  border-top: 1px solid #d5decf;
  background: none;
  font-size: 12px;
  padding: 10px 0;
  gap: 5px;
}
.cluster-item:hover {
  color: #255536;
}
footer {
  margin: 50px 0 0;
  border-top: 1px solid var(--line);
  padding: 30px 0;
  font-size: 14px;
}
footer p {
  font-size: 12px;
  color: var(--muted);
}
footer > div {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 11px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  max-width: 1120px;
  width: 90vw;
  max-height: 90dvh;
  padding: 30px;
  box-shadow: 0 10px 80px #23312030;
}
dialog::backdrop {
  background: #25332788;
}
dialog p {
  font-size: 13px;
  line-height: 1.7;
  max-width: 80ch;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}
.dialog-head h2 {
  margin-top: 0;
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 18px;
  margin-top: 25px;
}
.library-item {
  min-width: 0;
}
.library-item h3 {
  margin-top: 12px;
}
.library-item details p {
  font-size: 10px;
  overflow-wrap: anywhere;
}
.library-item .card-media {
  height: 140px;
  border-radius: 4px;
}
.library-item .card-actions {
  margin: 10px 0;
}
#library-filter {
  max-width: 220px;
}
.explanation {
  padding-left: 23px;
  max-width: 80ch;
  font-size: 14px;
  line-height: 1.8;
}
.explanation li {
  padding: 5px 0 13px;
}
@media (min-width: 1400px) {
  .results-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  main {
    padding: 0 24px;
  }
  .site-header {
    padding: 18px 24px;
  }
  .lab-layout {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 24px;
  }
  .intro-media {
    gap: 8px;
  }
  .intro-media img {
    width: 82px;
    height: 82px;
  }
  .intro-media > span {
    font-size: 14px;
  }
  .intro-media svg {
    width: 50px;
  }
  .intro-media > b {
    font-size: 24px;
    padding-left: 12px;
  }
  .results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .runtime-bar {
    flex-wrap: wrap;
  }
  .runtime-bar > span:not(.status-dot) {
    margin-left: 0;
  }
}
@media (max-width: 760px) {
  main {
    padding: 0 18px;
  }
  .site-header {
    padding: 14px 18px;
    gap: 8px;
    justify-content: space-between;
  }
  .site-header > span {
    display: none;
  }
  .intro {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 30px 0 25px;
  }
  .intro-media {
    display: none;
  }
  .intro p:not(.eyebrow) {
    font-size: 14px;
  }
  .runtime-bar {
    padding: 12px;
    font-size: 10px;
    gap: 9px;
  }
  .runtime-bar > span:not(.status-dot) {
    width: 100%;
    order: 3;
  }
  .runtime-bar .quiet {
    margin-left: auto;
    font-size: 10px;
  }
  .lab-layout {
    display: block;
    margin-top: 23px;
  }
  .experiment-nav {
    display: none;
  }
  .mobile-experiment {
    display: block;
    margin-bottom: 23px;
  }
  .mobile-experiment select {
    font-size: 14px;
  }
  .experiment-head h2 {
    font-size: 23px;
  }
  .experiment-head > p {
    font-size: 13px;
  }
  .query-panel {
    padding: 18px;
  }
  .run-row {
    flex-wrap: wrap;
    gap: 12px;
  }
  .run-row > span {
    flex-basis: 100%;
  }
  .primary {
    width: 100%;
  }
  .input-row {
    gap: 10px;
  }
  select {
    padding: 9px;
    font-size: 12px;
  }
  .results-grid {
    gap: 12px;
  }
  .card-media {
    height: 130px;
  }
  .card-body {
    padding: 11px;
  }
  .card-actions {
    gap: 5px;
  }
  .card-actions button {
    padding: 5px;
    font-size: 9px;
  }
  .card-top .score {
    font-size: 12px;
  }
  .card-body h3 {
    font-size: 12px;
    min-height: 34px;
  }
  .card-top .small-label {
    font-size: 8px;
  }
  .text-preview {
    font-size: 10px;
    padding: 12px;
  }
  .inspector {
    padding: 16px;
  }
  .inspector-head {
    align-items: flex-start;
    gap: 10px;
  }
  .inspector-head button {
    font-size: 10px;
    flex: none;
  }
  .vector-pair {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  td,
  th {
    padding: 7px 4px;
    font-size: 10px;
  }
  .dot-total strong {
    font-size: 12px;
  }
  dialog {
    width: 95vw;
    padding: 20px;
  }
  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
  }
  .library-item .card-media {
    height: 125px;
  }
  footer > div {
    gap: 12px;
  }
  .results-heading label {
    max-width: 105px;
  }
  .results-heading p {
    font-size: 10px;
  }
  .query-preview img {
    height: 145px;
  }
  .upload {
    display: block;
  }
  .upload input {
    display: block;
    margin-top: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.map-legend {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--muted);
}
.map-legend span {
  display: flex;
  gap: 5px;
  align-items: center;
}
.map-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Editorial workspace: media first, calculations on request. */
html { scroll-behavior: smooth; }
.site-header { max-width: 1440px; padding: 24px 48px; justify-content: space-between; }
.site-header nav { display: flex; align-items: center; gap: 28px; font-size: 13px; }
.site-header nav > a { text-decoration: none; color: var(--ink); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 14px; }
.brand-mark { color: var(--accent); font-size: 25px; letter-spacing: -.07em; margin-right: 8px; }
.brand-slash { color: #c1c3bb; font-weight: 400; margin: 0 5px; }
.brand-course { font-weight: 400; color: var(--muted); }
main { padding: 0 48px; }
.intro { grid-template-columns: .92fr 1.08fr; gap: 64px; padding: 56px 0 40px; }
.eyebrow { font-size: 10px; letter-spacing: .14em; }
h1 { font-size: clamp(34px,3.6vw,54px); line-height: 1.04; letter-spacing: -.055em; margin: 20px 0; font-weight: 600; text-wrap: balance; }
h1 em { color: var(--accent); font-style: normal; }
.intro-copy > p:not(.eyebrow) { max-width: 41ch; font-size: 16px; line-height: 1.7; }
.intro-link { display: inline-flex; gap: 28px; color: var(--ink); font-size: 14px; font-weight: 600; margin-top: 22px; text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 5px; }
.intro-facts { display: flex; gap: 23px; margin-top: 28px; color: var(--muted); font-size: 11px; }
.intro-facts b { display: inline-block; color: var(--ink); font-size: 14px; margin-right: 3px; font-family: var(--mono); font-weight: 500; }
.intro-media { min-width: 0; padding-top: 20px; }
.media-caption { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 14px; color: var(--muted); }
.media-caption > span:first-child { color: var(--ink); font-weight: 600; }
.media-tiles { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; align-items: start; }
.hero-tile { min-width: 0; text-align: left; border: 0; background: transparent; padding: 0; transition: transform .2s; }
.hero-tile:hover { transform: translateY(-5px); }
.hero-tile > img,.hero-tile > .sound-drawing,.hero-tile > .text-drawing { width: 100%; height: 174px; border-radius: 7px; object-fit: cover; display: flex; flex-direction: column; justify-content: center; }
.sound-tile { margin-top: 28px; }
.text-tile { margin-top: 56px; }
.hero-tile > span:last-child { display: block; font-size: 11px; color: var(--muted); line-height: 1.7; padding-top: 13px; }
.hero-tile b { color: var(--ink); display: block; font-size: 12px; font-weight: 600; }
.hero-tile i { float: right; font-style: normal; color: var(--accent); }
.sound-drawing { background: #e8eddf; padding: 12px; align-items: center; gap: 14px; }
.sound-drawing svg { width: 100%; max-height: 65px; fill: none; stroke: #758460; stroke-width: 3; stroke-linecap: round; }
.sound-drawing small { font-size: 9px; color: #526047; }
.text-drawing { background: #ede2d5; padding: 17px; color: #71513c; font-size: 21px; font-weight: 500; letter-spacing: -.035em; line-height: 1.2; }
.text-drawing small { font-size: 9px; letter-spacing: .02em; font-weight: 400; margin-top: 18px; }
.intro .media-footnote { margin-top: 24px; padding-top: 17px; border-top: 1px solid var(--line); font-size: 11px !important; }
.runtime-bar { border: 0; border-block: 1px solid var(--line); background: transparent; border-radius: 0; padding: 14px 0; gap: 12px; font-size: 11px; }
.status-dot { background: #5e7651; }
.runtime-bar .quiet { border: 0; padding-right: 0; color: var(--accent); }
.lab-layout { display: block; margin-top: 34px; }
.experiment-nav { display: block; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.nav-intro { display: flex; align-items: center; gap: 24px; margin-bottom: 16px; }
.nav-intro > span:last-child { font-size: 12px; color: var(--muted); }
.experiment-group { display: grid; grid-template-columns: 60px 1fr; align-items: baseline; margin: 4px 0; }
.experiment-group p { margin: 0; font-size: 10px; color: var(--muted); }
.experiment-group > div { display: flex; flex-wrap: wrap; gap: 3px 5px; }
.experiment-nav button { font-size: 12px; padding: 8px 11px; border-radius: 4px; background: none; border: 1px solid transparent; line-height: 1.25; color: #5c6158; transition: background .18s,color .18s; }
.experiment-nav button:hover { background: #eeece5; color: var(--ink); }
.experiment-nav button[aria-current="true"] { background: #a04632; color: #fffefa; border-color: #a04632; }
#workspace { padding-top: 34px; scroll-margin-top: 0; }
.experiment-head { max-width: 100%; margin-bottom: 26px; }
.experiment-head h2 { font-size: 30px; margin: 11px 0 10px; letter-spacing: -.035em; }
.experiment-head > p { font-size: 14px; margin: 0; max-width: 75ch; }
.workbench { display: grid; grid-template-columns: minmax(290px,.77fr) minmax(0,1.5fr); gap: 34px; align-items: start; }
.query-column { min-width: 0; }
.query-panel { border: 0; border-radius: 7px; background: #eeeee6; padding: 22px; }
.step-label { font-family: var(--mono); font-size: 10px; color: var(--muted); font-weight: 500; letter-spacing: .05em; margin: 0 0 18px; }
.input-row { gap: 12px; padding-bottom: 2px; }
label { font-size: 11px; }
select,textarea { font-size: 13px; border-color: #d1d3c9; border-radius: 4px; padding: 10px; background: #fffefa; }
textarea { font-size: 16px; min-height: 106px; }
.field { margin-top: 19px; }
.chip { border: 0; background: #e2e4d9; color: #4d5947; border-radius: 4px; font-size: 11px; text-align: left; line-height: 1.4; padding: 7px 9px; }
.chip:hover { background: #d8ddce; }
.run-row { flex-wrap: wrap; gap: 13px; margin-top: 22px; }
.primary { width: 100%; border-radius: 4px; font-size: 14px; padding: 13px 18px; text-align: center; }
.run-row > span { font-size: 10px; line-height: 1.6; }
.lesson { margin: 18px 0 0; padding: 0 0 0 14px; background: none; font-size: 12px; line-height: 1.65; color: var(--muted); }
.lesson b { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; color: var(--ink); }
.results-column { min-width: 0; }
.results-heading { align-items: start; gap: 12px; }
.results-heading h2 { font-size: 24px; letter-spacing: -.035em; margin-bottom: 8px; }
.results-heading p { font-size: 11px; line-height: 1.6; max-width: 46ch; }
.results-heading label { font-size: 9px; max-width: 98px; }
.results-heading select { font-size: 10px; margin-top: 5px; }
#dimension-note { font-size: 10px; margin: 12px 0; }
.results-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px 14px; }
.result-card { background: transparent; border: 0; border-radius: 0; }
.card-media { height: 148px; border-radius: 5px; background: #eeece5; }
.card-media img { object-fit: cover; }
.card-body { padding: 12px 0 0; }
.card-top .small-label { font-size: 8px; color: var(--muted); }
.score { font-size: 14px; color: var(--accent); }
.card-body h3 { font-size: 13px; font-weight: 500; margin: 6px 0 8px; }
.card-actions { gap: 10px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 11px; }
.card-actions button { padding: 2px 0; border: 0; border-radius: 0; color: var(--accent); font-size: 10px; }
.card-actions button:hover { background: none; text-decoration: underline; text-underline-offset: 3px; }
.card-actions button:last-child { color: var(--muted); }
.score-track { height: 2px; margin-bottom: 0; }
.score-track > span { background: #b4bf9e; }
.text-preview { font-size: 13px; line-height: 1.65; padding: 15px; background: #efede4; color: #4e5749; }
.code-preview { font-size: 10px; background: #e8ede4; }
.query-preview { max-height: none; margin: 16px 0 10px; justify-content: center; }
.query-preview img { width: 100%; height: 218px; object-fit: contain; background: #e1e3d8; }
.query-preview .audio-preview { height: 138px; background: #e0e6d6; border-radius: 5px; }
.query-preview video { max-width: 100%; max-height: 220px; }
.sample-strip { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 5px; }
.sample-pick { padding: 0; min-width: 0; border: 2px solid transparent; border-radius: 4px; background: none; }
.sample-pick[aria-pressed="true"] { border-color: var(--accent); }
.sample-pick img,.sample-pick video { width: 100%; height: 40px; display: block; object-fit: cover; border-radius: 2px; }
.sample-pick > span { display: none; }
.sample-pick .audio-preview { height: 40px; gap: 0; border-radius: 2px; }
.sample-pick .audio-preview svg { width: 90%; height: 22px; }
.sample-pick .audio-preview > span { display: none; }
.input-options { border-top: 1px solid #d5d8ca; margin-top: 15px; }
.input-options summary { font-size: 11px; color: var(--muted); }
.input-options .hint { font-size: 10px; }
.inspector { border: 0; border-top: 1px solid var(--line); border-radius: 0; margin-top: 36px; background: #f2f1e9; padding: 28px; }
.inspector-actions { display: flex; gap: 8px; }
.inspector h2 { font-size: 25px; }
.vector-pair h3 { font-size: 13px; }
#vector-note { max-width: 95ch; }
#dot-area { max-width: 900px; }
.cluster { grid-column: span 1; padding: 15px; background: #edf0e5; }
.cluster-item { font-size: 11px; }
#map { border: 0; background: #f0f1e9; padding: 20px; }
footer { margin-top: 60px; padding: 32px 0; }
footer > strong { font-size: 23px; font-weight: 500; letter-spacing: -.03em; }
footer p { line-height: 1.7; }
footer > div { margin-top: 22px; }
.quiet { transition: background .18s,color .18s; }
#workspace[aria-busy="true"] #results { opacity: .45; }
@media (min-width: 1440px) {
  .hero-tile > img,.hero-tile > .sound-drawing,.hero-tile > .text-drawing { height: 205px; }
  .card-media { height: 174px; }
}
@media (max-width: 1100px) {
  main { padding: 0 28px; }
  .site-header { padding: 20px 28px; }
  .intro { gap: 28px; }
  .hero-tile > img,.hero-tile > .sound-drawing,.hero-tile > .text-drawing { height: 145px; }
  .hero-tile b { font-size: 11px; }
  .text-drawing { font-size: 18px; padding: 12px; }
  .workbench { grid-template-columns: minmax(280px,.85fr) minmax(0,1.4fr); gap: 24px; }
  .results-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .runtime-bar > span:not(.status-dot) { margin-left: auto; }
}
@media (max-width: 760px) {
  main { padding: 0 20px; }
  .site-header { padding: 16px 20px; }
  .brand { font-size: 12px; gap: 6px; }
  .brand-mark { font-size: 24px; margin-right: 4px; }
  .brand-course,.brand-slash { display: none; }
  .site-header nav { gap: 10px; font-size: 11px; }
  .site-header .quiet { font-size: 10px; padding: 6px; }
  .intro { grid-template-columns: 1fr; padding: 34px 0 25px; gap: 28px; }
  h1 { font-size: 42px; margin: 16px 0; }
  .intro-copy > p:not(.eyebrow) { font-size: 14px; max-width: 43ch; }
  .intro-link { margin-top: 16px; font-size: 13px; }
  .intro-facts { margin-top: 20px; gap: 17px; }
  .intro-media { display: block; padding-top: 0; }
  .media-caption { font-size: 10px; margin-bottom: 10px; }
  .media-tiles { gap: 8px; }
  .hero-tile > img,.hero-tile > .sound-drawing,.hero-tile > .text-drawing { height: 116px; }
  .sound-tile { margin-top: 15px; }
  .text-tile { margin-top: 30px; }
  .hero-tile > span:last-child { font-size: 9px; padding-top: 8px; }
  .hero-tile b { font-size: 10px; line-height: 1.4; margin-bottom: 3px; }
  .text-drawing { font-size: 16px; padding: 10px; }
  .text-drawing small { font-size: 8px; margin-top: 12px; }
  .sound-drawing { padding: 9px; gap: 7px; }
  .sound-drawing small { font-size: 7px; }
  .intro .media-footnote { font-size: 10px !important; margin-top: 18px; padding-top: 12px; }
  .runtime-bar { font-size: 10px; gap: 7px; }
  .runtime-bar > span:not(.status-dot) { width: auto; margin: 0; order: 3; }
  .runtime-bar .quiet { font-size: 10px; margin-left: auto; }
  .lab-layout { margin-top: 22px; }
  .experiment-nav { display: none; }
  #workspace { padding-top: 0; scroll-margin-top: 20px; }
  .mobile-experiment { display: block; }
  .experiment-head h2 { font-size: 27px; }
  .experiment-head > p { font-size: 13px; }
  .workbench { grid-template-columns: 1fr; gap: 30px; }
  .query-panel { padding: 19px; }
  .query-preview img { height: 210px; }
  .sample-pick img,.sample-pick video { height: 43px; }
  .results-heading h2 { font-size: 23px; }
  .card-media { height: 150px; }
  .card-body { padding: 11px 0 0; }
  .card-body h3 { font-size: 13px; min-height: 0; }
  .card-top .score { font-size: 14px; }
  .card-actions button { font-size: 10px; padding: 3px 0; }
  .text-preview { font-size: 12px; padding: 13px; }
  .code-preview { font-size: 10px; }
  .inspector { padding: 20px 14px; margin-inline: -6px; }
  .inspector-head { flex-wrap: wrap; gap: 10px; }
  .inspector h2 { font-size: 23px; }
  .inspector-actions { width: 100%; }
  .vector-pair { grid-template-columns: 1fr; }
  footer > strong { font-size: 21px; }
  footer > div { font-size: 11px; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-tile,.quiet,.experiment-nav button { transition: none; }
}
.sample-strip:has(.sample-audio) { grid-template-columns: repeat(3,minmax(0,1fr)); }
.sample-audio > span { display: block; font-size: 9px; padding: 5px 2px; color: var(--muted); }
.sample-audio[aria-pressed="true"] > span { color: var(--accent); }
.inspect-pair { display: flex; align-items: center; gap: 25px; border-block: 1px solid var(--line); padding: 16px 0; margin: 16px 0; }
.inspect-pair > div { flex: 1; min-width: 0; }
.inspect-pair strong { display: block; font-size: 15px; font-weight: 500; line-height: 1.6; margin-top: 5px; overflow-wrap: anywhere; }
.pair-arrow { color: var(--accent); font-size: 22px; }

/* Keep the capability playground direct; calculations open on demand. */
.intro-link { background: none; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; padding: 0 0 5px; }
.intro-explore { display: block; margin-top: 16px; }
.score-gap { font: 11px var(--mono); color: var(--muted); padding: 8px 0; }
.audio-waveform { display: block; width: 100%; max-width: 380px; height: 90px; color: #39766f; padding: 8px 12px; }
.selected-media .audio-waveform { height: 70px; }
.audio-preview .audio-waveform path { stroke-width: 2; }
/* Shared-space explorer and the small supervised learning lab. */
[hidden] {
  display: none !important;
}
#advanced-area {
  min-width: 0;
}
.explorer-intro,
.training-intro {
  display: flex;
  align-items: start;
  gap: 28px;
  justify-content: space-between;
  border-top: 1px solid var(--line, #dfddd5);
  padding-top: 22px;
  margin-bottom: 28px;
}
.explorer-intro p,
.training-intro p {
  max-width: 660px;
  margin: 0;
  line-height: 1.7;
}
.saved-tag {
  display: block;
  color: #51675e;
  font-size: 11px;
  letter-spacing: 0.04em;
  max-width: 210px;
  line-height: 1.7;
  text-align: right;
  flex-shrink: 0;
}
.space-toolbar,
.training-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 140px;
  gap: 16px;
  margin-bottom: 28px;
}
.space-toolbar label,
.training-controls label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #625d56;
}
.space-toolbar select,
.training-controls select {
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 14px;
  padding: 12px 32px 12px 12px;
  border: 1px solid #d8d4ca;
  border-radius: 5px;
  background: #fff;
  color: #282721;
}
.space-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 24px;
}
.space-plot {
  min-width: 0;
}
.space-plot > header,
.full-vector > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 15px;
}
.space-plot h3,
.space-detail h3,
.full-vector h3,
.training-grid h3,
.test-predictions h3,
.finetune-section h3 {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 600;
  margin: 8px 0 18px;
  letter-spacing: -0.035em;
}
.zoom-tools {
  display: flex;
  align-items: center;
  gap: 3px;
}
.zoom-tools button {
  padding: 7px 10px;
  white-space: nowrap;
}
.modality-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 8px 0 15px;
}
.modality-legend label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  text-transform: capitalize;
  cursor: pointer;
}
.modality-legend input {
  accent-color: var(--modality);
  width: 13px;
  height: 13px;
}
.modality-legend i,
.space-neighbours i {
  height: 8px;
  width: 8px;
  border-radius: 50%;
  background: var(--modality);
  flex-shrink: 0;
}
.modality-legend label span {
  color: #8b847b;
  font-size: 11px;
}
#space-chart {
  border: 1px solid #dfdcd2;
  border-radius: 8px;
  background: #fffefb;
  overflow: hidden;
  touch-action: none;
}
#space-chart svg {
  display: block;
  width: 100%;
  height: auto;
  cursor: grab;
}
.space-point {
  cursor: pointer;
  outline: none;
}
.space-point:focus circle {
  stroke: #121811;
  stroke-width: 4px;
}
.space-point:hover circle {
  stroke: #222;
  stroke-width: 2px;
}
.axis-label {
  font:
    11px "IBM Plex Mono",
    monospace;
  fill: #7e796e;
}
.comparison-line {
  vector-effect: non-scaling-stroke;
}
.pan-tools {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #7e796e;
}
.pan-tools button {
  padding: 4px 8px;
}
.space-explanation {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #dfdcd2;
  font-size: 13px;
  line-height: 1.7;
}
.space-explanation ol {
  padding-left: 20px;
}
.space-detail {
  border-left: 1px solid #dfdcd2;
  padding-left: 22px;
  min-width: 0;
}
.type-badge {
  font:
    11px "IBM Plex Mono",
    monospace;
  letter-spacing: 0.06em;
}
.space-detail h3 {
  font-size: 18px;
  margin: 10px 0 16px;
}
.selected-media {
  min-height: 95px;
  background: #f2efe7;
  padding: 12px;
  border-radius: 6px;
}
.selected-media img {
  max-height: 160px;
  width: 100%;
  object-fit: contain;
}
.selected-media audio {
  width: 100%;
  height: 34px;
  margin-top: 14px;
}
.selected-media video {
  max-height: 165px;
  width: 100%;
}
.audio-label {
  font:
    10px "IBM Plex Mono",
    monospace;
  color: #238178;
  letter-spacing: 0.09em;
}
.selected-media blockquote {
  font-size: 17px;
  line-height: 1.5;
  margin: 4px;
  padding: 0;
  border: 0;
}
.space-detail .fineprint {
  max-height: 60px;
  overflow: auto;
  font-size: 10px;
  margin: 9px 0 22px;
}
.space-detail h4 {
  font-size: 14px;
  margin: 12px 0 6px;
}
.space-detail .hint {
  font-size: 11px;
  line-height: 1.5;
}
.space-neighbours button {
  display: flex;
  width: 100%;
  text-align: left;
  gap: 9px;
  align-items: center;
  padding: 11px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid #e3dfd5;
  border-radius: 0;
  color: #302e29;
  font: 12px inherit;
  cursor: pointer;
}
.space-neighbours button:hover {
  background: #f0ece2;
}
.space-neighbours button span {
  flex: 1;
  font-size: 12px;
  line-height: 1.4;
}
.space-neighbours small {
  display: block;
  font-size: 10px;
  color: #82786c;
}
.space-neighbours b {
  font:
    12px "IBM Plex Mono",
    monospace;
}
.pair-score {
  margin-top: 24px;
  padding: 17px;
  background: #edf1ec;
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: center;
  border-radius: 7px;
}
.pair-score span {
  font-size: 11px;
  line-height: 1.5;
}
.pair-score strong {
  font:
    27px "IBM Plex Mono",
    monospace;
}
.pair-score small {
  font-size: 10px;
  color: #647165;
}
.full-vector {
  border-top: 1px solid #d5d1c6;
  margin-top: 36px;
  padding-top: 24px;
}
.under-hood {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font:
    12px "IBM Plex Mono",
    monospace;
}
.under-hood span:nth-child(odd) {
  background: #f1eee6;
  padding: 9px;
  border-radius: 4px;
}
#space-vector-summary p {
  font-size: 13px;
  margin: 18px 0 28px;
}
.full-vector canvas {
  display: block;
  width: 100%;
}
.full-vector h4 {
  font-size: 13px;
  font-weight: 500;
}
.full-vector details {
  margin: 20px 0;
  border-top: 1px solid #e2ded5;
  padding-top: 16px;
}
.full-vector summary {
  font-size: 13px;
  cursor: pointer;
}
.full-vector pre {
  max-height: 400px;
  overflow: auto;
  font-size: 11px;
  white-space: pre-wrap;
}
.full-coordinate-table {
  max-height: 360px;
  overflow: auto;
  margin-top: 16px;
  border: 1px solid #dfdcd2;
  border-radius: 5px;
}
.full-coordinate-table table {
  width: 100%;
  border-collapse: collapse;
  font:
    12px "IBM Plex Mono",
    monospace;
}
.full-coordinate-table th {
  position: sticky;
  top: 0;
  background: #f0eee7;
  text-align: right;
}
.full-coordinate-table td,
.full-coordinate-table th {
  padding: 9px 12px;
  border-bottom: 1px solid #ebe7df;
  text-align: right;
}
.coordinate-search {
  display: flex;
  align-items: end;
  gap: 14px;
  margin: 14px 0;
}
.coordinate-search label {
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.coordinate-search input {
  width: 120px;
  border: 1px solid #d5cfc3;
  padding: 8px;
  font: inherit;
}
.training-architecture {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 22px 0 32px;
  border-bottom: 1px solid #ded9ce;
  margin-bottom: 25px;
}
.training-architecture > div {
  flex: 1;
  padding: 16px 10px;
  border: 1px solid #ded9ce;
  text-align: center;
  border-radius: 5px;
  min-width: 0;
}
.training-architecture b {
  display: block;
  font-size: 13px;
}
.training-architecture span {
  display: block;
  font-size: 10px;
  color: #7c7569;
  margin-top: 7px;
}
.training-architecture i {
  font-style: normal;
  color: #7c7569;
}
.training-architecture .frozen-block {
  background: #eef1ec;
  border-color: #cad4c8;
}
.training-architecture .learning-block {
  background: #f6e9df;
  border-color: #d6b8a1;
}
.training-controls {
  grid-template-columns: 1.1fr 155px 1.5fr;
  align-items: end;
}
.training-buttons {
  display: flex;
  gap: 6px;
  justify-content: end;
  flex-wrap: wrap;
}
.training-buttons button {
  font-size: 12px;
  padding: 11px;
}
.training-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #f0eee6;
  padding: 20px 24px;
  gap: 20px;
  border-radius: 6px;
}
.training-metrics span {
  display: block;
  font-size: 11px;
  color: #756e60;
}
.training-metrics b {
  display: block;
  font:
    27px "IBM Plex Mono",
    monospace;
  margin-top: 12px;
}
.training-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 32px;
  margin: 30px 0;
}
.training-grid p,
.training-grid details {
  font-size: 13px;
  line-height: 1.7;
}
.training-grid pre {
  padding: 18px;
  background: #f1eee6;
  font-size: 12px;
  line-height: 1.7;
  overflow: auto;
  border-radius: 6px;
}
#training-chart svg {
  width: 100%;
  display: block;
}
#training-chart text {
  font:
    10px "IBM Plex Mono",
    monospace;
  fill: #746d61;
}
.training-formula {
  border-left: 2px solid #bc5538;
  padding: 14px 18px;
  background: #f6f1e9;
}
.training-formula b {
  font-size: 15px;
}
.training-formula span {
  display: block;
  font-size: 11px;
  color: #776e5d;
  margin-top: 10px;
}
.training-grid details {
  margin-bottom: 15px;
}
.test-predictions {
  border-top: 1px solid #d8d2c5;
  padding-top: 24px;
}
.section-heading p {
  font-size: 13px;
}
.test-predictions .hint {
  font-size: 12px;
  line-height: 1.7;
  max-width: 880px;
}
#test-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0;
}
#test-cards article {
  border: 1px solid #ded8cb;
  border-radius: 7px;
  padding: 18px;
  min-width: 0;
}
#test-cards audio {
  width: 100%;
  height: 34px;
}
#test-cards article > strong {
  font-size: 13px;
  display: block;
  margin: 18px 0;
}
.class-bars > div {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 10px 0;
  font-size: 11px;
}
.class-bars span {
  width: 65px;
}
.class-bars i {
  flex: 1;
  height: 5px;
  background: #e7e2d6;
  overflow: hidden;
}
.class-bars b {
  display: block;
  height: 100%;
  background: #bc5538;
}
.class-bars code {
  font-size: 10px;
}
.test-predictions details {
  font-size: 11px;
  line-height: 1.6;
  margin-top: 15px;
}
.training-split {
  font-size: 13px;
  line-height: 1.7;
  margin: 30px 0;
}
.training-split table {
  width: 100%;
  border-collapse: collapse;
}
.training-split td,
.training-split th {
  padding: 12px;
  border-bottom: 1px solid #ded8cb;
  text-align: left;
}
.training-split audio {
  width: 200px;
  height: 32px;
}
.finetune-section {
  border-top: 1px solid #d8d2c5;
  padding-top: 28px;
  margin-top: 35px;
}
.finetune-section p {
  font-size: 14px;
  line-height: 1.7;
  max-width: 800px;
}
.fine-tuning-path {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 24px 0;
}
.fine-tuning-path span {
  padding: 15px;
  background: #eeece4;
  border-radius: 5px;
  min-width: 170px;
  font-size: 13px;
  line-height: 1.6;
}
.fine-tuning-path small {
  color: #83755f;
}
.training-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 20px;
  font-size: 13px;
}
@media (min-width: 1600px) {
  .space-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
  .space-plot h3 {
    font-size: 25px;
  }
}
@media (max-width: 1100px) {
  .space-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 18px;
  }
  .space-detail {
    padding-left: 16px;
  }
  .space-plot > header {
    display: block;
  }
  .zoom-tools {
    margin: 10px 0;
  }
  .training-controls {
    grid-template-columns: 1fr 160px;
  }
  .training-buttons {
    grid-column: 1/-1;
    justify-content: start;
  }
  .training-grid {
    gap: 20px;
  }
}
@media (max-width: 720px) {
  .explorer-intro,
  .training-intro {
    display: block;
  }
  .saved-tag {
    max-width: none;
    text-align: left;
    margin-top: 12px;
  }
  .space-toolbar {
    grid-template-columns: 1fr 100px;
    gap: 12px;
  }
  .space-toolbar label:first-child {
    grid-column: 1/-1;
  }
  .space-layout {
    display: block;
  }
  .space-detail {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid #ded8cb;
    padding-top: 24px;
    margin-top: 24px;
  }
  .selected-media {
    max-width: 350px;
  }
  .space-detail .fineprint {
    max-height: 50px;
  }
  .space-neighbours button span {
    font-size: 13px;
  }
  .full-vector > header {
    display: block;
  }
  .full-vector > header button {
    margin-bottom: 15px;
  }
  .full-vector .vector-pair {
    grid-template-columns: 1fr;
  }
  .space-toolbar select {
    font-size: 12px;
  }
  .full-coordinate-table td,
  .full-coordinate-table th {
    padding: 8px;
    font-size: 10px;
  }
  .training-architecture {
    display: grid;
    grid-template-columns: 1fr 20px 1fr;
    gap: 9px;
  }
  .training-architecture > i:nth-of-type(2) {
    display: none;
  }
  .training-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
  .training-metrics b {
    font-size: 24px;
  }
  .training-grid {
    grid-template-columns: 1fr;
  }
  .training-controls {
    grid-template-columns: 1fr 125px;
  }
  .training-controls select {
    font-size: 12px;
  }
  .training-controls button {
    font-size: 11px;
  }
  #test-cards {
    grid-template-columns: 1fr;
  }
  .fine-tuning-path {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .fine-tuning-path > b {
    text-align: center;
    transform: rotate(90deg);
  }
  .training-links {
    flex-direction: column;
  }
  .space-plot h3 {
    font-size: 21px;
  }
  .under-hood {
    font-size: 10px;
    gap: 7px;
  }
  .explorer-intro p,
  .training-intro p {
    font-size: 14px;
  }
  .full-vector .vector-pair {
    display: grid;
  }
  .full-vector pre {
    overflow-wrap: anywhere;
  }
  .training-split .table-scroll {
    overflow-x: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  #advanced-area * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.pair-score img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  border-radius: 4px;
}
.knowledge{max-width:1050px}.knowledge-count{color:var(--muted);font-size:14px;border-bottom:1px solid var(--line);padding-bottom:18px;margin:0 0 24px}.knowledge form{background:var(--paper);padding:24px;border:1px solid var(--line);border-radius:6px}.knowledge label{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:600}.knowledge form>label{font-size:18px;margin-bottom:12px}.knowledge textarea,.knowledge input,.knowledge select{border:1px solid #c7cac0;border-radius:4px;padding:12px;background:#fff;width:100%;min-width:0}.knowledge textarea{line-height:1.5;resize:vertical}.knowledge-ideas{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0 20px}.knowledge-ideas .chip{text-align:left;font-size:12px;padding:7px 10px}.knowledge-actions{display:flex;align-items:end;gap:14px;flex-wrap:wrap}.knowledge-actions label{flex:1;min-width:140px}.knowledge-actions label:last-child{flex:0;min-width:94px}.knowledge-actions .primary{min-height:46px}.knowledge-status{font-size:14px;line-height:1.6;margin:20px 0;color:var(--muted)}.knowledge-error{padding:16px;background:#fff0e8;border-left:3px solid #b33d28}.knowledge-results-head{display:flex;align-items:baseline;justify-content:space-between;gap:15px;margin:25px 0 12px}.knowledge-results-head h3{font-size:22px;margin:0}.knowledge-results-head>span{font-size:12px;color:var(--muted)}.knowledge-result{background:var(--paper);border-top:1px solid var(--line);padding:23px 0}.knowledge-result-top{display:flex;align-items:start;gap:14px}.knowledge-result-top>div{flex:1;min-width:0}.knowledge-result-top h3{font-size:19px;line-height:1.4;margin:7px 0 18px;overflow-wrap:anywhere}.knowledge-result-top .eyebrow{font-size:10px;line-height:1.5;margin:0}.knowledge-rank{font:14px var(--mono);color:var(--muted);padding-top:3px}.knowledge-score{font:18px var(--mono);color:#4b6742;white-space:nowrap}.knowledge-score small{display:block;font:10px 'DM Sans',sans-serif;color:var(--muted);text-align:right;margin-top:5px}.knowledge-excerpt{display:flex;gap:20px;margin-left:32px}.knowledge-excerpt>a{flex:0 0 220px;align-self:start}.knowledge-excerpt img{width:100%;height:auto;max-height:220px;object-fit:contain;border:1px solid var(--line);background:white}.knowledge-excerpt>div{min-width:0;flex:1}.knowledge blockquote{white-space:pre-line;font-size:15px;line-height:1.65;margin:0;border-left:2px solid #cdc9b8;padding-left:17px}.knowledge pre{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.7 var(--mono);background:var(--soft);padding:16px;margin:0;max-height:420px;overflow:auto}.knowledge-excerpt.is-code pre{font-size:13px}.knowledge summary{cursor:pointer;font-size:13px;padding:10px 0;color:var(--accent)}.knowledge-source-links{display:flex;gap:16px;flex-wrap:wrap;margin:15px 0 6px 32px;align-items:baseline;font-size:13px}.knowledge-source-links small{color:var(--muted);font-size:11px}.knowledge-vectors{margin-left:32px}.knowledge-vectors p{font-size:13px;line-height:1.5}.knowledge-vector-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.knowledge-how,.knowledge-add{margin-top:24px;padding:12px 20px;border:1px solid var(--line);border-radius:5px}.knowledge-how>summary,.knowledge-add>summary{font-size:15px;font-weight:600}.knowledge-flow{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin:14px 0 25px}.knowledge-flow span{font-size:13px;line-height:1.7}.knowledge-flow b{display:block;font-size:15px;margin-bottom:7px}.knowledge-how p,.knowledge-add p{font-size:14px;line-height:1.65}.knowledge-add label{margin:14px 0}.knowledge-add button{margin-right:12px}.knowledge .hint{font-weight:400;font-size:12px}.knowledge[aria-busy=true] .knowledge-status{color:var(--accent)}
@media(max-width:800px){.knowledge-excerpt{flex-direction:column;margin-left:0}.knowledge-excerpt>a{flex:auto;width:min(280px,100%)}.knowledge-result-top h3{font-size:17px}.knowledge-results-head{display:block}.knowledge-results-head>span{display:block;margin-top:7px}.knowledge-flow{grid-template-columns:1fr;gap:12px}.knowledge-source-links,.knowledge-vectors{margin-left:0}.knowledge-vector-grid{grid-template-columns:1fr}.knowledge form{padding:17px}.knowledge-actions .primary{width:100%}}
.knowledge-nearby{margin-left:32px}.knowledge-nearby p{font-size:13px;margin-top:15px}.knowledge-nearby blockquote{font-size:13px}.knowledge .knowledge-ideas .chip{white-space:normal}@media(max-width:800px){.knowledge-nearby{margin-left:0}}
.knowledge-actions .primary{width:auto;flex:0 0 auto}.knowledge-excerpt blockquote{font-size:15px}@media(max-width:800px){.knowledge-actions .primary{width:100%;flex-basis:100%}}
.training-intro { margin-bottom: 24px; }
.training-task-note { font-size: 14px; line-height: 1.7; margin: 14px 0 26px; max-width: 80ch; }
.neuron-lab { border-block: 1px solid #d8d2c5; margin: 26px 0; padding: 24px 0; }
.neuron-lab h3 { margin: 0 0 8px; }
.nn-controls { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin: 20px 0; }
.nn-controls label { display: flex; flex-direction: column; gap: 8px; font-size: 12px; min-width: 0; }
.nn-controls select { width: 100%; min-width: 0; padding: 10px; border: 1px solid #d5cfc3; border-radius: 4px; background: #fffdf7; font: inherit; }
.nn-layout { display: grid; grid-template-columns: 175px minmax(0, 1fr); align-items: center; gap: 18px; }
.nn-input { min-width: 0; text-align: center; }
.nn-input img { width: 100%; max-height: 140px; object-fit: contain; border-radius: 4px; }
.nn-input blockquote { font-size: 14px; line-height: 1.5; margin: 0; padding: 14px; border-left: 2px solid #b75e42; background: #f3ede3; overflow-wrap: anywhere; max-height: 170px; overflow-y: auto; }
.nn-input audio { width: 100%; }
.nn-input .small-label { font-size: 10px; }
.nn-flow-arrow { margin: 8px 0; color: #877d6c; font-size: 21px; }
.nn-encoder { border: 1px solid #b9c8b5; border-radius: 5px; padding: 16px 10px; background: #edf2e9; font-size: 14px; }
.nn-encoder span, .nn-input-shape { display: block; margin-top: 6px; font-size: 11px; line-height: 1.5; color: #52604f; }
.nn-input-shape { color: #6c6457; }
.nn-saved-vector { border-bottom: 2px solid #839777; padding: 8px; font-family: "IBM Plex Mono", monospace; font-size: 13px; }
.nn-scroll { overflow-x: auto; min-width: 0; }
.nn-scroll svg { display: block; width: 100%; min-width: 610px; }
.nn-scroll text { font-family: inherit; fill: #363a31; }
.nn-scroll .nn-heading { font-size: 17px; font-weight: 650; }
.nn-scroll .nn-caption { font-size: 12px; fill: #756c5e; }
.nn-scroll .nn-coordinate { font-size: 13px; }
.nn-scroll .nn-value { font-family: "IBM Plex Mono", monospace; font-size: 11px; }
.nn-scroll .nn-class { font-size: 14px; font-weight: 600; }
.nn-scroll .nn-probability { font-family: "IBM Plex Mono", monospace; font-size: 15px; }
.nn-wire { stroke: #c8c7bf; stroke-width: 1; fill: none; opacity: .5; }
.nn-wire.selected { stroke: #b6593d; stroke-width: 1.8; opacity: .8; }
.nn-feature { fill: #edf2e9; stroke: #91a086; stroke-width: 1.5; }
.nn-output circle { fill: #f7f4ed; stroke: #a69d8e; stroke-width: 1.5; }
.nn-output.selected circle { fill: #f7e6dc; stroke: #b6593d; stroke-width: 2.2; }
.nn-to-softmax { stroke: #bfb5a6; fill: none; }
.nn-bar-track { fill: #eeeae0; }
.nn-bar-fill { fill: #a69d8e; }
.nn-output.selected .nn-bar-fill { fill: #b6593d; }
.nn-output.selected .nn-class { fill: #a44d34; }
.nn-ellipsis { font-size: 27px; }
.nn-pan-hint { display: none; }
.nn-formula-summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-left: 3px solid #b6593d; background: #f5eee5; font-size: 13px; }
.nn-formula-summary code { white-space: normal; font-size: 12px; }
.nn-arithmetic details { margin-top: 16px; font-size: 13px; line-height: 1.7; }
.nn-vector { margin-top: 14px; font-size: 12px; }
.nn-vector pre { max-height: 180px; overflow: auto; padding: 14px; background: #f2f0e8; line-height: 1.6; font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.test-predictions img { display: block; width: 100%; height: 150px; object-fit: contain; background: #f0eee7; margin-bottom: 16px; }
.test-predictions blockquote { margin: 0 0 16px; min-height: 80px; max-height: 200px; overflow-y: auto; border-left: 2px solid #b6593d; padding: 8px 14px; font-size: 14px; line-height: 1.65; }
.training-split img { width: 80px; height: 65px; object-fit: contain; }
.training-split blockquote { min-width: 180px; max-width: 360px; font-size: 12px; margin: 0; max-height: 120px; overflow-y: auto; }
.training-split td { overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .nn-layout { grid-template-columns: 140px minmax(0, 1fr); gap: 10px; }
  .nn-pan-hint { display: block; font-size: 11px; color: #756c5e; }
}
@media (max-width: 720px) {
  .nn-controls { grid-template-columns: 1fr; gap: 12px; }
  .nn-layout { grid-template-columns: minmax(0, 1fr); }
  .nn-input { max-width: 310px; margin: 0 auto 20px; width: 100%; }
  .nn-input img { max-height: 160px; }
  .nn-input-shape { font-size: 12px; }
  .nn-scroll { border: 1px solid #e2dccf; border-radius: 5px; padding: 10px; }
  .nn-scroll svg { min-width: 720px; }
}
