/* Athena Studio — complete editorial redesign (Nov 2026).
   Loaded last. Replaces prior Studio positioning with one coherent layer:
   deep ink rail, warm canvas, white surfaces, indigo actions, teal data accent.
   Scoped to body.ws-studio. */

/* ---------- tokens ---------- */
body.ws-studio {
  --st-ink: #0f172a;
  --st-slate: #334155;
  --st-slate-2: #475569;
  --st-text: #1e293b;
  --st-muted: #64748b;
  --st-faint: #94a3b8;
  --st-canvas: #f4f5f9;
  --st-canvas-2: #eaedf5;
  --st-surface: #ffffff;
  --st-surface-2: #f6f7fb;
  --st-line: #dde2ee;
  --st-line-2: #eaeef5;
  --st-hover: #edf0fa;
  --st-indigo: #4338ca;
  --st-indigo-2: #3730a3;
  --st-indigo-soft: #e0e7ff;
  --st-teal: #0d9488;
  --st-teal-2: #0f766e;
  --st-teal-soft: #ccfbf1;
  --st-amber: #d97706;
  --st-rose: #dc2626;
  --st-pos: #10b981;
  --st-neg: #f43f5e;
  --st-ai: #7c3aed;
  --st-ai-soft: #ede9fe;

  --st-rail: #0f172a;
  --st-rail-2: #1e293b;
  --st-rail-ink: #cbd5e1;
  --st-rail-active: #334155;
  --st-rail-accent: #14b8a6;

  --st-radius: 16px;
  --st-radius-sm: 8px;
  --st-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 1px 3px rgba(15,23,42,0.04);
  --st-shadow-2: 0 4px 14px rgba(15,23,42,0.08);
  --st-shadow-pop: 0 18px 40px rgba(15,23,42,0.18);

  --st-rail-w: 64px;
  --st-rail-w-wide: 206px;
  --st-mob-h: 64px;

  --st-font: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Tamil", sans-serif;
  --sx-bg: var(--st-canvas);
  --sx-card: var(--st-surface);
  --sx-line: var(--st-line);
  --sx-line-2: var(--st-line-2);
  --sx-hover: var(--st-hover);
  --sx-ink: var(--st-ink);
  --sx-text: var(--st-text);
  --sx-muted: var(--st-muted);
  --sx-blue: var(--st-link);
  --sx-blue-soft: var(--st-indigo-soft);
  --sx-font: var(--st-font);
  --fk-canvas: var(--st-canvas);
  --fk-card: var(--st-surface);
  --fk-col: var(--st-surface);
  --fk-tab: var(--st-surface-2);
  --st-link: #4338ca;
  --chart-primary: #5046d9;
  --chart-grid: #dce2ef;
  font-family: var(--st-font);
}

:root[data-theme="dark"] body.ws-studio {
  --st-ink: #f8fafc;
  --st-slate: #cbd5e1;
  --st-slate-2: #94a3b8;
  --st-text: #e2e8f0;
  --st-muted: #94a3b8;
  --st-faint: #64748b;
  --st-canvas: #0b1120;
  --st-canvas-2: #111827;
  --st-surface: #111827;
  --st-surface-2: #1f2937;
  --st-line: #374151;
  --st-line-2: #1f2937;
  --st-hover: #1f2937;
  --st-indigo: #6366f1;
  --st-indigo-2: #818cf8;
  --st-indigo-soft: #1e1b4b;
  --st-teal: #14b8a6;
  --st-teal-2: #2dd4bf;
  --st-teal-soft: #134e4a;
  --st-amber: #fbbf24;
  --st-rose: #fb7185;
  --st-pos: #34d399;
  --st-neg: #fb7185;
  --st-ai: #a78bfa;
  --st-ai-soft: #2e1065;
  --st-rail: #020617;
  --st-rail-2: #0f172a;
  --st-rail-ink: #94a3b8;
  --st-rail-active: #334155;
  --st-link: #b5b8ff;
  --chart-primary: #a3a2ff;
  --chart-grid: #35415d;
}

/* ---------- app shell reset ---------- */
body.ws-studio { background: var(--st-canvas); color: var(--st-text); }
body.ws-studio #app { background: var(--st-canvas); }
body.ws-studio .main { background: var(--st-canvas); }

/* hide legacy mobile rail and bottom chrome */
body.ws-studio .mob-nav,
body.ws-studio #mob-nav { display: none !important; }

/* ---------- rail ---------- */
body.ws-studio .sidebar.sx-rail {
  width: var(--st-rail-w);
  min-width: var(--st-rail-w);
  background: var(--st-rail);
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 10px 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 40;
}

.sx-rail-logo {
  width: 40px; height: 40px;
  border-radius: var(--st-radius-sm);
  background: rgba(255,255,255,0.08);
  display: grid; place-items: center;
}
.sx-rail-logo img { width: 22px; height: 25px; filter: brightness(1.25); }

.sx-rail-ws {
  width: 40px; height: 40px;
  border-radius: var(--st-radius-sm);
  background: var(--st-indigo);
  color: #fff;
  font-weight: 700; font-size: 14px;
  display: grid; place-items: center;
}

.sx-rail-i {
  width: 40px; height: 36px;
  border-radius: var(--st-radius-sm);
  color: var(--st-rail-ink);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  border: 0; background: transparent;
  cursor: pointer;
  position: relative;
}
.sx-rail-i:hover { background: var(--st-rail-active); color: #fff; }
.sx-rail-i.on { background: var(--st-rail-active); color: #fff; box-shadow: inset 3px 0 0 var(--st-rail-accent); }

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

.sx-rail-sep { width: 28px; height: 1px; background: rgba(255,255,255,0.12); margin: 6px 0; }

.ath-rail-actions { display: flex; flex-direction: column; gap: 4px; align-items: center; margin-bottom: 8px; width: 100%; }
#rail-compose.sx-rail-i { background: var(--st-indigo); color: #fff; }
#rail-compose.sx-rail-i:hover { background: var(--st-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: 4px; }
.sx-rail-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--st-rose);
}

/* wide rail */
@media (min-width: 1120px) {
  body.ws-studio .sidebar.sx-rail {
    width: var(--st-rail-w-wide); min-width: var(--st-rail-w-wide);
    align-items: stretch; padding: 12px 10px;
  }
  .sx-rail-logo { width: auto; display: flex; 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(--st-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; }
}

/* ---------- mobile bottom nav ---------- */
.ath-mob-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--st-mob-h);
  background: var(--st-surface);
  border-top: 1px solid var(--st-line);
  justify-content: space-around;
  align-items: center;
  z-index: 50;
  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(--st-muted); font-size: 10px;
  padding: 6px 8px; text-decoration: none;
  cursor: pointer;
}
.ath-mob-bar a.on, .ath-mob-bar button.on { color: var(--st-indigo); }
.ath-mob-bar svg { width: 22px; height: 22px; }

/* mobile more sheet */
.ath-mob-sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15,23,42,0.35);
  align-items: flex-end;
  justify-content: center;
}
.ath-mob-sheet.open { display: flex; }
.ath-mob-sheet-body {
  width: 100%;
  max-height: 85vh;
  background: var(--st-surface);
  border-radius: var(--st-radius) var(--st-radius) 0 0;
  box-shadow: var(--st-shadow-pop);
  padding: 16px 16px 32px;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.2s ease-out;
}
.ath-mob-sheet.open .ath-mob-sheet-body { transform: translateY(0); }
.ath-mob-sheet-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 12px; border-bottom: 1px solid var(--st-line); margin-bottom: 12px;
}
.ath-mob-sheet-head h3 { margin: 0; font-size: 16px; color: var(--st-ink); }
.ath-mob-sheet-close {
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: var(--st-canvas-2); color: var(--st-slate);
  display: grid; place-items: center; cursor: pointer;
}
.ath-mob-sheet-group { margin-bottom: 18px; }
.ath-mob-sheet-group h4 {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--st-faint); margin: 0 0 8px;
}
.ath-mob-sheet-group a, .ath-mob-sheet-group button {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 12px;
  border-radius: var(--st-radius-sm);
  color: var(--st-text); text-decoration: none;
  background: transparent; border: 0; font-size: 14px; text-align: left; cursor: pointer;
}
.ath-mob-sheet-group a:hover, .ath-mob-sheet-group button:hover { background: var(--st-hover); }
.ath-mob-sheet-group a.on, .ath-mob-sheet-group button.on { background: var(--st-indigo-soft); color: var(--st-indigo); font-weight: 600; }
.ath-mob-sheet-group svg { color: var(--st-muted); }

@media (max-width: 768px) {
  body.ws-studio .sidebar.sx-rail { display: none !important; }
  body.ws-studio .ath-mob-bar { display: flex; }
  body.ws-studio #main { height: calc(100vh - var(--st-mob-h)); }
  body.ws-studio .main { padding-bottom: var(--st-mob-h); }
}

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

body.ws-studio .sx-btn {
  border-radius: var(--st-radius-sm); border: 1px solid var(--st-line);
  background: var(--st-surface); color: var(--st-ink);
  font-weight: 500; height: 34px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
body.ws-studio .sx-btn:hover { background: var(--st-hover); }
body.ws-studio .sx-btn.p { background: var(--st-indigo); border-color: var(--st-indigo); color: #fff; }
body.ws-studio .sx-btn.p:hover { background: var(--st-indigo-2); }
body.ws-studio .sx-btn.ai { background: var(--st-ai-soft); border-color: var(--st-ai-soft); color: var(--st-ai); }

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

body.ws-studio .sx-card {
  background: var(--st-surface); border: 1px solid var(--st-line);
  border-radius: var(--st-radius); box-shadow: var(--st-shadow);
}
body.ws-studio .sx-card-h h3 { color: var(--st-ink); font-size: 15px; font-weight: 700; }
body.ws-studio .sx-card-h p { color: var(--st-muted); }

body.ws-studio .sx-tag {
  background: var(--st-line-2); color: var(--st-slate);
  border-radius: 999px; padding: 2px 10px; font-size: 12px;
}
body.ws-studio .sx-tag.blue { background: var(--st-indigo-soft); color: var(--st-indigo); }
body.ws-studio .sx-tag.pos { background: #d1fae5; color: #065f46; }
body.ws-studio .sx-tag.neg { background: #ffe4e6; color: #9f1239; }
:root[data-theme="dark"] body.ws-studio .sx-tag.pos { background: #064e3b; color: #d1fae5; }
:root[data-theme="dark"] body.ws-studio .sx-tag.neg { background: #881337; color: #ffe4e6; }

/* ---------- home redesign ---------- */
body.ws-studio .ath-home {
  width: 100%; max-width: 1510px; margin: 0 auto;
  padding: clamp(16px, 2.2vw, 32px) !important;
  background: var(--st-canvas);
}
body.ws-studio .ath-command-header {
  height: auto;
  padding-inline: clamp(16px, 2.2vw, 32px);
}
body.ws-studio .ath-welcome {
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap;
  position: relative; isolation: isolate; overflow: hidden;
  gap: 16px; margin-bottom: 16px; padding: clamp(20px, 2.6vw, 36px);
  border: 1px solid #3b4679; border-radius: 20px; color: #fff;
  background: radial-gradient(ellipse at 92% 0%, #42418c 0%, transparent 57%),
    radial-gradient(ellipse at 100% 125%, #225b62 0%, transparent 64%), #151d39;
}
body.ws-studio .ath-welcome::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 0 0 0 52%;
  background: repeating-radial-gradient(ellipse at 100% 130%, transparent 0 20px, #cbd4ff19 21px 22px, transparent 23px 36px);
  mask-image: linear-gradient(90deg, transparent, #000);
}
body.ws-studio .ath-welcome h2 { color: #fff; font-size: clamp(30px, 3.6vw, 53px); font-weight: 650; letter-spacing: -.05em; line-height: 1.05; margin: 6px 0 10px; }
body.ws-studio .ath-welcome p { color: #d2dcf6; font-size: 13px; line-height: 1.6; }
body.ws-studio .ath-welcome .ath-workspace-name { color: #a2e6d8; font-size: 12px; font-weight: 650; letter-spacing: .02em; }
body.ws-studio .ath-welcome .sx-btn { background: #f4f4ff; color: #262155; border-color: #fff; }
body.ws-studio .ath-welcome .sx-btn:hover { background: #e5e5ff; }
body.ws-studio .ath-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--st-teal);
}
body.ws-studio .ath-scope-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; background: var(--st-surface);
  border: 1px solid var(--st-line); border-radius: 999px;
  font-size: 12px; color: var(--st-slate);
}
body.ws-studio .ath-actions { display: flex; gap: 10px; flex-wrap: wrap; }
body.ws-studio .ath-actions:has([data-sync][hidden]) { display: none; }

body.ws-studio .ath-attention {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 16px;
  background: #fff7ed; border: 1px solid #fed7aa;
  border-radius: var(--st-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(--st-amber); font-weight: 600; text-decoration: none; }

/* home grid */
body.ws-studio .ath-layout {
  display: grid;
  gap: 18px;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(258px, 310px);
  grid-template-areas: "performance updates" "main updates";
}

body.ws-studio .ath-main-col { grid-area: main; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
body.ws-studio .ath-side-col { grid-area: updates; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
body.ws-studio .ath-performance-card { grid-area: performance; min-width: 0; }

body.ws-studio .ath-card {
  background: var(--st-surface); border: 1px solid var(--st-line);
  border-radius: var(--st-radius); box-shadow: var(--st-shadow);
  overflow: hidden;
}
body.ws-studio .ath-card-h {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; padding: 17px 18px; border-bottom: 1px solid var(--st-line-2);
}
body.ws-studio .ath-card-h h3 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.025em; color: var(--st-ink); }
body.ws-studio .ath-card-h p { margin: 3px 0 0; font-size: 12px; color: var(--st-muted); }
body.ws-studio .ath-card-h a { font-size: 12px; font-weight: 600; color: var(--st-link); text-decoration: none; white-space: nowrap; }
body.ws-studio .ath-card-b { padding: 16px 18px; }

/* performance / KPI */
body.ws-studio .ath-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
body.ws-studio .ath-kpi-card {
  background: var(--st-surface-2); border: 1px solid var(--st-line-2);
  border-radius: 12px; padding: 13px;
  min-width: 0;
}
body.ws-studio .ath-kpi-card header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 550; color: var(--st-slate-2); margin-bottom: 5px;
}
body.ws-studio .ath-kpi-card b {
  display: block; font-size: clamp(20px, 2vw, 32px); font-weight: 650; color: var(--st-ink);
  font-variant-numeric: tabular-nums; letter-spacing: -.045em; line-height: 1.15; overflow-wrap: anywhere;
}
body.ws-studio .ath-kpi-card footer { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 11px; color: var(--st-muted); }
body.ws-studio .ath-kpi-card footer:not(:empty) { margin-top: 7px; }
body.ws-studio .ath-kpi-delta { border-radius: 6px; padding: 1px 6px; background: var(--st-line); color: var(--st-slate); font-weight: 650; }
body.ws-studio .ath-kpi-delta.up { background: var(--st-teal-soft); color: var(--st-teal-2); }
body.ws-studio .ath-kpi-delta.down { background: color-mix(in srgb, var(--st-rose) 13%, var(--st-surface)); color: var(--st-rose); }
body.ws-studio .ath-more-metrics summary, body.ws-studio .ath-chart-data summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--st-link); padding-block: 8px; }
body.ws-studio .ath-more-metrics .ath-kpi-grid { margin-top: 4px; }
body.ws-studio .ath-compare-note { color: var(--st-muted); font-size: 11.5px; margin: 4px 0 0; }

/* chart card */
body.ws-studio .ath-chart-card { min-height: 320px; }
body.ws-studio .ath-chart-canvas { min-height: 120px; color: var(--st-muted); }
body.ws-studio .ath-trend-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; border-top: 1px solid var(--st-line-2); padding-top: 14px; margin-top: 14px; }
body.ws-studio .ath-trend-head h4 { margin: 0; color: var(--st-ink); font-size: 15px; }
body.ws-studio .ath-trend-head p { margin: 3px 0 6px; color: var(--st-muted); font-size: 12px; }
body.ws-studio .ath-chart-key { display: inline-flex; align-items: center; gap: 5px; color: var(--st-slate-2); font-size: 12px; }
body.ws-studio .ath-chart-key i { width: 8px; height: 8px; background: var(--chart-primary); border-radius: 50%; }

/* activity */
body.ws-studio .ath-activity-list { display: flex; flex-direction: column; gap: 8px; }
body.ws-studio .ath-activity-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-radius: var(--st-radius-sm);
  background: var(--st-surface-2); border: 1px solid var(--st-line);
  text-decoration: none; color: var(--st-text); font-size: 13px;
}
body.ws-studio .ath-activity-row:hover { border-color: var(--st-indigo); }
body.ws-studio .ath-activity-row small { color: var(--st-muted); }

/* evidence / briefing carousel */
body.ws-studio .ath-brief-carousel {
  display: flex; align-items: flex-start; gap: 0;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  padding: 0; margin: 0 14px; scrollbar-width: none;
  overscroll-behavior-inline: contain;
  height: var(--brief-height, auto);
}
body.ws-studio .ath-brief-slide {
  flex: 0 0 100%; min-width: 0; scroll-snap-align: start;
  background: var(--st-surface-2); border: 1px solid var(--st-line);
  border-radius: 12px; padding: 14px;
  min-height: 155px; max-height: 320px; overflow-y: auto;
}
body.ws-studio .ath-briefing-card .ath-card-h { border-bottom: 0; }
body.ws-studio .ath-briefing-card h3 { display: flex; align-items: center; gap: 8px; }
body.ws-studio .ath-briefing-card h3 svg { color: var(--st-ai); }
body.ws-studio .ath-brief-slide h4 { margin: 7px 0 4px; font-size: 17px; color: var(--st-ink); letter-spacing: -.02em; }
body.ws-studio .ath-brief-slide p { font-size: 13px; color: var(--st-slate); line-height: 1.55; margin: 8px 0; }
body.ws-studio .ath-brief-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--st-link);
}
body.ws-studio .ath-brief-nav { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 10px 14px; }
body.ws-studio .ath-brief-nav .ath-carousel-tools { display: flex; gap: 5px; margin: 0; }
body.ws-studio .ath-brief-nav [aria-disabled="true"] { opacity: .45; cursor: default; }
body.ws-studio .ath-brief-dots {
  display: flex; gap: 4px; padding: 0;
}
body.ws-studio .ath-brief-dots button {
  min-height: 34px; border-radius: 7px; border: 0;
  background: transparent; color: var(--st-muted); cursor: pointer;
  padding: 4px 10px; font: 600 12px var(--st-font);
}
body.ws-studio .ath-brief-dots button.on { background: var(--st-indigo-soft); color: var(--st-link); }

/* post stream */
body.ws-studio .ath-stream-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
body.ws-studio .ath-post-card {
  background: var(--st-surface-2); border: 1px solid var(--st-line);
  border-radius: var(--st-radius-sm); overflow: hidden; cursor: pointer;
}
body.ws-studio .ath-post-card:hover { box-shadow: var(--st-shadow-2); }
body.ws-studio .ath-post-media { aspect-ratio: 4/3; background: var(--st-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-info { padding: 12px; }
body.ws-studio .ath-post-info b { color: var(--st-ink); font-size: 13px; }
body.ws-studio .ath-post-info small { display: block; color: var(--st-muted); font-size: 11px; margin-bottom: 6px; }
body.ws-studio .ath-post-info p { font-size: 12.5px; color: var(--st-slate); margin: 0 0 10px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- monitor / political ---------- */
body.ws-studio .pol-layout {
  display: grid; gap: 18px;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 380px);
}
body.ws-studio .pol-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
body.ws-studio .pol-main > .ath-card { min-width: 0; }
body.ws-studio .pol-side { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
body.ws-studio .pol-side > .ath-card { min-width: 0; }
body.ws-studio .pol-chart-card { min-height: 340px; }
body.ws-studio .pol-topic-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px;
}
body.ws-studio .pol-topic-card {
  background: var(--st-surface); border: 1px solid var(--st-line);
  border-radius: var(--st-radius-sm); padding: 14px; text-align: left; cursor: pointer;
}
body.ws-studio .pol-topic-card:hover { border-color: var(--st-indigo); }
body.ws-studio .pol-topic-card.on { border-color: var(--st-indigo); box-shadow: 0 0 0 3px var(--st-indigo-soft); }
body.ws-studio .pol-topic-card strong { display: block; font-size: 22px; color: var(--st-ink); margin: 6px 0 2px; }
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(--st-teal); }
body.ws-studio .pol-tone-bar i.neutral { background: var(--st-faint); }
body.ws-studio .pol-tone-bar i.negative { background: var(--st-neg); }
body.ws-studio .pol-tone-bar i.unread { background: var(--st-line); }

/* ---------- publish calendar ---------- */
body.ws-studio .sx-calm {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px;
  background: var(--st-surface); border: 1px solid var(--st-line);
  border-radius: var(--st-radius); padding: 16px;
}
body.ws-studio .sx-calm .dh { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--st-muted); padding: 8px; text-align: center; }
body.ws-studio .sx-calm .d { min-height: 120px; background: var(--st-surface-2); border: 1px solid var(--st-line); border-radius: var(--st-radius-sm); padding: 8px; }
body.ws-studio .sx-calm .d.today { border-color: var(--st-indigo); box-shadow: 0 0 0 2px var(--st-indigo-soft); }
body.ws-studio .sx-chip { background: var(--st-surface); border: 1px solid var(--st-line); border-radius: var(--st-radius-sm); padding: 5px 8px; font-size: 11.5px; color: var(--st-slate); margin-top: 5px; }

/* ---------- inbox ---------- */
body.ws-studio .sx-inbox { max-width: 900px; margin: 0 auto; }
body.ws-studio .sx-msg {
  background: var(--st-surface); border: 1px solid var(--st-line);
  border-radius: var(--st-radius); padding: 14px 16px; margin-bottom: 12px;
  box-shadow: var(--st-shadow); cursor: pointer; outline: none;
}
body.ws-studio .sx-msg:focus-visible,
body.ws-studio .sx-msg.on { box-shadow: 0 0 0 3px var(--st-indigo-soft); border-color: var(--st-indigo); }
body.ws-studio .sx-msg.done { opacity: 0.85; }
body.ws-studio .sx-msg-h {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 10px;
}
body.ws-studio .sx-msg-meta { flex: 1; min-width: 0; }
body.ws-studio .sx-msg-sender { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
body.ws-studio .sx-msg-sender b { color: var(--st-ink); font-size: 14px; }
body.ws-studio .sx-msg-source { display: block; color: var(--st-muted); font-size: 12px; margin-top: 2px; }
body.ws-studio .sx-msg-aside { display: flex; align-items: center; gap: 8px; }
body.ws-studio .sx-msg-b { color: var(--st-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-detail { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--st-line-2); }
body.ws-studio .sx-msg-detail-b .sx-msg-detail-label { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--st-muted); margin: 0 0 8px; }
body.ws-studio .sx-msg-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- dashboards / reports ---------- */
body.ws-studio .fk-library { padding: 22px; }
body.ws-studio .fk-library-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px;
}
body.ws-studio .fk-library-list h4,
body.ws-studio .fk-library-templates h4 { font-size: 13px; color: var(--st-ink); margin: 0 0 12px; }
body.ws-studio .fk-library-card {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--st-surface); border: 1px solid var(--st-line);
  border-radius: var(--st-radius); padding: 16px 18px;
  text-decoration: none; color: inherit; cursor: pointer; margin-bottom: 10px;
}
body.ws-studio .fk-library-card:hover { border-color: var(--st-indigo); }
body.ws-studio .fk-library-profiles { display: block; font-size: 12px; color: var(--st-muted); }
body.ws-studio .fk-library-template {
  background: var(--st-surface); border: 1px dashed var(--st-line);
  border-radius: var(--st-radius); padding: 14px; text-align: left; cursor: pointer; margin-bottom: 10px;
}
body.ws-studio .fk-library-template:hover { border-color: var(--st-indigo); background: var(--st-hover); }
body.ws-studio .fk-library-template b { display: block; color: var(--st-ink); font-size: 13px; }
body.ws-studio .fk-library-template span { font-size: 12px; color: var(--st-muted); }

body.ws-studio .ath-reports-home { display: flex; flex-direction: column; gap: 18px; }
body.ws-studio .ath-report-section { background: var(--st-surface); border: 1px solid var(--st-line); border-radius: var(--st-radius); padding: 16px; }
body.ws-studio .ath-report-section.featured { background: var(--st-indigo-soft); border-color: var(--st-indigo-soft); }
body.ws-studio .ath-report-section h3,
body.ws-studio .ath-report-section h4 { margin: 0 0 10px; color: var(--st-ink); }
body.ws-studio .ath-report-section-h p { margin: 0 0 12px; font-size: 12.5px; color: var(--st-muted); }
body.ws-studio .ath-report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
body.ws-studio .ath-report-tile {
  background: var(--st-surface); border: 1px solid var(--st-line); border-radius: var(--st-radius-sm);
  padding: 16px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 8px;
}
body.ws-studio .ath-report-tile:hover { border-color: var(--st-indigo); }
body.ws-studio .ath-report-tile b { color: var(--st-ink); font-size: 14px; }
body.ws-studio .ath-report-tile span { color: var(--st-muted); font-size: 12px; }
body.ws-studio .ath-report-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
body.ws-studio .ath-report-link {
  display: flex; align-items: center; gap: 8px;
  background: var(--st-surface-2); border: 1px solid var(--st-line); border-radius: var(--st-radius-sm);
  padding: 10px 12px; text-decoration: none; color: var(--st-text); font-size: 13px;
}
body.ws-studio .ath-report-link:hover { border-color: var(--st-indigo); }

/* ---------- home helpers ---------- */
body.ws-studio .ath-activity-tabs,
body.ws-studio .ath-brief-filters,
body.ws-studio .ath-stream-tabs {
  display: inline-flex; gap: 4px;
  background: var(--st-canvas-2); border: 1px solid var(--st-line);
  border-radius: var(--st-radius-sm); padding: 3px;
  margin-bottom: 12px;
}
body.ws-studio .ath-activity-tabs button,
body.ws-studio .ath-brief-filters button,
body.ws-studio .ath-stream-tabs button {
  border: 0; background: transparent; color: var(--st-slate);
  font-size: 12px; font-weight: 500; padding: 5px 10px;
  border-radius: 5px; cursor: pointer;
}
body.ws-studio .ath-activity-tabs button.on,
body.ws-studio .ath-brief-filters button.on,
body.ws-studio .ath-stream-tabs button.on { background: var(--st-surface); color: var(--st-indigo); box-shadow: var(--st-shadow); }
body.ws-studio .ath-paddles { display: flex; gap: 6px; }
body.ws-studio .ath-paddles .sx-btn { padding: 0 8px; }
body.ws-studio .ath-alert-chip {
  display: block; padding: 10px 12px; margin: 8px 0;
  background: #fff7ed; border: 1px solid #fed7aa;
  border-radius: var(--st-radius-sm); color: #9a3412;
  text-decoration: none; font-size: 12.5px;
}
:root[data-theme="dark"] body.ws-studio .ath-alert-chip { background: #451a03; border-color: #78350f; color: #fdba74; }
body.ws-studio .ath-alert-chip b { display: block; color: var(--st-ink); }
body.ws-studio .ath-meta { color: var(--st-muted); font-size: 13px; margin: 8px 0; }
body.ws-studio .ath-banner {
  background: var(--st-indigo-soft); border: 1px solid var(--st-indigo-soft);
  border-radius: var(--st-radius); padding: 14px 16px; margin-bottom: 18px;
  color: var(--st-indigo); font-size: 13px;
}
body.ws-studio .ath-banner b { display: block; margin-bottom: 4px; color: var(--st-indigo-2); }
body.ws-studio .ath-banner .sx-btn { margin-top: 10px; }
body.ws-studio .ath-sync-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--st-line);
}
body.ws-studio .ath-sync-row:last-child { border-bottom: 0; }
body.ws-studio .ath-sync-row small { display: block; color: var(--st-muted); font-size: 11px; }
body.ws-studio .ath-history {
  display: block; width: 100%; height: auto; max-height: 240px; font-size: 13px; fill: var(--st-text);
}
body.ws-studio .ath-history text { fill: var(--st-muted); }
body.ws-studio .ath-trend-point { fill: var(--chart-primary); stroke: var(--st-surface); stroke-width: 1.5px; }
body.ws-studio .ath-trend-point:hover { r: 7px; }
body.ws-studio .ath-chart-data { margin: 4px 0 0; padding: 4px 0 0; border-top: 1px solid var(--st-line-2); }
body.ws-studio .ath-chart-data summary span { float: right; color: var(--st-muted); font-weight: 450; }
body.ws-studio .ath-chart-data > div { max-height: 240px; overflow: auto; }
body.ws-studio .ath-chart-data table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
body.ws-studio .ath-chart-data th, body.ws-studio .ath-chart-data td { padding: 7px 8px; border-bottom: 1px solid var(--st-line-2); }
body.ws-studio .ath-chart-data thead { position: sticky; top: 0; background: var(--st-surface-2); }
body.ws-studio .ath-heat {
  display: grid;
  grid-template-columns: 32px repeat(8, minmax(0, 1fr));
  gap: clamp(3px, .6vw, 8px);
}
body.ws-studio .ath-heat small { font-size: 11px; color: var(--st-muted); text-align: center; padding: 3px 0; white-space: normal; }
body.ws-studio .ath-heat button {
  height: 30px; border: 0; border-radius: 6px;
  background: var(--st-surface-2); color: var(--st-muted);
  font-size: 11px; cursor: pointer; min-width: 0; padding: 0;
}
body.ws-studio .ath-heat button.measured {
  background: color-mix(in srgb, var(--st-teal) calc(var(--heat) * 70%), var(--st-surface));
  color: var(--st-ink);
}
body.ws-studio .ath-heat button span { opacity: 1; }
body.ws-studio .ath-heat button:hover { transform: none; box-shadow: none; }
body.ws-studio .ath-heat button:hover { outline: 2px solid var(--st-indigo); }
body.ws-studio .ath-heat-legend { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; color: var(--st-muted); }
body.ws-studio .ath-heat-legend i { width: 60px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--st-line-2), var(--st-teal)); }
body.ws-studio .ath-heat-unknown { display: inline-flex; gap: 5px; align-items: center; margin-left: auto; }
body.ws-studio .ath-heat-unknown::before { content: ""; width: 10px; height: 10px; border: 1px solid var(--st-line); background: var(--st-surface-2); border-radius: 3px; }
body.ws-studio .ath-heat-insight { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px; border-radius: 8px; background: var(--st-teal-soft); color: var(--st-teal-2); font-size: 12px; }
body.ws-studio .ath-heat-insight svg { flex: none; }
body.ws-studio .ath-stream-controls {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
body.ws-studio .ath-stream-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px; font-size: 12px; color: var(--st-muted);
}
body.ws-studio .ath-post-state {
  position: absolute; top: 8px; left: 8px;
  background: rgba(15,23,42,0.75); color: #fff;
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px;
}
body.ws-studio .ath-post-media { position: relative; }
body.ws-studio .ath-post-info footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; font-size: 12px;
}
body.ws-studio .ath-post-info footer a,
body.ws-studio .ath-post-info footer button { color: var(--st-indigo); text-decoration: none; }

/* ---------- political extras ---------- */
body.ws-studio .pol-context {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 20px; margin-bottom: 18px; flex-wrap: wrap;
}
body.ws-studio .pol-context h2 { color: var(--st-ink); font-size: 22px; font-weight: 700; margin: 6px 0; }
body.ws-studio .pol-context p { color: var(--st-slate); max-width: 760px; }
body.ws-studio .pol-public-search {
  background: var(--st-surface); border: 1px solid var(--st-line);
  border-radius: var(--st-radius); padding: 16px; margin-bottom: 18px;
}
body.ws-studio .pol-public-search label { display: block; font-size: 13px; font-weight: 600; color: var(--st-ink); margin-bottom: 8px; }
body.ws-studio .pol-public-search div { display: flex; gap: 10px; flex-wrap: wrap; }
body.ws-studio .pol-public-search .sx-in { flex: 1; min-width: 240px; height: 36px; padding: 0 12px; }
body.ws-studio .pol-public-search small { display: block; color: var(--st-muted); margin-top: 10px; font-size: 12px; }
body.ws-studio .pol-scope {
  background: var(--st-surface); border: 1px solid var(--st-line);
  border-radius: var(--st-radius); padding: 14px 16px; margin-bottom: 18px;
  font-size: 12.5px; color: var(--st-slate);
}
body.ws-studio .pol-scope b { color: var(--st-ink); }
body.ws-studio .pol-progress {
  background: var(--st-surface); border: 1px solid var(--st-line);
  border-radius: var(--st-radius-sm); padding: 10px 14px;
  font-size: 12.5px; color: var(--st-muted); margin-bottom: 12px;
}
body.ws-studio .pol-tone-legend {
  display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--st-muted);
  margin-bottom: 12px;
}
body.ws-studio .pol-tone-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
body.ws-studio .pol-tone-legend i.positive { background: var(--st-pos); }
body.ws-studio .pol-tone-legend i.neutral { background: var(--st-faint); }
body.ws-studio .pol-tone-legend i.negative { background: var(--st-neg); }
body.ws-studio .pol-tone-legend i.unread { background: var(--st-line-2); }
body.ws-studio .pol-layout { min-width: 0; }
body.ws-studio .pol-compare-card,
body.ws-studio .pol-timeline,
body.ws-studio .pol-evidence { min-width: 0; }
body.ws-studio .pol-comparison-scroll,
body.ws-studio .pol-evidence-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
body.ws-studio .pol-matrix-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; position: relative; }
body.ws-studio .pol-comparison-scroll > table,
body.ws-studio .pol-matrix-scroll > table,
body.ws-studio .pol-evidence-scroll > table { min-width: max-content; }
body.ws-studio .pol-source-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--st-line-2);
}
body.ws-studio .pol-source-row:last-child { border-bottom: 0; }
body.ws-studio .pol-source-row span { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; }
body.ws-studio .pol-source-row b { font-size: 15px; color: var(--st-ink); }
body.ws-studio .pol-source-row i { flex: 1; height: 6px; background: var(--st-line-2); border-radius: 3px; overflow: hidden; }
body.ws-studio .pol-source-row i em { display: block; height: 100%; background: var(--st-indigo); }
body.ws-studio .pol-archive-kpis { display: flex; gap: 16px; margin-bottom: 10px; }
body.ws-studio .pol-archive-kpis strong { display: block; font-size: 22px; color: var(--st-ink); }
body.ws-studio .pol-archive-kpis small { color: var(--st-muted); font-size: 11px; }
body.ws-studio .pol-word {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; margin: 0 6px 6px 0;
  background: var(--st-surface-2); border: 1px solid var(--st-line);
  border-radius: var(--st-radius-sm); color: var(--st-text);
  text-decoration: none; font-size: 12.5px;
}
body.ws-studio .pol-word:hover { border-color: var(--st-indigo); }
body.ws-studio .pol-check { padding: 10px 0; border-bottom: 1px solid var(--st-line-2); }
body.ws-studio .pol-check:last-child { border-bottom: 0; }
body.ws-studio .pol-check b { color: var(--st-ink); font-size: 13px; }
body.ws-studio .pol-check p { margin: 4px 0 0; color: var(--st-slate); font-size: 12.5px; }
body.ws-studio .pol-evidence-controls {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--st-line-2);
  background: var(--st-surface-2); font-size: 12.5px;
}
body.ws-studio .pol-evidence-controls label { display: flex; flex-direction: column; gap: 4px; color: var(--st-slate); }
body.ws-studio .pol-evidence-controls .sx-in,
body.ws-studio .pol-evidence-controls .sx-sel { height: 32px; padding: 0 8px; min-width: 140px; }
body.ws-studio .pol-evidence-scroll { overflow-x: auto; }
body.ws-studio .pol-evidence-scroll table { min-width: 720px; }
body.ws-studio .pol-evidence-copy { max-width: 520px; margin: 0 0 6px; }
body.ws-studio .pol-limits {
  background: var(--st-surface); border: 1px solid var(--st-line);
  border-radius: var(--st-radius); padding: 16px; margin-top: 18px;
  font-size: 13px; color: var(--st-slate);
}
body.ws-studio .pol-limits h3 { color: var(--st-ink); margin: 0 0 8px; }
body.ws-studio .pol-limits div { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
body.ws-studio .pol-dim { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--st-teal); }
body.ws-studio .pol-query { color: var(--st-muted); font-size: 12.5px; }

/* ---------- publishing calendar ---------- */
body.ws-studio .sx-calm .d { position: relative; display: flex; flex-direction: column; gap: 5px; }
body.ws-studio .sx-calm .d.out { opacity: 0.55; }
body.ws-studio .sx-calm .dn { font-size: 12px; font-weight: 600; color: var(--st-ink); }
body.ws-studio .sx-calm .add {
  margin-left: auto; width: 22px; height: 22px;
  border: 0; border-radius: 50%; background: var(--st-indigo); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer;
}
body.ws-studio .sx-calm .add span { display: none; }
body.ws-studio .sx-calm .add svg { flex: none; }
body.ws-studio .sx-calm .add:hover { background: var(--st-indigo-2); }
body.ws-studio .sx-calm .besttime { background: var(--st-teal-soft); color: var(--st-teal-2); border-color: var(--st-teal); }
body.ws-studio .sx-chip { display: flex; align-items: center; gap: 6px; cursor: pointer; }
body.ws-studio .sx-chip img,
body.ws-studio .sx-chip video { width: 24px; height: 24px; object-fit: cover; border-radius: 4px; }
body.ws-studio .sx-chip b { font-size: 11px; color: var(--st-ink); }
body.ws-studio .sx-chip.pub { border-left: 3px solid var(--st-pos); }
body.ws-studio .sx-chip.draft { border-left: 3px solid var(--st-faint); }
body.ws-studio .sx-chip.pend { border-left: 3px solid var(--st-amber); }
body.ws-studio .sx-chip.ext { background: var(--st-canvas-2); }
body.ws-studio .sx-chip.note { background: var(--st-ai-soft); color: var(--st-ai); }

/* ---------- shared tables ---------- */
body.ws-studio .sx-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
body.ws-studio .sx-table th,
body.ws-studio .sx-table td { padding: 10px 8px; border-bottom: 1px solid var(--st-line-2); text-align: left; vertical-align: top; }
body.ws-studio .sx-table th { font-weight: 600; color: var(--st-ink); background: var(--st-surface-2); }
body.ws-studio .sx-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
body.ws-studio .sx-table a { color: var(--st-indigo); }

/* ---------- dashboard builder touch / readable controls ---------- */
body.ws-studio .fk-tool { gap: 8px; flex-wrap: wrap; }
body.ws-studio .fk-tool .sx-btn { min-height: 34px; }
body.ws-studio .fk-side-tabs { display: flex; gap: 4px; }
body.ws-studio .fk-side-tabs button {
  min-width: 44px; min-height: 44px;
  border: 1px solid var(--st-line); border-radius: var(--st-radius-sm);
  background: var(--st-surface); color: var(--st-slate);
}
body.ws-studio .fk-side-tabs button.on { background: var(--st-indigo-soft); color: var(--st-indigo); border-color: var(--st-indigo-soft); }
body.ws-studio .fk-card-h .act button,
body.ws-studio .fk-card-h button { min-width: 34px; min-height: 34px; }
body.ws-studio .fk-radio { display: flex; align-items: center; gap: 8px; padding: 6px 0; }

/* ---------- explicit breakpoints ---------- */
@media (max-width: 1200px) {
  body.ws-studio .pol-layout { grid-template-columns: minmax(0, 1fr); }
  body.ws-studio .fk-library-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  body.ws-studio .ath-kpi-grid { grid-template-columns: repeat(2, minmax(0, 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; }
}

@media (max-width: 560px) {
  body.ws-studio .ath-stream-list { grid-template-columns: 1fr; }
  body.ws-studio .pol-topic-grid { grid-template-columns: 1fr; }
  body.ws-studio .fk-library-grid { grid-template-columns: 1fr; }
  body.ws-studio .ath-report-grid { grid-template-columns: 1fr; }
  body.ws-studio .ath-report-links { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  body.ws-studio .pol-layout { display: flex; flex-direction: column; }
  body.ws-studio .pol-public-search .sx-in { min-width: 0; }
  body.ws-studio .pol-context { flex-direction: column; align-items: flex-start; }
  body.ws-studio .sx-msg-h { align-items: flex-start; }
  body.ws-studio .sx-msg-aside { flex-direction: column; align-items: flex-end; gap: 4px; }
}

/* Navigation and shared surfaces */
body.ws-studio .sidebar.sx-rail .sx-rail-i.on {
  background: #303d68;
  color: #fff;
  box-shadow: inset 3px 0 #aeb7ff;
}
body.ws-studio .sx-rail-ws .ath-nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ws-studio .sx-rail-ws > svg, body.ws-studio .ath-workspace-mark { flex: none; }
body.ws-studio .sx { position: relative; padding-bottom: 0; }
body.ws-studio #main:has(> .ath-demo-banner) > .sx { height: auto; }
body.ws-studio #main > .ath-demo-banner + .sx .sx-main { height: auto; }
body.ws-studio .sx-nav { background: var(--st-surface); color: var(--st-text); }
body.ws-studio .sx-nav:not(.closed) { border-right: 1px solid var(--st-line); }
body.ws-studio .sx-nav-top { padding: 15px 12px 12px 16px; gap: 8px; border-bottom: 1px solid var(--st-line-2); }
body.ws-studio .sx-nav-title { color: var(--st-ink); font-size: 15px; font-weight: 650; }
body.ws-studio .sx-nav-close, body.ws-studio .sx-h-open {
  display: inline-flex; justify-content: center; align-items: center; gap: 6px;
  min-height: 36px; min-width: 36px; padding: 5px 9px; border-radius: 8px;
  background: var(--st-surface-2); color: var(--st-link); border: 1px solid var(--st-line);
  cursor: pointer; font: 600 12px var(--st-font);
}
body.ws-studio .sx-nav-close:hover, body.ws-studio .sx-h-open:hover { background: var(--st-indigo-soft); color: var(--st-link); }
body.ws-studio .sx-nav-body { padding: 8px 10px 14px; }
body.ws-studio .sx-nav-g { color: var(--st-muted); }
body.ws-studio .sx-nav-i { color: var(--st-slate); border-radius: 8px; min-height: 36px; overflow-wrap: anywhere; }
body.ws-studio .sx-nav-i:hover { background: var(--st-hover); color: var(--st-ink); }
body.ws-studio .sx-nav-i.on { background: var(--st-indigo-soft); color: var(--st-link); font-weight: 650; }
body.ws-studio .sx-nav-i .n { background: var(--st-surface-2); color: var(--st-slate); }
body.ws-studio .sx-nav-i.primary { background: var(--st-indigo); color: #fff; }
body.ws-studio .sx-nav-card { background: var(--st-surface-2); color: var(--st-muted); border: 1px solid var(--st-line); }
body.ws-studio .sx-nav-card b { color: var(--st-ink); }
body.ws-studio .sx-nav-card a { color: var(--st-link); }
body.ws-studio .sx-nav-backdrop { position: absolute; inset: 0; z-index: 39; background: #0b102480; }
body.ws-studio .sx-nav-backdrop[hidden],
body.ws-studio .sx-h-open[hidden],
body.ws-studio .ath-attention[hidden],
body.ws-studio .ath-home button[hidden] { display: none; }
body.ws-studio .sx-h-t h1 { letter-spacing: -.025em; }
body.ws-studio .sx-h-t [data-sub]:empty { display: none; }
body.ws-studio .sx-h-act > * { max-width: 100%; }
body.ws-studio .ath-quick-search { min-width: 0; font-size: 12px; }
body.ws-studio .sx:focus-visible,
body.ws-studio .sx :focus-visible,
body.ws-studio .sx-rail :focus-visible,
body.ws-studio .ath-mob-bar :focus-visible,
body.ws-studio .ath-mob-sheet :focus-visible,
body.ws-studio .ath-post-pop :focus-visible { outline: 2px solid var(--chart-primary); outline-offset: 2px; }
body.ws-studio .ath-stream-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); }
body.ws-studio .ath-stream-list > .sx-empty { grid-column: 1 / -1; }
body.ws-studio .ath-stream-list .ath-post-card {
  display: grid; grid-template-columns: 80px minmax(0,1fr);
  gap: 12px; width: 100%; min-width: 0; padding: 10px;
  align-items: start; border: 1px solid var(--st-line); border-radius: 12px;
}
body.ws-studio .ath-stream-list .ath-post-media { width: 100%; height: 84px; border-radius: 8px; }
body.ws-studio .ath-stream-list .ath-post-media img { width: 100%; height: 100%; object-fit: cover; }
body.ws-studio .ath-stream-list .ath-post-state { left: 3px; bottom: 3px; right: 3px; top: auto; text-align: center; padding-inline: 2px; white-space: normal; line-height: 1.2; overflow-wrap: anywhere; }
body.ws-studio .ath-post-info footer { justify-content: flex-start; gap: 5px; flex-wrap: wrap; }
body.ws-studio .ath-post-info footer strong { flex-basis: 100%; font-size: 11px; font-weight: 550; color: var(--st-muted); }
body.ws-studio .ath-activity-row { gap: 6px; }
body.ws-studio .ath-activity-profile { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
body.ws-studio .ath-activity-profile > :last-child { overflow-wrap: anywhere; }
body.ws-studio .ath-activity-row small { flex-shrink: 0; }
body.ws-studio .ath-attention a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
body.ws-studio .pol-topic-card { border-top: 3px solid var(--topic-color, var(--st-line)); }
body.ws-studio .pol-topic-card.on { border-top-color: var(--topic-color, var(--st-indigo)); background: var(--st-surface-2); }
body.ws-studio .pol-context { align-items: center; gap: 12px; margin-bottom: 12px; }
body.ws-studio .pol-context h2 { font-size: clamp(21px, 2.5vw, 28px); margin: 0; letter-spacing: -.04em; }
body.ws-studio .pol-context p { margin: 4px 0 0; }
body.ws-studio .pol-comparison-detail summary { display: list-item; font-weight: 650; color: var(--st-link); cursor: pointer; }
body.ws-studio .pol-comparison-detail:not([open]) summary { border: 0; }
body.ws-studio .sx-calm { grid-template-columns: repeat(7, minmax(0, 1fr)); }
body.ws-studio .sx-calm > .d { min-width: 0; }
body.ws-studio .sx-calm > .d.week { min-height: 320px; }
body.ws-studio .sx-calm .add:focus-visible { opacity: 1; }
body.ws-studio .sx-calm .dn-full { display: none; }
body.ws-studio .sx-publishing-connect {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap;
  background: var(--st-surface); border: 1px solid var(--st-line); border-left: 3px solid var(--st-link);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 14px;
}
body.ws-studio .sx-publishing-connect b { color: var(--st-ink); }
body.ws-studio .sx-publishing-connect p { margin: 4px 0 0; color: var(--st-muted); font-size: 12px; }
body.ws-studio .sx-seg button.on { background: var(--st-indigo-soft); color: var(--st-link); }
body.ws-studio .sx-case-split { grid-template-columns: minmax(240px, 360px) minmax(0, 1fr); }
body.ws-studio .ath-report-section.featured { background: var(--st-surface); border-color: var(--st-line); }
body.ws-studio .ath-report-section h3, body.ws-studio .fk-library h4 { font-size: 17px; letter-spacing: -.02em; }
body.ws-studio .ath-report-tile { border-radius: 12px; background: var(--st-surface-2); }
body.ws-studio .ath-report-tile svg { color: var(--st-link); background: var(--st-indigo-soft); box-sizing: content-box; padding: 8px; border-radius: 9px; }
body.ws-studio .fk-library { padding: 0; }
body.ws-studio .fk-library-list, body.ws-studio .fk-library-templates {
  min-width: 0; padding: 16px; background: var(--st-surface); border: 1px solid var(--st-line); border-radius: var(--st-radius);
}
body.ws-studio .fk-library-card { min-height: 64px; }
body.ws-studio .fk-library-card:hover { background: var(--st-surface-2); }
body.ws-studio .fk-library-template { background: var(--st-surface-2); border-style: solid; }

@media (min-width: 1120px) {
  body.ws-studio .sx-rail-nav, body.ws-studio .sx-rail-foot { align-items: stretch; width: 100%; }
  body.ws-studio .sx-rail-nav { gap: 5px; scrollbar-width: thin; scrollbar-color: #495779 transparent; }
  body.ws-studio .sx-rail-group h2 { margin: 8px 0 3px; }
  body.ws-studio .sx-rail-group[aria-label="Home"] h2 { display: none; }
  body.ws-studio .sx-rail-group .sx-rail-i { width: 100%; }
  body.ws-studio .ath-rail-utilities { flex-direction: row; justify-content: space-between; gap: 0; padding: 4px 0; border-top: 1px solid #ffffff1e; }
  body.ws-studio .ath-rail-utilities .sx-rail-i { width: 36px; padding: 0; justify-content: center; }
  body.ws-studio .sx-rail-ws { background: #252e49; }
  body.ws-studio .sx-rail-logo .ath-nav-label { letter-spacing: .09em; }
  body.ws-studio .ath-command-header [data-ask] { display: none; }
}

@media (max-width: 1100px) {
  body.ws-studio .sx-nav { position: absolute; top: 0; bottom: 0; left: 0; z-index: 40; height: auto; box-shadow: var(--st-shadow-pop); }
  body.ws-studio .sx-nav.closed { display: none; }
  body.ws-studio .ath-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "performance" "updates" "main"; }
  body.ws-studio .ath-side-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

@media (max-width: 900px) {
  body.ws-studio .sx-calm { grid-template-columns: minmax(0, 1fr); padding: 10px; }
  body.ws-studio .sx-calm > .d, body.ws-studio .sx-calm > .d.week { min-height: 46px; }
  body.ws-studio .sx-calm .add { opacity: 1; width: auto; min-height: 32px; padding-inline: 8px; border-radius: 7px; }
  body.ws-studio .sx-calm .add span { display: inline; }
  body.ws-studio .sx-calm .d.out:not(:has(.sx-chip)) { display: none; }
  body.ws-studio .sx-calm .dn { color: var(--st-ink); font-weight: 650; padding: 4px 0; min-height: 26px; display: block; }
  body.ws-studio .sx-calm .dn-short { display: none; }
  body.ws-studio .sx-calm .dn-full { display: inline; }
}

@media (max-width: 768px) {
  body.ws-studio #main { height: calc(100dvh - var(--st-mob-h)); }
  body.ws-studio .main { padding-bottom: 0; }
  body.ws-studio .sx { flex: 1; min-height: 0; height: 100%; }
  body.ws-studio .sx-h { padding: 10px 14px; gap: 8px; flex-wrap: wrap; min-height: 54px; }
  body.ws-studio .sx-h-t { flex: 1; }
  body.ws-studio .sx-h-t h1 { font-size: 18px; }
  body.ws-studio .sx-h-act { gap: 6px; }
  body.ws-studio .ath-mob-bar a, body.ws-studio .ath-mob-bar button { min-width: 46px; min-height: 44px; justify-content: center; border-radius: 10px; }
  body.ws-studio .ath-mob-bar .on { background: var(--st-indigo-soft); color: var(--st-link); }
  body.ws-studio .ath-side-col { display: flex; }
  body.ws-studio .ath-card-h, body.ws-studio .ath-card-b { padding-inline: 13px; }
  body.ws-studio .ath-quick-search { padding: 7px; }
  body.ws-studio .ath-quick-search span { display: none; }
  body.ws-studio .ath-history { font-size: 18px; }
  body.ws-studio .sx-case-split { grid-template-columns: minmax(0, 1fr); }
  body.ws-studio .ath-attention { gap: 5px 10px; padding: 9px 12px; margin-bottom: 12px; font-size: 12px; }
  body.ws-studio .ath-attention strong { flex-basis: 100%; }
  body.ws-studio .ath-attention small { margin-inline-start: 0; }
}

@media (max-width: 420px) {
  body.ws-studio .ath-command-header .sx-h-act { flex: 1 0 auto; }
  body.ws-studio .ath-home { padding: 12px !important; }
  body.ws-studio .ath-kpi-grid { gap: 8px; }
  body.ws-studio .ath-kpi-card { padding: 10px; }
  body.ws-studio .ath-heat { grid-template-columns: 26px repeat(8, minmax(0, 1fr)); }
  body.ws-studio .ath-heat small { font-size: 10px; }
}

@media (max-width: 360px) {
  body.ws-studio .sx-fb-c { flex: 1 1 40%; max-width: none; }
  body.ws-studio .sx-fb-c > span { min-width: 0; }
  body.ws-studio .sx-fb-c > svg { flex: none; }
  body.ws-studio .fk-tool { padding-inline: 10px; gap: 5px; }
  body.ws-studio .fk-tool .right { flex-wrap: wrap; min-width: 0; max-width: 100%; justify-content: flex-end; }
  body.ws-studio .fk-tool [data-date] { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  body.ws-studio .ath-mob-sheet-body { transition: none; }
  body.ws-studio .ath-post-card:hover { transform: none; }
  body.ws-studio .sx-nav { transition: none; }
}
