/* Root theme – aligned with your main green/teal gradient */
:root {
  --bg-1: #8ef3c0;
  --bg-2: #22d3ee;
  --bg-3: #0f172a;

  --card: rgba(255, 255, 255, 0.96);
  --card-soft: rgba(255, 255, 255, 0.9);
  --border-soft: rgba(255, 255, 255, 0.7);

  --text-main: #041317;
  --text-muted: rgba(4, 19, 23, 0.72);

  --accent: #0f766e;
  --accent-soft: rgba(34, 197, 94, 0.14);
  --accent-strong: #22c55e;

  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-soft: 0 22px 70px rgba(15, 23, 42, 0.3);
  --shadow-card: 0 14px 42px rgba(15, 23, 42, 0.18);

  --transition-fast: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-med: 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text-main);
  min-height: 100vh;
  background: radial-gradient(circle at 0 0, #bbf7d0 0, transparent 40%),
    radial-gradient(circle at 100% 100%, #38bdf8 0, transparent 42%),
    linear-gradient(135deg, var(--bg-1) 0%, #bef264 22%, #5eead4 55%, var(--bg-2) 100%);
  overflow-x: hidden;
}

/* gradient blobs */

.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

.bg-blob--one {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.9), transparent);
  top: -80px;
  left: -40px;
}
.bg-blob--two {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle at 100% 0, rgba(34, 197, 94, 0.9), transparent);
  top: -120px;
  right: -60px;
}
.bg-blob--three {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at 50% 100%, rgba(14, 165, 233, 0.9), transparent);
  bottom: -200px;
  right: -60px;
}

/* layout shell */

.page {
  position: relative;
  z-index: 1;
}

.shell {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
  padding-block: 26px 40px;
}

/* header */

.header {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.94),
    rgba(255, 255, 255, 0.86)
  );
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: radial-gradient(circle at 0 0, #bbf7d0, var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #022c22;
  font-size: 0.9rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-size: 0.76rem;
  line-height: 1.2;
}

.brand-text span:first-child {
  font-weight: 700;
}

.brand-text span:last-child {
  color: var(--text-muted);
}

.nav {
  display: flex;
  gap: 14px;
  font-size: 0.82rem;
}

.nav a {
  text-decoration: none;
  color: rgba(15, 23, 42, 0.7);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 500;
  transition: background var(--transition-fast), transform var(--transition-fast),
    color var(--transition-fast);
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.98);
  color: var(--text-main);
  transform: translateY(-1px);
}

.nav-cta {
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.5);
}

/* hero */

.hero {
  padding-top: 70px;
  padding-bottom: 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
  gap: 34px;
  align-items: center;
}

.hero-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.hero-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 0.76rem;
  font-weight: 600;
}

.hero-pill--soft {
  background: rgba(255, 255, 255, 0.9);
  border-style: dashed;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.3rem, 3.2vw, 3rem);
  letter-spacing: -0.06em;
}

.hero-highlight {
  background: linear-gradient(120deg, #16a34a, #22c55e, #0ea5e9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 0 0 18px;
  max-width: 520px;
  font-size: 0.98rem;
  color: var(--text-muted);
}

.hero-meta-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.1fr);
  gap: 14px;
}

.hero-kpi-card {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border-soft);
  padding: 12px 14px;
  box-shadow: var(--shadow-card);
  font-size: 0.84rem;
}

.hero-kpi-card--outline {
  background: rgba(255, 255, 255, 0.9);
  border-style: dashed;
}

.hero-kpi-label {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(15, 23, 42, 0.7);
  margin-bottom: 4px;
}

.hero-kpi-values {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

/* hero visual dashboard */

.hero-visual {
  position: relative;
}

.hero-dashboard {
  background: var(--card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  padding: 16px 18px 14px;
  position: relative;
  overflow: hidden;
}

.card-3d {
  transform-style: preserve-3d;
}

.hero-dashboard::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 0 0, rgba(34, 197, 94, 0.24), transparent 60%);
  opacity: 0.9;
  pointer-events: none;
}

.hero-dashboard > * {
  position: relative;
}

.hero-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.8rem;
}

.hd-label {
  font-weight: 600;
}

.hd-tag {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.4);
  font-size: 0.7rem;
}

.hero-dashboard-main {
  display: grid;
  grid-template-columns: 120px minmax(0, 1.4fr);
  gap: 14px;
  align-items: center;
}

.hero-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative; /* ensure absolute children position relative to this container */
}

.hero-gauge-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: conic-gradient(
    from 210deg,
    #22c55e 0 72%,
    rgba(248, 250, 252, 1) 72% 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  position: relative;
  transform-origin: 50% 50%;
  /* entrance tween: slight rotate in */
  animation: gauge-entrance 850ms cubic-bezier(0.2,0.9,0.2,1) both;
}

.hero-gauge-fill {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.3);
}

.hero-gauge-score {
  /* position the numeric score reliably inside the ring */
  position: absolute;
  top: 45px; /* center inside 90px ring (half of ring height) */
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: rgba(2,6,23,0.95);
  z-index: 2;
  /* subtle pop on load */
  animation: score-pop 700ms cubic-bezier(0.2,0.9,0.2,1) 250ms both;
}

.hero-gauge-caption {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px; /* provide breathing room under the ring */
}

/* Animations */
@keyframes gauge-entrance {
  from { transform: rotate(-18deg) scale(0.98); opacity: 0; }
  to   { transform: rotate(0deg) scale(1); opacity: 1; }
}

@keyframes score-pop {
  from { transform: translate(-50%, -48%) scale(0.86); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* optional hover micro-interaction */
.hero-gauge-ring:hover { transform: scale(1.03); transition: transform 220ms ease; }

.hero-metric-bars {
  display: grid;
  gap: 6px;
}

.hero-metric-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 50px;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}

.hero-bar {
  position: relative;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(226, 232, 240, 0.8);
  height: 7px;
}

.hero-bar span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.hero-bar--good span {
  background: linear-gradient(to right, #22c55e, #a3e635);
}
.hero-bar--ok span {
  background: linear-gradient(to right, #eab308, #facc15);
}
.hero-bar--warn span {
  background: linear-gradient(to right, #f97316, #fb923c);
}

.hero-bar-value {
  text-align: right;
  font-feature-settings: "tnum" 1;
}

.hero-dashboard-foot {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* sections */

.section {
  margin-top: 40px;
  padding: 26px 0 18px;
}

.section--soft {
  margin-top: 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.section-kicker {
  margin: 0 0 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(15, 23, 42, 0.7);
}

.section h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.2vw, 2rem);
  letter-spacing: -0.05em;
}

.section-sub {
  margin: 0;
  max-width: 420px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* audit flow */

.audit-flow {
  border-radius: var(--radius-xl);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.96),
    rgba(255, 255, 255, 0.9)
  );
  border: 1px solid var(--border-soft);
  padding: 16px 20px 18px;
  box-shadow: var(--shadow-soft);
}

.audit-flow-top {
  border-radius: 18px;
  padding: 14px 18px 16px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.97),
    rgba(248, 250, 252, 0.98)
  );
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.audit-flow-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.7);
  margin-bottom: 8px;
}

.audit-flow-progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audit-flow-progress-line {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.9);
  overflow: hidden;
}

.audit-flow-progress-fill {
  position: absolute;
  inset: 0;
  width: 16.5%;
  border-radius: inherit;
  background: linear-gradient(to right, #22c55e, #0ea5e9);
  transition: width var(--transition-med);
}

.audit-flow-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.audit-step {
  border-radius: 16px;
  border: none;
  background: transparent;
  padding: 7px 6px;
  text-align: left;
  display: grid;
  gap: 2px;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.audit-step-index {
  font-size: 0.7rem;
  color: rgba(15, 23, 42, 0.7);
}

.audit-step-title {
  font-size: 0.85rem;
  font-weight: 600;
}

.audit-step-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.audit-step.is-active {
  background: rgba(34, 197, 94, 0.08);
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.26);
  transform: translateY(-2px);
}

/* bottom content */

.audit-flow-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.05fr);
  gap: 18px;
  margin-top: 16px;
}

.audit-detail-kicker {
  margin: 0 0 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(15, 23, 42, 0.72);
}

.audit-detail-title {
  margin: 0 0 6px;
  font-size: 1.1rem;
  letter-spacing: -0.04em;
}

.audit-detail-body {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.audit-detail-list {
  margin: 0;
  padding-left: 16px;
  font-size: 0.88rem;
  display: grid;
  gap: 4px;
  color: rgba(15, 23, 42, 0.85);
}

.audit-mini {
  display: flex;
  align-items: stretch;
}

.audit-mini-card {
  flex: 1;
  border-radius: 18px;
  background: radial-gradient(circle at 0 0, rgba(34, 197, 94, 0.16), transparent 60%),
    rgba(15, 23, 42, 0.96);
  color: #e5e7eb;
  padding: 14px 14px 12px;
}

.audit-mini-title {
  margin: 0 0 8px;
  font-size: 0.86rem;
  font-weight: 600;
}

.audit-mini-bars {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 40px;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}

.mini-bar {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  overflow: hidden;
}

.mini-bar span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to right, #22c55e, #0ea5e9);
}

.mini-value {
  text-align: right;
  font-feature-settings: "tnum" 1;
}

.audit-mini-foot {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.9);
}

.audit-flow-footnote {
  margin-top: 12px;
  font-size: 0.76rem;
  color: rgba(15, 23, 42, 0.72);
}

/* modules */

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.module-card {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border-soft);
  padding: 14px 16px 16px;
  box-shadow: var(--shadow-card);
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: transform var(--transition-med), box-shadow var(--transition-med);
}

.module-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 46px rgba(15, 23, 42, 0.26);
}

.module-card h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  color: var(--text-main);
}

.module-icon {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

/* report */

.report-wrapper {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.05fr);
  gap: 14px;
  padding: 14px 16px 12px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.report-table th,
.report-table td {
  padding: 6px 8px;
  text-align: left;
}

.report-table thead th {
  border-bottom: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(15, 23, 42, 0.82);
}

.report-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.9);
}

.pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.pill--critical {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}
.pill--high {
  background: rgba(249, 115, 22, 0.1);
  color: #c2410c;
}
.pill--medium {
  background: rgba(234, 179, 8, 0.1);
  color: #92400e;
}

.status {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
}

.status--todo {
  background: rgba(15, 23, 42, 0.06);
}
.status--progress {
  background: rgba(56, 189, 248, 0.14);
  color: #0369a1;
}
.status--planned {
  background: rgba(148, 163, 184, 0.2);
}

.report-side {
  border-radius: 18px;
  padding: 12px 14px;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.96),
    rgba(15, 23, 42, 0.92)
  );
  color: #e5e7eb;
  font-size: 0.86rem;
}

.report-side h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.report-tagline {
  margin-top: 8px;
  font-size: 0.8rem;
  color: rgba(209, 213, 219, 0.92);
}

/* next steps */

.next-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.next-card {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(209, 213, 219, 0.9);
  padding: 12px 14px;
  font-size: 0.86rem;
  box-shadow: var(--shadow-card);
}

.next-card h3 {
  margin: 0 0 4px;
  font-size: 0.96rem;
}

/* footer */

.footer {
  margin-top: 26px;
  padding: 14px 16px 0;
  font-size: 0.78rem;
  color: rgba(15, 23, 42, 0.75);
}

/* responsive */

@media (max-width: 960px) {
  .header {
    padding-inline: 12px;
  }
  .nav {
    display: none;
  }

  .hero-grid,
  .audit-flow-bottom,
  .report-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-top: 52px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Make the report table scrollable on small screens and stack the side card */
@media (max-width: 960px) {
  .report-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .report-table th,
  .report-table td {
    white-space: nowrap;
  }

  .report-side {
    margin-top: 12px;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 24px, 480px);
  }

  .audit-flow-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 10px;
  }
}
