/* AI Learning Ground Buzz (public/buzz.html).
   Built on the platform's tokens (theme.css) and primitives (styles.css:
   .btn, .input, .chip, .badge, .toast) so it reads as the same product.
   Everything here is scoped under .bz-* to keep it out of the SPA. */

.bz-body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
.bz-body .skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--accent);
}
.bz-body .skip:focus { top: 12px; }
.bz-body :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The [hidden] attribute must win over .btn / .chip display rules. */
.bz-body [hidden] { display: none !important; }
/* Headings focused programmatically (post detail) for screen readers. */
.bz-title[tabindex="-1"]:focus { outline: none; }

/* ---------------------------------------------------------------- top bar */

.bz-top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.bz-top-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.bz-top .bz-brand { display: flex; padding: 0; text-decoration: none; flex: none; } /* styles.css hides .brand on phones (SPA sidebar) */
.bz-brand .brand-logo { width: 32px; height: 32px; color: var(--on-fill, #fff); }
.bz-brand-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.bz-nav { display: flex; gap: 4px; }
.bz-nav a {
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.bz-nav a:hover { background: var(--surface-2); color: var(--text); }
.bz-nav a[aria-current="page"] { color: var(--accent-text); background: var(--accent-soft); }
.bz-search { flex: 1 1 260px; min-width: 0; max-width: 460px; margin-left: auto; }
.bz-search .input { height: 40px; }
.bz-top-right { display: flex; align-items: center; gap: 8px; flex: none; }
.bz-icon { width: 40px; height: 40px; padding: 0; }
.bz-account { position: relative; display: flex; align-items: center; gap: 8px; }
.bz-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.bz-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; }
.bz-avatar-text {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-fill, #fff);
  font-size: 12px;
  font-weight: 700;
}
.bz-avatar-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bz-menu-wrap { position: relative; }
.bz-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 60;
  min-width: 190px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lift);
}
.bz-menu[hidden] { display: none; }
.bz-menu > button, .bz-menu > a {
  text-align: left;
  padding: 10px 12px;
  min-height: 40px;
  border: 0;
  background: none;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}
.bz-menu > button:hover, .bz-menu > a:hover { background: var(--surface-2); }
.bz-share-menu { left: 0; right: auto; }

/* ----------------------------------------------------------------- layout */

.bz-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 16px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}
.bz-main { min-width: 0; outline: none; }
.bz-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 16px; }

.bz-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.bz-hero h1 { margin: 0 0 4px; font-size: clamp(20px, 3.2vw, 26px); letter-spacing: -.02em; line-height: 1.25; }
.bz-hero-sub { margin: 0; color: var(--text-dim); }
.bz-hero .btn { flex: none; }

.bz-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.bz-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}
.bz-tabs::-webkit-scrollbar { display: none; }
.bz-tab {
  flex: none;
  padding: 11px 14px;
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-dim);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.bz-tab:hover { color: var(--text); }
.bz-tab[aria-selected="true"] { color: var(--accent-text); border-bottom-color: var(--accent); }
.bz-tab[hidden] { display: none; }
.bz-tab-admin { color: var(--amber-text, var(--text-dim)); }
.bz-select { height: 38px; padding: 6px 10px; width: auto; }
.bz-sort[hidden] { display: none; }

.bz-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.bz-filter[hidden] { display: none; }
.bz-disclosure {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 13.5px;
}

/* ------------------------------------------------------------------ cards */

.bz-feed { display: flex; flex-direction: column; gap: 14px; }
.bz-card {
  position: relative;
  padding: 18px 20px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.bz-card-deal { border-left: 4px solid var(--green); }
.bz-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.bz-type { font-weight: 700; }
.bz-type-news { background: var(--blue-soft); color: var(--blue-text, var(--blue)); }
.bz-type-community { background: var(--accent-soft); color: var(--accent-text); }
.bz-type-deal { background: var(--green-soft); color: var(--green-text, var(--green)); }
.bz-title { margin: 0 0 6px; font-size: 18px; line-height: 1.35; letter-spacing: -.01em; }
.bz-title a { color: var(--text); text-decoration: none; }
.bz-title a:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.bz-card-detail .bz-title { font-size: clamp(21px, 3vw, 27px); }
.bz-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  color: var(--text-faint);
  font-size: 13px;
}
.bz-meta-who { color: var(--text-dim); font-weight: 600; }
.bz-meta-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.bz-summary { margin: 0 0 12px; color: var(--text); line-height: 1.6; }
.bz-excerpt { margin: 0 0 12px; color: var(--text-faint); font-size: 13.5px; font-style: italic; }
.bz-body-text { margin: 4px 0 14px; line-height: 1.7; }
.bz-body-text p { margin: 0 0 12px; }
.bz-note {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 14px;
}
.bz-tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.bz-body .bz-chip { font: inherit; font-size: 12.5px; padding: 5px 11px; cursor: pointer; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-dim); }
.bz-body .bz-chip:hover { color: var(--text); background: var(--surface-3); }
.bz-body .bz-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }

.bz-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0 -8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.bz-act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  min-width: 40px;
  justify-content: center;
  padding: 6px 10px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--text-dim);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.bz-act:hover { background: var(--surface-2); color: var(--text); }
.bz-act.on { color: var(--accent-text); }
.bz-act.on svg { fill: currentColor; }
.bz-act-admin { color: var(--amber-text, var(--text-dim)); }
.bz-act-quiet { margin-left: auto; color: var(--text-faint); }

.bz-deal {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
}
.bz-deal-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.bz-deal-merchant { font-weight: 700; }
.bz-deal-value { color: var(--green-text, var(--green)); font-weight: 700; }
.bz-code {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  margin-bottom: 8px;
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.bz-code code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; letter-spacing: .04em; }
.bz-code-hint { font-size: 12px; color: var(--accent-text); font-weight: 700; }
.bz-deal-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 13.5px; }
.bz-deal-facts dt { color: var(--text-faint); }
.bz-deal-facts dd { margin: 0; }

.bz-more { display: flex; justify-content: center; margin-top: 16px; }
.bz-back { margin-bottom: 4px; align-self: flex-start; }

.bz-skel { min-height: 120px; }
.bz-skel-line { height: 14px; border-radius: 6px; background: var(--surface-2); margin: 10px 0; animation: bz-pulse 1.2s ease-in-out infinite; }
.bz-skel-line.w40 { width: 40%; } .bz-skel-line.w70 { width: 70%; } .bz-skel-line.w90 { width: 90%; }
@keyframes bz-pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .bz-skel-line { animation: none; } }

.bz-empty { padding: 32px 20px; text-align: center; background: var(--surface); border: 1px dashed var(--border); border-radius: 14px; }
.bz-empty-title { font-weight: 700; font-size: 17px; margin: 0 0 6px; }
.bz-empty-body { color: var(--text-dim); margin: 0 0 14px; }

/* -------------------------------------------------------------------- ads */

.bz-ad {
  position: relative;
  min-height: 120px;              /* reserved so a late ad cannot shift the feed (CLS) */
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.bz-ad-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.bz-ad-house { background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface); }
.bz-ad-title { margin: 0 0 4px; font-weight: 700; font-size: 16px; }
.bz-ad-body { margin: 0 0 12px; color: var(--text-dim); font-size: 14px; }
.bz-ad-side { min-height: 250px; }

/* ---------------------------------------------------------------- sidebar */

.bz-side-card { padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.bz-side-title { margin: 0 0 10px; font-size: 14px; letter-spacing: .02em; text-transform: uppercase; color: var(--text-faint); }
.bz-side-text { margin: 0 0 10px; color: var(--text-dim); font-size: 14px; }
.bz-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.bz-foot { max-width: 1180px; margin: 0 auto; padding: 8px 16px 40px; color: var(--text-faint); font-size: 13px; }
.bz-foot a { color: var(--accent-text); }

/* ---------------------------------------------------------------- dialogs */

.bz-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lift);
}
.bz-dialog-sm { width: min(440px, calc(100vw - 32px)); }
.bz-dialog::backdrop { background: rgba(10, 12, 16, .55); }
.bz-form { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 20px; }
.bz-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bz-dialog-head h2 { margin: 0; font-size: 19px; }
.bz-dialog-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.bz-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.bz-field[hidden], .bz-deal-fields[hidden], .bz-admin-fields[hidden], .bz-opt[hidden] { display: none; }
.bz-opt { font-weight: 400; font-style: normal; color: var(--text-faint); font-size: 13px; }
.bz-field textarea { resize: vertical; min-height: 64px; }
.bz-deal-fields, .bz-admin-fields { display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.bz-seg { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.bz-seg label { position: relative; }
.bz-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.bz-seg span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-weight: 600;
  font-size: 14px;
}
.bz-seg input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.bz-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.bz-check { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 14px; cursor: pointer; }
.bz-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.bz-networks { border: 0; padding: 0; margin: 0; }
.bz-networks legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.bz-network-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 12px; }
.bz-net-state { color: var(--text-faint); font-size: 12.5px; }
.bz-net-state.ok { color: var(--green-text, var(--green)); }
.bz-radio-list { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; }
.bz-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--red-soft); color: var(--red-text, var(--red)); font-size: 14px; }
.bz-error[hidden] { display: none; }
.bz-syn-results:empty { display: none; }
.bz-syn-list { margin: 0; padding-left: 18px; font-size: 14px; }
.bz-syn-list a { color: var(--accent-text); margin-left: 4px; }
.bz-syn-sent strong, .bz-syn-dry-run strong { color: var(--green-text, var(--green)); }
.bz-syn-failed strong, .bz-syn-err { color: var(--red-text, var(--red)); }

/* ------------------------------------------------------------------ admin */

.bz-admin { display: flex; flex-direction: column; gap: 12px; }
.bz-admin-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.bz-admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.bz-admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.bz-admin-tab[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.bz-admin-count:not(:empty) { padding: 0 7px; border-radius: 999px; background: var(--accent); color: var(--on-fill, #fff); font-size: 12px; }
.bz-admin-body { display: flex; flex-direction: column; gap: 10px; }
.bz-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.bz-admin-row { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.bz-admin-row-head { display: flex; gap: 12px; align-items: flex-start; }
.bz-admin-row-head .bz-row-check { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--accent); flex: none; }
.bz-admin-row-main { min-width: 0; flex: 1; }
.bz-admin-title { margin: 0 0 4px; font-size: 16px; }
.bz-admin-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.bz-reports { margin: 0 0 8px; color: var(--red-text, var(--red)); font-size: 13.5px; }
.bz-danger { color: var(--red-text, var(--red)); }
.bz-settings h3 { margin: 10px 0 0; font-size: 15px; }
.bz-net-status { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.bz-net-status li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }

/* ------------------------------------------------------------- responsive */

@media (max-width: 1023px) {
  .bz-shell { grid-template-columns: minmax(0, 1fr); }
  .bz-side { position: static; }
  .bz-ad-side { min-height: 140px; }
}
@media (max-width: 720px) {
  .bz-top-inner { flex-wrap: wrap; gap: 10px; }
  .bz-nav { display: none; }
  .bz-search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .bz-top-right { margin-left: auto; }
  .bz-avatar-name { display: none; }
  .bz-brand .brand-name { font-size: 15px; }
  .bz-hero { flex-direction: column; align-items: stretch; padding: 18px; }
  .bz-card { padding: 16px 16px 10px; }
  .bz-act-text { display: none; }
  .bz-act-admin .bz-act-text { display: inline; }
  .bz-toolbar { flex-wrap: wrap; }
}

/* =====================================================================
   Buzz v2 — media-first cards, category colour, hero story, month dividers
   ===================================================================== */

.bz-body {
  /* Category hues. Text variants clear 4.5:1 on the card surface in each
     theme; the fills are only ever used for covers and tints. */
  --cat-models: #6D4AFF;      --cat-models-text: #5B3BE0;
  --cat-tools: #2563EB;       --cat-tools-text: #1D4ED8;
  --cat-cloud: #0284C7;       --cat-cloud-text: #0369A1;
  --cat-open: #16A34A;        --cat-open-text: #15803D;
  --cat-research: #D97706;    --cat-research-text: #B45309;
  --cat-policy: #E11D48;      --cat-policy-text: #BE123C;
  --cat-business: #A21CAF;    --cat-business-text: #A21CAF;
  --cat-deal: #059669;        --cat-deal-text: #047857;
  --cat-community: #EA580C;   --cat-community-text: #C2410C;
  --cat-news: #475569;        --cat-news-text: #475569;
  /* Fills that carry WHITE text (covers, the deals rail): the same in both
     themes, each at least 5:1 with white. The --cat values above are for
     tints and accents only. (HCD review v1.4.2) */
  --fill-models: #5B3BE0; --fill-tools: #1D4ED8; --fill-cloud: #0369A1; --fill-open: #15803D;
  --fill-research: #B45309; --fill-policy: #BE123C; --fill-business: #A21CAF; --fill-deal: #047857;
  --fill-community: #C2410C; --fill-news: #475569;
  --cover-ink: #0B1020;
}
[data-theme="dark"] .bz-body {
  --cat-models: #8B5CF6;      --cat-models-text: #C4B5FD;
  --cat-tools: #3B82F6;       --cat-tools-text: #93C5FD;
  --cat-cloud: #0EA5E9;       --cat-cloud-text: #7DD3FC;
  --cat-open: #22C55E;        --cat-open-text: #86EFAC;
  --cat-research: #F59E0B;    --cat-research-text: #FCD34D;
  --cat-policy: #F43F5E;      --cat-policy-text: #FDA4AF;
  --cat-business: #D946EF;    --cat-business-text: #F0ABFC;
  --cat-deal: #10B981;        --cat-deal-text: #6EE7B7;
  --cat-community: #F97316;   --cat-community-text: #FDBA74;
  --cat-news: #64748B;        --cat-news-text: #CBD5E1;
  --cover-ink: #05070D;
}
.bz-cat-models { --cat: var(--cat-models); --cat-text: var(--cat-models-text); --cat-fill: var(--fill-models); }
.bz-cat-tools { --cat: var(--cat-tools); --cat-text: var(--cat-tools-text); --cat-fill: var(--fill-tools); }
.bz-cat-cloud { --cat: var(--cat-cloud); --cat-text: var(--cat-cloud-text); --cat-fill: var(--fill-cloud); }
.bz-cat-open-source { --cat: var(--cat-open); --cat-text: var(--cat-open-text); --cat-fill: var(--fill-open); }
.bz-cat-research { --cat: var(--cat-research); --cat-text: var(--cat-research-text); --cat-fill: var(--fill-research); }
.bz-cat-policy { --cat: var(--cat-policy); --cat-text: var(--cat-policy-text); --cat-fill: var(--fill-policy); }
.bz-cat-business { --cat: var(--cat-business); --cat-text: var(--cat-business-text); --cat-fill: var(--fill-business); }
.bz-cat-deal { --cat: var(--cat-deal); --cat-text: var(--cat-deal-text); --cat-fill: var(--fill-deal); }
.bz-cat-community { --cat: var(--cat-community); --cat-text: var(--cat-community-text); --cat-fill: var(--fill-community); }
.bz-cat-news { --cat: var(--cat-news); --cat-text: var(--cat-news-text); --cat-fill: var(--fill-news); }

/* ---- hero banner ---- */
.bz-hero {
  position: relative;
  overflow: hidden;
  padding: 28px 28px;
  border: 0;
  color: #fff;
  background:
    /* One brand: deep teal with a single teal glow (was violet + orange). */
    radial-gradient(70% 140% at 100% 0%, rgba(43, 179, 190, .45), transparent 65%),
    radial-gradient(60% 120% at 0% 120%, rgba(14, 124, 134, .35), transparent 70%),
    #0B1F24;
}
.bz-hero h1 { color: #fff; font-size: clamp(24px, 3.6vw, 34px); letter-spacing: -.025em; text-wrap: balance; }
.bz-hero-sub { color: rgba(255, 255, 255, .86); max-width: 58ch; }
.bz-hero-sub a { color: #fff; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.bz-hero-stats { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bz-hero-stats span {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 650;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.bz-hero .btn-primary { background: #fff; color: #111827; box-shadow: none; }
.bz-hero .btn-primary:hover { filter: brightness(.95); }

/* ---- feed grid ---- */
.bz-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  align-items: start;
}
.bz-feed > .bz-card-hero,
.bz-feed > .bz-card-detail,
.bz-feed > .bz-month,
.bz-feed > .bz-ad,
.bz-feed > .bz-empty,
.bz-feed > .bz-note,
.bz-feed > .bz-back,
.bz-feed > .bz-skel,
.bz-feed > .bz-admin { grid-column: 1 / -1; }
.bz-feed > .bz-back { justify-self: start; }

.bz-month {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 -4px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.bz-month::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---- card ---- */
.bz-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.bz-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--cat, var(--accent)) 35%, var(--border)); }
@media (prefers-reduced-motion: reduce) { .bz-card, .bz-card:hover { transition: none; transform: none; } }
.bz-card-deal { border-left: 1px solid var(--border); }
.bz-card-body { display: flex; flex-direction: column; padding: 14px 16px 8px; min-width: 0; }
.bz-card .bz-title { font-size: 17px; line-height: 1.35; }
.bz-card .bz-summary {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14.5px;
  color: var(--text-dim);
}
.bz-card-detail .bz-summary, .bz-card-hero .bz-summary { -webkit-line-clamp: unset; display: block; }

.bz-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cat-text);
  background: color-mix(in srgb, var(--cat) 14%, transparent);
}
.bz-cat-pill svg { display: block; }

/* ---- media ---- */
.bz-media {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  overflow: hidden;
  background: var(--surface-2);
}
.bz-media img, .bz-media iframe { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; }
.bz-media a { display: block; width: 100%; height: 100%; }
.bz-video { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: #000; }
.bz-video img { opacity: .92; transition: opacity .2s; }
.bz-video:hover img { opacity: 1; }
.bz-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: rgba(10, 12, 20, .72);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}
.bz-play::after {
  content: '';
  position: absolute;
  left: 26px;
  top: 20px;
  border-style: solid;
  border-width: 12px 0 12px 19px;
  border-color: transparent transparent transparent #fff;
}
.bz-video:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.bz-credit {
  position: absolute;
  right: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: rgba(10, 12, 20, .62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

/* Drawn cover for posts without a picture */
.bz-cover {
  position: relative;
  width: 100%;
  height: 100%;
  color: #fff;
  background:
    radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, #fff 18%, transparent), transparent 55%),
    linear-gradient(135deg, var(--cat-fill, var(--cat)) 0%, color-mix(in srgb, var(--cat-fill, var(--cat)) 62%, var(--cover-ink)) 100%);
}
.bz-cover-glyph { position: absolute; right: 6%; top: 50%; transform: translateY(-50%); opacity: .28; }
.bz-cover-glyph svg { width: clamp(64px, 30%, 120px); height: auto; }
.bz-cover-mono {
  position: absolute;
  left: 18px;
  bottom: 14px;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
}
.bz-cover-value {
  position: absolute;
  left: 18px;
  top: 14px;
  max-width: 70%;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 750;
  color: var(--cover-ink);
  background: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- hero story ---- */
.bz-card-hero .bz-title { font-size: clamp(20px, 2.6vw, 26px); }
@media (min-width: 900px) {
  .bz-card-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .bz-card-hero .bz-media { aspect-ratio: auto; min-height: 280px; height: 100%; }
  .bz-card-hero .bz-card-body { padding: 20px 22px 10px; justify-content: center; }
}
.bz-card-detail .bz-media { aspect-ratio: 16 / 9; max-height: 480px; }
.bz-card-detail .bz-title { font-size: clamp(22px, 3vw, 28px); }

/* ads sit in the grid like a card */
.bz-feed > .bz-ad { border-radius: 16px; }

@media (max-width: 720px) {
  .bz-feed { grid-template-columns: minmax(0, 1fr); }
  .bz-hero { padding: 22px 18px; }
}

/* ---- deals rail ---- */
.bz-feed > .bz-rail { grid-column: 1 / -1; }
.bz-rail { padding: 14px 0 4px; }
.bz-rail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.bz-rail-title { margin: 0; font-size: 16px; }
.bz-rail-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 230px);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}
.bz-rail-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 132px;
  padding: 14px 14px 12px;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(145deg, var(--cat-fill, var(--cat)) 0%, color-mix(in srgb, var(--cat-fill, var(--cat)) 60%, var(--cover-ink)) 100%);
  box-shadow: var(--shadow);
}
.bz-rail-card:hover { filter: brightness(1.06); }
.bz-rail-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bz-rail-merchant { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.bz-rail-value { font-size: 19px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.bz-rail-name { font-size: 13px; line-height: 1.35; opacity: .9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.bz-video .bz-cover { position: absolute; inset: 0; }
.bz-top-inner { row-gap: 8px; }
@media (max-width: 720px) {
  .bz-top-inner .bz-brand .brand-name { font-size: 15px; }
  .bz-top-right { order: 2; }
}

/* ---- Learn promos (signed-out visitors; sidebar shows "Continue learning" when signed in) ---- */
.bz-learn {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, .18), transparent 55%),
    linear-gradient(135deg, #0E7C86 0%, #0B5E7A 60%, #0B3F52 100%);
  box-shadow: 0 6px 22px rgba(14, 124, 134, .25);
}
.bz-learn::after {
  content: '';
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 22px solid rgba(255, 255, 255, .08);
  pointer-events: none;
}
.bz-learn-kicker { justify-self: start; display: inline-block; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 11.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.bz-learn-title { margin: 10px 0 6px; font-size: 19px; font-weight: 750; letter-spacing: -.01em; line-height: 1.25; }
.bz-learn-body { margin: 0 0 14px; font-size: 14.5px; line-height: 1.5; color: rgba(255, 255, 255, .88); max-width: 60ch; }
.bz-learn-acts { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.bz-learn .btn-primary { background: #fff; border-color: #fff; color: #0A4F57; }
.bz-learn .btn-primary:hover { background: #F0FAFB; }
.bz-learn .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .45); background: transparent; }
.bz-learn .btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.bz-feed > .bz-learn { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 20px; }
.bz-feed > .bz-learn .bz-learn-kicker, .bz-feed > .bz-learn .bz-learn-title, .bz-feed > .bz-learn .bz-learn-body { grid-column: 1; }
.bz-feed > .bz-learn .bz-learn-body { margin-bottom: 0; }
.bz-feed > .bz-learn .bz-learn-acts { grid-column: 2; grid-row: 1 / span 3; }
@media (max-width: 720px) {
  .bz-feed > .bz-learn { grid-template-columns: minmax(0, 1fr); }
  .bz-feed > .bz-learn .bz-learn-acts { grid-column: 1; grid-row: auto; margin-top: 8px; }
}
#bz-side-learn:empty { display: none; }
