:root {
  color-scheme: light;
  font-family: Inter, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: #19312f;
  background: #f7faf8;
  --ink: #19312f;
  --teal: #10695b;
  --muted: #526964;
  --line: #d7e3df;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; font-size: 14px; line-height: 1.55; }
button, input, select { font: inherit; }
button, a { touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .51; }
a { color: var(--teal); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #2a918a; outline-offset: 3px; }
.app-header { background: #163b38; color: white; }
.header-inner, .workspace { max-width: 1304px; margin: auto; padding-inline: clamp(18px, 4vw, 56px); }
.header-inner { min-height: 63px; display: flex; align-items: center; gap: 19px; }
.wordmark { color: white; display: inline-flex; align-items: center; gap: 11px; font-size: 23px; font-weight: 700; letter-spacing: -.05em; text-decoration: none; }
.brand-mark { display: inline-block; position: relative; width: 27px; height: 22px; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; border: 2px solid #7ad5bc; transform: skewX(-19deg); }
.brand-mark::before { inset: 2px 4px 8px 0; border-radius: 4px 1px 9px 1px; }
.brand-mark::after { inset: 10px 0 1px 5px; border-top: 0; border-radius: 1px 2px 9px 3px; }
.project-name { color: #cae1d9; border-left: 1px solid #52716a; padding-left: 19px; font-weight: 500; }
.header-link { margin-left: auto; color: #daeee8; font-size: 13px; text-decoration: none; }
.flow-nav { display: flex; align-items: stretch; gap: clamp(11px, 2vw, 29px); border-bottom: 1px solid var(--line); }
.flow-nav button { background: none; padding: 17px 0 13px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; color: var(--muted); font-size: 13px; font-weight: 620; }
.flow-nav button[aria-current=page] { color: var(--teal); border-bottom-color: var(--teal); }
.page-heading { padding: clamp(23px, 3vw, 38px) 0 22px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(29px, 3.4vw, 44px); line-height: 1.18; font-weight: 710; letter-spacing: -.065em; }
.page-heading p { color: var(--muted); margin-top: 10px; font-size: 15px; }
.design-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.card { border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; min-width: 0; box-shadow: 0 2px 3px #1f493805; }
.work-card { grid-column: span 8; }
.reference-card { grid-column: span 4; }
.status-card { grid-column: 1 / -1; }
.card-heading { display: flex; align-items: center; gap: 9px; min-height: 53px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.card-heading h2 { font-size: 16px; letter-spacing: -.035em; font-weight: 710; }
.card-icon { color: var(--teal); display: inline-flex; align-items:center;justify-content:center; width:20px; font-size:20px;line-height:1; }
.upload-icon { border-bottom: 1.5px solid var(--teal); width: 16px; height: 19px; margin-inline: 2px; }
.intake-form, .reference-body { padding: 19px 20px; }
.fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.fields label, dt { font-weight: 620; color: #435b57; font-size: 12px; }
.fields input, .fields select { display: block; width: 100%; height: 38px; border: 1px solid #c4d4ce; border-radius: 6px; padding: 6px 10px; background: #fff; color: var(--ink); margin-top: 5px; }
input::placeholder { color: #7d908b; }
.file-drop { position: relative; display: flex; align-items: center; gap: 14px; margin-top: 15px; min-height: 80px; padding: 14px 18px; border: 1.5px dashed #87afa4; border-radius: 8px; background: #f4faf7; }
.file-drop:hover, .file-drop:focus-within, .file-drop.dragging { background: #e9f6ef; border-color: var(--teal); }
.file-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-drop strong, .file-drop small { display: block; }
.file-drop small { color: var(--muted); margin-top: 3px; }
.file-symbol { display: grid; place-items: center; border: 1px solid #b6cfc5; background: white; border-radius: 9px; width: 39px; height: 42px; font-size: 22px; color: var(--teal); }
.supplement { display: inline-flex; position: relative; align-items: center; gap: 7px; margin: 10px 0; min-height: 30px; color: var(--muted); cursor: pointer; font-size: 13px; }
.supplement input { cursor: pointer; opacity: 0; position: absolute; inset: 0; width: 100%; }
.supplement small { color: #71837f; }
.form-actions, .page-actions, .view-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.primary, .secondary, .subtle, .view-tools button, td button, .result-card button { border-radius: 6px; min-height: 36px; padding: 7px 13px; font-weight: 620; border: 1px solid #c6d6cf; font-size: 13px; background: white; }
.primary { background: var(--teal); color: white; border-color: var(--teal); }
.primary:hover { background: #09584c; }
.secondary, td button { color: var(--teal); }
.subtle { color: var(--teal); background: #f3f8f5; border-color: #d7e6df; }
.reference-body { display: grid; gap: 10px; }
.reference-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.reference-title strong { font-size: 21px; font-weight: 670; letter-spacing: -.035em; }
.reference-title span, .unit, .count { color: var(--muted); font-size: 12px; }
.drawing { display: block; border: 1px solid #dbe7e0; border-radius: 5px; aspect-ratio: 6.3; overflow: hidden; background: #f3f7f5; }
.drawing img { display: block; width: 100%; transform: translateY(-15%); }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.specs div, .model-details div { padding-left: 9px; border-left: 2px solid #c0d7ce; }
dt { color: var(--muted); font-weight: 500; }
dd { margin: 2px 0 0; font-weight: 620; }
.reference-links, .downloads { display: flex; gap: 5px 12px; flex-wrap: wrap; font-size: 12px; }
.reference-body details { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 7px; }
summary { cursor: pointer; color: var(--teal); font-weight: 620; }
details p { margin: 7px 0; overflow-wrap: anywhere; }
.count { color: var(--teal); background: #e7f3ec; min-width: 23px; text-align: center; border-radius: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse:collapse; font-size: 13px; }
td, th { text-align: left; padding: 11px 13px; border-bottom: 1px solid #e3ebe7; }
th { color: #4c6560; background: #eff6f2; font-size: 12px; white-space: nowrap; }
td { overflow-wrap: anywhere; }
td small, #issues small {display:block; color:var(--muted); }
td button, .result-card button { margin: 3px 0; font-size: 12px; }
#empty { text-align: center; padding: 28px 14px; color: var(--muted); }
#setupFuelReason,#resultFuelReason, #comparisonLockNotice:not(:empty) { margin: 10px 16px; font-size: 12px; color: #725d34; }
#uploadStatus:not(:empty), #message:not(:empty) { padding: 9px 12px; border-radius: 5px; margin-top: 10px; }
#uploadStatus:not(:empty) { color: var(--teal); background: #edf6f0; }
#message:not(:empty) { color: #8a3127; background: #fcf0ec; border: 1px solid #ecd8d0; }
.page-actions { justify-content: flex-end; margin: 17px 0 45px; }
.result-card { padding: 16px 22px; }
#issues { list-style: none; margin: 0; padding: 0; }
#issues li {border-bottom: 1px solid var(--line); padding: 14px 0; }
#issues button {margin-left: 9px;}
.status-card > section { padding: 12px 20px; }
.status-card > section h2 { font-size: 14px; }
.table-scroll > section:has(ul:empty) { display:none; }
.table-scroll > section { padding: 10px 18px; }
.table-scroll > section h2 {font-size: 13px;}
.table-scroll > section ul {margin: 6px 0; padding-left: 20px; }
.unit { margin-left: auto; }
.model-stage { position: relative; overflow: hidden; background: radial-gradient(ellipse at 45% 33%, #254740 0%, #152e2e 73%); }
.model-stage::before { content:""; position:absolute; inset:0; pointer-events:none; background-image: linear-gradient(#a0cab50c 1px,transparent 1px),linear-gradient(90deg,#a0cab50c 1px,transparent 1px); background-size:26px 26px; }
canvas { position:relative; display:block; width:100%; height: clamp(265px,28vw,420px); touch-action:none; cursor: grab; }
canvas:active {cursor:grabbing;}
.camera-label,.canvas-hint { position:absolute; pointer-events:none; color:#b5cdc4; font-size:12px; }
.camera-label {top:15px;left:16px; color:#d8eee4;}
.canvas-hint {right:13px;bottom:10px;}
.view-tools { padding: 12px 16px; }
.view-tools button { min-height:30px; padding:4px 10px; font-size:12px; }
.view-tools [aria-pressed=true] { border-color: #81ab9d; background: #eaf4ee; color: var(--teal); }
.view-tools button:last-child {margin-left:auto;}
.model-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 10px; margin:0 0 6px; }
.model-details dd { overflow-wrap:anywhere; }
.model-details div:first-child { grid-column:1/-1; }
#modelReference small {display:block;color:var(--muted);}
.measurement-card { margin-top: 16px; padding: 13px 18px; }
.measurement-card p {font-size:13px;color:var(--muted);}
@media (max-width: 767px) {
  .header-inner { gap:10px; min-height:53px; }.project-name {display:none;}.wordmark {font-size:21px;}.header-link {font-size:12px;}
  .flow-nav {gap:16px;} .flow-nav button { font-size:12px; padding:13px 0 10px; }
  .design-grid {grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}.work-card,.reference-card,.status-card{grid-column:span 4;}
  .card-heading {padding:11px 15px;min-height:45px;}.intake-form,.reference-body{padding:15px;}
  .fields {grid-template-columns:1fr 1fr;gap:9px;}.fields label:first-child {grid-column:1/-1;}
  .reference-body .drawing {max-height:74px;}.page-actions{justify-content:flex-start;}.file-drop{padding:10px;}
  .status-card table{min-width:680px;} .measurement-card table{min-width:400px;}
}
@media (prefers-reduced-motion: no-preference) {
  button, .file-drop { transition: background-color .16s, border-color .16s; }
}
