:root{--ink: #1f2933;--muted: #6b7280;--line: #cbd2d9;--moss: #3f6b4f;--paper: #ffffff;--bg: #eef0ee;font-family:system-ui,-apple-system,Segoe UI,sans-serif;color:var(--ink)}*{box-sizing:border-box}body{margin:0;background:var(--bg)}.app{display:grid;grid-template-columns:280px 1fr;min-height:100vh}.panel{overflow-y:auto;position:sticky;top:0;align-self:start;height:100vh;padding:20px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:14px}.panel h1{font-size:18px;margin:0}.panel label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600}.panel input,.panel select{padding:8px 10px;font-size:15px;border:1px solid var(--line);border-radius:8px}.panel button{padding:10px 12px;font-size:14px;font-weight:600;color:#fff;background:var(--moss);border:0;border-radius:8px;cursor:pointer}.panel button:disabled{opacity:.5}.panel .mini{font-size:11px;font-weight:600}.panel .mini input{width:100%;padding:5px 6px;font-size:13px}.opening-row{border:1px solid var(--line);border-radius:8px;padding:8px;display:flex;flex-direction:column;gap:6px}.panel label.check{flex-direction:row;align-items:center;gap:6px;font-weight:500;font-size:12.5px}.panel label.check input{width:auto}.row2{display:grid;grid-template-columns:1fr 1fr auto;gap:6px}.row2b{display:grid;grid-template-columns:1fr 1fr;gap:4px}.row3{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.row4{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}.panel button.ghost{color:var(--ink);background:#fff;border:1px solid var(--line);padding:6px 10px}.panel button.ghost.wide{width:100%}.openings{display:flex;flex-direction:column;gap:8px;font-size:13px}.hint,.muted{color:var(--muted);font-size:12.5px}.warn{color:#b45309;font-size:13px}.pageswrap{min-width:0}.pages{padding:24px;display:flex;flex-direction:column;gap:24px;align-items:center}.page{width:297mm;min-height:210mm;padding:10mm 12mm;background:var(--paper);box-shadow:0 1px 6px #0000001f;display:flex;flex-direction:column;gap:8mm}.page header{display:flex;justify-content:space-between;align-items:baseline;border-bottom:2px solid var(--ink);padding-bottom:3mm}.page header h2{margin:0;font-size:20px}.page header span{font-size:12px;color:var(--muted)}h3{margin:0 0 6px;font-size:14px}.split{display:grid;grid-template-columns:1.7fr 1fr;gap:8mm;align-items:start}.two{display:grid;grid-template-columns:1fr 1fr;gap:8mm;align-items:start}.side{font-size:12.5px;line-height:1.45}.side p{margin:0 0 8px}.steps{padding-left:18px}.steps li{margin-bottom:8px}table{width:100%;border-collapse:collapse;font-size:12px;margin-bottom:10px}th,td{text-align:left;padding:3px 6px;border-bottom:1px solid var(--line)}th{font-weight:700;background:#f4f6f4}.callout{border:1px solid #d97706;background:#fffbeb;padding:8px 10px;font-size:12.5px;border-radius:6px}.callout ul{margin:4px 0 0;padding-left:18px}ul{font-size:12.5px;line-height:1.45}svg.plan,svg.section{width:100%;height:auto;max-height:165mm}svg text{fill:var(--ink);font-family:inherit}svg .faint{fill:var(--muted)}svg .label{font-weight:600}.outline{fill:#f7f7f2;stroke:#6b7280;stroke-width:20;stroke-dasharray:80 50}.steel{stroke:#374151;stroke-linecap:butt}.hole{fill:#cbd5e1;stroke:#475569;stroke-width:12}.timber{fill:#e7c9a0;stroke:#8a5a2b;stroke-width:6}.noggin{fill:#f1dcb9;stroke:#8a5a2b;stroke-width:6}.wedge{fill:#fef3c7;stroke:#b45309;stroke-width:6;stroke-dasharray:40 24}.quad{display:grid;grid-template-columns:1fr 1fr;gap:4mm 8mm;align-items:center}.quad figure{margin:0}svg.boardwall{width:100%;height:auto;max-height:74mm}.framefaint{fill:#f6efe3;stroke:#d6c3a1;stroke-width:3}.boardpiece{fill:#fbbf244d;stroke:#b45309;stroke-width:6}.cedarface{fill:#f1dcc3;stroke:#a16207;stroke-width:4}.cedarboard{fill:none;stroke:#c08a4a;stroke-width:3}.metalface{fill:#e5e7eb;stroke:#6b7280;stroke-width:4}.metalsheet{fill:#94a3b840;stroke:#64748b;stroke-width:5}.battenline{stroke:#7c3f00;stroke-width:18;stroke-opacity:.55}.counterline{stroke:#1d4ed8;stroke-width:12;stroke-opacity:.35}.trimpiece{fill:#1e293b99;stroke:#0f172a;stroke-width:3}.soffitvent{fill:#fde68a;stroke:#b45309;stroke-width:6;stroke-dasharray:18 14}.soffitplain{fill:#e5e7eb;stroke:#6b7280;stroke-width:6}.fasciaoutline{fill:none;stroke:#1f2933;stroke-width:26}.cedartrim{fill:#92400e;stroke:#451a03;stroke-width:3}.ztrim{fill:#0f172a}.downlight{fill:#fde68a;stroke:#b45309;stroke-width:10}.elecbox{fill:#bfdbfe;stroke:#1d4ed8;stroke-width:6}.boardpiece.ins{fill:#facc1566;stroke:#a16207;stroke-width:4}.boardpiece.pb{fill:#94a3b852;stroke:#475569}.timber.perimeter{fill:#d4a373}.underjoist{fill:none;stroke:#8a5a2b;stroke-width:7;stroke-dasharray:30 18}.undernoggin{fill:#d9770640;stroke:#b45309;stroke-width:6}.noggin.ceilingnoggin{fill:#cbd5e1}.building{fill:none;stroke:#6b7280;stroke-width:12}.covering{fill:#9ca3af}.airgap{fill:#eef2f7}.opening{fill:#f8fafc;stroke:#94a3b8;stroke-width:6;stroke-dasharray:30 20}.opening.door{fill:#eff6ff}.steelhdr{fill:#4b5563;stroke:#1f2933;stroke-width:4}.timber.king{fill:#d9b583}.timber.jack{fill:#cfa56a}.timber.corner{fill:#c8a27a}.insulation{fill:#fef3c7}.sheet{fill:#e5e7eb;stroke:#4b5563;stroke-width:10}.sheet.cut{fill:#fed7aa}.chip{fill:#d6b98a;stroke:#8a5a2b;stroke-width:3}.steelbox{fill:#4b5563}.concrete{fill:#cbd5e1;stroke:#475569;stroke-width:3}.leader{stroke:#9ca3af;stroke-width:3}.ground{stroke:#6b7280;stroke-width:3;stroke-dasharray:20 10}.dim line{stroke:#1f2933;stroke-width:6}.dim text{paint-order:stroke;stroke:#fff;stroke-linejoin:round}.cutgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.cutgrid figure{margin:0}.cutgrid figcaption{font-size:11px;color:var(--muted)}svg.cut{width:100%;height:auto;border:1px solid var(--line)}svg.cut .stock{fill:#fafafa;stroke:#9ca3af;stroke-width:6}svg.cut .piece{fill:#fed7aa;stroke:#9a3412;stroke-width:5}.barrow{margin-bottom:8px}.barlabel{font-size:11px;color:var(--muted);margin-bottom:2px}.bar{display:flex;height:26px;border:1px solid #8a5a2b}.bar .cut,.bar .offcut{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:10px;line-height:1;background:#e7c9a0;border-right:1px solid #8a5a2b;overflow:hidden;min-width:0}.bar .cut small,.bar .offcut small{font-size:8px;color:#4b5563}.bar .offcut{background:repeating-linear-gradient(45deg,#fff,#fff 4px,#e5e7eb 4px,#e5e7eb 8px);border-right:0}.designs .row2c{display:grid;grid-template-columns:1.4fr 1fr auto;gap:4px}.designs input[type=text]{width:100%}.design-row{border:1px solid var(--line);border-radius:8px;padding:6px 8px;display:flex;flex-direction:column;gap:4px}.design-row.current{border-color:var(--moss);background:#f2f7f3}.panel button.link{background:none;border:0;color:var(--ink);text-align:left;padding:0;font-size:14px;font-weight:600;cursor:pointer}.panel button.link small{display:block;font-weight:400;color:var(--muted);font-size:11.5px}.design-actions{display:flex;align-items:center;gap:6px}.design-actions button.ghost{padding:2px 8px;font-size:12px}.viewbar{position:sticky;top:0;z-index:5;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 14px;background:#fff;border-bottom:1px solid var(--line)}.viewbar button{padding:8px 12px;font-size:13px;font-weight:600;color:#fff;background:var(--moss);border:0;border-radius:8px}.viewbar a.back{color:var(--moss);font-size:13px;font-weight:600;text-decoration:none}.viewbar .viewactions{display:flex;gap:8px}.viewbar button.quiet,.crewview button.quiet{color:var(--ink);background:#fff;border:1px solid var(--line)}.crewlist{display:grid;gap:10px;padding:14px;max-width:560px;margin:0 auto}.crewcard{display:flex;flex-direction:column;gap:2px;padding:14px 16px;background:#fff;border:1px solid var(--line);border-radius:12px;color:var(--ink);text-decoration:none}.crewcard span{color:var(--muted);font-size:13px}.login{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px}.login form{width:100%;max-width:340px;display:flex;flex-direction:column;gap:14px;padding:24px;background:#fff;border:1px solid var(--line);border-radius:14px}.login h1{margin:0;font-size:18px}.login label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600}.login input{padding:10px;font-size:16px;border:1px solid var(--line);border-radius:8px}.login button{padding:10px;font-size:15px;font-weight:600;color:#fff;background:var(--moss);border:0;border-radius:8px}.login button:disabled{opacity:.5}.viewmsg{padding:24px;text-align:center;color:var(--muted)}@media (max-width: 900px){.app{display:block}.panel{position:static;height:auto;border-right:0;border-bottom:1px solid var(--line)}.pages{padding:8px 4px;gap:12px}}@media print{.pages{zoom:1!important}@page{size:A4 landscape;margin:0}body{background:#fff}.no-print{display:none!important}.app{display:block}.pages{padding:0;gap:0}.page{box-shadow:none;break-after:page;width:297mm;height:auto;min-height:209mm;overflow:visible}}
