/* Resume Builder (tools/resume-builder/). Scoped to .rb (editor) and .rp-* (preview paper). */

.rb { --rb-field: var(--bg-card-subtle); }
.rb [hidden] { display: none !important; }
/* overflow: hidden on the window would stop the preview from sticking beside the form */
.tw-frame .rb.tool-workbench { overflow: clip; }

/* ---------- hero ---------- */
.rb-hero { gap: 16px; margin-bottom: 36px; }
.rb-hero .seo-h1 { font-size: clamp(32px, 4.6vw, 54px); }
.rb-hero .lede { max-width: 520px; font-size: 18px; }
.rb-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 14px; font-weight: 600; color: var(--ink-secondary); }
.rb-trust li { display: inline-flex; align-items: center; gap: 8px; }
.rb-trust li::before { content: "✓"; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--cat-video); color: var(--cat-video-accent); font-size: 11px; font-weight: 800; }

/* ---------- upload strip ---------- */
.rb-import { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin: 16px 18px 0; padding: 12px 14px 12px 12px; border-radius: 16px; background: var(--bg-card-subtle); }
.rb-drop { display: flex; flex: 1 1 380px; align-items: center; gap: 14px; min-width: 0; border-radius: 12px; }
.rb-drop-over { outline: 2px dashed var(--accent); outline-offset: 4px; }
.rb-drop-icon { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-light); color: var(--accent-ink, var(--accent)); }
.rb-drop-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.rb-drop-text strong { font-size: 15px; font-weight: 700; color: var(--ink-primary); }
.rb-drop-text span { font-size: 13.5px; line-height: 1.4; color: var(--ink-muted); }
.rb .rb-upload { flex-direction: row; flex-shrink: 0; margin: 0; min-height: 40px; padding: 0 18px; border-radius: 999px; cursor: pointer; font-size: 14.5px; }
.rb-upload:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.rb-paste summary { list-style: none; padding: 6px 2px; font-size: 14px; font-weight: 600; color: var(--accent-ink, var(--accent)); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.rb-paste summary::-webkit-details-marker { display: none; }
.rb-paste[open] { flex-basis: 100%; order: 3; padding-top: 6px; }
.rb-paste[open] summary { margin-bottom: 8px; }
.rb-paste .btn { margin-top: 2px; border-radius: 999px; min-height: 40px; font-size: 14.5px; }
.rb-import-status { flex-basis: 100%; order: 4; margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--bg-card); color: var(--ink-primary); font-size: 14px; line-height: 1.45; }
.rb-import-status[data-kind="ok"] { background: #E3F6EC; color: #0B5B34; }
.rb-import-status[data-kind="warn"] { background: #FFF4D6; color: #6B4A00; }
.rb-import-status[data-kind="error"] { background: #FDE7E5; color: #8E1B14; }
[data-theme="dark"] .rb-import-status[data-kind="ok"] { background: #10301F; color: #8EE3B4; }
[data-theme="dark"] .rb-import-status[data-kind="warn"] { background: #3A2E0E; color: #FFD98A; }
[data-theme="dark"] .rb-import-status[data-kind="error"] { background: #3B1512; color: #FFA59E; }

/* ---------- layout: sections | the page | look and check ---------- */
.tw-frame .rb.tool-workbench { padding: 0; }
.rb .tw-bar { margin: 0; }
.rb-grid { display: grid; grid-template-columns: 236px minmax(0, 1fr) 300px; align-items: start; }
.rb-rail, .rb-side { position: sticky; top: var(--rb-stick, 138px); align-self: start; max-height: calc(100vh - var(--rb-stick, 138px) - 12px); overflow-y: auto; box-sizing: border-box; }
.rb-rail { display: flex; flex-direction: column; gap: 10px; min-height: 360px; padding: 22px 16px 18px; border-right: 1px solid var(--border-line); }
.rb-side { padding: 18px 20px 22px; border-left: 1px solid var(--border-line); }
.rb-stage { align-self: stretch; min-width: 0; padding: 16px 22px 30px; background: var(--bg-band); }
.rb-details { display: none; }

/* Details / Design / Check / Preview tabs: small screens only. */
.rb-tabs { display: none; gap: 2px; margin: 16px 18px 10px; border-bottom: 1px solid var(--border-line); }
.rb-tabs button { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border: 0; background: none; color: var(--ink-muted); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.rb-tabs button:hover { color: var(--ink-primary); }
.rb-tabs button[aria-selected="true"] { color: var(--ink-primary); }
.rb-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink-primary); }
.rb-tab-preview { display: none !important; }
.rb-tab-badge { --b-bg: #FDE7E5; --b-fg: #8E1B14; min-width: 26px; padding: 1px 7px; border-radius: 999px; background: var(--b-bg); color: var(--b-fg); font-size: 12px; font-weight: 700; line-height: 1.5; text-align: center; }
.rb-tab-badge[data-level="ok"] { --b-bg: #FFF4D6; --b-fg: #6B4A00; }
.rb-tab-badge[data-level="good"] { --b-bg: #E3F6EC; --b-fg: #0B5B34; }
[data-theme="dark"] .rb-tab-badge { --b-bg: #3B1512; --b-fg: #FFA59E; }
[data-theme="dark"] .rb-tab-badge[data-level="ok"] { --b-bg: #3A2E0E; --b-fg: #FFD98A; }
[data-theme="dark"] .rb-tab-badge[data-level="good"] { --b-bg: #10301F; --b-fg: #8EE3B4; }

.rb-step { display: flex; justify-content: flex-end; margin-top: 18px; }
.rb-next { min-height: 42px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--ink-primary); color: var(--bg-paper); font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; }
.rb-next::after { content: "→"; margin-left: 8px; }
.rb-next:hover { transform: translateY(-1px); }
.rb-step-final { display: none; }
.rb-side .rb-step { display: none; }
.rb:not([data-tab="check"]) #paneCheck, .rb[data-tab="check"] #paneDesign { display: none; }

/* Top bar: saved state, page count, share and download. It stays in view while the page scrolls. */
.rb-toolbar { position: sticky; top: var(--rb-bar, 68px); z-index: 6; display: flex; align-items: center; gap: 10px 12px; box-sizing: border-box; min-height: 58px; margin-top: 16px; padding: 8px 18px; background: var(--bg-card); border-top: 1px solid var(--border-line); border-bottom: 1px solid var(--border-line); }
/* Quiet thank-you note after a PDF is saved or shared (links to /support/; "No thanks" hides it for good). */
.rb-thanks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 12px 18px 0; padding: 12px 16px; border: 1px solid var(--border-line); border-radius: 14px; background: var(--bg-card-subtle); font-size: 14.5px; line-height: 1.45; color: var(--ink-secondary); }
.rb-thanks p { margin: 0; }
.rb-thanks-done { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--success); }
.rb-thanks-row { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.rb .rb-thanks-link { min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14.5px; text-decoration: none; }
@media (max-width: 520px) { .rb-thanks-row { margin-left: 0; } }
.rb-saved { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; font-size: 14px; font-weight: 500; color: var(--ink-secondary); }
.rb-saved svg { color: var(--cat-video-accent); }
.rb-saved[data-keep="false"] svg { display: none; }
.rb-pages { padding: 3px 10px; border-radius: 999px; background: var(--cat-video); color: var(--cat-video-accent); font-size: 12.5px; font-weight: 700; }
.rb-pages-long { background: #FFF4D6; color: #8A3B07; }
[data-theme="dark"] .rb-pages-long { background: #3A2E0E; color: #FFD98A; }
.rb-pages-long::after { content: " · aim for 1–2"; font-weight: 500; }
.rb .rb-download { min-height: 42px; padding: 0 20px; border-radius: 12px; font-size: 15.5px; gap: 8px; display: inline-flex; align-items: center; }
.rb .rb-share { min-height: 42px; padding: 0 16px; border-radius: 12px; font-size: 15px; gap: 8px; display: inline-flex; align-items: center; border: 1.5px solid var(--border-line); background: var(--bg-card); color: var(--ink-primary); }
.rb .rb-docx { min-height: 42px; padding: 0 16px; border-radius: 12px; font-size: 15px; gap: 8px; display: inline-flex; align-items: center; border: 1.5px solid var(--border-line); background: var(--bg-card); color: var(--ink-primary); }

/* ---------- details: one section open at a time ---------- */
.rb-form { display: flex; flex-direction: column; counter-reset: rbsec; min-width: 0; }
.rb-sec { counter-increment: rbsec; border-bottom: 1px solid var(--border-line); scroll-margin-top: 92px; min-width: 0; }
.rb-sec > summary { display: flex; align-items: center; gap: 12px; padding: 16px 2px; list-style: none; cursor: pointer; }
.rb-sec > summary::-webkit-details-marker { display: none; }
.rb-sec > summary::after { content: ""; flex-shrink: 0; width: 8px; height: 8px; margin: 0 4px 3px 2px; border-right: 2px solid var(--ink-muted); border-bottom: 2px solid var(--ink-muted); transform: rotate(45deg); transition: transform 0.15s; }
.rb-sec[open] > summary::after { margin-bottom: -3px; transform: rotate(225deg); }
.rb-sec > summary:hover .rb-sec-title { color: var(--accent-ink, var(--accent)); }
.rb-sec > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.rb-dot { display: grid; place-items: center; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--border-line); background: var(--bg-card); color: var(--ink-muted); font-size: 12.5px; font-weight: 700; }
.rb-dot::before { content: counter(rbsec); }
.rb-sec[data-done="true"] .rb-dot { border-color: transparent; background: #0F7A45; color: #FFFFFF; }
.rb-sec[data-done="true"] .rb-dot::before { content: "✓"; font-size: 13px; }
.rb-sec[open] .rb-dot { border-color: var(--ink-primary); color: var(--ink-primary); }
.rb-sec[open][data-done="true"] .rb-dot { border-color: transparent; color: #FFFFFF; }
.rb-sec-title { font-family: 'Bricolage Grotesque', sans-serif; font-size: 18px; font-weight: 700; color: var(--ink-primary); }
.rb-opt { font-family: var(--font-body, inherit); font-size: 12.5px; font-weight: 500; color: var(--ink-muted); }
.rb-sec[data-done="true"] > summary .rb-opt { display: none; }
.rb-sec-state { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.rb-sec-body { padding: 2px 2px 24px; }
.rb-hint { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; color: var(--ink-muted); }
.rb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.rb label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 13px; font-weight: 500; color: var(--ink-secondary); min-width: 0; }
.rb input[type="text"], .rb input[type="email"], .rb input[type="tel"], .rb textarea {
  width: 100%; box-sizing: border-box; padding: 11px 13px; border: 1px solid transparent; border-radius: 10px;
  background: var(--rb-field); color: var(--ink-primary); font: inherit; font-size: 15px; font-weight: 400; line-height: 1.45;
}
.rb input[type="text"]:hover, .rb input[type="email"]:hover, .rb input[type="tel"]:hover, .rb textarea:hover { border-color: var(--border-line); }
.rb textarea { resize: vertical; min-height: 92px; }
.rb input:focus, .rb textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.15); background: var(--bg-card); }
.rb input::placeholder, .rb textarea::placeholder { color: var(--ink-muted); opacity: 0.7; }

.rb-list { display: flex; flex-direction: column; gap: 12px; }
.rb-list:not(:empty) { margin-bottom: 12px; }
.rb-item { padding: 14px 14px 2px; border: 1px solid var(--border-line); border-radius: 14px; background: var(--bg-card); }
.rb-item-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 13px; color: var(--ink-secondary); }
.rb-item-tools { display: flex; gap: 2px; }
.rb-mini { width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--ink-muted); font: inherit; font-size: 14px; cursor: pointer; }
.rb-mini:hover:not(:disabled) { background: var(--bg-band); color: var(--ink-primary); }
.rb-mini:disabled { opacity: 0.3; cursor: default; }
.rb-item-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 12px; }
.rb-item-grid .rb-half { grid-column: span 3; }
.rb-item-grid .rb-third { grid-column: span 2; }
.rb-item-grid .rb-full, .rb-item-grid .rb-area { grid-column: 1 / -1; }
.rb-add { min-height: 38px; padding: 0 16px; border: 1px solid var(--border-line); border-radius: 999px; background: var(--bg-card); color: var(--ink-primary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.rb-add:hover { border-color: var(--ink-muted); background: var(--bg-band); }

.rb-data { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 20px 2px 4px; }
.rb .rb-check { flex-direction: row; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; color: var(--ink-primary); cursor: pointer; }
.rb-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.rb-link { padding: 4px 0; border: 0; background: none; color: var(--accent-ink, var(--accent)); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.rb-danger { color: #C2261D; }
[data-theme="dark"] .rb-danger { color: #FF7A70; }
.rb button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- design: template and colour ---------- */
.rb-styles { --tc: #17171B; --tt: #E7E7E8; padding-top: 10px; }
.rb-label { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-muted); }
.rb-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 12px; margin-bottom: 28px; }
.rb-tpl { display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 6px 6px 9px; border: 1.5px solid transparent; border-radius: 14px; background: none; font: inherit; text-align: left; cursor: pointer; }
.rb-tpl:hover { background: var(--bg-card-subtle); }
.rb-tpl[aria-checked="true"] { border-color: var(--accent); background: var(--bg-card); box-shadow: 0 0 0 3px var(--accent-light); }
.rb-tpl-name { margin-top: 5px; font-size: 13.5px; font-weight: 700; line-height: 1.2; color: var(--ink-primary); }
.rb-tpl-tag { font-size: 12px; line-height: 1.25; color: var(--ink-muted); }
/* A tiny drawing of the page: bars stand in for text, so it needs no image */
.rb-thumb { display: flex; flex-direction: column; gap: 3px; aspect-ratio: 210 / 250; padding: 9px 8px; overflow: hidden; border-radius: 6px; background: #FFFFFF; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 4px 10px -6px rgba(0, 0, 0, 0.25); }
.rb-thumb i { display: block; flex: none; }
.rb-thumb .t-name { width: 58%; height: 5px; border-radius: 2px; background: #17171B; }
.rb-thumb .t-l { width: 100%; height: 2px; border-radius: 1px; background: #C9C8CE; }
.rb-thumb .t-l.s { width: 70%; }
.rb-thumb .t-h { width: 100%; height: 5px; margin-top: 3px; border-bottom: 1px solid var(--tc); background: linear-gradient(var(--tc), var(--tc)) 0 0 / 45% 2px no-repeat; }
.rb-t-classic .t-name { margin-inline: auto; }
.rb-t-compact { gap: 2px; padding: 7px 6px; }
.rb-t-compact .t-l { height: 1.5px; }
.rb-t-minimal .t-h { border-bottom: 0; }
.rb-t-banner { padding-top: 0; }
.rb-t-banner .t-name { width: calc(100% + 16px); height: 17px; margin: 0 -8px 4px; border-radius: 0; background: var(--tc); }
.rb-t-tint .t-h { height: 6px; border-bottom: 0; background: linear-gradient(var(--tc), var(--tc)) 3px 50% / 40% 2px no-repeat, var(--tt); }
.rb-t-bar .t-h { height: 6px; border-bottom: 0; border-left: 2px solid var(--tc); background: linear-gradient(var(--tc), var(--tc)) 5px 50% / 40% 2px no-repeat; }
.rb-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 4px; }
.rb-color { width: 32px; height: 32px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 3px var(--bg-card); cursor: pointer; }
.rb-color:hover { transform: scale(1.08); }
.rb-color[aria-checked="true"] { border-color: var(--sw); }
[data-theme="dark"] .rb-color[data-color="#17171B"] { outline: 1px solid #6B6A72; }

/* ---------- check: ATS score and job ad match ---------- */
.rb-ats { --rb-ats: #C2261D; padding-top: 14px; scroll-margin-top: 90px; }
.rb-ats[data-level="ok"] { --rb-ats: #B45309; }
.rb-ats[data-level="good"] { --rb-ats: #0F7A45; }
[data-theme="dark"] .rb-ats { --rb-ats: #FF7A70; }
[data-theme="dark"] .rb-ats[data-level="ok"] { --rb-ats: #FFB547; }
[data-theme="dark"] .rb-ats[data-level="good"] { --rb-ats: #5DD39E; }
.rb-ats-head { display: flex; align-items: center; gap: 16px; }
.rb-ats-ring { --v: 0; display: grid; place-items: center; flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--rb-ats) calc(var(--v) * 1%), var(--bg-band) 0); }
.rb-ats-ring span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--bg-card); font-family: 'Bricolage Grotesque', sans-serif; font-size: 20px; font-weight: 700; color: var(--ink-primary); }
.rb-ats h3, .rb-ats-head h4 { margin: 0; font-family: 'Bricolage Grotesque', sans-serif; font-size: 18px; color: var(--ink-primary); }
.rb-ats-sum { margin: 3px 0 0; font-size: 14px; color: var(--ink-secondary); }
.rb-fixed { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: #E3F6EC; color: #0B5B34; font-size: 13.5px; line-height: 1.5; }
[data-theme="dark"] .rb-fixed { background: #10301F; color: #8EE3B4; }
.rb-fixed ul { margin: 4px 0 0; padding-left: 18px; }
.rb-ats-list { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.rb-ats-list:empty { display: none; }
.rb-ats-list li { position: relative; padding-left: 26px; font-size: 14px; line-height: 1.5; }
.rb-ats-list li::before { position: absolute; left: 0; top: 0; width: 18px; font-weight: 700; text-align: center; }
.rb-ats-todo { display: flex; flex-direction: column; gap: 1px; padding-bottom: 10px; border-bottom: 1px solid var(--border-line); color: var(--ink-secondary); }
.rb-ats-todo::before { content: "!"; color: #C2261D; }
[data-theme="dark"] .rb-ats-todo::before { color: #FF7A70; }
.rb-ats-todo strong { color: var(--ink-primary); }
.rb-ats-done { color: var(--ink-muted); }
.rb-ats-done::before { content: "✓"; color: #0F7A45; }
[data-theme="dark"] .rb-ats-done::before { color: #5DD39E; }
.rb-ats-passed { margin-top: 16px; }
.rb-ats-passed summary { padding: 4px 0; font-size: 14px; font-weight: 600; color: var(--accent-ink, var(--accent)); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.rb-ats-passed .rb-ats-list { margin-top: 10px; }
.rb-ats-note { margin: 14px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-muted); }
.rb-check-empty { display: none; margin: 18px 0 0; padding: 18px; border-radius: 14px; background: var(--bg-card-subtle); font-size: 14.5px; line-height: 1.5; color: var(--ink-secondary); }
#rbAts[hidden] + .rb-check-empty { display: block; }

.rb-match { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border-line); }
.rb-match-title { margin: 0 0 6px; font-family: 'Bricolage Grotesque', sans-serif; font-size: 18px; font-weight: 700; color: var(--ink-primary); }
.rb-match-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.rb-match-actions .btn { border-radius: 999px; min-height: 42px; font-size: 14.5px; }
.rb-match-status { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--bg-band); color: var(--ink-primary); font-size: 14px; line-height: 1.45; }
.rb-match-status[data-kind="ok"] { background: #E3F6EC; color: #0B5B34; }
.rb-match-status[data-kind="warn"] { background: #FFF4D6; color: #6B4A00; }
.rb-match-status[data-kind="error"] { background: #FDE7E5; color: #8E1B14; }
[data-theme="dark"] .rb-match-status[data-kind="ok"] { background: #10301F; color: #8EE3B4; }
[data-theme="dark"] .rb-match-status[data-kind="warn"] { background: #3A2E0E; color: #FFD98A; }
[data-theme="dark"] .rb-match-status[data-kind="error"] { background: #3B1512; color: #FFA59E; }
.rb-match-out { --rb-ats: #C2261D; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-line); }
.rb-match-out[data-level="ok"] { --rb-ats: #B45309; }
.rb-match-out[data-level="good"] { --rb-ats: #0F7A45; }
[data-theme="dark"] .rb-match-out { --rb-ats: #FF7A70; }
[data-theme="dark"] .rb-match-out[data-level="ok"] { --rb-ats: #FFB547; }
[data-theme="dark"] .rb-match-out[data-level="good"] { --rb-ats: #5DD39E; }
.rb-match-group { margin-top: 18px; }
.rb-match-group h4 { margin: 0 0 8px; font-family: 'Bricolage Grotesque', sans-serif; font-size: 15px; color: var(--ink-primary); }
.rb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rb-chips li { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--bg-band); color: var(--ink-secondary); font-size: 13px; font-weight: 600; line-height: 1.4; }
.rb-chips li small { font-size: 11px; font-weight: 500; opacity: 0.75; }
.rb-chips .rb-chip-soft { font-weight: 500; }
.rb-chips-miss li, .rb-chips li.rb-chip-miss { background: #FFF4D6; color: #6B4A00; }
.rb-chips-ok li, .rb-chips li.rb-chip-ok { background: #E3F6EC; color: #0B5B34; }
[data-theme="dark"] .rb-chips-miss li, [data-theme="dark"] .rb-chips li.rb-chip-miss { background: #3A2E0E; color: #FFD98A; }
[data-theme="dark"] .rb-chips-ok li, [data-theme="dark"] .rb-chips li.rb-chip-ok { background: #10301F; color: #8EE3B4; }
.rb-match-tip { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-secondary); }
.rb-match-notes { margin: 14px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.5; color: var(--ink-secondary); }
.rb-match-notes:empty { display: none; }

/* ---------- the page ---------- */
.rb-hintrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 14px; }
.rb-hintchip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--bg-card); font-size: 14px; font-weight: 600; color: var(--ink-secondary); }
.rb-warn { max-width: 660px; margin: 10px auto 0; padding: 10px 12px; border-radius: 10px; background: #FFF4D6; color: #6B4A00; font-size: 13.5px; line-height: 1.45; }
[data-theme="dark"] .rb-warn { background: #3A2E0E; color: #FFD98A; }
.rb-note { max-width: 660px; margin: 16px auto 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-muted); }

.rb-paper-wrap { position: relative; max-width: 660px; margin: 12px auto 0; }
/* The paper stays white in dark mode: it shows what will print. */
.rb-paper {
  --rp-accent: #17171B; --rp-tint: #E7E7E8; --rp-py: 34px; --rp-px: 36px;
  box-sizing: border-box; width: 100%; min-height: 560px; padding: var(--rp-py) var(--rp-px); background: #FFFFFF; color: #17171B;
  font-family: Helvetica, Arial, sans-serif; font-size: 12px; line-height: 1.38; border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 12px 30px -16px rgba(0, 0, 0, 0.35); overflow-wrap: anywhere;
}
/* Empty state on a phone: grey bars where the text will go, so the page is never just a blank sheet */
.rb-paper-blank::after { content: ""; display: block; height: 360px; margin-top: 30px;
  background:
    linear-gradient(#ECEBEF, #ECEBEF) 0 0 / 34% 9px no-repeat,
    linear-gradient(#F3F2F5, #F3F2F5) 0 24px / 100% 6px no-repeat,
    linear-gradient(#F3F2F5, #F3F2F5) 0 38px / 88% 6px no-repeat,
    linear-gradient(#ECEBEF, #ECEBEF) 0 82px / 28% 9px no-repeat,
    linear-gradient(#F3F2F5, #F3F2F5) 0 106px / 100% 6px no-repeat,
    linear-gradient(#F3F2F5, #F3F2F5) 0 120px / 92% 6px no-repeat,
    linear-gradient(#F3F2F5, #F3F2F5) 0 134px / 70% 6px no-repeat,
    linear-gradient(#ECEBEF, #ECEBEF) 0 178px / 30% 9px no-repeat,
    linear-gradient(#F3F2F5, #F3F2F5) 0 202px / 100% 6px no-repeat,
    linear-gradient(#F3F2F5, #F3F2F5) 0 216px / 84% 6px no-repeat,
    linear-gradient(#ECEBEF, #ECEBEF) 0 260px / 24% 9px no-repeat,
    linear-gradient(#F3F2F5, #F3F2F5) 0 284px / 96% 6px no-repeat,
    linear-gradient(#F3F2F5, #F3F2F5) 0 298px / 64% 6px no-repeat; }
.rb-empty { position: absolute; left: 50%; top: 58%; display: flex; flex-direction: column; align-items: center; gap: 2px; width: min(86%, 300px); padding: 16px 18px; transform: translate(-50%, -50%); border-radius: 16px; background: var(--bg-card); box-shadow: 0 10px 30px -10px rgba(23, 23, 27, 0.35), 0 0 0 1px var(--border-line); text-align: center; }
.rb-empty p { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--ink-primary); }

/* paper: the page preview (the PDF draws the same things: resume-pdf.js) */
.rp-head { margin-bottom: 4px; }
.rp-center .rp-head { text-align: center; }
.rp-name { font-size: 25px; font-weight: 700; line-height: 1.15; }
.rp-ph { color: #A3A2A8; }
.rp-headline { margin-top: 3px; font-size: 13.5px; color: var(--rp-accent); }
.rp-contact { margin-top: 4px; font-size: 11px; color: #54545C; white-space: pre-wrap; }
.rp-sec { margin-top: 14px; }
.rp-sec h3 { margin: 0 0 5px; padding-bottom: 3px; border-bottom: 1px solid var(--rp-accent); font-family: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--rp-accent); }
.rp-sec p { margin: 4px 0 0; }
.rp-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 12.5px; }
.rp-date { flex-shrink: 0; font-size: 11.5px; color: #54545C; }
.rp-sub { font-style: italic; color: #54545C; }
.rp-sec ul { margin: 3px 0 0; padding-left: 16px; }
.rp-sec li { margin: 1px 0; }
.rp-skill { margin: 3px 0 0; }

/* Template variations (the PDF draws the same things: resume-pdf.js) */
.rp-l-compact { font-size: 11.4px; line-height: 1.3; }
.rp-l-compact .rp-name { font-size: 23.5px; }
.rp-l-compact .rp-sec { margin-top: 10px; }
.rp-l-compact .rp-row { margin-top: 5px; }
.rp-l-minimal .rp-sec h3 { padding-bottom: 0; border-bottom: 0; }
.rp-l-tint .rp-sec h3 { padding: 3px 8px; border-bottom: 0; background: var(--rp-tint); }
.rp-l-bar .rp-sec h3 { padding: 1px 0 1px 9px; border-bottom: 0; border-left: 3px solid var(--rp-accent); }
.rp-l-banner { overflow: hidden; }
.rp-l-banner .rp-head { margin: calc(-1 * var(--rp-py)) calc(-1 * var(--rp-px)) 0; padding: var(--rp-py) var(--rp-px) 16px; background: var(--rp-accent); color: #FFFFFF; }
.rp-l-banner .rp-name, .rp-l-banner .rp-headline { color: #FFFFFF; }
.rp-l-banner .rp-contact { color: rgba(255, 255, 255, 0.88); }
.rp-l-banner .rp-ph { color: rgba(255, 255, 255, 0.6); }

/* ---------- sections list (left) ---------- */
.rb-rail .rb-label { margin: 0 0 2px 4px; }
.rb-secs { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rb-secrow { position: relative; display: flex; align-items: center; gap: 8px; min-height: 46px; box-sizing: border-box; padding: 0 10px 0 6px; border: 1px solid var(--border-line); border-radius: 12px; background: var(--bg-card); font-size: 15px; font-weight: 600; color: var(--ink-primary); }
.rb-secrow-fixed { padding-left: 12px; color: var(--ink-secondary); }
.rb-secrow.is-off { border-style: dashed; background: transparent; color: var(--ink-secondary); font-weight: 500; }
.rb-secrow.is-current { border-color: var(--accent); background: var(--accent-light); }
.rb-secrow.is-dragging { opacity: 0.4; }
.rb-lock { display: grid; place-items: center; color: var(--ink-muted); }
.rb-always { margin-left: auto; font-size: 12.5px; font-weight: 500; color: var(--ink-muted); white-space: nowrap; }
.rb-grip { display: grid; place-items: center; flex-shrink: 0; width: 24px; height: 34px; border-radius: 6px; color: var(--ink-muted); cursor: grab; }
.rb-grip:hover { color: var(--ink-primary); }
.rb-grip:active { cursor: grabbing; }
.rb-grip:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; }
.rb .rb-secname { flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.rb .rb-secrow-fixed .rb-secname { flex: 0 1 auto; cursor: default; }
.rb .rb-secname:disabled { cursor: default; }
.rb-secname:not(:disabled):hover { color: var(--accent-ink, var(--accent)); }
.rb-secdel { position: absolute; right: 52px; top: 50%; width: 26px; height: 26px; margin-top: -13px; padding: 0; border: 0; border-radius: 6px; background: var(--bg-card); color: var(--ink-muted); font: inherit; font-size: 13px; cursor: pointer; opacity: 0; }
.rb-secrow:hover .rb-secdel, .rb-secdel:focus-visible { opacity: 1; }
.rb-secdel:hover { background: var(--bg-band); color: #C2261D; }
.rb-switch { position: relative; flex-shrink: 0; width: 36px; height: 22px; padding: 0; border: 0; border-radius: 99px; background: #C9C5B8; cursor: pointer; transition: background 0.15s; }
[data-theme="dark"] .rb-switch { background: #55545B; }
.rb-switch::before { content: ""; position: absolute; inset: -10px -6px; }
.rb-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF; transition: left 0.15s; }
.rb-switch[aria-checked="true"] { background: #0F766E; }
.rb-switch[aria-checked="true"]::after { left: 17px; }
.rb-rail-note { margin: 0; padding: 0 4px; font-size: 13px; line-height: 1.45; color: var(--ink-muted); }
.rb-rail-note .rb-link { font-size: 13px; }
.rb-addsec { box-sizing: border-box; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin-top: 4px; border: 1.5px dashed var(--border-line); border-radius: 12px; background: transparent; color: var(--ink-secondary); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.rb-addsec:hover:not(:disabled) { border-color: var(--ink-muted); background: var(--bg-band); color: var(--ink-primary); }
.rb-addsec:disabled { opacity: 0.5; cursor: default; }
.rb-rail .rb-data { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: auto; padding: 16px 4px 0; border-top: 1px solid var(--border-line); }
.rb-unhide { display: block; margin: 0 0 12px; text-align: left; }

/* ---------- editing on the page ---------- */
.rp-ed { border-radius: 3px; outline: none; white-space: pre-wrap; }
.rb-paper-edit .rp-ed { cursor: text; }
.rb-paper-edit .rp-ed:hover { background: rgba(31, 94, 255, 0.07); }
.rb-paper-edit .rp-ed:focus { background: rgba(31, 94, 255, 0.1); box-shadow: 0 0 0 2px #1F5EFF; }
.rp-ed:empty::before { content: attr(data-ph); color: #A3A2A8; pointer-events: none; }
.rp-l-banner .rp-ed:empty::before { color: rgba(255, 255, 255, 0.62); }
.rb-paper-edit li.rp-ed { margin: 1px -5px; padding: 1px 5px; }
.rb-paper-edit .rp-skill.rp-ed { margin: 3px -5px 0; padding: 0 5px; }
.rb-paper-edit .rp-row { align-items: baseline; }
.rp-lines { margin: 0; }
.rb-paper-edit .rp-entry { position: relative; }
.rp-tools { position: absolute; left: calc(6px - var(--rp-px)); top: 4px; display: flex; flex-direction: column; gap: 2px; opacity: 0; transition: opacity 0.12s; }
.rp-entry:hover .rp-tools, .rp-entry:focus-within .rp-tools { opacity: 1; }
.rp-tool { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: #17171B; color: #F7F6F2; font: inherit; font-size: 12px; line-height: 1; cursor: pointer; }
.rp-tool:hover:not(:disabled) { background: #3A3A40; }
.rp-tool:disabled { opacity: 0.3; cursor: default; }
.rp-tool[data-ea="remove"] { background: #7F1D1D; }
.rp-add { display: inline-flex; align-items: center; min-height: 26px; margin-top: 8px; padding: 0 12px; border: 1px dashed #C4C3CA; border-radius: 999px; background: none; color: #6B6A72; font: inherit; font-family: 'Instrument Sans', system-ui, sans-serif; font-size: 12px; font-weight: 600; cursor: pointer; }
.rp-add:hover { border-color: #1F5EFF; background: #E7EEFF; color: #1A45C2; }
.rb-flash { animation: rb-flash 1.6s ease-out; }
@keyframes rb-flash { from { background: #FFE39A; } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .rb-flash { animation: none; background: #FFE39A; } }

/* The toolbar above the point you are on, and the tip under it */
.rb-float { position: absolute; z-index: 3; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 10px; background: #17171B; box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.45); }
.rb-float button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 30px; height: 28px; padding: 0 6px; border: 0; border-radius: 7px; background: transparent; color: #F7F6F2; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.rb-float button:hover:not(:disabled) { background: #2E2E33; }
.rb-float button:disabled { opacity: 0.35; cursor: default; }
.rb-float .rb-float-del { padding: 0 10px 0 8px; color: #FFB4A8; }
.rb-float-sep { width: 1px; height: 18px; background: #4A4950; }
.rb-tip { position: absolute; z-index: 4; width: 250px; box-sizing: border-box; padding: 14px; border-radius: 14px; background: var(--bg-card); box-shadow: 0 2px 4px rgba(23, 23, 27, 0.08), 0 20px 36px -12px rgba(23, 23, 27, 0.4), 0 0 0 1px var(--border-line); font-family: var(--font-body, inherit); }
.rb-tip-head { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; color: var(--ink-primary); }
.rb-tip-head svg { color: #B45309; }
[data-theme="dark"] .rb-tip-head svg { color: #FFB547; }
.rb-tip-text { margin: 6px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-secondary); }
.rb-tip-ex { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: #DDF5EC; color: #0B6B4F; font-size: 13px; line-height: 1.4; }
[data-theme="dark"] .rb-tip-ex { background: #10301F; color: #8EE3B4; }
.rb-tip-ok { min-height: 34px; margin-top: 10px; padding: 0 14px; border: 0; border-radius: 9px; background: var(--ink-primary); color: var(--bg-paper); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }

/* ---------- look and check (right) ---------- */
.rb-side-tabs { display: flex; gap: 4px; margin: 0 0 18px; padding: 4px; border-radius: 12px; background: var(--bg-band); }
.rb-side-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; border: 0; border-radius: 9px; background: none; color: var(--ink-muted); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.rb-side-tabs button:hover { color: var(--ink-primary); }
.rb-side-tabs button[aria-selected="true"] { background: var(--bg-card); color: var(--ink-primary); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
.rb-side .rb-tpls { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; margin-bottom: 22px; }
.rb-side .rb-tpl { align-items: center; padding: 5px 5px 7px; }
.rb-side .rb-tpl-name { text-align: center; font-size: 13px; }
.rb-side .rb-tpl-tag { display: none; }
.rb-side .rb-thumb { align-self: stretch; }
.rb-side .rb-styles { padding-top: 0; }
.rb-side .rb-ats { padding-top: 0; }
.rb-side .rb-match { margin-top: 24px; }
.rb-score { --rb-ats: #C2261D; display: flex; align-items: center; gap: 14px; width: 100%; box-sizing: border-box; margin-top: 22px; padding: 14px; border: 1px solid var(--border-line); border-radius: 16px; background: var(--bg-card); color: var(--ink-primary); font: inherit; text-align: left; cursor: pointer; }
.rb-score[data-level="ok"] { --rb-ats: #B45309; }
.rb-score[data-level="good"] { --rb-ats: #0F7A45; }
[data-theme="dark"] .rb-score { --rb-ats: #FF7A70; }
[data-theme="dark"] .rb-score[data-level="ok"] { --rb-ats: #FFB547; }
[data-theme="dark"] .rb-score[data-level="good"] { --rb-ats: #5DD39E; }
.rb-score:hover { border-color: var(--ink-muted); }
.rb-score .rb-ats-ring { width: 56px; height: 56px; }
.rb-score .rb-ats-ring span { width: 44px; height: 44px; font-size: 18px; }
.rb-score-text { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; color: var(--ink-secondary); }
.rb-score-text strong { font-size: 15.5px; color: var(--ink-primary); }
.rb-showme { align-self: flex-start; min-height: 32px; margin-top: 6px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--ink-primary); color: var(--bg-paper); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.rb-showme:hover { transform: translateY(-1px); }

/* ---------- small screens: one pane at a time, filled in through the Details form ---------- */
@media (max-width: 1079px) {
  .rb-tabs { display: flex; }
  .rb-tab-preview { display: inline-flex !important; }
  .rb-tabs button { flex: 1; justify-content: center; padding: 0 6px; }
  .rb-toolbar { display: none; position: static; margin-top: 12px; }
  .rb[data-view="preview"] .rb-toolbar { display: flex; flex-wrap: wrap; }
  .rb-saved { display: none; }
  .rb-grid { grid-template-columns: minmax(0, 1fr); }
  .rb-details { order: 1; }
  .rb-rail { order: 2; }
  .rb-rail, .rb-side, .rb-stage, .rb-details { display: none; position: static; max-height: none; min-height: 0; overflow: visible; padding: 0 18px 22px; border: 0; background: none; }
  .rb-rail-secs, .rb-side-tabs, .rb-hintrow, .rb-float, .rb-tip { display: none !important; }
  .rb-rail .rb-data { margin-top: 0; padding: 4px 2px 0; border-top: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
  .rb[data-view="edit"][data-tab="content"] .rb-details, .rb[data-view="edit"][data-tab="content"] .rb-rail { display: block; }
  .rb[data-view="edit"]:not([data-tab="content"]) .rb-side { display: block; }
  .rb[data-view="edit"][data-tab="design"] #paneCheck, .rb[data-view="edit"][data-tab="check"] #paneDesign { display: none; }
  .rb[data-view="preview"] .rb-stage { display: block; padding: 6px 12px 22px; }
  .rb-side .rb-step { display: flex; }
  .rb-side .rb-tpls { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 12px; }
  .rb-side .rb-tpl { align-items: stretch; padding: 6px 6px 9px; }
  .rb-side .rb-tpl-name { text-align: left; font-size: 13.5px; }
  .rb-side .rb-tpl-tag { display: block; }
  .rb-side .rb-styles { padding-top: 10px; }
  .rb-side .rb-ats { padding-top: 14px; }
  .rb-paper-wrap { max-width: none; padding: 10px; border-radius: 16px; background: var(--bg-band); }
  .rb-stage { background: none; }
  .rb-paper { --rp-py: 22px; --rp-px: 18px; min-height: 0; }
  .rb-step-final { display: flex; }
  .rb-warn, .rb-note { max-width: none; }
}
@media (max-width: 520px) {
  .rb-hero .lede { font-size: 16.5px; }
  .rb-trust { flex-direction: column; align-items: center; gap: 6px; }
  .rb-row { grid-template-columns: minmax(0, 1fr); }
  .rb-item-grid .rb-half, .rb-item-grid .rb-third { grid-column: 1 / -1; }
  .rb-item { padding: 12px 12px 0; }
  .rb .rb-download, .rb .rb-share, .rb .rb-docx { flex: 1 1 100%; justify-content: center; }
  .rb-toolbar { flex-direction: column; align-items: stretch; padding: 12px 12px 14px; }
  .rb .rb-download { order: 1; }
  .rb .rb-docx { order: 2; }
  .rb .rb-share { order: 3; }
  .rb-pages { order: 4; align-self: center; }
  .rb-import { margin: 12px 12px 0; padding: 12px; }
  .rb-drop { flex-wrap: wrap; }
  .rb-drop-text { flex-basis: calc(100% - 56px); }
  .rb .rb-upload { width: 100%; justify-content: center; }
  .rb-tabs { margin: 12px 12px 8px; }
  .rb-rail, .rb-side, .rb-details { padding-left: 12px; padding-right: 12px; }
  .rb-tpls { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
  .rb-side .rb-tpls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rb-next { width: 100%; }
}

/* Lists in the guide sections below the builder */
.rb-seo-list { padding-left: 1.4em; margin: 0.4em 0 1em; }
.rb-seo-list li { margin: 0.3em 0; padding-left: 0.2em; }
.rb-seo-list a { text-decoration: underline; text-underline-offset: 3px; }

/* Touch screens: 44px targets */
@media (pointer: coarse) {
  .rb-next, .rb-add, .rb-paste .btn { min-height: 44px; }
  .rb-mini { width: 44px; height: 44px; }
  .rb-link { display: inline-flex; align-items: center; min-height: 44px; }
  .rb-paste summary { display: flex; align-items: center; min-height: 44px; }
  .rb-check { display: flex; align-items: center; min-height: 44px; }
}
