:root {
    --ink: #0b1220;
    --ink-soft: #152033;
    --surface: #f3f6f8;
    --surface-elevated: #ffffff;
    --line: rgba(11, 18, 32, 0.1);
    --muted: #5b6b7c;
    --text: #152033;
    --primary: #0f766e;
    --primary-deep: #0b4f4a;
    --accent: #d97706;
    --accent-soft: rgba(217, 119, 6, 0.14);
    --hero-glow: rgba(15, 118, 110, 0.45);
    --radius-sm: 0.65rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --shadow-soft: 0 18px 50px rgba(11, 18, 32, 0.08);
    --shadow-lift: 0 22px 48px rgba(11, 18, 32, 0.14);
    --font-display: "Syne", "IBM Plex Sans Arabic", system-ui, sans-serif;
    --font-body: "Outfit", "IBM Plex Sans Arabic", system-ui, sans-serif;
    --container: 1120px;
    --header-h: 4.5rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--text);
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(15, 118, 110, 0.12), transparent 60%),
        radial-gradient(900px 420px at 90% 0%, rgba(217, 119, 6, 0.08), transparent 55%),
        var(--surface);
    line-height: 1.6;
}

body.theme-dark-hero {
    background: var(--surface);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.site-container {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(16px);
    background: color-mix(in srgb, var(--surface) 78%, transparent);
    border-bottom: 1px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
    background: color-mix(in srgb, var(--surface-elevated) 92%, transparent);
    border-bottom-color: var(--line);
    box-shadow: 0 10px 30px color-mix(in srgb, var(--ink) 6%, transparent);
}

.site-nav {
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand-lockup {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.brand-mark {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: 0.04em;
    color: var(--ink);
    line-height: 1.1;
}

.brand-mark span {
    color: var(--primary);
}

.brand-sub {
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(42vw, 280px);
}

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    background: var(--surface-elevated);
    color: var(--ink);
    border-radius: var(--radius-sm);
    width: 2.6rem;
    height: 2.6rem;
    align-items: center;
    justify-content: center;
}

.nav-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.35rem 1.15rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink-soft);
    position: relative;
    padding: 0.35rem 0;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--primary-deep);
}

.nav-links a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.2rem;
    height: 2px;
    background: var(--primary);
    border-radius: 999px;
}

.nav-account {
    position: relative;
    list-style: none;
}

.nav-dd {
    position: relative;
    list-style: none;
}

.nav-dd-toggle,
.nav-account-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--line);
    background: var(--surface-elevated, #fff);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-soft);
    cursor: pointer;
    line-height: 1.2;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.nav-dd-toggle:hover,
.nav-dd-toggle.is-active,
.nav-dd-toggle[aria-expanded="true"],
.nav-account-toggle:hover,
.nav-account-toggle.is-active,
.nav-account-toggle[aria-expanded="true"] {
    color: var(--primary-deep);
    border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
}

.nav-dd-toggle::after,
.nav-account-toggle::after {
    margin-inline-start: 0.15rem;
}

.nav-mode-toggle {
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    justify-content: center;
}

.nav-mode-toggle::after {
    display: none;
}

.nav-mode-toggle .mode-icon-light {
    display: none;
}

.nav-mode-toggle .mode-icon-dark {
    display: inline-block;
}

html[data-color-scheme="dark"] .nav-mode-toggle .mode-icon-light {
    display: inline-block;
}

html[data-color-scheme="dark"] .nav-mode-toggle .mode-icon-dark {
    display: none;
}

.nav-tools {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.nav-dd-menu,
.nav-account-menu {
    min-width: 12.5rem;
    margin-top: 0.45rem !important;
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    box-shadow: var(--shadow-soft);
    padding: 0.35rem 0;
    z-index: 1050;
    background: var(--surface-elevated, #fff);
}

.nav-account-meta {
    max-width: 16rem;
}

.nav-dd-menu .dropdown-item,
.nav-account-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.92rem;
    padding: 0.55rem 1rem;
    color: var(--ink);
    cursor: pointer;
    background: transparent;
    border: 0;
    width: 100%;
    text-align: inherit;
}

.nav-dd-menu .dropdown-item:hover,
.nav-dd-menu .dropdown-item:focus,
.nav-dd-menu .dropdown-item.is-active,
.nav-account-menu .dropdown-item:hover,
.nav-account-menu .dropdown-item:focus {
    background: color-mix(in srgb, var(--primary) 10%, var(--surface-elevated, #fff));
    color: var(--primary-deep);
}

.nav-lang-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.35rem;
    border-radius: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary-deep);
}

.nav-account-logout {
    color: #b91c1c !important;
}

.nav-account-logout:hover {
    background: #fef2f2 !important;
    color: #991b1b !important;
}

/* Show account/guest menus on hover (desktop); click still works via Bootstrap on touch */
@media (hover: hover) and (min-width: 992px) {
    .nav-dd:hover > .nav-dd-menu,
    .nav-dd:focus-within > .nav-dd-menu,
    .nav-account:hover > .nav-dd-menu,
    .nav-account:focus-within > .nav-dd-menu {
        display: block;
    }
}

/* Explicitly clickable cards only (hand cursor), not every panel-card */
a.panel-card,
a.panel-card-link,
.panel-card-link {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

a.panel-card::before,
a.panel-card-link::before,
.panel-card-link::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: var(--card-accent, var(--primary));
    opacity: 0.85;
}

@media (hover: hover) {
    a.panel-card:hover,
    a.panel-card-link:hover,
    .panel-card-link:hover {
        transform: translateY(-6px);
        border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
        box-shadow: var(--shadow-lift);
        color: inherit;
        text-decoration: none;
    }
}

a.panel-card:focus-visible,
a.panel-card-link:focus-visible,
.panel-card-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.nav-secondary {
    display: none;
}

.lang-switch {
    display: none; /* site header uses language dropdown */
}

.auth-panel .lang-switch {
    display: inline-flex;
    gap: 0.35rem;
}

.auth-panel .lang-switch a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface-elevated);
    text-decoration: none;
}

.auth-panel .lang-switch a.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.btn-core {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.75rem 1.35rem;
    font-weight: 650;
    font-size: 0.95rem;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-core:hover {
    transform: translateY(-1px);
}

.btn-primary-core {
    background: var(--primary);
    color: #fff;
}

.btn-primary-core:hover {
    background: var(--primary-deep);
    color: #fff;
}

.btn-ghost-core {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.btn-ghost-core:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-outline-core {
    background: var(--surface-elevated);
    border-color: var(--line);
    color: var(--ink);
}

.btn-outline-core:hover {
    border-color: var(--primary);
    color: var(--primary-deep);
    background: color-mix(in srgb, var(--primary) 10%, var(--surface-elevated));
}

.btn-accent-core {
    background: var(--accent);
    color: #fff;
}

.site-main {
    min-height: 60vh;
}

.flash-banner {
    width: min(100% - 2rem, var(--container));
    margin: 1rem auto 0;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
}

/* Hero */
.eco-hero {
    position: relative;
    min-height: min(48vh, 420px);
    display: grid;
    align-items: center;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(ellipse 70% 55% at 78% 18%, rgba(45, 212, 191, 0.28), transparent 58%),
        radial-gradient(ellipse 45% 40% at 12% 85%, rgba(245, 158, 11, 0.2), transparent 52%),
        linear-gradient(155deg, #041018 0%, #0a2a36 42%, #0b3f3a 100%);
}

.eco-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at 55% 35%, #000 15%, transparent 72%);
    pointer-events: none;
    opacity: 0.7;
}

.eco-hero__glow,
.eco-hero__panel {
    display: none;
    pointer-events: none;
}

.eco-hero__inner {
    position: relative;
    z-index: 1;
    width: min(100% - 2rem, var(--container));
    margin: 0 auto;
    padding: 2.75rem 0 2.25rem;
}

.eco-hero__kicker {
    display: none;
    margin: 0 0 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

.eco-hero__brand {
    font-family: var(--font-display);
    font-size: clamp(2.35rem, 6.5vw, 4.25rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 0.92;
    margin: 0 0 0.75rem;
    color: #ffffff;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(18px);
    animation: rise-in 0.8s ease forwards 0.1s;
}

.eco-hero__brand span {
    color: #5eead4;
}

.eco-hero__title {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.8vw, 1.85rem);
    font-weight: 700;
    max-width: 20ch;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    color: #ffffff;
    opacity: 0;
    transform: translateY(18px);
    animation: rise-in 0.8s ease forwards 0.25s;
}

.eco-hero__lead {
    max-width: 32rem;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1rem;
    margin: 0 0 1.15rem;
    line-height: 1.55;
    opacity: 0;
    transform: translateY(18px);
    animation: rise-in 0.8s ease forwards 0.4s;
}

.eco-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    opacity: 0;
    transform: translateY(18px);
    animation: rise-in 0.8s ease forwards 0.55s;
}

.eco-hero__actions .btn-core {
    padding: 0.65rem 1.15rem;
}

.eco-hero__actions .btn-primary-core {
    background: #14b8a6;
    color: #042f2e;
    font-weight: 750;
}

.eco-hero__actions .btn-primary-core:hover {
    background: #2dd4bf;
    color: #042f2e;
}

.eco-hero__orbit {
    position: absolute;
    width: min(28vw, 260px);
    height: min(28vw, 260px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    right: 6%;
    bottom: 12%;
    pointer-events: none;
    opacity: 0.5;
}

.eco-hero__orbit::after {
    content: "";
    position: absolute;
    inset: 18%;
    border: 1px dashed rgba(94, 234, 212, 0.4);
    border-radius: 50%;
}

.eco-hero__more {
    margin: 0.9rem 0 0;
    font-size: 0.92rem;
    opacity: 0;
    transform: translateY(12px);
    animation: rise-in 0.75s ease forwards 0.65s;
}

.eco-hero__more .link-light {
    color: #fbbf24;
    text-decoration: none;
    font-weight: 600;
}

.eco-hero__more .link-light:hover {
    text-decoration: underline;
}

.eco-hero__qr {
    margin-top: 0.85rem;
}

.eco-hero__qr img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    padding: 6px;
}

/* —— Hero style: Ember (side ribbon + warm tones) —— */
.eco-hero--ember {
    min-height: min(40vh, 360px);
    align-items: stretch;
    background:
        radial-gradient(ellipse 55% 70% at 100% 0%, rgba(251, 146, 60, 0.35), transparent 55%),
        linear-gradient(115deg, #1c1008 0%, #3b1d0a 48%, #7c2d12 100%);
}

.eco-hero--ember::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(90deg, #000 0%, transparent 70%);
    opacity: 0.55;
}

.eco-hero--ember .eco-hero__panel {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    width: min(38%, 22rem);
    background: linear-gradient(180deg, rgba(251, 146, 60, 0.22), rgba(0, 0, 0, 0.15));
    border-inline-end: 1px solid rgba(251, 191, 36, 0.28);
    clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
}

[dir="rtl"] .eco-hero--ember .eco-hero__panel {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 12% 100%);
}

.eco-hero--ember .eco-hero__orbit {
    display: none;
}

.eco-hero--ember .eco-hero__inner {
    padding: 2.25rem 0 2rem;
    padding-inline-start: min(6%, 2.5rem);
    max-width: 40rem;
    margin-inline-start: min(12%, 6rem);
}

[dir="rtl"] .eco-hero--ember .eco-hero__inner {
    margin-inline-start: auto;
    margin-inline-end: min(12%, 6rem);
}

.eco-hero--ember .eco-hero__kicker {
    display: block;
    color: #fdba74;
}

.eco-hero--ember .eco-hero__brand {
    font-size: clamp(1.85rem, 4.5vw, 2.75rem);
    letter-spacing: 0.08em;
}

.eco-hero--ember .eco-hero__brand span {
    color: #fbbf24;
}

.eco-hero--ember .eco-hero__title {
    max-width: 22ch;
    font-size: clamp(1.2rem, 2.5vw, 1.7rem);
}

.eco-hero--ember .eco-hero__actions .btn-primary-core {
    background: #f59e0b;
    color: #1c1008;
    border-radius: 0.55rem;
}

.eco-hero--ember .eco-hero__actions .btn-primary-core:hover {
    background: #fbbf24;
    color: #1c1008;
}

.eco-hero--ember .eco-hero__actions .btn-ghost-core {
    border-radius: 0.55rem;
    border-color: rgba(253, 186, 116, 0.45);
}

.eco-hero--ember .eco-hero__more .link-light {
    color: #fdba74;
}

/* —— Hero style: Spotlight (centered, cool night) —— */
.eco-hero--spotlight {
    min-height: min(42vh, 380px);
    text-align: center;
    background:
        radial-gradient(circle at 50% 110%, rgba(96, 165, 250, 0.35), transparent 48%),
        radial-gradient(circle at 50% 0%, rgba(129, 140, 248, 0.22), transparent 45%),
        linear-gradient(180deg, #070b14 0%, #101827 55%, #15203a 100%);
}

.eco-hero--spotlight::before {
    background-size: 72px 72px;
    opacity: 0.35;
    mask-image: radial-gradient(circle at 50% 60%, #000 10%, transparent 70%);
}

.eco-hero--spotlight .eco-hero__glow {
    display: block;
    position: absolute;
    width: min(70vw, 520px);
    height: min(70vw, 520px);
    left: 50%;
    top: 55%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.22), transparent 68%);
    filter: blur(4px);
}

.eco-hero--spotlight .eco-hero__orbit {
    width: min(42vw, 320px);
    height: min(42vw, 320px);
    right: auto;
    left: 50%;
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -42%);
    opacity: 0.35;
    border-color: rgba(147, 197, 253, 0.35);
}

.eco-hero--spotlight .eco-hero__orbit::after {
    border-color: rgba(165, 180, 252, 0.4);
}

.eco-hero--spotlight .eco-hero__inner {
    padding: 2.5rem 0 2.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.eco-hero--spotlight .eco-hero__kicker {
    display: block;
    color: #93c5fd;
    letter-spacing: 0.2em;
}

.eco-hero--spotlight .eco-hero__brand {
    font-size: clamp(2rem, 5.5vw, 3.4rem);
}

.eco-hero--spotlight .eco-hero__brand span {
    color: #60a5fa;
}

.eco-hero--spotlight .eco-hero__title {
    max-width: 22ch;
    margin-inline: auto;
}

.eco-hero--spotlight .eco-hero__lead {
    max-width: 30rem;
    margin-inline: auto;
}

.eco-hero--spotlight .eco-hero__actions {
    justify-content: center;
}

.eco-hero--spotlight .eco-hero__actions .btn-primary-core {
    background: #3b82f6;
    color: #fff;
    border-radius: 999px;
}

.eco-hero--spotlight .eco-hero__actions .btn-primary-core:hover {
    background: #60a5fa;
    color: #0b1220;
}

.eco-hero--spotlight .eco-hero__more .link-light {
    color: #93c5fd;
}

@media (max-width: 720px) {
    .eco-hero--ember .eco-hero__panel {
        width: 18%;
        opacity: 0.85;
    }

    .eco-hero--ember .eco-hero__inner {
        margin-inline-start: min(18%, 3.5rem);
        padding-inline-start: 0.5rem;
    }

    [dir="rtl"] .eco-hero--ember .eco-hero__inner {
        margin-inline-end: min(18%, 3.5rem);
    }
}

@keyframes rise-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections */
.section-block {
    padding: 4.5rem 0;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.45rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 750;
    margin: 0;
    color: var(--ink);
    line-height: 1.15;
}

.section-copy {
    color: var(--muted);
    margin: 0.5rem 0 0;
    max-width: 40rem;
}

/* Platform ecosystem */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}

.platform-tile {
    grid-column: span 4;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--surface-elevated);
    border: 1px solid var(--line);
    min-height: 240px;
    padding: 1.35rem 1.35rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    transform: translateY(24px);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.platform-tile.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
}

.platform-tile:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lift);
    border-color: color-mix(in srgb, var(--tile-color, var(--primary)) 35%, white);
}

.platform-tile::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: var(--tile-color, var(--primary));
}

.platform-tile__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.platform-tile__icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.85rem;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--tile-color, var(--primary)) 16%, white);
    color: var(--tile-color, var(--primary));
    font-size: 1.25rem;
}

.platform-tile__type {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.platform-tile__name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: var(--ink);
}

.platform-tile__domain {
    color: var(--primary-deep);
    font-size: 0.88rem;
    font-weight: 600;
}

.platform-tile__desc {
    color: var(--muted);
    font-size: 0.92rem;
    margin: 0;
    flex: 1;
}

.platform-tile__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.platform-tile__actions .btn-core {
    padding: 0.55rem 0.95rem;
    font-size: 0.85rem;
    flex: 1;
}

.platform-tile__actions .btn-visit {
    background: var(--tile-color, var(--primary));
    color: #fff;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.filter-chip {
    border: 1px solid var(--line);
    background: var(--surface-elevated);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
}

.filter-chip.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Split / labs / partner */
.split-panel {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.25rem;
}

.panel-card {
    background: var(--surface-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-soft);
}

.panel-card--ink {
    background: linear-gradient(145deg, #0b1220, #12343a);
    color: #f8fafc;
    border: none;
}

.panel-card--ink .section-copy,
.panel-card--ink .eyebrow {
    color: rgba(248, 250, 252, 0.72);
}

.panel-card--ink .eyebrow {
    color: #5eead4;
}

/* Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.blog-tile {
    background: var(--surface-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease;
}

.blog-tile:hover {
    transform: translateY(-4px);
}

.blog-tile__media {
    height: 180px;
    background: linear-gradient(135deg, #134e4a, #1e293b);
    object-fit: cover;
    width: 100%;
}

.blog-tile__body {
    padding: 1.15rem 1.2rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
}

.blog-tile__title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    color: var(--ink);
}

.meta-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--accent-soft);
    color: #92400e;
}

.badge-teal {
    background: rgba(15, 118, 110, 0.12);
    color: var(--primary-deep);
}

/* CTA band */
.cta-band {
    margin: 1rem 0 0;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    background:
        radial-gradient(600px 200px at 100% 0%, rgba(217, 119, 6, 0.25), transparent 50%),
        linear-gradient(120deg, #0b1220, #0f3d3a);
    color: #fff;
}

.cta-band .section-title {
    color: #fff;
}

.cta-band .section-copy {
    color: rgba(255, 255, 255, 0.75);
}

/* Page / detail layouts */
.page-hero {
    padding: 3.5rem 0 1.5rem;
}

.page-hero .section-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.content-prose {
    max-width: 46rem;
    color: var(--text);
    font-size: 1.02rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1.6fr 0.8fr;
    gap: 1.25rem;
    padding-bottom: 3rem;
}

.side-card {
    background: var(--surface-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    color: var(--text);
}

.contact-form .form-control,
.contact-form .form-select,
.contact-form textarea {
    border-radius: 0.75rem;
    border-color: var(--line);
    padding: 0.7rem 0.85rem;
}

.platform-show-banner {
    height: 8px;
    border-radius: 999px;
    background: var(--tile-color, var(--primary));
    margin-bottom: 1.25rem;
}

/* Footer — always night surface (independent from light/dark page tokens) */
.site-footer {
    --footer-bg: #0b1220;
    --footer-elevated: #151d2b;
    --footer-text: rgba(248, 250, 252, 0.9);
    --footer-muted: rgba(248, 250, 252, 0.65);
    --footer-line: rgba(255, 255, 255, 0.12);
    --footer-link: #5eead4;
    margin-top: 3rem;
    background:
        radial-gradient(700px 280px at 12% 0%, rgba(15, 118, 110, 0.22), transparent 55%),
        var(--footer-bg);
    color: var(--footer-text);
    padding: 3.5rem 0 1.75rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 2rem;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 0.65rem;
    color: #f8fafc;
}

.footer-brand span {
    color: var(--footer-link);
}

.footer-copy,
.footer-meta {
    color: var(--footer-muted);
    margin: 0;
}

.footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
    color: var(--footer-muted);
}

.footer-platform-name {
    color: #f8fafc;
    font-weight: 650;
}

.footer-list a {
    color: var(--footer-link);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-heading {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 1rem;
    color: rgba(248, 250, 252, 0.55);
}

.footer-bottom {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--footer-line);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    font-size: 0.85rem;
    color: rgba(248, 250, 252, 0.55);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.1rem;
    margin-top: 1rem;
}

.footer-nav a {
    color: rgba(248, 250, 252, 0.72);
    font-size: 0.9rem;
}

.footer-nav a:hover {
    color: #fff;
}

.footer-social__link {
    color: rgba(248, 250, 252, 0.65);
    font-size: 1.2rem;
    line-height: 1;
    transition: color 0.15s ease;
}

.footer-social__link:hover {
    color: var(--footer-link);
}

.footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    margin-bottom: 0.65rem;
}

.btn-footer-ghost {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.38) !important;
    color: #fff !important;
}

.btn-footer-ghost:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.55) !important;
    color: #fff !important;
}

.btn-footer-accent {
    display: inline-flex;
    margin-top: 0.25rem;
    background: var(--accent) !important;
    border-color: transparent !important;
    color: #fff !important;
}

.btn-footer-accent:hover {
    filter: brightness(1.08);
    color: #fff !important;
}

.footer-subscribe {
    margin-top: 1rem;
    max-width: 22rem;
}

.footer-subscribe__label {
    display: block;
    font-size: 0.8rem;
    color: var(--footer-muted);
    margin-bottom: 0.4rem;
}

.footer-subscribe__row {
    display: flex;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--footer-line);
    border-radius: 999px;
    overflow: hidden;
    background: var(--footer-elevated);
}

.footer-subscribe__input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0 !important;
    background: transparent !important;
    color: #f8fafc !important;
    box-shadow: none !important;
    padding: 0.55rem 0.95rem;
    font-size: 0.9rem;
    outline: none;
}

.footer-subscribe__input::placeholder {
    color: rgba(248, 250, 252, 0.45);
}

.footer-subscribe__btn {
    border: 0;
    background: var(--primary);
    color: #fff;
    font-weight: 650;
    font-size: 0.88rem;
    padding: 0.55rem 1rem;
    white-space: nowrap;
    cursor: pointer;
}

.footer-subscribe__btn:hover {
    filter: brightness(1.08);
}

.cookie-consent {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    background: #0b1220;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: none;
    z-index: 1050;
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45);
}

.cookie-consent.show {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

/* RTL — inherits theme CSS vars (admin-selectable fonts) */
[dir="rtl"] body,
[dir="rtl"] {
    font-family: var(--font-body);
}

[dir="rtl"] .eco-hero__title,
[dir="rtl"] .section-title,
[dir="rtl"] .brand-mark,
[dir="rtl"] .platform-tile__name,
[dir="rtl"] .blog-tile__title,
[dir="rtl"] .footer-brand {
    font-family: var(--font-display);
}

[dir="rtl"] .nav-links a.is-active::after {
    left: 0;
    right: 0;
}

[dir="rtl"] .eco-hero__orbit {
    right: auto;
    left: 6%;
}

[dir="rtl"] .platform-tile::before {
    left: auto;
    right: 0;
}

/* Responsive */
@media (max-width: 991.98px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav-panel {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        background: color-mix(in srgb, var(--surface-elevated) 98%, transparent);
        border-bottom: 1px solid var(--line);
        padding: 1rem;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        max-height: calc(100vh - var(--header-h));
        overflow: auto;
    }

    .nav-panel.is-open {
        display: flex;
    }

    .nav-tools {
        padding-top: 0.5rem;
        border-top: 1px solid var(--line);
        justify-content: flex-start;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links a {
        padding: 0.65rem 0.25rem;
    }

    .nav-secondary {
        display: flex;
        flex-wrap: wrap;
        gap: 0.65rem 1rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--line);
    }

    .platform-tile,
    .blog-tile {
        grid-column: span 6;
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .split-panel,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .eco-hero__orbit {
        opacity: 0.35;
        width: 260px;
        height: 260px;
    }
}

@media (max-width: 575.98px) {
    .platform-tile,
    .blog-tile {
        grid-column: span 12;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .eco-hero__inner {
        padding: 2.25rem 0 1.85rem;
    }

    .cta-band {
        padding: 1.5rem;
    }

    .platform-tile__actions {
        flex-direction: column;
    }
}

/* Tools sections hub */
.tools-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: sticky;
    top: 0.5rem;
    z-index: 20;
    padding: 0.65rem 0;
    background: color-mix(in srgb, var(--bg, #f8fafc) 92%, transparent);
    backdrop-filter: blur(8px);
}

.tools-section-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-elevated);
    color: var(--ink);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.tools-section-chip:hover {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
    color: var(--ink);
}

.tools-section-chip.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.tools-section-count {
    font-size: 0.75rem;
    opacity: 0.75;
}

.tools-section-chip.is-active .tools-section-count {
    opacity: 0.9;
}

.tools-breadcrumb a {
    color: inherit;
    text-decoration: none;
    opacity: 0.8;
}

.tools-breadcrumb a:hover {
    opacity: 1;
    text-decoration: underline;
}

.tool-privacy {
    padding: 0.65rem 0.85rem;
    border-radius: 0.5rem;
    background: rgba(15, 118, 110, 0.08);
    color: #134e4a;
}

.device-btn.is-active {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}

.home-section-card {
    transition: transform 0.15s ease;
}

.home-section-card:hover {
    transform: translateY(-2px);
}

/* —— Auth shell (login / register / password) —— */
.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--surface);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
}

.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(1.75rem, 4vw, 3rem);
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 55% at 78% 18%, rgba(45, 212, 191, 0.28), transparent 58%),
        radial-gradient(ellipse 45% 40% at 12% 85%, rgba(245, 158, 11, 0.2), transparent 52%),
        linear-gradient(155deg, #062825 0%, var(--primary-deep, #0b4f4a) 42%, #0a3d3a 100%);
}

.auth-brand__glow {
    position: absolute;
    inset: auto -20% -30% 30%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--hero-glow, rgba(15, 118, 110, 0.55)), transparent 68%);
    pointer-events: none;
    filter: blur(8px);
}

.auth-brand__top,
.auth-brand__body,
.auth-brand__foot {
    position: relative;
    z-index: 1;
}

.auth-brand__logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.auth-brand__logo {
    max-height: 3.25rem;
    width: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
}

.auth-brand__wordmark {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.75rem;
    letter-spacing: 0.04em;
    color: #fff;
}

.auth-brand__wordmark span {
    color: #5eead4;
}

.auth-brand__eyebrow {
    margin: 0 0 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

.auth-brand__title {
    margin: 0 0 0.85rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.85rem, 3.5vw, 2.65rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.auth-brand__lead {
    margin: 0;
    max-width: 28rem;
    font-size: 1.05rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
}

.auth-brand__home {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-brand__home:hover {
    color: #fff;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background:
        radial-gradient(900px 420px at 100% 0%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 55%),
        radial-gradient(700px 360px at 0% 100%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 50%),
        var(--surface);
    padding: 1.25rem 1.5rem 2rem;
}

.auth-panel__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.auth-panel__home-mobile {
    display: none;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.auth-panel__logo-sm {
    max-height: 2rem;
    width: auto;
}

.auth-card {
    width: min(100%, 420px);
    margin: auto;
    padding: 1.75rem 1.5rem;
    background: var(--surface-elevated, #fff);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.auth-panel__footer {
    margin: 1.5rem 0 0;
    text-align: center;
    font-size: 0.82rem;
    color: var(--muted);
}

.auth-panel__footer a {
    color: var(--primary-deep);
    font-weight: 600;
    text-decoration: none;
}

.auth-heading {
    margin-bottom: 1.35rem;
}

.auth-heading__title {
    margin: 0 0 0.4rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.55rem;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.auth-heading__lead {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.auth-form .form-label {
    font-weight: 600;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.form-control-auth,
.auth-form .form-control {
    border-radius: var(--radius-sm);
    border-color: var(--line);
    padding: 0.7rem 0.9rem;
    font-size: 0.98rem;
    background: var(--surface-elevated);
    color: var(--text);
}

.form-control-auth:focus,
.auth-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary) 22%, transparent);
}

.auth-form .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.auth-link {
    color: var(--primary-deep);
    text-decoration: none;
    font-size: 0.9rem;
}

.auth-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.auth-switch {
    margin: 1.25rem 0 0;
    text-align: center;
    font-size: 0.92rem;
    color: var(--muted);
}

.auth-alert {
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.95rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.auth-alert--ok {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.btn-ghost-dark {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}

.btn-ghost-dark:hover {
    border-color: var(--primary);
    color: var(--primary-deep);
}

.page-hero--compact {
    padding: 2rem 0 1.25rem;
}

.page-hero--brand {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 2.5rem 0 2rem;
    background:
        radial-gradient(ellipse 70% 55% at 78% 18%, rgba(45, 212, 191, 0.25), transparent 58%),
        linear-gradient(155deg, #062825 0%, var(--primary-deep, #0b4f4a) 48%, #0a3d3a 100%);
}

.page-hero--brand .eyebrow {
    color: rgba(255, 255, 255, 0.7);
}

.page-hero--brand .section-title,
.page-hero--brand .section-copy {
    color: #fff;
}

.page-hero--brand .section-copy {
    opacity: 0.85;
}

.panel-card {
    background: var(--surface-elevated, #fff);
}

.auth-shell .btn-core {
    cursor: pointer;
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
        padding-top: 1rem;
    }

    .auth-panel__home-mobile {
        display: inline-flex;
    }

    .auth-card {
        margin-top: 0.25rem;
        box-shadow: var(--shadow-soft);
    }
}

/* —— UI cards (unified hover / hierarchy) —— */
.ui-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    background: var(--surface-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.2rem 1.3rem;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    color: var(--text);
    opacity: 1;
    transform: translateY(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, opacity 0.4s ease;
}

.ui-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: var(--card-accent, var(--primary));
    opacity: 0.85;
}

.ui-card[data-reveal]:not(.is-visible) {
    opacity: 0;
    transform: translateY(18px);
}

.ui-card--link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    height: 100%;
}

.ui-card--link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

@media (hover: hover) {
    .ui-card--link:hover,
    .platform-tile:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-lift);
        border-color: color-mix(in srgb, var(--card-accent, var(--primary)) 35%, var(--line));
        color: inherit;
        text-decoration: none;
    }

    .ui-card[data-reveal]:not(.is-visible):hover {
        transform: translateY(12px);
    }
}

.ui-card__icon {
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 0.85rem;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--card-accent, var(--primary)) 14%, var(--surface-elevated));
    color: var(--card-accent, var(--primary));
    font-size: 1.2rem;
    flex-shrink: 0;
}

.ui-card__icon--sm {
    width: 2.1rem;
    height: 2.1rem;
    font-size: 1rem;
    border-radius: 0.65rem;
}

.ui-card__title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    color: var(--ink);
    line-height: 1.3;
}

.ui-card__text {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
}

.ui-card__meta {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.ui-card__badge {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 0.25rem;
    margin-top: auto;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 650;
    background: color-mix(in srgb, var(--primary) 10%, var(--surface));
    color: var(--primary-deep);
    border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
}

.ui-card__media {
    height: 96px;
    margin: -0.25rem -0.15rem 0.35rem;
    border-radius: var(--radius-sm);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 55%, #0b1220), color-mix(in srgb, var(--accent) 45%, #1e293b));
    object-fit: cover;
    width: calc(100% + 0.3rem);
}

.ui-card__media--img {
    height: 150px;
    display: block;
}

.ui-card--static {
    box-shadow: none;
}

.ui-card--static::before {
    display: none;
}

.content-shell {
    max-width: 48rem;
}

.content-shell .content-prose,
.content-shell .blog-content {
    color: var(--text);
    line-height: 1.75;
}

/* Soft lift for non-link ui-cards that are still “tiles” */
@media (hover: hover) {
    .ui-card:not(.ui-card--link):not(.ui-card--static):not(form):hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lift);
        border-color: color-mix(in srgb, var(--card-accent, var(--primary)) 28%, var(--line));
    }
}

/* Keep blog-tile as alias of card motion (legacy) */
.blog-tile {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    background: var(--surface-elevated);
    border-color: var(--line);
}

@media (hover: hover) {
    .blog-tile:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-lift);
    }
}

.ui-card--pdf {
    --card-accent: #c2410c;
}

.ui-card--code {
    --card-accent: #0891b2;
}

.ui-card--blog {
    --card-accent: var(--accent);
}

/* Section polish */
.section-block--tint {
    background:
        radial-gradient(900px 360px at 8% 0%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 60%),
        color-mix(in srgb, var(--surface) 70%, var(--surface-elevated));
}

.section-block--ink {
    background:
        radial-gradient(ellipse 70% 55% at 78% 18%, rgba(45, 212, 191, 0.18), transparent 58%),
        linear-gradient(155deg, #062825 0%, var(--primary-deep, #0b4f4a) 48%, #0a3d3a 100%);
    color: #fff;
}

.section-head--on-dark .section-title,
.section-head--on-dark .section-copy {
    color: #fff;
}

.section-head--on-dark .eyebrow {
    color: #5eead4;
}

.section-head--on-dark .section-copy {
    opacity: 0.85;
}

.btn-outline-on-dark {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #fff !important;
}

.btn-outline-on-dark:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.help-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.help-list__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: var(--surface-elevated);
    color: var(--ink);
    text-decoration: none;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.help-list__item span {
    flex: 1;
    font-weight: 600;
}

.help-list__arrow {
    color: var(--muted);
    font-size: 0.85rem;
}

@media (hover: hover) {
    .help-list__item:hover {
        transform: translateY(-3px);
        border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
        box-shadow: var(--shadow-lift);
        color: var(--ink);
    }
}

.platform-tile {
    background: var(--surface-elevated);
}

/* Tools chips theme-aware */
.tools-section-chip {
    background: var(--surface-elevated);
    border-color: var(--line);
    color: var(--ink);
}

.tools-section-chip:hover {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
}

.tools-section-chip.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.filter-chip {
    background: var(--surface-elevated);
}

/* Panel cards use theme surface */
.panel-card {
    background: var(--surface-elevated);
    border-color: var(--line);
    color: var(--text);
}

/* Auth shell dark */
html[data-color-scheme="dark"] .auth-card {
    background: var(--surface-elevated);
    border-color: var(--line);
}

html[data-color-scheme="dark"] .form-control-auth,
html[data-color-scheme="dark"] .auth-form .form-control {
    background: color-mix(in srgb, var(--surface) 80%, #000);
    color: var(--text);
    border-color: var(--line);
}

html[data-color-scheme="dark"] .auth-heading__title {
    color: var(--ink);
}

html[data-color-scheme="dark"] .flash-banner {
    background: color-mix(in srgb, var(--primary) 18%, var(--surface-elevated));
    color: var(--ink);
    border-color: color-mix(in srgb, var(--primary) 30%, transparent);
}

html[data-color-scheme="dark"] .text-muted {
    color: var(--muted) !important;
}

html[data-color-scheme="dark"] .badge.text-bg-light {
    background: color-mix(in srgb, var(--primary) 15%, var(--surface)) !important;
    color: var(--ink) !important;
}

/* =========================================================
   Full light/dark theme polish
   ========================================================= */
html {
    color-scheme: light;
}

html[data-color-scheme="dark"] {
    color-scheme: dark;
}

/* Buttons on page surface */
html[data-color-scheme="dark"] .btn-outline-core {
    background: var(--surface-elevated);
    border-color: var(--line);
    color: var(--ink);
}

html[data-color-scheme="dark"] .btn-outline-core:hover {
    background: color-mix(in srgb, var(--primary) 14%, var(--surface-elevated));
    border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
    color: var(--primary-deep);
}

html[data-color-scheme="dark"] .btn-ghost-dark {
    border-color: var(--line);
    color: var(--ink);
}

html[data-color-scheme="dark"] .btn-ghost-dark:hover {
    border-color: var(--primary);
    color: var(--primary-deep);
}

html[data-color-scheme="dark"] .btn-light,
html[data-color-scheme="dark"] .btn-outline-light {
    background: var(--surface-elevated) !important;
    border-color: var(--line) !important;
    color: var(--ink) !important;
}

html[data-color-scheme="dark"] .btn-close {
    filter: invert(1) grayscale(100%);
    opacity: 0.75;
}

/* Surfaces / cards */
html[data-color-scheme="dark"] .ui-card__badge {
    background: color-mix(in srgb, var(--primary) 16%, var(--surface-elevated));
    color: var(--primary-deep);
    border-color: color-mix(in srgb, var(--primary) 28%, transparent);
}

html[data-color-scheme="dark"] .blog-tile,
html[data-color-scheme="dark"] .side-card,
html[data-color-scheme="dark"] .panel-card,
html[data-color-scheme="dark"] .platform-tile,
html[data-color-scheme="dark"] .help-list__item {
    background: var(--surface-elevated);
    border-color: var(--line);
    color: var(--text);
}

html[data-color-scheme="dark"] .page-hero:not(.page-hero--brand) .section-title {
    color: var(--ink);
}

html[data-color-scheme="dark"] .content-prose,
html[data-color-scheme="dark"] .content-shell,
html[data-color-scheme="dark"] .blog-content {
    color: var(--text);
}

html[data-color-scheme="dark"] .content-prose a,
html[data-color-scheme="dark"] .blog-content a {
    color: var(--primary-deep);
}

html[data-color-scheme="dark"] pre,
html[data-color-scheme="dark"] code {
    background: color-mix(in srgb, var(--surface-elevated) 70%, #000);
    color: var(--ink-soft);
    border-color: var(--line);
}

html[data-color-scheme="dark"] .platform-tile:hover {
    border-color: color-mix(in srgb, var(--tile-color, var(--primary)) 40%, var(--line));
}

/* Nav dropdowns */
html[data-color-scheme="dark"] .nav-dd-menu,
html[data-color-scheme="dark"] .nav-account-menu,
html[data-color-scheme="dark"] .dropdown-menu {
    background: var(--surface-elevated);
    border-color: var(--line);
    color: var(--ink);
}

html[data-color-scheme="dark"] .nav-dd-menu .dropdown-item,
html[data-color-scheme="dark"] .nav-account-menu .dropdown-item,
html[data-color-scheme="dark"] .dropdown-menu .dropdown-item {
    color: var(--ink);
}

html[data-color-scheme="dark"] .nav-dd-menu .dropdown-item:hover,
html[data-color-scheme="dark"] .nav-dd-menu .dropdown-item:focus,
html[data-color-scheme="dark"] .nav-account-menu .dropdown-item:hover,
html[data-color-scheme="dark"] .nav-account-menu .dropdown-item:focus,
html[data-color-scheme="dark"] .dropdown-menu .dropdown-item:hover,
html[data-color-scheme="dark"] .dropdown-menu .dropdown-item:focus {
    background: color-mix(in srgb, var(--primary) 14%, var(--surface-elevated));
    color: var(--primary-deep);
}

html[data-color-scheme="dark"] .dropdown-divider {
    border-color: var(--line);
    opacity: 1;
}

html[data-color-scheme="dark"] .nav-account-logout {
    color: #f87171 !important;
}

html[data-color-scheme="dark"] .nav-account-logout:hover {
    background: rgba(248, 113, 113, 0.12) !important;
    color: #fecaca !important;
}

html[data-color-scheme="dark"] .nav-dd-toggle,
html[data-color-scheme="dark"] .nav-account-toggle,
html[data-color-scheme="dark"] .nav-toggle {
    background: var(--surface-elevated);
    border-color: var(--line);
    color: var(--ink);
}

/* Forms */
html[data-color-scheme="dark"] .form-control,
html[data-color-scheme="dark"] .form-select,
html[data-color-scheme="dark"] textarea.form-control,
html[data-color-scheme="dark"] .input-group-text {
    background: var(--surface-elevated);
    border-color: var(--line);
    color: var(--text);
}

html[data-color-scheme="dark"] .form-control::placeholder {
    color: var(--muted);
}

html[data-color-scheme="dark"] .form-control:focus,
html[data-color-scheme="dark"] .form-select:focus {
    background: var(--surface-elevated);
    border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
    color: var(--text);
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary) 22%, transparent);
}

html[data-color-scheme="dark"] .form-check-input {
    background-color: var(--surface-elevated);
    border-color: var(--line);
}

html[data-color-scheme="dark"] .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Bootstrap surfaces often left white by utilities */
html[data-color-scheme="dark"] .bg-white {
    background-color: var(--surface-elevated) !important;
}

html[data-color-scheme="dark"] .bg-light {
    background-color: var(--surface) !important;
}

html[data-color-scheme="dark"] .text-dark {
    color: var(--ink) !important;
}

html[data-color-scheme="dark"] .text-black {
    color: var(--ink) !important;
}

html[data-color-scheme="dark"] .text-body,
html[data-color-scheme="dark"] .text-body-secondary {
    color: var(--text) !important;
}

html[data-color-scheme="dark"] .border,
html[data-color-scheme="dark"] .border-top,
html[data-color-scheme="dark"] .border-bottom,
html[data-color-scheme="dark"] .border-start,
html[data-color-scheme="dark"] .border-end {
    border-color: var(--line) !important;
}

html[data-color-scheme="dark"] .card,
html[data-color-scheme="dark"] .list-group-item,
html[data-color-scheme="dark"] .modal-content,
html[data-color-scheme="dark"] .offcanvas,
html[data-color-scheme="dark"] .accordion-item {
    background: var(--surface-elevated);
    border-color: var(--line);
    color: var(--text);
}

html[data-color-scheme="dark"] .accordion-button {
    background: var(--surface-elevated);
    color: var(--ink);
}

html[data-color-scheme="dark"] .accordion-button:not(.collapsed) {
    background: color-mix(in srgb, var(--primary) 12%, var(--surface-elevated));
    color: var(--ink);
    box-shadow: none;
}

html[data-color-scheme="dark"] .accordion-button::after {
    filter: invert(1);
}

html[data-color-scheme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--line);
    --bs-table-striped-bg: color-mix(in srgb, var(--surface-elevated) 70%, transparent);
    --bs-table-hover-bg: color-mix(in srgb, var(--primary) 10%, var(--surface-elevated));
    color: var(--text);
}

html[data-color-scheme="dark"] .table-light,
html[data-color-scheme="dark"] thead.table-light,
html[data-color-scheme="dark"] .table > :not(caption) > * > * {
    --bs-table-bg: transparent;
    color: var(--text);
    border-color: var(--line);
}

html[data-color-scheme="dark"] .pagination .page-link {
    background: var(--surface-elevated);
    border-color: var(--line);
    color: var(--ink);
}

html[data-color-scheme="dark"] .pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

html[data-color-scheme="dark"] .pagination .page-item.disabled .page-link {
    background: var(--surface);
    color: var(--muted);
}

html[data-color-scheme="dark"] .alert-success {
    background: color-mix(in srgb, #10b981 16%, var(--surface-elevated));
    border-color: color-mix(in srgb, #10b981 35%, transparent);
    color: #bbf7d0;
}

html[data-color-scheme="dark"] .alert-danger {
    background: color-mix(in srgb, #ef4444 16%, var(--surface-elevated));
    border-color: color-mix(in srgb, #ef4444 35%, transparent);
    color: #fecaca;
}

html[data-color-scheme="dark"] .alert-warning {
    background: color-mix(in srgb, #f59e0b 16%, var(--surface-elevated));
    border-color: color-mix(in srgb, #f59e0b 35%, transparent);
    color: #fde68a;
}

html[data-color-scheme="dark"] .alert-info {
    background: color-mix(in srgb, #0ea5e9 16%, var(--surface-elevated));
    border-color: color-mix(in srgb, #0ea5e9 35%, transparent);
    color: #bae6fd;
}

html[data-color-scheme="dark"] .auth-alert--ok {
    background: color-mix(in srgb, #10b981 16%, var(--surface-elevated));
    color: #bbf7d0;
    border-color: color-mix(in srgb, #10b981 35%, transparent);
}

html[data-color-scheme="dark"] .auth-link {
    color: var(--primary-deep);
}

/* Tool / filter chips already themed via vars; reinforce */
html[data-color-scheme="dark"] .tools-section-chip,
html[data-color-scheme="dark"] .filter-chip {
    background: var(--surface-elevated);
    border-color: var(--line);
    color: var(--ink);
}

html[data-color-scheme="dark"] .tools-section-chip.is-active,
html[data-color-scheme="dark"] .filter-chip.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Keep intentional dark bands untouched */
html[data-color-scheme="dark"] .site-footer,
html[data-color-scheme="dark"] .cookie-consent,
html[data-color-scheme="dark"] .panel-card--ink,
html[data-color-scheme="dark"] .eco-hero,
html[data-color-scheme="dark"] .page-hero--brand,
html[data-color-scheme="dark"] .cta-band {
    /* footer/hero keep fixed night styling via their own rules */
}

/* Footer must NEVER flip with --ink on dark mode */
html[data-color-scheme="dark"] .site-footer {
    background:
        radial-gradient(700px 280px at 12% 0%, rgba(45, 212, 191, 0.14), transparent 55%),
        #0b1220;
    color: rgba(248, 250, 252, 0.9);
}

html[data-color-scheme="dark"] .site-footer .btn-outline-core,
html[data-color-scheme="dark"] .site-footer .btn-core.btn-outline-core {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.38) !important;
    color: #fff !important;
}

html[data-color-scheme="dark"] .site-footer .form-control {
    background: #151d2b !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
}

html[data-color-scheme="dark"] .site-footer .btn-light {
    background: #2dd4bf !important;
    border-color: transparent !important;
    color: #0b1220 !important;
}


/* —— Homepage content density (AdSense-friendly prose) —— */
.eco-hero__more {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    align-items: center;
    margin-top: 1rem;
}

.eco-hero__more-sep {
    opacity: 0.45;
}

.home-prose {
    max-width: 46rem;
}

.home-prose .section-title {
    margin-bottom: 0.85rem;
}

.home-prose__body {
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--text);
}

.home-prose__body p {
    margin: 0 0 0.95rem;
}

.home-prose__body a {
    color: var(--primary-deep);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.home-stats {
    list-style: none;
    margin: 1.4rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.home-stats li {
    background: var(--surface-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0.85rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.home-stats strong {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--ink);
    line-height: 1.2;
}

.home-stats span {
    font-size: 0.82rem;
    color: var(--muted);
}

.home-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.home-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-elevated);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.home-shortcut i {
    color: var(--primary);
    font-size: 1rem;
}

.home-shortcut:hover {
    border-color: color-mix(in srgb, var(--primary) 40%, var(--line));
    background: color-mix(in srgb, var(--primary) 8%, var(--surface-elevated));
    transform: translateY(-1px);
    color: var(--ink);
}

.home-step-num {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    background: color-mix(in srgb, var(--primary) 14%, var(--surface));
    color: var(--primary-deep);
    margin-bottom: 0.35rem;
}

.home-faq {
    display: grid;
    gap: 0.65rem;
    max-width: 48rem;
}

.home-faq__item {
    background: var(--surface-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0.15rem 1rem 0.15rem;
    box-shadow: var(--shadow-soft);
}

.home-faq__item summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--ink);
    padding: 0.85rem 0;
    list-style: none;
}

.home-faq__item summary::-webkit-details-marker {
    display: none;
}

.home-faq__item summary::after {
    content: "+";
    float: inline-end;
    color: var(--muted);
    font-weight: 700;
}

.home-faq__item[open] summary::after {
    content: "–";
}

.home-faq__item p {
    margin: 0 0 0.95rem;
    color: var(--text);
    line-height: 1.7;
}

.home-faq__item a {
    color: var(--primary-deep);
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 720px) {
    .home-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .ui-card,
    .platform-tile,
    .help-list__item,
    .btn-core {
        transition: none !important;
    }

    .ui-card--link:hover,
    .platform-tile:hover,
    .help-list__item:hover {
        transform: none !important;
    }

    .ui-card[data-reveal]:not(.is-visible),
    .platform-tile[data-reveal]:not(.is-visible) {
        opacity: 1;
        transform: none;
    }
}

