html {
  background: #f1f2f6;
}

body {
  margin: 8px;
  padding: 0 0 12px;
  min-height: calc(100vh - 16px);
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 1px 2px rgba(20, 20, 40, 0.06);
  color: #1c1c1e;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Hiragino Sans", "Noto Sans CJK JP", sans-serif;
}

.header {
  background: transparent;
  border: 0;
  margin: 0;
  padding: 13px 18px 8px 20px;
}

.header-brand h3 {
  margin: 0;
  font-family: "Inter", -apple-system, "SF Pro Display", sans-serif;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: #111;
}

.header-version {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ececf0;
  color: #6b6b75;
  font-size: 11px;
  font-weight: 600;
}

#manageRulesBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #eeeef2;
  color: #1c1c1e;
  box-shadow: none;
}

#manageRulesBtn::before,
#manageRulesBtn::after {
  content: none !important;
}

#manageRulesBtn {
  background: #eeeef2 !important;
  border: 0 !important;
  box-shadow: none !important;
  width: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  font-size: 0 !important;
}

#manageRulesBtn svg {
  display: block;
}

#sourceSetupBanner {
  margin: 0 20px 10px !important;
  padding: 9px 14px !important;
  border-radius: 12px !important;
  background: #fff4e0 !important;
  color: #8a5300 !important;
  font-size: 12.5px !important;
  font-weight: 600;
  line-height: 1.5 !important;
}

.flow-steps {
  display: flex;
  align-items: flex-start;
  margin: 10px 22px 17px;
  padding: 0;
  list-style: none;
}

.flow-steps li {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  color: #111;
  position: relative;
}

.flow-steps li > span:last-child {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.flow-steps li small {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: #8e8e98;
}

.flow-steps .blob {
  font-size: 40px;
}

.flow-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 22px;
  left: calc(50% + 42px);
  width: calc(100% - 84px);
  height: 2px;
  border-radius: 2px;
  background: #d9dae3;
}

.blob {
  display: inline-block;
  flex: 0 0 auto;
  font-size: 43px;
  width: 1.15em;
  height: 0.93em;
  position: relative;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  transform: rotate(-4deg);
}

.blob::before,
.blob::after {
  content: "";
  position: absolute;
  top: 0.3em;
  width: 0.12em;
  height: 0.23em;
  border-radius: 0.1em;
  background: #15151a;
  transform: rotate(-9deg);
}

.blob::before {
  left: 0.46em;
}

.blob::after {
  left: 0.72em;
}

.blob-blue { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 80'><path fill='%230e8cfd' d='M16 62C2 56 0 38 12 30 8 14 26 2 42 8 52 -2 72 2 78 16 94 16 102 34 94 46 100 60 88 76 70 72 58 80 34 80 16 62Z'/></svg>"); }
.blob-pink { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 80'><path fill='%23fe41a6' d='M16 62C2 56 0 38 12 30 8 14 26 2 42 8 52 -2 72 2 78 16 94 16 102 34 94 46 100 60 88 76 70 72 58 80 34 80 16 62Z'/></svg>"); }
.blob-green { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 80'><path fill='%2338c962' d='M16 62C2 56 0 38 12 30 8 14 26 2 42 8 52 -2 72 2 78 16 94 16 102 34 94 46 100 60 88 76 70 72 58 80 34 80 16 62Z'/></svg>"); }
.blob-purple { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 80'><path fill='%237a4cf7' d='M16 62C2 56 0 38 12 30 8 14 26 2 42 8 52 -2 72 2 78 16 94 16 102 34 94 46 100 60 88 76 70 72 58 80 34 80 16 62Z'/></svg>"); }

.flow-stack {
  margin: 0;
  padding: 0;
}

.flow-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  column-gap: 9px;
  align-items: center;
  margin: 0 10px 14px;
  padding: 15px 14px 14px;
  border-radius: 14px;
  border: 0;
  box-shadow: none;
  color: #1c1c1e;
}

.flow-card > * {
  grid-column: 1 / -1;
  min-width: 0;
}

.flow-card h2 {
  display: contents;
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: #111;
}

.flow-card h2 .blob {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  font-size: 47px;
}

.flow-card p {
  grid-column: 2;
  margin: -6px 0 12px;
  color: #6c6c78;
  font-size: 12.2px;
  font-weight: 500;
  line-height: 1.5;
}

.flow-card-capture { background: #edf5fe; }
.flow-card-review { background: #fef4f8; }
.flow-card-teach { background: #f6f3fe; }
.flow-card-fill { background: #eefbf4; }

#extractFromPageBtn,
#bulkFillBtn,
#startLearningBtn {
  display: block;
  width: 100%;
  height: 42px;
  min-height: 42px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 42px;
  color: #fff;
  text-align: center;
  box-shadow: none;
}

#extractFromPageBtn::before,
#extractFromPageBtn::after,
#bulkFillBtn::before,
#bulkFillBtn::after,
#startLearningBtn::before,
#startLearningBtn::after {
  content: none;
}

#extractFromPageBtn { background: #1088fd; }
#startLearningBtn { background: #7851ed; }
#bulkFillBtn { background: #12ae6f; }

body #startLearningBtn {
  display: block !important;
  height: 42px;
  min-height: 42px !important;
  padding: 0 16px !important;
  border-radius: 14px !important;
  background: #7851ed !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 42px;
}

body #startLearningBtn::before,
body #startLearningBtn::after {
  content: none !important;
}

.flow-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.flow-chips button {
  width: auto;
  height: 24px;
  min-height: 24px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #e7e5f1;
  color: #4a4a56;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 24px;
  box-shadow: none;
}

body .candidate-lock-panel {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: center;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: none !important;
}

.candidate-lock-panel[data-state="locked"],
.candidate-lock-panel[data-state="warning"],
.candidate-lock-panel[data-state="blocked"] {
  border: 0;
  background: #fff;
}

.candidate-lock-head,
.candidate-lock-title {
  display: contents;
}

.candidate-lock-dot {
  grid-column: 1;
  grid-row: 1 / span 2;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #eeeef2;
  box-shadow: none;
  color: #5c5c68;
}

.candidate-lock-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='8.6' r='3.6' fill='black'/><path d='M4.8 20c0-3.9 3.2-6.2 7.2-6.2s7.2 2.3 7.2 6.2z' fill='black'/></svg>") center / 20px 20px no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='8.6' r='3.6' fill='black'/><path d='M4.8 20c0-3.9 3.2-6.2 7.2-6.2s7.2 2.3 7.2 6.2z' fill='black'/></svg>") center / 20px 20px no-repeat;
}

.candidate-lock-panel[data-state="locked"] .candidate-lock-dot { background: #dff5e7; box-shadow: none; color: #1d9a55; }
.candidate-lock-panel[data-state="warning"] .candidate-lock-dot { background: #ffecd0; box-shadow: none; color: #d27500; }
.candidate-lock-panel[data-state="blocked"] .candidate-lock-dot { background: #ffdede; box-shadow: none; color: #d92d20; }

.candidate-lock-title > span:not(.candidate-lock-dot) {
  grid-column: 2;
  grid-row: 2;
  font-size: 11.5px;
  font-weight: 500;
  color: #8a8a96;
  line-height: 1.4;
}

.candidate-lock-main {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  font-size: 14px;
  font-weight: 800;
  color: #111;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.candidate-lock-toggle::after {
  content: none;
}

body .candidate-lock-toggle,
body .candidate-lock-panel[data-state="off"] .candidate-lock-toggle {
  grid-column: 3;
  grid-row: 1 / span 2;
  width: auto;
  min-width: 0;
  height: 22px;
  min-height: 22px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: #eeeef2;
  box-shadow: none;
  color: #5c5c68;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
}

body .candidate-lock-panel[data-state="off"] .candidate-lock-toggle {
  color: #a0a0aa;
}

.candidate-lock-meta,
.candidate-lock-message {
  grid-column: 2 / -1;
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #8a8a96;
}

.candidate-lock-actions {
  display: block;
  grid-column: 1 / -1;
  margin: 10px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid #efeff3;
}

body .candidate-lock-actions button {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 32px;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  color: #111;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

body .candidate-lock-actions button,
body .candidate-lock-actions button:disabled {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body .candidate-lock-actions button:disabled {
  opacity: 0.6;
}

body .candidate-lock-actions button::before {
  content: "";
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #eeeef2 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12h13M12.5 6l6 6-6 6' fill='none' stroke='%235c5c68' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 20px 20px no-repeat;
}

body .candidate-lock-actions button::after {
  content: "";
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #f1f1f4 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 5.5l6.5 6.5L9 18.5' fill='none' stroke='%235c5c68' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 16px 16px no-repeat;
  box-shadow: none;
}

.candidate-lock-actions button > span {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
}

.candidate-lock-actions button > small {
  grid-column: 2;
  grid-row: 2;
  font-size: 11.5px;
  font-weight: 500;
  color: #8a8a96;
}

.flow-card-review .required-gender-prompt,
.flow-card-review .candidate-attention-prompt,
.flow-card-review .shared-segment-prompt {
  margin: 10px 0 0;
  border-radius: 14px;
}

.flow-card-fill {
  position: relative;
}

.flow-card-fill .site-select-wrapper {
  position: absolute;
  top: 14px;
  right: 14px;
  display: block !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.flow-card-fill .site-select-label {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.flow-card-fill select.site-dropdown {
  display: block;
  width: auto !important;
  max-width: 150px;
  min-height: 28px;
  padding: 0 24px 0 12px;
  border: 0;
  border-radius: 999px;
  background-color: #fff;
  color: #3a3a46;
  font-size: 12px;
  font-weight: 700;
}

.flow-card-fill #activeSiteAutoStatus {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.flow-card-fill .bulk-fill-shell {
  margin: 0;
}

.flow-tools {
  margin: 0 10px 14px;
  padding: 0;
  background: #fff;
  border: 1px solid #e6e7ed;
  border-radius: 14px;
  box-shadow: none;
}

.flow-tools > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  cursor: pointer;
  list-style: none;
}

.flow-tools > summary::-webkit-details-marker { display: none; }

.flow-tools-icon svg {
  width: 20px;
  height: 20px;
}

.flow-tools-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eeeef2;
  color: #4a4a56;
}

.flow-tools-copy {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.flow-tools-copy strong {
  font-size: 15px;
  font-weight: 800;
  color: #111;
  line-height: 1.3;
}

.flow-tools-copy small {
  font-size: 12px;
  font-weight: 500;
  color: #8a8a96;
  line-height: 1.35;
}

.flow-tools-chevron {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-top: 2px solid #9a9aa6;
  border-right: 2px solid #9a9aa6;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.flow-tools[open] .flow-tools-chevron {
  transform: rotate(135deg);
}

.flow-tools[open] > summary {
  border-bottom: 1px solid #efeff3;
}

.flow-tools > :not(summary) {
  margin-left: 14px;
  margin-right: 14px;
}

.flow-tools > summary + * {
  margin-top: 12px;
}

.flow-tools > :last-child {
  margin-bottom: 14px;
}

.flow-tool-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.flow-tool-actions button {
  width: auto;
  margin: 0;
}

body #learningModeOverlay {
  background: rgba(24, 24, 32, 0.45) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  backdrop-filter: blur(4px) !important;
}

body #learningModeOverlay .learning-mode-dialog {
  max-width: 340px !important;
  padding: 22px 18px 18px !important;
  border: 0 !important;
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow: 0 18px 48px rgba(20, 20, 40, 0.28) !important;
}

body #learningModeOverlay .learning-mode-dialog > h3 {
  margin: 0 0 14px !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #111 !important;
}

body #learningModeOverlay .learning-mode-dialog label,
body #learningModeOverlay .learning-mode-dialog select,
body #learningModeOverlay .learning-mode-dialog input[type="text"] {
  font-family: inherit;
}

body #learningModeOverlay .learning-mode-dialog select,
body #learningModeOverlay .learning-mode-dialog input[type="text"] {
  min-height: 38px;
  border: 0 !important;
  border-radius: 10px !important;
  background-color: #f4f4f7 !important;
  color: #111 !important;
}

body #learningModeOverlay #learningStep3 > div:first-child {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #12ae6f !important;
}

body #learningModeOverlay #saveLearnedRuleBtn {
  min-height: 42px;
  border-radius: 10px !important;
  background: #12ae6f !important;
  background-image: none !important;
  box-shadow: none !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

body #learningModeOverlay #cancelLearningBtn {
  min-height: 38px;
  border: 0 !important;
  border-radius: 10px !important;
  background: #f1f1f4 !important;
  color: #44444f !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

body #learningModeOverlay #learningCombinationAddBtn {
  border: 0 !important;
  border-radius: 999px !important;
  background: #e7e5f1 !important;
  color: #44444f !important;
}

body .required-gender-prompt {
  padding: 14px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: #fff1dc !important;
  box-shadow: none !important;
}

body .required-gender-title {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #111 !important;
}

body .required-gender-message {
  font-size: 12px !important;
  color: #6c6c78 !important;
}

body #requiredGenderMaleBtn,
body #requiredGenderFemaleBtn {
  min-height: 40px;
  border-radius: 10px !important;
  background-image: none !important;
  box-shadow: none !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

body #requiredGenderMaleBtn {
  background-color: #1088fd !important;
}

body #requiredGenderFemaleBtn {
  background-color: #ff3d97 !important;
}

body .candidate-attention-prompt {
  border: 0 !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

body #missingFieldRequestPopup {
  left: 14px !important;
  right: 14px !important;
  bottom: 14px !important;
  padding: 16px !important;
  border: 0 !important;
  border-radius: 20px !important;
  background: #fff !important;
  box-shadow: 0 14px 40px rgba(20, 20, 40, 0.24) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

body #missingFieldRequestPopup > div:first-child {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #111 !important;
}

body #missingFieldRequestPopup textarea {
  border: 0 !important;
  border-radius: 12px !important;
  background: #f4f4f7 !important;
}

body #missingFieldRequestPopup button {
  min-height: 38px;
  border-radius: 10px !important;
  background-image: none !important;
  box-shadow: none !important;
  font-weight: 700 !important;
}

body #missingFieldRequestPopup button:first-of-type {
  background-color: #1088fd !important;
  color: #fff !important;
}

body #missingFieldRequestPopup button:last-of-type {
  border: 0 !important;
  background-color: #f1f1f4 !important;
  color: #44444f !important;
}

body #learningModeOverlay #saveLearnedRuleBtn::before,
body #learningModeOverlay #saveLearnedRuleBtn::after {
  content: none !important;
}
