/*
=======================================================================
   UNIFIED STYLE SHEET
   Serves: index.html (dashboard) + outliner.html
=======================================================================
*/

/* ── RESET ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── TOKENS ── */
:root {
  --bg: #F7F6F3;
  --surface: #FFFFFF;
  --border: #E2DFD8;
  --border-light: #EDE9E3;
  --text: #1A1916;
  --text-2: #6B6860;
  --text-3: #9C9A95;
  --accent: #2C5F8A;
  --accent-light: #EBF2F8;
  --orange: #C4622D;
  --orange-light: #FAEEE7;
  --green: #2A7A52;
  --green-light: #E8F4EE;
  --amber: #B07D2A;
  --amber-light: #FBF3E3;
  --purple: #5B4C9A;
  --purple-light: #EEEDFB;
  --teal: #2A7A6E;
  --teal-light: #E8F4F2;
  --radius: 6px;
  --radius-sm: 4px;
}

/* ── BASE ── */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  min-height: 100vh;
}

hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 16px 0;
}

/* ═══════════════════════════════════════════════════════════
   SHARED LAYOUT
═══════════════════════════════════════════════════════════ */

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Topbar */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 48px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-right: 28px;
  white-space: nowrap;
}

/* Dashboard nav */
.nav {
  display: flex;
  gap: 0;
  flex: 1;
  overflow-x: auto;
}

.nav-btn {
  padding: 0 14px;
  height: 48px;
  border: none;
  background: none;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.nav-btn:hover { color: var(--text); }
.nav-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Outliner topbar actions */
.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Content areas */
.content {
  flex: 1;
  padding: 28px 24px 48px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

/* Outliner uses a narrower, taller-padded content area */
.content-narrow {
  padding: 16px 24px 80px;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════
   SHARED TYPOGRAPHY & COMPONENTS
═══════════════════════════════════════════════════════════ */

.page-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.page-sub {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 24px;
}

.section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
  margin-top: 24px;
}
.section-label:first-child { margin-top: 0; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.card-sub {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.55;
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  padding: 1px 7px;
  border-radius: 10px;
  vertical-align: middle;
  margin-left: 4px;
}
.b-blue   { background: var(--accent-light);  color: var(--accent);  }
.b-orange { background: var(--orange-light);  color: var(--orange);  }
.b-green  { background: var(--green-light);   color: var(--green);   }
.b-amber  { background: var(--amber-light);   color: var(--amber);   }
.b-purple { background: var(--purple-light);  color: var(--purple);  }
.b-teal   { background: var(--teal-light);    color: var(--teal);    }
.b-grey   { background: #F1EFE8;              color: #5A5852;        }

/* Note boxes */
.note {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px;
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 12px 0;
}
.note strong { color: var(--text); }
.note-amber  { background: var(--amber-light);  border-left-color: var(--amber);  }
.note-orange { background: var(--orange-light); border-left-color: var(--orange); }
.note-green  { background: var(--green-light);  border-left-color: var(--green);  }

/* Panels (dashboard tab content) */
.panel        { display: none; }
.panel.active { display: block; }

/* Sub-panels (daily schedule tabs) */
.sub-panel        { display: none; }
.sub-panel.active { display: block; }

/* Sub-tabs */
.sub-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.sub-tab {
  padding: 6px 14px 8px;
  border: none;
  background: none;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.sub-tab:hover  { color: var(--text); }
.sub-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Grids */
.g2 { display: grid; grid-template-columns: 1fr 1fr;           gap: 12px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr;       gap: 12px; }
.g4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;   gap: 12px; }

/* Tables */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: left;
  padding: 6px 10px 8px;
  border-bottom: 1px solid var(--border);
}
.tbl td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-2);
  vertical-align: top;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl td:first-child   { color: var(--text); font-weight: 500; }

/* Checklist */
.checklist { list-style: none; }
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-2);
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: "☐";
  color: var(--text-3);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD — WEEK OVERVIEW
═══════════════════════════════════════════════════════════ */

.week-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.day-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}

.day-col-head {
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--border-light);
  font-size: 11px;
  font-weight: 600;
}

.day-col-body { padding: 8px 8px 10px; }

.day-block {
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 3px;
  margin-bottom: 3px;
  line-height: 1.4;
}

.db-deep  { background: var(--purple-light); color: var(--purple); }
.db-stand { background: var(--green-light);  color: var(--green);  }
.db-so    { background: var(--orange-light); color: var(--orange); }
.db-mtg   { background: var(--accent-light); color: var(--accent); }
.db-supp  { background: var(--amber-light);  color: var(--amber);  }
.db-lunch { background: #F1EFE8; color: #6B6860; }

/* Legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--text-2);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD — TIMELINE (daily schedule)
═══════════════════════════════════════════════════════════ */

.timeline { display: flex; flex-direction: column; gap: 4px; }

.tl-row {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.tl-time {
  font-size: 11px;
  font-family: 'SF Mono', 'Consolas', 'Courier New', monospace;
  font-weight: 500;
  color: var(--text-3);
  min-width: 48px;
  width: 48px;
  padding-top: 10px;
  text-align: right;
  padding-right: 12px;
  flex-shrink: 0;
}

.tl-rail {
  width: 3px;
  border-radius: 2px;
  flex-shrink: 0;
  margin-right: 10px;
  align-self: stretch;
}

.tl-block {
  flex: 1;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  position: relative;
}

.tl-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 3px;
  padding-right: 56px;
}

.tl-desc { font-size: 11px; line-height: 1.5; }

/* Block colours */
.tl-deep  { background: var(--purple-light); }
.tl-stand { background: var(--green-light);  }
.tl-so    { background: var(--orange-light); }
.tl-mtg   { background: var(--accent-light); }
.tl-supp  { background: var(--amber-light);  }
.tl-lunch { background: #F4F2EE; }

.tl-deep  .tl-title { color: var(--purple); }
.tl-stand .tl-title { color: var(--green);  }
.tl-so    .tl-title { color: var(--orange); }
.tl-mtg   .tl-title { color: var(--accent); }
.tl-supp  .tl-title { color: var(--amber);  }
.tl-lunch .tl-title { color: var(--text-2); }

/* Rail colours */
.rail-deep  { background: var(--purple); }
.rail-stand { background: var(--green);  }
.rail-so    { background: var(--orange); }
.rail-mtg   { background: var(--accent); }
.rail-supp  { background: var(--amber);  }
.rail-lunch { background: #C8C4BB; }

/* Duration label (injected by JS into top-right of tl-block) */
.tl-duration {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: .02em;
  line-height: 1;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD — TIME ZONES
═══════════════════════════════════════════════════════════ */

.season-toggle { display: flex; gap: 6px; margin-bottom: 20px; }

.season-btn {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.season-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.tz-viz-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.tz-viz-label {
  font-size: 11px;
  color: var(--text-2);
  min-width: 130px;
  text-align: right;
  flex-shrink: 0;
}

.tz-track {
  flex: 1;
  height: 20px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
}

.tz-seg {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 500;
}

.tz-header-row {
  display: flex;
  gap: 8px;
  margin-bottom: 5px;
  padding-left: 138px;
}

.tz-header-cell {
  flex: 1;
  font-size: 9px;
  color: var(--text-3);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD — SALES ORDERS / DECISION FLOW
═══════════════════════════════════════════════════════════ */

.outcome-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.outcome-card {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.outcome-card h4 {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}

.outcome-card ul { list-style: none; }
.outcome-card ul li {
  font-size: 11px;
  color: var(--text-2);
  padding: 2px 0;
}
.outcome-card ul li::before { content: "→ "; color: var(--text-3); }

.oc-prod  { background: var(--green-light);  border-color: #B8DFC8; }
.oc-prod  h4 { color: var(--green);  }
.oc-disp  { background: var(--accent-light); border-color: #BDD6EC; }
.oc-disp  h4 { color: var(--accent); }
.oc-purch { background: var(--orange-light); border-color: #F0C4A8; }
.oc-purch h4 { color: var(--orange); }

.decision-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.step-body { flex: 1; }
.step-title { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.step-desc  { font-size: 11px; color: var(--text-2); line-height: 1.5; }

/* ═══════════════════════════════════════════════════════════
   DASHBOARD — KPIs
═══════════════════════════════════════════════════════════ */

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.kpi-name { font-size: 11px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.kpi-def  { font-size: 11px; color: var(--text-2); margin-bottom: 8px; line-height: 1.5; }

.kpi-calc {
  font-size: 10px;
  font-family: 'SF Mono', 'Consolas', monospace;
  background: var(--bg);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  margin-bottom: 8px;
}

.kpi-bench { font-size: 10px; color: var(--text-3); }
.kpi-bench span { font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   DASHBOARD — VENDORS
═══════════════════════════════════════════════════════════ */

.tier-card {
  border-left: 4px solid;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 10px;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD — TRIAGE
═══════════════════════════════════════════════════════════ */

.triage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.triage-card {
  border-radius: var(--radius);
  padding: 14px 16px;
  border: 1px solid var(--border);
}

.triage-card h4 { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.triage-card p,
.triage-card li { font-size: 11px; color: var(--text-2); line-height: 1.6; }
.triage-card ul { list-style: none; padding: 0; }
.triage-card ul li::before { content: "• "; color: var(--text-3); }

/* ═══════════════════════════════════════════════════════════
   DASHBOARD — TIME MANAGEMENT TIPS
═══════════════════════════════════════════════════════════ */

.tip-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.tip-row:last-child { border-bottom: none; }

.tip-num {
  font-size: 11px;
  font-family: 'SF Mono', 'Consolas', monospace;
  color: var(--text-3);
  min-width: 24px;
  padding-top: 1px;
}

.tip-body  { flex: 1; }
.tip-title { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.tip-desc  { font-size: 11px; color: var(--text-2); line-height: 1.5; }

/* ═══════════════════════════════════════════════════════════
   OUTLINER — SAVE BAR
═══════════════════════════════════════════════════════════ */

.save-btn {
  padding: 5px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity .15s;
}
.save-btn:hover    { opacity: .85; }
.save-btn:disabled { opacity: .5; cursor: default; }

.save-status {
  font-size: 11px;
  color: var(--text-3);
  min-width: 80px;
  text-align: right;
}
.save-status.saved { color: var(--green); }
.save-status.error { color: var(--orange); }

/* ═══════════════════════════════════════════════════════════
   OUTLINER — BREADCRUMB
═══════════════════════════════════════════════════════════ */

.breadcrumb {
  padding: 10px 24px 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.crumb {
  font-size: 11px;
  color: var(--accent);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
}
.crumb:hover { background: var(--accent-light); }

.crumb-sep     { font-size: 11px; color: var(--text-3); }
.crumb-current { font-size: 11px; color: var(--text-2); padding: 2px 4px; }

/* ═══════════════════════════════════════════════════════════
   OUTLINER — TREE
═══════════════════════════════════════════════════════════ */

.tree { outline: none; }

.node { position: relative; margin: 0; }

.node-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 1px 0;
  border-radius: var(--radius-sm);
  position: relative;
}
.node-row:hover,
.node-row.focused { background: var(--accent-light); }

/* Collapse toggle */
.toggle {
  width: 20px;
  height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-3);
  font-size: 9px;
  user-select: none;
  border-radius: var(--radius-sm);
  transition: color .1s;
  margin-top: 1px;
}
.toggle:hover         { color: var(--text-2); }
.toggle.has-children  { color: var(--text-3); }
.toggle.no-children   { color: transparent; cursor: default; }
.toggle.collapsed     { transform: rotate(-90deg); }

/* Bullet */
.bullet {
  width: 20px;
  height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: 1px;
}

.bullet-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  transition: background .1s, transform .1s;
}
.bullet:hover .bullet-dot { background: var(--accent); transform: scale(1.3); }

/* Editable node content */
.node-content {
  flex: 1;
  min-height: 22px;
  padding: 1px 4px;
  outline: none;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
  border-radius: var(--radius-sm);
  caret-color: var(--accent);
}
.node-content:empty::before {
  content: attr(data-placeholder);
  color: var(--text-3);
  pointer-events: none;
}

/* Children indent */
.node-children              { padding-left: 40px; }
.node-children.collapsed    { display: none; }

/* Zoom-in hint */
.zoom-hint {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--text-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .1s;
  white-space: nowrap;
}
.node-row:hover .zoom-hint { opacity: 1; }

/* Empty state */
.empty-hint {
  padding: 40px 28px;
  color: var(--text-3);
  font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════
   OUTLINER — GITHUB SETUP OVERLAY
═══════════════════════════════════════════════════════════ */

.setup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(247,246,243,.96);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.setup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  max-width: 440px;
  width: 100%;
}

.setup-card h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.setup-card p {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 18px;
  line-height: 1.6;
}

.setup-field { margin-bottom: 12px; }

.setup-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 5px;
  display: block;
}

.setup-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  font-family: inherit;
}
.setup-input:focus { border-color: var(--accent); }

.setup-note {
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 18px;
  line-height: 1.5;
}
.setup-note a { color: var(--accent); }

.setup-submit {
  width: 100%;
  padding: 9px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.setup-submit:hover { opacity: .85; }

.setup-error {
  font-size: 11px;
  color: var(--orange);
  margin-top: 10px;
  display: none;
}

/* ═══════════════════════════════════════════════════════════
   OUTLINER — MOBILE TOOLBAR
   Hidden on desktop; shown fixed above keyboard on mobile.
═══════════════════════════════════════════════════════════ */

.node-toolbar { display: none; }

/* ═══════════════════════════════════════════════════════════
   MOBILE OVERRIDES  (≤ 768px)
═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── Shared topbar ── */
  .topbar {
    flex-direction: column;
    height: auto;
    padding: 8px 12px 0;
    align-items: flex-start;
  }

  .logo {
    margin-right: 0;
    margin-bottom: 4px;
    font-size: 11px;
  }

  /* ── Dashboard nav ── */
  .nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-btn { padding: 0 11px; height: 36px; font-size: 11px; flex-shrink: 0; }

  /* ── Outliner topbar ── */
  /* (outliner.html has no .nav, so just tighten the topbar height) */
  .topbar-actions { width: 100%; justify-content: flex-end; padding: 8px 0; }

  /* ── Content ── */
  .content         { padding: 16px 12px 40px; }
  .content-narrow  { padding: 12px 12px 140px; }

  /* ── Grids → single column ── */
  .g2, .g3, .g4,
  .week-grid,
  .outcome-row,
  .triage-grid { grid-template-columns: 1fr; }

  /* ── Page typography ── */
  .page-title    { font-size: 15px; }
  .page-sub      { font-size: 11px; }
  .section-label { font-size: 9px; }

  /* ── Timeline ── */
  .tl-time  { min-width: 38px; font-size: 10px; padding-right: 8px; }
  .tl-block { padding: 8px 10px; }
  .tl-title { font-size: 11px; }
  .tl-desc  { font-size: 10px; }
  .badge    { display: inline-block; margin-top: 2px; }

  /* ── Tables ── */
  .tbl { min-width: 480px; }
  .card.tbl-wrap { overflow-x: auto !important; }

  /* ── TZ visualiser ── */
  .tz-viz-label  { min-width: 80px; font-size: 9px; }
  .tz-header-row { padding-left: 88px; }
  .tz-track      { height: 22px; }
  .tz-seg        { white-space: nowrap; font-size: 8px; }

  /* ── Outliner-specific ── */
  .breadcrumb { padding: 8px 12px 0; }
  .zoom-hint  { display: none; }

  /* ── Mobile toolbar (outliner) ── */
  .node-toolbar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 4px 8px;
    padding-bottom: calc(4px + env(safe-area-inset-bottom));
    gap: 4px;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
  }
  .node-toolbar.visible { opacity: 1; pointer-events: all; }

  .tb-btn {
    flex: 1;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text-2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    transition: background .1s, color .1s;
    touch-action: manipulation;
  }
  .tb-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    flex-shrink: 0;
  }
  .tb-btn:active {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
  }
  .tb-btn.tb-delete {
    flex: 0 0 34px;
    color: var(--orange);
    border-color: var(--orange-light);
    background: var(--orange-light);
  }
  .tb-btn.tb-delete:active { background: var(--orange); color: #fff; }

  .tb-sep {
    width: 1px;
    height: 20px;
    background: var(--border);
    flex-shrink: 0;
  }
}
