/* ============================================================
   ASK — generative worksurface (dark cinematic canvas)
   Reuses tokens from paper.css (--pb-*).
   ============================================================ */

html, body, #app {
  background: #050505;
  color: var(--pb-ink);
  min-height: 100vh;
}

/* Grain + subtle radial vignette so the canvas isn't flat */
.ak-canvas {
  position: fixed; inset: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, #0a0a0a 0%, #050505 55%, #030303 100%);
}
.ak-canvas::before {
  content: '';
  position: absolute; inset: -20%;
  background-image: radial-gradient(rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 3px 3px;
  pointer-events: none;
  opacity: 0.6;
}
.ak-canvas::after {
  /* faint pink aurora bottom-left, voltage hint */
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 40% 30% at 15% 85%, rgba(255,111,181,0.07), transparent 70%),
    radial-gradient(ellipse 35% 25% at 85% 15%, rgba(0,224,143,0.04), transparent 70%);
  pointer-events: none;
}

/* ── Ambient edge ──────────────────────────────────────────── */
/* Bottom-left of the canvas, stacked ABOVE Claude's whisper — always
   visible, left-aligned, labelled. */
.ak-timewidget {
  position: fixed;
  bottom: 84px;
  left: 360px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 18px;
  pointer-events: auto;
}
body.rail-collapsed .ak-timewidget { left: 92px; }
body.file-open .ak-timewidget { opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
.ak-timewidget .glyph {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: rgba(253,253,251,0.4);
  transition: color 240ms ease;
  flex-shrink: 0;
}
.ak-timewidget:hover .glyph { color: var(--pb-pinkH); }
.ak-timewidget .glyph svg { width: 14px; height: 14px; }

.ak-datebar {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: nowrap;
  opacity: 0.78;
  transition: opacity 200ms ease;
  pointer-events: auto;
}
.ak-timewidget:hover .ak-datebar { opacity: 1; }
.ak-date {
  font-family: var(--pb-instr);
  font-style: italic;
  font-size: 13px;
  letter-spacing: -0.005em;
  color: rgba(253,253,251,0.55);
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.ak-date .dow {
  color: var(--pb-pinkH);
  font-style: italic;
  opacity: 0.85;
}
.ak-date .phase {
  color: rgba(253,253,251,0.7);
}
.ak-date .day {
  color: rgba(253,253,251,0.45);
}
.ak-date .sep {
  color: rgba(253,253,251,0.2);
  font-style: normal;
}

.ak-cities {
  display: flex;
  gap: 14px;
  flex-wrap: nowrap;
  pointer-events: auto;
  align-items: center;
}
.ak-city {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--pb-instr);
  line-height: 1;
  min-width: 0;
}
.ak-city .cty {
  font-size: 11.5px;
  font-style: normal;
  color: rgba(253,253,251,0.78);
  letter-spacing: 0.01em;
  text-transform: lowercase;
}
.ak-city .sun {
  width: 7px; height: 7px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.ak-city .sun::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 8px 1px currentColor;
  opacity: 0.6;
}
/* Time-of-day tints (set via CSS var --tod on each .ak-city) */
.ak-city.dawn .sun   { background: #f2b544; color: #f2b544; }
.ak-city.day .sun    { background: #ffd86a; color: #ffd86a; }
.ak-city.dusk .sun   { background: #ff9a3c; color: #ff9a3c; }
.ak-city.night .sun {
  background: radial-gradient(circle at 32% 32%, #d7d2c4 0 40%, #7a756a 40% 100%);
  color: #7a756a;
}
.ak-city.night .sun::after { opacity: 0.25; }

.ak-city .time {
  font-family: var(--pb-instr);
  font-size: 11.5px;
  font-style: italic;
  color: rgba(253,253,251,0.62);
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1;
}
.ak-city .time .w {
  font-family: var(--pb-instr);
  font-style: italic;
  font-size: 11.5px;
  color: rgba(253,253,251,0.32);
  font-weight: 400;
}

/* Bottom strip: initiative constellation */
.ak-constellation {
  position: fixed;
  bottom: 20px;
  left: 300px;  /* clear of claude corner */
  right: 28px;
  padding: 6px 0 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  z-index: 4;
  font-family: var(--pb-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(253,253,251,0.28);
  pointer-events: none;
  flex-wrap: wrap;
}
.ak-constellation .c {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  pointer-events: auto;
  cursor: pointer;
  transition: color 160ms ease;
}
.ak-constellation .c:hover { color: var(--pb-ink); }
.ak-constellation .c .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(253,253,251,0.28);
}
.ak-constellation .c.live .dot {
  background: var(--pb-pinkH);
  box-shadow: 0 0 6px var(--pb-pinkH);
  animation: ak-pulse 1800ms ease-in-out infinite;
}
.ak-constellation .c.warm .dot { background: var(--pb-orange); }
.ak-constellation .c.cool .dot { background: var(--pb-green); }
.ak-constellation .sep {
  opacity: 0.3;
  letter-spacing: 0;
}

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

/* ── Claude mark (bottom-left corner — compact, stays out of center) ────── */
.ak-claude {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 6;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: start;
  width: 260px;
  pointer-events: none;
}
.ak-claude .mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  position: relative;
  pointer-events: auto;
  cursor: pointer;
}
.ak-claude .mark svg { width: 28px; height: 28px; display: block; }
.ak-claude .mark svg { display: block; }
.ak-claude .mark .ring {
  position: absolute; inset: -6px;
  border: 1px solid rgba(255,111,181,0.25);
  border-radius: 50%;
  animation: ak-breathe 4s ease-in-out infinite;
}
.ak-claude.thinking .mark .ring {
  border-color: var(--pb-pinkH);
  animation: ak-breathe-fast 800ms ease-in-out infinite;
}
.ak-claude .whisper {
  font-family: var(--pb-instr);
  font-style: italic;
  font-size: 12px;
  color: rgba(253,253,251,0.55);
  line-height: 1.38;
  letter-spacing: -0.005em;
  padding-top: 2px;
}
.ak-claude .whisper .spark { color: var(--pb-pinkH); font-style: italic; font-weight: 500; }
.ak-claude .whisper .tag {
  display: block;
  font-family: var(--pb-mono);
  font-style: normal;
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(253,253,251,0.38);
  margin-bottom: 5px;
}
/* Whisper stays visible in both states — user wants Claude's blurb present */

@keyframes ak-breathe {
  0%,100% { transform: scale(1); opacity: 0.5; }
  50%     { transform: scale(1.15); opacity: 0.2; }
}
@keyframes ak-breathe-fast {
  0%,100% { transform: scale(1); opacity: 0.9; }
  50%     { transform: scale(1.25); opacity: 0.4; }
}

/* ── Spotlight input (center, then docks to bottom) ─────── */
.ak-spot-wrap {
  position: fixed;
  left: 0; right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transition: top 600ms cubic-bezier(0.2, 0, 0, 1),
              bottom 600ms cubic-bezier(0.2, 0, 0, 1),
              transform 600ms cubic-bezier(0.2, 0, 0, 1),
              padding 600ms cubic-bezier(0.2, 0, 0, 1);
}
.ak-spot-wrap.center {
  top: 52%;
  transform: translateY(-50%);
  padding-left: 280px;  /* clear the claude corner */
  padding-right: 40px;
}
.ak-spot-wrap.docked {
  bottom: 56px;
  top: auto;
  transform: none;
}

.ak-spot {
  pointer-events: auto;
  width: min(560px, 66vw);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ak-spot .lead {
  font-family: var(--pb-instr);
  font-style: italic;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--pb-ink);
  margin: 0 0 24px;
  text-align: center;
  max-width: 520px;
}
.ak-spot .lead .tint {
  color: var(--pb-pinkH);
}
.ak-spot-wrap.docked .ak-spot .lead { display: none; }

.ak-input {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: rgba(14,14,14,0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,111,181,0.28);
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(255,111,181,0.08),
    0 20px 80px -30px rgba(255,111,181,0.35),
    0 2px 0 rgba(255,255,255,0.02) inset;
}
.ak-spot-wrap.docked .ak-input {
  padding: 12px 18px;
  border-color: rgba(255,111,181,0.18);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.02),
    0 12px 40px -20px rgba(0,0,0,0.8);
}
.ak-input .prefix {
  font-family: var(--pb-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pb-pinkH);
  font-weight: 600;
  white-space: nowrap;
}
.ak-input input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--pb-ink);
  font-family: var(--pb-instr);
  font-style: italic;
  font-size: 22px;
  letter-spacing: -0.01em;
  padding: 2px 0;
}
.ak-spot-wrap.docked .ak-input input { font-size: 16px; }
.ak-input input::placeholder {
  color: rgba(253,253,251,0.35);
  font-style: italic;
}
.ak-input .kbd {
  font-family: var(--pb-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(253,253,251,0.4);
  border: 1px solid rgba(253,253,251,0.18);
  padding: 3px 8px;
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

/* ── Suggested prompts under input ─────────────────────── */
.ak-suggest {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  align-items: flex-start;
}
.ak-suggest .heading {
  font-family: var(--pb-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(253,253,251,0.35);
  margin-bottom: 4px;
  padding-left: 2px;
}
.ak-suggest .s {
  font-family: var(--pb-instr);
  font-style: italic;
  font-size: 16px;
  color: rgba(253,253,251,0.72);
  cursor: pointer;
  line-height: 1.3;
  padding: 3px 0;
  text-align: left;
  letter-spacing: -0.005em;
  transition: color 140ms ease;
  background: transparent; border: 0;
  max-width: 560px;
}
.ak-suggest .s:hover { color: var(--pb-pinkH); }
.ak-suggest .s .nudge {
  color: rgba(253,253,251,0.35);
  font-family: var(--pb-mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-left: 10px;
  vertical-align: middle;
}
.ak-spot-wrap.docked .ak-suggest { display: none; }

/* ── Stack (generated view cards) ──────────────────────── */
.ak-stack {
  position: fixed;
  top: 40px;
  bottom: 140px;
  left: 344px;
  right: 40px;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  /* backdrop is clickable so clicks outside the card close the view */
  pointer-events: auto;
}
body.rail-collapsed .ak-stack { left: 72px; }
.ak-card-area {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1680px;
  max-height: 100%;
  pointer-events: auto;
}
.ak-card {
  position: absolute;
  inset: 0;
  background: #0c0c0e;
  border: 1px solid rgba(253,253,251,0.12);
  border-radius: 16px;
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,0.8),
    0 0 0 1px rgba(255,111,181,0.04);
  overflow: hidden;
  pointer-events: auto;
  transition: transform 500ms cubic-bezier(0.2, 0, 0, 1),
              opacity 400ms ease;
}
.ak-card.materializing {
  animation: ak-crystallize 700ms cubic-bezier(0.2, 0, 0, 1) both;
}
@keyframes ak-crystallize {
  0%   { opacity: 0; transform: scale(0.96) translateY(20px); filter: blur(12px); }
  60%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

/* Stack depth visualization */
.ak-card[data-depth="1"] { transform: translate(18px, 14px) scale(0.97); opacity: 0.5; filter: brightness(0.6); z-index: 2; }
.ak-card[data-depth="2"] { transform: translate(36px, 28px) scale(0.94); opacity: 0.22; filter: brightness(0.4); z-index: 1; }
.ak-card[data-depth="3"] { transform: translate(54px, 42px) scale(0.91); opacity: 0.08; z-index: 0; }
.ak-card[data-depth="0"] { z-index: 3; }

/* Card chrome */
.ak-card-head {
  position: relative;
  padding: 22px 28px 18px;
  border-bottom: 1px solid rgba(253,253,251,0.08);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}
.ak-card-head .kicker {
  font-family: var(--pb-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pb-pinkH);
  margin-bottom: 6px;
  font-weight: 600;
}
.ak-card-head h2 {
  font-family: var(--pb-instr);
  font-style: italic;
  font-weight: 400;
  font-size: 34px;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--pb-ink);
  margin: 0;
}
.ak-card-head .meta {
  text-align: right;
  font-family: var(--pb-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(253,253,251,0.4);
  line-height: 1.6;
  white-space: nowrap;
}
.ak-card-head .meta .sep { margin: 0 6px; opacity: 0.5; }

.ak-card-body {
  padding: 26px 28px 32px;
  height: calc(100% - 86px);
  overflow: auto;
  color: var(--pb-ink);
}

/* Stack controls (top-right badges) */
.ak-stack-meta {
  position: fixed;
  top: 64px;
  right: 28px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}
.ak-stack-count {
  font-family: var(--pb-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(253,253,251,0.45);
  display: inline-flex;
  gap: 10px;
  align-items: center;
  pointer-events: auto;
}
.ak-stack-count .n {
  color: var(--pb-pinkH);
  font-weight: 600;
  font-size: 12px;
}
.ak-stack-count button {
  background: transparent;
  border: 1px solid rgba(253,253,251,0.18);
  color: rgba(253,253,251,0.6);
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  cursor: pointer;
}
.ak-stack-count button:hover { color: var(--pb-pinkH); border-color: var(--pb-pinkH); }

/* ── Generating overlay — the electric brain ────────── */
.ak-generating {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  pointer-events: all;
  background: transparent; /* contents underneath already hidden by body.generating */
}
.ak-generating .inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.ak-generating .narration {
  font-family: var(--pb-instr);
  font-style: italic;
  font-size: 22px;
  color: var(--pb-ink);
  letter-spacing: -0.005em;
  line-height: 1.3;
  max-width: 480px;
  text-align: center;
  opacity: 0;
  animation: ebr-readout 1.6s ease-out 0.2s forwards;
}
.ak-generating .narration .tint { color: var(--pb-pinkH); }
@keyframes ebr-readout {
  0%   { opacity: 0; transform: translateY(4px); }
  100% { opacity: 0.9; transform: translateY(0); }
}

/* The brain */
.ebr {
  width: 220px;
  height: 180px;
  overflow: visible;
  animation: ebr-bob 1.4s ease-in-out infinite;
}
@keyframes ebr-bob {
  0%,100% { transform: translateY(-2px) rotate(-1deg); }
  50%     { transform: translateY(2px)  rotate(1deg); }
}
.ebr .brain .body {
  fill: #ff9cc4;
  stroke: #0a0a0a;
  stroke-width: 2.2;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 16px rgba(255,111,181,0.35));
}
.ebr .brain .fold,
.ebr .brain .wrinkle {
  fill: none;
  stroke: #7a1f47;
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.75;
}
.ebr .brain .stem {
  fill: #c77a5e;
  stroke: #0a0a0a;
  stroke-width: 2;
  stroke-linejoin: round;
}
.ebr .bolts .bolt {
  fill: #ffd84a;
  stroke: #0a0a0a;
  stroke-width: 1.6;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(255, 220, 70, 0.7));
  opacity: 0;
  animation: ebr-flash 900ms ease-in-out infinite;
}
.ebr .bolts .b1 { animation-delay: 0ms; }
.ebr .bolts .b2 { animation-delay: 120ms; }
.ebr .bolts .b3 { animation-delay: 240ms; }
.ebr .bolts .b4 { animation-delay: 360ms; }
.ebr .bolts .b5 { animation-delay: 60ms; }
.ebr .bolts .b6 { animation-delay: 480ms; }
@keyframes ebr-flash {
  0%, 60%, 100% { opacity: 0; transform: scale(0.9); }
  10%, 22%      { opacity: 1; transform: scale(1); }
  30%, 45%      { opacity: 0.35; transform: scale(0.95); }
}

.ebr .ticks line {
  stroke: rgba(253,253,251,0.35);
  stroke-width: 1.4;
  stroke-linecap: round;
  animation: ebr-tick 1.8s ease-in-out infinite;
}
.ebr .ticks line:nth-child(2) { animation-delay: 200ms; }
.ebr .ticks line:nth-child(3) { animation-delay: 400ms; }
.ebr .ticks line:nth-child(4) { animation-delay: 600ms; }
.ebr .ticks line:nth-child(5) { animation-delay: 800ms; }
@keyframes ebr-tick {
  0%,100% { opacity: 0.15; }
  50%     { opacity: 0.85; }
}

/* ── Empty / welcome hint ─────────────────────────────── */
.ak-hint {
  position: fixed;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  font-family: var(--pb-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(253,253,251,0.3);
  z-index: 4;
  pointer-events: none;
}
.ak-hint .k {
  border: 1px solid rgba(253,253,251,0.2);
  padding: 2px 8px;
  margin: 0 4px;
  color: rgba(253,253,251,0.5);
}

/* ============================================================
   GENERATED VIEW PRIMITIVES
   Reusable blocks the card bodies compose from.
   ============================================================ */

/* --- Timeline --- */
.v-timeline {
  position: relative;
  padding-left: 28px;
}
.v-timeline::before {
  content: ''; position: absolute;
  left: 6px; top: 4px; bottom: 20px;
  width: 1px; background: rgba(253,253,251,0.15);
}
.v-event {
  position: relative;
  padding: 14px 0 20px;
  border-bottom: 1px dashed rgba(253,253,251,0.08);
}
.v-event:last-child { border-bottom: 0; }
.v-event::before {
  content: ''; position: absolute;
  left: -26px; top: 22px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(253,253,251,0.3);
  border: 2px solid #0c0c0e;
  box-shadow: 0 0 0 1px rgba(253,253,251,0.25);
}
.v-event.now::before {
  background: var(--pb-pinkH);
  box-shadow: 0 0 0 1px var(--pb-pinkH), 0 0 12px var(--pb-pinkH);
}
.v-event.done::before { background: var(--pb-green); box-shadow: 0 0 0 1px var(--pb-green); }
.v-event.stale::before { background: var(--pb-orange); box-shadow: 0 0 0 1px var(--pb-orange); }
.v-event .when {
  font-family: var(--pb-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(253,253,251,0.45);
}
.v-event .what {
  font-family: var(--pb-display);
  font-size: 16px;
  color: var(--pb-ink);
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.v-event .who {
  font-family: var(--pb-instr);
  font-style: italic;
  font-size: 14px;
  color: rgba(253,253,251,0.55);
  margin-top: 2px;
}
.v-event.now .what { color: var(--pb-pinkH); }

/* --- Status ladder --- */
.v-ladder { display: flex; flex-direction: column; gap: 0; margin-top: 10px; }
.v-step {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 18px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid rgba(253,253,251,0.06);
}
.v-step:last-child { border-bottom: 0; }
.v-step .mark {
  width: 24px; height: 24px;
  border: 1px solid rgba(253,253,251,0.25);
  display: grid; place-items: center;
  font-family: var(--pb-mono);
  font-weight: 600; font-size: 11px;
  color: rgba(253,253,251,0.6);
}
.v-step.done .mark { background: var(--pb-green); border-color: var(--pb-green); color: #000; }
.v-step.now .mark { background: var(--pb-pinkH); border-color: var(--pb-pinkH); color: #000; }
.v-step.block .mark { background: var(--pb-orange); border-color: var(--pb-orange); color: #000; }
.v-step.pending .mark { opacity: 0.5; }
.v-step .lbl {
  font-family: var(--pb-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--pb-ink);
  letter-spacing: -0.005em;
}
.v-step .sub {
  font-family: var(--pb-instr);
  font-style: italic;
  font-size: 14px;
  color: rgba(253,253,251,0.55);
  margin-top: 2px;
  line-height: 1.4;
}
.v-step.pending .lbl { color: rgba(253,253,251,0.45); }
.v-step .tag {
  font-family: var(--pb-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(253,253,251,0.5);
  white-space: nowrap;
}
.v-step.block .tag { color: var(--pb-orange); }
.v-step.now .tag { color: var(--pb-pinkH); }

/* --- Callout / verdict block --- */
.v-verdict {
  padding: 20px 22px;
  background: linear-gradient(180deg, rgba(255,111,181,0.07), rgba(255,111,181,0.02));
  border: 1px solid rgba(255,111,181,0.3);
  margin-bottom: 22px;
}
.v-verdict .k {
  font-family: var(--pb-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pb-pinkH);
  margin-bottom: 8px;
  font-weight: 600;
}
.v-verdict .t {
  font-family: var(--pb-instr);
  font-style: italic;
  font-size: 22px;
  line-height: 1.3;
  color: var(--pb-ink);
  letter-spacing: -0.01em;
}
.v-verdict .t em { color: var(--pb-pinkH); font-style: italic; }

/* --- Blockers / key/value pair grid --- */
.v-kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 28px;
  margin-top: 8px;
}
.v-kv dt {
  font-family: var(--pb-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(253,253,251,0.45);
  padding-top: 3px;
}
.v-kv dd {
  margin: 0;
  font-family: var(--pb-display);
  font-size: 15px;
  color: var(--pb-ink);
  letter-spacing: -0.005em;
}
.v-kv dd em {
  font-family: var(--pb-instr);
  color: rgba(253,253,251,0.6);
  font-style: italic;
}

/* --- Section starter --- */
.v-section {
  font-family: var(--pb-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(253,253,251,0.4);
  margin: 28px 0 14px;
  display: flex; align-items: baseline; gap: 10px;
}
.v-section::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(253,253,251,0.08);
}

/* --- Quote block --- */
.v-quote {
  font-family: var(--pb-instr);
  font-style: italic;
  font-size: 18px;
  line-height: 1.45;
  color: var(--pb-ink);
  padding: 14px 0 14px 18px;
  border-left: 2px solid var(--pb-pinkH);
  margin: 14px 0 16px;
  letter-spacing: -0.005em;
}
.v-quote .src {
  display: block;
  font-family: var(--pb-mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(253,253,251,0.45);
  margin-top: 8px;
}

/* --- Money row --- */
.v-money {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0 24px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(253,253,251,0.06);
  align-items: baseline;
}
.v-money:last-child { border-bottom: 0; }
.v-money .label { font-family: var(--pb-display); font-size: 15px; color: var(--pb-ink); letter-spacing: -0.005em; }
.v-money .label em { font-family: var(--pb-instr); font-style: italic; color: rgba(253,253,251,0.55); display: block; font-size: 13px; margin-top: 1px; }
.v-money .amt { font-family: var(--pb-display); font-size: 17px; font-weight: 600; color: var(--pb-ink); font-variant-numeric: tabular-nums; }
.v-money .amt.in { color: var(--pb-green); }
.v-money .amt.out { color: var(--pb-orange); }
.v-money .date { font-family: var(--pb-mono); font-size: 10px; letter-spacing: 0.12em; color: rgba(253,253,251,0.4); text-transform: uppercase; }

/* --- Citations ribbon at card bottom --- */
.v-citations {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px dashed rgba(253,253,251,0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-family: var(--pb-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(253,253,251,0.4);
}
.v-citations .k {
  color: var(--pb-pinkH);
  margin-right: 8px;
  font-weight: 600;
}
.v-citations .n {
  padding: 3px 8px;
  border: 1px solid rgba(253,253,251,0.15);
  color: rgba(253,253,251,0.65);
  cursor: pointer;
}
.v-citations .n:hover { color: var(--pb-pinkH); border-color: var(--pb-pinkH); }

/* --- People row --- */
.v-people {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 8px 0 4px;
}
.v-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border: 1px solid rgba(253,253,251,0.1);
}
.v-person .av {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--pb-mono);
  font-size: 11px; font-weight: 700;
  color: #000;
}
.v-person .nm { font-family: var(--pb-display); font-size: 14px; color: var(--pb-ink); letter-spacing: -0.005em; }
.v-person .rl { font-family: var(--pb-instr); font-style: italic; font-size: 13px; color: rgba(253,253,251,0.55); }

/* --- Big statement (for the "grant status" card) --- */
.v-big {
  font-family: var(--pb-instr);
  font-style: italic;
  font-size: 48px;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--pb-ink);
  margin: 8px 0 16px;
  max-width: 18ch;
}
.v-big em { color: var(--pb-pinkH); font-style: italic; }

/* --- Tweaks panel --- */
.ak-tweaks {
  position: fixed; top: 64px; right: 28px;
  z-index: 30;
  background: rgba(8,8,8,0.95);
  border: 1px solid var(--pb-pinkH);
  padding: 16px 18px;
  font-family: var(--pb-mono);
  font-size: 11px;
  min-width: 240px;
  display: none;
  backdrop-filter: blur(8px);
}
.ak-tweaks.show { display: block; }
.ak-tweaks h3 {
  margin: 0 0 14px;
  font-family: var(--pb-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pb-pinkH);
}
.ak-tweaks .row { margin-bottom: 12px; }
.ak-tweaks .lbl { display: block; font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.5; margin-bottom: 6px; }
.ak-tweaks .opts { display: flex; gap: 2px; }
.ak-tweaks .opt {
  flex: 1; padding: 6px 8px; font: inherit; font-size: 10px;
  background: transparent; color: var(--pb-ink);
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer; letter-spacing: 0.06em; text-transform: uppercase;
}
.ak-tweaks .opt.on { background: var(--pb-pinkH); color: #000; border-color: var(--pb-pinkH); font-weight: 700; }




/* ============================================================
   LEFT RAIL — live/open browser of Punk Brain
   Collapsible: thin glyph rail (48px) ↔ expanded panel (320px)
   ============================================================ */
.ak-rail {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 320px;
  border-right: 1px solid rgba(253,253,251,0.06);
  background: rgba(5,5,5,0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: var(--pb-instr);
  color: rgba(253,253,251,0.82);
  z-index: 15;
  display: flex;
  flex-direction: column;
  transition: width 360ms cubic-bezier(0.2,0,0,1);
}
.ak-rail.collapsed { width: 48px; }

/* Identity chip — a quiet morning greeting, not a DMV card */
.ak-rail .ident {
  display: grid;
  grid-template-columns: 30px 1fr 18px;
  column-gap: 12px;
  align-items: start;
  padding: 22px 18px 18px;
  cursor: pointer;
  user-select: none;
}
.ak-rail .ident .av {
  width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #ffb0d8 0 35%, #ff6fb5 35% 65%, #7a1f47 100%);
  display: grid; place-items: center;
  font-family: var(--pb-instr);
  font-style: italic;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0;
  color: rgba(10,8,10,0.85);
  margin-top: 2px;
}
.ak-rail .ident .info {
  min-width: 0;
  display: flex; flex-direction: column;
  gap: 2px;
}
.ak-rail .ident .lead {
  font-family: var(--pb-instr);
  font-style: normal;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--pb-ink);
  line-height: 1.1;
}
.ak-rail .ident .trail {
  font-family: var(--pb-instr);
  font-style: normal;
  font-size: 12.5px;
  letter-spacing: -0.005em;
  color: rgba(253,253,251,0.42);
  line-height: 1.3;
}
.ak-rail .ident .swap {
  color: rgba(253,253,251,0.22);
  font-size: 11px;
  text-align: center;
  padding-top: 6px;
  transition: color 180ms ease;
}
.ak-rail .ident:hover .swap { color: var(--pb-pinkH); }

/* Collapse toggle */
.ak-rail .collapse-btn {
  position: absolute;
  top: 18px; right: -12px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(14,14,14,0.9);
  border: 1px solid rgba(253,253,251,0.1);
  color: rgba(253,253,251,0.6);
  font-family: var(--pb-mono);
  font-size: 11px;
  display: grid; place-items: center;
  cursor: pointer;
  z-index: 20;
  transition: color 160ms ease;
}
.ak-rail .collapse-btn:hover { color: var(--pb-pinkH); }

/* Open/All filter tabs — italic, spoken, not badges */
.ak-rail .filter {
  display: flex;
  padding: 16px 18px 8px;
  gap: 20px;
  font-family: var(--pb-instr);
  font-size: 13px;
}
.ak-rail .filter .tab {
  cursor: pointer;
  color: rgba(253,253,251,0.38);
  padding: 2px 0;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  transition: color 180ms ease;
}
.ak-rail .filter .tab em {
  font-style: normal;
  letter-spacing: -0.005em;
}
.ak-rail .filter .tab.on {
  color: var(--pb-ink);
}
.ak-rail .filter .tab.on em {
  color: var(--pb-pinkH);
}
.ak-rail .filter .count {
  font-family: var(--pb-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(253,253,251,0.35);
  font-variant-numeric: tabular-nums;
}
.ak-rail .filter .tab.on .count {
  color: rgba(255,111,181,0.75);
}

/* Layers + live items */
.ak-rail .scroll {
  flex: 1;
  overflow: auto;
  padding: 4px 0 12px;
}
/* Layer headers — soft inner-world names */
.ak-rail .layer {
  padding: 18px 18px 4px;
}
.ak-rail .layer .name {
  font-style: normal;
  font-family: var(--pb-instr);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: rgba(253,253,251,0.4);
  text-transform: lowercase;
}
.ak-rail .layer.pink .name { color: rgba(255,111,181,0.55); }
.ak-rail .layer.green .name { color: rgba(120,230,170,0.45); }
.ak-rail .layer.orange .name { color: rgba(255,160,90,0.5); }
.ak-rail .layer.mute .name { opacity: 0.35; }

/* Live item rows — breathing text, not chip cards */
.ak-rail .item {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: baseline;
  column-gap: 12px;
  padding: 8px 18px 8px 18px;
  cursor: pointer;
  border-left: 1px solid transparent;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
  font-family: var(--pb-instr);
}
.ak-rail .item:hover {
  background: rgba(255,111,181,0.03);
  border-left-color: rgba(255,111,181,0.35);
}
.ak-rail .item.active {
  background: rgba(255,111,181,0.06);
  border-left-color: var(--pb-pinkH);
}
.ak-rail .item .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(253,253,251,0.18);
  justify-self: center;
  align-self: center;
  transform: translateY(1px);
}
.ak-rail .item.open .dot {
  background: var(--pb-pinkH);
  box-shadow: 0 0 5px rgba(255,111,181,0.55);
}
.ak-rail .item.warm .dot { background: #ff9a3c; }
.ak-rail .item.cool .dot { background: rgba(120,230,170,0.6); }
.ak-rail .item .lbl {
  font-size: 14px;
  font-style: normal;
  color: rgba(253,253,251,0.82);
  letter-spacing: -0.005em;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ak-rail .item:hover .lbl,
.ak-rail .item.active .lbl { color: var(--pb-ink); }
.ak-rail .item .meta {
  font-family: var(--pb-instr);
  font-style: normal;
  font-size: 10.5px;
  color: rgba(253,253,251,0.32);
  letter-spacing: -0.005em;
}
.ak-rail .item.open .meta { color: rgba(255,111,181,0.6); }

/* Still-with-you dock */
.ak-rail .recents {
  border-top: 1px solid rgba(253,253,251,0.05);
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 200px;
  overflow: auto;
}
.ak-rail .recents .hdr {
  font-family: var(--pb-instr);
  font-style: normal;
  font-size: 11.5px;
  color: rgba(253,253,251,0.38);
  display: flex; justify-content: space-between;
  padding-bottom: 6px;
}
.ak-rail .recents .hdr .hint {
  font-size: 10.5px;
  color: rgba(253,253,251,0.22);
}
.ak-rail .recents .r {
  display: grid;
  grid-template-columns: 10px 1fr auto 14px;
  column-gap: 10px;
  align-items: baseline;
  padding: 6px 0;
  cursor: pointer;
  font-family: var(--pb-instr);
  font-style: normal;
  font-size: 13px;
  color: rgba(253,253,251,0.55);
  transition: color 180ms;
}
.ak-rail .recents .r:hover {
  color: var(--pb-ink);
}
.ak-rail .recents .r .g {
  color: rgba(253,253,251,0.28);
  font-size: 10px;
  justify-self: center;
  font-style: normal;
}
.ak-rail .recents .r .lbl {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ak-rail .recents .r .t {
  font-family: var(--pb-instr);
  font-style: normal;
  font-size: 10.5px;
  color: rgba(253,253,251,0.28);
}
.ak-rail .recents .r .x {
  color: rgba(253,253,251,0.22);
  font-size: 12px;
  line-height: 1;
  font-style: normal;
}
.ak-rail .recents .r .x:hover { color: var(--pb-pinkH); }

/* ── Collapsed rail: glyphs + unread dots only ─────────────── */
.ak-rail.collapsed .ident .info,
.ak-rail.collapsed .ident .swap,
.ak-rail.collapsed .filter,
.ak-rail.collapsed .layer,
.ak-rail.collapsed .item .lbl,
.ak-rail.collapsed .item .meta,
.ak-rail.collapsed .recents .hdr,
.ak-rail.collapsed .recents .r .t,
.ak-rail.collapsed .recents .r .x {
  display: none;
}
.ak-rail.collapsed .ident {
  grid-template-columns: 28px;
  justify-content: center;
  padding: 14px 10px;
}
.ak-rail.collapsed .scroll { padding: 10px 0; }
.ak-rail.collapsed .item {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 10px 0;
  border-left: 0;
}
.ak-rail.collapsed .item.active {
  background: rgba(255,111,181,0.12);
}
.ak-rail.collapsed .recents {
  padding: 8px 0;
}
.ak-rail.collapsed .recents .r {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 6px 0;
}

/* Push all fixed surfaces right of the rail; shrink on collapse */
.ak-claude  { left: 344px; }
.ak-spot-wrap.center { padding-left: 360px; padding-right: 40px; }
.ak-spot-wrap.docked { padding-left: 340px; }

body.rail-collapsed .ak-claude  { left: 72px; }
body.rail-collapsed .ak-spot-wrap.center { padding-left: 88px; padding-right: 40px; }
body.rail-collapsed .ak-spot-wrap.docked { padding-left: 72px; }

/* Date+cities are an ambient footer — visible in both rail states */

/* Chat-open state: blur the main canvas, leave sidebar crisp.
   Only when chat is CENTERED (no stack yet) — once a view is up, the ask bar
   docks beneath and the canvas should render crisp. */
body.chat-open:not(.file-open) .ak-canvas,
body.chat-open:not(.file-open) .ak-claude,
body.chat-open:not(.file-open) .ak-stack,
body.chat-open:not(.file-open) .ak-empty,
body.chat-open:not(.file-open) .ak-timewidget {
  filter: blur(10px) saturate(0.8);
  opacity: 0.55;
  transition: filter 260ms ease, opacity 260ms ease;
  pointer-events: none;
}
.ak-canvas, .ak-claude, .ak-stack, .ak-file, .ak-timewidget {
  transition: filter 260ms ease, opacity 260ms ease;
}

/* While thinking, the brain stands alone — everything else fades out so it
   isn't competing with a dimmed view underneath. */
body.generating .ak-canvas,
body.generating .ak-claude,
body.generating .ak-stack,
body.generating .ak-stack-meta,
body.generating .ak-stack-count,
body.generating .ak-file,
body.generating .ak-rail,
body.generating .ak-spot-wrap,
body.generating .ak-timewidget,
body.generating .ak-datebar,
body.generating .ak-empty,
body.generating .ak-hint,
body.generating .ak-collapsed-peek {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 220ms ease;
}

/* When a view is docked, the ask bar sits bottom-left and the Claude mark
   would overlap it. Fade Claude out; it reappears when you clear the stack. */
body.file-open .ak-claude {
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

/* ── File surface (opened from rail) ─────────────────────── */
.ak-file {
  position: fixed;
  top: 24px; left: 344px; right: 24px; bottom: 80px;
  z-index: 5;
  background: rgba(8,8,8,0.7);
  border: 1px solid rgba(253,253,251,0.06);
  overflow: hidden;
  display: flex; flex-direction: column;
}
body.rail-collapsed .ak-file { left: 72px; }
.ak-file .fh {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(253,253,251,0.06);
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
}
.ak-file .fh .label {
  font-family: var(--pb-mono);
  font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(253,253,251,0.4);
}
.ak-file .fh .ttl {
  font-family: var(--pb-instr);
  font-style: italic;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--pb-ink);
}
.ak-file .fh .close {
  cursor: pointer;
  font-family: var(--pb-mono);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(253,253,251,0.4);
}
.ak-file .fh .close:hover { color: var(--pb-pinkH); }
.ak-file .fb {
  flex: 1;
  overflow: auto;
  padding: 28px 32px;
}

/* Dim the spotlight when a file is up */
body.file-open .ak-spot-wrap.center { opacity: 0.35; pointer-events: none; }
body.file-open.chat-open .ak-spot-wrap.center { opacity: 1; pointer-events: auto; }


/* ── Rail "ask" bar — primary chat entry ─────────────────── */
.ak-rail .ask-btn {
  margin: 6px 18px 4px;
  padding: 12px 0;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(253,253,251,0.06);
  border-bottom: 1px solid rgba(253,253,251,0.06);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease;
  font-family: var(--pb-instr);
  color: rgba(253,253,251,0.82);
}
.ak-rail .ask-btn:hover {
  color: var(--pb-ink);
  border-color: rgba(255,111,181,0.35);
}
.ak-rail .ask-btn.on {
  color: var(--pb-pinkH);
  border-color: rgba(255,111,181,0.4);
}
.ak-rail .ask-btn .kbd {
  font-family: var(--pb-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  padding: 3px 6px;
  border: 1px solid rgba(253,253,251,0.16);
  color: rgba(253,253,251,0.6);
  border-radius: 2px;
}
.ak-rail .ask-btn.on .kbd {
  border-color: var(--pb-pinkH);
  color: var(--pb-pinkH);
}
.ak-rail .ask-btn .lbl {
  font-style: normal;
  font-size: 15px;
  letter-spacing: -0.005em;
}
.ak-rail.collapsed .ask-btn {
  margin: 8px 6px;
  padding: 10px 0;
  justify-content: center;
  border: 0;
}
.ak-rail.collapsed .ask-btn .lbl { display: none; }


/* ── Empty canvas invitation (nothing open, chat closed) ─── */
.ak-empty {
  position: fixed;
  top: 0; left: 344px; right: 40px; bottom: 72px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 40px;
  pointer-events: none;
}
body.rail-collapsed .ak-empty { left: 72px; padding: 0 40px; }

/* Identity-aware framing strip — sits above the big "what do you need to see" */
.ak-empty-frame {
  font-family: var(--pb-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(253,253,251,0.55);
  margin-bottom: 24px;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(253,253,251,0.14);
  border-radius: 999px;
  background: rgba(14,14,14,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.ak-empty-frame .nm {
  color: var(--pb-pinkH);
  font-weight: 600;
}
.ak-empty-frame .sep { color: rgba(253,253,251,0.28); }
.ak-empty-frame .msg em {
  font-family: var(--pb-instr);
  font-style: italic;
  text-transform: none;
  letter-spacing: -0.005em;
  font-size: 14px;
  color: var(--pb-ink);
}
.ak-empty-frame .tod { color: rgba(253,253,251,0.5); }

body[data-palette="light"] .ak-empty-frame {
  background: rgba(255,255,255,0.85);
  border-color: rgba(10,10,10,0.12);
  color: rgba(10,10,10,0.6);
}
body[data-palette="light"] .ak-empty-frame .nm { color: #FF3F9F; }
body[data-palette="light"] .ak-empty-frame .sep { color: rgba(10,10,10,0.3); }
body[data-palette="light"] .ak-empty-frame .msg em { color: #0a0a0a; }
body[data-palette="light"] .ak-empty-frame .tod { color: rgba(10,10,10,0.55); }

.ak-empty .quiet {
  font-family: var(--pb-instr);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: rgba(253,253,251,0.35);
  margin-bottom: 22px;
}
.ak-empty .lead {
  font-family: var(--pb-instr);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(42px, 5.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--pb-ink);
  margin: 0 0 32px;
  max-width: 14ch;
}
.ak-empty .lead .tint {
  color: var(--pb-pinkH);
  font-family: var(--pb-instr);
  font-style: italic;
}
.ak-empty .invite {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(253,253,251,0.14);
  color: rgba(253,253,251,0.82);
  font-family: var(--pb-instr);
  font-style: italic;
  font-size: 18px;
  cursor: pointer;
  pointer-events: auto;
  transition: border-color 220ms ease, color 220ms ease, padding 220ms ease;
}
.ak-empty .invite:hover {
  border-bottom-color: var(--pb-pinkH);
  color: var(--pb-ink);
  padding-left: 6px;
}
.ak-empty .invite .kbd {
  font-family: var(--pb-mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 5px 8px;
  border: 1px solid rgba(253,253,251,0.25);
  color: rgba(253,253,251,0.75);
  border-radius: 2px;
}
.ak-empty .invite:hover .kbd {
  border-color: var(--pb-pinkH);
  color: var(--pb-pinkH);
}
.ak-empty .soft {
  margin-top: 14px;
  font-family: var(--pb-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(253,253,251,0.32);
}

/* ak-empty dims on chat blur too — but only when chat is centered, not docked */
body.chat-open:not(.file-open) .ak-empty {
  filter: blur(10px) saturate(0.8);
  opacity: 0.55;
  transition: filter 260ms ease, opacity 260ms ease;
  pointer-events: none;
}
.ak-empty { transition: filter 260ms ease, opacity 260ms ease; }

/* ── Palette variants (Tweaks) ─────────────────────────── */
/* Default palette (pink) is inherited from paper.css. These overrides
   swap the accent family; --pb-ink stays warm white throughout. */

body[data-palette="green"] {
  --pb-pinkH: #3CE08F;
  --pb-pinkD: #0d3526;
  --pb-pink:  #B8F2D4;
}
body[data-palette="duo"] {
  /* Primary accent green, secondary pink. We keep --pb-pinkH as the
     'signal' hot color (green) and expose the pink via --pb-pink-alt. */
  --pb-pinkH: #3CE08F;
  --pb-pinkD: #0d3526;
  --pb-pink:  #B8F2D4;
  --pb-pink-alt: #FF6FB5;
}
body[data-palette="duo"] .ak-spot .lead .tint,
body[data-palette="duo"] .v-big em,
body[data-palette="duo"] .v-verdict .t em,
body[data-palette="duo"] .ak-empty .lead .tint,
body[data-palette="duo"] .ak-generating .narration .tint {
  color: var(--pb-pink-alt);
}
body[data-palette="mono"] {
  --pb-pinkH: #D8D8D8;
  --pb-pinkD: #1a1a1a;
  --pb-pink:  #B8B8B8;
  --pb-green: #D8D8D8;
  --pb-orange: #D8D8D8;
}
body[data-palette="mono"] .ebr .brain .body { fill: #E4E4E4; filter: none; }
body[data-palette="mono"] .ebr .brain .fold,
body[data-palette="mono"] .ebr .brain .wrinkle { stroke: #2a2a2a; }
body[data-palette="mono"] .ebr .brain .stem { fill: #888; }
body[data-palette="mono"] .ebr .bolts .bolt { fill: #FDFDFB; stroke: #0a0a0a; filter: drop-shadow(0 0 8px rgba(255,255,255,0.6)); }

body[data-palette="whiteout"] {
  --pb-pinkH: #FDFDFB;
  --pb-pinkD: #2a2a2a;
  --pb-pink:  #EDEDEA;
}

/* ── Light palette (white · pink · green · black) ────────────
   Inverts the cinematic dark canvas to a paper-white surface.
   Accents (pink, green) stay saturated. Body ink flips to black.
   This is a comprehensive override — many ask.css surfaces use
   hardcoded dark rgbas, so we restate them here for the light
   variant rather than refactor the whole stylesheet. */
body[data-palette="light"] {
  --pb-paper:  #fbfbfa;
  --pb-paper2: #f2f1ee;
  --pb-paper3: #ffffff;
  --pb-paper4: #ffffff;
  --pb-ink:    #0a0a0a;
  --pb-ink2:   rgba(10,10,10,0.78);
  --pb-mute:   rgba(10,10,10,0.5);
  --pb-mute2:  rgba(10,10,10,0.62);
  --pb-rule:   rgba(10,10,10,0.14);
  --pb-rule-s: rgba(10,10,10,0.06);
  --pb-pinkH:  #FF3F9F;
  --pb-pinkD:  #ffd5e7;
  --pb-pink:   #ff7fbc;
  --pb-green:  #00a864;
  --pb-cream:  #f2f1ee;
}

/* Canvas + body */
body[data-palette="light"],
body[data-palette="light"] html,
body[data-palette="light"] #app {
  background: #fbfbfa;
  color: #0a0a0a;
}
body[data-palette="light"] .ak-canvas {
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, #ffffff 0%, #fbfbfa 55%, #f4f3ef 100%);
}
body[data-palette="light"] .ak-canvas::before {
  background-image: radial-gradient(rgba(0,0,0,0.04) 1px, transparent 1px);
  opacity: 0.6;
}
body[data-palette="light"] .ak-canvas::after {
  background:
    radial-gradient(ellipse 40% 30% at 15% 85%, rgba(255,63,159,0.08), transparent 70%),
    radial-gradient(ellipse 35% 25% at 85% 15%, rgba(0,168,100,0.06), transparent 70%);
}

/* Shell + traffic lights */
body[data-palette="light"] .ak-shell { background: transparent; }

/* Card */
body[data-palette="light"] .ak-card {
  background: #ffffff;
  border-color: rgba(10,10,10,0.08);
  box-shadow:
    0 30px 80px -30px rgba(0,0,0,0.18),
    0 0 0 1px rgba(255,63,159,0.04);
}
body[data-palette="light"] .ak-card-head {
  border-bottom-color: rgba(10,10,10,0.08);
}
body[data-palette="light"] .ak-card-head h2 { color: #0a0a0a; }
body[data-palette="light"] .ak-card-head .meta,
body[data-palette="light"] .v-citations .k,
body[data-palette="light"] .v-citations .n {
  color: rgba(10,10,10,0.55);
  border-color: rgba(10,10,10,0.14);
}

/* Rail */
body[data-palette="light"] .ak-rail {
  background: #f6f5f2;
  border-right: 1px solid rgba(10,10,10,0.08);
  color: #0a0a0a;
}
body[data-palette="light"] .ak-rail .ident,
body[data-palette="light"] .ak-rail .filter,
body[data-palette="light"] .ak-rail .layer,
body[data-palette="light"] .ak-rail .item,
body[data-palette="light"] .ak-rail .ident .trail,
body[data-palette="light"] .ak-rail .item .meta,
body[data-palette="light"] .ak-rail .item .lbl {
  color: inherit;
}
body[data-palette="light"] .ak-rail .item:hover {
  background: rgba(255,63,159,0.06);
}
body[data-palette="light"] .ak-rail .item.active {
  background: rgba(255,63,159,0.1);
}

/* Input / spotlight */
body[data-palette="light"] .ak-input {
  background: rgba(255,255,255,0.92);
  border-color: rgba(255,63,159,0.45);
  color: #0a0a0a;
  box-shadow:
    0 0 0 1px rgba(255,63,159,0.12),
    0 20px 60px -30px rgba(255,63,159,0.35);
}
body[data-palette="light"] .ak-spot-wrap.docked .ak-input {
  background: rgba(255,255,255,0.96);
  border-color: rgba(255,63,159,0.3);
  box-shadow:
    0 0 0 1px rgba(10,10,10,0.04),
    0 12px 40px -20px rgba(0,0,0,0.15);
}
body[data-palette="light"] .ak-input input { color: #0a0a0a; }
body[data-palette="light"] .ak-input input::placeholder { color: rgba(10,10,10,0.4); }
body[data-palette="light"] .ak-input .kbd,
body[data-palette="light"] .ak-empty .invite .kbd {
  color: rgba(10,10,10,0.55);
  border-color: rgba(10,10,10,0.2);
}
body[data-palette="light"] .ak-spot .lead { color: #0a0a0a; }
body[data-palette="light"] .ak-empty .lead { color: #0a0a0a; }
body[data-palette="light"] .ak-empty .soft { color: rgba(10,10,10,0.5); }

/* Ladder rows */
body[data-palette="light"] .v-step {
  border-color: rgba(10,10,10,0.1);
  background: transparent;
}
body[data-palette="light"] .v-step .lbl { color: #0a0a0a; }
body[data-palette="light"] .v-step .sub { color: rgba(10,10,10,0.58); }
body[data-palette="light"] .v-step .tag { color: rgba(10,10,10,0.55); }
body[data-palette="light"] .v-step.clickable:hover {
  background: rgba(255,63,159,0.06);
  border-color: rgba(255,63,159,0.35);
}
body[data-palette="light"] .v-step.clickable.active {
  background: rgba(255,63,159,0.1);
  border-color: rgba(255,63,159,0.55);
}
body[data-palette="light"] .v-step.now .tag { color: #FF3F9F; }
body[data-palette="light"] .v-step.block .mark {
  background: #FF3F9F; color: #ffffff; border-color: #FF3F9F;
}
body[data-palette="light"] .v-step.now .mark {
  background: #00a864; color: #ffffff; border-color: #00a864;
}
body[data-palette="light"] .v-step.done .mark {
  background: rgba(10,10,10,0.08); color: #0a0a0a; border-color: rgba(10,10,10,0.18);
}
body[data-palette="light"] .v-step.pending .mark {
  background: transparent; color: rgba(10,10,10,0.5); border-color: rgba(10,10,10,0.18);
}

/* Verdict + big + section */
body[data-palette="light"] .v-verdict {
  background: rgba(255,63,159,0.04);
  border-color: rgba(255,63,159,0.18);
}
body[data-palette="light"] .v-verdict .k,
body[data-palette="light"] .v-section {
  color: rgba(10,10,10,0.5);
}
body[data-palette="light"] .v-verdict .t,
body[data-palette="light"] .v-big {
  color: #0a0a0a;
}
body[data-palette="light"] .v-verdict .t em,
body[data-palette="light"] .v-big em,
body[data-palette="light"] .ak-spot .lead .tint,
body[data-palette="light"] .ak-empty .lead .tint,
body[data-palette="light"] .ak-generating .narration .tint {
  color: #FF3F9F;
}
body[data-palette="light"] .v-quote {
  background: #f6f5f2;
  border-color: rgba(10,10,10,0.08);
  color: rgba(10,10,10,0.78);
}
body[data-palette="light"] .v-quote .src { color: rgba(10,10,10,0.5); }

/* KV lists */
body[data-palette="light"] .v-kv dt { color: rgba(10,10,10,0.55); }
body[data-palette="light"] .v-kv dd { color: rgba(10,10,10,0.82); }
body[data-palette="light"] .v-kv dd em { color: #FF3F9F; font-style: italic; }

/* Stack backdrop + file panel */
body[data-palette="light"] .pb-grant-file {
  background: #ffffff;
  border-color: rgba(10,10,10,0.1);
}
body[data-palette="light"] .pb-grant-file-head {
  border-bottom-color: rgba(10,10,10,0.08);
}
body[data-palette="light"] .pb-grant-file-head .kicker { color: rgba(10,10,10,0.5); }
body[data-palette="light"] .pb-grant-file-head .ttl { color: #0a0a0a; }
body[data-palette="light"] .pb-grant-file-head .pth { color: rgba(10,10,10,0.42); }
body[data-palette="light"] .pb-grant-file-head .close {
  color: rgba(10,10,10,0.55);
  border-color: rgba(10,10,10,0.18);
}
body[data-palette="light"] .pb-grant-file-head .close:hover {
  color: #FF3F9F;
  border-color: #FF3F9F;
}
body[data-palette="light"] .pb-grant-file-body { color: rgba(10,10,10,0.85); }
body[data-palette="light"] .pb-grant-file-body .fp-h1 { color: #FF3F9F; }
body[data-palette="light"] .pb-grant-file-body .fp-h2,
body[data-palette="light"] .pb-grant-file-body .fp-h4 { color: #0a0a0a; }
body[data-palette="light"] .pb-grant-file-body .fp-h3 { color: rgba(10,10,10,0.55); }
body[data-palette="light"] .pb-grant-file-body .fp-p { color: rgba(10,10,10,0.82); }
body[data-palette="light"] .pb-grant-file-body .fp-p strong,
body[data-palette="light"] .pb-grant-file-body .fp-list strong { color: #FF3F9F; }
body[data-palette="light"] .pb-grant-file-body .fp-list li { color: rgba(10,10,10,0.82); }
body[data-palette="light"] .pb-grant-file-body .fp-list li::marker { color: #FF3F9F; }
body[data-palette="light"] .pb-grant-file-body .fp-yaml { color: rgba(10,10,10,0.72); }

/* DateBar + misc chips */
body[data-palette="light"] .ak-timewidget,
body[data-palette="light"] .ak-datebar,
body[data-palette="light"] .ak-datebar * {
  color: rgba(10,10,10,0.65) !important;
}
body[data-palette="light"] .ak-datebar .sep { color: rgba(10,10,10,0.3) !important; }

/* Suggestions + pills */
body[data-palette="light"] .ak-suggest .s,
body[data-palette="light"] .ak-pill {
  color: rgba(10,10,10,0.7);
  border-color: rgba(10,10,10,0.18);
  background: rgba(255,255,255,0.6);
}
body[data-palette="light"] .ak-suggest .s:hover,
body[data-palette="light"] .ak-pill:hover {
  color: #FF3F9F;
  border-color: rgba(255,63,159,0.4);
  background: rgba(255,63,159,0.05);
}
body[data-palette="light"] .ak-suggest .s .nudge { color: rgba(10,10,10,0.45); }

/* Tweaks panel itself */
body[data-palette="light"] .ak-tweaks {
  background: #ffffff;
  border-color: rgba(10,10,10,0.12);
  color: #0a0a0a;
}
body[data-palette="light"] .ak-tweaks h3 { color: rgba(10,10,10,0.55); }
body[data-palette="light"] .ak-tweaks .lbl { color: rgba(10,10,10,0.5); }
body[data-palette="light"] .ak-tweaks .opt {
  background: rgba(10,10,10,0.02);
  border-color: rgba(10,10,10,0.12);
  color: rgba(10,10,10,0.82);
}
body[data-palette="light"] .ak-tweaks .opt.on {
  background: rgba(255,63,159,0.08);
  border-color: #FF3F9F;
}
body[data-palette="whiteout"] .ebr .brain .body { fill: #F4F4F0; filter: drop-shadow(0 0 14px rgba(255,255,255,0.35)); }
body[data-palette="whiteout"] .ebr .brain .fold,
body[data-palette="whiteout"] .ebr .brain .wrinkle { stroke: #555; opacity: 0.55; }
body[data-palette="whiteout"] .ebr .brain .stem { fill: #9a9a9a; }
body[data-palette="whiteout"] .ebr .bolts .bolt { fill: #FF6FB5; stroke: #0a0a0a; filter: drop-shadow(0 0 10px rgba(255,111,181,0.8)); }

/* Noise — how loud the accent is */
body[data-noise="quiet"] {
  --pb-accent-mix: 0.5;
}
body[data-noise="quiet"] .ak-spot .lead .tint,
body[data-noise="quiet"] .v-big em,
body[data-noise="quiet"] .v-verdict .t em,
body[data-noise="quiet"] .ak-empty .lead .tint,
body[data-noise="quiet"] .ak-generating .narration .tint {
  color: var(--pb-ink);
}
body[data-noise="quiet"] .ak-rail .item.active {
  background: transparent;
}
body[data-noise="quiet"] .v-verdict { opacity: 0.95; }

body[data-noise="loud"] .ak-spot .lead .tint,
body[data-noise="loud"] .v-big em {
  text-shadow: 0 0 24px color-mix(in oklab, var(--pb-pinkH) 50%, transparent);
}
body[data-noise="loud"] .ak-rail .item.active {
  background: color-mix(in oklab, var(--pb-pinkH) 12%, transparent);
}
body[data-noise="loud"] .ak-stack-count .n,
body[data-noise="loud"] .v-citations .k,
body[data-noise="loud"] .ak-claude .whisper .spark {
  text-shadow: 0 0 10px color-mix(in oklab, var(--pb-pinkH) 60%, transparent);
}

/* ── Tweaks: palette swatches in the option buttons ────── */
.ak-tweaks .opts-col { flex-direction: column; gap: 6px; }
.ak-tweaks .opt { position: relative; display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; }
.ak-tweaks .opt .swatches { display: inline-flex; gap: 3px; }
.ak-tweaks .opt .sw { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,0.35); }
.ak-tweaks .opt .lbl2 { font-weight: 700; letter-spacing: 0.08em; }
.ak-tweaks .opt .sub2 { margin-left: auto; font-family: var(--pb-instr); font-style: italic; text-transform: none; letter-spacing: 0; opacity: 0.65; font-size: 10px; }
.ak-tweaks .opt.on .sub2 { opacity: 0.9; }

.ak-tweaks [data-palette="pink"] .a { background: #FF6FB5; }
.ak-tweaks [data-palette="pink"] .b { background: #F6C8DD; }
.ak-tweaks [data-palette="pink"] .c { background: #FDFDFB; }

.ak-tweaks [data-palette="green"] .a { background: #3CE08F; }
.ak-tweaks [data-palette="green"] .b { background: #B8F2D4; }
.ak-tweaks [data-palette="green"] .c { background: #FDFDFB; }

.ak-tweaks [data-palette="duo"] .a { background: #3CE08F; }
.ak-tweaks [data-palette="duo"] .b { background: #FF6FB5; }
.ak-tweaks [data-palette="duo"] .c { background: #FDFDFB; }

.ak-tweaks [data-palette="light"] .a { background: #FF3F9F; }
.ak-tweaks [data-palette="light"] .b { background: #00a864; }
.ak-tweaks [data-palette="light"] .c { background: #fbfbfa; border: 1px solid rgba(10,10,10,0.18); }

.ak-tweaks [data-palette="mono"] .a { background: #FDFDFB; }
.ak-tweaks [data-palette="mono"] .b { background: #888; }
.ak-tweaks [data-palette="mono"] .c { background: #2a2a2a; }

.ak-tweaks [data-palette="whiteout"] .a { background: #FDFDFB; }
.ak-tweaks [data-palette="whiteout"] .b { background: #EDEDEA; }
.ak-tweaks [data-palette="whiteout"] .c { background: #FF6FB5; }


/* ═════════════════════════════════════════════════════════
   CALENDAR VIEW  (v-cal)
   Renders for calendar / schedule / upcoming / week queries.
   Three zoom modes: day · week · month.
   Focus is crisp; everything out-of-focus fades to bg.
   ═════════════════════════════════════════════════════════ */

.v-cal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 18px 0 12px;
  gap: 18px;
  flex-wrap: wrap;
}
.v-cal-range {
  font-family: var(--pb-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--pb-ink);
  text-transform: lowercase;
}
.v-cal-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: rgba(253,253,251,0.04);
  border: 1px solid rgba(253,253,251,0.08);
  border-radius: 999px;
}
.v-cal-switch .sw {
  font-family: var(--pb-instr);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(253,253,251,0.55);
  background: transparent;
  border: 0;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
  text-transform: lowercase;
}
.v-cal-switch .sw:hover { color: var(--pb-ink); }
.v-cal-switch .sw.on {
  background: color-mix(in oklab, var(--pb-pinkH) 22%, transparent);
  color: var(--pb-ink);
}

.v-cal { display: flex; flex-direction: column; gap: 24px; }

/* ── WEEK MODE ───────────────────────────────────────── */
.v-cal-week {
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: opacity 240ms ease, filter 240ms ease;
}
.v-cal-week.focused { opacity: 1; }
.v-cal-week.ghost {
  opacity: calc(0.55 - var(--g, 0) * 0.35);
  filter: blur(calc(var(--g, 0) * 0.6px)) saturate(0.6);
}
.v-cal-week.ghost:hover { opacity: 0.85; filter: none; }

.v-cal-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 0 2px;
}
.v-cal-dow {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 2px 8px;
  border-bottom: 1px solid rgba(253,253,251,0.06);
  font-family: var(--pb-instr);
  color: rgba(253,253,251,0.5);
}
.v-cal-dow .n {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.v-cal-dow .num {
  font-family: var(--pb-display);
  font-size: 22px;
  color: rgba(253,253,251,0.75);
  letter-spacing: -0.01em;
}
.v-cal-dow.today .n   { color: var(--pb-pinkH); }
.v-cal-dow.today .num { color: var(--pb-pinkH); }
.v-cal-dow.today {
  border-bottom-color: var(--pb-pinkH);
}

.v-cal-col-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  min-height: 180px;
}
.v-cal-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 6px;
  background: rgba(253,253,251,0.015);
  min-height: 140px;
}
.v-cal-col.today {
  background: color-mix(in oklab, var(--pb-pinkH) 8%, rgba(253,253,251,0.015));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--pb-pinkH) 22%, transparent);
}
.v-cal-col.ghost {
  min-height: auto;
  padding: 4px 3px;
  background: transparent;
}
.v-cal-empty {
  color: rgba(253,253,251,0.12);
  font-family: var(--pb-instr);
  font-size: 18px;
  text-align: center;
  padding: 14px 0;
}

/* event block */
.v-cal-ev {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 7px 6px;
  border-radius: 4px;
  background: rgba(253,253,251,0.05);
  border-left: 2px solid rgba(253,253,251,0.3);
  font-family: var(--pb-instr);
  line-height: 1.15;
  transition: transform 180ms ease, background 180ms ease;
}
.v-cal-ev:hover {
  background: rgba(253,253,251,0.08);
  transform: translateX(1px);
}
.v-cal-ev .tm {
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: rgba(253,253,251,0.45);
  font-feature-settings: "tnum";
}
.v-cal-ev .tt {
  font-size: 12.5px;
  color: var(--pb-ink);
  letter-spacing: -0.005em;
  text-transform: lowercase;
  text-wrap: pretty;
}

/* tones */
.v-cal-ev.pink  { border-left-color: var(--pb-pinkH); }
.v-cal-ev.pink .tm { color: color-mix(in oklab, var(--pb-pinkH) 70%, transparent); }
.v-cal-ev.green { border-left-color: var(--pb-green, #78e6aa); }
.v-cal-ev.green .tm { color: color-mix(in oklab, var(--pb-green, #78e6aa) 70%, transparent); }
.v-cal-ev.warm  { border-left-color: #ff9a3c; }
.v-cal-ev.warm .tm  { color: #ff9a3c; opacity: 0.75; }
.v-cal-ev.cool  { border-left-color: rgba(200,210,225,0.5); }
.v-cal-ev.cool .tm  { color: rgba(200,210,225,0.55); }

/* states */
.v-cal-ev.hot {
  background: color-mix(in oklab, var(--pb-pinkH) 16%, transparent);
  border-left-width: 3px;
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--pb-pinkH) 25%, transparent);
}
.v-cal-ev.done {
  opacity: 0.42;
}
.v-cal-ev.done .tt { text-decoration: line-through; text-decoration-color: rgba(253,253,251,0.3); }
.v-cal-ev.soft {
  background: transparent;
  border-left-style: dashed;
}
.v-cal-ev.pin::after {
  content: '⚑';
  position: absolute;
  right: 6px; top: 4px;
  font-size: 10px;
  color: var(--pb-pinkH);
}
.v-cal-ev { position: relative; }

/* ghost versions inside ghost weeks */
.v-cal-ev.ghost {
  padding: 2px 5px;
  background: transparent;
  border-left-width: 1px;
}
.v-cal-ev.ghost .tt {
  font-size: 10.5px;
  color: rgba(253,253,251,0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v-cal-fade-lbl {
  font-family: var(--pb-instr);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(253,253,251,0.32);
  margin-top: 12px;
}
.v-cal-ghost-lbl {
  font-family: var(--pb-instr);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(253,253,251,0.4);
  margin-bottom: 4px;
  text-transform: lowercase;
}

/* ── DAY MODE ──────────────────────────────────────────── */
.v-cal-day {
  display: grid;
  grid-template-columns: 0.6fr 1.4fr 0.6fr;
  gap: 18px;
}
.v-cal-day-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: opacity 240ms ease, filter 240ms ease;
}
.v-cal-day-col.ghost {
  opacity: 0.45;
  filter: blur(0.4px) saturate(0.7);
}
.v-cal-day-col.ghost:hover { opacity: 0.85; filter: none; }
.v-cal-day-hdr {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(253,253,251,0.08);
}
.v-cal-day-hdr .n {
  font-family: var(--pb-instr);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(253,253,251,0.5);
}
.v-cal-day-hdr .num {
  font-family: var(--pb-display);
  font-size: 20px;
  color: var(--pb-ink);
  letter-spacing: -0.01em;
  text-transform: lowercase;
}
.v-cal-day-hdr .pill {
  margin-left: auto;
  font-family: var(--pb-instr);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--pb-pinkH);
  background: color-mix(in oklab, var(--pb-pinkH) 14%, transparent);
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: lowercase;
}

.v-cal-hours {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.v-cal-hour {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 6px;
  min-height: 38px;
  padding: 4px 0;
  border-top: 1px dotted rgba(253,253,251,0.05);
  align-items: flex-start;
}
.v-cal-hour:first-child { border-top: 0; }
.v-cal-hour .lbl {
  font-family: var(--pb-instr);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(253,253,251,0.3);
  padding-top: 2px;
  font-feature-settings: "tnum";
}
.v-cal-hour .slot {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* ── MONTH MODE ────────────────────────────────────────── */
.v-cal-month {
  gap: 2px;
}
.v-cal-dow-row.tight { margin-bottom: 4px; }
.v-cal-dow.tight {
  padding: 2px 6px;
  border-bottom: 0;
  justify-content: center;
}
.v-cal-dow.tight .n {
  font-size: 10.5px;
  color: rgba(253,253,251,0.38);
}
.v-cal-mrow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  transition: opacity 240ms ease, filter 240ms ease;
}
.v-cal-mrow.focused {
  opacity: 1;
}
.v-cal-mrow.ghost {
  opacity: calc(0.5 - var(--g, 0) * 0.2);
  filter: blur(calc(var(--g, 0) * 0.5px)) saturate(0.65);
}
.v-cal-mrow.ghost:hover { opacity: 0.9; filter: none; }

.v-cal-mcell {
  min-height: 84px;
  padding: 6px 8px;
  border-radius: 5px;
  background: rgba(253,253,251,0.02);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.v-cal-mcell.outside { opacity: 0.35; }
.v-cal-mcell.today {
  background: color-mix(in oklab, var(--pb-pinkH) 10%, rgba(253,253,251,0.02));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--pb-pinkH) 30%, transparent);
}
.v-cal-mcell .num {
  font-family: var(--pb-display);
  font-size: 13px;
  color: rgba(253,253,251,0.75);
  letter-spacing: -0.005em;
  font-feature-settings: "tnum";
}
.v-cal-mcell.today .num { color: var(--pb-pinkH); font-weight: 600; }

.v-cal-mcell .dots {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
}
.v-cal-mev {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--pb-instr);
  font-size: 10.5px;
  color: rgba(253,253,251,0.72);
  letter-spacing: -0.005em;
  line-height: 1.1;
  text-transform: lowercase;
  overflow: hidden;
}
.v-cal-mev .d {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(253,253,251,0.4);
  flex-shrink: 0;
}
.v-cal-mev .t {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v-cal-mev.pink  .d { background: var(--pb-pinkH); }
.v-cal-mev.green .d { background: var(--pb-green, #78e6aa); }
.v-cal-mev.warm  .d { background: #ff9a3c; }
.v-cal-mev.cool  .d { background: rgba(200,210,225,0.6); }
.v-cal-mev.hot .t { color: var(--pb-pinkH); font-weight: 500; }
.v-cal-mev.pin .d {
  width: 6px; height: 6px;
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--pb-pinkH) 30%, transparent);
}
.v-cal-more {
  font-family: var(--pb-instr);
  font-size: 10px;
  color: rgba(253,253,251,0.42);
  padding-left: 10px;
}


/* ── Quick pills (docked, inline-right of the ask bar) ───────── */
.ak-spot-wrap.docked { padding-right: 40px; }
.ak-spot-wrap.docked .ak-spot {
  width: min(960px, 84vw);
  flex-direction: row;
  align-items: stretch;
  gap: 10px;
  transition: width 260ms cubic-bezier(0.2, 0, 0, 1);
}
/* Input wrapper — fixed min width; grows to fill when typing */
.ak-spot-wrap.docked .ak-input {
  flex: 0 1 360px;
  min-width: 240px;
  transition: flex-basis 320ms cubic-bezier(0.2, 0, 0, 1), min-width 320ms ease;
}
@media (max-width: 1100px) {
  .ak-spot-wrap.docked .ak-input { flex: 0 1 280px; min-width: 200px; }
}
/* Typing state: pills slide out, input expands to claim the space */
.ak-spot-wrap.docked .ak-spot.typing .ak-input {
  flex: 1 1 auto;
  min-width: 0;
}

.ak-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
  overflow: hidden;
  max-width: 520px;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 240ms ease, transform 320ms cubic-bezier(0.2, 0, 0, 1), max-width 320ms ease;
  pointer-events: auto;
}
.ak-spot.typing .ak-pills {
  opacity: 0;
  transform: translateX(24px);
  max-width: 0;
  pointer-events: none;
}
.ak-pills .pill {
  font-family: var(--pb-instr);
  font-size: 12.5px;
  letter-spacing: -0.005em;
  color: rgba(253,253,251,0.7);
  background: rgba(253,253,251,0.04);
  border: 1px solid rgba(253,253,251,0.08);
  padding: 7px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 120ms ease;
  text-transform: lowercase;
}
@media (max-width: 1000px) {
  .ak-pills .pill { font-size: 12px; padding: 6px 9px; }
  .ak-pills { gap: 4px; }
}
/* On very narrow screens drop the 4th pill */
@media (max-width: 880px) {
  .ak-pills .pill:nth-child(4) { display: none; }
}
.ak-pills .pill:hover {
  color: var(--pb-ink);
  background: color-mix(in oklab, var(--pb-pinkH) 14%, transparent);
  border-color: color-mix(in oklab, var(--pb-pinkH) 30%, transparent);
}
.ak-pills .pill:active { transform: scale(0.96); }

/* Remove / hide the old rail ask button if it ever leaked back */
.ak-rail .ask-btn { display: none; }

/* ────────────────────────────────────────────────────────────
   App shell — punk-brain lives inside a desktop window now.
   Dark marble background around, rounded window inside,
   traffic lights pinned to the top-left.
   ──────────────────────────────────────────────────────────── */
html, body { height: 100%; overflow: hidden; }
body {
  /* Darker marble — echoes the reference image. Layered radial + linear
     gradients + a subtle noise overlay. Kept DARK so the pink/green app
     colors still read. */
  background:
    radial-gradient(ellipse 70% 55% at 18% 22%, rgba(70,82,100,0.55) 0%, transparent 60%),
    radial-gradient(ellipse 60% 45% at 78% 70%, rgba(40,48,62,0.6) 0%, transparent 65%),
    radial-gradient(ellipse 45% 35% at 52% 88%, rgba(90,100,120,0.25) 0%, transparent 60%),
    linear-gradient(160deg, #101319 0%, #0a0c11 45%, #060709 100%);
  background-attachment: fixed;
  padding: 0;
}
/* Swirly marble grain — CSS only, subtle, behind the shell */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 13% 18%, rgba(255,255,255,0.035), transparent 50%),
    radial-gradient(1px 1px at 47% 62%, rgba(255,255,255,0.025), transparent 50%),
    radial-gradient(1px 1px at 82% 33%, rgba(255,255,255,0.03), transparent 50%),
    radial-gradient(1px 1px at 71% 84%, rgba(255,255,255,0.025), transparent 50%),
    radial-gradient(1.5px 1.5px at 28% 74%, rgba(255,255,255,0.02), transparent 50%);
  background-size: 220px 220px;
  mix-blend-mode: screen;
  opacity: 0.6;
}

.ak-desktop {
  position: fixed;
  inset: 0;
  padding: 28px;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  z-index: 1;
}

.ak-shell {
  position: relative;
  flex: 1;
  border-radius: 14px;
  overflow: hidden;
  background: var(--pb-paper);
  /* Soft outer glow + hard 1px line, like a macOS window */
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.08),
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 24px 80px rgba(0,0,0,0.55),
    0 4px 16px rgba(0,0,0,0.4);
  isolation: isolate;
}

/* Traffic lights — top-left of the shell, over the rail's identity row */
.ak-traffic {
  position: absolute;
  top: 14px;
  left: 16px;
  display: flex;
  gap: 8px;
  z-index: 50;
  pointer-events: none;
}
.ak-traffic .tl {
  width: 12px; height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.25);
}
.ak-traffic .tl.r { background: #ff5f57; }
.ak-traffic .tl.y { background: #febc2e; }
.ak-traffic .tl.g { background: #28c840; }

/* Re-anchor all fixed-positioned surfaces to the shell. The shell is the
   new viewport for the app — everything inside becomes absolute. */
.ak-shell .ak-canvas,
.ak-shell .ak-rail,
.ak-shell .ak-claude,
.ak-shell .ak-spot-wrap,
.ak-shell .ak-stack,
.ak-shell .ak-stack-meta,
.ak-shell .ak-generating,
.ak-shell .ak-hint,
.ak-shell .ak-tweaks,
.ak-shell .ak-file,
.ak-shell .ak-empty,
.ak-shell .ak-constellation,
.ak-shell .ak-timewidget {
  position: absolute;
}

/* Nudge the rail's identity row down so it clears the traffic lights */
.ak-rail .ident { padding-top: 52px; }
body.rail-collapsed .ak-rail .ident { padding-top: 48px; }

/* ────────────────────────────────────────────────────────────
   Sidebar readability — switch from serif italic (Instrument
   Serif) to sans (Inter Tight) for the dense rail UI only.
   ──────────────────────────────────────────────────────────── */
.ak-rail,
.ak-rail .ident .lead,
.ak-rail .ident .trail,
.ak-rail .filter,
.ak-rail .filter .tab,
.ak-rail .layer .name,
.ak-rail .item,
.ak-rail .item .meta,
.ak-rail .recents .hdr,
.ak-rail .recents .r,
.ak-rail .recents .r .g,
.ak-rail .recents .r .t {
  font-family: var(--pb-display);
  font-style: normal;
  letter-spacing: -0.005em;
}
/* Layer names were uppercase-ish instrument serif — keep them quiet but sans */
.ak-rail .layer .name {
  font-size: 11.5px;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  font-weight: 500;
}
/* Item labels breathe a touch more in sans */
.ak-rail .item .lbl {
  font-family: var(--pb-display);
  font-weight: 500;
  letter-spacing: -0.005em;
}
/* Identity lead keeps its size, just sans */
.ak-rail .ident .lead {
  font-weight: 600;
  font-size: 14.5px;
}
.ak-rail .ident .trail {
  font-size: 12.5px;
  color: rgba(253,253,251,0.42);
}

/* ============================================================
   THEME TOGGLE — light / dark switch, fixed top-right.
   Shown on every page via theme.js. Stays readable in both
   palettes (uses currentColor + two stacked glyphs, one shown
   per palette).
   ============================================================ */
.pb-theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  width: 44px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(253,253,251,0.18);
  background: rgba(14,14,14,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: rgba(253,253,251,0.7);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.pb-theme-toggle:hover {
  color: #FF6FB5;
  border-color: rgba(255,111,181,0.45);
  transform: translateY(-1px);
}
.pb-theme-toggle .pb-theme-icon {
  font-size: 13px;
  line-height: 1;
  display: inline-block;
  transition: opacity 160ms ease;
}
.pb-theme-toggle .pb-theme-sun { opacity: 0; } /* dark palette shows moon */
.pb-theme-toggle .pb-theme-moon { opacity: 1; }
body[data-palette="light"] .pb-theme-toggle {
  background: rgba(255,255,255,0.88);
  border-color: rgba(10,10,10,0.18);
  color: rgba(10,10,10,0.6);
}
body[data-palette="light"] .pb-theme-toggle:hover {
  color: #FF3F9F;
  border-color: rgba(255,63,159,0.4);
}
body[data-palette="light"] .pb-theme-toggle .pb-theme-sun { opacity: 1; }
body[data-palette="light"] .pb-theme-toggle .pb-theme-moon { opacity: 0; }

/* ============================================================
   CLAUDE STATUS — hidden for now.
   Bottom-left mark + whisper ("it's quiet…" / stale blocker
   narrations) was clashing with the DateBar and the view.
   Keep React tree intact; just don't render visually.
   ============================================================ */
.ak-claude,
.ak-empty .quiet {
  display: none !important;
}

/* ============================================================
   STACK — hidden for now. The stack logic stays intact (we want
   to surface it later as a control in the browser bar), but the
   current "4 views in stack / FLIP / CLEAR" indicator and the
   visual stacked-card ghosts behind the active card were fighting
   with the view. Hide visually only; keep state machinery.
   ============================================================ */
.ak-stack-meta,
.ak-stack-count {
  display: none !important;
}
.ak-card[data-depth="1"],
.ak-card[data-depth="2"],
.ak-card[data-depth="3"] {
  display: none !important;
}

/* ============================================================
   GRANT VIEW — click-to-expand file panel
   ============================================================ */

/* Make ladder rows interactive */
.v-step.clickable {
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.v-step.clickable:hover {
  background: rgba(255,111,181,0.05);
  border-color: rgba(255,111,181,0.25);
}
.v-step.clickable:focus-visible {
  outline: 1px solid rgba(255,111,181,0.55);
  outline-offset: 2px;
}
.v-step.clickable.active {
  background: rgba(255,111,181,0.08);
  border-color: rgba(255,111,181,0.45);
}

/* Grant wrapper — single column by default, two-column when a file is open */
.pb-grant {
  display: block;
}
.pb-grant.has-file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 44%);
  gap: 28px;
  align-items: start;
}
.pb-grant-main { min-width: 0; }

/* The file panel itself */
.pb-grant-file {
  position: sticky;
  top: 0;
  max-height: calc(100vh - 180px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(253,253,251,0.08);
  background: rgba(8,8,8,0.7);
  border-radius: 4px;
  overflow: hidden;
  animation: pb-grant-file-in 220ms ease;
}
@keyframes pb-grant-file-in {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.pb-grant-file-head {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(253,253,251,0.06);
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
}
.pb-grant-file-head .kicker {
  font-family: var(--pb-mono);
  font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(253,253,251,0.4);
}
.pb-grant-file-head .ttl {
  font-family: var(--pb-instr);
  font-style: italic;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--pb-ink);
  margin-top: 2px;
}
.pb-grant-file-head .pth {
  font-family: var(--pb-mono);
  font-size: 10px;
  color: rgba(253,253,251,0.35);
  margin-top: 6px;
  word-break: break-all;
}
.pb-grant-file-head .close {
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(253,253,251,0.12);
  color: rgba(253,253,251,0.55);
  font-family: var(--pb-mono);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 2px;
}
.pb-grant-file-head .close:hover {
  color: var(--pb-pinkH);
  border-color: rgba(255,111,181,0.4);
}
.pb-grant-file-body {
  flex: 1;
  overflow: auto;
  padding: 22px 26px 32px;
  margin: 0;
  font-family: var(--pb-instr, var(--pb-serif, Georgia, serif));
  font-size: 14px;
  line-height: 1.55;
  color: rgba(253,253,251,0.88);
}
.pb-grant-file-body .fp-h1,
.pb-grant-file-body .fp-h2,
.pb-grant-file-body .fp-h3,
.pb-grant-file-body .fp-h4 {
  font-family: var(--pb-instr);
  font-weight: 500;
  font-style: italic;
  color: var(--pb-ink);
  letter-spacing: -0.01em;
  margin: 20px 0 8px;
  line-height: 1.15;
}
.pb-grant-file-body .fp-h1 { font-size: 22px; margin-top: 4px; color: var(--pb-pinkH); }
.pb-grant-file-body .fp-h2 { font-size: 17px; }
.pb-grant-file-body .fp-h3 { font-size: 14.5px; text-transform: uppercase; font-style: normal; letter-spacing: 0.08em; color: rgba(253,253,251,0.55); font-family: var(--pb-mono); }
.pb-grant-file-body .fp-h4 { font-size: 13px; color: rgba(253,253,251,0.6); }

.pb-grant-file-body .fp-p {
  margin: 10px 0;
  color: rgba(253,253,251,0.82);
}
.pb-grant-file-body .fp-p strong,
.pb-grant-file-body .fp-list strong {
  color: var(--pb-pinkH);
  font-weight: 600;
  font-style: normal;
}
.pb-grant-file-body .fp-list {
  margin: 8px 0 12px;
  padding-left: 18px;
}
.pb-grant-file-body .fp-list li {
  margin: 4px 0;
  color: rgba(253,253,251,0.82);
  list-style: disc;
}
.pb-grant-file-body .fp-list li::marker {
  color: rgba(255,111,181,0.55);
}
.pb-grant-file-body .fp-yaml {
  font-family: var(--pb-mono);
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  color: rgba(253,253,251,0.72);
  white-space: pre;
}
/* Visually group adjacent yaml lines — tighten spacing */
.pb-grant-file-body .fp-yaml + .fp-yaml { margin-top: 0; }


/* When grant file panel is open, collapse the rail + let the card widen */
body.grant-expanded .ak-rail {
  transform: translateX(-100%);
  transition: transform 260ms ease;
  pointer-events: none;
}
body.grant-expanded .ak-stack {
  left: 32px !important;
}

/* Clickable receipt chips in v-citations */
.v-citations .n.clickable {
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}
.v-citations .n.clickable:hover {
  color: var(--pb-pinkH);
  border-color: rgba(255,111,181,0.4);
  background: rgba(255,111,181,0.06);
}
.v-citations .n.clickable.active {
  color: var(--pb-pinkH);
  border-color: rgba(255,111,181,0.55);
  background: rgba(255,111,181,0.08);
}

/* Responsive: stack the file below on narrow screens */
@media (max-width: 1100px) {
  .pb-grant.has-file {
    grid-template-columns: 1fr;
  }
  .pb-grant-file {
    position: static;
    max-height: 520px;
  }
}
