:root {
  color-scheme: light;
  --bg: #f3f5f1;
  --panel: #ffffff;
  --ink: #1d2528;
  --muted: #667176;
  --line: #d9dfda;
  --accent: #116466;
  --accent-strong: #0b3f42;
  --gold: #c8922b;
  --red: #b84a42;
  --blue: #3d6f9f;
  --shadow: 0 14px 38px rgba(29, 37, 40, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  overflow: auto;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.app-body {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #0f1f1f;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: #fbfcf8;
  border-right: 1px solid rgba(29, 37, 40, 0.12);
  overflow: auto;
  box-shadow: 12px 0 36px rgba(15, 31, 31, 0.08);
}

.sidebar button {
  min-height: 32px;
  padding-inline: 10px;
  font-size: 0.82rem;
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-height: 42px;
  border-radius: 8px;
}

.sidebar-collapsed .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar-collapsed .sidebar {
  display: none;
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
}

.brand,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 1.45rem;
  line-height: 1.05;
}

h2 {
  font-size: 0.92rem;
}

.status-pill,
#featureCount {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 8px;
  background: #eef6f2;
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 800;
}

.import-panel,
.filters,
.downloads,
.layers-panel,
.insight-panel {
  display: grid;
  gap: 8px;
}

.import-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.client-project-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.client-project-actions button {
  min-height: 32px;
  padding: 0 8px;
  font-size: 0.75rem;
}

.insight-panel {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.insight-panel article {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(17, 100, 102, 0.14);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f4faf7);
}

.insight-panel span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.insight-panel strong {
  color: var(--accent-strong);
  font-size: 1.05rem;
}

.import-panel p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.45;
}

.site-body {
  background: #f6f8f5;
  overflow: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(22px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.site-header nav,
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.site-logo {
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 900;
}

.nav-cta,
.primary-link,
.secondary-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border-radius: 6px;
  padding: 0 14px;
}

.nav-cta,
.primary-link {
  background: var(--accent);
  color: #fff;
}

.secondary-link {
  border: 1px solid var(--accent);
}

.hero-section {
  min-height: 68vh;
  display: grid;
  align-items: center;
  padding: clamp(48px, 8vw, 96px) clamp(22px, 5vw, 72px);
  background:
    linear-gradient(90deg, rgba(246, 248, 245, 0.96), rgba(246, 248, 245, 0.72)),
    url("https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/4/9/5");
  background-size: cover;
  background-position: center;
}

.hero-content {
  max-width: 760px;
}

.hero-content h1 {
  max-width: 780px;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  line-height: 1;
}

.hero-content p {
  max-width: 660px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.site-section {
  padding: 56px clamp(22px, 5vw, 72px);
}

.muted-section {
  background: #fff;
  border-block: 1px solid var(--line);
}

.section-intro {
  max-width: 720px;
}

.section-intro h2,
.admin-panel h1,
.auth-card h1 {
  font-size: 1.55rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.feature-grid article,
.auth-card,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.feature-grid strong,
.feature-grid span {
  display: block;
}

.feature-grid span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-card {
  width: min(100%, 460px);
  display: grid;
  gap: 16px;
  box-shadow: var(--shadow);
}

.wide-auth-card {
  width: min(100%, 760px);
}

.auth-card form,
.form-grid {
  display: grid;
  gap: 13px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.check-line {
  grid-template-columns: auto 1fr;
  align-items: center;
  grid-column: 1 / -1;
}

.check-line input {
  width: 16px;
  min-height: 16px;
}

.messages {
  display: grid;
  gap: 8px;
}

.message {
  margin: 0;
  border-radius: 6px;
  padding: 10px 12px;
  background: #eef6f2;
  color: var(--accent-strong);
  font-weight: 800;
}

.message.error {
  background: #fdebea;
  color: #8e302a;
}

.admin-shell {
  display: grid;
  gap: 22px;
  padding: 28px clamp(22px, 5vw, 72px) 56px;
}

.admin-panel {
  overflow: hidden;
}

.admin-summary-panel {
  padding: 10px 14px;
}

.compact-stats {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.compact-stats strong {
  color: var(--accent-strong);
  font-size: 1rem;
}

.drop-zone {
  display: grid;
  gap: 6px;
  min-height: 128px;
  padding: 18px;
  align-content: center;
  border: 2px dashed #9eb4ad;
  border-radius: 8px;
  background: #f8fbf8;
  cursor: pointer;
}

.drop-zone.is-dragging {
  border-color: var(--accent);
  background: #ecf7f3;
}

.drop-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.drop-title {
  font-weight: 800;
}

.drop-copy {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

input,
select {
  min-height: 40px;
  padding: 0 11px;
}

textarea {
  min-height: 118px;
  padding: 10px 11px;
  resize: vertical;
  font: inherit;
}

.wide-field {
  grid-column: 1 / -1;
}

.sidebar label {
  gap: 4px;
  font-size: 0.76rem;
}

.sidebar input,
.sidebar select {
  min-height: 34px;
  padding: 0 9px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.text-button {
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
}

.text-button:hover {
  background: transparent;
  color: var(--accent-strong);
}

.action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.action-row button {
  min-width: 0;
  padding-inline: 8px;
}

.download-notice {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.layer-list {
  display: grid;
  gap: 6px;
  max-height: clamp(120px, 24vh, 240px);
  overflow: auto;
  padding-right: 2px;
}

.layer-toggle {
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfa;
  color: var(--ink);
  cursor: pointer;
}

.layer-toggle input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.layer-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--layer-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--layer-color) 18%, transparent);
}

.layer-toggle strong,
.layer-toggle small {
  display: block;
}

.layer-toggle strong {
  font-size: 0.8rem;
}

.layer-toggle small,
.layer-empty {
  color: var(--muted);
  font-size: 0.72rem;
}

.layer-empty {
  margin: 0;
}

.workspace {
  display: grid;
  grid-template-rows: minmax(390px, 1fr) minmax(230px, 34vh);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.map-panel {
  position: relative;
  min-height: 390px;
  min-width: 0;
  overflow: hidden;
  background: #dce5df;
}

#map {
  position: absolute;
  inset: 0;
}

.selection-capture {
  position: absolute;
  inset: 0;
  z-index: 505;
  display: none;
  cursor: crosshair;
  touch-action: none;
}

.selection-capture.is-active {
  display: block;
}

.selection-box {
  position: absolute;
  display: none;
  border: 2px solid #f7b733;
  background: rgba(247, 183, 51, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.78), inset 0 0 34px rgba(247, 183, 51, 0.18);
  pointer-events: none;
}

.selection-box.is-active {
  display: block;
}

.command-bar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 520;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.command-group,
.basemap-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.command-bar > button {
  pointer-events: auto;
  box-shadow: var(--shadow);
}

.command-bar button,
.basemap-switcher button,
.command-bar select {
  min-height: 34px;
  border-color: transparent;
  padding: 0 11px;
  background: transparent;
  color: var(--accent-strong);
  white-space: nowrap;
}

.command-bar select {
  width: auto;
  max-width: 220px;
  border: 0;
  font-weight: 800;
}

.command-bar button:hover,
.command-bar button.is-active,
.basemap-switcher button.is-active {
  background: var(--accent);
  color: #fff;
}

.map-toolbar {
  position: absolute;
  right: 16px;
  bottom: 34px;
  z-index: 510;
}

.legend-card {
  width: min(280px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.legend-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  text-transform: uppercase;
}

#legendList {
  display: grid;
  gap: 8px;
  max-height: 190px;
  overflow: auto;
}

.legend-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.map-status {
  position: absolute;
  left: 16px;
  bottom: 18px;
  z-index: 510;
  max-width: min(520px, calc(100vw - 32px));
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background: rgba(18, 51, 49, 0.88);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.feature-detail,
.spatial-panel {
  position: absolute;
  top: 78px;
  right: 16px;
  z-index: 530;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100% - 132px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(18px);
  box-shadow: 0 22px 58px rgba(29, 37, 40, 0.2);
}

.detail-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  min-height: 32px;
  border-color: transparent;
  background: #eef6f2;
  color: var(--accent-strong);
}

.feature-detail h2 {
  padding-right: 32px;
  font-size: 1.2rem;
}

.feature-detail dl,
.spatial-results {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.feature-detail dl div {
  display: grid;
  gap: 3px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.feature-detail dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.feature-detail dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.spatial-panel {
  left: 16px;
  right: auto;
  width: min(440px, calc(100vw - 32px));
}

.spatial-panel h2 {
  padding-right: 32px;
  font-size: 1.15rem;
}

.spatial-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.spatial-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.spatial-actions button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.spatial-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.spatial-group-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef6f2;
}

.spatial-group-chip strong {
  color: var(--accent-strong);
  font-size: 0.86rem;
}

.spatial-group-chip span {
  min-width: 0;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.spatial-result-group {
  display: grid;
  gap: 8px;
}

.spatial-result-group h3 {
  margin: 4px 0 0;
  color: var(--accent-strong);
  font-size: 0.84rem;
}

.spatial-result-group > p {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.spatial-result {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfa;
  color: var(--ink);
  text-align: left;
}

.spatial-result:hover {
  background: #eef6f2;
  color: var(--ink);
}

.spatial-result strong,
.spatial-result span {
  display: block;
  overflow-wrap: anywhere;
}

.spatial-result span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.leaflet-container.is-selecting,
.leaflet-container.is-measuring {
  cursor: crosshair;
}

.leaflet-container {
  background: #eef1ef;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.leaflet-control-attribution {
  font-size: 10px;
}

.results-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 7px;
  padding: 14px 16px 16px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  min-height: 0;
}

.results-panel .section-heading h2 {
  font-size: 0.95rem;
}

.results-panel .eyebrow {
  margin-bottom: 2px;
  font-size: 0.68rem;
}

.results-panel #featureCount {
  padding: 5px 8px;
  font-size: 0.72rem;
}

.results-summary-line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.results-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.results-tools label {
  width: min(360px, 100%);
}

.table-resize-handle {
  position: absolute;
  top: -5px;
  left: 0;
  right: 0;
  height: 10px;
  z-index: 20;
  cursor: ns-resize;
}

.table-resize-handle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 3px;
  width: 72px;
  height: 4px;
  border-radius: 999px;
  background: rgba(17, 100, 102, 0.28);
  transform: translateX(-50%);
}

.table-resize-handle:hover::before,
.is-resizing-table .table-resize-handle::before {
  background: var(--accent);
}

.selection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.selection-summary[hidden] {
  display: none;
}

.selection-summary strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid rgba(17, 100, 102, 0.18);
  border-radius: 8px;
  background: #eef8f5;
  color: var(--accent-strong);
  font-size: 0.78rem;
}

.selection-summary div,
.table-mode-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
}

.selection-summary button,
.table-mode-toggle button {
  min-height: 28px;
  border-color: transparent;
  padding: 0 8px;
  background: #fff;
  color: var(--accent-strong);
  font-size: 0.78rem;
}

.selection-summary button:hover,
.table-mode-toggle button:hover,
.table-mode-toggle button.is-active {
  background: var(--accent);
  color: #fff;
}

.table-mode-toggle {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf7;
}

.results-tools label {
  gap: 4px;
  font-size: 0.75rem;
}

.results-tools input {
  min-height: 34px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.9rem;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f8f4;
  color: var(--muted);
  font-size: 0.77rem;
  text-transform: uppercase;
}

th input,
td input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.sort-button {
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  text-transform: uppercase;
  box-shadow: none;
}

.sort-button:hover {
  background: transparent;
  color: var(--accent);
}

tbody tr:hover {
  background: #f7fbf9;
}

tbody tr.is-selected {
  background: #eef8f5;
  box-shadow: inset 3px 0 0 #f7b733;
}

.result-row {
  cursor: pointer;
}

.result-row:focus,
.result-row:hover {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: -2px;
  background: #eef8f5;
}

.empty-state {
  height: 120px;
  color: var(--muted);
  text-align: center;
  vertical-align: middle;
}

.badge {
  display: inline-flex;
  max-width: 160px;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef6f2;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.badge.gold {
  background: #fff3d4;
  color: #7a5315;
}

.badge.red {
  background: #fdebea;
  color: #8e302a;
}

.leaflet-popup-content {
  min-width: 210px;
}

.popup-title {
  margin: 0 0 8px;
  font-weight: 800;
}

.popup-list {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.commercial-home {
  --home-ink: #16201f;
  --home-muted: #5f6d69;
  --home-line: rgba(22, 32, 31, 0.12);
  --home-accent: #0b6b64;
  --home-deep: #123331;
  --home-gold: #d7a84a;
  background: #f7f8f4;
}

.luxury-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(247, 248, 244, 0.82);
}

.commercial-home .site-logo {
  color: var(--home-ink);
}

.commercial-home .nav-cta,
.commercial-home .primary-link {
  border: 1px solid #0f5f5a;
  background: #0f5f5a;
  color: #fff;
  box-shadow: 0 14px 32px rgba(15, 95, 90, 0.22);
}

.commercial-home .secondary-link {
  border-color: rgba(15, 95, 90, 0.28);
  background: rgba(255, 255, 255, 0.72);
  color: var(--home-deep);
}

.premium-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(460px, 1.05fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: clamp(44px, 6vw, 86px) clamp(22px, 5vw, 72px) 42px;
  background:
    radial-gradient(circle at 80% 14%, rgba(215, 168, 74, 0.24), transparent 24%),
    linear-gradient(135deg, #f9faf5 0%, #eef3ec 48%, #dce8e1 100%);
}

.premium-hero.product-hero {
  grid-template-columns: minmax(0, 0.88fr) minmax(460px, 1.12fr);
}

.hero-copy {
  max-width: 760px;
}

.hero-copy h1 {
  color: var(--home-ink);
  font-size: clamp(2.65rem, 6vw, 5.9rem);
  line-height: 0.94;
  text-wrap: balance;
}

.product-hero .hero-copy h1 {
  font-size: clamp(4rem, 10vw, 8.8rem);
  line-height: 0.86;
}

.hero-copy p {
  max-width: 660px;
  color: var(--home-muted);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.7;
}

.hero-lead {
  margin-top: 18px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.trust-row span {
  padding: 7px 10px;
  border: 1px solid rgba(15, 95, 90, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--home-deep);
  font-size: 0.78rem;
  font-weight: 900;
}

.hero-map-visual {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 30px 80px rgba(31, 54, 50, 0.22);
}

.map-browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  background: rgba(250, 252, 249, 0.9);
  border-bottom: 1px solid rgba(22, 32, 31, 0.1);
}

.map-browser-bar span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #d9e0dc;
}

.map-browser-bar span:first-child {
  background: #d96858;
}

.map-browser-bar span:nth-child(2) {
  background: #d7a84a;
}

.map-browser-bar span:nth-child(3) {
  background: #43a67b;
}

.map-browser-bar strong {
  margin-left: 10px;
  color: #31403d;
  font-size: 0.82rem;
}

.map-canvas-preview {
  position: relative;
  min-height: clamp(420px, 54vw, 640px);
  overflow: hidden;
  background: #a9c6bd;
}

.map-canvas-preview img {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.08);
}

.map-canvas-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 48, 45, 0.2), rgba(12, 48, 45, 0.02)),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.42), transparent 30%);
}

.map-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.55;
}

.basin-shape,
.seismic-line,
.well-dot,
.map-callout {
  position: absolute;
  z-index: 2;
}

.basin-shape {
  border: 2px solid rgba(255, 255, 255, 0.86);
  background: rgba(10, 115, 106, 0.34);
  box-shadow: inset 0 0 0 1px rgba(11, 107, 100, 0.36), 0 18px 38px rgba(10, 42, 40, 0.18);
}

.basin-one {
  left: 14%;
  top: 19%;
  width: 34%;
  height: 25%;
  border-radius: 42% 58% 51% 49% / 44% 38% 62% 56%;
  transform: rotate(-13deg);
}

.basin-two {
  right: 16%;
  top: 32%;
  width: 32%;
  height: 33%;
  border-radius: 56% 44% 48% 52% / 35% 54% 46% 65%;
  transform: rotate(16deg);
  background: rgba(215, 168, 74, 0.32);
}

.basin-three {
  left: 30%;
  bottom: 14%;
  width: 38%;
  height: 20%;
  border-radius: 34% 66% 46% 54% / 48% 40% 60% 52%;
  transform: rotate(7deg);
  background: rgba(59, 111, 159, 0.32);
}

.seismic-line {
  height: 3px;
  width: 58%;
  background: repeating-linear-gradient(90deg, #fff 0 18px, rgba(255, 255, 255, 0) 18px 30px);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.6);
}

.line-one {
  left: 16%;
  top: 55%;
  transform: rotate(-24deg);
}

.line-two {
  right: 6%;
  top: 24%;
  transform: rotate(34deg);
}

.well-dot {
  width: 14px;
  height: 14px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--home-gold);
  box-shadow: 0 0 0 7px rgba(215, 168, 74, 0.24), 0 12px 24px rgba(0, 0, 0, 0.16);
}

.dot-one {
  left: 36%;
  top: 38%;
}

.dot-two {
  right: 29%;
  top: 53%;
}

.dot-three {
  left: 55%;
  bottom: 25%;
}

.map-callout {
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 4px;
  min-width: 172px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 46px rgba(10, 42, 40, 0.18);
}

.map-callout span {
  color: var(--home-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.map-callout strong {
  color: var(--home-deep);
  font-size: 1.35rem;
}

.analysis-callout {
  min-width: 218px;
}

.analysis-callout small {
  color: var(--home-muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.layer-stack {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 18px;
  display: grid;
  gap: 7px;
  width: min(190px, calc(100% - 36px));
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 34px rgba(10, 42, 40, 0.14);
}

.layer-stack span {
  display: grid;
  grid-template-columns: 10px 1fr;
  align-items: center;
  gap: 7px;
  color: var(--home-deep);
  font-size: 0.76rem;
  font-weight: 900;
}

.layer-stack span::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #dc2626;
}

.layer-stack span:nth-child(2)::before {
  background: #2563eb;
}

.layer-stack span:nth-child(3)::before {
  background: #7136a8;
}

.layer-stack span:nth-child(4)::before {
  background: #c57a00;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--home-line);
  border-block: 1px solid var(--home-line);
}

.metric-strip article {
  display: grid;
  gap: 4px;
  padding: 28px clamp(22px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.72);
}

.metric-strip strong {
  color: var(--home-deep);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.metric-strip span {
  color: var(--home-muted);
  font-weight: 800;
}

.product-metrics strong {
  font-size: clamp(1.9rem, 3.5vw, 3.1rem);
}

.executive-section {
  background: #fbfcf8;
}

.premium-grid article {
  border-color: rgba(22, 32, 31, 0.1);
  background: linear-gradient(180deg, #fff, #f8faf5);
  box-shadow: 0 16px 38px rgba(31, 54, 50, 0.08);
}

.showcase-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 54px clamp(22px, 5vw, 72px);
  background: #152f2d;
  color: #fff;
}

.showcase-section div {
  max-width: 720px;
}

.showcase-section h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.showcase-section p,
.showcase-section .eyebrow {
  color: rgba(255, 255, 255, 0.74);
}

.workflow-section {
  padding: 58px clamp(22px, 5vw, 72px);
  background: #eef3ec;
  border-block: 1px solid var(--home-line);
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.workflow-steps article {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(22, 32, 31, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.workflow-steps span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--home-deep);
  color: #fff;
  font-weight: 900;
}

.workflow-steps strong {
  color: var(--home-deep);
  font-size: 1rem;
}

.workflow-steps small {
  color: var(--home-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.privacy-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 58px clamp(22px, 5vw, 72px);
  background: #152f2d;
  color: #fff;
}

.privacy-section div {
  max-width: 760px;
}

.privacy-section h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.privacy-section p,
.privacy-section .eyebrow {
  color: rgba(255, 255, 255, 0.74);
}

.inline-form {
  display: inline-grid;
}

.inline-form button {
  min-height: 34px;
  padding: 0 12px;
}

.admin-action-form {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: nowrap;
}

.admin-actions {
  display: grid;
  gap: 8px;
  min-width: 280px;
}

.admin-action-form label {
  width: 130px;
}

.admin-action-form input[type="number"] {
  min-width: 124px;
  min-height: 40px;
  padding: 0 8px 0 12px;
  font-size: 0.95rem;
  font-weight: 800;
  appearance: auto;
  -moz-appearance: auto;
}

.admin-action-form input[type="number"]::-webkit-inner-spin-button,
.admin-action-form input[type="number"]::-webkit-outer-spin-button {
  margin-left: 4px;
  opacity: 1;
}

.admin-action-form button {
  min-height: 40px;
  padding: 0 14px;
}

.admin-note {
  max-width: 360px;
  white-space: normal;
}

.admin-table-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.admin-table-heading h1 {
  margin: 0;
}

.admin-table-search {
  width: min(280px, 100%);
  margin-left: auto;
}

.admin-table-search span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-table-search input {
  min-height: 40px;
}

.table-sort-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0;
  text-align: left;
  text-decoration: none;
}

.table-sort-control:hover,
.table-sort-control.active {
  color: var(--accent);
}

.sort-indicator {
  min-width: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.table-sort-control.active .sort-indicator {
  color: var(--accent);
}

.auth-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workspace {
    grid-template-rows: 62vh minmax(260px, 38vh);
  }

  .feature-grid,
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .sidebar {
    padding: 16px;
  }

  .brand,
  .section-heading {
    align-items: flex-start;
  }

  .filter-grid,
  .action-row {
    grid-template-columns: 1fr;
  }

  .results-tools,
  .selection-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .map-toolbar {
    left: auto;
    right: 12px;
    bottom: 52px;
  }

  .command-bar {
    align-items: stretch;
    flex-direction: column;
    left: 12px;
    right: 12px;
  }

  .command-group,
  .basemap-switcher {
    overflow-x: auto;
  }

  .feature-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 980px) {
  .premium-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .product-hero {
    grid-template-columns: 1fr;
  }

  .hero-map-visual {
    max-width: 760px;
  }

  .workflow-steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .premium-hero {
    padding-top: 34px;
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

  .map-canvas-preview {
    min-height: 360px;
  }

  .showcase-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .privacy-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .workflow-steps {
    grid-template-columns: 1fr;
  }
}
