:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: #101a20;
  color: #d6e2e5;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: #a3c9c2;
  text-decoration: none;
}
button,
select,
input,
textarea,
.button {
  font: inherit;
  color: inherit;
}
button,
.button,
select {
  font-size: 12px;
  border: 1px solid #3b505a;
  border-radius: 5px;
  background: #24363f;
  padding: 9px 12px;
  cursor: pointer;
}
button:hover,
.button:hover {
  background: #344f58;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid #85d3c9;
  outline-offset: 3px;
}
input,
textarea {
  border: 1px solid #3b505a;
  border-radius: 4px;
  background: #112128;
  padding: 8px;
  font-size: 12px;
  min-width: 0;
}
button.primary {
  background: #a6d4c6;
  color: #102c32;
  border-color: #a6d4c6;
  font-weight: 650;
}
header {
  height: 65px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #2d3e47;
  font-size: 10px;
  letter-spacing: 0.1em;
}
header nav {
  display: flex;
  gap: 26px;
  letter-spacing: 0;
  font-size: 11px;
}
.brand {
  font-size: 13px;
  color: #d4e6e4;
}
main {
  max-width: 1900px;
  padding: 30px;
  margin: auto;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 0.14em;
  font-weight: 650;
  color: #9fc9c0;
  margin: 0;
}
h1 {
  font-size: 39px;
  letter-spacing: -0.035em;
  font-weight: 450;
  margin: 8px 0;
}
h2 {
  font-size: 23px;
  font-weight: 450;
  letter-spacing: -0.02em;
  margin: 7px 0;
}
h3 {
  font-size: 15px;
  font-weight: 500;
}
.intro > div > p:not(.eyebrow) {
  font-size: 12px;
  color: #8faab5;
  margin: 0;
}
.live {
  font-size: 11px;
  color: #a8c2c6;
  display: flex;
  gap: 9px;
  max-width: 320px;
  align-items: center;
}
.live i {
  width: 6px;
  height: 6px;
  background: #96d6b7;
  border-radius: 50%;
  flex-shrink: 0;
}
.tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid #30434d;
  margin-bottom: 20px;
}
.tabs button {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #94adb7;
  padding: 12px 0;
  border-bottom: 2px solid transparent;
}
.tabs button[aria-selected="true"] {
  border-bottom-color: #a5d7c5;
  color: #d6e7e1;
}
.tabs span {
  font-size: 9px;
  background: #283f49;
  padding: 3px 6px;
  border-radius: 10px;
  margin-left: 4px;
}
.workspace {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 260px;
  gap: 16px;
}
aside,
.panel {
  background: #17272f;
  border: 1px solid #304650;
  border-radius: 7px;
  padding: 17px;
  min-width: 0;
}
#families {
  margin: 14px -6px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#families button {
  border: 0;
  background: transparent;
  text-align: left;
  color: #9bb3be;
  font-size: 11px;
  padding: 9px 11px;
}
#families button.active {
  background: #2c464e;
  color: #c4e5d8;
}
#families button span {
  float: right;
  font: 10px monospace;
  color: #86aab3;
}
.field {
  display: block;
  font-size: 10px;
  color: #9cb6c1;
  margin: 14px 0;
}
.field select {
  display: block;
  width: 100%;
  margin-top: 7px;
}
.generator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.generator label,
.library-filters label {
  font-size: 10px;
  color: #99b6c3;
}
.generator input {
  display: block;
  width: 100%;
  margin-top: 6px;
}
.wide {
  width: 100%;
  margin-bottom: 9px;
}
details {
  border-top: 1px solid #334a54;
  margin-top: 14px;
  padding-top: 12px;
  font-size: 11px;
}
summary {
  cursor: pointer;
  color: #b3cdd2;
  padding-bottom: 12px;
}
textarea {
  width: 100%;
  height: 220px;
  resize: vertical;
  font:
    10px/1.6 ui-monospace,
    monospace;
  margin-bottom: 8px;
}
.input-actions {
  display: flex;
  gap: 5px;
  margin-top: 12px;
}
.input-actions button {
  flex: 1;
  font-size: 10px;
}
.subtle {
  font-size: 10px;
  color: #8ba6b2;
  line-height: 1.7;
}
.experiment-stage {
  background: #14252d;
  border: 1px solid #354b55;
  border-radius: 7px;
  min-width: 0;
  overflow: hidden;
}
.stage-heading {
  height: 84px;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.badge {
  font:
    9px ui-monospace,
    monospace;
  padding: 6px 8px;
  border: 1px solid #395660;
  border-radius: 4px;
  color: #a7c5ca;
  white-space: normal;
}
.visual {
  position: relative;
  background: radial-gradient(ellipse at 50% 35%, #203641, #14252d);
}
#visualization {
  display: block;
  width: 100%;
  height: 370px;
  touch-action: none;
}
#paint-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 10px;
  padding: 6px 10px 2px;
  color: #9cb3bd;
}
#paint-tools select,
#paint-tools button {
  font-size: 10px;
  padding: 6px 9px;
}
#legend {
  padding: 10px 16px;
  min-height: 34px;
  text-align: center;
  font-size: 10px;
  color: #9fb6bd;
}
.transport {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 15px 15px 4px;
  flex-wrap: wrap;
}
.transport button {
  padding: 8px 10px;
  font-size: 10px;
}
.transport label {
  font-size: 9px;
  color: #97b1bd;
  margin-left: auto;
}
.transport select {
  font-size: 10px;
  padding: 7px 4px;
  margin-left: 5px;
}
.timeline {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 9px 17px 16px;
}
.timeline input {
  flex: 1;
  accent-color: #a3d6bd;
  padding: 0;
}
.timeline span {
  font: 10px monospace;
  color: #afc7c8;
  min-width: 72px;
  text-align: right;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding: 17px 20px;
  background: #1b3039;
  border-top: 1px solid #354b55;
}
.metrics span {
  display: block;
  font-size: 8px;
  color: #95afba;
  margin-bottom: 8px;
}
.metrics strong {
  font:
    22px ui-monospace,
    monospace;
  color: #c8e3d5;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.inspector .panel-heading {
  margin-bottom: 15px;
}
.inspector #contract {
  font-size: 11px;
  line-height: 1.8;
  color: #a6bec6;
}
#pseudocode {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 18px 0;
}
#pseudocode li {
  counter-increment: step;
  font:
    10px/1.6 ui-monospace,
    monospace;
  padding: 9px 8px;
  color: #8faab6;
  border-left: 2px solid #30434d;
}
#pseudocode li:before {
  content: counter(step, decimal-leading-zero) "  ";
  color: #648b96;
}
#pseudocode li.active {
  color: #d4e6ce;
  background: #29414a;
  border-left-color: #a5d2ba;
}
.state-box {
  background: #11232b;
  padding: 13px;
  border: 1px solid #2d424e;
  border-radius: 4px;
}
.state-box p:not(.eyebrow) {
  font-size: 11px;
  line-height: 1.6;
  color: #b6d0d4;
}
.state-box pre {
  font:
    10px/1.7 ui-monospace,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 140px;
  overflow: auto;
  color: #9eccc3;
}
.verification {
  margin: 19px 0;
}
.verification p:not(.eyebrow) {
  font-size: 10px;
  line-height: 1.7;
  color: #b4d6c4;
}
.verification small {
  font-size: 9px;
  color: #829faa;
  line-height: 1.6;
  display: block;
}
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.comparison-panel > p {
  font-size: 12px;
  color: #a2bdc5;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
th,
td {
  padding: 15px 12px;
  text-align: left;
  border-bottom: 1px solid #304752;
}
th {
  color: #8faeb9;
  font-size: 9px;
  font-weight: 500;
}
td {
  color: #bcd3d6;
}
td:first-child {
  color: #ddede3;
}
.library-filters {
  display: flex;
  gap: 12px;
  align-items: end;
  margin: 24px 0;
}
.library-filters input,
.library-filters select {
  display: block;
  width: 100%;
  margin-top: 7px;
  height: 36px;
}
.search-label {
  flex: 1;
}
.library-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
}
.catalog-card {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  margin: 0 0 7px;
  background: #1c313a;
  border-color: #334e59;
}
.catalog-card strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.catalog-card small {
  display: block;
  color: #8fabba;
  font-size: 9px;
  margin-top: 6px;
}
.catalog-card span {
  font: 9px monospace;
  color: #a5d0c1;
  flex-shrink: 0;
}
.catalog-detail {
  background: #11232b;
  border: 1px solid #334b57;
  border-radius: 6px;
  padding: 20px;
  align-self: start;
  position: sticky;
  top: 18px;
}
.catalog-detail pre {
  font:
    11px/1.8 ui-monospace,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 560px;
  overflow: auto;
  color: #a2bcc5;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 10px;
  color: #93b0ba;
}
#catalog-summary {
  font-size: 12px;
  line-height: 1.7;
  color: #a9c0c8;
}
#collection-list p {
  font: 10px/1.7 monospace;
  overflow-wrap: anywhere;
  border-bottom: 1px solid #304650;
  padding: 9px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  margin-top: 23px;
  font-size: 10px;
  line-height: 1.8;
  color: #819fac;
}
footer b {
  font-size: 11px;
  color: #b2ced3;
  font-weight: 450;
}
#error {
  background: #3a2826;
  color: #efb7a5;
  border: 1px solid #925e53;
  padding: 15px;
  border-radius: 4px;
  font-size: 12px;
}
dialog {
  width: min(1000px, 94vw);
  padding: 22px;
  border: 1px solid #4b6871;
  border-radius: 8px;
  background: #16262e;
  color: #d4e4e5;
}
dialog::backdrop {
  background: #07131bcc;
}
#route-canvas {
  width: 100%;
  height: 470px;
  display: block;
  margin: 14px 0;
  touch-action: none;
}
#route-status {
  font-size: 11px;
  color: #b7d4c4;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
[hidden] {
  display: none !important;
}
#scale-results {
  margin-top: 25px;
}
#scale-results h3 {
  color: #b0d8ce;
}
#scale-results .scale-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  margin: 12px 0;
  font-size: 11px;
}
#scale-results .scale-bars {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
#scale-results .scale-bar {
  padding: 8px 10px;
  border-left: 3px solid #91c8b7;
  background: #253d46;
  font: 10px monospace;
}
@media (min-width: 1700px) {
  #visualization {
    height: 465px;
  }
}
@media (max-width: 1200px) {
  .workspace {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  .inspector {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
  }
  .inspector .panel-heading,
  .inspector #contract {
    grid-column: 1;
  }
  .inspector #pseudocode {
    grid-column: 1;
    margin: 0;
  }
  .inspector .state-box {
    grid-column: 2;
    grid-row: 1/4;
  }
  .inspector .verification {
    grid-column: 1;
  }
  .inspector > .wide {
    align-self: center;
  }
  .metrics strong {
    font-size: 20px;
  }
  .library-layout {
    grid-template-columns: 1fr 1fr;
  }
  header nav {
    gap: 16px;
  }
}
@media (max-width: 760px) {
  header {
    padding: 0 16px;
    height: 57px;
  }
  header > span {
    display: none;
  }
  header nav a {
    display: none;
  }
  header nav a:last-child {
    display: block;
  }
  main {
    padding: 24px 14px;
  }
  .intro {
    align-items: start;
    gap: 12px;
  }
  h1 {
    font-size: 29px;
  }
  .intro > div > p:not(.eyebrow) {
    font-size: 11px;
    max-width: 235px;
    line-height: 1.7;
  }
  .live {
    font-size: 9px;
    max-width: 94px;
    margin-top: 3px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .tabs {
    gap: 16px;
  }
  .tabs button {
    font-size: 10px;
  }
  .tabs span {
    display: none;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  aside:first-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
  }
  aside:first-child > .eyebrow,
  #families,
  aside:first-child > details,
  aside:first-child > .subtle {
    grid-column: 1/-1;
  }
  #families {
    flex-direction: row;
    flex-wrap: wrap;
    margin: 0;
    gap: 3px;
  }
  #families button {
    font-size: 10px;
    padding: 7px 9px;
  }
  #families button span {
    display: none;
  }
  .field {
    margin: 0;
  }
  .generator {
    align-self: end;
  }
  #generate {
    align-self: end;
    margin: 0;
  }
  .input-actions {
    margin: 0;
  }
  .subtle {
    margin: 3px 0;
  }
  #visualization {
    height: 330px;
  }
  .stage-heading {
    padding: 17px;
    height: 78px;
  }
  h2 {
    font-size: 20px;
  }
  .transport {
    gap: 5px;
    padding: 12px 12px 4px;
  }
  .transport label {
    margin-left: 0;
  }
  .metrics {
    padding: 15px 12px;
  }
  .metrics span {
    font-size: 8px;
  }
  .metrics strong {
    font-size: 18px;
  }
  .inspector {
    display: block;
  }
  .inspector #pseudocode {
    margin: 15px 0;
  }
  .inspector .state-box {
    margin-top: 15px;
  }
  .panel-heading {
    align-items: start;
    flex-wrap: wrap;
  }
  .library-filters {
    flex-wrap: wrap;
  }
  .library-filters .search-label {
    flex-basis: 100%;
  }
  .library-filters > label {
    flex: 1;
  }
  .library-layout {
    grid-template-columns: 1fr;
  }
  .catalog-detail {
    position: static;
  }
  .catalog-card strong {
    font-size: 10px;
  }
  .catalog-card span {
    font-size: 8px;
  }
  .catalog-detail pre {
    font-size: 10px;
  }
  .panel {
    padding: 16px;
  }
  .pagination {
    font-size: 9px;
  }
  .pagination button {
    font-size: 10px;
    padding: 8px;
  }
  footer {
    flex-direction: column;
    gap: 10px;
  }
  footer .actions button,
  footer .button {
    font-size: 10px;
  }
  #route-canvas {
    height: 340px;
  }
  dialog {
    padding: 15px;
  }
  #paint-tools {
    gap: 6px;
  }
  #paint-tools button {
    font-size: 9px;
  }
}
