* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f0f2f5;
}

/* ---- control bar ---- */
.ctrl {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: #14141b;
  color: #fff;
  font-size: 13px;
}
.ctrl.is-hidden { display: none; }
.ctrl-brand { font-weight: 700; margin-right: 6px; opacity: 0.85; }
.ctrl-group { display: inline-flex; gap: 4px; }
.ctrl-btn {
  cursor: pointer;
  border: 1px solid #3a3a4a;
  background: #23232f;
  color: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
}
.ctrl-btn:hover { background: #2f2f40; }
.ctrl-btn.is-on { background: #4b8bff; border-color: #4b8bff; }
.ctrl-primary { background: #22b45e; border-color: #22b45e; }
/* Green download button, pushed to the top-right of the bar */
.ctrl-store { margin-left: auto; background: #22c55e; border-color: #16a34a; color: #08210f; text-decoration: none; font-weight: 700; }
.ctrl-store:hover { background: #1eb455; }
.ctrl-menu { text-decoration: none; }
.ctrl-num { display: inline-flex; align-items: center; gap: 5px; color: #fff; font-size: 13px; }
.ctrl-num input { width: 46px; padding: 5px 6px; border-radius: 6px; border: 1px solid #3a3a4a; background: #23232f; color: #fff; font: inherit; }

/* Demo affordance: ad popups can be dragged around */
.antidoom-root { cursor: grab; }
.antidoom-root:active { cursor: grabbing; }
.ctrl-select { display: inline-flex; align-items: center; gap: 6px; opacity: 0.9; }
.ctrl-select select {
  font-family: inherit; font-size: 13px; padding: 5px 6px;
  border-radius: 6px; border: 1px solid #3a3a4a; background: #23232f; color: #fff;
}
.ctrl-hide { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; opacity: 0.85; }

/* When the bar is hidden, reclaim the top space */
.site { padding-top: 52px; min-height: 100vh; }
.ctrl.is-hidden ~ .site { padding-top: 0; }

/* ================= mock feeds ================= */
.feed { max-width: 680px; margin: 0 auto; padding: 20px 16px 120px; }
.post {
  background: #fff; border-radius: 10px; padding: 14px 16px; margin: 0 0 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 40px; }
.row { display: flex; align-items: center; gap: 10px; }
.ph-img { width: 100%; border-radius: 8px; margin-top: 10px; }
.post-img { display: block; width: 100%; max-height: 340px; object-fit: cover; border-radius: 8px; margin-top: 10px; }
.fb-comment { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; }
.fb-comment .avatar { width: 32px; height: 32px; flex: 0 0 32px; }
.fb-comment-bubble { background: #f0f2f5; border-radius: 16px; padding: 8px 12px; font-size: 14px; line-height: 1.35; }

/* PostHog inside-joke banner, pinned atop the Fakebook feed */
.pineapple-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 2px solid #ffb300;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.pineapple-banner > img { width: 68px; height: 68px; flex: 0 0 68px; object-fit: cover; border-radius: 8px; }
.pineapple-copy strong { display: block; font-size: 15px; }
.pineapple-copy span { color: #65676b; font-size: 13px; }
.muted { color: #65676b; font-size: 13px; }
.strong { font-weight: 600; }

/* ---- Facebook ---- */
.site--facebook { background: #f0f2f5; }
.fb-top {
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  display: flex; align-items: center; gap: 14px; padding: 8px 16px;
  position: sticky; top: 0;
}
.fb-logo { color: #1877f2; font-weight: 800; font-size: 26px; letter-spacing: -0.5px; }
.fb-search { background: #f0f2f5; border-radius: 20px; padding: 8px 14px; color: #65676b; font-size: 14px; flex: 1; max-width: 240px; }
.fb-actions { margin-left: auto; display: flex; gap: 8px; }
.fb-pill { width: 40px; height: 40px; border-radius: 50%; background: #e4e6eb; }
.fb-postimg { height: 260px; background: linear-gradient(135deg, #a1c4fd, #c2e9fb); }
.fb-bar { display: flex; gap: 6px; border-top: 1px solid #e4e6eb; margin-top: 10px; padding-top: 8px; }
.fb-bar span { flex: 1; text-align: center; color: #65676b; font-size: 14px; font-weight: 600; padding: 6px; border-radius: 6px; }

/* ---- Reddit ---- */
.site--reddit { background: #dae0e6; }
.rd-top { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.1); display: flex; align-items: center; gap: 12px; padding: 8px 16px; position: sticky; top: 0; }
.rd-snoo { width: 32px; height: 32px; border-radius: 50%; background: #ff4500; }
.rd-logo { font-weight: 700; font-size: 20px; color: #1a1a1b; }
.rd-search { background: #f6f7f8; border: 1px solid #edeff1; border-radius: 20px; padding: 8px 14px; color: #878a8c; font-size: 14px; flex: 1; max-width: 320px; }
.rd-post { display: flex; gap: 0; padding: 0; overflow: hidden; }
.rd-vote { background: #f8f9fa; width: 44px; flex: 0 0 44px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; color: #878a8c; font-weight: 700; font-size: 12px; }
.rd-arrow { width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; }
.rd-up { border-bottom: 10px solid #878a8c; }
.rd-down { border-top: 10px solid #878a8c; }
.rd-body { padding: 8px 12px 12px; flex: 1; }
.rd-meta { color: #787c7e; font-size: 12px; }
.rd-meta b { color: #1a1a1b; }
.rd-title { font-size: 18px; font-weight: 500; color: #222; margin: 4px 0 6px; }

/* ---- Instagram ---- */
.site--instagram { background: #fafafa; }
.ig-top { background: #fff; border-bottom: 1px solid #dbdbdb; display: flex; align-items: center; gap: 14px; padding: 10px 16px; position: sticky; top: 0; }
.ig-logo { font-family: "Snell Roundhand", "Brush Script MT", cursive; font-size: 26px; font-weight: 600; }
.ig-feed { max-width: 470px; }
.ig-post { background: #fff; border: 1px solid #dbdbdb; border-radius: 8px; margin-bottom: 18px; }
.ig-head { display: flex; align-items: center; gap: 10px; padding: 12px; }
.ig-ring { padding: 2px; border-radius: 50%; background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.ig-ring .avatar { border: 2px solid #fff; width: 34px; height: 34px; flex: 0 0 34px; }
.ig-img { display: block; width: 100%; height: 470px; object-fit: cover; background: linear-gradient(135deg, #fdcbf1, #a1c4fd); }
.ig-actions { padding: 10px 12px; display: flex; gap: 14px; font-size: 22px; }
.ig-cap { padding: 0 12px 14px; font-size: 14px; }

/* ---- Hacker News ---- */
.site--hn { background: #f6f6ef; }
.hn-top { background: #ff6600; padding: 4px 8px; display: flex; align-items: center; gap: 8px; position: sticky; top: 0; }
.hn-mark { width: 18px; height: 18px; border: 1px solid #fff; color: #fff; font-weight: 700; font-size: 13px; text-align: center; line-height: 18px; }
.hn-nav { color: #000; font-size: 13px; }
.hn-nav b { margin-right: 8px; }
.hn-feed { max-width: 760px; margin: 0 auto; padding: 10px 12px 120px; font-family: Verdana, Geneva, sans-serif; }
.hn-item { display: flex; gap: 6px; font-size: 14px; margin-bottom: 6px; align-items: baseline; }
.hn-rank { color: #828282; width: 22px; text-align: right; }
.hn-title a { color: #000; text-decoration: none; }
.hn-sub { color: #828282; font-size: 12px; margin: 0 0 12px 28px; }

/* avatar palette */
.a1 { background: #ff7a59; } .a2 { background: #7ed0ff; } .a3 { background: #b6e3a1; }
.a4 { background: #d9a7ff; } .a5 { background: #ffd479; } .a6 { background: #9aa7ff; }
