/* Grid Compass — Energy Stability Report */
/* Prepared. Protected. Independent. */

:root {
  --navy:   #0d1b2a;
  --blue:   #0f2a44;
  --sky:    #1799b5;
  --gold:   #17c3e0;   /* Grid Compass cyan — replaces gold */
  --orange: #e85c25;
  --hot:    #e85c25;
  --warm:   #d4a017;
  --review: #3a7fa0;
  --light:  #f4f7fb;
  --white:  #ffffff;
  --gray:   #6b7280;
  --border: #dde3ec;
  --text:   #1a2332;
  --muted:  #5a6474;
  --radius: 10px;
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.12);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--light);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Typography ─────────────────────────────────────────────────────────── */

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
p { color: var(--muted); }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────────────────────── */

.container { max-width: 900px; margin: 0 auto; padding: 0 1.25rem; }
.container--wide { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.container--narrow { max-width: 660px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  background: var(--navy);
  padding: 0.75rem 0;
  border-bottom: 3px solid var(--gold);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}
.logo-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 6px;
}
.logo-sub { font-size: 0.72rem; font-weight: 400; opacity: 0.7; display: block; }
.header-badge {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  font-size: 0.8rem;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  padding: 5rem 0 4rem;
  text-align: center;
}
.hero .eyebrow {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}
.hero h1 { color: var(--white); margin-bottom: 1rem; }
.hero p { color: rgba(255,255,255,0.75); font-size: 1.1rem; max-width: 600px; margin: 0 auto 2rem; }
.hero-proof {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.hero-proof-item { text-align: center; }
.hero-proof-item strong {
  display: block;
  font-size: 1.5rem;
  color: var(--gold);
  font-weight: 700;
}
.hero-proof-item span { font-size: 0.82rem; color: rgba(255,255,255,0.6); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn--primary {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}
.btn--primary:hover { background: #d44e1f; border-color: #d44e1f; }
.btn--secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn--secondary:hover { background: rgba(255,255,255,0.08); }
.btn--outline {
  background: transparent;
  color: var(--sky);
  border-color: var(--sky);
}
.btn--outline:hover { background: var(--sky); color: white; }
.btn--ghost {
  background: transparent;
  color: var(--gray);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--light); }
.btn--lg { padding: 1rem 2.5rem; font-size: 1.1rem; }
.btn--sm { padding: 0.5rem 1.1rem; font-size: 0.88rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Cards ───────────────────────────────────────────────────────────────── */

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-body { padding: 1.75rem; }
.card-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

/* ── Score Display ────────────────────────────────────────────────────────── */

.scores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.score-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.score-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.score-value {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.score-bar-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.6rem;
}
.score-bar { height: 100%; border-radius: 3px; transition: width 0.8s ease; }
.score-bar--ep { background: var(--sky); }
.score-bar--or { background: var(--orange); }
.score-bar--sf { background: #38a169; }

/* ── Temperature Badge ───────────────────────────────────────────────────── */

.temp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.temp-badge--hot { background: #fff0eb; color: var(--hot); border: 1px solid #ffc9b0; }
.temp-badge--warm { background: #fef9eb; color: var(--warm); border: 1px solid #f5d97a; }
.temp-badge--review { background: #eef3fb; color: var(--review); border: 1px solid #b5caeb; }

.temp-hero {
  text-align: center;
  padding: 2rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}
.temp-hero--hot { background: linear-gradient(135deg, #fff0eb, #ffe5d4); border: 2px solid #ffc9b0; }
.temp-hero--warm { background: linear-gradient(135deg, #fef9eb, #fdf0c0); border: 2px solid #f5d97a; }
.temp-hero--review { background: linear-gradient(135deg, #eef3fb, #dce8f5); border: 2px solid #b5caeb; }
.temp-hero .temp-label {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
  margin-bottom: 0.25rem;
}
.temp-hero .temp-value {
  font-size: 2rem;
  font-weight: 800;
}
.temp-hero .temp-desc {
  font-size: 0.9rem;
  margin-top: 0.4rem;
  opacity: 0.75;
}

/* ── Insight Sections ────────────────────────────────────────────────────── */

.insight-section {
  border-left: 4px solid var(--sky);
  padding: 1rem 1.25rem;
  background: #f8fafd;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1rem;
}
.insight-section h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sky);
  margin-bottom: 0.35rem;
}
.insight-section p { color: var(--text); font-size: 0.95rem; }

/* ── Quiz ────────────────────────────────────────────────────────────────── */

.quiz-wrap {
  min-height: 100vh;
  background: var(--light);
  padding: 2rem 0 4rem;
}
.quiz-progress {
  background: var(--border);
  height: 4px;
  border-radius: 2px;
  margin-bottom: 2rem;
  overflow: hidden;
}
.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--sky), var(--orange));
  border-radius: 2px;
  transition: width 0.4s ease;
}
.quiz-step { display: none; }
.quiz-step.active { display: block; }
.step-counter {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.quiz-step h2 { margin-bottom: 0.5rem; }
.quiz-step .step-desc { margin-bottom: 1.75rem; font-size: 0.95rem; }

/* ── Form Elements ───────────────────────────────────────────────────────── */

.field-group { margin-bottom: 1.25rem; }
.field-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="tel"],
.field-group select,
.field-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s;
  appearance: none;
}
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(45,111,165,0.12);
}
.field-group.error input,
.field-group.error select { border-color: #e53e3e; }
.field-error { font-size: 0.82rem; color: #e53e3e; margin-top: 0.3rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Option Cards */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
}
.option-grid--2 { grid-template-columns: 1fr 1fr; }
.option-card {
  position: relative;
  cursor: pointer;
}
.option-card input[type="radio"],
.option-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.option-card label {
  display: block;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  background: var(--white);
  transition: all 0.15s;
}
.option-card label:hover { border-color: var(--sky); background: #f0f6ff; }
.option-card input:checked + label {
  border-color: var(--sky);
  background: var(--sky);
  color: var(--white);
}
.option-card label .opt-icon { display: block; font-size: 1.5rem; margin-bottom: 0.3rem; }
.option-card label .opt-label { display: block; font-size: 0.85rem; }

/* Slider */
.slider-wrap { padding: 0.5rem 0; }
.slider-wrap input[type="range"] {
  width: 100%;
  height: 6px;
  appearance: none;
  background: linear-gradient(to right, var(--sky) 0%, var(--sky) var(--pct, 20%), var(--border) var(--pct, 20%));
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.slider-wrap input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sky);
  border: 3px solid white;
  box-shadow: 0 1px 6px rgba(0,0,0,0.25);
  cursor: pointer;
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.4rem;
}
.slider-value {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sky);
  margin-bottom: 0.25rem;
}

/* ── Admin / Table ───────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th {
  text-align: left;
  padding: 0.65rem 0.9rem;
  background: var(--light);
  border-bottom: 2px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
}
td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:hover td { background: #f9fbfd; }
.td-name { font-weight: 600; color: var(--text); }
.td-muted { color: var(--muted); }

/* Status pills */
.status-pill {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-new { background: #eef3fb; color: #2d6fa5; }
.status-contacted { background: #f0fdf4; color: #16a34a; }
.status-scheduled { background: #fef9eb; color: #ca8a04; }
.status-closed { background: #f1f5f9; color: #475569; }
.status-dnq { background: #fef2f2; color: #dc2626; }

/* ── Stats Bar ───────────────────────────────────────────────────────────── */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-lbl { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-num--hot { color: var(--hot); }
.stat-num--warm { color: var(--warm); }
.stat-num--review { color: var(--review); }

/* ── Filter Bar ──────────────────────────────────────────────────────────── */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
}
.filter-bar input[type="text"] {
  padding: 0.6rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  flex: 1;
  min-width: 180px;
}
.filter-bar select {
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
}

/* ── Lead Detail ─────────────────────────────────────────────────────────── */

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.detail-item { }
.detail-item dt {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.detail-item dd { font-size: 0.95rem; color: var(--text); font-weight: 500; }

.sales-block {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.sales-block h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.sales-block p { color: rgba(255,255,255,0.85); font-size: 0.93rem; line-height: 1.65; }
.sales-block .quote {
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  font-style: italic;
  color: rgba(255,255,255,0.9);
}

/* ── CRM Actions ─────────────────────────────────────────────────────────── */

.crm-panel { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.crm-panel label { font-size: 0.88rem; font-weight: 600; display: block; margin-bottom: 0.3rem; color: var(--text); }
.crm-panel select, .crm-panel textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  background: white;
}
.crm-panel textarea { resize: vertical; min-height: 90px; font-family: inherit; }

/* ── Password Gate ───────────────────────────────────────────────────────── */

.gate-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy), var(--blue));
}
.gate-card {
  background: white;
  border-radius: 14px;
  padding: 2.5rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.25);
  text-align: center;
}
.gate-card .logo { justify-content: center; margin-bottom: 1.5rem; }
.gate-card h2 { margin-bottom: 0.5rem; }
.gate-card p { margin-bottom: 1.5rem; font-size: 0.9rem; }
.gate-card input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 1rem;
  text-align: center;
  letter-spacing: 0.1em;
}
.gate-card input:focus { outline: none; border-color: var(--sky); }
.gate-error { color: #e53e3e; font-size: 0.85rem; margin-top: 0.5rem; }

/* ── Report Page ─────────────────────────────────────────────────────────── */

.report-header {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: white;
  padding: 2.5rem 0 2rem;
}
.report-header h1 { color: white; font-size: 1.5rem; margin-bottom: 0.25rem; }
.report-header p { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.report-body { padding: 2rem 0 4rem; }
.report-section { margin-bottom: 2rem; }
.report-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.25rem;
}

/* ── CTA Box ─────────────────────────────────────────────────────────────── */

.cta-box {
  background: linear-gradient(135deg, var(--orange), #c94a1a);
  color: white;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
}
.cta-box h3 { color: white; font-size: 1.3rem; margin-bottom: 0.5rem; }
.cta-box p { color: rgba(255,255,255,0.85); margin-bottom: 1.25rem; }
.cta-box .disclaimer { font-size: 0.75rem; color: rgba(255,255,255,0.6); margin-top: 0.75rem; }

/* ── Trust Bar ───────────────────────────────────────────────────────────── */

.trust-bar {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
}
.trust-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.trust-item .check { color: #38a169; font-weight: 700; }

/* ── Utility ─────────────────────────────────────────────────────────────── */

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 0.85rem; }
.flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  border-top: 3px solid var(--gold);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .option-grid--2 { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0 2.5rem; }
  .card-body { padding: 1.25rem; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar input, .filter-bar select { width: 100%; }
  .scores-grid { grid-template-columns: 1fr 1fr; }
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  th, td { padding: 0.5rem 0.65rem; }
}
