/* Codeexai – public site styles (simple, clean, friendly) */
/* Themes: set with data-theme on <html>; text size with data-size; font with data-font */
:root, [data-theme="cream"] {
  --primary: #4f46e5; --primary-dark: #4338ca; --purple: #7c3aed; --navy: #1e1b4b;
  --ink: #1f2937; --muted: #5f6877; --line: #e8e2d5; --bg: #faf6ee; --card: #fffdf8; --soft: #f1ecff; --nav: #fffdf8;
  --radius: 16px; --shadow: 0 2px 10px rgba(60, 45, 20, .07);
  --bs-body-bg: var(--bg); --bs-body-color: var(--ink);
}
[data-theme="white"] { --bg: #f6f7fb; --card: #ffffff; --line: #e5e7eb; --nav: #ffffff; --soft: #eef2ff; --shadow: 0 2px 10px rgba(30, 27, 75, .06); }
[data-theme="mint"] { --bg: #eef7f1; --card: #fbfffc; --line: #d5e7da; --nav: #fbfffc; --soft: #e1f3e8; --primary: #0f766e; --primary-dark: #115e59; --navy: #134e4a; --purple: #0d9488; }
[data-theme="sky"] { --bg: #eef5fb; --card: #fbfdff; --line: #d6e3f0; --nav: #fbfdff; --soft: #e0eefb; --primary: #1d6fb8; --primary-dark: #17588f; --navy: #12335a; --purple: #3b82f6; }
[data-theme="lavender"] { --bg: #f4f0fa; --card: #fdfbff; --line: #e2d9f0; --nav: #fdfbff; --soft: #ebe3f7; --primary: #6d4fc2; --primary-dark: #5a3fa8; --navy: #2e1f5e; }
[data-theme="dark"] { --bg: #14161c; --card: #1d2029; --line: #2e3340; --nav: #1d2029; --soft: #272b38; --ink: #e5e7eb; --muted: #9aa3b2; --navy: #f1f5f9; --primary: #8b83ff; --primary-dark: #a5a0ff; --shadow: none; color-scheme: dark;
  --bs-body-bg: #14161c; --bs-body-color: #e5e7eb; --bs-border-color: #2e3340; --bs-secondary-bg: #272b38; --bs-tertiary-bg: #1d2029; }
html { font-size: 16px; }
html[data-size="14"] { font-size: 14px; } html[data-size="15"] { font-size: 15px; } html[data-size="17"] { font-size: 17px; } html[data-size="19"] { font-size: 19px; } html[data-size="21"] { font-size: 21px; }
html[data-font="nunito"] { --font: 'Nunito', system-ui, sans-serif; }
html[data-font="lora"] { --font: Georgia, 'Lora', 'Times New Roman', serif; }
html[data-font="access"] { --font: 'Atkinson Hyperlegible', Verdana, Tahoma, sans-serif; }
html[data-font="system"] { --font: system-ui, 'Segoe UI', Roboto, sans-serif; }
:root { --font: 'Inter', system-ui, 'Segoe UI', Roboto, sans-serif; }
* { -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.65; overflow-x: hidden; }
h1, h2, h3, h4, h5 { font-weight: 700; letter-spacing: -.01em; color: var(--navy); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
.text-muted-2 { color: var(--muted) !important; }
.btn { border-radius: 10px; font-weight: 600; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.form-control, .form-select { border-radius: 10px; border-color: var(--line); padding: .6rem .85rem; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .15); }
.card-soft { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.section { padding-block: 2.2rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; gap: 1rem; }
.section-head h2 { font-size: 1.15rem; margin: 0; display: flex; align-items: center; gap: .5rem; }
.section-head h2 i { color: var(--primary); }

/* Navbar */
.site-nav { background: var(--nav); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1030; }
.site-nav .navbar-brand { font-weight: 800; color: var(--navy); display: flex; align-items: center; gap: .5rem; font-size: 1.3rem; }
.site-nav .navbar-brand .logo-dot { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--purple)); color: #fff; display: grid; place-items: center; font-size: 1rem; }
.site-nav .navbar-brand img { height: 34px; }
.site-nav .nav-link { white-space: nowrap; color: var(--ink); font-weight: 500; padding: .5rem .6rem !important; border-radius: 8px; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: var(--primary); background: var(--soft); }
.nav-search { position: relative; min-width: 220px; }
.nav-search input { padding-left: 2.1rem; background: var(--bg); border-radius: 999px; }
.nav-search i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.bell { position: relative; font-size: 1.2rem; color: var(--ink); padding: .3rem .5rem; }
.bell .badge { position: absolute; top: -2px; right: -2px; font-size: .62rem; }

/* Avatar */
.avatar { width: var(--s, 40px); height: var(--s, 40px); border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; color: #fff; font-weight: 700; background: #94a3b8; vertical-align: middle; }

/* Hero */
.hero { position: relative; color: #fff; border-radius: 24px; overflow: hidden; margin-top: 1.2rem; background: linear-gradient(120deg, #1e1b4b, #4c1d95 60%, #7c3aed); }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .18), transparent 40%), radial-gradient(circle at 10% 90%, rgba(99, 102, 241, .45), transparent 45%); }
.hero.has-img { background-size: cover; background-position: center; }
.hero.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30, 27, 75, .88), rgba(30, 27, 75, .45)); }
.hero .inner { position: relative; z-index: 2; padding: 2.4rem 2.2rem; }
.hero h1, .hero h2 { color: #fff; font-size: clamp(1.55rem, 2.6vw, 2.15rem); line-height: 1.2; font-weight: 800; max-width: 640px; }
.hero p.lead { color: #e0e7ff; max-width: 560px; font-size: 1rem; }
.hero .btn-lg { padding: .5rem 1.1rem; font-size: .95rem; }
.daily-card { background: rgba(255, 255, 255, .12); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .25); border-radius: 18px; padding: 1.2rem 1.3rem; }
.daily-card .tag { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: #c7d2fe; font-weight: 700; }
.daily-card a.q { color: #fff; font-size: 1.15rem; font-weight: 700; display: block; margin: .4rem 0 .8rem; }

/* Category tiles */
.cat-tile { display: block; text-align: center; padding: 1rem .5rem; border-radius: 14px; background: var(--c-bg, #eef2ff); color: var(--ink); font-weight: 600; font-size: .88rem; transition: transform .15s; height: 100%; }
.cat-tile:hover { transform: translateY(-3px); color: var(--ink); }
.cat-tile i { display: block; font-size: 1.6rem; color: var(--c, var(--primary)); margin-bottom: .25rem; }
.cat-tile small { display: block; color: var(--muted); font-weight: 400; }
.cat-wide { display: flex; gap: .9rem; align-items: center; padding: 1rem 1.1rem; border-radius: 14px; background: var(--c-bg); color: var(--ink); height: 100%; }
.cat-wide i { font-size: 1.8rem; color: var(--c); }
.cat-wide:hover { color: var(--ink); filter: brightness(.97); }

/* Chips & filters */
.chip { display: inline-block; font-size: .74rem; font-weight: 600; padding: .2rem .65rem; border-radius: 999px; background: var(--c-bg, #eef2ff); color: var(--c, var(--primary)); }
.filter-pills { display: flex; flex-wrap: wrap; gap: .45rem; }
.filter-pills a, .filter-pills button { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: .3rem .9rem; font-size: .86rem; font-weight: 500; }
.filter-pills a.active, .filter-pills button.active, .filter-pills a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Story cards */
.story-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.story-card:hover { box-shadow: 0 10px 26px rgba(30, 27, 75, .12); transform: translateY(-2px); }
.story-card .thumb { aspect-ratio: 21 / 9; max-height: 96px; background: linear-gradient(135deg, var(--c-bg), var(--card)); display: grid; place-items: center; overflow: hidden; }
.story-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.story-card .thumb i { font-size: 1.9rem; color: var(--c); opacity: .75; }
.story-card .body { padding: .75rem .9rem .85rem; display: flex; flex-direction: column; flex: 1; }
.story-card h3 { font-size: 1rem; margin: .35rem 0 .25rem; line-height: 1.35; }
.story-card h3 a { color: var(--navy); }
.story-card p { color: var(--muted); font-size: .86rem; line-height: 1.5; margin-bottom: .55rem; }
.meta-row { display: flex; align-items: center; gap: .6rem; font-size: .82rem; color: var(--muted); margin-top: auto; flex-wrap: wrap; }
.meta-row .sep { margin-left: auto; display: flex; gap: .8rem; }

/* Question rows */
.q-row { display: flex; gap: 1rem; align-items: center; padding: .9rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: .7rem; }
.q-count { min-width: 62px; text-align: center; border-right: 1px solid var(--line); padding-right: 1rem; }
.q-count b { display: block; font-size: 1.4rem; color: var(--primary); line-height: 1.1; }
.q-count small { color: var(--muted); font-size: .72rem; }
.q-row h3 { font-size: 1.02rem; margin: 0 0 .25rem; }
.q-row h3 a { color: var(--navy); }

/* Article */
.article { max-width: 760px; margin: 0 auto; }
.article h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.2; }
.article-cover { border-radius: 18px; width: 100%; max-height: 440px; object-fit: cover; }
.rich { font-size: 1.07rem; line-height: 1.85; color: var(--ink); overflow-wrap: anywhere; }
.rich img { max-width: 100%; height: auto; border-radius: 12px; }
.rich blockquote { border-left: 4px solid var(--primary); padding: .4rem 1rem; background: var(--soft); border-radius: 0 10px 10px 0; color: var(--navy); margin: 1.2rem 0; }
.rich table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.rich td, .rich th { border: 1px solid var(--line); padding: .5rem .7rem; }
.rich figure.image { margin: 1.2rem 0; }
.rich.small-text { font-size: .98rem; line-height: 1.7; }
.react-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.react-btn { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .35rem .9rem; font-size: .88rem; font-weight: 500; color: var(--ink); cursor: pointer; }
.react-btn:hover { border-color: var(--primary); color: var(--primary); }
.react-btn.active { background: var(--soft); border-color: var(--primary); color: var(--primary); font-weight: 700; }
.icon-btn { border: 0; background: transparent; color: var(--muted); font-size: .88rem; padding: .25rem .5rem; border-radius: 8px; cursor: pointer; }
.icon-btn:hover { background: var(--soft); color: var(--primary); }
.icon-btn.active { color: var(--primary); font-weight: 700; }

/* Comments / answers */
.comment { display: flex; gap: .75rem; padding: .85rem 0; }
.comment + .comment { border-top: 1px solid var(--line); }
.comment .bubble { flex: 1; min-width: 0; }
.comment .who { font-weight: 600; font-size: .92rem; color: var(--navy); }
.comment .when { font-size: .78rem; color: var(--muted); margin-left: .35rem; font-weight: 400; }
.comment .text { white-space: pre-wrap; overflow-wrap: anywhere; margin: .15rem 0 .2rem; }
.comment .replies:empty { display: none; }
.comment .replies { margin-left: .2rem; padding-left: .8rem; border-left: 2px solid var(--line); }
.comment .replies.flat { padding-left: 0; margin-left: 0; border-left: 0; } /* very deep threads stop indenting so they never run off narrow screens */
.comment .replies > .comment { border-top: 0; }
.answer { padding: 1.2rem 1.3rem; }
.answer-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .6rem; }
.pending-note { font-size: .78rem; background: #fef3c7; color: #92400e; padding: .1rem .5rem; border-radius: 6px; }

/* Profile */
.profile-head { padding: 1.6rem; display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.stat { text-align: center; padding: 0 1rem; }
.stat b { display: block; font-size: 1.3rem; color: var(--navy); }
.stat small { color: var(--muted); }

/* CTA, footer */
.cta { background: var(--soft); border: 1px solid var(--line); border-radius: 18px; padding: 1.6rem; display: flex; align-items: center; gap: 1rem; justify-content: space-between; flex-wrap: wrap; }
.site-footer { background: #1e1b4b; color: #c7d2fe; margin-top: 3rem; padding: 2.5rem 0 1.2rem; }
.site-footer a { color: #c7d2fe; }
.site-footer a:hover { color: #fff; }
.site-footer h6 { color: #fff; }
.auth-card { max-width: 520px; margin: 1.2rem auto; padding: 1.4rem 1.6rem; }
.auth-card .form-label { margin-bottom: .2rem; font-size: .9rem; }
.auth-card .form-control { padding: .45rem .75rem; }
.auth-card .form-text { font-size: .78rem; margin-top: .15rem; }
.auth-card .mb-3 { margin-bottom: .7rem !important; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty i { font-size: 2.2rem; display: block; margin-bottom: .4rem; opacity: .6; }
.ck-editor__editable_inline { min-height: 220px; }
.ck.ck-editor { max-width: 100%; }
.ai-bar { background: var(--soft); border: 1px dashed #c4b5fd; border-radius: 12px; padding: .7rem .9rem; }
.ai-bar .btn { font-size: .82rem; }
.pagination .page-link { border-radius: 8px; margin: 0 2px; color: var(--primary); }
.pagination .active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
.toast-wrap { position: fixed; bottom: 1rem; right: 1rem; z-index: 2000; }


/* Category cards (equal height, sub-categories inside the card) */
.col > .cat-card { height: 100%; }
.cat-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--c, var(--primary)); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cat-card-main { display: flex; gap: .9rem; padding: 1.1rem 1.1rem .8rem; color: var(--ink); flex: 1; }
.cat-card-main:hover { color: var(--ink); background: var(--c-bg); }
.cat-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--c-bg); color: var(--c); display: grid; place-items: center; font-size: 1.4rem; flex: none; }
.cat-text { display: flex; flex-direction: column; min-width: 0; gap: .1rem; }
.cat-name { font-weight: 700; color: var(--navy); font-size: 1.08rem; }
.cat-desc { color: var(--muted); font-size: .9rem; }
.cat-count { color: var(--muted); font-size: .82rem; margin-top: .3rem; }
.cat-subs { display: flex; flex-wrap: wrap; gap: .4rem; padding: .7rem 1.1rem 1rem; border-top: 1px dashed var(--line); }
.reward-hero { display: flex; gap: 1.1rem; align-items: center; padding: 1.5rem; border-radius: 20px; color: #fff; background: linear-gradient(120deg, #92400e, #d97706); }
.reward-hero h1 { color: #fff; }
.hp-field { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.otp-input { font-size: 1.8rem; letter-spacing: .6rem; text-align: center; font-weight: 700; }
.text-muted-2 { color: var(--muted) !important; }
.card-soft, .story-card, .q-row { color: var(--ink); }

/* Appearance menu */
.pref-menu { width: 280px; max-width: calc(100vw - 16px); padding: 12px 14px; font-size: 13px; line-height: 1.4; }
.pref-menu .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; margin: 0 0 5px; }
.pref-opts { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.pref-opts button { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 8px; padding: 3px 9px; font-size: 13px; line-height: 1.4; }
.pref-opts button.on { border-color: var(--primary); background: var(--soft); color: var(--primary); font-weight: 700; }
.pref-seg { flex-wrap: nowrap; gap: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.pref-seg button { flex: 1 1 0; border: 0; border-radius: 0; border-right: 1px solid var(--line); padding: 5px 0; text-align: center; }
.pref-seg button:last-child { border-right: 0; }
.swatch { width: 26px; height: 26px; border-radius: 50%; padding: 0 !important; border: 2px solid var(--line) !important; }
.swatch.on { outline: 2px solid var(--primary); outline-offset: 2px; }
.pref-reset { width: 100%; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 8px; padding: 4px 0; font-size: 13px; }
.pref-reset:hover { color: var(--ink); border-color: var(--primary); }
[data-theme="dark"] .rich blockquote { background: var(--soft); }
[data-theme="dark"] .hero { background: linear-gradient(120deg, #0b0c14, #2e1065 60%, #4c1d95); }
[data-theme="dark"] .site-footer { background: #0b0d12; }
[data-theme="dark"] .form-control, [data-theme="dark"] .form-select { background: var(--card); color: var(--ink); }
[data-theme="dark"] .dropdown-menu { background: var(--card); }
[data-theme="dark"] .dropdown-item { color: var(--ink); }
[data-theme="dark"] .dropdown-item:hover { background: var(--soft); }

/* Responsive */
img, video, iframe { max-width: 100%; }
.table-responsive, .rich table { overflow-x: auto; }
@media (max-width: 1199px) {
  .article { padding: 0 .1rem; }
}
@media (max-width: 767px) {
  .hero { border-radius: 18px; margin-top: .6rem; }
  .hero .inner { padding: 2rem 1.1rem; }
  .section { padding-block: 1.5rem; }
  .q-row { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .q-count { min-width: 0; border: 0; padding: 0; display: flex; gap: .4rem; align-items: baseline; }
  .q-count b { font-size: 1.1rem; }
  .stat { padding: 0 .6rem; }
  .profile-head { padding: 1.1rem; }
  .auth-card { margin: 1rem auto; padding: 1.3rem; }
  .filter-pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: none; }
  .filter-pills a, .filter-pills button { white-space: nowrap; }
  .section-head { flex-wrap: wrap; }
  .cta { padding: 1.1rem; }
  .reward-hero { flex-direction: column; text-align: center; }
  .otp-input { font-size: 1.5rem; letter-spacing: .4rem; }
  .btn, .form-control, .form-select { min-height: 44px; }
}

.hero .btn-light, .daily-card .btn-light { background: #fff; color: #1e1b4b; border-color: #fff; }


/* ---------- Header: brand | links (drawer on small screens) | search | actions ---------- */
.nav-flex { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding-top: .35rem; padding-bottom: .35rem; }
.nav-flex .navbar-brand { margin: 0; order: 0; }
.nav-flex .nav-search { order: 3; flex: 1 1 100%; min-width: 0; }
.nav-flex .nav-actions { order: 2; margin-left: auto; display: flex; align-items: center; gap: .4rem; }
.nav-flex .offcanvas { order: 1; }
.nav-actions .btn-sm { padding: .3rem .6rem; font-size: .85rem; }
.nav-actions .navbar-toggler { color: var(--ink); }
.nav-drawer { background: var(--card); color: var(--ink); width: min(320px, 86vw) !important; }
.nav-drawer .offcanvas-header { border-bottom: 1px solid var(--line); }
.nav-drawer .navbar-nav .nav-link { padding: .7rem .8rem !important; font-size: 1.02rem; }
.nav-drawer .dropdown-menu { position: static !important; transform: none !important; box-shadow: none !important; background: var(--bg); margin: .2rem 0 .4rem; }
.nav-drawer .pref-menu { min-width: 0; }
.nav-drawer .btn-close { filter: none; }
[data-theme="dark"] .nav-drawer .btn-close { filter: invert(1); }
@media (min-width: 1200px) {
  .nav-flex { flex-wrap: nowrap; }
  .nav-flex .offcanvas { order: 1; flex: 1 1 auto; position: static; transform: none; visibility: visible !important; background: transparent; border: 0; width: auto !important; }
  .nav-flex .offcanvas-body { padding: 0; overflow: visible; }
  .nav-flex .nav-search { order: 2; flex: 0 1 190px; }
  .nav-flex .nav-actions { order: 3; margin-left: 0; }
  .nav-drawer .dropdown-menu { position: absolute !important; background: var(--card); box-shadow: var(--shadow) !important; }
}
@media (max-width: 575px) {
  .brand-name { font-size: 1.1rem; }
  .site-nav .navbar-brand { font-size: 1.1rem; gap: .35rem; }
  .site-nav .navbar-brand .logo-dot { width: 30px; height: 30px; }
  .nav-actions { gap: .3rem; }
  .nav-actions .btn-sm { padding: .25rem .5rem; font-size: .8rem; }
}
@media (max-width: 340px) { .brand-name { display: none; } }
main { min-height: calc(100vh - 140px); }
@media (max-height: 780px) { .auth-card { margin-top: .6rem; padding: 1.1rem 1.3rem; } }
@media (max-width: 575px) {
  .story-card { flex-direction: row; }
  .story-card .thumb { width: 78px; flex: none; aspect-ratio: auto; max-height: none; }
  .story-card .thumb i { font-size: 1.6rem; }
  .story-card .body { padding: .65rem .8rem; min-width: 0; }
  .story-card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
html { overflow-x: clip; }
@media (max-width: 575px) {
  .cat-tile { padding: .6rem .25rem; font-size: .78rem; border-radius: 12px; }
  .cat-tile i { font-size: 1.25rem; margin-bottom: .1rem; }
  .cat-tile small { display: none; }
  .hscroll { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -.75rem; padding: 0 .75rem .6rem; scrollbar-width: none; }
  .hscroll > * { flex: 0 0 78%; scroll-snap-align: start; }
  .hscroll .story-card { flex-direction: column; }
  .hscroll .story-card .thumb { width: auto; aspect-ratio: 21 / 9; max-height: 90px; }
  .hero .inner { padding: 1.4rem 1rem; }
  .hero h1 { font-size: 1.6rem; }
  .hero .lead { font-size: .95rem; }
  .section { padding-block: 1rem; }
  .section-head h2 { font-size: 1.1rem; }
}
.live-toast { background: var(--card); color: var(--ink); border: 1px solid var(--line) !important; box-shadow: 0 6px 20px rgba(0,0,0,.15); text-decoration: none; max-width: 320px; }

/* ---------- Header and menus keep a fixed size, whatever text size the visitor picks ---------- */
.site-nav { font-size: 15px; }
.site-nav .container { --bs-gutter-x: 24px; }
.site-nav .navbar-brand { font-size: 20px; gap: 8px; }
.site-nav .navbar-brand .logo-dot { font-size: 16px; }
.site-nav .nav-link { font-size: 15px; padding: 8px 10px !important; }
.site-nav .btn-sm, .nav-drawer .btn-sm { --bs-btn-padding-y: 5px; --bs-btn-padding-x: 11px; --bs-btn-font-size: 14px; --bs-btn-border-radius: 9px; line-height: 1.4; }
.site-nav .nav-search input { font-size: 14px; height: 34px; padding: 4px 12px 4px 32px; }
.site-nav .nav-search i { font-size: 14px; }
.site-nav .bell { font-size: 20px; padding: 4px 6px; }
.site-nav .bell .badge { font-size: 10px; }
.site-nav .dropdown-menu, .nav-drawer .dropdown-menu { --bs-dropdown-font-size: 14px; --bs-dropdown-padding-y: 6px; --bs-dropdown-item-padding-y: 6px; --bs-dropdown-item-padding-x: 14px; --bs-dropdown-min-width: 10rem; font-size: 14px; }
.nav-drawer { font-size: 16px; }
.nav-drawer .navbar-nav .nav-link { font-size: 16px; padding: 11px 12px !important; }
.nav-drawer .offcanvas-title { font-size: 18px; }
@media (min-width: 1200px) { .nav-flex .nav-search { flex: 0 1 170px; min-width: 120px; } }

/* ---- Professional header: never overlaps, whatever the screen or zoom ---- */
.nav-flex .nav-actions { flex-shrink: 0; }
.nav-flex .navbar-nav { flex-wrap: nowrap; }
.site-nav .nav-link { white-space: nowrap; }
.pref-seg { display: grid !important; grid-template-columns: repeat(4, 1fr); }
@media (min-width: 1200px) and (max-width: 1499.98px) {
  .site-nav .nav-link { padding-left: 8px !important; padding-right: 8px !important; }
  /* the search box shrinks to a magnifier and opens when clicked */
  .nav-flex .nav-search { flex: 0 0 36px; width: 36px; min-width: 0; height: 34px; }
  .nav-flex .nav-search input { position: absolute; right: 0; top: 0; width: 36px; padding: 0; color: transparent; cursor: pointer; transition: width .15s; }
  .nav-flex .nav-search input::placeholder { color: transparent; }
  .nav-flex .nav-search input:focus { width: 260px; padding: 4px 12px 4px 32px; color: var(--ink); cursor: text; z-index: 30; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
  .nav-flex .nav-search input:focus::placeholder { color: var(--muted); }
  .nav-flex .nav-search i { left: 11px; z-index: 31; pointer-events: none; }
}
