:root {
  color-scheme: light;
  --bg: #f3f5f1;
  --surface: #ffffff;
  --surface-soft: #f7f9f5;
  --surface-green: #edf5f0;
  --line: #d8dfd2;
  --line-strong: #bdc8b7;
  --text: #1e241e;
  --muted: #667062;
  --green: #176b5d;
  --green-dark: #0f4e45;
  --amber: #d69a2d;
  --red: #c95035;
  --blue: #376f92;
  --shadow: 0 18px 44px rgba(35, 43, 32, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 26px 28px 18px;
}

.topbar h1,
.panel-heading h2,
.visual-title h2 {
  margin: 0;
  color: var(--text);
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(1.38rem, 2vw, 2.05rem);
  line-height: 1.08;
}

.kicker {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.icon-action {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--green-dark);
  box-shadow: 0 8px 22px rgba(32, 36, 31, 0.08);
}

.icon-action:hover {
  border-color: #a8c8bf;
  background: #f3faf6;
}

.icon-action:disabled {
  cursor: wait;
  opacity: 0.58;
}

.icon-action svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.api-status {
  min-width: 0;
  max-width: 280px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: right;
}

.api-status[data-state="pending"] {
  color: var(--blue);
}

.api-status[data-state="success"] {
  color: var(--green-dark);
}

.api-status[data-state="error"] {
  color: var(--red);
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(185px, 230px) minmax(500px, 1fr) minmax(370px, 430px);
  gap: 20px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 28px 34px;
}

.step-rail,
.audit,
.visual-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.step-rail {
  align-self: start;
  position: sticky;
  top: 16px;
  padding: 14px;
}

.step-rail ol {
  display: grid;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.step-rail button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #333a31;
  font-weight: 800;
  text-align: left;
}

.step-rail button span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-green);
  color: var(--green-dark);
  font-size: 0.82rem;
}

.step-rail button.active {
  border-color: #bad3ca;
  background: #edf5f1;
  color: var(--green-dark);
}

.step-rail button.active span {
  background: var(--green);
  color: #fff;
}

.progress-box {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.progress-line {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e9e1;
}

.progress-line span {
  display: block;
  width: 16.66%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 180ms ease;
}

.progress-box strong {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.88rem;
}

.rail-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.rail-summary span {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.rail-summary b {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit {
  min-width: 0;
  padding: 26px;
}

.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
}

.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2,
.visual-title h2 {
  font-size: clamp(1.18rem, 1.7vw, 1.48rem);
  line-height: 1.16;
}

.field-grid,
.u-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

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

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

label {
  display: grid;
  gap: 8px;
  color: #333a31;
  font-size: 0.88rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd4c6;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
}

input {
  padding: 0 12px;
}

select {
  padding: 0 38px 0 12px;
}

input:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(23, 107, 93, 0.12);
}

.input-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #cbd4c6;
  border-radius: 8px;
  background: #fff;
}

.input-unit:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(23, 107, 93, 0.12);
}

.input-unit input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.input-unit span {
  display: grid;
  min-width: 62px;
  place-items: center;
  border-left: 1px solid #dfe5dc;
  background: #f5f7f3;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.mode-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.mode-strip label {
  display: block;
  min-width: 0;
  cursor: pointer;
}

.mode-strip input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.mode-strip span {
  display: grid;
  gap: 5px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mode-strip input:checked + span {
  border-color: #8fbdb0;
  background: var(--surface-green);
  box-shadow: inset 0 0 0 1px #8fbdb0;
}

.mode-strip b {
  color: var(--text);
  font-size: 0.98rem;
}

.mode-strip small {
  color: var(--muted);
  line-height: 1.3;
}

.notice,
.climate-strip {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #c7d9d2;
  border-radius: 8px;
  background: #f0f7f3;
  color: #335148;
  line-height: 1.4;
}

.notice strong {
  color: var(--green-dark);
}

.climate-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  background: #f8faf7;
}

.climate-strip div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.climate-strip span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.climate-strip b {
  color: var(--text);
  font-size: 1.05rem;
}

.location-map-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  overflow: hidden;
}

.map-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.map-heading h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
}

#mapSelectedLabel {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #edf5f1;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.poland-map {
  position: relative;
  aspect-ratio: 520 / 430;
  min-height: 290px;
  background:
    radial-gradient(circle at 18% 20%, rgba(94, 149, 176, 0.16), transparent 30%),
    radial-gradient(circle at 72% 32%, rgba(94, 149, 176, 0.11), transparent 28%),
    linear-gradient(180deg, rgba(219, 235, 239, 0.74), rgba(244, 248, 240, 0.98)),
    #eef5f0;
  overflow: hidden;
}

.poland-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-land {
  filter: url("#mapLandShadow");
  fill: url("#mapLandGradient");
  stroke: #78916f;
  stroke-linejoin: round;
  stroke-width: 3.4;
}

.map-region {
  fill: rgba(180, 205, 161, 0.28);
}

.map-region.cool {
  fill: rgba(126, 176, 193, 0.18);
}

.map-mountains {
  fill: none;
  stroke: rgba(111, 121, 92, 0.34);
  stroke-linecap: round;
  stroke-width: 18;
}

.map-lakes {
  fill: none;
  stroke: rgba(75, 140, 168, 0.32);
  stroke-linecap: round;
  stroke-width: 13;
}

.map-river {
  fill: none;
  stroke: #70a9bd;
  stroke-linecap: round;
  stroke-width: 4.2;
  opacity: 0.62;
}

.map-river.secondary {
  stroke-width: 3.4;
  opacity: 0.38;
}

.map-border {
  fill: none;
  stroke: rgba(103, 125, 95, 0.34);
  stroke-dasharray: 6 8;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.map-points {
  position: absolute;
  inset: 0;
}

.map-point,
.home-marker {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
}

.map-point {
  width: 11px;
  height: 11px;
  padding: 0;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(23, 107, 93, 0.18), 0 2px 8px rgba(25, 40, 29, 0.18);
}

.map-point::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: var(--green);
}

.map-point.incomplete {
  background: #fff8e7;
  box-shadow: 0 0 0 2px rgba(214, 154, 45, 0.24), 0 2px 8px rgba(25, 40, 29, 0.15);
}

.map-point.incomplete::after {
  background: #d69a2d;
}

.map-point.active {
  box-shadow: 0 0 0 5px rgba(214, 154, 45, 0.28), 0 2px 10px rgba(25, 40, 29, 0.2);
}

.map-point.active::after {
  background: var(--amber);
}

.map-point span {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  min-width: max-content;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(35, 43, 32, 0.13);
}

.map-point:hover span,
.map-point:focus-visible span {
  display: block;
}

.home-marker {
  width: 26px;
  height: 26px;
  background: #fff;
  box-shadow: 0 0 0 5px rgba(201, 80, 53, 0.16), 0 8px 18px rgba(70, 38, 30, 0.2);
  pointer-events: none;
}

.home-marker::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 4px;
  width: 11px;
  height: 11px;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px 2px 1px 2px;
  background: var(--red);
}

.home-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 10px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 1px;
  background: var(--red);
}

.map-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.map-status b {
  color: var(--text);
  white-space: nowrap;
}

.source-grid {
  margin-top: 16px;
}

.validation-list,
.status-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.status-list {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.status-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: #fff;
}

.status-item.ok {
  border-left-color: var(--green);
}

.status-item.warn {
  border-left-color: var(--red);
}

.status-item span {
  color: var(--text);
  font-weight: 850;
}

.status-item b {
  color: var(--green-dark);
  font-size: 0.83rem;
}

.status-item.warn b {
  color: #9b3927;
}

.status-item small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.check-row {
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbd4c6;
  border-radius: 8px;
  background: #fff;
}

.check-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--green);
}

.bill-panel {
  display: none;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.bill-panel.visible {
  display: block;
}

.bill-panel h3,
.results-two h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1.02rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.primary-button,
.secondary {
  min-width: 112px;
  min-height: 44px;
  border-radius: 8px;
  font-weight: 850;
}

.primary-button {
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
}

.primary-button:hover {
  background: var(--green-dark);
}

.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: #333a31;
}

.secondary:hover {
  border-color: #b6c2b0;
  background: #f7faf5;
}

.secondary:disabled {
  cursor: default;
  opacity: 0.45;
}

.secondary:disabled:hover {
  border-color: var(--line);
  background: #fff;
}

.wide-button {
  width: 100%;
}

.visual-card {
  align-self: start;
  position: sticky;
  top: 16px;
  overflow: hidden;
}

.visual-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 0;
}

#climateBadge {
  display: inline-grid;
  min-width: 66px;
  min-height: 34px;
  place-items: center;
  border-radius: 8px;
  background: #fff3dd;
  color: #865711;
  font-weight: 900;
}

.scene-shell {
  position: relative;
  width: 100%;
  height: 420px;
  margin-top: 10px;
  overflow: hidden;
  background: #eef3ed;
}

#buildingCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.scene-overlay {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 24px rgba(20, 35, 28, 0.1);
  pointer-events: none;
}

.scene-overlay.top-left {
  top: 14px;
  left: 14px;
}

.scene-overlay span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.scene-overlay b {
  color: var(--text);
  font-size: 0.9rem;
}

.scene-controls {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 24px rgba(20, 35, 28, 0.12);
}

.scene-controls button {
  min-width: 48px;
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.scene-controls button.active {
  border-color: #9fc7bb;
  background: #edf5f1;
  color: var(--green-dark);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8faf7;
}

.mini-stats div {
  padding: 13px 12px;
  border-right: 1px solid var(--line);
}

.mini-stats div:last-child {
  border-right: 0;
}

.mini-stats dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.mini-stats dd {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 900;
}

.loss-summary {
  display: grid;
  gap: 13px;
  padding: 17px 20px;
}

.loss-row {
  display: grid;
  grid-template-columns: 88px 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
}

.loss-row span {
  color: #333a31;
  font-weight: 850;
}

.loss-row b {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.loss-row i {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ece4;
}

.loss-row em {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--red);
  transition: width 180ms ease;
}

.u-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 0 20px 20px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.u-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.u-legend i {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.u-legend .good {
  background: #8dbd8a;
}

.u-legend .medium {
  background: #d9a33a;
}

.u-legend .bad {
  background: #c85c45;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.result-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
}

.result-tile,
.metric {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.result-tile.primary {
  border-color: #9fc7bb;
  background: var(--surface-green);
}

.result-tile.heat {
  border-color: #dfc07d;
  background: #fff8e8;
}

.result-tile span,
.metric span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.result-tile strong {
  color: var(--text);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1;
}

.result-tile strong .result-unit {
  display: block;
  margin-top: 5px;
  font-size: 0.45em;
  line-height: 1.1;
}

.result-tile small {
  color: var(--muted);
  line-height: 1.35;
}

.metric {
  min-height: 82px;
  background: #fff;
}

.metric b {
  color: var(--text);
  font-size: 1.3rem;
}

.results-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 22px;
}

.priority-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: priority;
}

.priority-list li {
  position: relative;
  min-height: 78px;
  padding: 13px 14px 13px 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #333a31;
  line-height: 1.35;
}

.priority-list li::before {
  content: counter(priority);
  counter-increment: priority;
  position: absolute;
  top: 14px;
  left: 12px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #fff0d6;
  color: #8f5a0d;
  font-size: 0.8rem;
  font-weight: 900;
}

.priority-list strong,
.heat-option strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.priority-list span,
.priority-list small {
  display: block;
}

.priority-list small {
  margin-top: 5px;
  color: var(--muted);
}

.heat-options {
  display: grid;
  gap: 10px;
}

.heat-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 76px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.heat-option p {
  margin: 0;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.35;
}

.fit-badge {
  display: inline-grid;
  min-width: 76px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #edf5f1;
  color: var(--green-dark);
  font-size: 0.75rem;
  font-weight: 900;
}

.fit-badge.medium {
  background: #fff3dd;
  color: #835411;
}

.fit-badge.low {
  background: #faebe7;
  color: #9c3823;
}

.workfile-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.workfile-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.disclaimer {
  margin: 22px 0 0;
  padding: 14px 16px;
  border-left: 4px solid var(--amber);
  background: #fff8ea;
  color: #6b542e;
  line-height: 1.45;
}

.ground-shape {
  stroke: #c1cdb9;
  stroke-width: 1.4;
}

.wall-face,
.side-face {
  stroke: rgba(31, 42, 29, 0.44);
  stroke-width: 1.8;
}

.roof-face,
.roof-side {
  stroke: rgba(58, 35, 26, 0.48);
  stroke-width: 1.8;
}

.window-shape {
  fill: url(#glassGradient);
  stroke-width: 2;
}

.door-shape {
  fill: #725a46;
  stroke: #4e3b2f;
  stroke-width: 1.1;
}

.heat-arrow {
  fill: none;
  stroke: var(--red);
  stroke-linecap: round;
  marker-end: url(#arrowHead);
  opacity: 0.72;
}

.sun-arc {
  fill: none;
  stroke: #d7a046;
  stroke-dasharray: 5 7;
  stroke-linecap: round;
  stroke-width: 2.2;
}

.compass circle {
  fill: #fff;
  stroke: #d4ddcf;
  stroke-width: 1.5;
}

.compass path {
  fill: var(--green);
}

.compass text,
.dimension-label,
.zone-label,
.station-tag text {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.station-tag path {
  fill: #edf5f1;
  stroke: #78aa9b;
  stroke-width: 1.5;
}

.station-tag circle {
  fill: var(--green);
}

.zone-label {
  fill: rgba(32, 36, 31, 0.72);
  font-size: 11px;
}

@media (max-width: 1240px) {
  .app-shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .visual-card {
    grid-column: 2;
    position: static;
  }
}

@media (max-width: 900px) {
  .topbar {
    padding: 18px 16px 12px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding: 0 16px 24px;
  }

  .step-rail,
  .visual-card {
    position: static;
  }

  .step-rail ol {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .step-rail button {
    justify-content: center;
    min-height: 44px;
    padding: 7px;
    font-size: 0;
  }

  .step-rail button span {
    margin: 0;
  }

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

  .audit {
    padding: 20px;
  }

  .field-grid,
  .u-grid,
  .mode-strip,
  .result-grid,
  .result-grid.compact,
  .results-two {
    grid-template-columns: 1fr;
  }

  .validation-list {
    grid-template-columns: 1fr;
  }

  .scene-shell {
    height: 380px;
  }

  .visual-card {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .topbar h1 {
    font-size: 1.28rem;
  }

  .top-actions {
    flex: 0 0 auto;
  }

  .api-status {
    flex: 1 0 100%;
    max-width: none;
    text-align: left;
  }

  .icon-action {
    width: 40px;
    height: 40px;
  }

  .step-rail {
    padding: 10px;
  }

  .rail-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .audit {
    padding: 16px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
  }

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

  .poland-map {
    min-height: 250px;
  }

  .map-heading,
  .map-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .scene-shell {
    height: 330px;
  }

  .scene-controls {
    left: 14px;
    right: auto;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .primary-button,
  .secondary {
    min-width: 0;
  }

  .mini-stats {
    grid-template-columns: 1fr;
  }

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

  .mini-stats div:last-child {
    border-bottom: 0;
  }

  .loss-row {
    grid-template-columns: 78px 44px minmax(0, 1fr);
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .step-rail,
  .form-actions {
    display: none;
  }

  .app-shell {
    display: block;
    padding: 0;
  }

  .audit,
  .visual-card {
    box-shadow: none;
    page-break-inside: avoid;
  }

  .step-panel {
    display: none;
  }

  .step-panel.result-panel {
    display: block;
  }
}
