/* Bristlenose website — minimal functional CSS */

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

:root {
  /* color-scheme is set by site.css (:root + html); light-dark() below
     resolves per scheme and follows the theme toggle. Dark values mirror
     the tokens in assets/site.css so the index matches the docs. */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", Menlo, monospace;
  --max-width: 960px;
  --color-text: light-dark(#1a1a1a, #e6e7e9);
  --color-muted: light-dark(#666, #9ca3af);
  --color-border: light-dark(#e5e5e5, #2a2a2c);
  --color-bg: light-dark(#fff, #121214);
  --color-bg-alt: light-dark(#f8f8f8, #1a1a1d);
  --color-accent: light-dark(#2563eb, #6ba2f5);
}

body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
}

/* Nav */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1rem;
}
.nav-logo { font-weight: 600; text-decoration: none; color: var(--color-text); font-size: 1.1rem; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { text-decoration: none; color: var(--color-muted); }
.nav-links a:hover, .nav-links a.active { color: var(--color-text); }

/* Sections */
section { max-width: var(--max-width); margin: 0 auto; padding: 3rem 1rem; }

/* Hero */
.hero { text-align: center; padding-top: 4rem; }
.hero h1 { font-size: 2.4rem; line-height: 1.2; max-width: 700px; margin: 0 auto 1rem; }
.hero-subtitle { font-size: 1.15rem; color: var(--color-muted); max-width: 600px; margin: 0 auto 2rem; }
.hero-cta { display: flex; gap: 0.75rem; justify-content: center; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.btn { display: inline-block; padding: 0.75rem 1.5rem; border-radius: 6px; text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.btn-primary { background: var(--color-text); color: light-dark(#fff, #121214); }
.btn-secondary { border: 1px solid var(--color-border); color: var(--color-text); }
.btn-disabled { background: var(--color-bg-alt); color: var(--color-muted); border: 1px solid var(--color-border); cursor: not-allowed; user-select: none; }
/* Snap Store badge — height tied to the .btn box (font × line-height + vertical
   padding) so it matches the download button and tracks any change to it. */
.snap-badge { display: inline-flex; align-items: center; line-height: 0; }
.snap-badge img { display: block; width: auto; height: calc(0.95rem * 1.6 + 1.5rem); }
.hero-note { font-size: 0.85rem; color: var(--color-muted); }
.hero-note a { color: var(--color-muted); text-decoration: underline; }
.hero-note a:hover { color: var(--color-text); }

/* Video */
.video-section { text-align: center; }
.placeholder-box { background: var(--color-bg-alt); border: 2px dashed var(--color-border); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--color-muted); font-size: 0.9rem; }
.placeholder-video { max-width: 640px; margin: 0 auto; aspect-ratio: 16/9; }
.placeholder-screenshot { width: 100%; aspect-ratio: 16/10; }

/* Features */
.features { padding-top: 2rem; }
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; margin-bottom: 4rem; }
.feature-row-reverse .feature-text { order: 2; }
.feature-row-reverse .feature-image { order: 1; }
.feature-text h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.feature-text p { color: var(--color-muted); }

/* Story */
.story { text-align: center; }
.story h2 { font-size: 1.8rem; margin-bottom: 1rem; }
.story p { margin-bottom: 1rem; max-width: 640px; margin-left: auto; margin-right: auto; }
.story p:last-child { margin-bottom: 0; }

/* How it works */
.how-it-works { text-align: center; }
.how-it-works pre, .how-it-works .install-block { display: inline-block; text-align: left; margin-left: auto; margin-right: auto; }
.how-it-works .install-note { max-width: 640px; margin-left: auto; margin-right: auto; }
.how-it-works .pricing-card { display: inline-block; width: auto; max-width: none; text-align: center; }
.how-it-works h2 { font-size: 1.8rem; margin-bottom: 1.5rem; }

/* Terminal card — ghost-chrome treatment for the install snippet */
.pricing-card.terminal-card { padding: 0; overflow: hidden; text-align: left; }
.terminal-chrome {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 28px;
  padding: 0 8px;
  border-bottom: 1px solid var(--color-border);
}
.terminal-dots { display: inline-flex; gap: 6px; }
.terminal-dots .dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: transparent;
  border: 1px solid var(--color-border);
}
.terminal-title {
  grid-column: 2;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-muted);
  opacity: 0.7;
  letter-spacing: 0.02em;
}
.terminal-body {
  margin: 0;
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1;
  background: transparent;
  counter-reset: line;
  overflow-x: auto;
}
.terminal-body code { font-family: inherit; }
.terminal-body .line { counter-increment: line; display: block; padding-left: 2.25rem; position: relative; }
.terminal-body .line::before {
  content: counter(line);
  position: absolute;
  left: 0;
  width: 1.5rem;
  text-align: right;
  color: var(--color-muted);
  opacity: 0.45;
  user-select: none;
}
.terminal-body .prompt { color: var(--color-muted); opacity: 0.6; margin-right: 0.35rem; }
.terminal-body .cmd { color: #ff0000; }
.terminal-body .comment { color: var(--color-muted); opacity: 0.7; }
.steps { list-style: none; counter-reset: step; }
.steps li { counter-increment: step; margin-bottom: 1.5rem; padding-left: 2.5rem; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--color-bg-alt); border: 1px solid var(--color-border); text-align: center; line-height: 1.8rem; font-size: 0.85rem; font-weight: 600; }
.steps li strong { display: block; }
.steps li span { color: var(--color-muted); }

/* Privacy (homepage reassurance block — centred marketing) */
.privacy { text-align: center; }
.privacy h2 { font-size: 1.8rem; margin-bottom: 1rem; }
.privacy p { max-width: 640px; margin-left: auto; margin-right: auto; }

/* Text pages (privacy.html, support.html — left-aligned long-form) */
.text-page { max-width: 700px; margin: 0 auto; padding: 3rem 1rem; }
.text-page h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.text-page h2 { font-size: 1.4rem; margin-top: 2rem; margin-bottom: 0.75rem; }
.text-page p { margin-bottom: 1rem; }
.text-page ul { margin-bottom: 1rem; padding-left: 1.5rem; }
.text-page li { margin-bottom: 0.5rem; }

/* Providers */
.providers h2 { font-size: 1.8rem; margin-bottom: 1rem; }
.providers > p { color: var(--color-muted); margin-bottom: 1rem; }
.provider-list { list-style: none; }
.provider-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--color-border); }
.provider-list li:last-child { border-bottom: none; }

/* Pricing */
.pricing { text-align: center; }
.pricing h2 { font-size: 1.8rem; margin-bottom: 1.5rem; }
.pricing-card { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: 8px; padding: 2rem; max-width: 480px; margin: 0 auto; }
.pricing-main { font-size: 1.3rem; font-weight: 600; margin-bottom: 0.75rem; }
.pricing-detail { margin-bottom: 0.75rem; }
.pricing-free { font-size: 0.85rem; color: var(--color-muted); }

/* Newsletter */
.newsletter { text-align: center; }
.newsletter h2 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.newsletter > p { color: var(--color-muted); margin-bottom: 1.5rem; }
.substack-embed iframe { max-width: 100%; }

/* Footer */
.site-footer { max-width: var(--max-width); margin: 0 auto; padding: 2rem 1rem; border-top: 1px solid var(--color-border); 
  text-align: center
}
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 0.75rem; }
.footer-links a { text-decoration: none; color: var(--color-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--color-text); }
.footer-note { font-size: 0.82rem; color: var(--color-muted); }
.footer-note a { color: var(--color-muted); }

/* Manual layout */
.manual-layout { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
.manual-toc { position: sticky; top: 2rem; align-self: start; }
.manual-toc ul { list-style: none; }
.manual-toc li { margin-bottom: 0.4rem; }
.manual-toc a { text-decoration: none; color: var(--color-muted); font-size: 0.9rem; }
.manual-toc a:hover { color: var(--color-text); }
.manual-content { max-width: 700px; }
.manual-content section { padding: 2rem 0; }
.manual-content h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.manual-content h2 { font-size: 1.5rem; margin-top: 1rem; margin-bottom: 1rem; padding-top: 1rem; border-top: 1px solid var(--color-border); }
.manual-content section:first-child h2 { border-top: none; }
.manual-content h3 { font-size: 1.1rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.manual-content p { margin-bottom: 0.75rem; }
.manual-content ul, .manual-content ol { margin-bottom: 0.75rem; padding-left: 1.5rem; }
.manual-content li { margin-bottom: 0.3rem; }
.manual-content pre { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: 4px; padding: 0.75rem 1rem; overflow-x: auto; margin-bottom: 0.75rem; }
.manual-content code { font-family: var(--font-mono); font-size: 0.88rem; }
.manual-content p code { background: var(--color-bg-alt); padding: 0.15rem 0.35rem; border-radius: 3px; }

/* Tables */
.shortcuts-table, .commands-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: 0.92rem; }
.shortcuts-table th, .commands-table th { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 2px solid var(--color-border); font-weight: 600; }
.shortcuts-table td, .commands-table td { padding: 0.4rem 0.75rem; border-bottom: 1px solid var(--color-border); vertical-align: top; }
kbd { display: inline-block; padding: 0.15rem 0.4rem; font-family: var(--font-mono); font-size: 0.82rem; background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: 3px; line-height: 1; }

/* Changelog */
.changelog-entry { margin-bottom: 2rem; }
.changelog-entry h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.changelog-date { font-weight: 400; color: var(--color-muted); margin-left: 0.5rem; }
.changelog-entry ul { padding-left: 1.5rem; }
.changelog-entry li { margin-bottom: 0.3rem; font-size: 0.92rem; }

/* Responsive */
@media (max-width: 700px) {
  .hero h1 { font-size: 1.8rem; }
  .feature-row { grid-template-columns: 1fr; gap: 1.5rem; }
  .feature-row-reverse .feature-text { order: 1; }
  .feature-row-reverse .feature-image { order: 2; }
  .manual-layout { grid-template-columns: 1fr; }
  .manual-toc { position: static; }
  .hero-cta { flex-direction: column; align-items: center; }
}

/* ── How-to pages (docs/how-to/) ─────────────────────────────── */
/* Single-column guide. Reuses .manual-content typography (the page sets
   both classes); this adds only the how-to chrome — back link, lead,
   kicker, callouts (blockquotes), tables, and the index listing. */
.howto-content { max-width: 740px; margin: 0 auto; padding: 1.5rem 1rem 5rem; }
.howto-back { margin-bottom: 1.25rem; font-size: 0.9rem; }
.howto-back a { color: var(--color-muted); text-decoration: none; }
.howto-back a:hover { color: var(--color-text); }
.howto-content .kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; font-weight: 700; color: var(--color-muted); margin: 0; }
.howto-content .lead { font-size: 1.15rem; color: var(--color-text); margin: 0.4rem 0 1.5rem; }
.howto-content blockquote { border: 1px solid var(--color-border); background: var(--color-bg-alt); border-radius: 8px; padding: 1rem 1.25rem; margin: 1.5rem 0; color: var(--color-text); }
.howto-content blockquote p { margin: 0.5rem 0; }
.howto-content blockquote p:first-child { margin-top: 0; }
.howto-content blockquote p:last-child { margin-bottom: 0; }
.howto-content table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.92rem; }
.howto-content th, .howto-content td { text-align: left; padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.howto-content th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text); }
.howto-content td { color: var(--color-muted); }
.howto-content hr { border: none; border-top: 1px solid var(--color-border); margin: 2.5rem 0 1.25rem; }
.howto-content > p:last-child { color: var(--color-muted); font-size: 0.85rem; }
.howto-index { list-style: none; padding: 0; margin: 1.5rem 0; }
.howto-index li { padding: 1rem 0; border-bottom: 1px solid var(--color-border); }
.howto-index li a { display: block; font-size: 1.05rem; }
.howto-index li span { display: block; color: var(--color-muted); font-size: 0.92rem; margin-top: 0.2rem; }
