/* Guest view (/demo). Same dark design language as the dashboard; defines the tokens the shared
   Signal Coach component (coach_signal.css) expects. */
:root {
  --bg: #0a0f16;
  --panel: #111722;
  --elevated: #151d29;
  --border: rgba(255,255,255,.07);
  --text: #f4f7fb;
  --soft: #c3ccd9;
  --muted: #8e9aad;
  --blue: #4c8dff;
  --green: #22c55e;
  --red: #ef5350;
  --amber: #f5a524;
  --radius-sm: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(76,141,255,.10), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(245,197,66,.05), transparent 55%),
    var(--bg);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* ---- top bar ---------------------------------------------------------------------------------------- */
.guest-bar { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 20px; background: rgba(10,15,22,.82); border-bottom: 1px solid var(--border); backdrop-filter: blur(10px); }
.guest-brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.guest-logo { display: inline-grid; place-items: center; width: 30px; height: 30px; color: #cfe0ff; background: linear-gradient(135deg, rgba(76,141,255,.35), rgba(76,141,255,.08)); border: 1px solid rgba(110,160,255,.35); border-radius: 8px; font-size: .64rem; font-weight: 800; }
.guest-brand strong { font-size: .95rem; font-weight: 700; letter-spacing: -.01em; }
.guest-pill { padding: 3px 9px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.guest-bar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; }
.guest-tf { display: inline-flex; padding: 2px; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 999px; }
.guest-tf button { padding: 4px 12px; color: var(--muted); background: transparent; border: 0; border-radius: 999px; font: inherit; font-size: .72rem; font-weight: 700; cursor: pointer; }
.guest-tf button[aria-pressed='true'] { color: var(--text); background: linear-gradient(180deg, rgba(110,160,255,.30), rgba(76,141,255,.16)); box-shadow: 0 0 0 1px rgba(110,160,255,.35); }
.guest-signin { color: var(--soft); font-size: .78rem; text-decoration: none; }
.guest-signin:hover { color: var(--text); }
.guest-cta { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; color: #06162e; background: linear-gradient(180deg, #7fb0ff, #4c8dff); border-radius: 8px; font-size: .78rem; font-weight: 800; text-decoration: none; box-shadow: 0 8px 22px -10px rgba(76,141,255,.9); }
.guest-cta:hover { filter: brightness(1.06); }
.guest-tf button:focus-visible, .guest-cta:focus-visible, .guest-signin:focus-visible { outline: 2px solid #778da7; outline-offset: 2px; }

/* ---- layout ------------------------------------------------------------------------------------------ */
.guest-main { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 16px; max-width: 1480px; margin: 0 auto; padding: 16px 20px 8px; }
.guest-chart-card, .coach-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.guest-chart-card { display: grid; gap: 10px; min-width: 0; padding: 14px 16px 12px; }
.guest-chart-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.guest-kicker, .section-kicker { margin: 0 0 2px; color: var(--muted); font-size: .6rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.guest-chart-head h1 { margin: 0; font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.guest-chart-head h1 span { color: var(--muted); font-size: .85rem; font-weight: 600; }
.guest-price { display: grid; justify-items: end; gap: 2px; }
.guest-price strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.guest-price span { color: var(--muted); font-size: .66rem; }
.guest-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: .66rem; }
.guest-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 14px; height: 0; border-top: 2px solid; }
.sw-avwap { border-color: #f5c542; }
.sw-band { border-top-style: dashed; border-color: rgba(245,197,66,.6); }
.sw-doji { width: 7px; height: 7px; border: 0; border-radius: 50%; background: #c4b5fd; }
.sw-fib { border-top-style: dashed; border-color: #d4a72c; }
.sw-poc { border-color: #a78bfa; }
.sw-sr { border-top-style: dotted; border-color: rgba(34,197,94,.8); }
.guest-chart { position: relative; height: min(58vh, 560px); min-height: 320px; }
.guest-macd { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.guest-macd-rows { display: flex; flex-wrap: wrap; gap: 5px; }
.guest-macd-pill { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 8px; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 6px; font-size: .66rem; font-variant-numeric: tabular-nums; }
.guest-macd-pill b { color: var(--muted); font-weight: 700; }
.guest-macd-pill span { font-weight: 800; letter-spacing: .04em; }
.guest-macd-pill em { color: #f5c36a; font-style: normal; font-size: .6rem; }
.guest-macd-pill.is-bull span { color: #7fe0a8; }
.guest-macd-pill.is-bull { border-color: rgba(34,197,94,.3); }
.guest-macd-pill.is-bear span { color: #ff9a9e; }
.guest-macd-pill.is-bear { border-color: rgba(239,83,80,.3); }
.guest-macd-pill.is-wait span { color: var(--muted); }
.guest-muted { color: var(--muted); font-size: .7rem; }
.guest-members { margin: 2px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.guest-members a { color: #9cc3ff; font-weight: 700; text-decoration: none; }
.guest-members a:hover { text-decoration: underline; }

/* ---- Signal Coach card (shared component in guest mode) ---------------------------------------------- */
.guest-side { min-width: 0; }
.coach-card { position: sticky; top: 70px; padding: 16px 16px 14px; }
.coach-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.coach-header h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.coach-header-actions { display: flex; align-items: center; gap: 10px; }
.coach-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .66rem; }
.coach-status i { width: 6px; height: 6px; background: #6684a6; border-radius: 50%; }
/* the component hides its status outside Signals mode; the guest card is always in Signals mode */
#ai-coach .coach-signal-status { display: inline-flex; }

.guest-foot { max-width: 1480px; margin: 0 auto; padding: 10px 20px 26px; color: var(--muted); font-size: .66rem; opacity: .8; }

@media (max-width: 980px) {
  .guest-main { grid-template-columns: 1fr; }
  .coach-card { position: static; }
}
@media (max-width: 560px) {
  .guest-bar { padding: 10px 14px; }
  .guest-main { padding: 12px 12px 6px; }
  .guest-signin { display: none; }
  .guest-chart { height: 340px; }
}
