.pricing-form { display: grid; gap: 16px; }

.pricing-period {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  padding: 17px 20px;
  background: #f3f8ff;
}

.pricing-period-label {
  margin: 0 0 3px;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 650;
}

.pricing-period-copy { flex: 1 1 300px; }
.pricing-period-copy p { margin: 0; font-size: 13px; line-height: 1.45; }

.pricing-assumptions-copy {
  display: grid;
  gap: 8px;
  padding: 0 20px 16px;
  font-size: 13px;
  line-height: 1.5;
}
.pricing-assumptions-copy p { margin: 0; }
.pricing-assumptions-note { color: var(--secondary); }
ul.pricing-assumptions-note { margin: 0; padding-left: 20px; }

.pricing-results-table { font-variant-numeric: tabular-nums; }
.pricing-results-table.has-forecast { min-width: 895px; }
.pricing-results-table thead th[scope="colgroup"] { color: var(--navy); text-align: center; }
.pricing-results-table thead .pricing-forecast-cell { background: #e9f2fc; }
.pricing-results-table .pricing-forecast-first { border-left: 1px solid var(--border); }
.pricing-results-table tbody th { background: var(--surface); }
.pricing-results-table tbody .pricing-total > * { background: #f3f8ff; font-weight: 680; }
.pricing-results-table tbody tr:last-child th { border-bottom: 0; }
.pricing-margin-target { display: block; margin-top: 2px; color: var(--secondary); font-size: 10px; }
.pricing-results-table .pricing-out-of-policy > th,
.pricing-results-table .pricing-out-of-policy .pricing-forecast-value,
.pricing-policy-status { color: var(--negative); }
.pricing-policy-status { display: block; margin-top: 2px; font-size: 10px; font-weight: 690; }

.pricing-table { min-width: 690px; }
.pricing-table th, .pricing-table td { padding: 8px 12px; }
.pricing-table thead th { font-size: 11px; }
.pricing-table thead th:nth-child(-n + 3), .pricing-table .pricing-policy { text-align: left; }
.pricing-table tbody + tbody tr:first-child > * { border-top: 1px solid var(--border); }
.pricing-table .pricing-channel, .pricing-table .pricing-policy { vertical-align: top; }
/* The channel and product names may wrap onto two lines, which leaves the room to the price being typed. */
.pricing-table .pricing-channel {
  width: 13%;
  min-width: 104px;
  background: #f6f8fb;
  color: var(--navy);
  white-space: normal;
}
.pricing-table thead th:first-child, .pricing-table thead th:nth-child(3) { white-space: normal; }
.pricing-table .pricing-policy { color: var(--secondary); }
.pricing-table .pricing-family { width: 11%; min-width: 96px; background: transparent; color: var(--text); font-weight: 550; text-align: left; white-space: normal; }
.pricing-table .pricing-edit { width: 146px; }
/* Wide enough to show a full price or monthly fee beside the browser's stepper arrows. */
.pricing-table .price-input { min-width: 122px; }
/* The fee table's headings wrap so the new fee keeps its width on a narrow screen. */
.service-fee-table thead th { white-space: normal; }
.service-fee-table th, .service-fee-table td { padding-right: 9px; padding-left: 9px; }
.pricing-table tbody:last-child tr:last-child > * { border-bottom: 0; }
.pricing-table td { font-variant-numeric: tabular-nums; }
.pricing-quote {
  border: 0;
  padding: 2px 0;
  background: transparent;
  color: var(--navy);
  font: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.pricing-quote:hover { text-decoration-style: solid; }
.pricing-table .pricing-below-cost > td, .pricing-table .pricing-below-cost > .pricing-family { background: #fff6f6; }
.pricing-table .pricing-below-cost > .pricing-family { color: var(--negative); }
.pricing-table .status-chip { display: block; width: fit-content; margin: 3px 0 0 auto; }
.pricing-alert { border-left: 4px solid var(--negative); }
.pricing-alert-floor { border-left-color: #c58a1c; }
.pricing-alert-copy { display: grid; gap: 9px; padding: 0 20px 17px; font-size: 13px; line-height: 1.55; }
.pricing-alert-copy ul { display: grid; gap: 5px; margin: 0; padding-left: 18px; }
.pricing-table .pricing-route-note td { color: var(--secondary); line-height: 1.45; text-align: left; white-space: normal; }

.price-input {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding-left: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.price-input span { color: var(--secondary); }
.price-input input {
  width: 100%;
  min-width: 0;
  padding: 6px 6px 6px 3px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.price-input:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.price-input input:focus-visible { outline: 0; }

.pricing-footer { justify-content: flex-end; }
#goods-pricing-message:not(:empty) { flex: 1 1 260px; }
#goods-pricing-message p { margin: 0; }

@media (max-width: 520px) {
  .pricing-period { padding: 13px; }
  .pricing-table th, .pricing-table td { padding-inline: 7px; }
  .pricing-results-table tr > :first-child { position: sticky; left: 0; padding-inline: 12px; }
  .pricing-results-table.has-forecast thead tr:nth-child(2) > :first-child { position: static; }
}

/* The dividend plan: a row for each subsidiary, an amount and a month for each quarter. */
.dividend-copy { padding: 0 20px 14px; }
.dividend-table { min-width: 980px; }
.dividend-table td { vertical-align: top; }
.dividend-table .pricing-channel { width: 24%; min-width: 230px; }
.dividend-table .dividend-edit { min-width: 168px; }
.dividend-fields { display: grid; grid-template-columns: minmax(96px, 1fr) auto; gap: 6px; align-items: center; }
.dividend-fields select { min-height: 32px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); font: inherit; }
.dividend-table .pricing-margin-target.negative { color: var(--negative); }
.dividend-cash-table { min-width: 720px; }
.dividend-cash-table tbody th { white-space: normal; min-width: 220px; }
.dividend-estimate > * { background: #f3f8ff; }
.dividend-estimate td.negative { color: var(--negative); }
#dividend-plan-message:not(:empty) { flex: 1 1 260px; }
#dividend-plan-message p { margin: 0; }
.dividend-table thead th:not(:first-child), .dividend-cash-table thead th:not(:first-child) { text-align: right; }
.dividend-cash-scroll { margin-top: 18px; border-top: 1px solid var(--border); }
@media (max-width: 520px) {
  .dividend-table tr > :first-child, .dividend-cash-table tr > :first-child { position: sticky; left: 0; z-index: 1; }
  .dividend-table .pricing-channel { width: auto; min-width: 136px; max-width: 150px; }
  .dividend-cash-table tbody th { min-width: 150px; }
  .dividend-cash-table thead th:first-child { background: #f6f8fb; }
  .dividend-copy { padding-inline: 13px; }
}

/* Prices over the years: one line chart of the price picked, and a table of them all. */
.history-pick { display: flex; align-items: center; gap: 8px; }
.history-pick select { max-width: 320px; }
.history-chart { display: block; width: 100%; max-width: 900px; min-width: 560px; height: auto; }
.history-grid { stroke: #e3e9f2; stroke-width: 1; }
.history-year { stroke: #b7c3d6; stroke-width: 1; stroke-dasharray: 4 4; }
.history-line { fill: none; stroke: #4e73a0; stroke-width: 2.5; }
.history-point { fill: #4e73a0; stroke: white; stroke-width: 1.5; }
.history-past { fill: #92612e; }
.history-tick, .history-label { font-size: 12px; fill: var(--secondary); }
