:root {
  --ink: #102a2b;
  --ink-soft: #2f4344;
  --paper: #f3f5f4;
  --paper-raised: #ffffff;
  --line: #d5ddd9;
  --primary: #12352f;
  --primary-2: #15453c;
  --accent: #1f6f5f;
  --warn: #9a3412;
  --ok: #166534;
  --danger: #991b1b;
  --shadow: none;
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", "Segoe UI", sans-serif;
  --focus: #0b57d0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn:hover {
    transform: none;
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

a:focus-visible,
.btn:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  min-height: 100vh;
}

a {
  color: var(--primary-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 245, 244, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand span {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--ink);
}

.nav-logout {
  display: inline;
  margin: 0;
  padding: 0;
}

.nav-logout .linkish {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: none;
}

.nav-logout .linkish:hover {
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-2);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
}

.btn-danger {
  background: #fff;
  border-color: #fecaca;
  color: var(--danger);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
}

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: end;
  padding: 4rem 0 3rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  font-weight: 600;
}

.hero .lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 36rem;
  margin: 0 0 1.5rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-panel {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.25rem;
}

.score-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 8px solid var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 1rem;
}

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

.section {
  padding: 2.5rem 0;
}

.section h1,
.section h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
}

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.flash-wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 1rem auto 0;
  display: grid;
  gap: 0.5rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.flash.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.flash.error {
  border-color: #fecaca;
  background: #fef2f2;
}

.flash.info {
  border-color: #c7e4de;
  background: #f0faf7;
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  padding: 1.5rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.auth-card {
  width: min(440px, calc(100% - 2rem));
  margin: 3rem auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin: 0 0 0.35rem;
}

label {
  display: block;
  font-size: 0.9rem;
  margin: 0.85rem 0 0.35rem;
  color: var(--ink-soft);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="file"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

input[type="color"].color-swatch {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  flex: 0 0 48px;
  -webkit-appearance: none;
  appearance: none;
}

input[type="color"].color-swatch::-webkit-color-swatch-wrapper {
  padding: 4px;
}

input[type="color"].color-swatch::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

input[type="color"].color-swatch::-moz-color-swatch {
  border: none;
  border-radius: 6px;
}

.color-field {
  margin-top: 0.85rem;
}

.color-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.color-hex {
  width: 7.5rem !important;
  flex: 0 0 7.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.color-chip {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--line);
  flex: 0 0 28px;
}

.form-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 1.5rem 0 1rem;
}

.brand-section-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.logo-preview {
  margin: 0.5rem 0 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.logo-preview img {
  max-height: 64px;
  max-width: 220px;
  display: block;
  object-fit: contain;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.form-actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.app-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin: 1.75rem 0 1.25rem;
}

.app-top h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0;
  letter-spacing: -0.02em;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.table th,
.table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: #eef2f0;
}

.table tr:last-child td {
  border-bottom: none;
}

.pill {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #fff;
}

.pill.critical {
  color: #7f1d1d;
  border-color: #fecaca;
  background: #fef2f2;
}

.pill.serious {
  color: #9a3412;
  border-color: #fed7aa;
  background: #fff7ed;
}

.pill.moderate {
  color: #854d0e;
  border-color: #fde68a;
  background: #fffbeb;
}

.pill.minor {
  color: #334155;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.pill.ok {
  color: var(--ok);
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
}

.stat .n {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
}

.stat .l {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.issue {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: #fff;
  margin-bottom: 0.65rem;
}

.issue h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.price-card.featured {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.price {
  font-family: var(--font-display);
  font-size: 2.4rem;
  margin: 0.4rem 0;
}

.price span {
  font-size: 1rem;
  color: var(--ink-soft);
  font-family: var(--font-body);
}

.empty {
  padding: 2rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  align-items: center;
}

.footer-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: var(--ink);
}

.legal {
  max-width: 760px;
}

.legal h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.legal h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 1.75rem 0 0.5rem;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 1rem;
  color: var(--ink);
  font-size: 0.92rem;
}

.check-row input {
  margin-top: 0.2rem;
  width: auto;
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 1rem;
  background: rgba(16, 42, 43, 0.96);
  color: #f3f5f4;
}

.cookie-banner a {
  color: #b8efe2;
  text-decoration: underline;
}

.cookie-banner .btn-secondary:focus-visible,
.cookie-banner .btn-primary:focus-visible {
  outline-color: #fff;
}

.cookie-banner-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.cookie-banner p {
  margin: 0;
  max-width: 46rem;
  font-size: 0.95rem;
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cookie-banner .btn-secondary {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.cookie-banner .btn-primary {
  background: var(--accent);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 0.75rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}

.prose {
  max-width: 760px;
}

.prose h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 1.75rem 0 0.5rem;
  letter-spacing: -0.01em;
}

.prose .lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
}

.prose li {
  margin: 0.35rem 0;
}

.cta-band {
  margin-top: 2rem;
}

.promo-card {
  border-color: var(--accent);
}

.promo-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.promo-row input {
  max-width: 220px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.price-was {
  text-decoration: line-through;
  color: var(--ink-soft);
  font-size: 1.1rem;
  margin-right: 0.35rem;
  font-family: var(--font-body);
  font-weight: 500;
}

@media (max-width: 900px) {
  .hero,
  .grid-3,
  .pricing-grid,
  .stat-row {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
