/* Preflight design system.
   Inherited from sanadtech.us: paper, ink, muted, panel, radius, easing, Manrope
   and its unusually light heading weight. Deliberately differentiated: the accent
   moves from SanadTech's warm forest (#28734f) to a cooler instrument teal, so the
   two read as siblings rather than as the same product. */

@font-face {
  font-family: Manrope;
  src: url("assets/fonts/Manrope-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f4f2ec;
  --ink: #232622;
  --muted: #5b6058;
  --accent: #156b63;
  --accent-hover: #0f5049;
  --on-accent: #fff;
  --panel: #f8f7f2;
  --light: #fcfbf7;
  --rule: #d6d8d0;
  --soft: #eae8e0;
  --control-border: #cdd0c4;

  /* Severity. Never the only signal — every use is paired with a word. */
  --blocking: #9c2f1c;
  --blocking-soft: #f7e7e3;
  --warning: #855c0c;
  --warning-soft: #f7efdc;
  --pass: #156b63;

  --radius: 6px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.shell { max-width: 68rem; margin: 0 auto; padding-inline: 1.5rem; }
.narrow { max-width: 42rem; }

/* ── header ──────────────────────────────────────────────────────────── */

header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; height: 72px;
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: 21px; font-weight: 650; letter-spacing: -0.03em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand span { color: var(--accent); }
.nav { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: color .2s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* ── type ────────────────────────────────────────────────────────────── */

h1 {
  font-size: clamp(40px, 5.4vw, 66px);
  line-height: 1.1; font-weight: 450; letter-spacing: -0.04em;
  margin: 0 0 1rem; max-width: 20ch;
}
h2 {
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.2; font-weight: 500; letter-spacing: -0.025em;
  margin: 3rem 0 .75rem;
}
h3 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; margin: 2rem 0 .5rem; }
p { margin: 0 0 1rem; color: var(--muted); max-width: 62ch; }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--ink); max-width: 46ch; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
strong { color: var(--ink); font-weight: 650; }

.eyebrow {
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 650; color: var(--accent); margin: 0 0 .75rem;
}

/* ── the tool ────────────────────────────────────────────────────────── */

.hero { padding: 3.5rem 0 1rem; }
.tool {
  background: var(--light); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 1.75rem; margin: 1.5rem 0 3rem;
}
.tool-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.tool-head h2 { margin: 0; font-size: 21px; }

.platforms { display: flex; gap: .5rem; }
.platforms button {
  font: inherit; font-size: 15px; font-weight: 550;
  padding: .45rem 1rem; border-radius: 100px; cursor: pointer;
  border: 1px solid var(--control-border); background: var(--paper);
  color: var(--muted); transition: all .2s var(--ease);
}
.platforms button[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
}

fieldset { border: 0; padding: 0; margin: 0 0 1.75rem; }
legend {
  font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  font-weight: 650; color: var(--ink); padding: 0; margin-bottom: .25rem;
}
.legend-note { font-size: 14px; color: var(--muted); margin: 0 0 1rem; max-width: 52ch; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: .3rem; }
.field .hint { font-size: 13px; color: var(--muted); margin: .25rem 0 0; }
input[type=text], input[type=url], input[type=number], textarea, select {
  width: 100%; font: inherit; font-size: 15px;
  padding: .55rem .7rem; border: 1px solid var(--control-border);
  border-radius: var(--radius); background: var(--paper); color: var(--ink);
}
textarea { min-height: 7rem; resize: vertical; }
input[type=file] { font: inherit; font-size: 14px; max-width: 100%; }
.row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }

.check { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .6rem; }
.check input { margin-top: .35rem; flex: none; }
.check label { font-size: 15px; font-weight: 500; margin: 0; }

.btn {
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  padding: .7rem 1.6rem; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent);
  transition: background .2s var(--ease);
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-quiet { background: transparent; color: var(--accent); }
.btn-quiet:hover { background: var(--soft); color: var(--accent-hover); }

/* ── results ─────────────────────────────────────────────────────────── */
/* ⚠ These class names are the contract app.js emits. It is the producer; this
   file follows it. An earlier version of this block was written against names
   invented here (.is-blocking, .count) while app.js rendered severity-blocking
   and counts-list, so the whole results view was unstyled — each file correct
   on its own, the relationship wrong. Check app.js before renaming anything. */

.results { margin-top: 1.5rem; }

.privacy-note {
  font-size: 14px; color: var(--muted); background: var(--panel);
  border: 1px solid var(--rule); padding: .8rem 1rem;
  border-radius: var(--radius); margin: 1.25rem 0; max-width: 62ch;
}

.counts-list {
  list-style: none; padding: 0; margin: 0 0 1.25rem;
  display: flex; gap: .75rem; flex-wrap: wrap;
}
.severity {
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: .6rem 1rem; background: var(--paper); font-size: 15px; font-weight: 550;
}
.severity-blocking { border-color: var(--blocking); background: var(--blocking-soft); color: var(--blocking); }
.severity-warning  { border-color: var(--warning);  background: var(--warning-soft);  color: var(--warning); }
.severity-note     { color: var(--muted); }

.finding {
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1rem 1.15rem; margin-bottom: .85rem; background: var(--light);
}
/* Severity is carried by a WORD in the finding text as well as this tint, so
   colour is never the only signal. */
.finding.severity-blocking { border-color: var(--blocking); background: var(--blocking-soft); }
.finding.severity-warning  { border-color: var(--warning);  background: var(--warning-soft); }
.finding h3, .finding h4 { margin: 0 0 .4rem; font-size: 17px; font-weight: 650; }
.finding p { font-size: 15px; margin-bottom: .5rem; }
.finding .citation {
  font-size: 13px; color: var(--muted); font-style: italic; margin: .4rem 0 0;
}
.finding .fix {
  font-size: 15px; color: var(--ink); background: var(--panel);
  padding: .6rem .8rem; border-radius: var(--radius); margin: .6rem 0 0;
}

.evidence-basis {
  font-size: 14px; color: var(--muted); border-top: 1px solid var(--rule);
  padding-top: .9rem; margin-top: 1.5rem; max-width: 62ch;
}

.refund-promise {
  font-size: 14px; color: var(--muted); margin: .6rem 0 0; max-width: 48ch;
}

.checklist-table { border-collapse: collapse; width: 100%; margin: 1.25rem 0; font-size: 15px; }
.checklist-table th, .checklist-table td {
  text-align: left; padding: .55rem .8rem; border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.checklist-status { font-weight: 650; white-space: nowrap; }
.status-flagged     { color: var(--blocking); }
.status-not_checked { color: var(--warning); }
.status-provided    { color: var(--accent); }
.status-blank       { color: var(--muted); }

.feedback-form { margin-top: 2rem; border-top: 1px solid var(--rule); padding-top: 1.25rem; }
.feedback-status { font-size: 14px; color: var(--muted); margin-top: .5rem; }

/* ── content blocks ──────────────────────────────────────────────────── */

.grid-3 { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin: 1.5rem 0; }
.card { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.25rem; background: var(--light); }
.card h3 { margin-top: 0; }
.card p { font-size: 15px; margin-bottom: 0; }

table { border-collapse: collapse; width: 100%; margin: 1.25rem 0; font-size: 15px; }
th, td { text-align: left; padding: .65rem .85rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 650; color: var(--ink); }
td { color: var(--muted); }

.section { padding: 2rem 0; border-top: 1px solid var(--rule); }
.meta { font-size: 14px; color: var(--muted); margin-bottom: 2rem; }

footer { border-top: 1px solid var(--rule); margin-top: 4rem; padding: 2rem 0 3rem; }
.footer-inner { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--muted); text-decoration: none; font-size: 15px; margin-right: 1.25rem; }
footer a:hover { color: var(--ink); }
.footer-legal { font-size: 14px; color: var(--muted); }

.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;
}
[hidden] { display: none !important; }

@media (max-width: 40rem) {
  .header-inner { height: auto; padding: 1rem 0; flex-direction: column; align-items: flex-start; gap: .75rem; }
  .nav { gap: 1rem; }
  .tool { padding: 1.25rem; }
  body { font-size: 16px; }
}
