.tco-page { max-width: 900px; }
.tco-page section[id] { scroll-margin-top: 92px; margin-top: 52px; }
.tco-hero { background: var(--dark); color: #fcf7eb; border-radius: 24px; padding: clamp(24px, 6vw, 58px); }
.tco-hero h1 { margin: 12px 0 18px; max-width: 650px; }
.tco-kicker { font-size: .76rem; line-height: 1.4; font-weight: 600; text-transform: uppercase; letter-spacing: .11em; color: var(--gold-ink); margin: 0 0 10px; }
.tco-hero .tco-kicker { color: var(--gold-on-dark); }
.tco-lede { font-size: clamp(1rem, 2.4vw, 1.22rem); max-width: 650px; line-height: 1.6; color: #ebeee4; }
.tco-byline { font-size: .94rem; color: #ebeee4; }
.tco-jumps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 25px; }
.tco-jumps a { border: 1px solid #88968b; color: inherit; border-radius: 30px; padding: 7px 12px; text-decoration: none; font-size: .86rem; }
.tco-jumps a:hover, .tco-jumps a:focus-visible { background: #fcf7eb; color: var(--dark); }
.tco-intro { margin: 30px 0; }
.tco-page h2 { color: var(--dark); font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 16px; }
.tco-steps { list-style: none; counter-reset: steps; padding: 0; }
.tco-steps > li { position: relative; counter-increment: steps; border-top: 1px solid var(--border); padding: 22px 0 8px 50px; }
.tco-steps > li::before { content: counter(steps, decimal-leading-zero); position: absolute; left: 0; top: 20px; color: var(--gold-ink); font: 600 1.2rem Georgia, serif; }
.tco-steps h3 { color: var(--dark); margin: 0; font-size: 1.26rem; }
.tco-steps p { margin: 10px 0 14px; }
.tco-formula { border-left: 3px solid var(--gold-ink); padding: 10px 15px; background: #efe7d2; color: var(--dark); font-weight: 600; }
.tco-model { background: #fffdf7; border: 1px solid var(--border); padding: clamp(14px, 4vw, 28px); border-radius: 18px; }
.tco-model fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.tco-model legend { color: var(--dark); font-weight: 600; padding: 0; }
.tco-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 12px 0; }
.tco-fields label { font-size: .9rem; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; }
.tco-fields input { width: 100%; box-sizing: border-box; color: var(--text); background: white; font: inherit; padding: 8px 10px; min-height: 42px; border: 1px solid #8b8b79; border-radius: 7px; }
.tco-fields input[aria-invalid="true"] { border: 2px solid #9b382c; }
.tco-model button { background: transparent; color: var(--dark); border: 1px solid #8b8b79; font: inherit; font-size: .88rem; border-radius: 20px; cursor: pointer; padding: 6px 13px; }
.tco-model button:hover { background: #efe7d2; }
.tco-small { color: var(--muted); font-size: .89rem; }
.tco-table-wrap { overflow-x: auto; }
.tco-table { width: 100%; border-collapse: collapse; font-size: clamp(.8rem, 2.3vw, .94rem); line-height: 1.4; }
.tco-table caption { text-align: left; padding: 4px 0 10px; color: var(--muted); }
.tco-table th, .tco-table td { padding: 9px 7px; border-bottom: 1px solid var(--border); text-align: right; font-variant-numeric: tabular-nums; }
.tco-table tr > :first-child, .tco-register th, .tco-register td { text-align: left; }
.tco-table thead, .tco-table tfoot { background: #efeadb; color: var(--dark); font-weight: 600; }
.tco-register { min-width: 590px; }
.tco-result { background: var(--dark); color: #fffdf7; border-radius: 8px; padding: 12px 16px; margin-bottom: 0; }
.tco-brief { margin-top: 26px; padding: 16px 20px; background: #efe7d2; border-radius: 12px; }
.tco-brief p:last-child { margin: 0; }
.tco-print-inputs { display: none; }
@media (max-width: 530px) {
  .tco-steps > li { padding-left: 33px; }
  .tco-fields { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  body, .tco-model, .tco-hero, .tco-result { background: #fff; color: #111; }
  .site-header, .tco-jumps, #tco-inputs { display: none; }
  .tco-print-inputs { display: block; font-size: .88rem; }
  .tco-page { max-width: none; padding: 0; }
  .tco-hero { padding: 0; }
  .tco-hero .tco-kicker, .tco-byline, .tco-lede { color: #333; }
  .tco-page h2, .tco-page h3, .tco-table caption { break-after: avoid; }
  .tco-table tr, .tco-brief { break-inside: avoid; }
  .tco-register { min-width: 0; }
}
.tco-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 22px 0; }
.tco-options > div { background: #fffdf7; border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.tco-options h3, .tco-brief h3 { color: var(--dark); margin: 0 0 12px; font-size: 1.2rem; }
.tco-options p { margin: 0 0 10px; font-size: .94em; }
.tco-options p:last-child { margin-bottom: 0; }
.tco-operations th:first-child { width: 46%; }
.tco-subtotal { background: #f8f2e4; font-weight: 600; }
@media (max-width: 620px) {
  .tco-options { grid-template-columns: minmax(0, 1fr); }
  .tco-operations th:first-child { width: auto; }
}
@media print {
  .tco-options > div { break-inside: avoid; }
}
.tco-worked { margin-top: 32px; }
.tco-worked > h3 { color: var(--dark); font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin-bottom: 12px; }
.tco-walkthrough { padding-inline-start: 1.55em; }
.tco-walkthrough > li { padding-inline-start: .25em; margin: 0 0 1em; }
.tco-walkthrough > li::marker { color: var(--gold-ink); font-weight: 600; }
.tco-walkthrough p { margin: 4px 0 10px; }

.tco-download, .tco-secondary {
  display: inline-block;
  border: 1px solid var(--dark);
  border-radius: 8px;
  padding: 7px 13px;
  font: inherit;
  font-size: .9rem;
  text-decoration: none;
  cursor: pointer;
}
.article-body .tco-download { background: var(--dark); color: #fffdf7; }
.tco-download span { opacity: .85; }
.tco-secondary { color: var(--dark); background: transparent; margin-top: 10px; }
.tco-project { border: 1px solid var(--border); border-radius: 14px; padding: clamp(12px, 3vw, 22px); background: #fffdf7; }
.tco-project fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.tco-project legend { font-weight: 600; color: var(--dark); }
.tco-project summary { cursor: pointer; font-weight: 600; color: var(--dark); }
.tco-project textarea { font: inherit; border: 1px solid #8b8b79; border-radius: 7px; padding: 7px; resize: vertical; }
.tco-project-ledger { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.tco-project-ledger h3 { margin: 0; color: var(--dark); font-size: 1.22rem; }
.tco-project-ledger p { font-size: .9rem; margin: 8px 0 12px; }
.tco-project-annual { margin-top: 16px; }
.tco-edit-table { min-width: 680px; }
.tco-edit-table th, .tco-edit-table td { text-align: left; vertical-align: top; }
.tco-edit-table input, .tco-edit-table select, .tco-edit-table button {
  box-sizing: border-box;
  font: inherit;
  color: inherit;
  border: 1px solid #8b8b79;
  border-radius: 5px;
  padding: 5px;
  min-height: 32px;
}
.tco-edit-table input { width: 100%; min-width: 68px; }
.tco-edit-table input[type="text"] { min-width: 120px; }
.tco-edit-table details label { display: block; margin: 6px 0; font-size: .8rem; }
.tco-edit-table details[open] { min-width: 132px; }
.tco-edit-table .tco-row-invalid { background: #fce7e1; }
.tco-project-year-table { min-width: 740px; }
#tco-project-totals tr:nth-child(3), #tco-project-totals tr:nth-child(5) { background: #e6efe8; font-weight: 600; }
.tco-appendix { border-top: 1px solid var(--border); padding-top: clamp(22px, 4vw, 34px); }
.tco-appendix h3 { color: var(--dark); font-size: 1.24rem; margin: 26px 0 8px; }
.tco-appendix ul { padding-inline-start: 1.3em; margin: 0 0 10px; }
.tco-appendix li + li { margin-top: 5px; }
.tco-appendix-return { margin-top: 24px; font-weight: 600; }
@media print { .tco-project, .tco-download { display: none; } }
@media print { .tco-appendix { break-before: page; } .tco-appendix-return { display: none; } }
