/* Fullscreen rule editor. Batch scoring retains the existing scoring-dialog layout. */
.rule-editor-shell {
  --editor-bg: #f5f7fa;
  --editor-muted: #667085;
  --editor-accent: #2563eb;
  --editor-accent-soft: #edf3ff;
  --editor-border: #e3e8ef;
  --editor-success: #067647;
  --editor-error: #b42318;
  --editor-field-height: 40px;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  max-width: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--editor-bg);
  box-shadow: none;
  font-size: 14px;
}
.rule-editor-shell *, .rule-editor-shell *::before, .rule-editor-shell *::after { box-sizing: border-box; }
.rule-editor-shell #scoringRuleForm { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.rule-editor-shell #ruleEditorFields { display: grid; grid-template-rows: minmax(0, 1fr) auto; flex: 1; min-height: 0; margin: 0; gap: 0; }
.rule-editor-shell h2, .rule-editor-shell h3, .rule-editor-shell p { margin: 0; }
.rule-editor-shell h2 { font-size: 20px; line-height: 1.4; letter-spacing: -.3px; }
.rule-editor-shell h3 { font-size: 15px; font-weight: 650; line-height: 1.5; }
.rule-editor-shell output { padding: 0; }
.rule-editor-shell .rule-editor-topbar { display: flex; align-items: center; gap: 16px; padding: 14px 24px; min-height: 76px; background: white; border-bottom: 1px solid var(--editor-border); }
.rule-editor-shell .rule-editor-back { width: 44px; height: 44px; flex: none; border: 1px solid var(--editor-border); border-radius: 8px; font-size: 20px; }
.rule-editor-shell .rule-editor-title-group { min-width: 0; }
.rule-editor-shell .rule-editor-title-group p { font-size: 12px; color: var(--editor-muted); margin-top: 3px; }
.rule-editor-shell .rule-version-badge { padding: 5px 10px; border-radius: 6px; background: var(--editor-accent-soft); color: #1d4ed8; font-size: 12px; margin-left: auto; }
.rule-editor-shell .rule-dirty-state { color: var(--editor-muted); font-size: 12px; white-space: nowrap; }
.rule-editor-shell .rule-dirty-state.is-dirty { color: #9a6700; }
.rule-editor-shell .rule-dirty-state::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: middle; }
.rule-editor-shell .rule-editor-layout { display: grid; grid-template-columns: 176px minmax(0, 1fr) 272px; min-height: 0; overflow: hidden; }
.rule-editor-shell .rule-editor-nav { padding: 24px 12px; border-right: 1px solid var(--editor-border); background: #fbfcfe; min-width: 0; overflow-y: auto; }
.rule-editor-shell .rule-nav-eyebrow { color: var(--editor-muted); font-size: 12px; padding: 0 12px 14px; }
.rule-editor-shell .rule-editor-nav > button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; margin-bottom: 6px; padding: 10px 12px; color: #475467; background: transparent; border: 0; border-radius: 7px; text-align: left; cursor: pointer; font: inherit; font-size: 13px; transition: background .15s, color .15s; }
.rule-editor-shell .rule-editor-nav > button:hover { background: #eef1f6; }
.rule-editor-shell .rule-editor-nav > button[aria-current="location"] { background: var(--editor-accent-soft); color: #1d4ed8; font-weight: 600; }
.rule-editor-shell .rule-nav-number { font-size: 11px; font-variant-numeric: tabular-nums; opacity: .8; }
.rule-editor-shell .rule-nav-note { margin: 28px 12px 0; padding-top: 18px; border-top: 1px solid var(--editor-border); color: var(--editor-muted); font-size: 12px; line-height: 1.7; }
.rule-editor-shell .rule-nav-note strong { display: block; color: #475467; font-weight: 500; margin-bottom: 6px; }
.rule-editor-shell .rule-editor-main { overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 20px 24px 24px; min-width: 0; min-height: 0; }
.rule-editor-shell .rule-editor-card { background: white; border: 1px solid var(--editor-border); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; scroll-margin-top: 20px; }
.rule-editor-shell .rule-editor-card:last-child { margin-bottom: 0; }
.rule-editor-shell .rule-card-heading, .rule-editor-shell .rule-card-heading > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.rule-editor-shell .rule-card-heading { justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.rule-editor-shell .rule-section-index { color: #98a2b3; font-size: 11px; font-variant-numeric: tabular-nums; }
.rule-editor-shell .rule-card-caption { color: var(--editor-muted); font-size: 12px; }
.rule-editor-shell label { gap: 5px; font-size: 12px; line-height: 1.5; color: #475467; }
.rule-editor-shell input, .rule-editor-shell select, .rule-editor-shell textarea, .rule-editor-shell .smart-select-trigger { min-height: var(--editor-field-height); border-color: #d5dce6; border-radius: 6px; font-size: 13px; padding: 8px 10px; color: var(--ink); line-height: 1.5; }
.rule-editor-shell .smart-select-trigger { padding-right: 32px; }
.rule-editor-shell .smart-select { min-width: 0; }
.rule-editor-shell textarea { min-height: var(--editor-field-height); resize: vertical; }
.rule-editor-shell :is(input, textarea, select, button, summary):focus-visible { outline: 2px solid var(--editor-accent); outline-offset: 2px; }
.rule-editor-shell :is(input, textarea)[aria-invalid="true"] { border-color: var(--editor-error); }
.rule-editor-shell button:disabled { cursor: not-allowed; }
.rule-editor-shell .rule-basic-grid { display: grid; grid-template-columns: minmax(160px, .75fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }
.rule-editor-shell #rubricJobDescription { min-height: 60px; }
.rule-editor-shell .rule-helper { color: var(--editor-muted); font-size: 12px; line-height: 1.65; }
.rule-editor-shell .rule-threshold-fields { grid-template-columns: minmax(0, 1.7fr) repeat(2, minmax(0, 1fr)); gap: 12px; }
.rule-editor-shell .scoring-fields { gap: 12px; }
.rule-editor-shell #ruleSelectionHint { margin: 8px 0 12px; }
.rule-editor-shell .rule-text-button { min-height: 32px; border: 0; border-radius: 6px; background: transparent; color: var(--editor-accent); padding: 4px 8px; cursor: pointer; font: inherit; font-size: 12px; }
.rule-editor-shell .rule-text-button:hover { background: var(--editor-accent-soft); }
.rule-editor-shell .rule-quick-start { margin-top: 14px; border-top: 1px solid var(--editor-border); }
.rule-editor-shell summary { list-style: none; cursor: pointer; }
.rule-editor-shell summary::-webkit-details-marker { display: none; }
.rule-editor-shell .rule-quick-start > summary { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding-top: 8px; font-size: 12px; font-weight: 500; color: #475467; }
.rule-editor-shell summary small { font-weight: 400; font-size: 12px; color: var(--editor-muted); margin-left: 8px; }
.rule-editor-shell .rule-disclosure-chevron { color: var(--editor-muted); font-size: 18px; transition: transform .15s; }
.rule-editor-shell details[open] > summary > .rule-disclosure-chevron { transform: rotate(180deg); }
.rule-editor-shell .rule-quick-start-body { display: grid; gap: 12px; padding-top: 12px; }
.rule-editor-shell .rule-template-grid { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.rule-editor-shell .rule-template-trigger, .rule-editor-shell .rule-template-grid > .button { min-height: var(--editor-field-height); font-size: 12px; padding: 8px 10px; }
.rule-editor-shell .rule-template-panel { max-height: 320px; overflow-y: auto; }
.rule-editor-shell .rule-template-label { font-size: 12px; color: #475467; }
.rule-editor-shell .rule-count-badge { border-radius: 5px; background: #f2f4f7; padding: 1px 6px; color: #475467; font-size: 11px; white-space: nowrap; }
.rule-editor-shell #rubricWeightTotal { font-size: 12px; text-align: right; }
.rule-editor-shell .scoring-criterion { padding: 12px; margin-bottom: 10px; border: 1px solid var(--editor-border); border-radius: 7px; background: #fcfdff; }
.rule-editor-shell .scoring-criterion-header { grid-template-columns: minmax(0, 1fr) 108px 78px 32px; gap: 10px; margin-bottom: 8px; }
.rule-editor-shell .scoring-criterion-header .icon-button { width: 32px; height: 40px; border: 0; color: var(--editor-muted); }
.rule-editor-shell .scoring-criterion-header .icon-button:hover { background: #fff0ee; color: var(--editor-error); }
.rule-editor-shell .rule-criterion-description { grid-template-columns: 60px minmax(0, 1fr); align-items: center; padding-top: 0; }
.rule-editor-shell .rule-criterion-description textarea { min-height: 34px; padding: 6px 8px; }
.rule-editor-shell [data-terms-label] { margin-top: 8px; grid-template-columns: 60px minmax(0, 1fr); align-items: center; }
.rule-editor-shell .rule-add-button { width: 100%; min-height: 38px; padding: 8px 12px; border: 1px dashed #cbd5e1; border-radius: 6px; background: white; color: var(--editor-accent); font: inherit; font-size: 12px; cursor: pointer; }
.rule-editor-shell .rule-add-button:hover { border-color: var(--editor-accent); background: #f8faff; }
.rule-editor-shell .rule-channels-details > summary { margin: 0; min-height: 28px; }
.rule-editor-shell .rule-channels-details[open] > summary { margin-bottom: 12px; }
.rule-editor-shell .rule-empty-hint { margin: 12px 0; padding: 16px; border-radius: 6px; background: #f8fafc; color: var(--editor-muted); font-size: 12px; text-align: center; }
.rule-editor-shell .special-channel-row { padding: 12px; gap: 10px; margin: 12px 0; }
.rule-editor-shell .special-channel-row .scoring-criterion-header { grid-template-columns: minmax(0, 1fr) 110px 70px 58px 32px; }
.rule-editor-shell .channel-field-grid { grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr); gap: 10px; }
.rule-editor-shell .channel-enabled { font-size: 11px; }
.rule-editor-shell .rule-editor-summary { gap: 10px; }
.rule-editor-shell .rule-editor-summary > .rule-add-button { flex: 1; }
.rule-editor-shell #specialChannelSummary { color: var(--editor-muted); font-size: 11px; }
.rule-editor-shell .rule-editor-sidebar { min-width: 0; min-height: 0; overflow-y: auto; padding: 22px 20px; background: #fbfcfe; border-left: 1px solid var(--editor-border); }
.rule-editor-shell .rule-summary-panel > summary { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 650; min-height: 30px; }
.rule-editor-shell .rule-summary-panel > summary .rule-disclosure-chevron { display: none; }
.rule-editor-shell .rule-summary-body { padding-top: 22px; }
.rule-editor-shell .rule-summary-eyebrow { font-size: 11px; color: var(--editor-muted); }
.rule-editor-shell .rule-summary-job { display: block; font-size: 18px; margin: 5px 0 8px; overflow-wrap: anywhere; line-height: 1.5; }
.rule-editor-shell .rule-summary-list { display: grid; gap: 16px; margin: 22px 0; padding: 18px 0; border-top: 1px solid var(--editor-border); border-bottom: 1px solid var(--editor-border); font-size: 12px; }
.rule-editor-shell .rule-summary-list > div { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.rule-editor-shell dt { color: var(--editor-muted); flex: none; }
.rule-editor-shell dd { margin: 0; color: #344054; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.rule-editor-shell .rule-summary-weight > div { display: flex; justify-content: space-between; font-size: 12px; }
.rule-editor-shell .rule-summary-weight strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.rule-editor-shell progress { display: block; width: 100%; height: 5px; margin: 10px 0 8px; border: 0; border-radius: 3px; background: #e4e7ec; accent-color: var(--editor-accent); }
.rule-editor-shell progress::-webkit-progress-bar { background: #e4e7ec; border-radius: 3px; }
.rule-editor-shell progress::-webkit-progress-value { background: var(--editor-accent); border-radius: 3px; }
.rule-editor-shell progress::-moz-progress-bar { background: var(--editor-accent); border-radius: 3px; }
.rule-editor-shell .rule-validation-state { margin-top: 20px; padding: 10px 12px; border-radius: 6px; background: #ecfdf3; color: var(--editor-success); font-size: 12px; line-height: 1.6; }
.rule-editor-shell .rule-validation-state.invalid { color: var(--editor-error); background: #fff4ed; }
.rule-editor-shell .rule-summary-note { font-size: 12px; color: var(--editor-muted); line-height: 1.75; margin-top: 16px; }
.rule-editor-shell .rule-editor-sticky-footer { margin: 0; padding: 14px 24px; min-height: 74px; background: white; border-top: 1px solid var(--editor-border); flex-wrap: nowrap; gap: 16px; }
.rule-editor-shell .rule-footer-status { min-width: 0; flex: 1; font-size: 12px; display: grid; gap: 4px; }
.rule-editor-shell #ruleFooterValidity { color: var(--editor-success); }
.rule-editor-shell #ruleFooterValidity.invalid { color: var(--editor-error); }
.rule-editor-shell #rubricEditorStatus:empty { display: none; }
.rule-editor-shell .rule-footer-actions { display: flex; gap: 10px; flex-shrink: 0; }
.rule-editor-shell .rule-footer-actions .button { min-height: 42px; font-size: 13px; border-radius: 7px; padding: 10px 16px; }
.rule-editor-shell .rule-editor-discard { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fffaeb; padding: 14px 24px; border-bottom: 1px solid #fedf89; font-size: 13px; }
.rule-editor-shell .rule-editor-discard p { color: #93370d; font-size: 12px; margin: 4px 0 0; }




.rule-editor-shell .rule-field-error { font-size: 12px; color: var(--editor-error); grid-column: 1 / -1; }

@media (max-width: 1200px) {
  .rule-editor-shell .rule-editor-layout { grid-template-columns: 152px minmax(0, 1fr) 236px; }
  .rule-editor-shell .rule-editor-main { padding: 16px; }
  .rule-editor-shell .rule-editor-sidebar { padding: 18px 16px; }
  .rule-editor-shell .rule-card-caption { display: none; }
  .rule-editor-shell .rule-editor-card { padding: 14px; }
}

@media (min-width: 1001px) {
  .rule-editor-shell .rule-editor-topbar { min-height: 68px; padding-top: 10px; padding-bottom: 10px; }
  .rule-editor-shell .rule-editor-main { padding-top: 16px; }
  .rule-editor-shell .rule-editor-card { padding: 14px 16px; margin-bottom: 12px; }
  .rule-editor-shell .rule-card-heading { margin-bottom: 10px; }
  .rule-editor-shell #rubricJobDescription { min-height: 48px; height: 48px; }
  .rule-editor-shell .rule-quick-start { margin-top: 10px; }
  .rule-editor-shell .rule-quick-start > summary { min-height: 32px; padding-top: 6px; }
  .rule-editor-shell #ruleSelectionHint { margin: 6px 0 8px; }
  .rule-editor-shell .scoring-criterion { padding: 10px; margin-bottom: 8px; }
  .rule-editor-shell .rule-editor-sticky-footer { min-height: 66px; padding-top: 10px; padding-bottom: 10px; }
}

@media (min-width: 1101px) {
  .rule-editor-shell .rule-editor-main { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 12px; align-content: start; }
  .rule-editor-shell .rule-editor-card { margin: 0; min-width: 0; }
  .rule-editor-shell #ruleCriteriaSection, .rule-editor-shell #ruleChannelsSection { grid-column: 1 / -1; }
  .rule-editor-shell .rule-basic-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .rule-editor-shell .rule-card-caption { display: none; }
  .rule-editor-shell .rule-template-grid { grid-template-columns: minmax(0, 1fr) auto; }
  .rule-editor-shell .rule-template-picker { grid-column: 1 / -1; }
  .rule-editor-shell #generateRubricDraft { grid-column: auto; }
  .rule-editor-shell .rule-template-grid .button { min-width: 0; padding: 8px; }
  .rule-editor-shell .rule-threshold-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rule-editor-shell .rule-threshold-fields > label:first-child { grid-column: 1 / -1; }
  .rule-editor-shell .rule-summary-list { gap: 14px; }
}

@media (max-width: 1000px) {
  .rule-editor-shell .rule-editor-layout { grid-template-columns: minmax(0, 1fr) 236px; grid-template-rows: auto minmax(0, 1fr); }
  .rule-editor-shell .rule-editor-nav { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-right: 0; border-bottom: 1px solid var(--editor-border); overflow-x: auto; }
  .rule-editor-shell .rule-editor-nav > button { width: auto; margin: 0; white-space: nowrap; }
  .rule-editor-shell .rule-nav-eyebrow, .rule-editor-shell .rule-nav-note { display: none; }
  .rule-editor-shell .rule-template-grid { grid-template-columns: minmax(0, 1fr) auto; }
  .rule-editor-shell #generateRubricDraft { grid-column: 1 / -1; }
  .rule-editor-shell .special-channel-row .scoring-criterion-header { grid-template-columns: minmax(0, 1fr) 100px 60px 32px; }
  .rule-editor-shell .special-channel-row .channel-enabled { grid-column: 1; grid-row: 2; }
  .rule-editor-shell .special-channel-row [data-remove-channel] { grid-column: 4; grid-row: 1; }
}

@media (max-width: 700px) {
  .rule-editor-shell .rule-editor-topbar { padding: 10px 12px; gap: 10px; flex-wrap: wrap; }
  .rule-editor-shell h2 { font-size: 17px; }
  .rule-editor-shell .rule-editor-title-group { flex: 1; }
  .rule-editor-shell .rule-editor-title-group p { display: none; }
  .rule-editor-shell .rule-version-badge { margin-left: 54px; }
  .rule-editor-shell .rule-dirty-state { margin-left: auto; }
  .rule-editor-shell .rule-editor-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  .rule-editor-shell .rule-editor-nav { grid-row: 1; padding: 6px 8px; }
  .rule-editor-shell .rule-editor-nav > button { font-size: 12px; padding: 8px; gap: 6px; }
  .rule-editor-shell .rule-editor-sidebar { grid-row: 2; padding: 6px 16px; border-left: 0; border-bottom: 1px solid var(--editor-border); max-height: 32dvh; }
  .rule-editor-shell .rule-summary-panel > summary .rule-disclosure-chevron { display: block; }
  .rule-editor-shell .rule-summary-body { padding-top: 12px; }
  .rule-editor-shell .rule-summary-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; padding: 12px 0; }
  .rule-editor-shell .rule-editor-main { grid-row: 3; padding: 12px; }
  .rule-editor-shell .rule-basic-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .rule-editor-shell .rule-threshold-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-editor-shell .rule-threshold-fields > label:first-child { grid-column: 1 / -1; }
  .rule-editor-shell .scoring-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-editor-shell .scoring-criterion-header { grid-template-columns: minmax(0, 1fr) 72px 32px; }
  .rule-editor-shell .scoring-criterion-header > label:nth-child(2) { grid-column: 1; grid-row: 2; }
  .rule-editor-shell .scoring-criterion-header > label:nth-child(3) { grid-column: 2; grid-row: 1; }
  .rule-editor-shell .scoring-criterion-header > button { grid-column: 3; grid-row: 1; }
  .rule-editor-shell .rule-criterion-description, .rule-editor-shell [data-terms-label] { grid-template-columns: minmax(0, 1fr); }
  .rule-editor-shell .rule-criterion-description { align-items: start; }
  .rule-editor-shell .special-channel-row .scoring-criterion-header { grid-template-columns: minmax(0, 1fr) 72px 32px; }
  .rule-editor-shell .special-channel-row .scoring-criterion-header > label:nth-child(2) { grid-column: 1; grid-row: 2; }
  .rule-editor-shell .special-channel-row .scoring-criterion-header > label:nth-child(3) { grid-column: 2; grid-row: 1; }
  .rule-editor-shell .special-channel-row .scoring-criterion-header > .channel-enabled { grid-column: 2; grid-row: 2; }
  .rule-editor-shell .special-channel-row [data-remove-channel] { grid-column: 3; grid-row: 1; }
  .rule-editor-shell .channel-field-grid { grid-template-columns: minmax(0, 1fr); }
  .rule-editor-shell .rule-editor-sticky-footer { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
  .rule-editor-shell .rule-footer-status { flex-basis: 100%; }
  .rule-editor-shell .rule-footer-actions { width: 100%; gap: 8px; flex-wrap: wrap; }
  .rule-editor-shell .rule-footer-actions .button { flex: 1; min-height: 44px; padding: 10px; }
  .rule-editor-shell .rule-editor-discard { padding: 12px; align-items: start; flex-direction: column; }
  .rule-editor-shell .rule-text-button { min-height: 44px; }
  .rule-editor-shell .scoring-criterion-header .icon-button { height: 44px; }

  .rule-editor-shell { --editor-field-height: 44px; }
  .rule-editor-shell .rule-editor-title-group { flex: 1 1 calc(100% - 54px); }
  .rule-editor-shell h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rule-editor-shell .rule-summary-panel > summary { min-height: 44px; }
  .rule-editor-shell .scoring-criterion-header, .rule-editor-shell .special-channel-row .scoring-criterion-header { grid-template-columns: minmax(0, 1fr) 72px 44px; }
  .rule-editor-shell .scoring-criterion-header .icon-button { width: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .rule-editor-shell *, .rule-editor-shell *::before, .rule-editor-shell *::after { transition: none !important; scroll-behavior: auto !important; }
}

.rule-editor-shell .rule-footer-status [role="status"] { max-height: 4.95em; overflow-y: auto; line-height: 1.65; }

/* Typography and criterion alignment refinement. */
.rule-editor-shell {
  --editor-font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --editor-heading: #1d2939;
  --editor-text: #344054;
  --editor-label: #475467;
  --editor-placeholder: #98a2b3;
  font-family: var(--editor-font-sans);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color: var(--editor-text);
}
.rule-editor-shell .rule-editor-topbar { min-height: 72px; }
.rule-editor-shell .rule-editor-title-group h2 { color: var(--editor-heading); font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.rule-editor-shell .rule-editor-title-group p { color: var(--editor-muted); font-size: 12px; line-height: 1.5; }
.rule-editor-shell .rule-card-heading h3 { color: var(--editor-heading); font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.rule-editor-shell .rule-card-heading { margin-bottom: 16px; }
.rule-editor-shell label { color: var(--editor-label); font-size: 12px; font-weight: 500; line-height: 1.45; }
.rule-editor-shell input, .rule-editor-shell select, .rule-editor-shell textarea, .rule-editor-shell .smart-select-trigger { color: var(--editor-text); font-family: inherit; font-size: 14px; font-weight: 400; }
.rule-editor-shell input::placeholder, .rule-editor-shell textarea::placeholder { color: var(--editor-placeholder); }
.rule-editor-shell .scoring-criterion {
  padding: 14px 16px 16px;
  border-color: #d9e2ec;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .02);
}
.rule-editor-shell .scoring-criterion:focus-within {
  border-color: #b7c9ea;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .06);
}
.rule-editor-shell .criterion-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; margin-bottom: 14px; }
.rule-editor-shell .criterion-heading { display: flex; align-items: center; gap: 9px; min-width: 0; }
.rule-editor-shell .criterion-number { color: #98a2b3; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.rule-editor-shell .criterion-title { min-width: 0; overflow: hidden; color: var(--editor-heading); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.rule-editor-shell .criterion-remove { width: 36px; height: 36px; flex: 0 0 36px; border: 0; border-radius: 7px; color: #98a2b3; font-size: 20px; line-height: 1; }
.rule-editor-shell .criterion-remove:hover { background: #fff1f0; color: var(--editor-error); }
.rule-editor-shell .criterion-fields-grid { display: grid; grid-template-columns: minmax(0, 1fr) 164px 100px; gap: 12px; align-items: start; }
.rule-editor-shell .criterion-fields-grid > label, .rule-editor-shell .rule-criterion-description, .rule-editor-shell .rule-criterion-terms { display: grid; gap: 6px; min-width: 0; }
.rule-editor-shell .criterion-weight-control { position: relative; min-width: 0; }
.rule-editor-shell .criterion-weight-control input { padding-right: 28px; font-variant-numeric: tabular-nums; }
.rule-editor-shell .criterion-weight-control > span { position: absolute; top: 50%; right: 10px; color: var(--editor-muted); font-size: 13px; line-height: 1; pointer-events: none; transform: translateY(-50%); }
.rule-editor-shell .rule-criterion-description, .rule-editor-shell .rule-criterion-terms { margin-top: 12px; }
.rule-editor-shell .rule-criterion-description textarea { min-height: 64px; line-height: 1.6; resize: vertical; }
.rule-editor-shell .rule-criterion-terms input { min-height: 40px; }
.rule-editor-shell .rule-criterion-terms[hidden] { display: none; }
.rule-editor-shell .rule-criterion-description textarea:focus, .rule-editor-shell .rule-criterion-terms input:focus { border-color: #8bb5ff; }
.rule-editor-shell .rule-add-button { min-height: 40px; font-weight: 500; }
.rule-editor-shell .rule-section-index { font-weight: 600; letter-spacing: .04em; }
@media (max-width: 700px) {
  .rule-editor-shell .rule-editor-topbar { min-height: 68px; }
  .rule-editor-shell .rule-editor-title-group h2 { font-size: 17px; }
  .rule-editor-shell .criterion-fields-grid { grid-template-columns: minmax(0, 1fr) 84px; gap: 10px; }
  .rule-editor-shell .criterion-name-field { grid-column: 1 / -1; }
  .rule-editor-shell .criterion-type-field { grid-column: 1; }
  .rule-editor-shell .criterion-weight-field { grid-column: 2; }
  .rule-editor-shell .criterion-title { font-size: 13px; }
  .rule-editor-shell .criterion-remove { width: 40px; height: 40px; flex-basis: 40px; }
}
