/* ToolsArab v2 — shared design system (light + soft-gray dark) */
:root {
  --tx-bg: #f8f7fc; --tx-surface: #ffffff; --tx-surface2: #f1eff9; --tx-ink: #1a1530; --tx-muted: #5d5878; --tx-line: #e6e2f3;
  --tx-gold: #f2b91f; --tx-gold-2: #e8a800; --tx-gold-ink: #2b2000; --tx-purple: #6b54b5; --tx-purple-soft: #ece8fa;
  --tx-shadow: 0 1px 2px rgba(40, 30, 80, .06), 0 10px 34px rgba(40, 30, 80, .08);
  --tx-shadow-hover: 0 2px 4px rgba(40, 30, 80, .08), 0 18px 44px rgba(40, 30, 80, .14);
  --tx-r: 16px; --tx-header-h: 66px;
  color-scheme: light;
}
html[data-theme="dark"] {
  --tx-bg: #262624; --tx-surface: #30302e; --tx-surface2: #383836; --tx-ink: #ecebe6; --tx-muted: #a9a79e; --tx-line: #464641;
  --tx-gold: #f2c14e; --tx-gold-2: #f2c14e; --tx-gold-ink: #2b2000; --tx-purple: #b9a9f2; --tx-purple-soft: #3b3752;
  --tx-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 34px rgba(0, 0, 0, .28);
  --tx-shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 44px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--tx-bg); color: var(--tx-ink); font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif; line-height: 1.7; min-height: 100vh; display: flex; flex-direction: column; }
body > .tx-page { flex: 1 0 auto; }
.tx-skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 1000; background: var(--tx-gold); color: var(--tx-gold-ink); padding: 8px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.tx-skip:focus { top: 10px; }
.tx-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
:where(.tx-header, .tx-footer, .tx-home, .tx-cat, .tx-search, .tx-404) a { color: inherit; }
:where(.tx-header, .tx-footer, .tx-home, .tx-cat, .tx-search, .tx-404) * { box-sizing: border-box; }
:where(.tx-header, .tx-footer, .tx-home, .tx-cat, .tx-search, .tx-404) :is(h1, h2, h3, p, ul, li, button, input) { font-family: inherit; }

/* ---------- header ---------- */
.tx-header { position: sticky; top: 0; z-index: 500; background: color-mix(in srgb, var(--tx-bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--tx-line); }
.tx-header-in { max-width: 1200px; margin: 0 auto; height: var(--tx-header-h); padding: 0 20px; display: flex; align-items: center; gap: 18px; }
.tx-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -.2px; color: var(--tx-ink); }
.tx-logo img { width: 36px; height: 36px; display: block; }
.tx-logo b { color: var(--tx-gold-2); font-weight: 800; }
.tx-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: 10px; }
.tx-nav > a, .tx-dd > button { background: none; border: 0; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--tx-ink); text-decoration: none; padding: 9px 13px; border-radius: 10px; transition: background .2s; display: inline-flex; align-items: center; gap: 6px; }
.tx-nav > a:hover, .tx-dd > button:hover, .tx-dd:focus-within > button, .tx-nav a[aria-current="page"] { background: var(--tx-surface2); }
.tx-dd { position: relative; }
.tx-dd-panel { position: absolute; inset-inline-start: 0; top: calc(100% + 8px); width: 360px; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 18px; box-shadow: var(--tx-shadow-hover); padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .18s ease; }
.tx-dd:hover .tx-dd-panel, .tx-dd:focus-within .tx-dd-panel { opacity: 1; visibility: visible; transform: none; }
.tx-dd-panel a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 14px; }
.tx-dd-panel a:hover { background: var(--tx-surface2); }
.tx-dd-panel a span { font-size: 20px; }
.tx-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.tx-iconbtn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--tx-line); background: var(--tx-surface); color: var(--tx-ink); cursor: pointer; display: inline-grid; place-items: center; transition: transform .2s, background .2s, border-color .2s; padding: 0; }
.tx-iconbtn:hover { background: var(--tx-surface2); transform: translateY(-1px); }
.tx-iconbtn svg { width: 20px; height: 20px; display: block; }
.tx-theme .sun, .tx-theme .moon { grid-area: 1 / 1; transition: transform .2s ease, opacity .15s; }
.tx-theme .sun { opacity: 0; transform: rotate(-90deg) scale(.4); }
.tx-theme .moon { opacity: 1; transform: none; }
html[data-theme="dark"] .tx-theme .sun { opacity: 1; transform: none; }
html[data-theme="dark"] .tx-theme .moon { opacity: 0; transform: rotate(90deg) scale(.4); }
.tx-burger { display: none; }
.tx-mobile { display: none; border-top: 1px solid var(--tx-line); background: var(--tx-surface); padding: 10px 20px 18px; }
.tx-mobile.open { display: block; }
.tx-mobile a { display: flex; align-items: center; gap: 10px; padding: 11px 6px; text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--tx-line); }
.tx-mobile a:last-child { border-bottom: 0; }
@media (max-width: 900px) { .tx-nav { display: none; } .tx-burger { display: inline-grid; } }

/* ---------- search overlay ---------- */
.tx-search { position: fixed; inset: 0; z-index: 9800; background: rgba(15, 12, 30, .55); backdrop-filter: blur(4px); display: none; align-items: flex-start; justify-content: center; padding: 9vh 16px 16px; }
.tx-search.open { display: flex; }
.tx-search-box { width: 100%; max-width: 640px; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 20px; box-shadow: var(--tx-shadow-hover); overflow: hidden; animation: txpop .2s ease; }
@keyframes txpop { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.tx-search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--tx-ink); font-size: 18px; padding: 18px 22px; border-bottom: 1px solid var(--tx-line); }
.tx-search-res { max-height: 56vh; overflow: auto; padding: 8px; }
.tx-search-res a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; }
.tx-search-res a:hover, .tx-search-res a.sel { background: var(--tx-surface2); }
.tx-search-res .ic { font-size: 22px; width: 32px; text-align: center; }
.tx-search-res .nm { font-weight: 700; display: block; line-height: 1.4; }
.tx-search-res .ds { font-size: 13px; color: var(--tx-muted); display: block; line-height: 1.4; }
.tx-search-res .tg { margin-inline-start: auto; font-size: 11px; color: var(--tx-muted); border: 1px solid var(--tx-line); padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.tx-search-empty { padding: 26px; text-align: center; color: var(--tx-muted); }

/* ---------- buttons / badges ---------- */
.tx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none; font-weight: 800; font-size: 15px; padding: 12px 24px; border-radius: 999px; background: linear-gradient(135deg, var(--tx-gold), var(--tx-gold-2)); color: var(--tx-gold-ink) !important; box-shadow: 0 6px 20px rgba(232, 168, 0, .28); transition: transform .2s, box-shadow .2s; }
.tx-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(232, 168, 0, .38); }
.tx-btn.ghost { background: var(--tx-surface); color: var(--tx-ink) !important; border: 1px solid var(--tx-line); box-shadow: none; }
.tx-badge { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 99px; background: var(--tx-purple-soft); color: var(--tx-purple); letter-spacing: .2px; }
.tx-badge.free { background: color-mix(in srgb, var(--tx-gold) 22%, transparent); color: var(--tx-gold-2); }

/* ---------- home ---------- */
.tx-hero { position: relative; text-align: center; padding: 64px 20px 44px; overflow: hidden; }
.tx-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 55% at 50% 0%, color-mix(in srgb, var(--tx-gold) 24%, transparent), transparent 70%), radial-gradient(40% 40% at 90% 30%, color-mix(in srgb, var(--tx-purple) 14%, transparent), transparent 70%); }
.tx-eyebrow { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: 13px; color: var(--tx-purple); background: var(--tx-purple-soft); padding: 6px 14px; border-radius: 99px; margin-bottom: 18px; }
.tx-hero h1 { margin: 0 auto 14px; max-width: 820px; font-size: clamp(30px, 5.2vw, 54px); line-height: 1.25; font-weight: 900; letter-spacing: -.5px; }
.tx-hero h1 em { font-style: normal; background: linear-gradient(135deg, var(--tx-gold), var(--tx-gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tx-hero p.sub { margin: 0 auto 26px; max-width: 640px; color: var(--tx-muted); font-size: clamp(15px, 2vw, 19px); }
.tx-hero-search { display: flex; align-items: center; gap: 12px; width: min(620px, 100%); margin: 0 auto; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 999px; padding: 15px 22px; box-shadow: var(--tx-shadow); color: var(--tx-muted); font-size: 16px; cursor: text; text-align: start; transition: box-shadow .2s, border-color .2s; }
.tx-hero-search:hover { box-shadow: var(--tx-shadow-hover); border-color: var(--tx-gold); }
.tx-hero-search svg { width: 20px; height: 20px; flex: none; }
.tx-hero-search kbd { margin-inline-start: auto; font: 600 12px/1 system-ui; border: 1px solid var(--tx-line); padding: 4px 8px; border-radius: 8px; background: var(--tx-surface2); }
.tx-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.tx-chips a, .tx-chips button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 99px; border: 1px solid var(--tx-line); background: var(--tx-surface); color: var(--tx-ink); text-decoration: none; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; transition: all .2s; }
.tx-chips a:hover, .tx-chips button:hover, .tx-chips button.on { background: var(--tx-gold); border-color: var(--tx-gold); color: var(--tx-gold-ink); transform: translateY(-1px); }
.tx-section { padding: 38px 0; }
.tx-section-h { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.tx-section-h h2 { margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 800; line-height: 1.3; }
.tx-section-h p { margin: 4px 0 0; color: var(--tx-muted); font-size: 15px; }
.tx-more { font-weight: 700; color: var(--tx-purple) !important; text-decoration: none; white-space: nowrap; font-size: 14px; }
.tx-more:hover { text-decoration: underline; }
.tx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tx-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: var(--tx-r); text-decoration: none; color: inherit; box-shadow: var(--tx-shadow); transition: transform .2s, box-shadow .2s, border-color .2s; position: relative; min-height: 132px; }
.tx-card:hover { transform: translateY(-3px); box-shadow: var(--tx-shadow-hover); border-color: color-mix(in srgb, var(--tx-gold) 70%, var(--tx-line)); }
.tx-card .top { display: flex; align-items: center; justify-content: space-between; }
.tx-card .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--tx-purple-soft); }
.tx-card h3 { margin: 0; font-size: 16.5px; font-weight: 800; line-height: 1.45; }
.tx-card p { margin: 0; color: var(--tx-muted); font-size: 13.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tx-why { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.tx-why > div { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: var(--tx-r); padding: 22px; box-shadow: var(--tx-shadow); }
.tx-why .ic { font-size: 30px; }
.tx-why h3 { margin: 8px 0 4px; font-size: 18px; }
.tx-why p { margin: 0; color: var(--tx-muted); font-size: 14.5px; }
.tx-faq details { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 14px; margin-bottom: 10px; padding: 0 18px; }
.tx-faq summary { cursor: pointer; font-weight: 800; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.tx-faq summary::after { content: '+'; font-size: 22px; color: var(--tx-gold-2); line-height: 1; transition: transform .2s; }
.tx-faq details[open] summary::after { transform: rotate(45deg); }
.tx-faq details p { margin: 0 0 16px; color: var(--tx-muted); }
.tx-cta { text-align: center; background: linear-gradient(135deg, color-mix(in srgb, var(--tx-gold) 30%, var(--tx-surface)), var(--tx-surface)); border: 1px solid var(--tx-line); border-radius: 26px; padding: 44px 20px; margin: 20px 0 50px; box-shadow: var(--tx-shadow); }
.tx-cta h2 { margin: 0 0 8px; font-size: clamp(22px, 3.4vw, 32px); }
.tx-cta p { margin: 0 0 20px; color: var(--tx-muted); }

/* ---------- category / hub / breadcrumb ---------- */
.tx-crumbs { padding: 18px 0 0; font-size: 14px; color: var(--tx-muted); }
.tx-crumbs a { text-decoration: none; color: var(--tx-muted); } .tx-crumbs a:hover { color: var(--tx-ink); }
.tx-cat-head { padding: 22px 0 8px; }
.tx-cat-head h1 { margin: 6px 0 10px; font-size: clamp(26px, 4.2vw, 42px); font-weight: 900; line-height: 1.3; }
.tx-cat-head p { margin: 0; max-width: 820px; color: var(--tx-muted); font-size: 16.5px; }
.tx-related { padding: 8px 0 40px; }
.tx-related .tx-wrap { padding-top: 10px; }
.tx-related h2 { font-size: 22px; margin: 0 0 14px; }

/* ---------- footer ---------- */
.tx-footer { margin-top: 40px; background: var(--tx-surface); border-top: 1px solid var(--tx-line); }
.tx-footer-in { max-width: 1200px; margin: 0 auto; padding: 44px 20px 26px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; }
.tx-footer h4 { margin: 0 0 12px; font-size: 15px; }
.tx-footer ul { list-style: none; margin: 0; padding: 0; }
.tx-footer li { margin: 0 0 8px; }
.tx-footer li a, .tx-footer p a { text-decoration: none; color: var(--tx-muted); font-size: 14.5px; }
.tx-footer li a:hover, .tx-footer p a:hover { color: var(--tx-ink); }
.tx-footer p { margin: 10px 0 0; color: var(--tx-muted); font-size: 14.5px; max-width: 340px; }
.tx-footer-bottom { max-width: 1200px; margin: 0 auto; padding: 16px 20px 28px; border-top: 1px solid var(--tx-line); display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; color: var(--tx-muted); font-size: 13.5px; }
@media (max-width: 800px) { .tx-footer-in { grid-template-columns: 1fr 1fr; } .tx-footer-in > :first-child { grid-column: 1 / -1; } }

/* ---------- 404 ---------- */
.tx-404 { text-align: center; padding: 70px 20px 40px; }
.tx-404 .big { font-size: clamp(90px, 20vw, 170px); font-weight: 900; line-height: 1; background: linear-gradient(135deg, var(--tx-gold), var(--tx-gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tx-404 img { width: 84px; height: 84px; }
.tx-404 h1 { margin: 10px 0 8px; font-size: clamp(22px, 4vw, 32px); }
.tx-404 p { color: var(--tx-muted); margin: 0 0 24px; }
.tx-404 .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- compat with the original tool pages ---------- */
.tx-page { position: relative; z-index: 1; }
.tx-page > :first-child { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
@media print { .tx-header, .tx-footer, .tx-search, .tx-related { display: none !important; } }

/* ================= accounts, forms, quota, chat (v3) ================= */
.tx-btn.sm { padding: 9px 20px; font-size: 14px; box-shadow: none; }
.tx-quota { display: none; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 99px; border: 1px solid var(--tx-line); background: var(--tx-surface); font-weight: 700; font-size: 13px; text-decoration: none; color: var(--tx-ink) !important; white-space: nowrap; }
.tx-quota.show { display: inline-flex; }
.tx-quota b { color: var(--tx-gold-2); font-size: 15px; }
.tx-quota.low b { color: #e5484d; }
.tx-acct { position: relative; }
.tx-avatar-btn { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; border: 2px solid var(--tx-gold); padding: 0; cursor: pointer; background: var(--tx-surface); display: block; }
.tx-avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tx-avatar-btn .dot { position: absolute; top: -2px; inset-inline-end: -2px; width: 12px; height: 12px; border-radius: 50%; background: #e5484d; border: 2px solid var(--tx-bg); }
.tx-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); min-width: 230px; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 16px; box-shadow: var(--tx-shadow-hover); padding: 8px; display: none; z-index: 700; }
.tx-menu.open { display: block; }
.tx-menu .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--tx-line); margin-bottom: 6px; }
.tx-menu .who b { display: block; font-size: 15px; } .tx-menu .who span { font-size: 12px; color: var(--tx-muted); word-break: break-all; }
.tx-menu a, .tx-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 10px; text-decoration: none; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px; color: var(--tx-ink) !important; text-align: start; }
.tx-menu a:hover, .tx-menu button:hover { background: var(--tx-surface2); }
.tx-menu .badge { margin-inline-start: auto; background: #e5484d; color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; }
@media (max-width: 560px) { .tx-quota { padding: 6px 10px; font-size: 12px; } .tx-header-in { gap: 8px; padding: 0 12px; } .tx-logo { font-size: 19px; } }

.tx-modal { position: fixed; inset: 0; z-index: 950; background: rgba(15, 12, 30, .55); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 16px; }
.tx-modal.open { display: flex; }
.tx-modal-box { width: 100%; max-width: 440px; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 24px; padding: 30px 26px; text-align: center; box-shadow: var(--tx-shadow-hover); animation: txpop .2s ease; }
.tx-modal-box .big { font-size: 46px; line-height: 1; margin-bottom: 10px; }
.tx-modal-box h3 { margin: 0 0 8px; font-size: 22px; } .tx-modal-box p { margin: 0 0 20px; color: var(--tx-muted); }
.tx-modal-box .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.tx-auth { max-width: 560px; margin: 0 auto; padding: 34px 18px 60px; }
.tx-panel { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 24px; box-shadow: var(--tx-shadow); padding: 28px; margin-bottom: 16px; }
.tx-panel h1 { margin: 0 0 6px; font-size: 27px; font-weight: 900; } .tx-panel h2 { margin: 0 0 12px; font-size: 19px; }
.tx-panel .lead { color: var(--tx-muted); margin: 0 0 20px; font-size: 15px; }
.tx-field { margin-bottom: 14px; } .tx-field > label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.tx-input { width: 100%; padding: 12px 14px; border: 1px solid var(--tx-line); border-radius: 12px; background: var(--tx-bg); color: var(--tx-ink); font: inherit; font-size: 15px; }
.tx-input:focus { outline: 2px solid var(--tx-gold); outline-offset: 1px; border-color: transparent; }
textarea.tx-input { resize: vertical; min-height: 90px; }
.tx-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .tx-row2 { grid-template-columns: 1fr; } }
.tx-hint { font-size: 12.5px; color: var(--tx-muted); margin-top: 5px; }
.tx-alert { padding: 11px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 14px; display: none; }
.tx-alert.show { display: block; }
.tx-alert.err { background: color-mix(in srgb, #e5484d 14%, transparent); color: #c0343a; border: 1px solid color-mix(in srgb, #e5484d 35%, transparent); }
.tx-alert.ok { background: color-mix(in srgb, #2faa5c 14%, transparent); color: #1d7f44; border: 1px solid color-mix(in srgb, #2faa5c 35%, transparent); }
html[data-theme="dark"] .tx-alert.err { color: #ff9a9e; } html[data-theme="dark"] .tx-alert.ok { color: #7be0a2; }
.tx-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--tx-muted); margin: 8px 0 16px; }
.tx-check input { margin-top: 5px; accent-color: var(--tx-gold-2); }
.tx-gender { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tx-gender label { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px; border: 1px solid var(--tx-line); border-radius: 14px; cursor: pointer; font-weight: 800; background: var(--tx-bg); }
.tx-gender input { position: absolute; opacity: 0; pointer-events: none; }
.tx-gender label:has(input:checked) { border-color: var(--tx-gold); background: color-mix(in srgb, var(--tx-gold) 18%, transparent); }
.tx-avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; max-height: 300px; overflow: auto; padding: 6px; border: 1px solid var(--tx-line); border-radius: 16px; background: var(--tx-bg); }
.tx-avatars label { position: relative; cursor: pointer; display: block; aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden; }
.tx-avatars input { position: absolute; opacity: 0; pointer-events: none; }
.tx-avatars img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; border: 3px solid transparent; box-sizing: border-box; transition: transform .15s; }
.tx-avatars label:hover img { transform: scale(1.06); }
.tx-avatars input:checked + img { border-color: var(--tx-gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tx-gold) 40%, transparent); }
.tx-hp { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; opacity: 0; overflow: hidden; clip: rect(0, 0, 0, 0); pointer-events: none; }
.tx-links { text-align: center; margin-top: 14px; font-size: 14px; color: var(--tx-muted); }
.tx-links a { color: var(--tx-purple); font-weight: 700; text-decoration: none; } .tx-links a:hover { text-decoration: underline; }
.tx-profile-head { display: flex; gap: 16px; align-items: center; }
.tx-profile-head img { width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--tx-gold); object-fit: cover; }
.tx-profile-head h1 { margin: 0; font-size: 24px; } .tx-profile-head p { margin: 2px 0 0; color: var(--tx-muted); font-size: 14px; }
.tx-meter { height: 12px; background: var(--tx-surface2); border-radius: 99px; overflow: hidden; margin: 10px 0 6px; } .tx-meter > i { display: block; height: 100%; background: linear-gradient(90deg, var(--tx-gold), var(--tx-gold-2)); border-radius: 99px; transition: width .4s; }
.tx-danger { border-color: color-mix(in srgb, #e5484d 40%, var(--tx-line)); }
.tx-btn.danger { background: #e5484d; color: #fff !important; box-shadow: none; }

/* chat room + support thread */
.tx-chat { display: grid; grid-template-columns: 1fr 250px; gap: 14px; height: calc(100vh - 250px); min-height: 460px; }
.tx-chat-main, .tx-online { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 22px; box-shadow: var(--tx-shadow); overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.tx-chat-list { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.tx-msg { display: flex; gap: 10px; align-items: flex-start; }
.tx-msg > img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.tx-msg .bub { background: var(--tx-surface2); border-radius: 6px 16px 16px 16px; padding: 8px 13px; max-width: min(560px, 82%); word-break: break-word; }
.tx-msg.mine .bub { background: color-mix(in srgb, var(--tx-gold) 22%, var(--tx-surface)); }
.tx-msg .meta { font-size: 12px; color: var(--tx-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tx-msg .name { font-weight: 800; color: var(--tx-ink); font-size: 13.5px; }
.tx-msg .txt { margin-top: 2px; line-height: 1.7; white-space: pre-wrap; }
.tx-msg .act { background: none; border: 0; color: var(--tx-muted); cursor: pointer; font-size: 12px; padding: 0 4px; opacity: 0; transition: opacity .15s; }
.tx-msg:hover .act, .tx-msg .act:focus { opacity: 1; }
.tx-admin-badge { background: var(--tx-gold); color: var(--tx-gold-ink); border-radius: 99px; font-size: 10.5px; font-weight: 900; padding: 1px 8px; }
.tx-chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--tx-line); align-items: flex-end; }
.tx-chat-form textarea { flex: 1; min-height: 44px; max-height: 110px; resize: none; }
.tx-count { font-size: 12px; color: var(--tx-muted); padding: 0 14px 8px; text-align: end; }
.tx-online { padding: 14px; overflow-y: auto; display: block; }
.tx-online h3 { margin: 0 0 10px; font-size: 15px; }
.tx-online li { list-style: none; display: flex; align-items: center; gap: 9px; padding: 6px 4px; font-size: 14px; font-weight: 600; }
.tx-online ul { margin: 0; padding: 0; } .tx-online img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.tx-online .on { width: 8px; height: 8px; background: #2faa5c; border-radius: 50%; margin-inline-start: auto; }
.tx-rules { background: color-mix(in srgb, var(--tx-gold) 12%, var(--tx-surface)); border: 1px solid color-mix(in srgb, var(--tx-gold) 40%, var(--tx-line)); border-radius: 16px; padding: 12px 16px; margin-bottom: 14px; font-size: 14px; }
.tx-rules summary { cursor: pointer; font-weight: 800; } .tx-rules ul { margin: 8px 0 0; padding-inline-start: 20px; color: var(--tx-muted); }
@media (max-width: 820px) { .tx-chat { grid-template-columns: 1fr; height: auto; } .tx-chat-main { height: 62vh; } .tx-online { max-height: 150px; order: -1; } }
.tx-thread { max-width: 760px; margin: 0 auto; }
.tx-thread .tx-chat-main { height: 64vh; min-height: 380px; }
.tx-bubble-row { display: flex; } .tx-bubble-row.me { justify-content: flex-start; } .tx-bubble-row.them { justify-content: flex-end; }
.tx-bubble { max-width: 82%; padding: 9px 14px; border-radius: 16px; line-height: 1.7; word-break: break-word; white-space: pre-wrap; }
.tx-bubble-row.me .tx-bubble { background: color-mix(in srgb, var(--tx-gold) 24%, var(--tx-surface)); border-end-start-radius: 4px; }
.tx-bubble-row.them .tx-bubble { background: var(--tx-surface2); border-end-end-radius: 4px; }
.tx-bubble small { display: block; color: var(--tx-muted); font-size: 11.5px; margin-top: 3px; }
.tx-empty { text-align: center; color: var(--tx-muted); padding: 40px 16px; }

/* comments widget */
.tx-comments { max-width: 760px; margin: 30px auto; padding: 0 18px; }
.tx-comments h2 { font-size: 22px; margin: 0 0 14px; }
.tx-comment { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--tx-line); }
.tx-comment img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.tx-comment .name { font-weight: 800; font-size: 14px; } .tx-comment .t { font-size: 12px; color: var(--tx-muted); margin-inline-start: 8px; }
.tx-comment p { margin: 2px 0 0; white-space: pre-wrap; word-break: break-word; }
.tx-comment .act { background: none; border: 0; color: var(--tx-muted); cursor: pointer; font-size: 12px; padding: 0; margin-inline-end: 10px; }
/* box model for the new components */
.tx-auth, .tx-auth *, .tx-panel, .tx-panel *, .tx-chat, .tx-chat *, .tx-thread *, .tx-comments, .tx-comments *, .tx-modal *, .tx-menu, .tx-menu *, .tx-rules, .tx-rules * { box-sizing: border-box; }

/* small phones: compact header */
@media (max-width: 520px) { .tx-actions > [data-open-search] { display: none; } .tx-quota .lbl { display: none; } .tx-actions { gap: 6px; } .tx-iconbtn { width: 38px; height: 38px; } .tx-avatar-btn { width: 38px; height: 38px; } }

@media (max-width: 380px) { .tx-header-in { gap: 6px; padding: 0 10px; } .tx-logo { font-size: 17px; gap: 6px; } .tx-logo img { width: 30px; height: 30px; } }

/* live community chip, emoji, members, messages */
.tx-live { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; border: 1px solid color-mix(in srgb, #2faa5c 45%, var(--tx-line)); background: color-mix(in srgb, #2faa5c 10%, var(--tx-surface)); font-weight: 800; font-size: 13px; text-decoration: none; color: var(--tx-ink) !important; white-space: nowrap; }
.tx-live .n { display: inline-flex; align-items: center; gap: 6px; }
.tx-live i { width: 9px; height: 9px; border-radius: 50%; background: #2faa5c; box-shadow: 0 0 0 0 rgba(47,170,92,.6); animation: txlive 1.8s infinite; }
@keyframes txlive { 0% { box-shadow: 0 0 0 0 rgba(47,170,92,.55); } 70% { box-shadow: 0 0 0 8px rgba(47,170,92,0); } 100% { box-shadow: 0 0 0 0 rgba(47,170,92,0); } }
@media (max-width: 1180px) { .tx-live .lbl { display: none; } }
@media (max-width: 520px) { .tx-live { padding: 6px 9px; } }
.tx-emoji-btn { width: 40px !important; height: 40px !important; font-size: 19px; flex: none; }
.tx-emoji-panel { position: fixed; z-index: 960; width: 296px; max-width: calc(100vw - 20px); background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 16px; box-shadow: var(--tx-shadow-hover); padding: 8px; display: none; }
.tx-emoji-panel.open { display: block; }
.tx-emoji-panel .grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 220px; overflow-y: auto; }
.tx-emoji-panel button { border: 0; background: none; font-size: 21px; padding: 5px 0; border-radius: 8px; cursor: pointer; line-height: 1; }
.tx-emoji-panel button:hover { background: var(--tx-surface2); }
.tx-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; margin-top: 14px; }
.tx-member { display: flex; gap: 12px; padding: 14px; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 16px; text-decoration: none; color: inherit !important; position: relative; box-shadow: var(--tx-shadow); transition: transform .15s, border-color .15s; }
.tx-member:hover { transform: translateY(-2px); border-color: var(--tx-gold); }
.tx-member img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.tx-member b { font-size: 15px; } .tx-member p { margin: 3px 0 0; font-size: 13px; color: var(--tx-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.tx-member .on, .tx-on { width: 11px; height: 11px; border-radius: 50%; background: #2faa5c; border: 2px solid var(--tx-surface); position: absolute; top: 12px; inset-inline-end: 12px; }
.tx-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.tx-toolbar .tx-input { max-width: 320px; }
.tx-pcard { text-align: center; padding: 34px 24px; }
.tx-pcard img.big { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; border: 4px solid var(--tx-gold); }
.tx-pcard h1 { margin: 12px 0 4px; font-size: 26px; } .tx-pcard .bio { max-width: 520px; margin: 14px auto; color: var(--tx-ink); white-space: pre-wrap; word-break: break-word; }
.tx-pcard .meta { color: var(--tx-muted); font-size: 14px; } .tx-pcard .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.tx-msgs { display: grid; grid-template-columns: 300px 1fr; gap: 14px; height: calc(100vh - 250px); min-height: 460px; }
@media (max-width: 820px) { .tx-msgs { grid-template-columns: 1fr; height: auto; } .tx-msgs .tx-convs { max-height: 200px; } .tx-msgs .tx-chat-main { height: 62vh; } }
.tx-convs { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 22px; box-shadow: var(--tx-shadow); overflow-y: auto; padding: 8px; }
.tx-conv { display: flex; gap: 10px; align-items: center; padding: 9px; border-radius: 12px; text-decoration: none; color: inherit !important; cursor: pointer; }
.tx-conv:hover, .tx-conv.on { background: var(--tx-surface2); }
.tx-conv img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: none; }
.tx-conv .t { min-width: 0; flex: 1; } .tx-conv b { display: block; font-size: 14px; } .tx-conv small { display: block; color: var(--tx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-conv .badge { background: #e5484d; color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; }
.tx-thead { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--tx-line); }
.tx-thead img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; } .tx-thead a { color: inherit !important; text-decoration: none; font-weight: 800; }
.tx-thead .sp { flex: 1; } .tx-thead button { background: none; border: 1px solid var(--tx-line); border-radius: 99px; padding: 4px 12px; cursor: pointer; font: inherit; font-size: 12.5px; color: var(--tx-ink); }
.tx-msg a.who { color: inherit !important; text-decoration: none; }

/* written guide under each utility tool */
.tx-info{padding:8px 0 26px}.tx-info .tx-wrap{max-width:860px}
.tx-info h2{font-size:22px;margin:26px 0 10px;font-weight:900}.tx-info h3{font-size:17px;margin:20px 0 6px;font-weight:800;color:var(--tx-purple)}
.tx-info p{font-size:16px;line-height:2;margin:0 0 10px}.tx-info ol,.tx-info ul{margin:0 0 10px;padding-inline-start:22px;line-height:1.95;font-size:15.5px}.tx-info li{margin:2px 0}
.tx-info details{background:var(--tx-surface);border:1px solid var(--tx-line);border-radius:12px;padding:10px 14px;margin:8px 0}.tx-info summary{cursor:pointer;font-weight:800;font-size:15.5px}.tx-info details p{margin:8px 0 2px;color:var(--tx-muted)}
.tx-info .tx-info-note{font-size:14px;color:var(--tx-muted);border-top:1px solid var(--tx-line);padding-top:12px;margin-top:20px}
.ai-intro{margin:10px 0 0;color:var(--tx-ink);font-size:16px;line-height:1.95;max-width:820px;background:var(--tx-surface);border:1px solid var(--tx-line);border-radius:14px;padding:12px 16px}

/* ===== questions & answers board ===== */
.tx-acct { display: flex; align-items: center; gap: 8px; }
.tx-bell { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--tx-line); background: var(--tx-surface); color: var(--tx-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tx-bell:hover { background: var(--tx-surface2); }
.tx-bell .nb { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #e5484d; color: #fff; font: 800 11px/18px inherit; text-align: center; display: none; }
.tx-notifs { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); width: min(340px, 92vw); max-height: 70vh; overflow-y: auto; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 16px; box-shadow: var(--tx-shadow-hover); display: none; z-index: 720; }
.tx-notifs.open { display: block; }
.tx-notifs h4 { margin: 0; padding: 12px 14px; font-size: 14px; border-bottom: 1px solid var(--tx-line); }
.tx-notifs a { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-bottom: 1px solid var(--tx-line); text-decoration: none; color: var(--tx-ink) !important; font-size: 13.5px; line-height: 1.5; }
.tx-notifs a:hover { background: var(--tx-surface2); }
.tx-notifs a.new { background: var(--tx-purple-soft); }
.tx-notifs a img { width: 34px; height: 34px; border-radius: 50%; flex: none; object-fit: cover; }
.tx-notifs a small { display: block; color: var(--tx-muted); font-size: 12px; }
.tx-notifs .none { padding: 22px 14px; text-align: center; color: var(--tx-muted); font-size: 13px; }
@media (max-width: 520px) { .tx-bell { width: 38px; height: 38px; } .tx-notifs { position: fixed; inset-inline: 8px; top: 64px; width: auto; } }

#qa { max-width: 860px; margin: 0 auto; }
.qa-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.qa-top .tx-input { flex: 1; min-width: 180px; }
.qa-tabs { display: inline-flex; background: var(--tx-surface2); border-radius: 12px; padding: 3px; }
.qa-tabs button { border: 0; background: none; color: var(--tx-muted); font: inherit; font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 10px; cursor: pointer; }
.qa-tabs button.on { background: var(--tx-surface); color: var(--tx-purple); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.qa-ask, .qa-gate { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 16px; padding: 12px; margin-bottom: 12px; }
.qa-ask-open { width: 100%; text-align: start; border: 1px dashed var(--tx-line); background: var(--tx-surface2); color: var(--tx-muted); font: inherit; font-size: 14px; padding: 12px 14px; border-radius: 12px; cursor: text; }
.qa-ask-open:hover { border-color: var(--tx-purple); }
.qa-ask form[hidden], .qa-ask-open[hidden] { display: none; }
.qa-ask form { display: grid; gap: 8px; }
.qa-gate { display: grid; gap: 6px; text-align: center; color: var(--tx-muted); font-size: 14px; } .qa-gate b { color: var(--tx-ink); font-size: 16px; } .qa-gate-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.qa-row { display: flex; align-items: center; gap: 8px; } .qa-sp { flex: 1; }
.qa-board { height: min(70vh, 760px); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--tx-line); border-radius: 18px; background: var(--tx-surface2); padding: 10px; scroll-behavior: smooth; }
.qa-card { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.qa-card:hover, .qa-card:focus { border-color: var(--tx-purple); box-shadow: var(--tx-shadow-hover); outline: 0; }
.qa-card h3 { margin: 8px 0 4px; font-size: 17px; line-height: 1.5; }
.qa-card p { margin: 0; color: var(--tx-muted); font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.qa-meta { display: flex; align-items: center; gap: 10px; } .qa-meta > div { display: flex; flex-direction: column; line-height: 1.35; }
.qa-av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.qa-name { font-weight: 800; font-size: 14px; color: var(--tx-ink) !important; text-decoration: none; }
.qa-time { color: var(--tx-muted); font-size: 12px; }
.qa-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.qa-count { font-size: 13px; font-weight: 700; color: var(--tx-muted); background: var(--tx-surface2); border-radius: 99px; padding: 3px 12px; } .qa-count.has { color: var(--tx-purple); background: var(--tx-purple-soft); }
.qa-more { text-align: center; color: var(--tx-muted); font-size: 13px; padding: 6px; min-height: 8px; }
.qa-thread { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 18px; padding: 16px; }
.qa-back { font-weight: 700; color: var(--tx-purple) !important; text-decoration: none; font-size: 14px; }
.qa-main h1 { font-size: clamp(20px, 3.4vw, 26px); line-height: 1.5; margin: 12px 0 8px; }
.qa-text { font-size: 15.5px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; margin: 6px 0; }
.qa-acts { display: flex; gap: 14px; margin-top: 6px; } .qa-acts button { border: 0; background: none; color: var(--tx-muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 4px 0; } .qa-acts button:hover { color: var(--tx-purple); }
.qa-h2 { font-size: 16px; margin: 22px 0 10px; padding-top: 14px; border-top: 1px solid var(--tx-line); }
.qa-reply { padding: 12px 0; border-bottom: 1px solid var(--tx-line); border-radius: 8px; } .qa-reply:last-child { border-bottom: 0; }
.qa-reply.flash { animation: qaflash 2.4s ease; }
@keyframes qaflash { 0%, 60% { background: var(--tx-purple-soft); } 100% { background: transparent; } }
.qa-quote { margin: 8px 0 2px; padding: 6px 12px; border-inline-start: 3px solid var(--tx-purple); background: var(--tx-surface2); border-radius: 8px; font-size: 13px; color: var(--tx-muted); }
.qa-replyform { margin-top: 14px; display: grid; gap: 8px; }
.qa-to { display: flex; align-items: center; justify-content: space-between; background: var(--tx-purple-soft); border-radius: 10px; padding: 6px 12px; font-size: 13px; } .qa-to button { border: 0; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: var(--tx-muted); }
@media (max-width: 560px) { .qa-board { height: 68vh; padding: 8px; } .qa-card { padding: 12px; } .qa-thread { padding: 12px; } }
.qa-who { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

#qa *, .qa-thread, .qa-thread * { box-sizing: border-box; }
.qa-cats { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 4px; scrollbar-width: thin; }
.qa-cats button { flex: none; border: 1px solid var(--tx-line); background: var(--tx-surface); color: var(--tx-ink); font: inherit; font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.qa-cats button:hover { border-color: var(--tx-purple); }
.qa-cats button.on { background: var(--tx-purple); border-color: var(--tx-purple); color: #fff; }
.qa-cat { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 800; color: var(--tx-purple); background: var(--tx-purple-soft); border-radius: 99px; padding: 3px 12px; }
.qa-ask select.tx-input { width: 100%; }
.qa-replyform textarea, .qa-ask textarea, .qa-ask input.tx-input { width: 100%; max-width: 100%; }
.qa-more { min-height: 24px; }
@media (max-width: 700px) { .qa-board { height: auto; max-height: none; overflow: visible; border: 0; background: none; padding: 0; } }
.tx-nav > a.tx-hot { background: linear-gradient(135deg, var(--tx-gold), var(--tx-gold-2)); color: var(--tx-gold-ink); font-weight: 800; box-shadow: 0 2px 10px rgba(242,185,31,.4); padding: 8px 16px; }
.tx-nav > a.tx-hot:hover { background: linear-gradient(135deg, var(--tx-gold-2), var(--tx-gold)); transform: translateY(-1px); }
.tx-mobile a.tx-hot-m { background: linear-gradient(135deg, var(--tx-gold), var(--tx-gold-2)); color: var(--tx-gold-ink) !important; font-weight: 800; border-radius: 12px; }

/* ===== board: wider page, categories on the side, votes, tools ===== */
#qa.qa-two { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
#qa.qa-one { max-width: 860px; margin: 0 auto; }
.qa-two .qa-cats { flex-direction: column; overflow-y: auto; overflow-x: hidden; gap: 4px; padding: 6px; margin: 0; position: sticky; top: 84px; max-height: calc(100vh - 110px); background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 16px; }
.qa-two .qa-cats button { text-align: start; border: 0; border-radius: 10px; padding: 8px 12px; white-space: normal; }
.qa-two .qa-cats button:hover { background: var(--tx-surface2); }
.qa-two .qa-cats button.on { background: var(--tx-purple); color: #fff; }
.qa-two .qa-board { height: calc(100vh - 230px); min-height: 520px; }
.qa-card { padding: 12px 14px; margin-bottom: 8px; } .qa-card h3 { font-size: 16px; margin: 6px 0 2px; }
.qa-card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; }
.qa-card .qa-foot { margin-top: 8px; gap: 8px; justify-content: flex-start; } .qa-card .qa-foot .qa-time { margin-inline-start: auto; }
.qa-likes { display: inline-flex; align-items: center; gap: 4px; color: var(--tx-muted); font-size: 13px; font-weight: 700; }
.qa-vote { display: inline-flex; gap: 6px; }
.qa-vote button { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--tx-line) !important; background: var(--tx-surface) !important; border-radius: 99px !important; padding: 3px 11px !important; color: var(--tx-muted) !important; }
.qa-vote button b { font-size: 12.5px; font-weight: 800; }
.qa-vote button:hover { border-color: var(--tx-purple) !important; color: var(--tx-purple) !important; }
.qa-vote button.on { background: var(--tx-purple-soft) !important; border-color: var(--tx-purple) !important; color: var(--tx-purple) !important; }
.qa-acts { align-items: center; flex-wrap: wrap; }
.qa-best { display: inline-block; margin-inline-start: 6px; font-size: 11px; font-weight: 800; background: var(--tx-gold); color: var(--tx-gold-ink); border-radius: 99px; padding: 1px 9px; }
.qa-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding: 10px 14px; background: var(--tx-surface2); border-radius: 12px; font-size: 13.5px; }
.qa-tools a { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 99px; padding: 4px 12px; text-decoration: none; color: var(--tx-purple) !important; font-weight: 700; }
.qa-tools a:hover { border-color: var(--tx-purple); }
@media (max-width: 860px) {
  #qa.qa-two { display: block; }
  .qa-two .qa-cats { position: static; flex-direction: row; overflow-x: auto; overflow-y: hidden; max-height: none; background: none; border: 0; padding: 2px 2px 10px; }
  .qa-two .qa-cats button { white-space: nowrap; border: 1px solid var(--tx-line); border-radius: 99px; }
  .qa-two .qa-board { height: auto; min-height: 0; }
}

/* small flags next to names (the chat list used to stretch them to avatar size) */
img.tx-fl { width: 18px !important; height: 12px !important; max-width: none; object-fit: cover; border-radius: 2px !important; vertical-align: -1px; margin-inline-start: 6px; display: inline-block; box-shadow: 0 0 0 1px rgba(0,0,0,.14); flex: none; }

/* ===== questions page: the whole page scrolls (no inner box) + pictures ===== */
.qa-two .qa-board { height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; border: 0 !important; background: none !important; padding: 0 !important; }
.qa-attrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qa-attach { border: 1px dashed var(--tx-line); background: var(--tx-surface2); color: var(--tx-purple); font: inherit; font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 10px; cursor: pointer; }
.qa-attach:hover { border-color: var(--tx-purple); }
.qa-thumbs { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.qa-th { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--tx-line); display: inline-flex; align-items: center; justify-content: center; background: var(--tx-surface2); color: var(--tx-muted); }
.qa-th img { width: 100%; height: 100%; object-fit: cover; }
.qa-th button { position: absolute; top: 2px; inset-inline-end: 2px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; padding: 0; }
.qa-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.qa-imgs a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--tx-line); background: var(--tx-surface2); }
.qa-imgs img { display: block; max-width: min(100%, 320px); max-height: 240px; width: auto; height: auto; object-fit: contain; }
.qa-hasimg { font-size: 12px; font-weight: 700; color: var(--tx-muted); }

/* ===== questions in two columns ===== */
@media (min-width: 760px) {
  .qa-two #qaList { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
  .qa-two #qaList .qa-card { margin: 0; height: 100%; display: flex; flex-direction: column; border-width: 1px; }
  .qa-two #qaList .qa-card .qa-foot { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--tx-line); }
  .qa-two #qaList .tx-empty { grid-column: 1 / -1; }
}
.tx-hot-long { display: none; }
@media (min-width: 1240px) { .tx-hot-long { display: inline; } }
/* ===== ideas pages ===== */
.idea-wrap { max-width: 860px; margin-inline: auto; }
.idea-article h1 { font-size: clamp(24px, 4vw, 34px); line-height: 1.5; margin: 8px 0 8px; }
.idea-lead { font-size: 17px; line-height: 1.9; color: var(--tx-muted); margin: 0 0 12px; }
.idea-article h2 { font-size: 21px; margin: 26px 0 8px; }
.idea-article p, .idea-article li { font-size: 16.5px; line-height: 1.95; }
.idea-article ul, .idea-article ol { padding-inline-start: 22px; margin: 8px 0; }
.idea-article li { margin: 4px 0; }
.idea-note { margin-top: 22px; padding: 12px 16px; background: var(--tx-surface2); border-inline-start: 4px solid var(--tx-gold); border-radius: 10px; font-size: 14.5px; color: var(--tx-muted); }
.idea-tools, .idea-talk, .idea-more { margin-top: 34px; }
.idea-tools h2, .idea-talk h2, .idea-more h2 { font-size: 21px; margin: 0 0 10px; }
.idea-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.idea-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 16px; text-decoration: none; color: var(--tx-ink) !important; transition: border-color .15s, box-shadow .15s; }
.idea-card:hover { border-color: var(--tx-purple); box-shadow: var(--tx-shadow-hover); }
.idea-card b { font-size: 17px; line-height: 1.6; } .idea-card span { color: var(--tx-muted); font-size: 14px; line-height: 1.8; } .idea-card i { font-style: normal; color: var(--tx-purple); font-weight: 800; font-size: 14px; margin-top: auto; }
.qa-idea .qa-thread { border: 0; padding: 0; background: none; }
.qa-ideavote { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 14px; font-weight: 700; }
.qa-owner { margin-inline-start: 6px; font-size: 11px; font-weight: 800; background: var(--tx-purple-soft); color: var(--tx-purple); border-radius: 99px; padding: 1px 9px; }
