:root {
  color-scheme: light;
  --ink: #18211e;
  --muted: #68736e;
  --brand: #173c33;
  --brand-2: #245f51;
  --mint: #dcebe5;
  --paper: #fbfcfa;
  --line: #dfe5e1;
  --warm: #f0eadf;
  --shadow: 0 18px 50px rgba(27, 52, 44, .12);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #f3f6f3; min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.topbar { height: 76px; padding: 0 max(24px, calc((100vw - 1180px)/2)); display: flex; align-items: center; justify-content: space-between; background: var(--brand); color: white; }
.brand { color: inherit; text-decoration: none; display: flex; gap: 12px; align-items: center; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px 12px 4px 12px; background: #d9a85d; color: var(--brand); display: grid; place-items: center; font-weight: 900; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; font-size: 11px; color: #c8d8d3; letter-spacing: .08em; }
.sync { font-size: 13px; color: #d2ded9; display: flex; align-items: center; gap: 8px; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: #79d6a9; box-shadow: 0 0 0 4px rgba(121,214,169,.12); }
.top-actions { display: flex; align-items: center; gap: 16px; }
.install-button { border: 1px solid rgba(255,255,255,.35); background: transparent; color: white; border-radius: 9px; padding: 8px 12px; font-weight: 700; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 54px 0 72px; }
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.eyebrow { color: #9a6b2e; font-size: 12px; font-weight: 800; letter-spacing: .14em; margin: 0 0 10px; }
h1 { font-family: Georgia, serif; font-size: clamp(34px, 5vw, 58px); line-height: 1.03; letter-spacing: -.03em; max-width: 700px; margin: 0; }
.intro p:last-child { max-width: 670px; color: var(--muted); font-size: 17px; line-height: 1.55; margin: 18px 0 0; }
.primary, .secondary, .ghost { border: 0; border-radius: 12px; min-height: 48px; padding: 0 20px; font-weight: 700; }
.primary { background: var(--brand); color: white; box-shadow: 0 8px 20px rgba(23,60,51,.18); }
.primary:hover { background: var(--brand-2); }
.secondary { background: var(--mint); color: var(--brand); }
.ghost { background: transparent; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 42px 0 22px; }
.stats article { padding: 20px 22px; border: 1px solid var(--line); background: rgba(255,255,255,.75); border-radius: 16px; display: flex; align-items: center; justify-content: space-between; }
.stats span { color: var(--muted); font-size: 14px; }
.stats strong { font-size: 28px; font-family: Georgia, serif; color: var(--brand); }
.workspace { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
h2 { margin: 0; font-size: 24px; }
.search { display: flex; align-items: center; gap: 8px; min-width: 260px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--muted); }
.search input { border: 0; outline: 0; width: 100%; background: transparent; }
.empty { min-height: 310px; display: grid; place-items: center; align-content: center; text-align: center; padding: 32px; }
.empty-icon { width: 70px; height: 70px; border-radius: 20px; display: grid; place-items: center; background: var(--warm); color: #9a6b2e; font-size: 34px; }
.empty h3 { margin: 18px 0 6px; font-size: 20px; }
.empty p { color: var(--muted); max-width: 460px; margin: 0 0 20px; line-height: 1.5; }
.project-list { display: grid; gap: 12px; margin-top: 24px; }
.project-card { border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; grid-template-columns: 1fr auto; gap: 8px; background: white; cursor: pointer; transition: .18s ease; }
.project-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(27,52,44,.08); border-color: #b9cbc4; }
.project-card h3 { margin: 0; }.project-card p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.badge { align-self: center; background: var(--warm); color: #77501f; border-radius: 20px; padding: 7px 10px; font-size: 12px; font-weight: 700; }
dialog { border: 0; border-radius: 22px; padding: 0; width: min(540px, calc(100% - 28px)); box-shadow: 0 26px 90px rgba(8,28,22,.28); }
dialog::backdrop { background: rgba(10,28,23,.55); backdrop-filter: blur(3px); }
#project-form { padding: 28px; display: grid; gap: 18px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.icon-button { border: 0; background: #eef1ef; color: var(--muted); width: 36px; height: 36px; border-radius: 50%; font-size: 22px; }
#project-form label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
#project-form label span { color: #ad512f; }
#project-form input, #project-form select { width: 100%; height: 48px; border: 1px solid #cfd8d3; border-radius: 11px; padding: 0 13px; color: var(--ink); background: white; outline: 0; }
#project-form input:focus, #project-form select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(36,95,81,.1); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.app-layout { width: min(1380px, 100%); margin: 0 auto; display: grid; grid-template-columns: 250px 1fr 300px; min-height: calc(100vh - 76px); }
.side-nav { background: #edf2ef; border-right: 1px solid var(--line); padding: 28px 18px; }
.back-link { border: 0; color: var(--brand); background: transparent; font-weight: 750; padding: 7px 3px; margin-bottom: 20px; }
.project-mini { padding: 0 4px 22px; border-bottom: 1px solid #d7e0dc; margin-bottom: 18px; }
.project-mini h2 { font-size: 19px; margin-bottom: 5px; }.project-mini p { color: var(--muted); margin: 0; font-size: 13px; }
.nav-stage { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; background: transparent; color: #4d5a55; text-align: left; padding: 11px 10px; border-radius: 11px; font-weight: 650; margin: 3px 0; }
.nav-stage:hover { background: #e2ebe7; }.nav-stage.active { background: var(--brand); color: white; }
.stage-index { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: rgba(23,60,51,.1); font-size: 11px; }
.nav-stage.active .stage-index { background: rgba(255,255,255,.18); }.nav-stage.complete .stage-index { background: #b7ddca; color: #174a38; }
.editor { padding: 36px clamp(24px, 4vw, 54px) 80px; min-width: 0; background: #fbfcfa; }
.editor-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 28px; }
.editor-head h1 { font-size: clamp(31px, 4vw, 46px); }.editor-head p:last-child { color: var(--muted); margin: 10px 0 0; line-height: 1.5; }
.editor-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }.compact { min-height: 42px; padding: 0 14px; }
.form-section { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 24px; margin-bottom: 16px; }.form-section h2 { font-family: Georgia, serif; font-size: 25px; }.form-section > p { color: var(--muted); margin: 7px 0 22px; line-height: 1.5; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 17px; }.field-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }.span-2 { grid-column: span 2; }.span-3 { grid-column: span 3; }
.field { display: grid; gap: 7px; align-content: start; }.field > span:first-child { font-size: 13px; font-weight: 750; color: #35413c; }.field input, .field select, .field textarea { width: 100%; border: 1px solid #cfd8d3; background: white; border-radius: 10px; padding: 11px 12px; color: var(--ink); outline: 0; }.field input, .field select { height: 45px; }.field textarea { resize: vertical; min-height: 88px; line-height: 1.45; }.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(36,95,81,.1); }
.required { color: #aa492d; }.hint { font-size: 11px; color: var(--muted); line-height: 1.4; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }.check { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); padding: 12px; border-radius: 10px; font-size: 13px; line-height: 1.35; background: #fbfcfa; }.check input { margin-top: 2px; accent-color: var(--brand); }
.repeat-list { display: grid; gap: 10px; }.repeat-row { display: grid; grid-template-columns: 55px repeat(3, minmax(90px,1fr)) auto; gap: 8px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfa; }.repeat-row.modules { grid-template-columns: 90px 1.2fr repeat(3,90px) 1.4fr auto; }.repeat-row.hardware { grid-template-columns: 1fr 1fr 1fr 80px auto; }.repeat-label { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 850; background: var(--mint); color: var(--brand); align-self: end; }.remove-row { border: 0; border-radius: 9px; width: 40px; height: 40px; background: #f8e7e2; color: #963f29; font-size: 20px; }.add-row { margin-top: 12px; border: 1px dashed #9eb6ac; border-radius: 11px; background: #f1f6f3; color: var(--brand); min-height: 44px; padding: 0 16px; font-weight: 750; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }.photo-card { aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); position: relative; background: #edf1ee; }.photo-card img { width: 100%; height: 100%; object-fit: cover; }.photo-card button { position: absolute; right: 6px; top: 6px; border: 0; width: 28px; height: 28px; border-radius: 50%; background: rgba(26,34,31,.75); color: white; }.photo-upload { aspect-ratio: 4/3; border: 1px dashed #91aa9f; border-radius: 12px; display: grid; place-items: center; text-align: center; padding: 14px; color: var(--brand); background: #f4f8f6; font-weight: 750; cursor: pointer; }.photo-upload input { display: none; }.photo-upload small { display: block; color: var(--muted); font-weight: 400; margin-top: 4px; }
.quality-panel { padding: 30px 22px; background: #f4f7f5; border-left: 1px solid var(--line); }.quality-panel h3 { margin: 0 0 5px; }.quality-panel > p { margin: 0; color: var(--muted); font-size: 13px; }.score-ring { --score: 0; width: 150px; height: 150px; margin: 26px auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#2f8b68 calc(var(--score)*1%), #dce4e0 0); position: relative; }.score-ring::before { content:""; position:absolute; inset: 12px; border-radius: 50%; background: #f4f7f5; }.score-ring strong, .score-ring span { position: relative; display: block; text-align: center; }.score-ring strong { font-size: 34px; font-family: Georgia, serif; color: var(--brand); }.score-ring span { font-size: 11px; color: var(--muted); }.issue-list { display: grid; gap: 9px; }.issue { padding: 11px 12px; background: white; border: 1px solid var(--line); border-left: 4px solid #cf7c42; border-radius: 9px; font-size: 12px; line-height: 1.4; }.issue.ok { border-left-color: #2f8b68; }
.status-banner { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 13px; background: #f7eee2; color: #6d4b24; margin-bottom: 18px; }.status-banner.ready { background: #e1f2e9; color: #225c46; }.footer-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }.export-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }.export-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfa; }.export-card h3 { margin: 0 0 7px; }.export-card p { color: var(--muted); font-size: 13px; min-height: 38px; }.danger { color: #a13e2b; border-color: #e5bcb2; }.toast { position: fixed; right: 24px; bottom: 24px; padding: 13px 17px; border-radius: 11px; background: #142c25; color: white; box-shadow: var(--shadow); z-index: 20; animation: toast .2s ease; }.print-report { display: none; }@keyframes toast { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 720px) {
  .topbar { height: 66px; padding: 0 16px; }.sync span:last-child { display: none; }
  .shell { width: min(100% - 24px, 1180px); padding: 30px 0 86px; }
  .intro { display: grid; }.intro .primary { width: 100%; }
  .stats { grid-template-columns: 1fr; gap: 8px; margin-top: 28px; }.stats article { padding: 15px 18px; }
  .workspace { padding: 20px 16px; border-radius: 18px; }.section-heading { align-items: stretch; flex-direction: column; }.search { min-width: 0; }
  .empty { min-height: 280px; padding: 28px 8px; }
  .app-layout { display: block; }.side-nav { position: sticky; top: 0; z-index: 3; padding: 10px 12px; border: 0; overflow-x: auto; white-space: nowrap; display: flex; gap: 6px; }.project-mini, .back-link { display: none; }.nav-stage { display: inline-flex; width: auto; flex: 0 0 auto; margin: 0; padding: 9px 11px; }.stage-index { display: none; }.editor { padding: 24px 14px 80px; }.editor-head { display: grid; }.editor-actions { justify-content: flex-start; }.form-section { padding: 19px 15px; }.field-grid, .field-grid.three, .check-grid { grid-template-columns: 1fr; }.span-2,.span-3 { grid-column: span 1; }.repeat-row, .repeat-row.modules, .repeat-row.hardware { grid-template-columns: 1fr 1fr; }.repeat-label { grid-column: span 2; }.remove-row { justify-self: end; }.photo-grid { grid-template-columns: repeat(2,1fr); }.quality-panel { border: 0; border-top: 1px solid var(--line); }.export-grid { grid-template-columns: 1fr; }
}
@media (min-width:721px) and (max-width:1100px) { .app-layout { grid-template-columns: 220px 1fr; }.quality-panel { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }.quality-panel .issue-list { grid-template-columns: repeat(2,1fr); } }
@media print { .topbar,.app-layout { display:none!important; }.print-report { display:block; padding:12mm; font-family:"Segoe UI",sans-serif; color:#111; }.print-report header { border-bottom:3px solid #173c33; padding-bottom:8mm; margin-bottom:8mm; }.print-report header p { font-size:10px; letter-spacing:.12em; }.print-report h1 { font-size:28px; font-family:Georgia,serif; }.print-report h2 { margin:8mm 0 3mm; font-size:18px; page-break-after:avoid; }.print-report p { font-size:11px; line-height:1.5; }.print-report dl { display:grid; grid-template-columns:42mm 1fr; font-size:11px; }.print-report dt { font-weight:700; }.print-report dd { margin:0; }.print-report table { width:100%; border-collapse:collapse; font-size:9px; }.print-report th,.print-report td { border:1px solid #bbb; padding:4px; text-align:left; }.print-report tr { break-inside:avoid; } body { background:white; } }

.public-page { max-width: 1000px; margin: 0 auto; padding: 72px 24px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: center; }
.public-hero h1 { font: 700 clamp(38px,6vw,70px)/1.02 Georgia,serif; color: var(--ink); margin: 10px 0 22px; }
.public-hero>p:not(.eyebrow) { font-size: 19px; line-height: 1.65; color: var(--muted); margin-bottom: 30px; }
.public-card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.public-card p,.privacy-note { color: var(--muted); line-height: 1.6; }.public-footer { text-align:center; padding:24px; }
.login-page { min-height:100vh; display:grid; place-items:center; padding:24px; }
.login-card { width:min(420px,100%); background:white; border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow); padding:30px; display:grid; gap:17px; }
.login-card h1 { margin:12px 0 2px; }.login-card label { display:grid; gap:7px; font-weight:700; }.login-card input { padding:12px; border:1px solid var(--line); border-radius:9px; font:inherit; }
.login-error { color:#a13e2b; min-height:1.3em; margin:0; }.privacy-note { font-size:12px; }
.legal-page { max-width:820px; margin:0 auto; padding:48px 24px 90px; line-height:1.65; }.legal-page h1 { font:700 40px Georgia,serif; }.legal-page h2 { margin-top:30px; }
.draft-warning { background:#fff2d8; border:1px solid #e3b864; border-radius:12px; padding:16px; }
@media(max-width:720px){.public-page{grid-template-columns:1fr;padding-top:42px}.legal-page h1{font-size:32px}.top-actions .sync{display:none}}
