@font-face {
  font-family: Instrument;
  src: url("/instrument.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: Plex;
  src: url("/mono.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
:root {
  color-scheme: light;
  --bg: #f4f3e9;
  --paper: #fdfcf6;
  --ink: #202a20;
  --muted: #576155;
  --line: #dfdfd1;
  --green: #254331;
  --green-dark: #1c3426;
  --lime: #daf0ad;
  --accent: #dce9d0;
  --red: #8b3e29;
  --mono: Plex, monospace;
  font-family: Instrument, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
select {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button:focus-visible,
select:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid #658f43;
  outline-offset: 3px;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button,
input,
select {
  min-width: 0;
}
input:not([type="checkbox"]),
select {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 7px;
  padding: 9px 11px;
}
input:not([type="checkbox"]) {
  width: 100%;
}
[hidden] {
  display: none !important;
}
.sr,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip {
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--lime);
  z-index: 2;
  padding: 10px;
}
.mast {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.mast-inner {
  height: 66px;
  max-width: 1340px;
  margin: auto;
  padding: 0 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.045em;
}
.brand img {
  border-radius: 7px;
  margin-right: 2px;
}
.brand span {
  color: #55705a;
  margin-left: -8px;
}
.mast-links,
.project-controls,
.project-name {
  display: flex;
  align-items: center;
  gap: 12px;
}
.page {
  max-width: 1340px;
  margin: auto;
  padding: 26px 30px 0;
}
.hero {
  border-radius: 17px;
  overflow: hidden;
  background: #213d2e;
  position: relative;
  color: #f7f7e8;
  min-height: 228px;
  display: flex;
  align-items: center;
  isolation: isolate;
}
.page[data-practice="false"] .hero {
  display: none;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 0 32%;
  z-index: -2;
  background: url("/workbench.webp") right 56% / cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    #20392c 15%,
    #20392c 32%,
    #20392ced 44%,
    #20392c00 85%
  );
}
.hero-copy {
  padding: 29px 38px;
  max-width: 595px;
}
.eyebrow {
  font: 500 10px/1.5 var(--mono);
  letter-spacing: 0.12em;
  color: #576a52;
}
.hero .eyebrow {
  color: #e0edcb;
}
.hero .eyebrow span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
  background: var(--lime);
}
h1 {
  font-size: clamp(39px, 5vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.065em;
  font-weight: 600;
  margin: 12px 0 14px;
}
.hero p {
  font-size: 14px;
  color: #e0eadb;
  line-height: 1.45;
}
.project-bar {
  padding: 18px 0 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.project-next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #e8eddb;
  border: 1px solid #d7dfc8;
  border-radius: 9px;
  padding: 9px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}
.project-next p {
  min-width: 0;
}
.device-status {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}
.pairing-code {
  display: block;
  padding: 14px;
  border-radius: 9px;
  text-align: center;
  letter-spacing: 0.12em;
  font: 500 1.6rem/1.2 var(--mono);
  background: #e8eddb;
}
#device-join,
#device-join label {
  display: grid;
  gap: 8px;
}
#device-join {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.sheet-preset {
  justify-self: start;
  background: #eef0e2;
}
.project-name label,
.saved {
  font: 500 10px/1.4 var(--mono);
  letter-spacing: 0.045em;
  color: var(--muted);
}
.project-name select {
  font-size: 15px;
  font-weight: 650;
  max-width: min(46vw, 355px);
  padding: 8px 27px 8px 10px;
}
.project-name {
  gap: 8px;
}
.saved {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 6px;
}
.saved i {
  height: 6px;
  width: 6px;
  background: #698b45;
  border-radius: 100%;
  flex: none;
}
.btn,
.quiet,
.close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 650;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 14px;
  background: none;
  white-space: nowrap;
}
.btn:hover:not(:disabled),
.quiet:hover:not(:disabled) {
  filter: brightness(0.96);
}
.btn.outline {
  border-color: #d9dccb;
  background: #f8f8ef;
}
.btn.green {
  background: var(--green);
  color: #f8faee;
}
.btn.lime {
  background: var(--lime);
  color: #223322;
}
.small {
  font-size: 12px;
}
.quiet {
  padding: 8px 10px;
  color: #455648;
}
.quiet:hover:not(:disabled) {
  background: #eceee0;
}
.square {
  padding: 5px 8px;
}
.workgrid {
  display: grid;
  grid-template-columns: minmax(350px, 0.89fr) minmax(0, 1.55fr);
  gap: 17px;
  align-items: start;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 19px 14px;
}
.panel-head h2 {
  font-size: 29px;
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin-top: 4px;
}
.panel-head .unit select {
  font: 500 12px var(--mono);
  padding: 7px 9px;
}
.tabs {
  display: flex;
  gap: 1px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 4px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.tabs button[aria-pressed="true"] {
  color: var(--green-dark);
  border-color: #4b6848;
}
.tabs span {
  font: 500 10px var(--mono);
  background: #eeefe3;
  padding: 2px 5px;
  border-radius: 5px;
}
.tab-note {
  padding: 10px 17px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.items {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}
.items th {
  font: 500 9px var(--mono);
  letter-spacing: 0.07em;
  color: var(--muted);
  text-align: left;
  background: #f4f4e9;
  padding: 9px 6px;
}
.items th:first-child,
.items td:first-child {
  padding-left: 16px;
  width: 45%;
}
.items th:nth-child(2) {
  width: 29%;
}
.items th:nth-child(3) {
  width: 10%;
}
.items th:last-child,
.items td:last-child {
  width: 16%;
  padding-right: 12px;
  text-align: right;
}
.items td {
  padding: 9px 6px;
  border-bottom: 1px solid #ececdf;
  vertical-align: middle;
}
.item-name {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 650;
}
.item-meta {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}
.item-size,
.item-qty {
  font: 500 10px var(--mono);
  font-variant-numeric: tabular-nums;
}
.item-badge {
  display: inline-block;
  text-align: center;
  font: 500 10px var(--mono);
  min-width: 20px;
  margin-right: 5px;
  border-radius: 4px;
  padding: 3px;
  background: var(--accent);
  color: #243a29;
}
.row-edit {
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #476043;
  padding: 5px;
  font-size: 12px;
}
.row-edit:hover {
  border-color: var(--line);
}
.editor-actions {
  display: flex;
  gap: 7px;
  padding: 12px 15px;
}
.settings {
  margin: 0 15px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.settings-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  text-align: left;
  border: 0;
  padding: 11px 2px;
}
.settings-button strong,
.settings-button small {
  display: block;
}
.settings-button strong {
  font-size: 13px;
}
.settings-button small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.calculate {
  padding: 13px 15px 16px;
  display: grid;
  gap: 8px;
}
.calculate button {
  justify-content: space-between;
}
.calculate small {
  color: var(--muted);
  font-size: 11px;
}
.plan .panel-head {
  border-bottom: 1px solid var(--line);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #f8f8ed;
}
.metric {
  padding: 12px 12px 13px;
  display: grid;
  gap: 2px;
  min-width: 0;
}
.metric + .metric {
  border-left: 1px solid var(--line);
}
.metric b {
  font-size: clamp(19px, 2.4vw, 29px);
  letter-spacing: -0.06em;
  overflow-wrap: anywhere;
  line-height: 1.05;
}
.metric small {
  color: var(--muted);
  font: 500 9px/1.35 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.plan-pad {
  padding: 15px 17px;
}
.sheet-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.sheet-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  font-size: 12px;
  color: var(--muted);
}
.sheet-toolbar select {
  max-width: min(63vw, 290px);
  font-size: 12px;
}
.sheet-dimension {
  font: 500 10px var(--mono);
  color: var(--muted);
}
.canvas-frame {
  background: #f0f0e2;
  border: 1px solid #e4e5d5;
  border-radius: 9px;
  background-image: radial-gradient(#bfc7b270 1px, transparent 1px);
  background-size: 12px 12px;
  padding: 6px;
}
.canvas-frame canvas {
  width: 100%;
  display: block;
  height: auto;
  max-height: 460px;
  object-fit: contain;
}
.legend {
  display: flex;
  gap: 10px 15px;
  flex-wrap: wrap;
  padding: 9px 0 1px;
  color: var(--muted);
  font-size: 11px;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.key {
  height: 9px;
  width: 9px;
  display: inline-block;
  border: 1px solid #73816d;
  border-radius: 2px;
}
.key.part {
  background: #b8d29e;
}
.key.keep {
  background: #fcf9ed;
}
.key.scrap {
  background: #dedfd0;
}
.key.cut {
  background: #c06441;
  border-color: #a95137;
}
.bench {
  border-top: 1px solid var(--line);
  margin-top: 13px;
  padding-top: 12px;
}
.bench-head,
.bench-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bench h3,
.compare h3 {
  font-size: 16px;
  letter-spacing: -0.025em;
}
.bench small {
  color: var(--muted);
  font-size: 11px;
}
.stepbox {
  background: #eef0e2;
  border-radius: 8px;
  padding: 11px 12px;
  margin: 9px 0;
  line-height: 1.45;
  font-size: 13px;
}
.stepbox b {
  display: block;
  margin-bottom: 3px;
}
.stepbox p {
  color: #495547;
}
.stepnav {
  display: flex;
  gap: 6px;
}
.stepdot {
  font: 500 10px var(--mono);
  color: #6c704e;
}
.compare {
  border-top: 1px solid var(--line);
  padding: 15px 17px;
  display: grid;
  gap: 9px;
}
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.compare-option {
  display: grid;
  gap: 4px;
  text-align: left;
  border: 1px solid var(--line);
  background: #f8f8ef;
  border-radius: 8px;
  padding: 10px;
  white-space: normal;
}
.compare-option[aria-pressed="true"] {
  border-color: #718e68;
  background: #e9f0df;
}
.compare-option strong {
  font-size: 13px;
}
.compare-option small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}
.compare-note {
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}
.breakdown {
  border-top: 1px solid var(--line);
  padding: 12px 17px;
  font-size: 12px;
  line-height: 1.5;
}
.breakdown summary {
  cursor: pointer;
  font-weight: 650;
}
.cut-index {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.cut-index .quiet {
  justify-content: flex-start;
  width: 100%;
  text-align: left;
}
.cut-output {
  margin: 6px 0 0;
  padding-left: 16px;
}
.key.band {
  background: #584384;
  border-color: #584384;
}
.banding {
  border: 1px solid var(--line);
  border-radius: 7px;
  margin: 0;
}
.banding legend {
  font-size: 13px;
  font-weight: 650;
}
.banding .dialog-copy {
  margin-top: 6px;
}
.breakdown ul {
  padding-left: 17px;
  margin: 9px 0;
}
.unplaced,
.message {
  padding: 10px 13px;
  background: #f4e7d8;
  color: #683c26;
  font-size: 13px;
  border-radius: 7px;
  line-height: 1.45;
}
.unplaced {
  margin: 11px 17px 0;
}
.message {
  margin-bottom: 12px;
}
.message.good {
  background: #e5edd7;
  color: #27452d;
}
.empty {
  padding: 25px 17px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.plan-empty {
  min-height: 240px;
  display: grid;
  place-content: center;
  text-align: center;
}
.plan-empty h3 {
  color: var(--green);
  font-size: 22px;
  margin-bottom: 5px;
}
.foot {
  color: var(--muted);
  padding: 21px 0 27px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  padding: 0;
  width: min(calc(100% - 24px), 510px);
  max-height: 90dvh;
  box-shadow: 0 21px 75px #15251d48;
}
dialog::backdrop {
  background: #13251db0;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  font-size: 25px;
  letter-spacing: -0.045em;
}
.close {
  font-size: 23px;
  padding: 0 6px;
  color: var(--muted);
}
#form-fields,
#menu-body {
  padding: 17px 20px;
  display: grid;
  gap: 13px;
}
.form-fields label,
#form-fields label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
}
#form-fields textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  font: inherit;
  background: var(--paper);
  color: inherit;
}
.fieldpair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.checkline {
  display: flex !important;
  align-items: center;
  gap: 9px !important;
}
.checkline input {
  accent-color: var(--green);
  width: 17px;
  height: 17px;
}
.dialog-copy {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.dialog-copy ol {
  padding-left: 20px;
}
.dialog-copy li {
  padding: 3px 0;
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding: 13px 20px;
}
.dialog-actions .danger {
  margin-right: auto;
}
.danger,
.form-error {
  color: var(--red);
}
.form-error {
  margin: 0 20px 12px;
  font-size: 13px;
}
.menu-item {
  justify-content: space-between;
  white-space: normal;
  text-align: left;
  line-height: 1.35;
}
.price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  background: #e9f0db;
  border-radius: 8px;
  padding: 11px 13px;
}
.price strong {
  font-size: 28px;
  letter-spacing: -0.055em;
}
#print-content {
  display: none;
}
@media (max-width: 940px) {
  .page,
  .mast-inner {
    padding-left: 18px;
    padding-right: 18px;
  }
  .workgrid {
    grid-template-columns: minmax(312px, 0.9fr) minmax(0, 1.4fr);
    gap: 11px;
  }
  .items th:first-child,
  .items td:first-child {
    padding-left: 11px;
  }
  .items td {
    padding-left: 4px;
    padding-right: 4px;
  }
}
@media (max-width: 730px) {
  .page {
    padding-top: 14px;
  }
  .page,
  .mast-inner {
    padding-left: 12px;
    padding-right: 12px;
  }
  .mast-inner {
    height: 55px;
  }
  .hero {
    min-height: 126px;
  }
  .hero-copy {
    padding: 15px 18px;
  }
  .hero h1 {
    font-size: 33px;
    margin: 7px 0 0;
  }
  .hero::before {
    inset: 0 0 0 20%;
  }
  .hero::after {
    background: linear-gradient(
      90deg,
      #20392c 3%,
      #20392cf5 39%,
      #20392c2e 100%
    );
  }
  .hero p {
    display: none;
  }
  .project-next {
    gap: 8px;
    padding: 8px 9px;
    font-size: 12px;
  }
  .project-next .btn {
    min-height: 44px;
  }
  .workgrid {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .project-bar {
    gap: 9px;
    padding: 12px 0;
  }
  .project-controls {
    gap: 6px;
  }
  .project-name {
    flex: 1 1 auto;
  }
  .project-name label {
    display: none;
  }
  .project-name select {
    max-width: 65vw;
  }
  .saved {
    display: none;
  }
  .panel-head {
    padding: 14px 13px 12px;
  }
  .plan-pad,
  .compare {
    padding: 12px 11px;
  }
  .editor-actions .btn,
  .bench-actions .btn,
  .bench-actions .quiet,
  .tabs button {
    min-height: 44px;
  }
  .metric {
    padding-left: 8px;
    padding-right: 8px;
  }
  .sheet-toolbar label {
    gap: 5px;
  }
  .sheet-toolbar select {
    max-width: 58vw;
  }
  .foot {
    padding-bottom: 19px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .btn,
  .quiet,
  .row-edit,
  .compare-option {
    transition:
      background-color 0.15s,
      border-color 0.15s,
      filter 0.15s;
  }
}
@media print {
  :root {
    background: white;
  }
  body {
    background: white;
    color: #151a14;
  }
  body > * {
    display: none !important;
  }
  #print-content {
    display: block !important;
    font-family: Instrument, sans-serif;
    font-size: 10pt;
  }
  #print-content h1 {
    font-size: 31pt;
    line-height: 1.04;
  }
  #print-content h2 {
    font-size: 21pt;
    margin: 0 0 5pt;
  }
  #print-content p {
    margin: 5pt 0;
  }
  #print-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8pt;
  }
  #print-content th,
  #print-content td {
    border-bottom: 1px solid #aeb2a7;
    padding: 4pt;
    text-align: left;
  }
  #print-content tr {
    break-inside: avoid;
  }
  #print-content img {
    width: 100%;
    max-height: 125mm;
    object-fit: contain;
  }
  #print-content .print-sheet {
    break-before: page;
  }
  #print-content.cut-plan-only .print-sheet:first-of-type {
    break-before: auto;
  }
  #print-content .print-legend {
    font-size: 8pt;
    color: #445244;
  }
  .labels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5pt;
  }
  .label {
    border: 1px solid #aeb2a7;
    border-radius: 3pt;
    padding: 6pt;
    break-inside: avoid;
    overflow-wrap: anywhere;
  }
  .label b {
    display: block;
    margin-bottom: 4pt;
  }
  .print-note {
    font-size: 9pt;
    color: #4b5648;
  }
  @page {
    margin: 13mm;
  }
}
