:root {
  --ink: #171923;
  --ink-soft: #343745;
  --muted: #6d7180;
  --line: #e5e2eb;
  --line-strong: #d3cedd;
  --surface: #ffffff;
  --soft: #f8f7fa;
  --purple: #7a43ca;
  --purple-dark: #572495;
  --purple-deep: #31164f;
  --purple-soft: #f3edfc;
  --purple-faint: #faf7fe;
  --good: #19714b;
  --good-soft: #eaf7f0;
  --warn: #8a5a00;
  --danger: #a52a2a;
  --shadow: 0 24px 70px rgba(45, 24, 71, .12), 0 3px 12px rgba(36, 26, 48, .05);
  --shadow-soft: 0 12px 32px rgba(42, 25, 63, .08);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: #f5f3f8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 7% 10%, rgba(139, 81, 211, .08), transparent 26rem),
    radial-gradient(circle at 94% 32%, rgba(86, 35, 147, .06), transparent 24rem),
    linear-gradient(180deg, #fbfafd 0, #f4f2f7 45%, #f8f7fa 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 76px 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122, 67, 202, .2), transparent);
  pointer-events: none;
}

.topbar {
  min-height: 76px;
  background: linear-gradient(112deg, #29173e 0%, #42205f 56%, #5e2e87 100%);
  color: #fff;
  border-bottom: 4px solid #9258dd;
  box-shadow: 0 8px 28px rgba(38, 19, 56, .17);
}
.topbar-inner {
  width: min(1180px, calc(100% - 36px));
  min-height: 72px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand img { border-radius: 12px; box-shadow: 0 8px 20px rgba(12, 5, 20, .3); }
.brand div { display: flex; flex-direction: column; gap: 1px; }
.brand strong { font-size: 20px; letter-spacing: .08em; }
.brand span { font-size: 12px; color: #e7d9f5; letter-spacing: .01em; }
.secure-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #f8f3ff;
  font-size: 12px;
  font-weight: 650;
  backdrop-filter: blur(8px);
}
.secure-label svg { width: 17px; height: 17px; fill: #dcbfff; }

main { width: min(1160px, calc(100% - 30px)); margin: 52px auto 70px; }
.intro { text-align: center; max-width: 760px; margin: 0 auto 34px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 850;
  color: var(--purple);
  margin: 0 0 10px;
}
.intro h1 { font-size: clamp(34px, 5vw, 50px); line-height: 1.06; letter-spacing: -.035em; margin: 0; }
.intro > p:not(.eyebrow) { color: var(--muted); font-size: 17px; line-height: 1.55; margin: 14px auto 19px; }
.intro-notes { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px 18px; }
.intro-notes span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 12px; font-weight: 650; }
.intro-notes svg { width: 16px; height: 16px; fill: var(--purple); }

.portal-shell { display: grid; grid-template-columns: 214px minmax(0, 1fr); gap: 24px; align-items: start; }
.progress {
  position: sticky;
  top: 22px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(221, 216, 229, .85);
  border-radius: 20px;
  padding: 22px 20px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}
.progress-copy { display: grid; gap: 5px; }
.progress-copy span { color: var(--purple); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.progress-copy strong { font-size: 15px; line-height: 1.35; }
.progress-track { height: 5px; overflow: hidden; border-radius: 99px; background: #e8e3ed; margin: 17px 0 22px; }
.progress-track span { display: block; height: 100%; width: 33.333%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), #a46fe4); transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 17px; position: relative; }
.steps::before { content: ""; position: absolute; top: 15px; bottom: 15px; left: 14px; width: 2px; background: var(--line); }
.steps li { position: relative; display: flex; align-items: center; gap: 11px; color: #95929e; font-size: 12px; }
.steps li span {
  z-index: 1;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--line);
  font-size: 11px;
  font-weight: 800;
  transition: all .25s ease;
}
.steps li b { font-weight: 700; }
.steps li.active { color: var(--purple-dark); }
.steps li.active span { color: #fff; background: var(--purple); border-color: var(--purple); box-shadow: 0 0 0 5px rgba(122, 67, 202, .1); }
.steps li.complete { color: var(--ink-soft); }
.steps li.complete span { color: #fff; background: var(--good); border-color: var(--good); }

.card {
  min-width: 0;
  background: rgba(255, 255, 255, .96);
  border: 1px solid #e4e0e9;
  border-radius: 26px;
  padding: clamp(24px, 4.5vw, 48px);
  box-shadow: var(--shadow);
  overflow: visible;
}
.journey-stage { animation: stageIn .42s cubic-bezier(.2, .78, .24, 1) both; }
.journey-stage + .journey-stage { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.journey-stage.is-complete .stage-heading { margin-bottom: 16px; }
@keyframes stageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.stage-heading { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 24px; }
.stage-number {
  flex: 0 0 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--purple-soft), #ebe0fa);
  color: var(--purple-dark);
  font-size: 14px;
  font-weight: 850;
  box-shadow: inset 0 0 0 1px rgba(122, 67, 202, .08);
}
.stage-heading > div { min-width: 0; }
.stage-kicker { margin: 0 0 3px; color: var(--purple); font-size: 10px; line-height: 1; font-weight: 850; text-transform: uppercase; letter-spacing: .12em; }
.stage-heading h2 { margin: 0 0 5px; font-size: clamp(21px, 3vw, 27px); line-height: 1.2; letter-spacing: -.02em; }
.stage-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

.type-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.type-card {
  grid-column: span 2;
  min-height: 130px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 13px;
  padding: 18px;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}
.type-card:hover, .type-card:focus-visible { transform: translateY(-3px); border-color: #ba9ddd; box-shadow: 0 14px 30px rgba(75, 42, 112, .11); background: var(--purple-faint); outline: none; }
.type-card.selected { border-color: var(--purple); background: var(--purple-faint); box-shadow: 0 0 0 3px rgba(122, 67, 202, .1); }
.type-card > span:nth-child(2) { display: grid; gap: 5px; min-width: 0; }
.type-card strong { font-size: 15px; line-height: 1.2; }
.type-card small { color: var(--muted); font-size: 11px; line-height: 1.4; font-weight: 500; }
.type-card i { color: #a399ad; font-style: normal; font-size: 22px; line-height: 38px; transition: transform .2s ease; }
.type-card:hover i { transform: translateX(3px); color: var(--purple); }
.type-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--purple-soft); color: var(--purple); }
.type-icon svg { width: 22px; height: 22px; fill: currentColor; }

.selection-summary, .selected-agent {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px 17px;
  border: 1px solid #dcd3e8;
  border-radius: 15px;
  background: linear-gradient(105deg, var(--purple-faint), #fff);
}
.selection-summary > div, .selected-agent > div { min-width: 0; display: grid; gap: 2px; }
.selection-summary small, .selected-agent small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; }
.selection-summary strong, .selected-agent strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.selection-summary div > span, .selected-agent div > span { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-check { width: 37px; height: 37px; display: grid; place-items: center; color: var(--good); background: var(--good-soft); border-radius: 50%; font-weight: 900; }
.text-button { padding: 8px 10px; border: 0; background: transparent; color: var(--purple-dark); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; border-radius: 8px; }
.text-button:hover, .text-button:focus-visible { background: var(--purple-soft); outline: none; }

.agent-wrap { position: relative; }
.search-input-wrap { position: relative; display: block; }
.search-input-wrap svg { position: absolute; left: 16px; top: 50%; width: 21px; height: 21px; transform: translateY(-50%); fill: #8d8698; pointer-events: none; }
.search-input-wrap input { padding-left: 48px; font-size: 16px; min-height: 58px; }
.agent-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(145deg, var(--purple), #9b64dc); color: #fff; font-size: 12px; font-weight: 850; letter-spacing: .04em; box-shadow: 0 7px 16px rgba(92, 47, 145, .2); }
.results {
  position: absolute;
  z-index: 10;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 7px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  box-shadow: 0 20px 45px rgba(25, 20, 31, .17);
  max-height: 320px;
  overflow: auto;
  animation: resultsIn .2s ease both;
}
@keyframes resultsIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.result {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  color: var(--ink);
  cursor: pointer;
}
.result + .result { margin-top: 2px; }
.result:hover, .result:focus, .result.active { background: var(--purple-soft); outline: none; }
.result-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #eee7f7; color: var(--purple-dark); font-size: 10px; font-weight: 850; }
.result-copy { display: grid; min-width: 0; }
.result strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.result.empty, .result.loading { display: block; cursor: default; color: var(--muted); padding: 14px; font-size: 12px; }

.request-summary { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 18px; align-items: center; margin: 0 0 22px; padding: 15px 18px; background: linear-gradient(105deg, #342047, #512b70); color: #fff; border-radius: 15px; box-shadow: 0 10px 25px rgba(47, 25, 68, .14); }
.request-summary > span { width: 1px; height: 32px; background: rgba(255, 255, 255, .18); }
.request-summary div { display: grid; gap: 3px; min-width: 0; }
.request-summary small { color: #d9cbe5; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; font-weight: 750; }
.request-summary strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.form-section { margin-top: 16px; padding: 25px; background: var(--soft); border: 1px solid #ebe8ef; border-radius: 17px; }
.section-heading { margin-bottom: 18px; }
.section-heading h3 { font-size: 17px; margin: 0 0 4px; letter-spacing: -.01em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.grid { display: grid; gap: 17px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.one { grid-template-columns: minmax(0, 1fr); }
.grid + .grid, .grid + .field, .field + .field, .notice + .field { margin-top: 17px; }
/* Dentro de una rejilla el espacio lo pone el gap: sin esto la segunda columna bajaba. */
.grid > .field + .field { margin-top: 0; }
.preference-grid + .grid { margin-top: 17px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field.full { width: 100%; }
.field > span { color: var(--ink-soft); font-size: 13px; font-weight: 720; }
.field b { color: var(--purple); }
.field em { font-style: normal; font-weight: 550; color: var(--muted); float: right; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.field small { font-size: 11px; color: var(--muted); line-height: 1.45; }
.field small.good { color: var(--good); font-weight: 650; }
.field small.warn { color: var(--warn); font-weight: 650; }
.preference-grid { display: grid; gap: 22px; }
.insurer-field { padding-bottom: 4px; }
.insurer-choice-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}
.insurer-choice {
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #d9d3e1;
  border-radius: 10px;
  background: #fff;
  color: #493d55;
  font: inherit;
  font-size: 12px;
  font-weight: 720;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.insurer-choice:hover { border-color: #a97adc; background: var(--purple-faint); transform: translateY(-1px); }
.insurer-choice:focus-visible { outline: 3px solid rgba(122, 67, 202, .22); outline-offset: 2px; }
.insurer-choice.selected {
  color: #fff;
  border-color: var(--purple);
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  box-shadow: 0 8px 18px rgba(87, 36, 149, .2);
}

input, select, textarea {
  width: 100%;
  border: 1px solid #cdc8d4;
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  padding: 13px 14px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input, select { min-height: 50px; }
select { cursor: pointer; }
textarea { resize: vertical; line-height: 1.55; min-height: 104px; }
input::placeholder, textarea::placeholder { color: #9a96a1; }
input:focus, select:focus, textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(122, 67, 202, .11); }
input:disabled, select:disabled { color: #8c8993; background: #f1eff3; cursor: not-allowed; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(165, 42, 42, .08); }

.notice { margin-top: 15px; border: 1px solid #ead7ae; background: #fff9e9; color: #654813; border-radius: 11px; padding: 13px 15px; font-size: 12px; line-height: 1.5; }
.conditional > .notice { margin: 0 0 18px; }

.attachments-note { background: linear-gradient(145deg, #fbfafc, #f5f2f8); border-style: dashed; border-color: #cfc4dc; }
.attachment-heading { display: flex; gap: 12px; align-items: center; margin-bottom: 15px; }
.attachment-heading h3 { margin: 0 0 3px; font-size: 16px; }
.attachment-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.attachment-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--purple-soft); color: var(--purple); }
.attachment-icon svg { width: 21px; height: 21px; fill: currentColor; }
.upload-control { display: grid; place-items: center; text-align: center; gap: 5px; padding: 20px; border: 1px dashed #b8a5cc; border-radius: 13px; background: #fff; cursor: pointer; transition: all .2s ease; }
.upload-control:hover { border-color: var(--purple); background: var(--purple-faint); }
.upload-control input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.upload-control strong { color: var(--purple-dark); font-size: 13px; }
.upload-control span { color: var(--muted); font-size: 10px; }
.security-note { margin: 11px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }
.attachment-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.attachment-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 11px; border-radius: 9px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 11px; }
.attachment-list li span { white-space: nowrap; }

.actions { display: grid; justify-items: center; gap: 10px; margin-top: 26px; padding-top: 8px; }
.actions > button, .success-actions button {
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(110deg, var(--purple), #925ad6);
  color: #fff;
  font-weight: 800;
  padding: 14px 22px;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(106, 54, 168, .23);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.actions > button { min-width: min(100%, 350px); display: inline-flex; align-items: center; justify-content: center; gap: 12px; }
.actions button i { font-style: normal; font-size: 19px; transition: transform .18s ease; }
.actions button:hover, .success-actions button:hover { transform: translateY(-2px); filter: brightness(.96); box-shadow: 0 13px 28px rgba(106, 54, 168, .28); }
.actions button:hover i { transform: translateX(3px); }
.actions button:disabled { opacity: .62; cursor: wait; transform: none; }
.actions small { color: var(--muted); font-size: 10px; text-align: center; }
.actions .privacy-submit { max-width: 620px; margin-top: 2px; line-height: 1.55; color: #716878; }
.actions .privacy-submit a { color: var(--purple-dark); font-weight: 750; text-underline-offset: 2px; }
.actions .privacy-submit a:hover { color: var(--purple); }
.success-actions button.secondary { background: #fff; color: var(--purple); border: 1px solid var(--purple); box-shadow: none; }
.success-actions button.secondary:hover { background: var(--purple-soft); }

.message { border-radius: 12px; padding: 14px 16px; margin-bottom: 22px; background: #fff0f0; border: 1px solid #efcaca; color: #852222; font-size: 12px; line-height: 1.5; }
.success { text-align: center; padding: 30px 10px; animation: stageIn .45s ease both; }
.success .check { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; background: var(--good-soft); color: var(--good); font-size: 32px; font-weight: 850; box-shadow: 0 0 0 8px rgba(25, 113, 75, .06); }
.success h2 { font-size: 25px; }
.success h2 strong { display: block; color: var(--purple); font-size: 35px; margin-top: 9px; }
.success > p:not(.eyebrow) { color: var(--muted); }
.success-actions { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }

.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.hidden { display: none !important; }

footer { display: grid; justify-items: center; gap: 2px; color: #7b7782; padding: 0 18px 38px; font-size: 11px; }
footer strong { color: #554c60; letter-spacing: .08em; }
footer span { font-weight: 650; }
footer a { margin-top: 5px; color: var(--purple-dark); font-weight: 700; text-underline-offset: 2px; }
footer small { margin-top: 5px; font-size: 9px; color: #99949f; text-align: center; }

@media (max-width: 920px) {
  main { margin-top: 38px; }
  .portal-shell { grid-template-columns: 1fr; }
  .progress { position: static; padding: 17px 20px; }
  .progress-copy { grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
  .progress-copy strong { text-align: right; }
  .progress-track { margin: 12px 0 15px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 0; }
  .steps::before { left: 16.66%; right: 16.66%; top: 15px; bottom: auto; width: auto; height: 2px; }
  .steps li { display: grid; justify-items: center; gap: 6px; }
  .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-card { grid-column: auto; }
  .insurer-choice-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .topbar-inner { width: min(100% - 24px, 1180px); }
  .secure-label span { display: none; }
  .secure-label { padding: 8px; }
  main { width: min(100% - 20px, 1160px); margin-top: 28px; }
  .intro { margin-bottom: 22px; }
  .intro h1 { font-size: 32px; }
  .intro > p:not(.eyebrow) { font-size: 15px; }
  .intro-notes { gap: 7px 13px; }
  .intro-notes span { font-size: 10px; }
  .progress { border-radius: 16px; }
  .progress-copy strong { font-size: 13px; }
  .card { border-radius: 18px; padding: 22px 17px; }
  .stage-heading { gap: 11px; }
  .stage-number { flex-basis: 34px; height: 34px; }
  .stage-heading h2 { font-size: 21px; }
  .type-grid { grid-template-columns: 1fr; }
  .type-card { grid-column: auto; min-height: 0; }
  .selection-summary, .selected-agent { grid-template-columns: auto 1fr; }
  .selection-summary .text-button, .selected-agent .text-button { grid-column: 2; justify-self: start; padding-left: 0; }
  .grid.two { grid-template-columns: 1fr; }
  .insurer-choice-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-section { padding: 20px 16px; }
  .request-summary { grid-template-columns: 1fr; gap: 9px; }
  .request-summary > span { width: 100%; height: 1px; }
  .success-actions { flex-direction: column; }
}

/* Emisión: dos caminos, y la cotización que el agente quiere emitir. */
.mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mode-card, .option-card {
  display: grid; gap: 5px; padding: 16px 18px; text-align: left; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 14px; cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.mode-card strong, .option-card strong { font-size: 14px; }
.mode-card small, .option-card small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.mode-card:hover, .option-card:hover, .mode-card:focus-visible, .option-card:focus-visible { border-color: #ba9ddd; background: var(--purple-faint); outline: none; }
.mode-card.selected, .option-card.selected { border-color: var(--purple); background: var(--purple-faint); box-shadow: 0 0 0 3px rgba(122, 67, 202, .12); }
.folio-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.folio-search button, .secondary-button {
  min-height: 50px; padding: 0 18px; border-radius: 11px; border: 1px solid var(--purple); background: #fff;
  color: var(--purple); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer;
}
.folio-search button:hover { background: var(--purple-soft); }
.folio-search button:disabled { opacity: .6; cursor: wait; }
.field-status { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); min-height: 1em; }
.field-status.good { color: var(--good); font-weight: 650; }
.field-status.warn { color: var(--warn); font-weight: 650; }
.quote-found { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.quote-found div { display: grid; gap: 3px; min-width: 0; }
.quote-found small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; }
.quote-found strong { font-size: 13px; overflow-wrap: anywhere; }
.option-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.option-card .star { color: var(--good); font-size: 11px; font-weight: 800; }
#emit-found .field + .field, #emit-found .grid + .field, #emit-found .notice + .field { margin-top: 16px; }
@media (max-width: 620px) {
  .mode-grid, .option-list, .folio-search { grid-template-columns: 1fr; }
  .quote-found { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
.message .message-action { margin-left: 6px; border: 1px solid #852222; background: #fff; color: #852222; border-radius: 999px; padding: 4px 12px; font: inherit; font-weight: 700; cursor: pointer; }

.attachment-list li .file-remove { border: 0; background: none; color: #852222; font: inherit; font-weight: 700; cursor: pointer; padding: 0 2px; text-decoration: underline; }
.attachment-list li.is-removed strong { text-decoration: line-through; opacity: .6; }
.success-files { text-align: left; margin: 18px auto 8px; max-width: 520px; }
.success-files h3 { margin: 0 0 4px; font-size: 14px; }
.success-files p { margin: 0 0 8px; font-size: 12px; }
.upload-control.compact { margin-top: 10px; }
.files-status { min-height: 16px; }
.attachment-list li strong { flex: 1; min-width: 0; overflow-wrap: anywhere; }
