:root {
  --primary: #ffb800;
  --primary-hover: #ffc933;
  --secondary: #00796b;
  --secondary-light: #00a896;
  --accent: #00d4ff;
  --bg: #fafbfc;
  --card: #ffffff;
  --text: #1a2332;
  --muted: #64748b;
  --border: #e2e8f0;
  --danger: #e05d5d;
  --shadow-soft: 0 18px 40px rgba(10, 11, 14, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Nunito Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
.summary-value {
  font-family: 'Poppins', 'Inter', sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

/* Hero header */
.hero-header {
  background: linear-gradient(135deg, #00796b 0%, #00a896 100%);
  color: #fff;
  padding: 2rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.hero-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  width: 56px;
  height: 56px;
  background: #fff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.logo img {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: inherit;
}

.brand-text p {
  font-size: 0.875rem;
  opacity: 0.9;
  color: inherit;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 8px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 50px;
  background: transparent;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--primary);
  color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 184, 0, 0.3);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.125rem;
  opacity: 0.95;
  max-width: 700px;
}

.hero-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
  color: inherit;
}

.hero-counter .counter-value {
  font-size: 2rem;
  font-weight: 700;
}

.hero-counter .counter-label {
  font-size: 0.95rem;
  opacity: 0.85;
}

.site-header {
  background: linear-gradient(135deg, #00796b 0%, #00a896 100%);
  color: #fff;
  padding: 2rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}

.site-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.site-header > * {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.site-branding {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  flex-wrap: wrap;
  backdrop-filter: blur(12px);
  margin-bottom: 2rem;
}

.site-branding-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.site-logo-link:hover {
  transform: translateY(-4px) scale(1.05);
}

.site-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
}

.site-branding-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
}

.site-branding-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.site-branding-text .muted {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
}

.site-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 8px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  margin: 0 auto 2rem;
  width: 100%;
  max-width: 1200px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.site-nav .nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 50px;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.site-nav .nav-link:hover,
.site-nav .nav-link.is-active {
  background: linear-gradient(135deg, #ffb800 0%, #ffc933 100%);
  color: var(--secondary);
  box-shadow: 0 8px 20px rgba(255, 184, 0, 0.4);
}

.site-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin: 0 0 1rem;
  line-height: 1.2;
  color: #fff;
}

.site-header .muted {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  max-width: 700px;
}

.hero-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
  color: #fff;
}

.hero-counter .counter-value {
  font-size: 1.8rem;
  font-weight: 700;
}

.hero-counter .counter-label {
  font-size: 0.95rem;
  opacity: 0.85;
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--primary);
  color: var(--secondary);
  box-shadow: 0 12px 32px rgba(255, 184, 0, 0.35);
}

.card {
  background: var(--card);
  border-radius: 24px;
  padding: 32px;
  margin: 24px 0;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

h1 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  margin: 0 0 4px;
}

h2 {
  font-size: clamp(1.1rem, 3.5vw, 1.4rem);
  margin: 0 0 12px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.row > * {
  flex: 1 1 200px;
  min-width: 160px;
}

.row > button {
  flex: 0 0 auto;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.card-actions button {
  min-width: 160px;
}

input,
select,
textarea {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  min-width: 0;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.2);
}

input[type='number'] {
  width: 100%;
  max-width: 200px;
}

button {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: var(--secondary);
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 14px 32px rgba(255, 184, 0, 0.35);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(255, 184, 0, 0.45);
}

button.ghost {
  background: transparent;
  color: var(--secondary);
  border: 1px solid var(--secondary);
  box-shadow: none;
}

button.ghost:hover {
  background: rgba(0, 122, 115, 0.08);
  color: var(--secondary);
  transform: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.finance-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.finance-inputs-grid .stacked-input {
  height: 100%;
}

@media (min-width: 1100px) {
  .finance-inputs-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.finance-result {
  width: 100%;
  margin-top: 8px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-grid input,
.form-grid select {
  width: 100%;
}

.result {
  white-space: pre-wrap;
  background: #f1fbff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
  color: var(--text);
}

.result-inline {
  white-space: normal;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.result-inline .badge {
  margin-right: 0;
}

.badge {
  display: inline-block;
  background: rgba(0, 174, 239, 0.12);
  border: 0;
  border-radius: 999px;
  padding: 4px 8px;
  margin-right: 6px;
  color: var(--secondary);
}

.summary-card {
  border: 1px solid var(--border);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.summary-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.summary-label {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.summary-value {
  font-size: 1.4rem;
  font-weight: 600;
}

.summary-sub {
  margin-top: 4px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.blog-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.blog-card__dot {
  color: var(--border);
}

.blog-card__summary {
  margin: 8px 0 12px;
  color: var(--text);
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.blog-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.14);
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.8rem;
}

.blog-card__details {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.blog-card__details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--secondary);
}

.blog-card__details p {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.blog-card--preview h4 {
  margin: 4px 0;
  font-size: 1.1rem;
}

.blog-card__cta {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: var(--secondary);
  text-decoration: none;
}

.info-banner {
  margin: 4px 16px 12px;
}

.summary-note {
  margin: -4px 16px 16px;
}

.stacked-input {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stacked-input input,
.stacked-input select,
.stacked-input span {
  width: 100%;
}

.auto-dimension {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: #f4f7fb;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auto-dimension input[readonly] {
  background: #fff;
  color: var(--text);
}

.info-card h3 {
  margin: 16px 0 8px;
}

.info-card ul {
  margin: 6px 0 16px;
  padding-left: 20px;
}

.info-card ul li {
  margin-bottom: 4px;
}

.info-card p.muted.small {
  margin-top: 6px;
}

.site-footer {
  margin-top: 0;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a,
.footer-links button {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links button:hover,
.footer-links a:hover {
  color: var(--primary);
}

.site-footer .muted {
  color: rgba(255, 255, 255, 0.75);
}

/* Solar imagery preview */
.imagery {
  position: relative;
  max-width: 640px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 12px;
  min-height: 220px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.imagery img {
  display: block;
  width: 100%;
  height: auto;
}

.imagery img.overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Emphasize the building roof outline using the Solar mask */
#img-mask {
  mix-blend-mode: normal;
  opacity: 0.9;
  filter: grayscale(1) contrast(300%) drop-shadow(0 0 1px var(--accent)) drop-shadow(0 0 4px rgba(0, 174, 239, 0.8));
}

.imagery .placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
  padding: 12px;
}

/* Overlay canvas for monthly flux/animations */
.imagery canvas.overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.75;
  mix-blend-mode: screen;
}

/* Professionals page */
.pros-card {
  padding-bottom: 20px;
}

.map-shell {
  width: 100%;
  height: 520px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.pros-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  gap: 18px;
  align-items: flex-start;
}

.pros-list-panel {
  display: flex;
  flex-direction: column;
}

.pros-map-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 24px;
}

.pros-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.pros-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  outline: none;
  box-shadow: 0 8px 20px rgba(10, 11, 14, 0.05);
}

.pros-item:hover,
.pros-item:focus {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(0, 174, 239, 0.12);
}

.pros-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.pros-address {
  color: var(--muted);
  margin-bottom: 4px;
}

.pros-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.pros-contact {
  margin-top: 6px;
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
}

.pros-contact span.label {
  color: var(--muted);
}

.pros-contact-sep {
  color: var(--border);
}

#pro-status {
  transition: color 0.2s;
}

#pro-status[data-level='error'] {
  color: var(--danger);
}

#pro-status[data-level='success'] {
  color: var(--accent);
}

.pros-empty {
  margin-top: 12px;
  color: var(--muted);
}

@media (max-width: 960px) {
  .pros-layout {
    grid-template-columns: 1fr;
  }

  .pros-map-panel {
    position: static;
  }

  .map-shell {
    height: 380px;
  }

  .pros-list {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 24px 12px 48px;
  }

  .site-branding {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
  }

  .hero-counter {
    width: 100%;
    justify-content: space-between;
  }

  .site-nav {
    flex-direction: column;
    width: calc(100% - 24px);
  }

  .site-nav .nav-link {
    width: 100%;
    justify-content: center;
  }

  main {
    margin: -32px auto 32px;
    padding: 0 12px;
  }

  .card {
    padding: 20px;
    margin: 16px 0;
  }

  .row,
  #solar-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .row > *,
  button,
  #solar-controls > * {
    width: 100%;
  }

  .finance-inputs-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .finance-result {
    margin-top: 16px;
  }

  .imagery {
    min-height: 180px;
  }

}

@media (max-width: 640px) {
  .summary-value {
    font-size: 1.2rem;
  }

  .site-branding {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-logo-link {
    width: 64px;
    height: 64px;
  }
}

/* Cookie consent */
.cookie-banner {
  position: fixed;
  inset: auto 20px 20px 20px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
  z-index: 9999;
  max-width: 520px;
}

.cookie-banner__title {
  font-weight: 600;
  margin-bottom: 6px;
}

.cookie-banner__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.cookie-banner__actions button {
  flex: 1;
}

.cookie-banner__actions .ghost {
  flex: initial;
}

.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cookie-modal {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.cookie-modal h3 {
  margin-top: 0;
}

.cookie-modal fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 12px;
}

.cookie-modal label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.cookie-modal small {
  color: var(--muted);
}

.cookie-modal .actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

.cookie-toggle {
  accent-color: var(--accent);
}


:root {
  --bg: #FAFBFC;
  --card: #ffffff;
  --text: #1A2332;
  --muted: #64748B;
  --accent: #00D4FF;
  --primary: #FFB800;
  --primary-hover: #FFC933;
  --secondary: #00796B;
  --secondary-light: #00A896;
  --border: #E2E8F0;
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.08);
  --gradient-hero: linear-gradient(135deg, #00796B 0%, #00A896 100%);
  --gradient-accent: linear-gradient(135deg, #FFB800 0%, #FFC933 100%);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Nunito Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
.summary-value {
  font-family: 'Poppins', 'Inter', sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

footer {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px;
}

main {
  max-width: 1200px;
  margin: -2rem auto 3rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

/* Card Redesign */
.card {
  background: var(--card);
  border-radius: 24px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card h2 {
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
  margin: 0 0 1.5rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.card h2::before {
  content: attr(data-number);
  width: 40px;
  height: 40px;
  background: var(--gradient-accent);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary);
  box-shadow: 0 4px 16px rgba(255, 184, 0, 0.3);
  flex-shrink: 0;
}

/* Add numbers to section headers via JS or manually */
.card:nth-of-type(1) h2::before { content: '1'; }
.card:nth-of-type(2) h2::before { content: '2'; }
.card:nth-of-type(4) h2::before { content: '3'; }

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

/* Form Controls */
.row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.row > * {
  flex: 1 1 200px;
  min-width: 160px;
}

.row > button {
  flex: 0 0 auto;
}

input,
select,
textarea {
  background: #fff;
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 12px 16px;
  outline: none;
  min-width: 0;
  font-size: 1rem;
  transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(0, 121, 107, 0.1);
}

input[type='number'] {
  width: 100%;
  max-width: 200px;
}

button {
  background: var(--gradient-accent);
  color: var(--secondary);
  border: 0;
  border-radius: 16px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(255, 184, 0, 0.3);
  white-space: nowrap;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 184, 0, 0.4);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.ghost {
  background: transparent;
  color: var(--secondary);
  border: 2px solid var(--secondary);
  box-shadow: none;
}

button.ghost:hover:not(:disabled) {
  background: var(--secondary);
  color: white;
}

/* Summary Cards */
.summary-card {
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.summary-item {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
}

.summary-item:hover {
  border-color: var(--secondary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.summary-label {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.summary-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.25rem;
}

.summary-sub {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Result boxes */
.result {
  white-space: pre-wrap;
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  margin-top: 1rem;
  color: var(--text);
}

.result-inline {
  white-space: normal;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* Imagery */
.imagery {
  position: relative;
  margin: 1.5rem auto 0;
  border-radius: 20px;
  overflow: hidden;
  background: transparent;
  min-height: 0;
  border: 0;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 640px;
  width: 100%;
  padding: 0;
}

.imagery img {
  display: block;
  width: 100%;
  height: auto;
}

.imagery img.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.7;
  filter: contrast(1.5) brightness(1.1);
}

#img-mask {
  mix-blend-mode: overlay;
  opacity: 0.75;
  filter: grayscale(1) contrast(250%) drop-shadow(0 0 2px var(--accent));
}

.imagery .placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
  padding: 3rem;
  font-size: 1rem;
}

/* Info banners */
.info-banner {
  background: linear-gradient(135deg, #FFF9E6 0%, #FFEDD5 100%);
  padding: 1.25rem;
  border-radius: 16px;
  border-left: 4px solid var(--primary);
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.summary-note {
  margin: 1rem 0;
}

/* Form Grid */
.finance-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.stacked-input {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stacked-input input,
.stacked-input select {
  width: 100%;
}

.form-hint,
.stacked-input .muted {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.auto-dimension {
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Footer */
.site-footer {
  background: var(--secondary);
  color: white;
  padding: 3rem 1.5rem 2rem;
  margin: 4rem auto 0;
  border-radius: 32px 32px 0 0;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 121, 107, 0.15);
}

.site-footer .muted {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links a,
.footer-links button {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeInUp 0.6s ease-out;
}

.card:nth-child(2) {
  animation-delay: 0.1s;
}

.card:nth-child(3) {
  animation-delay: 0.2s;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-header {
    padding: 1.5rem 1rem 3rem;
  }

  .top-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    flex-direction: column;
  }

  .nav-link {
    width: 100%;
    justify-content: center;
  }

  .card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .row {
    flex-direction: column;
  }

  .row > * {
    width: 100%;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .imagery {
    min-height: 300px;
  }

  main {
    margin-top: -1rem;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .summary-value {
    font-size: 1.5rem;
  }

  .logo-section {
    width: 100%;
  }
}
