/* ============================================================
   PURELY ENERGY — Shared Design System
   Matches stage.purelyenergy.co.uk exactly
   Fonts: Poppins (display) · Heebo (body) · JetBrains Mono (mono)
   ============================================================ */

/* ── FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Heebo:wght@100;300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ── TOKENS ── */
:root {
  /* Navy / Purple brand */
  --navy-950: #1a0d2e;
  --navy-900: #2d1650;
  --navy-800: #623895;
  --navy-700: #7b4ead;
  --navy-600: #9762d6;
  --navy-500: #ab7de0;
  --navy-400: #c4a0eb;
  --navy-300: #d8bff2;
  --navy-200: #ebd9f8;
  --navy-100: #f3ecfb;
  --navy-50:  #f9f5fd;

  /* Green / Lime CTA */
  --green-700: #6b8f12;
  --green-600: #8ab51e;
  --green-500: #b3d337;
  --green-400: #c8e05e;
  --green-300: #daea8f;
  --green-100: #f2f8d6;
  --green-50:  #f8fce8;

  /* Steel neutrals */
  --steel-900: #1a1d24;
  --steel-800: #2d323b;
  --steel-700: #434a57;
  --steel-600: #5a6272;
  --steel-500: #737d90;
  --steel-400: #8e96a6;
  --steel-300: #adb4c0;
  --steel-200: #d5d9e0;
  --steel-100: #eceef2;
  --steel-50:  #f6f7f9;

  /* Amber */
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-100: #fef3c7;

  /* Status */
  --data-up:      #16a34a;
  --data-down:    #dc2626;
  --data-neutral: #f59e0b;

  /* Semantic */
  --bg-page:             var(--steel-50);
  --bg-surface:          #ffffff;
  --bg-surface-secondary:var(--steel-100);
  --bg-hero:             var(--navy-900);
  --text-heading:        var(--steel-900);
  --text-body:           var(--steel-800);
  --text-muted:          var(--steel-600);
  --text-placeholder:    var(--steel-400);
  --border-default:      var(--steel-200);
  --accent-primary:      var(--navy-800);
  --accent-cta:          var(--green-500);
  --accent-cta-hover:    var(--green-600);

  /* Fonts */
  --font-display: 'Poppins', 'Helvetica Neue', sans-serif;
  --font-body:    'Heebo', 'Helvetica Neue', sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* Radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(12,14,18,0.05);
  --shadow-md: 0 4px 12px rgba(12,14,18,0.08);
  --shadow-lg: 0 8px 24px rgba(12,14,18,0.12);
  --shadow-xl: 0 16px 48px rgba(12,14,18,0.16);

  /* Spacing */
  --sp-1:  4px;  --sp-2:  8px;  --sp-3: 12px;
  --sp-4: 16px;  --sp-5: 20px;  --sp-6: 24px;
  --sp-8: 32px;  --sp-10:40px;  --sp-12:48px;
  --sp-16:64px;  --sp-20:80px;  --sp-30:120px;

  /* Layout */
  --max-w: 1200px;
  --max-w-sm: 720px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-body);
  background: var(--bg-page);
  line-height: 1.6;
  min-height: 100dvh;
}
img, svg { display: block; max-width: 100%; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  color: var(--text-heading);
  line-height: 1.2;
  text-wrap: balance;
}
p { text-wrap: pretty; }
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── NAVBAR ── */
.pe-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #ffffff;
  border-bottom: 1px solid var(--border-default);
  box-shadow: var(--shadow-sm);
}
.pe-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  height: 64px;
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}
.pe-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  flex-shrink: 0;
}
.pe-logo-icon {
  width: 36px; height: 36px;
  background: var(--navy-900);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pe-logo-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--navy-900);
  letter-spacing: -0.02em;
  line-height: 1;
}
.pe-logo-wordmark span { color: var(--green-600); }
.pe-logo-tag {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  margin-top: 3px;
}

.pe-nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  list-style: none;
  margin: 0;
}
.pe-nav-links a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--steel-800);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  transition: color 150ms, background 150ms;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pe-nav-links a:hover,
.pe-nav-links a.active { color: var(--navy-800); background: var(--navy-50); }

.pe-nav-cta {
  margin-left: auto;
  flex-shrink: 0;
}
.pe-btn-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 10px 22px;
  background: var(--accent-cta);
  color: var(--navy-950);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  transition: background 150ms, transform 100ms;
  text-decoration: none;
}
.pe-btn-cta:hover { background: var(--accent-cta-hover); transform: translateY(-1px); }
.pe-btn-cta:active { transform: translateY(0); }

.pe-breadcrumb {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-3) var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-surface);
}
.pe-breadcrumb a { color: var(--accent-primary); }
.pe-breadcrumb a:hover { text-decoration: underline; }
.pe-breadcrumb-sep { color: var(--steel-300); }

/* ── PAGE HERO ── */
.pe-hero {
  background: var(--navy-900);
  padding: var(--sp-16) var(--sp-6) var(--sp-12);
  position: relative;
  overflow: hidden;
}
.pe-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(98,56,149,0.4) 0%, transparent 65%);
  pointer-events: none;
}
.pe-hero::after {
  content: '';
  position: absolute;
  top: -120px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(179,211,55,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.pe-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.pe-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(179,211,55,0.15);
  border: 1px solid rgba(179,211,55,0.3);
  color: var(--green-400);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  margin-bottom: var(--sp-4);
}
.pe-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: var(--sp-4);
}
.pe-hero h1 span { color: var(--green-400); }
.pe-hero p {
  font-family: var(--font-body);
  font-size: 17px;
  color: rgba(255,255,255,0.72);
  max-width: 52ch;
  line-height: 1.65;
  margin-bottom: var(--sp-8);
}
.pe-hero-stats {
  display: flex;
  gap: var(--sp-6);
  flex-wrap: wrap;
  margin-top: var(--sp-8);
}
.pe-hero-stat {
  display: flex;
  flex-direction: column;
}
.pe-hero-stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.pe-hero-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── SEARCH BAR ── */
.pe-search-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-5);
  max-width: 480px;
  transition: border-color 150ms, background 150ms;
}
.pe-search-wrap:focus-within {
  background: rgba(255,255,255,0.15);
  border-color: var(--green-400);
}
.pe-search-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
}
.pe-search-wrap input::placeholder { color: rgba(255,255,255,0.45); }
.pe-search-wrap svg { color: rgba(255,255,255,0.5); flex-shrink: 0; }

/* ── MAIN CONTENT ── */
.pe-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-12) var(--sp-6);
}

/* ── SECTION HEADING ── */
.pe-section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  margin-bottom: var(--sp-3);
}
.pe-section-label::before {
  content: '';
  width: 16px; height: 3px;
  background: var(--accent-cta);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.pe-section-heading {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: var(--sp-8);
  padding-bottom: var(--sp-4);
  border-bottom: 2px solid var(--border-default);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.pe-section-heading svg { color: var(--accent-primary); flex-shrink: 0; }

/* ── CALC GRID ── */
.pe-calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-12);
}

/* ── CALC CARD ── */
.pe-calc-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  text-decoration: none;
  color: inherit;
  transition: border-color 200ms, box-shadow 200ms, transform 150ms;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.pe-calc-card:hover {
  border-color: var(--navy-400);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.pe-calc-card.featured {
  border-color: var(--navy-300);
  background: linear-gradient(135deg, #fff 0%, var(--navy-50) 100%);
}
.pe-calc-card.featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy-800), var(--green-500));
}
.pe-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: var(--navy-50);
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: var(--sp-3);
  flex-shrink: 0;
  letter-spacing: -0.04em;
}
.pe-calc-card.featured .pe-card-badge {
  background: var(--navy-100);
  border-color: var(--navy-300);
}
.pe-calc-card h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: var(--sp-1);
  line-height: 1.3;
}
.pe-calc-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}
.pe-card-arrow {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--sp-3);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-primary);
}

/* ── INDIVIDUAL CALC PAGE ── */
.pe-calc-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-10) var(--sp-6);
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--sp-8);
  align-items: start;
}

.pe-calc-main { min-width: 0; }
.pe-calc-sidebar { position: sticky; top: 80px; }

/* ── CALC WIDGET ── */
.pe-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.pe-widget-header {
  background: var(--navy-900);
  padding: var(--sp-5) var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.pe-widget-header h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.pe-widget-header svg { color: var(--green-400); flex-shrink: 0; }
.pe-widget-body { padding: var(--sp-6); }

/* ── TABS ── */
.pe-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: var(--sp-6);
  gap: 0;
}
.pe-tab {
  padding: var(--sp-3) var(--sp-5);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  transition: color 150ms, border-color 150ms;
  white-space: nowrap;
}
.pe-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}
.pe-tab:hover:not(.active) { color: var(--text-body); }

/* ── FORM FIELDS ── */
.pe-field { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.pe-field:last-child { margin-bottom: 0; }
.pe-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
  font-family: var(--font-body);
}
.pe-label span { color: var(--text-muted); font-weight: 400; }
.pe-hint { font-size: 12px; color: var(--text-muted); }

.pe-input-wrap { position: relative; }
.pe-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-size: 15px;
  color: var(--text-body);
  transition: border-color 150ms, box-shadow 150ms;
  -webkit-appearance: none;
}
.pe-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(98,56,149,0.12);
}
.pe-input::placeholder { color: var(--text-placeholder); }
.pe-input.mono { font-family: var(--font-mono); font-size: 16px; letter-spacing: 0.02em; }
.pe-input-unit {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
  pointer-events: none;
}
.pe-input.has-unit { padding-right: 56px; }

.pe-select {
  width: 100%;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text-body);
  font-family: var(--font-body);
  cursor: pointer;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235a6272' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  transition: border-color 150ms, box-shadow 150ms;
}
.pe-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(98,56,149,0.12);
}

/* ── FORM GRIDS ── */
.pe-form-grid   { display: grid; gap: var(--sp-5); }
.pe-form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
.pe-form-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-4); }

/* ── BUTTONS ── */
.pe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  padding: 11px 24px;
  cursor: pointer;
  transition: all 150ms;
  border: 1.5px solid transparent;
  white-space: nowrap;
}
.pe-btn-primary {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}
.pe-btn-primary:hover { background: var(--navy-700); border-color: var(--navy-700); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.pe-btn-primary:active { transform: translateY(0); box-shadow: none; }

.pe-btn-green {
  background: var(--accent-cta);
  color: var(--navy-950);
  border-color: var(--accent-cta);
  font-weight: 800;
}
.pe-btn-green:hover { background: var(--accent-cta-hover); border-color: var(--accent-cta-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.pe-btn-outline {
  background: transparent;
  color: var(--accent-primary);
  border-color: var(--border-default);
}
.pe-btn-outline:hover { border-color: var(--navy-400); background: var(--navy-50); }

.pe-btn-lg { padding: 13px 32px; font-size: 15px; }
.pe-btn-sm { padding: 7px 16px; font-size: 13px; }
.pe-btn-full { width: 100%; }
.pe-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── RESULT BOX ── */
.pe-result {
  background: linear-gradient(135deg, var(--navy-900) 0%, #3d2068 100%);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  margin-top: var(--sp-6);
  display: none;
}
.pe-result.visible { display: block; }
.pe-result-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-400);
  margin-bottom: var(--sp-2);
}
.pe-result-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: var(--sp-1);
}
.pe-result-unit {
  font-size: 18px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  margin-left: 6px;
}
.pe-result-sub { font-size: 13px; color: rgba(255,255,255,0.55); margin-top: var(--sp-2); }

.pe-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}
.pe-result-item {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: var(--sp-3) var(--sp-4);
}
.pe-result-item-label { font-size: 11px; color: rgba(255,255,255,0.5); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.pe-result-item-value { font-family: var(--font-mono); font-size: 16px; font-weight: 700; color: #fff; }

.pe-error-box {
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  padding: var(--sp-4) var(--sp-5);
  margin-top: var(--sp-4);
  font-size: 13px;
  color: var(--data-down);
  display: none;
  align-items: flex-start;
  gap: var(--sp-2);
}
.pe-error-box.visible { display: flex; }

/* ── FORMULA BOX ── */
.pe-formula {
  background: var(--steel-50);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--accent-cta);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--sp-5);
  margin-top: var(--sp-6);
}
.pe-formula-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
}
.pe-formula code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-primary);
  display: block;
  line-height: 1.8;
  background: rgba(98,56,149,0.06);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
}

/* ── INFO BOX ── */
.pe-info-box {
  background: var(--navy-50);
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-md);
  padding: var(--sp-4) var(--sp-5);
  font-size: 13px;
  color: var(--navy-800);
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
}
.pe-info-box svg { flex-shrink: 0; margin-top: 1px; }
.pe-info-box p { color: var(--text-body); margin: 0; }
.pe-info-box p strong { color: var(--accent-primary); }

.pe-success-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: var(--sp-4) var(--sp-5);
  font-size: 13px;
  display: flex;
  gap: var(--sp-3);
  color: var(--data-up);
}
.pe-success-box p { color: var(--text-body); margin: 0; }

/* ── RELATED CALCULATORS ── */
.pe-related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.pe-related-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: border-color 150ms, background 150ms;
}
.pe-related-card:hover { border-color: var(--navy-400); background: var(--navy-50); }
.pe-related-icon {
  width: 32px; height: 32px;
  background: var(--navy-50);
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--navy-800);
  flex-shrink: 0;
  letter-spacing: -0.04em;
}
.pe-related-card span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
}

/* ── SIDEBAR WIDGETS ── */
.pe-sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--sp-5);
}
.pe-sidebar-card-header {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-default);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-heading);
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.pe-sidebar-card-header svg { color: var(--accent-primary); }
.pe-sidebar-card-body { padding: var(--sp-5); }

/* ── CTA BANNER ── */
.pe-cta-banner {
  background: linear-gradient(135deg, var(--navy-900) 0%, #3d2068 100%);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  text-align: center;
}
.pe-cta-banner h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--sp-2);
}
.pe-cta-banner p { font-size: 13px; color: rgba(255,255,255,0.65); margin-bottom: var(--sp-5); max-width: 100%; }

/* ── RANGE SLIDER ── */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  background: var(--border-default);
  border-radius: var(--radius-full);
  outline: none;
  border: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 150ms;
}
input[type=range]:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(98,56,149,0.2);
}

/* ── TABLE ── */
.pe-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-default); }
.pe-table { width: 100%; border-collapse: collapse; }
.pe-table th {
  background: var(--steel-50);
  padding: var(--sp-3) var(--sp-5);
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-default);
}
.pe-table td {
  padding: var(--sp-3) var(--sp-5);
  font-size: 14px;
  border-bottom: 1px solid var(--steel-100);
}
.pe-table tr:last-child td { border-bottom: none; }
.pe-table tr:hover td { background: var(--steel-50); }
.pe-table .pe-num { font-family: var(--font-mono); font-size: 14px; }
.pe-table .pe-highlight { font-weight: 700; color: var(--accent-primary); }
.pe-table tfoot td { background: var(--steel-100); font-weight: 700; border-top: 2px solid var(--border-default); }

/* ── STEP WIZARD PROGRESS ── */
.pe-steps {
  display: flex;
  align-items: center;
  gap: 0;
  padding: var(--sp-4) var(--sp-6);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.pe-steps-inner {
  display: flex;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  min-width: 560px;
}
.pe-step {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: 1;
  position: relative;
}
.pe-step:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: calc(50% - 18px);
  height: 2px;
  background: var(--border-default);
  z-index: 0;
}
.pe-step.done:not(:last-child)::after { background: var(--accent-primary); }
.pe-step.active:not(:last-child)::after { background: var(--accent-primary); }
.pe-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border-default);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-display);
  background: var(--bg-surface);
  color: var(--text-muted);
  position: relative; z-index: 1;
  flex-shrink: 0;
  transition: all 200ms;
}
.pe-step.done .pe-step-num { background: var(--accent-primary); border-color: var(--accent-primary); color: #fff; }
.pe-step.active .pe-step-num { border-color: var(--accent-primary); color: var(--accent-primary); box-shadow: 0 0 0 4px rgba(98,56,149,0.12); }
.pe-step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.pe-step.active .pe-step-label { color: var(--text-heading); }
.pe-step.done .pe-step-label { color: var(--accent-primary); }

/* ── CHART CONTAINERS ── */
.pe-chart-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
}
.pe-chart-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.pe-chart-title svg { color: var(--accent-primary); }

/* ── KPI CARDS ── */
.pe-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-4);
}
.pe-kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 200ms, transform 150ms;
}
.pe-kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.pe-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--kpi-accent, var(--accent-primary));
}
.pe-kpi-icon { margin-bottom: var(--sp-3); }
.pe-kpi-value {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1;
  margin-bottom: 4px;
}
.pe-kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.pe-kpi-sub { font-size: 12px; color: var(--text-muted); margin-top: var(--sp-2); }
.pe-kpi-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  margin-top: var(--sp-2);
}
.pe-kpi-badge.up { background: #f0fdf4; color: var(--data-up); }
.pe-kpi-badge.warn { background: var(--amber-100); color: var(--amber-600); }

/* ── FOOTER ── */
.pe-footer {
  background: var(--navy-900);
  padding: var(--sp-12) var(--sp-6) var(--sp-8);
  margin-top: var(--sp-20);
}
.pe-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.pe-footer-top {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--sp-16);
  padding-bottom: var(--sp-10);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: var(--sp-8);
}
.pe-footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-top: var(--sp-4);
  line-height: 1.7;
  max-width: 30ch;
}
.pe-footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
}
.pe-footer-col h4 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  margin-bottom: var(--sp-4);
}
.pe-footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--sp-3); }
.pe-footer-col a {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  transition: color 150ms;
  text-decoration: none;
}
.pe-footer-col a:hover { color: #fff; }
.pe-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-4);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}
.pe-footer-certs { display: flex; gap: var(--sp-3); align-items: center; }
.pe-cert-badge {
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.06em;
}

/* ── UTILITIES ── */
.pe-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
.pe-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-5); }
.pe-flex { display: flex; }
.pe-flex-center { display: flex; align-items: center; }
.pe-justify-between { justify-content: space-between; }
.pe-gap-2 { gap: var(--sp-2); }
.pe-gap-4 { gap: var(--sp-4); }
.pe-mt-4 { margin-top: var(--sp-4); }
.pe-mt-6 { margin-top: var(--sp-6); }
.pe-mt-8 { margin-top: var(--sp-8); }
.pe-mb-4 { margin-bottom: var(--sp-4); }
.pe-mb-6 { margin-bottom: var(--sp-6); }
.pe-mb-8 { margin-bottom: var(--sp-8); }
.pe-text-muted { color: var(--text-muted); }
.pe-text-sm { font-size: 13px; }
.pe-text-xs { font-size: 11px; }
.pe-font-mono { font-family: var(--font-mono); }
.pe-hidden { display: none !important; }
.pe-divider { height: 1px; background: var(--border-default); margin: var(--sp-6) 0; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .pe-calc-page { grid-template-columns: 1fr; }
  .pe-calc-sidebar { position: static; }
  .pe-footer-top { grid-template-columns: 1fr; gap: var(--sp-8); }
  .pe-footer-links { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 640px) {
  .pe-form-grid-2, .pe-form-grid-3 { grid-template-columns: 1fr; }
  .pe-grid-2, .pe-grid-3 { grid-template-columns: 1fr; }
  .pe-hero { padding: var(--sp-12) var(--sp-4) var(--sp-8); }
  .pe-main { padding: var(--sp-8) var(--sp-4); }
  .pe-footer-links { grid-template-columns: 1fr 1fr; }
  .pe-kpi-grid { grid-template-columns: 1fr 1fr; }
  .pe-related-grid { grid-template-columns: 1fr; }
}

/* ── PRINT ── */
@media print {
  .pe-nav, .pe-steps, .pe-footer, .pe-btn, .pe-sidebar-card.pe-cta-banner { display: none !important; }
  .pe-calc-page { grid-template-columns: 1fr; }
  body { background: white; }
}
