:root {
  color-scheme: light;
  --ink: #1f302b;
  --muted: #64736b;
  --paper: #f7f6f1;
  --line: #dedfd5;
  --green: #315845;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 3px solid #7ca152;
  outline-offset: 3px;
}
header,
main,
footer {
  max-width: 1420px;
  margin: auto;
}
header {
  height: 85px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  font-size: 32px;
  line-height: 1;
}
.brand .slash {
  color: #a7afa5;
  margin: 0 4px;
}
.brand > span:last-child {
  color: var(--muted);
  font-size: 10px;
}
main {
  padding: 0 40px;
}
.hero {
  padding: 50px 0 40px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.16em;
  font-weight: 650;
  margin: 0 0 16px;
  color: var(--muted);
}
h1 {
  font-size: 58px;
  line-height: 1.04;
  letter-spacing: -0.065em;
  font-weight: 520;
  margin: 0 0 20px;
}
h1 em {
  font-style: normal;
  color: #678064;
}
.intro {
  line-height: 1.7;
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.hero-aside {
  text-align: right;
  padding-bottom: 4px;
}
.tag {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  background: #e8ecdf;
  padding: 8px 12px;
  border-radius: 5px;
}
.hero-aside p {
  color: var(--muted);
  line-height: 1.9;
  font-size: 12px;
  margin: 20px 0;
}
.local {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.local i {
  width: 6px;
  height: 6px;
  border-radius: 100%;
  background: #668958;
}
.workspace {
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  grid-template-columns: 304px 1fr;
  overflow: hidden;
  background: #fff;
}
.controls {
  padding: 26px 23px;
  border-right: 1px solid var(--line);
  background: #fcfcf8;
}
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 650;
  margin-bottom: 16px;
}
.section-label > span {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  color: #809080;
}
.section-label small {
  margin-left: auto;
  font-weight: 400;
  color: var(--muted);
}
.joint-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 28px;
}
.joint-picker button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  padding: 11px 9px;
  font-size: 11px;
  color: var(--ink);
}
.joint-picker button > span {
  font-size: 17px;
  width: 17px;
  line-height: 1;
}
.joint-picker button[aria-pressed='true'] {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 10px;
}
.field-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
}
.field-grid input:not([type='range']) {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  padding: 9px;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
.wide {
  grid-column: 1/-1;
}
.rule {
  border-top: 1px solid var(--line);
  margin: 20px 0;
}
.field-grid .wide {
  position: relative;
  gap: 12px;
}
output {
  position: absolute;
  right: 0;
  top: 0;
  font-family: ui-monospace, monospace;
  color: var(--ink);
}
input[type='range'] {
  width: 100%;
  accent-color: var(--green);
  cursor: pointer;
  margin: 0;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #919a90;
}
.check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
}
.check input {
  accent-color: var(--green);
}
details {
  border-top: 1px solid var(--line);
  margin-top: 23px;
  padding-top: 14px;
}
summary {
  cursor: pointer;
  font-size: 11px;
  color: var(--muted);
}
details .field-grid {
  margin-top: 16px;
  margin-bottom: 12px;
}
.download-row {
  display: flex;
  gap: 7px;
  margin-top: 25px;
}
button.primary {
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 12px;
  font-size: 11px;
  flex: 1;
  display: flex;
  justify-content: space-between;
}
.secondary {
  border: 1px solid var(--line);
  background: white;
  font-size: 10px;
  border-radius: 6px;
}
.text-button {
  border: none;
  background: transparent;
  font-size: 11px;
  color: var(--green);
  margin: 14px 0 2px;
  padding: 0;
}
.small-note {
  font-size: 10px;
  line-height: 1.65;
  color: #849082;
  margin: 10px 0 0;
}
.preview-panel {
  min-width: 0;
}
.preview-header {
  padding: 25px 27px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.preview-header .eyebrow {
  font-size: 9px;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}
h2 {
  font-weight: 550;
  letter-spacing: -0.035em;
  margin: 0;
  font-size: 21px;
}
.status {
  padding: 5px 9px;
  background: #edf2e8;
  color: #52724b;
  font-size: 9px;
  border-radius: 4px;
  white-space: nowrap;
}
.status.error {
  background: #fce9dc;
  color: #874325;
}
.view-tabs {
  display: flex;
  align-items: center;
  padding: 0 27px;
  border-bottom: 1px solid var(--line);
  gap: 22px;
}
.view-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 0;
  font-size: 11px;
  border-bottom: 2px solid transparent;
}
.view-tabs button[aria-pressed='true'] {
  border-bottom-color: var(--ink);
  color: var(--ink);
}
.view-tabs button:disabled {
  opacity: 0.35;
  cursor: default;
}
.view-tabs .check {
  margin-left: auto;
}
.stage {
  height: 420px;
  position: relative;
  overflow: hidden;
  background: #f3f1e9;
  background-image: radial-gradient(#cbd0c3 0.6px, transparent 0.6px);
  background-size: 17px 17px;
}
#three-view,
#sheet-view {
  width: 100%;
  height: 100%;
}
#three-view canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
#sheet-view {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
[hidden] {
  display: none !important;
}
#sheet-view > svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.stage-caption {
  position: absolute;
  bottom: 15px;
  width: 100%;
  text-align: center;
  pointer-events: none;
  font-size: 9px;
  letter-spacing: 0.05em;
  color: #8e9588;
}
#stage-error {
  position: absolute;
  inset: 20px;
  background: #fff4e9ee;
  border: 1px solid #d9b5a1;
  border-radius: 8px;
  padding: 30px;
  display: grid;
  place-content: center;
  color: #873f27;
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.assembly-bar {
  padding: 15px 27px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
.assembly-bar button {
  border: 0;
  background: #e8edde;
  padding: 8px 11px;
  border-radius: 4px;
  font-size: 10px;
  color: var(--ink);
  white-space: nowrap;
}
.assembly-bar input {
  max-width: 200px;
}
.assembly-bar label {
  margin-left: auto;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 22px 27px;
  gap: 12px;
}
.metric span {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 7px;
}
.metric strong {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.metric small {
  font-weight: 400;
  font-size: 10px;
  color: var(--muted);
}
#issues {
  padding: 0 27px;
  color: #766549;
  font-size: 10px;
  line-height: 1.7;
}
#issues p {
  margin: 0 0 5px;
}
.preview-foot {
  font-size: 9px;
  color: #899282;
  line-height: 1.6;
  margin: 13px 27px 21px;
}
.developer {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 65px;
  margin: 64px 0 45px;
}
.developer h2 {
  font-size: 32px;
  line-height: 1.15;
}
.developer p:not(.eyebrow) {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 290px;
}
.code-card {
  border-radius: 10px;
  overflow: hidden;
  background: #20352b;
  color: #dce7d1;
}
.code-card > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #3c4d41;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  color: #a6bb9d;
}
.code-card button {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 10px;
}
.code-card pre {
  font-size: 11px;
  line-height: 1.7;
  overflow: auto;
  padding: 6px 20px 16px;
  max-height: 355px;
}
.code-card > span {
  font-size: 10px;
  display: block;
  padding: 0 20px 10px;
}
.notes {
  border-top: 1px solid var(--line);
  padding: 28px 0 42px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 45px;
}
.notes article > span {
  font:
    9px ui-monospace,
    monospace;
  color: var(--muted);
}
.notes h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 12px 0;
}
.notes p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  margin: 0;
}
footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 25px 40px;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (max-width: 900px) {
  main {
    padding: 0 22px;
  }
  header,
  footer {
    padding-left: 22px;
    padding-right: 22px;
  }
  .workspace {
    grid-template-columns: 260px 1fr;
  }
  .controls {
    padding: 22px 18px;
  }
  .preview-header {
    padding: 22px 18px;
  }
  .stage {
    height: 380px;
  }
  .view-tabs {
    padding: 0 18px;
  }
  .assembly-bar {
    padding: 12px 18px;
    gap: 7px;
  }
  .assembly-bar label {
    display: none;
  }
  .metrics {
    padding: 20px 18px;
  }
  .hero {
    padding-top: 35px;
  }
  h1 {
    font-size: 48px;
  }
  .tag {
    font-size: 9px;
  }
  .developer {
    gap: 30px;
  }
}
@media (max-width: 640px) {
  header {
    height: 65px;
    font-size: 9px;
  }
  .brand {
    gap: 7px;
  }
  .brand > span:last-child,
  .brand .slash {
    display: none;
  }
  .hero {
    padding: 30px 0;
  }
  .hero-aside {
    display: none;
  }
  h1 {
    font-size: 46px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
  }
  .controls {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .joint-picker {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 20px;
  }
  .field-grid {
    gap: 14px;
  }
  .stage {
    height: 330px;
  }
  .preview-header h2 {
    font-size: 18px;
  }
  .developer {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 40px;
  }
  .notes {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .metrics .metric strong {
    font-size: 16px;
  }
  .view-tabs {
    gap: 16px;
  }
  footer {
    gap: 25px;
    line-height: 1.7;
  }
  .assembly-bar input {
    min-width: 60px;
  }
}
