:root {
  --bg: #070b14;
  --bg-elev: #0d1424;
  --bg-card: #111a2e;
  --border: #1e2d4a;
  --border-hi: #2d4470;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #10b981;
  --warn: #f59e0b;
  --danger: #f43f5e;
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 18% 0%, #0f1f3d 0%, var(--bg) 52%);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.hidden { display: none !important; }
.print-only { display: none; }

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 11, 20, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }
.brand-icon { width: 28px; height: 28px; }
.brand-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.9rem;
}
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover { color: #fff; text-decoration: none; }
.nav-cta {
  color: #fff !important;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 6px 12px;
  border-radius: 8px;
}

/* Hero */
.hero {
  padding: 56px 0 36px;
  text-align: center;
}
.hero-inner { max-width: 820px; }
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-2);
}
h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #fff;
}
.accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin: 0 auto 28px;
  max-width: 660px;
  color: var(--muted);
  font-size: 1.03rem;
}

/* Scan Form */
.scan-form { margin: 0 auto; max-width: 680px; }
.scan-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--border-hi);
  border-radius: 14px;
  padding: 6px 6px 6px 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.38);
}
.scan-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}
.scan-prefix {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.92rem;
  user-select: none;
}
.scan-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--mono);
  font-size: 1rem;
  padding: 10px 8px;
  min-width: 0;
}
.demo-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.demo-label { font-size: 0.82rem; color: var(--muted); }
.chip-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: #cbd5e1;
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.chip-btn:hover { border-color: var(--accent); color: #fff; }

/* Buttons */
.btn-primary, .btn-secondary, .btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 18px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.1s ease, opacity 0.15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #10b981);
  color: #04101d;
}
.btn-primary:hover { opacity: 0.94; text-decoration: none; }
.btn-primary:disabled { opacity: 0.55; cursor: wait; }
.btn-secondary {
  background: var(--bg-elev);
  border-color: var(--border-hi);
  color: #e2e8f0;
}
.btn-secondary:hover { border-color: var(--accent); color: #fff; text-decoration: none; }
.btn-accent {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}
.btn-accent:hover { background: rgba(16, 185, 129, 0.24); text-decoration: none; }
.full-width { width: 100%; }

/* Feedback & Loading */
.alert-error {
  margin: 18px auto 0;
  max-width: 680px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: #fda4af;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.92rem;
}
.loading-bar {
  margin: 22px auto 0;
  max-width: 680px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: 12px;
  color: #bae6fd;
  font-size: 0.9rem;
}
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(56, 189, 248, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.recent-strip {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.recent-label { font-size: 0.78rem; color: var(--muted); }
.recent-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.recent-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.76rem;
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #cbd5e1;
}
.recent-pill:hover { border-color: var(--accent); text-decoration: none; }
.grade-dot { font-weight: 700; }

/* Report Overview */
.report-section { padding: 12px 0 48px; }
.overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}
.gauge-col {
  position: relative;
  width: 164px;
  height: 164px;
  margin: 0 auto;
}
.gauge-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: #1e293b; stroke-width: 10; }
.gauge-fill {
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 364.4;
  stroke-dashoffset: 364.4;
  transition: stroke-dashoffset 0.7s ease, stroke 0.3s ease;
}
.gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.grade-letter { font-size: 2.5rem; font-weight: 800; line-height: 1; color: #fff; }
.score-num { font-size: 0.86rem; color: var(--muted); font-family: var(--mono); margin-top: 4px; }

.domain-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.report-domain { margin: 0; font-size: 1.65rem; font-family: var(--mono); color: #fff; }
.report-subline { margin: 6px 0 18px; color: var(--muted); font-size: 0.88rem; }
.meta-pill {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.meta-pill.warn { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border-color: rgba(245, 158, 11, 0.4); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.kpi-box {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.kpi-label { display: block; font-size: 0.73rem; color: var(--muted); }
.kpi-box strong { font-size: 0.94rem; font-family: var(--mono); color: #fff; }

.action-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Drift Card */
.drift-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.drift-card.drifted { border-color: rgba(245, 158, 11, 0.55); background: rgba(245, 158, 11, 0.06); }
.drift-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.drift-body { margin-top: 8px; font-size: 0.86rem; color: var(--muted); font-family: var(--mono); }
.drift-add { color: #34d399; }
.drift-rem { color: #fb7185; }

/* Pillars Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.pillar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.pillar-head h3 { margin: 0; font-size: 1rem; color: #fff; }
.pillar-score { font-family: var(--mono); font-weight: 700; font-size: 0.9rem; color: var(--accent); }
.bar-track {
  height: 6px;
  background: #1e293b;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.bar-fill { height: 100%; border-radius: 999px; }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 0.86rem;
}
.check-icon { font-weight: 800; line-height: 1.4; }
.st-pass { color: var(--accent-2); }
.st-warn { color: var(--warn); }
.st-fail { color: var(--danger); }
.st-info { color: var(--accent); }
.check-name { font-weight: 600; color: #f1f5f9; }
.check-detail { color: var(--muted); font-size: 0.8rem; word-break: break-word; }

/* Panels */
.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.panel-head h3 { margin: 0; font-size: 1.05rem; color: #fff; }

.recs-list { display: grid; gap: 12px; }
.rec-item {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 14px 16px;
}
.rec-item.sev-critical { border-left-color: var(--danger); }
.rec-item.sev-high { border-left-color: #fb923c; }
.rec-item.sev-medium { border-left-color: var(--warn); }
.rec-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.sev-pill {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}
.sev-critical .sev-pill { background: rgba(244, 63, 94, 0.2); color: #fda4af; }
.sev-high .sev-pill { background: rgba(251, 146, 60, 0.2); color: #fdba74; }
.sev-medium .sev-pill { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.rec-title { font-weight: 700; color: #fff; font-size: 0.94rem; }
.rec-detail { margin: 4px 0 8px; color: var(--muted); font-size: 0.85rem; }
.rec-code {
  margin: 0;
  background: #060a12;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #7dd3fc;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* DNS Table */
.dns-table { display: grid; gap: 8px; }
.dns-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.8rem;
}
.dns-type { font-weight: 700; color: var(--accent); }
.dns-vals { color: #cbd5e1; word-break: break-all; }

/* Alo Technologies CTA Banner */
.alo-cta-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(16, 185, 129, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  padding: 24px 28px;
}
.cta-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
}
.alo-cta-card h3 { margin: 0 0 6px; font-size: 1.15rem; color: #fff; }
.alo-cta-card p { margin: 0; color: #cbd5e1; font-size: 0.9rem; max-width: 660px; }

/* Watchtower */
.watchtower-section { padding: 36px 0; }
.watchtower-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: 18px;
  padding: 32px;
}
.watchtower-copy h2 { margin: 0 0 12px; font-size: 1.65rem; color: #fff; line-height: 1.22; }
.watchtower-copy p { color: var(--muted); margin: 0 0 16px; }
.bullet-list { margin: 0; padding-left: 18px; color: #cbd5e1; display: grid; gap: 8px; font-size: 0.92rem; }

.monitor-form { display: grid; gap: 14px; }
.monitor-form label { display: grid; gap: 6px; font-size: 0.84rem; color: #cbd5e1; font-weight: 600; }
.monitor-form input, .monitor-form select {
  background: var(--bg-elev);
  border: 1px solid var(--border-hi);
  border-radius: 10px;
  padding: 11px 12px;
  color: #fff;
  font-size: 0.92rem;
  outline: none;
}
.monitor-form input:focus, .monitor-form select:focus { border-color: var(--accent); }
.mon-feedback {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
}
.mon-feedback.ok { background: rgba(16, 185, 129, 0.14); border: 1px solid rgba(16, 185, 129, 0.45); color: #6ee7b7; }
.mon-feedback.err { background: rgba(244, 63, 94, 0.14); border: 1px solid rgba(244, 63, 94, 0.45); color: #fda4af; }

/* Pricing */
.pricing-section { padding: 36px 0 64px; }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head h2 { margin: 0; font-size: 1.85rem; color: #fff; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.price-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 12px 36px rgba(14, 165, 233, 0.16);
}
.price-badge {
  position: absolute;
  top: -11px;
  right: 18px;
  background: linear-gradient(135deg, #0ea5e9, #10b981);
  color: #04101d;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}
.price-tier { font-size: 1.05rem; font-weight: 700; color: #fff; }
.price-val { font-size: 2.2rem; font-weight: 800; color: #fff; margin: 6px 0 2px; }
.price-val span { font-size: 0.92rem; font-weight: 500; color: var(--muted); }
.price-php { margin: 0 0 18px; font-size: 0.82rem; color: var(--accent); }
.price-card ul {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 9px;
  flex: 1;
  color: #cbd5e1;
  font-size: 0.88rem;
}
.price-card li::before { content: "✓ "; color: var(--accent-2); font-weight: 700; }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 36px;
  color: var(--muted);
  font-size: 0.86rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { color: var(--muted); }

/* Responsive */
@media (max-width: 880px) {
  .overview-card, .watchtower-card, .pillars-grid, .pricing-grid {
    grid-template-columns: 1fr;
  }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { display: none; }
}

/* Executive PDF Print Stylesheet */
@media print {
  body { background: #fff !important; color: #0f172a !important; }
  .no-print { display: none !important; }
  .print-only { display: flex !important; }
  .print-header {
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 10px;
    margin-bottom: 18px;
  }
  .print-brand { font-size: 1.15rem; font-weight: 800; color: #0f172a; }
  .print-sub { font-size: 0.8rem; color: #475569; }
  .print-meta { font-size: 0.78rem; color: #475569; text-align: right; font-family: var(--mono); }
  .overview-card, .pillar-card, .panel-card, .drift-card, .alo-cta-card, .kpi-box, .rec-item, .dns-row {
    background: #fff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .report-domain, .grade-letter, .pillar-head h3, .panel-head h3, .rec-title, .kpi-box strong, .check-name, .alo-cta-card h3 {
    color: #0f172a !important;
  }
  .check-detail, .rec-detail, .report-subline, .kpi-label, .dns-vals, .alo-cta-card p {
    color: #334155 !important;
  }
  .rec-code { background: #f8fafc !important; color: #0f172a !important; border-color: #cbd5e1 !important; }
  .pillars-grid { grid-template-columns: 1fr 1fr; }
}
