/* Styles for the generated blog pages (site/blog/*.html).
 *
 * Separate from the landing page's inline CSS on purpose: a post is long-form prose
 * and the landing page is a sales page, so the two want different measure and
 * rhythm. Sharing one stylesheet would mean every tweak to the hero fights the
 * article width.
 *
 * Hand-written, not generated: it changes when the design changes, not when a post
 * is published, so `npm run blog` leaves it alone. It is in the deploy allow-list
 * in _verify/check_site_files.js like any other public file.
 *
 * Self-contained - no CDN, no webfont download - so a post still reads correctly
 * when the file is opened from disk.
 */

:root {
  --purple-50: #f5f3ff;
  --purple-100: #ede9fe;
  --purple-200: #ddd6fe;
  --purple-600: #7c3aed;
  --purple-700: #6d28d9;
  --ink: #14141c;
  --ink-soft: #4b4b5c;
  --ink-faint: #7a7a8c;
  --border: #e7e7ef;
  --bg-soft: #fafafc;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Inter", "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--purple-700); }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; }
.topbar nav { display: flex; gap: 18px; font-size: 15px; }
.topbar nav a { color: var(--ink-soft); text-decoration: none; }
.topbar nav a:hover { color: var(--purple-700); }

/* ---------- article ---------- */
.article { max-width: 760px; padding: 40px 24px 72px; }
.crumbs { font-size: 14px; color: var(--ink-faint); margin: 0 0 18px; }
.article h1 { font-size: 2.1rem; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 10px; }
.article h2 { font-size: 1.45rem; line-height: 1.25; margin: 44px 0 12px; letter-spacing: -.01em; }
.article h3 { font-size: 1.12rem; margin: 28px 0 8px; }
.article p { margin: 0 0 18px; }
.article ul, .article ol { margin: 0 0 18px; padding-left: 26px; }
.article li { margin: 6px 0; }
.article blockquote {
  margin: 0 0 18px;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--purple-200);
  color: var(--ink-soft);
}
.article code {
  background: var(--purple-50);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: .9em;
}
.article hr { border: 0; border-top: 1px solid var(--border); margin: 36px 0; }
.meta { font-size: 15px; color: var(--ink-faint); margin: 0 0 26px; }
.lede { font-size: 1.08rem; color: var(--ink-soft); }

/* ---------- call to action ---------- */
.cta {
  margin: 48px 0 0;
  padding: 26px 28px;
  background: var(--purple-50);
  border: 1px solid var(--purple-200);
  border-radius: var(--radius);
}
.cta h2 { margin: 0 0 8px; font-size: 1.2rem; }
.cta p { margin: 0 0 14px; color: var(--ink-soft); font-size: 16px; }

/* ---------- "keep reading" ---------- */
/* Under the CTA on purpose: the CTA is the last thing a reader who is ready to install
   should see, and this block is for the one who is not ready yet. Same card markup as the
   index page, so the site has one card style rather than two. */
.related {
  margin: 44px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.related > h2 { margin: 0 0 4px; font-size: 1.2rem; }
.related .cards { margin-top: 16px; }

.cta .button {
  display: inline-block;
  background: var(--purple-600);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 18px;
  border-radius: 10px;
}
.cta .button:hover { background: var(--purple-700); }

/* ---------- post list ---------- */
.cards { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 16px; }
.cards li { margin: 0; }
.card {
  display: block;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover {
  border-color: var(--purple-200);
  box-shadow: 0 8px 26px rgba(30, 20, 80, .09);
  transform: translateY(-2px);
}
.card h2 { margin: 4px 0 6px; font-size: 1.18rem; color: var(--purple-700); }
.card p { margin: 0; font-size: 15px; color: var(--ink-soft); }
.card-date { font-size: 13px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .03em; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 30px 0 40px; }
.foot p { margin: 0 0 8px; font-size: 15px; }
.foot .small { font-size: 14px; }
.foot .muted { color: var(--ink-faint); }

@media (min-width: 720px) {
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .article h1 { font-size: 1.7rem; }
}

/* ---------- the email opt-in ----------
   Self-contained on purpose. The home page defines these in its inline <style>; blog.css does
   not, and a block that borrows from another page's stylesheet silently loses whatever it
   borrowed. Every value below is written out rather than referenced. */
.signup{
  border-top:1px solid #e7e7ef;
  background:#fff;
  padding:52px 0 56px;
}
.signup-inner{max-width:620px; margin:0 auto; text-align:center}
.signup h2{
  font-size:clamp(22px,2.5vw,28px); font-weight:800; letter-spacing:-.02em;
  margin:0 0 10px; color:#14141c;
}
.signup .lede{margin:0 auto 24px; color:#4b4b5c; font-size:16.5px; line-height:1.55; max-width:34em}
.signup form{display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin:0}
.signup input[type="email"]{
  flex:1 1 260px; min-width:0; max-width:340px;
  padding:14px 16px; font-size:16px; font-family:inherit;
  color:#14141c; background:#fff;
  border:1.5px solid #d9d9e6; border-radius:12px;
}
.signup input[type="email"]::placeholder{color:#9a9ab0}
.signup input[type="email"]:focus{
  outline:none; border-color:#7c3aed; box-shadow:0 0 0 3px rgba(124,58,237,.15);
}
/* The button is styled here rather than relying on .btn, which this stylesheet does not define. */
.signup button,
.signup .subscribe{
  flex:0 0 auto; white-space:nowrap; cursor:pointer;
  padding:14px 26px; font-size:16px; font-weight:700; font-family:inherit;
  color:#fff; background:#7c3aed; border:1.5px solid #7c3aed; border-radius:12px;
  transition:background .15s ease, border-color .15s ease;
}
.signup button:hover{background:#6d28d9; border-color:#6d28d9}
.signup button:disabled{opacity:.6; cursor:default}
.signup .hp{position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden}
.signup-status{min-height:20px; margin:14px 0 0; font-size:15px; font-weight:600}
.signup-status.is-error{color:#b91c1c}
.signup-status.is-ok{color:#15803d}
.signup-note{margin:12px 0 0; font-size:13.5px; color:#7a7a8c}
.signup-note a{color:#7c3aed}
@media (max-width:560px){
  .signup form{flex-direction:column; align-items:stretch}
  .signup input[type="email"]{max-width:none}
  .signup button,
.signup .subscribe{width:100%}
}

/* Tables. The generator renders Markdown pipe tables, and a comparison table is the most
   extractable thing on a page - for a reader scanning options and for an assistant quoting one.
   Note the horizontal scroll wrapper: a four-column table does not fit a phone, and shrinking the
   type is worse than letting the table move. */
.prose table, article table {
  width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 14.5px;
  display: block; overflow-x: auto; white-space: nowrap;
}
.prose th, .prose td, article th, article td {
  text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border, #e7e7ef);
  vertical-align: top; white-space: normal;
}
.prose th, article th {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-soft, #5a5a6e); border-bottom-width: 2px;
}
.prose tbody tr:last-child td, article tbody tr:last-child td { border-bottom: none; }
