
        /* FA placeholder: reserve icon space while FA loads asynchronously */
        .fas, .far, .fab, .fa { display: inline-block; width: 1em; height: 1em; }

        *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
        html { overflow-x: clip; }

        :root {
            --bg: #f7f8fc;
            --card: #ffffff;
            --ink: #111827;
            --muted: #6b7280;
            --border: rgba(17, 24, 39, 0.10);
            --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);

            --blue: #2563eb;
            --blue-soft: #eaf1ff;
            --pink: #ec4899;
            --pink-soft: #ffe7f3;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
            background: var(--bg);
            color: var(--ink);
            min-height: 100vh;
            line-height: 1.6;
            overflow-x: clip;
        }

        a { color: inherit; text-decoration: none; }

        .wrap {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* NAV */
        .nav {
            position: relative;
            z-index: 50;
            background: #fff;
            border-bottom: 1px solid var(--border);
        }

        .nav-inner {
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            align-items: center;
            gap: 12px;
            padding: 14px 0;
            position: relative;
        }

        .brand {
            justify-self: start;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            font-weight: 800;
            letter-spacing: -0.02em;
        }

        .brand-badge {
            height: 56px;
            display: inline-flex;
            align-items: center;
            flex-shrink: 0;
        }

        .brand-badge img {
            height: 100%;
            width: auto;
            display: block;
            transform: scale(1.35);
            transform-origin: center;
        }

        .brand-name {
            font-size: 18px;
        }

        .menu {
            justify-self: center;
            display: flex;
            gap: 18px;
            list-style: none;
            align-items: center;
            font-weight: 600;
            color: #374151;
        }

        .menu a, .menu-logout-btn {
            padding: 8px 10px;
            border-radius: 10px;
        }

        .menu a:hover, .menu-logout-btn:hover {
            background: linear-gradient(135deg, var(--blue-soft), var(--pink-soft));
        }

        .menu-logout-form, .auth-nav__form { margin: 0; }
        .menu-logout-btn {
            border: 0;
            background: transparent;
            color: inherit;
            font: inherit;
            cursor: pointer;
        }

        /* ── Desktop "More" dropdown ── */
        .menu-more {
            position: relative;
        }
        .menu-more__btn {
            display: inline-flex; align-items: center; gap: 4px;
            padding: 8px 10px; border-radius: 10px;
            font-weight: 600; font-size: inherit; color: inherit;
            background: none; border: none; cursor: pointer;
            font-family: inherit;
        }
        .menu-more__btn:hover {
            background: linear-gradient(135deg, var(--blue-soft), var(--pink-soft));
        }
        .menu-more__btn i.fa-chevron-down { font-size: 10px; transition: transform .2s; }
        .menu-more:hover .menu-more__btn i.fa-chevron-down { transform: rotate(180deg); }
        .menu-more__drop {
            position: absolute; top: 100%; right: 0;
            background: #fff; border: 1px solid var(--border);
            border-radius: 12px; box-shadow: var(--shadow);
            min-width: 190px; padding: 6px; margin-top: 0;
            opacity: 0; pointer-events: none;
            transform: translateY(-6px);
            transition: opacity .15s, transform .15s;
            z-index: 70;
        }
        /* Invisible bridge to keep hover alive across the gap */
        .menu-more::after {
            content: ''; position: absolute;
            left: 0; right: 0; top: 100%; height: 8px;
        }
        .menu-more:hover .menu-more__drop {
            opacity: 1; pointer-events: auto; transform: translateY(0);
        }
        .menu-more__drop a {
            display: flex; align-items: center; gap: 8px;
            padding: 10px 14px; border-radius: 8px;
            white-space: nowrap; font-size: 14px;
        }
        .menu-more__drop a:hover {
            background: linear-gradient(135deg, var(--blue-soft), var(--pink-soft));
        }

        /* Tools dropdown opens aligned to its left edge (first menu item) */
        .menu-more--tools .menu-more__drop { left: 0; right: auto; }

        /* Desktop Tools dropdown: modern 2-column big-icon grid */
        .menu-more__drop--grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(280px, 1fr));
            gap: 6px;
            min-width: 600px;
            padding: 8px;
        }
        .menu-more__drop--grid a {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 12px;
            text-align: left;
            padding: 11px 12px;
            border-radius: 12px;
            border: 1px solid transparent;
            color: #374151;
            transition: transform .14s ease, box-shadow .18s ease, border-color .18s ease;
        }
        .menu-more__drop--grid a:hover {
            background: #fff;
            border-color: rgba(124, 58, 237, .25);
            box-shadow: 0 6px 16px rgba(17, 24, 39, .08);
            transform: translateY(-1px);
        }
        /* Page-specific dark nav themes may make every hovered nav link white.
           Tool cards always have a white surface, so keep their copy dark. */
        .nav .menu .menu-more__drop--grid a:hover,
        .nav .menu .menu-more__drop--grid a:focus-visible {
            color: #374151;
        }
        .nav .menu .menu-more__drop--grid a:hover .mtg-label,
        .nav .menu .menu-more__drop--grid a:focus-visible .mtg-label {
            color: #1f2937;
        }
        .menu-more__drop--grid .mtg-ico {
            flex: 0 0 auto;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 44px; height: 44px;
            border-radius: 12px;
            font-size: 19px;
        }
        .menu-more__drop--grid .mtg-text {
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
        }
        .menu-more__drop--grid .mtg-label {
            font-weight: 700;
            font-size: 14px;
            line-height: 1.2;
        }
        .menu-more__drop--grid .mtg-desc {
            font-weight: 500;
            font-size: 12px;
            line-height: 1.3;
            color: #9ca3af;
            white-space: normal;
            overflow-wrap: anywhere;
        }

        /* Guides dropdown: compact cards with the same visual language as Tools. */
        .menu-more--guides .menu-more__drop { left: 0; right: auto; }
        .menu-more__drop--guides {
            min-width: 340px;
            padding: 8px;
        }
        .menu-more__drop--guides a {
            gap: 12px;
            padding: 11px 12px;
            border: 1px solid transparent;
            border-radius: 12px;
            color: #374151;
            transition: transform .14s ease, box-shadow .18s ease, border-color .18s ease;
        }
        .menu-more__drop--guides a:hover,
        .menu-more__drop--guides a:focus-visible {
            color: #374151;
            background: #fff;
            border-color: rgba(124,58,237,.25);
            box-shadow: 0 6px 16px rgba(17,24,39,.08);
            transform: translateY(-1px);
        }
        .menu-more__drop--guides .mtg-ico {
            flex: 0 0 auto;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 42px;
            height: 42px;
            border-radius: 12px;
            font-size: 18px;
        }
        .menu-more__drop--guides .mtg-text {
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
        }
        .menu-more__drop--guides .mtg-label {
            color: #1f2937;
            font-size: 14px;
            font-weight: 700;
            line-height: 1.2;
        }
        .menu-more__drop--guides .mtg-desc {
            color: #9ca3af;
            font-size: 12px;
            font-weight: 500;
            line-height: 1.3;
            white-space: normal;
        }

        /* Keep top-level links on a single line — never wrap to two rows */
        .menu { flex-wrap: nowrap; }
        .menu > li { flex: 0 0 auto; }
        .menu a, .menu-logout-btn, .menu-more__btn { white-space: nowrap; }

        /* ── Auth buttons (Log in / Sign up / Account) ── */
        .auth-nav {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .auth-nav__btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 14px;
            border-radius: 11px;
            font-size: 13px;
            font-weight: 700;
            line-height: 1;
            text-decoration: none;
            white-space: nowrap;
            border: 1px solid transparent;
            transition: transform 0.14s ease, box-shadow 0.18s ease,
                        border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
        }
        button.auth-nav__btn { font-family: inherit; cursor: pointer; }
        .auth-nav__btn--ghost {
            color: #374151;
            background: #fff;
            border-color: var(--border);
            font-weight: 600;
        }
        .auth-nav__btn--ghost:hover {
            color: #111827;
            border-color: rgba(124, 58, 237, 0.35);
            box-shadow: 0 4px 12px rgba(17, 24, 39, 0.08);
            transform: translateY(-1px);
        }
        .auth-nav__btn--primary {
            color: #fff;
            background: linear-gradient(135deg, #7c3aed, #ec4899);
            box-shadow: 0 4px 14px rgba(236, 72, 153, 0.28);
        }
        .auth-nav__btn--primary:hover {
            box-shadow: 0 8px 22px rgba(236, 72, 153, 0.38);
            transform: translateY(-1px);
            filter: brightness(1.03);
        }
        .auth-nav__btn:active { transform: translateY(0); }

        .hamburger {
            display: none;
            border: 1px solid var(--border);
            background: #fff;
            color: #374151;
            border-radius: 12px;
            padding: 10px 12px;
            cursor: pointer;
            line-height: 1;
            transition: transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
        }

        .hamburger i {
            font-size: 18px;
        }

        .hamburger:hover {
            border-color: rgba(17, 24, 39, 0.18);
            box-shadow: 0 10px 30px rgba(17,24,39,0.10);
            transform: translateY(-1px);
        }

        .hamburger:focus-visible {
            border-color: rgba(236, 72, 153, 0.45);
            box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.18);
        }

        .nav.nav-open .hamburger {
            background: linear-gradient(135deg, var(--blue-soft), var(--pink-soft));
        }

        .lang {
            justify-self: end;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            position: relative;
        }

        .lang-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            border: 1px solid var(--border);
            background: #fff;
            padding: 8px 12px;
            border-radius: 12px;
            font-weight: 600;
            font-size: 14px;
            color: #374151;
            cursor: pointer;
            transition: box-shadow 0.18s ease, border-color 0.18s ease;
        }

        .lang-btn:hover {
            border-color: rgba(17, 24, 39, 0.18);
            box-shadow: 0 4px 12px rgba(17,24,39,0.08);
        }

        .lang-btn img {
            width: 22px;
            height: 16px;
            border-radius: 2px;
            object-fit: cover;
        }

        .lang-dropdown {
            position: absolute;
            top: calc(100% + 6px);
            right: 0;
            background: #fff;
            border: 1px solid var(--border);
            border-radius: 12px;
            box-shadow: var(--shadow);
            overflow: hidden;
            overflow-y: auto;
            max-height: 70vh;
            opacity: 0;
            pointer-events: none;
            transform: translateY(-4px);
            transition: opacity 0.15s ease, transform 0.15s ease;
            z-index: 70;
            min-width: 380px;
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            padding: 6px;
            gap: 2px;
        }

        .lang.lang-open .lang-dropdown {
            opacity: 1;
            pointer-events: auto;
            transform: translateY(0);
        }

        .lang-option {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 9px 12px;
            font-size: 13px;
            font-weight: 600;
            color: #374151;
            cursor: pointer;
            transition: background 0.12s;
            border: none;
            background: none;
            width: 100%;
            border-radius: 8px;
            white-space: nowrap;
        }

        .lang-option:hover {
            background: linear-gradient(135deg, var(--blue-soft), var(--pink-soft));
        }

        .lang-option img {
            width: 22px;
            height: 16px;
            border-radius: 2px;
            object-fit: cover;
        }

        .nav-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(17, 24, 39, 0.28);
            backdrop-filter: blur(2px);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.18s ease;
            z-index: 40;
        }

        .nav.nav-open + .nav-backdrop {
            opacity: 1;
            pointer-events: auto;
        }

        /* HEADER */
        .header {
            background: linear-gradient(135deg, var(--blue) 0%, var(--pink) 100%);
            color: #fff;
            padding: 56px 0 48px;
            min-height: 380px;
            display: flex;
            align-items: center;
            justify-content: center;
            contain: layout style;
        }

        .header-inner {
            max-width: 790px;
            width: 100%;
            margin: 0 auto;
            text-align: center;
            padding: 0 20px;
            flex: 1;
            min-width: 0;
        }

        .header-wide {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 24px;
            max-width: 1440px;
            width: 100%;
            margin: 0 auto;
            padding: 0 20px;
        }

        .header-side-ad {
            width: 300px;
            flex-shrink: 0;
            align-self: center;
            overflow: hidden;
        }

        /* Keep both header side ads taking space to center the form */
        .header-side-ad[data-ad-id] {
            display: block !important;
            visibility: hidden;
        }
        .header-side-ad.ad-slot--filled {
            display: flex !important;
            visibility: visible;
        }
        @media (max-width: 1280px) {
            .header-side-ad,
            .header-side-ad[data-ad-id],
            .header-side-ad.ad-slot--filled,
            div.ad-slot.header-side-ad {
                display: none !important;
                visibility: hidden !important;
                width: 0 !important;
                height: 0 !important;
                max-width: 0 !important;
                max-height: 0 !important;
                overflow: hidden !important;
                margin: 0 !important;
                padding: 0 !important;
                opacity: 0 !important;
                pointer-events: none !important;
            }
        }

        .hero-logo {
            margin-bottom: 16px;
            filter: drop-shadow(0 4px 12px rgba(0,0,0,.15));
        }

        .hero-title {
            font-size: 48px;
            line-height: 1.08;
            letter-spacing: -0.03em;
            margin-bottom: 12px;
            font-weight: 900;
        }

        .hero-subtitle {
            font-size: 18px;
            opacity: 0.92;
            margin-bottom: 24px;
            line-height: 1.5;
        }

        /* BODY (3 columns) */
        .main {
            padding: 32px 0 48px;
        }

        .layout {
            display: grid;
            grid-template-columns: 200px minmax(0, 1fr) 200px;
            gap: 24px;
            align-items: start;
        }

        .content {
            display: flex;
            flex-direction: column;
            gap: 24px;
            min-width: 0;
            align-self: start;
        }

        .content-inner {
            display: contents;
        }

        .ad {
            align-self: start;
            position: sticky;
            top: 16px;
            height: fit-content;
            will-change: transform;
        }

        .ad-placeholder {
            min-height: 250px;
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 18px;
            box-shadow: var(--shadow);
            padding: 16px;
            display: grid;
            place-content: center;
            text-align: center;
            color: #9ca3af;
        }

        .ad-placeholder i { font-size: 28px; margin-bottom: 10px; }

        /* CONTENT TYPO */
        .section {
            margin: 0;
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 18px;
            box-shadow: var(--shadow);
            padding: 28px 30px;
            min-width: 0;
            overflow: hidden;
        }
        .section h2 {
            font-size: 24px;
            margin-bottom: 12px;
            letter-spacing: -0.02em;
            display: flex;
            align-items: center;
        }
        .section p {
            color: #374151;
            font-size: 15px;
            line-height: 1.7;
        }

        /* AD SLOT between sections */
        .ad-slot {
            border: 2px dashed rgba(17,24,39,0.10);
            border-radius: 14px;
            padding: 16px;
            text-align: center;
            color: #9ca3af;
            font-size: 13px;
            background: linear-gradient(135deg, var(--blue-soft), var(--pink-soft));
            min-height: 100px;
            display: grid;
            place-content: center;
        }
        .ad-slot i { font-size: 22px; margin-bottom: 6px; }

        /* Ad slot with real ad injected */
        .ad-slot--filled {
            display: flex !important;
            justify-content: center;
            align-items: center;
            overflow: hidden;
            padding: 0;
            min-height: auto;
            background: transparent;
            border: none;
            max-width: 100%;
            box-sizing: border-box;
        }
        .ad-slot--filled > *,
        .ad-slot--filled > .ad-attempt > * {
            max-width: 100%;
        }
        .ad-attempt { display: contents; }
        .slide-panel[data-ad-delivery="loading"] .slide-panel__sponsored { visibility: hidden; }
        .ad-slot--filled:has(.aff-banner) {
            display: flex !important;
            justify-content: center;
            overflow: hidden;
        }
        .ad-slot--filled > .aff-banner,
        .ad-slot--filled > .ad-attempt > .aff-banner {
            max-width: 100% !important;
            box-sizing: border-box;
            overflow: hidden;
        }
        /* Sidebar ads: constrain to column width and center */
        aside.ad.ad-slot--filled {
            display: block !important;
            overflow: hidden;
            width: 100%;
        }
        aside.ad.ad-slot--filled > *,
        aside.ad.ad-slot--filled > .ad-attempt > * {
            max-width: 100%;
            margin: 0 auto;
        }
        aside.ad.ad-slot--filled > .aff-banner,
        aside.ad.ad-slot--filled > .ad-attempt > .aff-banner {
            max-width: 100% !important;
        }
        /* Slide panels: ad-slot--filled not applied, content styled separately */
        .slide-panel .slide-panel__content.ad-injected {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 40px;
            color: inherit;
            overflow: hidden;
        }
        .slide-panel .slide-panel__content.ad-injected > *,
        .slide-panel .slide-panel__content.ad-injected > .ad-attempt > * {
            max-width: 100%;
        }
        .slide-panel .slide-panel__content.ad-injected > .aff-banner,
        .slide-panel .slide-panel__content.ad-injected > .ad-attempt > .aff-banner {
            max-width: 100% !important;
            box-sizing: border-box;
        }
        .ad-slot--filled iframe {
            display: block;
            border: 0;
        }
        .aff-banner__inner {
            transform-origin: top left;
            pointer-events: none;
        }
        .aff-banner__inner img {
            display: block;
            -webkit-user-drag: none;
            user-select: none;
        }
        /* Scale down large non-affiliate ads on narrow screens */
        @media (max-width: 360px) {
            .ad-slot--filled:not(:has(.aff-banner)) { transform: scale(0.85); transform-origin: center center; }
        }
        @media (min-width: 361px) and (max-width: 420px) {
            .ad-slot--filled:not(:has(.aff-banner)) { transform: scale(0.92); transform-origin: center center; }
        }

        /* ── Ad Slots: hidden by default until ads loaded or debug on ── */
        [data-ad-id]:not(aside):not(.slide-panel) { display: none; }

        /* ── Hide sidebar ads on mobile (must come after ad-slot--filled rules) ── */
        @media (max-width: 900px) {
            aside.ad[data-ad-id],
            aside.ad[data-ad-id].ad-slot--filled {
                display: none !important;
            }
        }

        /* ── Ad Debug Mode ── */
        