:root {
  --ink: #14201a;
  --muted: #4d5c54;
  --paper: #f3f6f2;
  --panel: #ffffff;
  --line: #d5ddd6;
  --moss: #2f6b4f;
  --moss-2: #1f4a37;
  --amber: #b45309;
  --rose: #9f1239;
  --font: "Instrument Sans", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.dsd-body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.dsd-top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 3vw, 2.5rem);
  background: rgba(243, 246, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.dsd-brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.dsd-nav {
  display: flex;
  gap: 1.1rem;
  font-size: 0.92rem;
  font-weight: 600;
}
.dsd-nav a { text-decoration: none; opacity: 0.8; }
.dsd-nav a:hover { opacity: 1; }

/* Full-bleed hero */
.dsd-hero {
  position: relative;
  min-height: min(78vh, 760px);
  display: grid;
  align-items: end;
  overflow: hidden;
}
.dsd-hero-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 40%;
  transform: scale(1.02);
  animation: dsd- ken 18s ease-in-out infinite alternate;
}
.dsd-hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20,32,26,0.25) 0%, rgba(20,32,26,0.72) 78%),
    linear-gradient(90deg, rgba(20,32,26,0.55) 0%, rgba(20,32,26,0.15) 55%);
}
.dsd-hero-copy {
  position: relative;
  z-index: 2;
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto 3.5rem;
  color: #fff;
}
.dsd-brand-mark {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.dsd-hero-copy h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  letter-spacing: 0.01em;
}
.dsd-hero-lead {
  margin: 0 0 1.4rem;
  max-width: 42ch;
  color: rgba(255,255,255,0.88);
  font-size: 1.05rem;
}
.dsd-hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.dsd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  border-radius: 2px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}
.dsd-btn:hover { transform: translateY(-1px); }
.dsd-btn-primary { background: #fff; color: var(--ink); }
.dsd-btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }

@keyframes dsd-ken {
  from { transform: scale(1.02) translate3d(0,0,0); }
  to { transform: scale(1.06) translate3d(-1.2%, -0.6%, 0); }
}

/* Map — Enklawa-like full width */
.dsd-map-section {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #e8eee8;
  padding: 2.5rem 0 0;
}
.dsd-map-intro,
.dsd-section-head {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto 1.25rem;
}
.dsd-kicker {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--moss);
}
.dsd-map-intro h2,
.dsd-section-head h2 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
}
.dsd-map-intro p,
.dsd-section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
}

.dsd-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.dsd-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.dsd-legend i {
  width: 0.85rem;
  height: 0.85rem;
  display: inline-block;
  border-radius: 2px;
}
.dsd-legend [data-s="wolny"] i { background: var(--moss); }
.dsd-legend [data-s="rezerwacja"] i { background: var(--amber); }
.dsd-legend [data-s="sprzedany"] i { background: var(--rose); }

.dsd-map-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  background: #d7ddd7;
}
.dsd-map-wrap .ds-floor-map-stage {
  position: relative;
  width: 100%;
  max-width: 100% !important;
}
.dsd-map-img {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
}
.dsd-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* DS Pro sets .ds-floor-map-svg { pointer-events: none } — links must opt back in */
  pointer-events: none;
  z-index: 2;
}
.dsd-poly-link,
.dsd-map-wrap a.ds-floor-area-link {
  pointer-events: auto !important;
  cursor: pointer;
  outline: none;
}
.dsd-poly {
  fill-opacity: 0.34;
  stroke-width: 1.6;
  stroke-linejoin: round;
  transition: fill-opacity 0.15s ease, stroke-width 0.15s ease;
  vector-effect: non-scaling-stroke;
  paint-order: stroke fill;
}
.dsd-poly[data-s="wolny"] { fill: var(--moss); stroke: #fff; }
.dsd-poly[data-s="rezerwacja"] { fill: var(--amber); stroke: #fff; }
.dsd-poly[data-s="sprzedany"] { fill: var(--rose); stroke: #fff; }
.dsd-poly-link:hover .dsd-poly,
.dsd-poly-link:focus .dsd-poly,
.dsd-poly-link.is-active .dsd-poly {
  fill-opacity: 0.55;
  stroke-width: 2.4;
}

.dsd-hover-tip {
  position: absolute;
  z-index: 5;
  min-width: 180px;
  padding: 0.75rem 0.9rem;
  background: rgba(20, 32, 26, 0.92);
  color: #fff;
  border-radius: 4px;
  pointer-events: none;
  transform: translate(-50%, -120%);
  font-size: 0.9rem;
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
}
.dsd-hover-tip strong { display: block; font-size: 1rem; margin-bottom: 0.15rem; }
.dsd-hover-tip span { opacity: 0.85; }

/* List full width */
.dsd-list-section,
.dsd-gov-section {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 3rem 0 3.5rem;
  background: var(--paper);
}
.dsd-gov-section { background: #e7ece7; border-top: 1px solid var(--line); }

.dsd-table-wrap {
  width: min(1280px, calc(100% - 2rem));
  margin: 1.25rem auto 0;
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--line);
}
.dsd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.dsd-table th,
.dsd-table td {
  padding: 0.95rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.dsd-table th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: #eef3ee;
}
.dsd-table tr[data-s="sprzedany"] { opacity: 0.7; }
.dsd-row-link {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  background: var(--ink);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 2px;
}
.dsd-row-link:hover { background: var(--moss); }

.dsd-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: #e4efe8;
  color: var(--moss);
}
.dsd-pill[data-s="rezerwacja"] { background: #fde8d2; color: var(--amber); }
.dsd-pill[data-s="sprzedany"] { background: #fce7ef; color: var(--rose); }

.dsd-gov-links {
  width: min(1280px, calc(100% - 2rem));
  margin: 1rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.dsd-gov-links a {
  padding: 0.8rem 1.1rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 2px;
}
.dsd-gov-links a:hover { background: var(--moss); }

.dsd-foot {
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
}
.dsd-foot a { color: var(--moss); }

/* Single house — readable detail */
.dsd-detail-hero {
  position: relative;
  min-height: min(52vh, 520px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #1a2a22;
}
.dsd-detail-hero-bg {
  position: absolute;
  inset: 0;
  background-image: var(--bg);
  background-size: cover;
  background-position: center 42%;
  filter: saturate(1.05);
}
.dsd-detail-hero-bg:after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,18,14,0.15) 0%, rgba(10,18,14,0.78) 100%),
    linear-gradient(90deg, rgba(10,18,14,0.55) 0%, rgba(10,18,14,0.2) 60%);
}
.dsd-detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto 2.5rem;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}
.dsd-back {
  display: inline-block;
  margin-bottom: 1rem;
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  opacity: 0.9;
}
.dsd-detail-chiprow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.6rem;
}
.dsd-chip-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.2rem;
  padding: 0.35rem 0.7rem;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  border-radius: 4px;
  text-shadow: none;
}
.dsd-pill-lg {
  padding: 0.4rem 0.85rem !important;
  font-size: 0.9rem !important;
  text-shadow: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.dsd-detail-hero-inner h1 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  color: #fff;
  letter-spacing: -0.02em;
}
.dsd-detail-sub {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.92);
}
.dsd-detail-price {
  margin: 0 0 1.2rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: #fff;
}
.dsd-detail-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.dsd-btn-accent {
  background: #c4a574 !important;
  color: #14201a !important;
  border-color: transparent !important;
}
.dsd-btn-disabled {
  background: rgba(255,255,255,0.18) !important;
  color: rgba(255,255,255,0.75) !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  cursor: default;
}
.dsd-detail-main {
  width: min(1100px, calc(100% - 2rem));
  margin: -1.25rem auto 3rem;
  position: relative;
  z-index: 3;
  display: grid;
  gap: 1.25rem;
}
.dsd-detail-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: 0 16px 40px rgba(20,32,26,0.08);
}
.dsd-detail-card h2 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: 1.55rem;
}
.dsd-fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}
.dsd-fact-grid > div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 0.95rem;
  background: #f3f7f3;
  border: 1px solid #e0e8e1;
  border-radius: 4px;
}
.dsd-fact-grid span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}
.dsd-fact-grid strong {
  font-size: 1.05rem;
  color: var(--ink);
}
.dsd-plans-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}
.dsd-plan {
  margin: 0;
  background: #f7f5f0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.dsd-plan a { display: block; }
.dsd-plan img {
  display: block;
  width: 100%;
  height: auto;
  background: #f4f1ea;
}
.dsd-plan figcaption {
  padding: 0.7rem 0.9rem;
  font-weight: 700;
  font-size: 0.92rem;
  border-top: 1px solid var(--line);
  background: #fff;
}
@media (max-width: 720px) {
  .dsd-plans-grid { grid-template-columns: 1fr; }
}
.dsd-form-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}
.dsd-form-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.65rem 1rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
  font-family: inherit;
}
.dsd-form-tabs button.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.dsd-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 0.75rem 0.9rem;
  border-radius: 4px;
  margin: 0 0 1rem;
}
.dsd-lead .ds-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.dsd-lead .ds-field { margin-bottom: 0.75rem; }
.dsd-lead .ds-field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--muted);
}
.dsd-lead input,
.dsd-lead textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 0.85rem;
  border: 1px solid #cfd8d2;
  border-radius: 4px;
  font: inherit;
  background: #fff;
}
.dsd-lead button[type="submit"] {
  margin-top: 0.5rem;
  background: var(--moss);
  color: #fff;
  border: 0;
  padding: 0.85rem 1.2rem;
  font-weight: 800;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}
.dsd-lead .ds-consents { margin: 0.75rem 0; }
.dsd-lead .ds-consent {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--muted);
}
.dsd-lead .ds-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.dsd-lead-result { margin-top: 0.75rem; font-weight: 700; }

@media (max-width: 720px) {
  .dsd-fact-grid,
  .dsd-lead .ds-form-grid { grid-template-columns: 1fr; }
}

/* legacy single kept for safety */
.dsd-single-hero {
  position: relative;
  min-height: 42vh;
  display: grid;
  align-items: end;
  overflow: hidden;
}
.dsd-single-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.dsd-single-copy {
  position: relative;
  z-index: 2;
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto 2.5rem;
  color: #fff;
}
.dsd-single-copy h1 {
  margin: 0.2rem 0 0.7rem;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.2rem);
}
.dsd-single-main {
  width: min(1100px, calc(100% - 2rem));
  margin: -1.5rem auto 3rem;
  position: relative;
  z-index: 3;
}
.dsd-single-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  gap: 1.5rem;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: clamp(1.25rem, 3vw, 2rem);
}
.dsd-price {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.02em;
}
.dsd-muted { color: var(--muted); margin: 0.25rem 0 1.25rem; }
.dsd-facts { margin: 0; }
.dsd-facts > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}
.dsd-facts dt { color: var(--muted); font-weight: 600; }
.dsd-facts dd { margin: 0; font-weight: 700; text-align: right; }
.dsd-single-aside {
  background: #eef3ee;
  padding: 1.25rem;
  border: 1px solid var(--line);
}
.dsd-single-aside h2 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
}
.dsd-single-aside .dsd-btn { width: 100%; margin-top: 0.65rem; }
.dsd-single-aside .dsd-btn-ghost {
  color: var(--ink);
  border-color: var(--line);
  background: #fff;
}

@media (max-width: 860px) {
  .dsd-single-grid { grid-template-columns: 1fr; }
  .dsd-hero { min-height: 68vh; }
}

/* Hide default theme chrome if it leaks */
body.dsd-body .wp-site-blocks > header,
body.dsd-body .wp-site-blocks > footer { display: none !important; }
