/* ═══════════════════════════════════════════════════════════════════
   NEURAL v2 — COCKPIT TOKENS (v2.1)
   Inherits from theme.css. Adds muted-warm calendar palette + bento.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* ── MUTED-WARM CALENDAR PALETTE ────────────────────────────────── */
  --z-clinical:      #F4D9E4;
  --z-clinical-fill: #C8447F;
  --z-clinical-ink:  #6E1A47;

  --z-research:      #DCE2F4;
  --z-research-fill: #4A6BD0;
  --z-research-ink:  #1F2E6E;

  --z-leadership:      #D6E5C9;
  --z-leadership-fill: #5A8A4E;
  --z-leadership-ink:  #2D4A22;

  --z-personal:      #E3DAF1;
  --z-personal-fill: #7C5FC9;
  --z-personal-ink:  #3D2A6E;

  --z-wellness:      #F4E4C2;
  --z-wellness-fill: #C8923A;
  --z-wellness-ink:  #5A3E0E;

  --z-system:      #E8E0D2;
  --z-system-fill: #8A7A5E;
  --z-system-ink:  #3A2A1A;

  /* ── WORKOUT TYPE COLORS ────────────────────────────────────────── */
  --z-workout:      #E4F0E8;
  --z-workout-fill: #3DA890;
  --z-workout-ink:  #1A4A36;

  /* ── WORKOUT CSS VAR ALIASES (used in Workout.html JSX) ─────────── */
  --climb:    var(--z-workout-fill);
  --strength: var(--z-personal-fill);
  --cardio:   #4AA8CC;
  --rest:     var(--z-wellness-fill);

  /* ── FONT ALIASES (for Workout.html JSX inline styles) ──────────── */
  --font:   var(--mono);
  --font-d: var(--serif);
}

/* Page baseline (cockpit body) — no dot grid, plain cream */
body.cockpit { background: var(--cream); }

/* ═══════════════════════════════════════════════════════════════════
   FOLDER TAB BAR (matches v1 — kept verbatim)
   ═══════════════════════════════════════════════════════════════════ */
.hub-tab-bar {
  position: sticky; top: 0; z-index: 200;
  min-height: 48px;
  background: var(--surface-2);
  border-bottom: 2px solid var(--ink);
  display: flex; align-items: flex-end;
  justify-content: space-between;
  padding: 8px 16px 0;
}
.hub-brand {
  font-family: var(--mono); font-size: var(--text-md); font-weight: 700;
  color: var(--pink); letter-spacing: .05em; text-transform: uppercase;
  flex-shrink: 0; margin-bottom: 7px; text-decoration: none;
}
.hub-tabs { display: flex; align-items: flex-end; gap: 4px; overflow-x: auto; flex-shrink: 1; }

.folder-tab {
  font-family: var(--mono); font-size: var(--text-xs); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 7px 18px 8px;
  border: 2px solid var(--ink); border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: var(--muted); color: var(--dim);
  cursor: pointer; transition: background .1s, color .1s;
  position: relative; text-decoration: none; display: inline-block;
  white-space: nowrap;
}
.folder-tab:hover { background: var(--surface); color: var(--ink); }
.folder-tab.active {
  background: var(--cream); color: var(--ink);
  border-bottom: 2px solid var(--cream);
  border-top-color: var(--green);
  margin-bottom: -2px; z-index: 2; padding-bottom: 10px;
}

/* ═══════════════════════════════════════════════════════════════════
   COCKPIT PRIMITIVES
   ═══════════════════════════════════════════════════════════════════ */

.zone {
  border: 2px solid var(--ink);
  background: var(--surface);
  box-shadow: var(--sh);
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}
.zone-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.zone-hdr .zone-eyebrow { display: flex; align-items: center; gap: 8px; }
.zone-hdr .zone-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  font-weight: 400;
  opacity: .78;
}
.zone-body { padding: 14px; flex: 1; min-height: 0; }
.zone-body.tight { padding: 10px 12px; }
.zone-body.flush { padding: 0; }

/* ═══════════════════════════════════════════════════════════════════
   HERO BAND — v2.1: forest-green default, v1 type sizing
   ═══════════════════════════════════════════════════════════════════ */
.hero-band {
  border: 2px solid var(--ink);
  background: var(--green-dark);   /* deep forest — replaces pink */
  box-shadow: var(--sh);
  padding: 22px 26px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-band::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,248,241,0.07) 1px, transparent 1.5px);
  background-size: 18px 18px;
  pointer-events: none;
}
.hero-prompt {
  font-family: var(--serif);
  font-style: italic;
  font-size: 27px;            /* v1 size */
  line-height: 1.25;
  color: var(--cream);
  position: relative;
  z-index: 1;
}
.hero-prompt .hero-eyebrow {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-size: var(--text-xs);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,248,241,.65);
  margin-bottom: 8px;
  font-weight: 700;
}
.hero-chips {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 11px;
  position: relative; z-index: 1;
}
.hero-chip {
  font-family: var(--mono); font-size: var(--text-xs); font-weight: 700;
  padding: 2px 8px; border: 1.5px solid rgba(255,248,241,.35);
  color: var(--cream); letter-spacing: .06em; text-transform: uppercase;
}
.hero-chip.hot { background: rgba(255,248,241,.18); border-color: var(--cream); }
.hero-count { font-family: var(--mono); font-size: var(--text-xs); color: rgba(255,248,241,.5); }

.hero-cta { display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 1; }
.hero-btn {
  font-family: var(--mono); font-size: var(--text-sm); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  background: var(--cream); color: var(--green-dark);
  border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  padding: 9px 22px; cursor: pointer; transition: all .1s;
  white-space: nowrap;
}
.hero-btn:hover { background: var(--ink); color: var(--cream); box-shadow: 1px 1px 0 var(--ink); }
.hero-btn.ghost {
  background: transparent; color: rgba(255,248,241,.7);
  box-shadow: none; border: 1.5px solid rgba(255,248,241,.35);
  padding: 5px 14px; font-size: var(--text-xs);
}
.hero-btn.ghost:hover { background: rgba(255,248,241,.1); color: var(--cream); }

.hero-band.done { background: var(--blue); }
.hero-band.done .hero-btn { color: var(--blue-dark); }

/* ═══════════════════════════════════════════════════════════════════
   TODAY STRIP — date + countdown + vibe, promoted above the fold
   ═══════════════════════════════════════════════════════════════════ */
.today-strip {
  display: grid;
  grid-template-columns: 1.1fr 2.4fr;
  gap: 12px;
  margin-bottom: 14px;
}
.today-card {
  background: var(--surface);
  border: 2px solid var(--ink);
  box-shadow: var(--sh);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.today-card .td-day {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--pink);
}
.today-card .td-big {
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  line-height: 1.05;
  color: var(--ink);
}
.today-card .td-quote {
  font-family: var(--sans);
  font-style: italic;
  font-size: var(--text-md);
  color: var(--dim);
  line-height: 1.5;
}

.today-countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.cd-pill {
  background: var(--surface);
  border: 2px solid var(--ink);
  box-shadow: var(--sh-sm);
  padding: 11px 13px;
  display: flex; align-items: center; gap: 10px;
}
.cd-num {
  font-family: var(--serif); font-style: italic; font-size: 30px;
  line-height: 1; color: var(--ink); flex-shrink: 0;
}
.cd-num.hot  { color: var(--pink); }
.cd-num.cool { color: var(--blue); }
.cd-num.warm { color: var(--yellow-dark); }
.cd-meta { display: flex; flex-direction: column; min-width: 0; }
.cd-lbl  { font-family: var(--mono); font-size: var(--text-sm); font-weight: 700; color: var(--ink); line-height: 1.3; }
.cd-sub  { font-family: var(--mono); font-size: var(--text-xs); color: var(--dim); margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════════
   BENTO GRID
   ═══════════════════════════════════════════════════════════════════ */
.cockpit-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

/* ── PLAN ZONE (research/blue) — schedule + calendar MERGED ─────── */
.zone.zone-plan { background: var(--z-research); }
.zone.zone-plan .zone-hdr {
  background: var(--z-research-fill); color: var(--cream);
  border-bottom-color: var(--ink);
}
.zone.zone-plan .zone-hdr .zone-meta { color: rgba(255,248,241,.78); }

.plan-rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}
.plan-cell {
  background: var(--surface);
  border: 1.5px solid var(--ink);
  padding: 9px 12px;
  box-shadow: var(--sh-xs);
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left-width: 4px;
  position: relative;
}
.plan-cell.locked { background: var(--surface-2); }
.plan-cell .pc-time {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .08em; color: var(--dim);
}
.plan-cell .pc-type {
  font-family: var(--mono); font-size: 10px;
  font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.plan-cell .pc-task {
  font-family: var(--mono); font-size: var(--text-xs);
  color: var(--ink); line-height: 1.4;
  margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.plan-cell .pc-dur {
  font-family: var(--mono); font-size: 10px;
  color: var(--dim); margin-top: 4px; font-style: italic;
}
.plan-cell .pc-lock {
  position: absolute; top: 6px; right: 8px;
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: .1em; color: var(--z-system-ink); opacity: .55;
}

/* ── TASKS ZONE (clinical/pink) ─────────────────────────────────── */
.zone.zone-tasks { background: var(--z-clinical); }
.zone.zone-tasks .zone-hdr { background: var(--z-clinical-fill); color: var(--cream); }
.zone.zone-tasks .zone-hdr .zone-meta { color: rgba(255,248,241,.85); }
.zone.zone-tasks .zone-body { padding: 0; background: var(--surface); }

.tasks-filter {
  display: flex; gap: 5px; padding: 7px 13px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.tf-btn {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 7px; border: 1.5px solid var(--border);
  background: transparent; color: var(--dim);
  cursor: pointer; transition: all .12s;
}
.tf-btn.active { border-color: currentColor; background: rgba(0,0,0,.05); }

.task-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 13px; border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.task-row:last-child { border-bottom: none; }
.task-row:hover { background: var(--surface-2); }
.task-row.urgent { background: rgba(200, 68, 127, 0.06); }
.task-row.urgent:hover { background: rgba(200, 68, 127, 0.12); }

.task-box {
  width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px;
  border: 2px solid var(--ink);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
  cursor: pointer; transition: all .15s;
}
.task-box.now     { background: var(--z-clinical-fill); border-color: var(--z-clinical-ink); color: var(--cream); }
.task-box.started { border-color: var(--z-research-fill); color: var(--z-research-fill); }
.task-box.done    { background: var(--z-leadership-fill); border-color: var(--z-leadership-ink); color: var(--cream); }

.task-body { flex: 1; min-width: 0; }
.task-title {
  font-family: var(--mono); font-size: var(--text-md); line-height: 1.4;
  color: var(--ink);
}
.task-title.done { text-decoration: line-through; color: var(--dim); }
.task-chips {
  display: flex; gap: 5px; flex-wrap: wrap;
  margin-top: 3px; align-items: center;
}
.d-chip {
  font-family: var(--mono); font-size: var(--text-xs); font-weight: 700;
  padding: 1px 5px; border: 1.5px solid currentColor;
  letter-spacing: .04em; text-transform: uppercase;
}
.t-due { font-family: var(--mono); font-size: var(--text-xs); color: var(--dim); }
.t-due.urgent { color: var(--z-clinical-ink); font-weight: 700; }

/* row actions — appear on hover/focus (matches v1 behavior) */
.task-actions {
  display: flex; gap: 4px;
  flex-shrink: 0;
  align-items: flex-start;
  margin-top: 1px;
}
.t-act {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  padding: 2px 7px; border: 1.5px solid var(--border);
  background: transparent; color: var(--dim);
  cursor: pointer; opacity: 0; transition: opacity .15s, all .1s;
  letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap;
}
.task-row:hover .t-act,
.task-row:focus-within .t-act { opacity: 1; }
.t-act.start:hover  { border-color: var(--z-research-fill); color: var(--z-research-fill); background: rgba(74,107,208,.08); }
.t-act.snooze:hover { border-color: var(--z-personal-fill); color: var(--z-personal-fill); background: rgba(124,95,201,.08); }
.t-act.later:hover  { border-color: var(--ink); color: var(--ink); background: rgba(0,0,0,.04); }
.t-act.complete:hover { border-color: var(--z-leadership-fill); color: var(--z-leadership-fill); background: rgba(90,138,78,.1); }

/* ── HABITS ZONE (leadership/forest) ────────────────────────────── */
.zone.zone-habits { background: var(--z-leadership); }
.zone.zone-habits .zone-hdr { background: var(--z-leadership-fill); color: var(--cream); }
.zone.zone-habits .zone-hdr .zone-meta { color: rgba(255,248,241,.85); }

.habits-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
}
.hab-cell {
  background: var(--surface); border: 1.5px solid var(--ink);
  padding: 7px 10px; cursor: pointer;
  display: flex; align-items: center; gap: 7px; transition: all .12s;
}
.hab-cell:hover { box-shadow: 1px 1px 0 var(--ink); }
.hab-cell.on { background: var(--z-leadership-fill); border-color: var(--z-leadership-ink); }
.hab-cell.on .hab-cell-lbl { color: var(--cream); }
.hab-cell-icon { font-size: 13px; }
.hab-cell-lbl {
  font-family: var(--mono); font-size: var(--text-xs); font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--dim);
}

.hab-readouts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed rgba(45,74,34,0.3);
}
.hab-readout { display: flex; flex-direction: column; gap: 2px; }
.hab-readout .ro-num {
  font-family: var(--serif); font-style: italic;
  font-size: 30px; line-height: 1;
  color: var(--z-leadership-ink);
}
.hab-readout .ro-lbl {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
}
.hab-readout .ro-meta {
  font-family: var(--mono); font-size: 10px;
  color: var(--dim); font-style: italic;
}
.water-dots { display: flex; gap: 3px; margin-top: 4px; }
.water-dot {
  width: 16px; height: 16px;
  border: 1.5px solid var(--z-leadership-ink);
  background: transparent; cursor: pointer; transition: all .1s;
}
.water-dot.on { background: var(--z-leadership-fill); }

/* ── COMPANIONS ZONE (personal/lavender) ────────────────────────── */
.zone.zone-companions { background: var(--z-personal); }
.zone.zone-companions .zone-hdr { background: var(--z-personal-fill); color: var(--cream); }
.zone.zone-companions .zone-hdr .zone-meta { color: rgba(255,248,241,.85); }
.zone.zone-companions .zone-body { padding: 0; }

.companions-frame {
  position: relative; height: 168px; overflow: hidden;
  background: linear-gradient(180deg, #d8d0ee 0%, #e8d8f8 35%, #f4e4d8 70%, #ddc8a8 100%);
}
.companions-floor {
  position: absolute; bottom: 0; left: 0; right: 0; height: 38px;
  background: linear-gradient(180deg, #cab89c 0%, #b8a684 100%);
  border-top: 2px solid rgba(0,0,0,.18);
}
.companions-floor::before {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, transparent, transparent 24px, rgba(0,0,0,.05) 24px, rgba(0,0,0,.05) 25px);
}
.comp-char {
  position: absolute; bottom: 38px; cursor: pointer;
  width: 54px; height: 74px; transform: translateX(-50%);
  user-select: none;
  display: flex; align-items: flex-end; justify-content: center;
}
.comp-char:hover { filter: drop-shadow(0 0 5px rgba(124,95,201,.45)); }
.comp-char .comp-emoji { font-size: 48px; line-height: 1; animation: comp-bob 4s ease-in-out infinite; }
@keyframes comp-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.comp-bubble {
  position: absolute; bottom: calc(100% + 5px); left: 50%;
  transform: translateX(-50%);
  background: var(--surface); border: 2px solid var(--ink);
  padding: 4px 10px; font-family: var(--mono);
  font-size: 9px; font-weight: 700; letter-spacing: .03em;
  white-space: nowrap; box-shadow: 2px 2px 0 var(--ink);
  pointer-events: none; opacity: 0; transition: opacity .15s;
}
.comp-bubble::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent; border-top-color: var(--ink);
}
.comp-char:hover .comp-bubble { opacity: 1; }

.comp-stat-strip {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(58,42,63,.85); padding: 4px 10px;
  display: flex; gap: 14px; z-index: 2;
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
}
.comp-stat { color: rgba(255,248,241,.55); }
.comp-stat .v { color: var(--cream); }
.comp-stat .v.pink { color: #f0a4c8; }
.comp-stat .v.lime { color: #c8e892; }
.comp-stat .v.lilac { color: #c4b4f0; }

/* ═══════════════════════════════════════════════════════════════════
   COCKPIT MAIN CONTAINER
   ═══════════════════════════════════════════════════════════════════ */
.cockpit-main {
  width: min(1280px, calc(100% - 24px));
  margin: 0 auto;
  padding: 14px 0 60px;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .col-3, .col-4, .col-5 { grid-column: span 6; }
  .col-7, .col-8, .col-9 { grid-column: span 12; }
  .today-strip { grid-template-columns: 1fr; }
  .today-countdown { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .cockpit-grid > * { grid-column: span 12 !important; }
  .today-countdown { grid-template-columns: 1fr 1fr; }
  .hero-prompt { font-size: 22px; }
}
