/* ==========================================================================
   CatPTC — Design System
   Palette per platform report:
     bg        #f5f7fb   primary gradient #f97316 -> #ea580c
     text      #172033   success #10b981   error #ef4444
   Fonts: Inter, Segoe UI
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #f5f7fb;
  --bg-alt: #eef1f8;
  --surface: #ffffff;
  --border: #e3e8f2;
  --border-strong: #d3daea;

  --text: #172033;
  --text-soft: #5a667f;
  --text-muted: #7c8798;

  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-soft: #fff3e8;
  --grad: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  --grad-soft: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);

  --success: #10b981;
  --success-soft: #e7f8f2;
  --error: #ef4444;
  --error-soft: #fdecec;
  --info: #3b82f6;
  --info-soft: #e8f1fe;
  --warn: #f59e0b;
  --warn-soft: #fef5e4;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(23, 32, 51, .05);
  --shadow-sm: 0 2px 8px rgba(23, 32, 51, .06);
  --shadow: 0 6px 20px rgba(23, 32, 51, .08);
  --shadow-lg: 0 16px 44px rgba(23, 32, 51, .12);
  --shadow-glow: 0 10px 26px rgba(249, 115, 22, .30);

  --nav-h: 68px;
  --maxw: 1200px;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, h5 { margin: 0 0 .6em; line-height: 1.22; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.35rem); }
h2 { font-size: clamp(1.5rem, 2.7vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 3px solid rgba(249, 115, 22, .45); outline-offset: 2px; }

/* ---------- 3. Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 860px; }
.section { padding: 72px 0; }
.section-sm { padding: 44px 0; }
.section-head { max-width: 680px; margin: 0 auto 42px; text-align: center; }
.section-head p { color: var(--text-muted); font-size: 1.03rem; margin: 0; }
.section-head.left { margin-left: 0; text-align: left; }

.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 46px; align-items: center; }

.center { text-align: center; }
.hidden { display: none !important; }
.mt0 { margin-top: 0; }
.mb24 { margin-bottom: 24px; }
.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.tiny { font-size: .82rem; }
.nowrap { white-space: nowrap; }

/* ---------- 4. Typography accents ---------- */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--primary-dark);
}

/* ---------- 5. Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 900;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.16rem; letter-spacing: -.03em; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad); color: #fff;
  display: grid; place-items: center;
  font-size: 1.15rem; font-weight: 900;
  box-shadow: var(--shadow-glow);
}
.nav-links { display: flex; align-items: center; gap: 3px; margin-left: 8px; flex-wrap: wrap; }
.nav-links a {
  padding: 8px 12px; border-radius: var(--radius-pill);
  font-size: .9rem; font-weight: 600; color: var(--text-soft);
  transition: background .18s, color .18s;
}
.nav-links a:hover { background: var(--bg-alt); color: var(--text); }
.nav-links a.active { background: var(--primary-soft); color: var(--primary-dark); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.icon-btn {
  position: relative;
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; font-size: 1.05rem;
  transition: transform .18s, box-shadow .18s;
}
.icon-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.icon-btn .dot {
  position: absolute; top: 7px; right: 8px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--error); border: 2px solid #fff;
}
.icon-btn.ring { animation: bellRing 1s ease-in-out 1; }
@keyframes bellRing {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-13deg); }
  40% { transform: rotate(11deg); }
  60% { transform: rotate(-7deg); }
  80% { transform: rotate(4deg); }
}

.nav-toggle {
  display: none; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 1.2rem; line-height: 1;
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-pill);
  border: 1px solid transparent; background: var(--bg-alt); color: var(--text);
  font-size: .93rem; font-weight: 700; white-space: nowrap;
  transition: transform .16s, box-shadow .16s, background .16s, opacity .16s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { box-shadow: 0 14px 30px rgba(249, 115, 22, .38); }
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--text-soft); }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--error); color: #fff; }
.btn-sm { padding: 8px 15px; font-size: .84rem; }
.btn-lg { padding: 15px 32px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
/* Compact glyph used only when a button's text label is hidden on small screens. */
.lbl-sm { display: none; }

/* ---------- 7. Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}
.card-hover { transition: transform .2s, box-shadow .2s, border-color .2s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.card-pad0 { padding: 0; overflow: hidden; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.card-head h3 { margin: 0; font-size: 1.05rem; }
.card-body { padding: 24px; }

.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-sm);
}
.stat .k { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--text-muted); }
.stat .v { font-size: 1.75rem; font-weight: 900; letter-spacing: -.03em; margin: 4px 0 2px; }
.stat .d { font-size: .84rem; color: var(--text-muted); }
.stat.accent { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--shadow-glow); }
.stat.accent .k, .stat.accent .d { color: rgba(255, 255, 255, .82); }

/* ---------- 8. Badges & pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: .76rem; font-weight: 800; letter-spacing: .02em;
  background: var(--bg-alt); color: var(--text-soft);
}
.badge-primary { background: var(--primary-soft); color: var(--primary-dark); }
.badge-success { background: var(--success-soft); color: #047857; }
.badge-info { background: var(--info-soft); color: #1d4ed8; }
.badge-error { background: var(--error-soft); color: #b91c1c; }
.badge-warn { background: var(--warn-soft); color: #b45309; }
.pill-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border);
  font-size: .82rem; font-weight: 700; color: var(--text-soft);
  box-shadow: var(--shadow-xs);
}
.pill-badge .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, .6);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .6); }
  70% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ---------- 9. Forms ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block; margin-bottom: 6px;
  font-size: .85rem; font-weight: 700; color: var(--text-soft);
}
.input, .select, .textarea {
  width: 100%; padding: 11px 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: .93rem; font-family: inherit;
  transition: border-color .16s, box-shadow .16s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, .13);
}
.textarea { min-height: 120px; resize: vertical; }
.hint { font-size: .78rem; color: var(--text-muted); margin-top: 5px; }
.err { font-size: .78rem; color: var(--error); margin-top: 5px; font-weight: 600; }
.input.invalid, .select.invalid, .textarea.invalid { border-color: var(--error); box-shadow: 0 0 0 4px rgba(239, 68, 68, .1); }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }

/* Grid and flex children default to min-width:auto, so a wide intrinsic child
   (a <select> whose longest <option> is a long label, a long unbroken address,
   a table) would widen the whole page on a phone instead of shrinking. These
   two rules let every track and control shrink below its content width. */
.grid > *, .form-row > *, .dash > *, .card > *, .field > * { min-width: 0; }
.input, .select, .textarea, select, input, textarea { min-width: 0; max-width: 100%; }

.callout {
  padding: 14px 16px; border-radius: var(--radius-sm);
  border-left: 4px solid var(--info); background: var(--info-soft);
  font-size: .88rem; color: #1e3a8a;
}
.callout.warn { border-color: var(--warn); background: var(--warn-soft); color: #92400e; }
.callout.success { border-color: var(--success); background: var(--success-soft); color: #065f46; }
.callout.error { border-color: var(--error); background: var(--error-soft); color: #991b1b; }

/* ---------- 10. Tables ---------- */
.table-wrap { overflow-x: auto; min-width: 0; max-width: 100%; }
.table th, .table td {
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--border); font-size: .89rem;
}
.table th {
  font-size: .75rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-muted); background: var(--bg);
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfe; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------- 11. Hero ---------- */
.hero { position: relative; padding: 66px 0 78px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 620px;
  background: radial-gradient(ellipse at 68% 32%, rgba(249, 115, 22, .13), transparent 62%),
              radial-gradient(ellipse at 14% 18%, rgba(59, 130, 246, .09), transparent 58%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-copy p.lead { font-size: 1.08rem; color: var(--text-soft); max-width: 52ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 22px; }
.hero-trust { display: flex; gap: 22px; flex-wrap: wrap; font-size: .84rem; color: var(--text-muted); }
.hero-trust b { color: var(--text); }

.hero-art { position: relative; }
.hero-art img {
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ---------- 12. Live transaction feed ---------- */
.ticker {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.ticker-head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-bottom: 1px solid var(--border);
  font-size: .8rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .09em; color: var(--text-muted);
}
.ticker-track {
  display: flex; gap: 40px; padding: 14px 18px;
  white-space: nowrap; animation: roll 46s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes roll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.tick-item { display: inline-flex; align-items: center; gap: 11px; font-size: .86rem; }
.tick-av {
  position: relative; width: 32px; height: 32px; flex: none; border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1d4ed8;
  display: grid; place-items: center; font-size: .7rem; font-weight: 800;
}
.tick-av.f { background: linear-gradient(135deg, #fce7f3, #fbcfe8); color: #be185d; }
.tick-gender {
  position: absolute; right: -3px; bottom: -3px; width: 15px; height: 15px;
  border-radius: 50%; display: grid; place-items: center; line-height: 1;
  font-size: .58rem; color: #fff; background: var(--info);
  border: 2px solid var(--surface);
}
.tick-av.f .tick-gender { background: #ec4899; }
.tick-body { display: flex; flex-direction: column; line-height: 1.35; }
.tick-who { display: inline-flex; align-items: center; gap: 6px; }
.tick-flag {
  width: 19px; height: 13px; border-radius: 2px; object-fit: cover; flex: none;
  box-shadow: 0 0 0 1px rgba(23, 32, 51, .1);
}
.tick-flag-em { font-size: .9rem; line-height: 1; }
.tick-country { font-size: .71rem; color: var(--text-muted); }
.tick-what { font-size: .78rem; color: var(--text-soft); }
.tick-what b { color: var(--text); font-variant-numeric: tabular-nums; }
.tick-age { color: var(--text-muted); }
.tick-item b { font-variant-numeric: tabular-nums; }

/* ---------- 13. Our Community — 84 countries ---------- */
.community {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: 28px 22px;
}
.community::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 14% 16%, rgba(249, 115, 22, .10), transparent 58%),
              radial-gradient(ellipse at 86% 84%, rgba(59, 130, 246, .08), transparent 58%);
}
.community-grid {
  position: relative;
  display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 10px;
}
.cb {
  position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; cursor: default;
  transform: scale(var(--s, 1));
  box-shadow: 0 4px 14px rgba(23, 32, 51, .14);
  animation: bubbleFloat 9s ease-in-out infinite;
  transition: box-shadow .25s;
}
.cb-flag { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.cb-em { font-size: 1.15rem; line-height: 1; }
.cb-count {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 900; letter-spacing: -.02em; color: #fff;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .6);
  background: linear-gradient(180deg, rgba(9, 18, 32, .12), rgba(9, 18, 32, .58));
}
.cb:hover { transform: scale(calc(var(--s, 1) * 1.16)); z-index: 5; box-shadow: var(--shadow-lg); }
.cb:hover .cb-tip { opacity: 1; transform: translate(-50%, -7px); }
.cb-tip {
  position: absolute; left: 50%; bottom: calc(100% + 9px);
  transform: translate(-50%, 0); opacity: 0; pointer-events: none;
  transition: opacity .18s, transform .18s; z-index: 8;
  background: #172033; color: #fff; white-space: nowrap;
  font-size: .72rem; font-weight: 600; padding: 6px 11px; border-radius: 8px;
}
.cb-tip b { color: #fdba74; }
/* The float must COMPOSE with each bubble's sizing scale — a plain
   translateY would replace the scale entirely and every bubble would
   render the same size. */
@keyframes bubbleFloat {
  0%, 100% { transform: scale(var(--s, 1)) translateY(0); }
  50% { transform: scale(var(--s, 1)) translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .cb { animation: none; transform: scale(var(--s, 1)); }
}

/* ---------- 14. Plans ---------- */
.plan {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(249, 115, 22, .4); }
.plan.featured { border-color: var(--primary); box-shadow: var(--shadow-glow); }
.plan.featured::after {
  content: "Most Popular"; position: absolute; top: -13px; left: 24px;
  background: var(--grad); color: #fff; font-size: .7rem; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 13px; border-radius: var(--radius-pill);
}
.plan-tier { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.plan-dot {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-size: 1rem;
  background: var(--grad-soft); color: var(--primary-dark);
}
.plan-tier h3 { margin: 0; font-size: 1.12rem; }
.plan-amount { font-size: 2rem; font-weight: 900; letter-spacing: -.04em; }
.plan-amount span { font-size: .95rem; font-weight: 700; color: var(--text-muted); }
.plan-meta { list-style: none; padding: 0; margin: 18px 0 22px; }
.plan-meta li {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-bottom: 1px dashed var(--border);
  font-size: .88rem;
}
.plan-meta li:last-child { border-bottom: 0; }
.plan-meta .k { color: var(--text-muted); }
.plan-meta .v { font-weight: 700; }
.plan .btn { margin-top: auto; }

/* ---------- 15. Offer cards ---------- */
.offer {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow-xs);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.offer:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.offer-ic {
  width: 52px; height: 52px; flex: none; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.5rem;
  background: var(--grad-soft);
}
.offer-main { flex: 1; min-width: 0; }
.offer-main h4 { margin: 0 0 3px; font-size: 1rem; }
.offer-main .meta { font-size: .82rem; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.offer-reward { text-align: right; flex: none; }
.offer-reward .amt { font-size: 1.28rem; font-weight: 900; color: var(--success); font-variant-numeric: tabular-nums; }
.offer-reward .tm { font-size: .78rem; color: var(--text-muted); }
.offer.done { opacity: .72; }
.offer.done .offer-reward .amt { color: var(--info); }

/* ---------- 16. Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 1200;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(23, 32, 51, .5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.modal.open { display: flex; }
.modal-box {
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 28px;
  animation: fadeUp .28s ease both;
}
.modal-box.wide { max-width: 720px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.modal-head h3 { margin: 0; }
.modal-close {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 1.15rem; line-height: 1;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 17. Timer ---------- */
.timer-ring {
  position: relative; width: 132px; height: 132px; margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: grid; place-items: center;
  animation: pulseGlow 2s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, .34); }
  50% { box-shadow: 0 0 0 18px rgba(249, 115, 22, 0); }
}
.timer-ring .num { font-size: 2.3rem; font-weight: 900; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.timer-ring .lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); font-weight: 800; }
.progress { height: 10px; border-radius: var(--radius-pill); background: var(--bg-alt); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: inherit; transition: width .35s linear; }

/* ---------- 18. Toast ---------- */
.toast-host {
  position: fixed; right: 20px; bottom: 20px; z-index: 1400;
  display: flex; flex-direction: column; gap: 10px; max-width: 350px;
}
.toast {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm); padding: 13px 16px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease both;
  font-size: .89rem;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }
.toast.info { border-left-color: var(--info); }
.toast b { display: block; margin-bottom: 2px; }
.toast .ic { font-size: 1.05rem; line-height: 1.4; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ---------- 19. Notification panel ---------- */
.notif-panel {
  position: fixed; top: calc(var(--nav-h) + 10px); right: 20px; z-index: 1100;
  width: 372px; max-width: calc(100vw - 32px);
  max-height: 74vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  display: none;
  animation: fadeUp .22s ease both;
}
.notif-panel.open { display: block; }
.notif-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 15px 18px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.notif-head h4 { margin: 0; font-size: .98rem; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li { padding: 13px 18px; border-bottom: 1px solid var(--border); font-size: .87rem; display: flex; gap: 11px; }
.notif-list li:last-child { border-bottom: 0; }
.notif-list li.unread { background: #fffaf5; }
.notif-list .n-ic { font-size: 1rem; line-height: 1.5; }
.notif-list .n-time { display: block; font-size: .75rem; color: var(--text-muted); margin-top: 3px; }

/* ---------- 20. Avatars / misc UI ---------- */
.av {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--grad-soft); color: var(--primary-dark);
  display: grid; place-items: center; font-weight: 800; font-size: .86rem;
  border: 2px solid var(--surface);
}
.av-lg { width: 58px; height: 58px; font-size: 1.15rem; }
.list-clean { list-style: none; margin: 0; padding: 0; }
.list-clean li { padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.list-clean li:last-child { border-bottom: 0; }

.empty { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty .ic { font-size: 2.2rem; margin-bottom: 8px; opacity: .55; }

.copy-row { display: flex; gap: 10px; }
.copy-row .input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .84rem; }

.stepper { display: grid; gap: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: s; }
.step { position: relative; padding-top: 46px; }
.step::before {
  counter-increment: s; content: counter(s);
  position: absolute; top: 0; left: 0;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 900;
  box-shadow: var(--shadow-glow);
}
.step h4 { margin: 0 0 6px; font-size: 1rem; }
.step p { margin: 0; font-size: .88rem; color: var(--text-muted); }

/* ---------- 21. FAQ ---------- */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 12px; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0;
  padding: 17px 20px; font-size: .97rem; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.faq-q .ar { transition: transform .22s; color: var(--text-muted); flex: none; }
.faq-item.open .faq-q .ar { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a > div { padding: 0 20px 18px; color: var(--text-soft); font-size: .91rem; }

/* ---------- 22. Global member testimonials ("What Our Members Say") ---------- */
.tst-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.tst-card { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 24px 22px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s; }
.tst-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-strong); }

.tst-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tst-stars { color: #f59e0b; letter-spacing: 2px; font-size: 1rem; line-height: 1; }
.tst-stars .off { color: #d8dee9; }
.tst-verified { display: inline-flex; align-items: center; gap: 5px; font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #047857; background: var(--success-soft); border: 1px solid rgba(16, 185, 129, .25); padding: 3px 9px; border-radius: var(--radius-pill); white-space: nowrap; }

.tst-text { margin: 0; flex: 1; font-size: .93rem; line-height: 1.72; color: var(--text-soft); overflow-wrap: anywhere; }
.tst-text[dir="rtl"] { text-align: right; font-size: 1rem; line-height: 1.95; font-family: "Noto Naskh Arabic", "Segoe UI", Tahoma, Arial, sans-serif; }
.tst-text[lang="zh"] { font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif; line-height: 1.85; }
.tst-text[lang="bn"] { font-size: .95rem; line-height: 1.8; font-family: "Noto Sans Bengali", "Nirmala UI", "Vrinda", "Segoe UI", sans-serif; }
.tst-text[lang="hi"] { font-size: .95rem; line-height: 1.8; font-family: "Noto Sans Devanagari", "Nirmala UI", "Mangal", "Segoe UI", sans-serif; }

.tst-who { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); }
.tst-av { position: relative; width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--grad-soft); border: 2px solid var(--surface); box-shadow: var(--shadow-xs); }
.tst-av .tst-init { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: .95rem; color: var(--primary-dark); letter-spacing: -.02em; }
.tst-av img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.tst-gender { position: absolute; right: -3px; bottom: -3px; z-index: 2; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .68rem; line-height: 1; color: #fff; border: 2px solid var(--surface); box-shadow: var(--shadow-xs); }
.tst-gender.m { background: #3b82f6; }
.tst-gender.f { background: #ec4899; }

.tst-meta { min-width: 0; flex: 1; }
.tst-name { display: flex; align-items: center; gap: 7px; font-size: .93rem; font-weight: 800; color: var(--text); line-height: 1.35; }
.tst-name > span:first-child { overflow-wrap: anywhere; }
.tst-flag { width: 22px; height: 16px; flex: none; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px var(--border); display: inline-block; background: var(--bg-alt); }
.tst-flag-em { font-size: .95rem; line-height: 1; flex: none; }
.tst-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; font-size: .79rem; color: var(--text-muted); }
.tst-lang { font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; background: var(--bg-alt); color: var(--text-soft); padding: 2px 8px; border-radius: var(--radius-pill); white-space: nowrap; }

@media (max-width: 1024px) {
  .tst-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 760px) {
  .tst-grid { grid-template-columns: 1fr; gap: 16px; max-width: 100%; }
  .tst-card { padding: 22px 20px 18px; }
  .tst-av { width: 44px; height: 44px; }
}

/* ---------- 23. Tabs ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab {
  padding: 11px 17px; border: 0; background: none;
  font-size: .9rem; font-weight: 700; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .16s, border-color .16s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary-dark); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .26s ease both; }

/* ---------- 24. Auth ---------- */
.auth-shell { min-height: calc(100vh - var(--nav-h)); display: grid; grid-template-columns: 1fr 1fr; }
.auth-art {
  background: var(--grad); color: #fff; padding: 56px 48px;
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
  position: relative; overflow: hidden;
}
.auth-art::after {
  content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%;
  background: rgba(255, 255, 255, .1); right: -160px; bottom: -190px;
}
.auth-art h2 { color: #fff; font-size: 2rem; }
.auth-art ul { list-style: none; padding: 0; display: grid; gap: 12px; position: relative; }
.auth-art li { display: flex; gap: 11px; align-items: flex-start; font-size: .95rem; }
.auth-art .tick {
  width: 24px; height: 24px; flex: none; border-radius: 50%;
  background: rgba(255, 255, 255, .24); display: grid; place-items: center; font-size: .72rem;
}
.auth-form-side { display: grid; place-items: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 440px; }

/* ---------- 25. Dashboard shell ---------- */
.dash { display: grid; grid-template-columns: 246px minmax(0, 1fr); gap: 26px; align-items: start; padding: 30px 0 70px; }
/* A bare `1fr` track resolves its minimum to `auto` (min-content). The live
   ticker track is a few thousand px of animated content, so without an
   explicit `minmax(0, 1fr)` that min-content propagates up and the whole
   dashboard column inflates to the ticker's full strip width. */
main { min-width: 0; }
.side {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm);
  position: sticky; top: calc(var(--nav-h) + 20px);
}
.side nav { display: grid; gap: 3px; }
.side nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 13px; border-radius: var(--radius-sm);
  font-size: .89rem; font-weight: 600; color: var(--text-soft);
  transition: background .16s, color .16s;
}
.side nav a:hover { background: var(--bg-alt); color: var(--text); }
.side nav a.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 800; }
.side-sep { height: 1px; background: var(--border); margin: 12px 4px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0; }
.page-head p { margin: 5px 0 0; color: var(--text-muted); font-size: .93rem; }

/* ---------- 26. Footer ---------- */
.footer { background: #101827; color: #b9c2d0; padding: 56px 0 26px; margin-top: 40px; }
.footer h4 { color: #fff; font-size: .93rem; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 14px; }
.footer a { color: #b9c2d0; font-size: .89rem; transition: color .16s; }
.footer a:hover { color: var(--primary); }
.footer ul { list-style: none; padding: 0; display: grid; gap: 9px; margin: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; }
.footer .brand, .footer .brand span { color: #fff; }
.footer-note {
  margin-top: 38px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .82rem; color: #8d99ab;
}
.footer .socials { display: flex; gap: 9px; }
.footer .socials a {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255, 255, 255, .08); display: grid; place-items: center;
}
.footer .socials a:hover { background: var(--primary); }

/* Footer deposit-address panel ------------------------------------------- */
.foot-wallets { margin-top: 34px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); }
.foot-wallets h4 { color: #fff; font-size: .86rem; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 8px; }
.fw-lead { font-size: .8rem; color: #8d99ab; margin: 0 0 15px; max-width: 76ch; line-height: 1.55; }
.fw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fw-item {
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 12px; padding: 11px 13px; min-width: 0;
}
.fw-head { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: #fff; }
.fw-head .c-ic { width: 21px; height: 21px; font-size: .64rem; }
.fw-net { display: block; font-size: .71rem; color: #8d99ab; margin: 3px 0 8px; }
.fw-adr { display: flex; align-items: flex-start; gap: 8px; }
.fw-adr code {
  flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .71rem; line-height: 1.5; color: #cfd8e6; word-break: break-all;
}
.fw-copy {
  flex: none; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .07);
  color: #dbe3ee; font: inherit; font-size: .7rem; font-weight: 700; letter-spacing: .02em;
  padding: 4px 9px; border-radius: 7px; cursor: pointer; transition: background .16s, border-color .16s;
}
.fw-copy:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.fw-copy.done { background: #16a34a; border-color: #16a34a; color: #fff; }

/* ---------- 27. Coin chips ---------- */
.coin { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: .87rem; }
.coin .c-ic {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: .66rem; font-weight: 900; color: #fff;
}
.c-btc { background: #f7931a; }
.c-eth { background: #627eea; }
.c-ltc { background: #345d9d; }
.c-doge { background: #c2a633; }
.c-usdt { background: #26a17b; }

/* ---------- 28. Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 29. Responsive ---------- */
@media (max-width: 1024px) {
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash > * { min-width: 0; }
  .side { position: static; min-width: 0; }
  .side nav { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; min-width: 0; }
  .side nav a { white-space: nowrap; }
  .side-sep { display: none; }
  .stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); padding: 12px 16px 18px;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .nav-links.open a { padding: 11px 13px; }
  .nav-toggle { display: grid; place-items: center; }
  /* The header labels are dropped on small screens to keep the bar inside the
     viewport, so each icon-only button must carry a visible glyph of its own —
     otherwise it collapses to an empty white pill. */
  .nav-right .btn .lbl-sm, .nav-right [data-logout] .lbl-sm { display: inline; }
  .nav-right .btn span.lbl { display: none; }
  .nav-right .btn { padding: 10px 14px; }
  /* The header would otherwise be ~500px wide on a 390px phone: every
     authenticated page carries its own Logout in the sidebar, so the header
     copy is redundant and is dropped to keep the bar inside the viewport. */
  .nav-right [data-logout] { display: none; }
  .nav-inner { gap: 10px; min-width: 0; }
  .nav-inner .brand span:last-child { display: none; }
  .nav-right { gap: 7px; min-width: 0; }

  .section { padding: 48px 0; }
  .hero { padding: 40px 0 52px; }
  .g3, .g4, .g5, .g2 { grid-template-columns: minmax(0, 1fr); }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .auth-art { padding: 36px 24px; }
  .stepper { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .community { padding: 22px 14px; }
  .community-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
  .tick-item { gap: 9px; font-size: .8rem; }
  .toast-host { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  .notif-panel { left: 12px; right: 12px; width: auto; }
  .offer { flex-wrap: wrap; }
  .offer-reward { text-align: left; }
  .modal-box { padding: 22px; }
  .page-head { align-items: flex-start; }
  .copy-row { flex-direction: column; }
}

@media (max-width: 480px) {
  .community-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cb-count { font-size: .72rem; }
  .timer-ring { width: 116px; height: 116px; }
  .stat .v { font-size: 1.5rem; }
}

/* ---------- 30. Print ---------- */
@media print {
  .nav, .footer, .toast-host, .notif-panel, .modal { display: none !important; }
  body { background: #fff; }
}
