/* Reporting Ops — additions on top of /styles.css */

.hh-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: #8b8fa3;
  margin-left: 0.5rem;
}

/* ─── Kanban (Why Content Ops structure) ─── */
.hh-kanban-toolbar {
  margin-bottom: 1rem;
  justify-content: flex-start;
}

.hh-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .hh-board {
    grid-template-columns: 1fr;
  }
}

.hh-column {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  padding: 12px;
  min-height: 280px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.hh-column.drag-over,
.hh-cards.drag-over {
  outline: 2px dashed #e63946;
  outline-offset: 4px;
  border-radius: 10px;
  background: rgba(230, 57, 70, 0.04);
}

.hh-column h3 {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5c6170;
  display: flex;
  justify-content: space-between;
  flex-shrink: 0;
}

.hh-count {
  background: #eef0f4;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  color: #1a1d26;
}

.hh-cards {
  display: grid;
  gap: 8px;
  align-content: start;
  flex: 1;
  min-height: 160px;
}

.hh-card {
  background: #fafbfc;
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  padding: 12px;
  cursor: grab;
  text-align: left;
  width: 100%;
  font: inherit;
  position: relative;
  touch-action: none;
  color: #1a1d26;
}

.hh-card:active {
  cursor: grabbing;
}

.hh-card:hover {
  border-color: #e63946;
}

.hh-card.dragging {
  opacity: 0.45;
  border-style: dashed;
}

.hh-card.drop-before::before,
.hh-card.drop-after::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  height: 3px;
  border-radius: 999px;
  background: #e63946;
  pointer-events: none;
}

.hh-card.drop-before::before {
  top: -6px;
}

.hh-card.drop-after::after {
  bottom: -6px;
}

.hh-card-title {
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 8px;
}

.hh-card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.hh-tag {
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef0f4;
  color: #5c6170;
}

.hh-tag.p1 {
  background: #fde8ea;
  color: #c1121f;
}

.hh-tag.p2 {
  background: #fff4e0;
  color: #a15c00;
}

.hh-tag.p3 {
  background: #e2e6ea;
  color: #5a6470;
}

.hh-due {
  font-size: 11px;
  color: #8b8fa3;
  margin-left: auto;
}

.hh-due.overdue {
  color: #c1121f;
  font-weight: 700;
}

.hh-empty {
  margin: 0;
  padding: 1rem 0.25rem;
  font-size: 0.8rem;
  color: #8b8fa3;
}

.hh-dialog {
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  padding: 0;
  max-width: 480px;
  width: calc(100% - 2rem);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.hh-dialog::backdrop {
  background: rgba(26, 29, 38, 0.35);
}

.hh-dialog form {
  display: grid;
  gap: 0.75rem;
  padding: 1.25rem 1.35rem 1.1rem;
}

.hh-dialog h2 {
  margin: 0;
  font-size: 1.05rem;
}

.hh-dialog label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #8b8fa3;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hh-dialog input,
.hh-dialog select,
.hh-dialog textarea {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #1a1d26;
  padding: 0.45rem 0.55rem;
  border: 1px solid #d5d8e0;
  border-radius: 6px;
  background: #fff;
}

.hh-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.hh-dialog-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.hh-spacer {
  flex: 1;
}

.hh-counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hh-count {
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.hh-count .n {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1a1d26;
  line-height: 1.1;
}

.hh-count .l {
  font-size: 0.72rem;
  font-weight: 600;
  color: #8b8fa3;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}

.hh-count.warn .n {
  color: #c45c16;
}

.hh-count.danger .n {
  color: #e63946;
}

.hh-section {
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.hh-section h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.hh-section .hint {
  font-size: 0.8rem;
  color: #8b8fa3;
  margin-bottom: 1rem;
}

.hh-process {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.hh-stream {
  border: 1px solid #e5e7ec;
  border-radius: 10px;
  padding: 1rem;
  background: #fafbfc;
}

.hh-stream h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #e63946;
  margin-bottom: 0.75rem;
}

.hh-step {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.55rem 0;
  border-bottom: 1px solid #eef0f4;
}

.hh-step:last-child {
  border-bottom: none;
}

.hh-step .body {
  flex: 1;
  min-width: 0;
}

.hh-step .label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1d26;
}

.hh-step .notes {
  font-size: 0.75rem;
  color: #8b8fa3;
  margin-top: 0.15rem;
}

.hh-chip {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #eef0f4;
  color: #5c6170;
  white-space: nowrap;
}

.hh-chip.not_started,
.hh-chip.open,
.hh-chip.unknown {
  background: #eef0f4;
  color: #5c6170;
}

.hh-chip.in_progress {
  background: #e8f0fe;
  color: #1a56db;
}

.hh-chip.done {
  background: #e6f6ed;
  color: #0f7a3f;
}

.hh-chip.blocked,
.hh-chip.missing {
  background: #fde8ea;
  color: #c1121f;
}

.hh-chip.available {
  background: #e6f6ed;
  color: #0f7a3f;
}

.hh-chip.limited {
  background: #fff4e0;
  color: #a15c00;
}

.hh-chip.manual,
.hh-chip.n_a {
  background: #f0e9ff;
  color: #5b3cc4;
}

.hh-goals {
  list-style: none;
}

.hh-goals li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.65rem 0;
  border-bottom: 1px solid #eef0f4;
  font-size: 0.9rem;
}

.hh-goals li:last-child {
  border-bottom: none;
}

.hh-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.hh-toolbar label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #8b8fa3;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hh-toolbar select,
.hh-toolbar input,
.hh-toolbar textarea,
.hh-form input,
.hh-form select,
.hh-form textarea,
.hh-table select,
.hh-table input,
.hh-table textarea {
  font: inherit;
  font-size: 0.82rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid #d5d8e0;
  border-radius: 6px;
  background: #fff;
  color: #1a1d26;
  min-width: 0;
}

.hh-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: end;
}

@media (max-width: 900px) {
  .hh-form {
    grid-template-columns: 1fr;
  }
}

.hh-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hh-form .field span {
  font-size: 0.7rem;
  font-weight: 600;
  color: #8b8fa3;
  text-transform: uppercase;
}

.hh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  border: 1px solid #d5d8e0;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: #1a1d26;
}

.hh-btn:hover {
  background: #f5f6f8;
}

.hh-btn-primary {
  background: #e63946;
  border-color: #e63946;
  color: #fff;
}

.hh-btn-primary:hover {
  background: #d12f3c;
}

.hh-btn-ghost {
  background: transparent;
}

.hh-task-list {
  list-style: none;
}

.hh-task {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem 0;
  border-bottom: 1px solid #eef0f4;
}

.hh-task.done .hh-task-title {
  text-decoration: line-through;
  color: #8b8fa3;
}

.hh-task-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.hh-task-meta {
  font-size: 0.75rem;
  color: #8b8fa3;
  margin-top: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
}

.hh-task-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.hh-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5e7ec;
  border-radius: 8px;
}

.hh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.hh-table th {
  text-align: left;
  background: #f5f6f8;
  padding: 0.55rem 0.65rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #5c6170;
  border-bottom: 1px solid #e5e7ec;
  position: sticky;
  top: 0;
}

.hh-table td {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid #eef0f4;
  vertical-align: top;
}

.hh-table tr:hover td {
  background: #fafbfc;
}

.hh-table textarea {
  width: 100%;
  min-height: 2.2rem;
  resize: vertical;
}

.hh-table select {
  max-width: 9rem;
}

.hh-checklist {
  list-style: none;
}

.hh-checklist li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #eef0f4;
  align-items: start;
}

.hh-questions {
  list-style: disc;
  padding-left: 1.25rem;
}

.hh-questions li {
  margin: 0.4rem 0;
  font-size: 0.88rem;
}

.hh-placeholder {
  padding: 2rem;
  text-align: center;
  color: #8b8fa3;
  font-size: 0.9rem;
}

.hh-placeholder a {
  color: #e63946;
  font-weight: 600;
}

.hh-muted {
  color: #8b8fa3;
  font-size: 0.8rem;
}

.hh-error {
  background: #fde8ea;
  color: #c1121f;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* Floating save toast — never push page content */
.hh-ok,
#toast.hh-ok {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1000;
  background: #1a1d26;
  color: #e6f6ed;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  max-width: min(280px, calc(100vw - 2rem));
}

.hh-ok.hidden,
#toast.hh-ok.hidden {
  display: none;
}

/* ─── Paid metrics workbook (Google Sheets–style) ─── */
.hh-sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 0.75rem;
}

.hh-sheet-head h2 {
  font-size: 1.1rem;
  margin: 0;
}

.hh-sheet-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: flex-end;
}

.hh-sheet-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #8b8fa3;
  text-transform: uppercase;
}

.hh-sheet-filters select,
.hh-sheet-filters input[type='text'],
.hh-sheet-filters input:not([type]) {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: none;
  padding: 0.4rem 0.55rem;
  border: 1px solid #d5d8e0;
  border-radius: 6px;
  min-width: 9rem;
}

.hh-inline-check {
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.4rem !important;
  text-transform: none !important;
  font-size: 0.8rem !important;
  margin-bottom: 0.35rem;
}

.hh-sheet-note {
  background: #eef6ff;
  border: 1px solid #c9ddf5;
  color: #1a4a7a;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.8rem;
  margin: 0 0 0.75rem;
}

.hh-sheet {
  background: #fff;
  border: 1px solid #c7c7c7;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.hh-sheet-scroll {
  overflow: auto;
  max-height: calc(100vh - 280px);
  min-height: 360px;
}

.hh-sheet-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 500;
}

.hh-sheet-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8f9fa;
  color: #3c4043;
  font-weight: 700;
  font-size: 12px;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  white-space: nowrap;
}

.hh-sheet-table td {
  padding: 0;
  border-bottom: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  vertical-align: middle;
  background: #fff;
}

.hh-sheet-table tr:hover td {
  background: #f8fbff;
}

.hh-sheet-table .col-row {
  width: 40px;
  text-align: center;
  color: #80868b;
  background: #f8f9fa !important;
  font-size: 11px;
  padding: 6px 4px;
}

.hh-sheet-table .col-metric {
  width: 18%;
  padding: 8px 10px;
  font-weight: 700;
  color: #202124;
}

.hh-sheet-table .col-kind {
  width: 9%;
  padding: 8px 10px;
  color: #5f6368;
  text-transform: capitalize;
}

.hh-sheet-table .col-source {
  width: 11%;
  padding: 8px 10px;
}

.hh-sheet-table .col-arrow {
  width: 28px;
  text-align: center;
  color: #80868b;
  font-weight: 600;
  background: #f8f9fa !important;
  padding: 6px 0;
}

.hh-sheet-table .col-report {
  width: 14%;
  padding: 8px 10px;
  font-weight: 600;
  color: #137333;
  background: #f7fcf8;
}

.hh-section-row td {
  background: #eef2f6 !important;
  color: #3c4043;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 7px 10px !important;
  border-bottom: 1px solid #dadce0;
}

.hh-row-dimension .col-metric {
  color: #1967d2;
}

.hh-source {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
}

.hh-source-api {
  background: #e8f0fe;
  color: #1967d2;
}

.hh-naming-builder {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hh-naming-slots-wrap {
  overflow-x: auto;
  border: 1px solid #e8eaed;
  border-radius: 8px;
}

.hh-naming-slots {
  min-width: 1200px;
  font-size: 0.78rem;
}

.hh-naming-slots th,
.hh-naming-slots td {
  padding: 0.35rem 0.4rem;
  vertical-align: middle;
}

.hh-naming-num {
  color: #8b8fa3;
  font-weight: 600;
  text-align: center;
}

.hh-naming-cell {
  width: 100%;
  min-width: 4.5rem;
  font-size: 0.78rem;
}

.hh-naming-outputs {
  display: grid;
  gap: 0.75rem;
}

.hh-naming-output label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #5f6368;
  margin-bottom: 0.25rem;
}

.hh-naming-output-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.hh-naming-output-row code {
  flex: 1;
  display: block;
  padding: 0.5rem 0.65rem;
  background: #f8f9fa;
  border-radius: 6px;
  word-break: break-all;
  font-size: 0.8rem;
}

.hh-naming-sheets-help summary {
  cursor: pointer;
  font-weight: 600;
}

.hh-code-block {
  background: #f8f9fa;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  overflow-x: auto;
  white-space: pre-wrap;
}

.hh-source-naming {
  background: #fef7e0;
  color: #b06000;
}

.hh-source-fixed {
  background: #f1f3f4;
  color: #5f6368;
}

.hh-source-manual {
  background: #fce8e6;
  color: #c5221f;
}

.hh-sheet-tab-dim {
  font-weight: 600;
}

.hh-sheet-table .col-api,
.hh-sheet-table .col-raw {
  padding: 8px 10px;
  font-size: 12px;
  color: #202124;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hh-sheet-table .col-api {
  width: 16%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.hh-sheet-table .col-windsor {
  width: 16%;
  padding: 8px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hh-sheet-table .col-windsor code {
  font: inherit;
  background: #e6f4ea;
  color: #137333;
  padding: 2px 5px;
  border-radius: 3px;
}

.hh-sheet-table .col-raw {
  width: 12%;
  color: #5f6368;
}

.hh-sheet-table .col-status {
  width: 12%;
}

.hh-sheet-table .col-fields {
  width: 16%;
  padding: 8px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: #3c4043;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hh-sheet-table .col-limit,
.hh-sheet-table .col-notes {
  width: 18%;
}

.hh-sheet-table .col-auto {
  width: 56px;
  text-align: center;
}

.hh-sheet-table .cell-status {
  padding: 4px 6px;
}

.hh-sheet-table .cell-status select {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
}

.hh-sheet-table .cell-status select:hover,
.hh-sheet-table .cell-status select:focus {
  border-color: #1a73e8;
  background: #fff;
  outline: none;
}

.hh-sheet-table .status-available {
  background: #e6f4ea;
}
.hh-sheet-table .status-available select {
  color: #137333;
}

.hh-sheet-table .status-limited {
  background: #fef7e0;
}
.hh-sheet-table .status-limited select {
  color: #b06000;
}

.hh-sheet-table .status-missing,
.hh-sheet-table .status-manual {
  background: #fce8e6;
}
.hh-sheet-table .status-missing select,
.hh-sheet-table .status-manual select {
  color: #c5221f;
}

.hh-sheet-table .status-unknown {
  background: #f1f3f4;
}
.hh-sheet-table .status-unknown select {
  color: #5f6368;
}

.hh-sheet-table .status-n_a {
  background: #e8f0fe;
}
.hh-sheet-table .status-n_a select {
  color: #1967d2;
}

.hh-sheet-table textarea {
  width: 100%;
  min-height: 36px;
  border: 0;
  resize: vertical;
  padding: 8px 10px;
  font: inherit;
  font-size: 12px;
  background: transparent;
  color: #202124;
}

.hh-sheet-table textarea:focus {
  outline: 2px solid #1a73e8;
  outline-offset: -2px;
  background: #fff;
}

.hh-sheet-table input[type='checkbox'] {
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.hh-sheet-empty {
  padding: 2rem !important;
  text-align: center;
  color: #80868b;
  border: 0 !important;
}

.hh-sheet-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: #f8f9fa;
  border-bottom: 1px solid #c7c7c7;
  padding: 0 4px;
  min-height: 36px;
  align-items: flex-end;
  position: sticky;
  top: 0;
  z-index: 5;
}

.hh-sheet-tab {
  appearance: none;
  border: 1px solid transparent;
  border-bottom: 0;
  background: transparent;
  color: #3c4043;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px 9px;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  margin: 4px 2px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hh-sheet-tab:hover {
  background: #e8eaed;
}

.hh-sheet-tab.active {
  background: #fff;
  border-color: #c7c7c7;
  color: #188038;
  margin-bottom: -1px;
  padding-bottom: 10px;
  box-shadow: none;
  position: relative;
  top: 0;
}

.hh-tab-badge {
  background: #fce8e6;
  color: #c5221f;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 6px;
  min-width: 1.1rem;
  text-align: center;
}

/* ─── Example input → output (below mapping sheet) ─── */
.hh-io-examples,
.hh-output-example {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #dadce0;
}

/* ─── Ad name fragment map (Inputs) ─── */
.hh-fragment-map {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem 1rem;
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: #fafafa;
}

.hh-fragment-map > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  font-size: 0.95rem;
}

.hh-fragment-map > summary::-webkit-details-marker {
  display: none;
}

.hh-fragment-map > summary::before {
  content: '▸';
  color: #5f6368;
  font-size: 0.75rem;
}

.hh-fragment-map[open] > summary::before {
  content: '▾';
}

.hh-fragment-map-body {
  margin-top: 0.85rem;
}

.hh-fragment-example {
  margin: 0.5rem 0 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hh-fragment-example code {
  display: block;
  padding: 0.55rem 0.7rem;
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.4;
  word-break: break-all;
  white-space: pre-wrap;
}

.hh-fragment-callouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.hh-fragment-callout {
  padding: 0.65rem 0.75rem;
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.hh-fragment-callout strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #5f6368;
}

.hh-fragment-callout p {
  margin: 0 0 0.35rem;
}

.hh-fragment-callout ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.hh-fragment-table {
  font-size: 12px;
}

.hh-fragment-table th,
.hh-fragment-table td {
  vertical-align: top;
}

.hh-frag-dyn,
.hh-frag-unused {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hh-frag-dyn {
  background: #e6f4ea;
  color: #137333;
}

.hh-frag-unused {
  background: #f1f3f4;
  color: #5f6368;
}

.hh-frag-row-unused {
  opacity: 0.72;
}

.hh-reporting-col-list {
  margin: 0.35rem 0 0;
  padding-left: 1.25rem;
  columns: 2;
  column-gap: 2rem;
  font-size: 13px;
  line-height: 1.45;
}

.hh-reporting-col-list li {
  break-inside: avoid;
  margin-bottom: 0.25rem;
}

@media (max-width: 800px) {
  .hh-reporting-col-list {
    columns: 1;
  }
}

.hh-io-block {
  margin-bottom: 1.25rem;
}

.hh-output-example-head {
  margin-bottom: 0.85rem;
}

.hh-output-example-head h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  color: #202124;
}

.hh-output-example-head .hint {
  max-width: 72rem;
  line-height: 1.45;
}

.hh-io-arrow {
  margin: 0.35rem 0 1.25rem;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #5f6368;
  letter-spacing: 0.02em;
}

.hh-output-sheet {
  max-height: none;
}

.hh-io-scroll {
  max-height: 380px;
  overflow: auto;
  border: 1px solid #dadce0;
  border-radius: 4px;
}

.hh-output-table {
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

.hh-output-table th,
.hh-output-table td {
  overflow: visible;
  text-overflow: unset;
}

.hh-output-table th.col-out-dim,
.hh-output-table th.col-out-metric {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.35;
  border-bottom: 1px solid #c7c7c7;
  border-right: 1px solid #e0e0e0;
  vertical-align: bottom;
  text-transform: none;
}

.hh-output-table th.col-out-dim {
  background: #e8f0fe;
  color: #1967d2;
}

.hh-output-table th.col-out-metric {
  background: #e6f4ea;
  color: #137333;
}

.hh-output-table th.col-row,
.hh-output-table td.col-row {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 44px;
  background: #f8f9fa !important;
}

.hh-output-table th.col-row {
  z-index: 4;
}

.hh-output-table td.col-out-dim,
.hh-output-table td.col-out-metric {
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  border-right: 1px solid #eee;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
  color: #202124;
}

.hh-output-table td.hh-out-adname {
  max-width: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #3c4043;
}

.hh-output-table td.hh-out-key {
  font-weight: 800;
}

.hh-output-table td.hh-out-targeting {
  min-width: 11.5rem;
}

.hh-output-table td.hh-out-platform,
.hh-output-table td.hh-out-location,
.hh-output-table td.hh-out-boosted,
.hh-output-table td.hh-out-asset {
  min-width: 5.5rem;
}

.hh-output-table tr.hh-out-fb td.hh-out-platform {
  color: #1877f2;
}

.hh-output-table tr.hh-out-ig td.hh-out-platform {
  color: #c13584;
}

.hh-output-table tr.hh-out-fb:hover td {
  background: #f0f6ff;
}

.hh-output-table tr.hh-out-ig:hover td {
  background: #fdf2f8;
}

.hh-input-table th.col-out-dim {
  background: #f1f3f4;
  color: #3c4043;
}

.hh-io-notes {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  max-width: 56rem;
}

.hh-io-notes h4 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  color: #202124;
}

.hh-io-notes ul {
  margin: 0;
  padding-left: 1.15rem;
}

.hh-io-notes li {
  margin: 0.55rem 0;
  line-height: 1.5;
  color: #3c4043;
  font-size: 13px;
}

.hh-io-notes li strong {
  color: #202124;
  display: inline;
}

/* ─── Editable surfaces ─── */
.hh-cell-input {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
  padding: 8px 10px;
  color: #202124;
  min-width: 0;
}

.hh-cell-input:focus {
  outline: 2px solid #1a73e8;
  outline-offset: -2px;
  background: #fff;
}

.hh-cell-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}

.hh-header-input {
  font-weight: 600;
  font-size: 11px;
  padding: 4px 6px;
}

.hh-btn-icon {
  appearance: none;
  border: 0;
  background: transparent;
  color: #9aa0a6;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

.hh-btn-icon:hover {
  color: #e63946;
  background: #fce8ea;
}

.hh-sheet-table .col-actions {
  width: 36px;
  text-align: center;
  padding: 4px !important;
}

.hh-sheet-table select[data-field='sourceType'],
.hh-sheet-table select[data-field='inputKind'] {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 11px;
  padding: 6px 4px;
  cursor: pointer;
}

.hh-sheet-table select[data-field='sourceType']:focus,
.hh-sheet-table select[data-field='inputKind']:focus {
  outline: 2px solid #1a73e8;
  outline-offset: -2px;
  background: #fff;
}

.hh-page-blurb {
  width: 100%;
  margin-top: 0.35rem;
  font: inherit;
  font-size: 0.9rem;
  color: #5f6368;
  border: 1px solid #e5e7ec;
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  resize: vertical;
  background: #fff;
}

.hh-sheet-note {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0.5rem 0 0.75rem;
  font: inherit;
  font-size: 0.85rem;
  resize: vertical;
}

.hh-api-label-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.35rem 0 0.5rem;
  max-width: 28rem;
}

.hh-api-label-wrap .hh-cell-input {
  border: 1px solid #e5e7ec;
  border-radius: 6px;
  background: #fff;
  padding: 0.4rem 0.55rem;
}

.hh-inline-edit {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-size: 0.9rem;
  padding: 0.35rem 0.45rem;
  background: transparent;
}

.hh-inline-edit:hover,
.hh-inline-edit:focus {
  border-color: #d5d8e0;
  background: #fff;
  outline: none;
}

.hh-step-label {
  font-weight: 600;
  font-size: 0.95rem;
}

.hh-step-actions,
.hh-stream-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hh-stream-head {
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.hh-stream-head h3 {
  margin: 0;
}

.hh-checklist li,
.hh-q-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.hh-ex-title {
  display: block;
  width: 100%;
  border: 0;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.25rem 0;
  background: transparent;
  color: #202124;
}

.hh-ex-blurb {
  display: block;
  width: 100%;
  border: 1px solid #e5e7ec;
  border-radius: 6px;
  font: inherit;
  font-size: 0.85rem;
  color: #5f6368;
  padding: 0.45rem 0.55rem;
  margin-top: 0.35rem;
  resize: vertical;
  background: #fff;
}

.hh-ex-note {
  list-style: none;
  margin-left: -1.15rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
  display: grid;
  gap: 0.35rem;
}

.hh-ex-note textarea {
  width: 100%;
  font: inherit;
  font-size: 13px;
  border: 1px solid #e5e7ec;
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  resize: vertical;
}

/* ─── Campaign Structure (visual flow) ─── */
.hh-cs-explainer {
  background: #fafbfc;
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  padding: 1rem 1.15rem 1.15rem;
  margin: 0 0 1.25rem;
}

.hh-cs-explainer h3 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1d26;
}

.hh-cs-explainer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.25rem;
}

@media (max-width: 800px) {
  .hh-cs-explainer-grid {
    grid-template-columns: 1fr;
  }
}

.hh-cs-explainer-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b8fa3;
}

.hh-cs-explainer p:not(.hh-cs-explainer-kicker) {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #3c4043;
}

.hh-cs-explainer strong {
  color: #1a1d26;
  font-weight: 700;
}

.hh-cs-code-line {
  margin: 0 0 0.9rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #3c4043;
}

.hh-cs-code-line code,
.hh-cs-rule code,
.hh-cs-map code,
.hh-cs-name {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  background: #eef0f4;
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
}

.hh-cs-map {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7ec;
}

.hh-cs-map h4 {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5c6170;
}

.hh-cs-ex-wrap {
  margin: 0 0 1.25rem;
}

.hh-cs-ex {
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  padding: 0.9rem 1rem 1rem;
  margin: 0 0 0.75rem;
}

.hh-cs-ex-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b8fa3;
}

.hh-cs-ex-full {
  margin: 0 0 0.85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #1a1d26;
  word-break: break-all;
}

.hh-cs-bits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hh-cs-bit {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.4rem 0.5rem;
  background: #f4f5f7;
  border-radius: 8px;
  min-width: 4.5rem;
}

.hh-cs-bit-maps {
  background: #eaf7ef;
  box-shadow: inset 0 0 0 1px #c8e6d3;
}

.hh-cs-bit-token {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: #1a1d26;
}

.hh-cs-bit-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8b8fa3;
}

.hh-cs-bit-to {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f6b3c;
}

.hh-cs-map-scroll {
  overflow-x: auto;
}

.hh-cs-map-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.hh-cs-map-table th,
.hh-cs-map-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #eef0f4;
}

.hh-cs-map-table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8b8fa3;
  font-weight: 700;
}

.hh-cs-map-table td:first-child {
  font-weight: 700;
  color: #1a1d26;
}

.hh-cs-map-table-simple td:first-child {
  font-weight: 500;
}

.hh-cs-map-from,
.hh-cs-map-to {
  display: block;
  font-weight: 700;
  color: #1a1d26;
}

.hh-cs-map-to {
  color: #0f6b3c;
}

.hh-cs-map-sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #5c6170;
  line-height: 1.35;
}

.hh-cs-map-level {
  white-space: nowrap;
  color: #5c6170;
  font-size: 0.78rem;
}

.hh-cs-names {
  margin-top: 1rem;
  display: grid;
  gap: 0.4rem;
}

.hh-cs-name {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  padding: 0.45rem 0.6rem;
}

.hh-cs-platform-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
}

.hh-cs-ptab {
  appearance: none;
  border: 1px solid #e5e7ec;
  background: #fff;
  color: #3c4043;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}

.hh-cs-ptab:hover:not([disabled]) {
  border-color: #c7c7c7;
  background: #f8f9fa;
}

.hh-cs-ptab.active {
  background: #1a1d26;
  border-color: #1a1d26;
  color: #fff;
}

.hh-cs-ptab[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.hh-cs-soon {
  font-weight: 500;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
  margin-left: 0.25rem;
}

.hh-cs-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.75rem;
}

.hh-cs-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  border: 1px solid transparent;
}

.hh-cs-pill-campaign {
  background: #fff1f0;
  color: #c62828;
  border-color: #ffcdd2;
}

.hh-cs-pill-surface {
  background: #eef6ff;
  color: #1565c0;
  border-color: #bbdefb;
}

.hh-cs-pill-adset {
  background: #f3e8ff;
  color: #6a1b9a;
  border-color: #e1bee7;
}

.hh-cs-pill-ad {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #c8e6c9;
}

.hh-cs-flow-arrow {
  color: #9aa0a6;
  font-weight: 700;
}

.hh-cs-rule {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border: 1px solid #e5e7ec;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #3c4043;
  max-width: 52rem;
}

.hh-cs-rule a,
.hh-cs-code-line a {
  color: #1a73e8;
  font-weight: 700;
}

.hh-cs-lookup {
  background: #eef4ff;
  border-color: #d0e0fb;
}

.hh-cs-s2-compare {
  background: #fff8e6;
  border-color: #f0dfa8;
  max-width: 52rem;
  margin: 0 auto 1.25rem;
}

.hh-cs-objectives-s1 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 800px) {
  .hh-cs-objectives-s1 {
    grid-template-columns: 1fr;
  }
}

.hh-cs-objectives-s1-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hh-cs-s1-structure {
  margin-bottom: 1.25rem;
}

.hh-cs-s1-flow {
  max-width: 640px;
  margin: 0 auto;
}

.hh-cs-s1-adset-block {
  width: min(100%, 560px);
  padding: 0.85rem 1rem 0.5rem;
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 14px;
}

.hh-cs-s1-block-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b8fa3;
  text-align: center;
}

.hh-cs-s1-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.hh-cs-s1-pair-single {
  grid-template-columns: 1fr;
  max-width: 220px;
  margin: 0 auto 0.35rem;
}

.hh-cs-s1-pair-note,
.hh-cs-s1-repeat {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #8b8fa3;
  text-align: center;
}

.hh-cs-s1-adset {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid #e5e7ec;
  background: #f8f9fa;
  text-align: center;
}

.hh-cs-s1-adset-facebook {
  background: #eef3ff;
  border-color: #c8d8f8;
}

.hh-cs-s1-adset-instagram {
  background: #fceef6;
  border-color: #f0c8e0;
}

.hh-cs-s1-adset-interest {
  background: #eef4ff;
  border-color: #c8d8f8;
}

.hh-cs-s1-adset-rtg {
  background: #eaf7ef;
  border-color: #c8e6d3;
}

.hh-cs-s1-adset-lal {
  background: #fff8e6;
  border-color: #f0dfa8;
}

.hh-cs-s1-pair-three {
  grid-template-columns: 1fr 1fr 1fr;
}

.hh-cs-s1-adset-platform {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8b8fa3;
}

.hh-cs-s1-adset-label {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1a1d26;
}

.hh-cs-s1-ads-node {
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 14px;
  padding: 0.85rem 1.25rem;
  text-align: center;
  min-width: 220px;
  max-width: 420px;
}

.hh-cs-trunk-short {
  height: 18px;
}

.hh-cs-s1-bullets {
  margin: 0 0 1.25rem;
  padding: 0 0 0 1.15rem;
  max-width: 52rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #3c4043;
}

.hh-cs-s1-bullets li {
  margin: 0 0 0.4rem;
}

.hh-cs-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .hh-cs-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hh-cs-stat {
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  text-align: center;
}

.hh-cs-stat .n {
  font-size: 1.6rem;
  font-weight: 800;
  color: #e63946;
  line-height: 1.1;
}

.hh-cs-stat .l {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #1a1d26;
  line-height: 1.25;
}

.hh-cs-stat .l span {
  font-weight: 500;
  color: #8b8fa3;
}

.hh-cs-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1d26;
}

.hh-cs-section-title span {
  color: #e63946;
}

.hh-cs-locations {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1100px) {
  .hh-cs-locations {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hh-cs-loc {
  appearance: none;
  border: 1px solid #e5e7ec;
  background: #fff;
  border-radius: 12px;
  padding: 0.7rem 0.5rem;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.hh-cs-loc:hover {
  border-color: #ffcdd2;
  transform: translateY(-1px);
}

.hh-cs-loc.active {
  border-color: #e63946;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
  background: #fff8f8;
}

.hh-cs-loc-kicker {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8b8fa3;
}

.hh-cs-loc-code {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #1a1d26;
}

.hh-cs-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0.5rem 0 2rem;
}

.hh-cs-campaign-node {
  background: linear-gradient(180deg, #fff 0%, #fff8f8 100%);
  border: 2px solid #e63946;
  border-radius: 16px;
  padding: 1rem 1.75rem;
  text-align: center;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(230, 57, 70, 0.1);
}

.hh-cs-node-kicker {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #e63946;
}

.hh-cs-campaign-node strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.75rem;
  font-weight: 800;
  color: #1a1d26;
}

.hh-cs-node-sub {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: #8b8fa3;
}

.hh-cs-trunk {
  width: 3px;
  height: 28px;
  background: #d5d8e0;
  border-radius: 2px;
}

.hh-cs-branch {
  width: min(100%, 920px);
  position: relative;
}

.hh-cs-branch-line {
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 3px;
  background: #d5d8e0;
  border-radius: 2px;
}

.hh-cs-branch-line::before,
.hh-cs-branch-line::after {
  content: '';
  position: absolute;
  top: 0;
  width: 3px;
  height: 20px;
  background: #d5d8e0;
  border-radius: 2px;
}

.hh-cs-branch-line::before {
  left: 0;
}

.hh-cs-branch-line::after {
  right: 0;
}

.hh-cs-surfaces {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  padding-top: 20px;
}

@media (max-width: 800px) {
  .hh-cs-surfaces {
    grid-template-columns: 1fr;
  }

  .hh-cs-branch-line {
    display: none;
  }
}

.hh-cs-surface {
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.hh-cs-surface-facebook {
  border-top: 3px solid #1877f2;
}

.hh-cs-surface-instagram {
  border-top: 3px solid #e1306c;
}

.hh-cs-surface-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.hh-cs-surface-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1a1d26;
}

.hh-cs-surface-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: #f5f6f8;
  color: #5f6368;
}

.hh-cs-surface-facebook .hh-cs-surface-badge {
  background: #e8f0fe;
  color: #1967d2;
}

.hh-cs-surface-instagram .hh-cs-surface-badge {
  background: #fce4ec;
  color: #c2185b;
}

.hh-cs-surface-sub {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  color: #8b8fa3;
}

.hh-cs-adsets {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.hh-cs-adset {
  border: 1px solid #eceff3;
  border-radius: 10px;
  background: #fafbfc;
  overflow: hidden;
}

.hh-cs-adset.open {
  background: #fff;
  border-color: #d7c4e8;
}

.hh-cs-adset-head {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.4rem;
  align-items: baseline;
  text-align: left;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  font: inherit;
}

.hh-cs-adset-name {
  font-weight: 800;
  font-size: 0.85rem;
  color: #6a1b9a;
}

.hh-cs-adset-full {
  font-size: 0.72rem;
  color: #8b8fa3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hh-cs-chevron {
  color: #9aa0a6;
  font-size: 0.8rem;
}

.hh-cs-ads {
  border-top: 1px solid #eee;
  padding: 0.65rem 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.hh-cs-ads-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8b8fa3;
}

.hh-cs-ad {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.55rem 0.65rem;
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  border-radius: 8px;
}

.hh-cs-ad-kind {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #2e7d32;
  background: #fff;
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
}

.hh-cs-ad-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a1d26;
}

.hh-cs-ad-ex {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: #5f6368;
  word-break: break-all;
}

.hh-cs-ads-note {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: #8b8fa3;
}

.hh-cs-surface-tiktok {
  border-top: 3px solid #111111;
}

.hh-cs-surface-tiktok .hh-cs-surface-badge {
  background: #f0f0f0;
  color: #111;
}

.hh-cs-surface-reddit {
  border-top: 3px solid #ff4500;
}

.hh-cs-surface-reddit .hh-cs-surface-badge {
  background: #fff3e8;
  color: #c93400;
}

.hh-cs-branch-single .hh-cs-trunk + .hh-cs-branch,
.hh-cs-surfaces-single {
  max-width: 420px;
  margin: 0 auto;
}

.hh-cs-surfaces-single {
  grid-template-columns: 1fr;
  width: 100%;
}

.hh-cs-ad-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.hh-cs-ad-group .hh-cs-ads-label {
  margin-bottom: 0.15rem;
}

.hh-cs-ad-group-podcast .hh-cs-ad {
  background: #eef6ff;
  border-color: #bbdefb;
}

.hh-cs-ad-group-podcast .hh-cs-ad-kind {
  color: #1565c0;
}

.hh-cs-objectives {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0 0 0.75rem;
}

@media (max-width: 900px) {
  .hh-cs-objectives {
    grid-template-columns: 1fr 1fr;
  }
}

.hh-cs-obj {
  appearance: none;
  border: 1px solid #e5e7ec;
  background: #fff;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.hh-cs-obj:hover {
  border-color: #ffcdd2;
}

.hh-cs-obj.active {
  border-color: #e63946;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
  background: #fff8f8;
}

.hh-cs-obj-label {
  display: block;
  font-weight: 800;
  font-size: 0.95rem;
  color: #1a1d26;
}

.hh-cs-obj-why {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #8b8fa3;
  line-height: 1.3;
}

.hh-cs-obj-note {
  margin: 0 0 1.25rem;
  font-size: 0.85rem;
  color: #5f6368;
  max-width: 48rem;
}

.hh-cs-surface-youtube {
  border-top: 3px solid #ff0000;
}

.hh-cs-surface-youtube .hh-cs-surface-badge {
  background: #ffe8e8;
  color: #c62828;
}

.hh-cs-ad-short {
  background: #fff5f5 !important;
  border-color: #ffcdd2 !important;
}

.hh-cs-ad-short .hh-cs-ad-kind {
  color: #c62828;
}

.hh-cs-ad-trailer {
  background: #fff8e1 !important;
  border-color: #ffe082 !important;
}

.hh-cs-ad-trailer .hh-cs-ad-kind {
  color: #f57f17;
}

.hh-cs-name-examples {
  margin: 0.75rem auto 0.25rem;
  max-width: 920px;
  width: 100%;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border: 1px solid #e5e7ec;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #3c4043;
}

.hh-cs-name-examples p {
  margin: 0.25rem 0;
  word-break: break-all;
}

.hh-cs-name-examples code {
  font-size: 0.72rem;
  color: #1a1d26;
}

/* ─── Process visualization (as-is / to-be) ─── */
.hh-proc-mode {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #eef0f4;
  border-radius: 999px;
  margin: 0 0 1.25rem;
}

.hh-proc-mode-btn {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #5c6170;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}

.hh-proc-mode-btn:hover {
  color: #1a1d26;
}

.hh-proc-mode-btn.active {
  background: #fff;
  color: #1a1d26;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.hh-proc-scope-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.hh-proc-scope-btn {
  border: 1px solid #e5e7ec;
  background: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  color: #5c6170;
}

.hh-proc-scope-btn.active {
  border-color: #e63946;
  color: #e63946;
  background: rgba(230, 57, 70, 0.04);
}

.hh-proc-scope-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.hh-proc-cadence {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: linear-gradient(135deg, #1a1d26 0%, #2c3140 100%);
  color: #f5f6f8;
  border-radius: 14px;
  padding: 1.1rem 1.35rem;
  margin-bottom: 1.75rem;
}

.hh-proc-cadence-badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #e63946;
  color: #fff;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  margin-top: 0.15rem;
}

.hh-proc-cadence p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #d5d8e0;
}

.hh-proc-cadence strong {
  color: #fff;
  font-weight: 700;
}

.hh-proc-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: #1a1d26;
}

.hh-proc-section-title span {
  font-weight: 500;
  color: #8b8fa3;
  font-size: 0.8rem;
  margin-left: 0.4rem;
}

.hh-proc-stages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0.5rem;
  align-items: stretch;
}

@media (max-width: 960px) {
  .hh-proc-stages {
    grid-template-columns: 1fr;
  }

  .hh-proc-connector {
    height: 1.5rem;
    justify-content: center;
  }

  .hh-proc-connector span {
    width: 2px;
    height: 100%;
  }

  .hh-proc-connector span::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #c5c9d4;
  }
}

.hh-proc-stage {
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 14px;
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  display: flex;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

.hh-proc-stage::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #e63946;
  opacity: 0.85;
}

.hh-proc-stage-num {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #1a1d26;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.hh-proc-stage-body {
  flex: 1;
  min-width: 0;
}

.hh-proc-stage-body h4 {
  margin: 0.35rem 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1d26;
}

.hh-proc-stage-body p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #5c6170;
}

.hh-proc-stage-body a {
  color: #e63946;
  font-weight: 600;
  text-decoration: none;
}

.hh-proc-stage-body a:hover {
  text-decoration: underline;
}

.hh-proc-stage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.hh-proc-pill {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}

.hh-proc-pill-manual {
  background: #fff1f0;
  color: #c62828;
}

.hh-proc-pill-cadence {
  background: #eef0f4;
  color: #5c6170;
}

.hh-proc-pill-month {
  background: #e8f0fe;
  color: #1a56db;
}

.hh-proc-output {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #e5e7ec;
}

.hh-proc-output-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b8fa3;
}

.hh-proc-output-value {
  font-size: 0.78rem;
  font-weight: 600;
  color: #1a1d26;
  background: #f4f5f8;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
}

.hh-proc-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
}

.hh-proc-connector span {
  display: block;
  width: 100%;
  height: 2px;
  background: #c5c9d4;
  position: relative;
}

.hh-proc-connector span::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: #c5c9d4;
}

.hh-proc-example {
  margin-top: 1.5rem;
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 14px;
  padding: 1.15rem 1.25rem 1.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.hh-proc-example-head h4 {
  margin: 0 0 0.2rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.hh-proc-example-head p {
  margin: 0 0 0.9rem;
  font-size: 0.75rem;
  color: #8b8fa3;
}

.hh-proc-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid #e5e7ec;
}

.hh-proc-pacing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 960px;
  table-layout: fixed;
}

.hh-proc-pacing-table thead th {
  background: #6b3fa0;
  color: #fff;
  text-align: left;
  padding: 0.65rem 0.85rem;
  font-weight: 700;
  font-size: 0.75rem;
}

.hh-proc-pacing-table tbody td {
  padding: 0.45rem 0.55rem;
  border-top: 1px solid #eef0f4;
  color: #1a1d26;
  background: #fff;
  vertical-align: top;
}

.hh-proc-col-deliverable {
  width: 38%;
}

.hh-proc-col-kpi {
  width: 12%;
}

.hh-proc-col-metric {
  width: 14%;
}

.hh-proc-col-results {
  width: 14%;
}

.hh-proc-col-pctVsKpi {
  width: 12%;
}

.hh-proc-editable .hh-proc-cell-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  color: inherit;
  padding: 0.35rem 0.4rem;
  border-radius: 4px;
  min-width: 0;
}

.hh-proc-editable .hh-proc-cell-deliverable {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  resize: vertical;
  min-height: 2.6em;
  line-height: 1.35;
  field-sizing: content;
}

.hh-proc-editable .hh-proc-cell-input:hover,
.hh-proc-editable .hh-proc-cell-input:focus {
  border-color: #d5d8e0;
  background: #fff;
  outline: none;
}

.hh-proc-editable td.hh-proc-cell-result {
  background: #fff9c4;
}

.hh-proc-editable td.hh-proc-cell-pct {
  background: #c8e6c9;
}

.hh-proc-row-actions {
  width: 2.5rem;
  text-align: center;
  background: #fff !important;
}

.hh-proc-cell-strong textarea,
.hh-proc-cell-strong input {
  font-weight: 700;
}

.hh-proc-cell-result {
  background: #fff9c4 !important;
  font-weight: 600;
}

.hh-proc-cell-pct {
  background: #c8e6c9 !important;
  font-weight: 700;
  color: #1b5e20;
}

.hh-proc-example-note {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: #8b8fa3;
}

.hh-proc-monthly {
  margin-top: 1.75rem;
  padding: 1.15rem;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(232, 240, 254, 0.55) 0%, rgba(255, 255, 255, 0.9) 40%),
    #f7f8fb;
  border: 1px solid #d6e3f8;
}

.hh-proc-monthly-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.hh-proc-monthly-label span {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #1a56db;
  color: #fff;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
}

.hh-proc-monthly-label strong {
  font-size: 0.9rem;
  color: #1a1d26;
}

.hh-proc-monthly-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 720px) {
  .hh-proc-monthly-grid {
    grid-template-columns: 1fr;
  }

  .hh-proc-cadence {
    flex-direction: column;
    gap: 0.65rem;
  }
}

.hh-proc-stage-monthly::before {
  background: #1a56db;
}

.hh-proc-stage-monthly .hh-proc-stage-num {
  background: #1a56db;
}

.hh-proc-await {
  margin: 0.65rem 0 0 !important;
  font-size: 0.72rem !important;
  font-style: italic;
  color: #1a56db !important;
}

.hh-proc-summary {
  margin-top: 1.75rem;
  margin-bottom: 2rem;
}

.hh-proc-one-liner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.35rem;
  margin: 0;
  padding: 1rem 1.15rem;
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a1d26;
}

.hh-proc-one-liner em {
  font-style: normal;
  color: #e63946;
  font-weight: 700;
  padding: 0 0.15rem;
}

.hh-proc-one-liner span {
  background: #f4f5f8;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
}

.hh-proc-soon {
  background: #fff;
  border: 1px dashed #c5c9d4;
  border-radius: 14px;
  padding: 2rem 1.5rem;
  text-align: center;
  max-width: 560px;
  margin: 1rem auto 2rem;
}

.hh-proc-soon h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.hh-proc-soon p {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: #5c6170;
  line-height: 1.5;
}

.hh-proc-doc-anatomy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 720px) {
  .hh-proc-doc-anatomy {
    grid-template-columns: 1fr;
  }
}

.hh-proc-doc-block {
  background: #f7f8fb;
  border: 1px solid #e5e7ec;
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.hh-proc-doc-kicker {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e63946;
  margin-bottom: 0.25rem;
}

.hh-proc-doc-block strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.25rem;
  color: #1a1d26;
}

.hh-proc-doc-block p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #5c6170;
}

.hh-proc-section-row td {
  background: #eef0f4 !important;
  font-weight: 700;
  font-size: 0.75rem;
  text-align: center;
  letter-spacing: 0.02em;
  color: #1a1d26;
  padding: 0.55rem 0.85rem !important;
}

.hh-proc-total-row td {
  background: #fafbfc !important;
  border-top: 2px solid #e5e7ec !important;
  font-weight: 600;
}

.hh-proc-monthly-grid-single {
  grid-template-columns: 1fr;
  max-width: 560px;
}

.hh-proc-meta-edit {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}

@media (max-width: 900px) {
  .hh-proc-meta-edit {
    grid-template-columns: 1fr 1fr;
  }
}

.hh-proc-meta-edit label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8b8fa3;
}

.hh-proc-meta-edit .hh-inline-edit {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: #1a1d26;
}

.hh-proc-meta-wide {
  grid-column: 1 / -1;
}

.hh-proc-table-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1rem 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1a1d26;
}


/* ─── Excel-like column resize ─── */
th.hh-col-resize {
  position: relative;
}

.hh-col-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  width: 9px;
  height: 100%;
  cursor: col-resize;
  z-index: 5;
  user-select: none;
  touch-action: none;
}

.hh-col-resize-handle::after {
  content: '';
  position: absolute;
  top: 20%;
  bottom: 20%;
  left: 3px;
  width: 2px;
  border-radius: 1px;
  background: transparent;
}

.hh-col-resize-handle:hover::after,
.hh-col-resizing .hh-col-resize-handle:hover::after,
th.hh-col-resize:hover > .hh-col-resize-handle::after {
  background: rgba(255, 255, 255, 0.55);
}

table.hh-col-resizing {
  cursor: col-resize;
}

body.hh-col-resizing,
body.hh-col-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

/* Prefer measured / resized widths over fixed % column CSS */
.hh-sheet-table .hh-col-resize-group col,
.hh-proc-pacing-table .hh-col-resize-group col,
.hh-output-table .hh-col-resize-group col,
.hh-table .hh-col-resize-group col {
  box-sizing: border-box;
}

/* Once columns are user-sized, let colgroup widths win over hardcoded col-* rules */
table[data-col-resize-ready='1'] > colgroup.hh-col-resize-group ~ thead th,
table[data-col-resize-ready='1'] > colgroup.hh-col-resize-group ~ tbody td {
  width: auto;
  max-width: none;
}

table[data-col-resize-ready='1'] .hh-proc-col-deliverable,
table[data-col-resize-ready='1'] .hh-proc-col-kpi,
table[data-col-resize-ready='1'] .hh-proc-col-metric,
table[data-col-resize-ready='1'] .hh-proc-col-results,
table[data-col-resize-ready='1'] .hh-proc-col-pctVsKpi {
  width: auto;
}

/* ─── Page tabs (Tasks / Milestones) ─── */
.hh-page-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #eef0f4;
  border-radius: 999px;
  margin: 0 0 1.25rem;
}

.hh-page-tab {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #5c6170;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}

.hh-page-tab:hover {
  color: #1a1d26;
}

.hh-page-tab.active {
  background: #fff;
  color: #1a1d26;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.hh-ms-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hh-ms-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 720px) {
  .hh-ms-summary {
    grid-template-columns: 1fr 1fr;
  }

  .hh-ms-toolbar {
    flex-direction: column;
  }
}

.hh-ms-stat {
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.hh-ms-stat .n {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1d26;
  line-height: 1.1;
}

.hh-ms-stat .l {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8b8fa3;
  margin-top: 0.2rem;
}

.hh-ms-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hh-ms-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  background: #fff;
  border: 1px solid #e5e7ec;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

@media (max-width: 800px) {
  .hh-ms-card {
    grid-template-columns: auto 1fr;
  }

  .hh-ms-quick {
    grid-column: 2;
  }
}

.hh-ms-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding-top: 0.15rem;
}

.hh-ms-num {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #1a1d26;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hh-ms-card.status-done .hh-ms-num {
  background: #2e7d32;
}

.hh-ms-card.status-in_progress .hh-ms-num,
.hh-ms-card.status-working .hh-ms-num {
  background: #e63946;
}

.hh-ms-line {
  flex: 1;
  width: 2px;
  min-height: 1.5rem;
  background: #e5e7ec;
  border-radius: 1px;
}

.hh-ms-body {
  border: none;
  background: transparent;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  min-width: 0;
}

.hh-ms-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.45rem;
}

.hh-ms-top h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1a1d26;
  flex: 1;
  min-width: 12rem;
}

.hh-ms-status {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: #eef0f4;
  color: #5c6170;
}

.hh-ms-status-in_progress,
.hh-ms-status-working {
  background: #fff1f0;
  color: #c62828;
}

.hh-ms-status-done {
  background: #e8f5e9;
  color: #2e7d32;
}

.hh-ms-donewhen {
  margin: 0 0 0.55rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #5c6170;
}

.hh-ms-donewhen span {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8b8fa3;
  margin-right: 0.35rem;
}

.hh-ms-donewhen.muted {
  font-style: italic;
  color: #8b8fa3;
}

.hh-ms-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.hh-ms-notes {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  color: #5c6170;
  line-height: 1.4;
}

.hh-ms-quick {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
  min-width: 9.5rem;
}

.hh-ms-quick-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8b8fa3;
}

.hh-ms-quick-label select {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: #1a1d26;
  border: 1px solid #d5d8e0;
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  background: #fff;
}

.hh-ms-move {
  display: flex;
  gap: 0.35rem;
}

.hh-ms-move .hh-btn {
  flex: 1;
  padding: 0.35rem 0.5rem;
}

.hh-ms-empty {
  text-align: center;
  background: #fff;
  border: 1px dashed #c5c9d4;
  border-radius: 14px;
  padding: 2.5rem 1.5rem;
}

.hh-ms-empty h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.hh-ms-empty p {
  margin: 0 0 1rem;
  color: #5c6170;
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.hh-ms-body-edit {
  min-width: 0;
}

.hh-ms-title-input {
  flex: 1;
  min-width: 12rem;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #1a1d26;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  margin: -0.2rem -0.35rem;
}

.hh-ms-title-input:hover,
.hh-ms-title-input:focus {
  border-color: #d5d8e0;
  background: #fff;
  outline: none;
}

.hh-ms-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.55rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8b8fa3;
}

.hh-ms-field input,
.hh-ms-field textarea,
.hh-ms-field select {
  font: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: #1a1d26;
  border: 1px solid #e5e7ec;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  background: #fafbfc;
  width: 100%;
  box-sizing: border-box;
}

.hh-ms-field textarea {
  resize: vertical;
  line-height: 1.4;
  min-height: 2.6em;
}

.hh-ms-field input:focus,
.hh-ms-field textarea:focus,
.hh-ms-field select:focus {
  outline: none;
  border-color: #c5c9d4;
  background: #fff;
}

.hh-ms-field input.overdue {
  border-color: #e63946;
  color: #c62828;
}

.hh-ms-inline-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.65rem;
}

@media (max-width: 900px) {
  .hh-ms-inline-meta {
    grid-template-columns: 1fr;
  }
}

.hh-ms-delete {
  color: #c1121f !important;
  font-size: 0.75rem;
}

.hh-ms-collapse {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid #e5e7ec;
  background: #fafbfc;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #5c6170;
  font-size: 0.75rem;
  line-height: 1;
}

.hh-ms-collapse:hover {
  border-color: #c5c9d4;
  color: #1a1d26;
  background: #fff;
}

.hh-ms-card.is-collapsed .hh-ms-details {
  display: none;
}

.hh-ms-card.is-collapsed {
  align-items: center;
}

.hh-ms-card.is-collapsed .hh-ms-rail .hh-ms-line {
  display: none;
}

.hh-ms-card.is-collapsed .hh-ms-top {
  margin-bottom: 0;
}

.hh-ms-card.is-collapsed .hh-ms-quick {
  align-self: center;
}

.hh-ms-phase {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.hh-ms-phase-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 0.85rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #1a1d26 0%, #2c3140 100%);
  color: #f5f6f8;
  border-radius: 12px;
}

.hh-ms-phase-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e63946;
}

.hh-ms-phase-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.hh-ms-phase-sub {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
  color: #c5c9d4;
  line-height: 1.4;
  max-width: 40rem;
}

.hh-ms-phase-count {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  color: #fff;
}

.hh-ms-phase-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hh-ms-phase-empty {
  text-align: center;
  color: #8b8fa3;
  font-size: 0.85rem;
  padding: 1rem;
  border: 1px dashed #d5d8e0;
  border-radius: 12px;
  background: #fff;
}

.hh-ms-inline-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1100px) {
  .hh-ms-inline-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.hh-ms-phase-done .hh-ms-phase-head {
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
  width: 100%;
  border: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.hh-ms-phase-done .hh-ms-phase-kicker {
  color: #c8e6c9;
}

.hh-ms-phase-done:not(.is-open) .hh-ms-done-list {
  display: none;
}

.hh-ms-phase-done.is-open .hh-ms-done-list {
  display: flex;
  margin-top: 0.85rem;
}

.hh-ms-done-toggle:hover {
  filter: brightness(1.05);
}

.hh-ms-phase-done .hh-ms-card {
  opacity: 0.92;
}

.hh-ms-drag {
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid #e5e7ec;
  background: #fafbfc;
  border-radius: 6px;
  cursor: grab;
  color: #8b8fa3;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.hh-ms-drag:hover {
  border-color: #c5c9d4;
  color: #1a1d26;
  background: #fff;
}

.hh-ms-drag:active,
.hh-ms-card.dragging .hh-ms-drag {
  cursor: grabbing;
}

.hh-ms-card.dragging {
  opacity: 0.45;
  border-style: dashed;
}

.hh-ms-card.drop-before::before,
.hh-ms-card.drop-after::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  height: 3px;
  border-radius: 999px;
  background: #e63946;
  pointer-events: none;
}

.hh-ms-card {
  position: relative;
}

.hh-ms-card.drop-before::before {
  top: -5px;
}

.hh-ms-card.drop-after::after {
  bottom: -5px;
}

.hh-ms-phase-list.drag-over,
.hh-ms-phase.drag-over > .hh-ms-phase-head {
  outline: 2px dashed #e63946;
  outline-offset: 3px;
  border-radius: 12px;
}

.hh-ms-phase-list.drag-over {
  background: rgba(230, 57, 70, 0.04);
  border-radius: 12px;
  min-height: 2.5rem;
}

/* ─── UTM Structure ─── */
.hh-utm-hero {
  background: linear-gradient(135deg, #1a1d26 0%, #2c3140 100%);
  color: #f5f6f8;
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
}

.hh-utm-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e63946;
}

.hh-utm-hero h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  color: #fff;
}

.hh-utm-hero p {
  margin: 0;
  font-size: 0.85rem;
  color: #c5c9d4;
}

.hh-utm-hero code {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.78rem;
}

.hh-utm-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5e7ec;
  border-radius: 10px;
}

.hh-utm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 640px;
}

.hh-utm-table th {
  background: #1a1d26;
  color: #fff;
  text-align: left;
  padding: 0.65rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hh-utm-table td {
  padding: 0.65rem 0.85rem;
  border-top: 1px solid #eef0f4;
  vertical-align: top;
  color: #1a1d26;
}

.hh-utm-table code {
  font-size: 0.78rem;
  background: #f4f5f8;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.hh-utm-platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.hh-utm-platform {
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  padding: 1rem;
  background: #fafbfc;
}

.hh-utm-platform-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.hh-utm-platform-head h3 {
  margin: 0;
  font-size: 0.92rem;
}

.hh-utm-code {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #1a1d26;
  color: #fff;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}

.hh-utm-platform dl {
  margin: 0 0 0.65rem;
}

.hh-utm-platform dl > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
}

.hh-utm-platform dt {
  color: #8b8fa3;
  font-weight: 600;
}

.hh-utm-platform dd {
  margin: 0;
  color: #1a1d26;
}

.hh-utm-platform > p {
  margin: 0;
  font-size: 0.78rem;
  color: #5c6170;
  line-height: 1.4;
}

.hh-utm-formula {
  font-size: 0.9rem;
  word-break: break-all;
}

.hh-utm-region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.55rem;
}

.hh-utm-region {
  border: 1px solid #e5e7ec;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hh-utm-region strong {
  font-size: 0.75rem;
  color: #8b8fa3;
}

.hh-utm-region code {
  font-size: 0.82rem;
  color: #1a1d26;
}

.hh-utm-examples {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hh-utm-example {
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  padding: 1rem;
  background: #fff;
}

.hh-utm-example-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.hh-utm-example-head h4 {
  margin: 0;
  font-size: 0.95rem;
}

.hh-utm-url {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  word-break: break-all;
  line-height: 1.4;
}

.hh-utm-url a {
  color: #e63946;
  text-decoration: none;
}

.hh-utm-url a:hover {
  text-decoration: underline;
}

.hh-utm-exclusions {
  margin: 0;
  padding-left: 1.1rem;
  color: #5c6170;
  font-size: 0.88rem;
}
