.proj-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; padding: 20px; max-width: 1180px; margin: 0 auto; align-items: start; }
.muted { color: var(--muted); } .small { font-size: 13px; }

.proj-side { display: grid; gap: 16px; position: sticky; top: 14px; }
.new-proj, .proj-list-wrap { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 16px 18px; }
.new-proj h2, .proj-list-wrap h2 { font-size: 16px; margin: 0 0 8px; }
.new-proj label { display: grid; gap: 5px; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--ink); }
.new-proj input, .new-proj select { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; background: var(--card); color: var(--ink); }
.latlon { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#genBtn { margin-top: 14px; width: 100%; background: var(--green); color: #fff; border: 0; border-radius: 8px; padding: 11px; font-weight: 800; font-size: 14px; cursor: pointer; }
#genBtn:hover { background: #26583f; }

.proj-list { display: grid; gap: 8px; }
.proj-item { text-align: left; display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel2); cursor: pointer; }
.proj-item:hover { background: var(--hover); }
.proj-item.on { border-color: var(--green); box-shadow: inset 3px 0 0 var(--green); }
.pi-name { font-weight: 800; font-size: 14px; }
.pi-meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.dossier { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 24px 26px; min-height: 400px; }
.empty { text-align: center; padding: 60px 20px; }
.dossier-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.dossier-head h2 { font-size: 24px; margin: 2px 0 0; }
.dh-actions { display: flex; gap: 8px; }
.dh-actions button { padding: 9px 14px; border-radius: 8px; border: 1px solid var(--green); background: var(--green); color: #fff; font-weight: 800; font-size: 13px; cursor: pointer; }
.dh-actions button.ghost { background: var(--card); color: var(--ink); border-color: var(--line); }

.stagebar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 12px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.stagebar .stage { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.stagebar .stage .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--tint); color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
.stagebar .stage.done .dot { background: var(--green); color: #fff; }
.stagebar .stage.cur { color: var(--ink); } .stagebar .stage.cur .dot { background: var(--gold); color: var(--on-gold); }
.stagesep { flex: 1; min-width: 8px; height: 1px; background: var(--line); }

.ds { padding: 18px 0; border-top: 1px solid var(--line); }
.ds:first-of-type { border-top: none; }
.ds-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ds-head h3 { font-size: 16px; margin: 0; }
.ds p { font-size: 14px; color: var(--ink); line-height: 1.55; }
.ds ul { padding-left: 20px; font-size: 14px; color: var(--ink); } .ds li { margin: 4px 0; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--panel2); }
.kpi .k { display: block; font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.kpi strong { font-size: 21px; font-variant-numeric: tabular-nums; }

table.spec { border-collapse: collapse; font-size: 13.5px; margin: 4px 0 10px; }
table.spec td { border-top: 1px solid var(--line); padding: 6px 24px 6px 0; }
table.spec td:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.warn { color: var(--gold); font-size: 13px; font-weight: 600; }

.permit { border: 1px solid var(--line); border-radius: 9px; margin: 8px 0; background: var(--panel2); }
.permit summary { padding: 11px 14px; cursor: pointer; font-size: 14px; }
.permit summary::-webkit-details-marker { color: var(--muted); }
.permit .draft { white-space: pre-wrap; font-size: 12.5px; background: var(--tint); border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 0 14px 12px; color: var(--ink); line-height: 1.5; }
.permit .muted { margin: 0 14px; }
.pm-apply { font-size: 10.5px; font-weight: 800; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; color: #fff; background: var(--muted); }
.pm-apply.likely, .pm-apply.required { background: var(--green); }
.pm-apply.verify, .pm-apply.ifisolated, .pm-apply.ifcountyditch, .pm-apply.with { background: var(--gold); color: var(--on-gold); }

@media (max-width: 820px) { .proj-layout { grid-template-columns: 1fr; } .proj-side { position: static; } }
@media print { .nav, .page-head, .proj-side, footer, .dh-actions { display: none; } .proj-layout { display: block; } .dossier { border: none; } }
