/* FeeMath Reseller Tax Report - tool styles. Uses the site variables from /assets/style.css
   with fallbacks so the page still works if a variable is missing. Pure ASCII. */
.tr-page { overflow-x: hidden; }
.tr-page *, .tr-page *::before, .tr-page *::after { box-sizing: border-box; }
.tr-hero { padding-top: 24px; padding-bottom: 8px; }
.tr-hero .hx { margin: 6px 0 10px; line-height: 1.15; }
.tr-lead { color: var(--muted, #555); font-size: 1.05rem; max-width: 62ch; }
.tr-privacy { margin-top: 12px; }
.tr-app { display: grid; gap: 16px; padding-bottom: 24px; }
.tr-step { padding: 16px; border: 1px solid var(--line, #e3e3e3); border-radius: 14px; background: var(--surface, #fff); color: var(--ink, #111); box-shadow: var(--shadow, none); min-width: 0; }
.tr-h2 { font-size: 1.15rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.tr-h3 { font-size: 1rem; margin: 18px 0 8px; }
.tr-num-badge { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent, #2457ff); color: var(--accent-ink, #fff); font-size: .85rem; flex: none; }
.tr-plan { margin: 0; font-size: .9rem; color: var(--muted, #555); }
.tr-help, .tr-small { color: var(--muted, #555); font-size: .88rem; }
.tr-small { font-size: .82rem; }
.tr-empty { color: var(--muted, #555); padding: 8px 0; }
.tr-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tr-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.tr-grid2, .tr-grid3, .tr-grid4, .tr-mapgrid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .tr-grid2 { grid-template-columns: 180px 1fr; }
  .tr-grid3 { grid-template-columns: repeat(3, 1fr); }
  .tr-grid4, .tr-mapgrid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) { .tr-grid4, .tr-mapgrid { grid-template-columns: repeat(4, 1fr); } }
.tr-field { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; min-width: 0; }
.tr-field > span { color: var(--muted, #555); }
.tr-field input, .tr-field select, .tr-cost {
  width: 100%; min-height: 42px; padding: 8px 10px; font: inherit; font-size: 1rem; color: var(--ink, #111);
  background: var(--bg, #fff); border: 1px solid var(--line, #ccc); border-radius: 10px;
}
.tr-field input:focus, .tr-field select:focus, .tr-cost:focus, .tr-page .btn:focus-visible, .tr-drop:focus-within, .tr-page summary:focus-visible {
  outline: 3px solid var(--accent, #2457ff); outline-offset: 2px;
}
.tr-fs { border: 1px solid var(--rule, var(--line, #e3e3e3)); border-radius: 12px; padding: 12px; margin: 0 0 12px; min-width: 0; }
.tr-fs legend { font-weight: 700; padding: 0 6px; }
.tr-radios { display: grid; gap: 8px; margin-bottom: 10px; }
.tr-radios label { display: flex; gap: 8px; align-items: flex-start; font-size: .95rem; }
.tr-radios input { margin-top: 4px; width: 18px; height: 18px; flex: none; }

.tr-drop { display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; text-align: center; padding: 26px 14px; border: 2px dashed var(--line, #bbb); border-radius: 14px; background: var(--soft, #f6f7fb); cursor: pointer; }
.tr-drop span { color: var(--muted, #555); font-size: .88rem; max-width: 52ch; }
.tr-drop.is-over { border-color: var(--accent, #2457ff); }
.tr-msg { min-height: 1.2em; margin: 8px 0; font-size: .9rem; }
.tr-msg.is-ok { color: var(--good, #137a3a); }
.tr-msg.is-warn { color: var(--bad, #b42318); }

.tr-filelist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tr-file { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; padding: 10px; border: 1px solid var(--line, #e3e3e3); border-radius: 10px; }
.tr-file-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; overflow-wrap: anywhere; }
.tr-file-meta { font-size: .85rem; color: var(--muted, #555); }
.tr-file-warn { font-size: .82rem; color: var(--bad, #b42318); }
.tr-file-act { display: flex; gap: 6px; flex-wrap: wrap; }
.tr-tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--soft, #eef1ff); color: var(--ink, #111); vertical-align: middle; }
.tr-tag-warn { background: transparent; border: 1px solid var(--bad, #b42318); color: var(--bad, #b42318); }
.tr-page .btn.tr-sm { min-height: 34px; padding: 4px 10px; font-size: .85rem; }
.tr-page .btn { min-height: 42px; cursor: pointer; }
.tr-page .btn[disabled] { opacity: .5; cursor: not-allowed; }
.tr-danger { color: var(--bad, #b42318); }
.tr-filebtn { position: relative; display: inline-flex; align-items: center; }
.tr-map { margin-top: 12px; padding: 12px; border: 1px solid var(--accent, #2457ff); border-radius: 12px; }
.tr-howto { margin-top: 12px; font-size: .92rem; }
.tr-howto summary, .tr-lines summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.tr-listrow { display: grid; grid-template-columns: 1fr 110px auto; gap: 8px; align-items: end; margin-bottom: 8px; }

.tr-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tr-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tr-table th, .tr-table td { padding: 7px 8px; border-bottom: 1px solid var(--rule, var(--line, #e8e8e8)); text-align: left; vertical-align: top; }
.tr-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted, #555); }
.tr-table caption { text-align: left; font-size: .82rem; color: var(--muted, #555); padding-bottom: 4px; }
.tr-table th[scope=row] { font-weight: 500; }
.tr-num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tr-line { color: var(--muted, #555); width: 3.2em; white-space: nowrap; }
.tr-sc small { color: var(--muted, #555); font-weight: 400; }
.tr-part th { font-weight: 700 !important; padding-top: 14px; }
.tr-sub th, .tr-sub td { font-weight: 700 !important; }
.tr-total th, .tr-total td { font-weight: 800 !important; font-size: 1rem; border-top: 2px solid var(--ink, #111); }
.tr-prev td { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.tr-lt .tr-item { min-width: 160px; max-width: 320px; overflow-wrap: anywhere; }
.tr-cost { width: 96px; min-height: 36px; text-align: right; }

.tr-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .tr-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tr-kpi { padding: 12px; border-radius: 12px; background: var(--soft, #f6f7fb); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tr-kpi span { font-size: .8rem; color: var(--muted, #555); }
.tr-kpi strong { font-size: 1.2rem; overflow-wrap: anywhere; }
.tr-kpi-main { background: var(--grad, var(--accent, #2457ff)); color: var(--accent-ink, #fff); }
.tr-kpi-main span { color: inherit; opacity: .85; }

.tr-chartbox { border: 1px solid var(--rule, var(--line, #e8e8e8)); border-radius: 12px; padding: 8px; }
.tr-chart { width: 100%; height: auto; display: block; }
.tr-bar-g { fill: var(--accent, #2457ff); }
.tr-bar-n { fill: var(--good, #137a3a); }
.tr-base { stroke: var(--line, #ccc); stroke-width: 1; }
.tr-axis { fill: var(--muted, #555); font-size: 12px; }
.tr-legend { font-size: .82rem; color: var(--muted, #555); margin: 6px 0 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tr-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.tr-key-g { background: var(--accent, #2457ff); }
.tr-key-n { background: var(--good, #137a3a); margin-left: 8px; }

.tr-k1099 { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tr-k1099 { grid-template-columns: repeat(2, 1fr); } }
.tr-kcard { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line, #e3e3e3); border-left-width: 5px; }
.tr-kcard.is-likely { border-left-color: var(--bad, #b42318); }
.tr-kcard.is-below { border-left-color: var(--good, #137a3a); }
.tr-kcard span { font-size: .88rem; color: var(--muted, #555); }
.tr-kcard em { font-style: normal; font-weight: 600; font-size: .9rem; }

.tr-masked { filter: blur(3px); user-select: none; }
.tr-upgrade { padding: 14px; border: 2px solid var(--accent, #2457ff); border-radius: 14px; background: var(--soft, #f6f7fb); margin-bottom: 14px; }
.tr-upgrade .tr-h3 { margin-top: 4px; }
.tr-note-warn { border-left: 4px solid var(--bad, #b42318); padding: 10px 12px; margin-bottom: 12px; }
.tr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tr-actions .btn { flex: 1 1 200px; justify-content: center; text-align: center; }
.tr-seo { padding-top: 16px; padding-bottom: 32px; max-width: 860px; }
.tr-seo h2 { margin-top: 28px; }
.tr-seo li { margin-bottom: 6px; }
.tr-steps { padding-left: 1.3em; }
.tr-disclaimer { margin-top: 16px; }
.print-only { display: none; }

@media print {
  @page { margin: 14mm; }
  html, body { background: #fff !important; color: #000 !important; }
  body > header, body > footer, body > nav, .site-header, .site-footer, header.site, footer.site, #fm-chat, [id^=fm-chat], .no-print, .tr-hero, .tr-seo, .tr-plan { display: none !important; }
  .print-only { display: block !important; }
  .tr-app, .wrap { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .tr-step { border: 0 !important; box-shadow: none !important; padding: 0 !important; background: #fff !important; color: #000 !important; }
  .tr-print-head { border-bottom: 2px solid #000; margin-bottom: 8px; padding-bottom: 6px; }
  .tr-print-brand { font-size: 18pt; font-weight: 800; margin: 0; }
  .tr-print-head p { margin: 2px 0; }
  .tr-table { font-size: 9.5pt; }
  .tr-table th, .tr-table td { padding: 3px 6px; border-color: #bbb !important; color: #000 !important; }
  .tr-kpis { grid-template-columns: repeat(4, 1fr) !important; }
  .tr-kpi, .tr-kpi-main { background: #fff !important; color: #000 !important; border: 1px solid #999; padding: 6px; }
  .tr-kpi strong { font-size: 12pt; }
  .tr-scroll { overflow: visible !important; }
  .tr-chart { max-height: 55mm; }
  .tr-bar-g { fill: #333 !important; }
  .tr-bar-n { fill: #999 !important; }
  .tr-key-g { background: #333 !important; } .tr-key-n { background: #999 !important; }
  .tr-axis { fill: #000 !important; }
  .tr-upgrade .btn { display: none !important; }
  .tr-k1099 { grid-template-columns: repeat(2, 1fr) !important; }
  .tr-kcard, .tr-sc, .tr-chartbox, .tr-kpis, tr { break-inside: avoid; page-break-inside: avoid; }
  .tr-h3 { break-after: avoid; page-break-after: avoid; margin-top: 10px; }
  a[href]::after { content: none !important; }
}
@media print { .fmc-b, .fmc-p, .ai-strip { display: none !important; } }
