/* ----------------------------------------------------------------
   EVO blog — aligned with the current landing-page visual system.
   Used by blog/index.html (listing) and individual post pages.
---------------------------------------------------------------- */
:root {
  --paper: #fcfaf7;
  --paper-bright: #fffdf9;
  --ink: #111210;
  --muted: #595a54;
  --faint: #90918a;
  --line: #e2ded7;
  --line-dark: #c8c3bb;
  --orange: #ff4f14;
  --hot: #d63d0b;
  --wash-orange: #ffbd88;
  --wash-pink: #f3a5d1;
  --wash-violet: #8869ef;
  --wash-blue: #82a7f7;
  --wash-lime: #d8ed91;

  --bg: var(--paper);
  --plume-wash: #fff3ed;
  --text-main: var(--ink);
  --text-meta: var(--muted);
  --accent: var(--orange);
  --border-dark: var(--ink);
  --border-light: var(--line);

  --font: "Manrope", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-serif: var(--font);
  --font-sans: var(--font);

  --pad: 6vw;
  --prose: 760px;
  --shell: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(circle at 8% 5%, rgba(255, 255, 255, 0.72), transparent 24%),
    var(--paper);
  color: var(--text-main);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: inherit; }

/* ---- header (mirrors landing page) ---- */
header {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 180px;
  align-items: center;
  min-height: 78px;
  padding: 0 max(24px, calc((100vw - var(--shell)) / 2));
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--paper) 93%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
  border-bottom: 1px solid var(--line);
}
.logo {
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  width: max-content;
}
.logo img { height: 20px; width: auto; display: block; }
.brand-word {
  display: block;
  width: auto;
  height: 20px;
}
.header-actions { display: contents; }
.mobile-menu {
  display: none;
  grid-column: 3;
  justify-self: end;
}
header nav {
  grid-column: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 42px;
}
header nav a {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0;
  color: var(--text-meta);
  text-decoration: none;
  transition: color 0.2s;
}
header nav a:hover,
header nav a[aria-current="page"] { color: var(--text-main); }

/* ---- Request access CTA (matches landing page) ---- */
.cta {
  font-family: var(--font);
  font-size: 13px;
  text-decoration: none;
  color: var(--text-main);
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  cursor: pointer;
  background: #151614;
  border: 1px solid #151614;
  border-radius: 3px;
}
.cta {
  min-width: 142px;
  min-height: 36px;
  color: #f7f7f2;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.cta:hover {
  filter: none;
  color: #f7f7f2;
  background: var(--orange);
  border-color: var(--orange);
}
/* .article a and .post-footer a both paint links accent-orange, which would
   put orange text on the CTA's dark fill. The button keeps its own colour. */
.article a.cta,
.article a.cta:hover,
.post-footer a.cta,
.post-footer a.cta:hover {
  color: #f7f7f2;
}
.header-actions > .cta {
  grid-column: 3;
  justify-self: end;
}

/* ---- main column ---- */
main { flex: 1 0 auto; padding: 72px var(--pad) 84px; }
.wrap { max-width: var(--prose); margin: 0 auto; }

/* ---- full-bleed cover banner (the article's header image) ---- */
.post-cover {
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
  margin-top: -72px;
  margin-bottom: 44px;
  background: var(--bg);
}
.post-cover img { display: block; width: 100%; height: auto; }

/* ---- listing ---- */
.blog-intro { margin-bottom: 46px; }
.blog-intro h1 {
  font-family: var(--font);
  font-weight: 700;
  font-size: 88px;
  line-height: 0.96;
  letter-spacing: 0;
  margin-bottom: 14px;
}
.blog-intro h1 em { font-style: normal; font-weight: 700; color: var(--orange); }
.blog-intro p {
  font-size: 21px;
  line-height: 1.55;
  color: var(--text-meta);
  max-width: 52ch;
}

.post-list { list-style: none; display: grid; gap: 0; }
.post-item {
  display: block;
  text-decoration: none;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  transition: border-color 0.2s, background 0.2s;
}
.post-item:last-child { border-bottom: 1px solid var(--line); }
.post-item:hover { border-top-color: var(--border-dark); }
.post-item:hover .post-item-title { color: var(--accent); }
.post-item { display: grid; grid-template-columns: 1fr; gap: 16px; }
.post-thumb {
  width: 100%;
  aspect-ratio: 2.5 / 1;
  object-fit: cover;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  background: var(--paper-bright);
}
.post-meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0;
  color: var(--text-meta);
  margin-bottom: 8px;
}
.post-item-title {
  font-family: var(--font);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: 0;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.post-item-excerpt {
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--text-meta);
  max-width: 60ch;
}

/* ---- article (post page) ---- */
.post-header { margin-bottom: 38px; }
.post-kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0;
  color: var(--text-meta);
  margin-bottom: 16px;
}
.post-kicker a { color: var(--accent); text-decoration: none; }
.post-kicker a:hover { color: var(--hot); }
.post-title {
  font-family: var(--font);
  font-weight: 700;
  font-size: 74px;
  line-height: 0.98;
  letter-spacing: 0;
  margin-bottom: 18px;
}
.post-title em { font-style: normal; font-weight: 700; color: var(--hot); }
.post-subtitle {
  font-family: var(--font);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.35;
  color: var(--text-meta);
  margin: -6px 0 18px;
}
.post-byline {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-meta);
}
.post-byline a { color: var(--accent); text-decoration: none; }
.post-byline a:hover { color: var(--hot); }

.article { font-size: 1.12rem; line-height: 1.72; }
.article > p { margin-bottom: 24px; }
.article .lead {
  font-size: 22px;
  line-height: 1.5;
  color: var(--text-main);
  margin-bottom: 30px;
}
.article h2 {
  font-family: var(--font);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.14;
  letter-spacing: 0;
  margin: 46px 0 16px;
}
.article h3 {
  font-family: var(--font);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 34px 0 12px;
}
.article ul, .article ol { margin: 0 0 24px 1.2em; }
.article li { margin-bottom: 10px; }
.article strong { font-weight: 600; }
.article em { font-style: italic; }
.article a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--border-light); }
.article a:hover { color: var(--hot); border-color: var(--hot); }
.article code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 5px;
}
.article pre {
  margin: 0 0 24px;
  padding: 18px 20px;
  background: #171815;
  color: #f7f3ec;
  border: 1px solid var(--border-dark);
  border-radius: 3px;
  overflow-x: auto;
}
.article pre code {
  font-size: 0.92rem;
  line-height: 1.6;
  background: none;
  border: none;
  padding: 0;
}

.article blockquote {
  margin: 0 0 24px;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--accent);
  color: var(--text-meta);
  font-style: italic;
}

/* callout for the headline result */
.result-callout {
  margin: 34px 0;
  padding: 26px 30px;
  border: 1px solid var(--border-dark);
  background: var(--paper-bright);
  font-family: var(--font);
}
.result-callout .num {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
  font-size: 1.6rem;
}
.result-callout p { font-size: 1.12rem; line-height: 1.55; margin: 0; color: var(--text-main); }

/* ---- in-article figures (screenshots) ---- */
.post-figure { margin: 34px auto; max-width: 560px; }
.post-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
}
.post-figure figcaption {
  margin-top: 10px;
  font-family: var(--mono);
  color: var(--text-meta);
  font-size: 13px;
  line-height: 1.45;
}

.post-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-meta);
}
.post-footer a { color: var(--accent); text-decoration: none; }
.post-footer a:hover { color: var(--hot); }

.post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 54px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.post-nav-card {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  background: color-mix(in srgb, var(--paper-bright) 82%, transparent);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.post-nav-card:hover {
  border-color: var(--ink);
  background: var(--paper-bright);
  transform: translateY(-1px);
}

.post-nav-card.next {
  grid-column: 2;
  align-items: flex-end;
  text-align: right;
}

.post-nav-kicker {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 11px;
}

.post-nav-title {
  max-width: 28ch;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0;
}

/* ---- footer (mirrors landing page) ---- */
footer {
  flex-shrink: 0;
  padding: 13px var(--pad);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0;
  color: var(--text-meta);
}
.footer-links { display: flex; gap: 22px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text-main); }

@media (max-width: 680px) {
  header {
    min-height: 56px;
    grid-template-columns: 1fr auto;
    padding: 0 max(16px, calc((100vw - 540px) / 2));
    gap: 16px;
  }
  .logo img { height: 20px; }
  .header-actions { display: none; }
  .mobile-menu {
    display: block;
    grid-column: 2;
    position: relative;
  }
  .mobile-menu summary {
    list-style: none;
    cursor: pointer;
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0;
    color: var(--text-meta);
  }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu[open] summary { color: var(--text-main); }
  .mobile-menu-panel {
    position: absolute;
    top: calc(100% + 18px);
    right: 0;
    z-index: 60;
    min-width: 190px;
    padding: 18px 20px;
    border: 1px solid var(--line-dark);
    background: var(--paper-bright);
    display: grid;
    gap: 16px;
    text-align: right;
  }
  .mobile-menu-panel a {
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0;
    color: var(--text-meta);
    text-decoration: none;
  }
  .mobile-menu-panel a:hover { color: var(--text-main); }
  .mobile-menu-panel .cta { grid-column: auto; justify-self: end; font-size: 13px; }
  main { padding: 40px var(--pad) 56px; }
  .post-cover { margin-top: -40px; }
  .blog-intro h1 { font-size: 48px; }
  .blog-intro p { font-size: 17px; }
  .post-item-title { font-size: 25px; }
  .post-title { font-size: 42px; }
  .post-subtitle { font-size: 18px; }
  .article { font-size: 17px; }
  .article .lead { font-size: 19px; }
  .article h2 { font-size: 26px; }
  .post-nav { display: none; }
  footer { flex-direction: column; text-align: center; }
}

@media (max-width: 460px) {
  .mobile-menu-panel { min-width: 170px; padding: 16px 18px; }
  .evo-gate-card .evo-gate-headline h1 { font-size: 34px; }
}

/* ---- Request-access gate modal — editorial overrides (match landing page) ---- */
.evo-gate {
  padding: clamp(18px, 4vw, 40px);
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 79, 20, 0.16), transparent 28%),
    radial-gradient(circle at 76% 74%, rgba(255, 243, 237, 0.86), transparent 34%),
    rgba(252, 250, 247, 0.56);
  backdrop-filter: blur(16px) saturate(1.06);
  -webkit-backdrop-filter: blur(16px) saturate(1.06);
}
.evo-gate-card {
  width: min(100%, 590px);
  max-width: 590px;
  padding: clamp(30px, 5vw, 46px);
  background: var(--paper-bright);
  color: var(--text-main);
  border: 1px solid var(--text-main);
  border-radius: 3px;
  box-shadow: 0 32px 84px rgba(75, 52, 34, 0.18), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  font-family: var(--font-sans);
}
.evo-gate-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
}
.evo-gate-close {
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  color: var(--text-meta);
  border-radius: 3px;
  font-size: 24px;
}
.evo-gate-close:hover { color: var(--text-main); background: rgba(255, 79, 20, 0.08); }
.evo-gate-close:focus-visible { outline-color: var(--accent); }
.evo-gate-card .evo-gate-headline h1 {
  max-width: 13ch;
  margin: 0 0 12px;
  color: var(--text-main);
  font-family: var(--font);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.02;
}
.evo-gate-card .evo-gate-headline p {
  max-width: 44ch;
  margin: 0 0 26px;
  color: #44414a;
  font-size: 15px;
  line-height: 1.62;
}
.evo-gate-card .evo-gate-headline strong,
.evo-gate-card .evo-gate-otp-head strong,
.evo-gate-card .evo-gate-questions-head strong {
  color: var(--hot);
  font-weight: 600;
}
.evo-gate-form { gap: 13px; }
.evo-gate-oauth,
.evo-gate-submit {
  min-height: 46px;
  border-radius: 3px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}
.evo-gate-oauth {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--border-light);
}
.evo-gate-oauth:hover { color: var(--hot); background: var(--paper-bright); border-color: var(--accent); }
.evo-gate-submit {
  margin-top: 2px;
  color: #f7f7f2;
  background: #151614;
  border: 1px solid #151614;
}
.evo-gate-submit:hover { filter: none; background: var(--accent); border-color: var(--accent); }
.evo-gate-oauth:focus-visible,
.evo-gate-submit:focus-visible { outline-color: var(--accent); }
.evo-gate-field { gap: 7px; }
.evo-gate-field input,
.evo-gate-field textarea,
.evo-gate-otp-input {
  color: var(--text-main);
  background: var(--paper-bright);
  border: 1px solid var(--border-light);
  border-radius: 3px;
  font-family: var(--font-sans);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
}
.evo-gate-field input,
.evo-gate-field textarea { padding: 12px 13px; font-size: 14px; }
.evo-gate-field input::placeholder,
.evo-gate-field textarea::placeholder { color: #9f958b; }
.evo-gate-field input:focus,
.evo-gate-field textarea:focus,
.evo-gate-otp-input:focus {
  background: var(--paper-bright);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 79, 20, 0.12);
}
.evo-gate-field input[aria-invalid="true"] { border-color: #d64545; }
.evo-gate-field-hint { color: #d64545; }
.evo-gate-divider { margin: 9px 0 2px; color: var(--text-meta); font-family: var(--font-sans); letter-spacing: 0; }
.evo-gate-divider::before,
.evo-gate-divider::after { background: var(--border-light); }
.evo-gate-card .evo-gate-otp-head,
.evo-gate-card .evo-gate-questions-head,
.evo-gate-card .evo-gate-fineprint,
.evo-gate-card .evo-gate-field > span,
.evo-gate-card .evo-gate-field em,
.evo-gate-card .evo-gate-otp-actions a { color: var(--text-meta); }
.evo-gate-qualifier legend { color: var(--text-main); font-family: var(--font-sans); font-size: 15px; }
.evo-gate-segmented { gap: 8px; }
.evo-gate-segmented label {
  color: var(--text-meta);
  background: rgba(255, 255, 255, 0.58);
  border-color: var(--border-light);
  border-radius: 3px;
}
.evo-gate-segmented label:hover { color: var(--text-main); border-color: var(--accent); }
.evo-gate-segmented input:checked + label {
  color: var(--hot);
  background: rgba(255, 79, 20, 0.1);
  border-color: var(--accent);
}
.evo-gate-segmented input:focus-visible + label { outline-color: var(--accent); }
.evo-gate-checkbox { color: var(--text-meta); }
.evo-gate-checkbox input[type="checkbox"] {
  background: var(--paper-bright);
  border-color: var(--border-light);
  border-radius: 3px;
}
.evo-gate-checkbox input[type="checkbox"]:hover { border-color: var(--accent); }
.evo-gate-checkbox input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.evo-gate-checkbox input[type="checkbox"]:focus-visible { outline-color: var(--accent); }
.evo-gate-otp-actions { margin-top: 2px; }
.evo-gate-otp-actions a:hover { color: var(--hot); }
.evo-gate-error {
  color: #9f1d1d;
  background: rgba(214, 69, 69, 0.08);
  border-color: rgba(214, 69, 69, 0.28);
  border-radius: 3px;
}
