/* ═══════════════════════════════════════════════
   PHIT BI Dashboard Builder — WordPress-proof CSS
   All selectors scoped under .phit-app
   Styled to match MedicalPHIT WordPress website
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700;800&display=swap');

.phit-app {
  --phit-bg: #ffffff;
  --phit-panel: #ffffff;
  --phit-soft: #f5f6f8;
  --phit-stroke: #e2e6ea;
  --phit-title: #3d4f5f;
  --phit-text: #4a5a6a;
  --phit: #c8102e;
  --phit-rgb: 200, 16, 46;
  --phit-radius: 16px;
  --phit-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);

  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 0 0 100px;
  font-family: 'Open Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 16px;
  color: var(--phit-text);
  line-height: 1.6;
}

.phit-app *, .phit-app *::before, .phit-app *::after {
  box-sizing: border-box;
}

/* ─── Hero intro ─── */
.phit-hero {
  max-width: 1000px;
  margin: 0 auto 0;
  padding: 48px 24px 56px;
  text-align: center;
  background: transparent;
}

.phit-hero-badge {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(var(--phit-rgb), 0.25);
  background: rgba(var(--phit-rgb), 0.07);
  color: var(--phit);
  margin-bottom: 20px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.phit-hero-title {
  margin: 0 0 16px;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--phit-title);
  line-height: 1.2;
}

.phit-hero-sub {
  margin: 0 auto 32px;
  max-width: 560px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--phit-text);
  font-weight: 400;
}

/* ─── Disclaimer ─── */
.phit-disclaimer {
  text-align: center;
  font-size: 13px;
  color: #7a8a99;
  padding: 10px 24px;
  line-height: 1.5;
}
.phit-disclaimer strong { color: #5a6a7a; font-weight: 600; }
.phit-disclaimer-icon { margin-right: 6px; opacity: 0.6; }

/* Steps */
.phit-hero-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.phit-step {
  border: 1px solid var(--phit-stroke);
  border-radius: 14px;
  background: #fff;
  padding: 20px 18px;
  text-align: left;
  box-shadow: var(--phit-shadow);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.phit-step-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--phit);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phit-step-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--phit-title);
  margin-bottom: 6px;
}

.phit-step-desc {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  color: var(--phit-text);
}

/* Quote */
.phit-hero-quote {
  margin-bottom: 24px;
}

.phit-quote-card {
  margin: 0;
  padding: 18px 22px;
  border: 1px solid rgba(var(--phit-rgb), 0.15);
  border-left: 3px solid var(--phit);
  border-radius: 14px;
  background: rgba(var(--phit-rgb), 0.03);
  text-align: left;
}

.phit-quote-text {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--phit-title);
  font-style: italic;
}

.phit-quote-footer {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.phit-quote-author {
  font-weight: 700;
  font-size: 13px;
  color: var(--phit-title);
}

.phit-quote-role {
  font-size: 12px;
  color: var(--phit-text);
  opacity: 0.85;
}

/* Hero disclaimer */
.phit-hero-disclaimer {
  margin: 0 auto 24px;
  font-size: 14px;
  color: var(--phit-text);
  opacity: 0.8;
}

.phit-hero-disclaimer a {
  color: var(--phit);
  text-decoration: none;
  font-weight: 600;
}

.phit-hero-disclaimer a:hover {
  text-decoration: underline;
}

/* Hero CTA */
.phit-btn.phit-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--phit);
  border-color: var(--phit);
  color: #fff;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(var(--phit-rgb), 0.22);
  transition: filter 0.12s ease, transform 0.12s ease;
  border-radius: 12px;
}

.phit-btn.phit-hero-cta:hover {
  filter: brightness(0.93);
  transform: translateY(-1px);
}

/* Tool section reveal */
.phit-tool-section {
  transition: opacity 0.5s ease, transform 0.5s ease;
  padding-top: 32px;
}

.phit-tool-section.phit-tool-hidden {
  opacity: 0;
  transform: translateY(24px);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
}

.phit-tool-section.phit-tool-visible {
  opacity: 1;
  transform: translateY(0);
  max-height: none;
  overflow: visible;
  pointer-events: auto;
}

/* Hero responsive */
@media (max-width: 980px) {
  .phit-hero { padding: 32px 16px 28px; }
  .phit-hero-sub { font-size: 15px; }
  .phit-hero-steps { grid-template-columns: 1fr; }
}

/* ─── Top bar ─── */
.phit-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid var(--phit-stroke);
  border-radius: var(--phit-radius);
  background: rgba(var(--phit-rgb), 0.04);
}

.phit-topbar-title {
  margin: 0 0 6px;
  color: var(--phit-title);
  letter-spacing: -0.02em;
  font-size: 20px;
  font-weight: 700;
}

.phit-topbar-desc { margin: 0; line-height: 1.5; font-size: 14px; }
.phit-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.phit-actions .phit-hidden { display: none; }

/* ─── Grid layout ─── */
.phit-grid {
  display: block;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.phit-panel, .phit-canvas {
  border: 1px solid var(--phit-stroke);
  background: var(--phit-panel);
  border-radius: var(--phit-radius);
  box-shadow: var(--phit-shadow);
  overflow: hidden;
}

.phit-panel { padding: 18px; }
.phit-panel-title { margin: 0 0 4px; color: var(--phit-title); font-size: 17px; font-weight: 700; }
.phit-canvas-head { padding: 18px; border-bottom: 1px solid #eef1f4; }
.phit-canvas-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.phit-canvas-title { margin: 0 0 4px; color: var(--phit-title); font-size: 17px; font-weight: 700; }

.phit-muted { opacity: 0.8; font-size: 14px; margin: 0; }
.phit-smallmuted { opacity: 0.75; font-size: 12.5px; margin-top: 8px; }

/* ─── Usecase library ─── */
.phit-groups { margin-top: 16px; display: grid; gap: 14px; }

.phit-group {
  border: 1px solid #eef1f4;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, var(--phit-soft));
}

.phit-group-title {
  font-weight: 700;
  color: var(--phit-title);
  font-size: 14px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
  border-radius: 10px;
  padding: 8px 10px;
  margin: -8px -10px 10px;
}

.phit-group-title:hover {
  background: rgba(var(--phit-rgb), 0.04);
}

.phit-group-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.04);
  font-size: 10px;
  color: var(--phit-text);
  transition: transform 0.25s ease, background 0.15s ease;
  flex-shrink: 0;
}

.phit-group.phit-collapsed .phit-group-chevron {
  transform: rotate(-90deg);
}

.phit-group-title:hover .phit-group-chevron {
  background: rgba(var(--phit-rgb), 0.10);
}

.phit-group-title .phit-tag {
  font-weight: 700;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--phit-rgb), 0.25);
  background: rgba(var(--phit-rgb), 0.07);
  color: var(--phit);
}

.phit-cardslist {
  display: grid;
  gap: 10px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease;
  max-height: 800px;
  opacity: 1;
}

.phit-group.phit-collapsed .phit-cardslist {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.phit-ucard {
  position: relative;
  border: 1px solid var(--phit-stroke);
  background: #fff;
  border-radius: 12px;
  padding: 13px 14px;
  cursor: grab;
  user-select: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.phit-ucard:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
  border-color: rgba(var(--phit-rgb), 0.35);
}

.phit-ucard:active { cursor: grabbing; transform: scale(0.99); }

/* Active usecase indicator */
.phit-ucard.phit-active {
  border-color: var(--phit);
  background: rgba(var(--phit-rgb), 0.04);
  box-shadow: 0 0 0 2px rgba(var(--phit-rgb), 0.15), 0 6px 16px rgba(0, 0, 0, 0.06);
}

.phit-ucard.phit-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--phit);
}

/* Keyboard focus */
.phit-ucard:focus-visible {
  outline: 2px solid var(--phit);
  outline-offset: 2px;
}

.phit-ucard .phit-ucard-top { display: flex; gap: 10px; align-items: flex-start; }
.phit-ucard .phit-ucard-t {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--phit-title);
  font-size: 14px;
  margin: 0 0 5px;
}
.phit-ucard .phit-ucard-d { font-size: 13px; opacity: 0.85; line-height: 1.4; margin: 0; }

/* ─── Dropzone ─── */
.phit-dropzone {
  padding: 16px;
  min-height: 540px;
  background: linear-gradient(180deg, rgba(var(--phit-rgb), 0.03), #fff 40%);
}

.phit-drop-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 14px;
  border: 2px dashed var(--phit-stroke);
  background: #fff;
}

.phit-drop-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--phit-rgb), 0.09);
  color: var(--phit);
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

.phit-drop-empty strong {
  font-size: 15px;
  color: var(--phit-title);
}

.phit-dropzone.phit-dragover {
  outline: 3px solid rgba(var(--phit-rgb), 0.15);
  border-radius: 14px;
}

/* ─── Dashboard ─── */
.phit-dashboard { display: grid; gap: 14px; }
.phit-dashboard[hidden] { display: none !important; }

/* Dashboard fade-in animation */
.phit-dashboard.phit-fade-in {
  animation: phitDashFadeIn 0.35s ease-out;
}

@keyframes phitDashFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.phit-card {
  border: 1px solid #e8ecf0;
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.phit-card-wide { grid-column: 1 / -1; }

.phit-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.phit-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 11.5px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--phit-rgb), 0.28);
  background: rgba(var(--phit-rgb), 0.08);
  color: var(--phit);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.phit-uc-title {
  margin: 0 0 6px;
  color: var(--phit-title);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.phit-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.phit-meta-item {
  border: 1px solid #e8ecf0;
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--phit-soft);
  min-width: 155px;
}
.phit-meta-label { font-size: 12px; opacity: 0.8; font-weight: 500; }
.phit-meta-value { font-weight: 700; color: var(--phit-title); margin-top: 3px; font-size: 14px; }

/* ─── KPIs ─── */
.phit-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 980px) {
  .phit-kpis { grid-template-columns: 1fr; }
}

.phit-kpi {
  border: 1px solid #e8ecf0;
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.phit-kpi-label { font-size: 13px; opacity: 0.8; font-weight: 500; }
.phit-kpi-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--phit-title);
  margin: 6px 0 4px;
}
.phit-kpi-note { font-size: 13px; opacity: 0.8; }

/* KPI trend arrows */
.phit-kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 2px;
}

.phit-kpi-trend.phit-up {
  color: #15803d;
  background: rgba(21, 128, 61, 0.08);
}

.phit-kpi-trend.phit-down {
  color: #c8102e;
  background: rgba(200, 16, 46, 0.08);
}

.phit-kpi-trend.phit-flat {
  color: #92700a;
  background: rgba(146, 112, 10, 0.08);
}

/* ─── Charts grid ─── */
.phit-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 980px) {
  .phit-charts-grid { grid-template-columns: 1fr; }
}

.phit-card-title {
  font-weight: 700;
  color: var(--phit-title);
  font-size: 14px;
  margin-bottom: 12px;
}

.phit-chartwrap {
  border: 1px solid #e8ecf0;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  height: 200px;
}

.phit-card-wide .phit-chartwrap { height: 250px; }
.phit-app canvas { width: 100% !important; height: 100% !important; }

.phit-story {
  font-size: 15px;
  line-height: 1.65;
  color: var(--phit-title);
  background: rgba(var(--phit-rgb), 0.04);
  border: 1px solid rgba(var(--phit-rgb), 0.15);
  border-radius: 12px;
  padding: 14px 16px;
}

.phit-tablewrap {
  margin-top: 12px;
  border: 1px solid #e8ecf0;
  border-radius: 12px;
  overflow: hidden;
}

.phit-tablewrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.phit-tablewrap th, .phit-tablewrap td {
  padding: 11px 14px;
  border-bottom: 1px solid #e8ecf0;
}

.phit-tablewrap th {
  text-align: left;
  color: var(--phit-title);
  background: var(--phit-soft);
  font-weight: 700;
  font-size: 12px;
}

/* ─── Breadcrumb ─── */
.phit-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--phit-text);
  opacity: 0.75;
}

.phit-breadcrumb-active {
  color: var(--phit-title);
  font-weight: 600;
  opacity: 1;
}

.phit-breadcrumb-sep {
  color: var(--phit-stroke);
}

/* ─── Refresh stamp ─── */
.phit-refresh-stamp {
  font-size: 12px;
  color: var(--phit-text);
  opacity: 0.6;
  margin-top: 4px;
}

/* ─── Slicer/filter bar ─── */
.phit-slicer-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.phit-slicer-bar:empty { display: none; }

.phit-slicer {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e8ecf0;
  border-radius: 8px;
  padding: 7px 12px;
  background: #fff;
  font-size: 13px;
}

.phit-slicer-label {
  font-weight: 700;
  color: var(--phit-title);
  font-size: 12px;
  white-space: nowrap;
}

.phit-slicer-select {
  border: 1px solid #d0d5da;
  border-radius: 6px;
  padding: 4px 28px 4px 10px;
  font-size: 13px;
  color: var(--phit-title);
  background: var(--phit-soft);
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2355616d'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  transition: border-color 0.15s ease;
}

.phit-slicer-select:hover {
  border-color: rgba(var(--phit-rgb), 0.45);
}

.phit-slicer-select:focus {
  outline: 2px solid rgba(var(--phit-rgb), 0.25);
  outline-offset: 1px;
  border-color: var(--phit);
}

/* ─── Heatmap ─── */
.phit-heatmap-wrap {
  height: auto !important;
  padding: 0 !important;
  overflow-x: auto;
}

.phit-heatmap-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.phit-heatmap-wrap th,
.phit-heatmap-wrap td {
  padding: 7px 10px;
  text-align: center;
  border: 1px solid #e8ecf0;
}

.phit-heatmap-wrap th {
  background: var(--phit-soft);
  color: var(--phit-title);
  font-weight: 700;
}

.phit-heatmap-wrap td {
  font-weight: 600;
  color: var(--phit-title);
}

/* ─── Gauge cluster ─── */
.phit-gauge-cluster-wrap {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-evenly;
  height: 200px !important;
  padding: 8px !important;
}

.phit-mini-gauge {
  flex: 1;
  text-align: center;
  max-width: 140px;
}

.phit-mini-gauge canvas {
  width: 100% !important;
  height: 100px !important;
}

.phit-mini-gauge-label {
  font-size: 12px;
  color: var(--phit-text);
  margin-top: 4px;
}

.phit-mini-gauge-value {
  font-weight: 800;
  font-size: 17px;
  color: var(--phit-title);
}

/* ─── Buttons ─── */
.phit-btn {
  border: 1px solid var(--phit-stroke);
  background: #fff;
  color: var(--phit-title);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.phit-btn-ghost:hover {
  border-color: rgba(var(--phit-rgb), 0.35);
  background: rgba(var(--phit-rgb), 0.05);
}

/* ─── Toast ─── */
.phit-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--phit-stroke);
  background: rgba(255, 255, 255, 0.96);
  color: var(--phit-title);
  font-size: 14px;
  font-family: 'Open Sans', system-ui, sans-serif;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 60;
}

.phit-toast.phit-show {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* ─── Sticky CTA ─── */
.phit-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 16px;
  z-index: 50;
  pointer-events: none;
  font-family: 'Open Sans', system-ui, sans-serif;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.phit-sticky-cta.phit-hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none !important;
}

.phit-sticky-inner {
  pointer-events: auto;
  max-width: 100%;
  margin: 0 16px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(var(--phit-rgb), 0.18);
  background:
    radial-gradient(900px 240px at 10% 0%, rgba(var(--phit-rgb), 0.10), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.93), rgba(255, 255, 255, 0.93));
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.phit-sticky-copy { display: grid; gap: 4px; min-width: 0; }

.phit-sticky-label {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--phit);
  opacity: 0.9;
}

.phit-sticky-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--phit-title);
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phit-sticky-text {
  font-size: 13px;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phit-sticky-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.phit-btn.phit-sticky-primary {
  background: var(--phit);
  border-color: var(--phit);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(var(--phit-rgb), 0.2);
}

.phit-btn.phit-sticky-primary:hover { filter: brightness(0.95); }

.phit-btn.phit-sticky-secondary {
  background: #fff;
  text-decoration: none;
}

.phit-btn.phit-sticky-secondary:hover {
  border-color: rgba(var(--phit-rgb), 0.35);
  background: rgba(var(--phit-rgb), 0.05);
}

.phit-sticky-close {
  border: 1px solid var(--phit-stroke);
  background: rgba(255, 255, 255, 0.9);
  color: var(--phit-title);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phit-sticky-close:hover {
  border-color: rgba(var(--phit-rgb), 0.35);
  background: rgba(var(--phit-rgb), 0.05);
}

/* ─── Mobile ─── */
@media (max-width: 980px) {
  .phit-sticky-inner {
    margin: 0 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .phit-sticky-title, .phit-sticky-text { white-space: normal; }
  .phit-sticky-actions { justify-content: stretch; }
  .phit-sticky-actions .phit-btn { width: 100%; justify-content: center; }
  .phit-sticky-close { width: 100%; }
}

/* ─── Readiness Checklist Overlay ─── */
.phit-checklist-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(26, 35, 48, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: 'Open Sans', system-ui, sans-serif;
  transition: opacity 0.25s ease;
}

.phit-checklist-overlay.phit-hidden {
  opacity: 0;
  pointer-events: none;
}

.phit-checklist-panel {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(var(--phit-rgb), 0.12);
}

.phit-checklist-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 1px solid var(--phit-stroke);
  background: #fff;
  color: var(--phit-title);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phit-checklist-close:hover {
  background: rgba(var(--phit-rgb), 0.06);
  border-color: rgba(var(--phit-rgb), 0.25);
}

.phit-checklist-header {
  text-align: center;
  margin-bottom: 24px;
}

.phit-checklist-icon {
  font-size: 34px;
  margin-bottom: 10px;
}

.phit-checklist-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--phit-title);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.phit-checklist-intro {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--phit-text);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Progress bar */
.phit-checklist-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin-bottom: 6px;
}

.phit-checklist-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--phit);
  transition: width 0.35s ease;
}

.phit-checklist-progress-text {
  font-size: 12px;
  color: var(--phit-text);
  opacity: 0.7;
  text-align: right;
  margin-bottom: 18px;
}

/* Check items */
.phit-checklist-form {
  display: grid;
  gap: 10px;
}

.phit-check-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #eef1f4;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.phit-check-item:hover {
  border-color: rgba(var(--phit-rgb), 0.25);
  background: rgba(var(--phit-rgb), 0.02);
}

.phit-check-item:has(input:checked) {
  border-color: rgba(var(--phit-rgb), 0.35);
  background: rgba(var(--phit-rgb), 0.04);
  box-shadow: 0 0 0 1px rgba(var(--phit-rgb), 0.08);
}

.phit-check-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.phit-check-box {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid var(--phit-stroke);
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  margin-top: 1px;
}

.phit-check-item:has(input:checked) .phit-check-box {
  background: var(--phit);
  border-color: var(--phit);
}

.phit-check-item:has(input:checked) .phit-check-box::after {
  content: '\2713';
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.phit-check-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.phit-check-content strong {
  font-size: 14px;
  color: var(--phit-title);
  font-weight: 700;
  line-height: 1.3;
}

.phit-check-hint {
  font-size: 12.5px;
  color: var(--phit-text);
  opacity: 0.8;
  line-height: 1.4;
}

/* Result area */
.phit-checklist-result {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 14px;
  text-align: center;
  transition: opacity 0.25s ease;
}

.phit-checklist-result.phit-hidden {
  display: none;
}

.phit-checklist-result.phit-result-great {
  background: rgba(21, 128, 61, 0.06);
  border: 1px solid rgba(21, 128, 61, 0.18);
}

.phit-checklist-result.phit-result-good {
  background: rgba(var(--phit-rgb), 0.05);
  border: 1px solid rgba(var(--phit-rgb), 0.15);
}

.phit-checklist-result.phit-result-early {
  background: rgba(146, 112, 10, 0.05);
  border: 1px solid rgba(146, 112, 10, 0.15);
}

.phit-checklist-result-icon {
  font-size: 30px;
  margin-bottom: 8px;
}

.phit-checklist-result-title {
  font-weight: 800;
  font-size: 16px;
  color: var(--phit-title);
  margin-bottom: 6px;
}

.phit-checklist-result-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--phit-text);
}

/* CTA */
.phit-checklist-actions {
  margin-top: 18px;
  text-align: center;
}

.phit-checklist-actions .phit-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  padding: 12px 24px;
}

.phit-checklist-actions .phit-btn.phit-hidden {
  display: none;
}

/* ─── Hidden utility ─── */
.phit-hidden { display: none !important; }

@media (max-width: 640px) {
  .phit-checklist-panel {
    padding: 24px 18px;
    border-radius: 16px;
  }
  .phit-checklist-title { font-size: 19px; }
}


/* ═══════════════════════════════════════════════════════
   MODE CHOOSER — binary button above the tool grid
   ═══════════════════════════════════════════════════════ */

.phit-mode-chooser {
  display: flex;
  gap: 12px;
  padding: 20px 0 8px;
  max-width: 860px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .phit-mode-chooser { flex-direction: column; }
}

.phit-mode-choice {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 20px;
  border: 2px solid var(--phit-stroke);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-family: inherit;
}

.phit-mode-choice:hover {
  border-color: rgba(var(--phit-rgb), 0.4);
  box-shadow: 0 3px 12px rgba(0,0,0,0.07);
}

.phit-mode-choice-active {
  border-color: var(--phit) !important;
  background: rgba(var(--phit-rgb), 0.04) !important;
  box-shadow: 0 0 0 3px rgba(var(--phit-rgb), 0.1) !important;
}

.phit-mode-choice-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--phit-title);
  line-height: 1.2;
}

.phit-mode-choice-desc {
  font-size: 13px;
  color: var(--phit-text);
  opacity: 0.7;
  line-height: 1.4;
}

.phit-mode-choice-active .phit-mode-choice-title {
  color: var(--phit);
}

/* ═══════════════════════════════════════════════════════
   BUILD DASHBOARD wrapper
   ═══════════════════════════════════════════════════════ */

.phit-build-dashboard {
  display: grid;
  gap: 16px;
  animation: phitDashFadeIn 0.25s ease-out;
}

.phit-build-dashboard[hidden] { display: none !important; }

/* Casus info card */
.phit-build-topcard {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--phit-stroke);
  border-radius: 14px;
  box-shadow: var(--phit-shadow);
  flex-wrap: wrap;
}

.phit-build-topcard-left { flex: 1; min-width: 0; }

.phit-build-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--phit-title);
  margin: 4px 0 4px;
}

/* ═══════════════════════════════════════════════════════
   TWO-COLUMN LAYOUT: sidebar + canvas
   ═══════════════════════════════════════════════════════ */

.phit-scratch-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 14px;
  align-items: start;
}

@media (max-width: 820px) {
  .phit-scratch-layout { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════
   WIDGET LIBRARY SIDEBAR
   ═══════════════════════════════════════════════════════ */

.phit-scratch-sidebar {
  background: var(--phit-soft);
  border: 1px solid var(--phit-stroke);
  border-radius: 14px;
  padding: 14px 10px;
  position: sticky;
  top: 16px;
  max-height: 72vh;
  overflow-y: auto;
}

.phit-scratch-sidebar-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--phit-title);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 3px;
}

.phit-scratch-sidebar-hint {
  font-size: 11.5px;
  color: var(--phit-text);
  opacity: 0.65;
  margin: 0 0 10px;
}

/* Section headers inside library */
.phit-lib-section-head {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--phit-text);
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 10px 0 5px;
  padding: 0 2px;
}

.phit-lib-section-head:first-child { margin-top: 0; }

.phit-widget-library {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.phit-widget-lib-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--phit-stroke);
  border-radius: 9px;
  background: #fff;
  cursor: grab;
  user-select: none;
  transition: border-color 0.13s ease, box-shadow 0.13s ease, transform 0.1s ease;
}

.phit-widget-lib-item:hover {
  border-color: rgba(var(--phit-rgb), 0.4);
  box-shadow: 0 2px 7px rgba(0,0,0,0.07);
  transform: translateX(2px);
}

.phit-widget-lib-item:active { cursor: grabbing; transform: scale(0.98); }

/* Coloured dot to distinguish KPI vs chart */
.phit-lib-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.phit-lib-dot-kpi   { background: var(--phit); }
.phit-lib-dot-chart { background: #64748b; }

.phit-widget-lib-body { min-width: 0; }

.phit-widget-lib-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--phit-title);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phit-widget-lib-desc {
  font-size: 11px;
  color: var(--phit-text);
  opacity: 0.6;
  line-height: 1.2;
}

/* ═══════════════════════════════════════════════════════
   BUILD CANVAS
   ═══════════════════════════════════════════════════════ */

.phit-scratch-canvas-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phit-scratch-canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.phit-scratch-canvas-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--phit-title);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.phit-scratch-canvas {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  min-height: 300px;
  padding: 12px;
  border: 2px dashed var(--phit-stroke);
  border-radius: 14px;
  background: rgba(0,0,0,0.01);
  align-content: start;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.phit-scratch-canvas.phit-dragover {
  border-color: var(--phit);
  background: rgba(var(--phit-rgb), 0.03);
}

@media (max-width: 960px) {
  .phit-scratch-canvas { grid-template-columns: 1fr; }
}

/* Empty canvas state */
.phit-scratch-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.phit-scratch-empty-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--phit-title);
  opacity: 0.45;
  margin-bottom: 6px;
}

.phit-scratch-empty-hint {
  font-size: 12.5px;
  color: var(--phit-text);
  opacity: 0.4;
  max-width: 260px;
  line-height: 1.5;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════
   BUILD WIDGETS  (phit-bw-*)
   ═══════════════════════════════════════════════════════ */

.phit-bw {
  background: #fff;
  border: 1px solid var(--phit-stroke);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.14s ease, border-color 0.14s ease;
}

.phit-bw:hover {
  border-color: rgba(var(--phit-rgb), 0.2);
  box-shadow: 0 3px 14px rgba(0,0,0,0.07);
}

.phit-bw-wide { grid-column: 1 / -1; }

.phit-bw.sortable-ghost {
  opacity: 0.25;
  border: 2px dashed var(--phit);
}

.phit-bw.sortable-chosen {
  box-shadow: 0 8px 28px rgba(0,0,0,0.14);
  border-color: var(--phit);
}

/* Toolbar */
.phit-bw-toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-bottom: 1px solid #f0f1f3;
  background: var(--phit-soft);
}

.phit-bw-handle {
  cursor: grab;
  color: var(--phit-text);
  opacity: 0.3;
  font-size: 12px;
  padding: 2px 3px;
  border-radius: 4px;
  user-select: none;
  flex-shrink: 0;
  transition: opacity 0.12s ease;
}

.phit-bw-handle:hover { opacity: 0.75; }

.phit-bw-title-input {
  flex: 1;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 3px 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--phit-title);
  background: transparent;
  font-family: inherit;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.phit-bw-title-input:hover { border-color: var(--phit-stroke); background: #fff; }
.phit-bw-title-input:focus { outline: none; border-color: rgba(var(--phit-rgb), 0.4); background: #fff; }

.phit-bw-type-select {
  font-size: 11px;
  font-weight: 600;
  color: var(--phit-title);
  border: 1px solid var(--phit-stroke);
  border-radius: 5px;
  padding: 3px 20px 3px 6px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%231a2330'/%3E%3C/svg%3E") no-repeat right 5px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  max-width: 120px;
  font-family: inherit;
  transition: border-color 0.12s ease;
}

.phit-bw-type-select:hover { border-color: rgba(var(--phit-rgb), 0.4); }
.phit-bw-type-select:focus { outline: none; border-color: var(--phit); }

.phit-bw-wide-btn {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border: 1px solid var(--phit-stroke);
  border-radius: 5px;
  background: #fff;
  color: var(--phit-text);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.12s ease;
  flex-shrink: 0;
}

.phit-bw-wide-btn:hover {
  border-color: rgba(var(--phit-rgb), 0.35);
  color: var(--phit);
  background: rgba(var(--phit-rgb), 0.05);
}

.phit-bw-delete-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--phit-stroke);
  border-radius: 5px;
  background: #fff;
  color: var(--phit-text);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.12s ease;
}

.phit-bw-delete-btn:hover {
  background: rgba(200,16,46,0.05);
  border-color: rgba(200,16,46,0.3);
  color: #c8102e;
}

/* KPI widget body */
.phit-bw-kpi-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.phit-bw-kpi-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--phit-text);
  opacity: 0.7;
}

.phit-bw-kpi-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--phit-title);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.phit-bw-kpi-trend {
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}

.phit-bw-kpi-note {
  font-size: 11.5px;
  color: var(--phit-text);
  opacity: 0.5;
}

/* Chart widget preview */
.phit-bw-chart-preview {
  height: 200px;
  padding: 10px 12px 8px;
}

.phit-bw-chart-preview canvas {
  width: 100% !important;
  height: 100% !important;
}

.phit-bw-chart-note {
  font-size: 11.5px;
  color: var(--phit-text);
  opacity: 0.55;
  padding: 0 14px 10px;
}

.phit-chart-unavailable {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 12px;
  color: var(--phit-text);
  opacity: 0.4;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════
   ANIMATED KPI COUNTERS + BENCHMARK BADGE
   ═══════════════════════════════════════════════════════ */

.phit-kpi-benchmark {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.06);
  font-size: 11.5px;
  width: fit-content;
}

.phit-kpi-bench-label {
  color: var(--phit-text);
  opacity: 0.6;
  font-weight: 500;
}

.phit-kpi-bench-value {
  font-weight: 700;
  color: var(--phit-title);
}

/* ═══════════════════════════════════════════════════════
   OPEN SANS TYPOGRAPHY REFINEMENTS
   Matching WordPress site: body 400, headings 600/700,
   hero title 60px / line-height 75px / letter-spacing -2px
   ═══════════════════════════════════════════════════════ */

/* Body text — Normal 400, 18px/22px matching WP */
.phit-app {
  font-size: 18px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0;
}

/* Hero title — Semi-Bold 600, large with tight tracking */
.phit-hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* Hero subtitle — 400 weight, comfortable size */
.phit-hero-sub {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
}

/* Panel / canvas headings — 600 */
.phit-panel-title,
.phit-canvas-title {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

/* Card titles — 600 */
.phit-card-title,
.phit-uc-title,
.phit-build-title {
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* KPI values — big, tight like WP hero numbers */
.phit-kpi-value {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

/* KPI labels — 600 */
.phit-kpi-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Step numbers — bold */
.phit-step-title {
  font-weight: 700;
}

/* Muted / secondary text — stays 400 */
.phit-muted,
.phit-smallmuted,
.phit-kpi-note,
.phit-hero-disclaimer {
  font-weight: 400;
}

/* Mode chooser titles — 700 */
.phit-mode-choice-title {
  font-weight: 700;
  font-size: 16px;
}

/* Widget lib labels — 600 */
.phit-widget-lib-label {
  font-weight: 600;
}

/* Sidebar section heads — 700 */
.phit-lib-section-head {
  font-weight: 700;
}

/* Build widget toolbar title input */
.phit-bw-title-input {
  font-weight: 600;
}

/* Buttons — 700 */
.phit-btn {
  font-weight: 700;
}

/* Badge text — 700 */
.phit-badge,
.phit-hero-badge,
.phit-tag {
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════
   FONT SIZE REFINEMENTS — matching WordPress page scale
   Base: 18px body, proportional scale up throughout
   ═══════════════════════════════════════════════════════ */

/* Base override */
.phit-app {
  font-size: 18px;
}

/* Hero title — matches WP large heading */
.phit-hero-title {
  font-size: clamp(28px, 3.5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: normal;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero subtitle */
.phit-hero-sub {
  font-size: 17px;
  line-height: 1.7;
  max-width: 560px;
  color: #6b7a8d;
  margin-bottom: 0;
}

/* Hero disclaimer / small print */
.phit-hero-disclaimer {
  font-size: 16px;
}

/* Steps */
.phit-step-title { font-size: 16px; }
.phit-step-desc  { font-size: 15px; }

/* Panel / canvas headings */
.phit-panel-title,
.phit-canvas-title {
  font-size: 20px;
}

/* Muted meta text */
.phit-muted { font-size: 15px; }

/* Card titles */
.phit-card-title { font-size: 17px; }
.phit-uc-title   { font-size: 20px; }

/* Story text in dashboard */
.phit-story { font-size: 16px; line-height: 1.7; }

/* KPI values */
.phit-kpi-value { font-size: 38px; }
.phit-kpi-label { font-size: 13px; }
.phit-kpi-note  { font-size: 13px; }

/* Badge */
.phit-badge { font-size: 12px; }

/* Slicer selects */
.phit-slicer-select { font-size: 14px; }

/* Table */
.phit-table th,
.phit-table td { font-size: 14px; }

/* Usecase cards */
.phit-ucard-t { font-size: 15px; }
.phit-ucard-d { font-size: 13px; }

/* Group title */
.phit-group-title span:first-child { font-size: 15px; }

/* Mode chooser */
.phit-mode-choice-title { font-size: 17px; }
.phit-mode-choice-desc  { font-size: 15px; }

/* Build dashboard */
.phit-build-title { font-size: 20px; }
.phit-scratch-sidebar-title { font-size: 12px; }
.phit-scratch-sidebar-hint  { font-size: 13px; }
.phit-widget-lib-label { font-size: 13px; }
.phit-widget-lib-desc  { font-size: 12px; }
.phit-lib-section-head { font-size: 11px; }

/* Build widgets */
.phit-bw-kpi-value { font-size: 32px; }
.phit-bw-kpi-label { font-size: 13px; }
.phit-bw-kpi-note  { font-size: 12px; }
.phit-bw-title-input  { font-size: 13px; }
.phit-bw-type-select  { font-size: 12px; }
.phit-bw-wide-btn     { font-size: 12px; }
.phit-bw-delete-btn   { font-size: 12px; }

/* Checklist */
.phit-checklist-title { font-size: 22px; }
.phit-checklist-intro { font-size: 16px; }
.phit-check-content strong { font-size: 16px; }
.phit-check-hint { font-size: 14px; }

/* Sticky CTA */
.phit-sticky-title { font-size: 17px; }
.phit-sticky-text  { font-size: 15px; }

/* Benchmark badge */
.phit-kpi-benchmark { font-size: 13px; }

/* Toast */
.phit-toast { font-size: 14px; }

/* ═══════════════════════════════════════════════════════════════
   AI DASHBOARD GENERATOR — prompt balk in hero sectie
   ═══════════════════════════════════════════════════════════════ */

/* Scheidingslijn */
.phit-gen-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 32px auto 20px;
  max-width: 660px;
  color: var(--phit-text);
  opacity: 0.5;
  font-size: 13px;
}
.phit-gen-divider::before,
.phit-gen-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--phit-stroke);
}

/* Wrapper */
.phit-gen-bar {
  max-width: 700px;
  margin: 0 auto;
  text-align: left;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--phit-stroke);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

/* Label */
.phit-gen-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--phit-title);
  margin-bottom: 10px;
}

/* Invoer-rij */
.phit-gen-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* Tekstgebied */
.phit-gen-textarea {
  flex: 1;
  padding: 12px 14px;
  border: 1.5px solid var(--phit-stroke);
  border-radius: 12px;
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 15px;
  color: var(--phit-title);
  line-height: 1.5;
  resize: none;
  background: #fff;
  min-height: 80px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.phit-gen-textarea:focus {
  outline: none;
  border-color: var(--phit);
  box-shadow: 0 0 0 3px rgba(var(--phit-rgb), 0.10);
}
.phit-gen-textarea::placeholder {
  color: var(--phit-text);
  opacity: 0.45;
}
.phit-gen-textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Knop */
.phit-btn.phit-gen-btn {
  background: var(--phit);
  border-color: var(--phit);
  color: #fff;
  padding: 12px 20px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(var(--phit-rgb), 0.22);
  transition: filter 0.12s ease, transform 0.12s ease;
}
.phit-btn.phit-gen-btn:hover:not(:disabled) {
  filter: brightness(0.93);
  transform: translateY(-1px);
}
.phit-btn.phit-gen-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}

/* Hint tekst */
.phit-gen-hint {
  font-size: 13px;
  color: var(--phit-text);
  opacity: 0.6;
  margin: 8px 0 0;
  text-align: center;
}

/* Inline spinner (in knop) */
.phit-gen-spinner-inline {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: phitGenSpin 0.65s linear infinite;
  flex-shrink: 0;
}

/* Grote spinner (in canvas loader) */
.phit-gen-spinner-large {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(var(--phit-rgb), 0.15);
  border-top-color: var(--phit);
  border-radius: 50%;
  animation: phitGenSpin 0.8s linear infinite;
  flex-shrink: 0;
}

/* Canvas laad-state */
.phit-gen-canvas-loading {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
}

@keyframes phitGenSpin {
  to { transform: rotate(360deg); }
}

/* Mobiel */
@media (max-width: 640px) {
  .phit-gen-row { flex-direction: column; }
  .phit-btn.phit-gen-btn { width: 100%; justify-content: center; }
}

/* ─── Last resort knopje ─── */
.phit-gen-lastresort {
  text-align: center;
  margin-top: 12px;
}
.phit-gen-lastresort-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: #b0bcc8;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.01em;
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}
.phit-gen-lastresort-btn:hover {
  opacity: 1;
  color: #7a8a99;
}

/* ─── Use case paneel (last resort) ─── */
.phit-ucpanel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.phit-ucpanel.phit-ucpanel-open {
  max-height: 2000px;
}
.phit-ucpanel-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 24px 8px;
}
.phit-ucpanel-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
  color: #7a8a99;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.phit-ucpanel-hint {
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #b0bcc8;
}
