/* ==========================================================================
   FILE 4: content-page.css — Informational Topic Pages, Code Cards & Contact
   ==========================================================================
   HOW THIS FILE WORKS:
   - Powers all 12 Informational Service/Topic Pages (service.php) and Contact (contact.php).
   - Also supports Topic-Specific Custom Overrides at the bottom using the
     `body[data-topic="slug"]` attribute on `<body>`, OR you can drop a custom
     stylesheet into `assets/css/topics/{slug}.css` (e.g. `generators.css`) and
     `header.php` will automatically load it for that specific page!
   ========================================================================== */

/* ==========================================================================
   1. Compact Topic Title Header Bar (No Marketing Hero on Content Pages)
   ========================================================================== */
.topic-header-bar {
    background-color: var(--bg-topic-banner);
    color: var(--text-on-dark);
    padding: 1.65rem 0;
    border-bottom: 3px solid var(--brand-blue);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-on-dark-muted);
    margin-bottom: 0.65rem;
}

.breadcrumbs a {
    color: #93C5FD;
}

.breadcrumbs a:hover {
    color: var(--brand-orange-bright);
}

.breadcrumbs__sep {
    opacity: 0.45;
}

.topic-header-bar__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.topic-header-bar__title {
    font-family: var(--font-display);
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    font-weight: 700;
    color: #FAF8F5;
    line-height: 1.15;
}

.topic-header-bar__subtitle {
    color: var(--text-on-dark-muted);
    font-size: 1rem;
    margin-top: 0.4rem;
    max-width: 780px;
}

.topic-header-bar__badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.topic-meta-pill {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 4px;
    background-color: rgba(234, 88, 12, 0.2);
    border: 1px solid rgba(249, 115, 22, 0.5);
    color: #FDBA74;
}

.topic-meta-pill--blue {
    background-color: rgba(29, 78, 216, 0.25);
    border-color: rgba(96, 165, 250, 0.45);
    color: #93C5FD;
}

/* ==========================================================================
   2. Content Page Grid (Left 52px Sticky Scroll-Spy Rail + Main Article + Right Sidebar)
   ========================================================================== */
.topic-layout {
    padding: 2.75rem 0 4.5rem;
}

.topic-layout .container {
    max-width: 1320px;
}

.topic-layout__grid {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 330px;
    gap: 1.5rem 2rem;
    align-items: start;
}

.topic-article {
    min-width: 0;
}

/* ==========================================================================
   2A. Left Sticky Scroll-Spy Rail & Quick Jump Popover (.scroll-spy-rail)
   - Compact 52px vertical rail pinned on the left side (`position: sticky`).
   - Tracks current reading section (`01`, `02`, `03`, `NEC`) in real time.
   - Expands a floating Quick Jump popover on hover or click.
   ========================================================================== */
.scroll-spy-rail {
    position: sticky;
    top: 122px;
    z-index: 45;
    width: 52px;
}

.scroll-spy-rail__bar {
    background-color: var(--bg-header);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-top: 3px solid var(--brand-orange);
    border-radius: 10px;
    padding: 0.55rem 0.35rem 0.7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
}

.scroll-spy-rail__toggle {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    color: #FAF8F5;
    padding: 0.35rem 0.15rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.18rem;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.scroll-spy-rail__toggle:hover,
.scroll-spy-rail.is-open .scroll-spy-rail__toggle {
    background-color: rgba(234, 88, 12, 0.25);
    border-color: var(--brand-orange-bright);
    color: #FDBA74;
}

.scroll-spy-rail__toggle-label {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.scroll-spy-rail__track-wrap {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.scroll-spy-rail__line {
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    background-color: rgba(255, 255, 255, 0.14);
    border-radius: 3px;
    overflow: hidden;
    z-index: 1;
}

.scroll-spy-rail__line-fill {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--brand-orange-bright) 0%, #3B82F6 100%);
    transition: height 0.2s ease;
}

.scroll-spy-rail__nodes {
    position: relative;
    z-index: 2;
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
}

.scroll-spy-node {
    width: 34px;
    height: 30px;
    border-radius: 6px;
    background-color: #1F2633;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: #9CA3AF;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.18s ease;
}

.scroll-spy-node--code {
    font-size: 0.64rem;
    border-color: rgba(96, 165, 250, 0.45);
    color: #93C5FD;
}

.scroll-spy-node:hover {
    border-color: #FDBA74;
    color: #FFFFFF;
    transform: scale(1.06);
}

/* Active Section Node Indicator (Highlights where you are in the scroll) */
.scroll-spy-node.is-active {
    background-color: var(--brand-orange);
    border-color: #FDBA74;
    color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.32), 0 4px 10px rgba(234, 88, 12, 0.45);
    transform: scale(1.08);
}

/* Floating Quick Jump Popover (Opens to the right of the 52px rail on hover or click) */
.scroll-spy-rail__popover {
    position: absolute;
    top: 0;
    left: calc(100% + 10px);
    width: 320px;
    background-color: var(--bg-header);
    color: #FAF8F5;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 4px solid var(--brand-orange);
    border-radius: 10px;
    padding: 1rem 1.05rem;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    pointer-events: none;
}

/* Bridge the 10px gap so hovering from rail to popover never drops hover state */
.scroll-spy-rail__popover::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -14px;
    width: 14px;
}

.scroll-spy-rail:hover .scroll-spy-rail__popover,
.scroll-spy-rail.is-open .scroll-spy-rail__popover {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.scroll-spy-popover__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding-bottom: 0.65rem;
    margin-bottom: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.scroll-spy-popover__eyebrow {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    color: #FDBA74;
    margin-bottom: 0.15rem;
}

.scroll-spy-popover__title {
    display: block;
    font-family: var(--font-display);
    font-size: 0.94rem;
    color: #FAF8F5;
    line-height: 1.25;
}

.scroll-spy-popover__top-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FDBA74;
    border-radius: 5px;
    padding: 0.28rem 0.55rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.scroll-spy-popover__top-btn:hover {
    background-color: var(--brand-orange);
    border-color: var(--brand-orange-bright);
    color: #FFFFFF;
}

.scroll-spy-popover__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
}

.scroll-spy-popover__link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.48rem 0.6rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    color: #D1D5DB;
    text-decoration: none;
    font-size: 0.83rem;
    line-height: 1.3;
    transition: all 0.15s ease;
}

.scroll-spy-popover__link:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #FFFFFF;
}

.scroll-spy-popover__link.is-active {
    background: rgba(234, 88, 12, 0.22);
    border-color: rgba(249, 115, 22, 0.6);
    color: #FFFFFF;
    font-weight: 600;
}

.scroll-spy-popover__badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    background: #252D3D;
    color: #93C5FD;
    padding: 0.15rem 0.42rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.scroll-spy-popover__link.is-active .scroll-spy-popover__badge {
    background: var(--brand-orange);
    color: #FFFFFF;
}

.scroll-spy-popover__text {
    flex: 1;
}

.scroll-spy-popover__here {
    display: none;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: var(--brand-orange);
    color: #FFFFFF;
    padding: 0.12rem 0.36rem;
    border-radius: 3px;
    flex-shrink: 0;
}

.scroll-spy-popover__link.is-active .scroll-spy-popover__here {
    display: inline-block;
}

/* Top Intro Summary Box with Quick-Jump Code Pills */
.topic-intro-box {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-left: 5px solid var(--brand-orange);
    border-radius: 8px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 2.25rem;
    box-shadow: var(--shadow-card);
}

.topic-intro-box__lead {
    font-size: 1.08rem;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.7;
}

.topic-intro-box__jump {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--border-strong);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.topic-intro-box__jump-label {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--brand-blue);
}

/* ==========================================================================
   3. Numbered Content Sections, Image Figures & Field Notes (.content-section)
   ========================================================================== */
.content-section {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.85rem;
    box-shadow: var(--shadow-card);
    scroll-margin-top: 112px;
}

.content-section__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.15rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--bg-section-alt);
}

.content-section__num {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: #FFFFFF;
    background-color: var(--brand-blue);
    padding: 0.22rem 0.55rem;
    border-radius: 4px;
}

.content-section:nth-of-type(even) .content-section__num {
    background-color: var(--brand-orange);
}

.content-section__title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Section Visual Figure / Image Slot (Zone 1: Wide Top Banner) */
.section-media {
    margin: 0 0 1.4rem;
    background-color: var(--bg-surface-muted);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
}

.section-media__frame {
    position: relative;
    aspect-ratio: 16 / 9;
    max-height: 360px;
    width: 100%;
    background-color: #141820;
    overflow: hidden;
    border-bottom: 3px solid var(--brand-blue);
}

.section-media--alt .section-media__frame {
    border-bottom-color: var(--brand-orange);
}

.section-media__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.section-media__badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background-color: rgba(17, 20, 26, 0.85);
    color: #93C5FD;
    border: 1px solid rgba(96, 165, 250, 0.45);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.section-media__caption {
    padding: 0.65rem 1rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.section-media__caption strong {
    color: var(--brand-orange);
    font-family: var(--font-mono);
}

/* ==========================================================================
   Zone 2: Split Text + Side Image Layout (.content-section__split)
   - Breaks up uniform full-width banners by placing text on one side (60%)
     and a hardware/diagram figure card on the other side (40%).
   ========================================================================== */
.content-section__split {
    display: grid;
    grid-template-columns: 1.35fr 0.95fr;
    gap: 1.75rem;
    align-items: start;
    margin-bottom: 1rem;
}

.content-section__split--left {
    grid-template-columns: 0.95fr 1.35fr;
}

.section-media--split {
    margin: 0;
}

.section-media--split .section-media__frame {
    aspect-ratio: 4 / 3;
    max-height: 280px;
}

/* ==========================================================================
   Zone 3: 2-Up Side-by-Side "Field Comparison" Grid (.comparison-grid)
   - Displays "Common Shortcut / Failure" vs. "Scotty Electric Standard"
   ========================================================================== */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin: 1.5rem 0 1.25rem;
}

.comparison-card {
    background-color: var(--bg-surface-muted);
    border: 1px solid var(--border-subtle);
    border-top: 4px solid var(--brand-orange);
    border-radius: 8px;
    overflow: hidden;
}

.comparison-card--standard {
    border-top-color: var(--brand-blue);
}

.comparison-card__frame {
    position: relative;
    aspect-ratio: 16 / 10;
    background-color: #141820;
    overflow: hidden;
    border-bottom: 1px solid var(--border-subtle);
}

.comparison-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.comparison-card__tag {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.22rem 0.55rem;
    border-radius: 4px;
    background-color: rgba(17, 20, 26, 0.9);
    color: #FDBA74;
    border: 1px solid rgba(249, 115, 22, 0.55);
}

.comparison-card--standard .comparison-card__tag {
    color: #93C5FD;
    border-color: rgba(96, 165, 250, 0.55);
}

.comparison-card__body {
    padding: 0.85rem 1rem;
}

.comparison-card__title {
    display: block;
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.comparison-card__caption {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

/* ==========================================================================
   Zone 4: Bottom 3-Photo "Field Installation Gallery" Strip (.field-gallery-block)
   - Dedicated container above the NEC Code Block for real camera/jobsite photos.
   ========================================================================== */
.field-gallery-block {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-left: 5px solid var(--brand-blue);
    border-radius: 8px;
    padding: 1.65rem 1.85rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-card);
}

.field-gallery-block__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.15rem;
}

.field-gallery-block__eyebrow {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brand-orange);
}

.field-gallery-block__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.field-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.field-gallery-item {
    background-color: var(--bg-surface-muted);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    overflow: hidden;
}

.field-gallery-item__frame {
    position: relative;
    aspect-ratio: 16 / 10;
    background-color: #141820;
    border-bottom: 2px solid var(--brand-orange);
}

.field-gallery-item:nth-child(even) .field-gallery-item__frame {
    border-bottom-color: var(--brand-blue);
}

.field-gallery-item__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.field-gallery-item__caption {
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.field-gallery-item__location {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--brand-blue);
    margin-bottom: 0.15rem;
}

/* Section Body Paragraphs */
.content-section__body p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.content-section__body p:last-child {
    margin-bottom: 0;
}

/* Highlighted Field Note Box (Alternating Blue/Orange Tints) */
.field-note-box {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background-color: var(--brand-blue-tint);
    border-left: 4px solid var(--brand-blue);
    border-radius: 0 6px 6px 0;
}

.field-note-box--orange {
    background-color: var(--brand-orange-tint);
    border-left-color: var(--brand-orange);
}

.field-note-box__label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-blue);
    margin-bottom: 0.25rem;
}

.field-note-box--orange .field-note-box__label {
    color: var(--brand-orange);
}

.field-note-box__text {
    font-size: 0.92rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Bullet Specification List inside Section */
.spec-list {
    margin: 1.1rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.65rem;
}

.spec-list__item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    background-color: var(--bg-surface-muted);
    padding: 0.65rem 0.85rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.spec-list__bullet {
    color: var(--brand-orange);
    font-weight: 800;
    flex-shrink: 0;
}

/* Inline Clickable Code Callout Pills at Bottom of Each Section */
.inline-code-bar {
    margin-top: 1.35rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.inline-code-bar__label {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
}

.code-ref-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background-color: var(--brand-orange-tint);
    border: 1px solid var(--brand-orange-border);
    color: var(--brand-orange) !important;
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.15s ease, color 0.15s ease;
}

.code-ref-pill:hover {
    background-color: var(--brand-orange);
    color: #FFFFFF !important;
    transform: translateY(-1px);
}

/* ==========================================================================
   4. Bottom Section: "Why We Do It This Way" Code & Diagnostic Cards
   ========================================================================== */
.code-standards-block {
    margin-top: 2.75rem;
    background-color: var(--bg-code-section);
    color: var(--text-on-dark);
    border: 2px solid var(--brand-blue);
    border-top: 5px solid var(--brand-orange);
    border-radius: 10px;
    padding: 2.25rem;
    scroll-margin-top: 112px;
}

.code-standards-block__header {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.code-standards-block__eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #FDBA74;
    background: rgba(234, 88, 12, 0.2);
    border: 1px solid rgba(249, 115, 22, 0.45);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.6rem;
}

.code-standards-block__title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: #FAF8F5;
    margin-bottom: 0.4rem;
}

.code-standards-block__sub {
    font-size: 0.95rem;
    color: var(--text-on-dark-muted);
}

.code-cards-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.code-card {
    background-color: #1E232D;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 4px solid #3B82F6;
    border-radius: 8px;
    padding: 1.4rem 1.5rem;
    scroll-margin-top: 120px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

/* Triggered by JS when user clicks an inline [⚡ NEC ...] badge */
.code-card.is-highlighted {
    border-color: var(--brand-orange-bright);
    border-left-width: 6px;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.35), 0 12px 30px rgba(0, 0, 0, 0.5);
    transform: scale(1.01);
}

.code-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.code-card__article {
    font-family: var(--font-mono);
    font-size: 0.84rem;
    font-weight: 700;
    background-color: var(--brand-orange);
    color: #FFFFFF;
    padding: 0.22rem 0.65rem;
    border-radius: 4px;
}

.code-card__title {
    font-family: var(--font-display);
    font-size: 1.18rem;
    font-weight: 700;
    color: #FAF8F5;
    flex: 1;
}

.code-card__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.75rem;
}

.code-card__col {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.9rem 1rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.code-card__col-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #93C5FD;
    margin-bottom: 0.35rem;
}

.code-card__col--benefit .code-card__col-label {
    color: #FDBA74;
}

.code-card__col p {
    font-size: 0.9rem;
    color: #E5E7EB;
    line-height: 1.55;
}

/* ==========================================================================
   5. Contact Page Layout & Form Controls (.contact-grid, .form-control)
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
    align-items: start;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 0.95rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-primary);
    background-color: var(--bg-body);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px var(--brand-blue-tint);
}

.alert-box {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-box--success {
    background-color: rgba(34, 197, 94, 0.12);
    border-left: 4px solid #16A34A;
    color: var(--text-primary);
}

.alert-box--error {
    background-color: rgba(239, 68, 68, 0.12);
    border-left: 4px solid #DC2626;
    color: var(--text-primary);
}

/* ==========================================================================
   6. Topic-Specific Styling Hooks (`body[data-topic="slug"]`)
   - Every topic page automatically outputs `<body class="page-topic" data-topic="generators">`
   - You can customize individual pages right here OR create `assets/css/topics/{slug}.css`!
   ========================================================================== */
body[data-topic="troubleshooting"] .topic-header-bar {
    border-bottom-color: var(--brand-orange);
}

body[data-topic="grounding-and-bonding"] .topic-intro-box {
    border-left-color: var(--brand-blue);
}

/* ==========================================================================
   6B. Dedicated Service Area Page — Full-Width Tulsa Skyline Banner
   ========================================================================== */
.skyline-banner {
    position: relative;
    width: 100%;
    background-color: #0D131F;
    border-bottom: 3px solid var(--brand-orange);
    overflow: hidden;
}

.skyline-banner__media {
    position: relative;
    width: 100%;
    height: clamp(320px, 42vw, 520px);
    overflow: hidden;
}

.skyline-banner__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 45%;
    display: block;
}

.skyline-banner__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(13, 19, 31, 0.35) 0%,
        rgba(13, 19, 31, 0.15) 45%,
        rgba(13, 19, 31, 0.92) 92%,
        #0D131F 100%
    );
    pointer-events: none;
}

.skyline-banner__content {
    position: relative;
    z-index: 2;
    margin-top: -110px;
    padding-bottom: 2.5rem;
}

.skyline-banner__card {
    background: rgba(17, 23, 34, 0.88);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 5px solid var(--brand-orange);
    border-radius: 12px;
    padding: 1.75rem 2rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.skyline-banner__eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #FDBA74;
    margin-bottom: 0.4rem;
}

.skyline-banner__title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.55rem);
    font-weight: 700;
    color: #FAF8F5;
    line-height: 1.15;
    margin-bottom: 0.5rem;
}

.skyline-banner__sub {
    font-size: 1rem;
    color: #D1D5DB;
    max-width: 720px;
    line-height: 1.55;
}

.local-zone-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.35rem;
    margin: 1.5rem 0;
}

.local-zone-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-top: 3px solid var(--brand-orange);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

.local-zone-card--blue {
    border-top-color: var(--brand-blue);
}

.local-zone-card__tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brand-orange);
    margin-bottom: 0.35rem;
}

.local-zone-card--blue .local-zone-card__tag {
    color: var(--brand-blue);
}

.local-zone-card__title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.local-zone-card p {
    font-size: 0.94rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

/* ==========================================================================
   7. Content Page Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
    .topic-layout__grid {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .topic-sidebar {
        grid-column: 1 / -1;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .topic-layout__grid {
        grid-template-columns: 1fr;
    }

    .scroll-spy-rail {
        position: fixed;
        left: 10px;
        bottom: 72px;
        top: auto;
        z-index: 80;
    }

    .scroll-spy-rail__popover {
        top: auto;
        bottom: 0;
        left: calc(100% + 8px);
        width: min(290px, calc(100vw - 85px));
    }
}

@media (max-width: 860px) {
    .content-section__split,
    .content-section__split--left,
    .comparison-grid,
    .field-gallery-grid,
    .code-card__grid,
    .local-zone-grid {
        grid-template-columns: 1fr;
    }

    .skyline-banner__content {
        margin-top: -50px;
    }
}
