:root{
  --bg:#f7f8fb;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --soft:#f3f4f6;
  --primary:#2563eb;
  --primary-dark:#1d4ed8;
  --success:#047857;
  --success-bg:#ecfdf5;
  --danger:#b91c1c;
  --danger-bg:#fef2f2;
  --warn:#a16207;
  --warn-bg:#fffbeb;
  --shadow:0 14px 40px rgba(17,24,39,.06);
  --radius:18px;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif}
a{color:inherit}
.shell{width:calc(100% - 32px);max-width:none;margin:28px auto 60px}
.shell.narrow{width:min(820px,calc(100% - 32px))}
.hero{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;margin-bottom:18px;padding:28px;background:linear-gradient(135deg,#fff,#f8fbff);border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow)}
.hero.compact{align-items:center}
.hero h1{font-size:34px;line-height:1.1;margin:0 0 8px;letter-spacing:-.04em}
.eyebrow{font-size:12px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--primary);margin:0 0 10px}
.muted{color:var(--muted);margin:0}
.hero-actions,.toolbar-actions,.bulk-actions,.format-controls,.button-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.button-row.end{justify-content:flex-end}.button-row.vertical-sm{align-items:stretch}.button-row.vertical-sm .btn{justify-content:center}
.btn{appearance:none;border:1px solid var(--line);background:#fff;color:#111827;border-radius:12px;padding:10px 14px;font-weight:700;text-decoration:none;cursor:pointer;display:inline-flex;align-items:center;gap:8px;min-height:40px;transition:.15s ease}
.btn:hover{border-color:#cbd5e1;transform:translateY(-1px)}
.btn:disabled{opacity:.5;cursor:not-allowed;transform:none}
.btn.primary{background:var(--primary);border-color:var(--primary);color:#fff}.btn.primary:hover{background:var(--primary-dark)}
.btn.ghost{background:transparent}.btn.success{background:var(--success-bg);border-color:#bbf7d0;color:var(--success)}
.btn.danger-soft{background:var(--danger-bg);border-color:#fecaca;color:var(--danger)}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px}
.layout{display:grid;grid-template-columns:360px minmax(0,1fr);gap:18px;align-items:start}.work-area{display:grid;gap:18px;min-width:0}
.section-title{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:14px}.section-title.tight{margin-bottom:10px}
.section-title h2{font-size:18px;margin:0 0 4px;letter-spacing:-.02em}.mini-heading{font-size:13px;text-transform:uppercase;letter-spacing:.08em;color:#4b5563;margin:14px 0 8px}
label{display:grid;gap:7px;margin:0 0 12px}label span{font-size:12px;font-weight:800;color:#374151}label small{color:var(--muted);font-size:12px}label em{color:var(--muted);font-style:normal;font-weight:600}
input,textarea,select{width:100%;border:1px solid var(--line);border-radius:12px;background:#fff;padding:10px 12px;font:inherit;color:var(--text);outline:none;transition:.15s ease}
textarea{resize:vertical;min-height:90px}input:focus,textarea:focus,select:focus{border-color:#93c5fd;box-shadow:0 0 0 4px rgba(37,99,235,.08)}
.form-grid{display:grid;gap:12px}.form-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.settings-panel.hidden,.hidden{display:none!important}.divider{height:1px;background:var(--line);margin:16px 0}
.alert{padding:12px 14px;border-radius:14px;margin:0 0 16px;font-weight:650}.alert.success{background:var(--success-bg);color:var(--success);border:1px solid #bbf7d0}.alert.danger{background:var(--danger-bg);color:var(--danger);border:1px solid #fecaca}
.status-pill{padding:8px 12px;border-radius:999px;font-weight:800;font-size:12px}.status-pill.ok{background:var(--success-bg);color:var(--success)}.status-pill.warn{background:var(--warn-bg);color:var(--warn)}
.batch-list{display:grid;gap:8px;max-height:280px;overflow:auto}.batch-item{border:1px solid var(--line);border-radius:14px;padding:10px;background:#fff;cursor:pointer}.batch-item:hover{border-color:#cbd5e1}.batch-item strong{display:block}.batch-item span{color:var(--muted);font-size:12px}
.toolbar-card{display:flex;justify-content:space-between;gap:16px;align-items:center}.toolbar-card h2{margin:0 0 4px;font-size:20px}
.progress{background:#eef4ff;border:1px solid #dbeafe;border-radius:14px;padding:10px 12px;color:#1e40af;font-weight:700}.progress div{height:7px;background:#dbeafe;border-radius:999px;overflow:hidden;margin-top:8px}.progress i{display:block;height:100%;width:0;background:var(--primary);transition:.2s ease;border-radius:999px}
.review-list{display:grid;gap:12px}.empty-state{padding:34px;text-align:center;color:var(--muted);background:var(--soft);border:1px dashed #cbd5e1;border-radius:16px}
.ref-card{border:1px solid var(--line);border-radius:18px;background:#fff;overflow:hidden}.ref-head{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px 14px;background:#fbfbfd;border-bottom:1px solid var(--line)}
.ref-title{display:flex;gap:10px;align-items:center;min-width:0}.ref-title input{width:auto}.ref-title strong{white-space:nowrap}.badge{border-radius:999px;padding:4px 9px;font-size:11px;font-weight:900;letter-spacing:.02em}.badge.PENDING_SEARCH{background:#f3f4f6;color:#4b5563}.badge.EXACT_MATCH,.badge.USER_ACCEPTED,.badge.USER_EDITED{background:var(--success-bg);color:var(--success)}.badge.SIMILAR_MATCH_REVIEW_REQUIRED{background:#eff6ff;color:#1d4ed8}.badge.WEAK_MATCH_REVIEW_REQUIRED,.badge.NO_MATCH_FOUND{background:var(--warn-bg);color:var(--warn)}.badge.USER_REJECTED{background:var(--danger-bg);color:var(--danger)}
.confidence{font-weight:900;color:#374151}.ref-body{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:14px}.compare-box{border:1px solid var(--line);border-radius:14px;padding:12px;background:#fff;min-width:0}.compare-box h4{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#6b7280;margin:0 0 8px}.compare-text{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;color:#1f2937}
.suggestions{grid-column:1/-1;border:1px solid #dbeafe;background:#f8fbff;border-radius:14px;padding:10px}.suggestions h4{margin:0 0 6px;font-size:13px}.suggestions ul{margin:0;padding-left:18px;color:#374151}.suggestions:empty{display:none}
.ref-actions{display:flex;gap:8px;flex-wrap:wrap;padding:0 14px 14px}.match-options{grid-column:1/-1;display:grid;gap:8px}.match-option{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:start;border:1px solid var(--line);border-radius:12px;padding:10px}.match-option input{width:auto;margin-top:3px}.match-option small{color:var(--muted)}
.action-compact .action-icon{font-size:15px;font-weight:900;line-height:1}.action-compact .action-label{display:inline}
.check{display:flex!important;grid-template-columns:none;gap:6px;align-items:center;margin:0;font-weight:700}.check input{width:auto}.format-controls select{width:auto;min-width:130px}.output-card textarea{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
dialog{border:0;border-radius:18px;padding:0;box-shadow:0 30px 90px rgba(0,0,0,.2);width:min(680px,calc(100% - 32px))}dialog::backdrop{background:rgba(17,24,39,.45)}.edit-dialog form{padding:18px}.edit-dialog h2{margin:0 0 4px}
@media(max-width:1050px){.layout{grid-template-columns:1fr}.toolbar-card,.section-title,.hero{flex-direction:column}.form-grid.four{grid-template-columns:1fr 1fr}.ref-body{grid-template-columns:1fr}}
@media(max-width:620px){.shell{width:min(100% - 20px,1480px);margin-top:12px}.hero{padding:20px}.hero h1{font-size:27px}.form-grid.four{grid-template-columns:1fr}.toolbar-actions,.bulk-actions,.format-controls{width:100%}.btn{width:100%;justify-content:center}.format-controls select{width:100%}}

.soft-check{
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.02);
}
.search-report{
  margin-bottom: 16px;
  line-height: 1.45;
}
.search-report details{
  margin-top: 8px;
}
.search-report ul{
  margin: 8px 0 0 18px;
  padding: 0;
}

/* v1.3: cleaner verification dashboard */
.ref-card{
  position: relative;
  border-width: 1px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.ref-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:5px;
  background:#cbd5e1;
}
.ref-card.tone-match{
  border-color:#bbf7d0;
  background:linear-gradient(90deg, rgba(236,253,245,.75), #fff 38%);
}
.ref-card.tone-match::before{background:#10b981}
.ref-card.tone-review{
  border-color:#fed7aa;
  background:linear-gradient(90deg, rgba(255,247,237,.85), #fff 40%);
}
.ref-card.tone-review::before{background:#f59e0b}
.ref-card.tone-mismatch{
  border-color:#fecaca;
  background:linear-gradient(90deg, rgba(254,242,242,.9), #fff 40%);
}
.ref-card.tone-mismatch::before{background:#ef4444}
.ref-card.tone-pending::before{background:#94a3b8}
.ref-head{padding-left:18px;align-items:stretch}
.ref-title{flex-wrap:wrap}.source-grid{display:grid;grid-template-columns:92px 92px 62px;gap:8px;align-items:center;margin-left:auto}.source-cell{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;gap:1px 6px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:6px 8px;background:#fff;min-height:46px}.source-label{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#64748b;font-weight:900}.source-icon{grid-row:1/3;grid-column:2;font-size:18px;font-weight:900;line-height:1}.source-cell small{font-size:10px;color:#64748b;font-weight:800}.source-yes{border-color:#bbf7d0;background:var(--success-bg)}.source-yes .source-icon,.source-yes small{color:var(--success)}.source-review{border-color:#fed7aa;background:#fff7ed}.source-review .source-icon,.source-review small{color:#c2410c}.source-no{border-color:#fecaca;background:var(--danger-bg)}.source-no .source-icon,.source-no small{color:var(--danger)}.source-pending{border-color:#e2e8f0;background:#f8fafc}.source-pending .source-icon,.source-pending small{color:#64748b}.confidence{display:inline-flex;align-items:center;justify-content:center;min-height:46px;border:1px solid var(--line);border-radius:12px;background:#fff;padding:0 10px;font-size:12px}.badge.SIMILAR_MATCH_REVIEW_REQUIRED,.badge.WEAK_MATCH_REVIEW_REQUIRED,.badge.MULTIPLE_MATCHES_FOUND{background:#fff7ed;color:#c2410c}.badge.NO_MATCH_FOUND{background:var(--danger-bg);color:var(--danger)}.badge.EXACT_MATCH,.badge.USER_ACCEPTED,.badge.USER_EDITED{background:var(--success-bg);color:var(--success)}.compare-box{background:rgba(255,255,255,.82)}
@media(max-width:760px){.ref-head{flex-direction:column}.source-grid{width:100%;grid-template-columns:1fr 1fr 70px;margin-left:0}.source-cell{min-width:0}}

.completion-panel{grid-column:1/-1;border:1px solid var(--line);border-radius:14px;background:#fff;padding:12px;overflow:auto}
.completion-panel h4{margin:0 0 10px}
.completion-panel table{width:100%;border-collapse:collapse;font-size:13px}
.completion-panel th,.completion-panel td{border-bottom:1px solid var(--line);padding:8px;text-align:left;vertical-align:top}
.completion-panel th{color:var(--muted);font-weight:700;background:#f8fafc}
.completion-panel tr:last-child td{border-bottom:0}
.completion-panel .field-added td{background:#ecfdf5}
.completion-panel .field-review td{background:#fff7ed}
.completion-panel .field-empty td{background:#fef2f2}
.completion-panel .field-same td{background:#ffffff}

/* v1.5: compact default review and optional detail panels */
.review-title-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
}
.show-controls{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  padding:7px 8px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.show-controls > span{
  font-size:12px;
  font-weight:900;
  color:#64748b;
  text-transform:uppercase;
  letter-spacing:.08em;
  margin-right:2px;
}
.mini-check{
  font-size:12px;
  padding:5px 8px;
  border-radius:999px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
}
.ref-title{
  flex:1 1 auto;
}
.ref-snippet{
  flex:1 1 360px;
  min-width:180px;
  color:#334155;
  font-size:13px;
  font-weight:650;
  line-height:1.35;
  overflow:hidden;
  text-overflow:ellipsis;
}
.detail-grid{
  grid-template-columns:1fr;
  padding:12px 14px;
}
.detail-panel{
  grid-column:1/-1;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.86);
  padding:12px;
  overflow:auto;
}
.detail-panel h4{
  margin:0 0 10px;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#64748b;
}
.source-data-panel table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
.source-data-panel td{
  border-bottom:1px solid var(--line);
  padding:7px 8px;
  vertical-align:top;
}
.source-data-panel td:first-child{
  width:145px;
  color:#64748b;
  font-weight:800;
}
.database-ref{
  margin-top:10px;
  border-top:1px solid var(--line);
  padding-top:10px;
}
.database-ref strong{
  display:block;
  margin-bottom:6px;
  color:#334155;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.detail-empty{
  margin:0;
}
@media(max-width:760px){
  .review-title-actions{width:100%;justify-content:stretch}
  .show-controls,.bulk-actions{width:100%}
  .ref-snippet{flex-basis:100%;min-width:0}
}


/* v1.6: wider workspace and cleaner compact validation rows */
.layout{grid-template-columns:340px minmax(0,1fr)}
.review-title{align-items:flex-start}
.review-title-actions{display:flex;align-items:flex-start;justify-content:flex-end;gap:14px;flex-wrap:wrap;max-width:760px}
.show-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end;padding:0;margin:0}
.show-controls>span{font-size:12px;font-weight:800;color:#64748b;margin-right:2px}
.mini-check{display:inline-flex!important;width:auto;white-space:nowrap;margin:0;font-size:12px;gap:5px;align-items:center}
.ref-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px}
.ref-title{display:grid;grid-template-columns:auto auto auto minmax(0,1fr);align-items:start;gap:10px;min-width:0;width:100%}
.ref-title .ref-check{margin-top:3px}
.ref-snippet{display:block;white-space:normal;overflow-wrap:anywhere;word-break:normal;line-height:1.48;color:#1f2937}
.source-grid{display:grid;grid-template-columns:54px 54px;gap:8px;align-items:center;margin-left:0}
.source-grid.with-overall{grid-template-columns:54px 54px 62px}
.source-cell{display:flex;align-items:center;justify-content:center;gap:5px;min-height:38px;padding:6px 7px;border-radius:11px}
.source-cell .source-icon{font-size:17px;line-height:1}
.source-cell small{font-size:11px;line-height:1;font-weight:900}
.confidence{display:flex;align-items:center;justify-content:center;min-height:38px;border:1px solid var(--line);border-radius:11px;background:#fff;font-size:12px}
.detail-grid{grid-template-columns:1fr;gap:12px}
.submitted-panel{background:#fbfbfd}
.bulk-actions{justify-content:flex-end}
@media(max-width:1050px){.review-title-actions{justify-content:flex-start;max-width:none}.show-controls{justify-content:flex-start}.ref-head{grid-template-columns:1fr}.source-grid{justify-self:start}.ref-title{grid-template-columns:auto auto auto 1fr}}
@media(max-width:620px){.shell{width:calc(100% - 20px)}.source-grid,.source-grid.with-overall{grid-template-columns:repeat(2,54px)}.ref-title{grid-template-columns:auto auto 1fr}.ref-title .badge{grid-column:2/4}.ref-snippet{grid-column:1/-1}}


/* v1.7: validation-first row layout */
.validation-column-head{
  display:grid;
  grid-template-columns:70px 150px minmax(0,1fr) 300px;
  gap:14px;
  align-items:end;
  padding:0 18px 8px 18px;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.validation-column-head small{
  font-size:10px;
  color:#94a3b8;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:none;
}
.ref-card{overflow:hidden}
.ref-head{
  display:grid!important;
  grid-template-columns:70px 150px minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:14px 16px 14px 18px;
}
.ref-select{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:900;
  color:#334155;
}
.ref-select .ref-check{width:auto;margin:0}
.ref-status-block{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  min-width:0;
}
.score-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  width:100%;
}
.score-row .score-overall{grid-column:1/-1}
.score-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:4px 8px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  font-size:11px;
  font-weight:900;
  line-height:1;
}
.score-yes{border-color:#bbf7d0;background:var(--success-bg);color:var(--success)}
.score-review{border-color:#fed7aa;background:#fff7ed;color:#c2410c}
.score-no{border-color:#fecaca;background:var(--danger-bg);color:var(--danger)}
.score-pending{border-color:#e2e8f0;background:#f8fafc;color:#64748b}
.score-overall{border-color:#dbeafe;background:#eff6ff;color:#1d4ed8}
.ref-title{
  display:block!important;
  min-width:0;
  width:100%;
}
.ref-snippet{
  display:block;
  font-size:13.5px;
  line-height:1.48;
  color:#1f2937;
  font-weight:600;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  overflow-wrap:anywhere;
}
.ref-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:nowrap;
  padding:0!important;
  margin:0;
}
.ref-actions .btn{
  white-space:nowrap;
  padding:9px 12px;
}
.bulk-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
}
.review-title-actions{max-width:920px}
@media(max-width:1180px){
  .validation-column-head{display:none}
  .ref-head{grid-template-columns:70px minmax(0,1fr);align-items:start}
  .ref-status-block{grid-column:2/3;grid-row:1;align-self:start;margin-left:0}
  .ref-title{grid-column:1/-1}
  .ref-actions{grid-column:1/-1;justify-content:flex-start;flex-wrap:wrap}
}
@media(max-width:620px){
  .ref-head{grid-template-columns:1fr;gap:10px}
  .ref-status-block,.ref-title,.ref-actions{grid-column:1/-1;grid-row:auto}
  .score-row{width:150px}
  .ref-actions .btn{width:auto;justify-content:center}
}


/* v1.9: compact header controls and hover/click show menu */
.review-title.controls-only{
  justify-content:flex-end;
  margin-bottom:10px;
}
.review-title.controls-only .review-title-actions{
  width:100%;
  max-width:none;
  justify-content:flex-end;
}
.show-menu{
  position:relative;
  display:inline-flex;
  align-items:center;
  z-index:10;
}
.show-trigger{
  min-width:86px;
  justify-content:center;
}
.show-menu .show-options{
  display:none;
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width:620px;
  max-width:min(720px, calc(100vw - 32px));
  padding:10px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  box-shadow:var(--shadow);
  grid-template-columns:repeat(5, max-content);
  gap:8px;
  justify-content:flex-end;
}
.show-menu:hover .show-options,
.show-menu:focus-within .show-options{
  display:grid;
}
.show-options .mini-check{
  background:#f8fafc;
}
.source-reference-panel{
  background:#fff;
}
.source-reference-panel h4{
  margin-bottom:8px;
}
.source-choice{
  display:flex;
  align-items:center;
  gap:9px;
  width:max-content;
  max-width:100%;
  margin-top:12px;
  padding:8px 11px;
  border:1px solid #fed7aa;
  border-radius:999px;
  background:#fff7ed;
  color:#9a3412;
  font-size:12px;
  font-weight:850;
  cursor:pointer;
  transition:.15s ease;
}
.source-choice:hover{border-color:#fb923c;background:#ffedd5}
.source-choice input{
  width:16px;
  height:16px;
  margin:0;
  accent-color:#ea580c;
  flex:0 0 auto;
}
.source-choice.selected{
  border-color:#86efac;
  background:#f0fdf4;
  color:#166534;
}
.detail-panel.source-selected{
  border-color:#86efac;
  box-shadow:0 0 0 2px rgba(34,197,94,.08);
}
@media(max-width:900px){
  .show-menu .show-options{
    right:auto;
    left:0;
    min-width:min(520px, calc(100vw - 32px));
    grid-template-columns:1fr 1fr;
    justify-content:start;
  }
}
@media(max-width:620px){
  .review-title.controls-only .review-title-actions{justify-content:stretch}
  .show-menu{width:100%}
  .show-trigger{width:100%}
  .show-menu .show-options{
    left:0;
    right:0;
    min-width:100%;
    grid-template-columns:1fr;
  }
}


/* v1.10: review-required context, Show last, footer, and slight reference indent */
.validation-column-head > div:nth-child(3){
  padding-left:14px;
}
.ref-head .ref-title{
  padding-left:14px;
}
.app-footer{
  margin:20px 0 0;
  padding:14px 16px;
  text-align:center;
  color:#64748b;
  font-size:12.5px;
  font-weight:700;
}
@media(max-width:1180px){
  .ref-head .ref-title{padding-left:0}
  .validation-column-head > div:nth-child(3){padding-left:0}
}


/* v1.11: applied logo header and refined legal footer */
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.brand-hero{
  align-items:center;
  padding:20px 24px;
}
.brand-area{
  min-width:0;
  flex:1 1 auto;
}
.brand-logo{
  display:block;
  width:auto;
  max-width:100%;
  max-height:180px;
  object-fit:contain;
  object-position:left center;
  margin:-6px 0 2px;
}
.brand-subtitle{
  max-width:1020px;
  margin-top:2px;
}
.app-footer{
  margin:24px auto 0;
  padding:16px 18px 20px;
  text-align:center;
  color:#334155;
  border-top:1px solid var(--line);
  font-size:12px;
  font-weight:600;
}
.footer-legal{
  font-weight:800;
  letter-spacing:.01em;
}
.footer-note{
  margin-top:5px;
  color:#64748b;
  font-size:11.5px;
  font-weight:600;
}
@media(max-width:760px){
  .brand-hero{padding:18px}
  .brand-logo{max-height:136px}
}


/* v1.12: approved logo, bhagwa application theme, and beta footer */
:root{
  --bg:#fff7ed;
  --card:#fffdf8;
  --text:#1e293b;
  --muted:#7c5a3a;
  --line:#fed7aa;
  --soft:#ffedd5;
  --primary:#ea580c;
  --primary-dark:#c2410c;
  --primary-soft:#fff7ed;
  --accent:#f97316;
  --accent-dark:#9a3412;
  --navy:#08204a;
  --success:#15803d;
  --success-bg:#f0fdf4;
  --danger:#b91c1c;
  --danger-bg:#fff1f2;
  --warn:#b45309;
  --warn-bg:#fff7ed;
  --shadow:0 20px 60px rgba(154,52,18,.12);
  --radius:20px;
}
body{
  background:
    radial-gradient(circle at 8% 0%, rgba(249,115,22,.18), transparent 28%),
    radial-gradient(circle at 94% 4%, rgba(234,88,12,.13), transparent 30%),
    linear-gradient(180deg,#fff7ed 0%,#fffbf5 48%,#fff7ed 100%);
  color:var(--text);
}
.shell{width:calc(100% - 32px);max-width:none;margin:22px auto 54px}
.hero{
  background:
    linear-gradient(135deg,rgba(255,247,237,.96),rgba(255,255,255,.98) 50%,rgba(255,237,213,.9)),
    linear-gradient(90deg,#fff,#fff7ed);
  border:1px solid #fdba74;
  box-shadow:0 20px 70px rgba(194,65,12,.13);
  position:relative;
  overflow:hidden;
}
.hero::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:5px;
  background:linear-gradient(90deg,#ffedd5,#f97316,#ea580c,#9a3412);
}
.brand-hero{padding:18px 24px 20px}
.brand-logo{max-height:205px;margin:-10px 0 0;filter:drop-shadow(0 10px 18px rgba(15,23,42,.08))}
.brand-subtitle{color:#6b4f3b;font-weight:650;margin-top:-2px}
.card{
  background:rgba(255,253,248,.94);
  border-color:#fed7aa;
  box-shadow:0 14px 44px rgba(154,52,18,.09);
}
.toolbar-card,.review-card,.output-card,.side-card{
  border-top:3px solid rgba(249,115,22,.38);
}
.section-title h2,.toolbar-card h2,.mini-heading{color:var(--navy)}
.section-title p,.muted{color:#7c5a3a}
.btn{
  border-color:#fed7aa;
  background:#fffaf5;
  color:var(--navy);
  box-shadow:0 1px 0 rgba(255,255,255,.7) inset;
}
.btn:hover{border-color:#fb923c;background:#fff7ed;transform:translateY(-1px)}
.btn.primary{
  border-color:#ea580c;
  color:#fff;
  background:linear-gradient(135deg,#f97316,#ea580c 58%,#c2410c);
  box-shadow:0 12px 24px rgba(234,88,12,.22);
}
.btn.primary:hover{background:linear-gradient(135deg,#fb923c,#ea580c 56%,#9a3412)}
.btn.success{border-color:#86efac;background:#f0fdf4;color:#166534}
.btn.danger-soft{border-color:#fecaca;background:#fff1f2;color:#991b1b}
input,textarea,select{
  border-color:#fed7aa;
  background:#fffdf8;
}
input:focus,textarea:focus,select:focus{
  border-color:#f97316;
  box-shadow:0 0 0 4px rgba(249,115,22,.16);
  outline:none;
}
.soft-check,.show-controls,.mini-check,.completion-panel,.detail-panel,.compare-box{
  border-color:#fed7aa;
  background:#fffaf5;
}
.batch-item.active,.batch-item:hover{
  border-color:#fb923c;
  background:#fff7ed;
}
.badge.EXACT_MATCH,.badge.USER_ACCEPTED,.badge.USER_EDITED{
  background:#ecfdf5;color:#166534;border:1px solid #bbf7d0;
}
.badge.SIMILAR_MATCH_REVIEW_REQUIRED,.badge.WEAK_MATCH_REVIEW_REQUIRED,.badge.MULTIPLE_MATCHES_FOUND{
  background:#fff7ed;color:#9a3412;border:1px solid #fed7aa;
}
.badge.NO_MATCH_FOUND{background:#fff1f2;color:#991b1b;border:1px solid #fecaca}
.ref-card.tone-match{border-color:#bbf7d0;background:linear-gradient(90deg,rgba(240,253,244,.82),#fffdf8 42%)}
.ref-card.tone-review{border-color:#fed7aa;background:linear-gradient(90deg,rgba(255,247,237,.92),#fffdf8 42%)}
.ref-card.tone-mismatch{border-color:#fecaca;background:linear-gradient(90deg,rgba(255,241,242,.9),#fffdf8 42%)}
.score-overall{border-color:#fed7aa;background:#fff7ed;color:#9a3412}
.alert.success,.search-report:not(.hidden){border-color:#86efac;background:#f0fdf4;color:#166534}
.alert.danger{border-color:#fecaca;background:#fff1f2;color:#991b1b}
.progress{background:#fff7ed;border:1px solid #fed7aa}
.progress div{background:#ffedd5}.progress i{background:linear-gradient(90deg,#f97316,#ea580c)}
.app-footer{
  max-width:980px;
  color:#7c5a3a;
  border-top:1px solid #fed7aa;
}
.footer-beta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 12px;
  margin-bottom:8px;
  border-radius:999px;
  background:#fff7ed;
  border:1px solid #fb923c;
  color:#9a3412;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
  font-size:11px;
}
.footer-legal{color:var(--navy)}
.footer-note{color:#7c5a3a;max-width:900px;margin-left:auto;margin-right:auto;line-height:1.55}
@media(max-width:760px){.brand-logo{max-height:148px}.brand-subtitle{font-size:13px}}

/* v1.16: full-width input-first landing mode and alphabetized formatting styles */
.layout.start-mode{
  grid-template-columns:1fr;
  justify-content:stretch;
  align-items:start;
}
.layout.start-mode .work-area{
  display:none;
}
.layout.start-mode .side-card{
  width:100%;
  max-width:none;
  margin:0;
  border-top:4px solid rgba(249,115,22,.55);
}
.layout.start-mode .side-card .section-title h2{
  font-size:24px;
}
.layout.start-mode .side-card textarea{
  min-height:300px;
}
.layout.start-mode .side-card .button-row{
  flex-direction:row;
  align-items:center;
}
.layout.start-mode .side-card .btn.primary{
  min-width:220px;
}
.layout.review-mode .work-area{
  display:grid;
  gap:18px;
}
.format-controls select{
  min-width:220px;
}
@media(max-width:620px){
  .layout.start-mode{grid-template-columns:1fr}
  .layout.start-mode .side-card textarea{min-height:240px}
  .layout.start-mode .side-card .button-row{flex-direction:column}
  .layout.start-mode .side-card .btn.primary{min-width:0;width:100%}
}


/* v1.16: start screen input card now matches full header width */
.layout.start-mode{
  grid-template-columns:1fr;
  justify-content:stretch;
}
.layout.start-mode .side-card{
  width:100%;
  max-width:none;
  margin:0;
}


/* v1.17: compact first view, centered actions, and file drop option */
.brand-hero{
  padding:13px 18px 15px;
  margin-bottom:14px;
}
.brand-logo{
  max-height:154px;
  margin:-8px 0 -3px;
}
.brand-subtitle{
  max-width:980px;
  margin-top:-6px;
  font-size:13px;
  line-height:1.35;
}
.hero-actions{
  align-self:center;
}
.layout.start-mode .side-card{
  padding:16px 18px;
}
.layout.start-mode .side-card .section-title{
  margin-bottom:8px;
}
.layout.start-mode .side-card .section-title h2{
  font-size:22px;
}
.layout.start-mode .side-card .section-title p{
  font-size:13px;
}
.start-input-grid{
  display:grid;
  grid-template-columns:minmax(240px, 1fr) minmax(280px, 1fr);
  gap:14px;
  align-items:end;
}
.layout.start-mode .side-card textarea{
  min-height:170px;
}
.layout.start-mode .side-card .button-row,
.side-card .button-row,
.output-card .button-row,
.review-title-actions,
.format-controls{
  justify-content:center;
}
.layout.start-mode .side-card .button-row{
  padding-top:2px;
}
.file-drop-label{
  padding:0;
}
.file-drop-label input[type=file]{
  padding:9px 12px;
  cursor:pointer;
}
.file-drop-label small{
  display:block;
  margin-top:-3px;
  padding:7px 10px;
  border:1px dashed #fb923c;
  border-radius:10px;
  background:#fff7ed;
  color:#9a3412;
  font-weight:800;
  text-align:center;
}
.file-drop-label.drag-over small{
  background:#ffedd5;
  border-color:#ea580c;
  color:#7c2d12;
  box-shadow:0 0 0 4px rgba(249,115,22,.13);
}
@media(max-width:900px){
  .brand-logo{max-height:130px}
  .start-input-grid{grid-template-columns:1fr}
}
@media(max-width:620px){
  .brand-hero{padding:12px 14px}
  .brand-logo{max-height:112px}
  .layout.start-mode .side-card textarea{min-height:150px}
}


/* v1.18: compact centered upload, proportional batch input, and cleaner first-screen actions */
.brand-hero{
  padding:10px 16px 12px;
}
.brand-logo{
  max-height:138px;
  margin:-8px 0 -6px;
}
.brand-subtitle{
  max-width:960px;
  font-size:12.5px;
  line-height:1.3;
  margin-top:-5px;
}
.layout.start-mode .side-card{
  padding:16px 20px 18px;
}
.layout.start-mode .side-card .section-title{
  justify-content:center;
  text-align:center;
  margin-bottom:10px;
}
.start-input-grid{
  grid-template-columns:minmax(260px, 500px) minmax(320px, 560px);
  justify-content:center;
  align-items:end;
  gap:18px;
  margin-bottom:8px;
}
.batch-name-label{
  width:100%;
  max-width:500px;
  justify-self:center;
}
.batch-name-label input{
  height:46px;
  text-align:center;
  font-size:15px;
}
.file-drop-label{
  width:100%;
  max-width:560px;
  justify-self:center;
  text-align:center;
  position:relative;
}
.file-drop-label > span:first-child,
.batch-name-label > span{
  text-align:center;
}
.file-picker-input{
  position:absolute;
  width:1px!important;
  height:1px!important;
  opacity:0;
  pointer-events:none;
  overflow:hidden;
}
.file-drop-box{
  min-height:92px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:16px 18px;
  border:1.5px dashed #fb923c;
  border-radius:18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(249,115,22,.12), transparent 45%),
    linear-gradient(180deg,#fffaf5,#fff7ed);
  color:#7c2d12;
  cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75), 0 10px 28px rgba(154,52,18,.08);
  transition:.16s ease;
}
.file-drop-label:hover .file-drop-box,
.file-drop-label.drag-over .file-drop-box{
  border-color:#ea580c;
  background:linear-gradient(180deg,#fff7ed,#ffedd5);
  transform:translateY(-1px);
  box-shadow:0 12px 30px rgba(234,88,12,.14), 0 0 0 4px rgba(249,115,22,.12);
}
.file-upload-icon{
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:linear-gradient(135deg,#f97316,#ea580c);
  color:white;
  font-weight:900;
  font-size:18px;
  box-shadow:0 10px 18px rgba(234,88,12,.24);
}
.file-upload-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:132px;
  padding:7px 14px;
  border-radius:999px;
  background:var(--navy);
  color:white;
  font-weight:900;
  letter-spacing:.01em;
}
.file-drop-text{
  font-size:12px;
  font-weight:800;
  color:#9a3412;
}
.file-drop-label.drag-over .file-drop-text{
  color:#7c2d12;
}
.layout.start-mode .side-card textarea{
  min-height:132px;
}
.layout.start-mode .side-card .button-row{
  justify-content:center;
  gap:12px;
  padding-top:0;
}
.layout.start-mode .side-card .button-row .btn{
  min-width:180px;
  justify-content:center;
  border-radius:999px;
}
.layout.start-mode .side-card .button-row .btn.primary{
  min-width:230px;
}
.layout.start-mode .soft-check{
  justify-content:center;
  text-align:center;
  max-width:640px;
  margin-left:auto;
  margin-right:auto;
}
@media(max-width:900px){
  .brand-logo{max-height:118px}
  .start-input-grid{grid-template-columns:1fr;gap:12px}
  .batch-name-label,.file-drop-label{max-width:100%}
  .file-drop-box{min-height:84px}
}
@media(max-width:620px){
  .brand-logo{max-height:104px}
  .layout.start-mode .side-card textarea{min-height:128px}
  .layout.start-mode .side-card .button-row .btn,
  .layout.start-mode .side-card .button-row .btn.primary{width:100%;min-width:0}
}

/* v1.19: upload first, right-aligned batch name, centered reference entry, refined actions */
.layout.start-mode .side-card{
  padding:15px 20px 17px;
}
.start-input-grid{
  grid-template-columns: minmax(340px, 600px);
  justify-content:center;
  align-items:start;
  gap:10px;
  margin:2px auto 8px;
  max-width:760px;
}
.file-drop-label{
  max-width:600px;
  justify-self:center;
}
.file-drop-box{
  min-height:84px;
  border-radius:20px;
  border:1.5px dashed rgba(234,88,12,.62);
  background:
    radial-gradient(circle at 50% 0%, rgba(249,115,22,.13), transparent 44%),
    linear-gradient(180deg,#fffdf8 0%,#fff7ed 100%);
}
.file-upload-action{
  min-width:140px;
  background:linear-gradient(135deg,var(--navy),#0f2f66);
  color:#fff;
  box-shadow:0 9px 18px rgba(8,32,74,.16);
}
.file-upload-icon{
  background:linear-gradient(135deg,#ffb45c,#f97316 48%,#c2410c);
}
.batch-name-label{
  width:min(360px, 100%);
  max-width:360px;
  justify-self:end;
  margin-top:0;
}
.batch-name-label > span{
  text-align:right;
}
.batch-name-label input{
  height:42px;
  text-align:right;
  padding-left:14px;
  padding-right:14px;
  border-radius:16px;
}
.references-entry-label{
  width:min(860px,100%);
  margin:0 auto 10px;
}
.references-entry-label > span{
  text-align:center;
}
.references-entry-label textarea{
  min-height:124px!important;
  border-radius:18px;
  line-height:1.45;
}
.layout.start-mode .soft-check{
  padding:8px 12px;
  margin-top:0;
}
.layout.start-mode .side-card .button-row{
  gap:14px;
  padding-top:2px;
}
.layout.start-mode .side-card .button-row .btn{
  min-height:43px;
  border-radius:999px;
  padding:10px 18px;
}
.layout.start-mode .side-card .button-row .btn.primary,
.btn.primary{
  border-color:#0b2a5b;
  color:#fff;
  background:linear-gradient(135deg,#08204a 0%,#0f3470 62%,#ea580c 100%);
  box-shadow:0 12px 24px rgba(8,32,74,.18), 0 5px 14px rgba(234,88,12,.16);
}
.layout.start-mode .side-card .button-row .btn.primary:hover,
.btn.primary:hover{
  background:linear-gradient(135deg,#061735 0%,#08204a 58%,#f97316 100%);
  border-color:#061735;
}
.layout.start-mode .side-card .button-row .btn:not(.primary){
  background:#fffdf8;
  border-color:#f9a85c;
  color:#7c2d12;
}
.layout.start-mode .side-card .button-row .btn:not(.primary):hover{
  background:#fff7ed;
  border-color:#ea580c;
}
@media(max-width:900px){
  .start-input-grid{max-width:100%;grid-template-columns:1fr}
  .batch-name-label{justify-self:center;width:min(360px,100%)}
  .batch-name-label > span,.batch-name-label input{text-align:center}
  .references-entry-label{width:100%}
}
@media(max-width:620px){
  .file-drop-box{min-height:78px}
  .references-entry-label textarea{min-height:120px!important}
}


/* v1.20: refined input-first page copy, proportional fields, and cleaner modern actions */
.layout.start-mode .side-card{
  padding:18px 24px 20px;
  background:
    radial-gradient(circle at 50% -14%, rgba(249,115,22,.09), transparent 44%),
    linear-gradient(180deg,rgba(255,255,255,.95),rgba(255,252,247,.96));
  border:1px solid rgba(251,146,60,.38);
  border-top:3px solid rgba(234,88,12,.58);
  box-shadow:0 18px 54px rgba(124,45,18,.09);
}
.layout.start-mode .side-card .section-title{
  margin:0 0 10px;
  padding:0;
  text-align:center;
  justify-content:center;
}
.layout.start-mode .side-card .section-title h2{
  font-size:21px;
  line-height:1.15;
  letter-spacing:-.02em;
}
.start-input-grid{
  width:min(760px,100%);
  max-width:760px;
  grid-template-columns:1fr;
  justify-content:center;
  gap:10px;
  margin:0 auto 10px;
}
.file-drop-label{
  width:min(620px,100%);
  max-width:620px;
  justify-self:center;
  display:block;
}
.field-caption,
.file-drop-label > span:first-child{
  display:block;
  margin-bottom:6px;
  text-align:center;
  color:#7c2d12;
  font-size:12px;
  font-weight:900;
  letter-spacing:.035em;
  text-transform:uppercase;
}
.file-drop-box{
  min-height:82px;
  border:1px solid rgba(251,146,60,.72);
  border-radius:22px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.98),rgba(255,247,237,.98)),
    radial-gradient(circle at 50% 0%, rgba(249,115,22,.16), transparent 48%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95), 0 14px 34px rgba(124,45,18,.08);
}
.file-drop-label:hover .file-drop-box,
.file-drop-label.drag-over .file-drop-box{
  border-color:#f97316;
  background:linear-gradient(180deg,#fffdf8,#fff3e5);
  box-shadow:0 18px 38px rgba(234,88,12,.14), 0 0 0 4px rgba(249,115,22,.10);
}
.file-upload-icon{
  width:32px;
  height:32px;
  font-size:17px;
  background:linear-gradient(135deg,#ffb45c 0%,#f97316 46%,#c2410c 100%);
}
.file-upload-action{
  min-width:210px;
  padding:8px 18px;
  border-radius:999px;
  background:linear-gradient(135deg,#fff7ed 0%,#ffedd5 100%);
  border:1px solid rgba(249,115,22,.58);
  color:#7c2d12;
  box-shadow:0 6px 14px rgba(234,88,12,.12);
}
.file-drop-text{
  color:#8a4b1d;
  font-weight:750;
}
.batch-name-label{
  width:min(420px,100%);
  max-width:420px;
  justify-self:end;
  margin:0;
}
.batch-name-label input{
  height:41px;
  border-radius:999px;
  text-align:left;
  padding:0 17px;
  background:linear-gradient(180deg,#fff,#fffaf5);
  border:1px solid rgba(251,146,60,.62);
  box-shadow:0 7px 18px rgba(124,45,18,.05);
}
.batch-name-label input::placeholder{
  color:#9a6b43;
  opacity:.92;
}
.references-entry-label{
  width:min(780px,100%);
  margin:0 auto 9px;
}
.references-entry-label > span{
  display:block;
  margin:0 0 7px;
  text-align:center;
  color:#7c2d12;
  font-size:13px;
  font-weight:850;
}
.references-entry-label textarea{
  min-height:118px!important;
  border-radius:22px;
  padding:15px 17px;
  background:linear-gradient(180deg,#fff,#fffdf8);
  border:1px solid rgba(251,146,60,.64);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8), 0 12px 28px rgba(124,45,18,.06);
}
.layout.start-mode .soft-check{
  max-width:620px;
  padding:7px 11px;
  margin:0 auto 8px;
  background:rgba(255,247,237,.78);
  border:1px solid rgba(253,186,116,.68);
  border-radius:999px;
  font-size:12.5px;
  color:#7c2d12;
}
.layout.start-mode .side-card .button-row{
  gap:12px;
  margin-top:0;
}
.layout.start-mode .side-card .button-row .btn{
  min-height:44px;
  border-radius:999px;
  padding:10px 20px;
  font-weight:900;
}
.layout.start-mode .side-card .button-row .btn.primary,
.btn.primary{
  border-color:#ea580c;
  color:#fff;
  background:linear-gradient(135deg,#fb923c 0%,#f97316 42%,#ea580c 100%);
  box-shadow:0 12px 26px rgba(234,88,12,.22), inset 0 1px 0 rgba(255,255,255,.18);
}
.layout.start-mode .side-card .button-row .btn.primary:hover,
.btn.primary:hover{
  border-color:#c2410c;
  background:linear-gradient(135deg,#fdba74 0%,#f97316 45%,#c2410c 100%);
  box-shadow:0 15px 30px rgba(234,88,12,.27), inset 0 1px 0 rgba(255,255,255,.2);
}
.layout.start-mode .side-card .button-row .btn:not(.primary){
  background:#ffffff;
  border-color:rgba(8,32,74,.18);
  color:var(--navy);
  box-shadow:0 8px 18px rgba(8,32,74,.06);
}
.layout.start-mode .side-card .button-row .btn:not(.primary):hover{
  border-color:#f97316;
  color:#9a3412;
  background:#fffaf5;
}
@media(max-width:900px){
  .batch-name-label{justify-self:center;width:min(420px,100%)}
  .batch-name-label input{text-align:center}
  .layout.start-mode .side-card{padding:16px 16px 18px}
}
@media(max-width:620px){
  .file-upload-action{min-width:0;width:auto}
  .layout.start-mode .soft-check{border-radius:18px}
  .references-entry-label textarea{min-height:124px!important}
}

/* v1.21: cleaner input card alignment and modern upload/button treatment */
.layout.start-mode .side-card .section-title{
  width:min(780px,100%);
  margin:0 auto 12px;
  text-align:left;
  justify-content:flex-start;
}
.layout.start-mode .side-card .section-title h2{
  font-size:22px;
  font-weight:950;
  color:#7c2d12;
  letter-spacing:-.025em;
}
.file-drop-label{
  width:min(560px,100%);
}
.file-drop-box{
  min-height:88px;
  border:1.5px dashed rgba(22,101,52,.42);
  background:
    radial-gradient(circle at 50% 0%, rgba(34,197,94,.13), transparent 54%),
    linear-gradient(180deg,#ffffff 0%,#f7fff9 100%);
  box-shadow:0 16px 36px rgba(22,101,52,.08), inset 0 1px 0 rgba(255,255,255,.95);
}
.file-drop-label:hover .file-drop-box,
.file-drop-label.drag-over .file-drop-box{
  border-color:#16a34a;
  background:
    radial-gradient(circle at 50% 0%, rgba(34,197,94,.18), transparent 56%),
    linear-gradient(180deg,#ffffff 0%,#ecfdf5 100%);
  box-shadow:0 18px 38px rgba(22,101,52,.14), 0 0 0 4px rgba(34,197,94,.11);
}
.file-upload-icon{
  width:38px;
  height:38px;
  font-size:20px;
  background:linear-gradient(135deg,#86efac 0%,#22c55e 46%,#15803d 100%);
  box-shadow:0 8px 18px rgba(22,101,52,.18);
}
.file-upload-action{
  min-width:260px;
  padding:11px 24px;
  font-size:16px;
  letter-spacing:.01em;
  color:#ffffff;
  background:linear-gradient(135deg,#22c55e 0%,#16a34a 50%,#15803d 100%);
  border:1px solid rgba(22,101,52,.35);
  box-shadow:0 10px 22px rgba(22,101,52,.18), inset 0 1px 0 rgba(255,255,255,.22);
}
.file-drop-text{
  font-size:12.5px;
  color:#2f6f45;
}
.batch-name-label{
  width:min(360px,100%);
  max-width:360px;
  margin-top:2px;
}
.batch-name-label input{
  height:38px;
  font-size:13px;
}
.batch-name-label input::placeholder{
  font-size:12px;
  color:#a67c52;
}
.references-entry-label{
  width:min(720px,100%);
}
.references-entry-label > span{
  text-align:left;
  padding-left:2px;
  color:#7c2d12;
  font-size:13px;
}
.references-entry-label textarea{
  min-height:116px!important;
}
.layout.start-mode .side-card .button-row{
  justify-content:center;
}
.layout.start-mode .side-card .button-row .btn.primary{
  min-width:250px;
  background:linear-gradient(135deg,#fb923c 0%,#f97316 52%,#c2410c 100%);
  border-color:#ea580c;
  box-shadow:0 14px 28px rgba(234,88,12,.24), inset 0 1px 0 rgba(255,255,255,.18);
}
@media(max-width:900px){
  .layout.start-mode .side-card .section-title{text-align:center;justify-content:center}
  .batch-name-label{justify-self:center;width:min(360px,100%)}
  .references-entry-label{width:100%}
}
@media(max-width:620px){
  .file-upload-action{min-width:0;width:100%;font-size:15px;padding:10px 16px}
  .file-drop-box{min-height:84px}
  .layout.start-mode .side-card .button-row .btn.primary{min-width:0;width:100%}
}

/* v1.22: precise start-screen alignment and bhagwa upload treatment */
.layout.start-mode .side-card .section-title,
.layout.start-mode .start-input-grid,
.layout.start-mode .references-entry-label{
  width:min(720px,100%);
  max-width:720px;
  margin-left:auto;
  margin-right:auto;
}
.layout.start-mode .side-card .section-title{
  margin-bottom:12px;
  text-align:left;
  justify-content:flex-start;
}
.layout.start-mode .side-card .section-title h2{
  margin-left:0;
}
.layout.start-mode .start-input-grid{
  justify-items:stretch;
  align-items:center;
}
.layout.start-mode .file-drop-label{
  width:min(560px,100%);
  max-width:560px;
  justify-self:center;
}
.layout.start-mode .batch-name-label{
  width:min(360px,50%);
  max-width:360px;
  justify-self:end;
  margin-top:4px;
}
.layout.start-mode .references-entry-label{
  display:block;
  margin-top:12px;
}
.layout.start-mode .references-entry-label > span{
  display:block;
  width:100%;
  text-align:left;
  padding-left:0;
  margin-left:0;
}
.layout.start-mode .references-entry-label textarea{
  width:100%;
  box-sizing:border-box;
}
.layout.start-mode .file-drop-box{
  border-color:rgba(234,88,12,.38);
  background:
    radial-gradient(circle at 50% 0%, rgba(251,146,60,.16), transparent 54%),
    linear-gradient(180deg,#fffaf5 0%,#fff7ed 100%);
  box-shadow:0 16px 36px rgba(154,52,18,.08), inset 0 1px 0 rgba(255,255,255,.95);
}
.layout.start-mode .file-drop-label:hover .file-drop-box,
.layout.start-mode .file-drop-label.drag-over .file-drop-box{
  border-color:#f97316;
  background:
    radial-gradient(circle at 50% 0%, rgba(251,146,60,.22), transparent 56%),
    linear-gradient(180deg,#ffffff 0%,#ffedd5 100%);
  box-shadow:0 18px 38px rgba(234,88,12,.14), 0 0 0 4px rgba(251,146,60,.12);
}
.layout.start-mode .file-upload-icon{
  background:linear-gradient(135deg,#bbf7d0 0%,#22c55e 48%,#15803d 100%);
  color:#ffffff;
  box-shadow:0 8px 18px rgba(22,101,52,.18);
}
.layout.start-mode .file-upload-action{
  color:#ffffff;
  background:linear-gradient(135deg,#fdba74 0%,#f97316 50%,#c2410c 100%);
  border-color:rgba(234,88,12,.48);
  box-shadow:0 10px 22px rgba(234,88,12,.18), inset 0 1px 0 rgba(255,255,255,.22);
}
.layout.start-mode .file-drop-text{
  color:#9a3412;
}
@media(max-width:900px){
  .layout.start-mode .side-card .section-title,
  .layout.start-mode .start-input-grid,
  .layout.start-mode .references-entry-label{
    width:100%;
  }
  .layout.start-mode .side-card .section-title{
    text-align:left;
    justify-content:flex-start;
  }
  .layout.start-mode .batch-name-label{
    width:min(360px,100%);
    justify-self:end;
  }
}
@media(max-width:620px){
  .layout.start-mode .file-drop-label,
  .layout.start-mode .batch-name-label{
    width:100%;
    max-width:100%;
    justify-self:stretch;
  }
  .layout.start-mode .batch-name-label input{text-align:left;}
}

/* v1.23: keep upload/drop area bhagwa-themed on both landing and review screens */
.file-drop-box,
.layout.start-mode .file-drop-box{
  border-color:rgba(234,88,12,.38);
  background:
    radial-gradient(circle at 50% 0%, rgba(251,146,60,.16), transparent 54%),
    linear-gradient(180deg,#fffaf5 0%,#fff7ed 100%);
  box-shadow:0 16px 36px rgba(154,52,18,.08), inset 0 1px 0 rgba(255,255,255,.95);
}
.file-drop-label:hover .file-drop-box,
.file-drop-label.drag-over .file-drop-box,
.layout.start-mode .file-drop-label:hover .file-drop-box,
.layout.start-mode .file-drop-label.drag-over .file-drop-box{
  border-color:#f97316;
  background:
    radial-gradient(circle at 50% 0%, rgba(251,146,60,.22), transparent 56%),
    linear-gradient(180deg,#ffffff 0%,#ffedd5 100%);
  box-shadow:0 18px 38px rgba(234,88,12,.14), 0 0 0 4px rgba(251,146,60,.12);
}
.file-upload-icon,
.layout.start-mode .file-upload-icon{
  background:linear-gradient(135deg,#bbf7d0 0%,#22c55e 48%,#15803d 100%);
  color:#ffffff;
  box-shadow:0 8px 18px rgba(22,101,52,.18);
}
.file-upload-action,
.layout.start-mode .file-upload-action{
  color:#ffffff;
  background:linear-gradient(135deg,#fdba74 0%,#f97316 50%,#c2410c 100%);
  border-color:rgba(234,88,12,.48);
  box-shadow:0 10px 22px rgba(234,88,12,.18), inset 0 1px 0 rgba(255,255,255,.22);
}
.file-drop-text,
.layout.start-mode .file-drop-text{
  color:#9a3412;
}

/* v1.31: information pages, FAQs, policies, direct social share icons and footer links */
.hero-links{
  justify-content:flex-end;
  align-items:center;
  gap:8px;
}
.nav-btn{
  min-height:36px;
  padding:8px 12px;
  border-color:rgba(234,88,12,.22);
  color:#7c2d12;
  background:rgba(255,247,237,.72);
}
.nav-btn:hover{
  border-color:#fb923c;
  background:#fff7ed;
}
.info-shell{max-width:1180px;}
.info-hero{align-items:center;}
.logo-link{display:inline-flex;text-decoration:none;}
.info-logo{max-height:120px!important;}
.info-title{
  font-size:28px;
  margin:8px 0 4px;
  color:#1f2937;
  letter-spacing:-.03em;
}
.info-card{
  padding:24px;
  margin-top:18px;
}
.faq-lines{
  margin-top:18px;
  border-top:1px solid rgba(234,88,12,.18);
}
.faq-line{
  border-bottom:1px solid rgba(234,88,12,.18);
  background:transparent;
}
.faq-line summary{
  list-style:none;
  cursor:pointer;
  padding:15px 2px;
  font-weight:850;
  color:#1f2937;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}
.faq-line summary::-webkit-details-marker{display:none;}
.faq-line summary::after{
  content:'+';
  display:inline-grid;
  place-items:center;
  width:24px;
  height:24px;
  border-radius:999px;
  color:#9a3412;
  background:#fff7ed;
  border:1px solid rgba(234,88,12,.22);
  flex:0 0 auto;
}
.faq-line[open] summary::after{content:'−';}
.faq-line p{
  color:#4b5563;
  margin:0 0 15px;
  max-width:900px;
  line-height:1.65;
}
.info-card h2,.policy-section h2{
  margin:0 0 8px;
  font-size:18px;
  letter-spacing:-.02em;
  color:#1f2937;
}
.info-card p,.policy-section p,.policy-section li{
  color:#4b5563;
  margin-top:0;
}
.contact-box{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  padding:16px;
  border-radius:16px;
  background:#fff7ed;
  border:1px solid rgba(234,88,12,.22);
  margin:14px 0;
}
.contact-label{
  font-weight:900;
  color:#9a3412;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:12px;
}
.contact-email{
  font-size:18px;
  font-weight:850;
  color:#111827;
  text-decoration:none;
}
.info-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:flex-start;
  margin-top:18px;
}
.feedback-template{
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:16px;
  background:#fafafa;
  margin:14px 0;
}
.feedback-template ul{margin:8px 0 0 18px;padding:0;color:#4b5563;}
.share-url-box{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  margin:14px 0 18px;
}
.share-brand-preview{
  display:grid;
  grid-template-columns:minmax(240px,360px) minmax(0,1fr);
  gap:20px;
  align-items:center;
  padding:18px;
  border-radius:22px;
  border:1px solid rgba(234,88,12,.18);
  background:linear-gradient(135deg,#fff7ed 0%,#ffffff 58%,#fffaf5 100%);
  box-shadow:0 12px 30px rgba(154,52,18,.08);
  margin-bottom:16px;
}
.share-brand-preview img{
  width:100%;
  max-height:126px;
  object-fit:contain;
}
.share-brand-preview h2{
  font-size:24px;
  margin:0 0 6px;
}
.share-brand-preview p{
  font-weight:750;
  color:#7c2d12;
  margin:0 0 8px;
}
.share-app-url{
  display:inline-flex;
  font-size:13px;
  font-weight:850;
  color:#111827;
  background:#ffffff;
  border:1px solid rgba(234,88,12,.18);
  border-radius:999px;
  padding:6px 10px;
}
.share-grid{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.icon-share-grid{justify-content:flex-start;}
.share-btn{
  border:1px solid #e5e7eb;
  border-radius:18px;
  background:#fff;
  width:58px;
  height:58px;
  padding:0;
  text-decoration:none;
  font-weight:900;
  text-align:center;
  cursor:pointer;
  color:#111827;
  box-shadow:0 10px 24px rgba(17,24,39,.05);
  display:inline-grid;
  place-items:center;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.share-btn svg{
  width:26px;
  height:26px;
  fill:currentColor;
  stroke:currentColor;
  stroke-width:0;
}
.share-btn:hover{transform:translateY(-1px);box-shadow:0 14px 30px rgba(17,24,39,.09);}
.share-btn.copied{outline:3px solid rgba(34,197,94,.22);}
.share-btn.whatsapp{border-color:#bbf7d0;background:#f0fdf4;color:#166534;}
.share-btn.linkedin{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8;}
.share-btn.x{border-color:#cbd5e1;background:#f8fafc;color:#0f172a;}
.share-btn.facebook{border-color:#dbeafe;background:#f8fbff;color:#1e40af;}
.share-btn.instagram{border-color:#fed7aa;background:linear-gradient(135deg,#fff7ed 0%,#fdf2f8 50%,#eef2ff 100%);color:#be185d;}
.share-btn.email{border-color:#fed7aa;background:#fff7ed;color:#9a3412;}
.share-btn.copy{border-color:#fde68a;background:#fffbeb;color:#92400e;}
.share-btn.native{border-color:#fdba74;background:#fff7ed;color:#c2410c;}
.share-hint{margin-top:14px!important;font-size:13px;}
.policy-jump{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:18px;
}
.policy-jump a{
  border:1px solid rgba(234,88,12,.22);
  border-radius:999px;
  background:#fff7ed;
  color:#9a3412;
  text-decoration:none;
  padding:8px 12px;
  font-weight:850;
}
.policy-section{
  border-top:1px solid #e5e7eb;
  padding-top:18px;
  margin-top:18px;
}
.policy-section:first-of-type{border-top:0;padding-top:0;}
.policy-section ul{padding-left:20px;}
.footer-links{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:10px 14px;
  margin:6px 0;
}
.footer-links a{
  color:#7c2d12;
  text-decoration:none;
  font-weight:800;
  font-size:12px;
}
.footer-links a:hover{text-decoration:underline;}
@media(max-width:900px){
  .hero-links{justify-content:flex-start;}
  .share-brand-preview{grid-template-columns:1fr;text-align:center;}
  .icon-share-grid{justify-content:center;}
  .share-url-box{grid-template-columns:1fr;}
}
@media(max-width:620px){
  .nav-btn{width:auto;}
  .hero-links{width:100%;}
  .info-logo{max-height:92px!important;}
  .info-card{padding:16px;}
}
.share-btn.instagram svg{fill:none;stroke:currentColor;stroke-width:1.9;}
.share-btn.instagram svg circle,.share-btn.instagram svg rect{fill:none;}


/* v1.31: high-resolution SVG social icons and editable share message */
.social-icon-strip{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.social-icon-strip-header{
  padding-left:8px;
  border-left:1px solid rgba(234,88,12,.18);
  margin-left:2px;
}
.social-icon-strip-footer{
  justify-content:center;
  margin:10px 0 8px;
}
.social-icon-link{
  width:38px;
  height:38px;
  border-radius:13px;
  display:inline-grid;
  place-items:center;
  text-decoration:none;
  background:#ffffff;
  border:1px solid rgba(234,88,12,.18);
  box-shadow:0 8px 20px rgba(15,23,42,.08);
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.social-icon-link:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 26px rgba(15,23,42,.12);
  border-color:rgba(234,88,12,.35);
}
.social-icon-link img{
  width:25px;
  height:25px;
  display:block;
}
.social-icon-strip-footer .social-icon-link{
  width:34px;
  height:34px;
  border-radius:12px;
  box-shadow:0 6px 16px rgba(15,23,42,.06);
}
.social-icon-strip-footer .social-icon-link img{
  width:22px;
  height:22px;
}
.share-compose-grid{
  display:grid;
  grid-template-columns:minmax(280px,1.02fr) minmax(320px,.98fr);
  gap:18px;
  align-items:stretch;
}
.share-visual-card,
.share-message-panel,
.share-brand-summary{
  border:1px solid rgba(234,88,12,.18);
  border-radius:24px;
  background:linear-gradient(135deg,#fff7ed 0%,#ffffff 54%,#fffaf5 100%);
  box-shadow:0 16px 36px rgba(154,52,18,.08);
}
.share-visual-card{
  padding:14px;
}
.share-preview-image{
  width:100%;
  border-radius:18px;
  border:1px solid rgba(234,88,12,.18);
  display:block;
  background:#fff7ed;
}
.share-card-caption{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:12px 4px 2px;
  color:#7c2d12;
  font-size:13px;
}
.share-card-caption strong{
  color:#111827;
  font-weight:900;
}
.share-message-panel{
  padding:18px;
}
.share-message-panel h2,
.share-icons-heading{
  margin:0 0 6px;
  color:#111827;
  letter-spacing:-.03em;
}
.share-message-textarea{
  min-height:150px;
  margin-top:10px;
  resize:vertical;
}
.share-url-box.compact{
  grid-template-columns:minmax(0,1fr) auto;
  margin:12px 0;
}
.share-message-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:flex-start;
}
.share-brand-summary{
  margin:18px 0;
  padding:16px;
  display:grid;
  grid-template-columns:minmax(210px,330px) minmax(0,1fr);
  gap:18px;
  align-items:center;
}
.share-brand-summary img{
  width:100%;
  max-height:116px;
  object-fit:contain;
}
.share-brand-summary h2{
  margin:0 0 6px;
  font-size:24px;
  color:#111827;
}
.share-brand-summary p{
  color:#7c2d12;
  font-weight:800;
  margin:0 0 8px;
}
.share-icons-heading{
  font-size:18px;
  margin-top:4px;
}
.large-social-icons{
  gap:12px;
  justify-content:flex-start;
}
.large-social-icons .share-btn{
  width:68px;
  height:68px;
  border-radius:22px;
  background:#ffffff;
  border-color:rgba(234,88,12,.18);
  box-shadow:0 12px 28px rgba(17,24,39,.08);
}
.share-btn img{
  width:42px;
  height:42px;
  display:block;
}
.large-social-icons .share-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 34px rgba(17,24,39,.12);
}
.share-btn.copied{
  outline:4px solid rgba(22,163,74,.22);
  border-color:#16a34a!important;
}
.footer-social-label{
  font-size:12px;
  font-weight:900;
  color:#7c2d12;
  text-transform:uppercase;
  letter-spacing:.08em;
}
@media(max-width:1040px){
  .hero-links{
    justify-content:flex-start;
  }
  .social-icon-strip-header{
    width:100%;
    justify-content:flex-start;
    border-left:0;
    padding-left:0;
    margin-top:4px;
  }
}
@media(max-width:900px){
  .share-compose-grid,
  .share-brand-summary{
    grid-template-columns:1fr;
  }
  .share-brand-summary{
    text-align:center;
  }
  .large-social-icons{
    justify-content:center;
  }
}
@media(max-width:620px){
  .social-icon-link{
    width:34px;
    height:34px;
    border-radius:11px;
  }
  .social-icon-link img{
    width:22px;
    height:22px;
  }
  .share-card-caption{
    align-items:flex-start;
    flex-direction:column;
  }
  .share-url-box.compact{
    grid-template-columns:1fr;
  }
  .large-social-icons .share-btn{
    width:58px;
    height:58px;
    border-radius:18px;
  }
  .share-btn img{
    width:36px;
    height:36px;
  }
}

/* v1.31: social-strip placement and share-card refinements */
.hero-links{
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
}
.nav-link-row{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}
.social-icon-strip-header{
  order:0;
  border-left:0;
  padding-left:0;
  margin-left:0;
  margin-bottom:2px;
}
.social-icon-strip-footer{
  margin:8px 0 10px;
}
.footer-links{
  margin-top:8px;
}
.share-preview-image{
  aspect-ratio:1200 / 630;
  object-fit:contain;
}
.share-message-textarea{
  line-height:1.55;
  overflow:auto;
}
.share-hint{
  max-width:920px;
}
@media(max-width:1040px){
  .hero-links{
    align-items:flex-start;
  }
  .nav-link-row{
    justify-content:flex-start;
  }
  .social-icon-strip-header{
    width:100%;
  }
}
@media(max-width:620px){
  .nav-link-row{
    gap:6px;
  }
  .share-message-actions{
    justify-content:center;
  }
}

/* v1.31: concise social sharing to avoid repeated preview text */
.share-message-textarea.compact-message{
  min-height:92px;
  max-height:150px;
  font-size:15px;
  line-height:1.45;
}
.share-preview-note{
  margin:12px 0 4px;
  padding:12px 14px;
  border:1px solid rgba(234,88,12,.18);
  border-radius:16px;
  background:rgba(255,247,237,.72);
  color:#7c2d12;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.share-preview-note strong{
  color:#111827;
  font-size:13px;
}
.share-preview-note span{
  font-size:14px;
  line-height:1.45;
}
.share-hint.tight-hint{
  margin-top:10px!important;
  max-width:720px;
}


/* v1.31 usage dashboard */
.usage-admin-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:16px}.usage-actions{display:flex;gap:8px;flex-wrap:wrap}.metric-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}.metric-card{border:1px solid rgba(234,88,12,.22);background:linear-gradient(180deg,#fffaf3,#fff);border-radius:18px;padding:14px 16px;box-shadow:0 8px 24px rgba(124,45,18,.06)}.metric-card span{display:block;color:#7c2d12;font-size:.82rem;font-weight:700;margin-bottom:6px}.metric-card strong{font-size:1.7rem;color:#071b46}.table-wrap{overflow:auto}.usage-table{width:100%;border-collapse:collapse;font-size:.92rem}.usage-table th,.usage-table td{padding:10px 12px;border-bottom:1px solid rgba(234,88,12,.14);text-align:left;vertical-align:top}.usage-table th{color:#7c2d12;background:#fff7ed;font-weight:800}.usage-two-col{display:grid;grid-template-columns:1fr 1fr;gap:18px}.usage-page-cell{max-width:360px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media(max-width:900px){.usage-two-col{grid-template-columns:1fr}.usage-admin-bar{align-items:flex-start}.usage-actions{width:100%}}

/* v1.35: source choice for partial matches and edited reference visibility */
.mobile-batch-toggle{
  display:none;
  width:100%;
  min-height:44px;
  border:1px solid rgba(234,88,12,.28);
  border-radius:16px;
  background:linear-gradient(180deg,#fffaf5,#fff7ed);
  color:#7c2d12;
  font-weight:900;
  text-align:left;
  padding:10px 14px;
  box-shadow:0 8px 20px rgba(124,45,18,.06);
}
.mobile-batch-toggle:hover{
  border-color:#f97316;
  background:#fff3e5;
}
@media(max-width:760px){
  .shell{
    width:calc(100% - 18px);
    margin-top:10px;
  }
  .hero-actions,
  #settingsToggle,
  #settingsPanel{
    display:none!important;
  }
  .brand-hero{
    padding:10px 12px 12px;
    margin-bottom:10px;
  }
  .brand-logo{
    max-height:92px;
    margin:-5px 0 -3px;
  }
  .brand-subtitle{
    font-size:12px;
    line-height:1.35;
    margin-top:2px;
  }
  .layout,
  .layout.review-mode,
  .layout.start-mode{
    display:grid;
    grid-template-columns:1fr!important;
    gap:12px;
  }
  .work-area,
  .layout.review-mode .work-area{
    display:grid;
    grid-template-columns:1fr;
    gap:12px;
  }
  .card,
  .toolbar-card,
  .review-card,
  .output-card,
  .side-card{
    width:100%;
    max-width:100%;
    padding:14px;
    border-radius:18px;
  }
  .mobile-batch-toggle{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin:0;
  }
  .layout.start-mode .mobile-batch-toggle{
    display:none;
  }
  .layout.review-mode .side-card{
    order:0;
    padding:10px;
  }
  .layout.review-mode .side-card.batch-collapsed .section-title,
  .layout.review-mode .side-card.batch-collapsed .mobile-batch-content{
    display:none!important;
  }
  .layout.review-mode .side-card:not(.batch-collapsed) .mobile-batch-content{
    display:block;
    margin-top:10px;
  }
  .toolbar-card{
    align-items:stretch;
  }
  .toolbar-card > div:first-child{
    width:100%;
  }
  .toolbar-actions{
    display:none!important;
  }
  .review-title.controls-only,
  .review-title.controls-only .review-title-actions{
    display:block;
    width:100%;
  }
  .bulk-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    width:100%;
    justify-content:stretch;
  }
  .bulk-actions .btn{
    width:100%;
    min-height:40px;
    padding:9px 10px;
  }
  .show-menu{
    width:100%;
    margin-top:8px;
  }
  .show-trigger{
    width:100%;
  }
  .validation-column-head{
    display:none!important;
  }
  .ref-head{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
    padding:12px 12px 14px!important;
  }
  .ref-select,
  .ref-status-block,
  .ref-title,
  .ref-actions{
    grid-column:1/-1!important;
    grid-row:auto!important;
    width:100%;
    padding-left:0!important;
  }
  .ref-select{
    justify-content:flex-start;
  }
  .ref-status-block{
    align-items:flex-start;
  }
  .score-row{
    width:100%;
    max-width:190px;
  }
  .ref-snippet{
    font-size:13px;
    line-height:1.5;
  }
  .ref-actions{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    justify-content:stretch;
  }
  .ref-actions .btn{
    width:100%;
    justify-content:center;
    min-height:42px;
  }
  .ref-actions .btn.action-compact{
    padding:9px 8px;
    border-radius:12px;
    gap:0;
  }
  .ref-actions .btn.action-compact .action-label{
    display:none;
  }
  .ref-actions .btn.action-compact .action-icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:17px;
    font-weight:900;
    line-height:1;
  }
  .source-choice{
    width:100%;
    justify-content:center;
    border-radius:12px;
  }
  .ref-body,
  .detail-grid,
  .compare-body,
  .share-compose-grid,
  .usage-two-col{
    display:grid!important;
    grid-template-columns:1fr!important;
  }
  .section-title,
  .toolbar-card,
  .output-card .section-title{
    flex-direction:column!important;
    align-items:stretch!important;
  }
  .format-controls{
    display:grid;
    grid-template-columns:1fr;
    width:100%;
    gap:8px;
    justify-content:stretch;
  }
  .format-controls select,
  .format-controls .btn{
    width:100%;
  }
  .output-card textarea{
    min-height:160px;
  }
  .button-row{
    width:100%;
    justify-content:center;
  }
  .button-row .btn,
  .button-row a.btn{
    width:100%;
    justify-content:center;
  }
  .batch-list{
    max-height:210px;
  }
}

.view-filter{display:flex;align-items:center;gap:8px;justify-content:flex-start;min-width:220px}
.view-filter label{font-size:12px;font-weight:900;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
.view-filter select{min-height:40px;border:1px solid var(--line);border-radius:12px;background:#fff;padding:8px 32px 8px 11px;font-weight:800;color:var(--text)}
@media(max-width:760px){.view-filter{width:100%;min-width:0;justify-content:stretch}.view-filter select{width:100%}}

/* v1.37: submitted-reference selection for review-required rows */
.original-source-choice{border-color:#fed7aa;background:#fff7ed;color:#9a3412;}
.original-source-choice.selected{border-color:#fb923c;background:#ffedd5;box-shadow:0 0 0 3px rgba(251,146,60,.18);}

/* v1.38: inline helper for filtered empty view */
.link-button{border:0;background:none;color:#c2410c;font-weight:900;text-decoration:underline;cursor:pointer;padding:0 2px;font:inherit;}
.link-button:hover{color:#9a3412;}
