/* ==========================================================================
   HOMEPAGE v2 — أدوات AI بالعربي (preview only)
   Same section architecture and visual language as the reference homepage
   (dark navy, teal + gold accents, Tajawal, 18px radius, 1060px wrap),
   filled with OUR content only. Loads after redesign.css / theme.css /
   branding.css. Do NOT deploy without Ahmed's approval.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap');

/* Mobile-overflow fix: the preview CSS stack had no border-box reset, so any
   explicit width + padding (toolbar select, search input) overflowed its
   container on narrow screens. Also never let the page scroll sideways. */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }

:root {
  --hp-bg: #070b16;
  --hp-bg2: #0b1122;
  --hp-card: #0e1630;
  --hp-card2: #111b3a;
  --hp-line: #1b2745;
  --hp-line2: #2b3c66;
  --hp-text: #f0f4fb;
  --hp-muted: #9db0ce;
  --hp-muted2: #c9d4e8;
  --hp-teal: #2dd4bf;
  --hp-teal2: #0d9488;
  --hp-gold: #fbbf24;
  --hp-gold2: #f59e0b;
  --hp-shadow: 0 18px 44px rgba(2, 6, 18, .45);
  --hp-r: 18px;
}
html[data-theme="light"] {
  --hp-bg: #f4f6fb;
  --hp-bg2: #eaeefb;
  --hp-card: #ffffff;
  --hp-card2: #f3f6ff;
  --hp-line: #dfe6f3;
  --hp-line2: #c9d4ea;
  --hp-text: #16213a;
  --hp-muted: #56678a;
  --hp-muted2: #3c4e6e;
  --hp-teal: #0d9488;
  --hp-teal2: #0f766e;
  --hp-gold: #b45309;
  --hp-gold2: #92400e;
  --hp-shadow: 0 14px 34px rgba(23, 35, 66, .10);
}

body { font-family: 'Tajawal', 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif; background: var(--hp-bg); color: var(--hp-text); line-height: 1.8; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
a { color: var(--hp-teal); }
img { max-width: 100%; }

/* ---------- Hero: radial gradients + dotted pattern, centered ------------ */
header.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 84px 0 70px;
  color: #f2f6ff;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(45, 212, 191, .20), transparent 60%),
    radial-gradient(760px 420px at 10% 110%, rgba(251, 191, 36, .13), transparent 55%),
    linear-gradient(160deg, #0a1230 0%, #0b1f3f 48%, #0a1230 100%);
}
header.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
header.hero .wrap { position: relative; z-index: 1; }
.hero-logo { display: block; width: 120px; height: 120px; margin: 0 auto 18px; filter: drop-shadow(0 0 26px rgba(251, 191, 36, .35)); }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22);
  color: #fde68a; font-size: .86rem; font-weight: 700;
  padding: 8px 20px; border-radius: 999px; backdrop-filter: blur(6px); margin-bottom: 24px;
}
header.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); font-weight: 800; line-height: 1.35; margin: 0 0 18px; color: #f2f6ff; }
header.hero h1 .gold-grad {
  background: linear-gradient(90deg, var(--hp-gold), #fde68a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
header.hero .hero-lead { font-size: 1.14rem; max-width: 640px; margin: 0 auto; color: rgba(232, 240, 255, .85); }
.hero-search { max-width: 560px; margin: 30px auto 0; display: flex; align-items: center; gap: 8px; background: var(--hp-card); border: 2px solid var(--hp-text); border-radius: 18px; padding: 6px; box-shadow: 5px 5px 0 var(--hp-text); }
.hero-search svg { width: 24px; height: 24px; color: var(--hp-muted); margin-inline-start: 10px; flex: none; }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.05rem; font-weight: 700; color: var(--hp-text); padding: 12px 4px; outline: 0; }
.hero-search input::placeholder { color: var(--hp-muted); }
.hero-search button { border: 0; background: var(--hp-teal); color: #04201c; font: inherit; font-weight: 800; border-radius: 12px; min-height: 48px; padding: 0 22px; cursor: pointer; }
.hero-try { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; align-items: center; justify-content: center; }
.hero-try span { color: var(--hp-muted); font-weight: 700; font-size: .9rem; }
.hero-try a { border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .07); border-radius: 999px; padding: 4px 14px; font-weight: 700; font-size: .92rem; color: #f2f6ff; text-decoration: none; }
.hero-try a:hover { border-color: var(--hp-teal); color: var(--hp-teal); }
.hero-stats { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.hero-stats .stat { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px; padding: 14px 26px; backdrop-filter: blur(10px); min-width: 130px; }
.hero-stats .stat b { display: block; font-size: 1.9rem; font-weight: 800; color: #fff; line-height: 1.3; }
.hero-stats .stat b i { font-style: normal; color: var(--hp-gold); }
.hero-stats .stat small { color: rgba(226, 236, 255, .72); font-size: .88rem; }
header.hero .channel { margin-top: 28px; }
.hero-chips { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.hero-chips span { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); color: rgba(232, 240, 255, .85); border-radius: 999px; padding: 6px 14px; font-size: .88rem; font-weight: 700; }
html[data-theme="light"] header.hero {
  background:
    radial-gradient(900px 380px at 85% -10%, rgba(13, 148, 136, .16), transparent 60%),
    radial-gradient(760px 380px at 10% 110%, rgba(180, 83, 9, .14), transparent 55%),
    linear-gradient(180deg, #fffbeb 0%, #f4f6fb 100%);
  color: var(--hp-text);
  border-bottom: 1px solid var(--hp-line);
}
html[data-theme="light"] header.hero::after { background-image: radial-gradient(rgba(22, 33, 58, .08) 1px, transparent 1px); }
html[data-theme="light"] header.hero h1 { color: var(--hp-text); }
html[data-theme="light"] header.hero .hero-lead { color: var(--hp-muted); }
html[data-theme="light"] .hero-eyebrow { background: #fefce8; border-color: #eab308; color: #854d0e; }
html[data-theme="light"] .hero-search { background: #fff; border-color: var(--hp-text); }
html[data-theme="light"] .hero-try a { background: #fff; border-color: var(--hp-line2); color: var(--hp-text); }
html[data-theme="light"] .hero-stats .stat { background: rgba(255, 255, 255, .8); border-color: var(--hp-line); }
html[data-theme="light"] .hero-stats .stat b { color: var(--hp-text); }
html[data-theme="light"] .hero-stats .stat small { color: var(--hp-muted); }
html[data-theme="light"] .hero-chips span { background: #fff; border-color: var(--hp-line); color: var(--hp-muted); }

/* ---------- Live prices ticker (under nav) -------------------------------- */
.hp-strip { background: var(--hp-card); border-bottom: 1px solid var(--hp-line); overflow: hidden; }
.hp-strip .pt { display: flex; width: max-content; padding: 8px 0; animation: hp-marquee 60s linear infinite; }
.hp-strip.hold .pt { animation-play-state: paused; }
@keyframes hp-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.hp-strip .pg { display: flex; gap: 8px; padding-inline-end: 8px; }
.hp-strip a { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 8px 14px; min-height: 38px; border-radius: 12px; background: var(--hp-bg2); border: 1px solid var(--hp-line2); text-decoration: none; color: var(--hp-muted); font-size: .85rem; font-weight: 600; white-space: nowrap; }
.hp-strip a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--hp-teal); opacity: .75; }
.hp-strip a.gold::before { background: var(--hp-gold); }
.hp-strip a b { color: var(--hp-text); font-size: .95rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.hp-strip a .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hp-teal); animation: hp-pulse 1.8s infinite; }
@keyframes hp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .hp-strip .pt { animation-duration: 180s; } }

/* ---------- Section scaffolding ------------------------------------------- */
.hp-sec { padding: 30px 0 2px; }
.hp-sh { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.hp-sh h2 { font-size: clamp(1.6rem, 5vw, 2.3rem); margin: 0; font-weight: 800; line-height: 1.25; color: var(--hp-text); }
.hp-more { color: var(--hp-teal); font-weight: 800; font-size: .95rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.hp-more:hover { text-decoration: underline; }
.section-title { font-size: clamp(1.5rem, 4.5vw, 2.1rem); font-weight: 800; margin: 36px 0 6px; display: flex; align-items: center; gap: 12px; color: var(--hp-text); }
.section-title::before { content: ""; width: 6px; height: 1.1em; border-radius: 3px; background: var(--hp-teal); flex: none; }
.section-title::after { display: none; }
.section-sub { color: var(--hp-muted); margin-bottom: 14px; }
.hp-ic { width: 1.3em; height: 1.3em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }

/* Grid items must be allowed to shrink below their min-content, or a long
   unbreakable word in one tile can force its whole grid wider than the phone. */
.hp-bento > *, .hp-cats > *, .grid > *, .hp-acards > *,
.hp-picks .pgrid > *, .hp-frow > *, .hp-list a > * { min-width: 0; }

/* ---------- Bento: الأكثر استخدامًا --------------------------------------- */
.hp-bento { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.hp-tile { position: relative; background: var(--hp-card); box-shadow: var(--hp-shadow); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; min-height: 158px; overflow: hidden; transition: transform .18s; color: var(--hp-text); text-decoration: none; }
.hp-tile:hover { transform: translateY(-3px); }
.hp-tile .ico { width: 46px; height: 46px; border-radius: 15px; background: var(--hp-bg2); display: grid; place-items: center; margin-bottom: 16px; color: var(--hp-teal); }
.hp-tile .ico .hp-ic { width: 24px; height: 24px; }
.hp-tile b { font-size: 1.15rem; line-height: 1.3; display: block; }
.hp-tile small { display: block; color: var(--hp-muted); font-size: .88rem; margin-top: 2px; line-height: 1.5; }
.hp-tile .go { position: absolute; inset-inline-end: 14px; top: 14px; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; opacity: .55; }
.hp-tile .go .hp-ic { width: 15px; height: 15px; }
.hp-tag { display: inline-block; font-size: .75rem; font-weight: 800; background: rgba(0, 0, 0, .14); border-radius: 6px; padding: 0 8px; margin-bottom: 8px; color: var(--hp-gold); }
.hp-tile.big { grid-column: 1 / -1; background: linear-gradient(150deg, var(--hp-gold), var(--hp-gold2)); color: #241703; min-height: 190px; }
.hp-tile.big .ico { background: rgba(0, 0, 0, .1); color: #241703; }
.hp-tile.big small { color: rgba(36, 23, 3, .75); }
.hp-tile.big b { font-size: clamp(1.6rem, 7vw, 2.4rem); }
.hp-tile.big .hp-tag { color: #241703; }
@media (min-width: 900px) {
  .hp-bento { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .hp-tile.big { grid-column: span 2; grid-row: span 2; }
}

/* ---------- Categories ----------------------------------------------------- */
.hp-cats { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.hp-cat { background: var(--hp-card); border-radius: 18px; box-shadow: var(--hp-shadow); padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 150px; color: var(--hp-text); text-decoration: none; }
.hp-cat:hover { box-shadow: 0 0 0 1.5px var(--hp-teal); }
.hp-cat .d { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.hp-cat .d .hp-ic { width: 22px; height: 22px; }
.hp-cat b { font-size: 1.1rem; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hp-cat b em { font-style: normal; font-size: .78rem; color: var(--hp-muted); background: var(--hp-bg); border-radius: 999px; padding: 0 9px; font-weight: 700; }
.hp-cat span { color: var(--hp-muted); font-size: .85rem; line-height: 1.6; }
.hp-cat.k1 .d { color: #2dd4bf; background: rgba(45, 212, 191, .14); }
.hp-cat.k2 .d { color: #fbbf24; background: rgba(251, 191, 36, .14); }
.hp-cat.k3 .d { color: #a78bfa; background: rgba(167, 139, 250, .14); }
.hp-cat.k4 .d { color: #38bdf8; background: rgba(56, 189, 248, .14); }
.hp-cat.k5 .d { color: #f472b6; background: rgba(244, 114, 182, .14); }
.hp-cat.k6 .d { color: #4ade80; background: rgba(74, 222, 128, .14); }
.hp-cat.k7 .d { color: #fb923c; background: rgba(251, 146, 60, .14); }
.hp-cat.k8 .d { color: #fb7185; background: rgba(251, 113, 133, .14); }
@media (min-width: 900px) { .hp-cats { grid-template-columns: repeat(4, 1fr); gap: 14px; } .hp-cat { min-height: 158px; } }

/* ---------- Two-col: latest tools + prices/dates --------------------------- */
.hp-two { display: grid; gap: 26px; }
@media (min-width: 900px) { .hp-two { grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; } }
.hp-rows { background: var(--hp-card); border-radius: 18px; box-shadow: var(--hp-shadow); overflow: hidden; }
.hp-rows a, .hp-rows .row { display: flex; gap: 12px; align-items: center; padding: 14px; border-bottom: 1px solid var(--hp-line); color: var(--hp-text); text-decoration: none; }
.hp-rows a:last-child, .hp-rows .row:last-child { border-bottom: 0; }
.hp-rows a:hover { background: var(--hp-card2); }
.hp-rows .d { width: 40px; height: 40px; border-radius: 50%; background: rgba(45, 212, 191, .15); display: grid; place-items: center; color: var(--hp-teal); flex: none; }
.hp-rows .d .hp-ic { width: 20px; height: 20px; }
.hp-rows .d.gold { background: rgba(251, 191, 36, .15); color: var(--hp-gold); }
.hp-rows b { display: block; font-size: 1rem; line-height: 1.35; }
.hp-rows small { color: var(--hp-muted); font-size: .85rem; }
.hp-rows .val { margin-inline-start: auto; font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--hp-teal); }
.hp-rows .val.gold { color: var(--hp-gold); }
.hp-rows .val small { font-size: .8rem; color: var(--hp-muted); font-weight: 700; }
.hp-rows .ch { margin-inline-start: auto; color: var(--hp-muted); }
.hp-rows .tag { margin-inline-start: auto; font-size: .75rem; font-weight: 800; background: rgba(251, 191, 36, .18); color: var(--hp-gold); border-radius: 6px; padding: 1px 8px; flex: none; }
.hp-note { color: var(--hp-muted); font-size: .82rem; margin-top: 10px; }

/* ---------- Numbered list: guides & comparisons ---------------------------- */
.hp-list { border-top: 2px solid var(--hp-text); }
.hp-list a { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--hp-line); color: var(--hp-text); text-decoration: none; counter-increment: hp-g; }
.hp-list { counter-reset: hp-g; }
.hp-list a::before { content: counter(hp-g, decimal-leading-zero); font-size: 1.5rem; font-weight: 800; color: var(--hp-teal); font-variant-numeric: tabular-nums; direction: ltr; text-align: start; }
.hp-list b { font-size: 1.05rem; line-height: 1.35; display: block; }
.hp-list small { color: var(--hp-muted); font-size: .88rem; }
.hp-list a:hover b { color: var(--hp-teal); }
@media (min-width: 900px) { .hp-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 34px; } }

/* ---------- Steps + globally popular (fcards) ------------------------------- */
.hp-frow { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .hp-frow { grid-template-columns: repeat(3, 1fr); } }
.hp-fcard { background: var(--hp-card); border-radius: 18px; box-shadow: var(--hp-shadow); padding: 18px; display: flex; gap: 12px; align-items: flex-start; color: var(--hp-text); text-decoration: none; }
.hp-fcard:hover { box-shadow: 0 0 0 1.5px var(--hp-teal); }
.hp-fcard .ticon { width: 44px; height: 44px; border-radius: 50%; background: rgba(45, 212, 191, .14); color: var(--hp-teal); display: grid; place-items: center; flex: none; }
.hp-fcard .ticon .hp-ic { width: 22px; height: 22px; }
.hp-fcard b { display: block; font-size: 1.02rem; line-height: 1.4; }
.hp-fcard small { color: var(--hp-muted); font-size: .88rem; line-height: 1.55; display: block; margin-top: 2px; }

/* ---------- Picks of the week ------------------------------------------------ */
.hp-picks .pgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.hp-pcard { background: var(--hp-card); border-radius: 18px; box-shadow: var(--hp-shadow); padding: 18px; display: block; color: var(--hp-text); text-decoration: none; }
.hp-pcard:hover { transform: translateY(-3px); }
.hp-pcard .pi { width: 44px; height: 44px; border-radius: 14px; background: var(--hp-bg2); color: var(--hp-teal); display: grid; place-items: center; margin-bottom: 12px; }
.hp-pcard .pi .hp-ic { width: 22px; height: 22px; }
.hp-pcard b { font-size: 1.1rem; display: block; }
.hp-pcard span { color: var(--hp-muted); font-size: .9rem; line-height: 1.55; display: block; margin-top: 2px; }
.hp-pcard em { font-style: normal; color: var(--hp-teal); font-weight: 800; font-size: .9rem; display: block; margin-top: 10px; }

/* ---------- All tools: toolbar + grid (reuse site card styles) -------------- */
.hp-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 18px 0 6px; }
.hp-toolbar .chip { min-height: 44px; }
.hp-toolbar select { background: var(--hp-card); border: 1px solid var(--hp-line2); color: var(--hp-text); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: .95rem; min-height: 44px; margin-inline-start: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin: 18px 0 30px; }
.card { background: var(--hp-card); border: 1px solid var(--hp-line); border-radius: var(--hp-r); padding: 22px; display: flex; flex-direction: column; box-shadow: var(--hp-shadow); }
.card:hover { border-color: var(--hp-gold); }
.card h2 { font-size: 1.3rem; margin-bottom: 6px; color: var(--hp-text); }
.card p { color: var(--hp-muted2); font-size: .98rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 6px; }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; background: var(--hp-bg2); color: var(--hp-muted2); border: 1px solid var(--hp-line2); border-radius: 999px; padding: 2px 10px; }
.rating { color: #fde68a; font-size: .92rem; margin: 4px 0 2px; }
html[data-theme="light"] .rating { color: #92400e; }
.ratings-note { color: var(--hp-muted); font-size: .9rem; text-align: center; margin: 4px 0 24px; }
.badge { display: inline-block; font-size: .8rem; font-weight: 700; background: var(--hp-gold); color: #111827; border-radius: 999px; padding: 3px 10px; margin-bottom: 10px; }
.badge.direct { background: var(--hp-bg2); color: var(--hp-muted2); border: 1px solid var(--hp-line2); }
.badge.new { background: linear-gradient(180deg, #fde047, var(--hp-gold)); color: #111827; border: 1px solid var(--hp-gold); }
.btn { display: block; text-align: center; margin-top: 14px; background: var(--hp-teal); color: #04201c; text-decoration: none; font-weight: 800; padding: 12px; border-radius: 12px; }
.btn:hover { filter: brightness(1.08); }
.btn.gold { background: var(--hp-gold); color: #111827; }
.btn.ghost { background: transparent; border: 1px solid var(--hp-line2); color: var(--hp-text); }

/* ---------- Article cards (text-first; site images are generic/shared) ------ */
.hp-acards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin: 18px 0 30px; }
.hp-acard { background: var(--hp-card); border: 1px solid var(--hp-line); border-radius: var(--hp-r); box-shadow: var(--hp-shadow); padding: 20px; display: flex; flex-direction: column; color: var(--hp-text); text-decoration: none; }
.hp-acard:hover { border-color: var(--hp-gold); transform: translateY(-2px); }
.hp-acard .chip { align-self: flex-start; font-size: .78rem; font-weight: 800; background: var(--hp-bg2); color: var(--hp-teal); border: 1px solid var(--hp-line2); border-radius: 999px; padding: 2px 10px; margin-bottom: 10px; }
.hp-acard h3 { font-size: 1.12rem; line-height: 1.5; margin: 0 0 6px; }
.hp-acard p { color: var(--hp-muted); font-size: .93rem; flex: 1; }
.hp-acard .more { color: var(--hp-teal); font-weight: 800; font-size: .92rem; margin-top: 12px; }

/* ---------- Muse offer (content byte-identical to live) ---------------------- */
.muse-section { margin: 8px 0 30px; }
.muse-section .card { max-width: 560px; margin: 0 auto; }
.muse-section .card.featured { border: 2px solid var(--hp-gold); background: linear-gradient(180deg, rgba(251, 191, 36, .10), var(--hp-card)); }
.card ul { margin: 12px 0; padding-right: 18px; color: var(--hp-muted2); font-size: .95rem; }
.codebox { margin-top: 12px; background: var(--hp-bg); border: 1px dashed var(--hp-gold); border-radius: 12px; padding: 12px; text-align: center; }
.codebox b { font-size: 1.4rem; letter-spacing: 2px; color: var(--hp-gold); }
.codebox button { margin-top: 8px; background: var(--hp-gold); border: none; color: #111827; font-weight: 700; padding: 8px 16px; border-radius: 999px; cursor: pointer; font: inherit; min-height: 44px; }
.steps { font-size: .92rem; color: var(--hp-muted); margin-top: 12px; }
.ad-slot { margin: 24px 0; min-height: 0; }

/* ---------- About / follow / newsletter --------------------------------------- */
.hp-about p { color: var(--hp-muted); max-width: 720px; }
.hp-about p b { color: var(--hp-text); }
.hp-cta { background: linear-gradient(150deg, var(--hp-card), var(--hp-card2)); border-radius: 20px; box-shadow: var(--hp-shadow); padding: 28px; text-align: center; margin: 36px 0 8px; }
.hp-cta h2 { font-size: 1.6rem; margin: 0 0 8px; }
.hp-cta p { color: var(--hp-muted); max-width: 560px; margin: 0 auto 18px; }
.hp-cta .channel { display: inline-block; background: #ff0000; color: #fff; font-weight: 800; padding: 12px 26px; border-radius: 999px; text-decoration: none; }
.hp-follow { background: var(--hp-card); border: 1px solid var(--hp-line); border-radius: 20px; padding: 26px; text-align: center; margin: 24px 0 36px; }
.hp-follow h2 { font-size: 1.4rem; margin: 0 0 6px; }
.hp-follow p { color: var(--hp-muted); max-width: 560px; margin: 0 auto 16px; }
.hp-follow .cta-main { display: inline-block; background: linear-gradient(135deg, var(--hp-teal), var(--hp-teal2)); color: #04201c; font-weight: 800; font-size: 1.02rem; padding: 13px 32px; border-radius: 999px; text-decoration: none; }

/* ---------- Footer (reuse site footer) ---------------------------------------- */
footer { border-top: 1px solid var(--hp-line); padding: 40px 0 44px; background: var(--hp-bg2); color: var(--hp-muted); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; margin-bottom: 26px; }
.foot-col h3 { font-size: 1rem; font-weight: 800; color: var(--hp-text); margin-bottom: 12px; }
.foot-col nav { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.foot-col nav a { color: var(--hp-muted); text-decoration: none; font-size: .95rem; margin: 0; }
.foot-col nav a:hover { color: var(--hp-gold); }
.foot-bottom { border-top: 1px solid var(--hp-line); padding-top: 20px; }
.foot-bottom p { margin-bottom: 8px; font-size: .9rem; }

/* ---------- Mobile ------------------------------------------------------------ */
@media (max-width: 900px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  header.hero { padding: 56px 0 48px; }
  .hero-logo { width: 96px; height: 96px; }
  .hero-search button { padding: 0 14px; }
  /* Stats: 3 cards must fit one row on a 390px phone. The old
     min-width:130px + 26px side padding made two cards 378px wide in a
     350px container, pushing the page sideways. */
  .hero-stats { gap: 10px; }
  .hero-stats .stat { min-width: 0; flex: 1 1 30%; padding: 12px 10px; }
  .hero-stats .stat b { font-size: 1.6rem; }
  .hp-bento { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
  .hp-toolbar select { margin-inline-start: 0; width: 100%; }
  .foot-grid { grid-template-columns: 1fr; gap: 22px; }
  .hp-strip .pt { animation-duration: 90s; }
}
@media (max-width: 380px) {
  header.hero h1 { font-size: 1.8rem; }
  .hp-tile { min-height: 140px; padding: 14px; }
  .hp-tile b { font-size: 1rem; }
}
