/* ==========================================================================
   Shared styles for /guides/ pages.
   Link from each guide's <head>:  <link rel="stylesheet" href="/guides/guide.css">
   The Tailwind CDN script and its color/font config stay inline in each page.

   Gotcha: .guide p / .guide a (specificity 0,1,1) beat plain Tailwind utilities
   inside the article, so components below use their own classes instead.

   Color roles: gold marks "you are here" (step numbers, TOC active) and the
   primary action (buttons). Callouts never use gold:
     .callout            tip / good to know (grey, royal rule)
     .callout-important  irreversible or blocking (burnt amber); keep it rare
   ========================================================================== */

html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', system-ui, sans-serif; }

/* Dot Grid Texture */
.dot-grid-dark {
    background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Focus: royal on light backgrounds, gold on navy */
a:focus-visible, button:focus-visible, summary:focus-visible {
    outline: 2px solid #004B8D;
    outline-offset: 2px;
}
.site-nav a:focus-visible, footer a:focus-visible, .cta-block a:focus-visible { outline-color: #FFB81C; }

/* ---- Nav CTA: AgentExchange (from index.html) ---- */
.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4375rem 0.875rem;
    border-radius: 9999px;
    background-color: #FFB81C;
    border: 1px solid #FFB81C;
    color: #002D54;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .25s ease, border-color .25s ease,
                box-shadow .25s ease, transform .25s ease;
}
.nav-cta:hover {
    background-color: #FFC64D;
    border-color: #FFC64D;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(255,184,28,0.45);
}
.site-nav .nav-cta:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; }
.nav-cta-arrow { width: 0.8125rem; height: 0.8125rem; flex-shrink: 0; opacity: 0.75; }
@media (min-width: 640px) {
    .nav-cta { font-size: 0.9375rem; padding: 0.5rem 1.125rem; }
}
@media (prefers-reduced-motion: reduce) {
    .nav-cta:hover { transform: none; }
}

/* ---- Table of contents: collapsible below lg, always open at lg ---- */
.toc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    cursor: pointer;
    color: #004B8D;
    font-size: 0.9375rem;
    font-weight: 700;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.25rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s ease;
}
.toc[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.toc[open] summary { margin-bottom: 0.75rem; }
.toc a {
    display: block;
    padding: 0.3rem 0 0.3rem 0.85rem;
    border-left: 2px solid #DDDBDA;
    color: #4B5563;
    font-size: 0.875rem;
    line-height: 1.4;
    transition: color .2s ease, border-color .2s ease;
}
.toc a:hover { color: #004B8D; }
.toc a.active { color: #004B8D; border-left-color: #FFB81C; font-weight: 600; }
@media (min-width: 1024px) {
    .toc summary { cursor: default; font-size: 0.875rem; }
    .toc summary::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .toc summary::after { transition: none; }
}

/* ---- Article typography ---- */
.guide { max-width: 68ch; color: #374151; font-size: 1.0625rem; line-height: 1.65; }
.guide h2 {
    font-family: 'DM Serif Display', Georgia, serif;
    color: #004B8D;
    font-size: 1.875rem;
    line-height: 1.2;
    margin: 3.5rem 0 1rem;
    scroll-margin-top: 1.5rem;
}
.guide h3 {
    color: #1C1C1C;
    font-weight: 700;
    font-size: 1.1875rem;
    line-height: 1.35;
    margin: 2rem 0 0.6rem;
    scroll-margin-top: 1.5rem;
}
.guide p { margin: 0 0 1.1rem; }
.guide ul, .guide ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
.guide ul { list-style: disc; }
.guide ol { list-style: decimal; }
.guide li { margin: 0.45rem 0; padding-left: 0.2rem; }
.guide li > ul { margin: 0.4rem 0 0.4rem; }
.guide a { color: #0070D2; text-decoration: underline; text-underline-offset: 2px; }
.guide a:hover { color: #004B8D; }
.guide strong { color: #1C1C1C; font-weight: 600; }
.guide code {
    font-size: 0.875em;
    background: #F4F6F9;
    border: 1px solid #DDDBDA;
    border-radius: 4px;
    padding: 0.1em 0.35em;
    overflow-wrap: anywhere;
}
.guide blockquote {
    margin: 1.5rem 0;
    padding: 0.25rem 0 0.25rem 1.25rem;
    border-left: 3px solid #DDDBDA;
}
.guide blockquote p {
    font-family: 'DM Serif Display', Georgia, serif;
    color: #1C1C1C;
    font-size: 1.25rem;
    line-height: 1.45;
    margin-bottom: 0.6rem;
}
.guide blockquote .quote-source {
    font-family: 'DM Sans', system-ui, sans-serif;
    color: #4B5563;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

/* ---- Step headings: the strongest mark on the page, so a reader coming
        back from Salesforce can find their place at a glance ---- */
.guide h2.step-h {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}
.step-num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-top: -0.25rem;
    border-radius: 9999px;
    background: #FFB81C;
    color: #002D54;
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.5rem;
    line-height: 1;
}
.step-tag {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    background: #EEF5FC;
    color: #004B8D;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
    vertical-align: 0.35em;
    white-space: nowrap;
}

/* Click-by-click sub-steps: plain numerals, quieter than the step heading */
.guide ol.steps { list-style: none; padding-left: 0; counter-reset: step; }
.guide ol.steps > li {
    counter-increment: step;
    position: relative;
    padding-left: 2rem;
    margin: 0.75rem 0;
}
.guide ol.steps > li::before {
    content: counter(step) ".";
    position: absolute;
    left: 0;
    width: 1.4rem;
    text-align: right;
    color: #004B8D;
    font-weight: 700;
}
.guide ol.steps[start] { counter-reset: step var(--start, 0); }

/* ---- Route strip (private-offer header): who does each step ---- */
.route { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1rem; }
.route li { position: relative; }
.route a { display: flex; align-items: flex-start; gap: 0.75rem; color: inherit; text-decoration: none; }
.route-num {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: #FFB81C;
    color: #002D54;
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.0625rem;
    line-height: 1;
}
.route-what { display: block; color: #1C1C1C; font-weight: 700; line-height: 1.35; }
.route a:hover .route-what { color: #004B8D; text-decoration: underline; text-underline-offset: 2px; }
.route-who { display: block; color: #4B5563; font-size: 0.875rem; line-height: 1.45; margin-top: 0.15rem; }
/* connector line between stops: vertical on phones, horizontal from md */
.route li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(1rem - 1px);
    top: 2.25rem;
    bottom: -0.75rem;
    width: 2px;
    background: #FFB81C;
}
@media (min-width: 768px) {
    .route { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
    .route a { flex-direction: column; gap: 0.6rem; }
    .route li:not(:last-child)::after {
        left: 2.5rem;
        right: -1rem;
        top: calc(1rem - 1px);
        bottom: auto;
        width: auto;
        height: 2px;
    }
}

/* ---- Intro panel (what you'll need / short version) ---- */
.panel {
    background: #F4F6F9;
    border: 1px solid #DDDBDA;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}
.guide .panel-label { color: #004B8D; font-weight: 700; margin-bottom: 0.5rem; }
.panel-divider { border: 0; border-top: 1px solid #DDDBDA; margin: 1.25rem 0; }
.guide .panel ul:last-child, .guide .panel ol:last-child { margin-bottom: 0; }

/* ---- Callouts ---- */
.callout {
    border-left: 4px solid #004B8D;
    background: #F4F6F9;
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-size: 1rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout-title { display: block; color: #004B8D; font-weight: 700; margin-bottom: 0.25rem; }
.callout-important { border-left-color: #B45309; background: #FFF7ED; }
.callout-important .callout-title { color: #9A3412; }

/* ---- Comparison table ---- */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid #DDDBDA; border-radius: 8px; }
.guide table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
.guide th, .guide td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid #DDDBDA; vertical-align: top; }
.guide th { background: #F4F6F9; color: #004B8D; font-weight: 700; }
.guide tr:last-child td { border-bottom: 0; }
.guide tr.highlight td { background: #EEF5FC; }
.yes { color: #157A3B; font-weight: 600; }
.meh { color: #8A5A00; font-weight: 600; }

/* ---- Screenshots ----
   Capture spec (keep both guides consistent):
   - Crop to the panel or dialog that matters, not the whole browser window.
     A full 1440px window shown in this ~680px column makes Salesforce text ~7px.
   - Capture at 2x so the cropped source is at least 1360px wide.
   - Mark the control to click with a 3px gold (#FFB81C) rounded rectangle.
   - Save as WebP in guides/images/<guide>/ and give the <img> width/height. */
.shot { margin: 1.75rem 0 2rem; }
.shot-frame {
    border: 1px solid #DDDBDA;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.05);
    background: #FFFFFF;
}
.shot-frame img { display: block; width: 100%; height: auto; }
.shot figcaption { margin-top: 0.7rem; font-size: 0.875rem; line-height: 1.5; color: #6B7280; text-align: center; }
.hero-shot { margin: 2rem 0 0; }
.hero-shot figcaption { text-align: left; color: #4B5563; }
/* Placeholder shown until the real screenshot is dropped in */
.shot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    aspect-ratio: 16 / 9;
    padding: 1.5rem;
    border: 2px dashed #C9C7C5;
    border-radius: 8px;
    background: #F4F6F9;
    color: #6B7280;
    font-size: 0.9375rem;
    text-align: center;
}
.hero-shot .shot-placeholder { background: #FFFFFF; }
.shot-placeholder .shot-num { color: #004B8D; font-weight: 700; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; }

/* ---- Buttons ---- */
a.btn-gold, .guide a.btn-gold {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    background: #FFB81C;
    color: #002D54;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .2s ease;
}
a.btn-gold:hover, .guide a.btn-gold:hover { background: #FFC64D; color: #002D54; }
.btn-gold svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.guide li > a.btn-gold { display: flex; width: fit-content; margin-top: 0.75rem; }

/* ---- Closing call to action (one per guide) ---- */
.cta-block {
    position: relative;
    overflow: hidden;
    background: #002D54;
    border-radius: 12px;
    padding: 2rem;
    margin: 2.5rem 0;
}
.cta-block::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}
.cta-block > * { position: relative; }
.guide .cta-block .cta-title {
    font-family: 'DM Serif Display', Georgia, serif;
    color: #FFFFFF;
    font-size: 1.75rem;
    line-height: 1.2;
    margin: 0 0 0.5rem;
}
.guide .cta-block p { color: rgba(255,255,255,0.8); }
.guide .cta-block .cta-body > p:last-of-type { margin-bottom: 1.5rem; }
.cta-figure { margin: 0; }
.cta-figure img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 12px 32px rgba(0,0,0,0.35); }
.cta-figure figcaption { margin-top: 0.6rem; color: rgba(255,255,255,0.7); font-size: 0.8125rem; line-height: 1.45; }
@media (min-width: 640px) {
    .cta-block { padding: 2.5rem; }
    .cta-block.has-image { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 2rem; align-items: center; }
}

/* ---- Q&A list (troubleshooting, FAQ) ---- */
.qa h3 { margin-top: 1.75rem; }
