/* RateAtlas - Solar Savings Calculator
   tools.rateatlas.org/solar-savings-calculator/style.css */

:root {
  --pv-accent: #f4b942;
  --pv-accent-2: #4059ad;
  --pv-accent-light: #eff2f1;
  --pv-accent-glow: rgba(244, 185, 66, 0.18);
  --pv-green: #15803d;
  --pv-border: #6b9ac4;
  --pv-text: #0f172a;
  --pv-muted: #64748b;
  --pv-surface: #ffffff;
  --pv-radius: 20px;
  --pv-radius-sm: 14px;
  --pv-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --pv-shadow-lg: 0 10px 40px rgba(64, 89, 173, 0.12);
}

.pv-root {
  font-family: "Inter", "SF Pro Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--pv-text);
  max-width: 920px;
  margin: 0 auto;
  padding: 0 16px 32px;
  -webkit-font-smoothing: antialiased;
}

.pv-root,
.pv-root * {
  box-sizing: border-box;
}

.pv-root section,
.pv-root h1,
.pv-root h2,
.pv-root h3,
.pv-root p,
.pv-root ul,
.pv-root li {
  margin: 0;
}

.pv-root ul {
  padding: 0;
}

/* Loader */
.pv-loader-status {
  display: none;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 600;
}

/* Hero */
.pv-root .pv-hero {
  background: linear-gradient(to bottom right, #4059ad 0%, #f4b942 100%);
  border-radius: var(--pv-radius);
  padding: clamp(28px, 5vw, 48px) clamp(24px, 4vw, 40px);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  margin-bottom: 36px;
}

.pv-hero::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.pv-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 16px;
  position: relative;
}

.pv-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  position: relative;
}

.pv-hero p {
  margin-top: 10px;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 62ch;
  line-height: 1.55;
  position: relative;
}

.pv-hero__nav {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
}

.pv-hero__nav a {
  color: #4059ad;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  background: #eff2f1;
  border: 1px solid #6b9ac4;
  transition: all 0.2s;
}

.pv-hero__nav a:hover {
  background: #97d8c4;
  border-color: #4059ad;
  transform: translateY(-1px);
}

/* Cards */
.pv-root .pv-card,
.pv-root .pv-info-panel {
  background: var(--pv-surface);
  border: 1px solid var(--pv-border);
  border-radius: var(--pv-radius);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: var(--pv-shadow);
  margin-bottom: 24px;
}

.pv-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pv-text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pv-card__title .pv-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pv-accent-light);
  color: var(--pv-accent);
  border-radius: 6px;
  font-size: 0.85rem;
}

/* Info panel */
.pv-info-panel {
  background: #eff2f1;
}

.pv-info-panel h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pv-accent-2);
  margin-bottom: 10px;
}

.pv-info-panel ul {
  list-style: none;
}

.pv-info-panel li {
  padding: 6px 0;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.55;
  border-bottom: 1px solid #6b9ac4;
}

.pv-info-panel li:last-child {
  border-bottom: none;
}

.pv-info-panel li strong {
  color: var(--pv-accent-2);
}

/* Form elements */
.pv-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
}

.pv-input,
.pv-select {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #ffffff;
  color: var(--pv-text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.pv-input:focus,
.pv-select:focus {
  border-color: var(--pv-accent);
  box-shadow: 0 0 0 3px var(--pv-accent-glow);
}

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

.pv-field {
  display: flex;
  flex-direction: column;
}

/* Chips */
.pv-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.pv-chip {
  border: 1.5px solid var(--pv-border);
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.pv-chip:hover {
  border-color: var(--pv-accent);
  color: var(--pv-accent);
}

.pv-chip--active {
  background: var(--pv-accent);
  color: #ffffff;
  border-color: var(--pv-accent);
}

/* Button */
.pv-btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.pv-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pv-btn--primary {
  background: linear-gradient(135deg, #f4b942, #4059ad);
  color: #ffffff;
}

/* Results */
.pv-results {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pv-metric {
  background: linear-gradient(135deg, #eff2f1 0%, #ffffff 100%);
  border: 1px solid rgba(64, 89, 173, 0.12);
  border-radius: var(--pv-radius-sm);
  padding: 18px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pv-metric:hover {
  transform: translateY(-2px);
  box-shadow: var(--pv-shadow-lg);
}

.pv-metric--green {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: rgba(21, 128, 61, 0.12);
}

.pv-metric__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pv-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pv-metric__value {
  margin-top: 8px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--pv-accent-2);
  line-height: 1.2;
}

.pv-metric--green .pv-metric__value {
  color: var(--pv-green);
}

/* Bar chart */
.pv-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.pv-bar-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  min-width: 90px;
  text-align: right;
}

.pv-bar-track {
  flex: 1;
  height: 28px;
  background: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
}

.pv-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s ease;
}

.pv-bar-fill--before {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.pv-bar-fill--after {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.pv-bar-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--pv-text);
  min-width: 80px;
  font-variant-numeric: tabular-nums;
}

/* Secondary info */
.pv-info-grid {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.pv-info-item {
  text-align: center;
  padding: 14px;
  background: #f8fafc;
  border-radius: 14px;
  border: 1px solid #f0f0f0;
}

.pv-info-item__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pv-info-item__value {
  margin-top: 6px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--pv-text);
}

.pv-new-bill {
  margin-top: 14px;
  text-align: center;
  display: none;
}

.pv-new-bill__label {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 700;
}

.pv-new-bill__value {
  font-size: 1.3rem;
  font-weight: 800;
  color: #15803d;
  margin-left: 8px;
}

/* Disclaimer */
.pv-disclaimer {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.55;
  margin-top: 12px;
}

/* SEO Copy */
.pv-seo-copy {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.7;
}
.pv-seo-copy h2 {
  margin: 0 0 6px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #475569;
}
.pv-seo-copy p + p { margin-top: 8px; }

/* Responsive */
@media (max-width: 900px) {
  .pv-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .pv-grid-2,
  .pv-results,
  .pv-info-grid {
    grid-template-columns: 1fr;
  }

  .pv-bar-label {
    min-width: 84px;
  }
}
