/* Resume builder (/jobs/resume-builder/): home + editor. Uses the jobs theme tokens (theme.css --t-*). */

.rb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.rb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border: 1px solid var(--t-line-strong); border-radius: 10px;
  background: var(--t-surface); color: var(--t-ink); font: 600 14px/1 var(--t-body); cursor: pointer; text-decoration: none;
}
.rb-btn:hover { border-color: var(--t-brand); color: var(--t-brand-text); }
.rb-btn-primary, body.jb-page a.rb-btn-primary { background: var(--t-brand); border-color: var(--t-brand); color: #fff; }
.rb-btn-primary:hover, body.jb-page a.rb-btn-primary:hover { background: var(--t-brand-hover); color: #fff; }
.rb-btn-quiet { border-color: transparent; color: var(--t-muted); }
.rb-btn:disabled { opacity: .6; cursor: progress; }
.rb-btn:focus-visible, .rb-tpl:focus-visible, .rb-icon:focus-visible, .rb-add:focus-visible { outline: 2px solid var(--t-brand); outline-offset: 2px; }

/* ───────── home ───────── */

.rb-home { max-width: 1200px; margin: 0 auto; padding: 20px 24px 64px; font-family: var(--t-body); color: var(--t-ink); box-sizing: border-box; }
.rb-home-title { margin: 14px 0 0; font: 700 clamp(26px, 3.4vw, 34px)/1.15 var(--t-display); letter-spacing: -.03em; }
.rb-home-sub { margin: 6px 0 0; font-size: 15.5px; color: var(--t-ink-2); max-width: 720px; }
.rb-home-sec { margin-top: 32px; }
.rb-home-h { margin: 0 0 14px; font: 700 19px/1.3 var(--t-display); }
.rb-note { margin: 14px 0 0; color: var(--t-muted); font-size: 14px; }

.rb-mine { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.rb-mine-card { display: flex; gap: 16px; padding: 14px; border: 1px solid var(--t-line); border-radius: var(--t-r); background: var(--t-surface); box-shadow: var(--t-shadow-1); }
.rb-mine-thumb { flex: none; width: 96px; border: 1px solid var(--t-line); border-radius: 6px; overflow: hidden; align-self: flex-start; }
.rb-mine-thumb img { display: block; width: 100%; height: auto; }
.rb-mine-body { min-width: 0; display: flex; flex-direction: column; }
.rb-mine-title { font: 700 16.5px/1.3 var(--t-body); color: var(--t-ink); text-decoration: none; overflow-wrap: anywhere; }
.rb-mine-title:hover { color: var(--t-brand-text); }
.rb-mine-meta { margin: 4px 0 0; font-size: 13.5px; color: var(--t-muted); }
.rb-mine-actions { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.rb-mine-actions .rb-btn { min-height: 36px; padding: 0 12px; font-size: 13.5px; }

.rb-tpl-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.rb-tpl {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; text-align: left;
  border: 1px solid var(--t-line); border-radius: var(--t-r); background: var(--t-surface); cursor: pointer; font-family: var(--t-body); color: var(--t-ink);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.rb-tpl:hover { border-color: var(--t-brand); box-shadow: var(--t-shadow-2); transform: translateY(-2px); }
.rb-tpl:disabled { opacity: .6; cursor: progress; }
.rb-tpl-img { display: block; width: 100%; border: 1px solid var(--t-line); border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.rb-tpl-img img { display: block; width: 100%; height: auto; }
.rb-tpl-name { font: 700 16px/1.3 var(--t-body); }
.rb-tpl-about { font-size: 13.5px; color: var(--t-ink-2); line-height: 1.4; }
.rb-tpl-cta { margin-top: 8px; font-weight: 600; font-size: 14px; color: var(--t-brand-text); }

/* landing content */
.rb-btn-lg { min-height: 48px; padding: 0 22px; font-size: 15.5px; border-radius: 12px; }
a.rb-tpl { text-decoration: none; }
.rb-tone-violet { --rb-c: #6c5ce7; --rb-c2: #a594ff; --rb-bg: #f1efff; }
.rb-tone-teal   { --rb-c: #0d9488; --rb-c2: #3fd6c3; --rb-bg: #e3f8f4; }
.rb-tone-blue   { --rb-c: #1a5faa; --rb-c2: #57a0f2; --rb-bg: #e8f1fd; }
.rb-tone-orange { --rb-c: #e8590c; --rb-c2: #ffa25c; --rb-bg: #fff1e6; }
.rb-tone-pink   { --rb-c: #d6336c; --rb-c2: #f783ac; --rb-bg: #fdecf3; }
.rb-tone-green  { --rb-c: #2b8a3e; --rb-c2: #5fd47a; --rb-bg: #e9f8ee; }

/* hero: a soft colour wash, the free pill, coloured point icons, the two templates with badges */
.rb-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: center; margin-top: 12px; padding: 34px 36px; overflow: hidden;
  border: 1px solid var(--t-line); border-radius: 24px;
  background: radial-gradient(520px 300px at 0% 0%, #e6efff, transparent 65%), radial-gradient(460px 320px at 100% 100%, #ffeede, transparent 65%), linear-gradient(135deg, #f8faff 0%, #fbf7ff 100%); }
.rb-hero-kicker { display: inline-flex; gap: 8px; align-items: center; margin: 0 0 14px; padding: 6px 12px; border: 1px solid #e3defd; border-radius: 99px; background: #fff;
  color: #5b4bd6; font-size: 13px; font-weight: 700; box-shadow: 0 2px 10px rgba(108, 92, 231, .12); }
.rb-hero .rb-home-title { margin-top: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.12; }
.rb-hero-points { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; font-size: 15px; color: var(--t-ink); }
.rb-hero-points li { display: flex; gap: 10px; align-items: center; line-height: 1.35; }
.rb-hero-points i { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--rb-bg); color: var(--rb-c); font-size: 14px; }
.rb-hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.rb-hero-note { font-size: 13.5px; color: var(--t-muted); }
.rb-hero-art { position: relative; height: 380px; }
.rb-hero-art img { position: absolute; width: 58%; height: auto; border-radius: 8px; border: 1px solid var(--t-line); box-shadow: var(--t-shadow-3); background: #fff; }
.rb-hero-blob { position: absolute; inset: 24px 6% 0 10%; border-radius: 42% 58% 55% 45% / 50% 45% 55% 50%; background: linear-gradient(135deg, #c9d6ff 0%, #f6c9e4 55%, #ffd8b0 100%); opacity: .75; }
.rb-hero-badge { position: absolute; z-index: 3; display: inline-flex; gap: 7px; align-items: center; padding: 8px 12px; border-radius: 12px; background: #fff;
  box-shadow: 0 12px 28px rgba(16, 24, 40, .16); font-size: 13px; font-weight: 700; color: var(--t-ink); }
.rb-hero-badge-1 { left: 0; bottom: 34px; }
.rb-hero-badge-1 i { color: #2b8a3e; }
.rb-hero-badge-2 { right: 0; top: 8px; }
.rb-hero-badge-2 i { color: #e03131; }
.rb-hero-a { left: 4%; top: 0; z-index: 2; }
.rb-hero-b { right: 2%; top: 44px; transform: rotate(3deg); }
/* How it works / What you get: each card in its own colour (.rb-tone-*) */
.rb-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rb-steps li, .rb-features li { position: relative; padding: 22px; border: 1px solid var(--t-line); border-radius: 18px; background: var(--t-surface); transition: transform .15s, box-shadow .15s, border-color .15s; }
.rb-steps li { background: linear-gradient(180deg, var(--rb-bg) 0%, var(--t-surface) 75%); }
.rb-steps li:hover, .rb-features li:hover { transform: translateY(-2px); border-color: var(--rb-c); box-shadow: 0 14px 30px -18px var(--rb-c); }
.rb-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, var(--rb-c2), var(--rb-c)); color: #fff; font-size: 22px; box-shadow: 0 10px 20px -10px var(--rb-c); }
.rb-features .rb-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--rb-bg); color: var(--rb-c); font-size: 19px; box-shadow: none; }
.rb-step-n { display: inline-block; margin-top: 14px; padding: 3px 10px; border: 1px solid var(--t-line); border-radius: 99px; background: var(--t-surface); color: var(--rb-c); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.rb-steps h3, .rb-features h3 { margin: 12px 0 4px; font: 700 16px/1.3 var(--t-body); }
.rb-steps h3 { margin-top: 8px; }
@media (min-width: 901px) {
  /* a dashed line from one step to the next */
  .rb-steps li:not(:last-child)::after { content: ""; position: absolute; top: 48px; right: -19px; width: 20px; border-top: 2px dashed #c3cad6; }
}
@media (prefers-reduced-motion: reduce) { .rb-steps li, .rb-features li { transition: none; } .rb-steps li:hover, .rb-features li:hover { transform: none; } }
.rb-steps p, .rb-features p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--t-ink-2); }
.rb-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rb-features i { font-size: 20px; color: var(--t-brand); }
.rb-guide-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 36px; }
.rb-guide h3 { margin: 18px 0 6px; font: 700 17px/1.3 var(--t-body); }
.rb-guide p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--t-ink-2); }
.rb-faq-item { border-bottom: 1px solid var(--t-line); }
.rb-faq-item summary { cursor: pointer; padding: 14px 4px; font-weight: 600; font-size: 15.5px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.rb-faq-item summary::-webkit-details-marker { display: none; }
.rb-faq-item summary::after { content: '+'; font-size: 20px; line-height: 1; color: var(--t-muted); }
.rb-faq-item[open] summary::after { content: '−'; }
.rb-faq-item p { margin: 0 4px 16px; font-size: 15px; line-height: 1.6; color: var(--t-ink-2); }
/* "prepare for the interview": guides and mock tests as link pills */
.rb-prep-lead { margin: -6px 0 14px; color: var(--t-ink-2); font-size: 15px; }
.rb-prep-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rb-prep-col { padding: 20px; border: 1px solid var(--t-line); border-radius: 18px; background: linear-gradient(180deg, var(--rb-bg) 0%, var(--t-surface) 70%); }
.rb-prep-col h3 { display: flex; gap: 12px; align-items: center; margin: 0 0 14px; font: 700 16px/1.3 var(--t-body); }
.rb-prep-col .rb-ic { width: 40px; height: 40px; border-radius: 12px; font-size: 17px; }
.rb-prep-col ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
body.jb-page .rb-prep-col a { display: inline-flex; padding: 7px 12px; border: 1px solid var(--t-line); border-radius: 99px; background: var(--t-surface); font-size: 14px; color: var(--t-ink); text-decoration: none; }
body.jb-page .rb-prep-col a:hover { border-color: var(--rb-c); color: var(--rb-c); }
@media (max-width: 900px) { .rb-prep-cols { grid-template-columns: 1fr; } }

/* closing call to action: a navy-blue-violet band, white text and a white button */
.rb-final { position: relative; overflow: hidden; margin-top: 44px; padding: 40px 28px; border-radius: 24px; text-align: center; color: #fff;
  background: radial-gradient(420px 220px at 8% 0%, rgba(255, 255, 255, .16), transparent 60%), radial-gradient(360px 240px at 100% 100%, rgba(255, 162, 92, .35), transparent 65%), linear-gradient(120deg, #0c2e5c 0%, #1a5faa 48%, #6c5ce7 100%); }
.rb-final::before, .rb-final::after { content: ""; position: absolute; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .12); pointer-events: none; }
.rb-final::before { width: 220px; height: 220px; left: -70px; bottom: -110px; }
.rb-final::after { width: 160px; height: 160px; right: -40px; top: -60px; }
.rb-final-ic { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; background: rgba(255, 255, 255, .16); font-size: 24px; }
body.jb-page .rb-final h2 { margin: 0; font: 700 clamp(21px, 2.6vw, 28px)/1.25 var(--t-display); color: #fff; }
body.jb-page .rb-final p { margin: 10px auto 22px; max-width: 620px; color: rgba(255, 255, 255, .86); font-size: 15.5px; line-height: 1.6; }
body.jb-page .rb-final a:not(.rb-btn) { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
body.jb-page .rb-final .rb-btn-primary { min-height: 50px; padding: 0 26px; border-color: #fff; border-radius: 14px; background: #fff; color: #0c2e5c; font-size: 15.5px; box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .5); }
body.jb-page .rb-final .rb-btn-primary:hover { background: #eef4ff; color: #0c2e5c; }

/* ───────── editor ───────── */

.rb-editor { max-width: 1440px; margin: 0 auto; padding: 12px 20px 40px; font-family: var(--t-body); color: var(--t-ink); box-sizing: border-box; }
.rb-bar {
  /* sticks just below the site's own sticky header (64 px + border; 58 px on phones) */
  position: sticky; top: 65px; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 0;
  background: var(--t-bg); border-bottom: 1px solid var(--t-line);
}
.rb-back { display: inline-flex; align-items: center; gap: 6px; color: var(--t-ink-2); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.rb-back:hover { color: var(--t-brand-text); }
.rb-title-wrap { flex: 1; min-width: 0; }
.rb-title { width: 100%; max-width: 420px; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; font: 700 17px/1.2 var(--t-body); color: var(--t-ink); background: transparent; box-sizing: border-box; }
.rb-title:hover { border-color: var(--t-line); }
.rb-title:focus { border-color: var(--t-brand); outline: none; background: var(--t-surface); }
/* sample entries: "!" in the top bar, on the section and the entry */
.rb-samples { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid #f3c27a; border-radius: 999px; background: #fff7e8; color: #9a5b00; font: 600 13px/1 var(--t-body); cursor: pointer; white-space: nowrap; }
.rb-samples[hidden] { display: none; }
.rb-samples:hover { background: #ffefd2; }
.rb-samples i { color: #e08a00; font-size: 15px; }
.rb-sec-warn { display: none; color: #e08a00; font-size: 17px; }
.rb-card.has-sample .rb-sec-warn { display: inline-flex; }
.rb-card.has-sample { border-color: #f3c27a; }
.rb-sample-badge { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 3px 8px; border-radius: 999px; background: #fff7e8; color: #9a5b00; font: 600 11.5px/1 var(--t-body); }
.rb-sample-badge i { color: #e08a00; }
.rb-item.rb-is-sample, .rb-row.rb-is-sample { border-color: #f3c27a; background: #fffcf5; }
.rb-row.rb-is-sample { border: 1px dashed #f3c27a; border-radius: 10px; padding: 8px; }
.rb-card[data-sec="summary"].rb-is-sample textarea { background: #fffcf5; border-color: #f3c27a; }
@keyframes rb-flash { 0% { box-shadow: 0 0 0 0 rgba(224, 138, 0, .55); } 100% { box-shadow: 0 0 0 10px rgba(224, 138, 0, 0); } }
.rb-card.rb-flash { animation: rb-flash .9s ease-out 2; }
.rb-card { scroll-margin-top: 140px; }
.rb-status { font-size: 13px; color: var(--t-good); white-space: nowrap; }
.rb-status.is-bad { color: var(--t-accent-text); }

.rb-switch { display: none; }
.rb-layout { display: grid; grid-template-columns: minmax(380px, 1fr) minmax(420px, 1.05fr); gap: 24px; margin-top: 16px; align-items: start; }

.rb-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
#rbSections { display: flex; flex-direction: column; gap: 14px; }
.rb-card { padding: 16px; border: 1px solid var(--t-line); border-radius: var(--t-r); background: var(--t-surface); box-shadow: var(--t-shadow-1); }
.rb-card.is-hidden { background: var(--t-surface-2); }
.rb-card-h { margin: 0 0 12px; font: 700 16px/1.3 var(--t-body); }
.rb-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rb-sec-icon { flex: none; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--t-brand-tint); color: var(--t-brand-text); font-size: 14px; }
.rb-sec-title { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid transparent; border-radius: 8px; font: 700 16px/1.3 var(--t-body); color: var(--t-ink); background: transparent; }
.rb-sec-title:hover { border-color: var(--t-line); }
.rb-sec-title:focus { border-color: var(--t-brand); outline: none; background: var(--t-surface); }
.rb-sec-tools, .rb-item-tools { display: flex; gap: 2px; flex: none; }
.rb-hidden-note { margin: -4px 0 10px 8px; font-size: 13px; color: var(--t-muted); }
.rb-icon { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--t-ink-2); cursor: pointer; }
.rb-icon:hover:not(:disabled) { background: var(--t-surface-2); color: var(--t-brand-text); }
.rb-icon:disabled { opacity: .3; cursor: default; }

.rb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rb-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rb-wide { grid-column: 1 / -1; }
.rb-label { font-size: 13px; font-weight: 600; color: var(--t-ink-2); }
.rb-field input, .rb-field textarea, .rb-field select {
  width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid var(--t-line-strong); border-radius: 8px;
  font: 400 14.5px/1.4 var(--t-body); color: var(--t-ink); background: var(--t-surface);
}
.rb-field textarea { resize: vertical; min-height: 96px; }
.rb-field input:focus, .rb-field textarea:focus, .rb-field select:focus { border-color: var(--t-brand); outline: 2px solid var(--t-brand-tint); }
.rb-field select:disabled { background: var(--t-surface-2); color: var(--t-muted); }
.rb-date { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rb-check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.rb-check input { width: 18px; height: 18px; accent-color: var(--t-brand); }

.rb-photo-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--t-line); }
.rb-photo-thumb { flex: none; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--t-surface-2); color: var(--t-muted); font-size: 28px; border: 1px solid var(--t-line); }
.rb-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rb-photo-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rb-hint { margin: 0; font-size: 12.5px; color: var(--t-muted); line-height: 1.4; }
.rb-photo-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.rb-btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.rb-links { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.rb-link-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 10px; align-items: end; }

.rb-items { display: flex; flex-direction: column; gap: 10px; }
.rb-item { border: 1px solid var(--t-line); border-radius: 10px; background: var(--t-surface); }
.rb-item > summary { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; cursor: pointer; list-style: none; font-weight: 600; font-size: 14.5px; }
.rb-item > summary::-webkit-details-marker { display: none; }
.rb-item-head { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-caret { font-size: 11px; color: var(--t-muted); transition: transform .15s; }
.rb-item[open] > summary .rb-caret { transform: rotate(90deg); }
.rb-item[open] > summary { border-bottom: 1px solid var(--t-line); }
.rb-item > .rb-grid { padding: 12px; }
.rb-row { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 10px; align-items: end; }
.rb-add {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: 4px; padding: 8px 12px;
  border: 1px dashed var(--t-line-strong); border-radius: 8px; background: transparent; color: var(--t-brand-text); font: 600 14px/1 var(--t-body); cursor: pointer;
}
.rb-add:hover:not(:disabled) { border-color: var(--t-brand); background: var(--t-brand-tint); }
.rb-add:disabled { color: var(--t-muted); cursor: default; }

/* Template & colour: a collapsed bar (current choice) that opens the picker */
.rb-design { padding: 0; }
.rb-design-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; border-radius: var(--t-r); }
.rb-design-bar::-webkit-details-marker { display: none; }
.rb-design-bar:hover { background: var(--t-surface-2); }
.rb-design-bar:focus-visible { outline: 2px solid var(--t-brand); outline-offset: 2px; }
.rb-design-swatch { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--t-line-strong); }
.rb-design-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rb-design-label { font: 700 15px/1.2 var(--t-body); color: var(--t-ink); }
.rb-design-now { font-size: 13px; color: var(--t-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-design-act { flex: none; display: inline-flex; align-items: center; gap: 8px; font: 600 13.5px/1 var(--t-body); color: var(--t-brand-text); }
.rb-design-act i { font-size: 12px; transition: transform .15s; }
.rb-design-close, .rb-design[open] .rb-design-open { display: none; }
.rb-design[open] .rb-design-close { display: inline; }
.rb-design[open] .rb-design-act i { transform: rotate(180deg); }
.rb-design[open] .rb-design-bar { border-bottom: 1px solid var(--t-line); border-radius: var(--t-r) var(--t-r) 0 0; }
.rb-design-body { padding: 14px 16px 16px; }
.rb-tpls { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rb-tpl-opt { display: flex; flex-direction: column; gap: 6px; align-items: center; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--t-ink-2); }
.rb-tpl-opt input { position: absolute; opacity: 0; pointer-events: none; }
.rb-tpl-opt img { display: block; width: 100%; height: auto; border: 2px solid var(--t-line); border-radius: 6px; }
.rb-tpl-opt input:checked + img { border-color: var(--t-brand); box-shadow: 0 0 0 3px var(--t-brand-tint); }
.rb-tpl-opt input:checked ~ span { color: var(--t-brand-text); }
.rb-tpl-opt input:focus-visible + img { outline: 2px solid var(--t-brand); outline-offset: 2px; }
.rb-accents { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.rb-accent { position: relative; cursor: pointer; }
.rb-accent input { position: absolute; opacity: 0; }
.rb-accent span:not(.rb-sr) { display: block; width: 28px; height: 28px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--t-line-strong); }
.rb-accent input:checked + span { box-shadow: 0 0 0 2px var(--t-ink); }
.rb-accent input:focus-visible + span { outline: 2px solid var(--t-brand); outline-offset: 3px; }

.rb-preview { position: sticky; top: 132px; min-width: 0; }
.rb-preview-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; font-weight: 700; font-size: 14px; }
.rb-preview-note { font-weight: 400; font-size: 12.5px; color: var(--t-muted); }
/* the scrollbar's room is kept from the start, so the sheet fitted to the width (fitPreview)
   never becomes wider when a long resume adds the scrollbar (Windows scrollbars take ~15px) */
.rb-preview-scroll { max-height: calc(100vh - 190px); overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; padding: 12px; border-radius: var(--t-r); background: var(--t-surface-3); }
.rb-sheet { --rb-scale: .6; position: relative; margin: 0 auto; overflow: hidden; background: #fff; box-shadow: var(--t-shadow-2); min-height: 200px; }
.rb-sheet iframe { position: absolute; top: 0; left: 0; width: 794px; height: 1123px; border: 0; transform: scale(var(--rb-scale)); transform-origin: 0 0; background: #fff; }
.rb-sheet iframe.is-loading { visibility: hidden; }
/* the gap between two preview pages (resume_builder.js fitPreview) */
.rb-page-gap { position: absolute; left: 0; right: 0; height: 18px; margin-top: -9px; background: var(--t-surface-3); z-index: 2; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.rb-page-gap span { font: 600 10.5px/1 var(--t-body); color: var(--t-muted); background: var(--t-surface-3); padding: 0 8px; }

.rb-profile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 12px 14px; }
.rb-profile.is-linked { border-color: #b7dfc6; background: var(--t-good-tint); }
.rb-profile.is-unlinked { background: var(--t-surface-2); }
.rb-profile-row { display: flex; align-items: flex-start; gap: 10px; flex: 1 1 260px; }
.rb-profile-row i { margin-top: 3px; color: var(--t-ink-2); }
.rb-profile.is-linked .rb-profile-row i { color: var(--t-good); }
.rb-profile-row p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--t-ink); }
.rb-newpage-opt { margin-top: 12px; font-size: 13px; color: var(--t-ink-2); }
.rb-newpage-opt input { width: 16px; height: 16px; }
#rbPages.is-bad { color: var(--t-accent-text); font-weight: 600; }
.rb-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 0; border-radius: var(--t-r-lg); padding: 22px; box-shadow: var(--t-shadow-3); font-family: var(--t-body); color: var(--t-ink); }
/* centred (the site's own dialog styles reset the margins) */
.rb-dialog:modal { position: fixed; inset: 0; margin: auto; height: fit-content; box-sizing: border-box; overflow: auto; }
.rb-dialog:focus { outline: none; }
.rb-dialog::backdrop { background: rgba(15, 35, 64, .45); }
.rb-dialog h2 { margin: 0; font: 700 19px/1.3 var(--t-body); }
.rb-dialog h3 { margin: 14px 0 4px; font: 700 14px/1.3 var(--t-body); color: var(--t-ink-2); }
.rb-dialog-sub { margin: 6px 0 12px; font-size: 14px; color: var(--t-ink-2); }
.rb-dialog-list { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.5; }
.rb-dialog-list li + li { margin-top: 4px; }
.rb-dialog-skipped { color: var(--t-muted); }
.rb-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.rb-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 1000; max-width: min(92vw, 480px); padding: 12px 16px; border-radius: 10px;
  background: var(--t-ink); color: #fff; font: 500 14px/1.4 var(--t-body); box-shadow: var(--t-shadow-3);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.rb-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.rb-toast.is-bad { background: var(--t-accent-text); }

@media (max-width: 900px) {
  .rb-bar { top: 59px; }
  .rb-hero { grid-template-columns: 1fr; gap: 8px; padding: 26px 22px; }
  .rb-hero-art { display: none; }
  .rb-steps, .rb-features { grid-template-columns: 1fr 1fr; }
  .rb-guide-cols { grid-template-columns: 1fr; }
}
@media (max-width: 1023px) {
  .rb-switch { display: flex; gap: 4px; margin-top: 12px; padding: 4px; border-radius: 10px; background: var(--t-surface-2); }
  .rb-switch button { flex: 1; min-height: 40px; border: 0; border-radius: 8px; background: transparent; font: 600 14.5px/1 var(--t-body); color: var(--t-ink-2); cursor: pointer; }
  .rb-switch button[aria-selected="true"] { background: var(--t-surface); color: var(--t-ink); box-shadow: var(--t-shadow-1); }
  .rb-layout { grid-template-columns: 1fr; margin-top: 12px; }
  .rb-layout .rb-preview { display: none; position: static; }
  .rb-layout.show-preview .rb-preview { display: block; }
  .rb-layout.show-preview .rb-form { display: none; }
  .rb-preview-scroll { max-height: none; padding: 8px; }
}
@media (max-width: 600px) {
  .rb-home, .rb-editor { padding-left: 16px; padding-right: 16px; }
  .rb-hero-points { grid-template-columns: 1fr; }
  .rb-hero-cta .rb-btn { flex: 1 1 100%; }
  .rb-steps, .rb-features { grid-template-columns: 1fr; }
  .rb-tpl-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rb-tpl { padding: 8px; }
  .rb-tpl-about { display: none; }
  .rb-hero { padding: 22px 16px; border-radius: 18px; }
  .rb-final { padding: 30px 18px; border-radius: 18px; }
  .rb-steps li, .rb-features li { padding: 18px; }
  .rb-dialog { padding: 18px; }
  .rb-dialog-actions .rb-btn { flex: 1 1 auto; }
  .rb-bar { flex-wrap: wrap; gap: 8px; }
  .rb-back span { display: none; }
  .rb-title-wrap { order: 0; flex: 1 1 60%; }
  .rb-status { order: 1; }
  #rbDownload { order: 3; flex: 1 1 100%; }
  .rb-samples { order: 2; }
  .rb-card { scroll-margin-top: 200px; }
  .rb-grid { grid-template-columns: 1fr; }
  .rb-row { grid-template-columns: 1fr 1fr; }
  .rb-row .rb-item-tools { grid-column: 1 / -1; justify-content: flex-end; }
  .rb-link-row { grid-template-columns: 1fr; }
  .rb-tpls { grid-template-columns: repeat(3, 1fr); }
  .rb-mine-card { flex-direction: column; }
  .rb-mine-thumb { width: 120px; }
}
