/* JoinCheckup — Shared Stylesheet
   Mobile-first, system fonts, WCAG 2.1 AA contrast, no external dependencies. */

:root {
  --bg-page: #faf9f6;
  --bg-surface: #ffffff;
  --bg-subtle: #f2f4f6;
  --ink: #14212b;
  --ink-muted: #455563;
  --border: #d8dfe5;
  --border-strong: #b6c2cc;

  --accent: #0f4c5c;
  --accent-hover: #0a3642;
  --accent-soft: #eaf3f5;
  --accent-border: #b6d6de;

  /* Four inspection labels (consistent across entire site) */
  --label-found-bg: #e6f4ec;
  --label-found-border: #8ec9a6;
  --label-found-ink: #14532d;

  --label-notfound-bg: #eef1f4;
  --label-notfound-border: #bcc5cf;
  --label-notfound-ink: #374151;

  --label-risk-bg: #fef3c7;
  --label-risk-border: #eab308;
  --label-risk-ink: #78350f;

  --label-evidence-bg: #e0f2fe;
  --label-evidence-border: #7dd3fc;
  --label-evidence-ink: #0c4a6e;

  --focus-ring: #b45309;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20, 33, 43, 0.06);
  --shadow-md: 0 6px 20px rgba(20, 33, 43, 0.07);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --max-width: 1120px;
  --measure: 68ch;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.125rem; /* 18px readable body text */
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg-page);
}

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

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1.5px;
}

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  z-index: 1000;
  text-decoration: none;
}

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

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navigation */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

.brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  background: var(--bg-surface);
  color: var(--ink);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle:hover {
  background: var(--bg-subtle);
}

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem 1.5rem;
  box-shadow: var(--shadow-md);
}

.site-nav.is-open {
  display: block;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-list a {
  display: block;
  padding: 0.5rem 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-cta {
  margin-top: 0.65rem;
}

@media (min-width: 960px) {
  .nav-toggle {
    display: none;
  }
  .site-nav {
    display: flex;
    position: static;
    padding: 0;
    border: none;
    box-shadow: none;
    align-items: center;
    gap: 0.75rem;
  }
  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
  }
  .nav-list a {
    padding: 0.45rem 0.7rem;
    font-size: 0.96rem;
  }
  .nav-cta {
    margin-top: 0;
    margin-left: 0.35rem;
  }
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.85rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

p {
  margin-top: 0;
  margin-bottom: 1.15rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--ink-muted);
  max-width: 62ch;
}

.eyebrow {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

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

.small {
  font-size: 0.9375rem;
}

.vat-note {
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin-top: 0.35rem;
  margin-bottom: 0.9rem;
}

.meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  font-size: 0.95rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.35rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.btn-sm {
  padding: 0.52rem 0.95rem;
  font-size: 0.94rem;
}

/* Sections & Layout */
.section {
  padding: 3.25rem 0;
}

.section-alt {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-tight {
  padding: 2.25rem 0;
}

.hero {
  padding: 3rem 0 3.25rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.page-header {
  padding: 2.25rem 0 2rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.35rem;
  color: var(--border-strong);
}

.grid-2 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.grid-3 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.grid-4 {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 920px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Cards & Callouts */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.card-accent {
  border-top: 4px solid var(--accent);
}

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

.callout {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  margin: 1.5rem 0;
}

.callout-warn {
  background: var(--label-risk-bg);
  border: 1px solid var(--label-risk-border);
  border-left: 5px solid var(--label-risk-ink);
  color: var(--ink);
}

.evidence-banner {
  background: var(--bg-surface);
  border: 1.5px solid var(--accent-border);
  border-left: 6px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 760px) {
  .evidence-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }
}

/* Hero Actions & Inline Free Check */
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-top: 1.6rem;
  max-width: 720px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.inline-check-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.inline-check-form label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.inline-check-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

@media (min-width: 600px) {
  .inline-check-row {
    flex-direction: row;
  }
  .inline-check-row input {
    flex: 1;
  }
}

.micro-trust {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  margin-top: 1.25rem;
  margin-bottom: 0;
  font-weight: 500;
}

/* Four Label Chips (Text + Icon — never colour alone) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.3;
  border: 1.5px solid transparent;
  vertical-align: middle;
  white-space: nowrap;
}

.chip svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.chip-found {
  background: var(--label-found-bg);
  border-color: var(--label-found-border);
  color: var(--label-found-ink);
}

.chip-not-found {
  background: var(--label-notfound-bg);
  border-color: var(--label-notfound-border);
  color: var(--label-notfound-ink);
}

.chip-possible-risk {
  background: var(--label-risk-bg);
  border-color: var(--label-risk-border);
  color: var(--label-risk-ink);
}

.chip-needs-evidence {
  background: var(--label-evidence-bg);
  border-color: var(--label-evidence-border);
  color: var(--label-evidence-ink);
}

/* Pricing Cards */
.price-figure {
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
  margin: 0.4rem 0 0.2rem;
}

.price-term {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.check-list {
  padding-left: 1.25rem;
  margin: 0.85rem 0 1.25rem;
}

.check-list li {
  margin-bottom: 0.45rem;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  margin: 1.25rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.98rem;
}

th, td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

thead th {
  background: var(--bg-subtle);
  font-weight: 700;
  color: var(--ink);
}

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

/* Prose / Guides Layout */
.guide-layout {
  display: grid;
  gap: 2.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 960px) {
  .guide-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start;
  }
}

.toc-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

@media (min-width: 960px) {
  .toc-box {
    position: sticky;
    top: 5.5rem;
  }
}

.toc-box h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

.toc-box ol {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.9375rem;
}

.toc-box li {
  margin-bottom: 0.45rem;
}

.prose {
  max-width: var(--measure);
}

.prose h2 {
  margin-top: 2.25rem;
  padding-top: 0.5rem;
}

.prose h3 {
  margin-top: 1.5rem;
}

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

.prose li {
  margin-bottom: 0.45rem;
}

/* Sample Report Findings */
.finding-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.finding-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.finding-meta {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--ink-muted);
  background: var(--bg-page);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 0.85rem;
  overflow-wrap: anywhere;
}

.quote-box {
  border-left: 3px solid var(--border-strong);
  padding: 0.55rem 1rem;
  margin: 0.75rem 0;
  background: var(--bg-page);
  font-style: italic;
}

.template-box {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  margin: 1rem 0;
}

.template-partial {
  position: relative;
  overflow: hidden;
}

.template-fade {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--accent-soft);
  border: 1px dashed var(--accent-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

/* Forms */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: 640px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-weight: 700;
  font-size: 0.98rem;
}

.field-hint {
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin: 0;
}

input[type="text"],
input[type="url"],
input[type="email"],
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.72rem 0.85rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--ink);
  width: 100%;
}

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

.radio-group {
  display: grid;
  gap: 0.85rem;
}

.radio-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  cursor: pointer;
}

.radio-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.radio-card input {
  margin-top: 0.28rem;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
}

.checkbox-row {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.98rem;
}

.checkbox-row input {
  margin-top: 0.3rem;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.status-box {
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-surface);
  margin-top: 1.25rem;
}

.status-box.is-loading {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.status-box.is-error {
  border-color: #d97706;
  background: var(--label-risk-bg);
}

.status-box.is-success {
  border-color: var(--label-found-border);
  background: var(--label-found-bg);
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 78ch;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.35rem;
}

.faq-item summary {
  font-weight: 700;
  cursor: pointer;
  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.35rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

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

.faq-item p:last-child {
  margin-bottom: 0;
}

.faq-body {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  color: var(--ink-muted);
}

/* Footer */
.site-footer {
  background: #14212b;
  color: #e2e8f0;
  padding: 3.25rem 0 2.25rem;
  margin-top: 3rem;
}

.site-footer a {
  color: #d4e8ec;
  text-decoration: none;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  margin-bottom: 2.25rem;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.3fr repeat(3, 1fr);
  }
}

.footer-heading {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9fb3c4;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.95rem;
}

.footer-bottom {
  border-top: 1px solid #2b3c4a;
  padding-top: 1.5rem;
  font-size: 0.9375rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 1rem;
}

.tag-list li {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.65rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.hidden {
  display: none !important;
}

.cta-band {
  background: var(--accent);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 2rem;
}

.cta-band h2,
.cta-band p {
  color: #ffffff;
}

.cta-band a.btn-primary {
  background: #ffffff;
  color: var(--accent);
  border-color: #ffffff;
}

.cta-band a.btn-primary:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.cta-band a.btn-secondary {
  background: transparent;
  color: #ffffff;
  border-color: #ffffff;
}

.cta-band a.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

@media print {
  .site-header, .site-footer, .nav-toggle, .btn {
    display: none !important;
  }
  body {
    background: #ffffff;
    font-size: 11pt;
  }
}
