/* Sample guide (/sample-guide/). Values are from docs/mockups/guide.html. Bands carry `sg-sec` (Xcelsior_Page_Assets loads this file only
   where it is used, and the editor canvas loads it too). The client's accent is a token, so the whole sample can carry another client's colour. */
:root { --client-accent: #3d3a72; --client-accent-wash: #3d3a7214; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --client-accent: #a9a5ee; --client-accent-wash: #a9a5ee1f; } }
:root[data-theme="dark"] { --client-accent: #a9a5ee; --client-accent-wash: #a9a5ee1f; }

/* The guide's header bar and the sample notice are full-bleed: cancel the body gutter and put it back as padding so the content stays aligned (same method as the CTA strips in base.css). */
body:not(.editor-styles-wrapper) :is(.sg-bar, .sample-bar) { margin-inline: calc(-1 * var(--gutter-l)) calc(-1 * var(--gutter-r)); padding-inline: var(--gutter-l) var(--gutter-r); }

/* The guide's own header, under the site's header: the client's icon and name, the section links, "Prepared by Xcelsior". */
.sg-bar { border-bottom: 1px solid var(--hairline); }
.sg-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 0.75rem; }
.g-brand { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--ink); }
.g-brand figure { margin: 0; }
.g-brand .g-logo, .g-brand .g-logo img { height: 2.75rem; width: 2.75rem; display: block; border-radius: 0.5rem; }
.g-brand .g-brand-t { margin: 0; font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; letter-spacing: -0.01em; }
.sg-nav { margin-inline: auto 0; }
.sg-links { display: flex; align-items: center; gap: 2rem; margin: 0; }
@media (max-width: 60rem) { .sg-links { display: none; } }
.by { display: inline-flex; align-items: center; gap: 0.625rem; color: var(--ink-muted); font-size: 1rem; }
.by svg { height: 2.5rem; width: auto; }
@media (max-width: 40rem) { .by .by-t { display: none; } }
.sample-bar { background: var(--client-accent-wash); border-bottom: 1px solid var(--hairline); }
.sample-bar p { margin: 0; padding: 0.625rem 0; font-size: 1rem; text-wrap: pretty; }
.sample-bar strong { font-family: var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; }

/* Sections. */
.band[id] { scroll-margin-top: 5rem; }
.g-eyebrow { color: var(--client-accent); font-family: var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; font-size: 1rem; margin: 0; }
.sg-sec h2.h1 { margin: 1rem 0 3rem; }
.sg-sec h2.h1.sg-h2-lead { margin-bottom: 1.25rem; }
.sg-sec h2.sg-wide { max-width: 56rem; }
.sg-sec .sg-lead { max-width: 40rem; margin: 0 0 3rem; }
.sg-hero { padding-bottom: 3rem; }
.sg-h1 { font-size: 4.5rem; margin: 1.5rem 0; max-width: 52rem; }
@media (max-width: 48rem) { .sg-h1 { font-size: 3.25rem; } }
.sg-sec .sg-hero .sg-lead { margin-bottom: 3rem; }
.sg-copy .sg-p { margin: 0 0 1.25rem; }
.sg-copy .sg-p:last-child { margin-bottom: 0; }
.sg-help { max-width: 42rem; margin: 0 0 1.25rem; }
.sg-help:last-child { margin: 0; }
.sg-sec .sg-meta { margin: 0 0 1.25rem; font-size: 0.875rem; color: var(--ink-muted); }

/* Cards. */
.g-icon, .g-card .icon { color: var(--client-accent); }
.g-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 40rem) { .g-grid.g-2, .g-grid.g-3, .g-grid.g-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .g-grid.g-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 40rem) { .g-grid.g-8 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 100rem) { .g-grid.g-8 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 80rem) { .g-grid.g-4 { grid-template-columns: repeat(4, 1fr); } }
.g-card { display: flex; flex-direction: column; box-sizing: border-box; padding: 1.5rem; background: var(--surface-200); border: 1px solid var(--hairline); border-radius: var(--radius-xs); }
.g-card .g-head { display: flex; align-items: center; gap: 1rem; margin: 0 0 0.75rem; min-height: 3.5rem; }
.g-card .g-head .icon { flex: none; width: 2.5rem; font-size: 2.25rem; line-height: 1; text-align: center; overflow: hidden; }
.g-card h2, .g-card h3 { margin: 0; }
.g-card p { margin: 0; color: var(--ink-muted); text-wrap: pretty; }
.g-card .g-where { margin-top: auto; padding-top: 1rem; font-size: 1rem; color: var(--ink); }
.g-card .g-where strong { font-family: var(--font-display); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--client-accent); font-size: 0.875rem; margin-right: 0.5rem; }

/* Walkthrough: one panel per task, steps in one column. A step is a numbered badge, a short title, one detail line and a screenshot under it. */
.g-walk { display: grid; gap: 1.5rem; margin: 0 0 3rem; padding: 2rem; border: 1px solid var(--hairline); border-radius: var(--radius-xs); background: linear-gradient(0deg, var(--gold-wash), transparent 60%), var(--surface-200); }
.g-walk .sg-walk-title { margin: 1rem 0 1.5rem; }
.g-walk .g-steps { display: grid; gap: 2.5rem; counter-reset: s; }
.g-walk .g-step { counter-increment: s; position: relative; min-width: 0; padding-left: 3.5rem; }
.g-walk .g-step::before { content: counter(s); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 1px solid var(--client-accent); border-radius: 50%; color: var(--client-accent); font-family: var(--font-display); font-weight: 600; }
.g-walk .g-step-t { margin: 0; font-family: var(--font-text); font-weight: 700; font-size: 1.4625rem; line-height: 1.4; min-height: 2.5rem; }
.g-walk .g-step-d { margin: 0.5rem 0 0; max-width: 40rem; text-wrap: pretty; }
.g-walk .g-step-shot { margin: 1rem 0 0; max-width: 47.5rem; border: 1px solid var(--control-border); border-radius: 0.5rem; overflow: hidden; background: #fff; }
/* No width here: the width attribute sets the size (and the space kept before the picture loads); max-width keeps it inside the column. */
.g-walk .g-step-shot img { display: block; max-width: 100%; height: auto; }
.g-walk .g-step-shot figcaption { margin: 0; padding: 0.5rem 0.75rem; font-size: 0.875rem; color: var(--ink-muted); background: var(--surface-200); border-top: 1px solid var(--hairline); }
.g-walk .sg-after { margin: 0; max-width: 40rem; }
@media (max-width: 44rem) { .g-walk { padding: 1.25rem; } .g-walk .g-step { padding-left: 0; padding-top: 3.25rem; } .g-walk .g-step::before { top: 0; } .g-walk .g-step-t { min-height: 0; font-size: 1.25rem; } }

/* Screenshots. The replacement wireframes are light grey drawings: in the dark theme they are inverted so they do not glare (as the Work wireframe is). */
.g-shot { margin: 0; border: 1px solid var(--control-border); border-radius: var(--radius-xs); overflow: hidden; background: #fff; }
.g-shot img { display: block; width: 100%; height: auto; }
.g-shot figcaption { margin: 0; padding: 0.75rem 1rem; background: var(--surface-200); border-top: 1px solid var(--hairline); font-size: 1rem; color: var(--ink-muted); text-wrap: pretty; }
.g-shot figcaption { display: flex; align-items: center; }
:root[data-theme="dark"] img[src*="guide-wireframe"] { filter: invert(0.88); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img[src*="guide-wireframe"] { filter: invert(0.88); } }
.rel { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 48rem) { .rel { grid-template-columns: repeat(2, 1fr); align-items: flex-start; } }

/* Layers diagram and two-column rows. */
.g-two { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: start; }
@media (min-width: 64rem) { .g-two { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }
.g-two > * { min-width: 0; }
.diagram { width: 100%; height: auto; display: block; }
.diagram text { font-family: var(--font-text); fill: var(--ink); font-size: 14px; }
.diagram .dt-m { fill: var(--ink-muted); font-size: 12px; }
.diagram .dbox { fill: var(--surface-200); stroke: var(--control-border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.diagram .dacc { fill: var(--client-accent-wash); stroke: var(--client-accent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.diagram .dgold { fill: var(--gold-wash); stroke: var(--gold); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.diagram .dline { stroke: var(--wf-stroke); stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; stroke-dasharray: 4 4; }

/* Key pages table. */
.g-table { margin: 0; }
.g-table table { margin: 0; width: 100%; border-collapse: collapse; border: 0; }
.g-table th, .g-table td { text-align: left; padding: 1rem 1rem 1rem 0; border: 0; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.g-table th { font-family: var(--font-display); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; font-size: 1rem; color: var(--ink-muted); }
.g-table td:first-child { font-family: var(--font-display); font-size: 1.125rem; white-space: nowrap; }
.g-table code { font-size: 1rem; color: var(--client-accent); word-break: break-all; }
@media (max-width: 40rem) { .g-table td:first-child { white-space: normal; } }

/* Safe to do / ask first. */
.g-col h3 { margin: 0 0 1rem; }
.g-list { margin: 0; padding: 0; list-style: none; }
.g-list li { display: flex; gap: 0.75rem; padding: 0.75rem 0; border-top: 1px solid var(--hairline); text-wrap: pretty; }
.g-list li:last-child { border-bottom: 1px solid var(--hairline); }
.g-list .icon { flex: none; font-size: 1.75rem; width: 1.75rem; }
.g-ok .icon, .g-no .icon { color: var(--client-accent); }

/* The closing band is a plain section in the mockup: a 1px top rule and a gold wash rising from the bottom, not the shared band's 2px gold rule. */
.final-cta:has(.sg-closing) { background: linear-gradient(0deg, var(--gold-wash), transparent 60%), var(--surface-200) !important; border-top: 1px solid var(--control-border) !important; }

/* The walkthrough title: the mockup's heading has no .h2 rule of its own there, so it draws as a bold body-font h3 (23.4px, line height 1.6). */
.sg-walk-title.h2 { font-family: var(--font-text); font-weight: 700; font-size: 1.4625rem; line-height: 1.6; }

/* The mockup's bar holds the theme toggle (3rem tall) in its row; here the site header has it, so keep the row (3rem button plus the row padding, border-box) as tall where the section links are hidden. */
@media (max-width: 60rem) { .sg-bar-in { min-height: 4.5rem; } }

/* Tap to enlarge a walkthrough screenshot (assets/js/case-lightbox.js, scoped to .g-step-shot). The button and caption rules are those of case-study.css. */
.g-walk .g-step-shot { position: relative; }
.xc-lb-open { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.xc-lb-open:focus-visible { outline: 2px solid var(--gold-text); outline-offset: -4px; }
.pswp .pswp__xc-caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding: 0.75rem 1.25rem 1rem; text-align: center; font: 400 1rem/1.5 var(--font-body, system-ui, sans-serif); color: #fff; background: rgba(0, 0, 0, 0.6); pointer-events: none; }
.pswp .pswp__xc-caption:empty { display: none; }
.xc-lb-open:hover, .xc-lb-open:focus, .xc-lb-open:active { background: transparent; color: inherit; }
/* The focus ring sits over a picture that may be white or dark: a dark line at the edge and a white band inside it show on both. */
.g-walk .g-step-shot .xc-lb-open:focus-visible { outline: 3px solid #1f1f1f; outline-offset: -3px; box-shadow: inset 0 0 0 6px #fff; }
