/* ============================================================
   EcomsGuide.online — design system
   No framework. Single-file. Modern CSS.
   ============================================================ */

/* ---------- 1. Design tokens — palette matched to the logo ----------
     blue   #10477A   header, nav, brand text, primary structural
     teal   #2CB0B5   links, icons, accent
     orange #F7992F   CTA buttons (white text)
     white  #FFFFFF   page background
   ---------------------------------------------------------------------- */
:root {
    /* Brand — logo dark blue */
    --brand:        #10477A;
    --brand-dark:   #0A3258;
    --brand-light:  #E0EAF3;
    --brand-mid:    #1F619E;

    /* Accent — logo teal (used as the link / icon highlight) */
    --accent:       #2CB0B5;
    --accent-dark:  #1F8F94;
    --accent-light: #E0F4F4;

    /* CTA — logo orange */
    --cta:          #F7992F;
    --cta-dark:     #DD7D14;

    --link-color:   var(--accent);
    --link-hover:   var(--accent-dark);

    /* Neutrals */
    --bg:           #FFFFFF;
    --bg-elev:      #F4F7FA;
    --bg-soft:      #EAF0F5;
    --surface:      #FFFFFF;
    --border:       #DDE3EA;
    --border-strong:#B7C2CE;
    --text:         #0E1A26;
    --text-soft:    #475569;
    --text-mute:    #6B7785;
    --link:         var(--link-color);
    --shadow-sm:    0 1px 2px rgba(16,71,122,.07);
    --shadow-md:    0 6px 18px rgba(16,71,122,.10);
    --shadow-lg:    0 20px 40px rgba(16,71,122,.14);

    /* Status */
    --warning-bg:   #FFF4DF;
    --warning-border:#F7C46A;
    --warning-text: #8A5A00;
    --success-bg:   #E0F4F4;
    --success-text: #1F8F94;

    /* Spacing scale (multiples of 4) */
    --space-1: .25rem; --space-2: .5rem; --space-3: .75rem;
    --space-4: 1rem;   --space-5: 1.25rem; --space-6: 1.5rem;
    --space-7: 1.75rem;--space-8: 2rem;    --space-10:2.5rem;
    --space-12:3rem;   --space-16:4rem;    --space-20:5rem;

    /* Type scale */
    --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono:    ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    --fs-xs: .8125rem; --fs-sm: .9375rem; --fs-md: 1rem;
    --fs-lg: 1.125rem; --fs-xl: 1.25rem; --fs-2xl:1.5rem;
    --fs-3xl:1.875rem; --fs-4xl:2.5rem;   --fs-5xl:3.25rem;

    /* Radii */
    --radius-sm: 6px;  --radius-md: 10px; --radius-lg: 16px; --radius-xl: 24px;

    /* Layout */
    --container:    1400px;
    --container-narrow: 880px;
    --header-h:     72px;

    /* Motion */
    --ease: cubic-bezier(.4,0,.2,1);
}

/* ---------- 2. Reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 var(--fs-md)/1.6 var(--font-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: transparent; }
code { font-family: var(--font-mono); background: var(--bg-soft); padding: .15em .4em; border-radius: 4px; font-size: .9em; }
table { width: 100%; border-collapse: collapse; margin: var(--space-6) 0; }
th, td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); text-align: left; }
th { background: var(--bg-soft); font-weight: 600; font-size: var(--fs-sm); }

h1, h2, h3, h4, h5 { line-height: 1.2; font-weight: 700; margin: 0 0 var(--space-4); letter-spacing: -.015em; }
h1 { font-size: clamp(1.875rem, 1.4rem + 2vw, var(--fs-4xl)); }
h2 { font-size: var(--fs-2xl); margin-top: var(--space-10); }
h3 { font-size: var(--fs-xl); margin-top: var(--space-8); }
h4 { font-size: var(--fs-lg); margin-top: var(--space-6); }
p  { margin: 0 0 var(--space-4); }

::selection { background: var(--brand-light); color: var(--text); }

/* ---------- 3. Layout helpers ---------- */
.ecg-container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--space-5);
}
.ecg-container--narrow { max-width: var(--container-narrow); }

.ecg-grid { display: grid; gap: var(--space-6); }
.ecg-grid--3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.ecg-grid--4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.ecg-grid--2 { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }

.ecg-flex { display: flex; gap: var(--space-4); align-items: center; flex-wrap: wrap; }

/* ---------- 4. Header ---------- */
.ecg-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in oklab, var(--bg) 88%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
    display: flex; align-items: center;
}
.ecg-header__inner {
    display: flex; align-items: center; gap: var(--space-6);
    width: 100%; max-width: var(--container);
    margin-inline: auto; padding-inline: var(--space-5);
    justify-content: space-between;
}
.ecg-logo {
    display: inline-flex; align-items: center;
    color: var(--text); line-height: 0;
}
.ecg-logo:hover { text-decoration: none; }
.ecg-logo img {
    height: 44px; width: auto; max-width: 100%;
    object-fit: contain;
    display: block;
}
.ecg-footer .ecg-logo img { height: 52px; }
@media (max-width: 600px) {
    .ecg-logo img { height: 36px; }
}
.ecg-nav { display: flex; align-items: center; gap: var(--space-1); }
.ecg-nav a {
    color: var(--text-soft); padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm); font-size: var(--fs-sm); font-weight: 500;
    transition: background .15s var(--ease), color .15s var(--ease);
}
.ecg-nav a:hover, .ecg-nav a.is-active { color: var(--text); background: var(--bg-soft); text-decoration: none; }

/* Mega menu */
.ecg-mega {
    position: relative;
}
.ecg-mega__trigger {
    color: var(--text-soft); padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm); font-size: var(--fs-sm); font-weight: 500;
    display: inline-flex; align-items: center; gap: var(--space-1);
}
.ecg-mega__trigger:hover { background: var(--bg-soft); color: var(--text); }
.ecg-mega__trigger::after { content: '▾'; font-size: 10px; opacity: .6; }
.ecg-mega__panel {
    position: absolute; top: calc(100% + 8px); left: -120px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    padding: var(--space-6); min-width: 560px;
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .15s var(--ease), transform .15s var(--ease), visibility .15s var(--ease);
}
.ecg-mega:hover .ecg-mega__panel,
.ecg-mega:focus-within .ecg-mega__panel { opacity: 1; visibility: visible; transform: translateY(0); }
.ecg-mega__grid { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--space-3); }
.ecg-mega__item {
    display: flex; align-items: center; gap: var(--space-3);
    padding: var(--space-3); border-radius: var(--radius-md);
    color: var(--text); transition: background .15s var(--ease);
}
.ecg-mega__item:hover { background: var(--bg-soft); text-decoration: none; }
.ecg-mega__icon {
    width: 36px; height: 36px; border-radius: 9px;
    display: grid; place-items: center;
    color: white; font-weight: 800; font-size: 14px;
    flex-shrink: 0;
}
.ecg-mega__name { font-weight: 600; font-size: var(--fs-sm); }
.ecg-mega__tag { font-size: var(--fs-xs); color: var(--text-mute); }

/* Header search */
.ecg-search {
    position: relative; flex: 1; max-width: 360px; margin-left: auto;
}
.ecg-search input {
    width: 100%; padding: var(--space-3) var(--space-4) var(--space-3) 38px;
    background: var(--bg-soft); border: 1px solid transparent;
    border-radius: var(--radius-md); font-size: var(--fs-sm);
    transition: background .15s var(--ease), border-color .15s var(--ease);
}
.ecg-search input:focus { background: var(--surface); border-color: var(--brand); outline: 0; }
.ecg-search::before {
    content: ''; position: absolute; left: 14px; top: 50%; width: 16px; height: 16px;
    transform: translateY(-50%);
    background: no-repeat center/contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>");
    pointer-events: none;
}
.ecg-search__results {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    max-height: 420px; overflow-y: auto; z-index: 60;
    display: none;
}
.ecg-search__results.is-open { display: block; }
.ecg-search__result {
    display: block; padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.ecg-search__result:last-child { border-bottom: 0; }
.ecg-search__result:hover, .ecg-search__result.is-focus { background: var(--bg-soft); text-decoration: none; }
.ecg-search__result strong { display: block; font-size: var(--fs-sm); margin-bottom: 2px; }
.ecg-search__result span { font-size: var(--fs-xs); color: var(--text-mute); }
.ecg-search__empty { padding: var(--space-4); text-align: center; color: var(--text-mute); font-size: var(--fs-sm); }

/* Header utilities */
.ecg-header__util { display: flex; align-items: center; gap: var(--space-2); }

.ecg-menu-toggle { display: none; width: 36px; height: 36px; border-radius: 8px; color: var(--text); }
.ecg-menu-toggle:hover { background: var(--bg-soft); }

/* ---------- 5. Disclaimer banner ---------- */
.ecg-disclaimer {
    background: linear-gradient(90deg, var(--warning-bg) 0%, color-mix(in oklab, var(--warning-bg) 60%, var(--bg) 40%) 100%);
    border-bottom: 1px solid var(--warning-border);
    color: var(--warning-text);
    font-size: var(--fs-xs);
    text-align: center;
    padding: var(--space-2) var(--space-5);
}
.ecg-disclaimer a { color: inherit; text-decoration: underline; font-weight: 600; }

/* ---------- 6. Hero ---------- */
.ecg-hero {
    position: relative; overflow: hidden;
    padding: clamp(56px, 6vw, 96px) 0 clamp(72px, 8vw, 128px);
    background:
        radial-gradient(900px 700px at -10% 50%, #FFEAD0 0%, transparent 55%),
        radial-gradient(900px 700px at 110% -10%, #DBEEEE 0%, transparent 60%),
        linear-gradient(180deg, #FAFCFD 0%, #FFFFFF 100%);
}

/* Two soft decorative arcs — logo palette */
.ecg-hero::before,
.ecg-hero::after {
    content: ''; position: absolute; border-radius: 50%; pointer-events: none;
    z-index: 0;
}
.ecg-hero::before {
    /* Soft orange wash — top-left */
    width: 520px; height: 520px;
    left: -240px; top: -120px;
    background: radial-gradient(circle at 50% 50%, #FCD9A6 0%, #FCD9A6 40%, transparent 70%);
    opacity: .8;
}
.ecg-hero::after {
    /* Soft teal wash — top-right */
    width: 640px; height: 640px;
    right: -260px; top: -180px;
    background: radial-gradient(circle at 50% 50%, #BFE5E6 0%, #BFE5E6 38%, transparent 70%);
    opacity: .8;
}

/* Make sure content sits above the decorative shapes */
.ecg-hero > .ecg-container { position: relative; z-index: 1; }

/* Hero two-column layout */
.ecg-hero__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-10);
    align-items: center;
}
@media (min-width: 900px) {
    .ecg-hero__grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        gap: var(--space-12);
    }
}
.ecg-hero__text { min-width: 0; }
.ecg-hero__visual {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-lg);
    transform: rotate(1.2deg);
    transition: transform .4s var(--ease);
    background: var(--bg-soft);
}
.ecg-hero__visual:hover { transform: rotate(0deg); }
.ecg-hero__visual::after {
    /* subtle inner ring for definition over light backgrounds */
    content: ''; position: absolute; inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(15,23,41,.06);
    pointer-events: none;
}
.ecg-hero__visual img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
@media (max-width: 899px) {
    .ecg-hero__visual { aspect-ratio: 16 / 10; transform: none; }
    .ecg-hero__visual:hover { transform: none; }
}

/* Sparkles */
.ecg-hero__sparkle {
    position: absolute; pointer-events: none; opacity: .65;
    animation: ecg-sparkle 4s var(--ease) infinite;
}
.ecg-hero__sparkle--a { top: 38%; right: 8%;  width: 28px; height: 28px; animation-delay: .2s; }
.ecg-hero__sparkle--b { top: 72%; right: 14%; width: 18px; height: 18px; animation-delay: 1.4s; }
.ecg-hero__sparkle--c { top: 22%; left: 6%;   width: 14px; height: 14px; animation-delay: 2.4s; }
.ecg-hero__sparkle svg { width: 100%; height: 100%; color: var(--brand); }
@keyframes ecg-sparkle {
    0%, 100% { transform: scale(1)   rotate(0deg);   opacity: .35; }
    50%      { transform: scale(1.2) rotate(15deg);  opacity: .85; }
}
.ecg-hero__eyebrow {
    display: inline-flex; align-items: center; gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-soft);
    margin-bottom: var(--space-4);
}
.ecg-hero__eyebrow::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 30%, transparent);
}
.ecg-hero h1 {
    font-size: clamp(2.25rem, 1.5rem + 3.5vw, var(--fs-5xl));
    max-width: 22ch; margin-bottom: var(--space-5);
    background: linear-gradient(135deg, var(--text) 0%, color-mix(in oklab, var(--brand) 70%, var(--text) 30%) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.ecg-hero p.lede {
    font-size: var(--fs-lg); color: var(--text-soft);
    max-width: 56ch; margin-bottom: var(--space-8);
}
.ecg-hero__search {
    max-width: 640px; position: relative;
}
.ecg-hero__search input {
    width: 100%; padding: 18px 64px 18px 56px;
    border-radius: var(--radius-lg); border: 1px solid var(--border-strong);
    background: var(--surface); font-size: var(--fs-md);
    box-shadow: var(--shadow-md);
    transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.ecg-hero__search input:focus { border-color: var(--brand); outline: 0; box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 25%, transparent); }
.ecg-hero__search::before {
    content: ''; position: absolute; left: 20px; top: 50%; width: 20px; height: 20px;
    transform: translateY(-50%);
    background: no-repeat center/contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>");
}
.ecg-hero__suggest { margin-top: var(--space-3); font-size: var(--fs-sm); color: var(--text-mute); }
.ecg-hero__suggest a {
    display: inline-block; padding: 4px 10px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-soft);
    margin: 0 4px 4px 0; font-size: var(--fs-xs);
}
.ecg-hero__suggest a:hover { background: var(--brand-light); color: var(--brand-dark); border-color: var(--brand-light); text-decoration: none; }

/* ---------- 7. Section ---------- */
.ecg-section { padding: var(--space-16) 0; }
.ecg-section--soft { background: var(--bg-elev); }
.ecg-section__head { margin-bottom: var(--space-8); }
.ecg-section__eyebrow {
    text-transform: uppercase; letter-spacing: .08em; font-size: var(--fs-xs);
    color: var(--brand-dark); font-weight: 700; margin-bottom: var(--space-2);
}
.ecg-section__title { font-size: var(--fs-3xl); margin: 0; max-width: 24ch; }
.ecg-section__lede { color: var(--text-soft); max-width: 64ch; margin-top: var(--space-3); }

/* ---------- 8. Platform cards ---------- */
.ecg-platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-4);
}
.ecg-platform-card {
    display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: var(--space-5);
    color: var(--text);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
    position: relative; overflow: hidden;
}
.ecg-platform-card:hover {
    transform: translateY(-3px); box-shadow: var(--shadow-md);
    border-color: var(--border-strong); text-decoration: none;
}
.ecg-platform-card::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 4px;
    background: var(--card-accent, var(--brand));
}
.ecg-platform-card__icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: grid; place-items: center; color: white;
    font-size: 22px; font-weight: 800;
    background: var(--card-grad, var(--brand));
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-sm);
}
.ecg-platform-card__brand {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1px solid var(--border);
    display: grid; place-items: center;
    margin-bottom: var(--space-4);
    padding: var(--space-3);
    overflow: hidden;
}
.ecg-platform-card__brand img {
    width: 100%; height: 100%;
    max-height: 100px;
    object-fit: contain;
    display: block;
}
.ecg-platform-card__name { font-size: var(--fs-lg); font-weight: 700; margin-bottom: var(--space-1); }
.ecg-platform-card__tag { font-size: var(--fs-xs); color: var(--text-mute); }
.ecg-platform-card__count {
    margin-top: var(--space-4); font-size: var(--fs-xs); color: var(--text-mute);
    display: inline-flex; align-items: center; gap: var(--space-1);
}

/* ---------- 9. Article cards ---------- */
.ecg-article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-5);
}
.ecg-article-card {
    display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: var(--space-5);
    color: var(--text);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.ecg-article-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; border-color: var(--border-strong); }
.ecg-article-card__meta {
    display: flex; align-items: center; gap: var(--space-2);
    font-size: var(--fs-xs); color: var(--text-mute);
    margin-bottom: var(--space-3);
}
.ecg-article-card__cat {
    display: inline-flex; align-items: center; padding: 2px 8px;
    border-radius: 999px;
    background: var(--brand-light); color: var(--brand-dark);
    font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
}
.ecg-article-card h3 {
    font-size: var(--fs-md); margin: 0 0 var(--space-3); line-height: 1.4;
}
.ecg-article-card p { font-size: var(--fs-sm); color: var(--text-soft); margin: 0; }
.ecg-article-card__foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: var(--space-4); padding-top: var(--space-4);
    border-top: 1px solid var(--border);
    font-size: var(--fs-xs); color: var(--text-mute);
}
.ecg-article-card__platform {
    display: inline-flex; align-items: center; gap: var(--space-1);
    color: var(--text-soft); font-weight: 600;
}

/* ---------- 9b. Product categories (platform pages) ---------- */
.ecg-prodcat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-3);
}
.ecg-prodcat-card {
    position: relative;
    display: flex; align-items: center; gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    transition: transform .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.ecg-prodcat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}
.ecg-prodcat-card:hover .ecg-prodcat-card__arrow {
    color: var(--brand);
    transform: translateX(2px);
}
.ecg-prodcat-card__arrow {
    margin-left: auto; color: var(--text-mute); font-size: 18px; font-weight: 600;
    transition: transform .15s var(--ease), color .15s var(--ease);
}
.ecg-prodcat-card__dot {
    flex-shrink: 0;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--card-grad, var(--brand));
    box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 12%, transparent);
}
.ecg-prodcat-card__icon {
    flex-shrink: 0;
    width: 38px; height: 38px;
    border-radius: 10px;
    display: grid; place-items: center;
    color: white;
    background: var(--card-grad, var(--brand));
    box-shadow: var(--shadow-sm);
}
.ecg-prodcat-card__icon svg { width: 20px; height: 20px; }
.ecg-prodcat-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ecg-prodcat-card__body strong { font-size: var(--fs-sm); font-weight: 700; color: var(--text); }
.ecg-prodcat-card__body span { font-size: var(--fs-xs); color: var(--text-mute); }

/* ---------- 10. Categories ---------- */
.ecg-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-3);
}
.ecg-cat-card {
    display: flex; flex-direction: column; gap: var(--space-2);
    padding: var(--space-4);
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    transition: transform .15s var(--ease), border-color .15s var(--ease);
}
.ecg-cat-card:hover { transform: translateY(-2px); border-color: var(--brand); text-decoration: none; }
.ecg-cat-card__title { font-weight: 600; font-size: var(--fs-sm); }
.ecg-cat-card__count { font-size: var(--fs-xs); color: var(--text-mute); }

/* ---------- 11. Buttons ---------- */
.ecg-btn {
    display: inline-flex; align-items: center; gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm); font-weight: 600;
    transition: transform .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
}
.ecg-btn:hover { text-decoration: none; transform: translateY(-1px); }
.ecg-btn--primary {
    background: var(--cta); color: #ffffff;
    border: 1px solid var(--cta-dark);
    box-shadow: var(--shadow-sm);
    text-shadow: 0 1px 0 rgba(0,0,0,.12);
}
.ecg-btn--primary:hover { background: var(--cta-dark); color: #ffffff; box-shadow: var(--shadow-md); }
.ecg-btn--ghost {
    background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.ecg-btn--ghost:hover { background: var(--bg-soft); }

/* ---------- 12. Article layout ---------- */
.ecg-article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    padding: var(--space-8) 0;
}
@media (min-width: 980px) {
    .ecg-article-layout { grid-template-columns: 260px minmax(0,1fr) 220px; }
}
.ecg-sidebar {
    align-self: start; position: sticky; top: calc(var(--header-h) + var(--space-5));
    max-height: calc(100vh - var(--header-h) - var(--space-10));
    overflow-y: auto;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: var(--space-5);
}
.ecg-sidebar h4 {
    font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em;
    color: var(--text-mute); margin: var(--space-3) 0 var(--space-2);
}
.ecg-sidebar h4:first-child { margin-top: 0; }
.ecg-sidebar ul { list-style: none; padding: 0; margin: 0 0 var(--space-4); }
.ecg-sidebar li { margin: 0; }
.ecg-sidebar a {
    display: block; padding: 6px 10px; border-radius: 6px;
    color: var(--text-soft); font-size: var(--fs-sm);
    transition: background .15s var(--ease), color .15s var(--ease);
}
.ecg-sidebar a:hover, .ecg-sidebar a.is-active { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.ecg-sidebar a.is-active { color: var(--brand-dark); font-weight: 600; }

.ecg-toc { font-size: var(--fs-sm); }
.ecg-toc a { color: var(--text-mute); }
.ecg-toc a.is-active { color: var(--brand-dark); border-left: 2px solid var(--brand); padding-left: 8px; }

.ecg-article-body {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: clamp(24px, 4vw, 56px);
    box-shadow: var(--shadow-sm);
}
.ecg-article-body h1 { margin-top: 0; }
.ecg-article-body h2 {
    padding-top: var(--space-6);
    border-top: 1px solid var(--border);
    font-size: var(--fs-2xl);
}
.ecg-article-body p, .ecg-article-body li { font-size: var(--fs-md); line-height: 1.75; color: var(--text); }
.ecg-article-body ul, .ecg-article-body ol { padding-left: 1.4em; margin: 0 0 var(--space-5); }
.ecg-article-body li { margin-bottom: var(--space-2); }
.ecg-article-body .ecg-article-meta {
    display: flex; align-items: center; gap: var(--space-4);
    color: var(--text-mute); font-size: var(--fs-sm);
    margin-bottom: var(--space-6);
}
.ecg-article-body .ecg-article-meta__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-mute); }

/* Support CTA (Customer Support articles only) */
.ecg-support-cta {
    display: flex; align-items: center; gap: var(--space-4);
    margin: var(--space-6) 0 var(--space-8);
    padding: var(--space-4) var(--space-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text);
    position: relative; overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease);
}
.ecg-support-cta::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
    background: var(--cta-grad, var(--brand));
}
.ecg-support-cta:hover {
    text-decoration: none; transform: translateY(-2px);
    box-shadow: var(--shadow-md); border-color: var(--border-strong);
}
.ecg-support-cta__icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center; color: white;
    background: var(--cta-grad, var(--brand));
    flex-shrink: 0; margin-left: var(--space-2);
}
.ecg-support-cta__body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ecg-support-cta__body strong { font-size: var(--fs-md); font-weight: 700; }
.ecg-support-cta__body span { font-size: var(--fs-sm); color: var(--text-soft); }
.ecg-support-cta__arrow {
    font-size: 22px; color: var(--text-mute); padding-right: var(--space-2);
    transition: transform .15s var(--ease), color .15s var(--ease);
}
.ecg-support-cta:hover .ecg-support-cta__arrow {
    transform: translate(2px,-2px); color: var(--text);
}

/* Article callouts */
.ecg-callout {
    background: var(--bg-soft); border-left: 4px solid var(--brand);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    margin: var(--space-5) 0;
}
.ecg-callout--warning { background: var(--warning-bg); border-color: var(--warning-text); color: var(--warning-text); }

/* FAQ */
.ecg-faq { margin-top: var(--space-8); }
.ecg-faq details {
    border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-3); background: var(--surface);
    transition: border-color .15s var(--ease);
}
.ecg-faq details[open] { border-color: var(--brand); }
.ecg-faq summary {
    cursor: pointer; font-weight: 600; font-size: var(--fs-md);
    list-style: none; display: flex; align-items: center; gap: var(--space-3);
}
.ecg-faq summary::-webkit-details-marker { display: none; }
.ecg-faq summary::before {
    content: '+'; font-size: 22px; color: var(--brand); width: 24px;
    transition: transform .2s var(--ease);
}
.ecg-faq details[open] summary::before { content: '−'; }
.ecg-faq details p { margin: var(--space-3) 0 0; color: var(--text-soft); }

/* Breadcrumb */
.ecg-breadcrumb {
    display: flex; flex-wrap: wrap; align-items: center;
    list-style: none; padding: 0; margin: 0 0 var(--space-5);
    font-size: var(--fs-xs); color: var(--text-mute);
}
.ecg-breadcrumb li { display: inline-flex; align-items: center; }
.ecg-breadcrumb li + li::before { content: '/'; margin: 0 var(--space-2); color: var(--text-mute); }
.ecg-breadcrumb a { color: var(--text-soft); }
.ecg-breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }

/* ---------- 13. Platform hero ---------- */
.ecg-platform-hero {
    position: relative; overflow: hidden;
    padding: clamp(48px, 6vw, 80px) 0;
    background: var(--platform-grad, linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%));
    color: white;
}
.ecg-platform-hero h1 { color: white; }
.ecg-platform-hero p { color: rgba(255,255,255,.85); max-width: 60ch; }
.ecg-platform-hero__icon {
    width: 64px; height: 64px; border-radius: 16px;
    background: rgba(255,255,255,.15); backdrop-filter: blur(8px);
    display: grid; place-items: center; color: white;
    font-size: 28px; font-weight: 800; margin-bottom: var(--space-4);
}

/* Hero — two-column grid with brand on the right */
.ecg-platform-hero__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    align-items: center;
}
@media (min-width: 900px) {
    .ecg-platform-hero__grid {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        gap: var(--space-10);
    }
}
.ecg-platform-hero__text { min-width: 0; }
.ecg-platform-hero__visual {
    display: flex; align-items: center; justify-content: flex-end;
    min-width: 0;
}
.ecg-platform-hero__brand-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: var(--space-6) var(--space-7);
    box-shadow: var(--shadow-lg);
    display: grid; place-items: center;
    width: 100%; max-width: 380px;
    aspect-ratio: 5 / 3;
    transform: rotate(1.2deg);
    transition: transform .35s var(--ease);
}
.ecg-platform-hero__brand-card:hover { transform: rotate(0deg); }
.ecg-platform-hero__brand-card img {
    display: block;
    width: 100%; height: 100%;
    max-height: 180px;
    object-fit: contain;
}
@media (max-width: 899px) {
    .ecg-platform-hero__visual { justify-content: center; }
    .ecg-platform-hero__brand-card { transform: none; aspect-ratio: 16 / 9; max-width: 420px; }
    .ecg-platform-hero__brand-card:hover { transform: none; }
}
.ecg-platform-hero__pills {
    display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-5);
}
.ecg-platform-hero__pill {
    padding: 4px 12px; background: rgba(255,255,255,.18); border-radius: 999px;
    font-size: var(--fs-xs); font-weight: 600;
}
.ecg-platform-hero__pill--link {
    color: white; background: rgba(255,255,255,.22);
    border: 1px solid rgba(255,255,255,.25);
    transition: background .15s var(--ease);
}
.ecg-platform-hero__pill--link:hover {
    background: rgba(255,255,255,.34); text-decoration: none;
}

/* ---------- 14. Footer ---------- */
.ecg-footer {
    background: var(--bg-elev); border-top: 1px solid var(--border);
    padding: var(--space-12) 0 var(--space-8);
    margin-top: var(--space-16);
    color: var(--text-soft);
    font-size: var(--fs-sm);
}
.ecg-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}
.ecg-footer h5 {
    font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em;
    color: var(--text); font-weight: 700; margin: 0 0 var(--space-3);
}
.ecg-footer ul { list-style: none; padding: 0; margin: 0; }
.ecg-footer li { margin-bottom: var(--space-2); }
.ecg-footer a { color: var(--text-soft); }
.ecg-footer a:hover { color: var(--text); }
.ecg-footer__bottom {
    padding-top: var(--space-6); border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-3);
    font-size: var(--fs-xs); color: var(--text-mute);
}

/* Email contact line */
.ecg-footer__contact {
    display: inline-flex; align-items: center; gap: var(--space-2);
    margin: var(--space-3) 0 0; font-size: var(--fs-sm);
}
.ecg-footer__contact svg { color: var(--accent); flex-shrink: 0; }
.ecg-footer__contact a {
    color: var(--text); font-weight: 600;
    border-bottom: 1px dashed var(--border-strong);
    padding-bottom: 1px;
}
.ecg-footer__contact a:hover { color: var(--brand); border-bottom-color: var(--brand); text-decoration: none; }


/* Newsletter */
.ecg-newsletter {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: var(--space-10) var(--space-8);
    text-align: center; margin: var(--space-12) 0 0;
}
.ecg-newsletter h3 { font-size: var(--fs-2xl); margin-top: 0; }
.ecg-newsletter p { color: var(--text-soft); margin-bottom: var(--space-5); }
.ecg-newsletter form {
    display: flex; gap: var(--space-2); max-width: 460px; margin: 0 auto;
}
.ecg-newsletter input {
    flex: 1; padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md); border: 1px solid var(--border);
    background: var(--bg);
}
.ecg-newsletter input:focus { outline: 0; border-color: var(--brand); }

/* ---------- 15. Forms ---------- */
.ecg-form { display: grid; gap: var(--space-4); max-width: 560px; }
.ecg-form label { display: flex; flex-direction: column; gap: var(--space-2); font-size: var(--fs-sm); font-weight: 600; }
.ecg-form input, .ecg-form select, .ecg-form textarea {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: var(--fs-md); font-weight: 400;
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.ecg-form input:focus, .ecg-form select:focus, .ecg-form textarea:focus {
    outline: 0; border-color: var(--brand);
    box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 18%, transparent);
}
.ecg-form__status { color: var(--success-text); font-size: var(--fs-sm); margin: 0; }

/* ---------- 16. 404 ---------- */
.ecg-404 {
    text-align: center; padding: var(--space-20) 0;
}
.ecg-404 h1 {
    font-size: clamp(4rem, 12vw, 8rem);
    background: linear-gradient(135deg, var(--brand), var(--accent));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-4);
}

/* ---------- 17. Responsive ---------- */
@media (max-width: 900px) {
    .ecg-nav, .ecg-search { display: none; }
    .ecg-menu-toggle { display: grid; place-items: center; }
    .ecg-header__inner { gap: var(--space-3); }
    .ecg-mega__panel { left: 0; min-width: 90vw; }
    .ecg-footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
}
@media (max-width: 600px) {
    .ecg-footer__grid { grid-template-columns: 1fr; }
    .ecg-newsletter form { flex-direction: column; }
    .ecg-section { padding: var(--space-12) 0; }
}

/* Mobile menu drawer */
.ecg-mobile-nav {
    position: fixed; inset: 0; background: var(--bg);
    z-index: 100; padding: var(--space-6) var(--space-5);
    transform: translateX(100%); transition: transform .25s var(--ease);
    overflow-y: auto;
}
.ecg-mobile-nav.is-open { transform: translateX(0); }
.ecg-mobile-nav__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-6); }
.ecg-mobile-nav h5 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--text-mute); margin: var(--space-5) 0 var(--space-2); }
.ecg-mobile-nav a { display: block; padding: var(--space-3) 0; color: var(--text); font-weight: 500; border-bottom: 1px solid var(--border); }
.ecg-mobile-nav a:hover { color: var(--brand); text-decoration: none; }

/* Back-to-top button */
.ecg-to-top {
    position: fixed;
    right: clamp(16px, 3vw, 28px);
    bottom: clamp(16px, 3vw, 28px);
    width: 46px; height: 46px;
    border-radius: 50%;
    display: grid; place-items: center;
    color: #ffffff;
    background: var(--cta);
    border: 1px solid var(--cta-dark);
    box-shadow: var(--shadow-md);
    transition: transform .2s var(--ease), opacity .2s var(--ease), background .15s var(--ease);
    opacity: 0; transform: translateY(8px) scale(.94);
    z-index: 90;
}
.ecg-to-top.is-visible {
    opacity: 1; transform: translateY(0) scale(1);
}
.ecg-to-top:hover { background: var(--cta-dark); transform: translateY(-2px) scale(1.03); }
.ecg-to-top:focus-visible { outline: 3px solid color-mix(in oklab, var(--cta) 50%, transparent); outline-offset: 2px; }
.ecg-to-top[hidden] { display: none; }

/* ---------- 18. Responsive polish — phone / tablet / desktop ---------- */

/* 1. Prevent horizontal scroll site-wide */
html, body { max-width: 100%; overflow-x: hidden; }

/* 2. Prose elements break long URLs / code so they never overflow */
.ecg-article-body,
.ecg-article-body p,
.ecg-article-body li,
.ecg-article-body a,
.ecg-article-body code,
.ecg-article-body pre { overflow-wrap: anywhere; word-break: break-word; }
.ecg-article-body pre { white-space: pre-wrap; }

/* 3. Wrap any table in an article body in a horizontal-scroll container
      via a CSS-only "trap" — wrap programmatically with display:block + overflow */
.ecg-article-body table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
}
.ecg-article-body table thead,
.ecg-article-body table tbody { display: table; width: 100%; table-layout: auto; }

/* 4. Hero search input shouldn't overflow on tiny phones */
.ecg-hero__search input { padding-left: 50px; padding-right: 18px; }

/* 5. Tablet (≤ 980px) — drop the right-hand TOC, keep sidebar */
@media (max-width: 979px) {
    .ecg-article-layout { grid-template-columns: 1fr; gap: var(--space-6); }
    .ecg-article-layout > aside.ecg-sidebar:last-child { display: none; }
    .ecg-sidebar { position: static; max-height: none; }
    .ecg-article-body { padding: var(--space-6) var(--space-5); }
}

/* 6. Tablet — soften two-column heros so brand card doesn't crowd text */
@media (max-width: 1024px) and (min-width: 900px) {
    .ecg-platform-hero__brand-card { max-width: 280px; }
    .ecg-hero__visual { max-width: 460px; margin-left: auto; }
}

/* 7. Phone (≤ 720px) — typography + spacing tightening */
@media (max-width: 720px) {
    :root {
        --fs-3xl: 1.625rem;
        --fs-4xl: 2rem;
        --fs-5xl: 2.25rem;
    }
    h1 { font-size: clamp(1.625rem, 1.2rem + 2.5vw, 2rem); }
    h2 { font-size: 1.375rem; margin-top: var(--space-8); }
    h3 { font-size: 1.125rem; }
    .ecg-hero { padding: var(--space-12) 0 var(--space-10); }
    .ecg-section { padding: var(--space-10) 0; }
    .ecg-section__head { margin-bottom: var(--space-6); }
    .ecg-platform-hero { padding: var(--space-10) 0; }
    .ecg-platform-hero__brand-card { padding: var(--space-4) var(--space-5); aspect-ratio: 16 / 9; }
    .ecg-hero__search input { padding: 14px 18px 14px 46px; font-size: var(--fs-sm); }
    .ecg-hero__search::before { left: 16px; width: 18px; height: 18px; }
    .ecg-search__results { max-height: 60vh; }

    /* Slim disclaimer banner */
    .ecg-disclaimer { font-size: 11px; padding: var(--space-2) var(--space-4); line-height: 1.4; }

    /* Article body gets edge-to-edge padding */
    .ecg-article-body { border-radius: var(--radius-lg); padding: var(--space-5); }
    .ecg-article-meta { gap: var(--space-2); font-size: var(--fs-xs); }
    .ecg-article-meta__dot { display: none; }

    /* Cards: single-column at narrow widths */
    .ecg-platform-grid { grid-template-columns: 1fr 1fr; }
    .ecg-article-grid { grid-template-columns: 1fr; }
    .ecg-cat-grid { grid-template-columns: 1fr 1fr; }
    .ecg-prodcat-grid { grid-template-columns: 1fr; }

    /* Newsletter form stacks (was set ≤600 already) */
    .ecg-newsletter { padding: var(--space-6) var(--space-5); }
    .ecg-newsletter h3 { font-size: 1.375rem; }
    .ecg-newsletter form { flex-direction: column; }

    /* Buttons full-width when alone */
    .ecg-btn { padding: var(--space-3) var(--space-4); }

    /* FAQ a bit tighter */
    .ecg-faq details { padding: var(--space-3) var(--space-4); }
    .ecg-faq summary { font-size: var(--fs-sm); }

    /* Hero text gradient — disable on phones (looks washed at small size) */
    .ecg-hero h1 {
        background: none; -webkit-text-fill-color: var(--text); color: var(--text);
    }
    /* Hide the hardcoded <br> in the H1 on phones */
    .ecg-hero h1 br { display: none; }

    /* Tilted brand cards — flat on phones */
    .ecg-hero__visual,
    .ecg-platform-hero__brand-card { transform: none; }

    /* Back-to-top — smaller */
    .ecg-to-top { width: 40px; height: 40px; right: 12px; bottom: 12px; }
}

/* 8. Very narrow phones (≤ 420px) — one-column platform cards too */
@media (max-width: 420px) {
    .ecg-platform-grid { grid-template-columns: 1fr; }
    .ecg-cat-grid { grid-template-columns: 1fr; }
    .ecg-header__inner { padding-inline: var(--space-4); }
    .ecg-container { padding-inline: var(--space-4); }
    .ecg-logo img { height: 32px; }
    .ecg-footer__bottom { font-size: 11px; }
    .ecg-prodcat-card { padding: var(--space-3); }
    .ecg-prodcat-card__icon { width: 32px; height: 32px; }
    .ecg-prodcat-card__icon svg { width: 16px; height: 16px; }

    /* Article card foot dot+stamp shouldn't double-wrap awkwardly */
    .ecg-article-card__foot { font-size: 11px; }

    /* Support CTA — stack arrow + body cleanly */
    .ecg-support-cta { flex-wrap: wrap; gap: var(--space-3); padding: var(--space-3); }
    .ecg-support-cta__icon { width: 36px; height: 36px; }
}

/* 9. Sticky-header offset for in-page anchors (works at any width) */
:target {
    scroll-margin-top: calc(var(--header-h) + var(--space-4));
}
[id] { scroll-margin-top: calc(var(--header-h) + var(--space-4)); }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
