/* ============================================================
   Slate — design system
   Dark-first, cinematic-minimal. Serif display / sans body.
   ============================================================ */

:root {
  /* surfaces */
  --bg: #0B0C10;
  --bg-1: #0F1114;
  --bg-2: #14171B;
  --bg-3: #1A1E24;
  --bg-hover: #1E2229;
  --line: rgba(255,255,255,.065);
  --line-strong: rgba(255,255,255,.13);

  /* ink */
  --text: #ECEDEF;
  --text-2: #9CA1A9;
  --text-3: #62676F;

  /* slate cyan */
  --accent: #45C4FF;
  --accent-soft: rgba(69,196,255,.13);
  --accent-line: rgba(69,196,255,.32);
  --accent-ink: #032230;

  /* pipeline stage hues */
  --c-idea: #A78BFA;
  --c-research: #6EA8F7;
  --c-script: #5BC8C0;
  --c-storyboard: #8CC57E;
  --c-recording: #EF7B72;
  --c-editing: #EE9E58;
  --c-scheduled: #E3C65B;
  --c-published: #B9BEC7;

  --danger: #EF7B72;
  --ok: #8CC57E;

  --font-sans: "Inter", "Segoe UI Variable Text", "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "New York Large", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-mono: "Cascadia Code", "SF Mono", Consolas, monospace;

  --r-sm: 7px;
  --r-md: 11px;
  --r-lg: 16px;
  --r-xl: 22px;

  --ease: cubic-bezier(.22,.7,.25,1);
  --shadow-1: 0 1px 2px rgba(0,0,0,.35);
  --shadow-2: 0 8px 28px -8px rgba(0,0,0,.55);
  --shadow-3: 0 24px 70px -20px rgba(0,0,0,.7);

  --sidebar-w: 236px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; }
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

::selection { background: rgba(69,196,255,.28); }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, [contenteditable] { font: inherit; color: inherit; }
input, textarea { background: none; border: none; outline: none; }
a { color: inherit; text-decoration: none; }
svg { display: block; flex-shrink: 0; }

:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; border-radius: 4px; }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.09); border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.16); }
::-webkit-scrollbar-corner { background: transparent; }

/* ============ app shell ============ */
.app { display: flex; height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-1);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
  gap: 4px;
  z-index: 10;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 18px;
  user-select: none;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 9px;
  background: radial-gradient(120% 120% at 30% 20%, #DDE2E9 0%, #9AA3AE 45%, #3A414D 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.45), 0 2px 8px rgba(69,196,255,.25);
  display: grid; place-items: center;
  color: var(--accent-ink);
}
.brand-name { font-family: var(--font-serif); font-size: 16.5px; letter-spacing: .01em; }
.brand-sub { font-size: 10.5px; color: var(--text-3); letter-spacing: .14em; text-transform: uppercase; margin-top: -2px; }

.nav-label {
  font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--text-3); padding: 14px 12px 6px; user-select: none;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  width: 100%;
  text-align: left;
  transition: background .15s var(--ease), color .15s var(--ease);
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.045); color: var(--text); }
.nav-item.active { background: rgba(255,255,255,.06); color: var(--text); }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 2px;
  border-radius: 2px; background: var(--accent);
}
.nav-item .kbd { margin-left: auto; }

.nav-proj-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.nav-item .trunc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-foot { margin-top: auto; padding: 12px 4px 0; border-top: 1px solid var(--line); }
.streak-tile {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(69,196,255,.09), rgba(69,196,255,.02));
  border: 1px solid rgba(69,196,255,.14);
}
.streak-tile b { font-size: 13px; display: block; }
.streak-tile span { font-size: 11px; color: var(--text-2); }
.streak-flame { color: var(--accent); }

/* ============ main ============ */
.main { flex: 1; overflow-y: auto; overflow-x: hidden; position: relative; }
.view {
  max-width: 1180px; margin: 0 auto;
  padding: 44px 48px 90px;
  animation: view-in .35s var(--ease) both;
}
@keyframes view-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.view-head { margin-bottom: 34px; }
.kicker {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.view-title {
  font-family: var(--font-serif);
  font-size: 34px; font-weight: 500; letter-spacing: -.01em; line-height: 1.15;
}
.view-sub { color: var(--text-2); margin-top: 8px; font-size: 14px; max-width: 560px; }
.view-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }

.section { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-title { font-size: 15px; font-weight: 600; letter-spacing: -.005em; display: flex; align-items: center; gap: 8px; }
.section-hint { font-size: 12px; color: var(--text-3); }

/* ============ primitives ============ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 550;
  background: var(--bg-3); border: 1px solid var(--line-strong);
  color: var(--text);
  transition: color .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease), opacity .15s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); border-color: rgba(255,255,255,.2); }
.btn:active { transform: scale(.985); }
.btn.primary {
  background: linear-gradient(180deg, #7BD4FF, #38B9F5);
  border-color: transparent; color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 10px rgba(69,196,255,.18);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: rgba(255,255,255,.05); color: var(--text); }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.danger:hover { border-color: rgba(239,123,114,.4); color: var(--danger); }

.kbd {
  font-family: var(--font-mono); font-size: 10px;
  padding: 2px 5px; border-radius: 4px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  color: var(--text-3);
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  padding: 3px 9px; border-radius: 99px;
  border: 1px solid;
  white-space: nowrap;
}
.pill .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--text-2);
  padding: 3px 9px; border-radius: 99px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  transition: color .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease), opacity .15s var(--ease);
}
button.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.card.clickable { cursor: pointer; }
.card.clickable:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  background: var(--bg-3);
}

.progress { height: 3px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 100%; border-radius: 3px; background: var(--accent); transform-origin: left; transition: transform .5s var(--ease); }

.meta-line { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.meta-line svg { color: var(--text-3); }

.divider-v { width: 1px; align-self: stretch; background: var(--line); }

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  padding: 44px 24px;
  text-align: center; color: var(--text-3);
}
.empty svg { margin: 0 auto 12px; color: var(--text-3); opacity: .7; }
.empty b { display: block; color: var(--text-2); font-weight: 550; margin-bottom: 3px; font-size: 13.5px; }
.empty span { font-size: 12.5px; }

/* cover art */
.cover {
  position: relative; overflow: hidden;
  border-radius: inherit;
}
.cover::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: .16; mix-blend-mode: overlay; pointer-events: none;
}

/* ============ dashboard ============ */
.dash-greeting { font-family: var(--font-serif); font-size: 38px; font-weight: 500; letter-spacing: -.012em; line-height: 1.12; }
.dash-date { color: var(--text-2); margin-top: 8px; font-size: 14px; display: flex; align-items: center; gap: 12px; }

.dash-grid { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }

.today-list { display: flex; flex-direction: column; }
.today-item {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  transition: background .15s var(--ease);
  cursor: pointer;
}
.today-item:last-child { border-bottom: none; }
.today-item:hover { background: rgba(255,255,255,.025); }
.today-item.done .today-text { color: var(--text-3); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.25); }
.tcheck {
  width: 19px; height: 19px; border-radius: 6px;
  border: 1.5px solid var(--line-strong);
  display: grid; place-items: center; flex-shrink: 0;
  color: transparent;
  transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease), opacity .18s var(--ease);
}
.today-item:hover .tcheck { border-color: var(--accent-line); }
.today-item.done .tcheck { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.today-text { font-size: 13.5px; font-weight: 500; }
.today-proj { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.today-time { margin-left: auto; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.momentum-card { padding: 20px; }
.momentum-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); }
.momentum-row:last-child { border-bottom: none; padding-bottom: 0; }
.momentum-row:first-child { padding-top: 0; }
.momentum-k { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.momentum-v { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.health-bars { display: flex; gap: 3px; }
.health-bars i { width: 5px; height: 16px; border-radius: 2px; background: rgba(255,255,255,.1); }
.health-bars i.on { background: var(--ok); }

.bottleneck {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md);
  background: rgba(239,123,114,.07); border: 1px solid rgba(239,123,114,.18);
  font-size: 12.5px; color: #F2A49E; line-height: 1.45;
  display: flex; gap: 10px;
}
.bottleneck svg { margin-top: 1px; color: var(--danger); }
.bottleneck b { color: #F7C3BE; }

/* pipeline */
.pipeline {
  display: flex; gap: 0; overflow-x: auto; padding-bottom: 6px;
}
.pipe-stage { min-width: 138px; flex: 1; position: relative; padding-right: 14px; }
.pipe-stage:not(:last-child)::after {
  content: ""; position: absolute; right: 3px; top: 9px;
  width: 8px; height: 8px;
  border-top: 1.5px solid var(--text-3); border-right: 1.5px solid var(--text-3);
  transform: rotate(45deg); opacity: .5;
}
.pipe-head { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.pipe-dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 10px -1px currentColor; }
.pipe-name { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.pipe-count { font-size: 10.5px; color: var(--text-3); margin-left: auto; margin-right: 10px; font-variant-numeric: tabular-nums; }
.pipe-cards { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.pipe-card {
  padding: 10px 12px; border-radius: var(--r-md);
  background: var(--bg-2); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 500; line-height: 1.35;
  cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease);
}
.pipe-card:hover { background: var(--bg-3); border-color: var(--line-strong); transform: translateY(-1px); }
.pipe-card .meta-line { margin-top: 5px; font-size: 11px; }
.pipe-empty { border: 1px dashed var(--line); border-radius: var(--r-md); min-height: 44px; opacity: .5; }

/* project cards */
.proj-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.proj-card { overflow: hidden; display: flex; flex-direction: column; }
.proj-cover { height: 116px; position: relative; }
.proj-cover .pill { position: absolute; top: 12px; left: 12px; backdrop-filter: blur(8px); }
.proj-cover-title {
  position: absolute; left: 14px; right: 14px; bottom: 12px;
  font-family: var(--font-serif); font-size: 19px; letter-spacing: -.01em;
  text-shadow: 0 2px 14px rgba(0,0,0,.5);
  line-height: 1.2;
}
.proj-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.proj-next { font-size: 12.5px; color: var(--text-2); display: flex; gap: 7px; align-items: center; }
.proj-next b { color: var(--text); font-weight: 550; }
.proj-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }

/* published shelf */
.shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.shelf-item { padding: 0; overflow: hidden; }
.shelf-cover { height: 74px; }
.shelf-body { padding: 10px 12px 12px; }
.shelf-title { font-size: 12.5px; font-weight: 550; line-height: 1.35; }
.shelf-meta { font-size: 11px; color: var(--text-3); margin-top: 4px; display: flex; gap: 8px; }

/* ============ calendar ============ */
.cal-toolbar { display: flex; align-items: center; gap: 10px; }
.cal-range { font-family: var(--font-serif); font-size: 17px; min-width: 190px; text-align: center; }
.icon-btn {
  width: 30px; height: 30px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--text-2);
  transition: color .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease), opacity .15s var(--ease);
}
.icon-btn:hover { background: var(--bg-3); color: var(--text); border-color: var(--line-strong); }

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; background: var(--bg-1);
  min-height: 470px;
}
.cal-day { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.cal-day:last-child { border-right: none; }
.cal-day.today { background: rgba(69,196,255,.035); }
.cal-day.dropping { background: rgba(69,196,255,.07); }
.cal-day-head {
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: baseline; gap: 7px;
}
.cal-dow { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.cal-dom { font-family: var(--font-serif); font-size: 17px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cal-day.today .cal-dom { color: var(--accent); }
.cal-day.today .cal-dow { color: var(--accent); }
.today-badge { font-size: 9px; letter-spacing: .1em; padding: 2px 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-weight: 700; margin-left: auto; }
.cal-day-body { padding: 10px 8px; display: flex; flex-direction: column; gap: 7px; flex: 1; }

.event {
  padding: 9px 11px; border-radius: var(--r-md);
  background: var(--bg-2); border: 1px solid var(--line);
  cursor: grab; user-select: none;
  transition: background .15s var(--ease), border-color .15s var(--ease);
  position: relative; overflow: hidden;
}
.event:hover { background: var(--bg-3); border-color: var(--line-strong); }
.event.dragging { opacity: .35; }
.event.done { opacity: .48; }
.event.done .event-title { text-decoration: line-through; }
.event-kind { font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ec); display: flex; align-items: center; gap: 5px; }
.event-title { font-size: 12px; font-weight: 550; margin-top: 3px; line-height: 1.35; }
.event-proj { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }

.cal-legend { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.cal-legend .meta-line { gap: 7px; }
.legend-dot { width: 8px; height: 8px; border-radius: 3px; }

/* ============ ideas ============ */
.capture {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 8px 6px 18px;
  border-radius: var(--r-lg);
  background: var(--bg-2); border: 1px solid var(--line);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  margin-bottom: 22px;
}
.capture:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px rgba(69,196,255,.08); }
.capture svg { color: var(--text-3); }
.capture input { flex: 1; font-size: 14.5px; padding: 10px 0; }
.capture input::placeholder { color: var(--text-3); }

.idea-filters { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }

.idea-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.idea-card { padding: 17px 18px 15px; display: flex; flex-direction: column; gap: 10px; }
.idea-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.idea-title { font-size: 14.5px; font-weight: 550; line-height: 1.4; letter-spacing: -.005em; }
.prio { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.prio.high { background: var(--danger); box-shadow: 0 0 8px rgba(239,123,114,.5); }
.prio.medium { background: var(--accent); }
.prio.low { background: var(--text-3); }
.idea-note { font-size: 12.5px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.idea-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.idea-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; padding-top: 11px; border-top: 1px solid var(--line); }
.idea-age { font-size: 11px; color: var(--text-3); }

/* idea detail drawer */
.drawer-scrim {
  position: fixed; inset: 0; background: rgba(5,6,8,.6);
  backdrop-filter: blur(3px);
  animation: fade-in .2s var(--ease);
  z-index: 50;
}
@keyframes fade-in { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 460px; max-width: 92vw;
  background: var(--bg-1); border-left: 1px solid var(--line-strong);
  z-index: 51; padding: 30px 30px 40px; overflow-y: auto;
  animation: drawer-in .3s var(--ease);
  box-shadow: var(--shadow-3);
}
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
.drawer-close { position: absolute; top: 18px; right: 18px; }
.drawer h2 { font-family: var(--font-serif); font-size: 23px; font-weight: 500; line-height: 1.25; margin: 14px 0 6px; letter-spacing: -.01em; }
.drawer-section { margin-top: 24px; }
.drawer-label { font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin-bottom: 9px; }
.format-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; border-radius: var(--r-md);
  border: 1px solid var(--line); margin-bottom: 8px;
  font-size: 13px; color: var(--text-2);
  transition: color .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease), opacity .15s var(--ease); cursor: pointer; width: 100%;
  text-align: left; background: var(--bg-2);
}
.format-opt:hover { border-color: var(--accent-line); color: var(--text); background: var(--bg-3); }
.drawer-notes { font-size: 13.5px; color: var(--text-2); line-height: 1.6; white-space: pre-wrap; }
.related-item { display: flex; align-items: center; gap: 9px; padding: 8px 0; font-size: 13px; color: var(--text-2); border-bottom: 1px solid var(--line); }
.related-item:last-child { border: none; }
.related-item svg { color: var(--text-3); }

/* ============ project workspace ============ */
.ws-hero { border-radius: var(--r-xl); overflow: hidden; position: relative; margin-bottom: 26px; border: 1px solid var(--line); }
.ws-hero-bg { position: absolute; inset: 0; }
.ws-hero-content { position: relative; padding: 34px 34px 26px; background: linear-gradient(180deg, rgba(10,11,13,.25), rgba(10,11,13,.88) 78%); }
.ws-back { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,.75); margin-bottom: 40px; transition: color .15s; }
.ws-back:hover { color: #fff; }
.ws-title { font-family: var(--font-serif); font-size: 34px; font-weight: 500; letter-spacing: -.012em; line-height: 1.12; text-shadow: 0 2px 20px rgba(0,0,0,.4); max-width: 640px; }
.ws-meta { display: flex; gap: 20px; margin-top: 14px; flex-wrap: wrap; }
.ws-meta .meta-line { color: rgba(255,255,255,.72); font-size: 12.5px; }
.ws-meta .meta-line svg { color: rgba(255,255,255,.55); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.tab {
  padding: 10px 16px 12px; font-size: 13.5px; font-weight: 500;
  color: var(--text-2); position: relative;
  transition: color .15s var(--ease);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); }
.tab.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.tab .count { font-size: 10.5px; color: var(--text-3); margin-left: 5px; }

/* stage stepper */
.stepper { display: flex; align-items: center; margin: 4px 0 28px; }
.step { display: flex; align-items: center; flex: 1; }
.step-dot {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--line-strong); display: grid; place-items: center;
  font-size: 10px; color: var(--text-3); background: var(--bg-1);
  transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease), opacity .2s var(--ease); position: relative; z-index: 1;
}
.step.done .step-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.step.now .step-dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px rgba(69,196,255,.12); }
.step-line { flex: 1; height: 1.5px; background: var(--line-strong); margin: 0 -1px; }
.step.done .step-line { background: var(--accent); }
.step-label { position: absolute; top: 28px; left: 50%; transform: translateX(-50%); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; font-weight: 600; }
.step.now .step-label { color: var(--accent); }
.step.done .step-label { color: var(--text-2); }
.stepper-wrap { padding-bottom: 30px; }

.ov-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.field-list { padding: 4px 20px; }
.field-row { display: flex; padding: 13px 0; border-bottom: 1px solid var(--line); gap: 16px; }
.field-row:last-child { border: none; }
.field-k { width: 110px; flex-shrink: 0; font-size: 12px; color: var(--text-3); padding-top: 1px; }
.field-v { font-size: 13.5px; line-height: 1.5; }
.field-v.muted { color: var(--text-2); }

.task-list { padding: 6px 8px; }
.ref-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--line); font-size: 13px; }
.ref-item:last-child { border: none; }
.ref-item svg { color: var(--text-3); }
.ref-item span { color: var(--text-2); font-size: 11.5px; margin-left: auto; }

/* ============ script editor ============ */
.script-layout { display: grid; grid-template-columns: 218px 1fr; gap: 28px; align-items: start; }
.script-rail { position: sticky; top: 20px; }
.rail-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 12px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--text-2); width: 100%; text-align: left;
  transition: color .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease), opacity .15s var(--ease);
}
.rail-item:hover { background: rgba(255,255,255,.04); color: var(--text); }
.rail-item .wc { margin-left: auto; font-size: 10.5px; color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.rail-bar { width: 3px; height: 16px; border-radius: 2px; background: var(--sb, var(--line-strong)); }
.rail-arrow { display: flex; justify-content: center; color: var(--text-3); opacity: .45; padding: 1px 0; }
.script-stats { margin-top: 18px; padding: 14px 16px; }
.script-stats .momentum-row { padding: 7px 0; }

.script-doc { max-width: 700px; }
.script-block { margin-bottom: 8px; position: relative; }
.script-block-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.script-block-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .14em;
  padding: 3px 9px; border-radius: 5px;
  background: color-mix(in srgb, var(--sb) 14%, transparent);
  color: var(--sb); border: 1px solid color-mix(in srgb, var(--sb) 30%, transparent);
}
.scene-link {
  font-size: 11px; color: var(--text-3); display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 99px; border: 1px dashed var(--line-strong);
  transition: color .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease), opacity .15s var(--ease); cursor: pointer;
}
.scene-link:hover { color: var(--accent); border-color: var(--accent-line); }
/* the editable layer types transparent text over a highlight backdrop that
   renders the same text with [b-roll] markers colored — classic overlay trick */
.script-wrap {
  position: relative; border-radius: var(--r-md);
  border-left: 2px solid transparent; margin-left: -16px;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.script-wrap:focus-within { border-left-color: var(--accent); background: rgba(255,255,255,.02); }
.script-hl, .script-text {
  font-size: 15.5px; line-height: 1.75; font-family: var(--font-sans);
  padding: 4px 14px 18px 16px; white-space: pre-wrap; overflow-wrap: break-word;
  min-height: 30px;
}
.script-hl { position: absolute; inset: 0; pointer-events: none; color: #D8DADE; }
.script-text { position: relative; color: transparent; caret-color: #ECEDEF; outline: none; }
.script-text:empty::before { content: attr(data-ph); color: var(--text-3); }
.broll {
  color: #E4B14E; background: rgba(228,177,78,.12);
  border-radius: 4px; box-shadow: 0 0 0 1px rgba(228,177,78,.14);
}

/* beat controls */
.beat-swatch-wrap { position: relative; display: inline-flex; }
.beat-swatch {
  width: 14px; height: 14px; border-radius: 5px; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.12);
  transition: transform .12s var(--ease);
}
.beat-swatch:hover { transform: scale(1.15); }
.beat-palette[hidden] { display: none; }
.beat-palette {
  position: absolute; top: calc(100% + 7px); left: -6px; z-index: 25;
  display: flex; gap: 6px; padding: 8px 9px;
  background: var(--bg-3); border: 1px solid var(--line-strong);
  border-radius: 99px; box-shadow: var(--shadow-3);
  animation: menu-in .15s var(--ease);
}
.beat-color { width: 16px; height: 16px; border-radius: 50%; transition: transform .12s var(--ease); box-shadow: inset 0 0 0 1px rgba(0,0,0,.3); }
.beat-color:hover { transform: scale(1.25); }
.beat-name {
  outline: none; min-width: 36px; cursor: text;
  text-transform: uppercase;
}
.beat-name:focus { box-shadow: 0 0 0 1px color-mix(in srgb, var(--sb) 45%, transparent); }
.beat-del {
  margin-left: auto; width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center; color: var(--text-3);
  opacity: 0; transition: opacity .15s var(--ease), color .15s var(--ease), background-color .15s var(--ease);
}
.script-block:hover .beat-del { opacity: 1; }
.beat-del:hover { color: var(--danger); background: rgba(239,123,114,.1); }
.beat-add {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px; margin-top: 6px;
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-md);
  color: var(--text-3); font-size: 13px; font-weight: 550;
  transition: color .15s var(--ease), border-color .15s var(--ease), background-color .15s var(--ease);
}
.beat-add:hover { color: var(--accent); border-color: var(--accent-line); background: rgba(69,196,255,.03); }
.broll-hint { font-size: 11.5px; color: var(--text-3); line-height: 1.6; padding: 12px 14px 0; }
.broll-hint .broll { font-size: 11px; padding: 1px 5px; }
.rail-item .trunc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.script-flow-arrow { display: flex; justify-content: flex-start; padding: 2px 0 14px 2px; color: var(--text-3); opacity: .4; }

/* ============ storyboard ============ */
.sb-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.sb-total { font-size: 12.5px; color: var(--text-2); margin-left: auto; font-variant-numeric: tabular-nums; }
.sb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sb-frame { overflow: visible; position: relative; }
.sb-frame.drag-over { outline: 2px dashed var(--accent-line); outline-offset: 4px; }
.sb-frame-num {
  position: absolute; top: -9px; left: 14px; z-index: 2;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 99px;
  background: var(--bg-3); border: 1px solid var(--line-strong); color: var(--text-2);
}
.sb-canvas-wrap {
  position: relative; aspect-ratio: 16/9;
  border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden;
  background:
    radial-gradient(140% 100% at 50% 0%, rgba(255,255,255,.045), transparent 60%),
    var(--bg-1);
  border-bottom: 1px solid var(--line);
  cursor: crosshair;
  touch-action: none;
}
.sb-canvas-wrap canvas { width: 100%; height: 100%; display: block; }
.sb-canvas-hint {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--text-3); font-size: 11.5px; pointer-events: none;
  gap: 0;
}
.sb-canvas-hint svg { margin: 0 auto 6px; opacity: .6; }
.sb-tools {
  position: absolute; bottom: 8px; right: 8px; display: flex; gap: 4px;
  opacity: 0; transition: opacity .15s var(--ease);
}
.sb-canvas-wrap:hover .sb-tools { opacity: 1; }
.sb-tool { width: 26px; height: 26px; border-radius: 6px; background: rgba(10,11,13,.75); backdrop-filter: blur(6px); border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--text-2); }
.sb-tool:hover { color: var(--text); }
.sb-fields { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 8px; }
.sb-field { display: flex; gap: 9px; font-size: 12px; align-items: baseline; }
.sb-field b { width: 62px; flex-shrink: 0; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.sb-field [contenteditable] { flex: 1; color: var(--text-2); outline: none; border-radius: 4px; line-height: 1.45; min-height: 17px; }
.sb-field [contenteditable]:focus { color: var(--text); background: rgba(255,255,255,.03); box-shadow: 0 0 0 4px rgba(255,255,255,.03); }
.sb-field [contenteditable]:empty::before { content: "—"; color: var(--text-3); opacity: .5; }
.sb-frame-foot { display: flex; align-items: center; justify-content: space-between; padding: 0 15px 13px; }
.sb-dur { font-family: var(--font-mono); font-size: 11px; color: var(--text-2); background: rgba(255,255,255,.05); padding: 2px 8px; border-radius: 5px; border: 1px solid var(--line); }
.sb-section-pill { font-size: 10px; }
.sb-grip { color: var(--text-3); cursor: grab; padding: 4px; margin: -4px; }
.sb-add {
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg);
  display: grid; place-items: center; min-height: 220px;
  color: var(--text-3); font-size: 13px; gap: 0;
  transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease), opacity .2s var(--ease); cursor: pointer;
}
.sb-add:hover { border-color: var(--accent-line); color: var(--accent); background: rgba(69,196,255,.03); }
.sb-add svg { margin: 0 auto 8px; }

/* ============ research ============ */
.research-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.res-col-head { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.res-col-head .count { color: var(--text-3); font-weight: 500; margin-left: auto; }
.res-col { display: flex; flex-direction: column; gap: 12px; }
.res-card { padding: 14px 16px; }
.res-kind { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.res-title { font-size: 13.5px; font-weight: 550; line-height: 1.4; }
.res-body { font-size: 12.5px; color: var(--text-2); line-height: 1.55; margin-top: 6px; }
.res-quote { font-family: var(--font-serif); font-size: 15px; line-height: 1.55; color: #D8DADE; font-style: italic; }
.res-src { font-size: 11px; color: var(--text-3); margin-top: 9px; display: flex; align-items: center; gap: 6px; }
.res-img { height: 90px; border-radius: var(--r-sm); margin-bottom: 10px; border: 1px solid var(--line); }
.res-add { display: flex; gap: 10px; margin-bottom: 22px; }
.res-add input { flex: 1; }

/* ============ publish ============ */
.pub-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
.pub-panel { padding: 22px 24px; }
.pub-panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.pub-panel-head .section-title { font-size: 14px; }
.pub-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.pub-field { margin-bottom: 18px; }
.pub-field:last-child { margin-bottom: 0; }
.pub-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.pub-label b { font-size: 11px; letter-spacing: .11em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.char-count { font-size: 10.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.char-count.over { color: var(--danger); }
.pub-input, .pub-area {
  width: 100%; padding: 10px 13px; border-radius: var(--r-sm);
  background: var(--bg-1); border: 1px solid var(--line);
  font-size: 13.5px; transition: border-color .15s var(--ease);
}
.pub-area { resize: vertical; min-height: 100px; line-height: 1.6; font-size: 13px; color: var(--text-2); }
.pub-input:focus, .pub-area:focus { border-color: var(--accent-line); }
.thumb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.thumb-opt { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); cursor: pointer; transition: color .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease), opacity .15s var(--ease); position: relative; }
.thumb-opt:hover { border-color: var(--line-strong); }
.thumb-opt.picked { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(69,196,255,.15); }
.thumb-art { aspect-ratio: 16/9; display: grid; place-items: center; padding: 10px; }
.thumb-art span { font-family: var(--font-serif); font-size: 15px; font-weight: 600; text-align: center; text-shadow: 0 2px 10px rgba(0,0,0,.5); line-height: 1.2; }
.thumb-label { font-size: 11px; color: var(--text-2); padding: 7px 10px; background: var(--bg-1); display: flex; align-items: center; gap: 6px; }
.thumb-opt.picked .thumb-label { color: var(--accent); }
.chapter-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: baseline; }
.chapter-row:last-child { border: none; }
.chapter-time { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); width: 44px; flex-shrink: 0; }
.clip-card { padding: 13px 15px; margin-bottom: 10px; }
.clip-hook { font-size: 13px; font-weight: 550; line-height: 1.4; }
.clip-meta { display: flex; gap: 10px; margin-top: 7px; align-items: center; }
.ready-list { padding: 4px 8px; }
.pub-check-note { font-size: 12px; color: var(--text-3); padding: 12px 20px 14px; border-top: 1px solid var(--line); line-height: 1.5; }

/* ============ command palette / modal ============ */
.cmdk-scrim { position: fixed; inset: 0; background: rgba(5,6,8,.55); backdrop-filter: blur(4px); z-index: 90; animation: fade-in .15s var(--ease); }
.cmdk {
  position: fixed; top: 16vh; left: 50%; transform: translateX(-50%);
  width: 560px; max-width: 92vw; z-index: 91;
  background: var(--bg-2); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); box-shadow: var(--shadow-3);
  overflow: hidden;
  animation: cmdk-in .18s var(--ease);
}
@keyframes cmdk-in { from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(.985); } }
.cmdk-input-row { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.cmdk-input-row svg { color: var(--text-3); }
.cmdk-input-row input { flex: 1; font-size: 15px; }
.cmdk-list { max-height: 320px; overflow-y: auto; padding: 7px; }
.cmdk-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--r-sm);
  font-size: 13.5px; color: var(--text-2); width: 100%; text-align: left;
}
.cmdk-item svg { color: var(--text-3); }
.cmdk-item.sel { background: var(--accent-soft); color: var(--text); }
.cmdk-item.sel svg { color: var(--accent); }
.cmdk-item .hint { margin-left: auto; font-size: 11px; color: var(--text-3); }
.cmdk-group { font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--text-3); padding: 10px 12px 4px; font-weight: 600; }

.modal-scrim { position: fixed; inset: 0; background: rgba(5,6,8,.6); backdrop-filter: blur(4px); z-index: 80; display: grid; place-items: center; animation: fade-in .18s var(--ease); }
.modal {
  width: 520px; max-width: 92vw;
  background: var(--bg-2); border: 1px solid var(--line-strong);
  border-radius: var(--r-xl); box-shadow: var(--shadow-3);
  padding: 28px; animation: modal-in .22s var(--ease);
  max-height: 84vh; overflow-y: auto;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.modal h3 { font-family: var(--font-serif); font-size: 21px; font-weight: 500; margin-bottom: 4px; }
.modal-sub { color: var(--text-2); font-size: 13px; margin-bottom: 20px; }
.tmpl-opt {
  display: flex; gap: 13px; width: 100%; text-align: left;
  padding: 14px 15px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--bg-1);
  margin-bottom: 9px; transition: color .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease), opacity .15s var(--ease);
}
.tmpl-opt:hover { border-color: var(--accent-line); background: var(--bg-3); }
.tmpl-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(69,196,255,.15); }
.tmpl-opt b { font-size: 13.5px; display: block; }
.tmpl-opt span { font-size: 12px; color: var(--text-2); line-height: 1.45; display: block; margin-top: 2px; }

/* toasts */
.toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 18px; border-radius: 99px;
  background: var(--bg-3); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-2); font-size: 13px; font-weight: 500;
  animation: toast-in .25s var(--ease);
}
.toast svg { color: var(--accent); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.toast.out { opacity: 0; transform: translateY(6px); transition: color .25s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease), opacity .25s var(--ease); }

/* ============ responsive / iPad ============ */
@media (max-width: 1180px) {
  .view { padding: 32px 28px 80px; }
  .proj-row { grid-template-columns: repeat(2, 1fr); }
  .idea-grid { grid-template-columns: repeat(2, 1fr); }
  .sb-grid { grid-template-columns: repeat(2, 1fr); }
  .shelf { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .research-cols { grid-template-columns: repeat(2, 1fr); }
  .pub-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { width: 62px; padding: 18px 8px 14px; }
  .sidebar .brand-name, .sidebar .brand-sub, .sidebar .nav-item span, .sidebar .nav-label,
  .sidebar .kbd, .sidebar .streak-tile div, .sidebar .trunc { display: none; }
  .hero-actions .hero-btn span { display: none; }
  .nav-item { justify-content: center; padding: 9px; }
  .nav-item.active::before { left: -8px; }
  .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .streak-tile { justify-content: center; padding: 9px 6px; }
  .script-layout { grid-template-columns: 1fr; }
  .script-rail { position: static; display: none; }
  .cal-grid { grid-template-columns: repeat(2, 1fr); min-height: 0; }
  .cal-day { border-bottom: 1px solid var(--line); }
  .sb-grid, .idea-grid, .proj-row, .research-cols { grid-template-columns: 1fr; }
}

/* ============================================================
   v2 — lifecycle, composer, editing, polish
   ============================================================ */

/* ambient studio glow behind content */
.main::before {
  content: ""; position: fixed; top: -260px; left: 50%; transform: translateX(-40%);
  width: 920px; height: 520px; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, rgba(69,196,255,.045), transparent 70%);
}
.view { position: relative; z-index: 1; }

/* softer, richer cards */
.card { box-shadow: inset 0 1px 0 rgba(255,255,255,.035); }
.card.clickable:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.05), var(--shadow-2); }

/* satisfying check pop */
.tcheck svg { transform: scale(0); transition: transform .18s cubic-bezier(.22,1,.36,1); }
.today-item.done .tcheck svg { transform: scale(1); }
.today-text, .today-item .tcheck { transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease); }

/* brand button + custom logo */
.brand { border-radius: var(--r-md); transition: background-color .15s var(--ease); text-align: left; }
.brand:hover { background: rgba(255,255,255,.04); }
img.brand-logo { width: 28px; height: 28px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line-strong); }

/* capture bar as a single inviting button */
button.capture { width: 100%; cursor: text; }
.capture-ph { flex: 1; text-align: left; color: var(--text-3); font-size: 14px; padding: 9px 0; }

/* idea composer */
.composer { padding: 18px 20px 16px; margin-bottom: 22px; border-color: var(--accent-line); box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 0 0 3px rgba(69,196,255,.06), var(--shadow-2); animation: composer-in .25s var(--ease); }
@keyframes composer-in { from { opacity: 0; transform: translateY(-6px); } }
.composer-head { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.composer-head svg { color: var(--accent); }
.composer-hint { margin-left: auto; color: var(--text-3); letter-spacing: .04em; text-transform: none; font-weight: 500; }
.composer-title { width: 100%; font-size: 18px; font-weight: 550; padding: 4px 0 10px; letter-spacing: -.01em; }
.composer-title::placeholder { color: var(--text-3); font-weight: 450; }
.composer-notes { width: 100%; min-height: 64px; resize: vertical; font-size: 13.5px; color: var(--text-2); line-height: 1.55; padding: 8px 0; border-top: 1px solid var(--line); }
.composer-notes::placeholder { color: var(--text-3); }
.composer-row { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 10px 0 4px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.composer-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* tag editor (composer + drawer) */
.tag-editor { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 26px; flex: 1; }
.tag-chip { padding-right: 4px; gap: 4px; }
.tag-x { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; color: var(--text-3); transition: color .12s var(--ease), background-color .12s var(--ease); }
.tag-x:hover { color: var(--danger); background: rgba(239,123,114,.12); }
.tag-input { width: 72px; font-size: 12px; color: var(--text-2); padding: 3px 4px; }
.tag-input::placeholder { color: var(--text-3); }

/* segmented control */
.seg { display: inline-flex; background: var(--bg-1); border: 1px solid var(--line); border-radius: 99px; padding: 3px; gap: 2px; }
.seg-opt { font-size: 11.5px; font-weight: 550; color: var(--text-3); padding: 4px 12px; border-radius: 99px; text-transform: capitalize; transition: color .15s var(--ease), background-color .15s var(--ease); }
.seg-opt:hover { color: var(--text-2); }
.seg-opt.on { background: var(--accent-soft); color: var(--accent); }

/* drawer idea actions */
.drawer-actions { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.btn.danger:hover, .btn.ghost.danger:hover { color: var(--danger); background: rgba(239,123,114,.08); }
.btn.danger-solid { background: rgba(239,123,114,.14); border: 1px solid rgba(239,123,114,.35); color: #F2A49E; }
.btn.danger-solid:hover { background: rgba(239,123,114,.22); color: #F7C3BE; }

/* modal bits */
.modal-sm { width: 440px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.cover-drop {
  width: 100%; aspect-ratio: 16/7; border-radius: var(--r-md);
  border: 1.5px dashed var(--line-strong); background: var(--bg-1);
  display: grid; place-items: center; overflow: hidden;
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.cover-drop:hover { border-color: var(--accent-line); }
.cover-drop-inner { display: grid; justify-items: center; gap: 2px; color: var(--text-3); font-size: 12px; }
.cover-drop-inner b { color: var(--text-2); font-weight: 550; font-size: 13px; margin-top: 6px; }
.cover-drop-inner svg { opacity: .7; }

/* project hero actions + menu */
.ws-hero-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 34px; }
.ws-back { margin-bottom: 0; }
.hero-actions { display: flex; gap: 7px; position: relative; }
.hero-btn { background: rgba(10,11,13,.45); border-color: rgba(255,255,255,.16); backdrop-filter: blur(8px); color: rgba(255,255,255,.85); }
.hero-btn:hover { background: rgba(10,11,13,.65); color: #fff; }
.menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 30;
  min-width: 224px; padding: 6px;
  background: var(--bg-3); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); box-shadow: var(--shadow-3);
  animation: menu-in .16s var(--ease);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-5px) scale(.98); } }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 11px; border-radius: var(--r-sm);
  font-size: 13px; color: var(--text-2); text-align: left;
  transition: background-color .12s var(--ease), color .12s var(--ease);
}
.menu-item:hover { background: rgba(255,255,255,.06); color: var(--text); }
.menu-item svg { color: var(--text-3); }
.menu-item.danger:hover { background: rgba(239,123,114,.1); color: #F2A49E; }
.menu-item.danger:hover svg { color: var(--danger); }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }

/* editable overview fields */
.field-v.editable { outline: none; border-radius: 5px; padding: 1px 6px; margin: -1px -6px; min-width: 40px; transition: background-color .15s var(--ease), box-shadow .15s var(--ease); cursor: text; }
.field-v.editable:hover { background: rgba(255,255,255,.035); }
.field-v.editable:focus { background: rgba(255,255,255,.045); box-shadow: 0 0 0 1px var(--accent-line); }
.field-v.editable:empty::before { content: attr(data-ph); color: var(--text-3); }
.field-note { font-size: 11px; color: var(--text-3); padding: 10px 0 12px; }
.field-select, .field-date {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--text); font-size: 12.5px; padding: 5px 9px; outline: none;
  transition: border-color .15s var(--ease);
  font-family: var(--font-sans);
}
.field-select:hover, .field-date:hover { border-color: var(--line-strong); }
.field-select:focus, .field-date:focus { border-color: var(--accent-line); }
.field-select option { background: var(--bg-2); }
.field-date::-webkit-calendar-picker-indicator { filter: invert(.6); cursor: pointer; }

/* storyboard frame delete */
.sb-del { opacity: 0; transition: opacity .15s var(--ease), color .15s var(--ease); background: none; border: none; }
.sb-frame:hover .sb-del { opacity: 1; }
.sb-del:hover { color: var(--danger); }

/* archive */
.arch-list { display: flex; flex-direction: column; gap: 12px; }
.arch-item { display: flex; align-items: center; gap: 16px; padding: 14px 18px; }
.arch-cover { width: 86px; height: 50px; border-radius: var(--r-sm); flex-shrink: 0; border: 1px solid var(--line); }
.arch-body { flex: 1; min-width: 0; }
.arch-kind { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 3px; }
.arch-title { font-size: 14px; font-weight: 550; }
.arch-sub { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.arch-actions { display: flex; gap: 7px; flex-shrink: 0; }

/* phone-size refinements */
@media (max-width: 540px) {
  .view { padding: 24px 16px 70px; }
  .dash-greeting { font-size: 29px; }
  .view-title { font-size: 27px; }
  .ws-hero-content { padding: 22px 18px 20px; }
  .ws-title { font-size: 25px; }
  .cal-grid { grid-template-columns: 1fr; }
  .view-head-row { flex-direction: column; align-items: flex-start; }
  .shelf { grid-template-columns: 1fr; }
  .arch-item { flex-wrap: wrap; }
  .composer-row { flex-direction: column; align-items: flex-start; }
  .pub-grid, .ov-grid { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; }
}
