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

  :root {
    --bg:           #def1f7;   /* pixel-sampled from screenshot bg */
    --teal:         #3992b4;   /* hero badge / primary accent */
    --teal-circle:  #66a9c4;   /* section number circles */
    --teal-link:    #6291a5;   /* TOC links */
    --teal-sub:     #3a94b6;   /* sub-section labels */
    --teal-lt:      #e7f5f8;   /* inner card backgrounds */
    --nav-dot:      #8acbdd;   /* nav brand dot */
    --white:        #ffffff;
    --dark:         #1a2d31;   /* body text - pixel sampled */
    --mid:          #4a6878;   /* secondary text */
    --lt:           #7a9aaa;   /* muted / captions */
    --card-sh:      0 1px 4px rgba(0,0,0,0.06), 0 0 1px rgba(0,0,0,0.04);
    --radius:       10px;
    --amber-bg:     #fef9e7;
    --amber-bd:     #f0c040;
    --amber-tx:     #6a5000;
  }

  body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background: var(--bg);
    color: var(--dark);
    font-size: 16px;
    line-height: 1.65;
    min-height: 100vh;
    padding-left: 280px;
  }

  /* ─── NAV ─── */
  .nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 52px;
    background: var(--white);
    border-bottom: 1px solid #ddeaf2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 200;
    gap: 16px;
  }

  .nav-desc {
    font-size: 13px;
    color: var(--mid);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
    color: #334156;
    letter-spacing: 0.1px;
  }

  .nav-dot {
    width: 16px; height: 16px;
    background: var(--nav-dot);
    border-radius: 4px;
    flex-shrink: 0;
  }

  .nav-pill {
    background: var(--teal);
    color: var(--white);
    border: none;
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: default;
    letter-spacing: 0.2px;
  }

  /* ─── LAYOUT ─── */
  main {
    max-width: 900px;
    margin: 0 auto;
    padding: 72px 24px 80px;
  }

  /* ─── HERO ─── */
  .hero {
    text-align: center;
    margin-bottom: 28px;
  }

  .hero-badge {
    display: inline-block;
    background: var(--teal);
    color: var(--white);
    font-size: 13.5px;
    font-weight: 600;
    padding: 4px 13px;
    border-radius: 20px;
    margin-bottom: 14px;
    letter-spacing: 0.3px;
  }

  .hero h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.25;
    margin-bottom: 10px;
  }

  .hero p {
    font-size: 15.5px;
    color: var(--mid);
    line-height: 1.65;
    max-width: 500px;
    margin: 0 auto;
  }

  /* ─── WIP BANNER ─── */
  .wip-banner {
    background: var(--amber-bg);
    border: 1px solid var(--amber-bd);
    border-radius: 8px;
    padding: 9px 16px;
    margin-bottom: 24px;
    font-size: 14.5px;
    color: var(--amber-tx);
    text-align: center;
    font-weight: 500;
  }

  /* ─── TOC ─── */
  .toc {
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 28px;
    box-shadow: var(--card-sh);
  }

  .toc-heading {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--lt);
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #c8e8f0;
  }

  .toc ol {
    padding-left: 0;
    list-style: none;
    counter-reset: toc-counter;
  }

  .toc ol li {
    counter-increment: toc-counter;
    padding: 3px 0;
  }

  .toc ol li::before {
    content: counter(toc-counter) ". ";
    color: var(--lt);
    font-weight: 500;
    font-size: 15px;
    margin-right: 2px;
  }

  .toc a {
    color: var(--teal-link);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
  }

  .toc a:hover { text-decoration: underline; }

  /* ─── SECTION ─── */
  .section { margin-bottom: 28px; scroll-margin-top: 72px; }

  .section-header {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 10px;
  }

  .section-num {
    width: 38px; height: 38px;
    background: var(--teal-circle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 17px;
    font-weight: 700;
    flex-shrink: 0;
  }

  .section-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
  }

  .section-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--card-sh);
  }

  .section-card p + p { margin-top: 11px; }

  /* ─── INNER ELEMENTS ─── */
  .sub-label {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: var(--teal-sub);
    margin: 20px 0 8px;
  }

  .sub-label:first-child { margin-top: 4px; }

  /* two-col cards */
  .card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 14px 0;
  }

  .inner-card {
    background: var(--teal-lt);
    border-radius: 8px;
    padding: 15px 16px;
  }

  .inner-card-icon { font-size: 18px; margin-bottom: 7px; display: block; }

  .inner-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 5px;
  }

  .inner-card-text {
    font-size: 14.5px;
    color: var(--mid);
    line-height: 1.5;
  }

  /* note/warning boxes */
  .note {
    background: var(--teal-lt);
    border-left: 3px solid var(--teal-circle);
    border-radius: 0 6px 6px 0;
    padding: 11px 15px;
    margin: 14px 0;
    font-size: 15px;
    color: #1a4255;
    line-height: 1.55;
  }

  .warning {
    background: var(--amber-bg);
    border-left: 3px solid var(--amber-bd);
    border-radius: 0 6px 6px 0;
    padding: 11px 15px;
    margin: 14px 0;
    font-size: 15px;
    color: var(--amber-tx);
    line-height: 1.55;
  }

  /* comparison table */
  .compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    margin: 14px 0;
  }

  .compare-table thead th {
    background: var(--teal-circle);
    color: var(--white);
    padding: 9px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 14.5px;
  }

  .compare-table thead th:first-child { border-radius: 6px 0 0 0; }
  .compare-table thead th:last-child  { border-radius: 0 6px 0 0;  }

  .compare-table tbody td {
    padding: 9px 14px;
    border-bottom: 1px solid #cce8f0;
    color: var(--mid);
    vertical-align: top;
    line-height: 1.5;
  }

  .compare-table tbody tr:nth-child(even) td { background: var(--teal-lt); }
  .compare-table tbody tr:last-child td { border-bottom: none; }
  .compare-table tbody td:first-child { color: var(--dark); font-weight: 600; }

  .compare-table .span-cell {
    text-align: center;
    color: var(--teal);
    font-weight: 600;
  }

  /* disposition list */
  .disp-list { margin: 14px 0; }

  .disp-row {
    display: grid;
    grid-template-columns: 175px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #cce8f0;
    align-items: start;
  }

  .disp-row:last-child { border-bottom: none; }

  .disp-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--dark);
    padding-top: 1px;
  }

  .disp-desc {
    font-size: 15px;
    color: var(--mid);
    line-height: 1.55;
  }

  /* detail paragraphs inside card */
  .detail-block { margin-top: 13px; }

  .detail-block strong {
    color: var(--dark);
    display: block;
    margin-bottom: 2px;
  }

  /* arrow list */
  ul.arrow-list {
    list-style: none;
    margin: 10px 0;
  }

  ul.arrow-list li {
    padding: 4px 0 4px 20px;
    position: relative;
    font-size: 15.5px;
    color: var(--mid);
  }

  ul.arrow-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--teal-sub);
    font-weight: 700;
  }

  /* ─── FOOTER ─── */
  footer {
    text-align: center;
    font-size: 14px;
    color: var(--lt);
    padding: 28px 20px 32px;
    border-top: 1px solid #b8ceda;
    max-width: 900px;
    margin: 0 auto;
  }

  footer a { color: var(--teal-link); text-decoration: none; }

  /* ─── RESPONSIVE ─── */
  .toc-chapter {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #334156;
    margin: 14px 0 4px;
    padding-top: 12px;
    border-top: 1px solid #c8e8f0;
  }

  .toc-chapter:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }

  .chapter-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 48px 0 28px;
  }

  .chapter-divider-line {
    flex: 1;
    height: 1px;
    background: #b8d8e4;
  }

  .chapter-divider-label {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #334156;
    white-space: nowrap;
  }

  .pipeline-row {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 0;
    margin: 6px 0;
    align-items: stretch;
  }

  .pipeline-stages {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 4px;
  }

  .stage-pill {
    background: var(--teal-lt);
    border: 1px solid #b8dde8;
    border-radius: 20px;
    padding: 3px 11px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .stage-arrow {
    color: var(--lt);
    font-size: 13px;
    align-self: center;
  }

  .workflow-badge {
    display: inline-block;
    background: var(--teal-circle);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 12px;
    margin-bottom: 6px;
  }

  .workflow-badge.draft {
    background: #b0c8d4;
  }

  .status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 6px;
  }

  .status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .status-dot.published { background: #4caf7d; }
  .status-dot.draft     { background: #b0c8d4; }

  .status-label {
    font-size: 13.5px;
    color: var(--mid);
    font-weight: 500;
  }

  .cal-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #cce8f0;
  }

  .cal-row:last-child { border-bottom: none; }

  .cal-icon {
    width: 36px; height: 36px;
    background: var(--teal-lt);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
  }

  .cal-info { flex: 1; }

  .cal-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
  }

  .cal-meta {
    font-size: 14px;
    color: var(--mid);
    line-height: 1.5;
  }

  .template-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 14px 0;
  }

  .template-card {
    background: var(--teal-lt);
    border-radius: 8px;
    padding: 14px 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }

  .template-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
  }

  .template-name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.35;
  }

  .template-type {
    font-size: 13px;
    color: var(--lt);
    margin-top: 2px;
  }


  .ghl-mock {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #d0dde6;
    margin: 20px 0 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  }
  .ghl-mock-caption {
    font-size: 12px;
    color: var(--lt);
    text-align: center;
    margin-bottom: 16px;
    font-style: italic;
  }
  .ghl-titlebar {
    background: #1a1f36;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .ghl-dots { display: flex; gap: 5px; }
  .ghl-dot { width: 9px; height: 9px; border-radius: 50%; }
  .ghl-urlbar {
    flex: 1;
    background: #0d1124;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 10px;
    color: #6b7280;
    text-align: center;
  }
  .ghl-body {
    background: #ffffff;
    display: flex;
  }
  .ghl-sidenav {
    width: 48px;
    background: #1a1f36;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    gap: 4px;
    flex-shrink: 0;
  }
  .ghl-nav-icon {
    width: 32px; height: 32px;
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    color: #6b7ea8;
    font-size: 14px;
    cursor: pointer;
  }
  .ghl-nav-icon.active { background: #3a4a8a; color: #93a8f0; }
  .ghl-nav-icon.brand { background: #ff6b35; color: white; margin-bottom: 6px; font-weight: 700; font-size: 10px; }
  .ghl-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
  .ghl-topbar {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .ghl-page-title { font-size: 14px; font-weight: 600; color: #111827; }
  .ghl-page-sub { font-size: 11px; color: #9ca3af; margin-top: 1px; }
  .ghl-btn-primary {
    background: #1a6fe8; color: white; border: none;
    border-radius: 6px; padding: 6px 12px; font-size: 11px;
    font-weight: 500; cursor: pointer;
  }
  .ghl-content { flex: 1; }
  .ghl-filter-bar {
    padding: 8px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex; align-items: center; gap: 8px;
  }
  .ghl-search {
    background: #f9fafb; border: 1px solid #e5e7eb;
    border-radius: 5px; padding: 5px 10px; font-size: 11px;
    color: #9ca3af; flex: 1; max-width: 220px;
  }
  .ghl-chip {
    border-radius: 20px; padding: 3px 10px;
    font-size: 10px; font-weight: 500;
  }
  .ghl-chip.active { background: #dbeafe; color: #1d4ed8; }
  .ghl-chip.inactive { background: #f3f4f6; color: #6b7280; }
  .ghl-folder-label {
    padding: 6px 16px 3px;
    font-size: 9px; font-weight: 600;
    color: #9ca3af; letter-spacing: 0.6px;
    text-transform: uppercase;
  }
  .ghl-row {
    padding: 8px 16px;
    display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid #f9fafb;
    font-size: 12px;
  }
  .ghl-row:last-child { border-bottom: none; }
  .ghl-row.alt { background: #fafafa; }
  .ghl-status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
  .ghl-row-name { flex: 1; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ghl-badge {
    font-size: 10px; border-radius: 4px; padding: 2px 7px; flex-shrink: 0;
  }
  .ghl-badge.pub { color: #15803d; background: #dcfce7; }
  .ghl-badge.draft { color: #6b7280; background: #f3f4f6; }
  .ghl-ver { font-size: 10px; color: #d1d5db; flex-shrink: 0; }

  @media(max-width:560px) {
    .template-grid { grid-template-columns: 1fr; }
    .pipeline-stages .stage-arrow { display: none; }
  }

  /* ─── SIDEBAR ─── */
  .sidebar {
    position: fixed;
    top: 52px;
    left: 0;
    width: 280px;
    height: calc(100vh - 52px);
    overflow-y: auto;
    background: var(--white);
    border-right: 1px solid #ddeaf2;
    padding: 18px 20px 40px;
    z-index: 150;
  }

  .sidebar::-webkit-scrollbar { width: 4px; }
  .sidebar::-webkit-scrollbar-thumb { background: #c8e0ea; border-radius: 4px; }

  .sidebar .toc-heading {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--lt);
    padding-bottom: 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid #c8e8f0;
  }

  .sidebar .toc-chapter {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    color: #334156;
    margin: 14px 0 4px;
    padding-top: 12px;
    border-top: 1px solid #c8e8f0;
  }

  .sidebar .toc-chapter:first-of-type {
    border-top: none;
    margin-top: 2px;
    padding-top: 0;
  }

  .sidebar ol {
    list-style: none;
    padding-left: 0;
    counter-reset: toc-counter;
  }

  .sidebar ol li {
    counter-increment: toc-counter;
    padding: 2px 0;
  }

  .sidebar ol li::before {
    content: counter(toc-counter) ". ";
    color: var(--lt);
    font-size: 16px;
    font-weight: 500;
  }

  .sidebar a {
    color: var(--teal-link);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
  }

  .sidebar a:hover { text-decoration: underline; }

  @media (max-width: 860px) {
    .sidebar { display: none !important; }
    body { padding-left: 0; }
  }

  /* ── AUTH ── */
  nav, main, footer, .sidebar { display: none; }
  body.authed nav  { display: flex; }
  body.authed main, body.authed footer { display: block; }
  body.authed .sidebar { display: block; }

  #auth-gate {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
  }
  #auth-gate.hidden { display: none; }
  #auth-gate-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--teal-link);
    letter-spacing: 0.1px;
    margin-bottom: 28px;
  }
  .nav-pill-outline {
    background: transparent;
    color: var(--teal);
    border: 1.5px solid var(--teal);
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.2px;
  }
  .nav-pill-outline:hover { background: var(--teal-lt); }
  .cl-badge, [class*="cl-badge"] { display: none !important; }
  body.authed { -webkit-user-select: none; user-select: none; }
  body.authed img { pointer-events: none; -webkit-user-drag: none; }

/* ── Journey Map ─────────────────────────────────────────────── */
.jm { max-width: 660px; margin: 0 auto; }
.jm-c { display: flex; flex-direction: column; align-items: center; }
.jm-b {
  border-radius: 9px; padding: 8px 13px;
  font-size: 12.5px; font-weight: 600; text-align: center;
  line-height: 1.35; border: 1.5px solid transparent;
  display: flex; flex-direction: column; align-items: center;
}
.jm-s { font-size: 11px; font-weight: 400; margin-top: 2px; opacity: 0.8; }
.jm-v { width: 2px; background: #cbd5e1; flex-shrink: 0; }
.jm-v-lg { height: 22px; }
.jm-v-sm { height: 12px; }
.jm-fork { position: relative; width: 100%; }
.jm-hbar { position: absolute; height: 2px; background: #cbd5e1; }
.jm-drop { position: absolute; width: 2px; background: #cbd5e1; }
.jm-wk { background: #dcfce7; color: #14532d; border: 1.5px solid #86efac; border-radius: 20px; padding: 4px 10px; font-size: 11.5px; font-weight: 600; }
.jm-entry    { background: #0d9488; color: #fff; border-color: #0d9488; }
.jm-proc     { background: #dbeafe; color: #1e3a5f; border-color: #93c5fd; }
.jm-disp     { background: #e0e7ff; color: #312e81; border-color: #a5b4fc; }
.jm-conv     { background: #dcfce7; color: #14532d; border-color: #86efac; }
.jm-postsale { background: #fef3c7; color: #78350f; border-color: #fde68a; }
.jm-retain   { background: #ede9fe; color: #4c1d95; border-color: #c4b5fd; }
.jm-reengage { background: #fee2e2; color: #7f1d1d; border-color: #fca5a5; }
.jm-exit     { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; font-weight: 400; }
.jm-nurture  { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.jm-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: center; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.jm-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--mid); }
.jm-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex-shrink: 0; border: 1.5px solid transparent; }
