/* 4-Pillar Address Comfort Scorecard, 3D Sun/Shadow Simulator & Acoustic Ray-Shielding Styles */

/* ---------- Top 4-Pillar Scorecard ---------- */
.sn-pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.sn-pillar-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 15px 16px;
  background: #fafafa;
  border: 1px solid var(--cw99-line, #e9e9e9);
  border-radius: var(--cw99-r, 12px);
  color: #000 !important;
  text-decoration: none !important;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.sn-pillar-card:hover {
  border-color: var(--cw99-blue, #2457c6);
  box-shadow: 0 6px 20px rgba(36, 87, 198, .09);
  transform: translateY(-1px);
}

.sn-pillar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sn-pillar-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--cw99-muted, #5b6472);
}

.sn-pillar-kicker svg {
  width: 16px;
  height: 16px;
  color: var(--cw99-blue, #2457c6);
  flex-shrink: 0;
}

.sn-pillar-arrow {
  font-size: 14px;
  font-weight: 700;
  color: var(--cw99-blue, #2457c6);
}

.sn-pillar-val {
  font-size: clamp(18px, 1.45vw, 22px);
  font-weight: 700;
  line-height: 1.15;
  color: #000;
}

.sn-pillar-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--cw99-muted, #5b6472);
}

/* ---------- Status Pills ---------- */
.sn-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.sn-pill--good {
  background: #dcfce7;
  color: #166534;
}

.sn-pill--good-mod {
  background: #e0f2fe;
  color: #075985;
}

.sn-pill--mod {
  background: #fef3c7;
  color: #92400e;
}

.sn-pill--bad {
  background: #fee2e2;
  color: #991b1b;
}

.sn-pill--neutral {
  background: #eef2fc;
  color: #2457c6;
}

/* ---------- Homepage / City Feature Strip ---------- */
.sn-home-pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.sn-home-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--cw99-chip, #eef2fc);
  color: #1e3a8a;
  font-size: 13.5px;
  font-weight: 600;
}

.sn-home-chip svg {
  width: 15px;
  height: 15px;
  color: var(--cw99-blue, #2457c6);
  flex-shrink: 0;
}

/* ---------- Section Containers ---------- */
.sn-card {
  background: #fff;
  border: 1px solid var(--cw99-line, #e9e9e9);
  border-radius: var(--cw99-r-lg, 18px);
  padding: clamp(20px, 2.4vw, 32px);
}

.sn-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.sn-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--cw99-blue, #2457c6);
  margin-bottom: 6px;
}

.sn-eyebrow svg {
  width: 16px;
  height: 16px;
}

.sn-sub {
  margin-top: 6px;
  font-size: 15px;
  color: var(--cw99-muted, #5b6472);
  max-width: 72ch;
}

/* ---------- Solar Simulator Layout ---------- */
.sn-sim-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .95fr);
  gap: 22px;
  align-items: start;
}

.sn-stage-wrap {
  position: relative;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  background: #f8fafc;
}

.sn-svg {
  width: 100%;
  height: auto;
  display: block;
}

.sn-legend-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 10px 14px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  font-size: 12.5px;
  color: #475569;
}

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

.sn-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.sn-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  background: #fafafa;
  border: 1px solid var(--cw99-line, #e9e9e9);
  border-radius: 14px;
}

.sn-ctrl-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sn-ctrl-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
}

.sn-season-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.sn-season-btn {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1e293b;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all .14s ease;
}

.sn-season-btn:hover {
  border-color: var(--cw99-blue, #2457c6);
}

.sn-season-btn.is-active {
  background: var(--cw99-blue, #2457c6);
  border-color: var(--cw99-blue, #2457c6);
  color: #fff;
}

.sn-time-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sn-time-readout {
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--cw99-blue, #2457c6);
}

.sn-slider {
  width: 100%;
  accent-color: var(--cw99-blue, #2457c6);
  height: 6px;
  cursor: pointer;
}

.sn-slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #64748b;
}

.sn-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--cw99-blue, #2457c6);
  background: #eef2fc;
  color: var(--cw99-blue, #2457c6);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.sn-play-btn:hover {
  background: #dbeafe;
}

.sn-play-btn svg {
  width: 15px;
  height: 15px;
}

.sn-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: #0f172a;
}

.sn-sun-meta {
  font-size: 13px;
  color: #475569;
  padding-top: 4px;
  border-top: 1px solid #e2e8f0;
}

/* ---------- Tables & PV Bar ---------- */
.sn-table-block {
  margin-top: 22px;
}

.sn-table-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
}

.sn-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--cw99-line, #e9e9e9);
  border-radius: 12px;
}

.sn-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.sn-table th,
.sn-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid #eef0f4;
}

.sn-table thead th {
  background: #f8fafc;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #475569;
}

.sn-table tbody tr:last-child th,
.sn-table tbody tr:last-child td {
  border-bottom: none;
}

.sn-pv-bar {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14.5px;
}

.sn-pv-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sn-pv-main svg {
  width: 20px;
  height: 20px;
  color: #d97706;
  flex-shrink: 0;
}

/* ---------- Acoustic Section (#halas) ---------- */
.sn-noise-gauges {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.sn-gauge-card {
  padding: 18px 20px;
  background: #fafafa;
  border: 1px solid var(--cw99-line, #e9e9e9);
  border-radius: 14px;
}

.sn-gauge-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.sn-gauge-title {
  font-size: 14px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.sn-gauge-num {
  font-size: clamp(28px, 2.5vw, 38px);
  font-weight: 700;
  line-height: 1.05;
  margin: 6px 0 10px;
}

.sn-gauge-num span {
  font-size: 17px;
  font-weight: 500;
  color: #475569;
}

.sn-scale-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e 0%, #38bdf8 38%, #f59e0b 68%, #ef4444 100%);
  margin: 10px 0 6px;
}

.sn-scale-marker {
  position: absolute;
  top: -4px;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #0f172a;
  box-shadow: 0 2px 6px rgba(0,0,0,.22);
}

.sn-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #64748b;
}

.sn-facade-contrast {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #eef2fc;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 15px;
}

.sn-noise-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.sn-meta-box {
  padding: 14px 16px;
  background: #fafafa;
  border: 1px solid var(--cw99-line, #e9e9e9);
  border-radius: 12px;
  font-size: 14.5px;
}

.sn-meta-box strong {
  display: block;
  margin-bottom: 4px;
}

.sn-window-cta {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  background: #fafafa;
  border: 1px solid var(--cw99-line, #e9e9e9);
  border-radius: 12px;
}

.sn-window-cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sn-cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--cw99-yellow, #ffc73b);
  color: #000 !important;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
}

.sn-cta-pill:hover {
  background: var(--cw99-yellow-soft, #ffea84);
}

.sn-method-note {
  margin-top: 14px;
  font-size: 12.5px;
  color: #64748b;
}

@media (max-width: 980px) {
  .sn-pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sn-sim-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .sn-pillars,
  .sn-noise-gauges,
  .sn-noise-meta-grid {
    grid-template-columns: 1fr;
  }
}
