/* Athena Studio — editorial redesign (Nov 2026). Deep ink/slate navigation, warm off-white canvas,
   white surfaces, crisp indigo actions, restrained teal data accent. Scoped to body.ws-studio. */

/* ---------- tokens ---------- */
body.ws-studio {
  --at-ink: #0f172a;
  --at-slate: #334155;
  --at-slate-2: #475569;
  --at-text: #1e293b;
  --at-muted: #64748b;
  --at-faint: #94a3b8;
  --at-canvas: #f8f6f2;
  --at-canvas-2: #f1eee8;
  --at-surface: #ffffff;
  --at-surface-2: #fafaf8;
  --at-line: #e7e5df;
  --at-line-2: #f0ede6;
  --at-hover: #f4f1ea;
  --at-indigo: #4338ca;
  --at-indigo-2: #3730a3;
  --at-indigo-soft: #e0e7ff;
  --at-teal: #0d9488;
  --at-teal-2: #0f766e;
  --at-teal-soft: #ccfbf1;
  --at-amber: #d97706;
  --at-rose: #dc2626;
  --at-pos: #10b981;
  --at-neg: #f43f5e;
  --at-ai: #7c3aed;
  --at-ai-soft: #ede9fe;
  --at-rail: #0f172a;
  --at-rail-2: #1e293b;
  --at-rail-ink: #cbd5e1;
  --at-rail-on: #1e293b;
  --at-rail-active: #334155;
  --at-radius: 10px;
  --at-radius-sm: 6px;
  --at-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --at-shadow-2: 0 4px 12px rgba(15, 23, 42, 0.08);
  --at-shadow-pop: 0 12px 32px rgba(15, 23, 42, 0.18);
  --at-font: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Tamil", sans-serif;
  font-family: var(--at-font);
}

:root[data-theme="dark"] body.ws-studio {
  --at-ink: #f8fafc;
  --at-slate: #cbd5e1;
  --at-slate-2: #94a3b8;
  --at-text: #e2e8f0;
  --at-muted: #94a3b8;
  --at-faint: #64748b;
  --at-canvas: #0b1120;
  --at-canvas-2: #111827;
  --at-surface: #111827;
  --at-surface-2: #1f2937;
  --at-line: #374151;
  --at-line-2: #1f2937;
  --at-hover: #1f2937;
  --at-indigo: #6366f1;
  --at-indigo-2: #818cf8;
  --at-indigo-soft: #1e1b4b;
  --at-teal: #14b8a6;
  --at-teal-2: #2dd4bf;
  --at-teal-soft: #134e4a;
  --at-amber: #fbbf24;
  --at-rose: #fb7185;
  --at-pos: #34d399;
  --at-neg: #fb7185;
  --at-ai: #a78bfa;
  --at-ai-soft: #2e1065;
  --at-rail: #020617;
  --at-rail-2: #0f172a;
  --at-rail-ink: #94a3b8;
  --at-rail-on: #1e293b;
  --at-rail-active: #334155;
  --at-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --at-shadow-2: 0 4px 12px rgba(0, 0, 0, 0.35);
  --at-shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* ---------- rail redesign ---------- */
body.ws-studio #app { background: var(--at-canvas); }
body.ws-studio #main { background: var(--at-canvas); }

.sidebar.sx-rail {
  width: 64px;
  min-width: 64px;
  background: var(--at-rail);
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 10px 0 12px;
}
.sidebar.sx-rail.collapsed { width: 0; min-width: 0; overflow: hidden; }

.sx-rail-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--at-radius-sm);
  margin-bottom: 8px;
  background: rgba(255,255,255,0.08);
}
.sx-rail-logo img { filter: brightness(1.25); width: 22px; height: 25px; }

.sx-rail-ws {
  width: 40px;
  height: 40px;
  border-radius: var(--at-radius-sm);
  background: var(--at-indigo);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
}

.sx-rail-i {
  width: 40px;
  height: 40px;
  border-radius: var(--at-radius-sm);
  color: var(--at-rail-ink);
}
.sx-rail-i:hover { background: var(--at-rail-active); color: #fff; }
.sx-rail-i.on { background: var(--at-rail-active); color: #fff; box-shadow: inset 3px 0 0 var(--at-teal); }

.sx-rail-group h2 {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--at-faint);
  text-transform: uppercase;
  padding: 10px 0 4px;
  text-align: center;
}

.sx-rail-sep { background: rgba(255,255,255,0.1); margin: 8px 0; }

.ath-rail-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  margin-bottom: 10px;
}

#rail-compose.sx-rail-i { background: var(--at-indigo); color: #fff; }
#rail-compose.sx-rail-i:hover { background: var(--at-indigo-2); }

.sx-rail-ai { color: #c4b5fd; }
.sx-rail-ai.on, .sx-rail-ai:hover { background: linear-gradient(135deg, #4c1d95, #be185d); color: #fff; }

.ath-rail-utilities { display: flex; flex-direction: column; gap: 4px; align-items: center; margin-top: 6px; }

/* rail labels shown on wide rail */
@media (min-width: 1440px) {
  .sidebar.sx-rail { width: 180px; align-items: stretch; padding: 12px 10px; }
  .sx-rail-logo { width: auto; display: flex; align-items: center; gap: 10px; padding: 0 8px; background: transparent; }
  .sx-rail-logo img { width: 24px; height: 27px; }
  .ath-nav-label { display: inline; font-size: 13px; font-weight: 600; color: #fff; }
  .ath-nav-label small { display: block; font-size: 9px; font-weight: 500; color: var(--at-faint); letter-spacing: 0.05em; }
  .sx-rail-ws { width: auto; justify-content: flex-start; gap: 8px; padding: 0 10px; }
  .ath-workspace-mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; background: rgba(255,255,255,0.15); }
  .sx-rail-group h2 { text-align: left; padding-left: 8px; }
  .sx-rail-i {
    width: auto;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 10px;
    height: 36px;
  }
  .ath-rail-actions .sx-rail-i { width: auto; }
  .sx-rail-sep { width: auto; margin: 8px 10px; }
  .sx-rail-dot { right: auto; left: 26px; top: 6px; }
}

/* mobile bottom rail */
@media (max-width: 768px) {
  body.ws-studio .sidebar.sx-rail {
    display: none;
  }
  body.ws-studio .mob-nav { display: none; }
  body.ws-studio #main { height: calc(100vh - 64px); }
  .ath-mob-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--at-surface);
    border-top: 1px solid var(--at-line);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 40;
    padding: 0 6px;
  }
  .ath-mob-bar a, .ath-mob-bar button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: transparent;
    border: 0;
    color: var(--at-muted);
    font-size: 10px;
    padding: 6px 8px;
    text-decoration: none;
  }
  .ath-mob-bar a.on, .ath-mob-bar button.on { color: var(--at-indigo); }
  .ath-mob-bar svg { width: 22px; height: 22px; }
}

/* ---------- module layout ---------- */
body.ws-studio .sx {
  color: var(--at-text);
  font: 14px/1.5 var(--at-font);
}

body.ws-studio .sx-nav {
  width: 232px;
  min-width: 232px;
  background: var(--at-surface);
  border-right: 1px solid var(--at-line);
  color: var(--at-slate);
}
body.ws-studio .sx-nav-top { padding: 18px 18px 12px; }
body.ws-studio .sx-nav-title { color: var(--at-ink); font-size: 18px; font-weight: 700; }
body.ws-studio .sx-nav-close { color: var(--at-muted); }
body.ws-studio .sx-nav-close:hover { background: var(--at-hover); color: var(--at-ink); }
body.ws-studio .sx-nav-g { color: var(--at-faint); font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 16px 16px 6px; }
body.ws-studio .sx-nav-i { color: var(--at-slate); padding: 8px 12px; border-radius: var(--at-radius-sm); margin: 1px 8px; width: calc(100% - 16px); }
body.ws-studio .sx-nav-i:hover { background: var(--at-hover); color: var(--at-ink); }
body.ws-studio .sx-nav-i.on { background: var(--at-indigo-soft); color: var(--at-indigo); font-weight: 600; }
body.ws-studio .sx-nav-i.primary { background: var(--at-indigo); color: #fff; }
body.ws-studio .sx-nav-i.primary:hover { background: var(--at-indigo-2); }
body.ws-studio .sx-nav-card { background: var(--at-canvas-2); color: var(--at-slate); border-radius: var(--at-radius); }
body.ws-studio .sx-nav-card b { color: var(--at-ink); }

body.ws-studio .sx-main { background: var(--at-canvas); }
body.ws-studio .sx-h {
  background: var(--at-surface);
  border-bottom: 1px solid var(--at-line);
  padding: 14px 22px;
  min-height: 60px;
}
body.ws-studio .sx-h-t h1 { color: var(--at-ink); font-size: 20px; font-weight: 700; }
body.ws-studio .sx-h-t small { color: var(--at-muted); font-size: 12.5px; }
body.ws-studio .sx-b { padding: 22px; }

/* ---------- controls ---------- */
body.ws-studio .sx-btn {
  border-radius: var(--at-radius-sm);
  border-color: var(--at-line);
  background: var(--at-surface);
  color: var(--at-ink);
  font-weight: 500;
  height: 34px;
  padding: 0 14px;
}
body.ws-studio .sx-btn:hover { background: var(--at-hover); border-color: var(--at-line-2); }
body.ws-studio .sx-btn.p { background: var(--at-indigo); border-color: var(--at-indigo); color: #fff; }
body.ws-studio .sx-btn.p:hover { background: var(--at-indigo-2); }
body.ws-studio .sx-btn.ai { background: var(--at-ai-soft); border-color: var(--at-ai-soft); color: var(--at-ai); }
body.ws-studio .sx-btn.ai:hover { background: #ddd6fe; }
body.ws-studio .sx-btn.dark { background: var(--at-rail); border-color: var(--at-rail); }

body.ws-studio .sx-in,
body.ws-studio .sx-sel,
body.ws-studio .sx-ta {
  border-color: var(--at-line);
  border-radius: var(--at-radius-sm);
  background: var(--at-surface);
  color: var(--at-ink);
}
body.ws-studio .sx-in:focus,
body.ws-studio .sx-sel:focus,
body.ws-studio .sx-ta:focus { outline: 2px solid var(--at-indigo-soft); border-color: var(--at-indigo); }

body.ws-studio .sx-seg { border-color: var(--at-line); border-radius: var(--at-radius-sm); }
body.ws-studio .sx-seg button { border-color: var(--at-line); }
body.ws-studio .sx-seg button.on { background: var(--at-indigo); color: #fff; }

body.ws-studio .sx-toggle.on { background: var(--at-teal); }

/* ---------- cards, KPIs, tables ---------- */
body.ws-studio .sx-card {
  background: var(--at-surface);
  border-color: var(--at-line);
  border-radius: var(--at-radius);
  box-shadow: var(--at-shadow);
}
body.ws-studio .sx-card-h h3 { color: var(--at-ink); font-size: 15px; font-weight: 700; }
body.ws-studio .sx-card-h p { color: var(--at-muted); }

body.ws-studio .sx-kpi { border-color: var(--at-line); }
body.ws-studio .sx-kpi-v b { color: var(--at-ink); font-weight: 700; }

body.ws-studio .sx-table th { color: var(--at-muted); border-color: var(--at-line); background: var(--at-surface-2); }
body.ws-studio .sx-table td { border-color: var(--at-line-2); color: var(--at-text); }
body.ws-studio .sx-table tr:hover td { background: var(--at-hover); }

body.ws-studio .sx-tag { background: var(--at-line-2); color: var(--at-slate); border-radius: 999px; }
body.ws-studio .sx-tag.blue { background: var(--at-indigo-soft); color: var(--at-indigo); }
body.ws-studio .sx-tag.pos { background: #d1fae5; color: #065f46; }
body.ws-studio .sx-tag.neg { background: #ffe4e6; color: #9f1239; }

body.ws-studio .sx-empty { color: var(--at-muted); }

/* ---------- popovers and drawers ---------- */
body.ws-studio .sx-pop {
  background: var(--at-surface);
  border-color: var(--at-line);
  border-radius: var(--at-radius);
  box-shadow: var(--at-shadow-pop);
}
body.ws-studio .sx-pop-i:hover { background: var(--at-hover); }
body.ws-studio .sx-pop-i.on { color: var(--at-indigo); }

body.ws-studio .sx-drawer { background: var(--at-surface); border-left: 1px solid var(--at-line); }
body.ws-studio .sx-drawer-h { border-bottom: 1px solid var(--at-line); }
body.ws-studio .sx-modal-bg { background: rgba(15,23,42,0.45); }
body.ws-studio .sx-modal { background: var(--at-surface); border-radius: var(--at-radius); box-shadow: var(--at-shadow-pop); }

/* ---------- date picker ---------- */
body.ws-studio .sx-dp-btn { border-color: var(--at-line); background: var(--at-surface); color: var(--at-ink); border-radius: var(--at-radius-sm); }
body.ws-studio .sx-dp { background: var(--at-surface); border-radius: var(--at-radius); }
body.ws-studio .sx-cal-g button.in { background: var(--at-indigo-soft); color: var(--at-indigo); }
body.ws-studio .sx-cal-g button.edge { background: var(--at-indigo); color: #fff; }

/* ---------- filter bar ---------- */
body.ws-studio .sx-fb { background: var(--at-surface); border-bottom-color: var(--at-line); }
body.ws-studio .sx-fb-c { border-right-color: var(--at-line); color: var(--at-ink); }
body.ws-studio .sx-fb-c:hover { background: var(--at-hover); }
body.ws-studio .sx-fb-c.set small { color: var(--at-indigo); }

/* ---------- home redesign ---------- */
body.ws-studio .ath-home { max-width: 1320px; margin: 0 auto; }
body.ws-studio .ath-home-wrap { display: flex; flex-direction: column; gap: 22px; }

body.ws-studio .ath-command-header {
  background: transparent;
  border-bottom: 0;
  padding: 0;
  min-height: 0;
}

body.ws-studio .ath-welcome {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: 8px 0 6px;
}
body.ws-studio .ath-welcome h2 { color: var(--at-ink); font-size: 26px; font-weight: 700; margin: 4px 0; }
body.ws-studio .ath-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--at-teal);
}
body.ws-studio .ath-scope-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--at-slate);
}
body.ws-studio .ath-actions { display: flex; gap: 10px; flex-wrap: wrap; }

body.ws-studio .ath-attention {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--at-radius);
  color: #9a3412;
  font-size: 13px;
}
:root[data-theme="dark"] body.ws-studio .ath-attention { background: #451a03; border-color: #78350f; color: #fdba74; }
body.ws-studio .ath-attention a { color: var(--at-amber); font-weight: 600; text-decoration: none; }
body.ws-studio .ath-attention a:hover { text-decoration: underline; }

body.ws-studio .ath-performance {
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  box-shadow: var(--at-shadow);
  overflow: hidden;
}
body.ws-studio .ath-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--at-line-2);
}
body.ws-studio .ath-section-title h2 { margin: 0; font-size: 15px; font-weight: 700; color: var(--at-ink); }
body.ws-studio .ath-section-title a { font-size: 12.5px; color: var(--at-indigo); text-decoration: none; }
body.ws-studio .ath-section-title a:hover { text-decoration: underline; }

body.ws-studio .ath-pulse {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
body.ws-studio .ath-kpi {
  padding: 18px;
  border-right: 1px solid var(--at-line-2);
  border-bottom: 1px solid var(--at-line-2);
}
body.ws-studio .ath-kpi:nth-child(4n) { border-right: 0; }
body.ws-studio .ath-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--at-muted);
  margin-bottom: 8px;
}
body.ws-studio .ath-status-pill {
  padding: 2px 8px;
  background: var(--at-line-2);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  color: var(--at-slate);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
body.ws-studio .ath-kpi-value {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
body.ws-studio .ath-kpi-value b { font-size: 28px; font-weight: 700; color: var(--at-ink); }
body.ws-studio .ath-change {
  font-size: 12px;
  font-weight: 700;
  color: var(--at-teal);
}
body.ws-studio .ath-kpi-foot { margin-top: 8px; font-size: 12px; color: var(--at-muted); }
body.ws-studio .ath-kpi-foot button { background: transparent; border: 0; padding: 0; color: var(--at-indigo); cursor: pointer; font-size: 12px; }

body.ws-studio .ath-home-analysis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
body.ws-studio .ath-surface {
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  box-shadow: var(--at-shadow);
  padding: 0;
  overflow: hidden;
}
body.ws-studio .ath-strategy,
body.ws-studio .ath-briefing { min-height: 420px; }

body.ws-studio .ath-meta { font-size: 12px; color: var(--at-muted); }

body.ws-studio .ath-heat {
  display: grid;
  grid-template-columns: 34px repeat(8, 1fr);
  gap: 3px;
  padding: 16px 18px;
}
body.ws-studio .ath-heat small {
  font-size: 10px;
  color: var(--at-muted);
  text-align: center;
  padding: 4px 0;
}
body.ws-studio .ath-heat button {
  aspect-ratio: 1;
  border: 0;
  border-radius: var(--at-radius-sm);
  background: var(--at-line-2);
  color: var(--at-muted);
  font-size: 10px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
body.ws-studio .ath-heat button.measured {
  background: color-mix(in srgb, var(--at-teal-soft) var(--heat, 0%), var(--at-line-2));
  color: var(--at-teal-2);
  font-weight: 600;
}
body.ws-studio .ath-heat button:hover { outline: 2px solid var(--at-indigo); }
body.ws-studio .ath-heat-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 16px;
  font-size: 11px;
  color: var(--at-muted);
}
body.ws-studio .ath-heat-legend i {
  width: 60px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--at-line-2), var(--at-teal));
}

body.ws-studio .ath-schedule-well {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--at-canvas-2);
  border-top: 1px solid var(--at-line);
}
body.ws-studio .ath-schedule-well small { display: block; color: var(--at-muted); font-size: 11px; margin-top: 2px; }
body.ws-studio .ath-schedule-well b { color: var(--at-ink); font-size: 15px; }

body.ws-studio .ath-brief-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 16px 18px;
  scrollbar-width: thin;
}
body.ws-studio .ath-brief-slide {
  flex: 0 0 320px;
  scroll-snap-align: start;
  background: var(--at-surface-2);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  padding: 16px;
}
body.ws-studio .ath-insight-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--at-indigo);
}
body.ws-studio .ath-brief-slide h3 { margin: 8px 0 4px; font-size: 15px; color: var(--at-ink); }
body.ws-studio .ath-brief-slide p { font-size: 13px; color: var(--at-slate); line-height: 1.55; margin: 6px 0; }

body.ws-studio .ath-paddles { display: flex; gap: 6px; }
body.ws-studio .ath-brief-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 18px 14px;
}
body.ws-studio .ath-brief-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  background: var(--at-line-2);
  cursor: pointer;
  padding: 0;
}
body.ws-studio .ath-brief-dots button.on { background: var(--at-indigo); }

body.ws-studio .ath-brief-filters {
  display: flex;
  gap: 4px;
  padding: 0 18px;
}
body.ws-studio .ath-brief-filters button {
  padding: 5px 12px;
  border: 1px solid var(--at-line);
  background: var(--at-surface);
  border-radius: 999px;
  font-size: 12px;
  color: var(--at-slate);
  cursor: pointer;
}
body.ws-studio .ath-brief-filters button.on { background: var(--at-indigo); color: #fff; border-color: var(--at-indigo); }

body.ws-studio .ath-activity { border-top: 1px solid var(--at-line); padding: 14px 18px; }
body.ws-studio .ath-activity-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
body.ws-studio .ath-activity-tabs button {
  padding: 5px 12px;
  border: 1px solid var(--at-line);
  background: var(--at-surface);
  border-radius: 999px;
  font-size: 12px;
  color: var(--at-slate);
  cursor: pointer;
}
body.ws-studio .ath-activity-tabs button.on { background: var(--at-slate); color: #fff; border-color: var(--at-slate); }

body.ws-studio .ath-activity-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--at-surface-2);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius-sm);
  font-size: 12.5px;
  color: var(--at-slate);
  text-decoration: none;
  margin: 0 6px 6px 0;
}
body.ws-studio .ath-activity-chip:hover { border-color: var(--at-indigo); }
body.ws-studio .ath-activity-chip b { color: var(--at-ink); }

body.ws-studio .ath-stream { padding-bottom: 18px; }
body.ws-studio .ath-stream-controls {
  display: flex;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--at-line-2);
  flex-wrap: wrap;
}
body.ws-studio .ath-stream-tabs { display: flex; gap: 4px; }
body.ws-studio .ath-stream-tabs button {
  padding: 5px 12px;
  border: 1px solid var(--at-line);
  background: var(--at-surface);
  border-radius: 999px;
  font-size: 12px;
  color: var(--at-slate);
  cursor: pointer;
}
body.ws-studio .ath-stream-tabs button.on { background: var(--at-slate); color: #fff; border-color: var(--at-slate); }

body.ws-studio .ath-content-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 16px 18px;
}
body.ws-studio .ath-post-card {
  background: var(--at-surface-2);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
}
body.ws-studio .ath-post-card:hover { box-shadow: var(--at-shadow-2); transform: translateY(-2px); }
body.ws-studio .ath-post-media {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--at-canvas-2);
  display: grid;
  place-items: center;
}
body.ws-studio .ath-post-media img { width: 100%; height: 100%; object-fit: cover; }
body.ws-studio .ath-post-state {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  background: rgba(15,23,42,0.75);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}
body.ws-studio .ath-post-info { padding: 12px; }
body.ws-studio .ath-post-info b { color: var(--at-ink); font-size: 13px; }
body.ws-studio .ath-post-info small { display: block; color: var(--at-muted); font-size: 11px; margin-bottom: 6px; }
body.ws-studio .ath-post-info p { font-size: 12.5px; color: var(--at-slate); margin: 0 0 10px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.ws-studio .ath-post-info footer { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
body.ws-studio .ath-stream-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid var(--at-line-2);
  font-size: 12px;
  color: var(--at-muted);
}

body.ws-studio .ath-history { width: 100%; height: auto; }
body.ws-studio .ath-history .gl { stroke: var(--at-line); }
body.ws-studio .ath-history text { fill: var(--at-muted); font-size: 11px; }
body.ws-studio .ath-history circle { fill: var(--at-indigo); }
body.ws-studio .ath-history polyline { stroke: var(--at-indigo); }
body.ws-studio .ath-history polygon { fill: var(--at-indigo); opacity: 0.08; }

body.ws-studio .ath-secondary { background: var(--at-surface); border: 1px solid var(--at-line); border-radius: var(--at-radius); }
body.ws-studio .ath-secondary summary { padding: 14px 18px; font-weight: 600; color: var(--at-ink); cursor: pointer; }
body.ws-studio .ath-secondary > div { padding: 0 18px 18px; }
body.ws-studio .ath-tool-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- preview popover ---------- */
body.ws-studio .ath-post-pop {
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  box-shadow: var(--at-shadow-pop);
  width: 340px;
  overflow: hidden;
}
body.ws-studio .ath-post-pop header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--at-line-2);
}
body.ws-studio .ath-preview-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--at-line-2);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--at-slate);
}
body.ws-studio .ath-post-pop header b { color: var(--at-ink); font-size: 13px; }
body.ws-studio .ath-post-pop header small { display: block; color: var(--at-muted); font-size: 11px; }
body.ws-studio .ath-preview-media { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
body.ws-studio .ath-preview-caption { padding: 12px; font-size: 13px; color: var(--at-text); line-height: 1.5; margin: 0; }
body.ws-studio .ath-preview-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 12px 12px;
}
body.ws-studio .ath-preview-metrics span { text-align: center; }
body.ws-studio .ath-preview-metrics b { display: block; color: var(--at-ink); font-size: 14px; }
body.ws-studio .ath-preview-metrics small { color: var(--at-muted); font-size: 10px; }
body.ws-studio .ath-preview-tone {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
}
body.ws-studio .ath-preview-tone.positive { background: #d1fae5; color: #065f46; }
body.ws-studio .ath-preview-tone.negative { background: #ffe4e6; color: #9f1239; }
body.ws-studio .ath-preview-tone.neutral { background: var(--at-line-2); color: var(--at-slate); }
:root[data-theme="dark"] body.ws-studio .ath-preview-tone.positive { background: #064e3b; color: #d1fae5; }
:root[data-theme="dark"] body.ws-studio .ath-preview-tone.negative { background: #881337; color: #ffe4e6; }
body.ws-studio .ath-preview-note { display: block; padding: 8px 12px; font-size: 11px; color: var(--at-muted); border-top: 1px solid var(--at-line-2); }
body.ws-studio .ath-post-pop footer {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--at-line-2);
}

/* ---------- monitor / political overview ---------- */
body.ws-studio .pol-research { max-width: 1320px; margin: 0 auto; }
body.ws-studio .pol-context {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: 16px 18px;
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  margin-bottom: 22px;
}
body.ws-studio .pol-context h2 { margin: 6px 0; font-size: 20px; color: var(--at-ink); }
body.ws-studio .pol-context p { color: var(--at-muted); font-size: 13px; margin: 0; }
body.ws-studio .pol-public-search {
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  padding: 16px 18px;
  margin-bottom: 22px;
}
body.ws-studio .pol-public-search label { display: block; font-size: 13px; font-weight: 600; color: var(--at-ink); margin-bottom: 8px; }
body.ws-studio .pol-public-search div { display: flex; gap: 10px; }
body.ws-studio .pol-public-search small { display: block; color: var(--at-muted); font-size: 11px; margin-top: 8px; }
body.ws-studio .pol-scope {
  background: var(--at-canvas-2);
  border-radius: var(--at-radius);
  padding: 14px 18px;
  font-size: 12.5px;
  color: var(--at-slate);
  margin-bottom: 22px;
}
body.ws-studio .pol-progress {
  padding: 10px 0;
  font-size: 12px;
  color: var(--at-muted);
}
body.ws-studio .pol-topic-card {
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
body.ws-studio .pol-topic-card:hover { box-shadow: var(--at-shadow-2); }
body.ws-studio .pol-topic-card.on { border-color: var(--at-indigo); box-shadow: 0 0 0 3px var(--at-indigo-soft); }
body.ws-studio .pol-topic-card strong { display: block; font-size: 22px; color: var(--at-ink); margin: 6px 0 2px; }
body.ws-studio .pol-topic-card small { color: var(--at-muted); font-size: 12px; }
body.ws-studio .pol-tone-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin: 10px 0; }
body.ws-studio .pol-tone-bar i.positive { background: var(--at-pos); }
body.ws-studio .pol-tone-bar i.neutral { background: var(--at-faint); }
body.ws-studio .pol-tone-bar i.negative { background: var(--at-neg); }
body.ws-studio .pol-tone-bar i.unread { background: var(--at-line); }
body.ws-studio .pol-tone-legend { display: flex; gap: 14px; font-size: 12px; color: var(--at-muted); margin: 10px 0 18px; }
body.ws-studio .pol-tone-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; }
body.ws-studio .pol-evidence-scroll { overflow-x: auto; }

/* ---------- publish calendar ---------- */
body.ws-studio .sx-calm {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  padding: 16px;
}
body.ws-studio .sx-calm .dh {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--at-muted);
  padding: 8px;
  text-align: center;
}
body.ws-studio .sx-calm .d {
  min-height: 140px;
  background: var(--at-surface-2);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius-sm);
  padding: 8px;
}
body.ws-studio .sx-calm .d.out { opacity: 0.5; background: var(--at-canvas-2); }
body.ws-studio .sx-calm .d.today { border-color: var(--at-indigo); box-shadow: 0 0 0 2px var(--at-indigo-soft); }
body.ws-studio .sx-calm .dn { font-size: 13px; font-weight: 600; color: var(--at-ink); }
body.ws-studio .sx-calm .add {
  float: right;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--at-line);
  color: var(--at-slate);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
body.ws-studio .sx-calm .add:hover { background: var(--at-indigo); color: #fff; }
body.ws-studio .sx-chip {
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius-sm);
  padding: 6px 8px;
  font-size: 11.5px;
  color: var(--at-slate);
  margin-top: 6px;
}
body.ws-studio .sx-chip.pub { border-left: 3px solid var(--at-teal); }
body.ws-studio .sx-chip.draft { border-left: 3px solid var(--at-amber); }
body.ws-studio .sx-chip.pend { border-left: 3px solid var(--at-indigo); }
body.ws-studio .sx-chip.ext { border-left: 3px solid var(--at-faint); }
body.ws-studio .sx-chip.besttime { background: var(--at-teal-soft); color: var(--at-teal-2); border-color: var(--at-teal-soft); }

/* ---------- inbox ---------- */
body.ws-studio .sx-inbox { max-width: 900px; margin: 0 auto; }
body.ws-studio .sx-msg {
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--at-shadow);
}
body.ws-studio .sx-msg.done { background: var(--at-surface-2); opacity: 0.85; }
body.ws-studio .sx-msg-h { margin-bottom: 8px; }
body.ws-studio .sx-msg-h b { color: var(--at-ink); }
body.ws-studio .sx-msg-b { color: var(--at-text); font-size: 13.5px; line-height: 1.55; }
body.ws-studio .sx-msg-f { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
body.ws-studio .sx-msg-f .grow { flex: 1; }

/* ---------- dashboards library ---------- */
body.ws-studio .fk-library { padding: 22px; }
body.ws-studio .ath-dashboard-library {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
}
body.ws-studio .ath-dashboard-library-intro {
  background: var(--at-indigo-soft);
  border-radius: var(--at-radius);
  padding: 22px;
  color: var(--at-indigo);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}
body.ws-studio .ath-dashboard-library-intro button { margin-top: 18px; }
body.ws-studio .fk-library-list { display: flex; flex-direction: column; gap: 16px; }
body.ws-studio .fk-library-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius);
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s;
}
body.ws-studio .fk-library-card:hover { box-shadow: var(--at-shadow-2); border-color: var(--at-indigo); }
body.ws-studio .fk-library-card b { color: var(--at-ink); font-size: 15px; }
body.ws-studio .fk-library-profiles { display: block; color: var(--at-muted); font-size: 12px; margin-top: 2px; }
body.ws-studio .fk-library-template {
  background: var(--at-surface);
  border: 1px dashed var(--at-line);
  border-radius: var(--at-radius);
  padding: 14px;
  text-align: left;
  cursor: pointer;
}
body.ws-studio .fk-library-template:hover { border-color: var(--at-indigo); background: var(--at-hover); }
body.ws-studio .fk-library-template b { color: var(--at-ink); font-size: 14px; }
body.ws-studio .fk-library-template span { display: block; color: var(--at-muted); font-size: 12px; margin-top: 2px; }

body.ws-studio .fk { background: var(--at-canvas); }
body.ws-studio .fk-col { background: var(--at-surface); border-right-color: var(--at-line); }
body.ws-studio .fk-col-h { border-bottom-color: var(--at-line); }
body.ws-studio .fk-dsel { color: var(--at-ink); font-weight: 700; }
body.ws-studio .fk-prof { border-radius: var(--at-radius-sm); }
body.ws-studio .fk-prof:hover { background: var(--at-hover); }
body.ws-studio .fk-tab { background: transparent; color: var(--at-muted); border-bottom: 2px solid transparent; }
body.ws-studio .fk-tab.on { color: var(--at-indigo); border-bottom-color: var(--at-indigo); }
body.ws-studio .fk-canvas { background: var(--at-canvas-2); }
body.ws-studio .fk-card { background: var(--at-surface); border-color: var(--at-line); border-radius: var(--at-radius); box-shadow: var(--at-shadow); }
body.ws-studio .fk-card-h h4 { color: var(--at-ink); font-weight: 700; }

/* ---------- reports ---------- */
body.ws-studio .ath-report-category {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
  padding: 18px;
}
body.ws-studio .ath-report-category b { color: var(--at-ink); }

/* ---------- charts ---------- */
body.ws-studio .ch-tip {
  background: var(--at-ink);
  color: #fff;
  border-radius: var(--at-radius-sm);
  padding: 8px 10px;
  font-size: 12px;
  box-shadow: var(--at-shadow-pop);
}
body.ws-studio .ch-big { color: var(--at-ink); font-weight: 700; }
body.ws-studio .ch-sub { color: var(--at-muted); }
body.ws-studio .ath-signed-bars .ath-bar-row:hover { background: var(--at-hover); }
body.ws-studio .ath-bar-track { background: var(--at-line-2); }
body.ws-studio .ath-zero-line { border-color: var(--at-slate); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  body.ws-studio .ath-pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.ws-studio .ath-home-analysis { grid-template-columns: 1fr; }
  body.ws-studio .ath-dashboard-library { grid-template-columns: 1fr; }
  body.ws-studio .ath-report-category { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body.ws-studio .ath-pulse { grid-template-columns: 1fr; }
  body.ws-studio .ath-welcome { flex-direction: column; align-items: flex-start; }
  body.ws-studio .ath-content-list { grid-template-columns: 1fr; }
  body.ws-studio .sx-calm { grid-template-columns: 1fr; }
  body.ws-studio .sx-calm .dh { display: none; }
  body.ws-studio .sx-calm .d { min-height: auto; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  body.ws-studio .ath-post-card:hover,
  body.ws-studio .fk-library-card:hover,
  body.ws-studio .pol-topic-card:hover { transform: none; }
}
