/* XML to CSV Converter.
   Every value from a token (§4.2). Scoped to .ftb-tool-x2c. */

.ftb-tool-x2c textarea{width:100%;font-family:var(--ftb-mono);
  font-size:var(--ftb-text-code);line-height:1.5;resize:vertical}

.ftb-x2c-file{display:flex;flex-wrap:wrap;align-items:center;
  gap:var(--ftb-space-3);margin:var(--ftb-space-4) 0}
.ftb-tool-x2c .ftb-x2c-file label{cursor:pointer;margin:0}
.ftb-tool-x2c input[type=file]:focus-visible{outline:2px solid var(--ftb-primary);
  outline-offset:2px}

/* The record path is the decision that defines a row, so it gets its own
   band rather than sitting in the settings grid with the output options. */
.ftb-x2c-record{padding:var(--ftb-space-5);margin-bottom:var(--ftb-space-4);
  background:var(--ftb-primary-soft);border-radius:var(--ftb-radius-lg)}
.ftb-x2c-record select{font-family:var(--ftb-mono);font-size:var(--ftb-text-sm)}

.ftb-x2c-settings{display:grid;gap:var(--ftb-space-4);
  grid-template-columns:1fr;margin-bottom:var(--ftb-space-4)}
@media (min-width:640px){
  .ftb-x2c-settings{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* ---- report ---- */

.ftb-x2c-report{margin:var(--ftb-space-6) 0;padding:var(--ftb-space-5);
  background:var(--ftb-surface);border:1px solid var(--ftb-border);
  border-radius:var(--ftb-radius-lg)}
.ftb-x2c-report h3{margin:0 0 var(--ftb-space-4);font-size:var(--ftb-text-lg)}

.ftb-x2c-issues{margin:0 0 var(--ftb-space-5);padding:0 0 0 var(--ftb-space-5);
  display:flex;flex-direction:column;gap:var(--ftb-space-3);
  font-size:var(--ftb-text-sm);line-height:var(--ftb-lh-snug)}
.ftb-x2c-issues li{margin:0}
/* Kind is carried by the marker AND the wording, never colour alone (§9). */
.ftb-x2c-issues li.is-warn{color:var(--ftb-warning)}
.ftb-x2c-issues li.is-warn::marker{content:"\26A0  "}
.ftb-x2c-issues li.is-info{color:var(--ftb-text-muted)}
.ftb-x2c-issues li.is-info::marker{content:"\2139  "}
.ftb-x2c-issues li.is-clean{color:var(--ftb-success)}
.ftb-x2c-issues li.is-clean::marker{content:"\2713  "}

.ftb-x2c-stats{display:flex;flex-wrap:wrap;gap:var(--ftb-space-6);margin:0}
.ftb-x2c-stats div{display:flex;flex-direction:column;gap:2px}
.ftb-x2c-stats dt{font-size:var(--ftb-text-xs);color:var(--ftb-text-subtle);
  letter-spacing:var(--ftb-ls-wide);text-transform:uppercase}
.ftb-x2c-stats dd{margin:0;font-size:var(--ftb-text-lg);
  font-weight:var(--ftb-fw-semi);font-variant-numeric:tabular-nums}

/* ---- preview ---- */

.ftb-x2c-preview{margin:var(--ftb-space-6) 0}
.ftb-x2c-preview h3{margin:0 0 var(--ftb-space-4);font-size:var(--ftb-text-lg)}
.ftb-x2c-table{width:100%;border-collapse:collapse;font-size:var(--ftb-text-sm);
  font-family:var(--ftb-mono)}
.ftb-x2c-table th,.ftb-x2c-table td{padding:var(--ftb-space-2) var(--ftb-space-3);
  border:1px solid var(--ftb-border);text-align:left;vertical-align:top;
  white-space:nowrap}
.ftb-x2c-table th{background:var(--ftb-surface-2);font-weight:var(--ftb-fw-semi);
  position:sticky;top:0}
.ftb-x2c-table tbody tr:nth-child(even){background:var(--ftb-surface-2)}

.ftb-x2c-idle{color:var(--ftb-text-muted);font-size:var(--ftb-text-sm);
  margin:var(--ftb-space-6) 0}
