/* Articles: the content planner (planner.js, specs/pulse-content-planner.md
   section 5). Pulse ground, hairlines, 4px panels, mono data captions, title
   case. Anchors: Linear board, list and status glyphs; Google Calendar month
   grid and phone week list. Colour: monochrome UI; site dots carry each
   site's own colour; --down only marks Needs Work; --up and --warn only
   mark pipeline health and a missed target date. The one flourish is the
   iridescent drop line while a card is dragged. Mobile first. */
.pl-page {
  --ui-ground: var(--bg); --ui-rail: var(--card); --ui-raised: var(--panel);
  --ui-hover: var(--accent-tint); --ui-pressed: var(--panel);
  --ui-ink: var(--text); --ui-ink-muted: var(--dim); --ui-ink-faint: var(--faint);
  --ui-ink-inverse: var(--bg); --ui-line: var(--border); --ui-line-strong: var(--line-strong);
  --ui-accent: var(--accent); --ui-accent-ink: var(--bg); --ui-ring-color: var(--ring);
  --ui-radius: var(--radius); --ui-radius-card: var(--radius);
  --pl-tap: 40px;
  padding-top: 12px; min-width: 0;
}
.pl-page .ui-input { border-color: var(--line-strong); font-family: var(--body); color-scheme: dark; min-width: 0; }
.pl-page .ico { width: 16px; height: 16px; flex: none; }
.pl-count { font: 11px var(--mono); color: var(--faint); font-variant-numeric: tabular-nums slashed-zero; }
.pl-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--dim)); flex: none; }

/* ── head ─────────────────────────────────────────────────────────────── */
.pl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
.pl-head h1 { font-size: clamp(28px, 4vw, 36px); letter-spacing: -.04em; line-height: 1.05; margin: 0 0 6px; }
.pl-sub { margin: 0; font: 12px var(--mono); color: var(--dim); min-height: 1.5em; }
.pl-sub .ui-skeleton { width: 180px; }
.pl-new { height: 40px; padding: 0 18px 0 14px; flex: none; }

/* ── site switcher: one row that scrolls inside its own box ───────────── */
.pl-sites { margin: 0 -16px 10px; position: relative; }
.pl-sites__track {
  position: relative; display: flex; gap: 6px; overflow-x: auto; padding: 2px 16px 4px; scrollbar-width: none;
  scroll-snap-type: x proximity; scroll-padding-inline: 16px; -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent);
}
.pl-sites__track::-webkit-scrollbar { display: none; }
.pl-skel-chip { display: block; flex: none; width: 110px; height: 36px; }
.pl-skel-tab { width: 76px; height: 20px; margin: 11px 8px; }
.pl-sitechip { display: inline-flex; flex: none; scroll-snap-align: start; }
.pl-sitechip .ui-chip { height: var(--pl-tap); padding: 0 12px; gap: 8px; font: 12px var(--mono); color: var(--dim); background: transparent; }
.pl-sitechip .ui-chip[aria-pressed="true"] { color: var(--text); background: var(--panel); border-color: var(--mark); }
.pl-sitechip__name { white-space: nowrap; }
.pl-sitechip .ui-chip:first-child:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.pl-gear.ui-iconbtn { width: var(--pl-tap); height: var(--pl-tap); border: 1px solid var(--mark); border-left: 0; border-radius: 0 var(--radius) var(--radius) 0; background: var(--panel); color: var(--dim); }
.pl-gear.ui-iconbtn:hover { color: var(--text); background: var(--accent-tint); }
.pl-sitechip [data-pl-site="all"] .pl-sitechip__name { font-family: var(--body); font-size: 13px; }
/* Sites with no articles wait behind "+N More", a menu at the row's end. */
.pl-sites { display: flex; align-items: flex-start; }
.pl-sites__track { flex: 0 1 auto; min-width: 0; }
.pl-more { flex: none; position: relative; z-index: 30; padding: 2px 16px 4px 0; margin-left: -4px; }
.pl-more__btn.ui-chip { height: var(--pl-tap); padding: 0 12px; font: 12px var(--mono); color: var(--dim); background: var(--bg); white-space: nowrap; }
.pl-more__btn.ui-chip:hover, .pl-more__btn.ui-chip[aria-expanded="true"] { color: var(--text); }
.pl-more__menu { min-width: 220px; max-height: min(60vh, 420px); overflow-y: auto; }
.pl-more__menu .ui-row { gap: 8px; font: 12px var(--mono); }

/* ── tools: search, sort, view toggle ─────────────────────────────────── */
.pl-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pl-search { position: relative; flex: 1 1 auto; max-width: 420px; min-width: 0; display: block; }
.pl-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.pl-search .ui-input { width: 100%; height: var(--pl-tap); padding-left: 36px; background: var(--card); }
.pl-sort { flex: none; margin-left: auto; }
.pl-sort .ui-input { height: 36px; min-height: 0; background: var(--card); font-size: 13px; padding-right: 30px; }
.pl-views { margin-left: auto; flex: none; --ui-seg-h: var(--pl-tap); }
.pl-views > button { gap: 6px; padding: 0 12px; }
.pl-views .ico { width: 15px; height: 15px; }

/* ── stage strip: a tab track whose tabs filter ───────────────────────── */
.pl-stages { margin: 0 -16px 8px; border-bottom: 1px solid var(--border); }
.pl-stages__track { display: flex; gap: 2px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; }
.pl-stages__track::-webkit-scrollbar { display: none; }
.pl-stage {
  position: relative; display: inline-flex; align-items: center; gap: 7px; flex: none;
  height: 42px; padding: 0 10px; border: 0; background: none; cursor: pointer;
  color: var(--dim); font: 500 13px var(--body); white-space: nowrap;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: color .15s var(--ease-inout), background .15s var(--ease-inout);
}
.pl-stage:hover { color: var(--text); background: var(--accent-tint); }
.pl-stage:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.pl-stage[aria-pressed="true"] { color: var(--text); }
.pl-stage[aria-pressed="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--text); }
.pl-stage[aria-pressed="true"] .pl-count { color: var(--dim); }

/* Status glyphs: monochrome, a circle that fills as the article moves on. */
.pl-glyph { width: 14px; height: 14px; flex: none; color: var(--dim); }
.pl-glyph[data-stage="idea"], .pl-glyph[data-stage="archived"], .pl-glyph[data-stage="hold"] { color: var(--faint); }
.pl-glyph[data-stage="ready"], .pl-glyph[data-stage="scheduled"], .pl-glyph[data-stage="published"] { color: var(--text); }
.pl-glyph[data-stage="needs-work"] { color: var(--down); }

/* ── pipeline health line (one site selected) ─────────────────────────── */
.pl-health { display: flex; align-items: center; gap: 10px; min-height: 36px; margin: 2px 0 4px; }
.pl-health[hidden] { display: none; }
.pl-health p { margin: 0; font-size: 13px; color: var(--dim); line-height: 1.45; flex: 1 1 auto; min-width: 0; }
.pl-health__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--faint); }
.pl-health__dot[data-state="running"] { background: var(--up); box-shadow: 0 0 0 3px rgba(63, 232, 77, .14); }
.pl-health__dot[data-state="paused"] { background: var(--warn); }
.pl-health .ui-btn { flex: none; }
.pl-status { min-height: 1.5em; margin: 0 0 8px; font-size: 12px; }
.pl-status:empty { min-height: 0; margin: 0; }

/* ── board ────────────────────────────────────────────────────────────── */
.pl-board {
  display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(200px, 1fr)); gap: 8px;
  overflow-x: auto; align-items: start; padding-bottom: 8px; margin-top: 4px;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.pl-board--single { grid-template-columns: minmax(0, 1fr); overflow: visible; }
.pl-col { background: var(--card); border: 1px solid var(--border); border-radius: 6px; min-width: 0; display: flex; flex-direction: column; }
.pl-col__head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 6px 12px; min-height: 44px; }
.pl-col__head h2 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.pl-col__head .ui-skeleton { width: 90px; }
.pl-col__sub { font: 10.5px var(--mono); color: var(--faint); margin-left: auto; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pl-col__sub + .pl-col__add.ui-iconbtn { margin-left: 0; flex: none; }
.pl-col__titles { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.pl-col__hint { font: 10px/13px var(--mono); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-col__add.ui-iconbtn { margin-left: auto; width: 28px; height: 28px; color: var(--faint); border-color: transparent; background: transparent; }
.pl-col__add.ui-iconbtn:hover { color: var(--text); background: var(--accent-tint); }
.pl-col__list { list-style: none; margin: 0; padding: 0 6px 6px; display: flex; flex-direction: column; gap: 6px; min-height: 64px; }
.pl-col__list--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.pl-col__empty { padding: 14px 8px; font-size: 12px; color: var(--faint); text-align: center; border: 1px dashed var(--border); border-radius: var(--radius); }
.pl-col--alert { background: rgba(255, 69, 58, .045); border-color: rgba(255, 69, 58, .28); }
.pl-col--alert .pl-col__head h2 { color: var(--down); }

/* Card: title first, then where it lives, then priority, intent and date. */
.pl-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0;
  padding: 10px 12px 9px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: border-color .15s var(--ease-inout), background .15s var(--ease-inout);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.pl-card[data-drag] { touch-action: pan-y; }
.pl-card:hover { border-color: var(--mark); }
.pl-card:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.pl-card__title { margin: 0; font-size: 14px; line-height: 1.38; font-weight: 500; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pl-card[data-p="1"] .pl-card__title { font-weight: 600; }
.pl-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 12px; color: var(--dim); min-width: 0; }
.pl-site { display: inline-flex; align-items: center; gap: 6px; font: 11px var(--mono); color: var(--dim); min-width: 0; }
.pl-pillar { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The failure line: two lines at most on a card; the editor shows it all. */
.pl-card__fail { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; margin: 0; font-size: 12px; line-height: 1.4; color: #ff8b82; }
.pl-row__fail { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; margin-top: 2px; font-size: 12px; line-height: 1.4; color: #ff8b82; }
.pl-row__fail span { color: var(--faint); font: 10.5px var(--mono); }
/* Planned is the queue: the top card of each site is written next. */
.pl-card.is-next { border-color: var(--line-strong); }
.pl-next { align-self: flex-start; font: 10px/16px var(--mono); letter-spacing: .02em; color: var(--text); padding: 0 6px; border: 1px solid var(--mark); border-radius: 3px; background: var(--accent-tint); }
.pl-card__fail span { color: var(--faint); font: 10.5px var(--mono); }
.pl-card__foot { display: flex; align-items: center; gap: 8px; min-height: 18px; }
.pl-intent { font: 10.5px var(--mono); color: var(--dim); padding: 1px 5px; border: 1px solid var(--border); border-radius: 3px; white-space: nowrap; }
.pl-src { font: 10.5px var(--mono); color: var(--faint); }
.pl-date { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font: 11px var(--mono); color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums slashed-zero; }
.pl-date .ico { width: 12px; height: 12px; }
.pl-date[data-kind="scheduled"] { color: var(--text); }
.pl-date[data-kind="target"] { padding: 0 5px; border: 1px dashed var(--mark); border-radius: 3px; line-height: 16px; }
.pl-date[data-kind="target"][data-late] { color: var(--warn); border-color: rgba(255, 159, 10, .5); }
.pl-pri { display: inline-flex; flex: none; }
.pl-pri svg { width: 12px; height: 12px; display: block; }
.pl-pri rect { fill: var(--line-strong); }
.pl-pri[data-p="1"] rect.on { fill: var(--text); }
.pl-pri[data-p="2"] rect.on { fill: var(--dim); }
.pl-pri[data-p="3"] rect.on { fill: var(--faint); }
.pl-card--skel { cursor: default; gap: 10px; padding: 14px 12px; }
.pl-card--skel:hover { border-color: var(--border); }

/* Add Idea, at the foot of Ideas. */
.pl-addidea { display: flex; align-items: center; gap: 8px; width: calc(100% - 12px); margin: 0 6px 6px; min-height: 40px; padding: 0 10px; border: 1px dashed transparent; border-radius: var(--radius); background: none; color: var(--faint); font: 500 13px var(--body); cursor: pointer; }
.pl-addidea:hover { color: var(--text); border-color: var(--line-strong); }
.pl-addidea:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.pl-addform { display: flex; flex-direction: column; gap: 6px; margin: 0 6px 6px; padding: 8px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); }
.pl-addform .ui-input { width: 100%; height: 36px; background: var(--bg); }
.pl-addform__site .ui-input { font: 12px var(--mono); }
.pl-addform__foot { display: flex; justify-content: flex-end; gap: 6px; }

/* Drag: the source fades, a lifted copy follows the pointer, pipeline
   columns step back, and an iridescent line marks the drop place. */
.pl-card.is-dragging { opacity: .35; border-style: dashed; }
.pl-board.is-dragging .pl-col:not([data-drop]) { opacity: .4; transition: opacity .2s var(--ease-out); }
.pl-board.is-dragging .pl-col[data-drop] { border-color: var(--line-strong); }
.pl-ghost {
  position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; margin: 0; list-style: none;
  border-color: var(--mark); background: #161616; cursor: grabbing;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06);
}
.pl-dropline { list-style: none; height: 2px; margin: -4px 2px; border-radius: 2px; background: var(--iri); box-shadow: 0 0 10px rgba(177, 140, 255, .55); }

/* ── list ─────────────────────────────────────────────────────────────── */
.pl-listhead { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 4px 0 8px; font-size: 12px; color: var(--dim); }
.pl-listhead .pl-check { width: auto; gap: 10px; padding-right: 8px; }
.pl-group { margin-bottom: 20px; }
.pl-group__site { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; min-height: 32px; }
.pl-group__site h2 { margin: 0; font: 600 14px var(--mono); letter-spacing: -.01em; }
.pl-group__site .ui-iconbtn { width: 32px; height: 32px; color: var(--faint); border-color: transparent; background: transparent; }
.pl-group__site .ui-iconbtn:hover { color: var(--text); background: var(--accent-tint); }
.pl-pillar-group + .pl-pillar-group { margin-top: 10px; }
.pl-group__pillar { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; font-size: 12px; font-weight: 500; color: var(--dim); }
.pl-rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.pl-row { display: flex; align-items: stretch; min-width: 0; }
.pl-row + .pl-row { border-top: 1px solid var(--border); }
.pl-row.is-selected { background: rgba(255, 255, 255, .045); }
.pl-row--skel { flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); margin-bottom: 6px; }
.pl-row__open {
  flex: 1 1 auto; min-width: 0; display: grid; align-items: center; gap: 4px 10px;
  grid-template-columns: 16px minmax(0, 1fr); grid-template-areas: "g t" ". m";
  padding: 10px 12px 10px 0; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; font: inherit;
}
.pl-row__open:hover { background: var(--accent-tint); }
.pl-row__open:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.pl-row__stage { grid-area: g; display: flex; }
.pl-row__title { grid-area: t; font-size: 14px; line-height: 1.38; overflow-wrap: anywhere; }
.pl-row__meta { grid-area: m; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pl-row__meta .pl-date { margin-left: 0; }
.pl-row__stagename { font: 11px var(--mono); color: var(--faint); }
.pl-row[data-stage="needs-work"] .pl-row__stagename { color: var(--down); }
.pl-row[data-stage="archived"] .pl-row__title { color: var(--dim); }

/* A compact checkbox with a 44px target (the tier 1 choice row is a full
   bordered row, too heavy beside every list row). */
.pl-check { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; min-height: 44px; flex: none; cursor: pointer; }
.pl-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pl-check__box { width: 16px; height: 16px; border: 1.5px solid var(--mark); border-radius: 3px; display: grid; place-items: center; transition: background .12s, border-color .12s; }
.pl-check:hover .pl-check__box { border-color: var(--dim); }
.pl-check input:checked + .pl-check__box { background: var(--text); border-color: var(--text); }
.pl-check input:checked + .pl-check__box::after { content: ""; width: 8px; height: 4px; border: solid var(--bg); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.pl-check input:focus-visible + .pl-check__box { outline: 2px solid var(--ring); outline-offset: 2px; }

/* Bulk bar: floats above the content (and above the dock on a phone). */
.pl-bulk {
  position: fixed; z-index: 40; left: 50%; bottom: 20px; transform: translateX(-50%);
  width: min(640px, calc(100vw - 20px)); display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 8px 8px 16px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: rgba(17, 17, 17, .92); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
  animation: pl-rise .22s var(--ease-out);
}
.pl-bulk[hidden] { display: none; }
.pl-bulk__n { margin: 0; font-size: 13px; color: var(--dim); white-space: nowrap; }
.pl-bulk__n strong { color: var(--text); font: 600 13px var(--mono); }
.pl-bulk__acts { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.pl-bulk .ui-btn { height: 34px; }
.pl-bulk .ui-iconbtn { width: 34px; height: 34px; }
@keyframes pl-rise { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ── calendar ─────────────────────────────────────────────────────────── */
.pl-cal { margin-top: 6px; }
.pl-cal__nav { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.pl-cal__nav h2 { margin: 0 6px; font-size: 18px; letter-spacing: -.02em; min-width: 0; }
.pl-cal__nav .ui-iconbtn { width: 36px; height: 36px; font-size: 20px; line-height: 1; }
.pl-cal__nav .ui-btn { margin-left: auto; height: 36px; }
.pl-cal__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 10px; font: 11px var(--mono); color: var(--dim); }
.pl-cal__legend span { display: inline-flex; align-items: center; gap: 6px; }
.pl-cal__legend span::before { content: ""; width: 14px; height: 10px; border-radius: 2px; }
.pl-cal__legend [data-kind="scheduled"]::before { background: var(--panel); border: 1px solid var(--mark); }
.pl-cal__legend [data-kind="published"]::before { background: var(--line-strong); }
.pl-cal__legend [data-kind="target"]::before { border: 1px dashed var(--mark); }
.pl-cal__legend [data-kind="cadence"]::before { display: none; }
.pl-cal__legend [data-kind="cadence"] { color: var(--faint); }
.pl-month { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--border); display: grid; gap: 1px; }
.pl-month__dow, .pl-month__week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.pl-month__dow span { background: var(--card); padding: 6px 8px; font: 10.5px var(--mono); color: var(--faint); }
.pl-day { background: var(--bg); min-height: 116px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pl-day.is-past { background: #050505; }
.pl-day.is-out { background: #030303; }
.pl-day.is-out > :not(.pl-day__n) { opacity: .55; }
.pl-day__n { font: 11px var(--mono); color: var(--dim); align-self: flex-start; min-width: 22px; height: 20px; display: grid; place-items: center; border-radius: 10px; padding: 0 5px; font-variant-numeric: tabular-nums slashed-zero; }
.pl-day.is-out .pl-day__n { color: var(--faint); opacity: .7; }
.pl-day.is-today .pl-day__n { background: var(--text); color: var(--bg); font-weight: 700; }
.pl-day__more { margin-top: 1px; background: none; border: 0; padding: 2px 4px; text-align: left; font: 10.5px var(--mono); color: var(--dim); cursor: pointer; border-radius: 3px; }
.pl-day__more:hover { color: var(--text); background: var(--accent-tint); }
.pl-cal__item {
  display: flex; align-items: center; gap: 5px; min-width: 0; width: 100%; height: 22px; padding: 0 6px;
  border: 1px solid transparent; border-radius: 3px; background: none; color: var(--text);
  font: 11.5px var(--body); text-align: left; cursor: pointer;
}
.pl-cal__item:hover { background: var(--accent-tint); border-color: var(--mark); }
.pl-cal__item:focus-visible { outline: 2px solid var(--ring); outline-offset: 0; }
.pl-cal__item .pl-dot { width: 6px; height: 6px; }
.pl-cal__item .pl-glyph { width: 11px; height: 11px; color: var(--dim); }
.pl-cal__item[data-kind="scheduled"] { background: var(--panel); border-color: var(--line-strong); }
.pl-cal__item[data-kind="published"] { color: var(--dim); }
.pl-cal__item[data-kind="target"] { border: 1px dashed var(--mark); color: var(--dim); }
.pl-cal__time { font: 10.5px var(--mono); color: var(--dim); flex: none; font-variant-numeric: tabular-nums slashed-zero; }
.pl-cal__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pl-cal__window { margin: auto 0 0; font: 10px var(--mono); color: #4f4f4f; padding: 0 2px; }

/* Phone week list. */
.pl-week { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: var(--card); }
.pl-week__day { padding: 10px 12px 12px; }
.pl-week__day + .pl-week__day { border-top: 1px solid var(--border); }
.pl-week__day h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.pl-week__day h3 > span { font: 11px var(--mono); color: var(--faint); width: 30px; }
.pl-week__day h3 em { font: 500 10.5px var(--mono); font-style: normal; color: var(--bg); background: var(--text); padding: 1px 6px; border-radius: 8px; }
.pl-week__day.is-past h3 { color: var(--dim); }
.pl-week__items { display: flex; flex-direction: column; gap: 4px; }
.pl-week__items .pl-cal__item { height: auto; min-height: 40px; padding: 6px 10px; font-size: 13px; gap: 8px; }
.pl-week__items .pl-cal__title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.pl-week .pl-cal__window { margin: 0; font-size: 11px; color: var(--faint); padding-left: 36px; }

/* ── empty, no match and error states ─────────────────────────────────── */
.pl-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; max-width: 560px; margin: 24px auto; padding: 32px 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
.pl-empty h2 { margin: 4px 0 0; font-size: 20px; letter-spacing: -.02em; }
.pl-empty p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--dim); max-width: 440px; }
.pl-empty__art { width: 120px; height: 64px; margin-bottom: 4px; }
.pl-empty__art rect, .pl-empty__art path { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.pl-empty__art rect.f { fill: var(--panel); stroke: var(--mark); }
.pl-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.pl-empty__actions .ui-btn { height: 40px; padding: 0 16px; }
.pl-prompt { width: 100%; text-align: left; margin-top: 4px; }
.pl-prompt summary { cursor: pointer; font-size: 12px; color: var(--faint); text-align: center; list-style: none; padding: 6px; }
.pl-prompt summary::-webkit-details-marker { display: none; }
.pl-prompt summary:hover { color: var(--text); }
.pl-prompt pre { margin: 6px 0 0; padding: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); font: 11.5px/1.6 var(--mono); color: var(--dim); white-space: pre-wrap; overflow-wrap: anywhere; }
.pl-empty--small { padding: 20px; gap: 12px; margin: 12px auto; }
.pl-empty--error .ico { width: 28px; height: 28px; color: var(--down); }

/* ── phone ────────────────────────────────────────────────────────────── */
@media (max-width: 719px) {
  .pl-page { --pl-tap: 44px; }
  .pl-head { align-items: center; }
  .pl-new { height: 44px; }
  .pl-tools { gap: 6px; }
  .pl-search { max-width: none; }
  .pl-views > button { padding: 0 11px; }
  .pl-views > button span { display: none; }
  .pl-stage { height: 44px; }
  .pl-board { overflow: visible; }
  .pl-col { background: transparent; border: 0; }
  .pl-col__head { padding: 6px 0 8px; }
  .pl-col__list { padding: 0; gap: 8px; }
  .pl-col--alert { background: transparent; }
  .pl-col--alert .pl-card { border-color: rgba(255, 69, 58, .3); }
  .pl-card { padding: 12px 14px 11px; }
  .pl-addidea, .pl-addform { margin-left: 0; margin-right: 0; width: 100%; }
  .pl-addidea { border-color: var(--border); margin-top: 8px; min-height: 44px; }
  .pl-bulk { bottom: calc(84px + env(safe-area-inset-bottom)); padding: 8px 8px 8px 12px; }
  .pl-bulk__acts { margin-left: 0; order: 3; flex-basis: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pl-bulk .ui-btn { height: 40px; padding: 0 4px; }
  .pl-bulk .ui-iconbtn { margin-left: auto; }
  .pl-cal__nav h2 { font-size: 16px; }
  .pl-empty { margin: 16px 0; padding: 28px 16px; }
  .pl-sites, .pl-stages { margin-left: -16px; margin-right: -16px; }
}
@media (max-width: 380px) {
  .pl-new span { display: none; }
  .pl-new { width: 44px; padding: 0; }
  .pl-head h1 { font-size: 28px; }
}
@media (min-width: 720px) {
  .pl-row__open { grid-template-columns: 16px minmax(0, 1fr) auto; grid-template-areas: "g t m"; }
  /* Fixed tracks, so priority, intent, stage and date line up row to row. */
  .pl-row__meta { display: grid; grid-template-columns: 14px 92px 84px 112px; gap: 10px; justify-items: start; }
  .pl-row__meta .pl-date { justify-self: end; }
}
/* Wide screens: the stage tabs and the tools share one row. */
@media (min-width: 1100px) {
  .pl-bar { display: flex; align-items: flex-end; gap: 16px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
  .pl-bar .pl-stages { order: 1; flex: 1 1 auto; min-width: 0; margin: 0; border-bottom: 0; }
  .pl-bar .pl-stages__track { padding: 0; }
  .pl-bar .pl-tools { order: 2; flex: none; margin: 0 0 6px; }
  .pl-bar .pl-search { width: 240px; }
}
@media (min-width: 1100px) and (max-width: 1599px) {
  .pl-bar .pl-views > button { padding: 0 11px; }
  .pl-bar .pl-views > button span { display: none; }
}
@media (min-width: 1200px) {
  .pl-sites, .pl-stages { margin-left: 0; margin-right: 0; }
  .pl-sites__track, .pl-stages__track { padding-left: 0; padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pl-bulk { animation: none; }
  .pl-card, .pl-stage { transition: none; }
}
