/*
 * Longhaul website (C7.1, restyled in C7.1g). The colors follow the app's
 * palette (C7.1e) and the visitor's light or dark setting. The CSP allows
 * only this stylesheet and the site's own images: no inline styles, no
 * scripts, no web fonts.
 */
:root {
  --bg: #f6f8fa;
  --bg-raised: #ffffff;
  --bg-sunken: #eef1f5;
  --card: #ffffff;
  --fg: #0f141c;
  --fg-2: #364152;
  --muted: #556070;
  --line: #d0d7de;
  --line-soft: #e5e9f0;
  --accent: #1850e0;
  --accent-soft: #e8f0fe;
  --accent-2: #6938d4;
  --green: #136c3e;
  --green-soft: #e6f6ed;
  --red: #c42828;
  --red-soft: #fdecec;
  --btn: #1850e0;
  --btn-hover: #1442b8;
  --btn-fg: #ffffff;
  --glow: rgba(24, 80, 224, 0.10);
  --shadow: 0 1px 2px rgba(15, 20, 28, 0.06), 0 8px 24px -12px rgba(15, 20, 28, 0.12);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d11;
    --bg-raised: #11141b;
    --bg-sunken: #0e1116;
    --card: #151922;
    --fg: #f0f3f8;
    --fg-2: #b4bdcb;
    --muted: #8a94a6;
    --line: #262d3d;
    --line-soft: #1b202c;
    --accent: #58a6ff;
    --accent-soft: #102238;
    --accent-2: #b88bff;
    --green: #3fb97c;
    --green-soft: #0e261b;
    --red: #f87171;
    --red-soft: #2a1316;
    --btn: #2563eb;
    --btn-hover: #1d4fc4;
    --btn-fg: #ffffff;
    --glow: rgba(88, 166, 255, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 12px 32px -16px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* Short pages keep the footer at the bottom of the window */
body { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
main.wrap { flex: 1 0 auto; width: 100%; box-sizing: border-box; }
a { color: var(--accent); text-underline-offset: 2px; }
h1 { font-size: 2.6rem; line-height: 1.12; letter-spacing: -0.025em; margin: 64px 0 16px; }
h2 { font-size: 1.6rem; line-height: 1.25; letter-spacing: -0.015em; margin: 72px 0 16px; }
h3 { font-size: 1.08rem; line-height: 1.35; margin: 0 0 8px; }
p, ul, ol { margin: 0 0 14px; }
li { margin: 4px 0; }
strong { font-weight: 600; }
code {
  font: 0.88em var(--mono);
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  overflow-wrap: anywhere;
}
.lead { font-size: 1.2rem; color: var(--fg-2); max-width: 680px; }
.muted { color: var(--muted); font-size: 0.92rem; }
.prose { max-width: 760px; }
svg.icon { width: 20px; height: 20px; flex: none; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.08rem; color: var(--fg); text-decoration: none; }
.brand img { width: 26px; height: 26px; display: block; }
.site-header nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-header nav a:not(.btn) { color: var(--fg-2); text-decoration: none; font-size: 0.93rem; padding: 6px 10px; border-radius: 6px; }
.site-header nav a:not(.btn):hover { color: var(--fg); background: var(--bg-sunken); }
.site-header nav a[aria-current="page"] { color: var(--fg); background: var(--bg-sunken); }
.site-header nav .btn { margin-left: 8px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--btn);
  color: var(--btn-fg);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 20px;
}
.btn:hover { background: var(--btn-hover); }
.btn:focus-visible, .site-header nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-small { padding: 6px 14px; font-size: 0.9rem; }
.btn-secondary { background: var(--bg-raised); color: var(--fg); border-color: var(--line); }
.btn-secondary:hover { background: var(--bg-sunken); }
.btn svg.icon { width: 18px; height: 18px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 12px; }

/* Home hero */
.hero { text-align: center; padding: 24px 0 8px; position: relative; isolation: isolate; }
.hero::before {
  content: "";
  position: absolute;
  inset: -80px -20px auto;
  height: 420px;
  background: radial-gradient(60% 60% at 50% 30%, var(--glow), transparent 70%);
  z-index: -1;
}
.hero h1 { font-size: 3.4rem; margin-top: 72px; }
.hero .accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead { margin: 0 auto; }
.hero .actions { justify-content: center; }

/* Section headings with a small label above */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 28px; }
.section-head h2 { margin-top: 88px; }

/* Cards and grids */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 20px 0; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }
.card p { color: var(--fg-2); }
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  margin-bottom: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}
.card-icon.red { background: var(--red-soft); color: var(--red); }
.card-icon.green { background: var(--green-soft); color: var(--green); }
.card-problem { border-top: 3px solid var(--red); }
.card-answer { border-top: 3px solid var(--green); }

/* Numbered steps: a grid of cards on the home and download pages */
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.steps li {
  counter-increment: step;
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  color: var(--fg-2);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: inline-block;
  font: 600 0.8rem var(--mono);
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 2px 8px;
  margin-bottom: 12px;
  display: block;
  width: max-content;
}

/* Numbered steps as a list, for the longer setup guide */
.steps-list { counter-reset: step; list-style: none; padding: 0; margin: 24px 0; }
.steps-list li {
  counter-increment: step;
  position: relative;
  margin: 0 0 10px;
  padding: 16px 20px 16px 64px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--fg-2);
}
.steps-list li strong { color: var(--fg); }
.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 15px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 600 0.9rem var(--mono);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* A list with check marks */
.checks { list-style: none; padding: 0; margin: 0 0 16px; }
.checks li { position: relative; padding-left: 32px; margin: 10px 0; color: var(--fg-2); }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green-soft);
}
.checks li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  width: 5px;
  height: 9px;
  border: solid var(--green);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* A panel that sets a block apart: requirements, the connector, calls to action */
.panel {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 32px;
  margin: 24px 0;
}
.panel h2 { margin-top: 0; }
.panel .muted:last-child { margin-bottom: 0; }
.cta { text-align: center; margin-top: 88px; padding: 48px 24px; position: relative; overflow: hidden; }
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 50% 0%, var(--glow), transparent 70%);
}
.cta > * { position: relative; }
.cta img { width: 56px; height: 56px; }
.cta .actions { justify-content: center; }

/* Pricing */
.plan { display: flex; flex-direction: column; }
.plan h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.price { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.02em; margin: 4px 0 8px; color: var(--fg); }
.price .muted { font-size: 1rem; font-weight: 400; letter-spacing: 0; }
.plan-featured { border-color: var(--accent); }

/* Download */
.download-card { display: flex; flex-direction: column; gap: 12px; }
.download-card .btn { justify-content: center; }

/* Legal pages and release notes */
.legal { max-width: 760px; margin: 0 auto; }
.legal h1 { font-size: 2.2rem; }
.legal h2 { font-size: 1.25rem; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.legal p, .legal li { color: var(--fg-2); }
.legal strong { color: var(--fg); }
.table { overflow-x: auto; margin: 0 0 16px; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--bg-sunken); }

/* Footer */
.site-footer { border-top: 1px solid var(--line-soft); margin-top: 96px; padding: 32px 0 48px; color: var(--muted); font-size: 0.88rem; background: var(--bg-raised); }
.site-footer .footer-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--fg); }
.site-footer .brand { font-size: 0.98rem; }
.site-footer .brand img { width: 22px; height: 22px; }
.site-footer p { max-width: 720px; margin: 0; }

.prose-center { max-width: 760px; margin-left: auto; margin-right: auto; margin-top: 88px; }

/* Page headings and blocks on the inner pages */
.page-head { max-width: 760px; margin-bottom: 32px; }
.page-head .lead { margin-bottom: 0; }
.plans { max-width: 760px; }
.prose-block { margin-top: 24px; }
.panel h2 + p { margin-top: 0; }
.download-panel { max-width: 760px; }
.download-panel .actions { margin-top: 0; }
.after-steps { margin-top: 20px; color: var(--fg-2); }
#connector { scroll-margin-top: 80px; margin-top: 40px; }
/* Connector screenshots (C7.1k): never wider than the panel, never upscaled */
.shots li { margin-bottom: 20px; }
.shots img { display: block; max-width: 100%; height: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; }
/* Setup video (C7.1m): the panel's width, never upscaled */
.setup-video { margin: 0 0 32px; }
.setup-video video { display: block; width: 100%; height: auto; background: var(--bg-sunken); border: 1px solid var(--line); border-radius: 10px; }
.setup-video figcaption { margin-top: 10px; color: var(--muted); font-size: 0.92rem; }
.features { margin-top: 56px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header { position: static; }
  h1 { font-size: 2rem; margin-top: 40px; }
  h2 { margin-top: 56px; }
  .hero h1 { font-size: 2.3rem; margin-top: 44px; }
  .section-head h2 { margin-top: 64px; }
  .site-header nav a:not(.btn) { padding: 6px 8px; }
  .site-header nav .btn { margin-left: 0; }
  .panel { padding: 22px 20px; }
  .card { padding: 20px; }
  .steps-list li { padding: 14px 16px 14px 58px; }
  .steps-list li::before { left: 14px; }
}
