/* MQS Tracker marketing site. Brand colors come from the logo's three stripes. */

:root {
  --brand-ink: #111418;
  --brand-blue: #38579e;
  --brand-green: #30ab61;

  --bg: #ffffff;
  --bg-alt: #f4f6fa;
  --surface: #ffffff;
  --border: #dde3ec;
  --text: #111418;
  --text-muted: #4d5869;
  --accent: #38579e;
  --accent-hover: #2d4682;
  --accent-text: #ffffff;
  --accent-soft: #e8edf7;
  --green: #1f8a4c;
  --green-soft: #e3f4ea;
  --warn: #9a6200;
  --warn-soft: #fbf0d9;
  --shadow: 0 1px 2px rgb(17 20 24 / 6%), 0 8px 24px rgb(17 20 24 / 8%);

  --radius: 12px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-ink: #eef1f6;
    --bg: #0f1216;
    --bg-alt: #151a21;
    --surface: #1a2029;
    --border: #2a3340;
    --text: #eef1f6;
    --text-muted: #a3adbd;
    --accent: #7d9ad8;
    --accent-hover: #9bb2e4;
    --accent-text: #0f1216;
    --accent-soft: #1f2a3d;
    --green: #5cc88a;
    --green-soft: #17301f;
    --warn: #e2b45c;
    --warn-soft: #33290f;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 35%);
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 32px; } }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--surface); padding: 8px 12px; border-radius: 6px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- Brand mark ---------- */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--brand-ink); text-decoration: none;
}
.brand:hover { color: var(--brand-ink); }
.brand svg { height: 26px; width: auto; }
.brand span {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px;
  font-weight: 650; font-size: 1rem; line-height: 1.2; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-text); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--text-muted); color: var(--text); }
.btn-sm { padding: 9px 14px; font-size: 0.95rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px;
}
.site-nav { display: none; gap: 28px; }
.site-nav a { color: var(--text-muted); text-decoration: none; font-weight: 550; font-size: 0.97rem; }
.site-nav a:hover { color: var(--text); }
/* Small desktops: the home page has eight links, so they sit closer. */
.site-nav a { white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions .sign-in { display: none; }
@media (min-width: 900px) {
  .site-nav { display: flex; }
  .header-actions .sign-in { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero { padding: 56px 0 72px; }
.hero .container { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) {
  .hero { padding: 88px 0 96px; }
  .hero .container { grid-template-columns: 1.05fr 1fr; gap: 56px; }
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 18px;
}
.eyebrow .stripes { display: inline-flex; gap: 3px; }
.eyebrow .stripes i { width: 4px; height: 14px; transform: skewX(-14deg); border-radius: 1px; }
.lede { font-size: 1.2rem; color: var(--text-muted); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.hero-note { font-size: 0.92rem; color: var(--text-muted); margin: 0; }

/* Unit record illustration */
.unit-card {
  margin: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); padding: 22px 22px 8px;
}
.unit-card header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.unit-card .label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); font-weight: 700; margin: 0; }
.unit-card .serial { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.15rem; font-weight: 700; margin: 2px 0 0; }
.unit-card .desc { color: var(--text-muted); font-size: 0.93rem; margin: 0; }
.status-pill {
  font-size: 0.8rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--green-soft); color: var(--green); white-space: nowrap;
}
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 12px;
  padding-bottom: 16px;
}
.timeline li::before {
  content: ""; position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px; background: var(--border);
}
.timeline li:last-child::before { display: none; }
.timeline .dot {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 800; color: #fff;
}
.dot.m { background: var(--brand-blue); }
.dot.q { background: var(--brand-green); }
.dot.s { background: #3b4350; }
@media (prefers-color-scheme: dark) { .dot.s { background: #5b6575; } }
.timeline .what { font-weight: 650; font-size: 0.97rem; margin: 3px 0 0; }
.timeline .meta { color: var(--text-muted); font-size: 0.86rem; margin: 0; }
.unit-caption { font-size: 0.82rem; color: var(--text-muted); margin: 12px 4px 0; text-align: center; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head p { font-size: 1.12rem; color: var(--text-muted); }

/* Screenshots: a browser window frame, and a phone */
.browser {
  margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.browser img { display: block; width: 100%; height: auto; }
.browser-bar {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px;
  background: var(--bg-alt); border-bottom: 1px solid var(--border);
}
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.browser-bar span {
  margin: 0 auto; padding: 2px 14px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border);
  font-size: 0.78rem; color: var(--text-muted); transform: translateX(-24px);
}
.phone {
  margin: 0 auto; width: min(300px, 80%); padding: 10px; border-radius: 36px;
  background: var(--brand-ink); box-shadow: var(--shadow);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 27px; }
.showcase { padding: 0 0 72px; }
.shot-caption { text-align: center; font-size: 0.9rem; color: var(--text-muted); margin: 16px 0 0; }

/* Tour */
.tour { display: grid; gap: 64px; }
.tour-row { display: grid; gap: 28px; align-items: center; }
@media (min-width: 960px) {
  .tour { gap: 88px; }
  .tour-row { grid-template-columns: 1fr 1.6fr; gap: 56px; }
  .tour-row:nth-child(even) .tour-text { order: 2; }
  .tour-phone { grid-template-columns: 1fr 1fr; }
}
.tour-text .letter {
  font-family: var(--font-display); font-weight: 800; font-size: 0.85rem;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px;
}
.tour-text .letter.m { color: var(--accent); }
.tour-text .letter.q { color: var(--green); }
.tour-text .letter.s { color: var(--text-muted); }
.tour-text > p { color: var(--text-muted); font-size: 1.05rem; }
.tour-text ul { margin: 0; padding: 0; list-style: none; }
.tour-text li { padding: 6px 0 6px 26px; position: relative; }
.tour-text li::before {
  content: ""; position: absolute; left: 2px; top: 13px; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}

/* Pillars */
.pillars { display: grid; gap: 20px; }
@media (min-width: 900px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; position: relative; overflow: hidden;
}
.pillar::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; }
.pillar.m::before { background: var(--brand-blue); }
.pillar.q::before { background: var(--brand-green); }
.pillar.s::before { background: var(--brand-ink); }
.pillar .letter {
  font-family: var(--font-display); font-weight: 800; font-size: 0.85rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px;
}
.pillar p { color: var(--text-muted); }
.pillar ul { margin: 0; padding: 0; list-style: none; }
.pillar li { padding: 7px 0 7px 26px; position: relative; border-top: 1px solid var(--border); font-size: 0.97rem; }
.pillar li::before {
  content: ""; position: absolute; left: 2px; top: 14px; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}

/* Flow */
.flow { display: grid; gap: 14px; counter-reset: step; list-style: none; margin: 0; padding: 0; }
@media (min-width: 900px) { .flow { grid-template-columns: repeat(5, 1fr); } }
.flow li {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 16px; counter-increment: step;
}
.flow li::before {
  content: counter(step); display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%; margin-bottom: 10px;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 0.9rem;
}
.flow h3 { font-size: 1.02rem; margin-bottom: 4px; }
.flow p { font-size: 0.92rem; color: var(--text-muted); margin: 0; }

/* Reports */
.reports-grid { display: grid; gap: 20px; }
@media (min-width: 720px) { .reports-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .reports-grid { grid-template-columns: repeat(3, 1fr); } }
.report-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 22px 14px; }
.report-group h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.report-group h3 small { font-size: 0.82rem; font-weight: 650; color: var(--text-muted); letter-spacing: 0; }
.report-group ul { margin: 0; padding: 0; list-style: none; }
.report-group li { padding: 6px 0; border-top: 1px solid var(--border); font-size: 0.94rem; }
.reports-note { margin-top: 24px; color: var(--text-muted); font-size: 0.95rem; }

/* Team / trust */
.facts { display: grid; gap: 20px; }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.fact h3 { margin-bottom: 6px; }
.fact p { color: var(--text-muted); margin: 0; }
.fact .icon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 14px;
}
.fact .icon svg { width: 22px; height: 22px; }

/* Pricing */
.plan {
  max-width: 760px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
  display: grid; overflow: hidden;
}
@media (min-width: 760px) { .plan { grid-template-columns: 1fr 1fr; } }
.plan-main { padding: 32px 28px; }
.plan-main h3 { font-size: 1.5rem; margin-bottom: 6px; }
.plan-main .billing { color: var(--text-muted); margin-bottom: 24px; }
.plan-main .btn { width: 100%; }
.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.price {
  position: relative; display: flex; flex-direction: column; gap: 2px;
  padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-alt);
}
.price-name { font-weight: 650; }
.price-amount { font-size: 2rem; font-weight: 750; line-height: 1.15; margin-top: 4px; }
.price-unit { font-size: 0.86rem; color: var(--text-muted); }
.price-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }
.price-badge {
  position: absolute; top: -10px; right: 12px; padding: 2px 8px; border-radius: 999px;
  background: var(--green-soft); color: var(--green); border: 1px solid var(--green); font-size: 0.74rem; font-weight: 700;
}
@media (max-width: 380px) { .prices { grid-template-columns: 1fr; } }
.plan-main .fine { font-size: 0.86rem; color: var(--text-muted); margin: 12px 0 0; }
.plan-list { padding: 32px 28px; background: var(--bg-alt); border-top: 1px solid var(--border); }
@media (min-width: 760px) { .plan-list { border-top: 0; border-left: 1px solid var(--border); } }
.plan-list ul { margin: 0; padding: 0; list-style: none; }
.plan-list li { padding: 8px 0 8px 28px; position: relative; }
.plan-list li::before {
  content: ""; position: absolute; left: 3px; top: 15px; width: 12px; height: 7px;
  border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg);
}

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-of-type { border-top: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-weight: 650; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.15s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: var(--text-muted); padding-right: 40px; }

/* CTA band */
.cta-band { padding: 72px 0; text-align: center; }
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { color: var(--text-muted); font-size: 1.1rem; max-width: 36em; margin: 0 auto 28px; }
.cta-band .hero-actions { justify-content: center; margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 48px; font-size: 0.93rem; color: var(--text-muted); }
.site-footer .container { display: grid; gap: 24px; }
@media (min-width: 760px) {
  .site-footer .container { grid-template-columns: minmax(260px, 1fr) minmax(0, 560px); align-items: start; }
  .site-footer .footer-links { justify-content: flex-end; }
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.site-footer p { margin: 10px 0 0; }

/* ---------- Docs (website/docs/, made by docs/user/make-docs.py) ---------- */
.site-nav a[aria-current="page"] { color: var(--text); }
.docs-layout { display: grid; gap: 24px; padding-top: 32px; padding-bottom: 72px; }
@media (min-width: 900px) { .docs-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; padding-top: 48px; } }
.docs-nav { font-size: 0.95rem; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
@media (min-width: 900px) { .docs-nav { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; border-bottom: 0; padding-bottom: 0; } }
.docs-nav-home { margin: 0 0 6px; font-weight: 700; }
.docs-nav-home a { color: var(--text); text-decoration: none; }
.docs-nav h2 { font-family: var(--font); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin: 18px 0 6px; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav li a { display: block; padding: 3px 0 3px 12px; border-left: 2px solid var(--border); color: var(--text-muted); text-decoration: none; }
.docs-nav li a:hover { color: var(--text); }
.docs-nav li a[aria-current="page"] { color: var(--text); font-weight: 650; border-left-color: var(--accent); }
.docs-article { max-width: 760px; min-width: 0; }
.docs-crumb { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 8px; }
.docs-crumb a { color: inherit; text-decoration: none; }
.docs-crumb a:hover { color: var(--text); text-decoration: underline; }
/* Phones: the article first, the contents after it. */
@media (max-width: 899px) { .docs-nav { order: 2; border-bottom: 0; border-top: 1px solid var(--border); padding: 24px 0 0; } }
.docs-article h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 20px; }
.docs-article h2 { font-size: 1.5rem; margin: 40px 0 10px; }
.docs-article h3 { font-size: 1.15rem; margin: 28px 0 8px; }
.docs-article ul { padding-left: 22px; margin: 0 0 1em; }
.docs-article li { margin: 6px 0; }
.docs-article ul ul { margin: 6px 0 0; }
.docs-article code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.9em; background: var(--bg-alt); border: 1px solid var(--border); padding: 1px 5px; border-radius: 5px; }
.doc-screen { margin: 24px 0 28px; }
.doc-screen a { display: block; }
.doc-screen img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.doc-screen figcaption { color: var(--text-muted); font-size: 0.92rem; margin-top: 10px; }
.docs-index { padding-top: 48px; padding-bottom: 72px; }
.docs-index h1 { font-size: clamp(2.2rem, 4.5vw, 3rem); }
.docs-index h2 { font-size: 1.4rem; margin: 40px 0 14px; }
.doc-cards { display: grid; gap: 14px; }
@media (min-width: 720px) { .doc-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .doc-cards { grid-template-columns: repeat(3, 1fr); } }
.doc-card { display: block; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color 0.15s; }
.doc-card:hover { border-color: var(--accent); color: var(--text); }
.doc-card h3 { color: var(--accent); margin-bottom: 6px; }
.doc-card p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* Product roadmap (made by docs/user/make-docs.py) */
.roadmap { padding-top: 48px; padding-bottom: 72px; }
.roadmap .docs-article { margin: 0 auto; }
.post-meta { color: var(--text-muted); margin: -8px 0 28px; }

/* Privacy policy and terms of service */
.legal { max-width: 800px; padding-top: 48px; padding-bottom: 72px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 6px; }
.legal .updated { color: var(--text-muted); font-size: 0.95rem; margin: 0 0 28px; }
.legal h2 { font-size: 1.35rem; margin: 40px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.legal h3 { font-size: 1.1rem; margin: 24px 0 8px; }
.legal ul { padding-left: 22px; margin: 0 0 1em; }
.legal li { margin: 6px 0; }
/* A linked section or item (#refunds) clears the sticky header, and is marked briefly on arrival. */
.legal [id] { scroll-margin-top: 88px; }
.legal li:target { background: var(--accent-soft); border-radius: 6px; box-shadow: 0 0 0 6px var(--accent-soft); animation: legal-target 2.5s ease-out 1s forwards; }
@keyframes legal-target { to { background: transparent; box-shadow: 0 0 0 6px transparent; } }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 0.95rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 10px; border: 1px solid var(--border); }
.legal th { background: var(--bg-alt); }
@media (max-width: 600px) { .legal table { display: block; overflow-x: auto; } }
