/* =====================================================================
   ThemeFix ADA — design system
   ---------------------------------------------------------------------
   This product sells accessibility, so its own UI is exemplary:
   - Teal accent on clean neutrals. No gradients, no Bootstrap look,
     no emoji icons.
   - Strong contrast everywhere; visible :focus-visible states.
   - Real semantic HTML (header/nav/main/footer) with a skip link.
   - Linear/Stripe-quality density for the dashboard: cards, compact
     tables, severity-ranked audit views.
   ===================================================================== */

:root {
  /* Brand: deep teal */
  --teal-900: #07322e;
  --teal-800: #0b4a44;
  --teal-700: #0f5f57;   /* primary buttons, links on light bg */
  --teal-600: #11766b;
  --teal-100: #d7ebe8;
  --teal-50:  #eef7f5;

  /* Neutrals */
  --ink:      #15211f;   /* body text — near-black, AA on white */
  --muted:    #45544f;   /* secondary text — 4.6:1 on white */
  --faint:    #6b7b76;   /* captions on light bg only (≥4.5:1 on --bg) */
  --line:     #dfe6e4;   /* borders */
  --line-soft:#edf1f0;
  --bg:       #f6f8f7;
  --surface:  #ffffff;
  --code-bg:  #eef2f1;

  /* Status */
  --danger:   #b42318;
  --danger-bg:#fdecea;
  --warn:     #b54708;
  --warn-bg:  #fef0e2;
  --ok:       #067647;
  --ok-bg:    #e6f6ec;

  /* Type scale */
  --fs-xs: .78rem;
  --fs-sm: .9rem;
  --fs-md: 1rem;
  --fs-lg: 1.2rem;
  --fs-xl: 1.6rem;
  --fs-2xl: 2.2rem;
  --fs-3xl: 2.9rem;

  /* Rhythm */
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;

  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 32, 29, .06);
  --shadow-md: 0 6px 24px rgba(16, 32, 29, .08);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs-md);
  line-height: 1.6;
}

/* Skip link — the first thing keyboard users meet */
.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--teal-800); color: #fff;
  padding: .6rem 1rem; border-radius: 8px; z-index: 100;
  transition: top .15s ease; font-weight: 600;
}
.skip-link:focus { top: .75rem; color: #fff; }

/* Visible focus everywhere — non-negotiable for this product */
:focus-visible {
  outline: 3px solid var(--teal-600);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 .6em;
}
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
p { margin: 0 0 1em; }

a { color: var(--teal-700); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--teal-800); }

code, pre, kbd {
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: .86em;
}
code {
  background: var(--code-bg); color: var(--ink);
  padding: .12em .42em; border-radius: 5px;
}

/* ---------------- Layout ---------------- */
.container { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------------- Top nav ---------------- */
.topnav {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.topnav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .8rem 0;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-name { font-weight: 800; font-size: 1.12rem; letter-spacing: -0.01em; }
.brand-name em { font-style: normal; color: var(--teal-700); }
.nav-links { display: flex; align-items: center; gap: 1.4rem; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: var(--fs-sm); }
.nav-links a:hover { color: var(--ink); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 700; font-size: var(--fs-md);
  padding: .72rem 1.5rem; border-radius: 8px;
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
  line-height: 1.3; transition: background .12s ease, border-color .12s ease;
}
.btn-primary { background: var(--teal-700); color: #fff; }
.btn-primary:hover { background: var(--teal-800); color: #fff; }
.btn-outline { background: var(--surface); color: var(--teal-700); border-color: var(--teal-700); }
.btn-outline:hover { background: var(--teal-50); color: var(--teal-800); border-color: var(--teal-800); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { font-size: var(--fs-sm); padding: .45rem .95rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------------- Cards & panels ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--space-3);
}
.card + .card { margin-top: var(--space-2); }
.card-title { font-size: var(--fs-lg); margin-bottom: .35rem; }
.card-sub { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 1rem; }
.card-accent { border-top: 4px solid var(--teal-600); }

/* ---------------- Alerts ---------------- */
.alert {
  border-radius: 8px; padding: .95rem 1.15rem; margin-bottom: var(--space-2);
  border: 1px solid transparent; font-size: var(--fs-sm);
}
.alert-ok   { background: var(--ok-bg);    border-color: #b9dfc6; color: #0a4d2e; }
.alert-warn { background: var(--warn-bg);  border-color: #f0d5b5; color: #7a3a05; }
.alert-err  { background: var(--danger-bg); border-color: #f3c3bd; color: #7a1f14; }
.alert-info { background: var(--teal-50);  border-color: var(--teal-100); color: var(--teal-900); }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: var(--fs-sm); margin-bottom: .35rem; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="url"],
.field textarea,
.field select {
  width: 100%; padding: .68rem .8rem; font-size: var(--fs-md);
  border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--teal-600); outline: 3px solid rgba(17,118,107,.25); outline-offset: 0;
}
.field .hint { font-size: var(--fs-xs); color: var(--muted); margin-top: .3rem; }

/* ---------------- Tables (audit density) ---------------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
table.data caption { text-align: left; font-weight: 700; padding: .8rem 1rem; background: var(--bg); border-bottom: 1px solid var(--line); }
table.data th {
  text-align: left; padding: .65rem .9rem; font-size: var(--fs-xs);
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  border-bottom: 1px solid var(--line); background: var(--surface);
  white-space: nowrap;
}
table.data td { padding: .6rem .9rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--teal-50); }

/* Severity + status pills */
.pill {
  display: inline-block; font-weight: 700; font-size: var(--fs-xs);
  text-transform: uppercase; letter-spacing: .04em;
  padding: .16rem .55rem; border-radius: 999px; white-space: nowrap;
}
.pill-high   { background: var(--danger-bg); color: var(--danger); }
.pill-medium { background: var(--warn-bg);   color: var(--warn); }
.pill-low    { background: var(--ok-bg);     color: var(--ok); }
.pill-neutral{ background: var(--code-bg);   color: var(--muted); }
.pill-teal   { background: var(--teal-50);   color: var(--teal-800); }

/* ---------------- Stepper ---------------- */
.stepper { display: flex; gap: .6rem; margin: var(--space-3) 0; flex-wrap: wrap; list-style: none; padding: 0; }
.stepper li {
  flex: 1 1 130px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: .6rem .8rem; font-size: var(--fs-sm);
  color: var(--muted); display: flex; align-items: center; gap: .55rem;
}
.stepper .step-n {
  width: 1.7rem; height: 1.7rem; border-radius: 50%; flex-shrink: 0;
  background: var(--code-bg); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: var(--fs-xs);
}
.stepper li.active { border-color: var(--teal-600); color: var(--teal-800); font-weight: 700; }
.stepper li.active .step-n { background: var(--teal-700); color: #fff; }
.stepper li.done { border-color: #b9dfc6; color: var(--ok); }
.stepper li.done .step-n { background: var(--ok); color: #fff; }

/* ---------------- Diff viewer ---------------- */
.diff { background: var(--code-bg); border-radius: 8px; padding: .9rem; overflow-x: auto; font-size: .85rem; margin: .75rem 0 0; }
.diff .del { color: var(--danger); display: block; }
.diff .add { color: var(--ok); display: block; }
.review-note {
  border-left: 4px solid var(--warn); background: var(--warn-bg);
  padding: .7rem .9rem; margin-top: .6rem; border-radius: 0 8px 8px 0; font-size: var(--fs-sm);
}

/* ---------------- Demo banner ---------------- */
.demo-banner {
  background: #fff3cd; color: #6b4e00; font-weight: 700; text-align: center;
  padding: .7rem 1rem; border-bottom: 2px solid #e0c34a; font-size: var(--fs-sm);
}

/* ---------------- Hero (landing) ---------------- */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: var(--space-5) 0; }
.hero-kicker {
  display: inline-block; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: var(--teal-800); background: var(--teal-50);
  border: 1px solid var(--teal-100); border-radius: 999px; padding: .35rem .9rem; margin-bottom: 1.2rem;
}
.hero h1 { font-size: var(--fs-3xl); max-width: 16ch; margin-bottom: 1rem; }
.hero .lede { font-size: var(--fs-lg); color: var(--muted); max-width: 60ch; margin-bottom: 1.8rem; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-top: var(--space-4); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.stat .num { font-size: var(--fs-xl); font-weight: 800; color: var(--teal-800); display: block; }
.stat .lbl { font-size: var(--fs-sm); color: var(--muted); }

.section { padding: var(--space-4) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { margin-bottom: .5rem; }
.section-lede { color: var(--muted); max-width: 68ch; margin-bottom: var(--space-3); }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.1rem; }
.feature-card h3 { display: flex; align-items: center; gap: .6rem; }
.feature-icon {
  width: 2.2rem; height: 2.2rem; border-radius: 8px; background: var(--teal-50);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* Numbered process list */
.process { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.process li { counter-increment: step; display: flex; gap: 1.1rem; align-items: flex-start; }
.process li::before {
  content: counter(step); background: var(--teal-700); color: #fff; font-weight: 800;
  width: 2.1rem; height: 2.1rem; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.process strong { display: block; margin-bottom: .15rem; }
.process p { color: var(--muted); font-size: var(--fs-sm); margin: 0; }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: .7rem; }
.faq summary { font-weight: 700; cursor: pointer; padding: 1rem 1.25rem; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--teal-700); font-weight: 800; margin-right: .6rem; }
.faq details[open] summary::before { content: "–"; }
.faq details > div { padding: 0 1.25rem 1.2rem; color: var(--muted); }

/* Pricing */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.1rem; align-items: stretch; }
.price-card { display: flex; flex-direction: column; }
.price-card.hot { border: 2px solid var(--teal-600); box-shadow: var(--shadow-md); position: relative; }
.price-flag {
  position: absolute; top: -0.85rem; left: 1.25rem;
  background: var(--teal-700); color: #fff; font-size: var(--fs-xs); font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em; padding: .25rem .75rem; border-radius: 999px;
}
.price-name { font-size: var(--fs-sm); font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.price-amt { font-size: var(--fs-2xl); font-weight: 800; margin: .3rem 0 .1rem; letter-spacing: -0.02em; }
.price-amt small { font-size: var(--fs-sm); font-weight: 400; color: var(--muted); }
.price-card ul { padding-left: 1.15rem; margin: 1rem 0 1.5rem; flex: 1; }
.price-card li { margin-bottom: .5rem; font-size: var(--fs-sm); }
.price-card li::marker { color: var(--teal-600); }

/* Footer */
.site-footer { padding: var(--space-3) 0; color: var(--muted); font-size: var(--fs-sm); border-top: 1px solid var(--line); margin-top: var(--space-4); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-start; }

/* Dashboard */
.dash-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin: var(--space-3) 0 var(--space-2); }
.metric-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: var(--space-2); }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; }
.metric .num { font-size: var(--fs-xl); font-weight: 800; display: block; line-height: 1.2; }
.metric .lbl { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.metric .num.danger { color: var(--danger); }
.metric .num.warn { color: var(--warn); }
.metric .num.ok { color: var(--ok); }
.metric .num.teal { color: var(--teal-800); }

.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: var(--space-2); }
.chip {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: .35rem .9rem; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; color: var(--muted);
}
.chip[aria-pressed="true"] { background: var(--teal-800); border-color: var(--teal-800); color: #fff; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* Login */
.auth-wrap { max-width: 440px; margin: var(--space-4) auto; }
.tabs { display: flex; gap: .5rem; margin-bottom: var(--space-2); }
.tab {
  flex: 1; text-align: center; padding: .6rem; border: 1.5px solid var(--line);
  border-radius: 8px; background: var(--surface); cursor: pointer; font-weight: 700; font-size: var(--fs-sm); color: var(--muted);
}
.tab.active { border-color: var(--teal-600); color: var(--teal-800); background: var(--teal-50); }

/* Comparison table */
.compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
table.compare { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 640px; }
table.compare th, table.compare td { padding: .85rem 1rem; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
table.compare thead th { background: var(--teal-900); color: #fff; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; }
table.compare thead th:first-child { border-top-left-radius: var(--radius); }
table.compare thead th:last-child { border-top-right-radius: var(--radius); }
table.compare tbody tr:last-child td { border-bottom: 0; }
table.compare .us { background: var(--teal-50); font-weight: 600; }

/* Utility */
.fine { font-size: var(--fs-sm); color: var(--muted); }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------------- Responsive ---------------- */
@media (max-width: 720px) {
  :root { --fs-3xl: 2rem; --fs-2xl: 1.7rem; --fs-xl: 1.35rem; }
  .hero { padding: var(--space-3) 0; }
  .nav-links { gap: .9rem; }
  .nav-links a { font-size: var(--fs-xs); }
  .topnav-inner { padding: .65rem 0; }
  .brand-name { font-size: 1rem; }
  .btn { width: 100%; }
  .nav-links .btn { width: auto; padding: .45rem .9rem; font-size: var(--fs-xs); }
  .hero-cta .btn { width: 100%; }
  .stepper li { flex: 1 1 100%; }
  table.data th, table.data td { padding: .5rem .6rem; }
}
