/* Shared shell for the blog: /blog and every /blog/<slug>.

   The marketing pages inline their CSS because each is a one-off. Blog posts
   are a document set that must look like one publication, so they share this
   file the way the legal set shares legal.css: a change to the type scale
   lands on every post, and a post added later cannot drift. Tokens are copied
   from brand/guideline.html, which stays authoritative. Served as a static
   file; the pages themselves are rendered by src/blog/page.ts. */

/* No @font-face here: the font URL must follow RenderOptions.assetBase so a
   local preview loads the copy written beside it, so src/blog/page.ts emits
   the @font-face inline in each page's head. A hardcoded URL in this file
   would make previews fall back to a system font and lie about type. */

:root {
  --tomato: #DA3D12; --tomato-text: #B5370F; --cream: #FAF5EC; --ink: #201B16;
  --ink-60: #201B1699; --ink-40: #201B1666; --paper: #FFFDF8; --ochre: #B36A00;
  --rule: #201B1614; --rule-strong: #201B1626;
}

* { box-sizing: border-box; }

body {
  margin: 0; font-family: Manrope, system-ui, sans-serif;
  background: var(--cream); color: var(--ink); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* The same paper grain the marketing pages carry, so the blog does not read
   as a different site. */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; opacity: 0.035; z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }

/* Nav, identical to the marketing pages. */
nav { display: flex; align-items: center; justify-content: space-between; padding: 26px 0 0; }
nav .logo img { height: 30px; display: block; }
nav .links { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 600; }
nav .links a.navlink { color: var(--ink); text-decoration: none; opacity: 0.75; }
nav .links a.navlink:hover { opacity: 1; }
nav .links a.navlink.here { opacity: 1; color: var(--tomato-text); }
.btn {
  background: var(--tomato); color: #fff; border-radius: 10px; padding: 11px 20px; font-weight: 700;
  text-decoration: none; font-size: 15px; display: inline-block;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--tomato-text); transform: translateY(-1px); }

header { padding: 76px 0 8px; }
h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.08; margin: 0 0 18px; max-width: 24ch; }
h1 em { color: var(--tomato); font-style: normal; }
.sub { font-size: clamp(17px, 2vw, 19px); max-width: 60ch; margin: 0; font-weight: 500; }
.byline { font-size: 14.5px; color: var(--ink-60); font-weight: 600; margin: 0; }
header a, .posts .empty a { color: var(--tomato-text); font-weight: 700; text-decoration: none; }
header a:hover, .posts .empty a:hover { text-decoration: underline; }
/* A page that is only a header (the 404) still ends with room to breathe. */
header.lone { padding-bottom: 90px; }

/* The index: one card per post, the legal hub's card grammar. */
section.posts { padding: 44px 0 90px; display: grid; gap: 18px; max-width: 720px; }
.posts a.card {
  display: block; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 14px;
  padding: 22px 24px; text-decoration: none; color: var(--ink);
  transition: transform .15s ease, border-color .15s ease;
}
.posts a.card:hover { transform: translateY(-2px); border-color: var(--tomato); }
.posts a.card time { font-size: 13px; color: var(--ink-60); font-weight: 600; display: block; margin: 0 0 6px; }
.posts a.card b { display: block; font-size: 19px; font-weight: 800; color: var(--tomato-text); margin: 0 0 6px; letter-spacing: -0.01em; }
.posts a.card span { font-size: 15px; color: var(--ink-60); font-weight: 500; line-height: 1.5; }
.posts .empty { font-size: 16.5px; color: var(--ink-60); }

/* The post body: markdown output from src/blog/page.ts. */
article { padding-bottom: 8px; }
article header { padding-bottom: 0; }
.post-body { padding: 36px 0 0; max-width: 680px; }
.post-body h2 { font-size: clamp(21px, 2.6vw, 27px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.18; margin: 40px 0 14px; max-width: 32ch; }
.post-body h3 { font-size: 17px; font-weight: 800; margin: 28px 0 10px; letter-spacing: -0.01em; }
.post-body p { font-size: 16.5px; max-width: 66ch; margin: 0 0 14px; }
.post-body ul, .post-body ol { max-width: 66ch; padding-left: 22px; margin: 0 0 16px; }
.post-body li { font-size: 16.5px; margin: 0 0 9px; }
.post-body a { color: var(--tomato-text); font-weight: 700; text-decoration: none; }
.post-body a:hover { text-decoration: underline; }
.post-body code { font-family: ui-monospace, Menlo, monospace; font-size: 0.92em; background: #201B160d; border-radius: 5px; padding: 1px 6px; }
.post-body pre { background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 12px; padding: 18px 20px; overflow-x: auto; margin: 0 0 16px; }
.post-body pre code { background: none; padding: 0; font-size: 14px; line-height: 1.55; }
.post-body blockquote { border-left: 3px solid var(--tomato); margin: 20px 0; padding: 2px 0 2px 20px; color: var(--ink-60); }
.post-body blockquote p { margin-bottom: 6px; }
.post-body img { max-width: 100%; border-radius: 12px; border: 1px solid var(--rule-strong); }
.post-body strong { font-weight: 800; }
.post-body hr { border: none; border-top: 1px solid var(--rule); margin: 32px 0; }
.post-body table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; }
.post-body th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-60); padding: 0 16px 10px 0; font-weight: 700; }
.post-body td { padding: 12px 16px 12px 0; border-top: 1px solid var(--rule); vertical-align: top; }

section.after { padding: 34px 0 90px; }
section.after p { font-size: 15.5px; margin: 0 0 10px; }
section.after a { color: var(--tomato-text); font-weight: 700; text-decoration: none; }
section.after a:hover { text-decoration: underline; }
.reach { color: var(--ink-60); }

footer {
  border-top: 1px solid #201B161a; padding: 34px 0 46px; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
footer .fmark { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-60); font-weight: 600; }
footer img { width: 30px; height: 30px; }
footer a { color: var(--tomato-text); text-decoration: none; font-weight: 700; }

@media (max-width: 800px) {
  nav .links { gap: 16px; font-size: 14px; }
  nav .links a.navlink.anchor { display: none; }
  .btn { padding: 10px 15px; font-size: 14px; }
}
@media (max-width: 560px) {
  nav { flex-wrap: wrap; row-gap: 14px; }
  nav .logo { flex: 1 0 100%; }
  nav .links { width: 100%; justify-content: flex-start; align-items: center; flex-wrap: wrap; row-gap: 10px; }
  nav .links .btn { margin-left: auto; }
}
