.tr-page {
  max-width: 1480px;
  margin: auto;
  min-width: 0;
}
.tr-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 0;
}
.tr-card h2,
.tr-upload-card h2 {
  font-size: var(--type-section);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.tr-card header,
.tr-batch-heading,
.tr-page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.tr-help {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin: 8px 0 16px;
}
.tr-interpretation {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  max-width: 1040px;
  margin: 12px auto;
  padding: 32px;
}
.tr-interpretation > .assistant-orb {
  width: 72px;
  height: 72px;
  margin: 0;
}
.tr-interpretation h2 {
  margin: 4px 0 10px;
  font-size: var(--type-section);
  overflow-wrap: anywhere;
}
.tr-interpretation .tr-help {
  margin: 0;
}
.tr-source-sheets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 16px;
  color: var(--muted);
  font-size: var(--type-caption);
}
.tr-source-sheets > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tr-source-sheets svg {
  width: 14px;
  height: 14px;
}
.tr-interpretation > progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 4px;
  accent-color: var(--action);
}
@media (max-width: 760px) {
  .tr-interpretation {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 22px;
    gap: 16px;
  }
  .tr-interpretation > .assistant-orb {
    width: 48px;
    height: 48px;
  }
  .tr-interpretation > .button {
    grid-column: 1 / -1;
  }
}
.tr-page-top .tr-help {
  margin: 0;
}
.tr-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tr-start-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}
.tr-upload-card {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--text);
  transition:
    transform 0.18s,
    border-color 0.18s;
  cursor: pointer;
}
.tr-upload-card:hover {
  background: var(--surface-alt);
  border-color: var(--blue);
}
.tr-upload-card > svg {
  width: 28px;
  height: 28px;
  color: var(--blue);
  margin-bottom: 22px;
}
.tr-upload-card p {
  color: var(--muted);
  font-size: 14px;
}
.tr-upload-card > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--blue);
  margin-top: 30px;
  font-weight: 550;
}
.tr-history {
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.tr-history > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.tr-history > summary::-webkit-details-marker {
  display: none;
}
.tr-history > summary > .icon {
  width: 17px;
  height: 17px;
}
.tr-history > summary > .icon:last-child {
  margin-left: auto;
  transition: transform 0.2s;
}
.tr-history[open] > summary > .icon:last-child {
  transform: rotate(180deg);
}
.tr-history-count {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 8px;
  background: var(--hover);
  font-variant-numeric: tabular-nums;
}
.tr-history-list {
  max-height: 300px;
  overflow: auto;
  padding: 0 0 12px;
}
.tr-history-list > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  text-align: left;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px;
  background: none;
  color: var(--text);
  cursor: pointer;
}
.tr-history-list > button:hover {
  background: var(--hover);
}
.tr-history-file {
  display: flex;
  color: var(--muted);
}
.tr-history-name {
  flex: 1;
  min-width: 0;
}
.tr-history-name strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tr-history small {
  display: block;
  font-size: 11px;
  margin-top: 4px;
  color: var(--muted);
}
.tr-history-list > button > .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.tr-export-grid {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 20px;
}
.tr-export-grid.tr-export-compact {
  grid-template-columns: minmax(0, 1fr);
}
.tr-export-compact > .tr-export-options {
  order: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
}
.tr-export-compact .tr-download-heading,
.tr-export-compact .tr-export-options > .tr-help,
.tr-export-compact .tr-toggle-row,
.tr-export-compact .tr-export-options > .primary {
  grid-column: 1 / -1;
}
.tr-export-compact .tr-option-group,
.tr-export-compact .tr-download-heading,
.tr-export-compact .tr-toggle-row,
.tr-export-compact .tr-export-options > .primary {
  margin: 0;
}
.tr-export-compact .tr-option-scope > div {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tr-export-compact .tr-option-scope .tr-option-choice {
  justify-content: center;
  text-align: center;
}
.tr-export-compact .tr-option-scope .tr-option-check {
  display: none;
}
.tr-export-compact > .tr-column-picker {
  order: 2;
  padding: 0;
}
.tr-columns-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 72px;
  padding: 22px 26px;
  text-align: left;
  border-radius: inherit;
  font-size: 16px;
  font-weight: 550;
  color: var(--text);
}
.tr-columns-toggle > svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform 220ms var(--ease-response);
}
.tr-columns-toggle[aria-expanded='true'] > svg {
  transform: rotate(180deg);
}
.tr-columns-content {
  padding: 0 26px 12px;
  animation: tr-content-reveal 220ms var(--ease-response);
}
.tr-columns-content > .button {
  margin-left: auto;
}
.tr-export-filters {
  grid-column: 1 / -1;
  order: 1;
  animation: tr-content-reveal 220ms var(--ease-response);
}
.tr-export-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 16px;
}
.tr-inherited-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.tr-inherited-filters > span {
  color: var(--muted);
  font-size: 12px;
  margin-right: 4px;
}
.tr-inherited-filters button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  background: var(--surface-alt);
  border-radius: 10px;
  color: var(--text);
  font-size: 12px;
}
.tr-inherited-filters svg {
  width: 13px;
  height: 13px;
}
.tr-export-filter-grid > label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}
.tr-export-filter-grid .tr-filter-query {
  grid-column: 1 / -1;
}
.tr-export-filter-grid :is(.pick, input) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
}
.tr-export-compact > .tr-preview-table {
  order: 3;
}
@keyframes tr-content-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 760px) {
  .tr-export-compact > .tr-export-options,
  .tr-export-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tr-columns-content,
  .tr-export-filters {
    animation: none;
  }
  .tr-columns-toggle > svg {
    transition: none;
  }
}
.tr-format-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 24px;
}
.tr-format-choice {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}
.tr-format-choice:hover {
  background: var(--surface-alt);
}
.tr-format-choice.chosen {
  border-color: color-mix(in srgb, var(--blue) 48%, var(--line));
  background: color-mix(in srgb, var(--blue-bg) 45%, var(--surface));
}
.tr-format-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: var(--blue-bg);
  flex-shrink: 0;
}
.tr-format-icon .icon {
  width: 23px;
  height: 23px;
}
.tr-format-choice > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.tr-format-choice strong {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.3px;
}
.tr-format-choice small {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
.tr-format-check {
  margin-left: auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  flex-shrink: 0;
}
.tr-format-check .icon {
  width: 13px;
  height: 13px;
  opacity: 0;
}
.chosen .tr-format-check {
  background: var(--action);
  border-color: var(--action);
  color: var(--on-action);
}
.chosen .tr-format-check .icon {
  opacity: 1;
}
.tr-column-picker {
  padding: 26px;
}
.tr-column-picker header h2 {
  margin: 0;
}
.tr-column-picker fieldset {
  padding: 17px 0 23px;
  border: 0;
}
.tr-column-picker legend {
  font-size: 13px;
  color: var(--text);
  padding: 0;
  font-weight: 600;
}
.tr-column-grid .tr-column-choice {
  position: relative;
  min-height: 43px;
  padding: 9px 11px;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  font-weight: 450;
  transition:
    background 0.18s,
    color 0.18s;
}
.tr-column-choice:has(input:checked) {
  background: var(--surface-alt);
  color: var(--text);
}
.tr-column-choice:hover {
  background: var(--hover);
}
.tr-column-choice:has(input:disabled) {
  opacity: 0.5;
  cursor: default;
}
.tr-column-choice:has(input:focus-visible) {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.tr-column-choice input {
  position: absolute;
  opacity: 0;
  width: 1px !important;
  height: 1px !important;
}
.tr-column-tick {
  width: 17px;
  height: 17px;
  border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.tr-column-tick .icon {
  width: 11px;
  height: 11px;
  opacity: 0;
}
.tr-column-choice:has(input:checked) .tr-column-tick {
  border-color: var(--action);
  background: var(--action);
  color: var(--on-action);
}
.tr-column-choice:has(input:checked) .tr-column-tick .icon {
  opacity: 1;
}
.tr-download-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 26px;
}
.tr-download-heading h2 {
  font-size: 19px;
  line-height: 1.2;
  margin: 0 0 5px;
}
.tr-download-heading > div > span {
  font-size: 12px;
  color: var(--muted);
}
.tr-export-options .tr-toggle-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 450;
  line-height: 1.45;
  padding: 16px 0;
  margin: 0;
  border-top: 1px solid var(--line);
}
.tr-toggle-row > span {
  flex: 1;
}
.tr-page .tr-toggle-row input[type='checkbox'] {
  appearance: none;
  width: 38px;
  height: 23px;
  border-radius: 20px;
  position: relative;
  background: color-mix(in srgb, var(--muted) 32%, transparent);
  cursor: pointer;
  transition: background 0.2s;
}
.tr-toggle-row input::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px #0002;
  transition: transform 0.2s;
}
.tr-page .tr-toggle-row input[type='checkbox']:checked {
  background: var(--action);
}
.tr-toggle-row input:checked::after {
  transform: translateX(15px);
}
.tr-folder-card > header {
  align-items: flex-start;
}
.tr-folder-card h2 {
  margin: 0;
}
.tr-folder-card .tr-help {
  margin-bottom: 0;
}
.tr-zip-tag {
  background: var(--hover);
  border-radius: 8px;
  padding: 6px 9px;
  color: var(--muted);
  font-size: var(--type-caption);
  font-weight: 600;
  letter-spacing: 0.7px;
}
.tr-folder-root {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--line);
}
.tr-folder-root > .icon {
  color: var(--blue);
}
.tr-folder-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.tr-folder-icon {
  color: var(--blue);
  background: var(--blue-bg);
  padding: 10px;
  border-radius: 12px;
  display: flex;
  flex-shrink: 0;
}
.tr-folder-row > div {
  min-width: 0;
  flex: 1;
}
.tr-folder-row strong {
  font-size: 14px;
  font-weight: 550;
  line-height: 1.4;
  display: block;
}
.tr-folder-row small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  display: block;
}
.tr-folder-total {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  display: flex;
  gap: 4px;
  background: var(--hover);
  border-radius: 8px;
  padding: 5px 8px;
}
.tr-review-folder .tr-folder-icon {
  background: var(--hover);
  color: var(--muted);
}
.tr-review-folder > .icon {
  color: var(--muted);
  width: 17px;
}
.tr-review-folder.muted {
  opacity: 0.5;
}
.tr-index-row {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.tr-index-row > .icon {
  width: 19px;
  flex-shrink: 0;
}
.tr-index-row small {
  display: block;
  font-size: 12px;
  margin-top: 5px;
  line-height: 1.45;
}
.tr-export-totals {
  display: flex;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin: 4px 0 22px;
}
.tr-export-totals strong {
  font-size: 36px;
  letter-spacing: -1.4px;
  font-weight: 600;
}
.tr-export-totals strong small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 450;
  margin-top: 5px;
}
.tr-export-totals > span {
  color: var(--muted);
  font-size: 12px;
}
.tr-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
}
.tr-privacy-note .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}
.tr-export-empty {
  text-align: center;
  padding: 55px 20px;
  color: var(--muted);
  font-size: 14px;
}
.tr-export-empty > .icon {
  width: 40px;
  height: 40px;
  color: var(--blue);
}
.tr-column-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
}
.tr-column-grid label,
.tr-check {
  display: flex !important;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  line-height: 1.4;
}
.tr-page input[type='checkbox'],
.tr-review-bar input[type='checkbox'] {
  accent-color: var(--blue);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.tr-page fieldset {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 18px 0 22px;
  margin: 0;
}
.tr-page legend {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 0 10px 0 0;
}
.tr-page .tr-option-group {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
  min-width: 0;
}
.tr-option-group > legend {
  font-size: 13px;
  font-weight: 550;
  color: var(--text);
  padding: 0;
  margin-bottom: 10px;
}
.tr-option-group > div {
  display: grid;
  gap: 5px;
  padding: 5px;
  border-radius: 17px;
  background: var(--surface-alt);
}
.tr-option-identity > div {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tr-option-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  min-height: 44px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  cursor: pointer;
  transition:
    background 0.18s,
    color 0.18s,
    box-shadow 0.18s;
}
.tr-option-choice:hover {
  color: var(--text);
  background: var(--hover);
}
.tr-option-choice:has(input:checked) {
  color: var(--text);
  background: var(--surface);
  box-shadow:
    0 1px 4px #00000012,
    0 0 0 1px var(--line);
}
.tr-option-choice:has(input:focus-visible) {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}
.tr-option-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.tr-option-check {
  display: flex;
  flex-shrink: 0;
  margin-left: auto;
  color: var(--action);
  opacity: 0;
}
.tr-option-check .icon {
  width: 15px;
  height: 15px;
}
.tr-option-choice:has(input:checked) .tr-option-check {
  opacity: 1;
}
.tr-option-identity .tr-option-choice {
  justify-content: center;
  text-align: center;
  padding-inline: 8px;
}
.tr-option-identity .tr-option-check {
  display: none;
}
.tr-export-options > label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 550;
}
.tr-export-options > label.tr-check {
  flex-direction: row;
  align-items: flex-start;
}
.tr-quality-icon {
  display: inline-flex;
  margin-left: 7px;
  color: var(--amber);
  vertical-align: middle;
}
.tr-quality-icon .icon {
  width: 13px;
  height: 13px;
}
.tr-import-quality {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  background: var(--hover);
  border-radius: 13px;
  padding: 12px 14px;
  font-size: 12px;
  margin: 0 0 20px;
}
.tr-import-quality > .icon {
  width: 16px;
  height: 16px;
}
.tr-import-quality strong {
  font-size: 12px;
}
.tr-source-meta {
  margin-top: 18px;
  padding: 15px 0;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
}
.tr-source-meta summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.tr-source-meta summary .icon {
  width: 15px;
  height: 15px;
}
.tr-source-meta dl > div {
  display: grid;
  grid-template-columns: minmax(90px, 150px) minmax(0, 1fr);
  gap: 12px;
  margin: 12px 0;
}
.tr-source-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.tr-page select,
.tr-page input[type='date'] {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  padding: 12px;
  font: inherit;
  min-height: 44px;
}
.tr-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}
.tr-dates label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.tr-export-options > .primary {
  width: 100%;
  margin-top: 18px;
}
.tr-preview-table {
  grid-column: 1/-1;
}
.tr-count {
  font-size: 13px;
  color: var(--muted);
  margin-left: 10px;
}
.tr-table-scroll {
  max-width: 100%;
  overflow: auto;
}
.tr-page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.tr-page th,
.tr-page td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  max-width: 420px;
  min-width: 135px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tr-page th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}
.tr-page tbody tr:last-child td {
  border-bottom: 0;
}
.tr-page footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 20px;
}
.tr-batch-heading h2 {
  font-size: 22px;
  letter-spacing: -0.5px;
  margin: 0 0 7px;
}
.tr-batch-heading p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.tr-batch > progress {
  width: 100%;
  height: 5px;
  accent-color: var(--blue);
  margin-bottom: 22px;
}
.tr-batch-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.tr-items {
  padding: 9px;
  max-height: calc(100dvh - 260px);
  overflow: auto;
  position: sticky;
  top: 110px;
}
.tr-item {
  border: 0;
  border-radius: 16px;
  background: none;
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 15px 12px;
  cursor: pointer;
  min-width: 0;
}
.tr-item:hover {
  background: var(--hover);
}
.tr-item.selected {
  background: var(--blue-bg);
}
.tr-file-icon {
  padding: 8px;
  border-radius: 11px;
  background: var(--hover);
  color: var(--blue);
  flex-shrink: 0;
}
.tr-file-icon.saved {
  color: var(--teal);
}
.tr-file-icon.error {
  color: var(--red);
}
.tr-file-icon.analyzing {
  animation: tr-pulse 1.4s ease-in-out infinite;
}
.tr-item > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.tr-item strong {
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.tr-item small {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.tr-item em {
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
}
.tr-source-card iframe {
  display: block;
  width: 100%;
  height: 65dvh;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--hover);
  margin-top: 18px;
}
.tr-source-card img {
  max-width: 100%;
  border-radius: 16px;
}
.tr-draft-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--hover);
  padding: 16px;
  border-radius: 16px;
  font-size: 14px;
}
.tr-draft-summary span,
.tr-draft-summary small {
  color: var(--muted);
  font-size: 12px;
}
.tr-alert {
  background: var(--blue-bg);
  color: var(--text);
  padding: 15px 18px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 18px;
}
.tr-review-bar {
  max-width: 1540px;
  margin: 0 auto 20px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}
.tr-review-bar > .tr-actions {
  margin-bottom: 10px;
}
.tr-stage-status {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
.tr-review-top {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}
.tr-review-context {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-width: 0;
  font-size: 12px;
}
.tr-review-context > span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tr-review-context > strong {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.tr-review-save {
  flex-shrink: 0;
}
.tr-validation-progress {
  margin: 0 0 24px;
}
.tr-validation-progress > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.tr-validation-progress strong {
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tr-validation-progress strong > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.tr-progress-track {
  display: flex;
  height: 5px;
  border-radius: 10px;
  background: var(--hover);
  overflow: hidden;
}
.tr-progress-track > span {
  transition: width 260ms var(--ease-ui);
}
.tr-progress-track > .saved {
  background: var(--action);
}
.tr-progress-track > .skipped {
  background: var(--muted);
  opacity: 0.35;
}
.tr-review-bar .tr-validation-progress {
  margin: 8px 0;
}
.tr-review-bar .tr-validation-progress strong {
  font-size: 18px;
}
.tr-review-state {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 11px;
}
.tr-review-state .tr-stage-status {
  margin: 0;
  font-size: inherit;
}
.tr-review-files,
.tr-incomplete-options {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.tr-review-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}
.tr-review-tools > details[open] {
  flex-basis: 100%;
  min-width: 0;
}
.tr-review-files > summary,
.tr-incomplete-options > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  min-height: 32px;
}
.tr-review-files > summary::-webkit-details-marker,
.tr-incomplete-options > summary::-webkit-details-marker {
  display: none;
}
.tr-review-files > summary .icon,
.tr-incomplete-options > summary .icon {
  width: 13px;
  height: 13px;
}
.tr-review-files[open] > summary .icon,
.tr-incomplete-options[open] > summary .icon {
  transform: rotate(180deg);
}
.tr-incomplete-options .tr-check {
  margin: 10px 0;
}
.tr-review-quality {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.tr-review-quality > .icon {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}
.tr-own-ai {
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}
.tr-own-ai > summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  list-style: none;
  cursor: pointer;
}
.tr-own-ai > summary::-webkit-details-marker {
  display: none;
}
.tr-own-ai > summary > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.tr-own-ai strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
}
.tr-own-ai small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.tr-own-ai > summary > .icon {
  width: 16px;
  color: var(--muted);
  transition: transform 0.2s ease;
}
.tr-own-ai[open] > summary > .icon {
  transform: rotate(180deg);
}
.tr-own-ai-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 13px;
  color: var(--blue);
  background: var(--blue-bg);
}
.tr-own-ai-body {
  padding: 0 24px 24px;
}
.tr-own-ai ol {
  padding: 0;
  margin: 0 0 18px;
  list-style: none;
  counter-reset: conversion;
}
.tr-own-ai li {
  counter-increment: conversion;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
}
.tr-own-ai li::before {
  content: counter(conversion);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 12px;
  flex: none;
}
.tr-own-ai li > span {
  flex: 1 1 250px;
}
.tr-own-ai-instructions {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}
.tr-own-ai-instructions summary {
  cursor: pointer;
}
.tr-own-ai textarea {
  width: 100%;
  height: 280px;
  box-sizing: border-box;
  margin-top: 12px;
  padding: 14px;
  resize: vertical;
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  line-height: 1.6;
}
.tr-own-ai-feedback {
  color: var(--blue);
  font-size: 13px;
  margin: 12px 0 0;
}
@media (max-width: 600px) {
  .tr-own-ai > summary {
    padding: 18px;
  }
  .tr-own-ai-body {
    padding: 0 18px 18px;
  }
  .tr-own-ai li > .button {
    width: 100%;
  }
}
.tr-import-decision {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-alt);
}
.tr-import-decision.needs-decision {
  border-color: var(--blue);
}
.tr-import-decision-heading {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.tr-import-decision-heading > .icon {
  color: var(--blue);
  flex: none;
  margin-top: 2px;
}
.tr-import-decision h3 {
  font-size: 15px;
  margin: 0 0 5px;
}
.tr-import-decision p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}
.tr-missing-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.tr-missing-fields button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.tr-missing-fields .icon {
  width: 13px;
  height: 13px;
  color: var(--muted);
}
.tr-import-decision-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}
.tr-import-decision-footer p {
  flex: 1 1 240px;
}
.tr-import-decision-footer .button {
  white-space: normal;
  text-align: center;
}
.tr-item.saved em,
.tr-item.saved .tr-file-icon {
  color: var(--teal);
}
.tr-item.error em {
  color: var(--red);
}
.tr-receipt {
  max-width: 740px;
  margin: 32px auto;
  padding: 36px;
  text-align: center;
  animation: tr-receipt-enter 260ms var(--ease-ui) both;
}
.tr-receipt:focus {
  outline: none;
}
.tr-receipt-check {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--blue-bg);
  color: var(--blue);
  margin: 0 auto 18px;
}
.tr-receipt-check > .icon {
  width: 27px;
  height: 27px;
}
.tr-receipt-label {
  color: var(--blue);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 10px;
}
.tr-receipt h2 {
  font-size: 27px;
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}
.tr-receipt-title {
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.tr-receipt .tr-validation-progress {
  text-align: left;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
}
.tr-receipt-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
  padding: 18px;
  background: var(--surface-alt);
  border-radius: 18px;
  margin-top: 24px;
}
.tr-receipt-next > span {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.tr-receipt-next > strong {
  margin: auto;
  font-size: 15px;
  font-weight: 500;
}
.tr-receipt-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.composer-v3 .import-source-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
}
.import-source-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}
.import-source-heading > span {
  display: flex;
  padding: 12px;
  border-radius: 13px;
  color: var(--blue);
  background: var(--blue-bg);
}
.import-source-heading > div {
  min-width: 0;
}
.composer-v3 .import-source-heading h2 {
  font-size: 16px;
  color: var(--text);
  overflow-wrap: anywhere;
}
.composer-v3 .import-source-heading p {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.composer-v3 .import-source-panel .button.text {
  color: var(--blue);
}
.composer-v3 .import-source-panel :is(p, small) {
  color: var(--muted);
}
.tr-original-table {
  max-height: 65dvh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 12px;
}
.tr-original-table table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  text-align: left;
}
.tr-original-table :is(th, td) {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.tr-original-table th {
  width: 35%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.tr-source-warnings {
  color: var(--muted);
  font-size: 12px;
  margin-top: 16px;
}
.tr-source-warnings summary {
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}
.tr-source-warnings p {
  margin-top: 10px;
}
@keyframes tr-receipt-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tr-receipt {
    animation: none;
  }
  .tr-progress-track > span {
    transition: none;
  }
}
@media (max-width: 700px) {
  .tr-review-top {
    flex-wrap: wrap;
    gap: 12px;
  }
  .tr-review-context {
    width: 100%;
  }
  .tr-review-context > strong {
    width: 100%;
    max-width: 100%;
  }
  .tr-review-save {
    width: 100%;
  }
  .tr-receipt {
    margin: 12px auto;
    padding: 24px 18px;
  }
  .tr-receipt h2 {
    font-size: 23px;
  }
  .tr-receipt-next {
    flex-direction: column;
    align-items: stretch;
  }
  .tr-review-state .tr-stage-status {
    width: auto;
  }
}
.tr-review-strip {
  display: flex;
  gap: 7px;
  overflow: auto;
  margin: 8px 0 16px;
  padding: 3px 0 8px;
  scroll-snap-type: x proximity;
}
.tr-review-strip .tr-item {
  width: 230px;
  min-width: 230px;
  scroll-snap-align: start;
  padding: 10px;
}
.tr-review-strip .tr-item small {
  -webkit-line-clamp: 1;
}
.tr-review-bar .tr-help {
  margin-bottom: 0;
}
.tr-review-bar .tr-check {
  font-size: 13px;
}
.tr-source-card header h2 {
  font-size: 18px;
}
.tr-page[aria-busy='true'] .tr-upload-card {
  opacity: 0.65;
}
@keyframes tr-pulse {
  50% {
    opacity: 0.4;
  }
}
@media (max-width: 1000px) {
  .tr-export-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .tr-export-options {
    grid-row: 1;
  }
  .tr-batch-grid {
    grid-template-columns: 250px minmax(0, 1fr);
  }
  .tr-batch-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 700px) {
  .tr-format-grid {
    gap: 10px;
  }
  .tr-format-choice {
    padding: 16px;
    align-items: flex-start;
    gap: 11px;
    flex-wrap: wrap;
  }
  .tr-format-choice .tr-format-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }
  .tr-format-choice > span:nth-child(2) {
    order: 3;
    width: 100%;
  }
  .tr-format-choice strong {
    font-size: 15px;
  }
  .tr-format-choice small {
    font-size: 12px;
  }
  .tr-format-check {
    margin-top: 7px;
  }
  .tr-export-options {
    grid-row: auto;
  }
  .tr-card {
    padding: 18px;
    border-radius: 20px;
  }
  .tr-start-grid {
    grid-template-columns: 1fr;
  }
  .tr-upload-card {
    padding: 22px;
  }
  .tr-upload-card > svg {
    margin-bottom: 12px;
  }
  .tr-upload-card > span {
    margin-top: 18px;
  }
  .tr-column-grid {
    gap: 12px;
  }
  .tr-batch-grid {
    grid-template-columns: 1fr;
  }
  .tr-items {
    position: static;
    max-height: 260px;
  }
  .tr-page-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .tr-source-card header {
    align-items: flex-start;
    flex-direction: column;
  }
  .tr-review-bar {
    padding: 12px;
    margin-bottom: 14px;
  }
  .tr-review-bar > .tr-actions {
    gap: 5px;
  }
  .tr-review-bar .tr-actions > .button:last-child {
    display: none;
  }
  .tr-review-strip .tr-item {
    width: 200px;
    min-width: 200px;
  }
  .tr-review-bar > .tr-actions > strong {
    margin-left: auto;
    font-size: 12px;
  }
  .tr-stage-status {
    width: 100%;
    margin: 4px 0;
  }
  .tr-page th,
  .tr-page td {
    padding: 10px;
  }
  .tr-source-card iframe {
    height: 65dvh;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tr-page *,
  .tr-review-bar * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
