/* Automation 10 live demo: one podcast episode (or a YouTube video or a blog post) in, a week of drafts out.
   Three panels: Source (podcast, YouTube or blog), Behind the scenes (the engine's log) and the approval
   calendar. Stage chrome, tabs and controls come from demo.css and site.css. Every rule is scoped under
   #demo; every class invented here starts with ce-. Layout: source | log and calendar from 1200px; source |
   carousel at 901 to 1199px; one column at 900px and below. The product palettes are set on the stage root
   only and used inside the simulated screens. */

#demo [hidden] {
  display: none !important;
}

#demo-stage {
  scroll-margin-top: calc(var(--topbar-h) + 24px);
}

#demo .ce-demo-stage {
  --ce-g-posts: #3987e5;
  --ce-g-clips: #d95926;
  --ce-g-long: #199e70;
  --nc-navy: #1d2b45;
  --nc-navy-2: #2b3d5c;
  --nc-cream: #f3ecdf;
  --nc-coral: #ef7d57;
  --lp-bg: #ffffff;
  --lp-ink: #1d2226;
  --lp-muted: #666666;
  --lp-line: #e6e3dd;
  --lp-link: #0a66c2;
  --xp-bg: #000000;
  --xp-ink: #e7e9ea;
  --xp-muted: #71767b;
  --xp-line: #2f3336;
  --np-bg: #fbf8f2;
  --np-ink: #23211d;
  --np-muted: #7a746a;
  --np-line: #e7e1d6;
  --sp-bg: #ffffff;
  --sp-title: #1f4fb5;
  --sp-url: #3c6e47;
  --sp-ink: #4d5156;
  --sp-line: #e8eaed;
  --nt-bg: #ffffff;
  --nt-ink: #37352f;
  --nt-muted: #787774;
  --nt-line: #e9e9e7;
  --nt-tag-bg: #d3e5ef;
  --nt-tag-ink: #28456c;
}

/* ---------- Tabs: four equal pills, label and meta stacked in each ---------- */

#demo .ce-demo-bar {
  align-items: flex-start;
}

#demo .ce-demo-bar .tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

#demo .ce-demo-bar .tab {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 3px;
  align-items: center;
  padding: 12px 20px;
  text-align: left;
}

#demo .ce-demo-bar .tab-n {
  grid-row: 1 / span 2;
}

#demo .ce-demo-bar .tab-l,
#demo .ce-demo-bar .tab-m {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .ce-demo-bar .tab-l {
  grid-column: 2;
  grid-row: 1;
}

#demo .ce-demo-bar .tab-m {
  grid-column: 2;
  grid-row: 2;
}

#demo .ce-demo-bar .demo-note {
  margin-left: auto;
}

@media (max-width: 1099px) {
  #demo .ce-demo-bar .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #demo .ce-demo-bar .demo-note {
    margin-left: 0;
  }
}

@media (max-width: 639px) {
  #demo .ce-demo-bar .tab {
    grid-template-rows: auto;
    row-gap: 0;
  }

  #demo .ce-demo-bar .tab-n {
    grid-row: auto;
  }

  #demo .ce-demo-bar .tab-l {
    grid-row: auto;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.2;
  }

  #demo .ce-demo-bar .tab-m {
    display: none;
  }
}

/* ---------- Grid ---------- */

#demo .ce-grid {
  --ce-h: 640px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  padding: 24px;
  align-items: start;
}

#demo .ce-srccol,
#demo .ce-sidewrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

#demo .ce-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 480px;
  gap: 22px;
  min-width: 0;
}

#demo .ce-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

#demo .ce-label {
  height: 28px;
  min-height: 28px;
  gap: 12px;
}

#demo .ce-controls {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 6px;
}

#demo .ce-controls .demo-ctl {
  padding: 0 12px;
}

#demo .ce-controls .demo-ctl[data-act="toggle"] {
  min-width: 118px;
  justify-content: center;
}

#demo .ce-side-nav {
  display: none;
  gap: 2px;
  padding: 3px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: fit-content;
}

#demo .ce-side-nav button {
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ash);
  transition: color 0.2s, background-color 0.2s;
}

#demo .ce-side-nav button[aria-pressed="true"] {
  background: var(--bone);
  color: var(--ink);
}

/* Channel switch-style pills for the source */
#demo .ce-srcsw {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 28px;
  padding: 2px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 999px;
}

#demo .ce-srcsw button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  color: var(--ash);
  transition: color 0.2s, background-color 0.2s;
}

#demo .ce-srcsw button svg {
  display: none;
  width: 12px;
  height: 12px;
  flex: none;
}

#demo .ce-srcsw button:hover {
  color: var(--bone);
}

#demo .ce-srcsw button[aria-pressed="true"] {
  background: var(--bone);
  color: var(--ink);
}

/* ---------- Panels: one height on every column so the three panels end together ---------- */

#demo .ce-panel {
  position: relative;
  height: var(--ce-h);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}

/* ---------- Source panel ---------- */

#demo .ce-src {
  display: flex;
  flex-direction: column;
}

#demo .ce-src-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--elev);
}

#demo .ce-src-glyph {
  display: grid;
  flex: none;
}

#demo .ce-src-glyph svg {
  display: block;
  width: 14px;
  height: 14px;
  color: var(--ash);
}

#demo .ce-src-name {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.3;
  color: var(--ash);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .ce-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 20px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ash);
  white-space: nowrap;
}

#demo .ce-badge--live {
  color: var(--accent);
  border-color: rgb(255 255 255 / 0.4);
}

#demo .ce-badge--ok {
  color: var(--ok);
  border-color: hsl(152 60% 48% / 0.45);
}

#demo .ce-badge-ic {
  width: 10px;
  height: 10px;
}

#demo .ce-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: ce-pulse 1.4s ease-in-out infinite;
}

#demo .ce-src-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#demo .ce-wait {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background: var(--surface);
  transition: opacity 0.4s var(--ease-std);
}

#demo .ce-wait.is-out {
  opacity: 0;
  pointer-events: none;
}

#demo .ce-wait-ic svg {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto;
  color: var(--ash);
}

#demo .ce-wait-t {
  font-size: 15px;
  color: var(--ash);
}

#demo .ce-wait-s {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--ash);
}

#demo .ce-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.4s var(--ease-std);
}

#demo .ce-view.is-shown {
  opacity: 1;
}

/* Podcast */

#demo .ce-pod {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#demo .ce-pod-ep {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

#demo .ce-pod-ep.ce-ep-in {
  animation: ce-ep-in 0.4s var(--ease-out) both, ce-ep-glow 1.2s ease-out both;
}

#demo .ce-cover {
  position: relative;
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 6px;
  overflow: hidden;
  background: radial-gradient(120% 90% at 20% 10%, var(--nc-navy-2) 0%, var(--nc-navy) 55%, #121b2d 100%);
}

#demo .ce-cover-k {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 9.5px;
  line-height: 1.35;
  letter-spacing: 0.04em;
  color: var(--nc-cream);
}

#demo .ce-cover-m {
  position: absolute;
  right: 6px;
  bottom: 4px;
  width: 42px;
  height: 42px;
}

#demo .ce-pod-epm {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#demo .ce-ep-show,
#demo .ce-ep-m {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  line-height: 1.3;
  color: var(--ash);
}

#demo .ce-ep-t {
  font-family: var(--font-display);
  font-size: 16.5px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--bone);
}

#demo .ce-pod-pl {
  flex: none;
  padding: 12px 14px;
}

#demo .ce-pips {
  position: relative;
  height: 14px;
}

#demo .ce-pip {
  position: absolute;
  top: 2px;
  width: 7px;
  height: 7px;
  background: var(--accent);
  opacity: 0;
  transform: translate(-50%, 0) rotate(45deg) scale(0.4);
  transition: transform 0.28s var(--ease-out), opacity 0.28s var(--ease-out);
}

#demo .ce-pip.is-on {
  opacity: 1;
  transform: translate(-50%, 0) rotate(45deg) scale(1);
}

#demo .ce-tick {
  position: absolute;
  top: 9px;
  width: 1px;
  height: 5px;
  background: var(--accent);
  opacity: 0.8;
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.3s var(--ease-out);
}

#demo .ce-tick.is-on {
  transform: scaleY(1);
}

#demo .ce-wave {
  position: relative;
  height: 46px;
}

#demo .ce-wave svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

#demo .ce-wave rect {
  fill: var(--line);
}

#demo .ce-wave rect.is-read {
  fill: var(--bone);
  opacity: 0.7;
}

#demo .ce-ph {
  position: absolute;
  top: -14px;
  bottom: 0;
  left: 0;
  width: 1px;
  background: var(--accent);
  transition: opacity 0.3s;
}

#demo .ce-ph.is-off {
  opacity: 0;
}

#demo .ce-pod-tm {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ash);
}

#demo .ce-tx {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 4px 14px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 18px);
}

#demo .ce-tx-r {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  padding: 6px 0;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s var(--ease-std), transform 0.3s var(--ease-out), background-color 0.3s, box-shadow 0.3s;
}

#demo .ce-tx-r.is-on {
  opacity: 1;
  transform: none;
}

#demo .ce-tx-ts {
  padding-top: 2px;
  font-size: 12px;
  color: var(--ash);
}

#demo .ce-tx-t {
  font-size: 14px;
  line-height: 1.45;
  color: var(--bone-70);
}

#demo .ce-tx-r.is-hl {
  padding-left: 8px;
  background: rgb(255 255 255 / 0.06);
  box-shadow: inset 2px 0 0 0 var(--accent);
}

#demo .ce-tx-r.is-hl .ce-tx-ts {
  color: var(--accent);
}

#demo .ce-tx-r.is-hl .ce-tx-t {
  color: var(--bone);
}

#demo .ce-pod-foot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 30px;
  padding: 0 14px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ash);
  white-space: nowrap;
}

#demo .ce-pod-foot > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .ce-words {
  flex: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease-std);
}

#demo .ce-words.is-on {
  opacity: 1;
}

/* YouTube */

#demo .ce-yt {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#demo .ce-yt-vid {
  position: relative;
  flex: none;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(165deg, #262b35 0%, #14171d 60%, #0d0f13 100%);
}

#demo .ce-yt-vid.ce-zoom {
  animation: ce-zoom 0.5s var(--ease-out) both;
}

#demo .ce-spk {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#demo .ce-yt-low {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
}

#demo .ce-yt-low b {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

#demo .ce-yt-low span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

#demo .ce-yt-cap {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 48px;
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s var(--ease-std);
}

#demo .ce-yt-cap.is-on {
  opacity: 1;
}

#demo .ce-yt-scrub {
  flex: none;
  padding: 10px 12px 6px;
}

#demo .ce-yt-track {
  position: relative;
  height: 4px;
  margin-top: 14px;
  border-radius: 2px;
  background: var(--line);
}

#demo .ce-yt-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 2px;
  background: var(--accent);
}

#demo .ce-yt-sl {
  position: absolute;
  left: 0;
  bottom: 8px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--accent);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s var(--ease-std);
}

#demo .ce-yt-seg.is-on .ce-yt-sl {
  opacity: 1;
}

#demo .ce-yt-ph {
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--bone);
  transition: left 0.3s var(--ease-out);
}

#demo .ce-yt-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ash);
}

#demo .ce-yt-tt {
  flex: none;
  padding: 6px 12px 10px;
  border-bottom: 1px solid var(--line);
}

#demo .ce-yt-t {
  font-size: 15.5px;
  line-height: 1.3;
  color: var(--bone);
}

#demo .ce-yt-m {
  margin-top: 4px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ash);
}

#demo .ce-yt-tx {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 8px 12px;
}

#demo .ce-yt-th {
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ash);
}

#demo .ce-tr-y {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  padding: 5px 0;
  opacity: 0;
  transition: opacity 0.3s var(--ease-std), background-color 0.3s, box-shadow 0.3s;
}

#demo .ce-tr-y.is-on {
  opacity: 1;
}

#demo .ce-tr-y.is-clip {
  padding-left: 8px;
  background: rgb(255 255 255 / 0.06);
  box-shadow: inset 2px 0 0 0 var(--accent);
}

#demo .ce-tr-y .ce-tr-ts {
  font-size: 11.5px;
  color: var(--ash);
}

#demo .ce-tr-tx {
  min-width: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--bone-70);
}

#demo .ce-tr-y.is-clip .ce-tr-tx {
  color: var(--bone);
}

#demo .ce-clip-tag {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--accent);
  opacity: 0;
}

#demo .ce-tr-y.is-clip .ce-clip-tag {
  opacity: 1;
}

/* Blog: a light browser window */

#demo .ce-blog {
  flex: 1;
  min-height: 0;
  margin: 10px;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  background: var(--np-bg);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
}

#demo .ce-blog-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 26px;
  padding: 0 10px;
  background: #ece8e1;
}

#demo .ce-dots {
  display: inline-flex;
  flex: none;
  gap: 4px;
}

#demo .ce-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d9d3c8;
}

#demo .ce-url {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f7f4ef;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--np-muted);
  overflow: hidden;
  white-space: nowrap;
}

#demo .ce-url span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .ce-url svg {
  flex: none;
  width: 9px;
  height: 9px;
}

#demo .ce-blog-site {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--np-line);
}

#demo .ce-wm {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--nc-navy);
}

#demo .ce-nav {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--np-muted);
  white-space: nowrap;
}

#demo .ce-nav span:first-child {
  color: var(--np-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

#demo .ce-art {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 14px 16px;
  color: var(--np-ink);
}

#demo .ce-art.ce-enter {
  animation: ce-enter 0.5s var(--ease-out) both;
}

#demo .ce-kick {
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--nc-coral);
}

#demo .ce-art-t {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--nc-navy);
}

#demo .ce-byline {
  margin-top: 6px;
  font-size: 12px;
  color: var(--np-muted);
}

#demo .ce-bp {
  position: relative;
  margin: 12px 0 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--np-ink);
  transition: background-color 0.3s;
}

#demo .ce-bp.is-used {
  background: rgb(255 255 255 / 0.1);
}

#demo .ce-bp.is-used::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
}

#demo .ce-bh {
  margin: 12px 0 2px;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--nc-navy);
}

#demo .ce-used {
  position: absolute;
  left: 0;
  top: -12px;
  display: none;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--accent);
  white-space: nowrap;
}

#demo .ce-bp.is-tag .ce-used {
  display: block;
}

#demo .ce-greys {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

#demo .ce-greys i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: #e7e1d6;
}

#demo .ce-art-foot {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #efe9de;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--np-muted);
}

#demo .ce-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px 2px rgb(255 255 255 / 0.5);
  opacity: 0;
  pointer-events: none;
}

#demo .ce-scan.is-on {
  opacity: 1;
}

/* ---------- Behind the scenes ---------- */

#demo .ce-log {
  margin: 0;
  padding: 10px 16px 12px;
  list-style: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

#demo .ce-log-e {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  animation: ce-log-in 0.35s var(--ease-out) both;
}

#demo .ce-log-e:first-child {
  border-top: 0;
}

#demo .ce-log-e.is-new::before {
  content: "";
  position: absolute;
  inset: 4px -10px;
  border: 1px solid rgb(255 255 255 / 0.45);
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  animation: ce-log-new 1.2s var(--ease-std) forwards;
}

#demo .ce-log-e--idle {
  padding-top: 0;
}

#demo .ce-log-ic {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--elev);
  color: var(--ash);
}

#demo .ce-log-ic svg {
  width: 14px;
  height: 14px;
}

#demo .ce-log-e.is-pending .ce-log-ic {
  color: var(--accent);
}

#demo .ce-log-e--transcribe.is-done .ce-log-ic,
#demo .ce-log-e--write.is-done .ce-log-ic,
#demo .ce-log-e--approve.is-done .ce-log-ic,
#demo .ce-log-e--send.is-done .ce-log-ic,
#demo .ce-log-e--schedule.is-done .ce-log-ic,
#demo .ce-log-e--save.is-done .ce-log-ic,
#demo .ce-log-e--clip.is-done .ce-log-ic {
  color: var(--ok);
}

#demo .ce-log-e--ideas .ce-log-ic,
#demo .ce-log-e--voice .ce-log-ic,
#demo .ce-log-e--notify .ce-log-ic,
#demo .ce-log-e--learn .ce-log-ic,
#demo .ce-log-e--seo .ce-log-ic {
  color: var(--accent);
}

#demo .ce-log-e--edit .ce-log-ic {
  color: var(--bone);
}

#demo .ce-log-e--detect .ce-log-ic,
#demo .ce-log-e--event .ce-log-ic {
  color: var(--ash);
}

#demo .ce-log-b {
  min-width: 0;
}

#demo .ce-log-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

#demo .ce-log-t {
  min-width: 0;
  margin: 0;
  padding-top: 1px;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.4;
  color: var(--bone);
  overflow-wrap: anywhere;
}

#demo .ce-log-e--idle .ce-log-t {
  color: var(--ash);
}

#demo .ce-log-tm {
  flex: none;
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--ash);
  white-space: nowrap;
}

#demo .ce-log-done {
  color: var(--ok);
}

#demo .ce-log-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 5px;
  vertical-align: middle;
}

#demo .ce-log-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  animation: ce-dot 1.2s ease-in-out infinite;
}

#demo .ce-log-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

#demo .ce-log-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

#demo .ce-log-shim {
  display: block;
  height: 2px;
  margin-top: 9px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--line) 0%, var(--accent) 50%, var(--line) 100%);
  background-size: 200% 100%;
  animation: ce-shim 1.4s linear infinite;
}

/* Cards under a log entry */

#demo .ce-lc {
  margin-top: 8px;
  padding: 8px 10px;
  border-left: 2px solid var(--accent);
  border-radius: 0 6px 6px 0;
  background: var(--elev);
}

#demo .ce-lc--data {
  border-left-color: var(--line);
}

#demo .ce-lc--quote {
  border-left-color: var(--accent);
}

#demo .ce-lc-h {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 10px;
  margin-bottom: 6px;
}

#demo .ce-lc-t {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ash);
}

#demo .ce-lc-h .ce-lc-t {
  min-width: 0;
}

#demo .ce-lc-r {
  flex: none;
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  white-space: nowrap;
  color: var(--ash);
}

#demo .ce-kv {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  align-items: baseline;
}

#demo .ce-kv dt {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ash);
}

#demo .ce-kv dd {
  min-width: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  color: var(--bone);
  overflow-wrap: anywhere;
}

#demo .ce-tr {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  padding: 3px 0;
}

#demo .ce-tr .ce-tr-ts {
  font-size: 12px;
  color: var(--accent);
}

#demo .ce-tr-tx {
  font-size: 14px;
  line-height: 1.45;
  color: var(--bone-70);
}

#demo .ce-idea {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  height: 20px;
  margin-top: 4px;
  animation: ce-row-in 0.35s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 110ms);
}

#demo .ce-type {
  justify-self: center;
  width: 76px;
  padding: 2px 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-align: center;
  color: var(--bone-70);
}

#demo .ce-idea-t {
  min-width: 0;
  font-size: 14px;
  color: var(--bone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .ce-idea-ts {
  font-size: 12px;
  color: var(--accent);
}

#demo .ce-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 10px;
}

#demo .ce-rule {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--bone-70);
}

#demo .ce-rule-ic {
  width: 10px;
  height: 10px;
  color: var(--ok);
}

#demo .ce-vl {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ash);
}

#demo .ce-vl--gold {
  color: var(--accent);
}

#demo .ce-gen {
  margin: 3px 0 10px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ash);
}

/* The generic sentence is struck through across every line; the strike is drawn in at +500 ms */
#demo .ce-strike {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--ash);
  animation: ce-strike-draw 0.5s 0.5s both;
}

#demo .ce-vmine {
  padding-left: 10px;
  border-left: 2px solid var(--accent);
  animation: ce-fade 0.4s 0.9s both;
}

#demo .ce-mine {
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--bone);
}

#demo .ce-outs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 14px;
}

#demo .ce-out {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#demo .ce-out-l {
  min-width: 0;
  font-size: 14px;
  color: var(--bone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .ce-out-n {
  font-size: 14px;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
}

#demo .ce-out-n.is-tick {
  animation: ce-tick 0.6s ease-out;
}

#demo .ce-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--elev-2);
}

#demo .ce-app {
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--accent);
  color: var(--accent-ink);
}

#demo .ce-app svg {
  width: 11px;
  height: 11px;
}

#demo .ce-msg-b {
  min-width: 0;
}

#demo .ce-msg-h {
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: var(--ash);
}

#demo .ce-msg-t {
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--bone);
}

#demo .ce-diff {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--bone);
}

#demo .ce-diff del {
  color: var(--ash);
  text-decoration: line-through;
}

#demo .ce-diff ins {
  padding: 0 3px;
  border-radius: 3px;
  text-decoration: none;
  background: rgb(255 255 255 / 0.18);
  color: var(--bone);
}

#demo .ce-doc-app {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ash);
}

#demo .ce-doc-app svg {
  width: 12px;
  height: 12px;
}

#demo .ce-doc-t {
  margin-top: 6px;
  font-size: 14.5px;
  line-height: 1.3;
  color: var(--bone);
}

#demo .ce-doc-l {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--bone-70);
}

/* Notion-style clip briefs page */

#demo .ce-nt {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--nt-bg);
  color: var(--nt-ink);
}

#demo .ce-nt-h {
  display: flex;
  align-items: center;
  gap: 7px;
}

#demo .ce-nt-ic {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--nt-muted);
}

#demo .ce-nt-t {
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--nt-ink);
}

#demo .ce-nt-app {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--nt-muted);
}

#demo .ce-nt-s {
  margin-top: 2px;
  font-size: 13px;
  color: var(--nt-muted);
}

#demo .ce-nt-tb {
  margin-top: 8px;
}

#demo .ce-nt-row {
  display: grid;
  grid-template-columns: 52px 92px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  border-bottom: 1px solid var(--nt-line);
  animation: ce-row-in 0.35s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 150ms + 200ms);
}

#demo .ce-nt-row--h {
  min-height: 24px;
  font-size: 12px;
  color: var(--nt-muted);
  animation: none;
}

#demo .ce-nt-n {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--nt-ink);
}

#demo .ce-nt-io {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--nt-ink);
  white-space: nowrap;
}

#demo .ce-nt-hook {
  min-width: 0;
  font-size: 13.5px;
  color: var(--nt-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .ce-nt-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
  white-space: nowrap;
  background: var(--nt-tag-bg);
  color: var(--nt-tag-ink);
}

/* SEO summary */

#demo .ce-seo-r {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: baseline;
  margin-top: 7px;
}

#demo .ce-seo-r--h {
  align-items: start;
}

#demo .ce-seo-k {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ash);
}

#demo .ce-seo-v {
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
  color: var(--bone);
}

#demo .ce-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#demo .ce-seo-gl {
  text-transform: none;
  letter-spacing: 0.02em;
}

#demo .ce-seo-c {
  font-size: 11px;
  color: var(--ash);
  white-space: nowrap;
}

#demo .ce-kw {
  justify-self: start;
  padding: 2px 8px;
  border: 1px solid var(--accent-40);
  border-radius: 999px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--accent);
}

#demo .ce-heads {
  grid-column: 2 / 4;
  display: grid;
  gap: 4px;
}

#demo .ce-heads li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--bone);
}

#demo .ce-h2 {
  flex: none;
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ash);
}

#demo .ce-q-l {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--accent);
}

#demo .ce-q-t {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--bone);
}

/* ---------- Approval calendar ---------- */

#demo .ce-cal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-sans);
}

#demo .ce-cal-h {
  flex: none;
  padding: 12px 14px 6px;
  border-bottom: 1px solid var(--line);
}

#demo .ce-cal-r1 {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  height: 52px;
}

#demo .ce-count {
  min-width: 0;
}

#demo .ce-count-l {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--ash);
  white-space: nowrap;
}

#demo .ce-count-n {
  position: relative;
  display: inline-block;
  margin-top: 2px;
  vertical-align: top;
}

#demo .ce-roll {
  position: relative;
  display: block;
  height: 1.1em;
  overflow: hidden;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--bone);
}

#demo .ce-count--ready .ce-roll {
  font-size: 30px;
}

#demo .ce-count--sched .ce-roll {
  font-size: 22px;
  color: var(--ash);
}

#demo .ce-count--sched.is-on .ce-roll {
  color: var(--ok);
}

#demo .ce-roll-v {
  display: block;
}

#demo .ce-roll-v.is-out {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  animation: ce-roll-out 0.45s var(--ease-out) forwards;
}

#demo .ce-roll-v.is-in {
  animation: ce-roll-in 0.45s var(--ease-out) both;
}

#demo .ce-count-n.is-pulse .ce-roll {
  animation: ce-flash 0.9s var(--ease-std);
}

#demo .ce-plus {
  position: absolute;
  left: calc(100% + 6px);
  top: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
  color: var(--accent);
  opacity: 0;
  pointer-events: none;
  animation: ce-plus-up 0.9s var(--ease-out) forwards;
}

#demo .ce-plus--ok {
  color: var(--ok);
}

#demo .ce-approve-all {
  align-self: center;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border: 1px solid hsl(152 60% 48% / 0.5);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  color: var(--ok);
  transition: opacity 0.3s, background-color 0.3s, color 0.3s;
}

#demo .ce-approve-all.is-press {
  background: var(--ok);
  color: var(--ink);
  animation: ce-press 0.4s var(--ease-out);
}

#demo .ce-cal[data-ready="0"] .ce-approve-all {
  opacity: 0.4;
}

#demo .ce-cal-r2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  height: 24px;
  margin-top: 2px;
}

#demo .ce-week-t {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--bone);
}

#demo .ce-week-r {
  font-size: 11.5px;
  color: var(--ash);
  white-space: nowrap;
}

#demo .ce-week {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 6px 12px 18px;
  overflow: hidden;
  transition: opacity 0.4s var(--ease-std);
}

#demo .ce-cal.is-drawer .ce-week {
  opacity: 0.4;
}

#demo .ce-day {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 8px;
  align-items: start;
}

#demo .ce-day + .ce-day {
  margin-top: 11px;
}

#demo .ce-day + .ce-day::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -6px;
  height: 1px;
  background: var(--line-soft);
}

#demo .ce-rail {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

#demo .ce-wd {
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--ash);
}

#demo .ce-dn {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--bone);
}

#demo .ce-cards {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

#demo .ce-empty {
  display: flex;
  align-items: center;
  height: 42px;
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ash);
}

/* Channel tile: identity colour from the group, 16% tint, 38% border, solid icon */

#demo .ce-chan {
  --g: var(--ce-g-posts);
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid color-mix(in oklab, var(--g) 38%, transparent);
  background: color-mix(in oklab, var(--g) 16%, transparent);
  color: var(--g);
}

#demo .ce-chan[data-g="clips"] {
  --g: var(--ce-g-clips);
}

#demo .ce-chan[data-g="long"] {
  --g: var(--ce-g-long);
}

#demo .ce-chan svg {
  display: block;
  width: 13px;
  height: 13px;
}

#demo .ce-chan--sm {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}

#demo .ce-chan--sm svg {
  width: 10px;
  height: 10px;
}

/* Cards */

#demo .ce-card {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  grid-template-rows: 30px;
  column-gap: 10px;
  align-items: center;
  align-content: center;
  height: 42px;
  padding: 6px 10px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--elev);
}

#demo .ce-card > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

#demo .ce-card.is-slot {
  grid-template-columns: 24px minmax(0, 1fr);
  background: transparent;
  border-style: dashed;
}

#demo .ce-card.has-tag,
#demo .ce-card[data-ce-card="li2"],
#demo .ce-card[data-ce-card="nl"] {
  height: 58px;
  grid-template-rows: 30px 16px;
}

#demo .ce-card.is-scheduled {
  border-color: hsl(152 60% 48% / 0.35);
  background: hsl(152 60% 48% / 0.06);
  box-shadow: inset 3px 0 0 0 var(--ok);
}

#demo .ce-card.is-wait {
  border-color: hsl(214 85% 66% / 0.35);
  background: hsl(214 85% 66% / 0.06);
  box-shadow: inset 3px 0 0 0 var(--info);
}

#demo .ce-slot-ic {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--ash);
}

#demo .ce-slot-ic svg {
  display: block;
  width: 14px;
  height: 14px;
}

#demo .ce-card-b {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}

#demo .ce-card-t {
  min-width: 0;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--bone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .ce-card-m {
  display: block;
  min-width: 0;
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.3;
  color: var(--ash);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#demo .ce-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--ok);
  vertical-align: 1px;
}

#demo .ce-card-r {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
}

#demo .ce-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  color: var(--bone-70);
}

#demo .ce-pill svg {
  display: none;
  width: 10px;
  height: 10px;
}

#demo .ce-pill--ok {
  border-color: hsl(152 60% 48% / 0.5);
  color: var(--ok);
}

#demo .ce-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--bone-70);
}

#demo .ce-chip svg {
  flex: none;
  width: 10px;
  height: 10px;
}

#demo .ce-chip--ok {
  border-color: hsl(152 60% 48% / 0.45);
  color: var(--ok);
}

#demo .ce-chip--info {
  border-color: hsl(214 85% 66% / 0.45);
  color: var(--info);
}

#demo .ce-tag {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: start;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 16px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--bone-70);
  animation: ce-tag-in 0.4s var(--ease-out) both;
}

#demo .ce-tag svg {
  flex: none;
  width: 10px;
  height: 10px;
  color: var(--accent);
}

/* Drop: the card replaces its slot, a gold ring fades */
#demo .ce-card.ce-drop {
  transform-origin: top center;
  animation: ce-drop 0.42s var(--ease-out) both, ce-ring 1s ease-out both;
}

/* Scheduled: a green wash sweeps across, the check pops */
#demo .ce-card.ce-sched::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, hsl(152 60% 48% / 0.22), transparent 85%);
  transform-origin: left center;
  animation: ce-wash 0.4s var(--ease-out) both;
}

#demo .ce-card.ce-sched .ce-chip svg {
  animation: ce-pop 0.36s var(--ease-out) both;
}

/* Waiting for edit: a blue flash ring */
#demo .ce-card.ce-waitflash {
  animation: ce-waitring 0.6s ease-out both;
}

/* ---------- Draft drawer (approve scenario) ---------- */

#demo .ce-drawer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 78%;
  display: flex;
  flex-direction: column;
  background: var(--elev);
  border-top: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -18px 40px -12px rgba(0, 0, 0, 0.7);
  transform: translateY(100%);
  transition: transform 0.45s var(--ease-out);
}

#demo .ce-drawer.is-open {
  transform: none;
}

#demo .ce-dr-h {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

#demo .ce-dr-hd {
  flex: 1;
  min-width: 0;
}

#demo .ce-dr-k {
  font-size: 14.5px;
  color: var(--bone);
}

#demo .ce-dr-f {
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ash);
}

#demo .ce-dr-x {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--ash);
}

#demo .ce-dr-x svg {
  width: 14px;
  height: 14px;
}

#demo .ce-dr-post {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  margin: 12px 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--lp-bg);
  color: var(--lp-ink);
}

#demo .ce-dr-au {
  display: flex;
  align-items: center;
  gap: 8px;
}

#demo .ce-av {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--nc-navy);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--nc-cream);
}

#demo .ce-dr-id {
  flex: 1;
  min-width: 0;
}

#demo .ce-dr-n {
  font-size: 15px;
  font-weight: 600;
  color: var(--lp-ink);
}

#demo .ce-dr-r {
  font-size: 13px;
  color: var(--lp-muted);
}

#demo .ce-dr-pill {
  padding: 3px 8px;
  border: 1px solid var(--lp-line);
  border-radius: 999px;
  font-size: 11px;
  color: var(--lp-muted);
}

#demo .ce-dr-txt {
  margin-top: 12px;
}

#demo .ce-dr-l {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--lp-ink);
}

#demo .ce-dr-gap {
  height: 6px;
}

#demo .ce-dr-old {
  display: inline-block;
  max-width: 12em;
  padding: 0 1px;
  border-radius: 2px;
  overflow: hidden;
  vertical-align: bottom;
  color: var(--lp-ink);
  transition: background-color 0.15s, color 0.25s, max-width 0.3s var(--ease-std), opacity 0.3s var(--ease-std);
}

#demo .ce-dr-old.is-hl {
  background: rgb(255 255 255 / 0.2);
}

#demo .ce-dr-old.is-strike {
  color: var(--lp-muted);
  text-decoration: line-through;
  text-decoration-color: var(--lp-muted);
}

#demo .ce-dr-old.is-gone {
  max-width: 0;
  padding: 0;
  opacity: 0;
}

#demo .ce-dr-new {
  border-radius: 2px;
  color: var(--lp-ink);
}

#demo .ce-dr-new.is-typing {
  background: rgb(255 255 255 / 0.18);
}

#demo .ce-dr-new.is-typing::after {
  content: "";
  display: inline-block;
  width: 1.5px;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: -0.18em;
  background: var(--accent);
  animation: ce-caret 0.8s steps(1) infinite;
}

#demo .ce-dr-ft {
  flex: none;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}

#demo .ce-dr-btn {
  height: 32px;
  min-height: 32px;
  padding: 0 14px;
  font-size: 14px;
}

#demo .ce-dr-btn.is-on {
  border-color: var(--accent);
  color: var(--accent);
}

#demo .ce-dr-btn.is-press {
  animation: ce-press 0.4s var(--ease-out);
}

/* ---------- Notification (phone-style) ---------- */

#demo .ce-toast {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 3;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(32, 30, 27, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8);
  transform: translateY(-120%);
  transition: transform 0.42s var(--ease-out);
  pointer-events: none;
}

#demo .ce-toast.is-on {
  transform: translateY(0);
}

#demo .ce-toast .ce-app {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

#demo .ce-toast .ce-app svg {
  width: 15px;
  height: 15px;
}

#demo .ce-toast-b {
  min-width: 0;
}

#demo .ce-toast-a {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ash);
}

#demo .ce-toast-t {
  margin-top: 2px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--bone);
}

#demo .ce-toast-x {
  margin-top: 2px;
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--ash);
}

/* ---------- Badges in the header of the calendar: the approve-all and counters are above ---------- */

/* ---------- Caption, links ---------- */

#demo .ce-demo-caption {
  margin: 16px 0 0;
  max-width: 60ch;
  font-size: 14px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  text-transform: none;
  color: var(--bone-70);
}

#demo .demo-after {
  margin-top: 8px;
}

#demo .demo-after .link-mono {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 0;
}

/* ---------- Keyframes ---------- */

@keyframes ce-log-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes ce-log-new {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes ce-dot {
  0%,
  60%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes ce-shim {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

@keyframes ce-pulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ce-ep-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes ce-ep-glow {
  from {
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.6);
  }
  to {
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0);
  }
}

@keyframes ce-zoom {
  from {
    opacity: 0;
    transform: scale(1.02);
  }
}

@keyframes ce-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes ce-fade {
  from {
    opacity: 0;
  }
}

@keyframes ce-strike-draw {
  from {
    text-decoration-color: transparent;
  }
}

@keyframes ce-row-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

@keyframes ce-tick {
  from {
    color: var(--accent);
  }
}

@keyframes ce-roll-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-100%);
  }
}

@keyframes ce-roll-in {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
}

@keyframes ce-flash {
  0%,
  100% {
    color: var(--bone);
  }
  30% {
    color: var(--accent);
  }
}

@keyframes ce-plus-up {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-14px);
  }
}

@keyframes ce-press {
  from {
    transform: scale(0.96);
  }
}

@keyframes ce-drop {
  from {
    opacity: 0;
    transform: perspective(600px) rotateX(-75deg) translateY(-6px);
  }
}

@keyframes ce-ring {
  from {
    box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgb(255 255 255 / 0.35);
  }
  to {
    box-shadow: 0 0 0 1px rgb(255 255 255 / 0), 0 0 18px rgb(255 255 255 / 0);
  }
}

@keyframes ce-wash {
  from {
    transform: scaleX(0);
  }
}

@keyframes ce-pop {
  0% {
    transform: scale(0.5);
  }
  60% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes ce-waitring {
  from {
    box-shadow: 0 0 0 1px hsl(214 85% 66% / 0.6), 0 0 18px hsl(214 85% 66% / 0.35);
  }
  to {
    box-shadow: 0 0 0 1px hsl(214 85% 66% / 0), 0 0 18px hsl(214 85% 66% / 0);
  }
}

@keyframes ce-tag-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
}

@keyframes ce-caret {
  50% {
    opacity: 0;
  }
}

/* ---------- Static (seeked finished state) and reduced motion: nothing animates ---------- */

#demo .ce-demo-stage.is-static *,
#demo .ce-demo-stage.is-static *::before,
#demo .ce-demo-stage.is-static *::after {
  transition: none !important;
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  #demo .ce-demo-stage *,
  #demo .ce-demo-stage *::before,
  #demo .ce-demo-stage *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- 1360px and up: wide source and log / calendar columns ---------- */

@media (min-width: 1360px) {
  #demo .ce-grid {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 22px;
  }

  #demo .ce-srcsw button svg {
    display: block;
  }

  #demo .ce-side {
    grid-template-columns: minmax(0, 1fr) 480px;
    gap: 22px;
  }
}

/* ---------- Under 1360px: the source column is narrower, so its badge and controls are a little smaller ---------- */

@media (max-width: 1359px) {
  #demo .ce-badge {
    gap: 0;
    padding: 3px 7px;
    font-size: 10.5px;
    letter-spacing: 0.06em;
  }

  #demo .ce-badge-ic {
    display: none;
  }

  #demo .ce-controls {
    gap: 6px;
  }

  #demo .ce-controls .demo-ctl {
    padding: 0 9px;
  }

  #demo .ce-controls .demo-ctl[data-act="toggle"] {
    min-width: 112px;
  }

  #demo .ce-controls .demo-speed button {
    min-width: 30px;
    padding: 0 8px;
  }
}

/* ---------- 1200 to 1359px: narrower source column, calendar 400px ---------- */

@media (min-width: 1200px) and (max-width: 1359px) {
  #demo .ce-grid {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
  }


  #demo .ce-side {
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 20px;
  }

  #demo .ce-nt-stc {
    display: none;
  }

  #demo .ce-nt-row {
    grid-template-columns: 52px 92px minmax(0, 1fr);
  }
}

/* ---------- 901 to 1199px: source left, the log and calendar as a carousel on the right ---------- */

@media (max-width: 1199px) {
  #demo .ce-grid {
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 20px;
  }

  #demo .ce-side {
    display: flex;
    overflow: hidden;
    gap: 0;
  }

  #demo .ce-side > .ce-col {
    flex: none;
    width: 100%;
    transition: transform 0.6s var(--ease-out), visibility 0.6s;
  }

  #demo .ce-side[data-show="cal"] > .ce-col {
    transform: translateX(-100%);
  }

  #demo .ce-side[data-show="cal"] .ce-col-log,
  #demo .ce-side[data-show="log"] .ce-col-cal {
    visibility: hidden;
  }

  #demo .ce-side-nav {
    display: inline-flex;
  }

  #demo .ce-nt-stc {
    display: none;
  }

  #demo .ce-nt-row {
    grid-template-columns: 52px 92px minmax(0, 1fr);
  }

  #demo .demo-status,
  #demo .demo-status-text {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}

/* ---------- 900px and below: one column, source then the carousel ---------- */

@media (max-width: 900px) {
  #demo .ce-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 16px;
  }

  #demo .ce-src {
    height: 520px;
  }

  #demo .ce-demo-stage .demo-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
  }

  #demo .ce-demo-stage .demo-clock {
    order: 2;
    padding: 5px 10px;
    font-size: 12px;
  }

  #demo .ce-demo-stage .demo-status {
    order: 3;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-height: 4.6em;
    white-space: normal;
    overflow: visible;
  }
}

@media (max-width: 600px) {
  #demo .ce-grid {
    padding: 12px;
  }

  /* Calendar: the words give way to icons; states stay readable by their icon and a screen reader label */
  #demo .ce-pill {
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
  }

  #demo .ce-pill svg {
    display: block;
  }

  #demo .ce-pill .ce-pt,
  #demo .ce-chip .ce-ct {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  #demo .ce-chip {
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
  }

  #demo .ce-chip svg {
    width: 14px;
    height: 14px;
  }

  #demo .ce-card-r {
    gap: 4px;
  }

  #demo .ce-card-t {
    font-size: 14px;
  }

  #demo .ce-card.has-tag {
    height: 58px;
  }

  #demo .ce-cal-r1 {
    gap: 14px;
    flex-wrap: wrap;
    align-items: flex-end;
  }

  #demo .ce-count-l {
    white-space: normal;
    max-width: 110px;
    letter-spacing: 0.08em;
    font-size: 10.5px;
  }

  #demo .ce-count--ready .ce-roll {
    font-size: 26px;
  }

  #demo .ce-count--sched .ce-roll {
    font-size: 20px;
  }

  #demo .ce-approve-all {
    height: 24px;
    padding: 0 10px;
  }

  #demo .ce-week-r {
    display: none;
  }

  #demo .ce-log {
    padding: 8px 12px 10px;
  }

  #demo .ce-log-tm {
    font-size: 11px;
  }

  #demo .ce-outs {
    grid-template-columns: minmax(0, 1fr);
  }

  #demo .ce-idea {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    height: auto;
    min-height: 20px;
    padding: 3px 0;
  }

  #demo .ce-type {
    width: 64px;
  }

  #demo .ce-idea-t {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  #demo .ce-kv {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  #demo .ce-kv dt {
    margin-top: 4px;
  }

  #demo .ce-seo-r {
    grid-template-columns: 84px minmax(0, 1fr) auto;
  }

  #demo .ce-dr-post {
    margin: 10px;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  #demo .ce-label {
    flex-wrap: wrap;
    row-gap: 8px;
    min-height: 0;
  }

  #demo .ce-srcsw {
    max-width: 100%;
  }

  #demo .demo-label-r {
    white-space: normal;
    text-align: right;
  }
}

@media (pointer: coarse) {
  #demo .ce-srcsw button,
  #demo .ce-side-nav button {
    min-height: 40px;
  }
}

/* Touch targets: 44px tall on tablets and touch screens, the speed buttons 44px wide */
@media (max-width: 1199px), (pointer: coarse) {
  #demo .ce-controls .demo-ctl,
  #demo .ce-srcsw button,
  #demo .ce-side-nav button {
    min-height: 44px;
  }

  #demo .ce-controls .demo-speed button {
    min-width: 44px;
  }
}
