/* Shared layout for the /guides content pages.
 *
 * The marketing pages (index, pricing, aeo) each inline their own <style> block
 * because each is a bespoke layout. The guides are the opposite: one article
 * template repeated, so a shared file keeps four pages from drifting apart and
 * is cached across the set. Same tokens and same nav/footer rules as the rest of
 * the site — copied, not reinvented, so a guide sits flush with /pricing. */

:root {
  --paper: #f6f5fa;
  --paper-raised: #ffffff;
  --ink: #14131b;
  --ink-soft: #52505e;
  --ink-faint: #8b8896;
  --accent: #5d5bf4;
  --accent-deep: #4341d8;
  --accent-wash: #eeedfe;
  --hairline: #e9e8f1;
  --body: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --wrap: 1104px;
  --measure: 720px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, #ffffff 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
  transition: box-shadow 220ms ease, background 220ms ease;
}
.nav.scrolled {
  background: color-mix(in srgb, #ffffff 92%, transparent);
  box-shadow: 0 10px 30px rgba(20, 19, 27, 0.07);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  margin-right: auto;
  text-decoration: none;
}
.brand svg { display: block; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
}
.nav-links a { text-decoration: none; transition: color 120ms ease; }
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"] { font-weight: 600; }
.nav-cta {
  padding: 9px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 120ms ease;
}
.nav-cta:hover { background: var(--accent-deep); }

/* ---------- Article head ---------- */

.guide-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 40px;
  background:
    radial-gradient(900px 460px at 80% -22%, rgba(93, 91, 244, 0.16), transparent 65%),
    linear-gradient(180deg, #fbfaff 0%, var(--paper) 100%);
}
.guide-hero .wrap { position: relative; z-index: 1; }
.crumb {
  margin: 0 0 20px;
  color: var(--ink-faint);
  font-size: 13.5px;
  font-weight: 500;
}
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.crumb span { padding: 0 8px; opacity: 0.55; }

h1, h2, h3 {
  margin-top: 0;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 {
  max-width: var(--measure);
  margin: 0 0 20px;
  font-size: clamp(33px, 4.6vw, 50px);
  font-weight: 700;
  line-height: 1.08;
}
h1 em {
  font-style: normal;
  color: var(--accent-deep);
}
.standfirst {
  max-width: var(--measure);
  margin: 0 0 26px;
  color: var(--ink-soft);
  font-size: clamp(17.5px, 2vw, 20px);
  line-height: 1.55;
}
.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  color: var(--ink-faint);
  font-size: 14px;
}
.byline .dot { opacity: 0.5; }

/* The direct answer, stated before the article earns it. Assistants quote the
   first passage that actually answers the question in the title; burying it
   under 600 words of preamble is how a page gets read and not cited. */
.answer {
  max-width: var(--measure);
  margin: 34px 0 0;
  padding: 26px 30px;
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  background: var(--paper-raised);
  box-shadow: 0 12px 34px rgba(20, 19, 27, 0.05);
}
.answer p { margin: 0; font-size: 17.5px; }
.answer p + p { margin-top: 12px; }
.answer strong { font-weight: 600; }
.answer-label {
  display: block;
  margin-bottom: 10px;
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Prose ---------- */

.prose {
  max-width: var(--measure);
  padding: 20px 0 76px;
}
.prose h2 {
  margin: 52px 0 16px;
  font-size: clamp(25px, 3vw, 31px);
  font-weight: 700;
  line-height: 1.2;
}
.prose h3 {
  margin: 34px 0 12px;
  font-size: 20px;
  font-weight: 600;
}
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 10px; }
.prose li::marker { color: var(--ink-faint); }
.prose strong { font-weight: 600; }
.prose a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(93, 91, 244, 0.4);
}
.prose a:hover { text-decoration-color: var(--accent-deep); }
.prose code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #eeedf4;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  word-break: break-word;
}

.note {
  margin: 26px 0;
  padding: 20px 24px;
  border-radius: 12px;
  background: var(--accent-wash);
  color: #37356f;
  font-size: 16px;
}
.note p { margin: 0; }
.note p + p { margin-top: 10px; }

/* Wide content scrolls inside its own box so the page body never does. */
.table-scroll {
  margin: 26px 0;
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--paper-raised);
}
table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15.5px;
}
th, td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
th {
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
td strong { font-weight: 600; }
/* The first column names the row, so it has to stay put while the rest scrolls —
   on a phone the label is otherwise the first thing to disappear, leaving a grid
   of values with nothing to read them against. Opaque background so the scrolling
   cells pass underneath. */
th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  background: var(--paper-raised);
  box-shadow: 1px 0 0 var(--hairline);
}

/* ---------- Tail CTA + related ---------- */

.guide-cta {
  padding: 0 0 72px;
}
.cta-inner {
  max-width: var(--measure);
  padding: 44px 38px 40px;
  border-radius: 20px;
  background: linear-gradient(160deg, #17162a 0%, #24224a 100%);
  color: #fff;
}
.cta-inner h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
}
.cta-inner p {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 16.5px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 120ms ease, background 120ms ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #6f6dff; transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }

/* The hub's card grid. Deliberately NOT inside .prose — the prose link styles
   would underline and recolour every card's title and blurb. */
.guide-index { padding: 34px 0 10px; }

/* ---------- Data bars (the crawler report) ---------- */

.bars {
  margin: 28px 0 30px;
  display: grid;
  gap: 14px;
}
.bar-row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: center;
  gap: 14px;
  font-size: 15px;
}
.bar-name { font-weight: 600; }
.bar-track {
  position: relative;
  height: 26px;
  border-radius: 7px;
  background: #e9e8f1;
  overflow: hidden;
}
/* display:block is load-bearing: these are spans, and an inline box ignores
   width and height, so the fill renders as nothing at all. The track escapes
   this only because it is a grid item and gets blockified for free. */
.bar-fill {
  display: block;
  height: 100%;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
}
/* A zero-width bar would read as "no data" rather than "measured, and it was
   zero" — the whole point of those rows. A hairline stub says none, on purpose. */
.bar-fill.zero {
  width: 3px;
  background: var(--ink-faint);
}
.bar-value {
  min-width: 76px;
  text-align: right;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  font-size: 14.5px;
}
@media (max-width: 600px) {
  .bar-row { grid-template-columns: 78px 1fr auto; gap: 10px; font-size: 14px; }
  .bar-value { min-width: 62px; font-size: 13px; }
}

.related { padding: 0 0 78px; }
.related h2 {
  margin: 0 0 22px;
  font-size: 21px;
  font-weight: 600;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.related-card {
  display: block;
  padding: 22px 24px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--paper-raised);
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(20, 19, 27, 0.07);
}
.related-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.related-card span {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.5;
}

/* ---------- Footer ---------- */

footer {
  padding: 36px 0 44px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-faint);
  font-size: 14.5px;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.foot-brand {
  display: flex;
  align-items: center;
  color: var(--ink-soft);
  font-weight: 600;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 22px; }
.foot-links a { text-decoration: none; transition: color 120ms ease; }
.foot-links a:hover { color: var(--ink); }

@media (max-width: 800px) {
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  .guide-hero { padding: 46px 0 30px; }
  .answer { padding: 22px 22px; }
  .prose { padding-bottom: 60px; }
  .cta-inner { padding: 36px 24px 34px; }
  .nav-cta { padding: 8px 13px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
