@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/poppins-300.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/poppins-400.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/poppins-600.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/poppins-700.woff2") format("woff2");
}

:root {
  --black: #000000;
  --white: #ffffff;
  --orange: #e74011;
  --grey-900: #111111;
  --grey-700: #3a3a3a;
  --grey-400: #8a8a8a;
  --grey-200: #e4e4e4;
  --grey-100: #f4f4f4;
  --radius: 10px;
  --max-width: 960px;
  color-scheme: light dark;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  background: var(--white);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--grey-200);
}

.logo {
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.logo-accent {
  color: var(--orange);
}
.topbar-title {
  font-size: 13px;
  color: var(--grey-400);
  padding-left: 14px;
  border-left: 1px solid var(--grey-200);
}

.view {
  flex: 1;
  overflow-y: auto;
  padding: 32px 24px 60px;
}

.hero,
.progress-panel,
.report,
.error-panel {
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.hero h1 .accent {
  color: var(--orange);
}
.hero-sub {
  font-size: 16px;
  color: var(--grey-700);
  max-width: 620px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.audit-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--grey-700);
}

.field input {
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  padding: 12px 14px;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
  color: var(--black);
  background: var(--white);
}
.field input:focus {
  outline: none;
  border-color: var(--orange);
}

.optional-fields {
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.optional-fields summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--grey-700);
}
.optional-fields .field {
  margin-top: 14px;
}

.btn-primary {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  background: var(--black);
  border: none;
  border-radius: var(--radius);
  padding: 14px 22px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-primary:hover {
  background: var(--orange);
}
.btn-primary:disabled {
  background: var(--grey-400);
  cursor: not-allowed;
}

.form-note {
  font-size: 12px;
  color: var(--grey-400);
  margin: 0;
}
.form-error {
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
  margin: 0;
}

/* --- progress --- */

.progress-panel {
  text-align: center;
  padding-top: 40px;
}

.halftone-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background-image: radial-gradient(var(--orange) 22%, transparent 23%);
  background-size: 10px 10px;
  animation: spin 3.2s linear infinite;
  opacity: 0.9;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.progress-panel h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 20px;
}

.progress-bar-track {
  width: 100%;
  max-width: 420px;
  height: 8px;
  background: var(--grey-100);
  border-radius: 999px;
  margin: 0 auto;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--orange);
  transition: width 0.4s ease;
}
.progress-pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--grey-400);
  margin: 8px 0 4px;
}
.progress-current {
  font-size: 14px;
  color: var(--grey-700);
  margin: 0 0 24px;
  min-height: 20px;
}

.progress-log {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 520px;
  text-align: left;
  max-height: 220px;
  overflow-y: auto;
  border-top: 1px solid var(--grey-200);
  padding-top: 12px;
}
.progress-log li {
  font-size: 12.5px;
  color: var(--grey-400);
  padding: 3px 0;
}
.progress-log li:last-child {
  color: var(--black);
  font-weight: 600;
}

/* --- report --- */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1.5px solid var(--grey-200);
  margin-bottom: 28px;
  overflow-x: auto;
}
.tab-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--grey-400);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;
}
.tab-btn.active {
  color: var(--black);
  border-bottom-color: var(--orange);
}

.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

.score-hero {
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.score-number {
  font-size: 72px;
  font-weight: 700;
  line-height: 1;
}
.score-number .of-100 {
  font-size: 22px;
  font-weight: 400;
  color: var(--grey-400);
}
.score-classification {
  font-size: 15px;
  font-weight: 600;
  color: var(--orange);
  margin: 6px 0 4px;
}
.score-meta {
  font-size: 13px;
  color: var(--grey-400);
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}
@media (max-width: 640px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
}
.summary-block h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--grey-400);
  margin: 0 0 10px;
}
.summary-block ol,
.summary-block ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.6;
}

.assessment-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--grey-700);
  max-width: 720px;
  margin-bottom: 32px;
}

.radar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
  /* extra horizontal room for category labels, which intentionally extend
     past the SVG's own viewBox (see overflow: visible below) */
  padding: 0 70px;
}
.radar-wrap svg {
  /* SVG clips content outside its viewBox by default — the category labels
     are deliberately positioned past that edge, so they must stay visible. */
  overflow: visible;
}

.category-card {
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.category-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  cursor: pointer;
}
.category-card-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.category-card-score {
  font-size: 15px;
  font-weight: 700;
  color: var(--orange);
}
.category-card-meta {
  font-size: 12px;
  color: var(--grey-400);
  margin-top: 4px;
}
.criteria-list {
  margin-top: 16px;
  display: none;
}
.category-card.open .criteria-list {
  display: block;
}
.criterion {
  border-top: 1px solid var(--grey-100);
  padding: 14px 0;
  font-size: 13.5px;
}
.criterion-title {
  font-weight: 600;
  margin-bottom: 6px;
}
.criterion-title .severity {
  font-weight: 600;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
  color: var(--white);
}
.criterion p {
  margin: 4px 0;
  color: var(--grey-700);
  line-height: 1.55;
}
.criterion .label {
  font-weight: 600;
  color: var(--black);
}

.page-card {
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
}
@media (max-width: 640px) {
  .page-card {
    grid-template-columns: 1fr;
  }
}
.page-card img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--grey-200);
  object-fit: cover;
  object-position: top;
  aspect-ratio: 16/10;
}
.page-card-url {
  font-size: 12px;
  color: var(--grey-400);
  word-break: break-all;
  margin-bottom: 6px;
}
.page-card-score {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.page-card p {
  font-size: 13.5px;
  margin: 4px 0;
  line-height: 1.5;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filters select {
  font-family: inherit;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--grey-200);
}

.rec-card {
  border-left: 4px solid var(--orange);
  background: var(--grey-100);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 18px;
  margin-bottom: 12px;
  font-size: 13.5px;
}
.rec-card-title {
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 4px;
}
.rec-card-meta {
  font-size: 11.5px;
  color: var(--grey-400);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.rec-card p {
  margin: 4px 0;
  line-height: 1.55;
}
.priority-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--white);
  background: var(--orange);
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 6px;
}

.export-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
}
.export-list a {
  display: block;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  color: var(--black);
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 14px;
}
.export-list a:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.disclaimer {
  font-size: 11.5px;
  color: var(--grey-400);
  margin-top: 40px;
  line-height: 1.5;
  border-top: 1px solid var(--grey-200);
  padding-top: 16px;
}

.error-panel {
  text-align: center;
  padding-top: 60px;
}
.error-panel h2 {
  font-size: 22px;
}
