:root {
  --bg: #07111f;
  --bg-soft: #0d1b2d;
  --panel: rgba(10, 23, 39, 0.86);
  --panel-border: rgba(136, 181, 255, 0.15);
  --text: #e8f0ff;
  --muted: #9db0d0;
  --primary: #6ea8fe;
  --primary-strong: #4c8dff;
  --accent: #5eead4;
  --accent-soft: rgba(94, 234, 212, 0.12);
  --danger: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(78, 141, 255, 0.2), transparent 28%),
    radial-gradient(circle at top right, rgba(94, 234, 212, 0.14), transparent 22%),
    linear-gradient(180deg, #050b14 0%, #07111f 45%, #081526 100%);
  color: var(--text);
  min-height: 100vh;
}

button {
  font: inherit;
  cursor: pointer;
}

.site-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 20px 56px;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  margin-bottom: 24px;
}

.brand-lockup,
.hero-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.brand-lockup {
  padding: 40px;
  border-radius: var(--radius-lg);
}

.brand-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 18px;
}

.brand-line h1 {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.brand-signoff {
  font-size: 0.95rem;
  text-transform: none;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.brand-initials {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.tagline {
  max-width: 720px;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-card,
.panel {
  border-radius: var(--radius-lg);
}

.hero-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-card h2,
.panel-header h3,
.results h4,
#questionText {
  margin: 0 0 10px;
}

.hero-card p,
.question-hint,
.question-kicker,
.empty-state p,
#profileSummary,
li,
#questionStep,
#progressText {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.77rem;
  color: var(--accent);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.option-btn,
.template-btn {
  border-radius: 999px;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  padding: 12px 18px;
  min-height: 44px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #04111d;
  font-weight: 700;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
}

.ghost-btn {
  background: transparent;
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.08);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.option-btn:hover,
.template-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:active,
.secondary-btn:active,
.ghost-btn:active,
.option-btn:active {
  transform: translateY(0);
}

.main-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

.template-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 2px 0 14px;
}

.template-btn {
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.1);
}

.panel {
  padding: 26px;
}

.resume-banner {
  margin-bottom: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.08);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.resume-actions {
  display: flex;
  gap: 8px;
}

.resume-actions .ghost-btn {
  padding: 7px 12px;
  min-height: 36px;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.progress-wrap {
  min-width: 160px;
  text-align: right;
}

.progress-bar {
  margin-top: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

#progressFill {
  height: 100%;
  width: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  transition: width 0.22s ease;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.question-kicker {
  margin: 6px 0 2px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--accent);
}

.category-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
}

.options {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.option-btn {
  width: 100%;
  text-align: left;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
  line-height: 1.45;
}

.option-btn.selected {
  border-color: rgba(110, 168, 254, 0.7);
  background: rgba(110, 168, 254, 0.12);
}

.actions-row {
  margin-top: 20px;
}

.question-container,
.results {
  animation: fadeIn 0.2s ease;
}

.empty-state {
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 24px;
}

.empty-state.compact {
  min-height: 220px;
}

.empty-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text) !important;
}

.score-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 22px;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

#profileTitle {
  margin: 0;
  line-height: 1.3;
}

.posture-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.posture-red {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(248, 113, 113, 0.4);
}

.posture-amber {
  color: #fde68a;
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.34);
}

.posture-green {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(74, 222, 128, 0.35);
}

.mission-rank {
  margin: 12px 0 2px;
  font-size: 0.92rem;
}

.quick-wins-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(94, 234, 212, 0.07);
  border: 1px solid rgba(94, 234, 212, 0.2);
  margin-bottom: 18px;
}

.quick-wins-card h4 {
  margin-bottom: 8px;
}

#quickWins {
  margin-bottom: 4px;
}

.sprint-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  margin-bottom: 18px;
}

.sprint-card h4 {
  margin-bottom: 8px;
}

#immediateSprint {
  margin-bottom: 4px;
}

.confidence-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(110, 168, 254, 0.09);
  border: 1px solid rgba(110, 168, 254, 0.24);
  margin-bottom: 18px;
}

.focus-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.22);
  margin-bottom: 18px;
}

.ownership-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  margin-bottom: 18px;
}

.ownership-card h4 {
  margin-bottom: 8px;
}

#ownershipPlan {
  margin-bottom: 4px;
}

.focus-card h4 {
  margin-bottom: 8px;
}

#threatFocus {
  margin-bottom: 4px;
}

.action-toolbar {
  margin-bottom: 10px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.filter-btn {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 7px 12px;
  min-height: 34px;
}

.filter-btn.active {
  background: rgba(110, 168, 254, 0.2);
  border-color: rgba(110, 168, 254, 0.6);
}

.action-stats {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.action-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.action-item input[type='checkbox'] {
  margin-top: 4px;
}

.action-item .done {
  text-decoration: line-through;
  opacity: 0.75;
}

.brief-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  margin-bottom: 18px;
}

.quarter-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(110, 168, 254, 0.08);
  border: 1px solid rgba(110, 168, 254, 0.22);
  margin-bottom: 18px;
}

.quarter-card h4 {
  margin-bottom: 8px;
}

#quarterlyFocus {
  margin-bottom: 4px;
}

.delta-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.22);
  margin-bottom: 18px;
}

.delta-card h4 {
  margin-bottom: 8px;
}

#deltaSummary {
  margin: 0 0 10px;
  color: var(--muted);
}

#deltaItems {
  margin-bottom: 4px;
}

.brief-card h4 {
  margin-bottom: 8px;
}

#briefText {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

#references a {
  color: var(--accent);
  text-decoration: none;
}

#references a:hover {
  text-decoration: underline;
}

.confidence-card h4 {
  margin-bottom: 8px;
}

#confidenceSummary {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.93rem;
}

.confidence-meter {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

#confidenceFill {
  width: 0;
  height: 100%;
  background: linear-gradient(135deg, #34d399, #60a5fa);
  transition: width 0.2s ease;
}

.export-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 2px;
}

.export-row .secondary-btn {
  min-height: 40px;
  padding: 9px 14px;
}

.export-status {
  min-height: 1.2em;
  font-size: 0.85rem;
  color: var(--accent);
  margin: 2px 0 12px;
}

.score-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}

ul {
  margin: 10px 0 24px;
  padding-left: 18px;
}

li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

.contact-panel {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.contact-panel h3 {
  margin: 0 0 10px;
}

.contact-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.contact-cta {
  text-decoration: none;
  white-space: nowrap;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero,
  .main-grid {
    grid-template-columns: 1fr;
  }

  .progress-wrap {
    text-align: left;
  }

  .panel-header {
    flex-direction: column;
  }

  .progress-wrap {
    width: 100%;
  }

  .resume-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .site-shell {
    padding: 18px 14px 28px;
  }

  .brand-lockup,
  .hero-card,
  .panel {
    padding: 20px;
  }

  .hero-card .primary-btn,
  .secondary-btn,
  .ghost-btn,
  .template-btn {
    width: 100%;
  }

  .template-row {
    width: 100%;
  }

  .resume-actions {
    width: 100%;
  }

  .export-row {
    flex-direction: column;
  }

  .filter-row {
    width: 100%;
  }

  .filter-btn {
    flex: 1 1 calc(50% - 8px);
  }

  .contact-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-cta {
    width: 100%;
    text-align: center;
  }

  .question-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .panel-header h3 {
    font-size: 1.1rem;
  }

  #questionText {
    font-size: 1.07rem;
    line-height: 1.45;
  }

  .option-btn {
    padding: 14px;
  }

  ul {
    padding-left: 20px;
  }

  .posture-badge {
    margin-top: 4px;
  }

  .brand-line {
    flex-wrap: wrap;
  }
}
