
.civil-page-hero{padding:58px 0 34px;background:linear-gradient(180deg,#f7faff 0%,#fff 100%)}
.civil-page-hero .hero-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(330px,.9fr);gap:42px;align-items:center}
.civil-page-hero h1{font-size:clamp(40px,6vw,72px);line-height:.98;letter-spacing:-.055em;margin:10px 0 18px;max-width:850px}
.civil-page-hero p{font-size:18px;line-height:1.65;color:var(--muted);max-width:760px}
.civil-hero-points{display:grid;gap:10px;margin:24px 0 0;padding:0;list-style:none}
.civil-hero-points li{display:flex;gap:10px;align-items:flex-start;color:#40526a;font-size:14px}
.civil-hero-points li:before{content:"✓";width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#e8f1ff;color:var(--blue);font-weight:900;flex:0 0 auto}
.civil-location-note{border:1px solid #bad1ff;background:#f3f7ff;border-radius:18px;padding:22px}
.civil-location-note b{display:block;color:#0b4fb4;margin-bottom:8px}
.civil-location-note p{font-size:14px;margin:0}
.civil-location-example{display:block;margin-top:13px;padding:10px 12px;background:#fff;border:1px solid #dbe6f8;border-radius:10px;font:700 12px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;color:#27384f}

#civilApp{padding:28px 0 70px}
#civilApp *{box-sizing:border-box}
.civil-stepper{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-bottom:18px}
.civil-step{display:flex;align-items:center;gap:9px;color:#77849a;font-size:12px;font-weight:800}
.civil-step i{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:#e8edf5;color:#708097;font-style:normal}
.civil-step.active{color:var(--blue)}.civil-step.active i{background:var(--blue);color:#fff}
.civil-card{background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:0 14px 38px rgba(17,53,94,.075);overflow:hidden}
.civil-upload{display:grid;grid-template-columns:2fr 1.2fr 1fr 1fr auto auto;gap:13px;padding:18px;align-items:end}
.civil-upload label{font-size:12px;font-weight:850;color:#24364c}
.civil-upload input{display:block;width:100%;margin-top:7px;padding:11px 12px;border:1px solid #cad6e7;border-radius:10px;background:#fff;color:#15243a}
.civil-upload .civil-file-input{min-width:0}
.civil-upload button{height:43px}
.civil-status{grid-column:1/-1;background:#f6f8fc;border:1px solid #e5eaf2;border-radius:11px;padding:11px 13px;font-size:13px;color:#56677c}
.civil-hidden-advanced{display:none}
.civil-privacy-row{grid-column:1/-1;display:flex;gap:16px;flex-wrap:wrap;color:#65758b;font-size:11px}
.civil-privacy-row span:before{content:"✓";color:#078f65;font-weight:900;margin-right:5px}

.legend-review{margin-top:18px}
.civil-panel-head{min-height:64px;padding:14px 18px;border-bottom:1px solid #e6ebf3;display:flex;align-items:center;justify-content:space-between;gap:18px}
.civil-panel-head strong{font-size:17px}.civil-panel-head small{display:block;color:#768399;margin-top:4px}
.legend-review-body{padding:16px}
.legend-summary{padding:11px 13px;border-radius:10px;background:#eef5ff;color:#315d9b;font-size:13px;margin-bottom:13px}
.legend-table-wrap{overflow:auto;border:1px solid #e4e9f2;border-radius:13px}
.legend-table{width:100%;border-collapse:collapse;font-size:12px}
.legend-table th,.legend-table td{text-align:left;padding:10px;border-bottom:1px solid #edf0f5;vertical-align:top}
.legend-table th{background:#f7f9fc;color:#52627a;font-size:11px;position:sticky;top:0}
.legend-table input[type=text],.legend-table input:not([type]),.legend-table select{width:100%;padding:8px;border:1px solid #cfd8e7;border-radius:8px}
.legend-swatch{display:inline-block;width:34px;height:6px;border-radius:999px;background:var(--swatch)}
.connection-options{display:flex;gap:6px;flex-wrap:wrap;max-width:480px}
.connection-chip{display:inline-flex;align-items:center;gap:5px;padding:5px 7px;border:1px solid #dce3ee;border-radius:999px;background:#fff;font-size:10px;white-space:nowrap}
.legend-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:15px}

.civil-editor-grid{display:grid;grid-template-columns:minmax(360px,.85fr) minmax(560px,1.15fr);gap:18px;margin-top:18px}
.civil-pdf-card{height:800px}.civil-pdf-placeholder{height:735px;display:flex;align-items:center;justify-content:center;background:#e8edf5;color:#748197}
.civil-pdf-card iframe{display:none;border:0;width:100%;height:735px;background:#e8edf5}
.civil-map-card{height:856px}
.civil-toolbar{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.civil-toolbar button,.civil-building-toolbar button,.civil-zoom-controls button{border:1px solid #cdd6e5;border-radius:8px;background:#fff;font-weight:800;cursor:pointer}
.civil-toolbar button{padding:7px 9px;font-size:11px}
.civil-building-toolbar{min-height:58px;padding:8px 12px;border-bottom:1px solid #e6eaf1;background:#fbfcfe;display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:11px}
.civil-building-toolbar button{padding:7px 9px;font-size:11px}
.civil-building-toolbar label{display:flex;align-items:center;gap:5px;color:#566177;font-weight:700}
.civil-building-toolbar input[type=number]{width:60px;padding:5px;border:1px solid #cdd6e5;border-radius:6px}
#buildingStatus{color:#667085;margin-left:auto}
#mapViewport{height:650px;position:relative;overflow:hidden;background:#dde4ec;touch-action:none;cursor:grab;user-select:none}
#mapViewport.panning{cursor:grabbing}
#tilePane{position:absolute;inset:0;overflow:hidden}.map-tile{position:absolute;width:256px;height:256px;object-fit:cover;user-select:none;-webkit-user-drag:none}
#mapOverlay{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.civil-zoom-controls{position:absolute;left:12px;top:12px;display:flex;flex-direction:column;box-shadow:0 2px 8px #0002}
.civil-zoom-controls button{width:34px;height:34px;font-size:20px;border-radius:0}
.civil-zoom-controls button:first-child{border-radius:7px 7px 0 0}.civil-zoom-controls button:last-child{border-radius:0 0 7px 7px}
.civil-attribution{position:absolute;right:4px;bottom:3px;background:#ffffffd8;padding:2px 5px;font-size:10px;color:#445}
#editorStatus{height:51px;padding:10px 14px;border-top:1px solid #e6eaf1;background:#f7f9fc;font-size:12px;color:#566177}
.edge-casing{fill:none;stroke:#fff;stroke-width:6;stroke-linejoin:round;stroke-linecap:round;pointer-events:none}
.edge-visible{fill:none;stroke-width:3;stroke-linejoin:round;stroke-linecap:round;pointer-events:none}
.edge-hit{fill:none;stroke:transparent;stroke-width:18;pointer-events:stroke;cursor:pointer}
.edge-selected{stroke:#ffab00!important;stroke-width:5!important}
.node-hit{fill:transparent;stroke:transparent;stroke-width:18;cursor:move;pointer-events:all}
.node-core{stroke:#fff;stroke-width:2;pointer-events:none}.node-label{font-size:10px;font-weight:800;fill:#76221f;paint-order:stroke;stroke:#fff;stroke-width:3px;stroke-linejoin:round;pointer-events:none}
.vertex-handle{fill:#fff;stroke:#ff8a00;stroke-width:3;cursor:move;pointer-events:all}.vertex-selected{fill:#ffcf72}
.osm-building{fill:#7c3aed;fill-opacity:.055;stroke:#6d28d9;stroke-width:1.15;pointer-events:none}
.osm-building-matched{fill:#16a34a;fill-opacity:.10;stroke:#15803d;stroke-width:2;pointer-events:none}
.pdf-building{fill:none;stroke:#0891b2;stroke-width:1.35;stroke-dasharray:5 4;pointer-events:none}
.pdf-building-matched{fill:none;stroke:#059669;stroke-width:2;stroke-dasharray:6 3;pointer-events:none}
.building-connector{stroke:#16a34a;stroke-width:1.2;stroke-dasharray:4 4;opacity:.75;pointer-events:none}
.civil-output{margin-top:18px;min-height:250px}.civil-table-wrap{max-height:420px;overflow:auto}
.civil-output table{border-collapse:collapse;width:100%;font-size:12px}.civil-output th,.civil-output td{text-align:left;padding:8px 10px;border-bottom:1px solid #edf0f5}
.civil-output tr[data-selected=true]{background:#fff7df}
.civil-live-legend{display:flex;gap:12px;flex-wrap:wrap;font-size:11px;color:#596579}
.civil-live-legend span{display:flex;align-items:center;gap:5px}
.civil-dot{width:10px;height:10px;border-radius:50%;display:inline-block}.civil-line{width:18px;height:3px;display:inline-block}
.civil-tool-note{margin-top:18px;padding:18px;border:1px solid #cfe0ff;background:#f4f8ff;border-radius:16px;color:#405a7c;font-size:13px;line-height:1.65}

.civil-seo-section{padding:68px 0}.civil-seo-grid{display:grid;grid-template-columns:1fr 1fr;gap:42px}.civil-seo-grid h2{font-size:38px;letter-spacing:-.04em;margin-top:0}
.civil-workflow-list{display:grid;gap:14px}.civil-workflow-list article{display:grid;grid-template-columns:42px 1fr;gap:12px;padding:15px;border:1px solid var(--line);border-radius:15px;background:#fff}
.civil-workflow-list b{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#e8f1ff;color:var(--blue)}
.civil-workflow-list h3{margin:0 0 5px;font-size:16px}.civil-workflow-list p{margin:0;color:var(--muted);font-size:13px;line-height:1.55}
.civil-free-banner{margin-top:30px;padding:24px;border-radius:20px;background:linear-gradient(135deg,#0b63f6,#154cb6);color:#fff;display:flex;justify-content:space-between;gap:25px;align-items:center}
.civil-free-banner h2{margin:0 0 6px}.civil-free-banner p{margin:0;color:#dce8ff}

@media(max-width:1150px){
 .civil-page-hero .hero-grid,.civil-seo-grid{grid-template-columns:1fr}
 .civil-upload{grid-template-columns:1fr 1fr}
 .civil-upload .civil-file-input{grid-column:1/-1}
 .civil-editor-grid{grid-template-columns:1fr}
 .civil-pdf-card,.civil-map-card{height:760px}.civil-pdf-card iframe,.civil-pdf-placeholder{height:695px}
 #mapViewport{height:610px}
}
@media(max-width:700px){
 .civil-page-hero{padding-top:38px}.civil-page-hero h1{font-size:42px}
 .civil-stepper{grid-template-columns:1fr 1fr}.civil-step{font-size:10px}
 .civil-upload{grid-template-columns:1fr}
 .civil-upload>*{grid-column:1!important}
 .civil-panel-head{align-items:flex-start;flex-direction:column}
 .civil-editor-grid{grid-template-columns:1fr}
 .civil-map-card{height:900px}#mapViewport{height:640px}
 .civil-free-banner{align-items:flex-start;flex-direction:column}
}


/* Source-faithful legend review */
.legend-table{min-width:1180px}
.legend-table th:nth-child(2){min-width:285px}
.legend-table th:nth-child(3){min-width:240px}
.legend-table th:nth-child(5){width:74px;text-align:center}
.legend-table td:nth-child(5){text-align:center;vertical-align:middle}
.legend-source-entry{display:flex;align-items:center;gap:12px;min-width:260px}
.legend-source-image{display:block;width:220px;max-width:220px;height:auto;max-height:46px;object-fit:contain;object-position:left center;background:#fff;border:1px solid #edf0f5;border-radius:7px;padding:3px}
.legend-source-text{display:flex;flex-direction:column;gap:2px}
.legend-source-text strong{display:none;font-size:12px;color:#192338}
.legend-source-text small{font-size:10px;color:#718096}
.legend-interpretation-label{display:flex;flex-direction:column;gap:5px;font-size:10px;color:#718096;font-weight:700}
.legend-count{display:inline-flex;min-width:34px;height:28px;align-items:center;justify-content:center;border-radius:999px;background:#eef4ff;color:#2459a8;font-weight:800}
@media(max-width:850px){
  .legend-source-image{width:185px;max-width:185px}
}
