:root {
  --white: #FFFFFF;
  --paper: #FAF8F3;          /* dark off-white for post cards */
  --ink: #14161A;            /* near-black body text */
  --ink-soft: #4A4F57;       /* secondary text */
  --royal: #1E3FAE;          /* royal blue */
  --royal-deep: #16307F;     /* hover/darker */
  --gold: #C9A227;           /* gold */
  --gold-soft: #F2E6B8;      /* highlight fill */
  --gold-line: #E4CF7A;
  --rule: #E7E3D8;           /* hairline */
  --shadow: 0 1px 2px rgba(20,22,26,.04), 0 8px 24px rgba(20,22,26,.06);
  --shadow-lift: 0 4px 8px rgba(20,22,26,.06), 0 18px 48px rgba(20,22,26,.12);
  --maxw: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--royal); text-decoration: none; }
a:hover { color: var(--royal-deep); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 56px;
  border-bottom: 1px solid var(--rule);
}
.hero .eyebrow {
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 22px;
}
.hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -.02em;
  color: var(--ink);
  max-width: 16ch;
}
.hero h1 .ital { font-style: italic; color: var(--royal); }
.hero .lede {
  margin-top: 26px;
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 56ch;
}
.hero .meta {
  margin-top: 30px;
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  font-size: .95rem;
}
.hero .meta a { font-weight: 500; }

/* ---------- Section headers ---------- */
.section { padding: 64px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 38px;
}
.section-head h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: -.01em;
}
.section-head .count {
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}

/* divider: 75% width centered */
.divider {
  width: 75%;
  margin: 8px auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line) 18%, var(--gold) 50%, var(--gold-line) 82%, transparent);
}

/* ---------- Brand voice cards ---------- */
.bv-list { display: flex; flex-direction: column; gap: 20px; }
.bv-card {
  background: var(--paper);
  border: 1.5px solid var(--gold);
  border-radius: 14px;
  padding: 22px 26px;
  cursor: pointer;
  transition: box-shadow .2s ease, transform .2s ease;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 132px 1fr auto;
  gap: 26px;
  align-items: center;
}
.bv-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.bv-card .thumb {
  width: 132px; height: 96px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}
.bv-card .bv-body { min-width: 0; }
.bv-card .brand {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-bottom: 4px;
}
.bv-card .one-line {
  color: var(--ink-soft);
  font-size: .98rem;
  margin-bottom: 12px;
}
.bv-card .traits {
  display: flex; flex-wrap: wrap; gap: 7px;
}
.bv-card .traits span {
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--royal);
  background: rgba(30,63,174,.07);
  border: 1px solid rgba(30,63,174,.15);
  padding: 4px 10px;
  border-radius: 999px;
}
.bv-card .open-cue {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
  display: flex; align-items: center; gap: 7px;
}
.bv-card .open-cue svg { width: 15px; height: 15px; }

/* ---- Web Copy card variant ---- */
.bv-webcopy { text-decoration: none; color: var(--ink); }
.bv-webcopy:hover { color: var(--ink); }
.thumb-block {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--royal), var(--royal-deep));
  color: #fff;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600; font-size: 2rem; letter-spacing: .02em;
}
.bv-tag {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: .64rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); background: rgba(201,162,39,.12);
  border: 1px solid var(--gold-line);
  padding: 3px 9px; border-radius: 999px;
  vertical-align: middle; margin-left: 9px;
}
.bv-source {
  font-size: .82rem; color: var(--ink-soft);
  margin-top: 10px; font-style: italic;
}

/* ---------- SEO grid ---------- */
.seo-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.seo-tile {
  flex: 0 1 calc((100% - 40px) / 3);
  max-width: calc((100% - 40px) / 3);
}
.seo-tile {
  background: var(--paper);
  border: 1.5px solid var(--royal);
  border-radius: 12px;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s ease, transform .18s ease;
  box-shadow: var(--shadow);
  color: var(--ink);
}
.seo-tile:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); color: var(--ink); }
.seo-tile .seo-client {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--royal);
  margin-bottom: 9px;
}
.seo-tile .seo-loc { color: var(--ink-soft); font-weight: 600; letter-spacing: .04em; }
.seo-tile .seo-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.04rem;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -.005em;
  margin-bottom: 14px;
  flex: 1;
}
.seo-tile .seo-stats {
  display: flex;
  gap: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--rule);
  margin-top: auto;
}
.seo-tile .stat .num {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink);
  display: block;
  line-height: 1.1;
}
.seo-tile .stat .lbl {
  font-size: .66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.seo-tile .seo-pub {
  font-size: .72rem;
  color: var(--ink-soft);
  margin-top: 11px;
}
.seo-tile.no-stats .seo-pub {
  padding-top: 13px;
  border-top: 1px solid var(--rule);
  margin-top: auto;
}
.seo-tile .seo-arrow {
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--royal);
  margin-top: 12px;
  display: flex; align-items: center; gap: 6px;
}

@media (max-width: 1080px) {
  .seo-tile { flex-basis: calc((100% - 20px) / 2); max-width: calc((100% - 20px) / 2); }
}
@media (max-width: 680px) {
  .seo-tile { flex-basis: 100%; max-width: 100%; }
}

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--rule);
  padding: 44px 0 60px;
  margin-top: 36px;
  color: var(--ink-soft);
  font-size: .92rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.foot .foot-name {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  color: var(--ink);
  font-size: 1.05rem;
}
.foot a { font-weight: 500; }

/* =====================================================
   OVERLAY READER (the signature feature)
   ===================================================== */
.overlay {
  position: fixed; inset: 0;
  background: rgba(20,22,26,.5);
  backdrop-filter: blur(3px);
  z-index: 100;
  opacity: 0; visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
  display: flex; justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
}
.overlay.open { opacity: 1; visibility: visible; }
.reader {
  background: var(--white);
  width: 100%;
  max-width: 1140px;
  border-radius: 16px;
  box-shadow: var(--shadow-lift);
  align-self: flex-start;
  transform: translateY(14px);
  transition: transform .3s cubic-bezier(.2,.7,.3,1);
  overflow: hidden;
}
.overlay.open .reader { transform: translateY(0); }

.reader-top {
  position: sticky; top: 0;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  padding: 20px 34px;
  display: flex;
  align-items: center;
  gap: 18px;
  z-index: 5;
}
.reader-top .rt-brand {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
}
.reader-top .rt-live {
  font-size: .82rem; font-weight: 600;
  letter-spacing: .04em;
  padding: 7px 14px;
  border: 1px solid var(--royal);
  border-radius: 999px;
  color: var(--royal);
}
.reader-top .rt-live:hover { background: var(--royal); color: #fff; }
.reader-top .rt-spacer { flex: 1; }
.reader-top .rt-close {
  background: var(--paper);
  border: 1px solid var(--rule);
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.reader-top .rt-close:hover { background: var(--gold-soft); }

/* brand voice framework banner at top of reader */
.voice-banner {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 28px 34px 30px;
}
.voice-banner .vb-label {
  font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin-bottom: 12px;
}
.voice-banner .vb-line {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.2rem; line-height: 1.4; font-weight: 500;
  color: var(--ink); margin-bottom: 20px; max-width: 80ch;
}
.voice-banner .vb-traits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 26px;
}
.voice-banner .vb-trait { display: flex; gap: 11px; }
.voice-banner .vb-trait .vb-num {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600; color: var(--gold);
  font-size: 1rem; flex-shrink: 0; line-height: 1.5;
}
.voice-banner .vb-trait .vb-t-title { font-weight: 700; font-size: .92rem; }
.voice-banner .vb-trait .vb-t-body { font-size: .86rem; color: var(--ink-soft); }

/* the annotated document body + margin */
.reader-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  position: relative;
}
.doc {
  padding: 40px 44px 64px;
  min-width: 0;
}
.doc h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.1rem; font-weight: 600; line-height: 1.12;
  letter-spacing: -.015em; margin-bottom: 24px;
}
.doc h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.4rem; font-weight: 600;
  margin: 34px 0 14px; letter-spacing: -.01em;
}
.doc h3 {
  font-size: 1.02rem; font-weight: 700;
  margin: 22px 0 8px; color: var(--ink);
}
.doc p { margin-bottom: 14px; color: var(--ink); }
.doc ul, .doc ol { margin: 0 0 16px 1.3em; }
.doc li { margin-bottom: 7px; }
.doc table {
  width: 100%; border-collapse: collapse; margin: 16px 0 22px;
  font-size: .86rem;
}
.doc th, .doc td {
  border: 1px solid var(--rule); padding: 9px 12px;
  text-align: left; vertical-align: top;
}
.doc th { background: var(--paper); font-weight: 700; }

/* the highlight */
.doc mark {
  background: var(--gold-soft);
  border-bottom: 2px solid var(--gold);
  padding: 1px 2px;
  border-radius: 2px;
  cursor: pointer;
  transition: background .15s;
  scroll-margin-top: 90px;
}
.doc mark:hover, .doc mark.active {
  background: var(--gold-line);
}

/* margin rail */
.rail {
  border-left: 1px solid var(--rule);
  background: #FCFBF7;
  padding: 40px 22px 64px;
  position: relative;
}
.rail-label {
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 700; margin-bottom: 8px;
}
.note-card {
  position: absolute;
  left: 22px; right: 22px;
  background: var(--white);
  border: 1px solid var(--royal);
  border-left: 3px solid var(--royal);
  border-radius: 8px;
  padding: 11px 13px;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: top .25s cubic-bezier(.2,.7,.3,1), box-shadow .15s, border-color .15s;
}
.note-card.active {
  border-color: var(--gold);
  border-left-color: var(--gold);
  box-shadow: var(--shadow-lift);
}
.note-card .nc-tag {
  font-size: .66rem; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 700; color: var(--royal); margin-bottom: 3px;
}
.note-card.active .nc-tag { color: var(--gold); }

@media (max-width: 900px) {
  .reader-body { grid-template-columns: 1fr; }
  .rail { display: none; }
  /* on narrow widths, notes inline under the highlight */
  .doc mark { position: relative; }
}
