:root {
  color-scheme: light;
  --paper: #f7f5ee;
  --panel: #fffdf7;
  --ink: #1e2b39;
  --muted: #485868;
  --line: #d8dcda;
  --blue: #2855c6;
  --navy: #152b4a;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 "Trebuchet MS", sans-serif; }
a { color: inherit; }
.mast, main { width: min(1220px, calc(100% - 80px)); margin-inline: auto; }
.mast { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.mast a { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-size: 1.1rem; font-weight: 800; letter-spacing: -.025em; }
.brand-mark { position: relative; width: 27px; height: 27px; border: 2px solid var(--blue); border-radius: 5px; }
.brand-mark::before { content: ""; position: absolute; width: 57%; height: 61%; left: 0; top: 0; border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue); }
.mast nav { display: flex; gap: clamp(16px, 4vw, 38px); color: var(--muted); font-size: .9rem; }
.mast nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 74px); align-items: center; padding: clamp(45px, 5.6vw, 72px) 0 clamp(40px, 5vw, 64px); }
h1, h2 { font-family: Georgia, serif; line-height: 1.06; letter-spacing: -.05em; margin: 0; }
h1 { font-size: clamp(3rem, 4.45vw, 4.25rem); }
h1 span { display: block; color: var(--blue); }
h2 { font-size: clamp(1.8rem, 3.1vw, 2.65rem); }
.lead { max-width: 40ch; margin: 22px 0 27px; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.15rem); }
#upload { background: var(--panel); border: 1px solid var(--line); padding: 17px 18px; border-radius: 12px; }
.file-label { display: block; font-size: .875rem; font-weight: 700; margin-bottom: 6px; }
.file-entry { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; color: var(--muted); font-size: .75rem; }
input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-choice { background: #edf1fa; border: 1px solid #c7d1e9; border-radius: 6px; color: var(--navy); font-weight: 700; padding: 6px 9px; cursor: pointer; }
input[type=file]:focus-visible + .file-choice { outline: 3px solid var(--blue); outline-offset: 3px; }
#upload-help { overflow-wrap: anywhere; min-width: 0; }
.preview-note { margin-top: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 9px 14px; border: 1px solid var(--blue); border-radius: 7px; background: var(--blue); color: #fff; font: 700 .875rem/1.3 "Trebuchet MS", sans-serif; cursor: pointer; }
button:hover:not(:disabled) { filter: brightness(.92); }
button:disabled { cursor: not-allowed; opacity: .55; }
button.quiet, button.secondary { background: transparent; border-color: #b9c6df; color: var(--navy); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.fine, #status { font-size: .82rem; margin: 12px 0 0; }
.fine { color: var(--muted); }
#status { color: var(--navy); font-weight: 700; }
#status:empty { margin: 0; }
.price-line { margin: 14px 0 0; color: var(--muted); font-size: .87rem; }
.price-line span { margin-inline: 7px; }
.price-line strong { color: var(--ink); }
.visual-example { margin: 0; min-width: 0; padding: 12px; border: 1px solid #c9cfd3; border-radius: 15px; background: #ebeef0; box-shadow: 0 15px 40px #24365b12; }
.visual-example figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; color: var(--muted); padding: 3px 5px 12px; font: 700 .69rem "Courier New", monospace; text-transform: uppercase; letter-spacing: .05em; }
.visual-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.visual-sheet { min-width: 0; border-radius: 8px; overflow: hidden; }
.visual-sheet span { display: block; padding: 9px 11px; font-size: .77rem; font-weight: 700; }
.sketch-sheet { color: #3f3a34; background: #f1ede0; }
.cad-sheet { color: #e9f0ff; background: var(--navy); }
.visual-sheet img { display: block; width: 100%; height: auto; }
.visual-example > p { margin: 8px 5px 2px; color: var(--muted); font-size: .8rem; }
#review, .below, footer { border-top: 1px solid var(--line); }
#review { padding: 29px 0 38px; }
.section-head, .export { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.boards { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(285px,100%),1fr)); gap: 14px; margin: 23px 0; }
.boards figure, .dimensions { margin: 0; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.boards img { display: block; width: 100%; height: 300px; object-fit: contain; }
.boards figcaption, .dimensions { padding: 14px; }
.boards figcaption, .dimensions h3 { font-weight: 700; margin: 0; }
.dimensions p, .export p { font-size: .87rem; color: var(--muted); }
#values { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 12px; }
fieldset { min-width: 0; border: 1px solid var(--line); padding: 7px; }
fieldset label { display: grid; grid-template-columns: auto 1fr; gap: 5px; align-items: center; margin: 3px 0; font-size: .85rem; }
input[type=number], #geometry input, #geometry textarea { min-width: 0; width: 100%; padding: 5px; background: #fff; border: 1px solid #a8b3b7; }
#geometry { margin-bottom: 12px; }
#geometry label { display: block; margin: 10px 0; font-size: .83rem; }
#notes:empty, [hidden] { display: none !important; }
.below { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,.7fr); gap: clamp(26px,7vw,90px); padding: 38px 0 44px; }
.steps { display: grid; gap: 12px; color: var(--muted); margin: 19px 0 0; padding-left: 1.25rem; }
.steps strong, .steps span { display: block; }
.steps strong { color: var(--ink); }
.pricing { padding: 19px 22px; border-left: 2px solid var(--blue); background: #edf1f8; align-self: start; }
.pricing h2 { font-size: 1.55rem; }
.pricing p { font-size: .875rem; color: var(--muted); }
.pricing .amount { font: 700 1.6rem Georgia, serif; color: var(--navy); }
.amount span { font: .8rem "Trebuchet MS", sans-serif; color: var(--muted); }
footer { padding: 13px 0 30px; font-size: .8rem; color: var(--muted); }
@media (max-width: 850px) {
  .mast, main { width: min(650px, calc(100% - 38px)); }
  .hero, .below { grid-template-columns: 1fr; }
  .hero { gap: 25px; padding-top: 39px; }
  .lead { margin-block: 15px 20px; }
}
@media (max-width: 420px) {
  .mast, main { width: calc(100% - 28px); }
  .mast { min-height: 61px; gap: 12px; }
  .mast nav { gap: 11px; font-size: .775rem; }
  .brand { gap: .35rem; font-size: .92rem; }
  .brand-mark { width: 22px; height: 22px; }
  h1 { font-size: 2.75rem; }
  .file-entry { gap: 7px; }
  .export { flex-direction: column; align-items: flex-start; }
  .boards img { height: 250px; }
}

.visual-sheet img { aspect-ratio: 720 / 775; object-fit: contain; }
#source-link { float: right; color: var(--blue); font-size: .78rem; }
#values.field-grid { max-height: 17rem; overflow: auto; align-items: start; padding: 0 4px 3px 0; }

.read-progress{padding:1.2rem;border:1px dashed currentColor;border-radius:8px;opacity:.85}
