/* JLMG Themes documentation: brand navy and teal from jlmgsolutions.com on a light reading surface */
:root {
  --navy-deep: #0A1228;
  --navy: #0F1729;
  --navy-light: #1E2A4D;
  --teal: #00C9A7;
  --teal-ink: #00735f;          /* teal for text and links on light backgrounds (5.4:1) */
  --bg: #ffffff;
  --surface: #f5f7fa;
  --text: #1b2333;
  --text-muted: #556070;
  --border: #e2e6ec;
  --radius: 10px;
  --container: 1120px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--teal-ink); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--navy); }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin: 0 0 0.75rem; letter-spacing: -0.02em; }
h2 { font-size: 1.6rem; margin: 2.75rem 0 0.75rem; letter-spacing: -0.01em; scroll-margin-top: 88px; }
h3 { font-size: 1.15rem; margin: 1.75rem 0 0.5rem; scroll-margin-top: 88px; }
p, ul, ol { margin: 0 0 1rem; }
li + li { margin-top: 0.3rem; }
code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.875em; background: var(--surface); border: 1px solid var(--border); padding: 0.1em 0.35em; border-radius: 4px; }
.container { width: min(var(--container), 100% - 2rem); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0.5rem; background: var(--teal); color: var(--navy-deep); padding: 0.5rem 1rem; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 0.5rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--navy-deep); border-bottom: 1px solid var(--navy-light); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand__mark { width: 30px; height: 30px; border-radius: 8px; background: var(--teal); color: var(--navy-deep); display: grid; place-items: center; font-size: 0.8rem; font-weight: 800; }
.brand__sub { font-weight: 500; color: rgba(255, 255, 255, 0.7); }
.site-nav ul { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav li + li { margin-top: 0; }
.site-nav a { display: block; color: rgba(255, 255, 255, 0.82); text-decoration: none; padding: 0.5rem 0.75rem; border-radius: 8px; font-size: 0.95rem; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; background: var(--navy-light); }
@media (max-width: 720px) {
  .site-header__inner { flex-direction: column; align-items: flex-start; padding-block: 0.75rem; }
  .site-nav a { padding: 0.4rem 0.6rem; }
}

/* Page hero */
.page-hero { background: linear-gradient(160deg, var(--navy-deep), var(--navy-light)); color: #fff; padding: 3.5rem 0 3rem; }
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255, 255, 255, 0.82); max-width: 62ch; font-size: 1.1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; font-weight: 700; color: var(--teal); margin-bottom: 0.75rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 44px; padding: 0.65rem 1.25rem; border-radius: 8px; font-weight: 600; font-size: 0.95rem; text-decoration: none; border: 2px solid var(--teal); background: var(--teal); color: var(--navy-deep); cursor: pointer; font-family: inherit; }
.button:hover { background: #1EDBBD; border-color: #1EDBBD; color: var(--navy-deep); }
.button--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.button--ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: #fff; }
.button[disabled] { opacity: 0.6; cursor: progress; }

/* Layout with table of contents */
.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 3rem; padding: 2.5rem 0 4rem; }
.toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: 0.92rem; }
.toc p { font-weight: 700; color: var(--navy); margin-bottom: 0.5rem; }
.toc ul { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border); }
.toc li + li { margin-top: 0; }
.toc a { display: block; padding: 0.3rem 0 0.3rem 0.9rem; color: var(--text-muted); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--teal-ink); border-left-color: var(--teal); }
.doc-content { max-width: 76ch; }
.doc-content > h2:first-child { margin-top: 0; }
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .toc { position: static; max-height: none; background: var(--surface); padding: 1rem; border-radius: var(--radius); }
}
.page-body { padding: 2.5rem 0 4rem; }
.page-body .narrow { max-width: 76ch; }

/* Callouts, cards, tables */
.note { background: var(--surface); border-left: 4px solid var(--teal); padding: 0.9rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 1.25rem; }
.note p:last-child { margin-bottom: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin: 1.5rem 0 2rem; }
.card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; background: #fff; }
.card h2, .card h3 { margin-top: 0; }
.card p { color: var(--text-muted); }
.card--feature { border-color: var(--teal); box-shadow: 0 8px 30px rgba(10, 18, 40, 0.08); }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal-ink); background: #e5f8f4; padding: 0.2rem 0.55rem; border-radius: 999px; }
table { width: 100%; border-collapse: collapse; margin: 0 0 1.25rem; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface); color: var(--navy); font-weight: 600; }
.table-wrap { overflow-x: auto; }

/* Sections reference and FAQ use <details> */
details { border: 1px solid var(--border); border-radius: var(--radius); margin: 0 0 0.75rem; background: #fff; }
details[open] { box-shadow: 0 6px 24px rgba(10, 18, 40, 0.06); }
summary { cursor: pointer; padding: 1rem 1.2rem; font-weight: 600; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.3rem; line-height: 1; color: var(--teal-ink); flex-shrink: 0; }
details[open] > summary::after { content: '\2212'; }
summary .summary-meta { font-weight: 400; color: var(--text-muted); font-size: 0.9rem; margin-left: auto; }
.details-body { padding: 0 1.2rem 1.1rem; }
.settings-list { columns: 2; column-gap: 2rem; padding-left: 1.1rem; font-size: 0.93rem; }
.settings-list li { break-inside: avoid; }
@media (max-width: 640px) { .settings-list { columns: 1; } }
.muted { color: var(--text-muted); }

/* Contact form */
.form { display: grid; gap: 1rem; max-width: 640px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.35rem; color: var(--navy); }
.field .hint { display: block; font-weight: 400; color: var(--text-muted); font-size: 0.85rem; }
.field input, .field select, .field textarea { width: 100%; font: inherit; color: var(--text); padding: 0.7rem 0.85rem; border: 1px solid #b8c0cc; border-radius: 8px; background: #fff; min-height: 44px; }
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(0, 201, 167, 0.45); border-color: var(--teal-ink); }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5rem; font-weight: 600; }
.form-status--ok { color: #0f6b3a; }
.form-status--error { color: #a3261e; }

/* Footer */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, 0.72); padding: 2.5rem 0; font-size: 0.92rem; }
.site-footer a { color: #fff; }
.site-footer__inner { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer li + li { margin-top: 0; }
