/* Tokens copied from uobo.ca (Framer, the source of truth for the brand) via sites/car-tools/src/app/globals.css.
   brand #3C82F3 is for large headings and fills. brand-deep is the same hue, darker, so link text and buttons pass WCAG AA on white. */
@font-face { font-family: "Satoshi"; src: url("/assets/fonts/Satoshi-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/assets/fonts/Satoshi-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/assets/fonts/Satoshi-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --page: #ffffff;
  --ink: #0f172a;
  --muted: #526a87;
  --line: #e2e8f0;
  --field: #7c8da6;
  --brand: #3c82f3;
  --brand-deep: #2b6ad0;
  --brand-press: #1f58bd;
  --soft: #eff5fe;
  --band: #fafbfc;
  --warn: #8f5200;
  --warn-soft: #fff0d3;
  --radius: 10px;
  --font: "Satoshi", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-w: 16rem;
  --toc-w: 14rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.65; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
a { color: var(--brand-deep); text-underline-offset: 0.15em; }
a:hover { color: var(--brand-press); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.2; }
h1, h2 { color: var(--brand); }
h3 { color: var(--ink); }
img { max-width: 100%; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 50; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

.draft-banner { background: var(--warn-soft); color: var(--warn); padding: 0.6rem 1rem; text-align: center; font-size: 0.9rem; border-bottom: 1px solid #f3d9a0; }
.draft-banner a { color: var(--warn); font-weight: 700; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); background: var(--page); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.brand-light { font-weight: 500; color: var(--muted); }
.top-links { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.top-links a { text-decoration: none; }
.top-links a:hover { text-decoration: underline; }

.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; font-weight: 700; color: var(--muted); margin: 0 0 0.5rem; }

/* Hub */
.hub { max-width: 68rem; margin: 0 auto; padding: 0 1rem 3rem; }
.hero { padding: 3rem 0 1.5rem; }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); max-width: 22ch; margin: 0 0 1rem; }
.lead-in { font-size: 1.15rem; color: var(--muted); max-width: 46rem; margin: 0 0 1.75rem; }
.search { max-width: 40rem; position: relative; }
.search label { display: block; font-weight: 500; margin-bottom: 0.35rem; }
.search input { width: 100%; padding: 0.8rem 1rem; font: inherit; border: 1.5px solid var(--field); border-radius: var(--radius); background: #fff; color: var(--ink); }
.search-results { margin-top: 0.5rem; }
.search-results ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.search-results li + li { border-top: 1px solid var(--line); }
.search-results a { display: block; padding: 0.7rem 1rem; text-decoration: none; color: var(--ink); }
.search-results a:hover { background: var(--soft); }
.search-results small { display: block; color: var(--muted); }
.search-results mark { background: #dbe8fc; color: inherit; padding: 0 0.1em; border-radius: 2px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin: 1.5rem 0 2.5rem; }
.card { background: var(--band); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.card h2 { font-size: 1.2rem; margin: 0 0 0.35rem; }
.card p { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.95rem; }
.card ul { margin: 0; padding-left: 1.1rem; }
.card li { margin: 0.2rem 0; }

.all-docs h2, .how h2, .promises h2 { font-size: 1.5rem; }
.promises { margin: 0 0 2.5rem; }
.promises dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem 2rem; margin: 0; }
.promises div { border-top: 2px solid var(--brand); padding-top: 0.75rem; min-width: 0; }
.promises dt { font-weight: 700; margin-bottom: 0.25rem; }
.promises dd { margin: 0; color: var(--muted); }
.row-summary { display: block; color: var(--muted); font-size: 0.9rem; }
.how ul { padding-left: 1.2rem; max-width: 46rem; }
.how li { margin: 0.5rem 0; }

/* Document layout */
.layout { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr) var(--toc-w); gap: 2.5rem; max-width: 84rem; margin: 0 auto; padding: 2rem 1rem 4rem; }
.docs-nav, .toc { position: sticky; top: 1rem; align-self: start; max-height: calc(100vh - 2rem); overflow: auto; font-size: 0.93rem; }
.nav-details > summary { cursor: pointer; font-weight: 700; padding: 0.25rem 0; list-style: none; }
.nav-details > summary::-webkit-details-marker { display: none; }
.nav-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--muted); margin: 1rem 0 0.35rem; }
.docs-nav ul, .toc ul { list-style: none; margin: 0; padding: 0; }
.docs-nav a, .toc a { display: block; padding: 0.3rem 0.6rem; border-left: 2px solid var(--line); color: var(--ink); text-decoration: none; }
.docs-nav a:hover, .toc a:hover { background: var(--soft); }
.docs-nav a[aria-current="page"], .toc a[aria-current="true"] { border-left-color: var(--brand); color: var(--brand-deep); font-weight: 700; background: var(--soft); }

.doc { min-width: 0; }
.doc h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0 0 0.6rem; }
.doc-summary { font-size: 1.1rem; color: var(--muted); margin: 0 0 0.75rem; max-width: 46rem; }
.doc-meta { font-size: 0.88rem; color: var(--muted); margin: 0 0 0.75rem; }
.doc-actions { margin: 0 0 1.5rem; }
.btn-quiet { font: inherit; font-size: 0.9rem; font-weight: 500; padding: 0.45rem 0.9rem; border: 1.5px solid var(--field); border-radius: var(--radius); background: #fff; color: var(--ink); cursor: pointer; }
.btn-quiet:hover { background: var(--soft); }

.prose { max-width: 46rem; }
.prose h2 { font-size: 1.5rem; margin: 2.5rem 0 0.75rem; }
.prose h3 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }
.prose p, .prose li { overflow-wrap: anywhere; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin: 0.3rem 0; }
.prose blockquote { margin: 1.25rem 0; padding: 0.9rem 1.1rem; background: var(--soft); border-left: 4px solid var(--brand); border-radius: 0 var(--radius) var(--radius) 0; }
.prose blockquote > :first-child { margin-top: 0; }
.prose blockquote > :last-child { margin-bottom: 0; }
.anchor { margin-left: 0.4rem; font-weight: 400; text-decoration: none; opacity: 0; color: var(--muted); }
h2:hover .anchor, h3:hover .anchor, .anchor:focus { opacity: 1; }
.versions { max-width: 46rem; margin-top: 3rem; }
.versions h2 { font-size: 1.2rem; }

.table-wrap { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); }
th { background: var(--band); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

/* Open markers: anything still to fill in or confirm. Only exist in the draft. */
mark.open { background: var(--warn-soft); color: var(--warn); padding: 0.05em 0.35em; border-radius: 4px; font-size: 0.92em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.site-footer { border-top: 1px solid var(--line); background: var(--band); padding: 1.5rem 1rem; color: var(--muted); font-size: 0.9rem; text-align: center; }
.site-footer p { margin: 0.25rem 0; }

@media (max-width: 1100px) {
  .layout { grid-template-columns: var(--nav-w) minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-top: 1rem; }
  .docs-nav { position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem 0.9rem; background: var(--band); }
  .top-links a:first-child { display: none; }
  .hero { padding-top: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .docs-nav, .toc, .doc-actions, .skip, .site-footer, .anchor { display: none !important; }
  .draft-banner { border: 1px solid #999; background: #fff; color: #000; }
  .layout { display: block; padding: 0; }
  body { font-size: 11pt; }
  h1, h2 { color: #000; }
  a { color: #000; text-decoration: none; }
  .table-wrap { overflow: visible; border: 0; }
  mark.open { background: none; color: #000; border: 1px dashed #666; }
}
