/* chrome.css — the site's shared shell: sticky top bar, breadcrumb, footer.
 *
 * There is no build step, so the "component" is this stylesheet plus one block
 * of markup pasted identically on every page (see any page's <header class="bar">
 * and <footer class="site">). Change the markup on all of them at once; the
 * styling changes here once.
 *
 * Every page links this BEFORE its own styles, so the tokens below are defaults
 * a page overrides simply by declaring its own. The one knob a page is expected
 * to set is --column: the width of its text column, so the bar's wordmark and
 * the footer line up with the page's own left edge. */

:root {
  --column: 740px;                      /* tools.css pages: 780px main, 20px padding */
  --bar: rgba(255, 255, 255, .82);
  --hairline: #e5e5e7;
  --text: #1d1d1f;
  --muted: #86868b;
  --accent: #0A8C82;
  --accent-text: #0B847C;
  --on-accent: #fff;
  --accent-soft: rgba(10, 140, 130, .07);
  --accent-edge: rgba(10, 140, 130, .22);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bar: rgba(0, 0, 0, .72);
    --hairline: #2c2c2e;
    --text: #f5f5f7;
    --accent: #2DD4C4;
    --accent-text: #2DD4C4;
    --on-accent: #000;
    --accent-soft: rgba(45, 212, 196, .10);
    --accent-edge: rgba(45, 212, 196, .30);
  }
}

/* ── Top bar ───────────────────────────────────────────────────────────── */
/* The "Get the app" pill lives here so the app is discoverable at the moment a
   result appears; the app card at the foot of each page sits below the
   explainer, tables and FAQ, where someone who came from a search, solved
   their pace and left never scrolled. */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: .45rem max(20px, calc((100% - var(--column)) / 2));
  background: var(--bar);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  backdrop-filter: saturate(1.4) blur(18px);
  border-bottom: 1px solid var(--hairline);
}
.bar .wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* touch target floor */
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--accent-text);
}
.bar .wordmark:hover { text-decoration: none; }
.bar .nav {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* touch target floor */
  color: var(--muted);
  font-size: .92rem;
  font-weight: 600;
}
.bar .nav:hover { color: var(--text); text-decoration: none; }
.bar .get {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* touch target floor */
  margin-left: auto;
  padding: .35rem 1rem;
  border-radius: 99px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: .9rem;
  transition: opacity .15s ease, transform .15s ease;
}
.bar .get:hover { text-decoration: none; opacity: .92; transform: translateY(-1px); }

/* ── Breadcrumb ────────────────────────────────────────────────────────── */
.top { margin-bottom: 2rem; font-size: .95rem; color: var(--muted); }
.top a { color: var(--muted); }
.top a:hover { color: var(--accent-text); text-decoration: none; }

/* ── Footer ────────────────────────────────────────────────────────────── */
/* Two rows, not one packed line: the site's five places as a nav, then a
   quiet colophon. The landing page adds a third row of calculator links
   between them (it is the page inbound links land on). */
footer.site {
  margin-top: 4rem;
  padding: 1.75rem 0 0;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: .9rem;
}
footer.site .site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.5rem;
  margin: 0 0 .9rem;
}
footer.site .site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* touch target floor */
  color: var(--text);
  font-weight: 600;
}
footer.site .site-nav a:hover { color: var(--accent-text); text-decoration: none; }
footer.site .site-nav.tools a { color: var(--muted); font-weight: 500; font-size: .88rem; }
footer.site .colophon { margin: 0; }
footer.site .colophon a { color: var(--muted); }
footer.site .colophon a:hover { color: var(--accent-text); }
footer.site.center { text-align: center; }
footer.site.center .site-nav { justify-content: center; }

/* ── Shared components ─────────────────────────────────────────────────── */
/* FAQ as native disclosures: no JS, keyboard- and VoiceOver-friendly. Used by
   every calculator page's Questions section and by /support. */
.qa { border: 1px solid var(--hairline); border-radius: 12px; margin: 0 0 .6rem; }
.qa[open] { border-color: var(--accent-edge); }
.qa summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1.1rem;
  font-weight: 600;
  border-radius: 12px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--accent-text);
  border-bottom: 2px solid var(--accent-text);
  transform: rotate(45deg);
  transition: transform .2s ease;
  margin-top: -4px;
}
.qa[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.qa p, .qa ul { margin: 0 0 .9rem; padding-left: 1.1rem; padding-right: 1.1rem; }
.qa ul { padding-left: 2.3rem; }

/* The accent-tinted callout: a page's lead box (privacy's summary, the
   whitepaper's abstract, support's contact card). */
.callout {
  border: 1px solid var(--accent-edge);
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  margin: 0 0 1.5rem;
}
.callout p { margin: 0 0 .75rem; }
.callout p:last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
