/* PERT / three-point estimate calculator. Layered on evm.css + eac.css (shared bench, cases, readouts). */

.pert-settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px 12px; margin: 12px 0 10px; }
.pert-settings label { display: grid; gap: 5px; font-size: .82rem; font-weight: 600; min-width: 0; }
.pert-settings small { color: var(--ink-muted); font-weight: 500; font-size: .7rem; }
.pert-settings select, .pert-settings input { width: 100%; min-width: 0; }
.pert-settings input { font-family: 'IBM Plex Mono', monospace !important; }
.pert-table-wrap { max-height: 340px; overflow: auto; border: 1px solid var(--border-line); }
.pert-table { width: 100%; }
.pert-table th { position: sticky; top: 0; background: var(--bg-card); text-align: left; padding: 6px 5px; font-size: .68rem; color: var(--ink-muted); letter-spacing: .06em; z-index: 1; }
.pert-table td { padding: 3px 3px; }
.pert-table input { width: 100%; min-width: 44px; padding: 6px 6px !important; font: 500 .8rem/1.2 'IBM Plex Mono', monospace !important; }
.pert-table input.name { min-width: 120px; font-family: Inter, sans-serif !important; }
.pert-table td:last-child { width: 32px; }
.pert-table th:first-child { width: 46%; }
.pert-table .row-remove:disabled { opacity: .35; cursor: default; }
.pert-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.pert-row-actions .small { margin: 0; color: var(--ink-muted); font-size: .76rem; line-height: 1.45; }
.pert-custom > .small { margin: 12px 0 0; color: var(--ink-muted); font-size: .78rem; }
.pert-model { margin: 0; }
.pert-model button { padding: 7px 11px; }

/* Distribution of the total */
.pert-chart .axis { stroke: var(--ink-muted); stroke-width: 1; }
.pert-chart .dist-line { fill: none; stroke: var(--ink); stroke-width: 2.4; }
.pert-chart .dist-shade { fill: var(--accent); fill-opacity: .18; }
.pert-chart .mark-line { stroke-width: 1.6; }
.pert-chart .mark-text { font-size: 11px; font-weight: 700; paint-order: stroke; stroke: var(--bg-canvas); stroke-width: 4px; stroke-linejoin: round; }
.pert-chart .m-ml { stroke: var(--c-orange); fill: var(--c-orange); }
.pert-chart .mark-line.m-ml { stroke-dasharray: 5 4; }
.pert-chart .m-mean { stroke: var(--ink); fill: var(--ink); }
.pert-chart .m-conf { stroke: var(--c-blue); fill: var(--c-blue); }
.pert-chart .mark-line.m-conf { stroke-dasharray: 2 4; }
.pert-chart .m-target { stroke: var(--accent); fill: var(--accent); }
.pert-chart .mark-text.m-ml, .pert-chart .mark-text.m-mean, .pert-chart .mark-text.m-conf, .pert-chart .mark-text.m-target { stroke: var(--bg-canvas); }
.pert-chart .shade-text { fill: var(--accent); font-size: 18px; font-weight: 800; paint-order: stroke; stroke: var(--bg-canvas); stroke-width: 5px; stroke-linejoin: round; }
.pert-chart.is-big .mark-text { font-size: 14px; }
.pert-chart.is-big .shade-text { font-size: 24px; }
.pert-chart.is-big .dist-line { stroke-width: 3.2; }

/* Activity ranges */
.pert-ranges .range { stroke: var(--ink-muted); stroke-width: 6; stroke-linecap: round; opacity: .35; }
.pert-ranges .m-tick { stroke: var(--c-orange); stroke-width: 2.5; }
.pert-ranges .mean-dot { fill: var(--accent); stroke: var(--bg-canvas); stroke-width: 2; }
.pert-ranges .share-bg { fill: var(--border-line); }
.pert-ranges .share { fill: var(--c-blue); }
.pert-ranges .row-hl { fill: rgba(var(--accent-rgb), .1); stroke: var(--accent); stroke-width: 1.2; }
.pert-ranges .lbl { font-size: 11.5px; }
.pert-ranges.is-big .lbl { font-size: 14px; }
.pert-ranges.is-big .range { stroke-width: 8; }

.chart-key .sw-shade { height: 10px; background: var(--accent); opacity: .3; }
.chart-key .sw-ml { height: 0; border-top: 2px dashed var(--c-orange); }
.chart-key .sw-mean { background: var(--ink); }
.chart-key .sw-conf { height: 0; border-top: 2px dotted var(--c-blue); }
.chart-key .sw-range { height: 6px; background: var(--ink-muted); opacity: .4; border-radius: 3px; }
.chart-key .sw-mtick { width: 3px; height: 12px; background: var(--c-orange); }
.chart-key .sw-mean-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.chart-key .sw-share { height: 8px; background: var(--c-blue); }

#pert-panel.is-tool-full {
  position: fixed; inset: 0; z-index: 950; margin: 0; max-width: none; width: auto;
  padding: 16px 20px 24px; overflow: auto; background: var(--bg-canvas); border: 0;
}
#pert-panel.is-tool-full > .section-heading, #pert-panel.is-tool-full .track-btn span, #pert-panel.is-tool-full .track-steps { display: none; }
@media (min-width: 1181px) {
  #pert-panel.is-tool-full .eac-bench { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 28px; }
  #pert-panel.is-tool-full .eac-side { position: sticky; top: 0; max-height: calc(100vh - 40px); overflow: auto; }
}
#pert-panel.is-tool-full .eac-results-title { font-size: 1.3rem; }
#pert-panel.is-tool-full .evm-readouts dd { font-size: 1.35rem; }

@media (max-width: 1180px) {
  .pert-table-wrap { max-height: 300px; }
}

/* Organized like the EVM workbench: a chart bar with the tools, the call and the plain-language
   report under the chart, then the readouts in two groups. */
.eac-main > .chart-bar { margin-bottom: 4px; }
.eac-main > .results-source { margin: 0 0 10px; color: var(--ink-muted); font-size: .88rem; }
.eac-main > .results-source strong { color: var(--ink); font-weight: 650; }
.pert-report .status-report { margin: 18px 0 0; }
.pert-report .case-call { border-left-color: var(--c-green); }
.case-call .call-msg { margin-top: 12px; font-size: .9rem; line-height: 1.6; }
.case-call .call-msg .good { color: var(--c-green); }
.case-call .call-msg .bad { color: var(--c-orange); }
.case-call .mc legend { font-size: 1rem; }
.mc-opts.is-long { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mc-text { line-height: 1.35; }
.readout-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.readout-pair .evm-readouts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 0; }
.pert-acts { margin-top: 30px; }
.pert-acts-note { margin: 0 0 10px; color: var(--ink-muted); font-size: .84rem; line-height: 1.55; max-width: 760px; }
.eac-cases .small { margin: 12px 0 0; }
@media (max-width: 900px) { .mc-opts.is-long { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .readout-pair { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .mc-opts.is-long { grid-template-columns: minmax(0, 1fr); } }
/* The activity table is the main input, so the side column is wider than on the EAC page. */
@media (min-width: 1181px) {
  #pert-bench { grid-template-columns: minmax(340px, 390px) minmax(0, 1fr); }
  #pert-bench .pert-table input { min-width: 0; padding: 6px 5px !important; }
  #pert-bench .pert-table input.name { min-width: 0; }
  #pert-bench .pert-table th:first-child { width: auto; }
  #pert-bench .pert-table th:nth-child(2), #pert-bench .pert-table th:nth-child(3), #pert-bench .pert-table th:nth-child(4) { width: 54px; }
  #pert-bench .pert-table th:last-child { width: 30px; }
  #pert-bench .pert-table { table-layout: fixed; }
  #pert-bench .pert-table-wrap { overflow-x: hidden; }
  #pert-bench .pert-table.is-money th:nth-child(2), #pert-bench .pert-table.is-money th:nth-child(3), #pert-bench .pert-table.is-money th:nth-child(4) { width: 72px; }
}

/* Start from: three example estimates as labeled choices, then the cost table. */
.pert-start .eac-examples-label { margin-top: 0; }
.pert-presets { display: grid; gap: 6px; }
.pert-preset { display: grid; gap: 2px; text-align: left; padding: 9px 12px; border: 1px solid var(--border-line); background: var(--bg-card); color: var(--ink); cursor: pointer; }
.pert-preset strong { font-size: .86rem; }
.pert-preset span { color: var(--ink-muted); font-size: .76rem; }
.pert-preset:hover { border-color: var(--ink-muted); }
.pert-preset[aria-pressed=true] { background: var(--bg-canvas); border-color: var(--ink-muted); box-shadow: inset 3px 0 0 var(--accent); }
.pert-preset:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pert-entry { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-line); }
.pert-entry .panel-head { margin-bottom: 10px; }
.panel-unit { color: var(--ink-muted); }
.pert-settings { grid-template-columns: minmax(0, 1fr); margin: 14px 0 0; }
.pert-share { margin-top: 10px !important; }
@media (max-width: 1180px) {
  .pert-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pert-settings { grid-template-columns: minmax(0, 280px); }
}
@media (max-width: 640px) { .pert-presets { grid-template-columns: minmax(0, 1fr); } }
