@font-face {
  font-family: Work Sans;
  src: local("Work Sans");
  font-display: swap;
}
:root {
  --ink: #192e29;
  --green: #1d5142;
  --paper: #f6f8f4;
  --muted: #52665e;
  --edge: #cfd9d0;
  --lime: #cbf48e;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-family: "Work Sans", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
select {
  font: inherit;
  color: inherit;
}
button,
a,
select {
  touch-action: manipulation;
}
button,
select {
  cursor: pointer;
}
button {
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 3px solid #177793;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.38;
  cursor: default;
}
.wrap {
  width: min(1300px, 92%);
  margin-inline: auto;
}
.site-head {
  background: #fff;
  border-bottom: 1px solid var(--edge);
}
.nav,
.nav nav,
.brand,
.intro,
.panel-title,
.panel-title h2,
.controls,
.sample,
.section-head,
.dialog-head,
footer .wrap {
  display: flex;
  align-items: center;
}
.nav,
.panel-title,
.intro,
.section-head,
.dialog-head,
footer .wrap {
  justify-content: space-between;
}
.nav {
  height: 68px;
}
.brand {
  font-size: 23px;
  letter-spacing: -1.2px;
  font-weight: 730;
  gap: 8px;
}
.brand b {
  font-weight: 400;
  color: #52695c;
  margin-left: -3px;
}
.nav nav {
  gap: 26px;
  font-size: 14px;
  font-weight: 600;
}
.nav nav a:hover,
.crumb a:hover,
footer a:hover {
  text-decoration: underline;
}
.guide-link,
.outline {
  border: 1px solid var(--edge);
  background: #fff;
  border-radius: 7px;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.guide-link span {
  font-size: 19px;
}
.outline:hover,
.guide-link:hover,
.step-controls button:hover:not(:disabled),
.close:hover {
  background: #eef4ec;
}
.crumb {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin: 23px 0;
}
.crumb span {
  color: #86978d;
}
.intro {
  margin: 0 0 24px;
  align-items: flex-end;
  gap: 16px;
}
.kicker,
.board-label,
.readout > span,
.count,
.state-pill,
.sample label,
.speed,
.tag {
  font: 600 12px var(--mono);
}
.kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  letter-spacing: 1.5px;
  color: #3f6555;
  margin: 0 0 7px;
}
.kicker i,
.board-label i {
  display: inline-block;
  width: 16px;
  height: 6px;
  background: repeating-linear-gradient(
    115deg,
    #58805e 0 3px,
    transparent 3px 5px
  );
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(44px, 4.65vw, 69px);
  line-height: 1.05;
  letter-spacing: -0.066em;
  font-weight: 710;
}
h1 span {
  color: #598663;
}
.intro p:last-child,
.library-lead {
  font-size: 17px;
  line-height: 1.45;
  color: var(--muted);
  margin-top: 10px;
}
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 2.18fr) minmax(279px, 0.96fr);
  gap: 19px;
  align-items: start;
}
.machine,
.sequence {
  border: 1px solid var(--edge);
  border-radius: 13px;
  background: white;
  overflow: hidden;
  box-shadow: 0 3px 9px #243d3010;
}
.panel-title {
  min-height: 56px;
  padding: 10px 19px;
  border-bottom: 1px solid var(--edge);
}
.panel-title h2 {
  font-size: 20px;
  letter-spacing: -0.65px;
  gap: 10px;
}
.square-icon {
  display: grid;
  place-items: center;
  background: #edf3e9;
  border: 1px solid #d7e3d2;
  border-radius: 7px;
  width: 33px;
  height: 33px;
  color: #345d47;
}
.icon {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}
.state-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 50px;
  background: #eef4ea;
  color: #446448;
  padding: 5px 9px;
}
.state-pill:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #648b46;
}
.board {
  background-color: #132f2c;
  background-image:
    radial-gradient(#55746b70 0.8px, transparent 0.9px),
    linear-gradient(120deg, #1c3d34, #102c2b 80%);
  background-size:
    14px 14px,
    100% 100%;
  color: #e4eee8;
  padding: 15px 14px 13px;
  position: relative;
  isolation: isolate;
}
.board-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 6px;
  color: #b0c7ba;
  font-size: 10.5px;
  letter-spacing: 1.45px;
}
.board-label span:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
}
.board-label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b4e981;
}
.board-label b {
  font-weight: 500;
  color: #d6e6de;
}
.board svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.readout {
  background: #0d241fd9;
  border: 1px solid #486257;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 12px;
  min-height: 40px;
}
.readout > span {
  color: #b0c4b6;
  font-size: 10px;
  letter-spacing: 1.1px;
}
.readout strong {
  font: 600 15px var(--mono);
  color: #d9f3b2;
}
.readout .scope {
  margin-left: auto;
  letter-spacing: 0;
  color: #8dbf88;
}
.controls {
  min-height: 65px;
  gap: 12px;
  padding: 10px 17px;
}
.primary {
  background: #234f3c;
  color: #fff;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 41px;
  padding: 0 17px;
  font-size: 14px;
  font-weight: 650;
}
.primary:hover {
  background: #32664c;
}
.step-controls {
  display: flex;
  gap: 4px;
}
.step-controls button,
.close {
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: transparent;
  min-width: 38px;
  min-height: 38px;
}
.speed {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: #53655c;
}
.speed select,
.sample select {
  background: #fff;
  border: 1px solid var(--edge);
  border-radius: 5px;
  padding: 6px 5px;
  color: var(--ink);
  font: 600 13px var(--mono);
}
.sample {
  gap: 9px;
  padding: 9px 17px;
  background: #f6f8f4;
  border-top: 1px solid #e2e8e0;
}
.sample span {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}
.sample label {
  color: var(--muted);
}
.sequence .panel-title {
  min-height: 56px;
}
.count {
  color: var(--muted);
  letter-spacing: 0.05em;
}
.sequence ol {
  list-style: none;
  margin: 0;
  padding: 8px 10px 9px;
}
.step {
  background: transparent;
  display: flex;
  text-align: left;
  align-items: flex-start;
  width: 100%;
  gap: 11px;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  position: relative;
}
.sequence li + li {
  margin-top: 1px;
}
.step:hover {
  background: #f5f8f2;
}
.step[aria-current="step"] {
  background: #eaf3e1;
  border-color: #c0d5ad;
}
.step-number {
  font: 600 12px var(--mono);
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f4f6f1;
  border: 1px solid #d6ded2;
  color: #556b58;
  z-index: 1;
}
.step[aria-current="step"] .step-number {
  color: #fff;
  background: #305638;
  border-color: #305638;
}
.step-body {
  padding-top: 2px;
  display: block;
}
.step strong {
  font-size: 15px;
  font-weight: 650;
}
.step small {
  display: block;
  font-size: 14px;
  line-height: 1.48;
  margin: 6px 0 1px;
  color: #344e3d;
}
.step .step-detail {
  display: none;
}
.step[aria-current="step"] .step-detail {
  display: block;
}
.tag {
  display: inline-block;
  margin-top: 7px;
  font-size: 11px;
  color: #355742;
  border-bottom: 1px solid #a4b99a;
  padding-bottom: 2px;
}
.buses {
  margin-top: 32px;
}
.section-head {
  margin-bottom: 15px;
  align-items: flex-end;
}
.section-head h2,
.library h2 {
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -1.4px;
}
.section-head > p,
.model-note {
  font-size: 14px;
  color: var(--muted);
}
.section-head .kicker {
  font-size: 10.5px;
}
.bus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}
.bus-card {
  background: #fff;
  border: 1px solid var(--edge);
  border-radius: 9px;
  text-align: left;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px;
}
.bus-card:hover {
  border-color: #70927c;
  background: #fbfdf9;
}
.bus-icon {
  font: 700 24px var(--mono);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--tint);
  color: var(--tone);
}
.bus-card b,
.bus-card small {
  display: block;
}
.bus-card b {
  font-size: 16px;
}
.bus-card small {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}
.bus-card .trace {
  color: #728174;
}
.model-note {
  margin: 20px 0 34px;
  line-height: 1.55;
  max-width: 850px;
}
footer {
  border-top: 1px solid var(--edge);
  font-size: 13px;
  color: #4d6156;
}
footer .wrap {
  padding: 18px 0;
}
dialog {
  border: 1px solid #becdbf;
  border-radius: 14px;
  width: min(490px, calc(100% - 28px));
  max-height: 85dvh;
  color: var(--ink);
  padding: 20px 24px 26px;
  box-shadow: 0 20px 85px #071d2440;
}
dialog::backdrop {
  background: #0c2422a6;
}
dialog .kicker {
  margin: 0;
}
dialog h2 {
  font-size: 30px;
  letter-spacing: -1.2px;
  margin: 14px 0;
}
dialog p,
dialog dd {
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}
dialog dt {
  font-weight: 650;
  margin-top: 13px;
}
dialog dd {
  margin: 3px 0;
}
dialog .close {
  font-size: 24px;
}
.answer {
  display: block;
  width: 100%;
  text-align: left;
  background: #f3f6ef;
  border: 1px solid var(--edge);
  border-radius: 7px;
  padding: 11px 13px;
  margin: 9px 0;
}
.answer:hover {
  border-color: #58775c;
}
.answer.picked {
  border: 2px solid #517a55;
}
.feedback {
  margin: 12px 0;
}
.library {
  padding-block: 65px;
}
.library section {
  margin-top: 52px;
}
.topic {
  margin-top: 20px;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  max-width: 780px;
  background: #fff;
  border: 1px solid var(--edge);
  align-items: center;
}
.topic-art {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  background-color: #153c32;
  background-image: radial-gradient(#628272 1px, transparent 1px);
  background-size: 12px 12px;
}
.topic-art b {
  border-radius: 5px;
  border: 1px solid #b7df8f;
  padding: 13px;
  color: #ddf4bd;
  font: 600 17px var(--mono);
  background: #244838;
}
.topic-art i {
  width: 20px;
  border-top: 3px solid #a7d785;
}
.topic > div:last-child {
  padding: 25px;
}
.topic h3 {
  font-size: 26px;
  letter-spacing: -1px;
}
.topic p {
  margin: 8px 0 15px;
  color: var(--muted);
}
.topic strong {
  color: var(--green);
}
.topic:hover {
  border-color: #6b8c69;
}
@media (min-width: 1550px) {
  .intro {
    margin-bottom: 30px;
  }
  .crumb {
    margin-block: 30px;
  }
}
@media (max-width: 1000px) {
  .wrap {
    width: 94%;
  }
  .workbench {
    grid-template-columns: minmax(0, 1.9fr) minmax(245px, 0.93fr);
    gap: 12px;
  }
  .panel-title {
    padding-inline: 13px;
  }
  .board {
    padding-inline: 8px;
  }
  .step {
    padding: 8px;
  }
  .bus-card {
    gap: 9px;
    padding: 12px;
  }
  .sample span {
    max-width: 170px;
  }
  .sequence .step small {
    font-size: 13px;
  }
}
@media (max-width: 785px) {
  .workbench {
    grid-template-columns: 1fr;
  }
  .wrap {
    width: 92%;
  }
  .intro {
    align-items: start;
  }
  .section-head {
    display: block;
  }
  .section-head > p {
    margin-top: 8px;
  }
  .bus-grid {
    gap: 8px;
  }
  .bus-card {
    grid-template-columns: 1fr;
  }
  .bus-card .trace {
    display: none;
  }
  .sequence .step {
    min-height: 45px;
  }
  .sequence .step small {
    font-size: 15px;
  }
  .sample span {
    max-width: none;
  }
  .sequence ol {
    padding-block: 7px;
  }
  .library {
    padding-block: 40px;
  }
}
@media (max-width: 540px) {
  .nav {
    height: 59px;
  }
  .brand {
    font-size: 20px;
  }
  .brand img {
    width: 28px;
    height: 28px;
  }
  .nav nav {
    gap: 12px;
    font-size: 13px;
  }
  .guide-link {
    padding: 6px 8px;
    font-size: 13px;
  }
  .guide-link span {
    display: none;
  }
  .crumb {
    margin-block: 17px;
    font-size: 12px;
  }
  .intro {
    display: block;
    margin-bottom: 17px;
  }
  .intro p:last-child {
    font-size: 16px;
  }
  .intro .outline {
    margin-top: 13px;
  }
  .kicker {
    font-size: 10.5px;
  }
  .panel-title {
    min-height: 48px;
  }
  .panel-title h2 {
    font-size: 18px;
  }
  .controls {
    gap: 5px;
    padding-inline: 9px;
  }
  .step-controls {
    gap: 0;
  }
  .step-controls button {
    min-width: 36px;
  }
  .primary {
    padding-inline: 12px;
  }
  .speed span {
    display: none;
  }
  .sample {
    padding-inline: 10px;
    flex-wrap: wrap;
  }
  .sample span {
    font-size: 11px;
  }
  .bus-grid {
    grid-template-columns: 1fr;
  }
  .bus-card {
    grid-template-columns: 42px 1fr auto;
  }
  .bus-card .trace {
    display: block;
  }
  .board-label {
    font-size: 10px;
  }
  .topic {
    display: block;
  }
  .topic-art {
    min-height: 140px;
  }
  .board {
    padding-top: 11px;
  }
  .readout {
    gap: 8px;
  }
  .readout strong {
    font-size: 14px;
  }
  .section-head h2 {
    font-size: 27px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a {
    transition:
      background-color 0.16s,
      border-color 0.16s;
  }
  .primary:active,
  .bus-card:active {
    transform: translateY(1px);
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.primary[hidden] {
  display: none;
}
.quiz-count {
  margin-top: 12px;
}
.compact-caption {
  display: none;
}
.answer:disabled {
  opacity: 0.8;
}
.answer.picked:disabled {
  opacity: 1;
}
@media (max-width: 785px) {
  .compact-caption {
    display: block;
    padding: 12px 14px;
    background: #edf4e7;
    border-top: 1px solid #d4dfcb;
  }
  .compact-caption strong {
    font-size: 15px;
  }
  .compact-caption p {
    line-height: 1.45;
    font-size: 14px;
    margin-top: 4px;
  }
}
@media (min-width: 786px) and (max-width: 1040px) {
  .workbench {
    grid-template-columns: 1fr;
  }
  .sequence ol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .step {
    min-height: 44px;
  }
}
@media (min-width: 541px) and (max-width: 620px) {
  .board #circuit {
    max-width: 420px;
    margin-inline: auto;
  }
}
