.geo-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 70px);
}
.geo-layout .lab-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 70px);
  overflow: auto;
  position: sticky;
  top: 0;
  padding: 26px 22px;
  border-right: 1px solid var(--line);
  background: #f7f7f3;
}
.geo-layout .lab-rail h1 {
  font-size: 28px;
  margin: 0 0 8px;
}
.geo-layout .lab-rail label {
  display: block;
}
.geo-layout .lab-rail .check {
  display: flex;
  gap: 9px;
  align-items: center;
}
.geo-layout .check input {
  width: auto;
  min-height: 20px;
}
.export-list {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.export-list h2 {
  font-size: 16px;
  margin: 0;
}
.geo-layout main {
  padding: 30px clamp(18px, 3vw, 48px);
  min-width: 0;
}
.geo-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
}
.geo-heading h2 {
  font-size: clamp(28px, 3.4vw, 46px);
  letter-spacing: -0.04em;
  margin: 0;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: #4b6871;
  margin: 0 0 10px;
}
.geo-heading > p {
  max-width: 36ch;
  color: var(--muted);
}
#geo-message {
  min-height: 25px;
}
.geo-stage {
  position: relative;
  background: radial-gradient(ellipse at 45% 30%, #344b53, #172b34 70%);
  height: clamp(400px, 63vh, 850px);
  overflow: hidden;
  border: 1px solid #38545e;
}
.geo-stage canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  touch-action: none;
}
.map-scale {
  position: absolute;
  bottom: 18px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: #f6f3e9;
  font-size: 14px;
  pointer-events: none;
  text-shadow: 0 1px 4px #132d38;
}
#geo-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: #c8d2ce;
  font-size: clamp(36px, 5vw, 78px);
  line-height: 1.5;
  letter-spacing: 0.1em;
  font-weight: 600;
  background: linear-gradient(120deg, #293f4755, #b2935422);
}
.profile-section {
  margin-top: 24px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px 20px;
}
.profile-section h2 {
  font-size: 20px;
  margin: 0;
}
#profile-plot {
  width: 100%;
  height: 170px;
  display: block;
}
.profile-section .section-heading {
  flex-wrap: wrap;
}
#geo-record {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  max-height: 280px;
  overflow: auto;
}
#run-progress {
  width: 90px;
  accent-color: #2e657b;
  height: 8px;
}
#run-progress[value="0"] {
  visibility: hidden;
}
#view-quality table {
  margin: 18px 0 28px;
  width: 100%;
  border-collapse: collapse;
}
#view-quality td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
[hidden] {
  display: none !important;
}
.drawing-stage {
  background: #dbe1e1;
  min-height: 650px;
  padding: 20px;
  overflow: auto;
  position: relative;
}
.drawing-stage svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: auto;
  background: #fff;
  box-shadow: 0 8px 30px #20333b16;
  touch-action: none;
}
.drawing-stage .selected {
  filter: drop-shadow(0 0 2px #b25b28);
  outline: 2px solid #b25b28;
}
.draw-toolbar {
  display: flex;
  gap: 8px;
  margin: 18px 0;
  flex-wrap: wrap;
}
.layer-item {
  display: flex !important;
  gap: 8px;
  align-items: center;
}
.layer-item input {
  width: auto;
  min-height: 20px;
}
#drawing-text {
  width: 100%;
  font: inherit;
  min-height: 70px;
}
#draw-inspector {
  display: grid;
  gap: 12px;
}
#draw-diagnostics {
  font-size: 14px;
  overflow-wrap: anywhere;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
canvas:focus-visible,
textarea:focus-visible {
  outline: 3px solid #a65036;
  outline-offset: 3px;
}
@media (max-width: 1000px) {
  .lab-header {
    flex-wrap: wrap;
  }
  .lab-header nav {
    flex-wrap: wrap;
    gap: 14px;
  }
  .geo-heading {
    display: block;
  }
  .geo-heading > p {
    max-width: none;
  }
  .geo-layout {
    grid-template-columns: 235px minmax(0, 1fr);
  }
}
@media (max-width: 700px) {
  .geo-layout {
    display: flex;
    flex-direction: column;
  }
  .geo-layout .lab-rail {
    position: static;
    max-height: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 20px;
    gap: 14px;
  }
  .geo-layout .lab-rail > h1,
  .geo-layout .lab-rail > details,
  .geo-layout .lab-rail > .export-list {
    grid-column: 1/-1;
  }
  .export-list {
    grid-template-columns: 1fr 1fr;
  }
  .export-list h2 {
    grid-column: 1/-1;
  }
  .geo-stage {
    height: 440px;
  }
  .geo-heading h2 {
    font-size: 32px;
  }
  .map-scale {
    font-size: 12px;
    flex-direction: column;
    gap: 4px;
  }
  .drawing-stage {
    min-height: 350px;
    padding: 10px;
  }
  #draw-inspector {
    grid-column: 1/-1;
  }
  .lab-header {
    padding: 16px 20px;
  }
  .profile-section {
    padding: 15px;
  }
  .geo-layout main {
    padding: 24px 18px;
  }
}
@media print {
  .lab-header,
  .lab-rail,
  .draw-toolbar,
  #geo-message {
    display: none !important;
  }
  .geo-layout {
    display: block;
  }
  .drawing-stage {
    padding: 0;
    background: #fff;
    min-height: 0;
  }
  .drawing-stage svg {
    box-shadow: none;
    width: 100%;
  }
  .geo-layout main {
    padding: 0;
  }
  .geo-stage {
    height: 60vh;
  }
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 0;
  transform: translateY(-150%);
  z-index: 20;
  background: white;
  padding: 12px;
}
.skip-link:focus {
  transform: translateY(0);
}
