
:root {
  /* Warm neutral palette — inspired by the tone of warm-toned AI products */
  --bg: oklch(0.985 0.008 75);
  --bg-elev: oklch(0.995 0.005 75);
  --bg-sunken: oklch(0.965 0.01 75);
  --bg-hover: oklch(0.95 0.012 75);
  --bg-active: oklch(0.93 0.014 70);
  --border: oklch(0.9 0.012 70);
  --border-strong: oklch(0.82 0.015 68);
  --fg: oklch(0.24 0.015 55);
  --fg-muted: oklch(0.48 0.02 60);
  --fg-subtle: oklch(0.62 0.018 62);
  --accent: oklch(0.68 0.14 45);
  --accent-hover: oklch(0.62 0.15 43);
  --accent-soft: oklch(0.94 0.04 60);
  --accent-fg: oklch(0.35 0.1 40);
  --success: oklch(0.62 0.11 150);
  --success-soft: oklch(0.94 0.04 150);
  --warn: oklch(0.72 0.12 75);
  --warn-soft: oklch(0.95 0.05 80);
  --danger: oklch(0.58 0.17 25);
  --danger-soft: oklch(0.95 0.04 28);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px oklch(0.3 0.02 60 / 0.04), 0 1px 1px oklch(0.3 0.02 60 / 0.03);
  --shadow-md: 0 4px 14px oklch(0.3 0.02 60 / 0.05), 0 2px 4px oklch(0.3 0.02 60 / 0.04);
  --shadow-lg: 0 12px 32px oklch(0.3 0.02 60 / 0.08), 0 4px 8px oklch(0.3 0.02 60 / 0.05);

  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Instrument Serif', 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
  overflow: hidden;
}
#root { height: 100vh; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
input, textarea { font-family: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* App shell */
.app {
  display: grid;
  grid-template-columns: 224px 1fr 400px;
  height: 100vh;
  background: var(--bg);
}
.app[data-no-right="true"] { grid-template-columns: 224px 1fr; }

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--bg-sunken);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
  gap: 4px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 18px;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent);
  display: grid; place-items: center;
  color: white;
  font-family: var(--font-serif);
  font-size: 20px; font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1;
  padding-bottom: 2px;
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-style: italic;
  letter-spacing: -0.01em;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
  font-size: 13.5px;
  font-weight: 450;
  transition: background 0.12s, color 0.12s;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: var(--bg-hover); color: var(--fg); }
.nav-item[data-active="true"] {
  background: var(--bg-elev);
  color: var(--fg);
  box-shadow: var(--shadow-sm);
  font-weight: 500;
}
.nav-item .icon { opacity: 0.75; }
.nav-item[data-active="true"] .icon { opacity: 1; color: var(--accent); }
.nav-section {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  padding: 14px 10px 6px;
}
.nav-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.avatar-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}
.avatar-chip:hover { background: var(--bg-hover); }
.avatar-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.72 0.12 45), oklch(0.58 0.12 25));
  color: white;
  display: grid; place-items: center;
  font-weight: 600; font-size: 11px;
}
.avatar-chip .name { font-size: 13px; font-weight: 500; }
.avatar-chip .plan { font-size: 11px; color: var(--fg-subtle); }

/* ---------- Chat surface ---------- */
.chat-surface {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg);
}
.chat-header {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.chat-header .title-wrap { display: flex; flex-direction: column; }
.chat-header .title { font-size: 14px; font-weight: 500; }
.chat-header .sub { font-size: 12px; color: var(--fg-subtle); }

.seg-control {
  display: inline-flex;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}
.seg-control button {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg-muted);
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s;
}
.seg-control button[data-active="true"] {
  background: var(--bg-elev);
  color: var(--fg);
  box-shadow: var(--shadow-sm);
}
.seg-control button:hover:not([data-active="true"]) { color: var(--fg); }
.seg-control button[disabled] { opacity: 0.4; cursor: not-allowed; }

.chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 32px 0 24px;
}
.chat-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg.user { justify-content: flex-end; }
.msg .bubble {
  max-width: 560px;
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--fg);
  padding: 2px 0;
}
.msg.user .bubble {
  background: var(--bg-sunken);
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  border-bottom-right-radius: 6px;
  border: 1px solid var(--border);
}
.msg .avatar-m {
  flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent);
  display: grid; place-items: center;
  color: white;
  font-family: var(--font-serif); font-style: italic;
  font-size: 17px;
  line-height: 1;
  padding-bottom: 1px;
  margin-top: 1px;
}
.msg.typing .avatar-m { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

.dots { display: inline-flex; gap: 4px; padding: 6px 0; }
.dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fg-subtle);
  animation: bounce 1.3s ease-in-out infinite;
}
.dots span:nth-child(2) { animation-delay: 0.15s; }
.dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%,60%,100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }

/* Rich message blocks */
.msg-block {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 13.5px;
}

/* Composer */
.composer-wrap {
  padding: 12px 32px 22px;
  max-width: 784px;
  margin: 0 auto;
  width: 100%;
}
.composer {
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  padding: 12px 14px 10px;
  box-shadow: var(--shadow-md);
  transition: border-color 0.15s;
}
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-md); }
.composer textarea {
  width: 100%;
  border: none; outline: none; resize: none;
  font-size: 14.5px;
  line-height: 1.5;
  background: transparent;
  color: var(--fg);
  min-height: 24px;
  max-height: 180px;
}
.composer-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.composer-hint { font-size: 11.5px; color: var(--fg-subtle); }
.send-btn {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--fg);
  color: var(--bg);
  display: grid; place-items: center;
  transition: background 0.15s, transform 0.1s;
}
.send-btn:hover { background: var(--accent); }
.send-btn:active { transform: scale(0.95); }
.send-btn[disabled] { background: var(--border-strong); color: var(--fg-subtle); cursor: not-allowed; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.12s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn.primary { background: var(--fg); color: var(--bg); }
.btn.primary:hover { background: var(--accent); }
.btn.accent { background: var(--accent); color: white; }
.btn.accent:hover { background: var(--accent-hover); }
.btn.ghost { color: var(--fg-muted); }
.btn.ghost:hover { background: var(--bg-hover); color: var(--fg); }
.btn.outline { border-color: var(--border-strong); color: var(--fg); background: var(--bg-elev); }
.btn.outline:hover { border-color: var(--fg-muted); background: var(--bg-hover); }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn.lg { padding: 10px 18px; font-size: 14px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Right panel ---------- */
.rail {
  border-left: 1px solid var(--border);
  background: var(--bg-sunken);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.rail-header {
  padding: 18px 20px 14px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.rail-title {
  font-size: 13px; font-weight: 500; color: var(--fg);
  display: flex; align-items: center; gap: 8px;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  font-size: 11px; font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--fg-muted);
}
.status-pill[data-status="active"] { color: var(--success); border-color: oklch(0.82 0.08 150); background: var(--success-soft); }
.status-pill[data-status="draft"] { color: var(--warn); border-color: oklch(0.85 0.08 75); background: var(--warn-soft); }
.status-pill .status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.rail-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
}

.panel-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.panel-card:hover { border-color: var(--border-strong); }
.panel-card[data-locked="true"] {
  background: transparent;
  border-style: dashed;
  border-color: var(--border-strong);
  opacity: 0.72;
}
.panel-card[data-clickable="true"] { cursor: pointer; }
.panel-card[data-clickable="true"]:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.panel-head {
  padding: 12px 14px 10px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.panel-card[data-locked="true"] .panel-head { border-bottom-style: dashed; }
.panel-head .left { display: flex; align-items: center; gap: 10px; }
.panel-head .step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  color: var(--fg-muted);
  font-family: var(--font-mono);
}
.panel-card[data-done="true"] .step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.panel-head .title { font-size: 13px; font-weight: 500; }
.panel-head .meta { font-size: 11px; color: var(--fg-subtle); }
.panel-body { padding: 14px; font-size: 12.5px; }

/* Brand asset card content */
.brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.brand-logo-sq {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: oklch(0.35 0.02 260);
  color: white;
  display: grid; place-items: center;
  font-family: var(--font-serif); font-style: italic;
  font-size: 22px;
  flex-shrink: 0;
}
.brand-row .name { font-size: 14px; font-weight: 500; }
.brand-row .url { font-size: 11.5px; color: var(--fg-subtle); font-family: var(--font-mono); }
.asset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}
.asset-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}
.asset-thumb[data-video="true"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background: oklch(0 0 0 / 0.3) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path d="M3 2l7 4-7 4z" fill="white"/></svg>') center/16px no-repeat;
}
.asset-thumb[data-count]::before {
  content: attr(data-count);
  position: absolute; inset: auto 4px 4px auto;
  background: oklch(0 0 0 / 0.65);
  color: white; font-size: 10px; font-weight: 500;
  padding: 2px 6px; border-radius: 999px;
  font-family: var(--font-mono);
}

/* Checklist inside plan card */
.checklist { display: flex; flex-direction: column; gap: 8px; }
.check-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.12s;
}
.check-row:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.check-box {
  width: 16px; height: 16px; border-radius: 5px;
  border: 1.5px solid var(--border-strong);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.check-row[data-checked="true"] .check-box {
  background: var(--accent); border-color: var(--accent); color: white;
}
.check-row .label { flex: 1; }
.check-row .count { font-size: 11px; color: var(--fg-subtle); font-family: var(--font-mono); }
.check-row[data-checked="true"] .label { color: var(--fg-muted); }

/* Subreddit cards */
.sub-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.sub-card {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: all 0.12s;
}
.sub-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.sub-card[data-selected="true"] {
  border-color: var(--accent);
  background: oklch(0.985 0.015 60);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.sub-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sub-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.sub-size { font-size: 11.5px; color: var(--fg-subtle); font-family: var(--font-mono); }
.sub-score {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-sunken);
  cursor: pointer;
}
.sub-score:hover { background: var(--bg-hover); }
.sub-score .dot { width: 7px; height: 7px; border-radius: 50%; }
.sub-score[data-tier="high"] .dot { background: var(--success); }
.sub-score[data-tier="med"] .dot { background: var(--warn); }
.sub-score[data-tier="low"] .dot { background: var(--danger); }

.sub-meta-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 8px;
}
.sub-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  font-size: 11.5px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--fg-muted);
}
.sub-desc { font-size: 12.5px; color: var(--fg-muted); margin-top: 8px; line-height: 1.55; }

/* Radar popup */
.radar-pop {
  margin-top: 10px;
  padding: 14px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  animation: slide-down 0.2s ease;
}
@keyframes slide-down { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.radar-dims { display: flex; flex-direction: column; gap: 7px; font-size: 12px; }
.radar-dim { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.radar-dim .bar {
  flex: 1;
  height: 4px; border-radius: 999px;
  background: var(--border);
  position: relative; overflow: hidden;
  margin: 0 8px;
}
.radar-dim .bar span {
  position: absolute; inset: 0 auto 0 0;
  background: var(--accent);
  border-radius: 999px;
}
.radar-dim .val { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); width: 28px; text-align: right; }

/* Plan/packages cards */
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.plan-card {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.12s;
  display: flex; flex-direction: column; gap: 8px;
}
.plan-card:hover { border-color: var(--border-strong); }
.plan-card[data-selected="true"] {
  border-color: var(--accent);
  background: oklch(0.985 0.015 60);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.plan-head { display: flex; align-items: center; justify-content: space-between; }
.plan-name { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.plan-price { font-family: var(--font-mono); font-size: 13px; color: var(--accent-fg); }
.plan-tag { font-size: 12px; color: var(--fg-muted); line-height: 1.5; }
.plan-list { font-size: 12px; color: var(--fg-muted); display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.plan-list li { list-style: none; padding-left: 16px; position: relative; }
.plan-list li::before { content: ''; position: absolute; left: 0; top: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--border-strong); }
.plan-outcome { font-size: 11.5px; color: var(--accent-fg); background: var(--accent-soft); padding: 6px 8px; border-radius: 6px; margin-top: auto; }

/* Control mode cards */
.mode-stack { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.mode-card {
  display: flex; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.12s;
}
.mode-card:hover { border-color: var(--border-strong); }
.mode-card[data-selected="true"] { border-color: var(--accent); background: oklch(0.985 0.015 60); }
.mode-radio {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border-strong); border-radius: 50%;
  flex-shrink: 0; margin-top: 2px;
  display: grid; place-items: center;
}
.mode-card[data-selected="true"] .mode-radio { border-color: var(--accent); }
.mode-card[data-selected="true"] .mode-radio::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.mode-name { font-weight: 600; font-size: 13.5px; }
.mode-desc { font-size: 12px; color: var(--fg-muted); margin-top: 2px; line-height: 1.5; }

/* Staff grid */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 6px;
}
.staff-card {
  padding: 12px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  position: relative;
}
.staff-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: white; font-weight: 600; font-size: 14px;
}
.staff-name { font-size: 12.5px; font-weight: 500; }
.staff-role { font-size: 11px; color: var(--fg-subtle); }
.staff-status {
  margin-top: 2px;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid oklch(0.85 0.08 75);
}
.staff-status[data-linked="true"] {
  background: var(--success-soft); color: var(--success);
  border-color: oklch(0.82 0.08 150);
}

/* Calendar */
.cal-wrap {
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elev);
}
.cal-head {
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
}
.cal-head div {
  padding: 7px 6px;
  font-size: 10.5px; font-weight: 500;
  color: var(--fg-subtle);
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cal-body {
  display: grid; grid-template-columns: repeat(7, 1fr);
}
.cal-day {
  aspect-ratio: 1.2;
  padding: 5px 6px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 10.5px;
  position: relative;
  background: var(--bg-elev);
  font-family: var(--font-mono);
  color: var(--fg-muted);
  min-height: 48px;
  cursor: pointer;
  transition: background 0.12s;
}
.cal-day:hover { background: var(--bg-hover); }
.cal-day[data-phase="warmup"] { background: oklch(0.97 0.02 75); }
.cal-day[data-phase="launch"] { background: oklch(0.96 0.04 45); }
.cal-day[data-phase="sustain"] { background: oklch(0.96 0.03 60); }
.cal-day:nth-child(7n) { border-right: none; }
.cal-dot {
  position: absolute; bottom: 6px; left: 6px;
  width: 6px; height: 6px; border-radius: 50%;
}
.cal-count {
  position: absolute; bottom: 4px; right: 6px;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 500;
}

.cal-legend { display: flex; gap: 10px; margin-top: 8px; font-size: 11px; color: var(--fg-muted); flex-wrap: wrap; }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal-legend i {
  width: 8px; height: 8px; border-radius: 2px;
  display: inline-block;
}

/* Activity + content tab */
.activity-day {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.activity-day .day-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.activity-day .day-title { font-size: 13px; font-weight: 500; }
.activity-day .day-stats {
  display: flex; gap: 14px; font-size: 11.5px; color: var(--fg-muted);
  font-family: var(--font-mono);
}
.activity-item {
  display: flex; gap: 12px;
  padding: 10px 0;
}
.activity-item + .activity-item { border-top: 1px dashed var(--border); }
.activity-item .dot-col {
  width: 8px;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 5px;
}
.activity-item .dot-col .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.activity-item .dot-col .line {
  flex: 1; width: 1px;
  background: var(--border);
  margin: 4px 0 -12px;
}
.activity-item:last-child .dot-col .line { display: none; }
.activity-item .content { flex: 1; }
.activity-item .who {
  font-size: 12.5px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
}
.activity-item .who .time { color: var(--fg-subtle); font-size: 11.5px; font-weight: 400; font-family: var(--font-mono); }
.activity-item .who .action-tag {
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg-sunken);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}
.activity-item .body {
  font-size: 12.5px; color: var(--fg-muted);
  margin-top: 3px;
  line-height: 1.5;
}
.activity-item .stats {
  margin-top: 6px;
  display: flex; gap: 10px;
  font-size: 11px; color: var(--fg-subtle);
  font-family: var(--font-mono);
}

/* Content tab */
.content-list { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.content-card {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.content-card .c-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.content-card .c-sub {
  font-size: 12px; color: var(--fg-muted);
  display: flex; align-items: center; gap: 8px;
}
.content-card .c-title { font-size: 14px; font-weight: 500; line-height: 1.4; }
.content-card .c-body { font-size: 13px; color: var(--fg-muted); line-height: 1.55; white-space: pre-wrap; }
.content-card .c-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 11.5px;
  color: var(--fg-subtle);
}
.content-card .c-actions { display: flex; gap: 6px; }

/* Option cards inside chat */
.inline-options {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px;
}
.inline-form {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  max-width: 480px;
}
.inline-form label { font-size: 12px; color: var(--fg-muted); font-weight: 500; }
.inline-form input, .inline-form textarea {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  background: var(--bg);
  color: var(--fg);
  outline: none;
  transition: border 0.12s;
}
.inline-form input:focus, .inline-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.inline-form .form-row { display: flex; flex-direction: column; gap: 4px; }
.inline-form .form-submit { margin-top: 4px; align-self: flex-start; }

/* Confirm banner */
.confirm-banner {
  background: var(--accent-soft);
  border: 1px solid oklch(0.87 0.06 55);
  color: var(--accent-fg);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

/* Quick actions */
.qa-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.qa-btn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.12s;
  width: 100%;
  color: var(--fg);
}
.qa-btn:hover { border-color: var(--accent); background: oklch(0.985 0.015 60); }
.qa-btn .arrow { color: var(--fg-subtle); }
.qa-btn:hover .arrow { color: var(--accent); }

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  right: 16px; bottom: 16px;
  width: 268px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  z-index: 50;
  font-size: 13px;
}
.tweaks-panel h4 { margin: 0 0 10px; font-size: 13px; font-weight: 500; display: flex; align-items: center; justify-content: space-between; }
.tweaks-panel h4 .close { color: var(--fg-subtle); cursor: pointer; font-size: 14px; }
.tweaks-panel .tweak-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.tweaks-panel .tweak-label { font-size: 11.5px; color: var(--fg-subtle); text-transform: uppercase; letter-spacing: 0.04em; }
.tweaks-panel .tweak-options { display: flex; gap: 4px; flex-wrap: wrap; }
.tweaks-panel .tweak-chip {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-sunken);
  font-size: 12px;
  cursor: pointer;
  color: var(--fg-muted);
}
.tweaks-panel .tweak-chip[data-active="true"] { background: var(--accent); color: white; border-color: var(--accent); }
.tweaks-panel .tweak-swatches { display: flex; gap: 6px; }
.tweaks-panel .tweak-swatch {
  width: 26px; height: 26px; border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
}
.tweaks-panel .tweak-swatch[data-active="true"] { border-color: var(--fg); box-shadow: 0 0 0 2px var(--bg-elev); }

/* Utility */
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 8px; }
.spacer { flex: 1; }
.serif { font-family: var(--font-serif); font-style: italic; letter-spacing: -0.01em; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--fg-muted); }
.subtle { color: var(--fg-subtle); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }

/* Welcome hero */
.welcome {
  max-width: 640px; margin: 80px auto 0; padding: 0 32px;
  text-align: left;
  display: flex; flex-direction: column; gap: 18px;
}
.welcome h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 52px;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.05;
}
.welcome h1 em { font-style: italic; color: var(--accent); }
.welcome p { font-size: 15px; color: var(--fg-muted); margin: 0; }
.welcome-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

/* Page placeholder */
.page-shell { padding: 32px 40px; overflow-y: auto; }
.page-h {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.page-h h1 { font-family: var(--font-serif); font-size: 38px; font-weight: 400; margin: 0; letter-spacing: -0.01em; }
.page-h p { color: var(--fg-muted); margin: 4px 0 0; font-size: 14px; }

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 500;
  color: var(--fg-subtle);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  background: var(--bg-sunken);
}
.table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
}
.table tr:hover td { background: var(--bg-hover); }

/* Campaign list card */
.camp-row-title { font-weight: 500; font-size: 13.5px; }
.camp-row-sub { font-size: 11.5px; color: var(--fg-subtle); margin-top: 2px; }

/* Avatars stack */
.avatars-stack { display: inline-flex; }
.avatars-stack .a {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--bg-elev);
  margin-left: -6px;
  display: grid; place-items: center;
  font-size: 10px; color: white; font-weight: 600;
}
.avatars-stack .a:first-child { margin-left: 0; }

/* Brand assets page */
.asset-grid-lg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.asset-card-lg {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
  background-size: cover;
  background-position: center;
}

/* Generic SVG placeholder backgrounds via data-url not inlined heavily */
.ph-stripe {
  background-image: repeating-linear-gradient(135deg, var(--bg-sunken), var(--bg-sunken) 8px, var(--bg-hover) 8px, var(--bg-hover) 16px);
}


/* === v2 additions === */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInSlow { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.msg, .welcome, .sub-list > .sub-card, .msg-block, .inline-form, .confirm-banner, .plan-grid > .plan-card, .mode-stack > .mode-card {
  animation: fadeIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.msg[data-delay="1"] { animation-delay: 0.15s; }
.msg[data-delay="2"] { animation-delay: 0.3s; }
.msg[data-delay="3"] { animation-delay: 0.45s; }

.inline-form-wide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 18px 20px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  max-width: 100%;
  width: 100%;
}
.inline-form-wide .form-row { display: flex; flex-direction: column; gap: 5px; }
.inline-form-wide .form-row.full { grid-column: 1 / -1; }
.inline-form-wide label { font-size: 11.5px; color: var(--fg-subtle); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.inline-form-wide input, .inline-form-wide textarea, .inline-form-wide select {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  background: var(--bg);
  color: var(--fg);
  outline: none;
  transition: border 0.12s;
  font-family: inherit;
}
.inline-form-wide select {
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%23888" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}
.inline-form-wide input:focus, .inline-form-wide textarea:focus, .inline-form-wide select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft);
}

/* Plan card v2 */
.plan-grid-v2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.plan-card-v2 {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  padding: 0;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex; flex-direction: column;
  overflow: hidden;
  position: relative;
}
.plan-card-v2:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.plan-card-v2[data-selected="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.plan-card-v2 .plan-banner {
  padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
}
.plan-card-v2 .plan-banner-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
}
.plan-card-v2 .plan-banner-title {
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
}
.plan-card-v2 .plan-banner-check {
  margin-left: auto;
  width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid var(--border-strong);
  display: grid; place-items: center;
  transition: all 0.15s;
}
.plan-card-v2[data-selected="true"] .plan-banner-check {
  background: var(--accent); border-color: var(--accent); color: white;
}
.plan-card-v2 .plan-body-v2 { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plan-card-v2 .plan-tag-v2 { font-size: 12.5px; color: var(--fg-muted); line-height: 1.5; }
.plan-card-v2 .plan-section-label {
  font-size: 10.5px; color: var(--fg-subtle); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500;
  margin-top: 4px;
}
.plan-card-v2 .plan-features { font-size: 12.5px; color: var(--fg); display: flex; flex-direction: column; gap: 5px; }
.plan-card-v2 .plan-features li {
  list-style: none; padding-left: 18px; position: relative;
}
.plan-card-v2 .plan-features li::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 10px; height: 1.5px; background: var(--accent); border-radius: 2px;
}
.plan-card-v2 .plan-foot {
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-sunken);
  border-top: 1px dashed var(--border);
}
.plan-card-v2 .plan-foot .price-big {
  font-family: var(--font-serif);
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.plan-card-v2 .plan-foot .price-note {
  font-size: 11px; color: var(--fg-subtle);
  margin-top: 2px;
}
.plan-card-v2 .plan-outcome-v2 {
  margin-top: auto;
  padding: 9px 12px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  color: var(--accent-fg);
  display: flex; align-items: center; gap: 6px;
}

/* Staff link card v2 */
.link-account-card {
  margin-top: 14px;
  padding: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-elev);
}
.link-account-head {
  display: flex; gap: 12px; padding: 14px 16px;
  align-items: flex-start;
}
.link-account-head .ico {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-fg);
  display: grid; place-items: center; flex-shrink: 0;
}
.link-account-head .title { font-size: 13.5px; font-weight: 600; }
.link-account-head .sub { font-size: 12.5px; color: var(--fg-muted); margin-top: 2px; line-height: 1.5; }
.link-account-warn {
  padding: 10px 16px;
  background: var(--warn-soft);
  border-top: 1px solid oklch(0.88 0.06 75);
  font-size: 11.5px;
  color: oklch(0.38 0.08 75);
  display: flex; gap: 8px; align-items: flex-start;
}
.link-account-warn svg { flex-shrink: 0; margin-top: 2px; }
.link-account-foot {
  padding: 10px 16px;
  display: flex; gap: 8px; justify-content: space-between; align-items: center;
  background: var(--bg-sunken);
  border-top: 1px solid var(--border);
}
.link-account-foot .status { font-size: 12px; color: var(--fg-muted); display: flex; align-items: center; gap: 6px; }

/* Inline radar inside sub-card */
.sub-card.expandable { cursor: pointer; }
.sub-card .score-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  font-size: 12px; font-weight: 500;
}
.sub-card .score-badge[data-tier="high"] { background: var(--success-soft); color: var(--success); border-color: oklch(0.82 0.08 150); }
.sub-card .score-badge[data-tier="med"] { background: var(--warn-soft); color: var(--warn); border-color: oklch(0.85 0.08 75); }
.sub-card .score-badge[data-tier="low"] { background: var(--danger-soft); color: var(--danger); border-color: oklch(0.8 0.1 28); }

/* Daily report card */
.daily-report {
  margin-top: 10px;
  padding: 16px 18px;
  background: linear-gradient(180deg, oklch(0.98 0.02 60), oklch(0.995 0.008 75));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.daily-report .dr-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.daily-report .dr-title {
  font-family: var(--font-serif); font-size: 20px; letter-spacing: -0.01em;
}
.daily-report .dr-date {
  font-size: 11px; color: var(--fg-subtle); font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.daily-report .dr-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.daily-report .dr-kpi { }
.daily-report .dr-kpi .v {
  font-family: var(--font-serif); font-size: 22px; letter-spacing: -0.01em;
}
.daily-report .dr-kpi .k {
  font-size: 10.5px; color: var(--fg-subtle); text-transform: uppercase; letter-spacing: 0.05em;
}
.daily-report ul.dr-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12.5px; color: var(--fg-muted);
}
.daily-report ul.dr-list li {
  padding-left: 14px; position: relative;
}
.daily-report ul.dr-list li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

/* Alert banner */
.alert-banner {
  display: flex; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid;
  font-size: 13px;
  align-items: flex-start;
}
.alert-banner[data-sev="warn"] { background: var(--warn-soft); border-color: oklch(0.85 0.08 75); color: oklch(0.38 0.08 75); }
.alert-banner[data-sev="danger"] { background: var(--danger-soft); border-color: oklch(0.82 0.1 28); color: oklch(0.4 0.15 28); }
.alert-banner[data-sev="info"] { background: var(--accent-soft); border-color: oklch(0.88 0.05 55); color: var(--accent-fg); }
.alert-banner .al-icon { flex-shrink: 0; margin-top: 2px; }
.alert-banner .al-body { flex: 1; }
.alert-banner .al-title { font-weight: 600; margin-bottom: 3px; }
.alert-banner .al-actions { display: flex; gap: 6px; margin-top: 8px; }
.alert-banner .al-actions .btn { background: white; border: 1px solid currentColor; color: inherit; }
.alert-banner .al-actions .btn:hover { background: rgba(255,255,255,0.7); }

/* Notification toast (top-right) */
.toast-stack {
  position: fixed;
  top: 16px; right: 16px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 60;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: 280px; max-width: 340px;
  padding: 12px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex; gap: 10px;
  animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.toast .t-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.toast[data-sev="warn"] .t-icon { background: var(--warn-soft); color: var(--warn); }
.toast[data-sev="info"] .t-icon { background: var(--accent-soft); color: var(--accent-fg); }
.toast[data-sev="success"] .t-icon { background: var(--success-soft); color: var(--success); }
.toast .t-body { flex: 1; font-size: 12.5px; }
.toast .t-title { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.toast .t-close { color: var(--fg-subtle); cursor: pointer; font-size: 14px; flex-shrink: 0; }

/* Modal (step edit popover) */
.modal-overlay {
  position: fixed; inset: 0;
  background: oklch(0.2 0.02 60 / 0.45);
  z-index: 100;
  display: grid; place-items: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px;
  max-height: 82vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: scaleIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head .m-title { font-family: var(--font-serif); font-size: 22px; letter-spacing: -0.01em; }
.modal-head .m-sub { font-size: 12px; color: var(--fg-subtle); }
.modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
  background: var(--bg-sunken);
}
.close-btn {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  color: var(--fg-subtle);
}
.close-btn:hover { background: var(--bg-hover); color: var(--fg); }

/* Content edit drawer inside content view */
.content-edit {
  padding: 14px 16px;
  border-top: 1px dashed var(--border);
  background: var(--bg-sunken);
  margin: 0 -16px -14px;
  display: flex; flex-direction: column; gap: 10px;
}
.content-edit textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  background: var(--bg-elev);
  resize: vertical;
  min-height: 140px;
  outline: none;
}
.content-edit textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.ref-thread {
  display: flex; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  font-size: 12px;
}
.ref-thread .rt-ico {
  width: 24px; height: 24px; border-radius: 6px;
  display: grid; place-items: center;
  background: oklch(0.93 0.06 28); color: oklch(0.45 0.15 28);
  flex-shrink: 0;
}
.ref-thread .rt-title { font-weight: 500; color: var(--fg); }
.ref-thread .rt-meta { color: var(--fg-subtle); margin-top: 2px; }
.ref-thread .rt-link { color: var(--accent-fg); font-family: var(--font-mono); font-size: 11px; margin-top: 4px; }

/* Segmented control inside panel header */
.inline-seg {
  display: inline-flex;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}
.inline-seg button {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 500;
  color: var(--fg-muted);
  transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 5px;
}
.inline-seg button[data-active="true"] { background: var(--bg-elev); color: var(--fg); box-shadow: var(--shadow-sm); }

/* Panel-card clickable hover */
.panel-card[data-clickable="true"]:hover { border-color: var(--accent); }
.panel-card[data-editable="true"] { cursor: pointer; }
.panel-card[data-editable="true"]:hover .step-num { background: var(--accent-soft); color: var(--accent-fg); border-color: var(--accent); }

/* Fit score badge */
.fit-score-ring {
  width: 36px; height: 36px;
  position: relative;
  display: grid; place-items: center;
}
.fit-score-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.fit-score-ring .val { font-family: var(--font-mono); font-size: 11px; font-weight: 600; }

/* expand/collapse */
.slide-in { animation: slideUp 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* Editable calendar event */
.cal-event-detail {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  margin-top: 10px;
}

/* Post in calendar view */
.cal-timeline {
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 0;
}
.cal-tl-day {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cal-tl-day:last-child { border-bottom: none; }
.cal-tl-label { font-size: 12px; color: var(--fg-subtle); font-family: var(--font-mono); padding-top: 4px; }
.cal-tl-label .day-n { display: block; font-family: var(--font-serif); font-size: 22px; color: var(--fg); font-style: italic; }
.cal-tl-events { display: flex; flex-direction: column; gap: 8px; }
.cal-tl-event {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  display: flex; gap: 10px; align-items: center;
  font-size: 12.5px;
}
.cal-tl-event .ev-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cal-tl-event[data-type="post"] .ev-dot { background: var(--accent); }
.cal-tl-event[data-type="comment"] .ev-dot { background: oklch(0.62 0.11 150); }
.cal-tl-event[data-type="browse"] .ev-dot { background: var(--fg-subtle); }
.cal-tl-event[data-type="reply"] .ev-dot { background: oklch(0.7 0.12 200); }
.cal-tl-event .ev-type {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 2px 7px; border-radius: 999px;
  background: var(--bg-sunken); color: var(--fg-muted);
}
.cal-tl-event .ev-body { flex: 1; }
.cal-tl-event .ev-who { color: var(--fg-subtle); font-size: 11.5px; }
.cal-tl-event .ev-time { color: var(--fg-subtle); font-family: var(--font-mono); font-size: 11px; }
