/**
 * V1 — Newspaper restraint (spike/notebook-stream-design-bets).
 *
 * Bet: pure chrome reduction restores the McMaster-Carr / newspaper register
 * the calm-UI doctrine asks for. Same canvas as today; less stuff yelling on it.
 *
 * Moves (scoped to body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])):
 *   A — kind-differentiated chrome (heading/prose borderless; widgets hairline)
 *   B — hover-reveal sweep on persistent affordances
 *   C — 820px reading column lock
 *   D — topbar collapse to one thin line
 *   + thin view-tab strip with underline + glyph on active
 *   + hairline target-thumbnail grid in head-node
 *   + plain-language empty state
 *
 * FLOOR (preserved per Caitlin direct 2026-06-04):
 *   --s-color-bg-panel cell background — untouched
 *   --s-color-bg-subtle chip background — untouched
 *   default chip border + hover tone-shift — untouched
 *   status-pill background tokens — untouched
 *
 * Throwaway: not for main without an explicit promotion brief.
 */

/* ════════════════════════════════════════════════════════════════════════
 * C — 820px reading column lock
 * The stream host stretches to fill the column, but the cell stack inside
 * caps at 820px so prose reads at a comfortable line length on any width.
 * ═══════════════════════════════════════════════════════════════════════ */

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-shell__stream-host {
  padding-left: var(--s-space-5);
  padding-right: var(--s-space-5);
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-shell__stream-host > * {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

/* ════════════════════════════════════════════════════════════════════════
 * D — Topbar collapse
 * One thin band. Reduce surfacebar padding; let the view tabs sit closer
 * to the content. Hide the surfacebar spacer expand affordance if it adds
 * weight (the picker chip is still visible at left).
 * ═══════════════════════════════════════════════════════════════════════ */

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-shell__surfacebar {
  padding-top: 0;
  padding-bottom: 0;
  min-height: 32px;
  border-bottom: 1px solid var(--s-color-border-subtle);
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-shell__view-switch {
  gap: 0;
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-shell__view-tab {
  position: relative;
  background: transparent;
  border: 0;
  padding: 6px var(--s-space-3);
  font-size: var(--s-font-size-0);
  color: var(--s-color-fg-tertiary);
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: var(--s-font-weight-regular);
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-shell__view-tab:hover:not(:disabled) {
  color: var(--s-color-fg-primary);
  background: transparent;
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-shell__view-tab[aria-selected="true"] {
  color: var(--s-color-fg-primary);
  font-weight: var(--s-font-weight-semibold);
}

/* Thin underline on the active tab — orient-on-arrival cue */
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])
  .notebook-shell__view-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: var(--s-space-3);
  right: var(--s-space-3);
  bottom: 0;
  height: 2px;
  background: var(--s-color-fg-primary);
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])
  .notebook-shell__view-tab[disabled],
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])
  .notebook-shell__view-tab[disabled]:hover {
  color: var(--s-color-fg-tertiary);
  opacity: 0.5;
}

/* ════════════════════════════════════════════════════════════════════════
 * A — Kind-differentiated chrome
 * Heading + prose + markdown cells lose card chrome; they become typography
 * sitting in the column. Widget + code + cas-sar + project-presets keep
 * hairline border on the locked panel background.
 *
 * Selectors target [data-cell-kind="..."] on the cell root if present, with
 * fall-backs to body-class detection via :has() for cells whose kind is only
 * known via inner class (notebook-cell__body--cas-sar etc.).
 * ═══════════════════════════════════════════════════════════════════════ */

/* Default cell — keep hairline border, panel bg preserved */
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell {
  border-color: var(--s-color-border-subtle);
  /* PRESERVED: background — do not override panel bg */
  transition: border-color 0.12s ease;
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell:hover {
  border-color: var(--s-color-border-default);
}

/* Heading + prose + markdown — borderless, no card chrome, transparent */
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])
  .notebook-cell[data-cell-kind="heading"],
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])
  .notebook-cell[data-cell-kind="prose"],
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])
  .notebook-cell[data-cell-kind="markdown"] {
  border: 0;
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])
  .notebook-cell[data-cell-kind="heading"]:hover,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])
  .notebook-cell[data-cell-kind="prose"]:hover,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])
  .notebook-cell[data-cell-kind="markdown"]:hover {
  border: 0;
  background: transparent;
}

/* Decision cells keep a subtle hairline — they're a deliberate stop in the read */
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])
  .notebook-cell[data-cell-kind="decision"] {
  border-color: var(--s-color-border-subtle);
}

/* ════════════════════════════════════════════════════════════════════════
 * B — Hover-reveal sweep
 * Persistent affordances opacity:0 → 1 on .notebook-cell:hover.
 * Project-presets head-node is the exception — its chrome stays persistent
 * because it's the orient-on-arrival surface.
 * ═══════════════════════════════════════════════════════════════════════ */

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell__margin,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell__collapse,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell__drag-grip,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell__add,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell__kebab {
  opacity: 0;
  transition: opacity 0.12s ease;
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell:hover .notebook-cell__margin,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell:hover .notebook-cell__collapse,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell:hover .notebook-cell__drag-grip,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell:hover .notebook-cell__add,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell:hover .notebook-cell__kebab,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell:focus-within .notebook-cell__margin,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell:focus-within .notebook-cell__collapse,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell:focus-within .notebook-cell__drag-grip,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell:focus-within .notebook-cell__add,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell:focus-within .notebook-cell__kebab {
  opacity: 1;
}

/* Project-presets head node — chrome stays visible; this is the orient surface */
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])
  .notebook-cell:has(.notebook-cell__body--project-presets) .notebook-cell__margin,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])
  .notebook-cell:has(.notebook-cell__body--project-presets) .notebook-cell__collapse {
  opacity: 1;
}

/* ════════════════════════════════════════════════════════════════════════
 * Header chrome restraint
 * Drop uppercase/bold kind label noise; keep the kind icon + title close.
 * ═══════════════════════════════════════════════════════════════════════ */

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell__hd {
  border-bottom: 0;
  padding-bottom: 2px;
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell__hd-title {
  font-size: var(--s-font-size-0);
  color: var(--s-color-fg-tertiary);
  font-weight: var(--s-font-weight-regular);
  letter-spacing: 0;
  text-transform: none;
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])
  .notebook-cell:hover .notebook-cell__hd-title,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])
  .notebook-cell:focus-within .notebook-cell__hd-title {
  color: var(--s-color-fg-secondary);
}

/* ════════════════════════════════════════════════════════════════════════
 * Project-presets head-node — hairline target-thumbnail grid
 * The head-node is the orient-on-arrival surface. Targets render as a
 * compact hairline grid; thumbnails are 32px on the locked panel bg.
 * ═══════════════════════════════════════════════════════════════════════ */

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])
  .notebook-cell:has(.notebook-cell__body--project-presets) {
  border-color: var(--s-color-border-subtle);
  /* PRESERVED: panel bg */
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-presets__section {
  padding-block: var(--s-space-2);
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-presets__section-head {
  font-size: var(--s-font-size-micro);
  color: var(--s-color-fg-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: var(--s-font-weight-semibold);
  margin-bottom: var(--s-space-1);
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-presets__chips {
  gap: var(--s-space-2);
  flex-wrap: wrap;
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-presets__target-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-space-2);
  padding: var(--s-space-1) var(--s-space-2);
  border: 1px solid var(--s-color-border-subtle);
  border-radius: var(--s-radius-sm);
  /* PRESERVED: chip bg via existing tokens */
  background: var(--s-color-bg-subtle);
  font-size: var(--s-font-size-0);
  color: var(--s-color-fg-primary);
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])
  .notebook-presets__target-chip:hover {
  border-color: var(--s-color-border-default);
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-presets__target-thumb {
  width: 32px;
  height: 32px;
  border-radius: var(--s-radius-sm);
  background: var(--s-color-bg-panel);
  border: 1px solid var(--s-color-border-subtle);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-presets__target-thumb img,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-presets__target-thumb svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-presets__target-label {
  font-size: var(--s-font-size-0);
  color: var(--s-color-fg-primary);
  font-weight: var(--s-font-weight-semibold);
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-presets__target-kind {
  font-size: var(--s-font-size-micro);
  color: var(--s-color-fg-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ════════════════════════════════════════════════════════════════════════
 * Status pill / pending state — hairline restraint
 * One focal point per cell state. Pending = chip border tint only; stale =
 * widget-foot pill only; focused = border accent. No co-occurrence.
 * ═══════════════════════════════════════════════════════════════════════ */

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .s-cas-narrative__stale {
  font-size: var(--s-font-size-micro);
  padding: 1px var(--s-space-2);
  border-width: 1px;
  font-weight: var(--s-font-weight-regular);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  /* PRESERVED: bg via existing status-warning-soft token */
}

/* ════════════════════════════════════════════════════════════════════════
 * Cell stack rhythm
 * gap:space-4 between cells, no extra outer padding. Calm cadence.
 * ═══════════════════════════════════════════════════════════════════════ */

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-shell__stream-host [data-notebook-cell] {
  margin-block: 0;
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-shell__stream-host {
  gap: var(--s-space-4);
}

/* ════════════════════════════════════════════════════════════════════════
 * Cell-palette / +Add — plain-language empty-state register
 * When the +Add palette opens at end-of-stream, the search input prompt
 * reads as plain language: "Add a cell…" instead of "Search".
 * (Text is JS-driven; this just lightens the chrome around it.)
 * ═══════════════════════════════════════════════════════════════════════ */

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell-palette {
  border: 1px dashed var(--s-color-border-subtle);
  /* PRESERVED: bg */
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell-palette__search {
  border-color: var(--s-color-border-subtle);
}

/* ════════════════════════════════════════════════════════════════════════
 * Last-worked right-edge marker (3px, subtle)
 * Persists across blur so the eye finds its place. Per J2 lock in spike.
 * ═══════════════════════════════════════════════════════════════════════ */

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])
  .notebook-cell[aria-current="true"]::after,
body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"])
  .notebook-cell[data-last-worked="true"]::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  right: -1px;
  width: 3px;
  background: var(--s-color-fg-primary);
  border-radius: 2px;
  opacity: 0.4;
  pointer-events: none;
}

body[data-notebook-stream-variant]:not([data-notebook-stream-variant="current"]) .notebook-cell {
  position: relative;
}
