@font-face {
  font-family: "Source Sans Pro";
  src: url("/brand/source-sans-pro-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans Pro";
  src: url("/brand/source-sans-pro-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
:root {
  /* Brand values from the Wieland product site's public style guide. */
  --green: #4ba02d;
  --green-dark: #326d1f;
  --green-deep: #244e17;
  --green-light: #e4f1e0;
  --ink: #23351b;
  --menu: #646464;
  --border: #d5d5d5;
  --surface: #fff;
  --surface-muted: #f4f4f4;
  --button-radius: 0 .5rem 0 .5rem;
  font: 1rem/1.5 "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
}
* { box-sizing: border-box; }
body { margin: 0; }
.brand-header {
  display: flex;
  align-items: center;
  gap: clamp(.75rem, 2vw, 1.5rem);
  padding: 1rem max(1rem, calc((100% - 98rem) / 2));
  background: var(--surface);
  border-top: 4px solid var(--green);
}
.brand-logo { width: clamp(7rem, 16vw, 11.25rem); height: auto; }
.brand-product { border-left: 1px solid var(--border); padding-left: clamp(.75rem, 2vw, 1.5rem); font-size: 1.125rem; font-weight: 600; }
main { max-width: 67rem; margin: 1.65rem auto; padding: 0 1rem; }
h1 { margin: 0 0 1.25rem; font-size: clamp(1.625rem, 3.3vw, 2.375rem); line-height: 1.2; font-weight: 600; letter-spacing: .2px; }
h1::after { content: ""; display: block; width: 3.125rem; height: 4px; margin-top: .65rem; background: var(--green); }
h2 { margin: 0 0 1rem; font-size: 1.35rem; line-height: 1.25; font-weight: 600; }
.panel { background: var(--surface); border: 1px solid var(--border); padding: 1.25rem; }
.columns { display: grid; grid-template-columns: 2fr 3fr; gap: 1rem; margin-top: 1rem; }
.editor { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 1rem; }
.palette { display: grid; align-content: start; gap: .5rem; }
.palette button, .part { width: 100%; text-align: left; background: #fcfcfc; border-color: var(--border); border-left: 4px solid var(--green); color: inherit; }
.palette [data-part], .part { cursor: grab; touch-action: none; user-select: none; }
.palette #reset { border-left-width: 1px; font-weight: 400; }
.editor small { display: block; font-size: .875rem; font-weight: 400; }
#canvas {
  position: relative;
  height: 23rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: .25rem;
  background: radial-gradient(#b9c1ba 1px, transparent 1px) 0 0 / 16px 16px #f8faf8;
}
#connections { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#connections line { stroke: var(--menu); stroke-width: 2; }
.part { position: absolute; z-index: 1; width: min(9rem, calc(100% - 24px)); padding: .45rem .65rem; }
.part small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.part[aria-pressed="true"] { background: #f4f9e6; outline: 2px solid #37620b; }
.editor-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .65rem; }
.editor-actions[hidden] { display: none; }
.editor-actions button { background: var(--surface); border-color: var(--green-dark); color: var(--green-dark); }
.editor-actions button:hover:not(:disabled) { background: var(--green-light); }
.editor-actions button:disabled { cursor: default; }
.examples { margin: 0 0 1rem; }
.port { position: absolute; z-index: 2; width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 2px solid var(--menu); background: white; }
.port.connected { background: var(--green); }
.port[aria-pressed="true"] { outline: 3px solid #37620b; outline-offset: 2px; }
body.placing, body.placing button { cursor: grabbing; }
#editor-status { margin: .5rem 0 0; font-size: .9rem; }
form { display: grid; gap: .5rem; }
input, button { font: inherit; }
input, select { min-width: 0; width: 100%; margin-bottom: .5rem; border: 1px solid #9c9c9c; border-radius: 0; background: var(--surface-muted); color: var(--ink); padding: .5rem .75rem; }
select { display: block; font: inherit; }
button { justify-self: start; border: 1px solid transparent; border-radius: var(--button-radius); background: var(--green-dark); color: white; font-weight: 600; padding: .5rem 1.1rem; cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 2px; }
dl { margin: 0; }
dl div { display: flex; gap: 1rem; justify-content: space-between; padding: .55rem 0; border-bottom: 1px solid var(--border); }
dl div[hidden] { display: none; }
dd { margin: 0; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
#status { margin-bottom: 0; }
.materials { margin-top: 1rem; }
.comparison { margin-top: 1rem; }
.comparison-scroll { overflow-x: auto; }
.comparison table { width: 100%; border-collapse: collapse; }
.comparison th, .comparison td { padding: .45rem .3rem; border-bottom: 1px solid var(--border); text-align: right; }
.comparison tr > :first-child { text-align: left; }
.comparison td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.materials p { margin: 0; }
.materials table { width: 100%; border-collapse: collapse; text-align: left; }
.materials caption { text-align: left; margin: .85rem 0 .25rem; font-weight: 600; }
.materials th, .materials td { padding: .55rem .3rem; border-bottom: 1px solid var(--border); }
.materials tr > :last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.materials tfoot td { font-weight: 600; }
@media (max-width: 42rem) {
  .columns, .editor { grid-template-columns: 1fr; }
}
@page { size: A4 landscape; margin: 12mm; }
@media print {
  :root, .brand-header { background: white; color: black; }
  .brand-header { padding: 0 0 .5rem; }
  main { max-width: none; margin: 0; padding: 0; }
  .palette, .editor-actions, form button, #editor-status, #status { display: none; }
  .editor { display: block; }
  .columns { grid-template-columns: 2fr 3fr; }
  .panel { break-inside: avoid; }
  #canvas .part { color: black; }
  .part[aria-pressed="true"] { outline: none; }
  input, select { color: black; }
}
