/* trades.html (draft): the trades arm. Shares styles.css and examples.css; only the new rules live here. */

/* The sample: the simulator's lead text */
.lb-card { margin: 0; padding: 20px 24px; max-width: 44em; overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; font-family: var(--mono); font-size: 14px; line-height: 1.6; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Before and after lines in the facts register */
.tr-ba { display: block; }
.tr-ba + .tr-ba { margin-top: 8px; color: var(--text-2); }

/* Head figure: a five-station line. Hollow circle at rest, filled when lit; the first station is lit until another is pointed at. */
.tr-line { margin-top: var(--gap-figure); }
.tr-line-steps { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 var(--cols-gap); }
.tr-line-steps::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 1px solid var(--text-3); transform-origin: left center; }
.tr-line-steps li { position: relative; min-width: 0; padding-top: 28px; }
.tr-line-steps li::before { content: ""; position: absolute; left: 0; top: 0; z-index: 1; width: 7px; height: 7px; box-sizing: border-box; border-radius: 50%; border: 1px solid var(--text-3); background: var(--bg); transition: background-color 240ms var(--ease), border-color 240ms var(--ease); }
.tr-line-steps .st { display: block; font-size: var(--fs-label); line-height: 1.4; color: var(--text-2); transition: color 240ms var(--ease); }
.tr-line-steps .sd { display: block; margin-top: 4px; font-size: var(--fs-meta); line-height: 1.45; color: var(--text-3); text-wrap: pretty; }
.tr-line-steps li:first-child::before { background: var(--text); border-color: var(--text); }
.tr-line-steps li:first-child .st { color: var(--text); }
@media (hover: hover) {
  .tr-line-steps:has(li:hover) li:first-child:not(:hover)::before { background: var(--bg); border-color: var(--text-3); }
  .tr-line-steps:has(li:hover) li:first-child:not(:hover) .st { color: var(--text-2); }
  .tr-line-steps li:hover::before { background: var(--text); border-color: var(--text); }
  .tr-line-steps li:hover .st { color: var(--text); }
}
.js .tr-line-steps::before { animation: tr-draw 800ms cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes tr-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes tr-draw-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (max-width: 760px) {
  .tr-line-steps { grid-template-columns: minmax(0, 1fr); }
  .tr-line-steps::before { left: 3px; right: auto; top: 8px; bottom: 36px; border-top: 0; border-left: 1px solid var(--text-3); transform-origin: center top; }
  .js .tr-line-steps::before { animation-name: tr-draw-y; }
  .tr-line-steps li { padding: 0 0 20px 28px; }
  .tr-line-steps li:last-child { padding-bottom: 0; }
  .tr-line-steps li::before { top: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .tr-line-steps::before { animation: none; }
  .tr-line-steps li::before, .tr-line-steps .st { transition: none; }
}

/* Payback calculator: four inputs on one row, then four results as a stat strip; the answer (extra jobs) is lit. */
.tr-calc { margin-top: var(--gap-block); padding: 32px 32px 28px; }
.tr-calc h3 { font-family: var(--serif); font-weight: 500; font-size: var(--fs-h3-row); line-height: 1.25; letter-spacing: -0.015em; }
.tr-calc .ex-calc-grid { margin-top: 24px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 24px; }
.tr-calc label { gap: 10px; }
.tr-calc input, .tr-calc select { box-sizing: border-box; width: 100%; height: 48px; min-height: 48px; padding: 0 14px; background-color: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 5px; font-size: 15px; line-height: 1; }
.tr-calc select { appearance: none; -webkit-appearance: none; padding-right: 40px; font-family: var(--sans); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%238a8985' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 8px; }
.tr-calc input, .tr-calc select { transition-property: border-color; transition-duration: 150ms; transition-timing-function: ease-out; }
@media (hover: hover) { .tr-calc select:hover, .tr-calc input:hover { border-color: var(--text-3); } }
/* High-contrast mode drops background images, so give the native arrow back there. */
@media (forced-colors: active) { .tr-calc select { appearance: auto; -webkit-appearance: auto; background-image: none; padding-right: 14px; } }
.tr-calc select:focus-visible, .tr-calc input:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.tr-calc-out { margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tr-stat { padding: 20px 24px 22px; min-width: 0; }
.tr-stat:first-child { padding-left: 0; }
.tr-stat + .tr-stat { border-left: 1px solid var(--line); }
.tr-stat dt { font-size: var(--fs-label); line-height: 1.4; color: var(--text-3); }
.tr-stat dd { margin: 10px 0 0; }
.tr-fig { display: block; font-family: var(--mono); font-weight: 500; font-size: 30px; line-height: 1.1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--text-2); }
.tr-stat--key .tr-fig { color: var(--text); }
.tr-note { display: block; margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--text-3); text-wrap: pretty; }
.tr-calc .ex-calc-out { margin-top: 22px; }
.tr-illus { margin-top: 12px; font-size: var(--fs-label); line-height: 1.5; color: var(--text-3); }
html:not(.js) .tr-calc-fields { display: none; }
.tr-calc + .ex-note { margin-top: 16px; }
@media (max-width: 900px) {
  .tr-calc .ex-calc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-calc-out { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .tr-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .tr-calc { padding: 22px 18px 20px; }
  .tr-calc .ex-calc-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tr-stat { padding: 16px 14px 18px; }
  .tr-fig { font-size: 26px; }
  .tr-stat dt { min-height: 2.8em; }
}

/* How it starts: five steps */
.ex-steps.tr-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .ex-steps.tr-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px var(--cols-gap); } }
@media (max-width: 900px) { .ex-steps.tr-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ex-steps.tr-steps { grid-template-columns: minmax(0, 1fr); } }

/* Packages: framed tiles. With nothing pointed at, the first is lit. */
.tr-pk { list-style: none; margin: var(--gap-block) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--cols-gap); align-items: stretch; }
.tr-pk > li { position: relative; min-width: 0; padding: var(--frame-pad-tight); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 240ms var(--ease); }
.tr-pk > li::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: var(--radius); border-top: 2px solid var(--text); border-radius: var(--radius) var(--radius) 0 0; box-sizing: border-box; transform: scaleX(0); transform-origin: left; transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1); pointer-events: none; }
.tr-pk:not(:hover) > li:first-child { border-color: var(--text-3); }
.tr-pk:not(:hover) > li:first-child::before { transform: scaleX(1); }
.tr-pk:not(:hover) > li:first-child .get li::before { background: var(--text); border-color: var(--text); }
@media (hover: hover) {
  .tr-pk > li:hover { border-color: var(--text-3); }
  .tr-pk > li:hover::before { transform: scaleX(1); }
  .tr-pk > li:hover .get li::before { background: var(--text); border-color: var(--text); }
}
.tr-pk h3 { font-family: var(--serif); font-weight: 500; font-size: var(--fs-h3); line-height: 1.12; letter-spacing: -0.015em; }
.tr-pk .price { margin-top: var(--gap-sf); font-family: var(--mono); font-weight: 500; font-size: var(--fs-figure); line-height: 1.05; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.tr-pk .note { margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--text-3); text-wrap: pretty; }
.tr-pk .fit { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.tr-pk h4 { margin: var(--gap-rule) 0 0; padding-top: var(--gap-sf); border-top: 1px solid var(--line); font-family: var(--sans); font-size: var(--fs-label); font-weight: 500; line-height: 1.4; color: var(--text-3); }
.tr-pk .get { list-style: none; margin: var(--gap-label) 0 0; padding: 0; display: grid; gap: var(--gap-list); }
.tr-pk .get li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.45; color: var(--text); text-wrap: pretty; }
.tr-pk .get li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; box-sizing: border-box; border-radius: 50%; border: 1px solid var(--text-3); transition: background-color 240ms var(--ease), border-color 240ms var(--ease); }
@media (max-width: 1000px) { .tr-pk { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .tr-pk > li, .tr-pk > li::before, .tr-pk .get li::before { transition: none; } }

/* Standalone items: the price is a figure, so it sits in mono */
.rows .mono { font-weight: 500; letter-spacing: -0.04em; color: var(--text); }
.rows li { align-items: baseline; }
.rows h4 { margin: 0; }
.rows p { margin: 0; }

/* ── 2026-10-23 redesign: fewer words, clearer blocks ── */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Head: big two-line promise, one-line lede, two actions, then the call path */
.tr-head h1 { max-width: 14em; text-wrap: balance; }
.tr-head .lede { max-width: 34em; }
.tr-head .actions { margin-top: 28px; }
.tr-head .tr-line { margin-top: 56px; }

/* What changes: a three-column before/after table; "after" carries the light */
.tr-ba-table { width: 100%; margin-top: var(--gap-block); border-collapse: collapse; border-top: 1px solid var(--line); }
.tr-ba-table thead th { padding: 14px 24px 14px 0; font-size: var(--fs-label); font-weight: 400; color: var(--text-3); text-align: left; border-bottom: 1px solid var(--line); }
.tr-ba-table tbody th, .tr-ba-table td { padding: 22px 24px 22px 0; text-align: left; vertical-align: baseline; border-bottom: 1px solid var(--line); }
.tr-ba-table tbody th { width: 28%; font-family: var(--serif); font-weight: 500; font-size: var(--fs-h3-row); line-height: 1.25; letter-spacing: -0.015em; color: var(--text); }
.tr-ba-table td { width: 36%; font-size: 16px; line-height: 1.5; color: var(--text-3); }
.tr-ba-table td:last-child { color: var(--text); padding-right: 0; }
@media (max-width: 760px) {
  .tr-ba-table thead { display: none; }
  .tr-ba-table, .tr-ba-table tbody, .tr-ba-table tr { display: block; }
  .tr-ba-table tr { padding: 18px 0; border-bottom: 1px solid var(--line); }
  .tr-ba-table tbody th, .tr-ba-table td { display: block; width: auto; padding: 0; border: 0; }
  .tr-ba-table td { margin-top: 8px; }
  .tr-ba-table td:first-of-type::before { content: "Before: "; color: var(--text-3); }
  .tr-ba-table td:last-child::before { content: "After: "; color: var(--text-3); }
}

/* Packages: no sub-heading inside the tile; the fit line sits above a hairline */
.tr-pk .fit { padding-bottom: var(--gap-sf); border-bottom: 1px solid var(--line); }
.tr-pk .get { margin-top: 16px; }

/* Or one piece / after handover: two compact price lists side by side */
.tr-extra { margin-top: 56px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto; grid-auto-flow: column; gap: 0 var(--split-gap); }
.tr-extra-h { font-family: var(--serif); font-weight: 500; font-size: var(--fs-h3-row); line-height: 1.25; letter-spacing: -0.015em; }
.tr-extra dl { margin: 14px 0 0; border-top: 1px solid var(--line); }
.tr-extra dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tr-extra dt { font-size: 15px; color: var(--text); }
.tr-extra dd { margin: 0; text-align: right; white-space: nowrap; }
.tr-extra dd .mono { font-weight: 500; font-size: 16px; letter-spacing: -0.03em; color: var(--text); }
.tr-extra dd .then { margin-left: 10px; font-size: 13px; color: var(--text-3); }
@media (max-width: 760px) {
  .tr-extra { grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; row-gap: 0; }
  .tr-extra dl + .tr-extra-h { margin-top: 36px; }
  .tr-extra dd { white-space: normal; }
}

/* How we worked it out: tucked away, one click to open */
.tr-more { margin-top: 18px; max-width: 46em; }
.tr-more summary { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; color: var(--text-2); cursor: pointer; text-decoration: underline; text-decoration-color: var(--text-3); text-underline-offset: 5px; }
.tr-more summary::-webkit-details-marker { display: none; }
.tr-more summary { list-style: none; }
@media (hover: hover) { .tr-more summary:hover { color: var(--text); text-decoration-color: currentColor; } }
.tr-more p { margin-top: 8px; font-size: 13px; line-height: 1.6; color: var(--text-3); }

/* Steps: short lines need less room */
.tr-steps p { color: var(--text-2); }

/* What we won't promise: one short line each, two columns on wide screens */
.tr-no { list-style: none; margin: var(--gap-block) 0 0; padding: 0; max-width: 46em; border-top: 1px solid var(--line); }
.tr-no li { position: relative; padding: 16px 0 16px 22px; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.tr-no li::before { content: ""; position: absolute; left: 0; top: calc(16px + 0.72em); width: 10px; border-top: 1px solid var(--text-3); }
@media (max-width: 760px) { .tr-no { grid-template-columns: minmax(0, 1fr); } }

/* Package tiles: same height, and every inner row lines up across the three (subgrid on wide screens).
   Each tile has five children: name, price, note, fit line, list. */
@media (min-width: 1001px) {
  .tr-pk { gap: 0 var(--cols-gap); grid-template-rows: none; }
  .tr-pk > li { display: grid; grid-row: span 5; grid-template-rows: subgrid; align-content: start; }
  .tr-pk > li > .get { align-self: start; }
}
