/* ═══════════════════════════════════════════════════════
   TOKENS
═══════════════════════════════════════════════════════ */
:root {
  --azure:       #0078d4;
  --azure-h:     #106ebe;
  --sidebar-w:   56px;
  --sans:  'Segoe UI', 'Segoe UI Variable', system-ui, -apple-system, sans-serif;
  --mono:  'Cascadia Code', 'Consolas', 'Courier New', monospace;
  --radius: 4px;
  --trans:  0.18s ease;
}

/* phase colour data-attributes — avoids inline styles */
[data-phase-index="0"] { --phase-color: #0078d4; }
[data-phase-index="1"] { --phase-color: #d13438; }
[data-phase-index="2"] { --phase-color: #ca5010; }
[data-phase-index="3"] { --phase-color: #107c10; }
[data-phase-index="4"] { --phase-color: #5c2d91; }

/* ── DARK THEME ── */
[data-theme="dark"] {
  --bg:          #1b1b1b;
  --bg-2:        #222222;
  --bg-3:        #2c2c2c;
  --surface:     #272727;
  --surface-2:   #303030;
  --border:      #3a3a3a;
  --border-2:    #484848;
  --text:        #f3f3f3;
  --text-2:      #c0c0c0;
  --text-3:      #909090;
  --shadow:      rgba(0,0,0,0.45);
  --highlight:   rgba(0,120,212,0.12);
  --done-bg:     rgba(16,124,16,0.09);
  --sidebar-bg:  #141414;
  --sidebar-bdr: rgba(255,255,255,0.08);
  --header-bg:   #1e1e1e;
  --progress-bg: #383838;
  --scan-line:   rgba(0,0,0,0.06);
  --note-bg:     #1e2a38;
  --note-border: #0078d4;
  --tip-color:   #f4a460;
  --copy-hover:  rgba(0,120,212,0.2);
}

/* ── LIGHT THEME ── */
[data-theme="light"] {
  --bg:          #f3f2f1;
  --bg-2:        #ffffff;
  --bg-3:        #edebe9;
  --surface:     #ffffff;
  --surface-2:   #faf9f8;
  --border:      #d2d0ce;
  --border-2:    #b3b0ad;
  --text:        #201f1e;
  --text-2:      #484644;
  --text-3:      #605e5c;
  --shadow:      rgba(0,0,0,0.08);
  --highlight:   rgba(0,120,212,0.07);
  --done-bg:     rgba(16,124,16,0.06);
  --sidebar-bg:  #0078d4;
  --sidebar-bdr: rgba(0,0,0,0.1);
  --header-bg:   #0078d4;
  --progress-bg: #e1dfdd;
  --scan-line:   transparent;
  --note-bg:     #f0f6ff;
  --note-border: #0078d4;
  --tip-color:   #a4262c;
  --copy-hover:  rgba(0,120,212,0.1);
}

/* ═══════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  transition: background var(--trans), color var(--trans);
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    var(--scan-line) 2px, var(--scan-line) 4px
  );
  pointer-events: none;
  z-index: 999;
}

:focus          { outline: none; }
:focus-visible  {
  outline: 2px solid var(--azure);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* ═══════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-bdr);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0 20px;
  gap: 6px;
  z-index: 200;
  transition: background var(--trans), border-color var(--trans);
}

/* brand shield */
.sidebar-brand {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-bottom: 4px;
}
.sidebar-brand svg { width: 20px; height: 20px; fill: #fff; }

.sidebar-divider {
  width: 32px;
  height: 1px;
  background: rgba(255,255,255,0.12);
  margin: 6px 0;
  flex-shrink: 0;
}

/* theme toggle — bold, highly visible icon button */
.sidebar-theme-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  transition: background var(--trans), border-color var(--trans),
              color var(--trans), box-shadow var(--trans), transform var(--trans);
}

.sidebar-theme-btn:hover {
  background: rgba(255,255,255,0.32);
  border-color: rgba(255,255,255,0.55);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.sidebar-theme-btn:active {
  background: rgba(255,255,255,0.42);
  transform: translateY(0);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.25);
}

.sidebar-theme-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.theme-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

/* show the right icon for the current theme — no JS needed */
[data-theme="dark"]  .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: none; }

.sidebar-theme-btn:hover .theme-icon {
  transform: rotate(20deg);
}

/* tooltip on hover */
.sidebar-theme-btn::after {
  content: attr(title);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-3);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 300;
}
.sidebar-theme-btn:hover::after { opacity: 1; }

/* ═══════════════════════════════════════════════════════
   PAGE CONTENT  (everything to the right of the sidebar)
═══════════════════════════════════════════════════════ */
.page-content {
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* ═══════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════ */
header {
  background: var(--header-bg);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background var(--trans);
}

.hdr-title { font-size: 0.95rem; font-weight: 600; color: #fff; letter-spacing: 0.01em; }
.hdr-sub   { font-size: 0.75rem; color: rgba(255,255,255,0.55); margin-left: 2px; }
.hdr-spacer { flex: 1; }

/* clock */
.clock-wrap   { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.clock-times  {
  display: flex; align-items: center;
  font-family: var(--mono); font-size: 0.9rem; font-weight: 600;
  color: rgba(255,255,255,0.9); letter-spacing: 0.05em; line-height: 1;
}
.clock-divider { color: rgba(255,255,255,0.25); margin: 0 7px; font-weight: 300; }
.clock-labels  {
  display: flex; justify-content: space-between; width: 100%;
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.38); line-height: 1; padding: 0 1px;
}

/* ═══════════════════════════════════════════════════════
   PROGRESS BAR
═══════════════════════════════════════════════════════ */
.progress-wrap {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  display: flex; align-items: center; gap: 12px;
  transition: background var(--trans);
}
.progress-label {
  font-size: 0.72rem; font-weight: 600; color: var(--text-2);
  letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
}
.progress-bg {
  flex: 1; height: 4px; background: var(--progress-bg);
  border-radius: 2px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%;
  background: var(--azure); border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}
.progress-pct   { font-family: var(--mono); font-size: 0.72rem; color: var(--azure); min-width: 34px; text-align: right; font-weight: 600; }
.progress-stats { font-size: 0.72rem; color: var(--text-3); white-space: nowrap; }
.shift-timer    { font-family: var(--mono); font-size: 0.72rem; color: var(--text-3); white-space: nowrap; border-left: 1px solid var(--border); padding-left: 12px; }

/* ═══════════════════════════════════════════════════════
   SEARCH
═══════════════════════════════════════════════════════ */
.search-wrap  { max-width: 1040px; margin: 16px auto 0; padding: 0 24px; }
.search-inner { position: relative; display: flex; align-items: center; }
.search-icon  { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.search-input {
  width: 100%; padding: 8px 36px 8px 34px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--sans); font-size: 0.85rem;
  transition: border-color var(--trans), background var(--trans);
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus-visible { outline: 2px solid var(--azure); outline-offset: 0; border-color: var(--azure); }
.search-clear {
  position: absolute; right: 8px;
  background: none; border: none; cursor: pointer;
  color: var(--text-3); font-size: 1rem; padding: 4px; display: none;
}
.search-clear.visible { display: block; }
.search-count { font-size: 0.72rem; color: var(--text-3); margin-top: 5px; padding-left: 2px; min-height: 1.2em; }

/* ═══════════════════════════════════════════════════════
   TOOLBAR
═══════════════════════════════════════════════════════ */
.toolbar {
  max-width: 1040px; margin: 10px auto 0; padding: 0 24px;
  display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
}
.btn {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
  padding: 6px 16px; border-radius: var(--radius);
  cursor: pointer; transition: all var(--trans); white-space: nowrap;
}
.btn-ghost  { background: var(--surface); color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-2); color: var(--text); }
.btn-accent { background: var(--azure); color: #fff; border: 1px solid var(--azure); }
.btn-accent:hover { background: var(--azure-h); border-color: var(--azure-h); }

/* ═══════════════════════════════════════════════════════
   MAIN
═══════════════════════════════════════════════════════ */
main { max-width: 1040px; margin: 12px auto 0; padding: 0 24px; }

.no-results   { text-align: center; padding: 40px 24px; color: var(--text-3); font-size: 0.9rem; }
.app-message  { max-width: 1040px; margin: 40px auto; padding: 32px 24px; text-align: center; color: var(--text-2); }
.app-message h2 { font-size: 1rem; margin-bottom: 8px; }
.app-message p  { font-size: 0.85rem; margin-top: 6px; }

/* ═══════════════════════════════════════════════════════
   PHASE TABS  (top of main, page-style nav)
═══════════════════════════════════════════════════════ */
.phase-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  padding-bottom: 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: thin;
}

.phase-tab {
  flex: 1;
  min-width: 130px;
  padding: 10px 14px 11px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  text-align: left;
  color: var(--text-2);
  font-family: var(--sans);
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  transition: background var(--trans), color var(--trans), border-color var(--trans);
}

.phase-tab:hover {
  background: var(--highlight);
  color: var(--text);
}

.phase-tab.active {
  color: var(--text);
  background: var(--surface);
  border-bottom-color: var(--azure);
}

.phase-tab.active .phase-tab-num { color: var(--azure); }

.phase-tab-num {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-3);
  text-transform: uppercase;
  line-height: 1;
}

.phase-tab-name {
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.phase-tab-meta {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-3);
  line-height: 1;
  margin-top: 1px;
}

.phase-tab.complete .phase-tab-meta { color: #107c10; font-weight: 600; }

.phase-tab.complete::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 14px;
  height: 14px;
  background: #107c10;
  color: #fff;
  border-radius: 50%;
  font-size: 0.55rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.phase-tab-search-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--azure);
  color: #fff;
  border-radius: 8px;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.phase-tab.complete.has-search .phase-tab-search-badge { right: 26px; }

.phase-tab:focus-visible {
  outline: 2px solid var(--azure);
  outline-offset: -2px;
}

/* ═══════════════════════════════════════════════════════
   PHASE NAV  (prev/next at bottom)
═══════════════════════════════════════════════════════ */
.phase-nav {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  margin-top: 24px;
  gap: 12px;
}

.nav-btn {
  flex: 1;
  max-width: 320px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--trans), background var(--trans), transform var(--trans);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-family: var(--sans);
  text-align: left;
  min-width: 0;
}

.nav-btn:hover {
  border-color: var(--azure);
  background: var(--highlight);
}

.nav-btn:active { transform: translateY(1px); }

.nav-btn-next {
  justify-content: flex-end;
  text-align: right;
  margin-left: auto;
}

.nav-btn-arrow {
  font-size: 1rem;
  color: var(--azure);
  flex-shrink: 0;
  font-weight: 700;
}

.nav-btn-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-btn-label {
  font-size: 0.62rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.nav-btn-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-btn-placeholder {
  flex: 1;
  max-width: 320px;
}

/* ═══════════════════════════════════════════════════════
   PHASE CARD
═══════════════════════════════════════════════════════ */
.phase {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; margin-bottom: 10px; overflow: hidden;
  box-shadow: 0 1px 3px var(--shadow);
  transition: background var(--trans), border-color var(--trans);
  animation: fadeUp 0.35s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.phase:nth-child(1) { animation-delay: 0.04s; }
.phase:nth-child(2) { animation-delay: 0.09s; }
.phase:nth-child(3) { animation-delay: 0.14s; }
.phase:nth-child(4) { animation-delay: 0.19s; }
.phase:nth-child(5) { animation-delay: 0.24s; }

.phase-hdr {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
  user-select: none;
}
.phase-stripe   { width: 4px; height: 28px; border-radius: 2px; flex-shrink: 0; background: var(--phase-color); }
.phase-title    { font-size: 0.95rem; font-weight: 600; color: var(--text); flex: 1; margin: 0; }
.phase-meta     { display: flex; align-items: center; gap: 8px; }
.phase-count    { font-size: 0.75rem; color: var(--text-3); }
.phase-badge    { width: 18px; height: 18px; border-radius: 50%; background: #107c10; color: #fff; font-size: 0.65rem; font-weight: 700; display: none; align-items: center; justify-content: center; }
.phase.all-done .phase-badge { display: flex; }
.phase.all-done .phase-count { color: #107c10; font-weight: 600; }
.phase.hidden   { display: none; }

/* ═══════════════════════════════════════════════════════
   TASK ROW
═══════════════════════════════════════════════════════ */
.task { border-bottom: 1px solid var(--border); transition: background var(--trans); }
.task:last-child { border-bottom: none; }
.task.hidden { display: none; }

.task-main {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; cursor: pointer; transition: background var(--trans);
}
.task-main:hover { background: var(--highlight); }
.task.done .task-main { background: var(--done-bg); }

.task-cb {
  width: 20px; height: 20px; border: 1.5px solid var(--border-2); border-radius: 3px;
  flex-shrink: 0; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); transition: all var(--trans);
}
.task.done .task-cb { background: var(--azure); border-color: var(--azure); }
.task-cb svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 2.2; fill: none; opacity: 0; transition: opacity var(--trans); }
.task.done .task-cb svg { opacity: 1; }

.task-body  { flex: 1; min-width: 0; }
.task-top   { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.task-title { font-size: 0.85rem; font-weight: 600; color: var(--text); flex: 1; min-width: 0; transition: color var(--trans); }
.task.done .task-title { color: var(--text-3); text-decoration: line-through; }
.task-desc  { font-size: 0.78rem; color: var(--text-2); margin-top: 3px; line-height: 1.5; }
.task.done .task-desc { color: var(--text-3); }

/* tag chips */
.task-tag   { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; padding: 2px 8px; border-radius: 2px; flex-shrink: 0; white-space: nowrap; }
.tag-sentinel { background: rgba(209,52,56,0.12);  color: #c50f1f; }
.tag-azure    { background: rgba(0,120,212,0.12);  color: #0065b8; }
.tag-review   { background: rgba(202,80,16,0.12);  color: #a33b00; }
.tag-action   { background: rgba(16,124,16,0.12);  color: #0e700e; }
.tag-handover { background: rgba(92,45,145,0.12);  color: #4e2b87; }
[data-theme="dark"] .tag-sentinel { color: #ff7b7e; background: rgba(209,52,56,0.18); }
[data-theme="dark"] .tag-azure    { color: #6bb5f0; background: rgba(0,120,212,0.18); }
[data-theme="dark"] .tag-review   { color: #f4a460; background: rgba(202,80,16,0.18); }
[data-theme="dark"] .tag-action   { color: #3ddc84; background: rgba(16,124,16,0.18); }
[data-theme="dark"] .tag-handover { color: #b39ddb; background: rgba(92,45,145,0.18); }

/* notes */
.task-notes-wrap { padding: 0 16px 10px 44px; }
.notes-input {
  width: 100%; min-height: 36px; padding: 6px 10px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--sans); font-size: 0.78rem; resize: vertical;
  transition: border-color var(--trans), background var(--trans);
}
.notes-input::placeholder { color: var(--text-3); font-style: italic; }
.notes-input:focus-visible { outline: 2px solid var(--azure); outline-offset: 0; border-color: var(--azure); }

/* expand button */
.expand-btn {
  font-size: 0.75rem; color: var(--azure); font-weight: 600;
  padding: 0 16px 8px 44px; cursor: pointer; display: inline-block;
  user-select: none; background: none; border: none; transition: color var(--trans);
}
.expand-btn:hover { color: var(--azure-h); text-decoration: underline; }

/* ═══════════════════════════════════════════════════════
   STEPS PANEL
═══════════════════════════════════════════════════════ */
.steps-panel { display: none; background: var(--bg-2); border-top: 1px solid var(--border); padding: 16px 20px 16px 44px; transition: background var(--trans); }
.steps-panel.open { display: block; }
.steps-heading { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.step-list   { list-style: none; display: flex; flex-direction: column; }
.step-item   { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.step-item:last-child { border-bottom: none; }
.step-num    { width: 22px; height: 22px; border-radius: 50%; background: var(--azure); color: #fff; font-size: 0.67rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.step-content { flex: 1; min-width: 0; }
.step-text   { font-size: 0.8rem; color: var(--text); line-height: 1.55; }

.step-note-wrap { position: relative; margin-top: 6px; }
.step-note {
  font-family: var(--mono); font-size: 0.71rem; color: var(--text-2);
  background: var(--note-bg); border-left: 2px solid var(--note-border);
  padding: 6px 36px 6px 10px; border-radius: 0 3px 3px 0;
  white-space: pre-wrap; word-break: break-all; line-height: 1.6; display: block;
}
.copy-btn {
  position: absolute; top: 5px; right: 5px;
  background: none; border: 1px solid transparent; border-radius: 3px;
  cursor: pointer; padding: 3px 5px; color: var(--text-3);
  font-size: 0.7rem; line-height: 1; transition: all var(--trans);
}
.copy-btn:hover { background: var(--copy-hover); border-color: var(--border); color: var(--text-2); }
.copy-btn.copied { color: #107c10; border-color: #107c10; }
[data-theme="dark"] .copy-btn.copied { color: #3ddc84; border-color: #3ddc84; }

.step-tip { font-size: 0.75rem; color: var(--tip-color); margin-top: 5px; display: flex; gap: 6px; align-items: flex-start; line-height: 1.45; }
.step-tip::before { content: "⚠"; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════ */
footer {
  max-width: 1040px; margin: 36px auto 0; padding: 16px 24px 0;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
}
footer p { font-size: 0.72rem; color: var(--text-3); }
.footer-right { display: flex; align-items: center; gap: 10px; }
.version-badge { font-family: var(--mono); font-size: 0.65rem; color: var(--text-3); border: 1px solid var(--border); border-radius: 2px; padding: 2px 6px; }
.status-live { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; color: var(--text-3); }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: #107c10; animation: blink 2s ease infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

/* ═══════════════════════════════════════════════════════
   PRINT
═══════════════════════════════════════════════════════ */
@media print {
  :root, [data-theme="dark"], [data-theme="light"] {
    --bg: #fff; --bg-2: #fff; --bg-3: #f5f5f5;
    --surface: #fff; --surface-2: #f8f8f8; --border: #ccc;
    --text: #000; --text-2: #333; --text-3: #555;
    --note-bg: #f5f5f5; --note-border: #0078d4; --shadow: none;
  }
  .sidebar         { display: none; }
  .page-content    { margin-left: 0; }
  body::before     { display: none; }
  header           { position: static; background: #0078d4 !important; border-bottom: 2px solid #0078d4; }
  .progress-wrap,
  .toolbar,
  .search-wrap,
  .phase-tabs,
  .phase-nav,
  .expand-btn,
  .copy-btn        { display: none; }
  .steps-panel     { display: block !important; }
  .phase           { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; margin-bottom: 16px; }
  .phase-hdr       { background: #f0f0f0 !important; }
  .task-cb         { border: 1.5px solid #333 !important; background: #fff !important; print-color-adjust: exact; }
  .task.done .task-cb { background: #0078d4 !important; print-color-adjust: exact; }
  footer           { border-top: 1px solid #ccc; }
}
