/*
 * sabe.ai — Deep navy + restrained teal/mint theme.
 *
 * Loaded after style.css / plugins.css / sabe.css / site.css, so it is the last
 * word on colour. Two modes, selected by [data-theme-color] on <html>:
 *
 *   light  (default) — navy on cool white, AAA body contrast
 *   dark             — near-black slate, teal/mint accents, lifted blue primary
 *
 * The template carries 2,395 var() references, so most of the work is a token
 * remap. Everything the template hard-codes (panel gradients, white body text,
 * black-on-primary button labels, the footer .invert class, the counters band)
 * is overridden explicitly in the sections below.
 *
 * Status colours (success / warning / danger) are deliberately NOT part of the
 * brand map — they stay in the template's own tokens so a warning still reads as
 * a warning. Only brand roles live here.
 */

/* ─────────────────────────────────────────────────────────────────────────────
   1. Tokens — light mode (default)
   ───────────────────────────────────────────────────────────────────────────── */

:root,
html[data-theme-color="light"] {
    color-scheme: light;

    /* Brand */
    --sabe-primary-rgb: 30, 58, 138;        /* #1E3A8A  deep navy   */
    --sabe-primary: #1E3A8A;
    --sabe-primary-strong: #172E6E;         /* pressed / hover      */
    --sabe-accent-rgb: 20, 184, 166;        /* #14B8A6  teal        */
    --sabe-accent: #14B8A6;
    --sabe-accent-ink: #0F766E;             /* teal, legible on white */
    --sabe-highlight: #6EE7B7;              /* #6EE7B7  soft mint   */
    --sabe-highlight-rgb: 110, 231, 183;
    --sabe-highlight-ink: #065F46;          /* on mint              */

    /* Neutrals */
    --sabe-page: #FFFFFF;
    --sabe-page-alt: #F8FAFC;
    --sabe-surface: #F1F5F9;
    --sabe-surface-2: #E2E8F0;
    --sabe-ink: #0F172A;                    /* headings, dark text  */
    --sabe-body: #1E293B;                   /* body copy            */
    --sabe-muted: #334155;                  /* secondary copy, 9.45:1 on #F1F5F9 */
    --sabe-line: rgba(15, 23, 42, 0.12);
    --sabe-line-strong: rgba(15, 23, 42, 0.22);
    --sabe-shadow: rgba(15, 23, 42, 0.08);
    --sabe-on-primary: #FFFFFF;
    --sabe-on-accent: #052E2B;

    /* Status — deliberately not brand colours. Light-mode values are the AA-safe
       equivalents of the dark set (all ≥4.5:1 on white and on the surface tint). */
    --sabe-success: #047857;
    --sabe-warning: #B45309;
    --sabe-danger: #B91C1C;
    --sabe-muted-2: #94A3B8;                /* disabled, non-informational */

    /* Surfaces that carry their own identity */
    --sabe-band: #1E3A8A;                   /* counters strip      */
    --sabe-band-ink: #FFFFFF;
    --sabe-hero-bg: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 62%, #F1F5F9 100%);
    --sabe-header-bg: #FFFFFF;
    --sabe-footer-bg: #F1F5F9;
    --sabe-footer-ink: #1E293B;

    /* Page background used by body { background: var(--main-gradient-bg) } */
    --sabe-page-bg: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}

/* ─────────────────────────────────────────────────────────────────────────────
   2. Tokens — dark mode
   ───────────────────────────────────────────────────────────────────────────── */

/* Dark mode tokens. Navy-black canvas with a three-step background hierarchy
   (#0B1120 canvas -> #111827 surface -> #1E293B raised) and off-white text rather
   than pure white, so long sessions do not glare. Two deviations from a naive
   reading of the palette, both measured rather than assumed:

   - Primary buttons use #3B82F6 as specified, but carry near-black ink: white on
     #3B82F6 is 3.68:1 and fails AA for a 12.8px button label, while #0B1120 on it
     is 5.12:1. The lifted blue stays visible and the label stays readable.
   - #64748B ("text muted") is 3.96:1 on the canvas, so it is used for disabled
     state and borders only. Supporting copy is #CBD5E1 (11.95:1 on the surface);
     #94A3B8 passed AA at 6.92:1 and still read as washed gray on the navy. */
html[data-theme-color="dark"] {
    color-scheme: dark;

    /* Brand */
    --sabe-primary-rgb: 59, 130, 246;       /* #3B82F6  clear blue  */
    --sabe-primary: #3B82F6;
    --sabe-primary-strong: #2563EB;         /* hover                */
    --sabe-accent-rgb: 20, 184, 166;        /* #14B8A6  teal        */
    --sabe-accent: #14B8A6;
    --sabe-accent-ink: #5EEAD4;             /* #5EEAD4  bright teal, for text/links */
    --sabe-highlight: #5EEAD4;              /* #5EEAD4  status highlights */
    --sabe-highlight-rgb: 94, 234, 212;
    --sabe-highlight-ink: #052E2B;

    /* Status — deliberately not brand colours */
    --sabe-success: #34D399;
    --sabe-warning: #FBBF24;
    --sabe-danger: #F87171;

    /* Neutral hierarchy */
    --sabe-page: #0B1120;                   /* canvas               */
    --sabe-page-alt: #111827;               /* elevated navy        */
    --sabe-surface: #111827;                /* cards, panels        */
    --sabe-surface-2: #1E293B;              /* raised, hover        */
    --sabe-ink: #F1F5F9;                    /* headings, body       */
    --sabe-body: #F1F5F9;
    --sabe-muted: #CBD5E1;                  /* supporting copy, 11.95:1 on #111827 */
    --sabe-muted-2: #64748B;                /* disabled, tertiary   */
    --sabe-line: #334155;                   /* dividers, card edges */
    --sabe-line-strong: #64748B;            /* control boundaries   */
    --sabe-shadow: rgba(0, 0, 0, 0.5);
    --sabe-on-primary: #0B1120;             /* 5.12:1 on #3B82F6    */
    --sabe-on-accent: #052E2B;

    /* Surfaces with their own identity */
    --sabe-band: #111827;                   /* counters strip       */
    --sabe-band-ink: #F1F5F9;
    --sabe-hero-bg: linear-gradient(180deg, #111827 0%, #0B1120 72%);
    --sabe-header-bg: #0B1120;
    --sabe-footer-bg: #111827;
    --sabe-footer-ink: #F1F5F9;

    --sabe-page-bg: linear-gradient(180deg, #0B1120 0%, #111827 100%);
}

/* ─────────────────────────────────────────────────────────────────────────────
   3. Remap the template's own tokens onto the palette
       (both modes — the selectors above have already set the brand values)
   ───────────────────────────────────────────────────────────────────────────── */

:root,
html[data-theme-color="light"],
html[data-theme-color="dark"] {
    --primary-rgb: var(--sabe-primary-rgb);
    --secondary-rgb: var(--sabe-accent-rgb);

    --primary-bg-color: var(--sabe-primary);
    --primary-bg-border: var(--sabe-primary);
    --primary-bg-hover: var(--sabe-primary-strong);

    --secondary: var(--sabe-accent);

    /* --background-rgb is the template's *surface* token. It is also, unhelpfully,
       used as a foreground colour in a few places — those are overridden below. */
    --background-rgb: 241, 245, 249;

    --color: var(--sabe-body);
    --color2: var(--sabe-muted);
    --muted: var(--sabe-muted);
    --black: var(--sabe-ink);
    --dark: var(--sabe-page-alt);
    --light: var(--sabe-surface);

    --border: var(--sabe-line);
    --form-border: var(--sabe-line-strong);
    --bg-hover: var(--sabe-surface);
    --bg-white: var(--sabe-page);
    --input-bg: var(--sabe-page);
    --bg-active2: var(--sabe-surface);

    --header-bg: var(--sabe-header-bg);
    --header-color: var(--sabe-muted);
    --header-border: var(--sabe-line);
    --menu-bg: var(--sabe-header-bg);
    --menu--bg: var(--sabe-header-bg);
    --menu-color: var(--sabe-muted);
    --menu-border: var(--sabe-line);

    --shadow: 0 0 4px var(--sabe-line);
    --shadow-color: var(--sabe-shadow);
    --card-background: var(--sabe-page);

    --main-gradient-bg: var(--sabe-page-bg);
    --app-color-picker: var(--sabe-primary);
    --dark-theme: var(--sabe-page);
    --dark-body: var(--sabe-page-alt);

    --gray-100: #F8FAFC;
    --gray-200: #F1F5F9;
    --gray-300: #E2E8F0;
    --gray-400: #CBD5E1;
    --gray-500: #94A3B8;
    --gray-600: #64748B;
    --gray-700: #475569;
    --gray-800: #334155;
    --gray-900: #1E293B;
}

html[data-theme-color="dark"] {
    --background-rgb: 17, 24, 39;           /* #111827 — the template's surface token */

    --gray-100: #111827;
    --gray-200: #1E293B;
    --gray-300: #334155;
    --gray-400: #475569;
    --gray-500: #64748B;
    --gray-600: #94A3B8;
    --gray-700: #CBD5E1;
    --gray-800: #E2E8F0;
    --gray-900: #F1F5F9;

    /* The template's light-theme block wins on --white-* by accident; keep the
       overlay tokens consistent with the mode instead. */
    --white-1: rgba(241, 245, 249, 0.1);
    --white-2: rgba(241, 245, 249, 0.2);
    --white-05: rgba(241, 245, 249, 0.05);
    --white-08: rgba(241, 245, 249, 0.08);
    --black-1: rgba(11, 17, 32, 0.1);
    --black-5: rgba(11, 17, 32, 0.5);
}

/* ─────────────────────────────────────────────────────────────────────────────
   4. Document base
   ───────────────────────────────────────────────────────────────────────────── */

html {
    background-color: var(--sabe-page);
}

/* The prefix is required: `[data-theme-color=light] body { color:#585656 }` in the
   template is two class-levels and would otherwise win, leaving every inherited
   string that warm-grey instead of the palette's body ink. */
html[data-theme-color] body {
    background: var(--sabe-page-bg) !important;
    background-attachment: fixed;
    color: var(--sabe-body);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--sabe-ink);
}

a {
    color: var(--sabe-accent-ink);
}

a:hover,
a:focus {
    color: var(--sabe-primary);
}

html[data-theme-color="dark"] a {
    color: var(--sabe-accent-ink);
}

html[data-theme-color="dark"] a:hover,
html[data-theme-color="dark"] a:focus {
    color: var(--sabe-highlight);
}

/* The page wrapper sits on the body gradient. */
.page.landing-page,
.landing-page {
    background-color: transparent !important;
}

::selection {
    background: var(--sabe-highlight);
    color: var(--sabe-highlight-ink);
}

:focus-visible {
    outline: 2px solid var(--sabe-accent);
    outline-offset: 2px;
}

.progress-top-bar {
    background-color: var(--sabe-primary);
}

/* ─────────────────────────────────────────────────────────────────────────────
   5. Header strip and pinned header
   ───────────────────────────────────────────────────────────────────────────── */

.landing-layout .nav-strip,
.landing-layout .banner-section.nav-strip {
    background-color: var(--sabe-header-bg);
    background-image: none;
    border-block-end: 1px solid var(--sabe-line);
}

.landing-layout .nav-header-main.sticky.sticky-pin,
.landing-layout .banner-section .nav-header-main.sticky.sticky-pin {
    background: var(--sabe-header-bg);
    background-image: none;
    border-block-end: 1px solid var(--sabe-line);
    box-shadow: 0 6px 24px -12px var(--sabe-shadow);
}

.landing-layout .banner-section .nav-header-main .nav .nav-item .nav-link {
    color: var(--sabe-body);
    opacity: 1;
}

.landing-layout .banner-section .nav-header-main .nav .nav-item .nav-link:hover,
.landing-layout .banner-section .nav-header-main .nav .nav-item .nav-link:focus {
    color: var(--sabe-primary);
    opacity: 1;
}

.landing-layout .banner-section .nav-header-main .nav .nav-item .nav-link.active {
    color: var(--sabe-primary);
    opacity: 1;
    box-shadow: inset 0 -2px 0 0 var(--sabe-accent);
}

.landing-layout .banner-section .nav-header-main.sticky.sticky-pin .nav .nav-item .nav-link {
    color: var(--sabe-body);
}

.landing-layout .banner-section .nav-header-main .dropdown-link,
.landing-layout .banner-section .nav-header-main.sticky.sticky-pin .dropdown-link {
    color: var(--sabe-body);
}

.landing-layout .banner-section .nav-header-main .nav-header-icon {
    color: var(--sabe-body);
}

.landing-layout .banner-section .nav-header-main .nav-header-icon:hover,
.landing-layout .banner-section .nav-header-main .nav-header-icon:focus {
    background-color: var(--sabe-surface);
    color: var(--sabe-primary);
}

/* Mobile slide-out menu */
.landing-layout .sidemenu-landing {
    background: var(--sabe-page);
    border-inline-end: 1px solid var(--sabe-line);
}

.landing-layout .sidemenu-landing .nav-link {
    color: var(--sabe-body);
    opacity: 1;
}

.landing-layout .sidemenu-landing .nav-link:focus,
.landing-layout .sidemenu-landing .nav-link.active {
    color: var(--sabe-primary);
    opacity: 1;
}

/* ─────────────────────────────────────────────────────────────────────────────
   6. Hero / page-header panel
       site.css used to force this dark. It is now mode-aware: a quiet navy-tinted
       wash in light, a near-black panel in dark. The template's white wave SVG is
       switched off (background-image: none) so the panel colour is the truth.
   ───────────────────────────────────────────────────────────────────────────── */

/* Bare banners (portal, mexico) used the template wave SVG at background-size:cover.
   That shape is white. In dark mode it covers the heading, and the light kicker
   sits on it and disappears. Same surface as the other page heroes, no wave. */
.landing-layout .banner-section:not(.nav-strip) {
    background-color: var(--sabe-page-alt);
    background-image: var(--sabe-hero-bg);
    background-size: auto;
    background-repeat: no-repeat;
    background-position: center top;
    border-block-end: 1px solid var(--sabe-line);
}

.landing-layout .banner-section.hero-panel::after,
.landing-layout .banner-section.page-hero::after {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--sabe-primary) 0%, var(--sabe-accent) 55%, var(--sabe-highlight) 100%);
}

.landing-layout .banner-section.hero-panel .title-content,
.landing-layout .banner-section.hero-panel .title-content h1,
.landing-layout .banner-section.page-hero .title-content,
.landing-layout .banner-section.page-hero .title-content h1 {
    color: var(--sabe-ink);
}

.landing-layout .banner-section.hero-panel .title-content .title,
.landing-layout .banner-section.page-hero .title-content .title {
    color: var(--sabe-accent-ink);
}

.landing-layout .banner-section.hero-panel .title-desc,
.landing-layout .banner-section.page-hero .title-desc {
    color: var(--sabe-muted);
    opacity: 1;
}

/* The hero screenshot (384×384) is narrower than its column, so the template's
   padded, filled container left an empty grey block beside it once the surface
   colour was a light neutral. The frame hugs the picture instead. */
.landing-layout .banner-section .image-container {
    background-color: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
    width: fit-content;
    max-width: 100%;
    margin-inline-start: auto;
}

.landing-layout .banner-section .image-container img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--sabe-line);
    border-radius: 10px;
    box-shadow: 0 24px 60px -30px var(--sabe-shadow);
}

/* ─────────────────────────────────────────────────────────────────────────────
   7. Counters band
   ───────────────────────────────────────────────────────────────────────────── */

.landing-layout .counters-section {
    background-color: var(--sabe-band);
    color: var(--sabe-band-ink);
    border-block: 1px solid var(--sabe-line);
}

html[data-theme-color="dark"] .landing-layout .counters-section {
    border-block: 1px solid var(--sabe-line-strong);
}

.landing-layout .counters-section::before {
    opacity: 0.10;
}

.landing-layout .counters-section,
.landing-layout .counters-section .counter,
.landing-layout .counters-section .counter-container p {
    color: var(--sabe-band-ink);
}

/* The numerals carry the mint highlight in both modes — it is the one place the
   highlight colour is allowed to do real work. */
.landing-layout .counters-section .counter {
    color: var(--sabe-highlight);
}

.landing-layout .counters-section .counter-container::before {
    color: rgba(255, 255, 255, 0.10);
}

html[data-theme-color="dark"] .landing-layout .counters-section .counter-container::before {
    color: rgba(var(--sabe-highlight-rgb), 0.14);
}

/* ─────────────────────────────────────────────────────────────────────────────
   8. Cards and surfaces
   ───────────────────────────────────────────────────────────────────────────── */

.landing-layout .feature-card {
    background-color: var(--sabe-page);
    border: 1px solid var(--sabe-line);
    box-shadow: 0 1px 2px var(--sabe-shadow), 0 12px 32px -24px var(--sabe-shadow);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.landing-layout a.feature-card:hover,
.landing-layout a.feature-card:focus {
    border-color: var(--sabe-accent);
    box-shadow: 0 2px 4px var(--sabe-shadow), 0 20px 44px -26px var(--sabe-shadow);
}

html[data-theme-color="dark"] .landing-layout .feature-card {
    background-color: var(--sabe-surface);
}

.landing-layout .rounded-icon {
    border-radius: 12px;
}

/* Card links use the accent, not a rainbow. */
.landing-layout .feature-card .tx-primary,
.landing-layout .tx-primary {
    color: var(--sabe-accent-ink) !important;
}

/* Decorative icon colours. The template ships five unrelated hues for these card
   glyphs (info/green/warning/teal/danger) — that is the "brand colour as decoration"
   pattern the palette is meant to replace. They collapse onto three brand families:
   teal accent, mint highlight, navy primary. Scoped to .landing-layout so an app
   screen's semantic colours are untouched. */
.landing-layout .tx-info,
.landing-layout .tx-teal {
    color: var(--sabe-accent-ink) !important;
}

.landing-layout .tx-green {
    color: var(--sabe-highlight-ink) !important;
}

.landing-layout .tx-warning,
.landing-layout .tx-danger {
    color: var(--sabe-primary) !important;
}

html[data-theme-color="dark"] .landing-layout .tx-green {
    color: var(--sabe-highlight) !important;
}

/* Pastel icon wells: keep them as tints of the brand, not template filler. */
.landing-layout .bg-info-transparent,
.landing-layout .bg-teal-transparent {
    background-color: rgba(var(--sabe-accent-rgb), 0.14) !important;
}

.landing-layout .bg-info-transparent i,
.landing-layout .bg-teal-transparent i {
    color: var(--sabe-accent-ink) !important;
}

.landing-layout .bg-green-transparent {
    background-color: rgba(var(--sabe-highlight-rgb), 0.28) !important;
}

.landing-layout .bg-green-transparent i {
    color: var(--sabe-highlight-ink) !important;
}

html[data-theme-color="dark"] .landing-layout .bg-green-transparent i {
    color: var(--sabe-highlight) !important;
}

/* The template's fourth well is amber (bg-warning-transparent). Amber belongs to the
   status set, not the brand set, so the card grid uses teal / mint / navy instead.
   Scoped to .landing-layout so real alert wells on app screens keep their meaning. */
.landing-layout .bg-warning-transparent,
.landing-layout .bg-danger-transparent {
    background-color: rgba(var(--sabe-primary-rgb), 0.10) !important;
}

/* `.bg-gray` is --background, a 10 % white overlay: invisible on a light surface. */
.landing-layout .bg-gray {
    background-color: var(--sabe-surface-2) !important;
}

.landing-layout .bg-primary-transparent {
    background-color: rgba(var(--sabe-primary-rgb), 0.07) !important;
}

html[data-theme-color="dark"] .landing-layout .bg-primary-transparent {
    background-color: rgba(var(--sabe-primary-rgb), 0.12) !important;
}

/* Page heroes that are a bare `.banner-section` (mexico, portal) inherit the
   template's `color: rgb(var(--background-rgb))` — i.e. the *surface* colour used
   as ink. That reads white-on-white now that the surface is a light neutral, so
   every banner-section heading is pinned to the ink colour. */
.landing-layout .banner-section .title-content,
.landing-layout .banner-section .title-content h1,
.landing-layout .banner-section .title-desc {
    color: var(--sabe-ink);
}

.landing-layout .banner-section .title-content .title {
    color: var(--sabe-accent-ink);
}

/* `.invert` is the template's "white on the dark panel" class. It is used by the
   footer and the reviews page — both light surfaces in light mode. */
.landing-layout .invert {
    color: var(--sabe-ink) !important;
}

/* Cards: the template leaves `.card` transparent, which disappears on the tinted
   sections (/pricing sits on a 7 % navy wash). Give them a real surface. */
.landing-layout .card {
    background-color: var(--sabe-page);
    border: 1px solid var(--sabe-line);
    box-shadow: 0 1px 2px var(--sabe-shadow);
}

html[data-theme-color="dark"] .landing-layout .card {
    background-color: var(--sabe-surface);
}

.landing-layout .card .card-header,
.landing-layout .card .card-footer {
    background-color: transparent;
    border-color: var(--sabe-line);
}

/* The clients carousel (/reviews) sits on gray-300 — a neutral slab is too heavy
   for a light page, so it becomes the standard surface tint. */
.landing-layout .happy-clients-section {
    background-color: var(--sabe-surface) !important;
    border-block: 1px solid var(--sabe-line);
}

/* ─────────────────────────────────────────────────────────────────────────────
   9. Footer
   ───────────────────────────────────────────────────────────────────────────── */

.landing-layout .footer-section {
    background-color: var(--sabe-footer-bg);
    border-block-start: 1px solid var(--sabe-line);
    color: var(--sabe-body);
}

.landing-layout .footer-section h5,
.landing-layout .footer-section .invert {
    color: var(--sabe-footer-ink) !important;
}

.landing-layout .footer-section a,
.landing-layout .footer-section .footer-page-link a {
    color: var(--sabe-body) !important;
}

.landing-layout .footer-section a:hover,
.landing-layout .footer-section a:focus {
    color: var(--sabe-primary) !important;
}

html[data-theme-color="dark"] .landing-layout .footer-section a:hover,
html[data-theme-color="dark"] .landing-layout .footer-section a:focus {
    color: var(--sabe-highlight) !important;
}

.landing-layout .footer-section .footer-icons .footer-link {
    color: var(--sabe-muted);
    opacity: 1;
}

.landing-layout .footer-section .footer-icons .footer-link:hover {
    background-color: var(--sabe-primary);
    color: var(--sabe-on-primary);
    opacity: 1;
}

/* ─────────────────────────────────────────────────────────────────────────────
   10. Buttons
   ───────────────────────────────────────────────────────────────────────────── */

.btn {
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Primary fill always carries white text — the template sets #000 on it. */
.btn-primary,
.btn-primary:focus,
.btn-primary.focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.btn-primary.disabled,
.btn-primary:disabled {
    color: var(--sabe-on-primary) !important;
    background-color: var(--sabe-primary);
    border-color: var(--sabe-primary);
}

.btn-primary:hover {
    color: var(--sabe-on-primary) !important;
    background-color: var(--sabe-primary-strong) !important;
    border-color: var(--sabe-primary-strong);
}

.btn-primary:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(var(--sabe-accent-rgb), 0.45);
}

/* The dark primary is blue-500 (#3B82F6) as specified, so the *fill* keeps the brand
   hex and the label carries near-black ink instead of white: 5.12:1 versus the 3.68:1
   that white would give at a 12.8px button size. */
html[data-theme-color="dark"] .btn-primary {
    background-color: var(--sabe-primary);
    border-color: var(--sabe-primary);
    color: var(--sabe-on-primary) !important;
}

html[data-theme-color="dark"] .btn-primary:hover {
    background-color: var(--sabe-primary-strong) !important;
    border-color: var(--sabe-primary-strong);
    color: #FFFFFF !important;
}

/* Secondary fill is the teal accent; dark ink on it clears AA.
   The `html[data-theme-color]` prefix is load-bearing: the template ships
   `[data-theme-color=light] .btn-secondary { color:#fff !important }`, which at two
   class-levels outranks a bare `.btn-secondary` no matter how late it is declared. */
html[data-theme-color] .btn-secondary,
html[data-theme-color] .btn-secondary:focus,
html[data-theme-color] .btn-secondary.focus,
html[data-theme-color] .btn-secondary:not(:disabled):not(.disabled):active,
html[data-theme-color] .btn-secondary:not(:disabled):not(.disabled).active,
html[data-theme-color] .btn-secondary.disabled,
html[data-theme-color] .btn-secondary:disabled {
    color: var(--sabe-on-accent) !important;
    background-color: var(--sabe-accent);
    border-color: var(--sabe-accent);
}

html[data-theme-color] .btn-secondary:hover {
    color: var(--sabe-on-accent) !important;
    background-color: #0FB3A2 !important;
    border-color: #0FB3A2;
}

.btn-outline-primary {
    color: var(--sabe-primary) !important;
    border-color: var(--sabe-primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:not(:disabled):not(.disabled):active {
    color: var(--sabe-on-primary) !important;
    background-color: var(--sabe-primary) !important;
    border-color: var(--sabe-primary) !important;
}

.btn-link {
    color: var(--sabe-accent-ink);
}

.btn-link:hover {
    color: var(--sabe-primary);
}

/* ─────────────────────────────────────────────────────────────────────────────
   11. FAQ / accordion
   ───────────────────────────────────────────────────────────────────────────── */

.landing-layout .accordion.accordion-style2>.accordion-item:not(:last-child) {
    border-block-end: 1px dashed var(--sabe-line-strong);
}

.landing-layout .accordion>.accordion-item>.accordion-header>a {
    color: var(--sabe-ink);
}

.landing-layout .accordion.accordion-style2>.accordion-item>.accordion-header>a:not(.collapsed),
.landing-layout .accordion.accordion-style2>.accordion-item>.accordion-header>a.collapsed:hover {
    color: var(--sabe-accent-ink);
}

.landing-layout .accordion .accordion-body {
    color: var(--sabe-muted);
}

/* ─────────────────────────────────────────────────────────────────────────────
   12. Forms
   ───────────────────────────────────────────────────────────────────────────── */

/* Same two-class collision as .btn-secondary: the template scopes form colours to
   [data-theme-color=light|dark], so these need the prefix to land. */
html[data-theme-color] .form-control,
html[data-theme-color] .form-select,
html[data-theme-color] .custom-select,
html[data-theme-color] textarea.form-control {
    background-color: var(--sabe-page);
    border: 1px solid var(--sabe-line-strong);
    color: var(--sabe-body);
}

html[data-theme-color] .form-control::placeholder,
html[data-theme-color] textarea.form-control::placeholder,
html[data-theme-color] .form-select::placeholder {
    color: var(--sabe-muted);
    opacity: 1;
}

html[data-theme-color] .form-control:focus,
html[data-theme-color] .form-select:focus,
html[data-theme-color] .custom-select:focus {
    background-color: var(--sabe-page);
    border-color: var(--sabe-accent) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--sabe-accent-rgb), 0.22);
    color: var(--sabe-body);
}

.form-label,
label {
    color: var(--sabe-body);
}

/* Status colours stay separate from the brand map, but the template's danger red
   (#D6573C) is only 3.97:1 on white — under AA for the 14px required-field marks.
   Darker red-700 in light mode, lighter red in dark mode. */
html[data-theme-color="light"] .landing-layout .text-danger {
    color: var(--sabe-danger) !important;
}

html[data-theme-color="dark"] .landing-layout .text-danger {
    color: var(--sabe-danger) !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   13. Theme toggle
   ───────────────────────────────────────────────────────────────────────────── */

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 34px;
    padding: 0 0.7rem;
    border: 1px solid var(--sabe-line-strong);
    border-radius: 999px;
    background: var(--sabe-page);
    color: var(--sabe-body);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: border-color .18s ease, color .18s ease, background-color .18s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: var(--sabe-accent);
    color: var(--sabe-primary);
    background: var(--sabe-surface);
}

html[data-theme-color="dark"] .theme-toggle:hover,
html[data-theme-color="dark"] .theme-toggle:focus-visible {
    color: var(--sabe-highlight);
}

.theme-toggle .theme-toggle-icon {
    font-size: 14px;
    line-height: 1;
}

nav .theme-toggle,
.nav-item .theme-toggle {
    vertical-align: middle;
}

/* Show the icon for the mode you would switch *to*, so the control reads as an
   action rather than a status. */
.theme-toggle .icon-to-dark { display: none; }
html[data-theme-color="light"] .theme-toggle .icon-to-dark { display: inline-block; }
html[data-theme-color="light"] .theme-toggle .icon-to-light { display: none; }
html[data-theme-color="dark"] .theme-toggle .icon-to-light { display: inline-block; }
html[data-theme-color="dark"] .theme-toggle .icon-to-dark { display: none; }

.theme-toggle-label { display: none; }

@media (min-width: 1200px) {
    .theme-toggle-label { display: inline; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   14. Logo: the brand mark ships in two fills, one per mode.
   ───────────────────────────────────────────────────────────────────────────── */

/* !important is required: the template sets `display` on `.brand-logo` and
   `.mobile-logo.dark-logo-1` with five-class selectors, which outranks any
   plain `.logo-for-*` rule and would show both fills at once. */
.logo-for-light { display: block !important; }
.logo-for-dark  { display: none !important; }

html[data-theme-color="dark"] .logo-for-light { display: none !important; }
html[data-theme-color="dark"] .logo-for-dark  { display: block !important; }

/* ─────────────────────────────────────────────────────────────────────────────
   15. Misc template furniture
   ───────────────────────────────────────────────────────────────────────────── */

.landing-layout .back-to-top {
    color: var(--sabe-body);
    border-color: var(--sabe-line-strong);
    background-color: var(--sabe-page);
}

.landing-layout .back-to-top:hover {
    background: var(--sabe-primary);
    border-color: var(--sabe-primary);
    color: var(--sabe-on-primary);
}

.landing-layout .media-links .media-btn {
    color: var(--sabe-muted);
    background-color: var(--sabe-surface);
}

.landing-layout .media-links .media-btn:hover {
    background-color: var(--sabe-primary);
    color: var(--sabe-on-primary);
}

.badge-primary {
    color: var(--sabe-on-primary);
    background-color: var(--sabe-primary);
}

.badge-primary-transparent {
    color: var(--sabe-primary);
    background-color: rgba(var(--sabe-primary-rgb), 0.12);
}

html[data-theme-color="dark"] .badge-primary-transparent {
    color: var(--sabe-highlight);
    background-color: rgba(var(--sabe-primary-rgb), 0.18);
}

/* "Connected / Secure / Synced"-style status chips */
.sabe-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 2px 9px;
    border-radius: 999px;
    background-color: rgba(var(--sabe-highlight-rgb), 0.45);
    color: var(--sabe-highlight-ink);
    font-size: 12px;
    font-weight: 600;
}

html[data-theme-color="dark"] .sabe-chip {
    background-color: rgba(var(--sabe-highlight-rgb), 0.16);
    color: var(--sabe-highlight);
}

/* Motion preference */
@media (prefers-reduced-motion: reduce) {
    .theme-toggle,
    .landing-layout .feature-card {
        transition: none;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   16. Readability — solid type, no faded ink
       The template's op-* utilities and the reviews geometric wash were built
       for white type on a dark panel. On the light surfaces they fade the ink
       toward the background (the "***" under the reviews heading measured
       4.55:1, the carousel dots 3.05:1). Opacity is not a text colour.
   ───────────────────────────────────────────────────────────────────────────── */

.landing-layout .op-5,
.landing-layout .op-6,
.landing-layout .op-7,
.landing-layout .op-8,
.landing-layout .op-9,
.landing-layout .op-5-f,
.landing-layout .op-6-f,
.landing-layout .op-7-f,
.landing-layout .op-8-f,
.landing-layout .op-9-f {
    opacity: 1;
}

/* Secondary lines keep a step down from headings, as a colour, not a fade. */
.landing-layout .title-desc,
.landing-layout .footer-section p.invert.op-7,
.landing-layout .footer-section .copyright-content.invert,
.landing-layout .happy-clients-section .title-desc,
.landing-layout .happy-clients-section .mb-0.op-8,
.landing-layout .pricing-card .op-8 {
    color: var(--sabe-muted) !important;
    opacity: 1;
}

.landing-layout .card-title,
.landing-layout .section-title-2,
.landing-layout .sub-title-1 {
    color: var(--sabe-ink);
    opacity: 1;
}

/* Quote body stays body ink. The company line above is the muted one. */
.landing-layout .happy-clients-section .invert.op-8.tx-15 {
    color: var(--sabe-body) !important;
    opacity: 1;
}

/* The clients-bg.svg is a light geometric wash. Quiet it so type sits on
   the solid surface, not on a pattern. */
.landing-layout .happy-clients-section::before {
    opacity: 0.05;
}

html[data-theme-color="dark"] .landing-layout .happy-clients-section::before {
    opacity: 0.08;
}

.landing-layout .carousel-indicators li,
.landing-layout .carousel-indicators [data-bs-target] {
    background-color: var(--sabe-muted) !important;
    opacity: 1 !important;
}

.landing-layout .carousel-indicators li.active,
.landing-layout .carousel-indicators .active {
    background-color: var(--sabe-primary) !important;
    opacity: 1 !important;
}

.landing-layout .carousel-control-prev,
.landing-layout .carousel-control-next,
.landing-layout .carousel-control-prev i,
.landing-layout .carousel-control-next i {
    color: var(--sabe-ink);
    opacity: 1;
}

/* Feature lists were painted entirely in accent-ink (5.0:1 on the surface).
   The sentence is body ink; only the check is accent. */
.landing-layout .pricing-card li.tx-primary {
    color: var(--sabe-body) !important;
}

.landing-layout .pricing-card li i,
.landing-layout .pricing-card li .fa {
    color: var(--sabe-accent-ink) !important;
}

html[data-theme-color] select.form-control,
html[data-theme-color] select.form-control option {
    color: var(--sabe-body);
    background-color: var(--sabe-page);
}
