:root {
  --bg-top: #f2f7ff;
  --bg-bottom: #e8efe8;
  --panel: #ffffff;
  --ink: #1f3348;
  --muted: #4e6279;
  --line: #dbe5f2;
  --accent: #0aa6d7;
  --accent-dark: #075a84;
  --ok: #2ca878;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, #dfeafd 0, rgba(223, 234, 253, 0) 38%),
    linear-gradient(145deg, var(--bg-top), var(--bg-bottom));
  min-height: 100vh;
}

.awareness-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 32px auto 44px;
  display: grid;
  gap: 18px;
}

.brand-strip {
  display: flex;
  align-items: center;
  padding: 4px 4px 0;
}

.brand-logo {
  display: block;
  width: min(280px, 62vw);
  height: auto;
}

.hero-copy,
.app-card,
.cta-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(13, 44, 82, 0.07);
}

.hero-copy {
  padding: 28px 28px 20px;
}

.hero-copy h1 {
  font-weight: 800;
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 2.8vw, 2.25rem);
}

.hero-intro,
.hero-detail {
  margin: 0 0 12px;
  color: var(--muted);
}

.hero-emphasis {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.app-card {
  padding: 22px 20px 18px;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.control {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control:nth-child(1) {
  grid-column: span 4;
}

.control:nth-child(2) {
  grid-column: span 4;
}

.control:nth-child(3) {
  grid-column: span 4;
}

.control:nth-child(4) {
  grid-column: span 6;
}

.control:nth-child(5) {
  grid-column: span 6;
}

.control span {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.control .form-control {
  border-radius: 10px;
  border-color: #ced9e8;
  min-height: 42px;
}

.value-feedback {
  min-height: 22px;
  margin: 10px 2px 6px;
  font-size: 0.9rem;
  color: #8b4b03;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 6px 0 12px;
}

.summary-card {
  background: #ffffff;
  border: 1px solid #dce7f5;
  border-radius: 12px;
  padding: 12px 14px;
}

.summary-card-title {
  margin: 0 0 20px;
  color: #15395f;
  font-size: 0.95rem;
  font-weight: 800;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.summary-value {
  display: block;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1;
  color: #143a62;
}

.summary-label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.chart-wrap {
  border: 1px solid #dce7f5;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
}

.mdAppChart {
  width: 100%;
  min-height: 190px;
}

.score-bar-shell {
  width: 100%;
  position: relative;
}

.score-bar-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.score-title {
  font-weight: 800;
  color: #15395f;
  font-size: 1rem;
}

.score-range {
  color: var(--muted);
  font-size: 0.85rem;
}

.score-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid #bed0e7;
  border-radius: 999px;
  overflow: visible;
}

.score-segment {
  position: relative;
  overflow: hidden;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1a3d63;
  border-right: 1px solid rgba(18, 66, 109, 0.18);
}

.score-segment.is-active {
  box-shadow: none;
}

.score-segment.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #0a7cb3;
  border-radius: inherit;
  pointer-events: none;
}

.score-q1 {
  background: #edf3fb;
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.score-q2 {
  background: #dbe9f8;
}

.score-q3 {
  background: #c2dcf3;
}

.score-q4 {
  background: #98c9eb;
}

.score-q5 {
  background: #6caede;
  border-right: none;
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.score-marker {
  position: absolute;
  top: -40px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 2;
}

.score-chip {
  background: #ffffff;
  border: 1px solid #c2d4e7;
  border-radius: 999px;
  color: #204566;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1;
  padding: 6px 10px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(15, 51, 86, 0.12);
}

.score-pin {
  position: relative;
  width: 2px;
  height: 24px;
  margin: 4px auto 0;
  background: #0aa6d7;
  border-radius: 2px;
}

.score-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0aa6d7;
  border: 2px solid #ffffff;
}

.score-axis {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  color: #4c6078;
  font-size: 0.78rem;
  font-weight: 600;
}

.score-caption {
  margin: 5px 0 0;
  color: #38526d;
  font-size: 0.9rem;
}

.score-estimate {
  margin: 25px 0 0;
  color: #15395f;
  font-size: 0.92rem;
  font-weight: 300;
}

.score-bar-empty {
  border: 1px dashed #c7d7ea;
  border-radius: 10px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #5f748c;
  font-size: 0.92rem;
  padding: 14px;
}

.score-loading-overlay {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(1px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.score-loading-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(7, 90, 132, 0.16);
  border-top-color: #0aa6d7;
  animation: score-spin 0.75s linear infinite;
}

@keyframes score-spin {
  to {
    transform: rotate(360deg);
  }
}

.chart-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.benchmark-note {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.cta-panel {
  padding: 20px 24px;
}

.cta-panel h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 800;
}

.cta-panel p {
  margin: 0 0 14px;
  color: var(--muted);
}

.cta-panel .btn-success {
  background-color: var(--ok);
  border-color: var(--ok);
  border-radius: 999px;
  padding-inline: 22px;
  font-weight: 700;
}

#fullReportBtn {
  border-radius: 999px;
  font-weight: 700;
  border-color: #95adc9;
  color: #143a62;
}

@media (max-width: 992px) {
  .awareness-shell {
    width: min(980px, calc(100% - 20px));
    margin-top: 18px;
  }

  .control:nth-child(1),
  .control:nth-child(2),
  .control:nth-child(3),
  .control:nth-child(4),
  .control:nth-child(5) {
    grid-column: span 6;
  }

  .mdAppChart {
    min-height: 180px;
  }
}

@media (max-width: 680px) {
  .brand-strip {
    padding-inline: 0;
  }

  .brand-logo {
    width: min(230px, 70vw);
  }

  .hero-copy {
    padding: 20px 16px 14px;
  }

  .app-card {
    padding: 16px 12px 14px;
  }

  .controls-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .control:nth-child(1),
  .control:nth-child(2),
  .control:nth-child(3),
  .control:nth-child(4),
  .control:nth-child(5) {
    grid-column: auto;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .summary-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .chart-actions {
    justify-content: stretch;
  }

  #fullReportBtn {
    width: 100%;
  }

  .score-segment {
    min-height: 40px;
    font-size: 0.72rem;
  }

  .score-segment span {
    display: none;
  }

  .score-marker {
    top: -36px;
  }

  .score-chip {
    font-size: 0.75rem;
    padding: 5px 8px;
  }

  .mdAppChart {
    min-height: 165px;
  }
}
