/* Page-scoped workspace styles for all file tools. Site nav/footer stay on design-system.css. */
:is(.dfl-tool, .dfl-split) {
  --blue: #1456d8;
  --blue-dark: #0f43ad;
  --ink: #17212f;
  --muted: #596779;
  --line: #d9e0e8;
  --surface: #fff;
  --canvas: #f7f8fa;
  --subtle: #f1f4f7;
  --soft-blue: #e9efff;
  --green: #087e73;
  --green-bg: #e6f5f2;
  --green-line: #d5e6e4;
  --amber: #9a6700;
  --amber-bg: #fff8e6;
  --amber-line: #f0d789;
  --red: #b42318;
  --red-bg: #fef2f2;
  --red-line: #f0c4c0;
  --disabled: #9aa8bd;
  --radius-control: 8px;
  --radius-card: 12px;
  --radius-panel: 16px;
}
:is(.dfl-tool, .dfl-split) button,
:is(.dfl-tool, .dfl-split) input,
:is(.dfl-tool, .dfl-split) select { font: inherit; }
:is(.dfl-tool, .dfl-split) button { cursor: pointer; }
:is(.dfl-tool, .dfl-split) .dropzone:focus-visible,
:is(.dfl-tool, .dfl-split) .file-card:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
:is(.dfl-tool, .dfl-split) .split-hero { margin-bottom: 24px; }
:is(.dfl-tool, .dfl-split) h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -.04em;
  color: var(--ink);
  margin: 0 0 10px;
  font-weight: 700;
}
:is(.dfl-tool, .dfl-split) .subtitle {
  max-width: 680px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  margin: 0;
}
:is(.dfl-tool, .dfl-split) .workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(300px, .88fr);
  grid-template-areas: "config preview" "actions preview";
  column-gap: 20px;
  row-gap: 0;
  align-items: start;
  min-width: 0;
}
:is(.dfl-tool, .dfl-split) .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  min-width: 0;
}
:is(.dfl-tool, .dfl-split) .config-panel {
  grid-area: config;
  padding: 24px 24px 8px;
  border-radius: var(--radius-panel) var(--radius-panel) 0 0;
  border-bottom: 0;
}
:is(.dfl-tool, .dfl-split) .actions-panel {
  grid-area: actions;
  padding: 8px 24px 24px;
  border-radius: 0 0 var(--radius-panel) var(--radius-panel);
}
:is(.dfl-tool, .dfl-split) .right-panel {
  grid-area: preview;
  padding: 22px;
  position: sticky;
  top: 20px;
  align-self: start;
}
:is(.dfl-tool, .dfl-split) .section-head { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
:is(.dfl-tool, .dfl-split) .step {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--soft-blue);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}
:is(.dfl-tool, .dfl-split) .section-title { font-size: 15px; font-weight: 700; color: var(--ink); }
:is(.dfl-tool, .dfl-split) .section-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
:is(.dfl-tool, .dfl-split) .dropzone {
  border: 1.5px dashed #b9c5d3;
  border-radius: 12px;
  background: #f8fbff;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  transition: .18s ease;
  cursor: pointer;
}
:is(.dfl-tool, .dfl-split) .dropzone:hover,
:is(.dfl-tool, .dfl-split) .dropzone.dragover,
:is(.dfl-tool, .dfl-split) .file-card.dragover {
  border-color: var(--blue);
  background: #eef3fb;
}
:is(.dfl-tool, .dfl-split) .upload-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--soft-blue);
  color: var(--blue);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
:is(.dfl-tool, .dfl-split) .upload-icon svg { width: 22px; height: 22px; }
:is(.dfl-tool, .dfl-split) .drop-title { font-weight: 700; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
:is(.dfl-tool, .dfl-split) .drop-copy { font-size: 13px; color: var(--muted); }
:is(.dfl-tool, .dfl-split) .browse { color: var(--blue); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
:is(.dfl-tool, .dfl-split) .filetypes { display: flex; gap: 7px; margin-top: 12px; justify-content: center; flex-wrap: wrap; }
:is(.dfl-tool, .dfl-split) .filetypes span {
  font-size: 12px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 6px;
}
:is(.dfl-tool, .dfl-split) .sample-wrap { margin-top: 10px; }
:is(.dfl-tool, .dfl-split) .sample-link {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  padding: 8px;
  min-height: 44px;
}
:is(.dfl-tool, .dfl-split) .sample-link:hover { text-decoration: underline; }
:is(.dfl-tool, .dfl-split) .file-card {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #c9d8f3;
  background: #f8fbff;
  border-radius: 12px;
  min-height: 64px;
  min-width: 0;
}
:is(.dfl-tool, .dfl-split) .file-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--soft-blue);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  flex: none;
}
:is(.dfl-tool, .dfl-split) .file-info { min-width: 0; flex: 1; }
:is(.dfl-tool, .dfl-split) .file-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:is(.dfl-tool, .dfl-split) .file-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
:is(.dfl-tool, .dfl-split) .file-actions { display: flex; align-items: center; gap: 6px; flex: none; }
:is(.dfl-tool, .dfl-split) .icon-button,
:is(.dfl-tool, .dfl-split) .text-button {
  border: 1px solid var(--line);
  background: #fff;
  color: #344255;
  border-radius: var(--radius-control);
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}
:is(.dfl-tool, .dfl-split) .icon-button:hover,
:is(.dfl-tool, .dfl-split) .text-button:hover { background: var(--subtle); border-color: #8796a8; }
:is(.dfl-tool, .dfl-split) .separator { height: 1px; background: var(--line); margin: 22px 0; }
:is(.dfl-tool, .dfl-split) .config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
:is(.dfl-tool, .dfl-split) .field label { display: block; font-size: 13px; font-weight: 600; color: #344255; margin-bottom: 6px; }
:is(.dfl-tool, .dfl-split) .field input,
:is(.dfl-tool, .dfl-split) .field select {
  width: 100%;
  min-height: 44px;
  height: 44px;
  border: 1px solid #bfcad7;
  border-radius: var(--radius-control);
  background: #fff;
  padding: 0 12px;
  color: var(--ink);
  font-size: 14px;
}
:is(.dfl-tool, .dfl-split) .field input:focus,
:is(.dfl-tool, .dfl-split) .field select:focus { border-color: var(--blue); }
:is(.dfl-tool, .dfl-split) .field-help { font-size: 12px; color: var(--muted); margin-top: 6px; }
:is(.dfl-tool, .dfl-split) .custom-delim { margin-top: 8px; max-width: 88px; }
:is(.dfl-tool, .dfl-split) .checkrow {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 13px;
  border-radius: 10px;
  background: var(--subtle);
  border: 1px solid var(--line);
}
:is(.dfl-tool, .dfl-split) .checkrow input { accent-color: var(--blue); width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
:is(.dfl-tool, .dfl-split) .checktext { font-size: 13px; color: #344255; font-weight: 600; }
:is(.dfl-tool, .dfl-split) .checkhint { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
:is(.dfl-tool, .dfl-split) .actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
:is(.dfl-tool, .dfl-split) .primary {
  min-height: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--blue);
  color: #fff;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  transition: .15s;
}
:is(.dfl-tool, .dfl-split) .primary:hover:not(:disabled) { background: var(--blue-dark); }
:is(.dfl-tool, .dfl-split) .primary:disabled { background: var(--disabled); color: #fff; cursor: not-allowed; }
:is(.dfl-tool, .dfl-split) .action-note { font-size: 12px; color: var(--muted); flex: 1; min-width: 160px; }
:is(.dfl-tool, .dfl-split) .right-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; gap: 8px; }
:is(.dfl-tool, .dfl-split) .right-title { font-size: 15px; font-weight: 700; color: var(--ink); }
:is(.dfl-tool, .dfl-split) .live { display: none; align-items: center; gap: 6px; font-size: 12px; color: var(--green); font-weight: 700; }
:is(.dfl-tool, .dfl-split) .live.is-on { display: flex; }
:is(.dfl-tool, .dfl-split) .live:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
:is(.dfl-tool, .dfl-split) .right-intro { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
:is(.dfl-tool, .dfl-split) .stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
:is(.dfl-tool, .dfl-split) .stat { background: var(--subtle); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
:is(.dfl-tool, .dfl-split) .stat-value { font-size: 20px; font-weight: 700; letter-spacing: -.4px; color: var(--ink); }
:is(.dfl-tool, .dfl-split) .stat-label { font-size: 12px; color: var(--muted); margin-top: 3px; }
:is(.dfl-tool, .dfl-split) .preview-block { margin-top: 18px; }
:is(.dfl-tool, .dfl-split) .preview-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; }
:is(.dfl-tool, .dfl-split) .preview-heading strong { font-size: 13px; color: #344255; }
:is(.dfl-tool, .dfl-split) .preview-heading span { font-size: 12px; color: var(--muted); }
:is(.dfl-tool, .dfl-split) .empty-preview {
  border: 1px dashed #b9c5d3;
  border-radius: 10px;
  padding: 22px 15px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
:is(.dfl-tool, .dfl-split) .empty-preview svg { display: block; width: 28px; height: 28px; margin: 0 auto 8px; color: #8796a8; }
:is(.dfl-tool, .dfl-split) .preview-list { display: flex; flex-direction: column; gap: 7px; max-height: 250px; overflow: auto; }
:is(.dfl-tool, .dfl-split) .preview-item {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 10px;
  min-width: 0;
}
:is(.dfl-tool, .dfl-split) .csv-mini {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--green-bg);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
  flex: none;
}
:is(.dfl-tool, .dfl-split) .preview-file {
  font-size: 12px;
  font-weight: 700;
  color: #344255;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:is(.dfl-tool, .dfl-split) .preview-rows { font-size: 12px; color: var(--muted); margin-top: 2px; }
:is(.dfl-tool, .dfl-split) .preview-tag {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  background: var(--subtle);
  border-radius: 5px;
  padding: 4px 6px;
  white-space: nowrap;
}
:is(.dfl-tool, .dfl-split) .limit-warn {
  margin-top: 10px;
  border: 1px solid var(--amber-line);
  background: var(--amber-bg);
  color: #7a5300;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
}
:is(.dfl-tool, .dfl-split) .trust {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
:is(.dfl-tool, .dfl-split) .trust svg { width: 16px; height: 16px; color: var(--green); flex: none; margin-top: 1px; }
:is(.dfl-tool, .dfl-split) .trust strong { color: var(--ink); }
:is(.dfl-tool, .dfl-split) .status { display: none; margin-top: 14px; border-radius: 10px; padding: 11px 12px; font-size: 13px; }
:is(.dfl-tool, .dfl-split) .status.info { display: block; background: #eef3fb; border: 1px solid #c9d8f3; color: #0f43ad; }
:is(.dfl-tool, .dfl-split) .status.success { display: block; background: var(--green-bg); border: 1px solid var(--green-line); color: #05665d; }
:is(.dfl-tool, .dfl-split) .status.error { display: block; background: var(--red-bg); border: 1px solid var(--red-line); color: var(--red); }
:is(.dfl-tool, .dfl-split) .status.warn { display: block; background: var(--amber-bg); border: 1px solid var(--amber-line); color: #7a5300; }
:is(.dfl-tool, .dfl-split) .progress-wrap { display: none; margin-top: 12px; }
:is(.dfl-tool, .dfl-split) .progress-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
:is(.dfl-tool, .dfl-split) .progress-track { height: 6px; background: var(--subtle); border-radius: 99px; overflow: hidden; }
:is(.dfl-tool, .dfl-split) .progress-bar { height: 100%; width: 0; background: var(--blue); border-radius: 99px; transition: width .15s; }
:is(.dfl-tool, .dfl-split) .results { display: none; margin-top: 20px; }
:is(.dfl-tool, .dfl-split) .results-head,
:is(.dfl-tool, .dfl-split) .result-row { min-width: 0; }
:is(.dfl-tool, .dfl-split) .results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 11px;
}
:is(.dfl-tool, .dfl-split) .results-head strong { font-size: 14px; color: var(--ink); }
:is(.dfl-tool, .dfl-split) .download-all {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--green);
  color: #fff;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
}
:is(.dfl-tool, .dfl-split) .download-all:hover { background: #06665d; }
:is(.dfl-tool, .dfl-split) .result-list { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow: auto; }
:is(.dfl-tool, .dfl-split) .result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}
:is(.dfl-tool, .dfl-split) .result-row .file-info { flex: 1; }
:is(.dfl-tool, .dfl-split) .download-one {
  border: 1px solid #c9d8f3;
  background: #eef3fb;
  color: var(--blue);
  border-radius: var(--radius-control);
  min-height: 44px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}
:is(.dfl-tool, .dfl-split) .download-one:hover { background: #dbe6fb; }
@media (max-width: 850px) {
  :is(.dfl-tool, .dfl-split) .workspace {
    grid-template-columns: 1fr;
    grid-template-areas: "config" "preview" "actions";
    row-gap: 16px;
  }
  :is(.dfl-tool, .dfl-split) .config-panel,
  :is(.dfl-tool, .dfl-split) .actions-panel,
  :is(.dfl-tool, .dfl-split) .right-panel {
    border-radius: var(--radius-panel);
    border: 1px solid var(--line);
    position: static;
  }
  :is(.dfl-tool, .dfl-split) .config-panel { padding: 20px; }
  :is(.dfl-tool, .dfl-split) .actions-panel { padding: 20px; }
}
@media (max-width: 560px) {
  :is(.dfl-tool, .dfl-split) h1 { font-size: 28px; }
  :is(.dfl-tool, .dfl-split) .subtitle { font-size: 15px; }
  :is(.dfl-tool, .dfl-split) .dropzone { min-height: 160px; padding: 18px 12px; }
  :is(.dfl-tool, .dfl-split) .config-grid { grid-template-columns: 1fr; }
  :is(.dfl-tool, .dfl-split) .actions { align-items: stretch; flex-direction: column; }
  :is(.dfl-tool, .dfl-split) .primary { width: 100%; }
  :is(.dfl-tool, .dfl-split) .action-note { text-align: center; min-width: 0; }
  :is(.dfl-tool, .dfl-split) .file-card { flex-wrap: wrap; }
  :is(.dfl-tool, .dfl-split) .results-head { flex-direction: column; align-items: stretch; }
  :is(.dfl-tool, .dfl-split) .download-all { width: 100%; }
  :is(.dfl-tool, .dfl-split) .status,
  :is(.dfl-tool, .dfl-split) .file-name,
  :is(.dfl-tool, .dfl-split) .preview-file { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.dfl-tool, .dfl-split) *,
  :is(.dfl-tool, .dfl-split) *::before,
  :is(.dfl-tool, .dfl-split) *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Rollout-specific layout adapters. Scoped so site navigation/footer are untouched. */
.dfl-tool .tool-hero { margin-bottom:24px; }
.dfl-tool .tool-hero .eyebrow { margin-bottom:8px; }
.dfl-tool .workspace-options { display:flex; flex-direction:column; gap:14px; }
.dfl-tool .workspace-options label { margin:0; }
.dfl-tool .workspace-field { display:flex; flex-direction:column; gap:7px; color:#344255; font-size:13px; font-weight:600; }
.dfl-tool .workspace-field-label { display:block; color:#344255; font-size:13px; font-weight:600; margin-bottom:-8px; }
.dfl-tool .workspace-options :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {
 width:100%; min-height:44px; border:1px solid #bfcad7; border-radius:8px; background:#fff; padding:10px 12px; color:var(--ink); font:inherit; box-sizing:border-box; margin:0;
}
.dfl-tool .workspace-options textarea { min-height:96px; resize:vertical; }
.dfl-tool .workspace-options select[multiple] { min-height:132px; }
.dfl-tool .workspace-check { display:flex; align-items:flex-start; gap:10px; padding:12px 13px; border-radius:10px; background:var(--subtle); border:1px solid var(--line); font-size:13px; line-height:1.55; }
.dfl-tool .workspace-check input { width:18px; height:18px; flex:none; accent-color:var(--blue); margin:2px 0 0; }
.dfl-tool .workspace-options > :is(p,h2,h3) { margin:0; }
.dfl-tool .workspace-options :is(h2,h3) { font-size:15px; }
.dfl-tool .workspace-options :is(p,ul,ol) { font-size:12px; color:var(--muted); line-height:1.6; }
.dfl-tool .workspace-pick { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.dfl-tool .workspace-file-card:not([hidden]) { display:flex; }
.dfl-tool [hidden] { display:none !important; }
.dfl-tool .dropzone.is-dragging { background:#eef3fb; border-color:var(--blue); }
.dfl-tool .upload-area > .dropzone:not(:first-child) { margin-top:14px; }
.dfl-tool .upload-area > .file-card:not(:first-child) { margin-top:10px; }
.dfl-tool .upload-area .file-card + .dropzone { margin-top:14px; }
.dfl-tool .dropzone { width:100%; box-sizing:border-box; font:inherit; color:var(--ink); }
.dfl-tool .workspace-preview { min-width:0; overflow:auto; max-height:640px; }
.dfl-tool .workspace-preview :is(pre,table) { margin:12px 0; font-size:12px; }
.dfl-tool .workspace-preview pre { white-space:pre-wrap; overflow-wrap:anywhere; max-height:340px; overflow:auto; padding:12px; background:var(--subtle); border:1px solid var(--line); border-radius:10px; }
.dfl-tool .workspace-preview table { border-collapse:collapse; width:100%; }
.dfl-tool .workspace-preview :is(th,td) { padding:8px; border-bottom:1px solid var(--line); text-align:left; overflow-wrap:anywhere; max-width:260px; }
.dfl-tool .workspace-preview h2 { font-size:15px; margin-top:16px; }
.dfl-tool .workspace-preview :is(p,ul,ol,div) { font-size:13px; line-height:1.6; }
.dfl-tool .workspace-preview .empty-state { display:flex; flex-direction:column; gap:8px; }
.dfl-tool .workspace-preview .result-card { padding:12px; background:var(--subtle); border:1px solid var(--line); border-radius:10px; }
.dfl-tool .actions .workspace-action { min-height:44px; border:0; border-radius:8px; background:var(--blue); color:#fff; padding:10px 18px; font:inherit; font-size:14px; font-weight:700; margin:0; }
.dfl-tool .actions .workspace-action:disabled { background:var(--disabled); cursor:not-allowed; }
.dfl-tool .actions .workspace-action:hover:not(:disabled) { background:var(--blue-dark); }
.dfl-tool .actions-panel > :is(p,div:not(.actions)) { font-size:12px; line-height:1.6; color:var(--muted); }
.dfl-tool .actions-panel [id=download] { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.dfl-tool .actions-panel [id=download] a { background:var(--green); color:#fff; border:0; border-radius:8px; padding:10px 14px; }
.dfl-tool .actions-panel [id=download]:empty { display:none; }
.dfl-tool .workspace-preview .results { display:block; }
.dfl-tool .config-panel { padding-bottom:20px; }
.dfl-tool :is(button,input,select,textarea,a):focus-visible { outline:3px solid var(--blue); outline-offset:2px; }
@media(max-width:560px) { .dfl-tool .right-panel {padding:18px;} .dfl-tool .file-actions {width:100%;justify-content:flex-end;} .dfl-tool .actions .workspace-action {width:100%;} }

.dfl-tool .upload-label {font-size:13px; font-weight:700; color:var(--ink); margin:14px 0 8px;}
.dfl-tool .upload-label:first-child {margin-top:0;}

.dfl-tool .workspace-options .filter-field {display:flex; flex-direction:column; gap:7px; margin:12px 0; font-size:13px; font-weight:600;}
