:root {
  --bg: #0c0e14;
  --bg-card: rgba(22, 26, 38, 0.82);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eaef;
  --muted: #8b93a7;
  --accent: #6c9eff;
  --accent-dim: #4a7bdc;
  --success: #3dd68c;
  --error: #ff6b7a;
  --warning: #ffd166;
  --content-width: 760px;
  --radius: 0;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, black, transparent);
  pointer-events: none;
  z-index: 0;
}

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.glow-1 {
  width: 420px;
  height: 420px;
  background: #3d5a99;
  top: -120px;
  right: -80px;
}

.glow-2 {
  width: 360px;
  height: 360px;
  background: #2a4d7a;
  bottom: -80px;
  left: -60px;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2.5rem;
}

.brand {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 1.4rem;
  text-align: center;
}

.brand-mark {
  font-size: 1.05rem;
  color: var(--accent);
  line-height: 1;
}

.brand h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

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

.card {
  display: grid;
  gap: 1.25rem;
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}

.audit-shell {
  justify-items: center;
}

.search-panel {
  width: min(100%, var(--content-width));
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--muted);
}

.search-row {
  display: flex;
  align-items: stretch;
  gap: 0.85rem;
  width: 100%;
}

#url-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 42px;
  padding: 0 1rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: rgba(22, 26, 38, 0.82);
  border: 1px solid var(--border);
  border-radius: 0;
  outline: none;
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}

#url-input::placeholder {
  color: #5c6578;
}

#url-input:focus {
  border-color: rgba(108, 158, 255, 0.48);
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.22),
    0 0 0 2px rgba(108, 158, 255, 0.12);
}

.hint {
  margin: 0.7rem 1rem 0;
  font-size: 0.8rem;
  text-align: center;
  color: var(--muted);
}

.btn {
  position: relative;
  flex: 0 0 auto;
  min-width: 116px;
  height: 42px;
  padding: 0 1.15rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  border: none;
  border-radius: 0;
  box-shadow: 0 12px 34px rgba(74, 123, 220, 0.2);
  cursor: pointer;
  transition: transform 0.15s, opacity 0.2s, filter 0.2s;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn.loading .btn-text {
  opacity: 0.35;
}

.btn.loading .btn-spinner {
  opacity: 1;
}

.btn-spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.7s linear infinite;
}

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

.status {
  width: min(100%, var(--content-width));
  margin-top: 0;
  padding: 0.8rem 0.9rem;
  border-radius: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.status[hidden] {
  display: none;
}

.status.success {
  background: rgba(61, 214, 140, 0.12);
  border: 1px solid rgba(61, 214, 140, 0.35);
  color: #b8f5d3;
}

.status.error {
  background: rgba(255, 107, 122, 0.1);
  border: 1px solid rgba(255, 107, 122, 0.35);
  color: #ffc4cb;
}

.progress-panel,
.report-panel {
  width: min(100%, var(--content-width));
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: rgba(8, 11, 18, 0.52);
}

.progress-panel {
  align-self: start;
}

.progress-panel[hidden],
.report-panel[hidden] {
  display: none;
}

.progress-head,
.report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

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

.progress-head h3,
.report-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.progress-percent {
  flex: 0 0 auto;
  padding: 0.35rem 0.6rem;
  color: #dce7ff;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(108, 158, 255, 0.35);
  border-radius: 0;
  background: rgba(108, 158, 255, 0.12);
}

.progress-bar {
  height: 8px;
  margin: 1rem 0;
  overflow: hidden;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 0;
  background: linear-gradient(90deg, var(--accent), var(--success));
  box-shadow: 0 0 18px rgba(61, 214, 140, 0.28);
  transition: width 0.55s ease;
}

.progress-steps {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress-steps li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 0.75rem;
  align-items: flex-start;
  color: var(--muted);
}

.step-dot {
  width: 12px;
  height: 12px;
  margin-top: 0.25rem;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
}

.progress-steps strong {
  display: block;
  color: #dce2ef;
  font-size: 0.9rem;
}

.progress-steps small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  line-height: 1.35;
}

.progress-steps li.active .step-dot {
  border-color: var(--warning);
  background: var(--warning);
  box-shadow: 0 0 0 5px rgba(255, 209, 102, 0.12);
  animation: pulse 1.1s ease-in-out infinite;
}

.progress-steps li.done .step-dot {
  border-color: var(--success);
  background: var(--success);
}

.progress-steps li.done strong {
  color: #b8f5d3;
}

@keyframes pulse {
  50% {
    transform: scale(1.2);
    box-shadow: 0 0 0 8px rgba(255, 209, 102, 0.04);
  }
}

.report-panel {
  min-height: 100%;
  border-color: rgba(61, 214, 140, 0.24);
}

.report-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.report-hero h3 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.report-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.score-ring {
  display: grid;
  place-content: center;
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  border-radius: 0;
  background:
    radial-gradient(circle at center, #111724 58%, transparent 59%),
    conic-gradient(var(--success) calc(var(--score) * 1%), rgba(255, 255, 255, 0.1) 0);
}

.score-ring strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1;
  text-align: center;
}

.score-ring span {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.metric-card {
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
}

.metric-card span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.metric-card strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card small {
  display: block;
  overflow: hidden;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.report-section h4 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.text-block {
  margin-top: 0.55rem;
  color: #c9d2e3;
  font-size: 0.88rem;
  line-height: 1.5;
}

.issue-list {
  display: grid;
  gap: 0.5rem;
}

.issue {
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.035);
}

.issue div {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.issue span {
  padding: 0.15rem 0.45rem;
  border-radius: 0;
  color: #0c0e14;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.issue.info span {
  background: var(--accent);
}

.issue.warning span {
  background: var(--warning);
}

.issue.critical span {
  background: var(--error);
}

.issue strong {
  font-size: 0.9rem;
}

.issue p,
.empty-state,
.delivery-status {
  margin: 0;
  color: #c9d2e3;
  font-size: 0.88rem;
  line-height: 1.45;
}

.delivery-status.ok {
  color: #b8f5d3;
}

.delivery-status.warn {
  color: #ffe0a1;
}

.fine-section {
  border-color: rgba(255, 209, 102, 0.22);
}

.fine-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.fine-summary h4 {
  margin-bottom: 0.25rem;
}

.fine-summary p,
.fine-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.fine-summary strong {
  flex: 0 0 auto;
  color: var(--warning);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  white-space: nowrap;
}

.fine-list {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.fine-card {
  padding: 0.85rem;
  border: 1px solid rgba(255, 209, 102, 0.2);
  background: rgba(255, 209, 102, 0.055);
}

.fine-card div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.fine-card strong {
  font-size: 0.92rem;
}

.fine-card span {
  flex: 0 0 auto;
  color: var(--warning);
  font-weight: 800;
  white-space: nowrap;
}

.fine-card p {
  margin: 0;
  color: #d8d0b1;
  font-size: 0.84rem;
  line-height: 1.45;
}

.foot {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

@media (max-width: 420px) {
  .report-grid {
    grid-template-columns: 1fr;
  }
}

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

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 2.5rem 1rem 2rem;
  }

  .card {
    padding: 0;
  }

  .brand {
    align-items: center;
    flex-direction: column;
  }

  .search-panel {
    padding: 0.8rem;
    border-radius: 0;
  }

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

  .btn {
    width: 100%;
    min-width: 0;
  }

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

  .report-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .fine-summary,
  .fine-card div {
    flex-direction: column;
  }

  .fine-summary strong,
  .fine-card span {
    white-space: normal;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
