/* DUCT Scanner UI. Tokens from the Net Solutions design system (design canvas, F12). */
:root {
  --blue: #004fff;
  --blue-light: #e2f0f3;
  --purple: #260f68;
  --red: #f4595f;
  --red-light: #ffe0e0;
  --green: #307151;
  --green-light: #d0dbd5;
  --surface: #ffffff;
  --ink: #14171f;
  --ink-muted: #5b616e;
  --border: #e7e9ee;
  --radius-card: 14px;
  --radius-panel: 20px;
  --sans: "Outfit", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}
a {
  color: var(--blue);
}
a:hover {
  color: var(--purple);
}
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 16px;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus {
  top: 8px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.stack {
  display: flex;
  flex-direction: column;
}
.muted {
  color: var(--ink-muted);
}

.site-header {
  border-bottom: 1px solid var(--border);
}
.site-header .row {
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  min-height: 44px;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
#header-action a {
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

main {
  padding-top: 48px;
  padding-bottom: 64px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  outline: none;
}
/* The page moves focus to <main> for screen readers; no visible ring on that region. */
main:focus,
main:focus-visible {
  outline: none;
}
main.landing {
  padding-top: 64px;
  gap: 64px;
}

.site-footer {
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--ink-muted);
}
.site-footer .row {
  padding-top: 24px;
  padding-bottom: 24px;
}
.site-footer a {
  color: var(--ink-muted);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.h-hero {
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.h-page {
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.1;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.h-section {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
}
.lead {
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 32px;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--blue);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover {
  background: var(--purple);
  color: #fff;
}
.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.btn-light {
  background: #fff;
  color: var(--blue);
}
.btn-light:hover {
  background: var(--blue-light);
  color: var(--blue);
}

/* Landing */
.hero {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 760px;
}
.scan-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.scan-form label {
  font-weight: 600;
}
.scan-form .row {
  justify-content: flex-start;
  gap: 12px;
  align-items: stretch;
}
.url-input {
  flex: 1 1 320px;
  min-width: 0;
  height: 56px;
  padding: 0 16px;
  font-size: 18px;
  color: var(--ink);
  border: 1px solid var(--ink-muted);
  border-radius: var(--radius-card);
  background: #fff;
}
.url-input[aria-invalid="true"] {
  border: 2px solid var(--red);
}
.field-error {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 500;
}
.field-error svg {
  flex: 0 0 auto;
}
.help {
  font-size: 15px;
  color: var(--ink-muted);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 24px;
}
.pillar-intro {
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--blue-light);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pillar-letter {
  font-size: 40px;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
}
.pillar-intro h3 {
  font-size: 22px;
  font-weight: 600;
}
.how {
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.how h2,
.how h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}
.how p {
  color: var(--ink-muted);
}

/* Status chip */
.title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.chip-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  background: var(--blue-light);
}
.chip-status.done {
  background: var(--green-light);
}
.chip-status.failed {
  background: var(--red-light);
}
.spinner {
  animation: spin 1.2s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
}

/* Progress */
.progress-panel {
  padding: 24px;
  border-radius: var(--radius-panel);
  background: var(--blue-light);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.progress-track {
  height: 12px;
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
  transition: width 0.3s ease;
}

/* Pillar cards */
.pillar-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pillar-card.pending,
.pillar-card.unassessed {
  border: 2px dashed var(--ink-muted);
}
.pillar-card h3 {
  font-size: 20px;
  font-weight: 600;
}
.points {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
}
.points .of {
  font-size: 22px;
  font-weight: 500;
  color: var(--ink-muted);
}
.points-sm {
  font-size: 36px;
}
.points-sm .of {
  font-size: 18px;
}
.awaiting {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink-muted);
  min-height: 48px;
  display: flex;
  align-items: center;
}
.small {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
}

.callout {
  padding: 24px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.callout h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

/* Report summary */
.summary-card {
  padding: 32px;
  border-radius: var(--radius-panel);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.summary-card.primary {
  background: var(--blue);
  color: #fff;
}
.summary-card.tint {
  background: var(--blue-light);
}
.summary-card.outline {
  border: 1px solid var(--border);
  gap: 16px;
}
.summary-card.incomplete {
  border: 2px dashed var(--ink-muted);
}
.big {
  font-size: clamp(56px, 8vw, 80px);
  font-weight: 800;
  line-height: 0.95;
}
.big .of {
  font-size: 32px;
  font-weight: 500;
}
.tint .big {
  color: var(--blue);
}
.big-text {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
}
.counts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}
.counts dt {
  font-size: 14px;
  color: var(--ink-muted);
}
.counts dd {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
}

.legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}
.sw-earned {
  background: var(--blue);
}
.sw-failed {
  background: var(--red-light);
  border: 1px solid var(--red);
}
.sw-none {
  background: var(--border);
}
.bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--border);
}
.bar .earned {
  background: var(--blue);
}
.bar .failed {
  background: var(--red-light);
  box-shadow: inset 0 0 0 1px var(--red);
}
.pillar-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 15px;
  color: var(--ink-muted);
}

/* Findings */
.findings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}
.finding {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
}
.finding h4 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}
.finding dl {
  margin: 0;
  display: grid;
  gap: 8px;
}
.finding dt {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.finding dd {
  margin: 0 0 4px;
  line-height: 1.5;
}
.finding .url {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}
.chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.chip.Critical {
  background: var(--red-light);
}
.chip.High {
  background: var(--blue-light);
}
.chip.Medium,
.chip.Low {
  background: #fff;
  border: 1px solid var(--ink-muted);
}
.empty-findings {
  padding: 24px;
  border-radius: var(--radius-card);
  display: flex;
  gap: 12px;
  align-items: center;
}
.empty-findings.no_gaps {
  background: var(--green-light);
}
.empty-findings.unavailable {
  border: 2px dashed var(--ink-muted);
}
.empty-findings p {
  font-size: 17px;
  font-weight: 600;
}

.cta {
  padding: 48px;
  border-radius: var(--radius-panel);
  background: var(--blue);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.cta > div {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cta h2 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
}
.cta p {
  font-size: 18px;
}

.failed-panel {
  padding: 40px;
  border-radius: var(--radius-panel);
  background: var(--red-light);
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  max-width: 760px;
}
.failed-panel h2 {
  font-size: 28px;
  font-weight: 700;
}
.failed-panel p {
  font-size: 18px;
}

/* Enquiry */
.enquiry {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
}
.enquiry > section {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.enquiry > aside {
  flex: 1 1 300px;
  min-width: 0;
  padding: 24px;
  border-radius: var(--radius-panel);
  background: var(--blue-light);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.enquiry form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label {
  font-weight: 600;
}
.field .req {
  color: var(--ink-muted);
  font-weight: 400;
}
.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 17px;
  color: var(--ink);
  border: 1px solid var(--ink-muted);
  border-radius: var(--radius-card);
  background: #fff;
}
.field input[aria-invalid="true"] {
  border: 2px solid var(--red);
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.banner {
  padding: 24px;
  border-radius: var(--radius-card);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  font-size: 18px;
  font-weight: 600;
}
.banner.ok {
  background: var(--green-light);
}
.banner.err {
  background: var(--red-light);
}
.scores {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
}
.scores dd {
  margin: 0;
  font-weight: 600;
}
.scores .total {
  padding-top: 8px;
  border-top: 1px solid #fff;
}
.notice {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

@media (max-width: 600px) {
  main {
    padding-top: 32px;
    gap: 40px;
  }
  .cta {
    padding: 32px 24px;
  }
  .cta h2 {
    font-size: 28px;
  }
  .btn {
    width: 100%;
  }
  .scan-form .row .btn {
    flex: 1 1 100%;
  }
}
