/* Palette: one neutral base, one restrained accent. Red/amber only for severity labels. */
:root {
  --bg: #f7f6f2;
  --bg-tint: #efede7;
  --surface: #ffffff;
  --border: #d9d6ce;
  --border-strong: #b9b5ab;
  --text: #1f2a33;
  --text-muted: #5b6670;
  --accent: #1f6f78;
  --accent-hover: #185a62;
  --accent-tint: #e3eeef;
  --sev-critical: #8b1e1e;
  --sev-high: #a3412a;
  --sev-medium: #8a6508;
  --sev-low: #3b6d3a;
  --radius: 6px;
  --container: 1080px;
  --narrow: 720px;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Charter", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Source Serif Pro", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 500; line-height: 1.2; letter-spacing: -0.005em; margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

.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;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: #fff;
  padding: 10px 16px; border-radius: var(--radius); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: var(--narrow); }
.narrow { max-width: var(--narrow); }

.eyebrow {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: var(--radius); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 0.98rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
}
.btn-sm { padding: 9px 14px; font-size: 0.9rem; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

.text-link { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--font-heading); font-weight: 600; font-size: 1.2rem; }
.brand:hover { color: var(--text); }
.brand-mark { width: 24px; height: 24px; color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { text-decoration: none; color: var(--text-muted); font-size: 0.93rem; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav ul a:hover { color: var(--text); }
.site-nav ul a.is-active { color: var(--text); border-bottom-color: var(--accent); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; color: var(--text); cursor: pointer; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { padding: 96px 0 72px; }
.hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-bottom: 24px; }
.lede { font-size: 1.15rem; color: var(--text-muted); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 32px; }

/* Sections */
.section { padding: 72px 0; border-top: 1px solid var(--border); }
.section-tint { background: var(--bg-tint); }
.page { padding: 96px 0; }
.section-title { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin-bottom: 28px; }
.page-title { font-size: clamp(1.9rem, 3.4vw, 2.5rem); margin-bottom: 20px; }
.page .lede { margin-bottom: 48px; }
.sub-title { font-family: var(--font-body); font-weight: 650; font-size: 1.05rem; margin: 36px 0 12px; }
.sub-title:first-child { margin-top: 0; }
.section-foot { margin-top: 40px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 56px; }
.align-start { align-items: start; }

.service-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.service-card h3 { font-size: 1.45rem; margin-bottom: 14px; }
.service-card p { color: var(--text); margin-bottom: 18px; }

.checklist { list-style: none; margin: 0 0 1em; padding: 0; }
.checklist li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.55em; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.step { border-top: 2px solid var(--border-strong); padding-top: 20px; }
.step-num { display: inline-block; font-family: var(--font-heading); font-size: 1.1rem; color: var(--accent); margin-bottom: 8px; }
.step h3 { font-size: 1.25rem; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 0.97rem; }

/* Methodology process list */
.process { list-style: none; margin: 0; padding: 0; counter-reset: process; display: grid; gap: 0; }
.process li {
  counter-increment: process; display: grid; grid-template-columns: 64px 220px 1fr; gap: 24px;
  padding: 28px 0; border-top: 1px solid var(--border);
}
.process li:last-child { border-bottom: 1px solid var(--border); }
.process li::before { content: counter(process, decimal-leading-zero); font-family: var(--font-heading); font-size: 1.3rem; color: var(--accent); line-height: 1.3; }
.process h3 { font-size: 1.3rem; }
.process p { color: var(--text); }

/* Tables */
.table-wrap { overflow-x: auto; margin-bottom: 48px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); font-size: 0.96rem; }
th, td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--border); }
thead th { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); background: var(--bg-tint); }
tbody th { font-weight: 600; white-space: nowrap; width: 1%; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
table.compact th, table.compact td { padding: 10px 14px; }
.two-col .table-wrap { margin-bottom: 16px; }

/* Sample report excerpt */
.report {
  margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; font-size: 0.95rem; box-shadow: 0 1px 2px rgba(31, 42, 51, 0.06);
}
.report-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.report-ref { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }
.report-title { font-family: var(--font-body); font-weight: 650; font-size: 1.1rem; line-height: 1.35; margin-bottom: 16px; }
.report-meta { display: grid; grid-template-columns: repeat(3, auto); gap: 16px 28px; margin: 0 0 20px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.report-meta dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 2px; }
.report-meta dd { margin: 0; font-family: var(--font-mono); font-size: 0.85rem; }
.report-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin: 18px 0 6px; }
.report-code {
  margin: 0; padding: 14px 16px; background: var(--bg-tint); border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.55; overflow-x: auto; white-space: pre;
}

.severity {
  display: inline-block; padding: 3px 10px; border-radius: 3px; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; color: #fff;
}
.severity-critical { background: var(--sev-critical); }
.severity-high { background: var(--sev-high); }
.severity-medium { background: var(--sev-medium); }
.severity-low { background: var(--sev-low); }

/* FAQ */
.faq-item { border-top: 1px solid var(--border); }
.faq-item:last-of-type { border-bottom: 1px solid var(--border); }
.faq-item summary {
  cursor: pointer; padding: 18px 36px 18px 0; position: relative;
  font-family: var(--font-heading); font-size: 1.2rem; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-item p { padding: 0 0 22px; max-width: 62ch; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.contact-list { margin: 32px 0 0; display: grid; gap: 14px; }
.contact-list div { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.contact-list dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 2px; }
.contact-list dd { margin: 0; }

.contact-form { display: grid; gap: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.92rem; font-weight: 600; }
.optional { font-weight: 400; color: var(--text-muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 11px 13px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint);
}
.field [aria-invalid="true"] { border-color: var(--sev-critical); }
.form-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-status { font-size: 0.92rem; color: var(--text-muted); margin: 0; }
.form-status.is-error { color: var(--sev-critical); }
.form-status.is-ok { color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; font-size: 0.9rem; color: var(--text-muted); }
.footer-inner p { margin: 0; }

/* Responsive */
@media (max-width: 900px) {
  .two-col, .three-col, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .process li { grid-template-columns: 48px 1fr; }
  .process li p { grid-column: 2; }
  .three-col { margin-top: 40px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 16px;
    padding: 8px 16px 24px; background: var(--bg); border-bottom: 1px solid var(--border);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 12px 0; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
  .site-nav ul a.is-active { border-bottom-color: var(--border); }
  .hero { padding: 56px 0 48px; }
  .section { padding: 56px 0; }
  .page { padding: 64px 0; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .service-card, .contact-form, .report { padding: 22px; }
  .report-meta { grid-template-columns: 1fr; gap: 10px; }
  tbody th { white-space: normal; width: auto; }
}
