/* ChannelPulse — stylesheet for the generated question pages (/questions/**).
 *
 * Deliberately standalone plain CSS, NOT Tailwind. Two reasons:
 *  1. `styles.css` is bundled by Vite into `dist/assets/app-<hash>.css`, so pages
 *     living in `public/` cannot link it — there is no `dist/styles.css`.
 *  2. Pulling the Tailwind CDN into ~150 pages would ship a compiler to every
 *     visitor and tank the very Core Web Vitals these pages exist to win.
 * Palette mirrors styles.css so the pages feel like the same site.
 *
 * Edited by hand — the HTML is generated (scripts/build-seo-question-pages.mjs),
 * this file is not.
 */
:root {
  --cream: #f3f4f6;
  --ink: #1a1a1a;
  --charcoal: #222222;
  --fog: #8a8a80;
  --stone: #e5e7eb;
  --forest: #034f46;
  --lavender: #f0d7ff;
  --paper: #fbfbfa;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--forest);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

/* ── nav ──────────────────────────────────────────────────────────────────── */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 16px clamp(16px, 4vw, 48px);
  border-bottom: 2px solid var(--ink);
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 22px;
  letter-spacing: -0.4px;
  color: var(--ink);
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  border-radius: 7px;
}
.brand-light {
  color: var(--cream);
}

.site-nav nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}
.site-nav nav a {
  padding: 7px 13px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.site-nav nav a:hover {
  background: #e6e6e0;
  text-decoration: none;
}

/* ── layout ───────────────────────────────────────────────────────────────── */
.qa-main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 32px) 72px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--fog);
  margin-bottom: 20px;
}
.crumbs a {
  color: var(--fog);
  font-weight: 500;
}
.crumbs a:hover {
  color: var(--ink);
}
.crumbs .sep {
  opacity: 0.5;
}
.crumbs [aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.qa-hero {
  padding-bottom: 26px;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--ink);
}
.qa-hero h1 {
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 400;
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.04;
  letter-spacing: -1.2px;
  color: var(--ink);
  margin: 0 0 14px;
}
.lede {
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.6;
  color: var(--charcoal);
  margin: 0 0 18px;
  max-width: 46rem;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.facts li {
  padding: 6px 14px;
  border-radius: 9999px;
  border: 2px solid var(--ink);
  background: var(--cream);
  font-size: 13px;
  color: var(--ink);
}
.facts strong {
  font-weight: 700;
}

/* ── question cards ───────────────────────────────────────────────────────── */
.qa-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.qa-card {
  border: 2px solid var(--ink);
  border-radius: 28px;
  background: var(--cream);
  padding: clamp(18px, 3vw, 28px);
  scroll-margin-top: 88px;
}

.qa-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.cat-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 9999px;
  border: 2px solid var(--ink);
  background: #e5e7eb;
  color: var(--ink);
}
.cat-sysdesign {
  background: #f0d7ff;
}
.cat-technical {
  background: #dbeee7;
}
.cat-coding {
  background: #e5e7eb;
}
.cat-behavioral {
  background: #ffe6c7;
}
.cat-product {
  background: #ffdcec;
}

.diff {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid var(--ink);
  color: var(--ink);
}
.diff-easy {
  background: #e7f5ec;
}
.diff-medium {
  background: #fff3d6;
}
.diff-hard {
  background: #fde2e2;
}

.co-chip,
.stage-chip {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
}
.stage-chip {
  background: #eef0e2;
  color: var(--forest);
  border-color: var(--forest);
}

.qa-q {
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 400;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.14;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin: 0 0 10px;
}
.qa-num {
  color: var(--fog);
  margin-right: 4px;
}

.qa-prompt {
  border-left: 3px solid var(--stone);
  padding-left: 16px;
  margin: 0 0 6px;
}

/* Section labels inside a card ("The full question", "Model answer"). */
.qa-prompt > h3:first-child,
.qa-answer > h3:first-child {
  font-family: "Figtree", sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fog);
  margin: 14px 0 8px;
}

/* Headings that came out of the model answer's own markdown. */
.qa-answer h3,
.qa-answer h4,
.qa-answer h5,
.qa-answer h6 {
  font-family: "Figtree", sans-serif;
  color: var(--ink);
  margin: 20px 0 8px;
  line-height: 1.25;
}
.qa-answer h3 {
  font-size: 17px;
  font-weight: 700;
}
.qa-answer h4 {
  font-size: 15px;
  font-weight: 650;
}
.qa-answer h5,
.qa-answer h6 {
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal);
}

.qa-answer p,
.qa-prompt p {
  font-size: 15.5px;
  line-height: 1.62;
  color: var(--charcoal);
  margin: 0 0 10px;
}

.qa-answer ul,
.qa-prompt ul {
  margin: 0 0 12px;
  padding-left: 22px;
}
.qa-answer ol,
.qa-prompt ol {
  margin: 0 0 12px;
  padding-left: 24px;
}
.qa-answer li,
.qa-prompt li {
  font-size: 15.5px;
  line-height: 1.58;
  color: var(--charcoal);
  margin-bottom: 6px;
}
.qa-answer ul li::marker {
  color: var(--forest);
}
.qa-answer ol li::marker {
  color: var(--forest);
  font-weight: 700;
}

.qa-answer strong,
.qa-prompt strong {
  font-weight: 650;
  color: var(--ink);
}

.qa-answer blockquote,
.qa-prompt blockquote {
  margin: 12px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--forest);
  background: #eef0e2;
  border-radius: 0 12px 12px 0;
  font-size: 15px;
  color: var(--charcoal);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #e5e7eb;
  padding: 1.5px 6px;
  border-radius: 6px;
  font-size: 13.5px;
}

.qa-code {
  margin: 12px 0;
  padding: 14px 16px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
}
.qa-code code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 13px;
  white-space: pre;
}

.qa-tablewrap {
  overflow-x: auto;
  margin: 12px 0;
}
.qa-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.qa-table th,
.qa-table td {
  border: 1px solid var(--ink);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
.qa-table th {
  background: #e5e7eb;
  font-weight: 650;
  color: var(--ink);
}

/* ── mermaid ──────────────────────────────────────────────────────────────── */
/* Pre-upgrade the diagram source is visible as text — that is intentional, it
 * is what crawlers and LLMs read. qa.js swaps in the rendered SVG lazily. */
.qa-mermaid {
  margin: 14px 0;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
}
.qa-mermaid pre.mermaid {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  color: var(--fog);
  background: none;
  white-space: pre;
}
.qa-mermaid pre.mermaid[data-rendered] {
  padding: 16px;
  color: inherit;
  text-align: center;
}
.qa-mermaid pre.mermaid[data-rendered] svg {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}
.qa-mermaid figcaption {
  padding: 7px 16px;
  border-top: 1px solid var(--stone);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--fog);
}

/* ── locked questions (blur after the 10th on a page) ────────────────────────
 * qa.js adds .qa-card--locked to every card past the 10th and inserts
 * .qa-lock-cta right before the first locked one. The CTA is a normal
 * (unblurred) sibling with position:sticky so it stays pinned near the top
 * of the viewport while the blurred cards scroll underneath it. */
.qa-card--locked {
  filter: blur(9px) saturate(0.7);
  opacity: 0.6;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.qa-lock-cta {
  position: sticky;
  top: 84px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: clamp(24px, 4vw, 36px);
  border: 2px solid var(--ink);
  border-radius: 28px;
  background: var(--lavender);
  box-shadow: 0 14px 32px -14px rgba(26, 26, 26, 0.4);
}
.qa-lock-cta .lock-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  border: 2px solid var(--ink);
  background: var(--cream);
  font-size: 18px;
}
.qa-lock-cta h3 {
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 400;
  font-size: clamp(20px, 2.6vw, 27px);
  letter-spacing: -0.4px;
  color: var(--ink);
  margin: 0;
}
.qa-lock-cta p {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--charcoal);
  margin: 0;
  max-width: 34rem;
}
.qa-lock-cta .btn {
  margin: 4px 0 0;
}
/* Directory-page variant (companies.html/roles.html "also in the bank" teaser):
 * a static teaser box above a permanently-blurred flat list, not a sticky one
 * pinned over a scrolling column of cards. */
.qa-lock-cta--inline {
  position: static;
  margin-bottom: 18px;
}

.dir-list--locked .dir-flat {
  filter: blur(6px);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

/* ── CTA ──────────────────────────────────────────────────────────────────── */
.qa-cta-block {
  margin-top: 32px;
  padding: clamp(22px, 4vw, 34px);
  border: 2px solid var(--ink);
  border-radius: 28px;
  background: var(--lavender);
}
.qa-cta-block h2 {
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.6px;
  color: var(--ink);
  margin: 0 0 10px;
}
.qa-cta-block p {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--charcoal);
  margin: 0 0 18px;
  max-width: 42rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 9999px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  font-size: 15px;
  font-weight: 600;
  margin-right: 8px;
}
.btn:hover {
  text-decoration: none;
  background: var(--charcoal);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover {
  background: rgba(26, 26, 26, 0.08);
}

/* ── related / directory ──────────────────────────────────────────────────── */
.related {
  margin-top: 34px;
}
.related h2,
.dir-group h2 {
  font-family: "Figtree", sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--fog);
  margin: 0 0 12px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip-list a {
  display: inline-block;
  padding: 7px 15px;
  border-radius: 9999px;
  border: 2px solid var(--ink);
  background: var(--cream);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.chip-list a:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--cream);
  text-decoration: none;
}

.dir-group {
  margin-bottom: 34px;
}
.dir-note {
  font-size: 14px;
  color: var(--fog);
  margin: -4px 0 14px;
  max-width: 44rem;
}
.dir-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dir-list a,
.dir-flat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 14px;
  border: 2px solid var(--ink);
  background: var(--cream);
  font-size: 14.5px;
  color: var(--ink);
}
.dir-list a:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--cream);
  text-decoration: none;
}
.dir-list a:hover .dir-count {
  background: rgba(255, 255, 255, 0.2);
  color: var(--cream);
}
.dir-flat {
  border-style: dashed;
  border-color: var(--stone);
  background: transparent;
  color: var(--fog);
}
.dir-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dir-count {
  flex: 0 0 auto;
  min-width: 26px;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(26, 26, 26, 0.1);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

/* ── footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 2px solid var(--ink);
  background: var(--ink);
  color: var(--stone);
  padding: 44px clamp(16px, 4vw, 48px) 28px;
}
.foot-grid {
  max-width: 60rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 720px) {
  .foot-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}
.foot-grid p {
  font-size: 14px;
  line-height: 1.6;
  color: #a8a8a0;
  margin: 12px 0 0;
  max-width: 22rem;
}
.foot-grid h4 {
  font-family: "Figtree", sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--fog);
  margin: 0 0 12px;
}
.foot-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.foot-grid a {
  font-size: 14px;
  color: var(--stone);
}
.foot-grid a:hover {
  color: #fff;
}
.foot-base {
  max-width: 60rem;
  margin: 34px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--fog);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
