/* ═══════════════════════════════════════════════════════════════
   planning-hub.css — Planning Hub KPI, preset, dashboard styles
   New styles for planning overhaul (Items 17-19)
   ═══════════════════════════════════════════════════════════════ */

/* ── KPI Strip ─────────────────────────────────────────────── */
.ph-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
  animation: phFadeIn 0.3s ease;
}
.ph-kpi-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: var(--guide-radius-lg, 12px);
  background: var(--guide-color-raised);
  border: 1px solid var(--guide-color-line);
}
.ph-kpi-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--guide-color-ink-soft);
}
.ph-kpi-icon i {
  width: 14px;
  height: 14px;
}
.ph-kpi-value {
  font-size: var(--guide-fs-xl);
  font-weight: 700;
  line-height: 1;
  color: var(--guide-color-ink);
  font-variant-numeric: tabular-nums;
}
/* A KPI with nothing behind it. Same vocabulary as .statx-absent in
   src/stat-context.js, so absence reads the same wherever it appears.
   Compounded with .ph-kpi-value on purpose: the responsive block below
   re-declares .ph-kpi-value at 15px, and a single-class rule here would lose
   to it on source order at that breakpoint. Two classes beats one everywhere,
   without reaching for !important. */
.ph-kpi-value.ph-kpi-absent {
  font-size: var(--guide-fs-2xs);
  font-weight: 600;
  font-style: italic;
  line-height: 1;
  color: var(--guide-color-status-mute, #6b7280);
  border-bottom: 1px dotted currentColor;
  cursor: help;
}
.ph-kpi-label {
  font-size: var(--guide-fs-2xs);
  font-weight: 600;
  text-transform: var(--guide-label-case, uppercase);
  letter-spacing: 0.3px;
  color: var(--guide-color-ink-soft);
  text-align: center;
}

/* ── Preset Grid ───────────────────────────────────────────── */
.ph-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.ph-preset-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--guide-color-line);
  background: var(--guide-color-raised);
  cursor: pointer;
  transition: border-color 0.15s;
  text-align: left;
}
.ph-preset-card:hover {
  border-color: var(--guide-color-line-strong);
}
.ph-preset-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ph-preset-icon i {
  width: 16px;
  height: 16px;
}
.ph-preset-label {
  font-size: var(--guide-fs-sm);
  font-weight: 700;
  color: var(--text-primary, #333);
  line-height: 1.3;
}
.ph-preset-sub {
  font-size: var(--guide-fs-2xs);
  color: var(--text-muted, #71717a);
  line-height: 1.3;
}
.ph-preset-badge {
  font-size: var(--guide-fs-2xs);
  font-weight: 700;
  text-transform: var(--guide-label-case, uppercase);
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 8px;
  margin-top: 2px;
  display: inline-block;
}

/* ── Planning Dashboard / Scorecard ────────────────────────── */
.ph-dashboard-panel,
.ph-scorecard-panel {
  padding: 12px;
  border-radius: var(--guide-radius-lg, 12px);
  background: var(--guide-color-raised);
  border: 1px solid var(--guide-color-line);
  margin-bottom: 12px;
}

/* ── Loading / Error States ────────────────────────────────── */
.ph-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  color: var(--text-muted, #71717a);
  font-size: var(--text-sm);
}
.ph-loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-subtle, var(--guide-color-border-default, rgba(0,0,0,0.1)));
  border-top-color: var(--guide-color-action);
  border-radius: 50%;
  animation: phSpin 0.8s linear infinite;
}
.ph-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: var(--guide-color-raised);
  border: 1px solid var(--guide-color-line);
  border-radius: 8px;
  color: var(--guide-color-ink);
  font-size: var(--guide-fs-sm);
}
/* A retry is an action, so it is the secondary button in the action hue. */
.ph-error-retry {
  font-size: var(--guide-fs-xs);
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--guide-color-line-strong);
  background: var(--guide-color-raised);
  color: var(--guide-color-action);
  cursor: pointer;
}
.ph-error-retry:hover {
  border-color: var(--guide-color-ink-soft);
}

/* ── Multi-select Persona Chips Enhancement ────────────────── */
.ph-persona-chip--multi {
  position: relative;
}
.ph-persona-chip--multi.ph-persona-chip--active::after {
  content: '✓';
  font-size: var(--guide-fs-2xs);
  margin-left: 2px;
}

/* ── Planning Section in Dashboard Zone ────────────────────── */
.planning-section {
  margin-bottom: 4px;
}
.planning-section:empty {
  display: none;
}

/* ── Animations ────────────────────────────────────────────── */

/* ── Mobile Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .ph-kpi-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .ph-preset-grid {
    grid-template-columns: 1fr;
  }
  .ph-cc-quick-grid {
    grid-template-columns: 1fr !important;
  }
  .ph-persona-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .ph-kpi-strip {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .ph-kpi-card {
    padding: 8px 6px;
  }
  .ph-kpi-value {
    font-size: var(--guide-fs-lg);
  }
}

/* ── Print Styles ──────────────────────────────────────────── */
@media print {
  .ph-persona-bar,
  .ph-nav--fs,
  .ph-actions,
  .ph-back-btn,
  .ph-toast,
  .ph-modal-overlay,
  .ph-tour-overlay,
  .ph-preset-card,
  .ph-hero-action {
    display: none !important;
  }
  .ph-kpi-strip,
  .ph-dashboard-panel,
  .ph-scorecard-panel {
    break-inside: avoid;
  }
  .ph-kpi-card {
    background: #fff !important;
    border: 1px solid #ddd !important;
  }
}

/* ── Reduced Motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ph-cc,
  .ph-tool-wrap,
  .ph-skeleton,
  .ph-kpi-strip {
    animation: none !important;
  }
  .ph-loading-spinner {
    animation-duration: 2s;
  }
}

/* ── Workflow Progress Bar ─────────────────────────────────────── */
.ph-workflow-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: var(--guide-color-paper-2);
  border: 1px solid var(--guide-color-line);
  border-radius: 6px;
}

.ph-workflow-pip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--guide-color-line-strong);
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.ph-workflow-pip--active {
  background: var(--guide-color-action);
}

@media (prefers-reduced-motion: reduce) {
  .ph-workflow-pip { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════
   The Planning command center, by job, on the Infinimaker sheet.

   Layout (src/planning/planning-hub.js _buildCommandCenterHTML):
   resume → six jobs (three workflows each, "Show more" for the
   rest) → this season → ask a question → Montana at a glance →
   planning health, folded. The left column is the search and the
   222 tools by subject.

   The base .ph-* rules live in components.css, which this session
   does not own, so they are restyled here under #planning-hub-root:
   the ID out-ranks them without !important, and no bare class
   selector is declared in a second file.
   ═══════════════════════════════════════════════════════════════ */

#planning-hub-root { background: var(--guide-color-paper); }

/* ── Left column: search, then the tool list ── */
#planning-hub-root .ph-nav-col {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  min-height: 0;
  background: var(--guide-color-paper-2);
  border-right: 1px solid var(--guide-color-line);
}
#planning-hub-root .ph-nav-col .ph-search-bar { padding: 14px 14px 6px; margin: 0; }
#planning-hub-root .ph-search-wrap--fs { max-width: none; }
#planning-hub-root .ph-search {
  padding: 8px 10px 8px 30px;
  font-size: var(--guide-fs-sm);
  color: var(--guide-color-ink);
  background: var(--guide-color-raised);
  border: 1px solid var(--guide-color-line-strong);
  border-radius: var(--guide-radius-md, 8px);
}
#planning-hub-root .ph-search:focus-visible {
  outline: 2px solid var(--guide-color-action);
  outline-offset: 1px;
  border-color: var(--guide-color-action);
}
#planning-hub-root .ph-nav--fs {
  flex: 1;
  height: auto;
  min-height: 0;
  padding: 8px 14px 16px;
  background: transparent;
  border-right: 0;
}

/* Command Center link: selected = a raised sheet in ink. */
#planning-hub-root .ph-nav-home {
  color: var(--guide-color-ink);
  font-size: var(--guide-fs-sm);
  font-weight: 600;
}
#planning-hub-root .ph-nav-home:hover { background: var(--guide-color-raised); }
#planning-hub-root .ph-nav-home--active {
  background: var(--guide-color-raised);
  color: var(--guide-color-ink);
  box-shadow: var(--guide-shadow-rest);
}
#planning-hub-root .ph-nav-home--active i,
#planning-hub-root .ph-nav-home--active svg { color: var(--guide-color-action); }

/* Section headers: sentence case as written (components.css set them
   in 800-weight ALL CAPS), ink, a count chip that is a count not a
   button, and no brick wash on hover. */
#planning-hub-root .ph-nav-section,
#planning-hub-root .ph-nav-section--collapsed { background: transparent; }
#planning-hub-root .ph-nav-section-hdr {
  font-size: var(--guide-fs-sm);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  padding: 10px 8px;
  color: var(--guide-color-ink);
  border-bottom: 1px solid var(--guide-color-line);
  border-radius: 6px 6px 0 0;
}
#planning-hub-root .ph-nav-section--collapsed .ph-nav-section-hdr { border-bottom-color: transparent; }
#planning-hub-root .ph-nav-section-hdr:hover,
#planning-hub-root .ph-nav-section--collapsed:hover { background: var(--guide-color-raised); }
#planning-hub-root .ph-nav-section-hdr > i,
#planning-hub-root .ph-nav-section-hdr > svg:first-child { color: var(--guide-color-ink-soft); }
#planning-hub-root .ph-nav-count {
  background: var(--guide-color-raised);
  color: var(--guide-color-ink-soft);
  border: 1px solid var(--guide-color-line);
  font-weight: 600;
  box-shadow: none;
}
#planning-hub-root .ph-nav-chevron { background: transparent; color: var(--guide-color-action); }
#planning-hub-root .ph-nav-section-hdr:hover .ph-nav-chevron { background: transparent; color: var(--guide-color-action); }
#planning-hub-root .ph-tool-btn {
  font-size: var(--guide-fs-xs);
  color: var(--guide-color-ink);
}
#planning-hub-root .ph-tool-btn:hover { background: var(--guide-color-raised); }
#planning-hub-root .ph-tool-btn--active {
  background: var(--guide-color-raised);
  color: var(--guide-color-ink);
  box-shadow: inset 0 0 0 1px var(--guide-color-action);
}
#planning-hub-root .ph-tool-fav:hover { transform: none; }
/* A favourite is a toggle, so the starred state is the action hue. */
#planning-hub-root .ph-fav-on { color: var(--guide-color-action); fill: currentcolor; }
#planning-hub-root .ph-fav-off { color: var(--guide-color-ink-soft); }

/* ── Content column ── */
#planning-hub-root .ph-content--fs { padding: 24px 28px 40px; }
#planning-hub-root .ph-cc { max-width: 1180px; }

/* Section headings: the display serif, sentence case, ink. */
#planning-hub-root .ph-cc-section-title {
  font-family: var(--guide-font-display);
  font-size: var(--guide-fs-2xl);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--guide-color-ink);
  margin: 28px 0 12px;
  gap: 8px;
}
#planning-hub-root .ph-cc > .ph-cc-section-title:first-child { margin-top: 0; }
#planning-hub-root .ph-cc-section-title i,
#planning-hub-root .ph-cc-section-title svg { width: 18px; height: 18px; color: var(--guide-color-action); }
#planning-hub-root .ph-cc-sub-title {
  font-family: var(--guide-font-display);
  font-size: var(--guide-fs-lg);
  font-weight: 600;
  color: var(--guide-color-ink);
  margin: 20px 0 10px;
}

/* ── The six jobs ── */
#planning-hub-root .ph-job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  align-items: start;
}
#planning-hub-root .ph-job {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: var(--guide-color-raised);
  border: 1px solid var(--guide-color-line);
  border-radius: var(--guide-radius-lg, 12px);
  box-shadow: var(--guide-shadow-rest);
}
#planning-hub-root .ph-job-head { display: flex; gap: 12px; align-items: flex-start; }
#planning-hub-root .ph-job-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--guide-radius-md, 8px);
  background: var(--guide-color-paper-2);
  color: var(--guide-color-action);
}
#planning-hub-root .ph-job-title {
  margin: 0;
  font-family: var(--guide-font-display);
  font-size: var(--guide-fs-lg);
  font-weight: 600;
  line-height: 1.25;
  color: var(--guide-color-ink);
}
#planning-hub-root .ph-job-who {
  margin: 2px 0 0;
  font-size: var(--guide-fs-xs);
  color: var(--guide-color-ink-soft);
}
#planning-hub-root .ph-job-list { display: grid; gap: 6px; }
#planning-hub-root .ph-job-list--wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 8px; }

/* A workflow is a row you press: a sheet with a rule, the rule darker on
   hover. No hue strip, no lift. */
#planning-hub-root .ph-cc-workflow {
  width: 100%;
  padding: 10px 12px;
  background: var(--guide-color-raised);
  border: 1px solid var(--guide-color-line);
  border-radius: var(--guide-radius-md, 8px);
  box-shadow: none;
  transition: border-color var(--guide-dur-fast, 140ms) ease;
}
#planning-hub-root .ph-cc-workflow::before { content: none; }
#planning-hub-root .ph-cc-workflow:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--guide-color-line-strong);
}
#planning-hub-root .ph-cc-workflow:focus-visible { outline: 2px solid var(--guide-color-action); outline-offset: 2px; }
#planning-hub-root .ph-cc-wf-title {
  font-size: var(--guide-fs-sm);
  font-weight: 600;
  color: var(--guide-color-ink);
}
#planning-hub-root .ph-cc-wf-title i,
#planning-hub-root .ph-cc-wf-title svg { color: var(--guide-color-action); }
#planning-hub-root .ph-cc-wf-tools {
  font-size: var(--guide-fs-xs);
  line-height: 1.45;
  color: var(--guide-color-ink-soft);
}
#planning-hub-root .ph-job-more summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  cursor: pointer;
  list-style: none;
  font-size: var(--guide-fs-sm);
  font-weight: 600;
  color: var(--guide-color-action);
}
#planning-hub-root .ph-job-more summary::-webkit-details-marker { display: none; }
#planning-hub-root .ph-job-more summary::after { content: '+'; font-weight: 700; }
#planning-hub-root .ph-job-more[open] summary::after { content: '\2212'; }
#planning-hub-root .ph-job-more summary:focus-visible { outline: 2px solid var(--guide-color-action); outline-offset: 2px; border-radius: 4px; }
#planning-hub-root .ph-job-more[open] > .ph-job-list { margin-top: 6px; }

/* ── Saved scenarios ── */
#planning-hub-root .ph-cc-scenario-card {
  background: var(--guide-color-raised);
  border: 1px solid var(--guide-color-line);
  box-shadow: var(--guide-shadow-rest);
}
#planning-hub-root .ph-cc-scenario-card::before { content: none; }
#planning-hub-root .ph-cc-sc-name { font-size: var(--guide-fs-sm); color: var(--guide-color-ink); }
#planning-hub-root .ph-cc-sc-load {
  font-size: var(--guide-fs-xs);
  border-color: transparent;
  background: var(--guide-color-action);
  color: var(--guide-color-on-action);
}
#planning-hub-root .ph-cc-sc-load:hover { background: var(--guide-color-action-hover); color: var(--guide-color-on-action); }

/* ── This season ── */
#planning-hub-root .ph-cc-suggestion {
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--guide-color-raised);
  border: 1px solid var(--guide-color-line);
  border-radius: var(--guide-radius-lg, 12px);
}
#planning-hub-root .ph-cc-suggestion-icon { color: var(--guide-color-action); }
#planning-hub-root .ph-cc-suggestion-text { font-size: var(--guide-fs-md); color: var(--guide-color-ink); }
#planning-hub-root .ph-cc-suggestion-btn {
  font-size: var(--guide-fs-xs);
  font-weight: 600;
  background: var(--guide-color-raised);
  border: 1px solid var(--guide-color-line-strong);
  color: var(--guide-color-action);
}
#planning-hub-root .ph-cc-suggestion-btn:hover {
  background: var(--guide-color-raised);
  border-color: var(--guide-color-ink-soft);
  color: var(--guide-color-action);
}
#planning-hub-root .ph-cc-calendar {
  gap: 2px;
  padding: 3px;
  background: var(--guide-color-paper-2);
  border: 1px solid var(--guide-color-line);
  border-radius: var(--guide-radius-md, 8px);
}
#planning-hub-root .ph-cal-month { border-radius: var(--guide-radius-sm, 6px); color: var(--guide-color-ink); }
#planning-hub-root .ph-cal-month:hover { background: var(--guide-color-raised); }
#planning-hub-root .ph-cal-month--current {
  background: var(--guide-color-raised);
  color: var(--guide-color-ink);
  box-shadow: inset 0 0 0 1px var(--guide-color-action), var(--guide-shadow-rest);
}
#planning-hub-root .ph-cal-month-note { color: var(--guide-color-ink-soft); }
#planning-hub-root .ph-cal-month--current .ph-cal-month-note { color: var(--guide-color-ink); }
#planning-hub-root .ph-cal-month--current .ph-cal-month-label { color: var(--guide-color-action); }

/* ── Ask a planning question ── */
#planning-hub-root .ph-cc-ai-card {
  background: var(--guide-color-raised);
  border: 1px solid var(--guide-color-line);
  border-left: 1px solid var(--guide-color-line);
  box-shadow: none;
}
#planning-hub-root .ph-cc-ai-card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--guide-color-line-strong);
}
#planning-hub-root .ph-cc-ai-icon {
  background: var(--guide-color-paper-2);
  color: var(--guide-color-action);
}
#planning-hub-root .ph-cc-ai-icon i,
#planning-hub-root .ph-cc-ai-icon [data-lucide],
#planning-hub-root .ph-cc-ai-icon svg {
  color: var(--guide-color-action) !important; /* components.css forces white with !important */
  stroke: currentcolor !important; /* same */
}

/* ── Montana at a glance ── */
#planning-hub-root .ph-cc-glance-grid { grid-template-columns: repeat(4, 1fr); }
#planning-hub-root .ph-cc-glance-card {
  background: var(--guide-color-raised);
  border: 1px solid var(--guide-color-line);
  border-radius: var(--guide-radius-lg, 12px);
  box-shadow: var(--guide-shadow-rest);
}
#planning-hub-root .ph-cc-glance-title { color: var(--guide-color-ink-soft); }

/* ── Planning health, folded ── */
#planning-hub-root .ph-cc-disclosure {
  margin-top: 28px;
  background: var(--guide-color-raised);
  border: 1px solid var(--guide-color-line);
  border-radius: var(--guide-radius-lg, 12px);
}
#planning-hub-root .ph-cc-disclosure-sum {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}
#planning-hub-root .ph-cc-disclosure-sum::-webkit-details-marker { display: none; }
#planning-hub-root .ph-cc-disclosure-sum:focus-visible { outline: 2px solid var(--guide-color-action); outline-offset: 2px; border-radius: 12px; }
#planning-hub-root .ph-cc-disclosure-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--guide-font-display);
  font-size: var(--guide-fs-lg);
  font-weight: 600;
  color: var(--guide-color-ink);
}
#planning-hub-root .ph-cc-disclosure-title::after {
  content: 'Show';
  margin-left: auto;
  font-family: var(--guide-font-sans, inherit);
  font-size: var(--guide-fs-sm);
  font-weight: 600;
  color: var(--guide-color-action);
}
#planning-hub-root .ph-cc-disclosure[open] .ph-cc-disclosure-title::after { content: 'Hide'; }
#planning-hub-root .ph-cc-disclosure-title i,
#planning-hub-root .ph-cc-disclosure-title svg { color: var(--guide-color-action); }
#planning-hub-root .ph-cc-disclosure-hint { font-size: var(--guide-fs-xs); color: var(--guide-color-ink-soft); }
#planning-hub-root .ph-cc-disclosure-body { padding: 0 16px 16px; border-top: 1px solid var(--guide-color-line); }
#planning-hub-root .ph-cc-disclosure-body > .guide-pulse-mount { margin-top: 16px; }
#planning-hub-root .ph-kpi-strip { grid-template-columns: repeat(5, 1fr); margin-top: 16px; }
#planning-hub-root .ph-cc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px; }
#planning-hub-root .ph-cc-hex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
#planning-hub-root .ph-cc-hex {
  padding: 10px;
  border-radius: var(--guide-radius-lg, 12px);
  background: var(--guide-color-raised);
  border: 1px solid var(--guide-color-line);
}

@media (max-width: 1024px) {
  #planning-hub-root .ph-cc-glance-grid { grid-template-columns: repeat(2, 1fr); }
  #planning-hub-root .ph-cc-two,
  #planning-hub-root .ph-cc-hex-grid { grid-template-columns: 1fr; }
  #planning-hub-root .ph-kpi-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  #planning-hub-root .ph-layout--fs { grid-template-columns: 1fr; }
  #planning-hub-root .ph-nav-col { height: auto; border-right: 0; border-bottom: 1px solid var(--guide-color-line); }
  #planning-hub-root .ph-content--fs { padding: 16px; max-height: none; }
  #planning-hub-root .ph-job-grid { grid-template-columns: 1fr; }
  #planning-hub-root .ph-cc-section-title { font-size: var(--guide-fs-xl); }
  #planning-hub-root .ph-kpi-strip { grid-template-columns: repeat(2, 1fr); }
  #planning-hub-root .ph-cc-suggestion { flex-wrap: wrap; }
}
/* On a phone the 222-tool list folds away (it held the first screens);
   the search stays, and typing unfolds the list it filters. */
@media (max-width: 480px) {
  #planning-hub-root .ph-nav--fs { display: none; }
  #planning-hub-root .ph-nav-col--searching .ph-nav--fs { display: block; max-height: 60vh; overflow-y: auto; }
  #planning-hub-root .ph-cc-glance-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Search results, tool actions, and the honest empty tool ───────────────
   The rail answers a query (a count, or why there is nothing); a tool that drew
   nothing says so; Save / Load / Share sit with the tool they act on. */
#planning-hub-root .ph-nav-match-count {
  padding: var(--guide-sp-2) var(--guide-sp-3);
  font-size: var(--guide-fs-xs);
  color: var(--guide-color-ink-soft);
}
#planning-hub-root .ph-nav-empty {
  padding: var(--guide-sp-3);
  font-size: var(--guide-fs-sm);
  color: var(--guide-color-ink-soft);
}
#planning-hub-root .ph-nav-empty p { margin: 0 0 var(--guide-sp-2); }
#planning-hub-root .ph-nav-empty-go {
  display: inline-flex;
  align-items: center;
  gap: var(--guide-sp-1);
  color: var(--guide-color-action);
}
#planning-hub-root .ph-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--guide-sp-2);
  margin-top: var(--guide-sp-2);
}
#planning-hub-root .ph-tool-actions .ph-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--guide-sp-1);
  padding: 5px 10px;
  font-size: var(--guide-fs-xs);
  font-weight: 600;
  color: var(--guide-color-action);
  background: var(--guide-color-raised);
  border: 1px solid var(--guide-color-line-strong);
  border-radius: 8px;
  cursor: pointer;
}
#planning-hub-root .ph-tool-actions .ph-btn:hover { background: var(--guide-color-paper); }
#planning-hub-root .ph-tool-title { font-family: var(--guide-font-display); }
#planning-hub-root .ph-tool-empty {
  padding: var(--guide-sp-6) var(--guide-sp-4);
  text-align: center;
  color: var(--guide-color-ink-soft);
}
#planning-hub-root .ph-tool-empty h4 { margin: 0 0 var(--guide-sp-2); font-size: var(--guide-fs-md); color: var(--guide-color-ink); }
#planning-hub-root .ph-tool-empty p { margin: 0 auto; max-width: 42ch; font-size: var(--guide-fs-sm); }

/* GUIDE AI entry on the Command Center and in each tool header: a quiet text action,
   because the page's primary action is choosing a workflow. */
#planning-hub-root .ph-cc-ask { margin: 0 0 var(--guide-sp-3, 12px); color: var(--guide-color-ink-soft); font-size: var(--guide-fs-sm, 13px); }
#planning-hub-root .ph-ask-ai { color: var(--guide-color-action); font-weight: 600; }
#planning-hub-root .ph-cc-ask .ph-ask-ai { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* A panel borrowed from another hub (see _adoptMount in planning-hub.js) brings that hub's own "Back to …" link, which
   would leave Planning; the tool header above already has the way back. */
.ph-tool-wrap .hydro-back { display: none; }
