/* Emoji Picker Hub — blog. Brand violet + one bright colour per topic; emoji shown as "stickers". */
:root {
  --b-bg: #fbfaff;
  --b-card: #ffffff;
  --b-text: #1e1b4b;
  --b-muted: #5b5a7a;
  --b-line: #e7e5f5;
  --b-brand: #6366f1;
  --b-brand-ink: #4f46e5;
  --b-shadow: 0 1px 2px rgba(30, 27, 75, .06), 0 8px 24px rgba(30, 27, 75, .07);
  --b-head: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --b-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  /* topic colour (overridden per page / card): c = bright fill, deep = dark fill with white text */
  --c: #8b8ff8;
  --deep: #4f46e5;
}
[data-theme="dark"] {
  --b-bg: #0f1020;
  --b-card: #181a2e;
  --b-text: #eef0ff;
  --b-muted: #a3a6c2;
  --b-line: #2a2d48;
  --b-brand-ink: #a5b4fc;
  --b-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
}
.t-trends    { --c: #ff8a2a; --deep: #c2410c; }
.t-tiktok    { --c: #ff4f9a; --deep: #be185d; }
.t-aesthetic { --c: #c99bff; --deep: #7e22ce; }
.t-discord   { --c: #8b9bff; --deep: #3b4fd8; }
.t-kaomoji   { --c: #38d9f5; --deep: #0e7490; }
.t-instagram { --c: #ff6b86; --deep: #c81e4a; }
.t-tips      { --c: #3fe0c5; --deep: #0f766e; }
.t-guide     { --c: #ffc94d; --deep: #b45309; }
/* text colour of the topic: dark shade on light pages, bright shade on dark pages (declared where the topic is set) */
body.blog, body.blog [class*="t-"] { --ink: var(--deep); }
[data-theme="dark"] body.blog, [data-theme="dark"] body.blog [class*="t-"] { --ink: var(--c); }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.blog {
  margin: 0; background: var(--b-bg); color: var(--b-text);
  font-family: var(--b-body); line-height: 1.7; -webkit-text-size-adjust: 100%;
}
body.blog a { color: var(--ink); }
body.blog :focus-visible { outline: 3px solid var(--b-brand); outline-offset: 2px; border-radius: 6px; }

/* ---------- header ---------- */
.bh { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--b-card) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--b-line); }
.bh-in { max-width: 1160px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.bh-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--b-text) !important; flex: none; }
.bh-logo img { width: 38px; height: 38px; border-radius: 50%; }
.bh-logo span { font-family: var(--b-head); font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.bh-nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.bh-nav::-webkit-scrollbar { display: none; }
.bh-nav a { white-space: nowrap; text-decoration: none; color: var(--b-muted) !important; font-size: .92rem; font-weight: 500;
  padding: 7px 12px; border-radius: 999px; }
.bh-nav a:hover { color: var(--b-text) !important; background: color-mix(in srgb, var(--b-brand) 10%, transparent); }
.bh-nav a[aria-current] { color: #fff !important; background: var(--b-brand); }
.bh-theme { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--b-line); background: var(--b-card);
  font-size: 18px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.bh-theme:hover { border-color: var(--b-brand); }
@media (max-width: 760px) {
  .bh-in { flex-wrap: wrap; gap: 8px 12px; padding: 8px 14px; }
  .bh-logo span { font-size: 1.02rem; }
  .bh-theme { margin-left: auto; width: 36px; height: 36px; }
  .bh-nav { order: 3; width: 100%; margin: 0 -4px; }
  .bh-nav a { padding: 6px 10px; font-size: .86rem; }
}

/* ---------- sticker ---------- */
.stk { display: inline-block; line-height: 1; transform: rotate(-8deg);
  filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff)
          drop-shadow(0 10px 14px rgba(20, 10, 60, .28)); }
.stk.txt { font-family: var(--b-body); font-weight: 700; color: #1e1b4b; letter-spacing: -.02em; white-space: nowrap; }

/* ---------- blog index ---------- */
.bi { max-width: 1160px; margin: 0 auto; padding: 40px 20px 20px; }
.bi-top { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.bi h1 { font-family: var(--b-head); font-weight: 800; font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1; letter-spacing: -.03em; margin: 0; }
.bi-sub { color: var(--b-muted); font-size: 1.08rem; margin: 10px 0 0; max-width: 46ch; }
.bi-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.bi-chip { border: 1px solid var(--b-line); background: var(--b-card); color: var(--b-text); border-radius: 999px;
  padding: 7px 14px 7px 10px; font: 500 .9rem var(--b-body); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.bi-chip::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.bi-chip.all::before { background: conic-gradient(#ff8a2a, #ff4f9a, #c99bff, #8b9bff, #38d9f5, #3fe0c5, #ffc94d, #ff8a2a); }
.bi-chip[aria-pressed="true"] { background: var(--b-text); color: var(--b-bg); border-color: var(--b-text); }

.feat { display: grid; grid-template-columns: 1.1fr 1fr; border-radius: 24px; overflow: hidden; text-decoration: none;
  background: var(--deep); color: #fff !important; margin-bottom: 28px; box-shadow: var(--b-shadow); }
.feat .cover { min-height: 300px; }
.feat .cover .stk { font-size: 128px; }
.feat-body { padding: 34px 36px; display: flex; flex-direction: column; justify-content: center; }
.feat-flag { align-self: flex-start; background: #fff; color: var(--deep); font-weight: 700; font-size: .8rem;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; }
.feat h2 { font-family: var(--b-head); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 12px; }
.feat p { margin: 0 0 16px; color: rgba(255,255,255,.88); font-size: 1.02rem; }
.feat .meta { color: rgba(255,255,255,.75); }
.feat:hover h2 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.cover { position: relative; display: grid; place-items: center; background: var(--c); overflow: hidden; isolation: isolate; }
.cover::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: radial-gradient(rgba(255,255,255,.9) 1.5px, transparent 1.6px); background-size: 18px 18px; }
.cover::after { content: ''; position: absolute; z-index: -1; width: 62%; aspect-ratio: 1; border-radius: 50%;
  background: color-mix(in srgb, #fff 34%, var(--c)); }

.bgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.bcard { background: var(--b-card); border: 1px solid var(--b-line); border-radius: 20px; overflow: hidden; box-shadow: var(--b-shadow); }
.bcard[hidden] { display: none; }
.bcard a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--b-text) !important; }
.bcard .cover { height: 168px; }
.bcard .cover .stk { font-size: 76px; }
.bcard .cover .stk.txt { font-size: 40px; }
.bcard-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.badge { align-self: flex-start; font-size: .78rem; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--c) 18%, transparent);
  padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.bcard h2, .bcard h3 { font-family: var(--b-head); font-weight: 700; font-size: 1.22rem; line-height: 1.25; letter-spacing: -.01em; margin: 0 0 8px; }
.bcard p { color: var(--b-muted); margin: 0 0 14px; font-size: .95rem; line-height: 1.55; flex: 1; }
.meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--b-muted); }
.bcard:hover { border-color: var(--c); }
.bcard:hover h2, .bcard:hover h3 { color: var(--ink); }
@media (max-width: 980px) { .bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .bi { padding-top: 26px; }
  .feat { grid-template-columns: 1fr; border-radius: 20px; }
  .feat .cover { min-height: 180px; }
  .feat .cover .stk { font-size: 96px; }
  .feat-body { padding: 22px 20px 24px; }
  .bgrid { grid-template-columns: 1fr; gap: 16px; }
  .bcard .cover { height: 140px; }
}

/* ---------- post ---------- */
.ph { background: var(--deep); color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.ph::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .16;
  background-image: radial-gradient(#fff 1.5px, transparent 1.6px); background-size: 22px 22px; }
.ph-in { max-width: 1160px; margin: 0 auto; padding: 34px 20px 46px; display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 30px; align-items: center; }
.ph .crumbs { font-size: .88rem; color: rgba(255,255,255,.78); margin-bottom: 18px; }
.ph .crumbs a { color: #fff !important; text-decoration: none; font-weight: 600; }
.ph .crumbs a:hover { text-decoration: underline; }
.ph .badge { background: #fff; color: var(--deep); }
.ph h1 { font-family: var(--b-head); font-weight: 800; font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.06;
  letter-spacing: -.025em; margin: 6px 0 16px; max-width: 20ch; color: #fff; }
.ph .meta { color: rgba(255,255,255,.82); font-size: .95rem; }
.ph-art { position: relative; display: grid; place-items: center; aspect-ratio: 1; }
.ph-art::before { content: ''; position: absolute; inset: 6%; border-radius: 50%; background: var(--c); }
.ph-art .stk { position: relative; font-size: 150px; }
.ph-art .stk.txt { font-size: 64px; }
@media (max-width: 860px) {
  .ph-in { grid-template-columns: 1fr; padding: 24px 18px 30px; gap: 0; }
  .ph-art { order: -1; width: 150px; justify-self: start; margin: -4px 0 8px -6px; }
  .ph-art .stk { font-size: 84px; }
  .ph-art .stk.txt { font-size: 34px; }
  .ph h1 { max-width: none; }
}

.pl { max-width: 1160px; margin: 0 auto; padding: 40px 20px 10px; display: grid; grid-template-columns: minmax(0, 720px) 250px;
  gap: 56px; justify-content: center; align-items: start; }
.toc { position: sticky; top: 84px; border: 1px solid var(--b-line); border-radius: 16px; background: var(--b-card); padding: 6px 16px 14px; }
.toc summary { cursor: pointer; font-weight: 700; padding: 10px 0; list-style: none; display: flex; justify-content: space-between; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: '▾'; color: var(--b-muted); }
.toc:not([open]) summary::after { content: '▸'; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.toc li { margin: 0; padding: 0; }
.toc a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--b-line); text-decoration: none;
  color: var(--b-muted) !important; font-size: .9rem; line-height: 1.4; }
.toc a:hover, .toc a.on { color: var(--b-text) !important; border-left-color: var(--c); }
@media (max-width: 1100px) {
  .pl { grid-template-columns: minmax(0, 720px); gap: 0; }
  .toc { position: static; order: -1; margin-bottom: 26px; }
}

/* article typography — wins over the page's old inline rules */
.post-body { font-size: 1.06rem; min-width: 0; }
.post-body > p, .post-body li { color: var(--b-text); }
.post-body h2 { font-family: var(--b-head); font-weight: 800; font-size: clamp(1.45rem, 2.6vw, 1.85rem); line-height: 1.2;
  letter-spacing: -.015em; margin: 2.4em 0 .6em; scroll-margin-top: 90px; }
.post-body h2:first-child { margin-top: 0; }
.post-body h3 { font-family: var(--b-head); font-weight: 700; font-size: 1.22rem; margin: 1.8em 0 .5em; }
.post-body p { margin: 0 0 1.1em; }
.post-body a { text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.post-body img { max-width: 100%; height: auto; }
.post-body table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.post-body .cta-box { background: var(--deep) !important; color: #fff !important; border: none !important; border-radius: 20px !important; }
.post-body .cta-box h3, .post-body .cta-box p { color: #fff !important; }
.post-body .cta-button { background: #fff !important; color: var(--deep) !important; border-radius: 999px !important; font-weight: 700; text-decoration: none; }
.post-body .tip-box { border-left-color: var(--c) !important; background: color-mix(in srgb, var(--c) 12%, var(--b-card)) !important; border-radius: 0 14px 14px 0; }

/* try-it + related */
.try { max-width: 1160px; margin: 30px auto 0; padding: 0 20px; }
.try-in { border: 2px dashed color-mix(in srgb, var(--c) 70%, transparent); border-radius: 22px; padding: 22px 24px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
.try h2 { font-family: var(--b-head); font-weight: 800; font-size: 1.35rem; margin: 0; }
.try-links { display: flex; gap: 8px; flex-wrap: wrap; }
.try-links a { text-decoration: none; font-weight: 600; padding: 9px 16px; border-radius: 999px; background: var(--deep); color: #fff !important; }
.try-links a:hover { filter: brightness(1.12); }
.rel { max-width: 1160px; margin: 0 auto; padding: 44px 20px 10px; }
.rel > h2 { font-family: var(--b-head); font-weight: 800; font-size: 1.6rem; letter-spacing: -.015em; margin: 0 0 18px; }

/* ---------- footer ---------- */
.bf { margin-top: 56px; border-top: 1px solid var(--b-line); background: var(--b-card); }
.bf-in { max-width: 1160px; margin: 0 auto; padding: 28px 20px 34px; display: flex; gap: 20px 40px; flex-wrap: wrap;
  justify-content: space-between; align-items: center; }
.bf-links { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.bf-links a { color: var(--b-muted) !important; text-decoration: none; font-size: .92rem; }
.bf-links a:hover { color: var(--b-text) !important; }
.bf small { color: var(--b-muted); }

/* old per-post components read these variables: point them at the topic colour */
body.blog { --primary: var(--ink); --primary-light: var(--c); --primary-dark: var(--deep); }
*, *::before, *::after { box-sizing: border-box; }
