/* Trade Check, new look (UI builder 1, 19 Oct 2026; mock-ups ui1_tradecheck*_mockup.html approved by the product lead).
   Built on ui.css (tokens --s1..--s9, --t-*, --radius, --tap, pg-head, kit-card) and the app.css colours (light and dark).
   Body text 17 px, nothing under 15 px, taps 44 px or more, one spacing scale. Nothing moves except feedback. */
.tc { font-size: var(--t-body); line-height: 1.55; padding-bottom: 96px; }          /* room for the floating chat button on phones */
.tc h1[tabindex="-1"]:focus { outline: none; }
.tc .pg-head { margin: var(--s1) 0 var(--s5); gap: var(--s3) var(--s5); align-items: flex-end; }
.tc .pg-head h1 { font-size: var(--t-title); letter-spacing: -.02em; line-height: 1.1; }
.tc .pg-head .pg-sub { margin-top: 6px; font-size: 18px; max-width: 56ch; }
.tc .tc-tag { display: inline-block; font-size: var(--t-small); font-weight: 500; letter-spacing: 0; padding: 2px 10px; border-radius: 999px;
  background: var(--sel-bg); color: var(--sel-text); vertical-align: 3px; margin-left: 6px; }
.tc .kit-card { padding: var(--s6); border-radius: 20px; gap: var(--s3); }
.tc .kit-card:hover { border-color: var(--border); box-shadow: none; }                 /* no card lifts on hover */
.tc .tc-help, .tc .tc-why, .tc .tc-privacy, .tc .tc-footer { margin: var(--s2) 0 0; font-size: var(--t-small); color: var(--text-2); max-width: 64ch; line-height: 1.55; }
.tc .tc-privacy a, .tc .tc-help a { color: var(--link); }
.tc .tc-go { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); }
.tc .tc-go .primary, .tc .tc-go .button { min-height: var(--tap); padding-left: 22px; padding-right: 22px; }
.tc .primary.big { min-height: 56px; font-size: 17px; padding-left: 28px; padding-right: 28px; }
.tc button, .tc .button { font-size: 16px; min-height: 44px; }                              /* 16 px text, 44 px taps everywhere on the page */
.tc .button.small { font-size: var(--t-small); }

/* start: a three-step panel for visitors, the form for signed-in people, a side column on the right */
.tc .tc-start-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.tc .tc-start-main { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.tc .tc-side-col { display: grid; gap: var(--s4); min-width: 0; }
.tc .tc-visitor h2, .tc .tc-side h2, .tc .tc-own-h, .tc .tc-data h2 { margin: 0; font-size: var(--t-h3); font-weight: 500; line-height: 1.25; }
.tc .tc-steps { list-style: none; margin: var(--s3) 0 var(--s2); padding: 0; display: grid; gap: var(--s4); counter-reset: tcs; }
.tc .tc-steps li { counter-increment: tcs; display: grid; grid-template-columns: 44px 1fr; align-items: start; }
.tc .tc-steps li::before { content: counter(tcs); grid-row: span 2; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--sel-bg); color: var(--sel-text); font-weight: 500; font-size: var(--t-small); }
.tc .tc-steps b { font-weight: 500; }
.tc .tc-steps span { color: var(--text-2); font-size: var(--t-small); }
.tc .tc-visitor p, .tc .tc-visitor-note p { margin: 0; font-size: var(--t-body); line-height: 1.5; }
.tc .tc-visitor-ask { color: var(--text-2); }
.tc .tc-sample-ask { margin-top: var(--s2) !important; padding-top: var(--s4); border-top: 1px solid var(--border); }
.tc .tc-sample-ask .link-button { font-weight: 500; font-size: inherit; min-height: 44px; padding: 0 4px; }
.tc .tc-visitor-note { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s2); }
.tc .tc-off { gap: var(--s3); align-items: flex-start; }
.tc .tc-off p { margin: 0; font-size: var(--t-body); }
.tc .tc-ticks { list-style: none; padding: 0; margin: var(--s2) 0 0; display: grid; gap: var(--s3); font-size: var(--t-body); }
.tc .tc-ticks li { position: relative; padding-left: 36px; min-height: 26px; }
.tc .tc-ticks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--pos-fill); }
.tc .tc-ticks li::after { content: ""; position: absolute; left: 9px; top: 7px; width: 5px; height: 10px; border-right: 2px solid var(--pos); border-bottom: 2px solid var(--pos); transform: rotate(45deg); }
.tc .tc-side h3 { font-size: var(--t-body); font-weight: 500; margin: var(--s4) 0 var(--s2); }
.tc .tc-earlier { list-style: none; padding: 0; margin: 0; font-size: var(--t-small); }
.tc .tc-earlier .link-button { white-space: normal; text-align: left; justify-content: flex-start; max-width: 100%; min-height: 44px; }   /* a long report line wraps on a phone */
.tc .tc-own { gap: var(--s2); }
.tc .tc-own[hidden] { display: none; }
.tc .tc-own .tc-help { margin: 0; }
.tc .tc-own .tc-go { margin-top: var(--s2); }
.tc .tc-msg { text-align: left; padding: var(--s3) var(--s4); border: 1px solid var(--neg); border-radius: 12px; background: var(--neg-fill); margin-top: var(--s2);
  display: flex; flex-direction: column; gap: var(--s2); align-items: flex-start; }

/* the upload form: four numbered steps */
.tc .tc-upload { gap: 0; }
.tc .tc-step { border: 0; border-top: 1px solid var(--border); margin: 0; padding: var(--s5) 0; min-width: 0; }
.tc .tc-step:first-of-type { border-top: 0; padding-top: 0; }
.tc .tc-step legend { float: left; width: 100%; display: flex; align-items: center; gap: var(--s3); font-size: var(--t-h3); font-weight: 500; margin: 0 0 var(--s4); padding: 0; }
.tc .tc-step legend i { font-style: normal; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--sel-bg); color: var(--sel-text); font-size: var(--t-small); flex: none; }
.tc .tc-step > :not(legend) { clear: both; }
.tc .tc-pills, .tc .tc-rule-pick { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tc .tc-pill { min-height: var(--tap); padding: 0 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 400; font-size: 16px; }
.tc .tc-pill[aria-pressed="true"], .tc .tc-pill[aria-checked="true"] { border: 2px solid var(--primary-edge); background: var(--sel-bg); color: var(--sel-text); font-weight: 500; }
.tc .tc-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: var(--s6) var(--s4); border: 2px dashed var(--text-2);
  border-radius: 16px; background: var(--inset); cursor: pointer; color: var(--text-2); font-size: var(--t-small); }
.tc .tc-drop strong { color: var(--text); font-size: 18px; font-weight: 500; }
.tc .tc-drop .tc-choose { margin-top: var(--s2); min-height: var(--tap); display: inline-flex; align-items: center; }
.tc .tc-drop.over, .tc .tc-drop:focus-within { border-color: var(--primary-edge); background: var(--sel-bg); }
.tc .tc-files { list-style: none; padding: 0; margin: var(--s3) 0 0; display: flex; flex-direction: column; gap: var(--s2); }
.tc .tc-files li { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border: 1px solid var(--border); border-radius: var(--radius-s); font-size: var(--t-small); }
.tc .tc-file-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tc .tc-file-size { color: var(--text-2); font-size: var(--t-small); white-space: nowrap; }
.tc .tc-how { margin-top: var(--s3); font-size: var(--t-small); }
.tc .tc-how summary { cursor: pointer; color: var(--link); font-weight: 500; font-size: var(--t-body); min-height: 44px; display: flex; align-items: center; }
.tc .tc-how ol { margin: var(--s2) 0 0; padding-left: 22px; color: var(--text-2); line-height: 1.65; }
.tc .tc-hint { margin: 0 0 var(--s2); }
.tc .tc-field { display: flex; flex-direction: column; gap: 6px; font-size: var(--t-body); color: var(--text); min-width: 0; }
.tc .tc-field input, .tc .tc-field select { max-width: 260px; min-height: 52px; padding: 0 14px; border-radius: 12px; font-size: 20px; font-weight: 500; }
.tc .tc-field select { font-size: var(--t-body); font-weight: 400; max-width: none; }
.tc .tc-consent { display: grid; grid-template-columns: 28px 1fr; gap: var(--s3); align-items: start; padding: var(--s4); border: 1px solid var(--border); border-radius: var(--radius);
  margin-top: var(--s3); font-size: var(--t-body); line-height: 1.5; cursor: pointer; background: transparent; }
.tc .tc-consent input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--primary); }
.tc .tc-optional { color: var(--text-2); }
.tc .tc-upload > .tc-go { margin-top: var(--s4); }
.tc .tc-privacy { margin-top: var(--s4); }

/* column matching */
.tc .tc-map-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s5); }
.tc .tc-map-grid label span { font-weight: 500; }
.tc .tc-either { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s5); padding: var(--s4); border-radius: var(--radius); background: var(--inset); }
.tc .tc-either .tc-help { grid-column: 1 / -1; margin: 0; }
.tc .tc-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.tc .tc-preview { width: 100%; border-collapse: collapse; font-size: var(--t-small); min-width: 560px; }
.tc .tc-preview th, .tc .tc-preview td { padding: 10px 12px; border-top: 1px solid var(--border); white-space: nowrap; text-align: left; }
.tc .tc-preview thead th { background: var(--inset); color: var(--text-2); border-top: 0; font-weight: 500; }
.tc .tc-sub-h { font-size: var(--t-h3); font-weight: 500; margin: var(--s5) 0 var(--s3); }
#tc-map-form .tc-go { margin-top: var(--s5); }

/* the report: result first, then where the money went */
.tc .tc-sample-note, .tc .tc-attention { margin: 0 0 var(--s4); padding: var(--s3) var(--s4); border-radius: 12px; font-size: var(--t-small); color: var(--text); }
.tc .tc-sample-note { background: var(--warn-fill); }
.tc .tc-attention { border: 1px solid var(--warn); background: var(--warn-fill); }
.tc .tc-verdict { gap: 0; }
.tc .tc-verdict-label { margin: 0; color: var(--text-2); font-size: var(--t-body); }
.tc .tc-verdict-big { margin: 4px 0 0; font-size: var(--t-figure); font-weight: 500; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums lining-nums; }
.tc .tc-verdict-text { margin: var(--s3) 0 0; font-size: 18px; line-height: 1.55; max-width: 56ch; }
.tc .tc-bridge { display: grid; gap: var(--s3); margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--border); }
.tc .tc-bridge[hidden], .tc .tc-meter[hidden], .tc [hidden] { display: none; }
.tc .tc-bridge div, .tc .tc-bars div { display: grid; grid-template-columns: 160px 1fr 110px; gap: var(--s3); align-items: center; }
.tc .tc-bridge span, .tc .tc-bars span { color: var(--text-2); font-size: var(--t-small); }
.tc .tc-bridge i, .tc .tc-bars i { display: block; height: 14px; border-radius: 7px; background: var(--control); transition: width .25s ease; }
.tc .tc-bridge i.pos, .tc .tc-bars i.pos { background: var(--pos); }
.tc .tc-bridge i.neg, .tc .tc-bars i.neg { background: var(--neg); }
.tc .tc-bars i.base { background: var(--control); }
.tc .tc-bridge b, .tc .tc-bars b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); }
.tc .tc-bridge b.pos { color: var(--pos); } .tc .tc-bridge b.neg { color: var(--neg); }
.tc .tc-meter { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--border); }
.tc .tc-verdict-win { margin: 0; font-size: var(--t-body); line-height: 1.55; max-width: 64ch; }
.tc .tc-meter-bar { position: relative; height: 14px; border-radius: 7px; background: var(--inset); margin: var(--s4) 0 var(--s2); }
.tc .tc-meter-bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; background: var(--primary); }
.tc .tc-meter-bar em { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1px; border-radius: 2px; background: var(--text); }
.tc .tc-meter-keys { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; font-size: var(--t-small); color: var(--text-2); }
.tc .tc-verdict > #tc-estimate { margin-top: var(--s4); }
.tc .tc-unsure { margin: var(--s4) 0 0; background: var(--inset); }
.tc .tc-unsure .tc-sub-h { margin: 0 0 var(--s1); }
.tc .tc-unsure .tc-help { margin: 0; }
.tc .tc-unsure-lines { margin: var(--s3) 0 0; padding: 0; list-style: none; font-size: var(--t-body); }
.tc .tc-unsure-lines li { padding: 10px 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.tc #tc-where-h { font-size: var(--t-h2); letter-spacing: -.015em; margin: var(--s7) 0 0; line-height: 1.2; }
.tc .tc-where-note { margin: var(--s2) 0 var(--s4); color: var(--text-2); font-size: var(--t-body); max-width: 70ch; }

/* a finding: title and amount on one line, the facts, what it means, a warning if few trades, then the replay button */
.tc .tc-findings.kit-rows { margin: 0; border-radius: 20px; }
.tc .tc-finding { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--s5); align-items: start; padding: var(--s5) var(--s6); }
.tc .tc-finding:hover { background: transparent; }
.tc .tc-finding.good { background: var(--pos-fill); }
.tc .tc-f-main, .tc .tc-f-side { display: contents; }
.tc .tc-finding h3 { grid-column: 1; margin: 0; font-size: 19px; font-weight: 500; line-height: 1.3; }
.tc .tc-f-net { grid-column: 2; grid-row: 1; font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.tc .tc-f-detail, .tc .tc-f-other, .tc .tc-f-means, .tc .tc-finding .kit-tag { grid-column: 1 / -1; margin: 0; font-size: var(--t-body); }
.tc .tc-f-detail { color: var(--text); }
.tc .tc-f-other, .tc .tc-f-means { color: var(--text-2); }
.tc .tc-finding > *, .tc .tc-f-main > *, .tc .tc-f-side > * { min-width: 0; }
.tc .tc-finding .kit-tag { white-space: normal; text-align: left; display: flex; gap: 8px; align-items: flex-start; padding: 0; border: 0; border-radius: 0; background: none; font-size: var(--t-small); color: var(--warn); margin-top: var(--s2); }
.tc .tc-finding .kit-tag::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 12px; font-weight: 500; margin-top: 1px; }
.tc .tc-f-side .button { grid-column: 1 / -1; justify-self: start; margin-top: var(--s2); height: auto; min-height: 44px; padding: 10px 16px; line-height: 1.3; text-align: left; white-space: normal; max-width: 100%; }

/* More numbers + Notes: one panel, two rows that open */
.tc .tc-folds { padding: 0; gap: 0; margin-top: var(--s4); overflow: hidden; }
.tc .tc-fold + .tc-fold { border-top: 1px solid var(--border); }
.tc .tc-fold summary { cursor: pointer; list-style: none; min-height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--s6); font-weight: 500; box-sizing: border-box; }
.tc .tc-fold summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(45deg); }
.tc .tc-fold[open] summary::after { transform: rotate(-135deg); }
.tc .tc-fold summary::-webkit-details-marker { display: none; }
.tc .tc-fold > :not(summary) { margin-left: var(--s6); margin-right: var(--s6); }
.tc .tc-fold > :last-child { margin-bottom: var(--s5); }
.tc .tc-numbers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3) var(--s5); margin-top: 0; }
.tc .tc-numbers dt { font-size: var(--t-small); color: var(--text-2); }
.tc .tc-numbers dd { margin: 2px 0 0; font-size: var(--t-body); }
.tc .tc-notes { margin: 0; padding-left: 22px; font-size: var(--t-body); color: var(--text-2); line-height: 1.6; }
.tc .tc-costs-link a { display: inline-flex; align-items: center; min-height: 44px; }

/* "Try a rule on your past trades" */
.tc .tc-next { margin-top: var(--s6); display: grid; gap: var(--s3); justify-items: start; }
.tc .tc-sec-h { margin: 0; font-size: var(--t-h2); letter-spacing: -.015em; line-height: 1.2; font-weight: 500; }
.tc .tc-next-sub { margin: 0; color: var(--text-2); max-width: 64ch; }
.tc .tc-go-main { margin: 0; }
.tc .tc-footer { margin: var(--s5) 0 0; max-width: 80ch; }
.tc .tc-data { margin-top: var(--s5); }
.tc .tc-data p { margin: 0; font-size: var(--t-body); color: var(--text-2); }
.tc .tc-delete-area { margin-top: var(--s3); }
.tc .tc-delete-area:empty { display: none; }
.tc .tc-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border: 1px solid var(--neg); border-radius: 12px; background: var(--neg-fill); }
.tc .tc-confirm p { flex-basis: 100%; color: var(--text); }
.tc .tc-done { margin: var(--s2) 0 0; color: var(--pos) !important; font-size: var(--t-small); }

/* replay with a rule: two numbered steps, then the result in the report's big-number style */
.tc .tc-rule { gap: var(--s3); }
.tc .tc-step-h { margin: 0; font-size: var(--t-h3); font-weight: 500; line-height: 1.25; }
.tc .tc-step-h2 { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--border); }
.tc .tc-stepper { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); font-size: 18px; }
.tc .tc-stepper output { min-width: 72px; text-align: center; font-weight: 500; font-size: 22px; }
.tc .tc-stepper button { min-width: var(--tap); min-height: var(--tap); font-size: 22px; }
.tc .tc-chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.tc .tc-chips .tc-pill { min-height: 44px; font-size: var(--t-small); }
.tc .tc-wi-result { margin-top: var(--s4); gap: 0; transition: opacity .15s ease; }
.tc .tc-wi-result.loading { opacity: .55; }
.tc .tc-wi-big { margin: 4px 0 0 !important; font-size: var(--t-figure) !important; font-weight: 500; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tc .tc-wi-instead { display: block; margin-top: 4px; font-size: 18px; color: var(--text-2); font-weight: 400; letter-spacing: 0; }
.tc .tc-wi-diff { margin: var(--s3) 0 0 !important; font-size: 18px !important; font-weight: 500; }
.tc .tc-bars { display: grid; gap: var(--s3); margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--border); }
.tc .tc-wi-result p { margin: var(--s3) 0 0; font-size: var(--t-body); line-height: 1.55; }
.tc .tc-wi-result p.tc-help, .tc .tc-wi-result p.tc-footer { font-size: var(--t-small); color: var(--text-2); }
.tc .tc-wi-result h2.tc-wi-h2 { margin: var(--s6) 0 0; font-size: var(--t-h3); font-weight: 500; }
.tc .tc-guardian { margin-top: var(--s6); padding: var(--s5); border: 0; border-radius: 16px; background: var(--inset); display: flex; flex-direction: column; gap: var(--s2); }
.tc .tc-guardian .tc-help { margin: 0; }
.tc #tc-guardian-msg { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }

.tc .tc-busy { position: fixed; inset: auto 0 24px 0; margin: auto; width: max-content; max-width: calc(100% - 32px); display: flex; align-items: center; gap: var(--s3);
  padding: 10px 16px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 6px 20px rgba(0,0,0,.12); z-index: 50; font-size: var(--t-small); }
.tc .tc-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--primary); animation: tc-spin .8s linear infinite; }
@keyframes tc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tc .tc-spin { animation: none; } .tc .tc-bridge i, .tc .tc-bars i, .tc .tc-wi-result { transition: none; } }

/* phones: one column, 44 px taps, bars with the number on the first line */
@media (max-width: 900px) {
  .tc .tc-start-grid { grid-template-columns: 1fr; }
  .tc .kit-card { border-radius: 16px; }
  .tc .kit-card:not(.tc-folds) { padding: var(--s5); }
  .tc .tc-findings.kit-rows { border-radius: 16px; }
  .tc .tc-finding { padding: var(--s4) var(--s5); }
  .tc .tc-fold summary { padding: 0 var(--s5); }
  .tc .tc-fold > :not(summary) { margin-left: var(--s5); margin-right: var(--s5); }
  .tc .tc-field input { max-width: none; }
}
@media (max-width: 760px) {
  .tc button, .tc .button, .tc input[type="time"], .tc .tc-go .primary { min-height: 44px; }
  .tc .tc-pill, .tc .tc-chips .tc-pill { min-height: 44px; }
  .tc .tc-stepper button { min-width: 44px; min-height: 44px; }
  .tc summary { min-height: 44px; padding-block: 10px; box-sizing: border-box; }
  .tc .tc-map-grid, .tc .tc-either { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .tc .tc-bridge div, .tc .tc-bars div { grid-template-columns: 1fr auto; }
  .tc .tc-bridge i, .tc .tc-bars i { grid-column: 1 / -1; grid-row: 2; }
  .tc .tc-go .button, .tc .tc-go .primary, .tc .tc-visitor .tc-go a { width: 100%; justify-content: center; text-align: center; }
  .tc .tc-finding { grid-template-columns: minmax(0, 1fr); }
  .tc .tc-f-net { grid-column: 1; grid-row: auto; text-align: left; order: -1; }
  .tc .tc-finding h3 { order: -2; }
}
@media (pointer: coarse), (max-width: 760px) { .tc .tc-field input { min-height: 52px; } }          /* both brokerage boxes */
