/* ═══════════════════════════════════════════════════════════════════════
   Counsileum public site — shared chrome for counsileum.com.
   Tokens lifted from the design system (counsileum/design-system/
   colors_and_type.css). Loaded by the marketing page and every blog post,
   so nav, footer, buttons and prose stay one system as the site grows.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --ink: #0b1b33; --ink-2: #14284a; --ink-3: #1f3a63;
  --accent: #1452ff; --accent-700: #0e3fcc; --accent-300: #6e8fe8;
  --accent-100: #cadcf5; --accent-050: #eef3fe;
  --bg: #ffffff; --bg-subtle: #f6f8fc; --bg-sunken: #eef2f8;
  --border: #e1e7f0; --border-strong: #c9d3e2;
  --fg1: #0b1b33; --fg2: #3a4861; --fg3: #56627a; --fg4: #8a95ac;
  --on-ink: #e8eef8; --on-ink-mut: #9db0ce;
  --success: #1f8a5b; --success-bg: #e7f4ee;
  --sh-1: 0 1px 2px rgba(11,27,51,0.06), 0 1px 1px rgba(11,27,51,0.04);
  --sh-3: 0 6px 18px rgba(11,27,51,0.09), 0 2px 5px rgba(11,27,51,0.05);
  --sh-4: 0 16px 40px rgba(11,27,51,0.13), 0 4px 10px rgba(11,27,51,0.06);
  --display: "Schibsted Grotesk", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--body); color: var(--fg2); background: var(--bg);
  -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 32px; }

h1, h2, h3, h4 { font-family: var(--display); color: var(--fg1);
  letter-spacing: -0.025em; }
.overline { font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.overline.on-ink { color: var(--accent-300); }
.h2 { font-weight: 700; font-size: 36px; margin: 14px 0 8px; max-width: 660px; }
.lead { font-size: 16.5px; line-height: 1.6; color: var(--fg3); max-width: 600px; }

/* ── buttons ─────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--body); font-weight: 600; font-size: 15px;
  padding: 12px 20px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; transition: all .18s; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-700); }
.btn-ghost { border-color: var(--border-strong); color: var(--fg1);
  background: transparent; }
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-050); }
.btn-ghost.on-dark { border-color: rgba(255,255,255,0.28); color: #fff; }
.btn-ghost.on-dark:hover { border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.1); }

/* ── nav ─────────────────────────────────────────────────────────────── */
nav { position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); }
.nav-in { display: flex; align-items: center; gap: 32px; padding: 14px 0; }
.wordmark { display: flex; align-items: center; gap: 9px;
  font-family: var(--display); font-weight: 800; font-size: 20px;
  letter-spacing: -0.02em; color: var(--fg1); }
.nav-links { display: flex; gap: 26px; }
.nav-links a { font-size: 14.5px; font-weight: 500; color: var(--fg3);
  white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--fg1); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.nav-cta .signin { font-size: 14.5px; font-weight: 600; color: var(--fg1); }

/* ── sections ────────────────────────────────────────────────────────── */
.section { padding: 76px 0; }
.section.subtle { background: var(--bg-subtle);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section.ink { background: var(--ink);
  background-image: radial-gradient(rgba(110,143,232,0.13) 1px, transparent 1px);
  background-size: 22px 22px; }
.section.ink h2, .section.ink h3 { color: #fff; }
.section.ink .lead { color: var(--on-ink-mut); }

/* ── prose (blog posts) ──────────────────────────────────────────────── */
.prose { font-size: 17px; line-height: 1.72; color: var(--fg2); }
.prose > * + * { margin-top: 20px; }
.prose h2 { font-size: 28px; font-weight: 700; margin-top: 48px;
  letter-spacing: -0.022em; scroll-margin-top: 90px; }
.prose h3 { font-size: 20px; font-weight: 700; margin-top: 34px;
  letter-spacing: -0.015em; scroll-margin-top: 90px; }
.prose a { color: var(--accent); font-weight: 500;
  border-bottom: 1px solid var(--accent-100); }
.prose a:hover { border-bottom-color: var(--accent); }
.prose ul, .prose ol { padding-left: 22px; display: flex;
  flex-direction: column; gap: 10px; }
.prose li { line-height: 1.65; }
.prose li::marker { color: var(--accent-300); }
.prose strong { color: var(--fg1); font-weight: 700; }
.prose blockquote { border-left: 3px solid var(--accent);
  background: var(--accent-050); padding: 16px 20px; border-radius: 0 10px 10px 0;
  color: var(--fg2); font-size: 16.5px; }
.prose blockquote p + p { margin-top: 12px; }
.prose code { font-family: var(--mono); font-size: 0.88em;
  background: var(--bg-sunken); padding: 2px 6px; border-radius: 5px;
  color: var(--ink-2); }
.prose pre { background: var(--ink); color: var(--on-ink); padding: 18px 20px;
  border-radius: 12px; overflow-x: auto; font-family: var(--mono);
  font-size: 13px; line-height: 1.6; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
.prose figure { margin: 32px 0; }
.prose figcaption { font-size: 13.5px; color: var(--fg4); margin-top: 10px; }

/* Tables scroll inside their own container — the page never scrolls sideways. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border); border-radius: 12px; }
.prose table { border-collapse: collapse; width: 100%; min-width: 560px;
  font-size: 14.5px; }
.prose th, .prose td { text-align: left; padding: 12px 16px;
  border-bottom: 1px solid var(--border); vertical-align: top; }
.prose thead th { background: var(--bg-subtle); font-family: var(--display);
  font-weight: 700; color: var(--fg1); font-size: 13.5px; white-space: nowrap; }
.prose tbody tr:last-child td { border-bottom: 0; }

/* A callout that ties a post back to the consultant who does this work. */
.consult-cta { margin-top: 48px; border: 1px solid var(--border);
  border-radius: 16px; padding: 26px 28px; background: var(--bg-subtle);
  display: flex; gap: 22px; align-items: center; }
.consult-cta .body { flex: 1; }
.consult-cta h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.consult-cta p { font-size: 15px; color: var(--fg3); line-height: 1.55; }

/* ── blog index cards ────────────────────────────────────────────────── */
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
  margin-top: 36px; }
.post-card { display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--border); border-radius: 16px; padding: 24px;
  box-shadow: var(--sh-1); transition: all .18s; }
.post-card:hover { border-color: var(--accent); box-shadow: var(--sh-3);
  transform: translateY(-2px); }
.post-card .kicker { font-family: var(--mono); font-size: 11px;
  font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); }
.post-card h3 { font-size: 20px; font-weight: 700; margin: 12px 0 8px;
  line-height: 1.25; letter-spacing: -0.018em; }
.post-card p { font-size: 14.5px; color: var(--fg3); line-height: 1.55; flex: 1; }
.post-card .meta { display: flex; gap: 12px; margin-top: 16px;
  padding-top: 14px; border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 11.5px; color: var(--fg4); }
.post-card.featured { grid-column: 1 / -1; }
.post-card.featured h3 { font-size: 27px; }

/* ── post header + breadcrumbs ───────────────────────────────────────── */
.crumbs { font-family: var(--mono); font-size: 12px; color: var(--fg4);
  display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent); }
.post-head { padding: 52px 0 34px; border-bottom: 1px solid var(--border); }
.post-head h1 { font-size: 44px; font-weight: 800; line-height: 1.08;
  letter-spacing: -0.032em; margin: 18px 0 0; }
.post-head .standfirst { font-size: 19px; line-height: 1.55; color: var(--fg3);
  margin-top: 18px; }
.post-head .byline { display: flex; gap: 14px; align-items: center;
  flex-wrap: wrap; margin-top: 24px; font-family: var(--mono);
  font-size: 12px; color: var(--fg4); }
.post-body { padding: 40px 0 72px; }

/* ── footer ──────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); background: var(--bg-subtle); }
.foot-cols { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 32px; padding: 48px 0 36px; }
.foot-cols p { font-size: 13.5px; color: var(--fg3); line-height: 1.6;
  margin-top: 14px; max-width: 250px; }
.foot-cols h4 { font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg4);
  margin-bottom: 14px; }
.foot-cols .links { display: flex; flex-direction: column; gap: 9px; }
.foot-cols .links a, .foot-cols .links span { font-size: 13.5px; color: var(--fg3); }
.foot-cols .links a:hover { color: var(--accent); }
.foot-bar { border-top: 1px solid var(--border); display: flex;
  justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 0;
  font-family: var(--mono); font-size: 12.5px; color: var(--fg4); }

@media (max-width: 1000px) {
  .post-grid { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .post-head h1 { font-size: 34px; }
}
@media (max-width: 620px) {
  .wrap, .wrap-narrow { padding: 0 20px; }
  .nav-links { display: none; }
  .foot-cols { grid-template-columns: 1fr; }
  .h2 { font-size: 28px; }
  .prose { font-size: 16.5px; }
  .prose h2 { font-size: 24px; }
  .consult-cta { flex-direction: column; align-items: flex-start; }
}
