/* SpaceLab visual system — warm paper, deep green, quiet gold.
 * Component styles are followed by responsive layouts, print, and reduced motion.
 */

:root {
  --ink: #213f34;
  --muted: #617266;
  --teal: #244f3f;
  --green: #326b51;
  --bg: #f3f4ec;
  --paper: #fffef9;
  --line: #dce2d5;
  --yellow: #ecd58f;
  --soft: #eaf0e2;
  --danger: #a04d32;
  font-family: Inter,"Segoe UI","Microsoft JhengHei",sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  font-size: 15px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #bcc8b9 transparent;
}
body {
  margin: 0;
  min-width: 0;
}
button,input,textarea,select {
  font: inherit;
}
button,a,input,select,textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 10px 15px;
  border-radius: 10px;
  transition: background .18s, border-color .18s, box-shadow .18s, transform .18s;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  min-height: 40px;
  box-shadow: 0 1px 1px #223e2d04;
}
button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
button:focus-visible,a:focus-visible {
  outline: 3px solid #c3a442;
  outline-offset: 3px;
}
a {
  color: var(--green);
}
button:hover {
  background: #edf3e5;
  border-color: #adc1a5;
}
button.primary {
  background: var(--teal);
  color: #fffef8;
  border-color: var(--teal);
  box-shadow: 0 3px 8px #244f3f14;
}
button.primary:hover {
  background: #1b4233;
  border-color: #1b4233;
}
button.yellow {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #3a482d;
}
button.danger {
  color: var(--danger);
}
button.small {
  font-size: 13px;
  padding: 8px 12px;
  min-height: 36px;
}
button.icon {
  padding: 8px 11px;
  min-width: 38px;
  font-size: 18px;
}
input,textarea,select {
  width: 100%;
  border: 1px solid #cbd6c5;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffefb;
  color: var(--ink);
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
}
textarea {
  resize: vertical;
  min-height: 80px;
}
input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  line-height: 1.5;
  color: #526a59;
}
h1,h2,h3,p {
  margin: 0;
}
h1 {
  font-size: 34px;
  letter-spacing: -.8px;
  line-height: 1.3;
  font-weight: 700;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 23px;
  letter-spacing: -.4px;
  line-height: 1.4;
}
h3 {
  font-size: 17px;
  line-height: 1.45;
}
p {
  line-height: 1.8;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  color: #607754;
  font-weight: 700;
  line-height: 1.6;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 6px;
  background: #eaf1e1;
  color: #49623e;
  white-space: nowrap;
  line-height: 1.4;
  font-weight: 500;
}
.tag.yellow {
  background: #f6ebc5;
  color: #705820;
}
.tag.warn {
  background: #f8e7dc;
  color: #914b30;
}
.tag.blue {
  background: #e7eff1;
  color: #426674;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #71976e;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.5px;
  white-space: nowrap;
}
.brand img {
  width: 40px;
  height: 40px;
}
.brand small {
  display: block;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1.6px;
  margin-top: 3px;
  color: #63775e;
}
.topbar {
  height: 80px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 14px #253c2203;
}
.nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav button {
  border: none;
  background: transparent;
  font-size: 14px;
  color: #5e735f;
  padding: 10px 13px;
  white-space: nowrap;
  border-radius: 9px;
  box-shadow: none;
}
.nav button.active {
  background: #e6efdf;
  color: #254e37;
  font-weight: 650;
  box-shadow: inset 0 -2px #78985f;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.top-actions select {
  width: 108px;
  padding: 8px;
  font-size: 13px;
  background: transparent;
  min-height: 38px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eadcb6;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #584f2e;
  font-weight: 650;
}
.shell {
  max-width: 1536px;
  margin: auto;
}
.content {
  padding: 34px 48px 40px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin: 10px 0 28px;
}
.page-head p {
  font-size: 14px;
  margin-top: 10px;
  color: var(--muted);
}
.breadcrumb {
  font-size: 11px;
  letter-spacing: 1.1px;
  color: #66765d;
  margin-bottom: 23px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.22fr);
  min-height: 400px;
  align-items: center;
  gap: 30px;
  background: linear-gradient(115deg, #fffef9 0%, #fffef9 58%, #f5f7eb 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  padding: 44px 28px 40px 42px;
  position: relative;
  box-shadow: 0 8px 28px #304b2a05;
}
.hero h1 {
  font-size: 44px;
  line-height: 1.38;
  letter-spacing: -1.5px;
  margin: 18px 0 20px;
  color: #204b37;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(transparent 70%, #ecd58f 70%);
  padding-bottom: 1px;
}
.hero p {
  font-size: 16px;
  color: #5f725e;
  max-width: 420px;
  margin-bottom: 25px;
  line-height: 1.9;
}
.hero-preview {
  position: relative;
  background: radial-gradient(ellipse, #edf2dd 0, transparent 72%);
  padding: 10px 0;
}
.hero-preview svg {
  width: 100%;
  display: block;
  max-height: 390px;
  overflow: visible;
}
.hero-float {
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  padding: 12px 15px;
  background: #fffef9;
  border: 1px solid #e0e5d6;
  box-shadow: 0 7px 26px #2b492416;
  border-radius: 10px;
  font-size: 12px;
}
.hero-float svg {
  width: 30px;
  height: 30px;
}
.hero-float.a {
  left: 4%;
  bottom: 1%;
}
.hero-float.b {
  right: 1%;
  top: 1%;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 18px;
  margin: 24px 0 36px;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 23px;
  display: flex;
  align-items: center;
  gap: 17px;
  min-width: 0;
}
.stat-symbol {
  height: 46px;
  width: 46px;
  display: grid;
  place-items: center;
  background: #eaf0df;
  border-radius: 12px;
  color: #65804d;
  font-size: 25px;
  flex-shrink: 0;
}
.stat small {
  color: #64775b;
  font-size: 12px;
  font-weight: 500;
}
.stat strong {
  font-size: 28px;
  font-weight: 650;
  display: block;
  margin: 5px 0;
  line-height: 1.35;
  letter-spacing: -.5px;
}
.stat .description {
  font-size: 12px;
  color: #697b60;
  line-height: 1.7;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
}
.section-title h2 {
  font-size: 21px;
}
.section-title p {
  font-size: 14px;
  color: #68795e;
  margin-top: 7px;
}
.demo-grid {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: 16px;
}
.demo-card {
  padding: 0;
  text-align: start;
  overflow: hidden;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.demo-card.active {
  border: 1px solid #668750;
  box-shadow: inset 0 0 0 1px #668750;
}
.mini-scene {
  background: linear-gradient(150deg, #edf2e2, #e6ecd9);
  height: 134px;
  position: relative;
  overflow: hidden;
  padding: 9px;
}
.mini-scene svg {
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: rotate(-2deg);
}
.demo-card .card-copy {
  padding: 16px;
}
.card-copy strong {
  font-size: 15px;
  font-weight: 650;
}
.card-copy p {
  font-size: 12px;
  color: #697b60;
  line-height: 1.75;
  margin-top: 7px;
}
.footer {
  margin: 30px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: #6a7b62;
  font-size: 11px;
  gap: 15px;
  line-height: 1.8;
  align-items: center;
}
.footer a {
  color: #527044;
  text-decoration: none;
}
.editor-head {
  padding: 24px 28px 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.editor-head h1 {
  font-size: 24px;
  line-height: 1.45;
}
.editor-head p {
  font-size: 12px;
  color: #677b5c;
  margin-top: 7px;
}
.editor-layout {
  display: grid;
  grid-template-columns: 208px minmax(260px,1fr) 288px;
  min-height: 680px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.palette {
  background: #fafbf3;
  padding: 18px 14px;
  border-right: 1px solid #dce4d3;
}
.palette .eyebrow {
  margin: 4px 3px 14px;
  letter-spacing: 1px;
}
.palette-search {
  font-size: 13px;
  padding: 9px 10px;
  margin-bottom: 14px;
}
.palette-group {
  font-size: 11px;
  margin: 18px 4px 9px;
  color: #687c5c;
  letter-spacing: 1px;
}
.palette-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.palette-item {
  padding: 11px 5px 9px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  background: var(--paper);
  height: 85px;
  line-height: 1.45;
  border-radius: 10px;
  box-shadow: 0 2px 4px #213e2b03;
}
.palette-item svg {
  width: 37px;
  height: 37px;
  flex-shrink: 0;
}
.workspace {
  background: #edf2e4;
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.canvas-toolbar {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  gap: 9px;
  border-bottom: 1px solid #dce4d2;
  background: #f8faf1;
  flex-wrap: wrap;
}
.segmented {
  display: flex;
  padding: 3px;
  border: 1px solid #d9e3ce;
  border-radius: 9px;
  background: #e8eedf;
  gap: 2px;
  flex-wrap: wrap;
}
.segmented button {
  border: 0;
  background: transparent;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 6px;
  min-height: 34px;
  color: #57704b;
  box-shadow: none;
}
.segmented button.active {
  background: #fffef9;
  box-shadow: 0 1px 5px #2c4c2c16;
  color: #244f35;
  font-weight: 650;
}
.plan-wrap {
  flex: 1;
  min-height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow: auto;
  position: relative;
  touch-action: pan-y;
  background: radial-gradient(ellipse at 50% 45%, #f6f8ec 0%, #edf2e4 80%);
}
.plan-wrap svg {
  width: 100%;
  max-height: 580px;
  min-width: 300px;
  overflow: visible;
  user-select: none;
  touch-action: none;
}
.asset {
  cursor: grab;
  outline: none;
}
.asset:active {
  cursor: grabbing;
}
.asset:hover {
  filter: drop-shadow(0 0 3px #8fb58a);
}
.asset.selected {
  filter: drop-shadow(0 1px 4px #2f604125);
}
.is-off {
  opacity: .42;
}
.route {
  cursor: pointer;
  pointer-events: stroke;
}
.route:hover {
  stroke-width: 5;
}
.control-flow {
  animation: flow 2s linear infinite;
}
@keyframes flow {
  to {
    stroke-dashoffset: -24;
  }
}
.canvas-status {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  font-size: 11px;
  color: #5f7552;
  border-top: 1px solid #dce4d2;
  background: #f8faf1;
  line-height: 1.6;
}
.legend {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.legend i {
  display: inline-block;
  width: 16px;
  border-top: 2px solid #688d78;
  margin-right: 4px;
  vertical-align: middle;
}
.legend i.gold {
  border-color: #b08c39;
  border-top-style: dashed;
}
.inspector {
  background: #fffef9;
  padding: 20px;
  border-left: 1px solid var(--line);
  overflow-y: auto;
  max-height: 850px;
}
.inspector h3 {
  font-size: 16px;
  margin-bottom: 17px;
}
.inspector .asset-preview {
  height: 92px;
  background: #edf3e3;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
}
.asset-preview svg {
  width: 62px;
  height: 62px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 19px 0;
}
.inspector input,.inspector select {
  font-size: 13px;
  padding: 9px;
}
.inspector .section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #637953;
  margin-bottom: 10px;
}
.hint {
  background: #f7f1de;
  border: 1px solid #ebe6d2;
  border-radius: 9px;
  padding: 13px;
  font-size: 12px;
  line-height: 1.85;
  color: #746137;
  border-color: #e5dbb8;
}
.hint.green {
  background: #edf4e4;
  border-color: #d9e5ca;
  color: #4d6942;
}
.hint.warn {
  background: #faf0e6;
  color: #8b5234;
}
.empty {
  padding: 32px 15px;
  text-align: center;
  color: #62775a;
  line-height: 1.8;
  font-size: 14px;
}
.check-item {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 13px;
  padding: 6px 0;
  flex-direction: row;
}
.list-row {
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.list-row strong {
  font-size: 13px;
}
.list-row p {
  font-size: 12px;
  color: #677a5c;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 25px;
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0,1.5fr) minmax(0,1fr);
  gap: 22px;
}
.three-col {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 20px;
}
.table-wrap {
  overflow: auto;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th {
  text-align: start;
  background: #eaf0df;
  color: #4c6740;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
td,th {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
td input {
  min-width: 68px;
  padding: 7px;
  max-width: 110px;
  font-size: 13px;
}
.num {
  text-align: end;
  font-variant-numeric: tabular-nums;
}
.bom-total {
  background: #244d3b;
  color: #fcfbed;
  border-radius: 15px;
  padding: 25px;
}
.bom-total .muted {
  color: #cad7bc;
}
.bom-total h2 {
  font-size: 34px;
  margin: 12px 0;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px solid #e3e9da;
  gap: 12px;
}
.bom-total .summary-line {
  border-color: #4c6a53;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 20px;
}
.catalog-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  overflow: hidden;
}
.catalog-photo {
  height: 180px;
  background: #eff3e8;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.catalog-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: normal;
  padding: 15px;
  position: absolute;
  inset: 0;
  display: block;
  min-width: 0;
  min-height: 0;
}
.catalog-photo .symbol {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: #fffef9;
  border-radius: 7px;
  padding: 5px;
  box-shadow: 0 2px 10px #38553e14;
  border: 1px solid #e0e7d7;
}
.catalog-photo svg {
  width: 36px;
  height: 36px;
}
.catalog-body {
  padding: 18px;
}
.catalog-body h3 {
  font-size: 17px;
  margin: 10px 0;
}
.catalog-body p {
  font-size: 13px;
  color: #607456;
}
.catalog-body .credit {
  font-size: 11px;
  line-height: 1.7;
  margin: 12px 0;
  overflow-wrap: anywhere;
}
.catalog-body .credit a {
  color: #4e7044;
}
.searchbar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.searchbar input {
  max-width: 320px;
}
.searchbar select {
  max-width: 180px;
}
.chart {
  width: 100%;
  height: 230px;
  overflow: visible;
}
.meter-tree {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.meter-node {
  border: 1px solid var(--line);
  padding: 17px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 15px;
  background: #fcfdf6;
}
.meter-node.child {
  margin-left: 26px;
  border-left: 3px solid #c9ae55;
}
.meter-node svg {
  width: 36px;
  height: 36px;
}
.lesson-art {
  height: 190px;
  background: #edf2e0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.lesson-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
}
.lesson-copy {
  padding: 22px;
}
.lesson-copy p {
  color: #627759;
  font-size: 13px;
  margin: 12px 0;
}
.project-card {
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.project-card h3 {
  overflow-wrap: anywhere;
  margin-bottom: 10px;
}
.project-card p {
  font-size: 13px;
  color: #627658;
  margin-bottom: 16px;
}
.checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checks button {
  text-align: start;
  display: flex;
  gap: 12px;
  font-size: 13px;
  padding: 15px;
  line-height: 1.6;
}
.checks button span {
  color: #987526;
}
.pill-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.active-mode {
  background: #e4efd7!important;
  border-color: #799959!important;
  color: #355427;
}
.toast {
  transform: translateY(0)!important;
  opacity: 1!important;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%,30px);
  background: #294a3c;
  color: #fffdf1;
  padding: 14px 22px;
  border-radius: 10px;
  box-shadow: 0 10px 30px #213d2225;
  z-index: 100;
  opacity: 0;
  transition: .2s;
  pointer-events: none;
  max-width: 90%;
  font-size: 13px;
}
#toast.toast {
  transform: translate(-50%,0)!important;
}
dialog {
  border: 1px solid #d2ddc6;
  border-radius: 18px;
  box-shadow: 0 24px 100px #1a362c30;
  padding: 0;
  max-width: min(780px,94vw);
  width: 700px;
  color: var(--ink);
  background: var(--paper);
  max-height: 90vh;
}
dialog::backdrop {
  background: #213d2e61;
  backdrop-filter: blur(3px);
}
.modal-head {
  padding: 22px 26px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.modal-body {
  padding: 26px;
  overflow: auto;
}
.modal-foot {
  padding: 18px 26px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.modal-body h3 {
  margin-bottom: 15px;
}
.modal-body .form-grid {
  margin: 14px 0;
}
.modal-body pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  background: #edf1e5;
  padding: 12px;
  max-height: 250px;
  overflow: auto;
  line-height: 1.6;
}
.modal-body .error {
  color: #9a472d;
  font-size: 13px;
  min-height: 18px;
  margin: 8px 0;
}
.mobile-tab {
  display: none;
}
.print-only {
  display: none;
}
.inline-code {
  font-family: Consolas,monospace;
  font-size: 12px;
}
.soft-link {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 12px;
  color: #597249;
  min-height: auto;
  box-shadow: none;
  line-height: 1.8;
}
.lesson-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 180px;
  background: #eaf2df;
  border-radius: 13px;
  padding: 25px;
}
.lesson-step svg {
  height: 120px;
  width: 120px;
}
.lesson-step .flow-arrow {
  font-size: 32px;
  animation: flowPulse 1.4s infinite;
}
@keyframes flowPulse {
  50% {
    transform: translateX(5px);
    opacity: .4;
  }
}
.version-stale {
  padding: 10px 14px;
  background: #f7ebc9;
  border-radius: 8px;
  color: #7c5b21;
  font-size: 13px;
  margin: 12px 0;
  border: 1px solid #e5d49d;
}
.field-error {
  color: #9c472f;
  font-size: 12px;
}
.source-note {
  font-size: 12px;
  color: #637957;
  line-height: 1.8;
}
.compare-table {
  min-width: 600px;
}
.inspector .route-points {
  font-family: Consolas,monospace;
  min-height: 125px;
  font-size: 12px;
  line-height: 1.7;
}
details summary {
  cursor: pointer;
  font-size: 13px;
  color: #4f6e43;
}
details {
  margin: 10px 0;
}
details p {
  font-size: 12px;
}
.screen-note {
  padding: 10px 15px;
  background: #f7f0d6;
  font-size: 13px;
  color: #785b24;
  line-height: 1.7;
}
.route-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.route-item button {
  flex: 1;
  text-align: start;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  line-height: 1.55;
  padding: 9px 11px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.select-label {
  font-size: 12px;
  color: #617956;
}
.user-badge {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cloud-status {
  font-size: 11px;
  color: #667b50;
  padding-inline-start: 8px;
}
:root[dir=rtl] .inspector {
  border-right: 1px solid var(--line);
  border-left: 0;
}
::-webkit-scrollbar {
  width: 8px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #bdc9b8;
  border: 2px solid transparent;
  border-radius: 8px;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #94a78b;
}
::-webkit-scrollbar-button {
  display: none;
}
input:focus-visible,textarea:focus-visible,select:focus-visible {
  outline: 3px solid #c7d9b7;
  outline-offset: 1px;
  border-color: #64854d;
}
input::placeholder,textarea::placeholder {
  color: #84927a;
  opacity: 1;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
.hero .actions .primary {
  min-height: 46px;
  padding: 12px 19px;
}
.hero .actions > button:not(.primary) {
  min-height: 46px;
  padding: 12px 17px;
}
.hero-float p.small {
  font-size: 12px;
  line-height: 1.6;
}
.hero-float strong {
  font-weight: 650;
}
.demo-card:hover {
  border-color: #95ae7e;
  box-shadow: 0 6px 18px #2f4e2810;
  transform: translateY(-2px);
}
.demo-card:active {
  transform: translateY(0);
}
.palette-item:hover {
  border-color: #7c9b65;
  box-shadow: 0 3px 9px #2d4b2510;
}
.palette-item:focus-visible {
  outline-offset: -3px;
}
.asset:focus-visible {
  filter: drop-shadow(0 0 4px #426d3f);
}
.inspector > .stack > button {
  width: 100%;
}
.panel,.project-card,.lesson-copy,.catalog-body {
  min-width: 0;
}
.catalog-body h3,.lesson-copy h3,.catalog-body p {
  overflow-wrap: anywhere;
}
.summary-line strong {
  font-variant-numeric: tabular-nums;
}
.nav,.palette,.inspector,.plan-wrap,.table-wrap {
  overscroll-behavior: contain;
}
.footer .soft-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  background: transparent;
}
:root[dir=rtl] .top-actions {
  margin-left: 0;
  margin-right: auto;
}

/* Responsive layouts and output modes */

@media(min-width:1600px) {
  .content {
    padding-top: 45px;
  }
  .hero {
    min-height: 435px;
  }
  .hero h1 {
    font-size: 48px;
  }
  .mini-scene {
    height: 145px;
  }
}
@media(min-width:901px) {
  .editor-layout {
    height: 700px;
    min-height: 640px;
    max-height: 700px;
  }
  .palette {
    overflow-y: auto;
    min-height: 0;
  }
  .workspace {
    min-height: 0;
  }
  .plan-wrap {
    min-height: 0;
  }
  .plan-wrap svg {
    max-height: 540px;
  }
  .inspector {
    max-height: none;
    min-height: 0;
  }
}
@media(max-width:1180px) {
  .topbar {
    padding: 0 22px;
    gap: 12px;
  }
  .nav {
    gap: 1px;
  }
  .nav button {
    padding: 10px 9px;
    font-size: 13px;
  }
  .content {
    padding: 28px;
  }
  .editor-layout {
    grid-template-columns: 172px minmax(240px,1fr) 252px;
  }
  .inspector {
    padding: 16px;
  }
  .hero {
    gap: 20px;
    padding: 34px;
  }
  .hero h1 {
    font-size: 37px;
  }
  .demo-grid {
    gap: 11px;
  }
  .catalog-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .user-badge {
    max-width: 110px;
  }
  .top-actions {
    gap: 7px;
  }
}
@media(max-width:900px) {
  .topbar {
    height: auto;
    min-height: 70px;
    flex-wrap: wrap;
    padding: 14px 22px 0;
    gap: 12px;
  }
  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 12px;
    gap: 5px;
  }
  .nav button {
    font-size: 13px;
    padding: 10px 15px;
  }
  .top-actions {
    margin-left: auto;
  }
  .hero {
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    padding: 28px;
    gap: 14px;
  }
  .hero h1 {
    font-size: 33px;
  }
  .hero p {
    font-size: 14px;
  }
  .hero-float {
    display: none;
  }
  .demo-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .editor-layout {
    grid-template-columns: 160px minmax(220px,1fr);
  }
  .inspector {
    grid-column: 1/-1;
    max-height: none;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .inspector .form-grid {
    grid-template-columns: repeat(4,1fr);
  }
  .inspector .asset-preview {
    display: none;
  }
  .inspector .stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .three-col {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .editor-head {
    padding: 21px 22px;
    align-items: start;
    flex-direction: column;
  }
  .catalog-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .stat {
    padding: 18px 15px;
    gap: 12px;
  }
  .stat-symbol {
    width: 34px;
    height: 34px;
  }
  .stat strong {
    font-size: 25px;
  }
}
@media(max-width:600px) {
  .content {
    padding: 22px 16px 30px;
  }
  .topbar {
    position: relative;
    padding: 14px 16px 10px;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 10px 8px;
    align-items: center;
  }
  .brand {
    font-size: 18px;
    gap: 8px;
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
  }
  .brand img {
    width: 32px;
    height: 32px;
  }
  .top-actions select {
    width: 78px;
    font-size: 12px;
    padding: 8px 5px;
    min-height: 38px;
  }
  .top-actions .user-badge {
    max-width: 100px;
    font-size: 12px;
    padding: 8px;
    min-height: 38px;
  }
  .hero {
    grid-template-columns: minmax(0,1fr);
    padding: 28px 22px 18px;
    gap: 20px;
    border-radius: 18px;
    min-height: 0;
  }
  .hero h1 {
    font-size: 34px;
    letter-spacing: -1px;
    margin: 15px 0 18px;
    line-height: 1.4;
  }
  .hero p {
    font-size: 14px;
    line-height: 1.85;
    margin-bottom: 22px;
  }
  .hero-preview {
    padding: 0;
    margin: 0;
  }
  .hero-preview svg {
    max-height: 255px;
  }
  .hero .actions {
    gap: 9px;
  }
  .hero button {
    font-size: 13px;
    min-height: 44px;
    padding: 10px 12px;
  }
  .stat-grid {
    gap: 9px;
    margin: 16px 0 30px;
  }
  .stat {
    padding: 14px 11px;
    display: block;
    border-radius: 11px;
  }
  .stat-symbol {
    display: none;
  }
  .stat strong {
    font-size: 22px;
    margin: 7px 0;
    line-height: 1.4;
  }
  .stat small {
    font-size: 11px;
    line-height: 1.5;
    display: block;
  }
  .stat .description {
    font-size: 11px;
    line-height: 1.6;
    display: block;
  }
  .demo-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
  }
  .mini-scene {
    height: 115px;
    padding: 7px;
  }
  .demo-card .card-copy {
    padding: 13px;
  }
  .card-copy strong {
    font-size: 14px;
  }
  .section-title h2 {
    font-size: 19px;
  }
  .section-title p {
    font-size: 13px;
  }
  .breadcrumb {
    margin-bottom: 17px;
    font-size: 11px;
  }
  .footer {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    font-size: 11px;
  }
  .page-head {
    align-items: start;
    flex-direction: column;
    margin-top: 0;
  }
  .page-head h1 {
    font-size: 28px;
  }
  .editor-head h1 {
    font-size: 23px;
  }
  .editor-head .actions {
    gap: 5px;
    display: grid;
    grid-template-columns: 36px 36px repeat(4,minmax(0,1fr));
    width: 100%;
  }
  .editor-head .actions button {
    font-size: 12px;
    padding: 7px 5px;
    min-height: 44px;
    min-width: 0;
    line-height: 1.4;
  }
  .editor-layout {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .palette {
    padding: 14px 12px;
    border-right: 0;
    border-bottom: 1px solid #dce4d2;
  }
  .palette-items {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding-bottom: 3px;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
  }
  .palette-item {
    min-width: 78px;
    height: 94px;
    font-size: 11px;
    flex: 0 0 78px;
    scroll-snap-align: start;
    padding: 10px 5px 8px;
  }
  .palette-item svg {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }
  .palette-group {
    display: none;
  }
  .palette-search {
    display: none;
  }
  .palette .eyebrow {
    margin: 0 0 10px;
    font-size: 11px;
  }
  .palette .space-tools {
    display: none;
  }
  .mobile-tab {
    display: block;
  }
  .plan-wrap {
    min-height: 270px;
    padding: 16px 8px;
    overflow: hidden;
  }
  .plan-wrap svg {
    max-height: 360px;
    min-width: 0;
    width: 100%;
  }
  .canvas-toolbar {
    padding: 10px;
    gap: 8px;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
  }
  .segmented button {
    font-size: 12px;
    padding: 7px 6px;
    min-height: 36px;
  }
  .canvas-status {
    font-size: 11px;
    padding: 11px 13px;
    flex-wrap: wrap;
    gap: 7px;
  }
  .inspector {
    padding: 22px 18px;
  }
  .inspector .stack {
    display: flex;
  }
  .inspector .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .inspector h3 {
    font-size: 18px;
  }
  .inspector input,.inspector select {
    font-size: 16px;
    padding: 10px;
  }
  .three-col,.catalog-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
  }
  .catalog-photo {
    height: 145px;
  }
  .catalog-body {
    padding: 13px;
  }
  .catalog-body h3 {
    font-size: 15px;
  }
  .catalog-body p {
    font-size: 12px;
  }
  .catalog-body .credit {
    font-size: 10px;
  }
  .catalog-body button {
    font-size: 12px;
    padding: 9px;
    min-height: 40px;
  }
  .panel {
    padding: 20px;
  }
  .two-col {
    gap: 15px;
  }
  .lesson-art {
    height: 140px;
  }
  .lesson-copy {
    padding: 16px;
  }
  .lesson-copy h3 {
    font-size: 16px;
  }
  .lesson-copy p {
    font-size: 12px;
  }
  .modal-head {
    padding: 18px;
  }
  .modal-head h2 {
    font-size: 20px;
  }
  .modal-body {
    padding: 18px;
  }
  .modal-foot {
    padding: 15px 18px;
  }
  .form-grid {
    gap: 10px;
  }
  dialog {
    width: 94vw;
  }
  .searchbar {
    gap: 8px;
  }
  .searchbar input {
    max-width: none;
  }
  .searchbar select {
    max-width: none;
    flex: 1;
  }
  .meter-node {
    padding: 12px;
  }
  .hero-preview .asset {
    touch-action: none;
  }
  .page-head .actions button {
    font-size: 12px;
    min-height: 40px;
  }
  .lesson-step {
    gap: 10px;
    padding: 15px;
  }
  .lesson-step svg {
    width: 80px;
    height: 80px;
  }
  .brand small {
    font-size: 8px;
    letter-spacing: 1px;
    margin-top: 2px;
  }
  .top-actions {
    gap: 6px;
    margin-left: 0;
    min-width: 0;
    grid-column: 2;
    grid-row: 1;
  }
  .top-actions .avatar {
    display: none;
  }
  .nav {
    grid-column: 1/-1;
    grid-row: 2;
    order: initial;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 4px;
    overflow: visible;
    padding: 2px 0 0;
  }
  .nav button {
    font-size: 13px;
    min-height: 40px;
    padding: 9px 5px;
    white-space: normal;
    line-height: 1.4;
    border-radius: 8px;
  }
  .nav button.active {
    box-shadow: inset 0 -2px #78985f;
  }
  .eyebrow {
    letter-spacing: 1.3px;
  }
  .hero .source-note {
    font-size: 11px;
    line-height: 1.7;
  }
  .stat strong .small {
    font-size: 11px;
    letter-spacing: 0;
    display: block;
  }
  .card-copy p {
    font-size: 11px;
    line-height: 1.75;
  }
  .section-title {
    align-items: flex-start;
    gap: 10px;
  }
  .section-title .tag {
    font-size: 10px;
    white-space: normal;
    max-width: 80px;
    text-align: center;
    justify-content: center;
  }
  .editor-head {
    padding: 20px 16px 18px;
    gap: 16px;
  }
  .editor-head p {
    font-size: 12px;
    line-height: 1.75;
  }
  .editor-head .cloud-status {
    display: block;
    padding-inline-start: 0;
    margin-top: 3px;
  }
  .editor-head .actions button.icon {
    font-size: 18px;
    padding: 0;
  }
  .canvas-toolbar > .segmented:first-child {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
  }
  .canvas-toolbar > .segmented:nth-child(2) {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    width: max-content;
    max-width: 100%;
  }
  .mobile-tab {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
  }
  .mobile-tab button {
    font-size: 11px;
    min-height: 38px;
    padding: 7px 8px;
  }
  .plan-wrap .asset-label {
    display: none;
  }
  .plan-wrap .asset.selected .asset-label {
    display: block;
    font-size: 24px;
    stroke-width: 4px;
  }
  .plan-wrap .zone-label {
    font-size: 19px;
  }
  .plan-wrap .dimension-label {
    font-size: 15px;
  }
  .palette-items::-webkit-scrollbar {
    height: 4px;
  }
  .palette-items::-webkit-scrollbar-button {
    display: none;
  }
  .legend {
    gap: 9px;
  }
  .modal-body input,.modal-body select,.modal-body textarea {
    font-size: 16px;
  }
  .form-grid .full {
    min-width: 0;
  }
}
@media(max-width:360px) {
  .topbar {
    padding-inline: 12px;
  }
  .brand {
    font-size: 16px;
    gap: 6px;
  }
  .brand img {
    width: 29px;
    height: 29px;
  }
  .brand small {
    font-size: 7px;
    letter-spacing: .5px;
  }
  .top-actions select {
    width: 73px;
    font-size: 11px;
  }
  .top-actions .user-badge {
    font-size: 11px;
    max-width: 82px;
    padding: 7px 6px;
  }
  .hero h1 {
    font-size: 30px;
  }
  .hero .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .editor-head .actions {
    grid-template-columns: 34px 34px repeat(4,minmax(0,1fr));
  }
  .editor-head .actions button {
    font-size: 11px;
  }
  .segmented button {
    font-size: 11px;
  }
  .mobile-tab button {
    font-size: 10px;
    padding: 7px 5px;
  }
}
@media print {
  @page {
    size: A4;
    margin: 12mm;
  }
  body {
    background: white;
    color: #222;
  }
  body>* {
    display: none!important;
  }
  dialog[open] {
    display: block!important;
    position: static!important;
    max-width: none;
    width: 100%;
    max-height: none;
    border: none;
    box-shadow: none;
    padding: 0;
    overflow: visible;
  }
  .modal-head,.modal-foot,.no-print {
    display: none!important;
  }
  .modal-body {
    padding: 0;
    overflow: visible;
  }
  dialog::backdrop {
    display: none;
  }
  .print-only {
    display: block;
  }
  .quote-print h1 {
    font-size: 25px;
  }
  .quote-print table {
    font-size: 9px;
  }
  .quote-print td,.quote-print th {
    padding: 6px;
  }
  .quote-print .plan-print {
    width: 100%;
    max-height: 350px;
  }
  .quote-print .plan-print svg {
    width: 100%;
    max-height: 350px;
  }
  .quote-print section {
    break-inside: avoid;
  }
  .quote-print .page-break {
    break-before: page;
  }
  .quote-print .tag {
    background: #eee;
  }
  .quote-print p {
    font-size: 10px;
  }
  .quote-print h2 {
    font-size: 17px;
    margin: 20px 0 12px;
  }
  .quote-print .summary-line {
    font-size: 10px;
  }
  .quote-print .print-meta {
    font-size: 10px;
    line-height: 1.8;
  }
  thead {
    display: table-header-group;
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    animation: none!important;
    transition: none!important;
  }
}
