/* Owner P&L (/owner-pnl) and Tax Bracket Truth Calculator (/tax-brackets), November 2026.
   Loaded after page-pay-check.css and reuses its .pc building blocks
   (steps, inputs, KPI cards, CTA, fine print). Everything is scoped under .pc. */

/* Make / Do / Sell switch, and the filing status switch */
.pc-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  border: 2px solid #0E1B2E;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 14px;
}

.pc .pc-seg button {
  font: 700 17px/1.2 var(--font-display);
  padding: 12px 20px;
  background: #FFFFFF;
  color: #0E1B2E;
  border: 0;
  border-right: 1px solid #0E1B2E;
  cursor: pointer;
}

.pc .pc-seg button:last-child { border-right: 0; }
.pc .pc-seg button:hover { background: #F5F3F0; }
.pc .pc-seg button[aria-pressed="true"] { background: #0E1B2E; color: #F5F3F0; }
.pc .pc-seg button:focus-visible { outline: 3px solid #0050D0; outline-offset: -3px; }

.pc-seg-note { margin: 10px 0 0; font-size: 17px; max-width: none; }

/* Owner P&L: the two hats */
.pc-fields--3 { grid-template-columns: 1.2fr 1fr 1fr; }
.pc-calc-line {
  margin: 14px 0 0;
  padding: 12px 14px;
  background: var(--pc-blue-soft);
  border-radius: 6px;
  font-size: 17px;
  max-width: none;
}
.pc-calc-line b { font-weight: 700; }

.pc-guide { margin-top: 14px; }
.pc-guide summary {
  cursor: pointer;
  font-weight: 600;
  color: #0050D0;
}
.pc-guide-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 28px;
  margin-top: 10px;
}
.pc-guide h3 { font: 700 16px/1.3 var(--font-display); margin: 0 0 4px; }
.pc-guide ul { margin: 0; padding-left: 20px; font-size: 16px; line-height: 1.45; }
.pc-guide .pc-rule { grid-column: 1 / -1; margin: 6px 0 0; font-size: 16px; font-weight: 600; max-width: none; }

/* Owner P&L: the statement you fill in */
.pc-pl {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 17px;
}

.pc-pl th,
.pc-pl td {
  padding: 7px 8px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #EEEAE4;
}

.pc-pl thead th {
  font: 600 14px/1.2 var(--font-body);
  color: #5B5550;
  border-bottom: 2px solid #0E1B2E;
}

.pc-pl .pc-amt { width: 190px; text-align: right; }
.pc-pl .pc-pctc { width: 82px; text-align: right; color: #5B5550; font-variant-numeric: tabular-nums; }
.pc-pl td.pc-amt { font-variant-numeric: tabular-nums; }
.pc-pl .pc-money input { text-align: right; padding-top: 8px; padding-bottom: 8px; }

.pc-pl .pc-sec th {
  padding-top: 18px;
  font: 700 14px/1.2 var(--font-display);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #0050D0;
  border-bottom: 0;
}

.pc-pl .pc-hint { display: block; font-size: 14px; color: #6B645D; line-height: 1.3; }

.pc-pl .pc-owner td { background: #FFF1E8; }
.pc-pl .pc-owner .pc-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 10px;
  background: #F05001;
  color: #FFFFFF;
  font: 700 12px/1.5 var(--font-body);
  vertical-align: 2px;
}

.pc-pl .pc-sub td { font-weight: 700; border-bottom: 1px solid #C9C2B9; }
.pc-pl .pc-big-row td {
  font: 700 19px/1.3 var(--font-display);
  border-top: 2px solid #0E1B2E;
  border-bottom: 2px solid #0E1B2E;
  background: #F8F6F3;
}
.pc-pl .pc-ratio td { font-size: 15px; color: #0050D0; font-weight: 600; border-bottom: 0; padding-top: 2px; }
.pc-pl .pc-profit td { background: #0E1B2E; color: #F5F3F0; }
.pc-pl .pc-profit td.pc-pctc { color: #F5F3F0; }
.pc-pl .pc-profit.is-loss td { background: #8C1D18; }

/* Status chips on the five numbers */
.pc-kpis--5 { grid-template-columns: repeat(5, 1fr); }
.pc-kpis--5 .pc-kpi .pc-v { font-size: 30px; }
.pc-chip {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 12px;
  font: 700 13px/1.4 var(--font-body);
  letter-spacing: .02em;
}
.pc-chip.is-good { background: #E3F3E8; color: #17603A; }
.pc-chip.is-watch { background: #FFF1D6; color: #7A4F00; }
.pc-chip.is-fix { background: #FBE4E2; color: #A1221B; }
.pc-chip.is-none { background: #ECE8E2; color: #5B5550; }
.pc-kpi .pc-t2 { font-size: 14px; color: #6B645D; margin-top: 6px; line-height: 1.35; }

/* Where every revenue dollar goes */
.pc-stack-wrap { margin-top: 22px; }
.pc-stack-wrap h3 { font: 700 19px/1.3 var(--font-display); margin: 0 0 10px; }
.pc-stack {
  display: flex;
  height: 34px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--pc-track);
}
.pc-stack span { display: block; height: 100%; transition: width .4s; }
.pc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
}
.pc-legend li { display: flex; align-items: center; gap: 7px; }
.pc-legend i { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.pc-legend b { font-variant-numeric: tabular-nums; }

/* Tax calculator: bracket table and income layers */
.pc-tb { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 16px; font-variant-numeric: tabular-nums; }
.pc-tb th, .pc-tb td { padding: 8px 8px; text-align: right; border-bottom: 1px solid #EEEAE4; }
.pc-tb th:first-child, .pc-tb td:first-child { text-align: left; }
.pc-tb thead th { font: 600 14px/1.25 var(--font-body); color: #5B5550; border-bottom: 2px solid #0E1B2E; vertical-align: bottom; }
.pc-tb .pc-rate { font: 700 17px/1.2 var(--font-display); }
.pc-tb .pc-range { display: block; font-size: 13px; color: #6B645D; font-family: var(--font-body); font-weight: 400; }
.pc-tb tr.is-empty td { color: #A9A29A; }
.pc-tb tr.is-new td.pc-newc { background: #FFF1E8; }
.pc-tb tfoot td { font-weight: 700; border-top: 2px solid #0E1B2E; border-bottom: 0; }

.pc-layers { margin-top: 22px; }
.pc-layers h3 { font: 700 19px/1.3 var(--font-display); margin: 0 0 4px; }
.pc-layers p { margin: 0 0 10px; font-size: 16px; max-width: none; }
.pc-layer-bar { display: flex; height: 40px; border-radius: 8px; overflow: hidden; background: var(--pc-track); position: relative; }
.pc-layer-bar span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font: 700 13px/1 var(--font-body);
  color: #FFFFFF;
  overflow: hidden;
  white-space: nowrap;
  transition: width .4s;
}
.pc-layer-bar span.is-new { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.28) 0 6px, transparent 6px 12px); }
.pc-layer-cut {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 3px;
  margin-left: -1px;
  background: #F05001;
  transition: left .4s;
}
.pc-layer-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 15px; }
.pc-layer-key span { display: inline-flex; align-items: center; gap: 6px; }
.pc-layer-key i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.pc-layer-key i.is-hatch { background: #0050D0; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.4) 0 4px, transparent 4px 8px); }
.pc-layer-key i.is-cut { width: 3px; height: 16px; border-radius: 0; background: #F05001; }

.pc-truth {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.pc-truth > div { border: 1px solid var(--pc-line); border-radius: 8px; padding: 16px 18px; background: #FFFFFF; }
.pc-truth .pc-l { font-size: 15px; font-weight: 600; color: #5B5550; }
.pc-truth .pc-v { font: 700 30px/1.15 var(--font-display); margin-top: 4px; }
.pc-truth .pc-n { font-size: 15px; color: #6B645D; margin-top: 4px; }

@media (max-width: 960px) {
  .pc-kpis--5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .pc-seg { display: flex; }
  .pc .pc-seg button { flex: 1 1 auto; padding: 12px 6px; font-size: 15px; white-space: nowrap; }
  .pc-fields--3 { grid-template-columns: 1fr; }
  .pc-guide-cols { grid-template-columns: 1fr; }
  .pc-pl { font-size: 16px; }
  .pc-pl th, .pc-pl td { padding: 6px 4px; }
  .pc-pl .pc-amt { width: 132px; }
  .pc-pl .pc-pctc { width: 52px; font-size: 14px; }
  .pc-pl .pc-hint { font-size: 13px; }
  .pc-pl .pc-big-row td { font-size: 16px; }
  .pc-kpis--5 { grid-template-columns: 1fr 1fr; }
  .pc-kpis--5 .pc-kpi:last-child { grid-column: 1 / -1; }
  .pc-kpis--5 .pc-kpi .pc-v { font-size: 26px; }
  .pc-truth { grid-template-columns: 1fr; }
  .pc-tb { font-size: 14px; }
  .pc-tb th, .pc-tb td { padding: 6px 3px; }
  .pc-tb .pc-hide-sm { display: none; }
}

@media print {
  .pc-seg button:not([aria-pressed="true"]) { display: none; }
  .pc-guide { display: none; }
  .pc-pl .pc-owner td, .pc-pl .pc-profit td, .pc-chip, .pc-stack span, .pc-legend i,
  .pc-layer-bar span, .pc-layer-key i, .pc-tb tr.is-new td.pc-newc {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .pc-pl tr, .pc-kpi, .pc-stack-wrap, .pc-layers { break-inside: avoid; }
}
