.project-reference-panel #projectMatchStart.control-button { width:100%; justify-content:center; margin-top:8px; border-color:#d8ab00; background:#fff3bc; }
.project-reference-panel #projectAutoStart.control-button { width:100%; justify-content:center; margin-top:8px; background:#ffd447; border-color:#c9a011; }
.project-reference-panel #projectMatchStart.control-button { background:#fff; border-color:#d5d9de; }
.project-reference-panel #projectReferenceAnalogue.control-button { width:100%; justify-content:center; margin-top:8px; background:#ffd447; border-color:#c9a011; }
.project-reference-panel #projectAutoStart.control-button { background:#fff; border-color:#d5d9de; }
.project-reference-panel #projectAutoCancel.control-button { width:100%; justify-content:center; margin-top:5px; }
#projectAutoStatus { margin:8px 0 0; font-size:14px; line-height:1.4; overflow-wrap:anywhere; }
#projectAutoStatus.is-error { color:#a42925; }
#projectAutoProgress { display:block; width:100%; height:5px; margin:7px 0 0; accent-color:#bc9200; }
#projectAutoProgress[hidden] { display:none; }
.project-match-source { margin:0 0 9px; color:#616b75; font-size:14px; line-height:1.4; overflow-wrap:anywhere; }
.project-match-composition { margin:12px 0; padding:12px 14px; border:1px solid #d5d9de; border-radius:8px; background:#f8fafb; font-size:14px; line-height:1.5; }
.project-match-composition[hidden] { display:none; }
.project-match-composition summary { cursor:pointer; font-weight:600; }
.project-match-composition p { margin:8px 0; }
.project-match-composition ul { padding-left:20px; }
.project-reference-panel #projectAutoLabels.control-button { width:100%; justify-content:center; margin-top:5px; }
.project-match-dialog { width:min(1100px,calc(100vw - 24px)); max-width:none; }
.project-match-dialog > .dialog-card { padding:16px; max-height:90vh; overflow:auto; }
.project-match-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.project-match-heading h2 { margin:0; font-size:20px; line-height:1.3; }
.project-match-intro { display:grid; grid-template-columns:160px minmax(0,1fr); align-items:start; gap:16px; margin:14px 0; }
.project-match-intro.without-reference { grid-template-columns:minmax(0,1fr); }
.project-match-intro #projectMatchPreview[hidden] { display:none; }
.project-match-intro #projectMatchPreview.control-button { position:relative; display:block; width:160px; padding:0; border:1px solid #dedede; border-radius:4px; background:#fff; overflow:hidden; }
#projectMatchPreview > img { display:block; width:100%; max-height:180px; object-fit:contain; }
#projectMatchPreview > .control-button-icon { position:absolute; right:4px; bottom:4px; width:25px; height:25px; padding:3px; border-radius:4px; background:#fff; }
.project-match-intro p { margin:0 0 10px; font-size:14px; line-height:1.5; }
.project-match-preferences { display:flex; flex-wrap:wrap; gap:10px; }
.project-match-dialog label { font-size:14px; line-height:1.3; }
.project-match-dialog select, .project-match-dialog input[type="number"] { display:block; width:100%; min-width:0; min-height:36px; margin-top:5px; padding:6px 8px; border:1px solid #bac2ca; border-radius:5px; background:#fff; color:var(--ink); font:inherit; }
.project-match-preferences > label { flex:1 1 180px; }
.project-match-preferences > label[hidden] { display:none; }
.project-match-intro .project-match-color-note { margin:8px 0 0; color:#616b75; font-size:12px; }
.project-match-row { min-width:0; position:relative; margin:0 0 12px; padding:10px; border:1px solid #d5d9de; border-radius:6px; background:#fafafa; }
.project-match-row legend { padding:0 6px; font-size:14px; font-weight:700; }
.project-match-remove { position:absolute; right:5px; top:-17px; }
.project-match-row.has-problem { border:2px solid #b73532; background:#fff6f5; }
.project-match-row.has-problem legend { color:#972a27; }
.project-match-problem { margin:0 0 10px; color:#972a27; font-size:14px; font-weight:600; }
.project-match-problem[hidden], .project-match-problems[hidden] { display:none; }
.project-match-problems { margin:12px 0 18px; padding:12px; border:1px solid #b73532; border-radius:6px; background:#fff6f5; color:#972a27; font-size:14px; }
.project-match-problems p { margin:5px 0 9px; }
.project-match-problems > div { display:flex; flex-wrap:wrap; gap:8px; }
.project-match-problems button { padding:7px 10px; border:1px solid #c96964; border-radius:5px; background:#fff; color:#972a27; text-align:left; font:inherit; cursor:pointer; }
.project-match-problems button small { display:block; margin-top:4px; }
.project-match-problems button:hover { background:#fde9e7; }
.project-match-fields { display:grid; grid-template-columns:minmax(180px,2fr) repeat(4,minmax(75px,1fr)); gap:10px; }
.project-match-fields [hidden] { display:none!important; }
.project-match-results { display:grid; gap:7px; margin-top:10px; }
.project-match-results:empty { display:none; }
.project-match-candidate { display:grid; grid-template-columns:18px 58px minmax(0,1fr) auto; align-items:center; gap:9px; padding:9px; border:1px solid #d5d9de; border-radius:5px; background:#fff; cursor:pointer; }
.project-match-candidate:has(input:checked) { border-color:#c39b00; background:#fff9df; box-shadow:inset 3px 0 #e4b400; }
.project-match-candidate img { width:58px; height:66px; object-fit:contain; }
.project-match-candidate input { margin:0; accent-color:#9b7800; }
.project-match-description { display:grid; gap:3px; min-width:0; overflow-wrap:anywhere; }
.project-match-description > span:not(.project-match-badge) { line-height:1.4; }
.project-match-description small { color:#616b75; font-size:12px; line-height:1.4; }
.project-match-badge { width:fit-content; color:#765b00; font-size:12px; font-weight:700; }
.project-match-candidate.is-exact .project-match-badge { color:#326652; }
.project-match-description .project-match-difference { color:#8a4e12; }
.project-match-price { max-width:115px; text-align:right; font-size:14px; }
.project-match-empty { margin:0; padding:8px; font-size:14px; }
.project-match-actions { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0; }
.project-match-footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin-top:14px; padding-top:12px; border-top:1px solid #dedede; }
.project-match-footer output { font-size:16px; font-weight:700; }
#projectMatchStatus { min-height:20px; margin:8px 0 0; color:#616b75; font-size:14px; line-height:1.4; }
#projectMatchStatus.is-error { color:#a42925; }
.project-match-note { margin:9px 0 0; font-size:12px; color:#616b75; line-height:1.4; }
.width-analogue-dialog { width:min(950px,calc(100vw - 24px)); }
.width-analogue-intro { margin:12px 0; font-size:14px; line-height:1.5; }
.width-analogue-fields { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.width-analogue-basis { display:flex; align-items:center; gap:10px; margin-top:10px; }
.width-analogue-basis[hidden] { display:none; }
.width-analogue-basis select { width:auto; max-width:100%; margin-top:0; }
.width-analogue-composition { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:12px 0; }
.width-analogue-composition label { display:flex; align-items:center; gap:5px; }
.width-analogue-composition input { margin:0; accent-color:#a48100; }
.width-analogue-composition button { margin-left:auto; }
#projectWidthStatus { margin:10px 0; color:#616b75; font-size:14px; line-height:1.4; }
#projectWidthStatus.is-error { color:#a42925; }
#projectWidthResults { display:grid; gap:12px; }
.width-analogue-card { padding:12px; border:1px solid #d5d9de; border-radius:6px; background:#fafafa; }
.width-analogue-card > header { display:flex; flex-wrap:wrap; align-items:start; justify-content:space-between; gap:10px; }
.width-analogue-card h3 { margin:0; font-size:16px; }
.width-analogue-card header p { margin:4px 0 0; font-size:13px; color:#616b75; }
.width-analogue-card header > strong { color:var(--ink); font-size:18px; }
.width-analogue-preview { margin:12px 0 8px; padding:8px 12px; border:1px solid #e4e6e8; border-radius:4px; background:#fff; }
.width-analogue-strip { position:relative; height:83px; border-bottom:1px solid #dfe3e6; margin-bottom:4px; }
.width-analogue-module { position:absolute; bottom:0; display:flex; flex-direction:column; height:100%; align-items:center; justify-content:end; padding:0 1px; box-sizing:border-box; }
.width-analogue-module img { display:block; width:100%; height:64px; object-fit:contain; }
.width-analogue-module small { font-size:11px; line-height:17px; font-weight:600; }
.width-analogue-module.is-retained { opacity:.5; outline:1px dashed #bbc1c6; }
.width-analogue-dimensions { margin:7px 0; font-size:13px; line-height:1.5; }
.width-analogue-hint { margin:6px 0; font-size:13px; color:#765b00; }
.width-analogue-card details { font-size:13px; line-height:1.5; }
.width-analogue-card summary { cursor:pointer; font-weight:600; }
.width-analogue-card ul { margin:8px 0; padding-left:18px; }
.width-analogue-card li { margin:5px 0; overflow-wrap:anywhere; }
.width-analogue-actions { display:flex; flex-wrap:wrap; justify-content:end; gap:8px; margin-top:10px; }
@media (max-width:620px) {
  .width-analogue-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .width-analogue-composition { gap:10px; }
  .width-analogue-composition button { margin-left:0; }
  .width-analogue-preview { padding:6px; }
  .width-analogue-module small { font-size:10px; }
}
@media (max-width:760px) {
  .project-match-fields { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .project-match-role { grid-column:1 / -1; }
  .project-match-candidate { grid-template-columns:18px 48px minmax(0,1fr); gap:7px; }
  .project-match-candidate img { width:48px; height:58px; }
  .project-match-price { grid-column:3; justify-self:start; max-width:none; text-align:left; }
}
@media (max-width:450px) {
  .project-match-intro { grid-template-columns:minmax(0,1fr); gap:8px; }
  .project-match-intro #projectMatchPreview.control-button { width:100%; }
  #projectMatchPreview > img { max-height:130px; }
  .project-match-dialog > .dialog-card { padding:12px; }
  .project-match-heading h2 { font-size:18px; }
  .project-match-heading { align-items:start; }
  .project-match-footer .primary { width:100%; }
}
