:root {
  --navy: #0c2248;
  --ink-dark: #051126;
  --green: #23d675;
  --green-hover: #1fc06a;
  --blue: #9adbff;
  --white: #ffffff;
  --bg: #ffffff;
  --bg-alt: #f5fbf8;
  --text: #3d3d3b;
  --card-border: #ddeee7;
  --fail: #dc143c;
  --warn: #c4841d;
  --pass: #1aa85a;
  --info: #3d6f9a;

  --font: "Poppins", system-ui, sans-serif;
  --radius: 14px;
  --radius-btn: 10px;
  --shadow-inset: inset 0 0 0 1.5px var(--card-border);
  --max: 920px;
}

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

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-weight: 400;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1 0 auto;
}

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

.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 -1.5px 0 var(--card-border);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
  background: #23d675;
  box-shadow: 0 0 0 4px rgba(35, 214, 117, 0.16);
}

.brand-mark-footer {
  background: #23d675;
  box-shadow: 0 0 0 3px rgba(35, 214, 117, 0.2);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--navy);
  line-height: 1.2;
}

.brand-tag {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text);
  opacity: 0.75;
}

.lang-switch {
  display: inline-flex;
  padding: 0.18rem;
  background: var(--white);
  border-radius: 999px;
  box-shadow: var(--shadow-inset);
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-btn:hover {
  color: var(--navy);
}

.lang-btn.is-active {
  background: var(--navy);
  color: var(--white);
}

/* Hero */
.hero {
  padding: 3rem 0 2.5rem;
  background: var(--bg);
  animation: rise 0.65s ease-out both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

.eyebrow-arrow {
  font-size: 0.95rem;
  line-height: 1;
}

.hero h1 {
  margin: 0 0 1rem;
  font-weight: 600;
  font-size: clamp(2rem, 5.2vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--navy);
  max-width: 16ch;
}

.h1-line {
  display: block;
}

.h1-accent {
  color: var(--green);
}

.lede {
  margin: 0 0 1.75rem;
  max-width: 38rem;
  color: var(--text);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 400;
  line-height: 1.6;
}

.check-form {
  display: grid;
  gap: 0.7rem;
  max-width: 40rem;
}

.input-row {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding: 0.4rem;
  background: var(--white);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow-inset);
}

.input-row input {
  flex: 1 1 220px;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 1rem;
  padding: 0.85rem 1rem;
  background: transparent;
  color: var(--navy);
}

.input-row input::placeholder {
  color: #8a9a93;
}

.btn-cta {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-btn);
  background: var(--green);
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 9rem;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn-cta:hover:not(:disabled) {
  background: var(--green-hover);
  transform: translateY(-1px);
}

.error-page {
  padding-bottom: 4rem;
}

.error-page h1 {
  max-width: 18ch;
}

.error-code {
  margin: 0 0 0.35rem;
  font-size: clamp(3.2rem, 10vw, 6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--green);
}

.btn-cta:disabled {
  opacity: 0.7;
  cursor: wait;
}

.btn-arrow {
  font-size: 1rem;
  line-height: 1;
}

.btn-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(12, 34, 72, 0.25);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-cta:disabled .btn-arrow {
  display: none;
}

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

.trust-badge {
  margin: 0;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy);
  background: rgba(35, 214, 117, 0.16);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
}

.eta {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.45;
}

.wait-status {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  background: rgba(154, 219, 255, 0.28);
  border-radius: var(--radius-btn);
  padding: 0.55rem 0.8rem;
  line-height: 1.45;
}

.profile-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  align-items: center;
  margin: 0.85rem 0 0;
  font-size: 0.9rem;
}

.profile-row label {
  font-weight: 600;
  color: var(--navy);
}

.profile-row select {
  font: inherit;
  padding: 0.4rem 0.65rem;
  border-radius: 10px;
  border: 1.5px solid var(--card-border);
  background: var(--white);
  color: var(--navy);
}

.dual-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.4rem;
  margin: 0.55rem 0 0.35rem;
}

.dual-scores span {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  opacity: 0.7;
}

.dual-scores strong {
  font-size: 1.35rem;
  color: var(--navy);
}

.rubric-meta {
  margin: 0.2rem 0 0.6rem;
  font-size: 0.82rem;
  opacity: 0.72;
}

/* Results band */
.results-band {
  background: var(--bg-alt);
  padding: 0.5rem 0 3.5rem;
  min-height: 2rem;
}

.error-banner {
  margin-top: 1rem;
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--fail);
  box-shadow: inset 0 0 0 1.5px rgba(220, 20, 60, 0.35);
  animation: rise 0.35s ease-out both;
  font-weight: 500;
}

.results {
  margin-top: 1.5rem;
  display: grid;
  gap: 1.15rem;
  animation: rise 0.55s ease-out both;
}

.score-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  padding: 1.45rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-inset);
}

.score-meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.score-caption {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  color: var(--navy);
  white-space: nowrap;
}

.score-ring {
  --p: 0;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), #e4efe9 0);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.8s ease;
}

.score-inner {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: var(--white);
  display: grid;
  place-content: center;
  text-align: center;
}

.score-number {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.score-grade {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.04em;
}

.score-copy {
  flex: 1 1 200px;
}

.score-label {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.score-url {
  margin: 0.2rem 0 0.8rem;
  color: var(--text);
  opacity: 0.75;
  word-break: break-all;
  font-size: 0.95rem;
}

.score-counts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.score-counts li {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  background: var(--bg-alt);
  color: var(--text);
  box-shadow: var(--shadow-inset);
}

.score-counts li[data-k="pass"] {
  color: var(--pass);
}
.score-counts li[data-k="warn"] {
  color: var(--warn);
}
.score-counts li[data-k="fail"] {
  color: var(--fail);
}

.category-scores {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.45rem;
}

.cat-title {
  margin: 0 0 0.15rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green);
}

.cat-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr 2.2rem;
  gap: 0.55rem;
  align-items: center;
}

.cat-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
}

.cat-bar {
  height: 0.45rem;
  border-radius: 999px;
  background: #e4efe9;
  overflow: hidden;
}

.cat-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.cat-score {
  font-size: 0.8rem;
  font-weight: 700;
  text-align: right;
  color: var(--navy);
}

.followup {
  margin: 1.1rem 0 0;
  padding: 1.15rem 1.2rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-inset);
}

.followup-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.followup-lede {
  margin: 0.35rem 0 0.85rem;
  color: var(--text);
  font-size: 0.95rem;
}

.followup-form .input-row {
  max-width: 40rem;
}

.followup-status {
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pass);
}

.followup-status.is-error {
  color: var(--fail);
}

.followup.is-sent .followup-form .input-row {
  display: none;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter {
  appearance: none;
  border: 0;
  background: var(--white);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-inset);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.filter:hover {
  transform: translateY(-1px);
}

.filter.is-active {
  background: var(--navy);
  color: var(--white);
  box-shadow: none;
}

.checks {
  display: grid;
  gap: 0.75rem;
}

.check {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem;
  box-shadow: var(--shadow-inset);
  border-left: 4px solid var(--card-border);
  animation: rise 0.45s ease-out both;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.check:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1.5px var(--green);
}

.check[data-status="pass"] {
  border-left-color: var(--pass);
}
.check[data-status="warn"],
.check[data-status="partial"] {
  border-left-color: var(--warn);
}
.check[data-status="not_applicable"] {
  border-left-color: #9aa7b5;
}
.check[data-status="error"] {
  border-left-color: var(--fail);
}
.check[data-status="fail"] {
  border-left-color: var(--fail);
}
.check[data-status="info"] {
  border-left-color: var(--info);
}

.check.is-hidden {
  display: none;
}

.check-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.check-name {
  margin: 0;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.check-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.info-btn {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: help;
  flex-shrink: 0;
  line-height: 0;
}

.info-icon {
  display: inline-grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  color: var(--navy);
  font-size: 0.68rem;
  font-weight: 700;
  font-style: italic;
  background: rgba(154, 219, 255, 0.35);
  box-shadow: inset 0 0 0 1.5px rgba(12, 34, 72, 0.18);
  transition: background 0.15s ease, transform 0.15s ease;
}

.info-btn:hover .info-icon,
.info-btn:focus-visible .info-icon {
  background: var(--blue);
  transform: scale(1.06);
  outline: none;
}

.info-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.55rem);
  transform: translateX(-50%) translateY(4px);
  width: min(280px, 70vw);
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 12px 28px rgba(5, 17, 38, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 20;
}

.info-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--navy);
}

.info-btn:hover .info-tip,
.info-btn:focus-visible .info-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.check-meta {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
}

.badge-pass {
  background: rgba(35, 214, 117, 0.16);
  color: var(--pass);
}
.badge-warn,
.badge-partial {

  background: rgba(196, 132, 29, 0.12);
  color: var(--warn);
}
.badge-fail {
  background: rgba(220, 20, 60, 0.1);
  color: var(--fail);
}
.badge-info {
  background: rgba(61, 111, 154, 0.12);
  color: var(--info);
}
.badge-not_applicable {
  background: #eef1f4;
  color: #5c6b7a;
}
.badge-error {
  background: rgba(220, 20, 60, 0.1);
  color: var(--fail);
}

.check-evidence-wrap {
  margin: 0.5rem 0 0;
}
.check-evidence-wrap summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
}
  background: rgba(61, 111, 154, 0.12);
  color: var(--info);
}

.category {
  font-size: 0.78rem;
  color: var(--text);
  opacity: 0.7;
}

.check-summary {
  margin: 0.45rem 0 0;
  color: var(--text);
}

.check-details,
.check-evidence {
  margin: 0.55rem 0 0;
  padding-left: 1.1rem;
  color: var(--text);
  opacity: 0.8;
  font-size: 0.9rem;
}

.check-evidence {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  opacity: 0.7;
  white-space: pre-wrap;
  list-style: none;
  padding-left: 0;
}

.check-evidence li {
  margin: 0.45rem 0 0;
  padding: 0.55rem 0.7rem;
  background: rgba(5, 17, 38, 0.04);
  border-left: 2px solid #c5d0cc;
}

.check-evidence li.is-hit {
  border-left-color: var(--green);
  background: rgba(35, 214, 117, 0.08);
}

.check-evidence li.is-miss {
  border-left-color: var(--fail);
  background: rgba(220, 20, 60, 0.06);
  color: var(--fail);
  opacity: 0.9;
}

/* Footer */
.site-footer {
  background: var(--ink-dark);
  color: rgba(255, 255, 255, 0.78);
  padding: 2rem 0;
  margin-top: auto;
  flex-shrink: 0;
  width: 100%;
}

.footer-inner {
  display: grid;
  gap: 0.85rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  font-weight: 600;
}

.footer-logo {
  display: block;
  height: 44px;
  width: auto;
}

.site-footer p {
  margin: 0;
  font-size: 0.85rem;
  max-width: 46rem;
  line-height: 1.55;
}

@media (max-width: 560px) {
  .hero {
    padding-top: 2rem;
  }

  .hero h1 {
    max-width: none;
  }

  .input-row button {
    width: 100%;
  }

  .cat-row {
    grid-template-columns: 5.5rem 1fr 2rem;
  }

  .info-tip {
    left: 0;
    transform: translateX(0) translateY(4px);
  }

  .info-btn:hover .info-tip,
  .info-btn:focus-visible .info-tip {
    transform: translateX(0) translateY(0);
  }

  .info-tip::after {
    left: 0.7rem;
    transform: none;
  }
}

.blocked-note {
  margin: 0.75rem 0 0;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(220, 20, 60, 0.35);
  background: rgba(220, 20, 60, 0.06);
  color: var(--fail);
  font-size: 0.85rem;
  line-height: 1.5;
}

.limits {
  margin-top: 0.75rem;
  max-width: 46rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text);
}

.limits summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
}

.limits ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.limits li + li {
  margin-top: 0.35rem;
}

.blocked-note {
  display: grid;
  gap: 0.75rem;
}

.blocked-repeat {
  display: block;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--navy);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
}
