/* Catalog CSV styles. Colours and the type scale come from /shared/tokens.css.
   These aliases map the names this file was written against onto the shared
   tokens, so the rest of the file is unchanged. */
:root {
  --canvas: var(--bg);
  --paper: var(--surface);
  --mist: #eef1f5;
  --line-strong: var(--line-2);
  --ink: var(--text);
  --ink-soft: var(--text-2);
  --navy: #0b2b52;
  --navy-2: #123a6b;
  --blue: var(--accent);
  --blue-dark: var(--accent-2);
  --blue-pale: var(--accent-bg);
  --green: var(--ok);
  --green-pale: var(--ok-bg);
  --amber: var(--warn);
  --amber-pale: var(--warn-bg);
  --red: var(--bad);
  --red-pale: var(--bad-bg);
}

.cat-shell {
  display: grid;
  grid-template: minmax(0, 1fr) / 132px minmax(560px, 1fr) 318px;
  min-height: calc(100vh - 56px);
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(14px, 3vw, 24px);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.34rem;
  font-weight: 780;
  letter-spacing: -.025em;
}

.brand-mark { width: 31px; height: 31px; fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.privacy-note { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: .84rem; text-align: right; }
.privacy-note svg { flex: 0 0 auto; width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.route-rail {
  grid-row: 1;
  grid-column: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 10px;
  border-right: 1px solid var(--line);
  background: #f8fafc;
}

.route-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 66px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  font-size: .86rem;
  font-weight: 680;
}

.route-step span { font-variant-numeric: tabular-nums; font-size: 1.15rem; font-weight: 790; color: var(--ink-soft); }
.route-step:not(:disabled):hover { background: var(--blue-pale); }
.route-step.is-active { color: #fff; background: var(--blue); border-radius: 9px; border-color: transparent; }
.route-step.is-active span { color: #fff; }
.route-step:disabled { color: #9aa7b6; cursor: not-allowed; }

.workspace {
  grid-row: 1;
  grid-column: 2;
  min-width: 0;
  max-width: 100%;
  padding: 28px clamp(16px, 3vw, 42px) 52px;
}
#step-panel { min-width: 0; }
#step-panel > * { min-width: 0; }

.workspace-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
h1, h2, h3, .route-step, .status-label, .status-board strong, .primary-button, .secondary-button {
  font-family: ui-sans-serif, sans-serif;
}
h1 { margin: 0; max-width: 24ch; font-size: clamp(1.8rem, 2.5vw, 2.6rem); line-height: 1; letter-spacing: -.018em; }

.file-flight {
  max-width: 420px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper);
  font-size: .74rem;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-flight strong { color: var(--ink); }

.inspector {
  grid-row: 1;
  grid-column: 3;
  min-width: 0;
  padding: 25px 18px;
  border-left: 1px solid var(--line);
  background: rgba(250,252,255,.88);
}

.inspector-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.inspector-heading h2 { margin: 0; font-size: 1.22rem; letter-spacing: -.015em; }
.inspector-heading p { margin: 2px 0 0; color: var(--ink-soft); font-size: .76rem; }
.health-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); box-shadow: 0 0 0 5px rgba(159,176,198,.16); }
.health-dot.ready { background: var(--green); box-shadow: 0 0 0 5px rgba(0,143,85,.13); }
.health-dot.warning { background: var(--amber); box-shadow: 0 0 0 5px rgba(185,104,0,.13); }
.health-dot.blocked { background: var(--red); box-shadow: 0 0 0 5px rgba(207,53,44,.13); }

.status-board { border-block: 1px solid var(--line); }
.status-board button {
  position: relative;
  display: grid;
  grid-template-columns: 7px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 0 4px 0 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}
.status-board button:last-child { border-bottom: 0; }
.status-board button:not(:disabled):hover { background: #fff; }
.status-board button.is-filtered { background: var(--paper); }
.status-band { align-self: stretch; width: 7px; }
.status-band.ready { background: var(--green); }
.status-band.warning { background: var(--amber); }
.status-band.blocked { background: var(--red); }
.status-board strong { font-size: .92rem; }
.status-board strong small { margin-left: 5px; color: var(--ink-soft); font-family: ui-sans-serif, sans-serif; font-size: .62rem; font-weight: 650; }
.status-board b { font-size: 1.22rem; font-variant-numeric: tabular-nums; }
.status-board button:nth-child(1) b { color: var(--green); }
.status-board button:nth-child(2) b { color: var(--amber); }
.status-board button:nth-child(3) b { color: var(--red); }

.structure-board { padding: 18px 0; border-bottom: 1px solid var(--line); }
.structure-board:empty { display: none; }
.structure-board h3 { margin: 0 0 10px; font-size: .92rem; }
.structure-board dl { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); margin: 0; border: 1px solid var(--line); }
.structure-board dl div { min-width: 0; padding: 8px 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.structure-board dl div:nth-child(2n) { border-right: 0; }
.structure-board dl div:nth-last-child(-n+2) { border-bottom: 0; }
.structure-board dt { color: var(--ink-soft); font-size: .6rem; font-weight: 740; letter-spacing: .06em; text-transform: uppercase; }
.structure-board dd { margin: 3px 0 0; overflow: hidden; color: var(--navy); font-size: .76rem; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }

.issues-section { margin-top: 26px; }
.section-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-label h3 { margin: 0; font-size: .92rem; }
.text-button { border: 0; padding: 5px; color: var(--blue-dark); background: transparent; font-size: .78rem; font-weight: 700; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.issue-list { margin-top: 10px; }
.issue-row { display: grid; grid-template-columns: 9px 1fr auto; align-items: start; gap: 9px; padding: 11px 2px; border-bottom: 1px solid var(--line); font-size: .8rem; }
.issue-row { width: 100%; border-inline: 0; border-top: 0; background: transparent; text-align: left; }
.issue-row span:first-child { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--amber); }
.issue-row.blocked span:first-child { background: var(--red); }
.issue-row b { font-variant-numeric: tabular-nums; }
.empty-copy { margin: 12px 0; color: var(--ink-soft); font-size: .82rem; line-height: 1.5; }

.inspector-foot { display: flex; gap: 10px; margin-top: 26px; padding: 14px; border-radius: 12px; background: var(--blue-pale); color: var(--navy-2); }
.inspector-foot svg { flex: 0 0 auto; width: 22px; height: 22px; fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.inspector-foot p { margin: 0; font-size: .78rem; line-height: 1.45; }
.inspector-exports { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.inspector-exports h3 { margin: 0 0 8px; font-size: .95rem; }
.inspector-target { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .76rem; }
.inspector-target:last-child { border-bottom: 0; }
.inspector-target b { color: var(--blue-dark); font-variant-numeric: tabular-nums; }

.upload-zone {
  display: grid;
  place-items: center;
  min-height: 184px;
  padding: 20px 24px;
  border: 2px dashed #7fa6db;
  border-radius: var(--radius);
  background: rgba(255,255,255,.72);
  text-align: center;
  transition: background .18s ease-out, border-color .18s ease-out, box-shadow .18s ease-out;
}
.upload-zone.is-dragging { border-color: var(--blue); background: var(--blue-pale); box-shadow: var(--shadow); }
.upload-emblem { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 6px; color: var(--blue); }
.upload-emblem svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.upload-zone h2 { margin: 0 0 8px; font-size: 1.45rem; letter-spacing: -.025em; }
.upload-zone p { max-width: 52ch; margin: 0; color: var(--ink-soft); line-height: 1.6; }
.upload-actions { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }

.primary-button, .secondary-button, .danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  max-width: 100%;
  padding: 9px 17px;
  border-radius: 999px;
  font-weight: 740;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: break-word;
  border: 1px solid transparent;
}
.primary-button { color: #fff; background: var(--blue); box-shadow: 0 4px 12px rgba(7,94,232,.16); }
.primary-button:hover { background: var(--blue-dark); }
.secondary-button { color: var(--blue-dark); border-color: #7aa6e5; background: #fff; }
.secondary-button:hover { background: var(--blue-pale); }
.danger-button { color: var(--red); border-color: #efb1ac; background: #fff; }
.primary-button:disabled, .secondary-button:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; }
.primary-button svg, .secondary-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.file-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: var(--line);
}
.file-summary div { min-width: 0; padding: 10px 13px; background: var(--paper); }
.file-summary span { display: block; color: var(--ink-soft); font-size: .62rem; font-weight: 740; letter-spacing: .06em; text-transform: uppercase; }
.file-summary strong { display: block; margin-top: 3px; overflow: hidden; color: var(--ink); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }

.error-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #eab1ac;
  border-left: 4px solid var(--red);
  border-radius: 10px;
  background: var(--red-pale);
}
.error-banner svg { width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.error-banner strong { display: block; font-family: sans-serif; font-size: 1rem; color: var(--ink); }
.error-banner p { margin: 4px 0 0; font-size: .82rem; line-height: 1.5; color: var(--ink); }
.error-banner .text-button { color: var(--red); }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 0; font-size: 1.05rem; }
.panel-header p { margin: 5px 0 0; color: var(--ink-soft); font-size: .82rem; line-height: 1.45; }
.panel-body { padding: 20px; }

.mapping-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 22px; }
.field { display: grid; gap: 6px; }
.field > span, .field > label { color: var(--ink-soft); font-size: .75rem; font-weight: 720; }
.field em { color: var(--red); font-style: normal; }
.field select, .field input, .field textarea, .search-input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
}
.field textarea { min-height: 134px; resize: vertical; line-height: 1.45; }
.field select:hover, .field input:hover, .field textarea:hover { border-color: #6e8db4; }
.field select:focus, .field input:focus, .field textarea:focus { border-color: var(--blue); outline: 3px solid rgba(7,94,232,.13); }
.field-help { color: var(--ink-soft); font-size: .72rem; line-height: 1.4; }

.subsection { margin-top: 30px; padding-top: 25px; border-top: 1px solid var(--line); }
.subsection-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.subsection-head h3 { margin: 0; font-size: .96rem; }
.attribute-list { display: grid; gap: 9px; }
.attribute-row { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 10px; padding: 12px; border-radius: 11px; background: var(--canvas); }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 9px; color: var(--red); background: #fff; }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.inline-note { margin: 12px 0 0; color: var(--ink-soft); font-size: .78rem; }

.rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 26px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 13px 0; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); }
.check-row strong { display: block; font-size: .85rem; }
.check-row span { display: block; margin-top: 3px; color: var(--ink-soft); font-size: .74rem; line-height: 1.4; }

.manifest-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.filter-set { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-chip { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .75rem; font-weight: 720; }
.filter-chip.is-active { color: #fff; border-color: var(--navy); background: var(--navy); }
.search-input { max-width: 260px; min-height: 38px; font-size: .8rem; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.manifest-table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: .78rem; }
.manifest-table th { position: sticky; top: 0; z-index: 1; padding: 8px 10px; color: #dceaff; border-right: 1px solid rgba(255,255,255,.15); background: var(--navy); text-align: left; font-size: .65rem; letter-spacing: .05em; text-transform: uppercase; }
.manifest-table th:last-child { border-right: 0; }
.manifest-table td { height: 36px; max-width: 260px; padding: 6px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.manifest-table td:last-child { border-right: 0; }
.manifest-table tr:last-child td { border-bottom: 0; }
.manifest-table tbody tr:hover { background: #f7faff; }
.manifest-table .status-cell { width: 82px; padding: 0 9px; color: #fff; border-color: rgba(255,255,255,.28); }
.manifest-table .status-cell.ready { background: var(--green); }
.manifest-table .status-cell.warning { color: #241500; background: #e99a25; }
.manifest-table .status-cell.blocked { background: var(--red); }
.manifest-table .status-cell.skipped { color: #33414f; background: #d7dee8; }
.status-label { display: block; font-size: .66rem; font-weight: 790; letter-spacing: .035em; text-transform: uppercase; }
.table-empty { padding: 48px 20px; color: var(--ink-soft); text-align: center; }

.issue-detail { display: grid; gap: 8px; }
.issue-detail-row { display: grid; grid-template-columns: 86px 1fr auto; gap: 10px; align-items: center; padding: 12px; border-radius: 10px; background: var(--canvas); font-size: .8rem; }
.issue-detail-row button { justify-self: end; }

.summary-callout { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; padding: 15px; border-radius: 11px; background: var(--blue-pale); }
.summary-callout.blocked { background: var(--red-pale); }
.summary-callout svg { width: 22px; flex: 0 0 auto; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.summary-callout.blocked svg { stroke: var(--red); }
.summary-callout p { margin: 0; font-size: .82rem; line-height: 1.5; }

.export-board { display: grid; gap: 1px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--line); }
.export-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; padding: 17px; background: #fff; }
.export-row h3 { margin: 0; font-size: .9rem; }
.export-row p { margin: 4px 0 0; color: var(--ink-soft); font-size: .75rem; }
.export-order { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 8px; border-radius: 7px; color: #fff; background: var(--navy); font-variant-numeric: tabular-nums; }

.step-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.step-actions .right { display: flex; gap: 9px; margin-left: auto; }
.meta-note { color: var(--ink-soft); font-size: .74rem; }

.upload-preview { margin-top: 14px; border-radius: 8px; box-shadow: none; }
.upload-preview .panel-header { padding-block: 13px; }
.upload-preview .manifest-table td { padding-block: 5px; }
.upload-preview .manifest-table th { padding-block: 8px; }
.upload-preview .table-wrap { border: 0; border-radius: 0; }

@keyframes board-snap {
  from { clip-path: inset(0 0 100% 0); filter: blur(2px); }
  to { clip-path: inset(0); filter: blur(0); }
}
@keyframes field-snap {
  from { border-color: var(--blue); box-shadow: inset 0 0 0 2px rgba(7,94,232,.18); }
  to { border-color: var(--line-strong); box-shadow: inset 0 0 0 0 transparent; }
}
.status-board button:not(:disabled) { animation: board-snap .28s cubic-bezier(.2,.8,.2,1) both; }
.status-board button:nth-child(2) { animation-delay: .035s; }
.status-board button:nth-child(3) { animation-delay: .07s; }
.mapping-grid select { animation: field-snap .38s ease-out; }

.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 50; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: 340px; padding: 12px 14px; color: #fff; border-radius: 10px; background: var(--navy); box-shadow: var(--shadow); font-size: .82rem; animation: toast-in .24s cubic-bezier(.2,.8,.2,1); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); filter: blur(3px); } }

@media (max-width: 1120px) {
  .cat-shell { grid-template: auto minmax(0,1fr) / minmax(0,1fr) 286px; }
  .topbar { grid-column: 1 / -1; }
  .route-rail { grid-row: 1; grid-column: 1 / -1; flex-direction: row; gap: 5px; padding: 8px 14px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .route-step { grid-template-columns: 24px auto; justify-content: center; min-width: 112px; min-height: 48px; border: 0; border-radius: 9px; }
  .route-step span { font-size: 1rem; }
  .workspace { grid-row: 2; grid-column: 1; }
  .inspector { grid-row: 2; grid-column: 2; }
}

@media (max-width: 780px) {
  .cat-shell { display: block; }
  .topbar { position: static; min-height: 60px; }
  .brand { font-size: 1.16rem; }
  .privacy-note { font-size: .74rem; }
  .privacy-note span { max-width: 22ch; }
  .route-rail { position: sticky; top: 55px; z-index: 10; }
  .route-step { min-width: 84px; }
  .workspace { padding: 22px 14px 32px; }
  .workspace-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .file-flight { width: 100%; max-width: none; }
  .inspector { padding: 22px 14px 40px; border-left: 0; border-top: 1px solid var(--line); }
  .upload-zone { min-height: 220px; padding: 22px 16px; }
  .upload-actions, .step-actions { align-items: stretch; flex-direction: column; }
  .upload-actions > *, .step-actions button { width: 100%; }
  .step-actions .right { width: 100%; flex-direction: column; }
  .panel-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .mapping-grid, .rules-grid, .structure-controls { grid-template-columns: 1fr; }
  .attribute-row { grid-template-columns: 1fr auto; }
  .attribute-row .field:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .attribute-row .check-inline { grid-column: 1 / -1; grid-row: 3; }
  .attribute-row .icon-button { grid-column: 2; grid-row: 1; }
  .export-row { grid-template-columns: 1fr; }
  .export-row button { width: 100%; }
  .did-panel .check-grid, .update-fields .check-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .file-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-tools { flex-direction: column; align-items: stretch; }
  .review-tools .tool-inline { justify-content: space-between; }
  .review-tools select { flex: 1 1 auto; }
}

@media (max-width: 460px) {
  .privacy-note span { display: none; }
  .filter-chip { flex: 1 1 auto; text-align: center; }
  .error-banner { grid-template-columns: auto 1fr; }
  .error-banner .text-button { grid-column: 1 / -1; justify-self: end; }
  .express-card { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Added capabilities ─────────────────────────────────────────── */

.structure-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 22px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
}
.structure-controls-head { grid-column: 1 / -1; }
.structure-controls-head h3 { margin: 0; font-size: .95rem; }
.structure-controls-head p { margin: 3px 0 0; color: var(--ink-soft); font-size: .78rem; }
.structure-controls .field-help.warn { grid-column: 1 / -1; margin: 0; color: var(--amber); font-weight: 600; }

.express-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid #8fd3b4;
  border-radius: 12px;
  background: var(--green-pale);
}
.express-card svg { width: 26px; height: 26px; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.express-card h3 { margin: 0; font-size: 1rem; }
.express-card p { margin: 3px 0 0; color: var(--ink-soft); font-size: .8rem; line-height: 1.4; }

.preset-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.preset-bar .field.inline { flex: 1 1 220px; }
.preset-bar .field.inline > span { margin-bottom: 2px; }
.secondary-button.small { min-height: 38px; padding: 0 13px; font-size: .82rem; }

.check-inline { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 600; color: var(--ink-soft); }
.check-inline input { width: 16px; height: 16px; accent-color: var(--blue); }

.attribute-row { grid-template-columns: 1fr 1fr auto auto; }

details.advanced { margin-top: 24px; border: 1px solid var(--line); border-radius: 11px; background: var(--canvas); }
details.advanced > summary { padding: 13px 16px; font-family: sans-serif; font-size: 1rem; cursor: pointer; }
details.advanced[open] > summary { border-bottom: 1px solid var(--line); }
details.advanced > .rules-grid, details.advanced > .check-row, details.advanced > .update-fields { margin: 14px 16px; }
details.advanced > .check-row { margin-block: 0; }

.update-fields .check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }

.export-all { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }

.did-panel { margin-bottom: 16px; padding: 14px 16px; border: 1px solid #a9d8c2; border-radius: 11px; background: var(--green-pale); }
.did-panel h3 { margin: 0 0 8px; font-size: .92rem; }
.did-panel ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.did-panel li { font-size: .8rem; line-height: 1.4; overflow-wrap: anywhere; }
.express-card p, .field-help, .inline-note, .check-row span span { overflow-wrap: anywhere; }
.name-from-column { overflow-wrap: anywhere; }
.did-panel b { font-variant-numeric: tabular-nums; }

.review-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--canvas); }
.review-tools .tool-inline { display: inline-flex; align-items: center; gap: 8px; }
.review-tools label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: .78rem; font-weight: 600; }
.review-tools select { min-height: 34px; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }

.name-from-column { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 42px; padding: 8px 10px; border: 1px dashed var(--line-strong); border-radius: 9px; color: var(--ink-soft); font-size: .78rem; background: #fff; }
.name-from-column b { color: var(--navy); }

.edit-td { padding: 0 !important; }
.cell-input {
  width: 100%;
  min-width: 90px;
  height: 34px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  font: inherit;
  font-variant-numeric: tabular-nums;
}
.cell-input:hover { background: #eef4ff; }
.cell-input:focus { outline: 2px solid var(--blue); outline-offset: -2px; background: #fff; }
.edit-td.is-edited { background: var(--amber-pale); box-shadow: inset 3px 0 0 var(--amber); }

@media (max-width: 780px) {
  .structure-controls, .update-fields .check-grid { grid-template-columns: 1fr; }
  .express-card { grid-template-columns: 1fr; text-align: left; }
  .attribute-row { grid-template-columns: 1fr auto; }
}
