:root {
  --bg: #0b111a;
  --surface: #121b28;
  --surface-elevated: #182334;
  --border: #253449;
  --text: #eef3f9;
  --muted: #98a9be;
  --accent: #2dd4bf;
  --accent-strong: #14b8a6;
  --warn: #f59e0b;
  --danger: #f87171;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(circle at top right, #16263d 0%, var(--bg) 52%);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1160px, 92vw);
  margin: 0 auto;
}

.topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(11, 17, 26, 0.86);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.08);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 1.5rem;
  padding: 2rem 0 3.5rem;
}

.intro-banner {
  grid-column: 1 / -1;
  max-width: 780px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.4rem;
}

h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.25rem 0 1rem;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.08rem;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--accent);
  color: #06211e;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.95rem;
}

.field span {
  font-size: 0.84rem;
  font-weight: 600;
  color: #d6e1ee;
}

input,
select {
  width: 100%;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-size: 0.93rem;
  font-family: inherit;
}

input:focus,
select:focus {
  outline: 2px solid rgba(45, 212, 191, 0.45);
  border-color: var(--accent);
}

.diagnostic-list {
  display: flex;
  flex-direction: column;
}

.btn-primary,
.btn-secondary {
  cursor: pointer;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.93rem;
  padding: 0.78rem 1.15rem;
  border: none;
  transition: transform 0.12s ease, opacity 0.15s ease;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  color: #051c1a;
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
  opacity: 0.94;
}

.btn-secondary {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text);
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.results-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.score-ring-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

.score-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--surface-elevated);
  stroke-width: 10;
}

.ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 0.55s ease, stroke 0.3s ease;
}

.score-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.score-center span {
  font-size: 1.45rem;
  font-weight: 800;
}

.score-center small {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 2px;
}

.tier-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.tier-pill {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.14);
  color: var(--accent);
}

.waste-callout {
  font-size: 0.86rem;
  color: var(--muted);
}

.waste-callout strong {
  color: var(--text);
}

.pillar-bars {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.15rem;
}

.pillar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  margin-bottom: 0.28rem;
}

.bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-elevated);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #38bdf8);
  transition: width 0.45s ease;
}

.subpanel {
  border-top: 1px solid var(--border);
  padding-top: 0.95rem;
  margin-top: 0.95rem;
}

.subpanel h3 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
}

.clean-list {
  margin: 0;
  padding-left: 1.15rem;
  color: #d6e1ee;
  font-size: 0.9rem;
}

.clean-list li + li {
  margin-top: 0.35rem;
}

.hooks-grid {
  display: grid;
  gap: 0.65rem;
}

.hook-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
}

.hook-card strong {
  display: block;
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.hook-card p {
  margin: 0 0 0.3rem;
  font-size: 0.9rem;
}

.hook-card span {
  font-size: 0.78rem;
  color: var(--muted);
}

.brief-copy {
  margin: 0;
  font-size: 0.9rem;
  color: #d6e1ee;
}

.export-row {
  display: flex;
  gap: 0.65rem;
  margin-top: 1rem;
}

.export-row button {
  flex: 1;
}

.lead-capture-box {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.08), rgba(56, 189, 248, 0.05));
  border: 1px solid rgba(45, 212, 191, 0.3);
}

.lead-capture-box h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.lead-capture-box p {
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.lead-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.lead-form input[type="url"],
.lead-form button {
  grid-column: 1 / -1;
}

.lead-status {
  margin: 0.65rem 0 0 !important;
  font-size: 0.85rem !important;
  color: var(--accent) !important;
  font-weight: 600;
}

@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
  .field-grid,
  .lead-form {
    grid-template-columns: 1fr;
  }
}
