:root {
  color-scheme: light;
  --ink: #16201c;
  --muted: #66736d;
  --line: #dfe7e2;
  --panel: #ffffff;
  --bg: #f5f8f6;
  --good: #1f8f64;
  --warn: #b7791f;
  --bad: #bf3f3f;
  --accent: #195bff;
  --accent-2: #00a884;
  --shadow: 0 18px 45px rgba(25, 38, 32, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(25, 91, 255, 0.08), transparent 32%),
    linear-gradient(315deg, rgba(0, 168, 132, 0.1), transparent 36%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.site-header,
.site-footer,
.plan-card,
.paywall-actions {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.site-header {
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.site-header h1 {
  margin: 8px 0 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.checker-panel,
.score-card,
.findings,
.facts,
.checks,
.kpi-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.checker-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  gap: 32px;
  align-items: end;
  padding: 34px;
}

.intro h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.lede {
  max-width: 670px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.trust-intro {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--accent-2);
  background: #f8fcfa;
  color: var(--ink);
}

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

.check-form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #c8d5ce;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #fbfdfc;
}

input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(25, 91, 255, 0.14);
}

button:focus-visible,
select:focus-visible,
textarea:focus-visible,
.checks-list:focus-visible {
  outline: 3px solid rgba(25, 91, 255, 0.18);
  outline-offset: 3px;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

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

button.loading {
  position: relative;
}

button.loading::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  right: 12px;
  top: 50%;
  margin-top: -7px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-top-color: rgba(255, 255, 255, 1);
  animation: spin 0.7s linear infinite;
}

.form-message {
  min-height: 22px;
  margin: 10px 0 0;
}

.scan-consent {
  margin: 10px 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.form-message.info {
  color: var(--muted);
}

.form-message.success {
  color: var(--good);
}

.form-message.error {
  color: var(--bad);
}

.results {
  margin-top: 18px;
}

.hidden {
  display: none;
}

.score-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(160px, 0.5fr));
  gap: 14px;
}

.score-card {
  min-height: 154px;
  padding: 22px;
}

.pricing {
  margin-top: 16px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpi-panel {
  margin-top: 16px;
  padding: 22px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.kpi-tile {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfc;
}

.kpi-tile span {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 900;
}

.kpi-tile p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.kpi-export-label {
  display: block;
  margin: 16px 0 8px;
  font-weight: 800;
}

.kpi-export {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid #c8d5ce;
  border-radius: 8px;
  padding: 12px;
  background: #f9fbfa;
  color: var(--ink);
  font: 0.9rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.plan-card {
  padding: 22px;
  box-shadow: var(--shadow);
}

.plan-list {
  padding-left: 18px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.plan-list li + li {
  margin-top: 6px;
}

.plan-price {
  margin: 8px 0 0;
}

.plan-price span {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
}

.plan-price small {
  color: var(--muted);
}

.plan-card-featured {
  border-color: rgba(25, 91, 255, 0.25);
  box-shadow: 0 12px 40px rgba(25, 91, 255, 0.14);
}

#subscription-state {
  margin: 6px 0 0;
}

.primary-score {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.score-ring {
  width: 112px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent-2) calc(var(--score) * 1%), #e7eee9 0);
}

.score-ring span {
  width: 78px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  font-size: 2rem;
  font-weight: 900;
}

.score-card h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.score-card strong {
  display: block;
  font-size: 2.5rem;
  line-height: 1;
}

.bar {
  height: 10px;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ece8;
}

.bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 250ms ease;
}

.muted {
  color: var(--muted);
}

.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  margin-top: 14px;
}

.findings,
.facts,
.checks {
  padding: 22px;
}

.section-title {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title h2,
.facts h2 {
  margin: 0;
  font-size: 1.05rem;
}

.section-title p {
  margin: 0;
  text-align: right;
}

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

.finding,
.check-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfc;
}

.finding header,
.check-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.finding h3,
.check-item h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.finding p,
.check-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.badge {
  display: inline-grid;
  min-width: 74px;
  min-height: 28px;
  place-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 800;
}

.badge.high {
  background: #fde8e8;
  color: var(--bad);
}

.badge.medium {
  background: #fff3d6;
  color: var(--warn);
}

.badge.low,
.badge.pass {
  background: #e2f7ef;
  color: var(--good);
}

.badge.info {
  background: #eef3ff;
  color: var(--accent);
}

.badge.fail,
.badge.review {
  background: #fde8e8;
  color: var(--bad);
}

.facts dl {
  display: grid;
  grid-template-columns: minmax(112px, auto) minmax(0, 1fr);
  gap: 12px 14px;
  margin: 18px 0 0;
}

.facts dt {
  color: var(--muted);
  font-size: 0.85rem;
}

.facts dd {
  margin: 0;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.checks {
  margin-top: 14px;
}

.tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f7f5;
}

.tab {
  min-height: 34px;
  border-radius: 6px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
}

.tab.active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(20, 30, 25, 0.08);
}

.paywall-modal {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  width: min(480px, calc(100vw - 32px));
}

.paywall-modal::backdrop {
  background: rgba(20, 30, 25, 0.5);
}

.paywall-modal form {
  width: 100%;
  padding: 20px;
  display: grid;
  gap: 10px;
}

.paywall-modal h2 {
  margin: 0;
}

.paywall-modal label {
  font-weight: 700;
}

.paywall-actions {
  border: 0;
  display: flex;
  gap: 10px;
  padding: 0;
  margin-top: 4px;
}

.secondary-cta {
  justify-self: start;
  margin-top: 8px;
  background: #eef6ff;
  color: var(--ink);
}

.paywall-modal button {
  flex: 1;
}

.paywall-modal select,
.paywall-modal input,
.plan-card button {
  min-height: 46px;
}

.site-footer {
  margin-top: 14px;
  padding: 20px;
  color: var(--muted);
  line-height: 1.5;
}

.site-footer p {
  margin: 0 0 6px;
}

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

@media (max-width: 900px) {
  .checker-panel,
  .score-grid,
  .results-layout,
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .checker-panel {
    padding: 24px;
  }

  .score-card {
    min-height: 130px;
  }

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

@media (max-width: 620px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
  }

  .input-row,
  .primary-score,
  .finding header,
  .check-item {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }

  .section-title {
    display: block;
  }

  .section-title p {
    margin-top: 6px;
    text-align: left;
  }

  .score-card h2 {
    word-break: break-word;
    font-size: 1rem;
  }

  .score-ring {
    width: 100px;
  }

  .paywall-actions {
    display: block;
  }

  .paywall-modal form {
    padding: 16px;
  }
}
