/* ToolsXYZ design system — tokens first, components after. Brand colours come from Admin → Branding via --brand/--accent. */
:root {
  --brand: #4f46e5;
  --accent: #ec4899;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --ok: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 20px 40px -4px rgba(15, 23, 42, 0.08), 0 10px 20px -4px rgba(15, 23, 42, 0.04);
  --font: 'Outfit', 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
  --maxw: 1200px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f19; --surface: #111827; --surface-2: #1f2937; --border: #374151;
    --text: #f8fafc; --muted: #94a3b8; --shadow: 0 4px 24px rgba(0,0,0,0.4); --shadow-lg: 0 24px 48px rgba(0,0,0,0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f19; --surface: #111827; --surface-2: #1f2937; --border: #374151;
  --text: #f8fafc; --muted: #94a3b8; --shadow: 0 4px 24px rgba(0,0,0,0.4); --shadow-lg: 0 24px 48px rgba(0,0,0,0.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.6 var(--font); color: var(--text); background-color: var(--bg); background-image: radial-gradient(at 0% 0%, color-mix(in srgb, var(--brand) 12%, transparent) 0px, transparent 50%), radial-gradient(at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent) 0px, transparent 50%); background-attachment: fixed; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head, var(--font)); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Announcement + header */
.announce { background: linear-gradient(90deg, var(--brand), var(--accent)); color: #fff; text-align: center; font-size: .9rem; padding: 8px 16px; }
.announce a { color: #fff; font-weight: 600; text-decoration: underline; }
.header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--border); }
.header .container { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.08rem; color: var(--text); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }

.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--accent)); display: grid; place-items: center; color: #fff; font-size: .9rem; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: var(--muted); font-weight: 550; padding: 8px 12px; border-radius: 9px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); text-decoration: none; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.menu-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; color: var(--text); cursor: pointer; }

/* Buttons */
.btn { --b: var(--surface); --c: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .95rem/1 var(--font); padding: 12px 20px; border-radius: 12px; border: 1px solid var(--border); background: var(--b); color: var(--c); cursor: pointer; transition: all .2s cubic-bezier(0.4, 0, 0.2, 1); white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 15px -3px color-mix(in srgb, var(--b) 40%, transparent), 0 4px 6px -2px color-mix(in srgb, var(--b) 20%, transparent); border-color: color-mix(in srgb, var(--b) 80%, var(--border)); }
.btn:active { transform: translateY(0) scale(0.97); box-shadow: none; }
.btn-primary { --b: var(--brand); --c: #fff; border-color: transparent; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, var(--accent))); }
.btn-ghost { --b: transparent; border-color: transparent; }
.btn-danger { --b: var(--danger); --c: #fff; border-color: transparent; }
.btn-sm { padding: 7px 12px; font-size: .84rem; border-radius: 9px; }
.btn-lg { padding: 15px 24px; font-size: 1rem; border-radius: 13px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .7; pointer-events: none; }
.btn.is-loading::before { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Cards, badges, alerts */
.card { background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.card:hover { box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.card.flat { box-shadow: none; background: var(--surface); }
.card.flat:hover { box-shadow: none; border-color: var(--border); transform: none; }
.card h3 { margin-bottom: 8px; font-size: 1.15rem; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: transparent; }
.badge.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); border-color: transparent; }
.badge.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: transparent; }
.badge.brand { color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); border-color: transparent; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); margin-bottom: 16px; }
.alert.error { border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.alert.success { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.alert.info { border-color: color-mix(in srgb, var(--brand) 40%, transparent); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.alert pre { white-space: pre-wrap; font: .8rem/1.5 var(--mono); margin: 8px 0 0; }

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: .9rem; }
.field .hint { font-size: .82rem; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; padding: 12px 16px; transition: all .2s ease; }
textarea.input { min-height: 120px; resize: vertical; }
.input:hover { background: color-mix(in srgb, var(--surface-2) 80%, var(--surface)); border-color: var(--border); }
.input:focus { outline: none; background: var(--surface); border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 550; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 84px 0 64px; text-align: center; }
.hero::before { content: ''; position: absolute; inset: -40% -10% auto; height: 620px; background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 26%, transparent), transparent), radial-gradient(closest-side at 70% 40%, color-mix(in srgb, var(--accent) 20%, transparent), transparent); filter: blur(30px); z-index: -1; animation: float 14s ease-in-out infinite alternate; }
@keyframes float { to { transform: translate3d(3%, 4%, 0) scale(1.05); } }
.hero p.lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 660px; margin: 0 auto 28px; }
.hero .gradient { background: linear-gradient(90deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.search { display: flex; max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 6px; box-shadow: var(--shadow-lg); }
.search input { flex: 1; border: 0; background: transparent; font: inherit; padding: 10px 12px; color: var(--text); }
.search input:focus { outline: none; }
.stats { display: flex; justify-content: center; gap: 40px; margin-top: 40px; flex-wrap: wrap; }
.stats strong { display: block; font-size: 1.6rem; font-weight: 800; }
.section { padding: 56px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head p { margin: 0; }
.reveal { animation: rise .6s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* Tool cards */
.tool-card { position: relative; display: flex; flex-direction: column; gap: 12px; color: var(--text); padding: 24px; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: var(--radius); transition: all .25s cubic-bezier(0.4, 0, 0.2, 1); }
.tool-card:hover { text-decoration: none; transform: translateY(-4px) scale(1.01); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 50%, var(--border)); }
.tool-card p { color: var(--muted); font-size: .95rem; margin: 0; line-height: 1.5; }
.tool-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 15%, transparent), color-mix(in srgb, var(--accent) 15%, transparent)); color: var(--brand); box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 10%, transparent); transition: transform .3s ease; }
.tool-card:hover .tool-icon { transform: scale(1.1) rotate(-5deg); }
.tool-card .badge { position: absolute; top: 16px; right: 16px; }
.cat-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.cat-pills a { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-weight: 600; font-size: .88rem; }
.cat-pills a[aria-current="page"], .cat-pills a:hover { color: #fff; background: var(--brand); border-color: var(--brand); text-decoration: none; }

/* Tool page */
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .tool-layout { grid-template-columns: 1fr; } }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.result { margin-top: 22px; }
.result-block + .result-block { margin-top: 18px; }
.result-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; }
.kpi { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; }
.kpi .label { color: var(--muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 1.35rem; font-weight: 800; margin-top: 2px; word-break: break-word; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--surface-2); border: 1px solid var(--border); padding: 5px 11px; border-radius: 999px; font-size: .85rem; }
.copy-area { position: relative; }
.copy-area textarea { font: .9rem/1.55 var(--mono); min-height: 90px; }
.prose { line-height: 1.75; }
.prose h1, .prose h2, .prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose code { font-family: var(--mono); background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .88em; }
.prose pre { background: var(--surface-2); padding: 14px; border-radius: 12px; overflow: auto; }
.prose blockquote { border-left: 3px solid var(--brand); margin: 0; padding: 4px 16px; color: var(--muted); }
.prose img { border-radius: 12px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.thumbs figure { margin: 0; background: var(--surface-2); border-radius: 12px; overflow: hidden; }
.thumbs figcaption { padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; font-size: .85rem; }
.meter { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 99px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }

/* Auth */
.auth-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 420px; }
.btn-google { --b: var(--surface); width: 100%; }

/* App shell (dashboard + admin) */
.shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.sidebar { border-right: 1px solid var(--border); padding: 24px 16px; background: color-mix(in srgb, var(--surface) 60%, transparent); backdrop-filter: blur(20px); position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; }
.sidebar h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 20px 10px 8px; font-weight: 700; }
.sidebar a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; color: var(--muted); font-weight: 600; font-size: .95rem; transition: all .2s ease; }
.sidebar a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; transform: translateX(4px); }
.sidebar a[aria-current="page"] { background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 15%, transparent), transparent); border-left: 3px solid var(--brand); color: var(--brand); border-radius: 4px 12px 12px 4px; }
.main { padding: 28px clamp(16px, 3vw, 36px); min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.6rem; margin: 0; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  /* On mobile the workspace menu lives in the header hamburger drawer (same as logged-out),
     so the desktop left sidebar is hidden here for a consistent experience. */
  .shell > .sidebar { display: none; }
}

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 44px 0 30px; margin-top: 60px; color: var(--muted); font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 28px; }
.footer h4 { color: var(--text); font-size: .9rem; margin-bottom: 10px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer a { color: var(--muted); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* FAQ */
details.faq { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 14px 18px; }
details.faq + details.faq { margin-top: 10px; }
details.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; }
details.faq summary::after { content: '+'; color: var(--muted); font-size: 1.2rem; line-height: 1; }
details.faq[open] summary::after { content: '–'; }
details.faq p { margin: 10px 0 0; color: var(--muted); }

.ad-slot { margin: 18px 0; text-align: center; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .icon { font-size: 2rem; margin-bottom: 8px; }

/* Category filter tabs carry platform logos */
.tab { display: inline-flex; align-items: center; gap: 8px; }
.tab .ic { width: 16px; height: 16px; flex: none; }
.tab[aria-pressed="true"] .ic { filter: brightness(0) invert(1); }

/* ---- Header (matches the original site's navbar) ---- */
.header { position: sticky; }
.header .container { height: 84px; }
.scroll-progress { position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 2; transform: scaleX(0); transform-origin: center; background: linear-gradient(90deg, #a855f7, #6366f1, #a855f7); box-shadow: 0 0 10px rgba(168, 85, 247, .5); pointer-events: none; transition: transform .12s linear; }
.brand .brand-logo { height: 64px; width: auto; max-width: 260px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(168, 85, 247, .4)); transition: transform .2s; }
.brand:hover .brand-logo { transform: scale(1.05); }
.nav { justify-content: center; gap: 22px; }
.nav > a:not(.nav-cta), .nav-drop > summary { position: relative; padding: 6px 2px; border-radius: 0; background: none !important; color: var(--muted); font-size: .92rem; font-weight: 550; }
.nav > a:not(.nav-cta)::after { content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: #a855f7; transition: width .3s; }
.nav > a:hover::after, .nav > a[aria-current="page"]::after { width: 100%; }
.nav > a:not(.nav-cta):hover, .nav-drop > summary:hover { color: var(--text); text-decoration: none; }
.nav-drop { position: relative; }
.nav-drop > summary { list-style: none; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop[open] > summary span { transform: rotate(180deg); }
.nav-drop > summary span { transition: transform .2s; font-size: .8em; }
.nav-menu { position: absolute; top: calc(100% + 12px); left: 0; width: 250px; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 60; display: grid; gap: 2px; animation: dropIn .2s ease-out; }
@keyframes dropIn { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.nav-menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text); font-weight: 700; font-size: .82rem; border: 1px solid transparent; }
.nav-menu a:hover { text-decoration: none; background: color-mix(in srgb, var(--pc, #a855f7) 10%, transparent); border-color: color-mix(in srgb, var(--pc, #a855f7) 35%, transparent); }
.nav-menu .ni { display: grid; place-items: center; }
.nav-menu .ic { width: 18px; height: 18px; color: var(--pc); transition: transform .2s; }
.nav-menu a:hover .ic { transform: scale(1.12); }
.header-actions .btn-primary { box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 35%, transparent); }


/* ---- Footer ---- */
.footer-logo { height: 64px; width: auto; object-fit: contain; filter: drop-shadow(0 0 8px rgba(168, 85, 247, .4)); margin-bottom: 18px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); font-size: .8rem; }
.footer-bottom nav { display: flex; gap: 22px; }

/* ---- Google-only login (split layout from the original site); themed via tokens ---- */
.auth-split { position: relative; min-height: calc(100vh - 84px); display: grid; place-items: center; overflow: hidden; background: var(--bg); color: var(--text); padding: 56px 20px; }
.auth-bg i { position: absolute; border-radius: 50%; filter: blur(110px); pointer-events: none; }
.auth-bg i:nth-child(1) { width: 600px; height: 600px; top: -10%; right: -5%; background: color-mix(in srgb, var(--brand) 16%, transparent); animation: spinPulse 20s linear infinite; }
.auth-bg i:nth-child(2) { width: 500px; height: 500px; bottom: -10%; left: -10%; background: color-mix(in srgb, #6366f1 14%, transparent); animation: spinPulse 25s linear infinite reverse; }
@keyframes spinPulse { 50% { transform: scale(1.3) rotate(90deg); } }
.auth-inner { position: relative; z-index: 1; width: 100%; max-width: 1020px; display: flex; align-items: center; gap: 72px; }
.auth-brand { flex: 1; animation: slideIn .8s ease-out both; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-40px); } }
.auth-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font: 700 3.6rem/1 'Instrument Serif', Georgia, serif; }
.auth-logo:hover { text-decoration: none; }
.auth-logo img { height: 96px; width: auto; max-width: min(420px, 100%); object-fit: contain; filter: drop-shadow(0 0 12px rgba(168, 85, 247, .45)); animation: logoGlow 4s ease-in-out infinite; }
@keyframes logoGlow { 50% { filter: drop-shadow(0 0 22px rgba(168, 85, 247, .7)); transform: scale(1.02); } }
@media (max-width: 800px) { .auth-logo img { height: 72px; } }
.auth-logo .ic { width: 32px; height: 32px; color: #c084fc; }
.auth-brand h1 { color: var(--text); font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-weight: 900; margin: 28px 0 14px; }

.auth-brand p { color: var(--muted); font-size: 1.1rem; font-weight: 500; max-width: 440px; }
.auth-brand ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.auth-brand li { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 550; font-size: .92rem; }
.auth-brand .b { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; }
.auth-brand .b .ic { width: 16px; height: 16px; }
.auth-brand .b.ok { background: rgba(16, 185, 129, .12); color: #10b981; }
.auth-brand .b.amber { background: rgba(245, 158, 11, .12); color: #f59e0b; }
.auth-card2 { width: 100%; max-width: 440px; padding: 40px; border-radius: 32px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(20px); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: rise .8s .2s ease-out both; }
.auth-card2 .back { display: inline-block; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 30px; }
.auth-card2 .back:hover { color: var(--text); text-decoration: none; }
.auth-card2 h2 { color: var(--text); text-align: center; font-size: 1.6rem; }
.auth-card2 .lead { color: var(--muted); text-align: center; font-size: .9rem; margin-bottom: 32px; }
.auth-card2 .alert { color: var(--text); }
.g-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 16px 20px; border-radius: 16px; background: #fff; color: #111827; font-weight: 800; font-size: 1rem; border: 1px solid #e5e7eb; box-shadow: 0 0 20px rgba(0, 0, 0, .08); transition: transform .2s, box-shadow .2s, background .2s; }
.g-btn:hover { text-decoration: none; background: #f9fafb; transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 30px color-mix(in srgb, var(--brand) 25%, transparent); }
.g-btn:active { transform: scale(.98); }
.auth-card2 .terms { margin-top: 30px; text-align: center; color: var(--muted); font-size: .75rem; }
.auth-card2 .terms a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 800px) { .auth-inner { flex-direction: column; gap: 36px; text-align: center; } .auth-brand ul { display: none; } .auth-brand p { margin: 0 auto; } .auth-logo { font-size: 3rem; } }

/* ---- Login animations ---- */
.auth-bg .grid { position: absolute; inset: 0; background-image: linear-gradient(color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%); mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%); animation: gridMove 18s linear infinite; }
@keyframes gridMove { to { background-position: 48px 48px; } }
.auth-float { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
@media (max-width: 1180px) { .auth-float span:nth-child(5), .auth-float span:nth-child(6) { display: none; } }
.auth-float span { position: absolute; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--border); backdrop-filter: blur(6px); box-shadow: var(--shadow); opacity: 0; animation: floatIn .8s ease-out forwards, lbob 5s ease-in-out infinite; }
.auth-float span:nth-child(odd) { animation-duration: .8s, 6.5s; }
@keyframes floatIn { from { opacity: 0; transform: scale(.4); } to { opacity: .9; transform: none; } }
.auth-brand .auth-logo .ic { animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(1.25) rotate(20deg); opacity: .6; } }
.auth-brand h1 .w { display: inline-block; animation: rise .7s .2s ease-out both; }
.auth-brand h1 .g { display: inline-block; background: linear-gradient(90deg, #a855f7, #ec4899, #6366f1, #a855f7); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rise .7s .35s ease-out both, gradShift 6s linear infinite; }
@keyframes gradShift { to { background-position: 300% 0; } }
.auth-brand p { animation: rise .7s .5s ease-out both; }
.auth-brand li { animation: slideIn .6s ease-out both; animation-delay: calc(.65s + var(--i) * .15s); }
.auth-card2 { position: relative; }
.auth-card2::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--ang, 0deg), transparent 0 70%, #a855f7 80%, #ec4899 88%, transparent 96%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spinBorder 4s linear infinite; pointer-events: none; }
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spinBorder { to { --ang: 360deg; } }
.auth-card2:hover { transform: translateY(-4px); transition: transform .3s; }
.auth-card2 h2 { animation: rise .6s .45s ease-out both; }
.auth-card2 .lead { animation: rise .6s .55s ease-out both; }
.g-btn { position: relative; overflow: hidden; animation: rise .6s .65s ease-out both; }
.g-btn .shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(168, 85, 247, .25) 50%, transparent 65%); transform: translateX(-100%); animation: btnShine 3s ease-in-out 1.4s infinite; }
@keyframes btnShine { 0% { transform: translateX(-100%); } 40%, 100% { transform: translateX(100%); } }
@media (max-width: 800px) { .auth-float { display: none; } }
@media (prefers-reduced-motion: reduce) { .auth-bg *, .auth-float span, .auth-card2::before, .g-btn .shine, .auth-brand * { animation: none !important; opacity: 1 !important; } }
@keyframes lbob { 0%, 100% { translate: 0 -8px; rotate: -4deg; } 50% { translate: 0 8px; rotate: 4deg; } }

/* ---- Day / night theme switch ---- */
.theme-switch { position: relative; width: 64px; height: 32px; padding: 0; border: 0; border-radius: 999px; cursor: pointer; overflow: hidden; flex: none; background: linear-gradient(135deg, #1e1b4b, #312e81 60%, #4c1d95); box-shadow: inset 0 2px 6px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08); transition: background .5s ease, box-shadow .3s; }
.theme-switch:hover { box-shadow: inset 0 2px 6px rgba(0,0,0,.45), 0 0 0 1px rgba(168,85,247,.5), 0 0 16px rgba(168,85,247,.35); }
.theme-switch[aria-checked="false"] { background: linear-gradient(135deg, #7dd3fc, #38bdf8 55%, #60a5fa); box-shadow: inset 0 2px 6px rgba(2,132,199,.35), 0 0 0 1px rgba(0,0,0,.05); }
.theme-switch[aria-checked="false"]:hover { box-shadow: inset 0 2px 6px rgba(2,132,199,.35), 0 0 16px rgba(250,204,21,.45); }
.ts-sky { position: absolute; inset: 0; }
.ts-sky .star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 4px #fff; transition: opacity .4s, transform .5s; animation: tsTwinkle 2s ease-in-out infinite; }
.ts-sky .s1 { top: 8px; left: 12px; } .ts-sky .s2 { top: 18px; left: 22px; width: 2px; height: 2px; animation-delay: .7s; } .ts-sky .s3 { top: 10px; left: 30px; width: 2px; height: 2px; animation-delay: 1.3s; }
@keyframes tsTwinkle { 50% { opacity: .3; transform: scale(.6); } }
.ts-sky .cloud { position: absolute; background: #fff; border-radius: 999px; opacity: 0; transform: translateY(12px); transition: opacity .4s, transform .5s cubic-bezier(.34,1.56,.64,1); }
.ts-sky .cloud::before { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.ts-sky .c1 { width: 16px; height: 6px; top: 17px; left: 34px; } .ts-sky .c1::before { width: 8px; height: 8px; top: -4px; left: 3px; }
.ts-sky .c2 { width: 11px; height: 4px; top: 9px; left: 44px; opacity: 0; } .ts-sky .c2::before { width: 6px; height: 6px; top: -3px; left: 2px; }
.theme-switch[aria-checked="false"] .star { opacity: 0; transform: translateY(-10px); }
.theme-switch[aria-checked="false"] .cloud { opacity: .95; transform: none; animation: tsDrift 4s ease-in-out infinite alternate; }
.theme-switch[aria-checked="false"] .c2 { opacity: .8; }
@keyframes tsDrift { to { translate: -4px 0; } }
/* Knob: moon (dark) slides right and becomes the sun (light) on the left. */
.ts-knob { position: absolute; top: 4px; left: 36px; width: 24px; height: 24px; border-radius: 50%; background: #e5e7eb; box-shadow: inset -3px -3px 0 rgba(0,0,0,.12), 0 0 10px rgba(255,255,255,.35); transition: left .5s cubic-bezier(.68,-.35,.27,1.35), background .5s, box-shadow .5s, transform .5s; }
.ts-knob .crater { position: absolute; border-radius: 50%; background: #cbd5e1; transition: opacity .3s; }
.ts-knob .k1 { width: 6px; height: 6px; top: 5px; left: 11px; } .ts-knob .k2 { width: 4px; height: 4px; top: 14px; left: 6px; }
.theme-switch[aria-checked="false"] .ts-knob { left: 4px; background: #facc15; transform: rotate(180deg); box-shadow: 0 0 0 3px rgba(250,204,21,.25), 0 0 14px rgba(250,204,21,.8); animation: tsSun 3s ease-in-out infinite; }
.theme-switch[aria-checked="false"] .crater { opacity: 0; }
@keyframes tsSun { 50% { box-shadow: 0 0 0 5px rgba(250,204,21,.18), 0 0 20px rgba(250,204,21,.9); } }
.theme-switch:active .ts-knob { width: 28px; }
.theme-switch:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .theme-switch *, .theme-switch { animation: none !important; transition: none !important; } }

@media (max-width: 860px) { .brand .brand-logo { height: 50px; max-width: 200px; } .header .container { height: 72px; } }

/* ---- Mobile header: logo | theme switch | burger; menu opens as a panel below ---- */
.nav-cta { display: none; }
.menu-toggle { display: none; position: relative; width: 44px; height: 44px; padding: 0; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; flex: none; }
.menu-toggle span { position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .3s, opacity .2s, top .3s; }
.menu-toggle span:nth-child(1) { top: 15px; } .menu-toggle span:nth-child(2) { top: 21px; } .menu-toggle span:nth-child(3) { top: 27px; }
.header.open .menu-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.header.open .menu-toggle span:nth-child(2) { opacity: 0; }
.header.open .menu-toggle span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
@media (max-width: 860px) {
  .header .container { gap: 12px; }
  .brand { margin-right: auto; }
  .menu-toggle { display: inline-block; }
  .header-actions .btn { display: none; }
  .header-actions { gap: 0; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px; padding: 14px 20px 22px; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: 0 24px 40px rgba(0, 0, 0, .35); max-height: calc(100vh - 72px); overflow-y: auto; }
  .header.open .nav { display: flex; animation: navDown .25s ease-out; }
  @keyframes navDown { from { opacity: 0; transform: translateY(-8px); } }
  .nav > a:not(.nav-cta), .nav-drop > summary { display: flex; padding: 13px 4px; font-size: 1rem; border-bottom: 1px solid var(--border); }
  .nav > a:not(.nav-cta)::after { display: none; }
  .nav > a[aria-current="page"] { color: #a855f7; }
  .nav .only-menu { display: flex; }
  .nav .ext-link { border: 0; background: transparent; border-radius: 0; padding: 13px 4px; justify-content: flex-start; }
  .nav form.only-menu { padding: 0; border-bottom: 0; }
  .nav form.only-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 14px 4px; margin-top: 6px; background: none; border: 0; color: var(--danger, #ef4444); font-size: 1rem; font-weight: 650; text-align: left; cursor: pointer; }
  .hide-mobile-cta { display: none !important; }
  .nav-drop > summary { justify-content: space-between; }
  .nav-menu { position: static; width: 100%; box-shadow: none; border: 0; padding: 6px 0; background: transparent; animation: none; grid-template-columns: 1fr 1fr; }
  .nav-cta { display: flex; justify-content: center; margin-top: 16px; padding: 15px; border-radius: 14px; font-size: 1rem; font-weight: 800; color: #fff; box-shadow: 0 10px 26px rgba(124, 58, 237, .35); }
  .nav-cta::after { display: none; }
}
@media (max-width: 380px) { .brand .brand-logo { height: 42px; } .theme-switch { width: 56px; } .theme-switch .ts-knob { left: 28px; } .theme-switch[aria-checked="false"] .ts-knob { left: 4px; } }
.nav .nav-cta, body.is-landing .nav .nav-cta { color: #fff; }

/* ---- Legal + contact pages (layout of the original site) ---- */
.legal { padding: 64px 20px 40px; }
.legal-wrap { max-width: 900px; margin: 0 auto; }
.legal-head { padding-bottom: 30px; margin-bottom: 36px; border-bottom: 1px solid var(--border); animation: rise .6s ease-out both; }
.legal-head.center { text-align: center; border-bottom: 0; }
.legal-head h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; margin: 16px 0 10px; }
.legal-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.legal-badge .ic { width: 14px; height: 14px; }
.legal-body { display: grid; gap: 34px; line-height: 1.8; color: color-mix(in srgb, var(--text) 85%, var(--muted)); }
.legal-body section { animation: rise .6s ease-out both; animation-delay: var(--d, 0s); }
.legal-body h2 { font-size: 1.45rem; font-weight: 800; display: flex; align-items: center; gap: 12px; }
.legal-body h2 .ic, .legal-card h2 .ic { width: 22px; height: 22px; color: var(--c, var(--brand)); flex: none; }
.legal-body p { margin: 0 0 10px; }
.legal-body ul { padding-left: 22px; margin: 8px 0 0; display: grid; gap: 8px; font-weight: 500; }
.legal-body strong { color: var(--text); }
.legal-card { padding: 28px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--c) 9%, transparent), transparent 70%); box-shadow: var(--shadow); }
.legal-card h2 { font-size: 1.2rem; font-weight: 900; display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.legal-mail { color: #a855f7; font-weight: 700; }
.legal-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--border); font-size: .8rem; font-weight: 800; }
.legal-foot a { color: var(--muted); } .legal-foot a:hover { color: var(--text); text-decoration: none; } .legal-foot .next { color: #a855f7; }
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 28px; align-items: start; }
.contact-form { padding: 32px; border-radius: 26px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: rise .7s .15s ease-out both; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } .legal { padding-top: 40px; } .legal-foot { flex-direction: column; } }

/* ---- Ads ---- */
.ad-slot { margin: 22px auto; text-align: center; overflow: hidden; max-width: 100%; }
.ad-slot::before { content: 'Advertisement'; display: block; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); opacity: .7; margin-bottom: 6px; }
@media (max-width: 767px) { .ad-slot.ad-desktop { display: none; } }
@media (min-width: 768px) { .ad-slot.ad-mobile { display: none; } }
.ad-slot.ad-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; margin: 0; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgba(0, 0, 0, .25); }
.ad-slot.ad-sticky::before { display: none; }
@media (min-width: 768px) { .ad-slot.ad-sticky { display: none; } }
.ad-gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(8px); animation: rise .25s ease-out; }
.ad-gate-box { text-align: center; padding: 34px 40px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); max-width: 340px; }
.ad-gate-box p { font-weight: 800; margin: 16px 0 6px; }
.ad-gate-box small { color: var(--muted); }
.ring { width: 86px; height: 86px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#a855f7, #ec4899, #6366f1, #a855f7); animation: spin 2.5s linear infinite; }
.ring span { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-size: 1.8rem; font-weight: 900; animation: spin 2.5s linear infinite reverse; }
.reward-timer { margin: 20px 0; }
#reward-claim:disabled { opacity: .5; cursor: not-allowed; }
#reward-claim.ready { animation: pulseBtn 1.4s ease-in-out infinite; }
@keyframes pulseBtn { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand) 25%, transparent); } }
details.ad-row { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
details.ad-row + details.ad-row { margin-top: 8px; }
details.ad-row > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; }
details.ad-row > summary::-webkit-details-marker { display: none; }

/* ── Promo slider (dashboard/home banner carousel) ────────────────────────── */
.promo-slider { position: relative; border-radius: 16px; overflow: hidden; margin-bottom: 26px; background: var(--surface-2); box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 14%, transparent); }
.promo-slider .slider-track { position: relative; width: 100%; height: clamp(140px, 20vw, 240px); }
.promo-slider .slide { position: absolute; inset: 0; display: block; opacity: 0; visibility: hidden; transition: opacity .55s ease; text-decoration: none; }
.promo-slider .slide.active { opacity: 1; visibility: visible; }
.promo-slider .slide > img:not(.px) { width: 100%; height: 100%; object-fit: cover; display: block; }
.promo-slider .slide img.px { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.promo-slider .slide-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 22px 16px; color: #fff; font-weight: 700; font-size: clamp(1rem, 2vw, 1.25rem); text-shadow: 0 1px 8px rgba(0,0,0,.5); background: linear-gradient(0deg, rgba(0,0,0,.65), rgba(0,0,0,.15) 60%, transparent); pointer-events: none; }
.promo-slider .slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(0,0,0,.35); backdrop-filter: blur(4px); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s, background .2s; z-index: 2; }
.promo-slider:hover .slider-arrow { opacity: 1; }
.promo-slider .slider-arrow:hover { background: rgba(0,0,0,.6); }
.promo-slider .slider-arrow.prev { left: 12px; } .promo-slider .slider-arrow.next { right: 12px; }
.promo-slider .slider-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; gap: 7px; justify-content: center; z-index: 2; }
.promo-slider .slider-dot { width: 8px; height: 8px; border-radius: 999px; border: 0; background: rgba(255,255,255,.55); cursor: pointer; padding: 0; transition: width .25s, background .2s; }
.promo-slider .slider-dot[aria-current="true"] { width: 22px; background: #fff; }
@media (max-width: 640px) { .promo-slider .slider-track { height: clamp(120px, 42vw, 190px); } .promo-slider .slider-arrow { display: none; } }

/* ── Ad slots & self-serve banners ────────────────────────────────────────── */
.ad-slot { margin: 20px 0; text-align: center; }
.ad-slot .promo-banner { position: relative; display: inline-block; max-width: 100%; }
.ad-adsense { position: relative; }

/* ── Animated "trending / most used" labels ───────────────────────────────── */
.pulse-badge { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: linear-gradient(90deg, var(--brand), var(--accent)); padding: 4px 10px; border-radius: 999px; line-height: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 45%, transparent); animation: badgePulse 2s ease-out infinite; }
.pulse-badge.alt { background: linear-gradient(90deg, var(--warn, #f5a524), var(--accent)); animation-delay: .5s; }
@keyframes badgePulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 45%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ── After-login liveliness: cards & sections rise in gently ──────────────── */
@media (prefers-reduced-motion: no-preference) {
  .main .card, .main .kpi, .promo-slider, .main .table-wrap { animation: riseIn .5s cubic-bezier(.2,.7,.3,1) both; }
  .main .grid > *:nth-child(2) { animation-delay: .06s; }
  .main .grid > *:nth-child(3) { animation-delay: .12s; }
  .main .tool-card { transition: transform .2s ease, box-shadow .2s ease; }
  .main .tool-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px color-mix(in srgb, var(--brand) 18%, transparent); }
}
@keyframes riseIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ── Header "my other sites" links — chips on desktop only (mobile uses the drawer rows) ── */
@media (min-width: 861px) {
.nav .ext-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--muted); font-weight: 600; font-size: .82rem; line-height: 1;
  white-space: nowrap; transition: color .2s, border-color .2s, background .2s, transform .2s;
}
.nav .ext-link::before { content: "🔗"; font-size: .85em; }
.nav .ext-link::after { content: "↗"; font-size: .78em; opacity: .55; }
.nav .ext-link:hover { color: var(--text); border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--surface-2)); transform: translateY(-1px); text-decoration: none; }
/* Inside the "More" dropdown, render them as plain menu rows, not pills. */
.nav-menu-links { grid-template-columns: 1fr !important; }
.nav-menu-links .ext-link { border: 0; background: transparent; border-radius: 12px; padding: 10px 12px; justify-content: flex-start; font-size: .85rem; color: var(--text); font-weight: 700; transform: none; }
.nav-menu-links .ext-link:hover { transform: none; background: color-mix(in srgb, var(--brand) 10%, transparent); border-color: transparent; }
.nav .only-menu { display: none; }
}

/* Sidebar "More from us" external links (after login) */
.sidebar .side-ext span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .side-ext::after { content: "↗"; margin-left: auto; font-size: .8em; opacity: .5; }
.sidebar .side-more { margin: 2px 0; }
.sidebar .side-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; color: var(--muted); font-weight: 600; font-size: .95rem; }
.sidebar .side-more > summary::-webkit-details-marker { display: none; }
.sidebar .side-more > summary:hover { background: var(--surface-2); color: var(--text); }
.sidebar .side-more[open] > summary { color: var(--text); }
.sidebar .side-more .side-more-count { margin-left: auto; background: color-mix(in srgb, var(--brand) 20%, transparent); color: var(--brand); font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.sidebar .side-more .side-ext { padding-left: 26px; font-size: .9rem; }
