/* Parent-document styles (hero, content pages, ad slots). The app iframe has
   its own stylesheet — see app.css. */

:root {
  --ink: #16202b;
  --muted: #5d6b7a;
  --line: #dde3ea;
  --soft: #f5f7fa;
  --brand: #1c5d99;
  --bad: #b3261e;
  --radius: 8px;
  /* Prose stays at a readable measure; the tool is a data grid and gets the
     screen. Desktop-first — carriers reconcile these files on a laptop. */
  --wrap: 1140px;
  --wrap-tool: 1720px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: var(--wrap-tool); }

a { color: var(--brand); }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }

/* -- header / footer ------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 62px; }
.brand { font-size: 1.15rem; font-weight: 700; text-decoration: none; color: var(--ink); }
.brand span { color: var(--brand); }
.site-header nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.9rem; }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover { color: var(--brand); }

.site-footer {
  margin-top: 64px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  background: var(--soft);
  font-size: 0.87rem;
  color: var(--muted);
}
.site-footer nav { display: flex; gap: 18px; margin: 8px 0; }
.site-footer .fine { font-size: 0.82rem; }

/* -- hero ------------------------------------------------------------------ */
.hero { padding: 44px 0 28px; }
.hero h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 12px; max-width: 22ch; }
.hero .lede { font-size: 1.08rem; max-width: 62ch; margin: 0 0 16px; }
.hero .privacy {
  max-width: 68ch;
  padding: 12px 16px;
  border-left: 4px solid var(--brand);
  background: var(--soft);
  font-size: 0.92rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* -- tool row -------------------------------------------------------------- */
.tool-row { display: flex; gap: 24px; align-items: flex-start; }
.tool-col { flex: 1; min-width: 0; }

#app-frame {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: block;
  background: #fff;
}

/* -- ad slots: fixed boxes so nothing shifts when an ad loads (CLS) -------- */
.ad { display: flex; justify-content: center; align-items: center; overflow: hidden; }
.ad-leaderboard { min-height: 90px; margin: 20px 0; }
.ad-sidebar { flex: 0 0 300px; min-height: 600px; position: sticky; top: 20px; }
.ad-below { min-height: 280px; margin: 28px 0; }
.ad-in-article { min-height: 250px; margin: 36px 0 0; }

/* The skyscraper only exists where there is genuinely room for it — meaning
   room for the ad AND the full recon table beside it (~1230px). Below this the
   table would scroll sideways to pay for the ad, which is the wrong trade on a
   tool whose whole job is comparing columns. */
@media (max-width: 1439px) {
  .ad-sidebar { display: none; }
  .tool-row { display: block; }
}
@media (max-width: 780px) {
  .ad-leaderboard { min-height: 100px; }
  .hero h1 { font-size: 1.7rem; }
}

/* -- prose ----------------------------------------------------------------- */
.prose { max-width: 74ch; }
.content { margin-top: 44px; }
.prose h1 { font-size: 1.9rem; line-height: 1.25; margin: 32px 0 16px; }
.prose h2 { font-size: 1.3rem; margin: 34px 0 10px; }
.prose h3 { font-size: 1.05rem; margin: 24px 0 8px; }
.prose p, .prose li { max-width: 74ch; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose code {
  padding: 1px 5px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.88em;
}
.prose table { border-collapse: collapse; width: 100%; font-size: 0.92rem; margin: 16px 0; }
.prose th, .prose td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--soft); }
.prose blockquote {
  margin: 16px 0;
  padding: 10px 16px;
  border-left: 4px solid var(--line);
  color: var(--muted);
}

.error {
  padding: 12px 16px;
  border: 1px solid #f0c8c4;
  border-radius: var(--radius);
  background: #fdf1f0;
  color: var(--bad);
}
