@font-face {
  font-family: Manrope;
  src: url("manrope-catalog-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #1c2c27;
  --muted: #57635b;
  --line: #dcded6;
  --paper: #f5f4ef;
  --forest: #21493a;
  --green: #2d5d49;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 500 15px/1.5 Manrope, system-ui, sans-serif; }
.wrap { width: min(1224px, calc(100% - 64px)); margin-inline: auto; }
h1, h2, p, dl { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid #39705a; outline-offset: 3px; }

.top { background: #fff; border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; }
.brand { display: grid; align-items: center; }
.brand img { display: block; width: 132px; height: 38px; object-fit: contain; object-position: left center; }
.nav nav { display: flex; align-items: center; gap: 24px; }
.nav nav a { text-decoration: none; font-size: .82rem; font-weight: 800; }
.nav-demos { color: var(--muted); }
.nav-demos span { font-size: 1.25em; }
.nav nav a:hover { color: var(--green); }
#language { padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; }
#language:hover { border-color: #96aa9f; background: #f5f8f3; }

.hero { padding: 33px 0 26px; }
.eyebrow { color: var(--green); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 6px 0 7px; font-size: clamp(2.3rem, 5.5vw, 4.15rem); font-weight: 800; line-height: 1.03; letter-spacing: -.075em; }
.hero-description { color: var(--muted); font-size: clamp(.9rem, 1.6vw, 1.04rem); }

.workbench { display: grid; grid-template-columns: minmax(310px, .86fr) minmax(0, 1.6fr); gap: 18px; align-items: start; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.panel h2 { font-size: 1.16rem; font-weight: 800; line-height: 1.2; letter-spacing: -.035em; }
.controls { padding: 19px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.controls-head { border-bottom: 1px solid var(--line); padding-bottom: 13px; margin-bottom: 14px; }
.fields, .field-group { display: grid; gap: 10px; }
.field-group + .field-group { border-top: 1px solid var(--line); padding-top: 12px; }
.field-caption { color: var(--green); font-size: .71rem; font-weight: 800; letter-spacing: .095em; text-transform: uppercase; }
label { display: grid; gap: 5px; align-content: start; min-width: 0; color: var(--ink); font-size: .78rem; font-weight: 800; }
.dimensions, .duo { display: grid; gap: 8px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.duo { grid-template-columns: repeat(2,minmax(0,1fr)); }
input, select {
  min-width: 0;
  width: 100%;
  height: 42px;
  padding: 0 9px;
  border: 1px solid #d5d9d0;
  border-radius: 6px;
  background: #fafbf8;
  color: var(--ink);
  font-weight: 700;
  font-size: .83rem;
}
input { font-variant-numeric: tabular-nums; }
select { cursor: pointer; }
input:hover, select:hover:not(:disabled) { border-color: #a0afa3; }
select:disabled { opacity: .55; cursor: default; }
.number-wrap { position: relative; }
.number-wrap:has(.input-unit) input { padding-right: 28px; appearance: textfield; }
.number-wrap:has(.input-unit) input::-webkit-inner-spin-button { appearance: none; }
.input-unit { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); pointer-events: none; color: var(--muted); font: 600 .68rem var(--mono); }
.range { font: 600 .65rem/1.3 var(--mono); color: var(--muted); }
label:has(input[aria-invalid=true]) .range { color: #9a3b20; }
input[aria-invalid=true] { border-color: #b85b43; background: #fff5f0; }
.hint { font-size: .75rem; color: var(--muted); }
.recommendation { border-left: 2px solid #86a590; padding: 5px 8px; background: #f1f5ef; }
.quantity-hint { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.text-button { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 4px 8px; border: 1px solid #d5ded4; border-radius: 5px; background: #f8faf6; color: var(--forest); font-size: .72rem; font-weight: 800; cursor: pointer; }
.text-button:hover { border-color: #91a793; background: #eaf1e8; }
.text-button svg { width: 14px; height: 14px; }

.results { display: grid; gap: 16px; }
.viewer { padding: 17px; }
.viewer .section-head { margin-bottom: 12px; }
.code { color: var(--forest); padding: 4px 7px; border-radius: 4px; background: #edf1e8; font: 600 .69rem/1.4 var(--mono); white-space: nowrap; }
.canvas {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  aspect-ratio: 700/300;
  overflow: hidden;
  border: 1px solid #dcded2;
  border-radius: 5px;
  background-color: #f2f2e9;
  background-image: linear-gradient(#45564216 1px,transparent 1px), linear-gradient(90deg,#45564216 1px,transparent 1px), linear-gradient(#4556420a 1px,transparent 1px), linear-gradient(90deg,#4556420a 1px,transparent 1px);
  background-size: 60px 60px, 60px 60px, 12px 12px, 12px 12px;
  background-position: center;
}
.canvas svg { width: 100%; height: 100%; display: block; }
.canvas p { max-width: 30ch; padding: 8px; background: #f2f2e9; font-size: .85rem; text-align: center; }
.drawing-meta { display: flex; justify-content: space-between; align-items: center; gap: 6px 14px; flex-wrap: wrap; margin-top: 9px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: .74rem; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 15px; border-top: 2px solid #57462d; }
.legend .fold { border-top: 2px dashed #32695d; }
.legend .print { border: 1px solid #32695d; background: #c4dfd0; height: 9px; }
.blank-note { font-family: var(--mono); font-size: .68rem; }
.cut { fill: none; stroke: #57462d; stroke-width: 1.7; stroke-linejoin: round; }
.foldline { fill: none; stroke: #32695d; stroke-width: 1.55; stroke-dasharray: 5 4; }
.measureline { stroke: #637368; stroke-width: 1; }
.measure { fill: #31443a; font: 700 14px var(--mono); text-anchor: middle; paint-order: stroke; stroke: #f2f2e9; stroke-width: 5; stroke-linejoin: round; }
.inktext { stroke: #c4dfd0; }
.next { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-top: 17px; padding: 17px 19px; }
.next p { margin-top: 5px; color: var(--muted); font-size: .81rem; }
.action { display: inline-flex; align-items: center; gap: 15px; min-height: 42px; padding: 9px 12px; border-radius: 6px; background: var(--forest); color: #fff; font-size: .8rem; font-weight: 800; text-decoration: none; }
.action:hover { background: #162f27; }
footer { display: flex; justify-content: space-between; gap: 8px; padding-block: 16px; color: var(--muted); font-size: .72rem; }
footer span:first-child { font-weight: 800; }

@media (max-width: 760px) {
  .wrap { width: calc(100% - 28px); }
  .nav { min-height: 54px; }
  .nav nav { gap: 12px; }
  .brand img { width: 106px; height: 32px; }
  .hero { padding: 20px 0 16px; }
  .workbench { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .results { display: contents; }
  .viewer { grid-row: 1; }
  .viewer .section-head { margin-bottom: 6px; }
  .viewer .canvas { height: clamp(94px,20vh,150px); min-height: 0; aspect-ratio: auto; }
  .drawing-meta { margin-top: 5px; }
  .controls, .estimate { padding: 14px; }
  .fields :is(input,select,button) { scroll-margin-top: 249px; }
  input, select { font-size: 16px; }
  select { padding-inline: 6px; }
  .next { margin-top: 12px; padding: 14px; }
}

@media (max-width: 350px) {
  .nav nav { gap: 7px; }
  .nav nav a { font-size: .73rem; }
  .controls-head { gap: 6px; }
  .panel h2 { font-size: 1.05rem; }
}

@media (max-height: 470px) {
  .viewer { position: static; }
  .fields :is(input,select,button) { scroll-margin-top: 0; }
}

/* Configuration steps and the assembled product view. */
h1 { letter-spacing: -.062em; }
.controls { padding: 22px; }
.controls-head { padding-bottom: 10px; }
.stages {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 8px;
  background: #f0f2eb;
}
.stages button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 38px;
  padding: 4px 3px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  font-size: .76rem;
  font-weight: 800;
}
.stages button span { font: 700 .65rem var(--mono); color: #5a7668; }
.stages button[aria-current="step"] { color: #17382b; background: #fff; border-color: #dce4d9; }
.stages button:hover { color: #17382b; background: #f9fbf5; }
.stages button.needs-review span { color: #a34023; }
.fields { min-height: 178px; }
.field-group { align-content: start; }
.field-group + .field-group { border: 0; padding: 0; }
.field-caption { font-size: .74rem; letter-spacing: .065em; }
label { font-size: .84rem; }
select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill='none' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23305343' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}
.step-actions { display: flex; gap: 10px; margin-top: 17px; border-top: 1px solid var(--line); padding-top: 14px; }
.step-actions .action { margin-left: auto; padding-inline: 15px; border: 0; cursor: pointer; }
.drawing-heading { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.modes { display: flex; padding: 3px; gap: 3px; border: 1px solid var(--line); border-radius: 7px; background: #f5f5f0; }
.modes button { min-height: 29px; padding: 3px 9px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); font-weight: 800; font-size: .73rem; cursor: pointer; }
.modes button[aria-pressed="true"] { background: #fff; border-color: #dde3d8; color: #234b3a; }
#box-canvas { background: radial-gradient(ellipse at 47% 33%,#fffdf8 8%,#eaece1 92%); }
#box-svg .edge { stroke: #805b35; stroke-width: 1.2; stroke-linejoin: round; }
#box-svg .seam { stroke: #866442; stroke-width: 1.4; fill: none; }
#box-svg .dimension { stroke: #263e36; stroke-width: 1.5; marker-start: url(#box-arrow); marker-end: url(#box-arrow); }
#box-svg .dimension-text { fill: #243b32; stroke: #f6e6c8; font: 800 15px Manrope,system-ui,sans-serif; paint-order: stroke; stroke-width: 5; stroke-linejoin: round; text-anchor: middle; }
#box-svg .printed-mark { fill: #2e5144; }
.drawing-empty { padding: 12px 0 3px; color: var(--muted); font-size: .84rem; }
@media(max-width:760px) {
  .controls { padding: 14px; }
  label { font-size: .83rem; }
  select { padding-right: 30px; }
  .drawing-heading .code { font-size: .61rem; }
  .modes button { padding-inline: 6px; }
  .viewer .section-head { gap: 4px 6px; }
  .stages button { min-height: 42px; }
}
@media print {
  body { background: #fff; color: #182721; }
  .wrap { width: 100%; }
  .nav nav, .controls, .modes, .next, footer, .print-button, .mobile-total, .status, noscript { display: none!important; }
  .hero { padding: 12px 0; }
  h1 { font-size: 28px; }
  .workbench,.results { display: block; }
  .viewer { position: static; }
  .canvas:not(.print-empty) { display: grid!important; height: 175px; min-height: 0; aspect-ratio: auto; margin-bottom: 8px; print-color-adjust: exact; }
  #flat-legend { display: flex!important; }
  .estimate { margin-top: 12px; background: #fff; color: #182721; border-color: #bbb; }
  .estimate :is(.code,.hint,dt,.totals span) { color: #263e36; }
}
@media(max-width:760px) { #box-svg .dimension-text { font-size: 19px; } }
.print-specs { display: none; }
@media print {
  .print-specs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 14px; margin-top: 10px; font-size: .8rem; }
  .print-specs dd { margin: 0; font-weight: 800; }
  .viewer,.estimate { break-inside: avoid; box-shadow: none; }
}

/* Order pricing */
:root { --paper: #f6f5f1; --ink: #192823; }
body { -webkit-font-smoothing: antialiased; }
h1 { font-size: clamp(2.38rem, 5.1vw, 4rem); letter-spacing: -.066em; }
.panel h2 { font-size: 1.22rem; letter-spacing: -.044em; }
.hero-description { max-width: 56ch; line-height: 1.5; }
.estimate {
  padding: 20px 22px;
  color: #192a24;
  background: #fff;
  border-color: #d8ded5;
  box-shadow: 0 4px 16px #1f332408;
}
.estimate .code { background: #edf3ed; color: #365447; }
.order-context { margin-top: 3px; font-size: .78rem; font-weight: 700; color: #58675f; }
.order-context:empty { display: none; }
.estimate .totals { display: grid; grid-template-columns: 1.24fr 1fr; margin-top: 14px; padding: 0; border: 1px solid #dfe7df; border-radius: 8px; background: #f2f6f1; }
.estimate .totals div { min-width: 0; padding: 10px 14px 13px; }
.estimate .totals div + div { border-left: 1px solid #dfe7df; }
.estimate .totals span { display: block; color: #40554a; font-size: .73rem; font-weight: 750; }
.estimate .totals strong { display: block; color: #183c2d; font-size: clamp(1.62rem, 3.4vw, 2.7rem); margin-top: 2px; line-height: 1.12; letter-spacing: -.06em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.estimate .totals div + div strong { font-size: clamp(1.35rem, 2.7vw, 2rem); }
.estimate .breakdown { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 12px; font-size: .75rem; }
.estimate .breakdown dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.estimate .breakdown dt, .estimate .hint { color: #596961; }
.estimate .hint { margin-top: 9px; }
.print-button { margin-top: 11px; padding: 6px 9px; border: 1px solid #d9e1d7; border-radius: 4px; background: #fff; color: #254d3a; font-size: .74rem; font-weight: 800; cursor: pointer; }
.print-button:hover { background: #edf4ed; }
.price-feedback { margin-top: 11px; padding: 11px 13px; border-radius: 7px; border: 1px solid #e5dac8; background: #fcf8f1; }
.price-heading { color: #3e3427; font-weight: 800; font-size: .91rem; letter-spacing: -.018em; }
.estimate .status { margin: 4px 0 0; padding: 0 0 0 17px; color: #564839; font-size: .77rem; font-weight: 650; }
.estimate .status::before { display: none; }
.estimate .status li + li { margin-top: 2px; }
.price-actions { display: flex; flex-wrap: wrap; gap: 7px 11px; align-items: center; margin-top: 8px; }
.quiet-button { min-height: 32px; padding: 3px 0; border: 0; background: none; color: #405d4b; font-size: .74rem; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.quiet-button:hover { color: #142d21; }
.mobile-dock { display: none; }

@media (max-width: 760px) {
  body { padding-bottom: calc(73px + env(safe-area-inset-bottom)); }
  .wrap { width: calc(100% - 30px); }
  .hero { padding-bottom: 17px; }
  .panel h2 { font-size: 1.11rem; }
  .viewer { position: relative; top: auto; z-index: auto; padding: 12px; box-shadow: none; }
  .viewer .canvas { height: clamp(148px,27vh,220px); }
  .viewer .section-head { margin-bottom: 9px; }
  .controls, .estimate { padding: 14px; }
  input, select { min-height: 46px; }
  .fields :is(input,select,button) { scroll-margin-top: 14px; }
  .estimate { scroll-margin-block: 12px 75px; }
  .estimate .totals div { padding-inline: 9px; }
  .estimate .totals strong { overflow-wrap: anywhere; font-size: clamp(1.2rem, 4.65vw, 2.18rem); }
  .estimate .totals div + div strong { font-size: clamp(1.08rem, 4.15vw, 1.9rem); }
  .mobile-dock {
    position: fixed;
    inset: auto 0 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 9px 15px calc(9px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid #d8ded4;
    background: #fff;
    color: #1d3b2c;
    box-shadow: 0 -4px 14px #283e2d13;
    text-align: left;
    cursor: pointer;
  }
  .mobile-dock small { display: block; color: #54675a; font-size: .68rem; line-height: 1.2; }
  .mobile-dock strong { display: block; margin-top: 2px; font-size: 1.18rem; font-weight: 800; line-height: 1.1; letter-spacing: -.045em; }
  .dock-link { flex: none; border-radius: 6px; padding: 8px 10px; background: #214936; color: #fff; font-size: .76rem; font-weight: 800; }
}
@media print {
  .estimate { box-shadow: none; }
  .mobile-dock, .price-feedback { display: none!important; }
  body { padding-bottom: 0; }
}
