/* =========================================================================
   POWERMIETER — Component & layout styles
   ========================================================================= */

/* ---------------- Process stepper ---------------- */
.pm-stepper { display: flex; align-items: center; width: 100%; }
.pm-step {
  display: flex; align-items: center; gap: 11px; background: none; border: 0;
  padding: 0; cursor: pointer; font-family: var(--font-sans); text-align: left;
  transition: opacity .2s var(--ease); flex: none;
}
.pm-step[data-reach='n'] { cursor: default; }
.pm-step-dot {
  width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--border-strong); color: var(--text-3); background: var(--surface);
  transition: all .3s var(--ease);
}
.pm-step[data-state='active'] .pm-step-dot {
  border-color: var(--accent); color: var(--accent-ink); background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in oklab, var(--accent) 16%, transparent);
}
.pm-step[data-state='done'] .pm-step-dot {
  border-color: var(--accent); color: var(--accent); background: var(--accent-tint);
}
.pm-step-text { display: flex; flex-direction: column; gap: 2px; }
.pm-step-n { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.pm-step[data-state='active'] .pm-step-n { color: var(--accent); }
.pm-step-label { font-size: 14.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.pm-step[data-state='active'] .pm-step-label,
.pm-step[data-state='done'] .pm-step-label { color: var(--text); }

.pm-step-line { flex: 1; height: 2px; background: var(--border); margin: 0 14px; border-radius: 2px; min-width: 18px; position: relative; overflow: hidden; }
.pm-step-line-fill { position: absolute; inset: 0; width: 0; background: var(--accent); transition: width .5s var(--ease); }
.pm-step-line[data-done='true'] .pm-step-line-fill { width: 100%; }

/* Compact stepper (mobile) */
.pm-stepper[data-compact='true'] .pm-step-text { display: none; }
.pm-stepper[data-compact='true'] .pm-step-dot { width: 32px; height: 32px; }
.pm-stepper[data-compact='true'] .pm-step-line { margin: 0 7px; }

/* Mobile stepper caption */
.pm-stepcap { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }
.pm-stepcap-n { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); white-space: nowrap; flex: none; }
.pm-stepcap-l { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }

/* ---------------- Stat ---------------- */
.pm-stat { display: flex; flex-direction: column; gap: 3px; }
.pm-stat-value { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1; color: var(--text); }
.pm-stat-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.pm-stat-sub { font-size: 12px; color: var(--text-3); }

/* ---------------- Benefit card ---------------- */
.pm-benefit {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.pm-benefit:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent-tint-border); }
.pm-benefit-ic {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: var(--accent-tint); color: var(--accent); border: 1px solid var(--accent-tint-border);
}
.pm-benefit-ic svg { width: 23px; height: 23px; }
.pm-benefit-title { font-weight: 700; font-size: 16px; letter-spacing: -.01em; color: var(--text); font-family: var(--font-display); }
.pm-benefit-text { font-size: 13.5px; line-height: 1.55; color: var(--text-2); }

/* ---------------- Form section ---------------- */
.pm-fsec { }
.pm-fsec-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.pm-fsec-step {
  width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center;
  background: var(--navy-800); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 14px;
}
[data-theme='dark'] .pm-fsec-step { background: var(--accent); color: var(--accent-ink); }
.pm-fsec-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin: 1px 0 0; color: var(--text); }
.pm-fsec-desc { font-size: 13.5px; line-height: 1.5; color: var(--text-2); margin: 4px 0 0; }
.pm-fsec-body { display: flex; flex-direction: column; gap: 16px; }

/* Form grid */
.pm-grid { display: grid; gap: 16px; }
.pm-grid-2 { grid-template-columns: 1fr 1fr; }
.pm-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.col-span-2 { grid-column: span 2; }
.col-span-full { grid-column: 1 / -1; }
.pm-narrow .pm-grid-2, .pm-narrow .pm-grid-3 { grid-template-columns: 1fr; }
.pm-narrow .col-span-2 { grid-column: auto; }

/* ---------------- App shell ---------------- */
.pm-app { min-height: 100vh; display: flex; flex-direction: column; }

/* Responsive stage — .pm-narrow is added when rendered in the mobile frame */
.pm-stage { width: 100%; }

/* Prototype control bar (chrome — not part of the product) */
.pm-chrome {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 18px; background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.pm-chrome-tabs { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 4px; }
.pm-chrome-tab {
  border: 0; background: transparent; color: var(--text-2); font-family: var(--font-sans); font-weight: 600;
  font-size: 13px; padding: 8px 15px; border-radius: var(--radius-pill); cursor: pointer; display: inline-flex; gap: 7px; align-items: center;
  transition: all .18s var(--ease); white-space: nowrap;
}
.pm-chrome-tab svg { width: 16px; height: 16px; }
.pm-chrome-tab[data-on='true'] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.pm-chrome-controls { display: flex; align-items: center; gap: 10px; }
.pm-chrome-label { font-size: 12px; font-weight: 600; color: var(--text-3); letter-spacing: .02em; }

/* ---------------- Product top bar (in-app) ---------------- */
.pm-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px 28px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.pm-topbar-help { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); font-weight: 500; }

/* Stepper bar */
.pm-stepbar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 18px 28px;
}
.pm-stepbar-inner { max-width: 860px; margin: 0 auto; }

/* Page content */
.pm-page { flex: 1; padding: 36px 28px 80px; }
.pm-page-inner { max-width: 1080px; margin: 0 auto; }
.pm-page-narrow { max-width: 760px; margin: 0 auto; }

/* Two-column layout (form + summary rail) */
.pm-cols { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.pm-narrow .pm-cols { grid-template-columns: 1fr; }

.pm-rail { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }

/* ---------------- Hero ---------------- */
.pm-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.pm-narrow .pm-hero { grid-template-columns: 1fr; gap: 28px; }
.pm-hero-h1 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.025em; line-height: 1.02; margin: 18px 0 0; font-size: clamp(34px, 5vw, 54px); color: var(--text); }
.pm-hero-h1 em { font-style: normal; color: var(--accent); }
.pm-hero-sub { font-size: 17px; line-height: 1.6; color: var(--text-2); margin: 18px 0 0; max-width: 30em; }
.pm-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; align-items: center; }

/* Hero visual (building + sun, placeholder-grade but tasteful) */
.pm-hero-visual {
  position: relative; aspect-ratio: 4/3.4; border-radius: var(--radius-xl); overflow: hidden;
  background: linear-gradient(165deg, var(--navy-700), var(--navy-900));
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}

/* Trust row */
.pm-trust { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 26px; }
.pm-trust-item { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); max-width: 200px; line-height: 1.45; }
.pm-trust-item svg { color: var(--positive); flex: none; margin-top: 1px; }

/* ---------------- Tariff card ---------------- */
.pm-tariff { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-md); background: var(--surface); }
.pm-tariff-top { background: linear-gradient(160deg, var(--navy-700), var(--navy-900)); color: #fff; padding: 22px 24px; position: relative; overflow: hidden; }
.pm-tariff-top::after { content: ''; position: absolute; right: -30px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, color-mix(in oklab, var(--accent-400) 40%, transparent), transparent 70%); }
.pm-tariff-name { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-300); position: relative; }
.pm-tariff-price { display: flex; align-items: flex-end; gap: 6px; margin-top: 8px; position: relative; }
.pm-tariff-price b { font-family: var(--font-display); font-size: 44px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.pm-tariff-price span { font-size: 14px; color: #ffffffcc; padding-bottom: 5px; }
.pm-tariff-rows { padding: 8px 24px 4px; }
.pm-trow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.pm-trow:last-child { border-bottom: 0; }
.pm-trow-k { color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.pm-trow-v { font-weight: 600; color: var(--text); text-align: right; }

/* Savings box */
.pm-savings { background: var(--positive-tint); border: 1px solid color-mix(in oklab, var(--positive) 28%, transparent); border-radius: var(--radius-md); padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pm-savings-big { font-family: var(--font-display); font-size: 30px; font-weight: 800; color: var(--positive); letter-spacing: -.02em; line-height: 1; }

/* Summary review list */
.pm-review { display: flex; flex-direction: column; }
.pm-review-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.pm-review-row:last-child { border-bottom: 0; }
.pm-review-k { color: var(--text-3); }
.pm-review-v { color: var(--text); font-weight: 600; text-align: right; }

/* ---------------- Upload ---------------- */
.pm-upload {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-md); padding: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  background: var(--surface-2); cursor: pointer; transition: all .2s var(--ease);
}
.pm-upload:hover { border-color: var(--accent); background: var(--accent-tint); }
.pm-upload-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; color: var(--accent); }
.pm-upload-title { font-weight: 600; font-size: 14px; color: var(--text); }
.pm-upload-sub { font-size: 12.5px; color: var(--text-3); }
.pm-upload-done { border-style: solid; border-color: var(--positive); background: var(--positive-tint); }

/* ---------------- Timeline ---------------- */
.pm-timeline { display: flex; flex-direction: column; }
.pm-tl-item { display: flex; gap: 16px; }
.pm-tl-rail { display: flex; flex-direction: column; align-items: center; flex: none; }
.pm-tl-node {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text-3); font-weight: 700; font-size: 14px;
}
.pm-tl-item[data-state='done'] .pm-tl-node { background: var(--accent-tint); border-color: var(--accent); color: var(--accent); }
.pm-tl-item[data-state='active'] .pm-tl-node { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 5px color-mix(in oklab, var(--accent) 16%, transparent); }
.pm-tl-bar { width: 2px; flex: 1; background: var(--border); margin: 4px 0; min-height: 18px; }
.pm-tl-item[data-state='done'] .pm-tl-bar { background: var(--accent); }
.pm-tl-body { padding-bottom: 26px; }
.pm-tl-item:last-child .pm-tl-body { padding-bottom: 0; }
.pm-tl-title { font-weight: 700; font-size: 15.5px; color: var(--text); font-family: var(--font-display); display: flex; align-items: center; gap: 9px; }
.pm-tl-desc { font-size: 13.5px; line-height: 1.55; color: var(--text-2); margin-top: 4px; }
.pm-tl-eta { font-size: 12px; color: var(--text-3); font-weight: 600; margin-top: 5px; }

/* ---------------- Success ---------------- */
.pm-success-ring {
  width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto;
  background: var(--positive-tint); color: var(--positive); border: 2px solid color-mix(in oklab, var(--positive) 35%, transparent);
  box-shadow: 0 0 0 10px color-mix(in oklab, var(--positive) 9%, transparent);
}
@keyframes pm-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.pm-success-ring { animation: pm-pop .55s var(--ease) both; }

/* Download row */
.pm-dl { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); transition: all .18s var(--ease); cursor: pointer; }
.pm-dl:hover { border-color: var(--accent-tint-border); background: var(--accent-tint); }
.pm-dl-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--accent); flex: none; }
.pm-dl-name { font-weight: 600; font-size: 14px; color: var(--text); }
.pm-dl-meta { font-size: 12px; color: var(--text-3); }

/* ---------------- Sticky mobile bottom CTA ---------------- */
.pm-bottomcta {
  position: sticky; bottom: 0; z-index: 30; padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  background: color-mix(in oklab, var(--surface) 92%, transparent); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border); display: flex; align-items: center; gap: 14px;
}
.pm-bottomcta-price { display: flex; flex-direction: column; line-height: 1.15; flex: none; }
.pm-bottomcta-price small { font-size: 11px; color: var(--text-3); font-weight: 600; }
.pm-bottomcta-price b { font-size: 16px; color: var(--text); font-family: var(--font-display); }
