/* AccessibleDocs Kit — shared stylesheet
   Corporate-calm, trust-first, WCAG-conformant by construction:
   - Contrast ratios checked against WCAG AA (4.5:1 body, 3:1 large text)
   - Visible focus states on every interactive element (never removed)
   - Fluid type via clamp(), no fixed px that blocks zoom
   - prefers-reduced-motion respected
*/

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f5f7fa;
  --color-text: #1a2433;
  --color-text-muted: #4b5768;
  --color-border: #d8dee6;
  --color-primary: #0b5fff;
  --color-primary-dark: #0846c4;
  --color-accent: #0f7a4a;
  --color-warn-bg: #fff4e5;
  --color-warn-border: #e8a33d;
  --color-warn-text: #6b4a05;
  --color-danger: #b3261e;
  --focus-ring: #0b5fff;
  --radius: 8px;
  --max-width: 1120px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary);
}

a:hover {
  color: var(--color-primary-dark);
}

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

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

/* Layout */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

section {
  padding: clamp(2.5rem, 3vw + 1rem, 5rem) 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-border-top {
  border-top: 1px solid var(--color-border);
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 3.25rem);
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
}

h3 {
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem);
}

p {
  margin: 0 0 1rem;
}

.lede {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 62ch;
}

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

.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Header / nav */
.site-header {
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(6px);
  z-index: 100;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-text);
  text-decoration: none;
}

.brand:hover {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.2;
}

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

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

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

.btn-secondary:hover {
  background: var(--color-bg-alt);
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

/* Hero */
.hero {
  padding-top: clamp(3rem, 4vw + 1rem, 5.5rem);
}

.hero .lede {
  margin-left: 0;
  margin-right: 0;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.hero-meta {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Stat / urgency cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.stat-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  display: block;
  margin-bottom: 0.25rem;
}

.stat-source {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Comparison table */
.table-scroll {
  overflow-x: auto;
  margin-top: 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

caption {
  text-align: left;
  padding: 1rem 1.25rem 0;
  font-weight: 700;
}

th,
td {
  text-align: left;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

th {
  background: var(--color-bg-alt);
  font-weight: 700;
}

td[data-check="yes"]::before {
  content: "✓ ";
  color: var(--color-accent);
  font-weight: 700;
}

td[data-check="no"]::before {
  content: "— ";
  color: var(--color-text-muted);
}

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

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  list-style: none;
  padding: 0;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  padding-top: 3rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 1.25rem;
  left: 1.5rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.price-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
}

.price-card.featured {
  border-color: var(--color-primary);
  border-width: 2px;
  box-shadow: 0 8px 24px rgba(11, 95, 255, 0.08);
}

.price-badge {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
  width: fit-content;
}

.price-amount {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0.25rem 0 0.25rem;
}

.price-amount sup {
  font-size: 1rem;
  font-weight: 600;
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 1.75rem;
  flex-grow: 1;
}

.price-list li {
  padding: 0.4rem 0 0.4rem 1.6rem;
  position: relative;
}

.price-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 1.1rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--color-primary);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  padding-bottom: 1.1rem;
  color: var(--color-text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  padding: 2.5rem 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

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

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--color-text-muted);
}

/* Forms */
fieldset {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 0 0 1.25rem;
}

legend {
  font-weight: 700;
  padding: 0 0.5rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field {
  margin-bottom: 1.1rem;
}

.field-hint {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.3rem;
}

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

textarea {
  min-height: 7rem;
  resize: vertical;
}

.radio-group {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.radio-group label {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Tool output */
.tool-output {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  max-height: 32rem;
}

.output-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

[hidden] {
  display: none !important;
}

.status-message {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--color-warn-bg);
  border: 1px solid var(--color-warn-border);
  color: var(--color-warn-text);
  margin-top: 0.75rem;
}

.verdict-card {
  border-radius: var(--radius);
  border: 2px solid var(--color-border);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.verdict-card.verdict-in-scope {
  border-color: var(--color-danger);
  background: #fdeceb;
}

.verdict-card.verdict-exempt {
  border-color: var(--color-accent);
  background: #eaf6ef;
}

.verdict-card.verdict-edge {
  border-color: var(--color-warn-border);
  background: var(--color-warn-bg);
}

/* Upsell block */
.upsell {
  border: 1px solid var(--color-primary);
  background: #eef4ff;
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-top: 2.5rem;
}

.upsell h3 {
  margin-top: 0;
}

/* Utility */
.badge {
  display: inline-block;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.callout {
  border-left: 4px solid var(--color-primary);
  background: var(--color-bg-alt);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

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

.mt-0 {
  margin-top: 0;
}

.mb-0 {
  margin-bottom: 0;
}

.legal-content h2 {
  margin-top: 2rem;
}

.legal-content ul {
  padding-left: 1.25rem;
}
