/* =====================================================================================
   Resume Builder – "Start with my old resume" (dashboard/import/ + reading/ + result/)
   uses the dashboard colours of cv-dashboard.css (--cvd-*)
   ===================================================================================== */

/* ------------------------------------------------------------------ page 1: upload */
.rbi-setup { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; padding: 14px 16px; border: 1px solid #fcd34d; border-radius: 14px; background: #fffbeb; color: #78350f; font-size: 14px; line-height: 1.5; }
.rbi-setup > i { font-size: 20px; color: #d97706; }
.rbi-setup code { padding: 1px 5px; border-radius: 5px; background: #fef3c7; color: #92400e; font-size: 12.5px; word-break: break-all; }
.rbi-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; margin-bottom: 24px; }

.rbi-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.rbi-main > .rb-ad { margin: 0; }
.rbi-upload { display: flex; flex-direction: column; gap: 16px; padding: 22px; }

.rbi-drop {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    min-height: 280px; margin: 0; padding: 30px 20px; text-align: center; cursor: pointer;
    border: 2px dashed #cfc3f7; border-radius: 18px; background: #fbfaff;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.rbi-drop:hover, .rbi-drop:focus-within { border-color: var(--cvd-brand); background: var(--cvd-brand-soft); }
.rbi-drop.is-over { border-color: var(--cvd-brand); background: var(--cvd-brand-soft); transform: scale(1.01); }
.rbi-drop.has-file { min-height: 170px; }
.rbi-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rbi-drop-icon { display: inline-flex; align-items: center; justify-content: center; width: 74px; height: 74px; border-radius: 22px; background: #fff; color: var(--cvd-brand); font-size: 36px; box-shadow: 0 10px 26px rgba(108, 60, 240, .16); }
.rbi-drop.has-file .rbi-drop-icon { width: 54px; height: 54px; font-size: 26px; border-radius: 16px; }
.rbi-drop-title { font-size: 18px; color: var(--cvd-text); }
.rbi-drop-or { color: var(--cvd-muted); font-size: 13px; }
.rbi-drop-btn { pointer-events: none; }
.rbi-drop-hint { color: var(--cvd-muted); font-size: 13px; }
.rbi-only-touch { display: none; }
@media (hover: none) {
    .rbi-only-mouse { display: none; }
    .rbi-only-touch { display: inline; }
}

.rbi-chosen { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--cvd-border); border-radius: 14px; background: #fff; }
.rbi-chosen-icon { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--cvd-brand-soft); color: var(--cvd-brand); font-size: 22px; }
.rbi-chosen-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rbi-chosen-text b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; }
.rbi-chosen-text small { color: var(--cvd-muted); }

.rbi-progress { display: flex; flex-direction: column; gap: 6px; }
.rbi-progress-bar { height: 8px; border-radius: 8px; background: #ece8f8; overflow: hidden; }
.rbi-progress-bar span { display: block; width: 0; height: 100%; border-radius: 8px; background: var(--cvd-brand); transition: width .2s ease; }
.rbi-progress small { color: var(--cvd-muted); font-weight: 600; }

.rbi-error { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 14px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-size: 14px; }
.rbi-error-icon { flex-shrink: 0; font-size: 20px; color: #dc2626; line-height: 1.2; }
.rbi-error > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rbi-error-title { font-weight: 800; color: #7f1d1d; }
.rbi-error-tip { margin-top: 4px; color: #92400e; font-size: 13px; }
.rbi-error-tip::before { content: "\F46B"; font-family: bootstrap-icons; margin-right: 6px; color: #d97706; }
.rbi-shake { animation: rbi-shake .42s ease; }
@keyframes rbi-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

.rbi-consent { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 13.5px; color: var(--cvd-muted); cursor: pointer; }
.rbi-consent input { flex-shrink: 0; margin-top: 2px; width: 18px; height: 18px; }
.rbi-consent a { color: var(--cvd-brand); font-weight: 600; }

.rbi-submit { justify-content: center; padding: 14px 18px; font-size: 16px; }
.rbi-submit:disabled { background: #c4b5fd; box-shadow: none; transform: none; cursor: not-allowed; }
.rbi-submit-hint { margin: -6px 0 0; text-align: center; color: var(--cvd-muted); font-size: 13px; }

/* "which files can be read?" links + the rules modal (an iframe with dashboard/import/rules/) */
.rbi-rules-link { align-self: center; display: inline-flex; gap: 6px; align-items: center; margin-top: -6px; padding: 4px 8px; border: 0; border-radius: 8px; background: none; color: var(--cvd-muted); font-size: 13.5px; }
.rbi-rules-link b { color: var(--cvd-brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.rbi-rules-link:hover { background: var(--cvd-brand-soft); }
.rbi-error-rules { align-self: flex-start; margin-top: 8px; padding: 5px 10px; border: 1px solid #fecaca; border-radius: 8px; background: #fff; color: #b91c1c; font-size: 13px; font-weight: 700; }
.rbi-error-rules:hover { background: #fff5f5; }
.rbi-tips-rules { margin-bottom: 12px; font-size: 13.5px; }
.rbi-rules-modal .modal-dialog { max-width: min(920px, calc(100vw - 48px)); }
.rbi-rules-modal .modal-content { position: relative; height: calc(100vh - 56px); overflow: hidden; border: 0; border-radius: 20px; background: var(--cvd-bg); box-shadow: 0 30px 80px rgba(15, 23, 42, .35); }
.rbi-rules-modal iframe { display: block; width: 100%; height: 100%; border: 0; background: transparent; }
.rbi-rules-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--cvd-muted); font-weight: 600; background: var(--cvd-bg); }
.rbi-rules-loading[hidden] { display: none; }
.rbi-rules-loading .spinner-border { color: var(--cvd-brand); }
@media (max-width: 767.98px) {
    .rbi-rules-modal .modal-dialog { max-width: none; }
    .rbi-rules-modal .modal-content { height: 100%; border-radius: 0; }
}

/* side */
.rbi-side { display: flex; flex-direction: column; gap: 16px; }
.rbi-side h2 { margin: 0 0 12px; font-size: 15px; font-weight: 800; }
.rbi-design { display: flex; gap: 14px; align-items: center; padding: 14px; }
.rbi-design-thumb { flex-shrink: 0; width: 86px !important; border-radius: 8px; }
.rbi-design-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rbi-design-text small { color: #16a34a; font-weight: 600; }
.rbi-design-text b { font-size: 16px; }
.rbi-design-text a { color: var(--cvd-brand); font-size: 13px; font-weight: 600; }

.rbi-how { padding: 18px; }
.rbi-how ol { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.rbi-how li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.rbi-how li i { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; background: var(--cvd-brand-soft); color: var(--cvd-brand); }

.rbi-tips { padding: 18px; }
.rbi-tips h2 i { color: #d97706; }
.rbi-tips ul { margin: 0 0 12px; padding-left: 18px; font-size: 13.5px; color: #4b5563; }
.rbi-tips li + li { margin-top: 5px; }
.rbi-private { display: flex; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 10px; background: #f0fdf4; color: #166534; font-size: 13px; }

/* ------------------------------------------------------------------ step bar (6 steps) */
.rbi-steps-bar { flex-wrap: wrap; row-gap: 8px; }
.cvd-step-line.done { background: var(--cvd-brand); }

/* ------------------------------------------------------------------ page 4: reading */
.rbi-read { position: relative; max-width: 660px; margin: 0 auto 24px; padding: 36px 28px 30px; text-align: center; overflow: hidden; }
.rbi-read::before { content: ""; position: absolute; inset: 0 0 auto; height: 160px; background: radial-gradient(60% 100% at 50% 0%, rgba(108, 60, 240, .10), transparent 70%); pointer-events: none; }
.rbi-read.is-fail::before { background: radial-gradient(60% 100% at 50% 0%, rgba(220, 38, 38, .08), transparent 70%); }
.rbi-read > div { position: relative; }
.rbi-read h1 { margin: 10px 0 6px; font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
.rbi-read-sub { margin: 0 auto; max-width: 480px; color: var(--cvd-muted); word-break: break-word; }
.rbi-read-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }

.rbi-ai-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 12px; border-radius: 999px; background: var(--cvd-brand-soft); color: var(--cvd-brand); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.rbi-ai-badge i { animation: rbi-twinkle 1.6s ease-in-out infinite; }

/* the AI animation: pulsing rings + a document whose lines fill in + a scan line + sparkles */
.rbi-ai { position: relative; display: flex; align-items: center; justify-content: center; width: 170px; height: 170px; margin: 0 auto; }
.rbi-ai-ring { position: absolute; inset: 18px; border-radius: 50%; border: 2px solid rgba(108, 60, 240, .25); animation: rbi-ring 2.4s ease-out infinite; }
.rbi-ai-ring-2 { animation-delay: 1.2s; }
@keyframes rbi-ring { 0% { transform: scale(.75); opacity: .9; } 100% { transform: scale(1.15); opacity: 0; } }
.rbi-doc { position: relative; display: block; width: 92px; height: 116px; border-radius: 12px; background: #fff; box-shadow: 0 14px 34px rgba(76, 29, 149, .18), 0 0 0 1px #e9e3fb; overflow: hidden; }
.rbi-doc-lines { position: absolute; inset: 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.rbi-doc-lines i { display: block; height: 7px; border-radius: 4px; background: #ece8f8; position: relative; overflow: hidden; }
.rbi-doc-lines i:first-child { width: 60%; height: 10px; background: #ddd3fb; }
.rbi-doc-lines i:nth-child(3) { width: 85%; } .rbi-doc-lines i:nth-child(5) { width: 70%; } .rbi-doc-lines i:nth-child(6) { width: 50%; }
.rbi-doc-lines i::after { content: ""; position: absolute; inset: 0; width: 0; background: var(--cvd-brand); opacity: .75; animation: rbi-fill 3.6s ease-in-out infinite; }
.rbi-doc-lines i:nth-child(2)::after { animation-delay: .3s; } .rbi-doc-lines i:nth-child(3)::after { animation-delay: .6s; }
.rbi-doc-lines i:nth-child(4)::after { animation-delay: .9s; } .rbi-doc-lines i:nth-child(5)::after { animation-delay: 1.2s; } .rbi-doc-lines i:nth-child(6)::after { animation-delay: 1.5s; }
@keyframes rbi-fill { 0% { width: 0; } 45%, 75% { width: 100%; } 100% { width: 100%; opacity: 0; } }
.rbi-doc-scan { position: absolute; left: 6px; right: 6px; top: 8px; height: 3px; border-radius: 3px; background: var(--cvd-brand); box-shadow: 0 0 14px 4px rgba(108, 60, 240, .45); animation: rbi-scan 2s ease-in-out infinite; }
@keyframes rbi-scan { 0%, 100% { top: 8px; } 50% { top: calc(100% - 11px); } }
.rbi-spark { position: absolute; color: #f59e0b; font-size: 20px; animation: rbi-twinkle 1.8s ease-in-out infinite; }
.rbi-spark-1 { top: 14px; right: 22px; } .rbi-spark-2 { bottom: 20px; left: 16px; font-size: 16px; animation-delay: .6s; color: var(--cvd-brand); }
.rbi-spark-3 { top: 34px; left: 12px; font-size: 15px; animation-delay: 1.1s; color: #ec4899; }
@keyframes rbi-twinkle { 0%, 100% { transform: scale(.8) rotate(0); opacity: .45; } 50% { transform: scale(1.15) rotate(12deg); opacity: 1; } }

.rbi-bar { height: 10px; margin: 22px auto 6px; max-width: 440px; border-radius: 10px; background: #ece8f8; overflow: hidden; }
.rbi-bar span { position: relative; display: block; width: 0; height: 100%; border-radius: 10px; background: var(--cvd-brand-grad); transition: width .3s ease; overflow: hidden; }
.rbi-bar span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-100%); animation: rbi-shine 1.4s linear infinite; }
@keyframes rbi-shine { to { transform: translateX(100%); } }
.rbi-bar-meta { display: flex; justify-content: space-between; max-width: 440px; margin: 0 auto 18px; color: var(--cvd-muted); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

.rbi-steps { display: inline-flex; flex-direction: column; gap: 9px; margin: 0; padding: 0; list-style: none; text-align: left; }
.rbi-steps li { display: flex; gap: 10px; align-items: center; color: #a3a3b5; font-weight: 600; font-size: 14.5px; transition: color .3s ease; }
.rbi-step-ic { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9px; background: #f3f2f8; font-size: 14px; transition: background .3s ease, color .3s ease, transform .3s ease; }
.rbi-steps li.active { color: var(--cvd-text); }
.rbi-steps li.active .rbi-step-ic { background: var(--cvd-brand); color: #fff; transform: scale(1.08); box-shadow: 0 0 0 5px rgba(108, 60, 240, .14); animation: rbi-pulse 1.4s ease-in-out infinite; }
.rbi-steps li.done { color: #16a34a; }
.rbi-steps li.done .rbi-step-ic { background: #dcfce7; color: #16a34a; }
.rbi-steps li.done .rbi-step-ic i::before { content: "\F633"; }   /* bi-check-lg */
@keyframes rbi-pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(108, 60, 240, .16); } 50% { box-shadow: 0 0 0 8px rgba(108, 60, 240, .05); } }

.rbi-tip { display: flex; gap: 8px; justify-content: center; align-items: flex-start; max-width: 460px; min-height: 40px; margin: 20px auto 0; color: var(--cvd-muted); font-size: 13px; transition: opacity .25s ease, transform .25s ease; }
.rbi-tip i { color: #d97706; }
.rbi-tip.is-out { opacity: 0; transform: translateY(4px); }

.rbi-read-icon { display: inline-flex; align-items: center; justify-content: center; width: 80px; height: 80px; border-radius: 50%; font-size: 40px; }
.rbi-read-icon-ok { background: #dcfce7; color: #16a34a; box-shadow: 0 0 0 10px #f0fdf4; }
.rbi-read-icon-error { background: #fef2f2; color: #dc2626; box-shadow: 0 0 0 10px #fff7f7; }
.rbi-pop { animation: rbi-pop .55s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes rbi-pop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.rbi-read-fail h1, .rbi-read-done h1 { margin-top: 20px; }
.rbi-wait { margin: 16px 0 0; color: var(--cvd-muted); font-size: 13px; }
.rbi-next { padding: 13px 22px; font-size: 15.5px; animation: rbi-glow 1.8s ease-in-out infinite; }
.rbi-next .bi-arrow-right { transition: transform .2s ease; }
.rbi-next:hover .bi-arrow-right { transform: translateX(4px); }
@keyframes rbi-glow { 0%, 100% { box-shadow: 0 6px 18px rgba(108, 60, 240, .28); } 50% { box-shadow: 0 6px 18px rgba(108, 60, 240, .28), 0 0 0 7px rgba(108, 60, 240, .12); } }
.rbi-fail-tip { display: flex; gap: 8px; max-width: 480px; margin: 14px auto 0; padding: 10px 14px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 13.5px; text-align: left; }
.rbi-fail-tip i { color: #d97706; }

/* ------------------------------------------------------------------ page 5: result ("We got this from your resume") */
.rbr { margin-bottom: 24px; }
.rbr-hero { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 26px 28px; margin-bottom: 18px; overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f7f3ff 100%); }
.rbr-hero-icon { display: inline-flex; align-items: center; justify-content: center; width: 70px; height: 70px; border-radius: 50%; background: #16a34a; color: #fff; font-size: 36px; box-shadow: 0 0 0 9px #dcfce7; }
.rbr-hero-text h1 { margin: 8px 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.rbr-hero-text p { margin: 0; color: var(--cvd-muted); max-width: 620px; }
.rbr-hero-text .rbi-ai-badge { margin-top: 0; }
.rbr-hero-actions { display: flex; flex-direction: column; gap: 8px; }
.rbr-go { padding: 13px 20px; font-size: 15.5px; white-space: nowrap; }
.rbr-go .bi-arrow-right { transition: transform .2s ease; }
.rbr-go:hover .bi-arrow-right { transform: translateX(4px); }
.rbr-hero-confetti { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.rbr-hero > :not(.rbr-hero-confetti) { position: relative; z-index: 1; }
.rbr-hero-confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; opacity: 0; animation: rbr-confetti 2.6s ease-out .2s 1 forwards; }
.rbr-hero-confetti i:nth-child(1) { left: 8%; background: #6c3cf0; } .rbr-hero-confetti i:nth-child(2) { left: 18%; background: #f59e0b; animation-delay: .35s; }
.rbr-hero-confetti i:nth-child(3) { left: 30%; background: #ec4899; animation-delay: .1s; } .rbr-hero-confetti i:nth-child(4) { left: 46%; background: #10b981; animation-delay: .5s; }
.rbr-hero-confetti i:nth-child(5) { left: 60%; background: #3b82f6; animation-delay: .25s; } .rbr-hero-confetti i:nth-child(6) { left: 72%; background: #f59e0b; animation-delay: .6s; }
.rbr-hero-confetti i:nth-child(7) { left: 84%; background: #6c3cf0; animation-delay: .15s; } .rbr-hero-confetti i:nth-child(8) { left: 93%; background: #ec4899; animation-delay: .45s; }
@keyframes rbr-confetti { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(170px) rotate(320deg); } }

.rbr-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.rbr-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 18px; animation: rbr-up .5s ease both; animation-delay: var(--d, 0ms); }
.rbr-stat-ic { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-bottom: 6px; border-radius: 11px; background: var(--cvd-brand-soft); color: var(--cvd-brand); font-size: 18px; }
.rbr-stat b { font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rbr-stat small { color: var(--cvd-muted); font-weight: 600; }
.rbr-stat.is-empty { opacity: .6; } .rbr-stat.is-empty .rbr-stat-ic { background: #f3f4f6; color: #9ca3af; }
@keyframes rbr-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.rbr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.rbr-main, .rbr-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rbr-main > .rb-ad { margin: 0; }
.rbr-card { padding: 18px 20px; animation: rbr-up .5s ease both; }
.rbr-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15.5px; font-weight: 800; }
.rbr-card h3 > i { color: var(--cvd-brand); }
.rbr-count { margin-left: auto; padding: 1px 9px; border-radius: 999px; background: var(--cvd-brand-soft); color: var(--cvd-brand); font-size: 12.5px; }
.rbr-none { color: #9ca3af; font-style: italic; font-weight: 500; }

.rbr-person { display: flex; gap: 16px; align-items: flex-start; }
.rbr-avatar { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 18px; background: var(--cvd-brand-grad); color: #fff; font-size: 24px; font-weight: 800; }
.rbr-person-text { min-width: 0; }
.rbr-person h2 { margin: 2px 0 2px; font-size: 20px; font-weight: 800; }
.rbr-headline { margin: 0 0 8px; color: var(--cvd-brand); font-weight: 600; }
.rbr-contact { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; color: #4b5563; font-size: 13.5px; }
.rbr-contact li { display: inline-flex; gap: 6px; align-items: center; min-width: 0; word-break: break-all; }
.rbr-contact i { color: var(--cvd-muted); }
.rbr-summary { margin: 0; color: #374151; font-size: 14px; line-height: 1.6; }

.rbr-timeline { position: relative; margin: 0; padding: 0 0 0 22px; list-style: none; }
.rbr-timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: #ece8f8; }
.rbr-timeline li { position: relative; display: flex; flex-direction: column; padding-bottom: 14px; }
.rbr-timeline li:last-child { padding-bottom: 0; }
.rbr-timeline li::before { content: ""; position: absolute; left: -21px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--cvd-brand); }
.rbr-timeline b { font-size: 14.5px; }
.rbr-timeline span { color: #4b5563; font-size: 13.5px; }
.rbr-timeline small { color: var(--cvd-muted); font-size: 12.5px; font-weight: 600; }

.rbr-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.rbr-chips span { padding: 5px 11px; border-radius: 999px; background: #f4f0ff; color: #4c1d95; font-size: 13px; font-weight: 600; animation: rbr-up .4s ease both; }
.rbr-chips-lang span { background: #ecfdf5; color: #065f46; }
.rbr-chips em { font-style: normal; font-weight: 500; opacity: .75; }

.rbr-design { display: flex; gap: 14px; align-items: center; }
.rbr-design-thumb { flex-shrink: 0; width: 80px !important; border-radius: 8px; }
.rbr-design small { display: block; color: var(--cvd-brand); font-weight: 700; font-size: 12.5px; }
.rbr-design b { display: block; font-size: 16px; }
.rbr-design-note { display: block; color: var(--cvd-muted); font-size: 12.5px; }
.rbr-also { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.rbr-also li { display: flex; align-items: center; gap: 8px; }
.rbr-also li i { color: var(--cvd-brand); }
.rbr-also li b { margin-left: auto; }
.rbr-missing { background: #fffbeb; border-color: #fde68a; }
.rbr-missing h3 > i { color: #d97706; }
.rbr-missing ul { margin: 0 0 10px; padding-left: 18px; color: #92400e; font-size: 14px; }
.rbr-missing p { margin: 0; color: #92400e; font-size: 13px; }
.rbr-next ol { margin: 0 0 14px; padding-left: 18px; color: #4b5563; font-size: 14px; }
.rbr-next li + li { margin-top: 4px; }
.rbr-sticky { display: none; }

@media (prefers-reduced-motion: reduce) {
    .rbi-ai-ring, .rbi-doc-lines i::after, .rbi-doc-scan, .rbi-spark, .rbi-ai-badge i, .rbi-bar span::after, .rbi-steps li.active .rbi-step-ic,
    .rbi-pop, .rbi-shake, .rbi-next, .rbr-stat, .rbr-card, .rbr-chips span, .rbr-hero-confetti i { animation: none !important; }
    .rbi-doc-scan { top: 50%; }
}

/* ------------------------------------------------------------------ phones */
@media (max-width: 991.98px) {
    .rbi-layout, .rbr-grid { grid-template-columns: minmax(0, 1fr); }
    .rbr-hero { grid-template-columns: auto minmax(0, 1fr); }
    .rbr-hero-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 767.98px) {
    .rbi-steps-bar .cvd-step:not(.active) .rbi-step-label { display: none; }   /* only the current step's name on phones */
    .rbr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rbr-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: block; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--cvd-border); box-shadow: 0 -6px 20px rgba(15, 23, 42, .08); }
    .rbr-sticky a { width: 100%; justify-content: center; padding: 13px; }
    .rbr { padding-bottom: 70px; }
}
@media (max-width: 575.98px) {
    .rbi-design-thumb { display: none !important; }
    .rbi-upload { padding: 14px; }
    .rbi-drop { min-height: 220px; padding: 22px 14px; }
    .rbi-read { padding: 22px 16px; }
    .rbi-read h1 { font-size: 21px; }
    .rbi-read-actions > * { width: 100%; justify-content: center; }
    .rbi-ai { width: 140px; height: 140px; }
    .rbi-steps li { font-size: 13.5px; }
    .rbr-hero { grid-template-columns: minmax(0, 1fr); padding: 22px 18px; text-align: center; justify-items: center; }
    .rbr-hero-text h1 { font-size: 22px; }
    .rbr-hero-actions { width: 100%; flex-direction: column; }
    .rbr-hero-actions > * { width: 100%; justify-content: center; }
    .rbr-design-thumb { display: none !important; }
}

/* ------------------------------------------------------------------ file rules page (dashboard/import/rules/, shown in the modal) */
.rbru-body, .rbru-body *, .rbru-body *::before, .rbru-body *::after { box-sizing: border-box; }   /* no Bootstrap CSS on this page */
.rbru-body { min-height: 100vh; margin: 0; background: var(--cvd-bg); font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; overflow-x: hidden; }
.rbru-body button { font: inherit; cursor: pointer; }
.rbru-top { position: sticky; top: 0; z-index: 5; display: flex; gap: 14px; align-items: center; padding: 16px 22px; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--cvd-border); backdrop-filter: blur(6px); }
.rbru-top-icon { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px; background: var(--cvd-brand-grad); color: #fff; font-size: 22px; }
.rbru-top-text { flex: 1; min-width: 0; }
.rbru-top h1 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.rbru-top p { margin: 0; color: var(--cvd-muted); font-size: 13.5px; }
.rbru-close { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--cvd-border); border-radius: 12px; background: #fff; color: var(--cvd-text); font-size: 17px; }
.rbru-close:hover { background: var(--cvd-brand-soft); color: var(--cvd-brand); }
.rbru-main { display: flex; flex-direction: column; gap: 16px; max-width: 880px; margin: 0 auto; padding: 18px 22px 28px; }
.rbru-main > .rb-ad { margin: 0; }
.rbru-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rbru-q { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border: 1px solid var(--cvd-border); border-radius: 16px; background: #fff; animation: rbr-up .45s ease both; }
.rbru-q:nth-child(2) { animation-delay: 60ms; } .rbru-q:nth-child(3) { animation-delay: 120ms; } .rbru-q:nth-child(4) { animation-delay: 180ms; }
.rbru-q i { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-bottom: 6px; border-radius: 11px; background: var(--cvd-brand-soft); color: var(--cvd-brand); font-size: 18px; }
.rbru-q b { font-size: 15px; }
.rbru-q small { color: var(--cvd-muted); }
.rbru-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rbru-card { padding: 18px 20px; }
.rbru-card h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; font-size: 16px; font-weight: 800; }
.rbru-card h2 > i { color: var(--cvd-brand); }
.rbru-card ul { margin: 0; padding-left: 18px; color: #374151; font-size: 14px; }
.rbru-card li + li { margin-top: 6px; }
.rbru-ok { border-color: #bbf7d0; background: #f7fef9; } .rbru-ok h2 > i { color: #16a34a; }
.rbru-no { border-color: #fecaca; background: #fffafa; } .rbru-no h2 > i { color: #dc2626; }
.rbru-tag { padding: 2px 9px; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: 12px; font-weight: 700; }
.rbru-steps { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: #374151; }
.rbru-steps li { display: flex; gap: 12px; align-items: flex-start; }
.rbru-steps span { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--cvd-brand); color: #fff; font-size: 13px; font-weight: 800; }
.rbru-steps kbd { padding: 1px 6px; border-radius: 5px; background: #f3f4f6; border: 1px solid #e5e7eb; color: #111827; font-size: 12px; box-shadow: none; }
.rbru-how { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rbru-how > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--cvd-border); border-radius: 12px; background: #fff; font-size: 13.5px; color: #4b5563; }
.rbru-how b { color: var(--cvd-text); font-size: 14px; }
.rbru-how b i { color: var(--cvd-brand); margin-right: 4px; }
.rbru-note { display: flex; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #fffbeb; color: #92400e; font-size: 13px; }
.rbru-plain { padding-left: 0 !important; list-style: none; }
.rbru-plain li { display: flex; gap: 8px; align-items: flex-start; }
.rbru-plain i { color: #16a34a; font-size: 16px; line-height: 1.3; }
.rbru-plain .bi-dash { color: #9ca3af; }
.rbru-end { display: flex; justify-content: center; padding: 6px 0; }
.rbru-end a { padding: 13px 22px; font-size: 15.5px; }
@media (max-width: 700px) {
    .rbru-top { padding: 12px 14px; }
    .rbru-top-icon { display: none; }
    .rbru-main { padding: 14px; }
    .rbru-quick, .rbru-how { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rbru-cols { grid-template-columns: minmax(0, 1fr); }
    .rbru-end a { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .rbru-q { animation: none !important; } }
