*{box-sizing:border-box}
:root{--ink:#172e28;--green:#115c4d;--line:#cad4c9;--muted:#51665c;--page:#f8f9f5;--soft:#eff3ea;color-scheme:light}
html{scroll-behavior:smooth}
body{margin:0;background:var(--page);color:var(--ink);font:16px/1.5 "DM Sans","Segoe UI",Arial,sans-serif}
button,input,textarea,select{font:inherit;color:inherit}button,a,label.upload,summary{touch-action:manipulation}
a{color:inherit}button,select,summary,.upload{cursor:pointer}
button{background:transparent;border:0}button:disabled{cursor:not-allowed;opacity:.46}
:focus-visible{outline:3px solid #b46b27;outline-offset:3px}
[hidden]{display:none!important}.skip{position:absolute;top:-5em;background:white;padding:.5rem}.skip:focus{top:0}
.mast,main,footer{width:min(1392px,92%);margin-inline:auto}
.mast{height:76px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}
.wordmark{display:inline-flex;align-items:center;gap:9px;font-weight:750;letter-spacing:-.055em;font-size:1.42rem;text-decoration:none}
.wordmark svg{width:29px;height:29px;stroke:var(--green);stroke-width:2;fill:none;stroke-linejoin:round}
nav{display:flex;gap:28px}nav a,footer a{font-size:.94rem;color:#324a40;text-decoration:none}nav a:hover,footer a:hover,.crumb a:hover{text-decoration:underline}
.crumb{color:var(--muted);font-size:.85rem;margin-top:24px}.crumb span{margin:0 7px;color:#86988c}.crumb a{text-decoration:none}
.page-intro{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:23px 0 30px}
h1,h2,p{margin:0}h1{font-size:clamp(2.1rem,4.2vw,4.25rem);line-height:1.04;letter-spacing:-.062em;font-weight:650}h1 span{color:#347b58}
.page-intro p{margin-top:12px;color:var(--muted);font-size:1.05rem}
h2{font-size:1.14rem;line-height:1.3;letter-spacing:-.025em;font-weight:650}
.workspace{display:grid;grid-template-columns:minmax(282px,.9fr) minmax(0,2fr);gap:22px;align-items:start}
.controls,.preview-card,.downloads{background:#fff;border:1px solid var(--line);border-radius:9px}
.controls section,.downloads{padding:21px 22px}.controls section+section{border-top:1px solid var(--line)}
.section-head,.preview-head,.save-bar,.button-row,.upload-row,.legend,.save-bar>div{display:flex;align-items:center;gap:10px}.section-head,.preview-head,.save-bar{justify-content:space-between}
.helper,.hint,.feedback{color:var(--muted);font-size:.92rem;line-height:1.5}.helper{margin:6px 0 0}.hint{font-size:.82rem;margin-top:8px}
.measure{width:100%;height:76px;margin:9px 0 0;display:block;background:#f7f9f4;border:1px solid #e9eee7;border-radius:5px}
.switch{display:inline-flex;flex-shrink:0;padding:3px;border:1px solid var(--line);background:#f2f5ef;border-radius:6px;gap:2px}
.switch button{font-size:.85rem;font-weight:600;line-height:1.2;border-radius:4px;padding:7px 10px;color:#4c6055}
.switch button[aria-pressed=true]{background:#fff;color:var(--ink);box-shadow:0 1px 4px #10251a27}.switch button:hover{color:var(--green)}
.fields{display:grid;gap:11px;margin-top:13px}.three{grid-template-columns:repeat(3,minmax(0,1fr))}.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.fields label{display:flex;flex-direction:column;gap:5px;font-size:.88rem;font-weight:600}
.fields input,.fields select,.fields textarea{width:100%;min-width:0;padding:8px 10px;border:1px solid #bac8bc;border-radius:4px;background:white;font-size:.95rem;font-weight:400}
.fields input[aria-invalid=true]{border-color:#a14218;background:#fff7ef}
.fields select{appearance:none;background:white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23324a40' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") right .7rem center no-repeat;padding-right:2rem}
textarea{resize:vertical}
details{margin-top:14px;padding-top:12px;border-top:1px dashed var(--line)}summary{font-size:.87rem;color:var(--green);font-weight:600}
.upload-row{margin-top:12px;flex-wrap:wrap}.upload{position:relative;border:1px dashed #789782;padding:7px 12px;font-size:.85rem;font-weight:600;border-radius:4px;overflow:hidden}.upload:focus-within{outline:2px solid var(--green)}.upload input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}
.preview-card{overflow:hidden}
.preview-head{padding:15px 20px;border-bottom:1px solid var(--line)}
.drawing{min-height:275px;height:clamp(315px,39vw,510px);padding:clamp(16px,3vw,45px);display:grid;place-items:center;overflow:hidden;background-color:#eff3ea;background-image:linear-gradient(#738c7517 1px,transparent 1px),linear-gradient(90deg,#738c7517 1px,transparent 1px);background-size:20px 20px}
.drawing>svg{display:block;width:100%;height:100%;max-height:100%;filter:drop-shadow(0 3px 5px #263b2d15)}
.legend{padding:9px 18px;flex-wrap:wrap;border-top:1px solid var(--line);font-size:.81rem;color:var(--muted)}.legend span{display:inline-flex;align-items:center;gap:5px}
.legend i{width:20px;display:inline-block}.cut{border-top:2px solid #243832}.score{border-top:2px dashed #b06b44}.glue{height:8px;background:repeating-linear-gradient(125deg,transparent,transparent 2px,#8b9988 2px,#8b9988 3px)}#preview-note{margin-left:auto}
.readouts{display:grid;grid-template-columns:1.3fr 1fr 1fr;margin:0;padding:13px 18px;border-top:1px solid var(--line);gap:8px}
.readouts dt{font-size:.79rem;color:var(--muted);margin-bottom:2px}.readouts dd{font-weight:650;font-size:.94rem;margin:0}
.downloads{margin-top:14px}.button-row{margin-top:14px;flex-wrap:wrap}
.primary,.quiet{display:inline-flex;align-items:center;justify-content:center;font-weight:650;font-size:.91rem;line-height:1.3;min-height:40px;padding:9px 15px;border-radius:5px}
.primary{background:var(--green);color:white;border:1px solid var(--green)}.primary:hover:enabled{background:#093e34}.quiet{border:1px solid #a9b9aa;background:var(--page)}.quiet:hover:enabled,.upload:hover{background:#e7eee4}
.text-button{color:var(--green);text-decoration:underline;text-underline-offset:3px;font-weight:600;font-size:.87rem;padding:4px}
.save-bar{padding:14px 2px 0;font-size:.89rem;color:var(--muted);flex-wrap:wrap}.feedback{min-height:1.5em;color:var(--green);margin:5px 2px}
.notice{margin:12px 0 0;color:#743c18;background:#fff4df;border:1px solid #dfc099;border-radius:5px;padding:9px 13px;font-size:.9rem}
.guide{margin:38px 0;padding:24px 0;border-block:1px solid var(--line)}.guide h2{font-size:1.5rem}
.guide ol{display:grid;grid-template-columns:repeat(3,1fr);gap:28px;margin:15px 0 0;padding-left:22px}.guide li{padding-left:4px}.guide li::marker{color:var(--green);font-weight:650}.guide li p{font-size:.91rem;margin-top:4px;color:var(--muted)}
footer{display:flex;justify-content:space-between;padding:5px 0 32px}
dialog{width:min(430px,90vw);padding:24px;border:1px solid var(--line);border-radius:8px;color:var(--ink);box-shadow:0 12px 80px #122a2338}dialog::backdrop{background:#10261d66}
#saved-list{margin-top:15px;max-height:50vh;overflow:auto}.saved-item{display:block;width:100%;padding:12px 0;text-align:left;border-top:1px solid var(--line)}.saved-item:hover{color:var(--green)}.saved-item small{display:block;color:var(--muted)}
@media(max-width:850px){.workspace{grid-template-columns:minmax(240px,.85fr) minmax(0,1.3fr);gap:12px}.controls section,.downloads{padding:15px}.preview-head{flex-wrap:wrap;padding:12px}.drawing{height:320px}.readouts{grid-template-columns:1fr 1fr}.page-intro{margin-top:18px}}
@media(max-width:680px){.mast,main,footer{width:92%}.mast{height:60px}.wordmark{font-size:1.16rem}nav{gap:12px}nav a{font-size:.83rem}.crumb{margin-top:16px}.page-intro{align-items:start;flex-direction:column;gap:12px;margin-bottom:17px}.workspace{display:flex;flex-direction:column}.controls,.results{width:100%}.drawing{height:310px}.readouts{grid-template-columns:1.15fr 1fr .9fr}.readouts dd{font-size:.84rem}.guide ol{grid-template-columns:1fr;gap:14px}.guide{margin-top:20px}.preview-head .switch button{padding:6px 8px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
.mobile-tools{display:none}
.faq{max-width:850px;margin:0 0 42px}.faq h2{font-size:1.5rem}.faq summary{font-size:1rem}.faq p{color:var(--muted);margin:9px 0 2px}
@media(max-width:680px){.mobile-tools{display:flex;position:sticky;top:0;z-index:2;margin:0 0 12px;padding:9px 0;background:var(--page);border-block:1px solid var(--line);justify-content:space-around}.mobile-tools a{font-weight:600}#settings,#preview-title,#download-title{scroll-margin-top:55px}}
