/*
 * The blog's stylesheet.
 *
 * A real file rather than a <style> block in api/blog.ts, because the site's CSP sets
 * style-src-elem 'self' and that drops an inline stylesheet on the floor without a word
 * in the network tab. The app never noticed: Vite emits its CSS as a file, so only the
 * server-rendered pages were affected, and they rendered as raw HTML with a logo the
 * height of the page.
 */
  :root {
    --paper: #fbfbfa; --paper-2: #f4f4f2; --ink: #0a0a0a; --ink-soft: #6b6b6b;
    --hair: rgba(10,10,10,.08); --brand: #1a7fe8;
    --blue: #bcd8f5; --pink: #f7cede; --yellow: #ffe9a8;
  }
  * { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; }
  body {
    margin: 0; background: var(--paper); color: var(--ink);
    font: 400 18px/1.75 -apple-system, BlinkMacSystemFont, 'SF Pro Text', Inter, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  }
  .wrap { max-width: 42rem; margin: 0 auto; padding: 0 1.5rem; }
  .wide { max-width: 60rem; }

  header.site { position: sticky; top: 0; z-index: 10; background: rgba(251,251,250,.82);
    backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--hair); }
  header.site .row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
  .brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
  .brand img { height: 16px; width: auto; }
  .brand span { font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
  .cta {
    display: inline-flex; align-items: center; gap: .4rem; background: var(--brand); color: #fff;
    text-decoration: none; font-weight: 600; font-size: 14px; padding: .6rem 1.15rem;
    border-radius: 999px; box-shadow: 0 1px 2px rgba(10,10,10,.08), 0 10px 24px -10px rgba(26,127,232,.65);
    transition: background-color .2s ease-out, transform .2s ease-out;
  }
  .cta:hover { background: #2f92f5; }
  .cta:active { transform: scale(.985); }

  main { padding: 4rem 0 5rem; }
  .eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 1rem; }
  h1 { font-size: clamp(2.1rem, 5.4vw, 3.1rem); line-height: 1.05; letter-spacing: -.028em; margin: 0 0 1rem; text-wrap: balance; font-weight: 600; }
  .lede { font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 1.5rem; text-wrap: pretty; }
  .byline { display: flex; flex-wrap: wrap; gap: .75rem; color: var(--ink-soft); font-size: 14px; margin: 0 0 2.5rem;
    padding-bottom: 2rem; border-bottom: 1px solid var(--hair); }
  .hero { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 20px; margin: 0 0 3rem; display: block; background: var(--paper-2); }

  article h2 { font-size: 1.6rem; line-height: 1.2; letter-spacing: -.02em; font-weight: 600; margin: 3rem 0 .9rem; text-wrap: balance; }
  article h3 { font-size: 1.22rem; line-height: 1.3; letter-spacing: -.012em; font-weight: 600; margin: 2.25rem 0 .6rem; }
  article p { margin: 0 0 1.35rem; color: #24242a; text-wrap: pretty; }
  article ul, article ol { margin: 0 0 1.35rem; padding-left: 1.35rem; }
  article li { margin: 0 0 .55rem; color: #24242a; }
  article a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
  article img { max-width: 100%; height: auto; border-radius: 16px; margin: 2rem 0; }
  article hr { border: 0; border-top: 1px solid var(--hair); margin: 3rem 0; }
  article blockquote { margin: 2rem 0; padding: .25rem 0 .25rem 1.35rem; border-left: 3px solid var(--blue); color: var(--ink-soft); font-style: normal; }
  article table { width: 100%; border-collapse: collapse; font-size: 15.5px; margin: 0 0 1.35rem; }
  article th { text-align: left; font-weight: 600; background: var(--paper-2); }
  article th, article td { padding: .6rem .8rem; border-bottom: 1px solid var(--hair); vertical-align: top; }
  article pre { background: #0f0f11; color: #f2f2f4; padding: 1.1rem 1.25rem; border-radius: 14px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
  article :not(pre) > code { background: var(--paper-2); padding: .12em .38em; border-radius: 6px; font-size: .9em; }
  article code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
  .scroll { overflow-x: auto; }

  ul.posts { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
  ul.posts a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink);
    background: #fff; border: 1px solid var(--hair); border-radius: 20px; overflow: hidden;
    transition: transform .2s ease-out, box-shadow .2s ease-out; }
  ul.posts a:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(10,10,10,.4); }
  ul.posts img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: var(--paper-2); }
  ul.posts .card { padding: 1.1rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
  ul.posts h2 { font-size: 1.12rem; line-height: 1.3; letter-spacing: -.012em; margin: 0; font-weight: 600; text-wrap: balance; }
  ul.posts p { margin: 0; color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; }
  ul.posts .when { margin-top: auto; padding-top: .5rem; font-size: 12.5px; color: var(--ink-soft); }

  .end { margin: 4.5rem 0 0; padding: 2.5rem 1.75rem; border-radius: 24px; text-align: center;
    background: linear-gradient(150deg, var(--blue), var(--pink) 55%, var(--yellow)); }
  .end h2 { margin: 0 0 .5rem; font-size: 1.5rem; letter-spacing: -.02em; font-weight: 600; }
  .end p { margin: 0 0 1.5rem; color: #3a3a40; }
  .more { margin-top: 4rem; padding-top: 2.5rem; border-top: 1px solid var(--hair); }
  .more h2 { font-size: 1.1rem; letter-spacing: .02em; margin: 0 0 1.25rem; }

  footer.site { border-top: 1px solid var(--hair); padding: 2.5rem 0; color: var(--ink-soft); font-size: 14px; }
  footer.site .row { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: space-between; }
  footer.site a { color: var(--ink-soft); text-decoration: none; }
  footer.site a:hover { color: var(--ink); }
  footer.site nav { display: flex; gap: 1.25rem; }
  .empty { color: var(--ink-soft); }
  @media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
