/* ===========================================================
   Per-screen styles
   =========================================================== */

/* ---------- Splash / Welcome -------------------------------- */
.s-brand {
  background: linear-gradient(
    180deg,
    #ff0f64 0%,
    #ea0f5c 50%,
    var(--enel-magenta-dark) 100%
  );
  color: #fff;
  align-items: center;
}

.brand-lockup {
  position: absolute;
  top: 180px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.s-brand .dock {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(var(--safe-bottom) + 24px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- Onboarding ------------------------------------- */
.s-onboarding {
  background: #fff;
}

.ob-track {
  flex: 1;
  display: flex;
  overflow: hidden;
  transition: transform 460ms var(--ease-ios);
  min-height: 0;
}

.ob-slide {
  flex: none;
  width: var(--screen-w);
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter);
}

.ob-art {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 20px 0 30px;
}

/* the illustration panel casts a soft edge onto the copy below */
.ob-art::after {
  content: "";
  position: absolute;
  left: calc(var(--gutter) * -1);
  right: calc(var(--gutter) * -1);
  bottom: 0;
  height: 16px;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.07) 0%,
    rgba(0, 0, 0, 0) 100%
  );
}

.ob-copy {
  flex: none;
  padding-bottom: 26px;
}

.ob-copy h1 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.6px;
}

.ob-copy p {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.42;
  letter-spacing: -0.2px;
  color: var(--ink-2);
}

.ob-foot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter) calc(var(--safe-bottom) + 16px);
}

.ob-foot button {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--enel-magenta);
  padding: 8px 2px;
  min-width: 62px;
}

.ob-foot .dots {
  flex: 1;
}

/* ---------- Register / Login shared ------------------------- */
.s-form {
  background: #fff;
}

.form-body {
  padding: 4px var(--gutter) 0;
}

.form-body h1 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.6px;
}

.form-body > p {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.42;
  letter-spacing: -0.2px;
}

.form-body > p + p {
  margin-top: 16px;
}

/* ---------- Register done ---------------------------------- */
.done-check {
  width: 122px;
  height: 122px;
  border-radius: 50%;
  border: 4px solid var(--enel-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 46px auto 40px;
  animation: pop 620ms var(--ease-ios) both;
}

.done-check svg {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: draw 520ms var(--ease-ios) 260ms forwards;
}

@keyframes pop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  70% {
    transform: scale(1.06);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* ---------- Home (Forniture) -------------------------------- */
.s-home {
  background: var(--bg);
}

.home-hero {
  position: relative;
  height: 648px;
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--gutter) 40px;
  color: #fff;
  overflow: hidden;
}

.home-hero .hero-media {
  position: absolute;
  inset: 0;
}

.home-hero .hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.12) 34%,
    rgba(0, 0, 0, 0) 62%
  );
}

.home-hero .hero-inner {
  position: relative;
  margin-top: auto;
}

.home-hero .eyebrow {
  font-size: 16px;
  letter-spacing: -0.2px;
  opacity: 0.95;
}

.home-hero h1 {
  margin-top: 6px;
  font-size: 29px;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.6px;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.28);
}

.home-hero .btn-pill-sm {
  margin-top: 22px;
}

/* pull the hero copy up to sit ~mid-screen like the design */
.home-hero .hero-inner {
  padding-bottom: 272px;
}

.supply-list {
  padding: 0 var(--gutter) 4px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: -26px;
  position: relative;
  z-index: 2;
}

.supply {
  border-radius: var(--radius-card);
  padding: 18px 20px 20px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  text-align: left;
  width: 100%;
  display: block;
  transition: transform 140ms var(--ease-ios);
}

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

.supply-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.supply-name {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.supply-status {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.supply-addr {
  display: block;
  margin-top: 5px;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.2px;
  color: var(--ink-3);
}

.supply .barchart {
  margin-top: 22px;
}

.supply-msg {
  display: block;
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

/* filled variants */
.supply.v-sospesa {
  background: var(--enel-orange);
  color: #fff;
}
.supply.v-ridotta {
  background: var(--enel-red);
  color: #fff;
}
.supply.v-cessata {
  background: var(--grey-card);
  color: var(--ink-3);
  box-shadow: none;
}
.supply.v-cessata .supply-name,
.supply.v-cessata .supply-status {
  color: #7d7d7d;
}
.supply.v-cessata .supply-msg {
  color: var(--ink-2);
}
.supply.v-sospesa .supply-addr,
.supply.v-ridotta .supply-addr {
  color: rgba(255, 255, 255, 0.88);
}

/* progress (in lavorazione) */
.supply-progress {
  display: block;
  margin-top: 22px;
}

.supply-progress .labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.supply-progress .labels .done {
  color: var(--enel-orange);
}

.supply-progress .labels .next {
  color: var(--ink-4);
}

.supply-progress .track {
  display: block;
  margin-top: 10px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  position: relative;
}

.supply-progress .fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 34%;
  border-radius: 2px;
  background: var(--enel-orange);
  animation: grow 900ms var(--ease-ios) both;
}

.supply-progress .knob {
  position: absolute;
  left: 34%;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--enel-orange);
  transform: translate(-50%, -50%);
  animation: grow-knob 900ms var(--ease-ios) both;
}

@keyframes grow {
  from {
    width: 0;
  }
}

@keyframes grow-knob {
  from {
    left: 0;
  }
}

/* ---------- Story ------------------------------------------ */
.s-story {
  background: #fff;
}

.story-media {
  position: relative;
  height: 380px;
  flex: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--gutter) 24px;
  overflow: hidden;
}

.story-media .hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.05) 40%,
    rgba(0, 0, 0, 0.35) 100%
  );
}

.story-media h1 {
  position: relative;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.6px;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.3);
}

.story-close {
  position: absolute;
  top: calc(var(--safe-top) + 4px);
  left: 20px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 17px;
  letter-spacing: -0.3px;
}

.story-body {
  padding: 26px var(--gutter) 0;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.2px;
}

/* ---------- Fornitura -------------------------------------- */
.s-detail {
  background: #fff;
}

.detail-head {
  padding: 0 var(--gutter) 6px;
}

.detail-head h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.8px;
}

.detail-head .addr {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.32;
  letter-spacing: -0.2px;
  color: var(--ink-4);
}

/* ---------- Bolletta --------------------------------------- */
.bill-sub {
  padding: 12px var(--gutter) 0;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

.bill-totals {
  display: flex;
  justify-content: space-between;
  padding: 30px var(--gutter) 26px;
}

.bill-totals .lbl {
  font-size: 15px;
  color: var(--ink-3);
}

.bill-totals .val {
  margin-top: 4px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.6px;
}

.bill-totals .r {
  text-align: right;
}

.bill-detail {
  background: linear-gradient(
    120deg,
    var(--enel-blue-bright) 0%,
    #1a7bf2 55%,
    #2fa9e8 100%
  );
  color: #fff;
  padding: 22px 0 26px;
}

.bill-detail .top {
  padding: 0 var(--gutter);
}

.bill-detail .top .line {
  display: flex;
  justify-content: space-between;
  font-size: 17px;
  letter-spacing: -0.2px;
  padding: 3px 0;
}

.bill-detail .rule {
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
  margin: 14px var(--gutter) 0;
}

.bill-bars {
  position: relative;
  height: 190px;
  margin: 22px var(--gutter) 0;
  display: flex;
  align-items: flex-end;
  gap: 34px;
  border-bottom: 3px solid #fff;
  padding: 0 8px;
}

.bill-bars .bb {
  flex: 1;
  border-radius: 6px 6px 0 0;
  background: rgba(255, 255, 255, 0.72);
  animation: bar-rise 620ms var(--ease-ios) both;
  transform-origin: bottom;
  transition: background 160ms linear;
}

.bill-bars .bb.on {
  background: #fff;
}

/* centred snap: equal sliver of the previous/next voce on both sides */
.bill-cards {
  margin-top: 14px;
  --bill-card-w: 316px;
  padding-left: calc((var(--screen-w) - var(--bill-card-w)) / 2);
  padding-right: calc((var(--screen-w) - var(--bill-card-w)) / 2);
  scroll-padding-left: calc((var(--screen-w) - var(--bill-card-w)) / 2);
  scroll-padding-right: calc((var(--screen-w) - var(--bill-card-w)) / 2);
}

.bill-cards .bill-card {
  scroll-snap-align: center;
}

.bill-card {
  width: var(--bill-card-w, 316px);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  padding: 18px 20px 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}

.bill-card h4 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.bill-card p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-3);
}

/* ---------- Archivio --------------------------------------- */
.year-head {
  background: var(--bg-section);
  padding: 14px var(--gutter) 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 3;
}

/* ---------- WOW! ------------------------------------------- */
.s-wow {
  background: var(--bg);
}

.wow-head {
  background: linear-gradient(180deg, #ff0f64 0%, #ec0f5e 100%);
  color: #fff;
  flex: none;
  padding: var(--safe-top) var(--gutter) 74px;
  text-align: center;
}

.wow-head h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.6px;
}

.wow-head .btn-white {
  margin-top: 22px;
  height: 50px;
  font-size: 16px;
}

.wow-list {
  padding: 0 var(--gutter);
  margin-top: -58px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.wow-card {
  border-radius: 8px;
  padding: 24px 22px 26px;
  position: relative;
  overflow: hidden;
  min-height: 232px;
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 140ms var(--ease-ios);
}

.wow-card:active {
  transform: scale(0.985);
}

.wow-card .kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.82;
}

.wow-card h3 {
  margin-top: 8px;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.5px;
  max-width: 56%;
}

.wow-card p {
  margin-top: auto;
  padding-top: 20px;
  font-size: 16px;
  line-height: 1.32;
  letter-spacing: -0.2px;
  max-width: 56%;
}

.wow-card .art {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 116px;
  height: 116px;
  border-radius: 8px;
}

.wow-card.c-blue {
  background: var(--enel-blue);
  color: #fff;
}
.wow-card.c-green {
  background: var(--enel-green);
  color: #fff;
}
.wow-card.c-orange {
  background: var(--enel-orange);
  color: #fff;
}
.wow-card.c-white {
  background: #fff;
  color: var(--enel-green);
}
.wow-card.c-white.t-orange {
  color: var(--enel-orange);
}
.wow-card.c-white .kicker {
  opacity: 1;
}

.wow-stats {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  gap: 26px;
}

.wow-stats .st {
  min-width: 88px;
}

.wow-stats .st b {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.wow-stats .st span {
  display: block;
  font-size: 14px;
  line-height: 1.25;
  opacity: 0.9;
}

.wow-stats .sep {
  width: 1px;
  background: rgba(255, 255, 255, 0.4);
}

.wow-legal {
  padding: 20px var(--gutter) 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-3);
}

.wow-legal p + p {
  margin-top: 12px;
}

/* ---------- Novità ----------------------------------------- */
.news-card {
  width: 268px;
}

.news-card .media {
  height: 158px;
  border-radius: 8px;
  overflow: hidden;
}

.news-card .tag {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--enel-magenta);
}

.news-card .tag i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--enel-magenta);
}

.news-card h3 {
  margin-top: 8px;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.35px;
}

.news-card p {
  margin-top: 6px;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.2px;
  color: var(--ink-4);
}

/* ---------- Non cliente ------------------------------------ */
.s-noncliente {
  background: #fff;
}

/* the nav bar floats over the magenta block */
.s-noncliente > .navbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.nc-top {
  position: relative;
}

/* magenta starts at the very top and the first card overlaps its edge */
.nc-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 432px;
  background: linear-gradient(180deg, #ff0f64 0%, #e6105c 100%);
}

.nc-head {
  position: relative;
  color: #fff;
  padding: calc(var(--safe-top) + 62px) var(--gutter) 34px;
}

.nc-cards {
  position: relative;
}

.nc-head h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.7px;
}

.nc-head p {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -0.2px;
}

.nc-cards {
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nc-card {
  border-radius: 6px;
  padding: 26px 24px;
  min-height: 208px;
  color: #fff;
  position: relative;
  overflow: hidden;
  text-align: left;
  width: 100%;
  transition: transform 140ms var(--ease-ios);
}

.nc-card:active {
  transform: scale(0.985);
}

.nc-card h3 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.6px;
}

.nc-card p {
  margin-top: 12px;
  font-size: 17px;
  line-height: 1.32;
  letter-spacing: -0.2px;
  max-width: 56%;
}

.nc-card .art {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 132px;
  height: 132px;
  border-radius: 8px;
}

.nc-card.c-orange {
  background: var(--enel-orange);
}
.nc-card.c-yellow {
  background: var(--enel-yellow);
}
.nc-card.c-blue {
  background: #0b56ec;
}

/* ---------- Hobby tiles ------------------------------------- */
.hobby-list {
  background: #fff;
}

.hobby-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 24px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  color: var(--enel-magenta);
  transition: background 120ms linear;
}

.hobby-tile:active {
  background: #f7f7f7;
}

.hobby-ico {
  display: flex;
}

.hobby-name {
  font-size: 13px;
  letter-spacing: -0.1px;
}

/* ---------- Success screen ---------------------------------- */
.s-success {
  background: linear-gradient(180deg, var(--enel-magenta) 0%, #d9004f 100%);
  color: #fff;
}

.success-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--safe-top) var(--gutter) 0;
}

.success-ring {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 40px;
  animation: pop 620ms var(--ease-ios) both;
}

.success-ring svg {
  width: 44px;
  height: 33px;
}

.success-body h1 {
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.success-body p {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.45;
}

/* ---------- Loyalty ----------------------------------------- */
.s-magenta {
  background: linear-gradient(180deg, var(--enel-magenta) 0%, #d9004f 100%);
  color: #fff;
}

.s-blue {
  background: linear-gradient(180deg, #0b56ec 0%, #0340c4 100%);
  color: #fff;
}

.mg-body,
.tada-body {
  padding: 40px var(--gutter) 0;
}

.mg-body h1,
.tada-body h1 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.8px;
}

.mg-body p,
.tada-body p {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: -0.2px;
}

.mg-note {
  margin-top: 26px !important;
  font-size: 14px !important;
  opacity: 0.85;
}

.points-card {
  margin-top: 30px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 26px 22px;
  text-align: center;
}

.points-label,
.points-sub {
  display: block;
  font-size: 14px;
  opacity: 0.9;
}

.points-value {
  display: block;
  font-size: 64px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2px;
  margin: 4px 0;
}

.points-value sup {
  font-size: 26px;
  vertical-align: super;
}

.wow-h1 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.6px;
  color: var(--enel-magenta);
}

.gift-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: var(--safe-top) var(--gutter) 0;
}

.gift-art {
  color: #fff;
  animation: gift-bob 2.4s ease-in-out infinite;
}

@keyframes gift-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-12px) rotate(2deg);
  }
}

.gift-hint {
  font-size: 15px;
  opacity: 0.85;
}

.coupon-list {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.coupon {
  display: block;
  width: 100%;
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  text-align: left;
  transition: transform 140ms var(--ease-ios);
}

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

.coupon-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 6px 4px;
}

.coupon-scade {
  font-size: 12px;
  color: var(--ink-4);
}

.coupon-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--enel-magenta);
}

.coupon-h1 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.coupon-meta {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--ink-4);
}

/* ---------- Home loyalty banner ----------------------------- */
.wow-banner {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: var(--radius-card);
  padding: 20px 22px 22px;
  background: linear-gradient(120deg, #0b56ec 0%, #0340c4 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  transition: transform 140ms var(--ease-ios);
}

.wow-banner:active {
  transform: scale(0.985);
}

.wow-banner-kicker {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.85;
}

.wow-banner-title {
  display: block;
  margin-top: 8px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.4px;
}

.wow-banner-cta {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 20px;
  margin-top: 18px;
  border-radius: 19px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 600;
}

/* ---------- Fornitura detail header (per state) ------------- */
.fdetail-head {
  padding: 0 var(--gutter) 24px;
}

.fdetail-bar {
  height: calc(var(--safe-top) + 40px);
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fdetail-back {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px 6px 0;
  font-size: 16px;
  letter-spacing: -0.2px;
}

.fdetail-rename {
  font-size: 16px;
  letter-spacing: -0.2px;
  padding: 6px 0;
}

.fdetail-head h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.8px;
  padding-top: 2px;
}

.fdetail-addr {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.32;
  letter-spacing: -0.2px;
}

.fdetail-rule {
  height: 1px;
  margin: 20px 0 16px;
}

.fdetail-msg {
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

/* plain — regolare / da pagare / cessata / in attivazione */
.fdetail-head.tone-plain {
  background: #fff;
  color: var(--ink);
}
.tone-plain .fdetail-back {
  color: var(--ink);
}
.tone-plain .fdetail-rename {
  color: var(--enel-magenta);
}
.tone-plain .fdetail-addr {
  color: var(--ink-4);
}
.tone-plain .fdetail-rule {
  background: var(--line);
}
.tone-plain .fdetail-msg {
  color: var(--ink);
}

/* sospesa */
.fdetail-head.tone-orange {
  background: var(--enel-orange);
  color: #fff;
}

/* ridotta */
.fdetail-head.tone-red {
  background: var(--enel-red);
  color: #fff;
}

.tone-orange .fdetail-back,
.tone-red .fdetail-back,
.tone-orange .fdetail-rename,
.tone-red .fdetail-rename {
  color: #fff;
}

.tone-orange .fdetail-addr,
.tone-red .fdetail-addr {
  color: rgba(255, 255, 255, 0.92);
}

.tone-orange .fdetail-rule,
.tone-red .fdetail-rule {
  background: rgba(255, 255, 255, 0.4);
}

/* ---------- Vertical activation stepper --------------------- */
.vstep {
  padding: 0 var(--gutter);
}

.vstep-item {
  display: flex;
  gap: 18px;
  align-items: stretch;
  min-height: 62px;
}

.vstep-rail {
  position: relative;
  flex: none;
  width: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vstep-line {
  flex: 1;
  width: 2px;
  background: var(--line);
}

.vstep-item:first-child .vstep-line.top,
.vstep-item:last-child .vstep-line.bottom {
  background: transparent;
}

.vstep-dot {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px 0;
}

/* completed */
.vstep-item.is-done .vstep-dot {
  background: var(--ink-2);
  border-color: var(--ink-2);
}
.vstep-item.is-done .vstep-line {
  background: var(--ink-2);
}

/* current — the step you are waiting on */
.vstep-item.is-current .vstep-dot {
  width: 20px;
  height: 20px;
  border-width: 5px;
  border-color: var(--enel-orange);
  box-shadow: 0 0 0 4px rgba(255, 90, 15, 0.16);
}
.vstep-item.is-current .vstep-line.top {
  background: var(--ink-2);
}

.vstep-body {
  flex: 1;
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--line-soft);
}

.vstep-item:last-child .vstep-body {
  border-bottom: none;
}

.vstep-title {
  display: block;
  font-size: 16.5px;
  letter-spacing: -0.25px;
  color: var(--ink);
}

.vstep-item.is-todo .vstep-title {
  color: var(--ink-4);
}

.vstep-item.is-current .vstep-title {
  color: var(--enel-orange);
  font-weight: 700;
}

.vstep-sub {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--enel-orange);
}

/* ---------- Tadà — coupon carousel -------------------------- */
.tada-head {
  flex: none;
  padding: calc(var(--safe-top) + 34px) var(--gutter) 0;
  text-align: center;
}

.tada-head h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.6px;
}

.tada-head p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.4;
  opacity: 0.92;
}

.coupon-rail {
  flex: none;
  --coupon-w: 264px;
  gap: 14px;
  margin-top: 30px;
  padding-left: calc((var(--screen-w) - var(--coupon-w)) / 2);
  padding-right: calc((var(--screen-w) - var(--coupon-w)) / 2);
  scroll-padding-left: calc((var(--screen-w) - var(--coupon-w)) / 2);
  scroll-padding-right: calc((var(--screen-w) - var(--coupon-w)) / 2);
  align-items: stretch;
}

.coupon-card {
  scroll-snap-align: center;
  width: var(--coupon-w);
  height: 368px;
  background: #fff;
  border-radius: 5px;
  padding: 14px 14px 0;
  display: flex;
  flex-direction: column;
  text-align: left;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  transition: transform 160ms var(--ease-ios);
}

.coupon-card:active {
  transform: scale(0.985);
}

.coupon-art {
  flex: 1;
  display: block;
  min-height: 0;
  border-radius: 3px;
  overflow: hidden;
}

.coupon-foot {
  flex: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px 16px;
}

.coupon-id {
  display: block;
  min-width: 0;
}

.coupon-brand {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--enel-magenta);
}

.coupon-scade {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-3);
}

.coupon-value {
  flex: none;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--enel-magenta);
  line-height: 1;
}

.coupon-value sup {
  font-size: 14px;
  vertical-align: super;
  letter-spacing: 0;
}

.coupon-dots {
  flex: none;
  margin-top: auto;
  padding-bottom: calc(var(--safe-bottom) + 26px);
}

.coupon-dots i {
  background: rgba(255, 255, 255, 0.45);
}

.coupon-dots i.on {
  background: #fff;
}

/* ---------- Plain (white) sheet bar ------------------------- */
.plain-bar {
  position: relative;
  flex: none;
  background: #fff;
  padding-top: var(--safe-top);
  height: calc(var(--safe-top) + 44px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 20px;
  padding-right: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.plain-back {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  padding: 4px 6px 4px 0;
  font-size: 16px;
  letter-spacing: -0.2px;
}

.plain-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  pointer-events: none;
}

/* ---------- Coupon detail ----------------------------------- */
.coupon-hero {
  height: 232px;
  overflow: hidden;
  background: #eceef0;
}

.coupon-detail {
  padding: 22px var(--gutter) 24px;
}

.coupon-logo {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -1.4px;
  text-transform: lowercase;
  margin-bottom: 14px;
}

.coupon-detail h1 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.4px;
}

.coupon-valid {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-4);
}

.coupon-copy {
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.1px;
}

/* barcode */
.barcode-block {
  margin-top: 30px;
  text-align: center;
}

.barcode {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 2px;
  height: 62px;
}

.barcode i {
  display: block;
  background: #000;
}

.barcode-num {
  margin-top: 8px;
  font-size: 15px;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Claim (Yeah! / Congratulazioni) ----------------- */
.s-claim {
  background: #fff;
}

.claim-top {
  background: linear-gradient(180deg, var(--enel-magenta) 0%, #ec0f5e 100%);
  color: #fff;
  text-align: center;
  padding: calc(var(--safe-top) + 34px) var(--gutter) 108px;
}

.claim-top h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.6px;
}

.claim-top p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.4;
}

.claim-stage {
  margin-top: -96px;
  padding: 0 var(--gutter) 24px;
  display: flex;
  justify-content: center;
}

.claim-card {
  display: block;
  width: 218px;
  background: #fff;
  border-radius: 5px;
  padding: 12px 12px 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.claim-art {
  display: block;
  height: 224px;
  border-radius: 3px;
  overflow: hidden;
  background: #eceef0;
}


/* ---------- I miei coupon — grid ---------------------------- */
.coupon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 18px var(--gutter) 8px;
}

.grid-coupon {
  display: block;
  text-align: left;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 140ms var(--ease-ios);
}

.grid-coupon:active {
  transform: scale(0.98);
}

.grid-art {
  display: block;
  position: relative;
  height: 148px;
  background: #eceef0;
  overflow: hidden;
}

.grid-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
}

.grid-badge.red {
  background: var(--enel-red);
}

.grid-badge.green {
  background: var(--enel-green);
}

.grid-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 10px 12px;
}

.grid-id {
  display: block;
  min-width: 0;
}

.grid-value {
  flex: none;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--enel-magenta);
  line-height: 1;
}

.grid-value sup {
  font-size: 11px;
  vertical-align: super;
}

/* ---------- Filters ----------------------------------------- */
.filter-head {
  background: var(--bg-section);
  padding: 14px var(--gutter) 10px;
  font-size: 13px;
  color: var(--ink-4);
  border-bottom: 1px solid var(--line-soft);
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 54px;
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  font-size: 16.5px;
  letter-spacing: -0.2px;
  text-align: left;
  background: #fff;
}

.filter-row:active {
  background: #f2f2f2;
}

.filter-caret {
  display: flex;
  color: var(--ink-3);
}

/* ---------- WOW! card artwork ------------------------------- */
/* the illustrations are drawn whole; the card canvas crops them */
.wow-art {
  position: absolute;
  right: -22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  pointer-events: none;
}

.wow-art img {
  height: var(--art-h, 120px);
  width: auto;
  max-width: none;
}

.wow-bg {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}

.wow-watermark {
  position: absolute;
  right: -6px;
  top: 34%;
  font-size: 104px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.16;
  letter-spacing: -4px;
  pointer-events: none;
}

.wow-card.c-white.t-green {
  color: var(--enel-green);
}

.wow-card h3,
.wow-card p,
.wow-card .kicker,
.wow-card .wow-stats {
  position: relative;
}

/* ---------- I miei coupon — toolbar ------------------------- */
.coupon-toolbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px var(--gutter) 14px;
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
}

/* iOS-style segmented pill */
.viewseg {
  flex: 1;
  display: flex;
  padding: 2px;
  border-radius: 10px;
  background: #efeff2;
}

.viewseg-btn {
  flex: 1;
  height: 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.1px;
  color: var(--ink-2);
  transition: background 200ms var(--ease-ios), box-shadow 200ms var(--ease-ios),
    font-weight 120ms linear;
}

.viewseg-btn.active {
  background: #fff;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
}

.filter-btn {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 14px;
  letter-spacing: -0.1px;
  color: var(--ink);
  border: 1px solid var(--line);
  transition: background 140ms linear;
}

.filter-btn:active {
  background: #f2f2f4;
}

.filter-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--enel-magenta);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coupon-views {
  flex: 1;
  position: relative;
  min-height: 0;
  display: flex;
}

.coupon-views > [data-view-pane] {
  flex: 1;
  min-height: 0;
}

.coupon-views > [hidden] {
  display: none;
}

.empty-note {
  padding: 40px var(--gutter);
  text-align: center;
  font-size: 15px;
  color: var(--ink-4);
}

/* ---------- Map view ---------------------------------------- */
.map-pane {
  position: relative;
  overflow: hidden;
  background: #e9ecef;
}

.map-plate {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-pins {
  position: absolute;
  inset: 0;
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  padding: 0;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.28));
  transition: transform 220ms var(--ease-ios);
}

.map-pin-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 34px;
  padding: 0 10px;
  border-radius: 17px 17px 17px 3px;
  background: var(--enel-magenta);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.map-pin.on {
  transform: translate(-50%, -100%) scale(1.12);
  z-index: 2;
}

.map-pin.on .map-pin-body {
  background: var(--ink);
}

.map-hint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 20px);
  transform: translateX(-50%);
  background: rgba(28, 28, 30, 0.9);
  color: #fff;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 18px;
  white-space: nowrap;
}

.map-card {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(var(--safe-bottom) + 14px);
  animation: mapcard-in 320ms var(--ease-ios) both;
}

@keyframes mapcard-in {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
}

.map-card-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: #fff;
  border-radius: 10px;
  padding: 12px 16px 12px 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.map-card-art {
  flex: none;
  display: block;
  width: 66px;
  height: 66px;
  border-radius: 6px;
  overflow: hidden;
  background: #eceef0;
}

.map-card-main {
  flex: 1;
  min-width: 0;
}

.map-card-title {
  display: block;
  margin: 2px 0 3px;
  font-size: 14px;
  line-height: 1.28;
  letter-spacing: -0.1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Filter sheet ------------------------------------ */
.fsheet {
  position: absolute;
  inset: 0;
  z-index: 210;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.fsheet[hidden] {
  display: none;
}

.fsheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  animation: fade-in 220ms linear both;
}

.fsheet-panel {
  position: relative;
  max-height: 76%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px 16px 0 0;
  animation: modal-in 360ms var(--ease-ios) both;
}

.fsheet-grab {
  width: 38px;
  height: 5px;
  border-radius: 3px;
  background: #d8d8dc;
  margin: 8px auto 2px;
  flex: none;
}

.fsheet-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
}

.fsheet-body::-webkit-scrollbar {
  display: none;
}

.fsheet-dock {
  flex: none;
  padding: 12px var(--gutter) calc(var(--safe-bottom) + 10px);
  border-top: 1px solid var(--line-soft);
}

.fopt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}

.fopt .cbx-box {
  flex: none;
  width: 21px;
  height: 21px;
  border: 1.5px solid var(--ink-4);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fopt .cbx-box svg {
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 140ms ease, transform 220ms var(--ease-ios);
}

.fopt.on .cbx-box {
  background: var(--ink);
  border-color: var(--ink);
}

.fopt.on .cbx-box svg {
  opacity: 1;
  transform: scale(1);
}

.fopt-label {
  flex: 1;
  font-size: 16.5px;
  letter-spacing: -0.2px;
}

.fopt-count {
  flex: none;
  font-size: 14px;
  color: var(--ink-4);
}
