/* ==========================================================================
   Twibbonin — Design refresh layer (Dec 2026)
   Loaded after style.css on every public page. Delete this file to revert.
   ========================================================================== */

:root {
  --ink: #0b1220;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e6eaf2;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px -6px rgba(15, 23, 42, .10);
  --shadow-md: 0 2px 4px rgba(15, 23, 42, .04), 0 14px 34px -10px rgba(15, 23, 42, .16);
  --shadow-lg: 0 4px 8px rgba(15, 23, 42, .04), 0 24px 56px -16px rgba(15, 23, 42, .22);
  --shadow-xl: var(--shadow-lg);
  --shadow-primary: 0 10px 28px -8px color-mix(in srgb, var(--primary) 55%, transparent);
  --ring: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

body {
  background: var(--surface-2);
  color: var(--ink-soft);
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { color: var(--ink); letter-spacing: -.02em; }
.hero h1, .hero h2, .hero h3 { color: inherit; }

::selection { background: color-mix(in srgb, var(--primary) 85%, black); }

/* Accessible focus everywhere (keyboard only) */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 10px;
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 2000;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
  font-weight: 700; font-size: .85rem; transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 12px; }

/* ---------- Navbar ---------- */
.navbar {
  background: rgba(255, 255, 255, .78);
  border-bottom: 1px solid rgba(230, 234, 242, .8);
  box-shadow: none;
}
.navbar.is-scrolled { box-shadow: 0 6px 24px -12px rgba(15, 23, 42, .18); background: rgba(255, 255, 255, .92); }
.nav-inner { height: 68px; }
.nav-search { border: 1px solid var(--line); background: var(--surface-2); }
.nav-search:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.nav-links a { font-weight: 600; color: var(--ink-soft); font-size: .88rem; }
.nav-links a:hover { background: var(--primary-light); color: var(--primary); }
.nav-links a.is-current:not(.btn) { color: var(--primary); background: var(--primary-light); }
.nav-dropdown { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }

/* ---------- Buttons ---------- */
.btn { font-weight: 700; letter-spacing: -.005em; transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), background .2s, color .2s, border-color .2s; }
.btn-primary { box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--primary) 60%, transparent); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-primary); }
.btn-outline { border-width: 1.5px; }
.btn-outline:hover { transform: translateY(-1px); }
.btn-white:hover { transform: translateY(-1px); }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 88px) 0; }
.section-header { margin-bottom: clamp(32px, 5vw, 48px); }
.section-header h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: -.03em; line-height: 1.15; }
.section-header p { color: var(--muted); }
.section-header .eyebrow, .eyebrow {
  background: var(--primary-light); color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 14%, transparent);
  letter-spacing: .06em;
}

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--primary) 22%, var(--line)); }
.card:hover .card-img-wrap img { transform: scale(1.04); }
.card-title { letter-spacing: -.01em; }
.card-footer { background: var(--surface); border-top-color: var(--line); }
.campaigns-grid { gap: clamp(16px, 2.4vw, 24px); }

/* ---------- Forms ---------- */
.form-control, input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], textarea, select {
  border-color: var(--line);
}
.form-control:focus { border-color: var(--primary); box-shadow: var(--ring); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); }

/* ---------- Motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Homepage additions
   ========================================================================== */

/* Hero search */
.hp-hero-search {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border-radius: 999px; padding: 6px 6px 6px 18px;
  max-width: 520px; margin: 0 0 14px;
  box-shadow: 0 18px 40px -18px rgba(2, 6, 23, .55), 0 0 0 1px rgba(255, 255, 255, .5);
}
.hp-hero-search svg { color: var(--muted); flex-shrink: 0; }
.hp-hero-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: 500 1rem var(--font); color: var(--ink); padding: 10px 4px;
}
.hp-hero-search input::placeholder { color: #94a3b8; }
.hp-hero-search button { flex-shrink: 0; border-radius: 999px; padding: 11px 22px; }
.hp-hero-search:focus-within { box-shadow: 0 18px 40px -18px rgba(2, 6, 23, .55), 0 0 0 4px rgba(255, 255, 255, .45); }
.hp-hero-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 28px; font-size: .82rem; }
.hp-hero-tags span { opacity: .8; font-weight: 600; }
.hp-hero-tags a {
  color: #fff; padding: 5px 12px; border-radius: 999px; font-weight: 600;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  transition: background .2s, transform .2s var(--ease-out);
}
.hp-hero-tags a:hover { background: rgba(255, 255, 255, .26); transform: translateY(-1px); }

/* Upcoming moments */
.hp-moments-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hp-moment {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 20px; border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink-soft);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s;
  overflow: hidden;
}
.hp-moment::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: var(--moment-accent, var(--primary));
}
.hp-moment:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--moment-accent, var(--primary)) 35%, var(--line)); }
.hp-moment-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hp-moment-emoji {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem;
  background: color-mix(in srgb, var(--moment-accent, var(--primary)) 12%, white);
}
.hp-moment-countdown {
  font-size: .72rem; font-weight: 800; letter-spacing: .02em; padding: 4px 10px; border-radius: 999px;
  color: var(--moment-accent, var(--primary)); background: color-mix(in srgb, var(--moment-accent, var(--primary)) 10%, white);
  white-space: nowrap;
}
.hp-moment-countdown.is-today { color: #fff; background: var(--moment-accent, var(--primary)); }
.hp-moment h3 { font-size: 1.02rem; font-weight: 800; margin: 2px 0 0; }
.hp-moment-date { font-size: .8rem; color: var(--muted); font-weight: 600; }
.hp-moment-cta { margin-top: auto; font-size: .84rem; font-weight: 700; color: var(--moment-accent, var(--primary)); display: inline-flex; gap: 6px; align-items: center; }
.hp-moment:hover .hp-moment-cta span { transform: translateX(3px); }
.hp-moment-cta span { transition: transform .2s var(--ease-out); }
.hp-moments-note { text-align: center; margin-top: 18px; font-size: .78rem; color: var(--muted); }

/* FAQ */
.hp-faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.hp-faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s;
}
.hp-faq details[open] { border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); box-shadow: var(--shadow); }
.hp-faq summary {
  list-style: none; cursor: pointer; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-weight: 700; color: var(--ink); font-size: 1rem;
}
.hp-faq summary::-webkit-details-marker { display: none; }
.hp-faq summary::after {
  content: '+'; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.2rem; font-weight: 600; color: var(--primary); background: var(--primary-light);
  transition: transform .25s var(--ease-out);
}
.hp-faq details[open] summary::after { transform: rotate(45deg); }
.hp-faq .hp-faq-answer { padding: 0 22px 20px; color: var(--muted); line-height: 1.7; font-size: .94rem; }

@media (max-width: 1024px) {
  .hp-moments-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .hp-hero-search { margin-left: auto; margin-right: auto; }
  .hp-hero-tags { justify-content: center; }
}
@media (max-width: 520px) {
  .hp-moments-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hp-moment { padding: 16px; }
  .hp-hero-search { padding-left: 14px; }
  .hp-hero-search button { padding: 10px 16px; }
  .hp-faq summary { padding: 16px 18px; font-size: .95rem; }
  .hp-faq .hp-faq-answer { padding: 0 18px 18px; }
}

/* ==========================================================================
   Campaign detail
   ========================================================================== */
.campaign-frame-preview { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--line); background: #fff; }
.campaign-frame-preview img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.campaign-info h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.15; letter-spacing: -.03em; margin-bottom: 12px; }
.campaign-stats { gap: 10px; }
.campaign-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.cp-author { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; transition: background .2s; }
.cp-author:hover { background: var(--primary-light); }
.cp-author img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); }
.cp-main-cta { width: 100%; max-width: 420px; margin: 6px 0 14px; padding-block: 15px; font-size: 1rem; }
.cp-share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.editor-header h2 { letter-spacing: -.02em; }
.breadcrumb { font-size: .82rem; }
.breadcrumb span:last-child { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; display: inline-block; vertical-align: bottom; }
@media (max-width: 768px) {
  .cp-main-cta { max-width: none; position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 20; box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--primary) 70%, transparent); }
  .breadcrumb span:last-child { max-width: 22ch; }
}

/* ==========================================================================
   Explore / listings
   ========================================================================== */
.categories-bar { scrollbar-width: none; }
.categories-bar::-webkit-scrollbar { display: none; }
.cat-btn { border: 1px solid var(--line); background: var(--surface); font-weight: 600; transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease-out); }
.cat-btn:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); color: var(--primary); transform: translateY(-1px); }
.cat-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.card-desc { color: var(--muted); }
.page-link { border: 1px solid var(--line); background: var(--surface); }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.empty-state { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-lg); }
.ex-suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 22px; font-size: .85rem; }
.ex-suggest > span { color: var(--muted); font-weight: 600; }
.ex-search .form-control { border-radius: 999px; padding-inline: 20px; }
.ex-search .btn { border-radius: 999px; }

/* ==========================================================================
   Shared content pages: categories, static pages, contact, blog, tools,
   leaderboard, creator profile
   ========================================================================== */
.content-box { border: 1px solid var(--line); box-shadow: var(--shadow-sm); border-radius: var(--radius-lg); }
.page-content { color: var(--ink-soft); max-width: 72ch; }
.page-content h2 { color: var(--ink); letter-spacing: -.02em; }
.page-content a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.category-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .25s; }
.category-card:hover { background: var(--surface); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.category-card-icon { border-radius: 12px; box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--primary) 70%, transparent); }
.category-card-info h3 { color: var(--ink); }
.category-card-info span { color: var(--muted); font-size: .82rem; }

.form-label { font-weight: 700; color: var(--ink); font-size: .88rem; }
.form-control { border-radius: 12px; border: 1px solid var(--line); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.form-control:hover { border-color: color-mix(in srgb, var(--primary) 25%, var(--line)); }
.alert { border-radius: var(--radius); }

.blog-card { border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.blog-cat-pill, .blog-tag-chip { transition: background .2s, color .2s, transform .2s var(--ease-out); }
.blog-cat-pill:hover, .blog-tag-chip:hover { transform: translateY(-1px); }

.tool-card { border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .25s; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

.lb-tab, .up-page-btn, .page-btn, .blog-page-btn { transition: background .2s, color .2s, border-color .2s; }
.lb-follow-btn, .up-follow-btn { transition: transform .2s var(--ease-out), box-shadow .2s; }
.lb-follow-btn:hover, .up-follow-btn:hover { transform: translateY(-1px); }

.pagination-info { color: var(--muted); }
.text-muted { color: var(--muted) !important; }

/* ==========================================================================
   Round 3 — unified page heroes + page-level redesign
   (body-prefixed selectors so they win over each page's inline <style>)
   ========================================================================== */
:root { --hero-ink: #0a1030; }

/* ---------- Unified hero look ---------- */
body .page-hero,
body .blog-hero,
body .lb-hero,
body .hero.hero-sm,
body .up-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  background:
    radial-gradient(60% 90% at 12% 10%, color-mix(in srgb, var(--primary) 85%, transparent), transparent 70%),
    radial-gradient(50% 80% at 88% 20%, rgba(124, 58, 237, .7), transparent 70%),
    radial-gradient(60% 80% at 70% 120%, rgba(14, 165, 233, .55), transparent 70%),
    var(--hero-ink) !important;
}
body .page-hero::before,
body .blog-hero::before,
body .lb-hero::before,
body .hero.hero-sm::before,
body .up-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 90% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 50% 0%, #000 20%, transparent 75%);
  opacity: 1; animation: none;
}
body .page-hero::after,
body .blog-hero::after,
body .lb-hero::after,
body .hero.hero-sm::after,
body .up-hero::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  width: 520px; height: 520px; right: -140px; top: -220px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(244, 114, 182, .35), transparent);
  filter: blur(20px); animation: heroOrb 14s ease-in-out infinite alternate;
}
@keyframes heroOrb {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-180px, 120px, 0) scale(1.2); }
}

body .page-hero { padding: clamp(44px, 7vw, 76px) 0 clamp(40px, 6vw, 64px); text-align: center; }
body .page-hero .container { position: relative; }
body .page-hero h1, body .blog-hero h1, body .lb-hero h1, body .hero.hero-sm h1 {
  color: #fff; font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.08;
  margin: 10px auto 12px; max-width: 18ch;
  animation: heroRise .7s cubic-bezier(.22, 1, .36, 1) both;
}
body .page-hero p, body .blog-hero p, body .lb-hero p, body .hero.hero-sm .hero-subtitle {
  color: rgba(226, 232, 240, .85); font-size: clamp(.95rem, 1.6vw, 1.08rem); max-width: 58ch; margin: 0 auto;
  animation: heroRise .7s .08s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes heroRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.page-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #bfdbfe;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
body .page-hero .breadcrumb { justify-content: center; color: rgba(226, 232, 240, .7); margin-bottom: 14px; }
body .page-hero .breadcrumb a { color: rgba(226, 232, 240, .85); }
body .page-hero .breadcrumb a:hover { color: #fff; }
body .page-hero .breadcrumb span:last-child { color: #fff; }

/* Glass search used inside heroes */
.hero-search {
  display: flex; align-items: center; gap: 6px; max-width: 560px; margin: 24px auto 0; padding: 6px 6px 6px 18px;
  border-radius: 999px; background: #fff; box-shadow: 0 22px 44px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .4);
  animation: heroRise .7s .16s cubic-bezier(.22, 1, .36, 1) both;
}
.hero-search svg { color: #94a3b8; flex-shrink: 0; }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 11px 4px; font: 500 1rem var(--font); color: var(--ink); }
.hero-search .btn { border-radius: 999px; padding: 11px 22px; flex-shrink: 0; }
.hero-search:focus-within { box-shadow: 0 22px 44px -20px rgba(0, 0, 0, .7), 0 0 0 4px rgba(255, 255, 255, .35); }
.hero-search .hero-search-clear { color: #94a3b8; font-size: 1.3rem; line-height: 1; padding: 0 8px; }
.hero-search .hero-search-clear:hover { color: var(--danger); }

/* ---------- Explore ---------- */
.ex-toolbar {
  position: sticky; top: calc(68px + env(safe-area-inset-top, 0px)); z-index: 30;
  display: flex; align-items: center; gap: 12px; margin: -26px 0 24px; padding: 10px 12px;
  border-radius: 18px; background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
}
.ex-toolbar .categories-bar { flex: 1; min-width: 0; margin: 0 !important; display: flex; gap: 8px; overflow-x: auto; flex-wrap: nowrap; padding: 2px; }
.ex-toolbar .cat-btn { white-space: nowrap; flex-shrink: 0; }
.ex-toolbar form select { border-radius: 999px; min-width: 130px; }
.ex-result-count { color: var(--muted); font-size: .88rem; margin-bottom: 16px; }
.ex-result-count strong { color: var(--ink); }
.campaigns-grid .card { animation: cardIn .6s cubic-bezier(.22, 1, .36, 1) backwards; }
.campaigns-grid .card:nth-child(2) { animation-delay: .04s; } .campaigns-grid .card:nth-child(3) { animation-delay: .08s; }
.campaigns-grid .card:nth-child(4) { animation-delay: .12s; } .campaigns-grid .card:nth-child(5) { animation-delay: .16s; }
.campaigns-grid .card:nth-child(6) { animation-delay: .2s; } .campaigns-grid .card:nth-child(n+7) { animation-delay: .24s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Category page header ---------- */
body .category-header {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 24px; padding: 28px; margin-bottom: 24px; color: #fff;
  background: radial-gradient(70% 120% at 0% 0%, color-mix(in srgb, var(--primary) 80%, transparent), transparent 70%), radial-gradient(60% 120% at 100% 100%, rgba(124, 58, 237, .6), transparent 70%), var(--hero-ink);
  box-shadow: var(--shadow-lg); border: 0;
}
body .category-header .category-title { color: #fff; letter-spacing: -.03em; }
body .category-header .category-desc { color: rgba(226, 232, 240, .85); }
body .category-header .category-icon-lg { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); color: #fff; border-radius: 18px; box-shadow: 0 18px 30px -16px rgba(0, 0, 0, .7); }
body .category-header .form-control { background: rgba(255, 255, 255, .95); }

/* ---------- Blog ---------- */
body .blog-hero { padding: clamp(48px, 7vw, 80px) 0 clamp(44px, 6vw, 64px); }
body .blog-search-bar {
  max-width: 560px; margin: 24px auto 18px; padding: 6px; border-radius: 999px; background: #fff; border: 0;
  box-shadow: 0 22px 44px -20px rgba(0, 0, 0, .7); display: flex; gap: 6px;
}
body .blog-search-bar input { border: 0; background: transparent; padding: 10px 16px; color: var(--ink); flex: 1; min-width: 0; outline: none; }
body .blog-search-bar button { border-radius: 999px; background: var(--primary); color: #fff; padding: 10px 22px; font-weight: 700; border: 0; }
body .blog-cats { justify-content: center; }
body .blog-cat-pill { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); color: rgba(255, 255, 255, .9); backdrop-filter: blur(6px); }
body .blog-cat-pill:hover { background: rgba(255, 255, 255, .18); color: #fff; }
body .blog-cat-pill.active { background: #fff; color: var(--primary); border-color: #fff; }
body .blog-section-title { display: flex; align-items: center; gap: 8px; font-size: 1.25rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
body .blog-featured {
  border-radius: 26px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-md);
  transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s;
}
body .blog-featured:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
body .blog-featured-img { transition: transform .8s cubic-bezier(.22, 1, .36, 1); }
body .blog-featured:hover .blog-featured-img { transform: scale(1.04); }
body .blog-featured-badge { background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; border-radius: 999px; }
body .blog-featured-title { letter-spacing: -.03em; color: var(--ink); }
body .blog-card { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s, border-color .3s; }
body .blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--primary) 25%, var(--line)); }
body .blog-card-img { transition: transform .7s cubic-bezier(.22, 1, .36, 1); }
body .blog-card:hover .blog-card-img { transform: scale(1.06); }
body .blog-card-cat { background: var(--primary-light); color: var(--primary); border-radius: 999px; font-weight: 800; letter-spacing: .04em; }
body .blog-card-title { color: var(--ink); letter-spacing: -.015em; }
body .blog-card:hover .blog-card-title { color: var(--primary); }
body .blog-tag-chip { border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
body .blog-tag-chip:hover, body .blog-tag-chip.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ---------- Single article ---------- */
body #reading-progress { height: 3px; background: linear-gradient(90deg, var(--primary), #a78bfa, #f472b6); box-shadow: 0 0 12px color-mix(in srgb, var(--primary) 70%, transparent); }
body .article-header { margin-bottom: 26px; }
body .article-header h1 { font-size: clamp(1.9rem, 4vw, 2.7rem) !important; line-height: 1.12 !important; letter-spacing: -.035em; color: var(--ink); }
body .article-cat-badge { background: var(--primary-light); color: var(--primary); border-radius: 999px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; font-size: .72rem; }
body .article-excerpt { font-size: 1.12rem; color: var(--muted); line-height: 1.7; border-left: 3px solid var(--primary); padding-left: 16px; }
body .article-meta img { box-shadow: 0 0 0 2px #fff, 0 0 0 4px color-mix(in srgb, var(--primary) 35%, transparent); }
body .article-featured-img { border-radius: 24px; box-shadow: var(--shadow-lg); }
body .article-content { font-size: 1.08rem; line-height: 1.85; color: #1e293b; }
body .article-content > * + * { margin-top: 1.1em; }
body .article-content h2 { position: relative; font-size: 1.6rem; letter-spacing: -.025em; color: var(--ink); margin-top: 2em; padding-top: .2em; scroll-margin-top: 90px; }
body .article-content h2::before { content: ''; display: block; width: 44px; height: 4px; border-radius: 4px; margin-bottom: 12px; background: linear-gradient(90deg, var(--primary), #a78bfa); }
body .article-content h3 { font-size: 1.25rem; color: var(--ink); margin-top: 1.6em; scroll-margin-top: 90px; }
body .article-content a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
body .article-content img { border-radius: 18px; box-shadow: var(--shadow-md); }
body .article-content blockquote { border-left: 4px solid var(--primary); background: var(--primary-light); padding: 16px 20px; border-radius: 0 14px 14px 0; color: var(--ink-soft); font-style: italic; }
body .article-content ul li::marker, body .article-content ol li::marker { color: var(--primary); font-weight: 800; }
body .article-content code { background: #eef2f8; padding: 2px 6px; border-radius: 6px; font-size: .9em; }
body .article-content table { border-collapse: separate; border-spacing: 0; width: 100%; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
body .article-content th { background: #f6f8fc; }
body .article-content th, body .article-content td { padding: 10px 14px; border-bottom: 1px solid var(--line); }
body .sidebar-widget, body #toc-widget { border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); background: var(--surface); }
body #toc-list a { border-radius: 10px; transition: background .2s, color .2s, padding-left .2s; }
body #toc-list a:hover, body #toc-list a.toc-active { background: var(--primary-light); color: var(--primary); padding-left: 14px; }
body .author-bio-box { border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(135deg, #fff, var(--primary-light)); box-shadow: var(--shadow-sm); }
body .related-card { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s; }
body .related-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
body .article-content .tag, body .tag { border-radius: 999px; }
body #back-to-top { border-radius: 14px; box-shadow: var(--shadow-primary); }

/* ---------- Leaderboard ---------- */
body .lb-hero { padding: clamp(48px, 7vw, 80px) 0 clamp(90px, 10vw, 120px); }
body .lb-tabs { background: rgba(255, 255, 255, .9); border: 1px solid var(--line); border-radius: 999px; padding: 5px; box-shadow: var(--shadow-md); backdrop-filter: blur(12px); }
body .lb-tab { border-radius: 999px; font-weight: 700; }
body .lb-tab.active { background: var(--primary); color: #fff; box-shadow: 0 8px 18px -8px var(--primary); }
body .lb-podium { align-items: flex-end; perspective: 900px; position: relative; z-index: 2; }
body .lb-hero + section > .container { position: relative; z-index: 2; margin-top: -84px; }
body .lb-podium-card {
  position: relative; overflow: hidden; border-radius: 24px; border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-lg); transform-style: preserve-3d;
  animation: podiumRise .8s cubic-bezier(.22, 1, .36, 1) backwards;
  transition: transform .4s cubic-bezier(.22, 1, .36, 1), box-shadow .4s;
}
body .lb-podium-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--podium, var(--primary)); }
body .lb-podium-card::after {
  content: ''; position: absolute; inset: -40% -40% auto auto; width: 160px; height: 160px; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--podium, var(--primary)) 30%, transparent), transparent);
}
body .lb-podium-card:hover { transform: translateY(-8px) rotateX(6deg); box-shadow: 0 34px 60px -26px color-mix(in srgb, var(--podium, var(--primary)) 70%, rgba(0, 0, 0, .4)); }
body .lb-podium-card.gold { --podium: #f59e0b; padding-top: 34px; padding-bottom: 30px; animation-delay: .12s; }
body .lb-podium-card.silver { --podium: #94a3b8; animation-delay: .24s; }
body .lb-podium-card.bronze { --podium: #c2410c; animation-delay: .36s; }
@keyframes podiumRise { from { opacity: 0; transform: translateY(40px) rotateX(18deg); } to { opacity: 1; transform: none; } }
body .lb-podium-medal { font-size: 2rem; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .2)); animation: medalBob 3.2s ease-in-out infinite; }
@keyframes medalBob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(-6deg); } }
body .lb-podium-avatar { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--podium, var(--primary)), 0 16px 28px -14px rgba(0, 0, 0, .5); }
body .lb-podium-stat { font-weight: 800; color: var(--podium, var(--primary)); }
body .lb-row {
  border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s, border-color .25s;
}
body .lb-row:hover { transform: translateX(4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); }
body .lb-rank.top3 { background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; }
body .lb-stat-val { color: var(--ink); font-weight: 800; }
body .lb-follow-btn { border-radius: 999px; }

/* ---------- Tools ---------- */
body .hero.hero-sm { padding: clamp(48px, 7vw, 80px) 0 clamp(44px, 6vw, 64px); }
body .tools-grid { perspective: 1000px; }
body .tool-card {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 22px; border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-sm); transform-style: preserve-3d; will-change: transform;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1), box-shadow .35s, border-color .35s;
}
body .tool-card::after {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--primary) 12%, transparent), transparent 60%);
}
body .tool-card:hover { box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); }
body .tool-card:hover::after { opacity: 1; }
body .tool-card__icon-wrap {
  border-radius: 18px; color: #fff; background: linear-gradient(135deg, var(--primary), #7c3aed);
  box-shadow: 0 16px 28px -14px color-mix(in srgb, var(--primary) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, .3);
  transform: translateZ(40px); transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}
body .tool-card__icon-wrap svg { stroke: #fff; }
body .tool-card:hover .tool-card__icon-wrap { transform: translateZ(50px) rotate(-6deg) scale(1.06); }
body .tool-card__title { color: var(--ink); letter-spacing: -.015em; transform: translateZ(24px); }
body .tool-card__badge--ready { background: var(--primary-light); color: var(--primary); border-radius: 999px; font-weight: 800; }
body .tool-card--soon { opacity: .7; filter: grayscale(.4); }
body .tools-feature { border-radius: 20px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
body .tools-feature__icon { border-radius: 14px; background: var(--primary-light); color: var(--primary); }
body .faq-item { border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }

/* ---------- Creator profile ---------- */
body .up-hero { padding: 72px 0 120px; }
body .up-card { border-radius: 26px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: heroRise .7s cubic-bezier(.22, 1, .36, 1) both; }
body .up-avatar { box-shadow: 0 0 0 5px #fff, 0 0 0 8px transparent, 0 20px 36px -18px rgba(0, 0, 0, .5); background: #fff; }
body .up-avatar-wrap { position: relative; }
body .up-avatar-wrap::before {
  content: ''; position: absolute; inset: -9px; border-radius: 50%; z-index: 0;
  background: conic-gradient(from var(--ring-angle, 0deg), var(--primary), #a78bfa, #f472b6, #38bdf8, var(--primary));
  animation: ringSpin 6s linear infinite;
}
body .up-avatar-wrap > * { position: relative; z-index: 1; }
@property --ring-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes ringSpin { to { --ring-angle: 360deg; } }
body .up-name { letter-spacing: -.03em; color: var(--ink); }
body .up-stat { border-radius: 16px; border: 1px solid var(--line); background: #f8fafd; transition: transform .2s, box-shadow .2s; }
body .up-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
body .up-follow-btn { border-radius: 999px; }
body .campaign-card { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s; }
body .campaign-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

/* ---------- Contact ---------- */
body .contact-info-card, body .layout-sidebar-right .content-box { border-radius: 22px; }

@media (max-width: 768px) {
  .ex-toolbar { flex-direction: column; align-items: stretch; margin-top: -22px; top: calc(60px + env(safe-area-inset-top, 0px)); }
  .ex-toolbar form { width: 100%; }
  .ex-toolbar form select { width: 100%; }
  body .lb-hero + section > .container { margin-top: -70px; }
}
@media (prefers-reduced-motion: reduce) {
  body .page-hero::after, body .blog-hero::after, body .lb-hero::after, body .hero.hero-sm::after, body .up-hero::after,
  body .lb-podium-medal, body .up-avatar-wrap::before { animation: none !important; }
}

/* ==========================================================================
   Accessibility: WCAG AA text contrast (≥ 4.5:1) — from Lighthouse audit Dec 2026
   ========================================================================== */
body {
  --gray-400: #5f6774;           /* was #9ca3af (2.5:1 on white) — used as text across the site */
  --muted: #596577;              /* ≥ 5.3:1 on white, gray-50 and gray-100 */
  --primary-ink: color-mix(in srgb, var(--primary) 82%, black);
}
.text-muted, .section-header p, .hp-moments-note, .ex-result-count { color: var(--muted) !important; }
.eyebrow, .section-header .eyebrow, .badge-primary, .blog-card-cat, .hp-blog-card-cat, .article-cat-badge,
.sidebar-cat-item span, .tip-title, .card-badge .badge-primary, .hp-moment-countdown:not(.is-today) {
  color: var(--primary-ink) !important;
}
.breadcrumb span:last-child, .breadcrumb [aria-current="page"] { color: var(--muted); }
body .page-hero .breadcrumb span:last-child { color: #fff; }
.blog-tag-chip span, .blog-cat-pill span { opacity: 1 !important; }
.blog-tag-chip span { color: var(--muted); }

/* Footer on dark background */
.footer .footer-links a { color: #b4bccb; }
.footer .footer-links a:hover { color: #fff; }
.footer .footer-bottom p { opacity: 1 !important; color: #a3adbd; }
.footer .footer-bottom p a { color: #c7cfdc !important; }

/* Brand share button: WhatsApp green darkened for white text */
a[href^="https://api.whatsapp.com"][style*="25d366"], a[href^="https://api.whatsapp.com"].btn-success { background: #0b7a3e !important; }

/* Heading tags changed for document outline; keep their previous look */
.footer-links h2 { font-size: .95rem; font-weight: 700; margin-bottom: 16px; color: #fff; letter-spacing: 0; }
#toc-header h2 { font-size: .95rem; margin: 0; display: flex; align-items: center; gap: 8px; letter-spacing: 0; }
.related-card-body h3 { font-size: .92rem; line-height: 1.4; margin: 0 0 6px; letter-spacing: -.005em; }
.tools-feature h3 { font-size: 1.05rem; margin: 12px 0 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Contrast follow-ups (Lighthouse re-run) */
.footer { --gray-400: #a3adbd; --gray-500: #a3adbd; }   /* the darkened text tokens are for light backgrounds only */
.footer .footer-brand p { color: #b4bccb; }
.breadcrumb span { color: var(--muted); }
.ccv2-pill strong, .ccv2-pill span { color: #166534 !important; }
a[href*="facebook.com/sharer"] { background-color: #1460d4 !important; }
body .breadcrumb span, body nav.breadcrumb span { color: var(--muted) !important; } body .page-hero .breadcrumb span { color: rgba(226,232,240,.8) !important; } body .page-hero .breadcrumb span:last-child { color: #fff !important; }
body .breadcrumb span { opacity: 1; } body .breadcrumb > span:not(:last-child) { color: var(--muted); }

/* ==========================================================================
   Article images: never crop meaningfully (featured images are ~1200x630, often with text)
   ========================================================================== */
/* Single article: show the whole image at its natural ratio */
body .article-featured-img { width: 100%; height: auto !important; max-height: none !important; object-fit: contain; background: var(--surface); }

/* Listings: same 1200:630 frame as the images themselves */
body .blog-featured-img, body .blog-featured-img-placeholder,
body .blog-card-img, body .blog-card-img-placeholder,
body .related-card img {
  width: 100%; height: auto !important; aspect-ratio: 1200 / 630; object-fit: cover; object-position: center;
}
body .hp-blog-card-media { aspect-ratio: 1200 / 630; }
body .sidebar-recent-img, body .sidebar-recent-img-placeholder { width: 88px !important; height: auto !important; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
body .blog-featured { align-items: center; background: var(--surface); }

/* ==========================================================================
   Twibbon images: show the whole frame (some frames are portrait ID cards etc.)
   ========================================================================== */
body .card-img-wrap img,
body .campaign-frame-preview img,
body .marquee-gallery-item img,
body .hp-hero-card img,
body .hp-cta-visual img,
body .card-thumb img,
body .hp-demo-compare img {
  object-fit: contain !important;
  background: radial-gradient(circle at 50% 40%, #ffffff, #eef2f8);
}
body .hp-hero-card img, body .hp-cta-visual img { background: rgba(255, 255, 255, .92); }
body .card:hover .card-img-wrap img { transform: scale(1.03); }
body .article-meta-name a, body .author-bio-name a { color: var(--ink); text-decoration: none; }
body .article-meta-name a:hover, body .author-bio-name a:hover { color: var(--primary); }
body .author-bio-handle { font-size: .8rem; color: var(--muted); margin: -2px 0 6px; }

/* ==========================================================================
   Twibbon studio (campaign editor, 3 steps)
   ========================================================================== */
body .tw-studio { border-radius: 24px; border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.tw-studio .tw-only-1, .tw-studio .tw-only-2, .tw-studio .tw-only-3 { display: none; }
.tw-studio[data-step="1"] .tw-only-1, .tw-studio[data-step="2"] .tw-only-2, .tw-studio[data-step="3"] .tw-only-3 { display: block; }
.tw-studio[data-step="1"] .editor-v2-upload.tw-only-1 { display: flex; }

.tw-studio-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, var(--surface-2));
}
.tw-studio-head h2 { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; margin: 0; letter-spacing: -.02em; }
.tw-steps { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; counter-reset: none; }
.tw-steps li {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--line);
  transition: background .3s, color .3s, border-color .3s;
}
.tw-steps li span {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem;
  background: var(--surface-2); color: var(--muted); transition: background .3s, color .3s;
}
.tw-steps li.is-active { color: var(--primary-ink); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); background: var(--primary-light); }
.tw-steps li.is-active span { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.tw-steps li.is-done span { background: #16a34a; color: transparent; position: relative; }
.tw-steps li.is-done span::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: .75rem; }

.tw-studio-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 26px; padding: 22px; align-items: start; }
.tw-stage { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
body .tw-studio .editor-v2-canvas-wrap { max-width: 560px; width: 100%; margin: 0 auto; border-radius: 20px; box-shadow: var(--shadow-lg); }

/* Step 1 upload bar */
body .tw-studio .editor-v2-upload {
  align-items: center; gap: 14px; width: 100%; max-width: 560px; margin: 0 auto; padding: 14px 18px; cursor: pointer;
  border: 2px dashed color-mix(in srgb, var(--primary) 35%, var(--line)); border-radius: 16px; background: var(--primary-light);
  text-align: left; transition: border-color .2s, background .2s, transform .2s var(--ease-out);
}
body .tw-studio .editor-v2-upload:hover, body .tw-studio .editor-v2-upload.dragover { border-color: var(--primary); transform: translateY(-1px); }
.tw-upload-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; color: #fff; background: var(--primary); box-shadow: var(--shadow-primary); }
.tw-upload-text { display: flex; flex-direction: column; line-height: 1.3; }
.tw-upload-text strong { color: var(--ink); font-size: 1rem; }
.tw-upload-text small { color: var(--muted); font-size: .78rem; }

/* Toolbar */
.tw-toolbar { width: 100%; max-width: 560px; margin: 0 auto; display: grid; gap: 10px; }
.tw-toolbar.hidden { display: none; }
.tw-zoom { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.tw-zoom .ctrl-slider { flex: 1; accent-color: var(--primary); }
.tw-zoom .ctrl-val { min-width: 44px; text-align: right; font-weight: 800; font-size: .82rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.tw-tool-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.tw-tool {
  height: 46px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.tw-tool:hover { background: var(--primary-light); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); }
.tw-tool:active { transform: scale(.94); }
.tw-more { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: var(--surface); }
.tw-more summary { cursor: pointer; font-size: .82rem; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 6px; list-style: none; }
.tw-more summary::-webkit-details-marker { display: none; }
.tw-more[open] summary { margin-bottom: 10px; color: var(--ink); }
.tw-more .ctrl-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tw-more .ctrl-slider { flex: 1; accent-color: var(--primary); }

/* Side panels */
.tw-side { min-width: 0; }
.tw-panel { animation: twPanelIn .45s var(--ease-out) both; }
@keyframes twPanelIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tw-panel-step { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-ink); background: var(--primary-light); padding: 4px 10px; border-radius: 999px; }
.tw-done-badge { color: #166534; background: #dcfce7; }
.tw-panel h3 { font-size: 1.35rem; margin: 10px 0 6px; letter-spacing: -.025em; }
.tw-panel > p { color: var(--muted); margin: 0 0 16px; line-height: 1.6; }
.tw-panel .btn-block { width: 100%; justify-content: center; }
.tw-panel .btn + .btn { margin-top: 10px; }
.tw-primary { padding-block: 14px !important; font-size: 1rem !important; }
.tw-tips { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.tw-tips li { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--ink-soft); }
.tw-tips svg { color: #16a34a; flex-shrink: 0; }
.tw-gesture { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: .86rem; }
.tw-label { display: block; font-weight: 700; font-size: .84rem; color: var(--ink); margin: 4px 0 6px; }
.tw-panel .form-control { margin-bottom: 0; }
.tw-panel .form-hint { margin-bottom: 14px; }
.tw-note { font-size: .76rem; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }
.tw-after-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tw-after-actions .btn { flex: 1 1 auto; }
.tw-panel .btn + .tw-after-actions .btn, .tw-after-actions .btn + .btn { margin-top: 0; }
.tw-invite { margin-top: 18px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.tw-invite strong { display: block; font-size: .86rem; color: var(--ink); margin-bottom: 8px; }
.tw-invite-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tw-invite-row .btn { flex: 1; justify-content: center; }
.tw-panel #saveSuccess { margin-top: 12px; }

/* Secondary drawer */
.tw-extra { border-top: 1px solid var(--line); }
.tw-extra summary { cursor: pointer; padding: 14px 22px; font-weight: 700; font-size: .88rem; color: var(--muted); display: flex; align-items: center; gap: 8px; list-style: none; }
.tw-extra summary::-webkit-details-marker { display: none; }
.tw-extra summary::after { content: '+'; margin-left: auto; font-size: 1.2rem; color: var(--primary); transition: transform .25s var(--ease-out); }
.tw-extra[open] summary::after { transform: rotate(45deg); }
.tw-extra-body { padding: 0 22px 20px; display: grid; gap: 18px; }
.tw-report { background: none; border: 0; padding: 0; font-size: .78rem; color: var(--muted); cursor: pointer; text-decoration: underline; justify-self: start; display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 860px) {
  .tw-studio-grid { grid-template-columns: 1fr; padding: 16px; gap: 18px; }
  .tw-studio-head { padding: 14px 16px; }
  .tw-steps li { font-size: 0; padding: 4px; gap: 0; }
  .tw-steps li.is-active { font-size: .74rem; padding: 4px 10px 4px 4px; gap: 6px; }
  /* Keep the main action reachable on phones */
  .tw-studio[data-step="2"] #btnDownload,
  .tw-studio[data-step="3"] #btnShareImage:not([hidden]) {
    position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 15;
    box-shadow: 0 16px 32px -12px color-mix(in srgb, var(--primary) 75%, transparent);
  }
  .tw-studio[data-step="1"] .editor-v2-upload.tw-only-1 { display: none; } /* phones: the big button is enough, drag & drop is a desktop thing */
  .tw-extra summary { padding: 14px 16px; }
  .tw-extra-body { padding: 0 16px 16px; }
}
@media (prefers-reduced-motion: reduce) { .tw-panel { animation: none; } }

/* ==========================================================================
   Campaign page: compact header + "Tentang twibbon ini"
   ========================================================================== */
.cp-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center;
  padding: 20px 22px; margin-bottom: 18px; border-radius: 24px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.cp-head-thumb img {
  width: 120px; height: 120px; border-radius: 20px; object-fit: contain; display: block;
  background: radial-gradient(circle at 50% 40%, #fff, #eef2f8); border: 1px solid var(--line); box-shadow: var(--shadow-md);
}
.cp-head-main { min-width: 0; }
.cp-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.cp-badges .badge { font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; font-weight: 800; }
.cp-head h1 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); line-height: 1.18; letter-spacing: -.03em; margin: 0 0 10px; color: var(--ink); }
.cp-creator { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.cp-creator-link { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: inherit; }
.cp-creator-link img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); }
.cp-creator-link span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.cp-creator-link strong { font-size: .9rem; color: var(--ink); }
.cp-creator-link small { font-size: .76rem; color: var(--muted); }
.cp-creator-link:hover strong { color: var(--primary); }
.cp-follow {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  font: 700 .8rem var(--font); color: #fff; background: var(--primary); border: 1px solid var(--primary);
  transition: background .2s, color .2s, transform .15s;
}
.cp-follow:hover { transform: translateY(-1px); }
.cp-follow.is-following { background: var(--surface); color: var(--primary-ink); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.cp-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; font-size: .8rem; color: var(--muted); }
.cp-stats li { display: inline-flex; align-items: center; gap: 5px; }
.cp-stats strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.cp-stats svg { color: var(--primary); }
.cp-head-actions { display: flex; flex-direction: column; gap: 8px; align-self: start; }
.cp-head-actions .btn { justify-content: center; white-space: nowrap; }
.cp-wa { background: #0b7a3e !important; color: #fff !important; border: 0; }

.cp-about h2 { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; margin: 0 0 12px; letter-spacing: -.02em; }
.cp-desc { position: relative; max-height: 9.5em; overflow: hidden; color: var(--ink-soft); line-height: 1.7; }
.cp-desc::after { content: ''; position: absolute; inset: auto 0 0 0; height: 3em; background: linear-gradient(transparent, var(--surface)); pointer-events: none; }
.cp-desc.is-open { max-height: none; }
.cp-desc.is-open::after { display: none; }
.cp-desc p { margin: 0; }
.cp-desc-toggle { margin-top: 6px; background: none; border: 0; padding: 0; color: var(--primary); font-weight: 700; cursor: pointer; }
.cp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.cp-tag { padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: var(--primary-ink); background: var(--primary-light); transition: background .2s, transform .15s; }
.cp-tag:hover { background: color-mix(in srgb, var(--primary) 18%, white); transform: translateY(-1px); }
.cp-caption { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--surface-2); }
.cp-caption-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.cp-caption-head strong { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: .9rem; }
.cp-caption textarea { resize: none; font-size: .86rem; line-height: 1.55; background: var(--surface); }

@media (max-width: 760px) {
  .cp-head { grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 14px; border-radius: 20px; }
  .cp-head-thumb img { width: 72px; height: 72px; border-radius: 14px; }
  .cp-head h1 { font-size: 1.2rem; margin-bottom: 8px; }
  .cp-head-actions { grid-column: 1 / -1; flex-direction: row; }
  .cp-head-actions .btn { flex: 1; }
  .cp-hide-sm { display: none; }
  .cp-stats { font-size: .76rem; gap: 4px 10px; }
}
.cp-creator { flex-wrap: nowrap; }
.cp-creator-link { flex: 1 1 auto; }
.cp-creator-link span { overflow: hidden; }
.cp-creator-link strong, .cp-creator-link small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-follow { flex-shrink: 0; }
.cp-creator-link small span { display: inline; overflow: visible; }
.cp-facts { margin-top: 16px; color: var(--ink-soft); line-height: 1.7; font-size: .95rem; }
.cp-facts p { margin: 0 0 14px; }
.cp-facts a { color: var(--primary); font-weight: 700; }
.cp-facts h3 { font-size: 1.02rem; margin: 0 0 8px; color: var(--ink); letter-spacing: -.01em; }
.cp-facts ol { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 4px; }
.cp-facts ol li::marker { color: var(--primary); font-weight: 800; }
.cp-facts-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cp-facts-list li { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; }
.cp-facts-list span { font-size: .72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.cp-facts-list strong { font-size: .86rem; color: var(--ink); }
@media (max-width: 520px) { .cp-facts-list { grid-template-columns: 1fr; } }

/* Campaign description guidance (create / edit twibbon) */
.tw-desc-help { font-size: .82rem; color: var(--muted); margin: -2px 0 8px; line-height: 1.55; }
.tw-desc-meter { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.tw-desc-bar { flex: 1 1 120px; height: 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.tw-desc-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: #f59e0b; transition: width .3s var(--ease-out), background .3s; }
.tw-desc-bar span[data-level="ok"] { background: #eab308; }
.tw-desc-bar span[data-level="good"] { background: #16a34a; }
.tw-desc-example { background: none; border: 1px dashed color-mix(in srgb, var(--primary) 40%, var(--line)); color: var(--primary); font-weight: 700; font-size: .76rem; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.tw-desc-example:hover { background: var(--primary-light); }
.footer .footer-credit { font-weight: 700; text-decoration: none; border-bottom: 1px dashed currentColor; } .footer .footer-credit:hover { color: #fff !important; border-bottom-style: solid; }

/* Frame variants (create / edit twibbon) */
.tw-variant-list { display: grid; gap: 10px; margin-bottom: 10px; }
.tw-variant-item { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.tw-variant-item img, .tw-variant-thumb { width: 72px; height: 72px; border-radius: 12px; object-fit: contain; flex-shrink: 0; background: radial-gradient(circle at 50% 40%, #fff, #e8edf5); border: 1px solid var(--line); }
.tw-variant-thumb { display: grid; place-items: center; font-size: .72rem; font-weight: 800; color: var(--muted); }
.tw-variant-fields { flex: 1; min-width: 0; display: grid; gap: 6px; }
.tw-variant-fields input[type="file"] { font-size: .8rem; max-width: 100%; }
.tw-variant-delete { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: #b91c1c; font-weight: 600; cursor: pointer; }
.tw-variant-remove { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 1.2rem; cursor: pointer; flex-shrink: 0; }
.tw-variant-remove:hover { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
#variantSlotsHint { margin-left: 8px; }

/* Design picker (campaign studio) */
.tw-designs { width: 100%; max-width: 560px; margin: 0 auto; }
.tw-designs-label { display: flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.tw-designs-label small { font-weight: 600; color: var(--muted); }
.tw-designs-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.tw-design {
  flex: 0 0 auto; width: 86px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px;
  border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer;
  transition: border-color .2s, transform .2s var(--ease-out), box-shadow .2s;
}
.tw-design img { width: 64px; height: 64px; object-fit: contain; border-radius: 10px; background: radial-gradient(circle at 50% 40%, #fff, #e8edf5); }
.tw-design span { font-size: .72rem; font-weight: 700; color: var(--ink-soft); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-design:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.tw-design.is-active { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.tw-design.is-active span { color: var(--primary-ink); }
