:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #edf4ff;
  --ink: #10151d;
  --muted: #596477;
  --line: #d8e1ee;
  --accent: #0877ff;
  --accent-dark: #005dcc;
  --deep: #05070a;
  --warn: #b56b00;
  --bad: #c62828;
  --good: #075fcc;
  --blue-soft: #e7f1ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, ui-sans-serif, system-ui, sans-serif;
}

a {
  color: var(--accent-dark);
}

.topbar {
  align-items: center;
  background: var(--deep);
  border-bottom: 4px solid var(--accent);
  display: flex;
  gap: 12px;
  min-height: 78px;
  justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 56px);
}

.brand {
  align-items: center;
  color: white;
  display: flex;
  gap: 16px;
  text-decoration: none;
}

.brand img {
  display: block;
  height: 46px;
  object-fit: contain;
  width: auto;
}

.brand span {
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  display: grid;
  gap: 2px;
  padding-left: 16px;
}

.brand strong {
  color: #ffffff;
  font-size: 15px;
  letter-spacing: 0;
}

.brand small {
  color: #b9c9dc;
  font-size: 12px;
}

.topnav {
  align-items: center;
  display: flex;
  gap: 14px;
}

.topnav a {
  color: #dce8ff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.badge {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #dce8ff;
  font-size: 12px;
  padding: 5px 10px;
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(22px, 4vw, 52px) clamp(16px, 4vw, 32px);
}

.panel,
.summary-band {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(22px, 5vw, 42px);
}

.intro {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.hero {
  align-items: center;
  display: grid;
  gap: clamp(24px, 4vw, 44px);
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  min-height: 520px;
  position: relative;
}

.hero::before {
  background:
    linear-gradient(90deg, rgba(8, 119, 255, 0.16) 1px, transparent 1px),
    linear-gradient(180deg, rgba(8, 119, 255, 0.12) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  inset: -52px -32px auto auto;
  height: 360px;
  opacity: 0.55;
  pointer-events: none;
  position: absolute;
  width: min(52vw, 560px);
}

.hero-copy,
.analyze-card {
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(38px, 5.5vw, 68px);
  line-height: 0.98;
  margin-bottom: 18px;
  max-width: 820px;
}

h2 {
  font-size: 22px;
  margin-bottom: 14px;
}

h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.lead {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
  max-width: 680px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.trust-row span {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #263241;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}

.analyze-card {
  align-self: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(16, 21, 29, 0.12);
  padding: clamp(22px, 3.5vw, 34px);
}

label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

.form-stack {
  display: grid;
  gap: 11px;
}

input {
  border: 1px solid var(--line);
  border-radius: 4px;
  flex: 1;
  font: inherit;
  min-height: 48px;
  min-width: 0;
  padding: 0 14px;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(8, 119, 255, 0.16);
  outline: none;
}

button,
.button-link {
  background: var(--accent);
  border: 0;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 750;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  text-decoration: none;
  align-items: center;
}

button:disabled {
  cursor: wait;
  opacity: 0.76;
}

.primary-action {
  margin-top: 4px;
  width: 100%;
}

.form-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

button:hover,
.button-link:hover {
  background: var(--accent-dark);
}

.button-link.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.error {
  color: var(--bad);
  font-weight: 700;
  margin: 12px 0 0;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px;
}

.tile span {
  color: var(--accent);
  display: block;
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.tile p,
.finding p {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.preview-band {
  align-items: center;
  background: var(--deep);
  border-radius: 8px;
  color: #ffffff;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  margin-bottom: 18px;
  padding: clamp(22px, 4vw, 34px);
}

.preview-band .eyebrow {
  color: #8cc3ff;
}

.preview-band h2 {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.05;
  margin: 0;
}

.preview-scores {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
}

.preview-scores article {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  min-height: 126px;
  padding: 16px;
}

.preview-scores strong {
  color: #ffffff;
  display: block;
  font-size: 34px;
  margin-bottom: 16px;
}

.preview-scores span {
  color: #c8d7eb;
  display: block;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.report-head {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.report-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.report-meta span {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
}

.score-ring {
  --pct: calc(var(--score) * 1%);
  align-items: center;
  aspect-ratio: 1;
  background: conic-gradient(var(--accent) var(--pct), #d9e5f5 0);
  border-radius: 50%;
  display: grid;
  flex: 0 0 148px;
  place-items: center;
  position: relative;
}

.score-ring::after {
  background: var(--surface);
  border-radius: 50%;
  content: "";
  inset: 14px;
  position: absolute;
}

.score-ring strong,
.score-ring span {
  position: relative;
  z-index: 1;
}

.score-ring strong {
  font-size: 42px;
}

.score-ring span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 54px;
  position: absolute;
  text-align: center;
  text-transform: uppercase;
  width: 80px;
}

.category-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 18px;
}

.category {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
}

.category span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 800;
  min-height: 34px;
  text-transform: uppercase;
}

.category strong {
  display: block;
  font-size: 34px;
  margin-top: 12px;
}

.category.ok {
  border-top: 5px solid var(--good);
}

.category.warning {
  border-top: 5px solid var(--warn);
}

.category.critical {
  border-top: 5px solid var(--bad);
}

.summary-band {
  margin-bottom: 28px;
}

.score-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.columns {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  margin-bottom: 28px;
}

.finding-list {
  display: grid;
  gap: 10px;
}

.finding {
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--muted);
  border-radius: 6px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px;
}

.finding.ok {
  border-left-color: var(--good);
}

.finding.warning {
  border-left-color: var(--warn);
}

.finding.critical {
  border-left-color: var(--bad);
}

.recommendations {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  line-height: 1.55;
  margin: 0;
  padding: 20px 20px 20px 42px;
}

.recommendations li + li {
  margin-top: 10px;
}

.action-section {
  margin-bottom: 28px;
}

.action-list {
  display: grid;
  gap: 12px;
}

.action-list.compact {
  gap: 8px;
}

.action-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.action-card summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(190px, 0.8fr) minmax(260px, 1.2fr);
  list-style: none;
  padding: 16px 18px;
}

.action-card summary::-webkit-details-marker {
  display: none;
}

.action-card summary > span:last-child {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.priority {
  align-items: center;
  background: var(--deep);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.action-body {
  border-top: 1px solid var(--line);
  padding: 0 18px 18px 60px;
}

.action-body p {
  color: var(--muted);
  line-height: 1.55;
}

.action-body ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.secondary-actions {
  margin-top: -8px;
}

.report-cta {
  align-items: center;
  background: var(--deep);
  border-radius: 8px;
  color: white;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 28px 0;
  padding: clamp(22px, 4vw, 34px);
}

.report-cta .eyebrow {
  color: #8cc3ff;
}

.report-cta h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
}

.report-cta p {
  color: #d7e3f5;
  line-height: 1.55;
  margin-bottom: 0;
}

.report-cta .cta-message {
  color: white;
  font-weight: 800;
  margin-bottom: 8px;
}

.cta-actions {
  display: grid;
  gap: 10px;
  min-width: 250px;
}

.button-link.ghost.dark {
  border-color: rgba(255, 255, 255, 0.28);
  color: white;
}

.table-wrap {
  overflow-x: auto;
}

table {
  background: var(--surface);
  border-collapse: collapse;
  border-radius: 6px;
  overflow: hidden;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.mini-score {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  height: 32px;
  justify-content: center;
  min-width: 42px;
}

.mini-score.ok {
  background: #e6f1ff;
  color: var(--good);
}

.mini-score.warning {
  background: #fff3d8;
  color: var(--warn);
}

.mini-score.critical {
  background: #fde4e4;
  color: var(--bad);
}

.technical-details {
  margin-top: 30px;
}

.technical-details > details > summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 850;
  padding: 16px 18px;
}

.technical-details .columns {
  margin-top: 18px;
}

.admin-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 28px;
}

.metrics article {
  background: var(--deep);
  border-radius: 6px;
  color: white;
  padding: 20px;
}

.metrics span {
  color: #b8cbe4;
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.metrics strong {
  font-size: 26px;
}

.status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
  text-transform: uppercase;
}

.status-pill.done {
  background: #e6f1ff;
  color: var(--good);
}

.status-pill.failed {
  background: #fde4e4;
  color: var(--bad);
}

.status-pill.queued,
.status-pill.running {
  background: #fff3d8;
  color: var(--warn);
}

.progress {
  background: #d9e5f5;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.progress span {
  animation: loading 1.3s infinite ease-in-out;
  background: var(--accent);
  display: block;
  height: 100%;
  width: 38%;
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(270%);
  }
}

@media (max-width: 760px) {
  .brand span {
    display: none;
  }

  .brand img {
    height: 38px;
  }

  .topbar {
    min-height: 68px;
  }

  .intro,
  .hero,
  .grid,
  .columns,
  .metrics,
  .category-grid,
  .preview-band,
  .preview-scores {
    grid-template-columns: 1fr;
  }

  .action-card summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .action-card summary > span:last-child {
    grid-column: 2;
  }

  .action-body {
    padding-left: 18px;
  }

  .form-row,
  .report-head,
  .admin-head,
  .report-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .report-cta {
    grid-template-columns: 1fr;
  }

  .score-ring {
    flex-basis: auto;
    width: 132px;
  }
}
