/* ============================================
   LIFE OS v2 — Design System
   "Mission control, not sci-fi cosplay"
   ============================================ */

/* ---- Design Tokens ---- */
:root {
  /* Base palette — near-black, restrained */
  --bg:          #08080c;
  --bg-elev-1:   #0e0e14;
  --bg-elev-2:   #14141c;
  --bg-elev-3:   #1a1a24;
  --bg-hover:    #1e1e2a;

  /* Borders — subtle elevation cues */
  --border:       #1c1c26;
  --border-light: #2a2a36;
  --border-focus: #3a3a48;

  /* Text */
  --text:         #e8e8ec;
  --text-2:       #a0a0ac;
  --text-3:       #5a5a68;
  --text-dim:     #3a3a48;

  /* Accent — ONE electric color. Acid green. */
  --accent:       #00e5a0;
  --accent-glow:  rgba(0,229,160,0.15);
  --accent-dim:   rgba(0,229,160,0.08);
  --accent-text:  #00e5a0;

  /* Semantic — bucket dots and status only */
  --earn:    #5b8def;
  --build:   #a78bfa;
  --body:    #22c55e;
  --home:    #f59e0b;
  --grow:    #ec4899;

  --danger:  #ef4444;
  --warn:    #f59e0b;
  --ok:      #00e5a0;

  /* Typography */
  --font-sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', 'JetBrains Mono', 'Fira Code', ui-monospace, 'Cousine', monospace;

  /* Radii */
  --r-sm: 4px;
  --r:    8px;
  --r-lg: 12px;

  /* Motion */
  --ease:     cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --snap:     cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 100ms;
  --dur:      200ms;
  --dur-slow: 400ms;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  font-feature-settings: 'cv11', 'ss03';
}

/* Tabular numerals everywhere numbers appear */
.mono, .num, .tabular { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Scrollbar — minimal */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ---- Selection ---- */
::selection { background: var(--accent-glow); color: var(--accent-text); }

/* ---- View Transitions ---- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: var(--dur);
  animation-timing-function: var(--ease);
}

/* ===========================================
   LAYOUT
   =========================================== */

/* Top nav — desktop only */
.nav-top {
  display: none;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.8rem;
  background: rgba(8,8,12,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-top .brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--accent-text);
  text-decoration: none;
  letter-spacing: -0.02em;
  margin-right: 0.8rem;
}
.nav-top .links { display: flex; gap: 0.15rem; flex: 1; }
.nav-top .links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.55rem;
  border-radius: var(--r-sm);
  transition: all var(--dur-fast) var(--ease);
}
.nav-top .links a:hover { color: var(--text); background: var(--bg-hover); }
.nav-top .links a.active { color: var(--accent-text); background: var(--accent-dim); }

/* Bottom nav — mobile only, frosted */
.nav-bottom {
  display: flex;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(8,8,12,0.96);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-bottom a {
  flex: 1;
  text-align: center;
  padding: 0.45rem 0;
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-3);
  text-decoration: none;
  transition: color var(--dur-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}
.nav-bottom a .ic { font-size: 1.05rem; line-height: 1; }
.nav-bottom a.active { color: var(--accent-text); }
.nav-bottom a:active { transform: scale(0.95); transition: transform var(--dur-fast); }

@media (min-width: 700px) {
  .nav-top { display: flex; }
  .nav-bottom { display: none; }
}

/* Container */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0.5rem 0.5rem 4rem;
}
@media (min-width: 700px) {
  .container { padding: 0.8rem 1rem 1.5rem; }
}

/* ===========================================
   PULSE HEADER — signature dashboard element
   =========================================== */
.pulse-header {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-2);
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}
.pulse-header::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 0.85em;
  background: var(--accent);
  margin-left: 2px;
  animation: cursor-blink 1s steps(1) infinite;
  vertical-align: text-bottom;
  border-radius: 1px;
}
.pulse-header .pulse-sep { color: var(--text-dim); margin: 0 0.3rem; }
.pulse-header .pulse-key { color: var(--text-3); }
.pulse-header .pulse-val { color: var(--text); }
.pulse-header .pulse-accent { color: var(--accent-text); font-weight: 600; }
.pulse-header.typing::after { opacity: 0; }
@keyframes cursor-blink { 50% { opacity: 0; } }

/* ===========================================
   FOCUS BANNER
   =========================================== */
.focus-banner {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--r);
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.focus-banner .focus-content { flex: 1; min-width: 0; }
.focus-banner .focus-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  font-weight: 600;
  margin-bottom: 0.1rem;
}
.focus-edit {
  font-size: 0.92rem;
  font-weight: 600;
  min-height: 1.2rem;
  outline: none;
  border-radius: var(--r-sm);
  padding: 0.1rem 0;
}
.focus-edit:focus { background: var(--bg-elev-3); padding: 0.1rem 0.3rem; }
.focus-edit:empty::before { content: 'Set focus...'; color: var(--text-3); font-weight: 400; }
.focus-meta {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-3);
  white-space: nowrap;
}
.focus-meta .week-num { font-weight: 700; color: var(--text); font-size: 0.82rem; }
.focus-meta .days-left { color: var(--warn); }

/* ===========================================
   CARDS — depth via borders, not blur
   =========================================== */
.card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0.6rem;
  margin-bottom: 0.4rem;
  transition: border-color var(--dur-fast) var(--ease);
}
.card:hover { border-color: var(--border-light); }
.card-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

/* ===========================================
   OUTCOME SLOTS
   =========================================== */
.outcome-slots { display: flex; flex-direction: column; gap: 0.25rem; }
.outcome-slot {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.5rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: all var(--dur-fast) var(--ease);
}
.outcome-slot.active { border-left: 2px solid var(--accent); }
.outcome-slot.done { opacity: 0.4; }
.outcome-slot.done .outcome-text { text-decoration: line-through; }
.slot-num {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--text-3);
  flex-shrink: 0;
}
.outcome-slot.done .slot-num {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.outcome-slot.active .slot-num { border-color: var(--accent); color: var(--accent-text); }
.outcome-text { flex: 1; font-size: 0.82rem; }
.outcome-empty { color: var(--text-3); font-style: italic; font-size: 0.78rem; }

/* ===========================================
   TASK ITEMS
   =========================================== */
.task-list { list-style: none; }
.task-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.25rem;
  border-radius: var(--r-sm);
  transition: background var(--dur-fast);
}
.task-item:hover { background: var(--bg-hover); }
.task-item.completed .task-title { text-decoration: line-through; color: var(--text-3); }
.task-title { flex: 1; font-size: 0.82rem; }
.task-actions { display: flex; gap: 0; opacity: 0; transition: opacity var(--dur-fast); }
.task-item:hover .task-actions { opacity: 1; }
@media (max-width: 700px) { .task-actions { opacity: 1; } }

/* Bucket dots — semantic color only */
.bucket-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.bucket-tag {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.08rem 0.3rem;
  border-radius: 3px;
  white-space: nowrap;
}
.dot-earn    { background: var(--earn); }
.dot-build   { background: var(--build); }
.dot-body    { background: var(--body); }
.dot-home    { background: var(--home); }
.dot-grow    { background: var(--grow); }
.tag-earn    { background: rgba(91,141,239,0.1); color: var(--earn); }
.tag-build   { background: rgba(167,139,250,0.1); color: var(--build); }
.tag-body    { background: rgba(34,197,94,0.1); color: var(--body); }
.tag-home    { background: rgba(245,158,11,0.1); color: var(--home); }
.tag-grow    { background: rgba(236,72,153,0.1); color: var(--grow); }

/* ===========================================
   HABIT MINI-GRID (dashboard)
   =========================================== */
.habit-mini { display: grid; grid-template-columns: 60px repeat(7, 1fr); gap: 1px; font-size: 0.68rem; }
.hm-label {
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.7rem;
  padding: 0.2rem 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hm-day-head {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  color: var(--text-3);
  font-weight: 600;
  text-transform: uppercase;
  padding-bottom: 0.1rem;
}
.hm-day-head.today { color: var(--accent-text); }
.hm-cell {
  text-align: center;
  padding: 0.18rem 0;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: all var(--dur-fast);
  user-select: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
.hm-cell:hover { background: var(--bg-hover); }
.hm-cell.ticked { color: var(--accent-text); font-weight: 700; }
.hm-cell.ticked:active { transform: scale(0.8); }
.hm-cell.future { opacity: 0.2; pointer-events: none; }
.hm-cell.today-cell { background: var(--accent-dim); }

/* ===========================================
   HABIT TABLE (full page)
   =========================================== */
.habit-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.habit-table th {
  padding: 0.3rem 0.2rem;
  text-align: center;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.55rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.habit-table th:first-child { text-align: left; }
.habit-table th.today { color: var(--accent-text); }
.habit-table td {
  padding: 0.35rem 0.2rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.habit-table td.habit-name { text-align: left; font-weight: 500; font-size: 0.8rem; }
.tick-cell { cursor: pointer; border-radius: 3px; transition: all var(--dur-fast); font-family: var(--font-mono); }
.tick-cell:hover { background: var(--bg-hover); }
.tick-cell.ticked { color: var(--accent-text); font-weight: 700; }
.tick-cell:active { transform: scale(0.85); }
.streak { font-family: var(--font-mono); font-size: 0.68rem; }
.streak-best { font-size: 0.58rem; color: var(--text-3); }
.streak-current { color: var(--warn); font-weight: 600; }

/* ===========================================
   BUCKET PULSE (dashboard)
   =========================================== */
.bucket-pulse { display: flex; gap: 0.3rem; }
.pulse-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.1rem; }
.pulse-bar .bar-fill {
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}
.pulse-bar .bar-fill.s5 { background: var(--accent); }
.pulse-bar .bar-fill.s4 { background: rgba(0,229,160,0.7); }
.pulse-bar .bar-fill.s3 { background: var(--warn); }
.pulse-bar .bar-fill.s2 { background: rgba(239,68,68,0.5); }
.pulse-bar .bar-fill.s1 { background: var(--danger); }
.pulse-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-3);
  font-weight: 600;
}
.pulse-score { font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700; color: var(--text-2); }

/* ===========================================
   FORMS
   =========================================== */
.input, input[type="text"], input[type="password"], input[type="date"], input[type="number"], select, textarea {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 0.4rem 0.55rem;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  width: 100%;
  outline: none;
  transition: border-color var(--dur-fast);
}
.input:focus, input:focus, textarea:focus, select:focus { border-color: var(--accent); }
.textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
.textarea-sm { min-height: 45px; resize: vertical; }

/* Quick add — compact one-liner */
.quick-add { display: flex; gap: 0.25rem; margin-bottom: 0.3rem; }
.quick-add select { width: auto; padding: 0.3rem 0.35rem; font-size: 0.75rem; }
.quick-add input { flex: 1; padding: 0.3rem 0.5rem; font-size: 0.82rem; }

/* ===========================================
   BUTTONS
   =========================================== */
.btn {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.38rem 0.7rem;
  border-radius: var(--r-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-sans);
}
.btn:hover { background: var(--bg-hover); border-color: var(--border-light); }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 700;
}
.btn-primary:hover { background: #00f5b0; border-color: #00f5b0; }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-sm { padding: 0.2rem 0.45rem; font-size: 0.75rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.15rem 0.25rem;
  border-radius: var(--r-sm);
  transition: all var(--dur-fast);
  line-height: 1;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text); }
.btn-icon:active { transform: scale(0.9); }
.btn-icon.btn-danger:hover { color: var(--danger); }

/* ===========================================
   BADGES & ALERTS
   =========================================== */
.badge {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.06rem 0.3rem;
  border-radius: 3px;
  background: var(--bg-hover);
  color: var(--text-2);
}
.badge-cap { background: rgba(239,68,68,0.1); color: var(--danger); }
.badge-ok { background: var(--accent-dim); color: var(--accent-text); }
.badge-warn { background: rgba(245,158,11,0.1); color: var(--warn); }

.alert {
  padding: 0.45rem 0.6rem;
  border-radius: var(--r-sm);
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
}
.alert-error { background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.2); color: #fca5a5; }
.alert-success { background: var(--accent-dim); border: 1px solid rgba(0,229,160,0.2); color: var(--accent-text); }
.alert-info { background: var(--accent-dim); border: 1px solid rgba(0,229,160,0.15); color: var(--accent-text); }

/* ===========================================
   NAG BANNER
   =========================================== */
.nag-banner {
  background: rgba(245,158,11,0.06);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--r);
  padding: 0.45rem 0.6rem;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
}
.nag-banner a { color: var(--warn); font-weight: 600; text-decoration: none; }
.nag-banner a:hover { text-decoration: underline; }

/* ===========================================
   SCORE PILLS
   =========================================== */
.score-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.3rem; margin-bottom: 0.4rem; }
.score-grid label { font-size: 0.68rem; color: var(--text-2); text-align: center; font-weight: 500; }
.score-grid input { text-align: center; }
.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  padding: 0.06rem 0.35rem;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
}
.score-pill.high { background: var(--accent-dim); color: var(--accent-text); }
.score-pill.mid { background: rgba(245,158,11,0.1); color: var(--warn); }
.score-pill.low { background: rgba(239,68,68,0.1); color: var(--danger); }

/* ===========================================
   STEPPER (review page)
   =========================================== */
.stepper-progress { display: flex; gap: 2px; margin-bottom: 0.5rem; }
.stepper-progress .step-dot {
  flex: 1;
  height: 2px;
  border-radius: 1px;
  background: var(--border);
  transition: background var(--dur);
}
.stepper-progress .step-dot.done { background: var(--accent); }
.stepper-progress .step-dot.current { background: var(--accent); }
.step-nav { display: flex; gap: 0.35rem; justify-content: space-between; margin-top: 0.5rem; }
.step-section { display: none; }
.step-section.active { display: block; animation: fadeIn var(--dur) var(--ease); }
.step-label { font-size: 0.72rem; color: var(--text-2); margin-bottom: 0.25rem; font-weight: 600; }
.review-item { border-bottom: 1px solid var(--border); padding: 0.4rem 0; }
.review-item:last-child { border-bottom: none; }
.review-item summary { cursor: pointer; font-weight: 600; font-size: 0.82rem; }
.review-detail { padding: 0.35rem 0; font-size: 0.78rem; color: var(--text-2); line-height: 1.5; }
.review-detail p { margin-bottom: 0.15rem; }

/* ===========================================
   DECISIONS
   =========================================== */
.analysis-output {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  padding: 0.6rem;
  border-radius: var(--r-sm);
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  line-height: 1.6;
}
.recommendation-box {
  background: var(--accent-dim);
  border: 1px solid rgba(0,229,160,0.2);
  border-radius: var(--r-sm);
  padding: 0.45rem 0.6rem;
  margin-bottom: 0.4rem;
}
.recommendation-box strong { color: var(--accent-text); }
.markdown { font-size: 0.78rem; line-height: 1.55; }

/* ===========================================
   TRIAGE
   =========================================== */
.triage-list { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.4rem; }
.triage-item {
  display: flex; align-items: center; gap: 0.35rem;
  padding: 0.4rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  flex-wrap: wrap;
}
.triage-item label { display: flex; align-items: center; gap: 0.35rem; flex: 1; cursor: pointer; font-size: 0.8rem; }

/* ===========================================
   SOMEDAY
   =========================================== */
.someday-meta { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-3); }
.rotting { color: var(--danger); font-weight: 600; }
.rotting-recent { color: var(--warn); }

/* ===========================================
   EMPTY STATES
   =========================================== */
.empty-action { padding: 0.7rem 0.5rem; text-align: center; }
.empty-action p { color: var(--text-3); font-size: 0.8rem; margin-bottom: 0.35rem; }

/* ===========================================
   LOGIN
   =========================================== */
.login-page {
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  min-height: 100vh; padding: 2rem;
}
.login-logo { font-size: 2rem; text-align: center; margin-bottom: 0.3rem; }
.login-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  width: 100%;
  max-width: 320px;
}
.login-card h1 { font-size: 1.1rem; font-weight: 700; text-align: center; margin-bottom: 0.25rem; }
.login-subtitle { text-align: center; color: var(--text-3); font-size: 0.75rem; margin-bottom: 1rem; }
.login-card form { display: flex; flex-direction: column; gap: 0.5rem; }

/* ===========================================
   KANBAN BOARD
   =========================================== */
.board-strip {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0.3rem 0;
  margin-bottom: 0.4rem;
  scrollbar-width: thin;
}
.strip-item {
  flex-shrink: 0;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.3rem 0.5rem;
  font-size: 0.68rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 100px;
}
.strip-date {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-3);
  text-transform: uppercase;
}
.strip-title { font-size: 0.72rem; color: var(--text); }
.strip-item.overdue { border-color: rgba(239,68,68,0.3); }
.strip-item.today { border-color: var(--accent); background: var(--accent-dim); }

.board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.3rem;
  min-height: 60vh;
}
@media (max-width: 700px) {
  .board {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.4rem;
    padding-bottom: 0.3rem;
  }
  .board-col {
    min-width: 85vw;
    scroll-snap-align: start;
  }
}

.board-col {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  min-height: 100px;
  transition: border-color var(--dur) var(--ease);
}
.board-col.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.board-col.full .col-head { color: var(--danger); }
.col-head {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  padding: 0.45rem 0.5rem 0.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.col-head .col-count {
  font-family: var(--font-mono);
  background: var(--bg-elev-3);
  padding: 0.05rem 0.3rem;
  border-radius: 8px;
  font-size: 0.55rem;
}
.col-head .col-count.full { background: rgba(239,68,68,0.1); color: var(--danger); }
.col-cards {
  flex: 1;
  padding: 0 0.3rem 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 40px;
}

/* Kanban card */
.kanban-card {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.4rem 0.45rem;
  cursor: grab;
  transition: all var(--dur-fast) var(--ease);
  position: relative;
  touch-action: none;
}
.kanban-card:hover { border-color: var(--border-light); background: var(--bg-hover); }
.kanban-card.dragging {
  opacity: 0.4;
  cursor: grabbing;
}
.kanban-card:active { cursor: grabbing; }
.kanban-card .card-bucket-dot {
  position: absolute;
  top: 0.4rem;
  left: 0;
  width: 3px;
  height: calc(100% - 0.8rem);
  border-radius: 0 2px 2px 0;
}
.kanban-card .card-text {
  font-size: 0.78rem;
  padding-left: 0.35rem;
  line-height: 1.35;
}
.kanban-card .card-meta {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  margin-top: 0.2rem;
  padding-left: 0.35rem;
}
.kanban-card .card-age {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-3);
}
.kanban-card.rotting { opacity: 0.5; filter: saturate(0.3); }
.kanban-card.rotting .card-age { color: var(--danger); }
.kanban-card .card-due {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--warn);
}
.kanban-card .card-due.overdue { color: var(--danger); }

/* Card detail modal */
.card-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn var(--dur) var(--ease);
}
@media (min-width: 700px) { .card-detail-overlay { align-items: center; } }
.card-detail {
  background: var(--bg-elev-1);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 0.8rem;
}
@media (min-width: 700px) { .card-detail { border-radius: var(--r-lg); } }
.card-detail-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  font-size: 0.78rem;
}
.checklist-item.done { text-decoration: line-through; color: var(--text-3); }

/* ===========================================
   WEEK COMPLETE MOMENT
   =========================================== */
.week-complete-flash {
  position: fixed;
  inset: 0;
  background: var(--accent);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  animation: weekFlash 1.2s var(--ease) forwards;
}
@keyframes weekFlash {
  0% { opacity: 0; }
  15% { opacity: 0.3; }
  40% { opacity: 0.15; }
  100% { opacity: 0; }
}
.week-complete-stamp {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  animation: weekStamp 1.5s var(--ease) forwards;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-text);
  text-transform: uppercase;
}
@keyframes weekStamp {
  0% { opacity: 0; transform: scale(0.5); }
  20% { opacity: 1; transform: scale(1.1); }
  35% { transform: scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: scale(1); }
}

/* ===========================================
   TOAST
   =========================================== */
.toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elev-3);
  border: 1px solid var(--border-light);
  color: var(--text);
  padding: 0.4rem 0.8rem;
  border-radius: var(--r);
  font-size: 0.78rem;
  z-index: 500;
  animation: toastIn var(--dur) var(--ease), toastOut var(--dur) var(--ease) 2.5s forwards;
  white-space: nowrap;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-50%) translateY(10px); } }

/* ===========================================
   MISC / UTILS
   =========================================== */
.muted { color: var(--text-3); font-size: 0.75rem; }
.mono-text { font-family: var(--font-mono); }
.inline-form { display: flex; gap: 0.35rem; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 0.5rem; }
.field-label { font-family: var(--font-mono); font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); font-weight: 600; }
.form-row { margin-bottom: 0.4rem; }
.form-row label { display: block; font-size: 0.75rem; color: var(--text-2); margin-bottom: 0.15rem; font-weight: 500; }
.error-page { text-align: center; padding: 3rem 1rem; }
.error-page h1 { font-size: 1.1rem; margin-bottom: 0.3rem; }

/* ===========================================
   ANIMATIONS
   =========================================== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: translateY(0); } }
@keyframes countUp { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.count-up { animation: countUp var(--dur) var(--ease); }

/* ===========================================
   REDUCED MOTION
   =========================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    view-transition-name: none !important;
  }
  .pulse-header::after { animation: none; }
}
