/* BHub · Serviços e Controladoria. Camada posterior a design-system.css. */
.services-page,
.ct-page,
.cp-planning,
.cd-workspace {
  min-width: 0;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
}

.services-page { max-width: 1280px; }
.services-page .page-heading,
.ct-page .page-heading { margin-bottom: 26px; }
.services-page .section-toolbar h2,
.ct-work-section h2,
.ct-services-strip h2,
.cd-toolbar h2,
.cd-workspace .panel > h2,
.cp-draft-status h2 { color: var(--ink); font-size: 18px; font-weight: 700; letter-spacing: -.25px; line-height: 1.4; }
.services-page .page-subtitle,
.ct-page .page-subtitle { color: var(--muted); font-size: 14px; line-height: 1.6; }
.services-page :where(button, input, select, textarea),
.ct-page :where(button, input, select, textarea) { font-family: inherit; }
.services-page .button,
.ct-page .button { min-height: 44px; }
.services-page :where(a, button, input, select, textarea):focus-visible,
.ct-page :where(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Empresa e competência permanecem legíveis em todos os trabalhos. */
.svc-context,
.ct-period { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 24px; padding: 14px 18px; margin-bottom: 28px; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 13px; }
.ct-period { padding: 6px 0; margin-bottom: 18px; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.svc-context label,
.ct-period label { display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 13px; font-weight: 700; }
.svc-context select,
.ct-period select { min-height: 44px; padding: 9px 32px 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface, #fff); color: var(--ink); font-size: 13px; font-weight: 400; }
.svc-context .svc-role { margin-left: auto; color: var(--muted); }
.ct-period > a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-size: 13px; text-underline-offset: 4px; }
.ct-subnav { gap: 26px; margin-bottom: 22px; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.ct-subnav a { display: inline-flex; align-items: center; min-height: 46px; padding: 0 0 13px; color: var(--muted); font-size: 14px; }
.ct-subnav a:hover { color: var(--ink); }
.ct-subnav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--accent); font-weight: 700; }

/* Catálogo contínuo: uma entrega por linha, sem fragmentar a leitura. */
.svc-catalog .section-toolbar { gap: 14px; margin-bottom: 16px; }
.svc-catalog-list { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 14px; }
.svc-catalog-row { grid-template-columns: 38px minmax(0, 1fr) auto; min-height: 116px; gap: 18px; padding: 22px; border-top: 1px solid var(--line); }
.svc-catalog-row:first-child { border-top: 0; border-top-left-radius: 14px; border-top-right-radius: 14px; }
.svc-catalog-row:last-child { border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; }
.svc-catalog-row.is-contextual { margin-left: 0; padding: 22px; border-left: 0; background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.svc-icon { width: 38px; height: 38px; background: var(--accent-soft); border: 1px solid transparent; border-radius: 10px; color: var(--accent); }
.svc-icon .icon { width: 19px; height: 19px; }
.svc-description > div { gap: 10px; }
.svc-description h3 { margin: 0; color: var(--ink); font-size: 16px; font-weight: 700; line-height: 1.4; letter-spacing: -.15px; }
.svc-description p { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.svc-description small { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.svc-context-tag { padding: 3px 7px; border: 1px solid var(--accent); border-radius: 5px; color: var(--accent); font-size: 11px; font-weight: 700; }
.svc-start { min-width: 150px; padding-left: 14px; }
.svc-start .button { min-height: 44px; padding-inline: 16px; gap: 14px; font-size: 13px; }
.svc-start .button.quiet { border: 1px solid var(--line); background: var(--surface, #fff); color: var(--accent); }
.svc-start .button.quiet:hover { background: var(--accent-soft); border-color: var(--accent); }
.svc-bpo-only { max-width: 155px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.svc-tracking { margin-top: 36px; }
.svc-tracking > .section-toolbar { gap: 18px; margin-bottom: 18px; }
.svc-section-note { color: var(--muted); font-size: 13px; line-height: 1.6; }
.svc-tracking .segmented { padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); }
.svc-tracking .segmented button { min-height: 40px; padding: 8px 12px; border-radius: 7px; color: var(--muted); font-size: 13px; }
.svc-tracking .segmented button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 700; box-shadow: none; }
.svc-count,
.svc-tracking .segmented button[aria-pressed="true"] .svc-count { min-width: 20px; padding: 1px 5px; border-radius: 4px; background: var(--paper); color: var(--muted); font-size: 11px; }
.svc-tracking .segmented button[aria-pressed="true"] .svc-count { background: var(--surface, #fff); color: var(--accent); }
.svc-work-list { border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); }
.svc-work-row.ai-history-row { min-height: 88px; padding: 20px; gap: 16px; border-top: 1px solid var(--line); }
.svc-work-row.ai-history-row:first-child { border-top: 0; border-top-left-radius: 12px; border-top-right-radius: 12px; }
.svc-work-row.ai-history-row:last-child { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }
.svc-work-row.ai-history-row:hover { background: var(--paper); }
.svc-work-row strong { color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.5; }
.svc-work-row small { color: var(--muted); font-size: 12px; line-height: 1.6; }
.svc-work-icon { color: var(--accent); }
.svc-row-cta { color: var(--accent); font-size: 13px; }
.svc-empty { padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); }
.svc-empty > span { color: var(--accent); }
.svc-empty strong { color: var(--ink); font-size: 14px; font-weight: 700; }
.svc-empty p { color: var(--muted); font-size: 13px; }
.svc-footnote,
.svc-result-note { color: var(--muted); font-size: 12px; line-height: 1.65; }
.svc-section-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 1.1px; }

/* Leitura contextual dos serviços, sem alterar a geometria global dos diálogos. */
.svc-run-head { border-bottom-color: var(--line); color: var(--muted); font-size: 13px; }
.svc-result > h3 { color: var(--ink); font-size: 22px; font-weight: 700; line-height: 1.35; }
.svc-result > p { color: var(--muted); font-size: 14px; line-height: 1.75; }
.svc-result article { padding-block: 20px; border-top-color: var(--line); }
.svc-result article > div { font-size: 14px; line-height: 1.5; }
.svc-result article strong,
.svc-result article b { color: var(--ink); font-weight: 700; }
.svc-result article p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.svc-next.ai-next { padding: 18px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-soft); color: var(--ink); font-size: 14px; }
.svc-evidence { border-color: var(--line); color: var(--ink); font-size: 13px; }
.svc-evidence summary { min-height: 32px; font-weight: 700; }
.svc-evidence li,
.svc-evidence > p,
.ai-review-comment { color: var(--muted); font-size: 13px; line-height: 1.7; }
.ai-policy h3 { color: var(--ink); font-size: 16px; font-weight: 700; }
.ai-policy p { color: var(--muted); font-size: 14px; line-height: 1.75; }

/* A leitura do mês ocupa uma única faixa de medidas. */
.ct-kpis,
.cp-summary,
.cd-summary { gap: 0; padding: 22px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); }
.ct-kpis > div,
.cp-summary > div,
.cd-summary > div { padding: 0 24px; border-right: 1px solid var(--line); }
.ct-kpis > div:last-child,
.cp-summary > div:last-child,
.cd-summary > div:last-child { border-right: 0; }
.ct-kpis > div > span,
.cp-summary dt,
.cd-summary > div > span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.ct-kpis strong,
.ct-kpis-work strong,
.cp-summary dd,
.cd-summary strong,
.cd-preview .cd-summary strong { display: block; margin-top: 10px; color: var(--ink); font-size: 28px; font-weight: 700; letter-spacing: -.65px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.ct-kpis strong .money,
.cp-summary dd > .money,
.cd-summary strong .money { color: inherit; font: inherit; letter-spacing: inherit; }
.ct-kpis small,
.cp-summary dd small { display: block; margin-top: 9px; color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: 0; line-height: 1.6; }
.cp-summary dd small .money { color: inherit; font: inherit; }
.ct-workbench { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; margin-top: 30px; }
.ct-work-section { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface, #fff); }
.ct-work-section .section-toolbar { gap: 12px; margin-bottom: 16px; }
.ct-work-links { border-bottom: 0; }
.ct-work-link { min-height: 88px; padding: 20px 0; border-top-color: var(--line); }
.ct-work-link:last-child { padding-bottom: 0; }
.ct-work-link strong { color: var(--ink); font-size: 14px; font-weight: 700; }
.ct-work-link small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.ct-work-link:hover strong,
.ct-work-link:hover > .icon { color: var(--accent); }
.ct-delivery-status { border-left: 1px solid var(--line); padding-left: 24px; }
.ct-delivery-status dl > div { padding: 17px 0; font-size: 13px; }
.ct-delivery-status dt { color: var(--muted); }
.ct-delivery-status dd { color: var(--ink); font-weight: 700; }
.ct-delivery-status > p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.ct-services-strip { gap: 24px; margin-top: 24px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); }
.ct-services-strip p { color: var(--muted); font-size: 13px; }
.ct-service-actions { gap: 10px; }

/* Orçamento: versionamento visível e grade anual contínua. */
.cp-toolbar { gap: 20px; margin: 0 0 16px; flex-wrap: wrap; }
.cp-tabs { gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); }
.cp-tabs .button { min-height: 40px; padding-inline: 14px; border-radius: 7px; color: var(--muted); font-size: 13px; }
.cp-tabs .button[aria-pressed="true"],
.cp-tabs .button[aria-pressed="true"]:hover,
.ct-family-tabs .button.active,
.ct-family-tabs .button.active:hover { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 700; box-shadow: none; }
.cp-toolbar .field { color: var(--muted); font-size: 12px; }
.cp-toolbar select { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface, #fff); color: var(--ink); font-size: 13px; }
.cp-version-bar { gap: 16px; min-height: 68px; margin-bottom: 14px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); }
.cp-version-bar .row { gap: 10px; flex-wrap: wrap; }
.cp-version-bar p { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.cp-summary { margin: 0 0 10px; padding-block: 10px; }
.cp-summary dd { margin: 6px 0 0; font-size: 28px; line-height: 1.25; }
.cp-summary dd small { margin-top: 4px; line-height: 1.5; }
.cp-planning > p.muted { margin-bottom: 12px; }
.cp-planning > .panel { min-width: 0; padding: 0; margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); box-shadow: none; }
.cp-draft-status { padding: 16px 22px 12px; }
.cp-draft-status p { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.cp-table-scroll,
.cd-table-scroll { max-width: 100%; min-width: 0; overflow: auto; scrollbar-color: var(--line) var(--surface, #fff); }
.cp-table { width: 100%; min-width: 840px; border-collapse: separate; border-spacing: 0; color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.cp-table th,
.cp-table td { padding: 15px 16px; border: 0; border-bottom: 1px solid var(--line); text-align: right; background: var(--surface, #fff); vertical-align: middle; line-height: 1.6; }
.cp-table thead th { padding-block: 14px; background: var(--paper); color: var(--muted); font-size: 12px; font-weight: 700; }
.cp-table tbody th { background: var(--surface, #fff); color: var(--ink); text-align: left; font-size: 13px; font-weight: 700; }
.cp-table th:first-child { text-align: left; }
.cp-table th small,
.cp-table td small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 400; }
.cp-table tbody tr:last-child > * { border-bottom: 0; }
.cp-table tbody tr:hover > * { background: var(--paper); }
.cp-table .money { color: inherit; font-size: 13px; font-weight: inherit; white-space: nowrap; }
.cp-budget-grid tr > :first-child { position: sticky; left: 0; z-index: 2; width: 218px; min-width: 218px; max-width: 218px; box-shadow: 1px 0 0 var(--line); }
.cp-budget-grid thead > tr > :first-child { z-index: 3; background: var(--paper); }
.cp-budget-grid .cp-current-month,
.cp-budget-grid tr:hover > .cp-current-month { background: var(--accent-soft); }
.cp-budget-grid thead .cp-current-month { color: var(--accent); font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); }
.cp-budget-grid th .button { margin-top: 5px; padding-inline: 0; min-height: 36px; font-size: 12px; color: var(--accent); }
.cp-cell-input { width: 118px; min-height: 42px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface, #fff); color: var(--ink); font-family: inherit; font-size: 13px; font-variant-numeric: tabular-nums; }
.cp-cell-input:focus { border-color: var(--accent); background: var(--surface, #fff); }
.cp-cell-input[aria-invalid="true"] { border-color: #F25461; box-shadow: inset 3px 0 0 #F25461; }
.cp-table .cp-favorable { color: var(--green); }
.cp-table .cp-unfavorable { color: var(--ink); box-shadow: inset 2px 0 0 #F25461; }
.cp-note,
.cp-assumptions { color: var(--muted); font-size: 12px; line-height: 1.75; }
.cp-planning > .panel > .cp-note,
#cp-budget-form > .cp-note { margin: 0; padding: 17px 22px; border-top: 1px solid var(--line); }
.cp-history { padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); color: var(--muted); }
.cp-history summary { min-height: 28px; color: var(--ink); font-size: 13px; font-weight: 700; }
.cp-history li { font-size: 13px; line-height: 1.7; }
.cp-category-summary { color: var(--ink); font-size: 14px; line-height: 1.7; }
.cp-origin-list { color: var(--muted); font-size: 13px; line-height: 1.7; }
.cp-origin-list strong { color: var(--ink); font-weight: 700; }
.cp-review-list { margin: 0; padding: 0; }

/* Indicadores: valor, definição e acesso à origem. */
.ct-family-tabs { gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.ct-family-tabs .button { border: 1px solid var(--line); border-radius: 8px; background: var(--surface, #fff); color: var(--muted); font-size: 13px; }
.ct-source-strip { gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); color: var(--muted); font-size: 13px; line-height: 1.55; }
.ct-source-strip > .icon { color: var(--accent); }
.ct-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.ct-metric { min-width: 0; min-height: 188px; padding: 22px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); box-shadow: none; text-align: left; }
.ct-metric:hover { background: var(--surface, #fff); border-color: var(--accent); box-shadow: 0 2px 8px rgba(15, 23, 39, .04); }
.ct-metric > span:first-child { color: var(--muted); font-size: 13px; line-height: 1.5; font-weight: 400; }
.ct-metric > span:first-child .icon { color: var(--accent); }
.ct-metric > strong,
.ct-metric > strong:has(.money) { display: block; margin: 20px 0 12px; color: var(--ink); font-size: 28px; line-height: 1.2; letter-spacing: -.6px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: normal; }
.ct-metric > strong .money { color: inherit; font: inherit; letter-spacing: inherit; }
.ct-metric > small { color: var(--muted); font-size: 12px; line-height: 1.7; }
.ct-metric .ct-goal { display: block; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.6; }
.ct-definition-list { margin-top: 28px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); }
.ct-definition-list h2 { margin-bottom: 16px; color: var(--ink); font-size: 16px; font-weight: 700; }
.ct-definition-list > div { gap: 24px; padding: 14px 0; font-size: 13px; line-height: 1.6; }
.ct-definition-list strong { color: var(--ink); font-weight: 700; }
.ct-definition-list > div > span { color: var(--muted); }
.ct-inline-note { gap: 12px; color: var(--muted); background: transparent; font-size: 13px; line-height: 1.7; }
.ct-inline-note .icon { color: var(--accent); flex-shrink: 0; }
.ct-empty { padding: 26px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); color: var(--muted); }
.ct-empty h2 { color: var(--ink); font-size: 18px; font-weight: 700; }
.ct-empty p { margin: 10px 0 18px; font-size: 14px; line-height: 1.7; }
.ct-detail-value { color: var(--ink); font-size: 30px; font-weight: 700; letter-spacing: -.6px; }
.ct-formula-parts { padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.ct-formula-parts > div { padding-block: 10px; color: var(--muted); font-size: 13px; }
.ct-formula-parts strong { color: var(--ink); font-weight: 700; }

/* A entrega mensal é um documento; a reunião é uma lista de decisões. */
.cd-workspace > .panel,
.cd-two-column > .panel { min-width: 0; padding: 26px; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface, #fff); box-shadow: none; }
.cd-workspace > .cd-empty { background: var(--surface, #fff); }
.cd-workspace .cd-empty h2 { color: var(--ink); font-size: 20px; font-weight: 700; }
.cd-workspace .cd-empty p { margin: 10px 0 18px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.cd-toolbar { gap: 16px; flex-wrap: wrap; }
.cd-toolbar > div { min-width: 0; }
.cd-toolbar h2 { margin-bottom: 5px; }
.cd-toolbar p,
.cd-meta,
.cd-report-boundary { color: var(--muted); font-size: 13px; line-height: 1.6; }
.cd-workspace > .cd-release-published { border-top: 3px solid var(--accent); }
.cd-release-published > h3 { margin: 22px 0 8px; color: var(--ink); font-size: 20px; font-weight: 700; line-height: 1.45; }
.cd-release-published > p { color: var(--muted); font-size: 13px; }
.cd-workspace .field { color: var(--ink); font-size: 13px; line-height: 1.6; }
.cd-workspace :where(input:not([type="checkbox"]), select, textarea) { min-height: 44px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface, #fff); color: var(--ink); font: inherit; font-size: 14px; line-height: 1.65; }
.cd-workspace textarea { min-height: 130px; resize: vertical; }
.cd-editor textarea { min-height: 208px; line-height: 1.8; }
.cd-editor details { padding: 14px 0; border-block: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.cd-editor details summary { min-height: 28px; color: var(--ink); font-weight: 700; }
.cd-block-picker { gap: 5px; margin: 22px 0; }
.cd-block-picker legend { margin-bottom: 10px; color: var(--ink); font-size: 13px; font-weight: 700; }
.cd-block-picker label { min-height: 44px; padding: 8px 0; font-size: 14px; }
.cd-block-picker input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.cd-analysis { color: var(--ink); font-size: 14px; line-height: 1.75; }
.cd-analysis-list { color: var(--ink); font-size: 13px; }
.cd-table-scroll { margin-block: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); }
.cd-table-scroll table { width: 100%; min-width: 600px; border-collapse: separate; border-spacing: 0; color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.cd-table-scroll :is(th, td) { padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--surface, #fff); text-align: right; line-height: 1.6; }
.cd-table-scroll thead th { background: var(--paper); color: var(--muted); font-size: 12px; font-weight: 700; }
.cd-table-scroll th:first-child { position: sticky; left: 0; z-index: 1; min-width: 180px; text-align: left; font-weight: 700; box-shadow: 1px 0 0 var(--line); }
.cd-table-scroll .money { color: inherit; font-size: inherit; white-space: nowrap; }
.cd-table-scroll tr:last-child > * { border-bottom: 0; }
.cd-preview { color: var(--ink); font-family: var(--font-ui); font-size: 14px; line-height: 1.8; }
.cd-preview h2 { color: var(--ink); font-size: 26px; font-weight: 700; line-height: 1.35; }
.cd-preview h3 { color: var(--ink); font-size: 17px; font-weight: 700; }
.cd-narrative { color: var(--ink); font-size: 14px; line-height: 1.85; }
.cd-source-list { color: var(--muted); font-size: 13px; line-height: 1.75; }
.cd-agenda h3 { margin: 22px 0 14px; color: var(--ink); font-size: 15px; font-weight: 700; }
.cd-agenda-row,
.cd-action-row { gap: 16px; padding: 20px 0; border-top-color: var(--line); }
.cd-agenda-row > span.cd-agenda-number { color: var(--accent); font-size: 13px; font-variant-numeric: tabular-nums; }
.cd-agenda-row strong,
.cd-action-row strong { color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.6; }
.cd-agenda-row small,
.cd-action-row small,
.cd-action-row .cd-meta { color: var(--muted); font-size: 12px; line-height: 1.65; }
.cd-meeting-record { margin-top: 22px; padding: 18px 20px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-soft); color: var(--ink); font-size: 14px; }
.cd-comments article { padding: 20px 0; border-top-color: var(--line); color: var(--ink); font-size: 14px; }
.cd-comments article strong { font-weight: 700; }
.cd-comments article small { color: var(--muted); font-size: 12px; }
.cd-comments article p { line-height: 1.75; }
.cd-accounting-context { padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--muted); font-size: 13px; }
.cd-accounting-point { color: var(--ink); font-size: 14px; }
.cd-accounting-point h3 { font-size: 18px; font-weight: 700; }
.cd-evidence-link { min-height: 36px; margin-top: 5px; color: var(--accent); font-size: 12px; }

@media (min-width: 641px) {
  .ct-page:has(.cp-planning) .page-heading { margin-bottom: 20px; }
  .ct-page:has(.cp-planning) .ct-subnav { margin-bottom: 16px; }
  .cp-toolbar .field { display: flex; flex-direction: row; align-items: center; gap: 10px; }
  .cp-toolbar .field select { width: auto; min-width: 190px; }
}

@media (max-width: 1380px) {
  .ct-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-kpis > div, .cp-summary > div, .cd-summary > div { padding-inline: 18px; }
  .ct-workbench { gap: 20px; }
  .ct-work-section { padding: 22px; }
  .ct-work-section .section-toolbar { align-items: flex-start; }
}

@media (max-width: 1000px) {
  .ct-workbench { grid-template-columns: 1fr; }
  .ct-services-strip { align-items: flex-start; flex-direction: column; }
  .ct-service-actions { max-width: none; justify-content: flex-start; }
  .svc-context .svc-role { margin-left: 0; }
  .svc-start { min-width: 124px; }
  .svc-catalog-row { padding: 20px; gap: 15px; }
  .svc-catalog-row.is-contextual { padding: 20px; }
  .svc-work-row.ai-history-row { flex-wrap: wrap; }
  .cd-two-column { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .services-page .page-heading, .ct-page .page-heading { gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
  .svc-context, .ct-period { gap: 12px; padding: 15px; border-radius: 10px; }
  .ct-period { padding: 8px 0; border-radius: 0; }
  .svc-context label, .ct-period label { width: 100%; justify-content: space-between; gap: 14px; }
  .svc-context select, .ct-period select { width: auto; min-width: 165px; max-width: 65%; }
  .svc-context > span, .ct-period > span { width: 100%; font-size: 12px; overflow-wrap: anywhere; }
  .ct-period > a { margin-left: 0; }
  .ct-subnav { gap: 22px; margin-right: 0; }
  .ct-subnav a { font-size: 13px; }
  .svc-catalog-row { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 18px 16px; }
  .svc-catalog-row.is-contextual { padding: 18px 16px; }
  .svc-icon { width: 34px; height: 34px; border-radius: 9px; }
  .svc-description h3 { font-size: 15px; }
  .svc-description p { font-size: 13px; line-height: 1.6; }
  .svc-description small { font-size: 12px; }
  .svc-description > div { gap: 8px; }
  .svc-start { grid-column: 2; min-width: 0; padding: 0; margin-top: 5px; text-align: left; }
  .svc-start .button { min-height: 44px; }
  .svc-bpo-only { max-width: none; font-size: 12px; }
  .svc-tracking { margin-top: 30px; }
  .svc-tracking > .section-toolbar { gap: 14px; }
  .svc-tracking .segmented { display: flex; max-width: 100%; width: 100%; }
  .svc-tracking .segmented button { flex: 1; min-width: 0; min-height: 44px; padding: 8px 7px; font-size: 12px; white-space: nowrap; }
  .svc-count { margin-left: 4px; min-width: 18px; }
  .svc-work-row.ai-history-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; padding: 18px 14px; }
  .svc-work-row.ai-history-row > div { grid-column: 2 / 4; }
  .svc-work-row.ai-history-row > .badge { grid-column: 2; margin-left: 0; justify-self: start; }
  .svc-row-cta { grid-column: 3; grid-row: 2; min-width: 0; font-size: 12px; }
  .svc-work-row strong { font-size: 14px; }
  .svc-work-row small { font-size: 12px; }
  .svc-empty { padding: 20px 16px; gap: 12px; align-items: flex-start; }
  .svc-footnote { font-size: 12px; }
  .ct-kpis, .cp-summary, .cd-summary { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .ct-kpis > div, .cp-summary > div, .cd-summary > div { padding: 19px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .ct-kpis > div:last-child, .cp-summary > div:last-child, .cd-summary > div:last-child { padding: 19px 20px; border-bottom: 0; }
  .ct-kpis strong, .cp-summary dd, .cd-summary strong, .cd-preview .cd-summary strong { font-size: 28px; }
  .ct-kpis.ct-kpis-work { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-kpis.ct-kpis-work > div { padding: 16px 18px; border-right: 0; border-bottom: 0; }
  .ct-kpis.ct-kpis-work > div:first-child { grid-column: 1 / -1; padding: 18px 20px; border-bottom: 1px solid var(--line); }
  .ct-kpis.ct-kpis-work > div:nth-child(2) { border-right: 1px solid var(--line); }
  .ct-kpis.ct-kpis-work > div:not(:first-child) > strong { margin-top: 8px; font-size: 20px; line-height: 1.3; letter-spacing: -.3px; overflow-wrap: anywhere; }
  .ct-kpis.ct-kpis-work > div:not(:first-child) > span { font-size: 12px; }
  .ct-kpis.ct-kpis-work > div:not(:first-child) > small { margin-top: 7px; font-size: 12px; line-height: 1.5; }
  .ct-work-section, .ct-services-strip { padding: 20px 18px; }
  .ct-work-link { gap: 12px; padding-block: 18px; }
  .ct-work-link small { font-size: 12px; }
  .ct-delivery-status dl > div { gap: 12px; }
  .ct-delivery-status dd { max-width: 55%; }
  .ct-service-actions { width: 100%; gap: 9px; }
  .ct-service-actions .button { justify-content: flex-start; }
  .cp-toolbar { align-items: stretch; gap: 16px; }
  .cp-toolbar .field { width: 100%; }
  .cp-toolbar select { width: 100%; }
  .cp-tabs { display: flex; max-width: 100%; }
  .cp-tabs .button { min-height: 44px; padding-inline: 10px; font-size: 12px; }
  .cp-version-bar { padding: 17px; gap: 16px; flex-wrap: wrap; }
  .cp-version-bar .row { width: 100%; gap: 8px; }
  .cp-draft-status { padding: 20px 16px; }
  .cp-table th, .cp-table td { padding: 13px 12px; }
  .cp-budget-grid tr > :first-child { width: 164px; min-width: 164px; max-width: 164px; }
  .cp-budget-grid th .button { min-height: 44px; white-space: normal; font-size: 12px; }
  .cp-cell-input { min-height: 44px; }
  .cp-planning > .panel > .cp-note, #cp-budget-form > .cp-note { padding: 16px; }
  .cp-history { padding: 16px; }
  .cp-history summary { min-height: 32px; }
  .ct-family-tabs { gap: 8px; }
  .ct-family-tabs .button { min-height: 44px; padding: 10px 12px; font-size: 12px; }
  .ct-source-strip { align-items: flex-start; flex-wrap: wrap; padding: 16px; }
  .ct-source-strip > span { flex: 1; flex-basis: calc(100% - 34px); }
  .ct-source-strip > .button { margin-left: 0; }
  .ct-metric-grid { grid-template-columns: 1fr; gap: 14px; }
  .ct-metric { min-height: 0; padding: 22px; }
  .ct-metric > strong, .ct-metric > strong:has(.money) { font-size: 28px; }
  .ct-definition-list { padding: 20px 18px; }
  .ct-definition-list > div { display: block; padding: 15px 0; }
  .ct-definition-list > div > span { display: block; margin-top: 6px; text-align: left; }
  .ct-inline-note { align-items: flex-start; }
  .cd-workspace > .panel, .cd-two-column > .panel { padding: 21px 18px; border-radius: 12px; }
  .cd-workspace .cd-toolbar { align-items: flex-start; gap: 14px; }
  .cd-toolbar > div { max-width: 100%; }
  .cd-toolbar > div .button { margin-top: 5px; }
  .cd-workspace :where(input:not([type="checkbox"]), select, textarea) { min-width: 0; max-width: 100%; font-size: 16px; }
  .cd-two-column { gap: 0; }
  .cd-agenda-row, .cd-action-row { gap: 12px; padding-block: 18px; align-items: flex-start; flex-wrap: wrap; }
  .cd-agenda-row > .grow { flex-basis: calc(100% - 38px); }
  .cd-action-row > .grow { flex-basis: 100%; }
  .cd-agenda-row > .button { margin-left: 34px; }
  .cd-action-row > .button { margin-left: 0; }
  .cd-agenda-row .cd-evidence-link { min-height: 44px; }
  .cd-meeting-record { padding: 16px; }
  .cd-table-scroll th:first-child { min-width: 156px; }
  .cd-preview h2 { font-size: 24px; }
  .svc-result article > div { flex-wrap: wrap; gap: 8px; }
  .svc-result article b { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .services-page *, .ct-page * { transition: none; scroll-behavior: auto; }
}
