/* /developers/demo: a fictional portfolio page ("Orvella") around every Buzzberg widget.
   Its own neutral look, deliberately unlike the Buzzberg site and any real product. */
:root {
  --bg: #f5f6f8; --panel: #ffffff; --text: #1b1f27; --muted: #69707d; --line: #e4e7ec;
  --accent: #3b5bdb; --accent-wash: #eef2ff; --sel: #f1f4ff;
  --band: #14161b; --band-text: #e9ebef; --band-muted: #a0a6b1; --band-line: #2a2e36;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1115; --panel: #171a20; --text: #e8eaee; --muted: #9aa1ad; --line: #262a32;
  --accent: #8ea4ff; --accent-wash: rgba(142,164,255,.12); --sel: rgba(142,164,255,.10);
  --band: #050608; --band-line: #1d2027;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }

.band { background: var(--band); color: var(--band-text); padding: 8px 20px 0; }
.band-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; max-width: 1280px; margin: 0 auto; }
.band-what { margin: 0; font-size: 13.5px; color: var(--band-muted); }
.band-what b { color: var(--band-text); font-weight: 600; }
.band-pill { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 999px; background: #f2c14e; color: #1a1406; font-size: 12px; font-weight: 700; }
.band-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.band-seg { display: inline-flex; flex: none; border: 1px solid var(--band-line); border-radius: 8px; overflow: hidden; }
.band-seg button { background: transparent; border: 0; color: var(--band-muted); padding: 4px 10px; font-size: 13px; cursor: pointer; }
.band-seg button + button { border-left: 1px solid var(--band-line); }
.band-seg button[aria-pressed="true"] { background: #2b2f38; color: #fff; }
.band-nav { display: flex; flex-wrap: wrap; gap: 2px 14px; max-width: 1280px; margin: 6px auto 0; padding: 4px 0 8px; border-top: 1px solid var(--band-line); font-size: 12.5px; }
.band-nav a { color: var(--band-muted); text-decoration: none; }
.band-nav a:hover, .band-nav a[aria-current="page"] { color: var(--band-text); }

.app { max-width: 1280px; margin: 0 auto; padding: 0 20px 40px; }
.app-top { display: flex; align-items: center; gap: 28px; height: 60px; border-bottom: 1px solid var(--line); }
.app-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.app-mark { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, var(--accent), #12b886); }
.app-tabs { display: flex; gap: 4px; font-size: 14.5px; }
.app-tabs a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.app-tabs a:hover { color: var(--text); background: var(--sel); }
.app-tabs a.on { color: var(--text); font-weight: 600; background: var(--sel); }
.app-user { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--accent-wash); color: var(--accent); }

.token-head { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; }
.token-head h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.token-head h1 .muted { font-weight: 500; font-size: 18px; }
.head-balance { margin-left: auto; width: 300px; max-width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.coin { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; }
.coin-sm { width: 24px; height: 24px; font-size: 10px; letter-spacing: -.02em; }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 16px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.side, .col-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.watch { padding: 14px 14px 8px; }
.watch h2 { margin: 0 0 6px; font-size: 15px; }
.watch-rows { list-style: none; margin: 0; padding: 0; }
/* Wide enough for the longest holding (GOOGL) with its two-letter mark and the selected outline. */
.watch-row { display: grid; grid-template-columns: 108px minmax(0, 1fr); align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid var(--line); }
.watch-row:first-child { border-top: 0; }
.watch-name { display: inline-flex; align-items: center; gap: 7px; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 6px; cursor: pointer; text-align: left; }
.watch-name:hover, .watch-row.on .watch-name { background: var(--sel); }
.watch-row.on .watch-name { border-color: var(--accent); }
.watch-balance { min-width: 0; }

@media (max-width: 900px) {
  .grid, .grid-even { grid-template-columns: minmax(0, 1fr); }
  /* The three pages stay one tap away: the tabs scroll inside themselves, never past the screen. */
  .app-top { gap: 14px; }
  .app-tabs { overflow-x: auto; scrollbar-width: none; min-width: 0; }
  .app-tabs::-webkit-scrollbar { display: none; }
  .app-tabs a { padding: 6px 8px; font-size: 14px; }
}
@media (max-width: 520px) {
  .band { padding: 8px 16px 0; }
  /* Seven holdings in one row: tighter buttons, and the switch scrolls inside itself
     rather than running past the screen's edge. */
  .band-controls { max-width: 100%; }
  .band-seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .band-seg::-webkit-scrollbar { display: none; }
  .band-seg button { flex: none; padding: 4px 7px; font-size: 12.5px; }
}
@media (max-width: 360px) {
  .band-seg button { padding: 4px 4.5px; font-size: 12px; }
}
@media (max-width: 520px) {
  .app { padding: 0 16px 32px; }
  .app-user { display: none; }                       /* the three tabs need the width */
  .app-top { gap: 10px; }
  .token-head h1 { font-size: 22px; }
  .token-head { flex-wrap: wrap; }
  .head-balance { margin-left: 0; width: 100%; }
}

/* Until the chart's page reports, a quiet placeholder shows where it will be: the frame stays
   transparent until its page paints, then covers it (2026-12-02 audit: 5-9 s of blank panel). */
#w-chart { position: relative; }
#w-chart > iframe { position: relative; z-index: 1; }
#w-chart:not([data-buzzberg-state]) { min-height: 520px;
  background: repeating-linear-gradient(to bottom, transparent 0 79px, var(--line) 79px 80px) 0 70px / 100% 320px no-repeat; }
#w-chart:not([data-buzzberg-state])::before { content: 'Loading the chart'; position: absolute; left: 0; right: 0; top: 210px;
  text-align: center; color: var(--muted); font-size: 13px; }


/* Market and Top authors: a heading and two widgets side by side (stacked on a phone). */
.scene-head { margin: 22px 0 16px; }
.scene-head h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.02em; }
.scene-head p { margin: 0; font-size: 14px; }
.grid-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
/* Ticker on a phone: the chart, then the calls on it, then top voices, then the watchlist. */
@media (max-width: 900px) {
  .app-ticker .col-main, .app-ticker .side { display: contents; }
  .app-ticker .chart-panel { order: 1; }
  .app-ticker [aria-label="Latest calls on the holding"] { order: 2; }
  .app-ticker [aria-label="Top voices on the holding"] { order: 3; }
  .app-ticker .watch { order: 4; }
}
@media (max-width: 900px) { .grid-even { grid-template-columns: minmax(0, 1fr); } }

/* The code of the page's widgets, folded. */
.embed { margin: 18px 0 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.embed summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
.embed p { margin: 10px 0 0; font-size: 13.5px; }
.embed a { color: var(--accent); }
.embed-code { position: relative; margin-top: 10px; }
.embed-code pre { margin: 0; padding: 40px 14px 12px; overflow-x: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; }
.embed-copy { position: absolute; top: 8px; right: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 7px;
  padding: 3px 10px; font-size: 12.5px; cursor: pointer; }
.embed-copy:hover { border-color: var(--accent); }

/* A narrow phone (360 px): the three tabs still fit beside the brand. */
@media (max-width: 400px) {
  .app-tabs a { padding: 6px 5px; font-size: 13px; }
  .app-brand { font-size: 15px; }
}
