/* Vertical Energy — price comparison mockup */
:root {
  /* Deep forest + coral — clearly not Segugio teal/gold */
  --brand: #0f3d2e;
  --brand-mid: #186848;
  --brand-light: #b8e0ce;
  --brand-soft: #dff3ea;
  --accent: #e04b2f;
  --accent-soft: #fde8e3;
  --accent-warn: #c43a22;
  --feat: #1f6b4a;
  --feat-border: #4a9b72;
  --feat-bg: #d4efe3;
  --text: #14241c;
  --text-muted: #4e6358;
  --bg: #eef3f0;
  --card: #ffffff;
  --border: #c5d6cc;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 50, 35, 0.07);
  --font: "DM Sans", system-ui, sans-serif;
  --teal: #0f3d2e;
  --teal-mid: #186848;
  --teal-light: #b8e0ce;
  --teal-soft: #dff3ea;
  --orange: #e04b2f;
  --orange-soft: #fde8e3;
  --orange-warn: #c43a22;
  --gold: #1f6b4a;
  --gold-border: #4a9b72;
  --gold-bg: #d4efe3;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  padding-bottom: 2rem;
}

a {
  color: var(--teal);
}

button,
input,
select {
  font: inherit;
}

/* —— Top bar —— */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--teal);
}

.brand-mark {
  display: flex;
}

.brand-text {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.brand-text span {
  font-weight: 500;
  color: var(--orange);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--teal);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn:active {
  background: var(--teal-soft);
}

/* —— Page head —— */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.page-head h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.02em;
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--teal);
}

.step-ring {
  flex-shrink: 0;
}

/* —— Filters —— */
.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #fff;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.filter-tabs {
  display: flex;
  gap: 0.35rem;
  background: var(--bg);
  padding: 3px;
  border-radius: 999px;
}

.filter-tab {
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.filter-tab.is-active {
  background: #fff;
  border-color: var(--teal);
  color: var(--teal);
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border: none;
  background: transparent;
  color: var(--teal);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0.35rem;
  white-space: nowrap;
}

/* —— Offers —— */
.offers {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0 0.85rem;
  max-width: 480px;
  margin: 0 auto;
}

.offer-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.offer-card.is-hidden {
  display: none;
}

.offer-card--consigliata {
  border-color: #8fc9b0;
}

.offer-card--evidenza {
  border: 2px solid var(--gold-border);
}

.offer-ribbon {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.offer-ribbon--consigliata {
  background: var(--teal-soft);
  color: var(--teal);
}

.offer-ribbon--evidenza {
  background: var(--gold-bg);
  color: #2d5c46;
}

.offer-body {
  padding: 0.9rem 1rem 0.75rem;
}

.offer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.offer-logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 40px;
}

.logo-word {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.logo-sub {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.15rem;
  letter-spacing: 0.02em;
}

.logo-bluenergy .logo-word {
  color: #0077a8;
  font-style: italic;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-lene .logo-word {
  color: #e85d04;
  font-size: 1.35rem;
}

.logo-edison {
  flex-direction: row;
  align-items: center;
  gap: 0.25rem;
}

.logo-edison .logo-word {
  color: #1a3a5c;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-reset .logo-word {
  color: #6b2d8b;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: lowercase;
}

.logo-illumia .logo-word {
  color: #c41e3a;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.logo-illumia .logo-sub {
  color: #c41e3a;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.offer-price {
  text-align: right;
  flex-shrink: 0;
}

.offer-price strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.offer-price span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.price-box {
  text-align: right;
  border: 1.5px solid var(--orange);
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  background: #fffdf9;
  flex-shrink: 0;
  min-width: 110px;
}

.price-box-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--orange);
  margin-bottom: 0.1rem;
}

.price-box strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.price-box > span:last-child {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Specs */
.offer-specs {
  margin: 0 0 0.5rem;
}

.offer-specs > div {
  display: grid;
  grid-template-columns: 7.2rem 1fr;
  gap: 0.35rem;
  padding: 0.28rem 0;
  align-items: baseline;
}

.offer-specs dt {
  margin: 0;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
}

.offer-specs dd {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.info-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--teal-mid);
  background: transparent;
  color: var(--teal-mid);
  font-size: 0.65rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

.badge {
  display: inline-block;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
}

.badge--fisso {
  background: var(--teal);
  color: #fff;
}

.badge--variabile {
  background: #5a9e82;
  color: #fff;
}

.warn-note {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--orange-warn);
}

.details-link {
  display: inline-block;
  margin: 0.25rem 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.promo-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--orange-soft);
  border-radius: 6px;
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #8a3a28;
  margin-bottom: 0.75rem;
}

.promo-icon {
  color: var(--accent);
  font-size: 0.9rem;
}

.offer-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.985);
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}

.btn-primary:hover {
  background: var(--teal-mid);
}

.btn-secondary {
  background: var(--teal-light);
  color: var(--teal);
}

.btn-secondary:hover {
  background: #a8d9c4;
}

.btn-block {
  margin-top: 0.5rem;
}

.sponsored {
  margin: 0.65rem 0 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* —— Footer —— */
.site-footer {
  max-width: 480px;
  margin: 1.5rem auto 0;
  padding: 0 1rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.site-footer .muted {
  opacity: 0.75;
  margin-top: 0.25rem;
}

/* —— Modal —— */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 40, 30, 0.45);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fadeIn 0.2s ease;
}

.modal-overlay[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: #fff;
  width: 100%;
  max-width: 480px;
  max-height: 92dvh;
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  padding: 1.15rem 1.15rem 1.5rem;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(40px); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--teal);
}

.modal-close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: grid;
  place-items: center;
}

.modal-info {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.modal-info strong {
  color: var(--orange);
  font-weight: 700;
}

.modal-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
}

.modal-form .field > span:first-child {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--teal);
}

.modal-form input,
.modal-form select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  appearance: none;
}

.modal-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230F3D2E' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2rem;
}

.field-hint {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  cursor: pointer;
}

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

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--teal);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(20, 60, 45, 0.25);
  animation: fadeIn 0.2s ease;
  white-space: nowrap;
  max-width: 90vw;
}

.toast[hidden] {
  display: none;
}

/* —— Multi-step navigation —— */
.step-nav {
  display: flex;
  align-items: center;
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--teal);
  text-decoration: none;
}

.steps-bar {
  display: flex;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
  max-width: 480px;
  margin: 0 auto;
}

.steps-bar-item {
  flex: 1;
  text-align: center;
  padding: 0.45rem 0.35rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  background: var(--bg);
  border: 1.5px solid transparent;
}

.steps-bar-item.is-active {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: var(--teal);
}

.steps-bar-item:active {
  transform: scale(0.98);
}

.topbar,
.page-head,
.filters,
.steps-bar,
.step-panel,
.offers,
.site-footer {
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.step-panel {
  padding: 0.85rem;
}

[hidden] {
  display: none !important;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.1rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow);
}

.hero-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.02em;
}

.hero-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.wizard-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-block {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.form-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.01em;
}

.form-block legend {
  padding: 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--teal);
}

.wizard-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.75rem;
  min-width: 0;
}

.wizard-form .field > span {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--teal);
}

.wizard-form .field > span em {
  font-style: normal;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.wizard-form .field input,
.wizard-form .field select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  appearance: none;
  font: inherit;
  box-sizing: border-box;
}

.wizard-form .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230F3D2E' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.field-row .field {
  margin-top: 0;
}

.choice-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.choice-row--wrap {
  flex-direction: row;
  flex-wrap: wrap;
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  flex: 1;
  min-width: 5.5rem;
}

.choice.is-selected,
.choice:has(input:checked) {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
}

.choice input {
  accent-color: var(--teal);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin: 0;
}

.form-note {
  margin: 0.15rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.back-link {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}

.summary-card {
  margin-bottom: 0.85rem;
}

.check-block {
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text);
}

.success-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.success-panel[hidden] {
  display: none;
}

.success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.success-panel h2 {
  margin: 0 0 0.5rem;
  color: var(--teal);
  font-size: 1.25rem;
}

.success-panel p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.success-panel .btn + .btn {
  margin-top: 0.5rem;
}

/* Desktop: center as phone frame feel */
@media (min-width: 520px) {
  body {
    background: linear-gradient(160deg, #c8e6d8 0%, #eef3f0 50%, #fde8e3 100%);
  }

  .topbar,
  .page-head,
  .filters,
  .steps-bar {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }

  .topbar {
    margin-top: 1.5rem;
    border-radius: 12px 12px 0 0;
  }

  .site-footer {
    padding-bottom: 2rem;
  }

  .modal {
    border-radius: 16px;
    margin-bottom: 2rem;
  }

  .modal-overlay {
    align-items: center;
    padding: 1rem;
  }
}
