:root {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #f2f2ef;
  --border: #d7d7d2;
  --text: #101214;
  --muted: #5f6670;
  --primary: #0f1a23;
  --primary-contrast: #ffffff;
  --focus: rgba(15, 26, 35, 0.25);
  --danger: #c63b33;
  --shadow: 0 16px 40px rgba(15, 26, 35, 0.08);
  --radius: 16px;
  --radius-sm: 12px;
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="dark"] {
  --bg: #0e131a;
  --surface: #111a22;
  --surface-2: #151f2a;
  --border: #253241;
  --text: #eef3f9;
  --muted: #97a6b8;
  --primary: #eef3f9;
  --primary-contrast: #0e131a;
  --focus: rgba(238, 243, 249, 0.22);
  --danger: #ff6a5c;
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(circle at 15% 0%, rgba(42, 143, 123, 0.09), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(15, 26, 35, 0.08), transparent 40%),
    var(--bg);
}

[hidden] {
  display: none !important;
}

[data-theme="dark"] body {
  background: radial-gradient(circle at 15% 0%, rgba(68, 193, 164, 0.14), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(255, 255, 255, 0.07), transparent 55%),
    var(--bg);
}

a {
  color: inherit;
}

code {
  font-family: var(--mono);
  font-size: 0.95em;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 18px;
}

.toolbar { padding: 10px 30px;}

.page {
  padding: 18px 0 44px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.muted {
  color: var(--muted);
}

.hint {
  font-size: 12px;
}

.hint:empty {
  display: none;
}

.status {
  font-size: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(95, 102, 112, 0.18);
  background: rgba(95, 102, 112, 0.08);
  white-space: pre-wrap;
}

.status:empty {
  display: none;
}

.status.danger {
  border-color: rgba(198, 59, 51, 0.4);
  background: rgba(198, 59, 51, 0.12);
  color: var(--danger);
}

.hintBanner {
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: var(--surface-2);
  font-size: 13px;
  min-height: 18px;
}

.hintBanner:empty {
  display: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(14px);
}

[data-theme="dark"] .topbar {
  background: rgba(14, 19, 26, 0.82);
}

.topbar__inner {
  padding: 14px 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: var(--surface);
}

.brand__name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.topnav__link {
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

.topnav__link:hover {
  border-color: var(--border);
  background: var(--surface);
}

.topbar__right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.topbar__menu {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.chip__name {
  font-weight: 700;
}

.chip__meta {
  font-size: 12px;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  user-select: none;
}

.btn:hover {
  border-color: rgba(95, 102, 112, 0.55);
}

.btn:focus-visible,
.chip:focus-visible,
.toolBtn:focus-visible,
.padBtn:focus-visible,
.panel__icon:focus-visible,
.topnav__link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.btn--primary {
  border-color: transparent;
  background: var(--primary);
  color: var(--primary-contrast);
}

.btn--primary:hover {
  filter: brightness(1.05);
}

.btn--ghost {
  background: var(--surface-2);
}

.btn--wide {
  padding: 14px 18px;
  border-radius: 18px;
}

.btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

#downloadLink.is-disabled {
  pointer-events: auto;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel__header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel__title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.panel__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.panel__icon[aria-expanded="false"] {
  transform: rotate(-90deg);
}

.panel.is-collapsed .panel__body {
  display: none;
}

.panel__body {
  padding: 14px;
}

.intro__title {
  margin: 0 0 6px;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 800;
}

.intro__text {
  margin: 0;
  max-width: 900px;
}

.pageTitle {
  padding: 10px 2px;
}

.pageTitle__kicker {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 800;
}

.pageTitle__h1 {
  margin: 6px 0 6px;
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 900;
}

.pageTitle__sub {
  margin: 0;
  max-width: 980px;
}

.projectGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.projectCard {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: radial-gradient(circle at 0% 0%, rgba(15, 26, 35, 0.05), transparent 50%), var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 210px;
}

[data-theme="dark"] .projectCard {
  background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.06), transparent 55%), var(--surface);
}

.projectCard__title {
  font-size: 18px;
  font-weight: 900;
}

.projectCard__text {
  font-size: 14px;
  line-height: 1.45;
}

.projectCard__actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.contactGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tierGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.kvGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.planPicker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.planBtn {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  cursor: pointer;
}

.planBtn__name {
  font-size: 18px;
  font-weight: 900;
}

.planBtn__meta {
  margin-top: 6px;
  font-size: 13px;
}

.planBtn.is-selected {
  border-color: rgba(42, 143, 123, 0.8);
  box-shadow: 0 0 0 3px rgba(42, 143, 123, 0.18), var(--shadow);
}

.planBtn:hover {
  border-color: rgba(95, 102, 112, 0.65);
}

.steps {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.uploadPanel__body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 14px;
  align-items: start;
}

.uploadPanel__left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.uploadPanel__right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dropZone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  min-height: 96px;
  display: grid;
  place-items: center;
  padding: 14px;
  background: var(--surface-2);
  text-align: center;
  cursor: pointer;
}

.dropZone.is-dragover {
  border-color: rgba(95, 102, 112, 0.9);
  background: var(--surface);
}

.dropZone__title {
  font-weight: 800;
}

.dropZone__subtitle {
  margin-top: 4px;
  font-size: 13px;
}

.workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.workPanel__body {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 14px;
  align-items: stretch;
}

.exportMenu {
  padding: 10px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exportMenu__title {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.exportMenu__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.exportMenu__actions .btn {
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
}

.exportMenu .list {
  max-height: 220px;
}

.statsBox {
  padding: 10px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-family: var(--mono);
  white-space: pre-wrap;
  max-height: 240px;
  overflow: auto;
}

.toolColumn {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toolItem {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.toolLabel {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.25;
}

.toolBtn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
  font-size: 16px;
}

.toolBtn:hover {
  border-color: rgba(95, 102, 112, 0.55);
}

.toolBtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.toolDivider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}

.toolSection {
  padding: 10px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toolMeta {
  font-size: 12px;
  font-family: var(--mono);
}

.toolBtnWide {
  width: 100%;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pad {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  grid-template-rows: repeat(3, 44px);
  gap: 8px;
  justify-content: center;
}

.pad > div {
  display: none;
}

.padBtn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
}

.padBtn[data-dx="0"][data-dy="1"] {
  grid-column: 2;
  grid-row: 1;
}

.padBtn[data-dx="-1"][data-dy="0"] {
  grid-column: 1;
  grid-row: 2;
}

.padBtn.padBtn--center {
  grid-column: 2;
  grid-row: 2;
  background: rgba(95, 102, 112, 0.08);
}

.padBtn[data-dx="1"][data-dy="0"] {
  grid-column: 3;
  grid-row: 2;
}

.padBtn[data-dx="0"][data-dy="-1"] {
  grid-column: 2;
  grid-row: 3;
}

.padBtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.toolReadout {
  padding: 10px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-family: var(--mono);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toolReadout__row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.toolReadout .k {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 8px;
  background: var(--surface-2);
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  font-weight: 900;
}

.stage {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  display: grid;
  grid-template-rows: 1fr auto;
  height: clamp(360px, 55vh, 660px);
  min-height: 420px;
}

.stage__main {
  min-height: 0;
  position: relative;
}

.stage__canvas,
.stage__map {
  width: 100%;
  height: 100%;
}

.mapSearch {
  position: absolute;
  top: 10px;
  left: 56px;
  right: 10px;
  max-width: 420px;
  z-index: 600;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.mapSearch input {
  min-height: 38px;
}

.mapSearch__options {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 4px;
  font-size: 13px;
}

.mapSearch__results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  max-height: 220px;
  overflow: auto;
  z-index: 601;
}

.mapSearch__results.is-open {
  display: flex;
}

.mapSearch__item {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  font-weight: 700;
}

.mapSearch__item:hover {
  background: var(--surface);
}

.mapSearch__status {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 2px;
}

@media (max-width: 700px) {
  .mapSearch {
    top: 56px;
    left: 10px;
    right: 10px;
  }

  .topbar__inner {
    padding: 12px 6px;
  }

  .page {
    padding: 14px 6px 36px;
  }
}

.stage__footer {
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.stageFooter__title {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.statsBox--stageFooter {
  border-radius: 12px;
  max-height: 160px;
}

[data-theme="dark"] .leaflet-container {
  background: #0b1118;
}

.actionsRow {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
}

.actionsRow__right {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.statusRow {
  display: flex;
}

.settingsGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* Only add vertical spacing between direct stacked fields, not between grid columns */
.settingsBody > .field + .field {
  margin-top: 12px;
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

input,
select,
textarea {
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  min-height: 44px;
  line-height: 20px;
}

textarea {
  font-family: var(--mono);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 13px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.6;
}

.checkbox {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.field .checkbox {
  margin-top: 4px;
}

.checkbox input {
  min-height: auto;
  width: 16px;
  height: 16px;
}

.checkboxRow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.helpBtn {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  font-weight: 900;
  line-height: 1;
  padding: 0;
}

.helpBtn:hover {
  background: var(--surface);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 6px;
}

.listItem {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.listItem__meta {
  font-size: 12px;
  color: var(--muted);
}

.props {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.propRow {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}

.propRow button {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.textarea {
  width: 100%;
  resize: vertical;
}

.support {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.support__btn {
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
}

.support__btn:hover {
  background: var(--surface-2);
}

.legalFooter {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 0 2px;
  font-size: 12px;
  color: var(--muted);
}

.legalFooter a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted rgba(95, 102, 112, 0.5);
}

.legalFooter a:hover {
  color: var(--text);
  border-bottom-color: rgba(95, 102, 112, 0.9);
}

.legalFooter__sep {
  opacity: 0.7;
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

[data-dialog-fallback="true"] dialog[open] {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
}

.dialog {
  border: none;
  padding: 0;
  background: transparent;
  width: min(720px, 94vw);
}

.dialog--wide {
  width: min(920px, 96vw);
}

.dialog__card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.dialog__header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog__title {
  font-weight: 900;
}

.dialog__body {
  padding: 14px;
}

.dialog__note {
  margin-bottom: 12px;
  font-size: 12px;
}

.dialogNav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dialogNav a {
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 800;
}

.dialogNav a:hover {
  background: var(--surface);
}

.bullets {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kv {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 10px 10px;
}

.kv__k {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}

.kv__v {
  margin-top: 6px;
  font-family: var(--mono);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .projectGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .topbar__inner {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "brand right"
      "nav nav";
    align-items: start;
  }

  .brand {
    grid-area: brand;
  }

  .topbar__right {
    grid-area: right;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .topnav {
    display: none;
    grid-area: nav;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .topbar__menu {
    display: inline-flex;
  }

  .uploadPanel__body {
    grid-template-columns: 1fr;
  }

  .workPanel__body {
    grid-template-columns: 1fr;
  }

  .actionsRow {
    grid-template-columns: 1fr;
  }

  .actionsRow__right {
    justify-content: flex-start;
  }

  .settingsGrid {
    grid-template-columns: 1fr;
  }

  .grid2 {
    grid-template-columns: 1fr;
  }

  .projectGrid {
    grid-template-columns: 1fr;
  }

  .contactGrid {
    grid-template-columns: 1fr;
  }

  .tierGrid {
    grid-template-columns: 1fr;
  }

  .kvGrid {
    grid-template-columns: 1fr;
  }

  .planPicker {
    grid-template-columns: 1fr;
  }

  .stage {
    height: clamp(320px, 45vh, 560px);
    min-height: 360px;
  }
}

/* Reference point B visibility (JS toggles data-hide-ref-b on <html>) */
[data-hide-ref-b="true"] [data-ref="B"] {
  display: none !important;
}
