/* =====================================================================
   PROFILE / ATS RESUME
   1. The candidate's page (/profile/), on top of styles.css – phone first
   2. Resume designs (.rs-doc), also used alone by the print page and the admin view
   ===================================================================== */

/* ---------- 1. Page ---------- */
body.pf-page { background: var(--grey); }
.pf-main { width: 100%; max-width: 760px; margin: 0 auto; padding: 18px 16px calc(28px + env(safe-area-inset-bottom)); }
@media (min-width: 1000px) { .pf-main { max-width: 860px; padding-top: 32px; } }
.pf-loading { padding: 40px 0; text-align: center; color: var(--muted); }
.pf-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 18px 16px; margin: 0 0 14px; }
@media (min-width: 640px) { .pf-card { padding: 24px; } }
.pf-card h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; font-size: 1.12rem; line-height: 1.3; }
.pf-card h2 .pf-num { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: var(--navy); font-size: .85rem; }
.pf-card h2 .pf-opt { font-size: .8rem; }
.pf-card > p { margin: 0 0 14px; line-height: 1.55; color: var(--muted); }
.pf-card > .btn + .btn, .pf-card > p + .btn { margin-top: 2px; }
.pf-h3 { margin: 18px 0 8px; font-size: 1rem; }
.pf-center { text-align: center; }
.pf-center-t { text-align: center; margin: 10px 0 0; }
.pf-wide { width: 100%; }
.pf-opt { font-weight: 500; font-size: .85em; color: var(--muted); }
.pf-req { color: var(--danger); }

.pf-applied { padding: 12px 14px; border-radius: 14px; background: #E3F8EC; color: #11663A; margin-bottom: 10px; font-size: .95rem; line-height: 1.45; }
.pf-nocv { padding: 12px 14px; border-radius: 14px; background: #FFF1CC; color: #6B4500; margin-bottom: 10px; font-size: .92rem; line-height: 1.5; }
.pf-intro { margin: 6px 0 14px; }
.pf-intro h1 { margin: 0 0 6px; font-size: clamp(1.35rem, 1.1rem + 1.4vw, 1.8rem); line-height: 1.2; }
.pf-intro p { margin: 0; color: var(--muted); line-height: 1.55; font-size: .95rem; }
/* Stepper: 4 equal columns, so circle centres are at 12.5% / 37.5% / 62.5% / 87.5%; the line runs between
   the first and last centre and its coloured part grows to --fill (0 → 1) */
.pf-steps { --fill: 0; position: relative; display: flex; list-style: none; margin: 16px auto 0; padding: 0; max-width: 560px; }
.pf-steps::before, .pf-steps::after { content: ""; position: absolute; top: 15px; left: 12.5%; height: 4px; border-radius: 99px; }
.pf-steps::before { right: 12.5%; background: #E3E8F1; }
.pf-steps::after { width: calc(75% * var(--fill)); background: linear-gradient(90deg, #22C55E, #16A34A 60%, var(--navy)); transition: width .7s var(--ease); }
.pf-steps li { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: .74rem; font-weight: 600; color: var(--muted); line-height: 1.2; }
.pf-steps span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 3px solid #E3E8F1; color: var(--muted); font-weight: 800; font-size: .85rem; box-sizing: border-box; transition: background .3s, border-color .3s, color .3s; }
.pf-steps .on { color: var(--ink); font-weight: 800; }
.pf-steps .on span { background: var(--navy); border-color: var(--navy); color: #fff; animation: stepPulse 2s ease-out infinite; }
.pf-steps .done { color: #15803D; }
.pf-steps .done span { background: #22C55E; border-color: #22C55E; color: #fff; }
@keyframes stepPulse { 0% { box-shadow: 0 0 0 0 rgba(10, 31, 79, .35); } 70% { box-shadow: 0 0 0 10px rgba(10, 31, 79, 0); } 100% { box-shadow: 0 0 0 0 rgba(10, 31, 79, 0); } }
@media (min-width: 640px) { .pf-steps li { font-size: .82rem; } }

/* Form errors: red field + message with ⚠, and a list above the Save button */
.pf-err:not(:empty)::before { content: "⚠ "; }
.pf-bad > label { color: var(--danger); }
.pf-field.pf-bad { padding: 10px; margin-left: -10px; margin-right: -10px; border-radius: 12px; background: #FEF2F2; }
.pf-bad .pf-chip span { border-color: #F3B4B4; }
.pf-formerr { margin: 6px 0 12px; padding: 12px 14px; border-radius: 12px; background: #FEF2F2; border: 1.5px solid #F3B4B4; color: #8E1B1B; font-size: .9rem; line-height: 1.5; }
.pf-formerr ul { margin: 6px 0 0; padding-left: 18px; }
.pf-formerr .pf-link { color: #8E1B1B; padding: 0; }

.pf-msg { padding: 11px 13px; border-radius: 12px; font-size: .93rem; line-height: 1.45; margin: 0 0 12px; }
.pf-msg.error { background: #FDECEC; color: #8E1B1B; } .pf-msg.info { background: #E6EEFF; color: #1D3F9A; } .pf-msg.ok { background: #E3F8EC; color: #11663A; }
.pf-note { padding: 10px 12px; border-radius: 12px; font-size: .92rem; } .pf-note.ok { background: #E3F8EC; color: #11663A; }
.pf-test { padding: 8px 12px; border-radius: 10px; background: #FFF1CC; color: #8A5A00; font-size: .85rem; font-weight: 600; }
.pf-link { background: none; border: 0; padding: 6px 0; font: inherit; font-weight: 700; color: var(--navy); text-decoration: underline; cursor: pointer; }
.pf-link.danger { color: var(--danger); font-size: .88rem; }
.pf-optout { text-align: center; margin: 18px 0 0; }
.pf-optout .pf-link { color: var(--muted); font-weight: 600; }
.pf-help { margin: 18px 0 0; text-align: center; font-size: .9rem; color: var(--muted); }
.pf-help a { color: var(--ink); font-weight: 700; }
.pf-foot { padding: 0 16px calc(16px + env(safe-area-inset-bottom)); text-align: center; font-size: .78rem; color: var(--muted); }
.pf-foot a { color: inherit; }
.pf-tick { width: 60px; height: 60px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: #E3F8EC; color: #11663A; font-size: 1.8rem; font-weight: 800; }
.pf-tick.off { background: #FDECEC; color: #9B1C1C; }

/* Form */
.pf-grid { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .pf-grid { grid-template-columns: 1fr 1fr; } }
.pf-field { margin: 0 0 14px; min-width: 0; }
.pf-field > label { display: block; margin: 0 0 6px; font-size: .9rem; font-weight: 700; color: var(--ink); }
.pf-field input:not([type=checkbox]):not([type=radio]), .pf-field select, .pf-win input, .pf-win select {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid #D3DAE7; border-radius: 12px; background-color: #fff;
  font: inherit; font-size: 16px; color: var(--ink); box-sizing: border-box; -webkit-appearance: none; appearance: none; }
/* Every dropdown shows an arrow (background-color above, not "background", so the arrow is not wiped out) */
.pf-page select, .pf-field select, .pf-win select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A1F4F' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.pf-field input[type=number]::-webkit-inner-spin-button { opacity: .5; }
.pf-field input:focus, .pf-field select:focus, .pf-win input:focus, .pf-win select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(10, 31, 79, .12); }
.pf-field select:disabled { opacity: .5; }
.pf-hint { margin: 6px 0 0; font-size: .82rem; color: var(--muted); line-height: 1.45; }
.pf-err { margin: 6px 0 0; font-size: .85rem; font-weight: 600; color: var(--danger); }
.pf-err:empty { display: none; }
.pf-bad input, .pf-bad select { border-color: var(--danger) !important; }
.pf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pf-check { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .9rem; font-weight: 600; }
.pf-check input { width: 20px; height: 20px; accent-color: var(--navy); }
.pf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-chip { position: relative; }
.pf-chip input { position: absolute; opacity: 0; inset: 0; }
.pf-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 99px; background: #fff; font-size: .9rem; font-weight: 600; cursor: pointer; }
.pf-chip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.pf-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(242, 179, 39, .6); }
.pf-rep { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; margin: 0 0 12px; background: #FBFCFE; }
.pf-rep-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 10px; }
.pf-sub { margin: 4px 0 8px; font-size: .9rem; font-weight: 700; }
.pf-win { display: grid; grid-template-columns: 1fr; gap: 6px; margin: 0 0 8px; }
@media (min-width: 560px) { .pf-win { grid-template-columns: 170px 1fr; } }
.pf-add { margin-top: 2px; background: var(--grey); color: var(--navy); box-shadow: none; }
.pf-saved { min-height: 1.2em; margin: 4px 0 8px; text-align: center; font-size: .82rem; color: #11663A; }

/* Free ATS check */
.pf-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 12px 0; padding: 22px 14px; border: 2px dashed var(--line); border-radius: 16px; text-align: center; cursor: pointer; background: #FBFCFE; }
.pf-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pf-drop small { color: var(--muted); }
.pf-drop.has { border-color: #22C55E; background: #F0FDF4; }
.pf-or { margin: 10px 0 0; text-align: center; font-size: .85rem; color: var(--muted); }
/* "Check my CV" and "Build my resume": stacked on phones, side by side on desktop */
.pf-choice { display: grid; gap: 0 14px; }
@media (min-width: 760px) { .pf-choice { grid-template-columns: 1fr 1fr; } .pf-choice .pf-card { display: flex; flex-direction: column; } .pf-choice .pf-card > .btn:last-child { margin-top: auto; } }
.pf-drop:hover { border-color: var(--navy); }
.pf-drop:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(242, 179, 39, .45); }
/* Buttons: clear disabled look and visible keyboard focus everywhere on these pages */
.pf-page .btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.pf-page .btn:focus-visible, .pf-link:focus-visible, .pf-design:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.pf-score { display: flex; align-items: baseline; justify-content: center; gap: 4px; margin: 6px 0; }
.pf-score b { font-size: 3.4rem; line-height: 1; font-weight: 800; } .pf-score span { color: var(--muted); font-weight: 700; }
.pf-score.good b, .pf-compare .good { color: #15803D; } .pf-score.mid b { color: #B45309; } .pf-score.bad b, .pf-compare .bad { color: #B91C1C; }
.pf-problems { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.pf-problems li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border-radius: 12px; background: #FEF2F2; font-size: .9rem; }
.pf-problems em { font-style: normal; font-weight: 800; color: #B91C1C; }
.pf-problems span { grid-column: 1 / -1; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.pf-locked { padding: 10px 12px; border-radius: 12px; background: var(--grey); font-size: .9rem; font-weight: 600; }

/* Resume step */
.pf-compare { display: flex; justify-content: center; align-items: center; gap: 18px; text-align: center; }
.pf-compare small { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pf-compare b { font-size: 2.8rem; line-height: 1.05; font-weight: 800; }
.pf-compare > span { font-size: 1.6rem; color: var(--muted); }
.pf-tips { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--grey); font-size: .9rem; }
.pf-tips summary { cursor: pointer; font-weight: 700; }
.pf-tips ul { margin: 8px 0; padding-left: 18px; line-height: 1.5; }
.pf-designs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 6px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.pf-design { flex: 0 0 auto; scroll-snap-align: start; display: grid; gap: 2px; min-width: 132px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.pf-design small { font-size: .75rem; color: var(--muted); }
.pf-design em { font-style: normal; font-size: .7rem; font-weight: 700; color: #15803D; }
.pf-design.on { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: #F5F7FF; }
.pf-frame { position: relative; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); }
.pf-scale { width: 794px; transform-origin: top left; }
.pf-frame.locked .pf-scale { user-select: none; -webkit-user-select: none; }
.pf-wm { position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(-30deg, transparent 0 70px, rgba(10, 31, 79, .07) 70px 72px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='140'%3E%3Ctext x='10' y='80' transform='rotate(-25 110 70)' font-family='Arial' font-size='22' font-weight='700' fill='rgba(10,31,79,0.16)'%3EPREVIEW · TRUSTLINE%3C/text%3E%3C/svg%3E"); }
.pf-plans { display: grid; gap: 18px 12px; grid-template-columns: 1fr; margin-top: 18px; }
@media (min-width: 600px) { .pf-plans { grid-template-columns: 1fr 1fr; } }
.pf-plan { position: relative; padding: 18px 16px; border: 1.5px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; }
.pf-plan.pop { border-color: var(--gold); background: #FFFBEF; }
.pf-pop { position: absolute; top: -11px; left: 14px; padding: 3px 10px; border-radius: 99px; background: var(--gold); color: var(--navy); font-size: .72rem; font-weight: 800; }
.pf-plan h3 { margin: 0; font-size: 1.05rem; }
.pf-price { margin: 4px 0 0; font-size: 2rem; font-weight: 800; }
.pf-when { margin: 0 0 8px; font-size: .85rem; color: var(--muted); }
.pf-plan ul { margin: 0 0 14px; padding-left: 18px; font-size: .9rem; line-height: 1.6; flex: 1; }
.pf-paid { text-align: center; }
.pf-paid h2 { justify-content: center; }
.pf-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.pf-custom { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--grey); font-size: .92rem; text-align: left; }

/* /ats-resume/ landing page: stacked on phones, pitch + form side by side on desktop */
.ats-hero { background: radial-gradient(600px 300px at 85% 0%, rgba(242, 179, 39, .22), transparent 70%), linear-gradient(160deg, #0A1F4F, #071433); color: #fff; padding: 28px 0 32px; }
.ats-hero-grid { display: grid; gap: 22px; align-items: start; }
@media (min-width: 900px) { .ats-hero { padding: 56px 0 64px; } .ats-hero-grid { grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; } }
.ats-kicker { display: inline-block; margin: 0 0 10px; padding: 5px 12px; border-radius: 99px; background: rgba(242, 179, 39, .16); color: #FFD772; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ats-pitch h1 { margin: 0 0 10px; color: #fff; font-size: clamp(1.8rem, 1.2rem + 2.6vw, 3rem); line-height: 1.1; letter-spacing: -.02em; }
.ats-pitch h1 span { color: var(--gold); }
.ats-pitch > p { margin: 0; color: rgba(226, 232, 255, .82); font-size: 1.02rem; line-height: 1.6; max-width: 34em; }
.ats-pitch b { color: #fff; }
.ats-ticks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.ats-ticks li { position: relative; padding-left: 28px; color: rgba(226, 232, 255, .9); line-height: 1.45; }
.ats-ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(34, 197, 94, .2); color: #4ADE80; font-size: .75rem; font-weight: 800; }
.ats-demo { display: none; }
@media (min-width: 900px) {
  .ats-demo { display: inline-flex; align-items: center; gap: 18px; margin-top: 24px; padding: 14px 22px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
  .ats-demo small { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: rgba(226, 232, 255, .6); }
  .ats-demo b { font-size: 2.2rem; line-height: 1; font-weight: 800; } .ats-demo .bad { color: #F87171; } .ats-demo .good { color: #4ADE80; }
  .ats-demo > span { font-size: 1.4rem; color: rgba(226, 232, 255, .5); }
}
.ats-form-card { margin: 0; color: var(--ink); box-shadow: var(--shadow-lg); }
.ats-more { padding: 30px 0 40px; }
.ats-more .container { max-width: 980px; }
.ats-h2 { margin: 0 0 14px; font-size: 1.35rem; }
.ats-steps { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 12px; }
@media (min-width: 700px) { .ats-steps { grid-template-columns: repeat(3, 1fr); } }
.ats-steps li { display: grid; gap: 4px; padding: 18px; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); color: var(--muted); font-size: .92rem; line-height: 1.5; }
.ats-steps span { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 6px; border-radius: 50%; background: var(--gold); color: var(--navy); font-weight: 800; }
.ats-steps b { color: var(--ink); font-size: 1rem; }
.ats-plans { margin-top: 0; }
.ats-plans .pf-plan { background: #fff; }
.ats-plans .pf-plan.pop { background: #FFFBEF; }

/* ---------- Wide steps: report, templates, resume, payment ---------- */
body.pf-widepage .pf-main { max-width: 1180px; }
body.pf-widepage .pf-intro { max-width: 640px; margin-left: auto; margin-right: auto; }
.pf-tick.sm { width: 40px; height: 40px; margin: 0; font-size: 1.2rem; flex: none; }

/* Working screen: skeleton score card + steps that tick one by one */
.wk { display: grid; gap: 20px; padding: 22px; }
@media (min-width: 760px) { .wk { grid-template-columns: 260px 1fr; padding: 28px; } }
.wk-skel { display: none; padding: 18px; border: 1px solid var(--line); border-radius: 16px; text-align: center; }
@media (min-width: 760px) { .wk-skel { display: block; } }
.wk-skel > i { display: block; height: 14px; margin: 10px auto 0; width: 70%; border-radius: 99px; background: #E3E8F1; animation: wkPulse 1.2s ease-in-out infinite; }
.wk-skel ul { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); text-align: left; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wk-skel li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; }
.wk-skel li span { width: 40px; height: 14px; border-radius: 99px; background: #E3E8F1; animation: wkPulse 1.2s ease-in-out infinite; }
@keyframes wkPulse { 50% { opacity: .45; } }
.wk-main { display: flex; flex-direction: column; justify-content: center; padding: 8px 4px; border-radius: 16px; }
@media (min-width: 760px) { .wk-main { background: #EEF2FA; padding: 28px 36px; } }
.wk-main h2 { margin: 0 0 18px; font-size: 1.2rem; }
.wk-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.wk-steps li { display: flex; align-items: center; gap: 12px; font-size: 1.05rem; color: #9AA3B8; transition: color .3s; }
.wk-steps li::before { content: ""; flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #CBD3E3; box-sizing: border-box; }
.wk-steps li.on { color: var(--ink); }
.wk-steps li.on::before { border-color: var(--navy); border-top-color: transparent; animation: wkSpin .8s linear infinite; }
.wk-steps li.done { color: var(--ink); }
.wk-steps li.done::before { content: "✓"; display: grid; place-items: center; border: 0; background: var(--navy); color: #fff; font-size: .8rem; font-weight: 800; animation: none; }
@keyframes wkSpin { to { transform: rotate(360deg); } }

/* Score gauge */
.gauge { position: relative; width: 170px; max-width: 100%; margin: 6px auto 0; }
.gauge svg { display: block; width: 100%; overflow: visible; }
.gauge path { fill: none; stroke-width: 11; stroke-linecap: round; }
.gauge-bg { stroke: #E3E8F1; }
.gauge-fg { stroke: var(--navy); transition: stroke-dasharray .8s var(--ease); }
.gauge.good .gauge-fg { stroke: #16A34A; } .gauge.mid .gauge-fg { stroke: #D97706; } .gauge.bad .gauge-fg { stroke: #DC2626; }
.gauge b { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 2.3rem; line-height: 1; font-weight: 800; }
.gauge b small { font-size: .9rem; color: var(--muted); font-weight: 700; }

/* Score report */
.rp { display: grid; gap: 14px; align-items: start; }
@media (min-width: 900px) { .rp { grid-template-columns: 300px 1fr; gap: 20px; } .rp-side { position: sticky; top: calc(var(--header-h) + 14px); } }
.rp-card { text-align: center; margin: 0; }
.rp-card h2 { justify-content: center; margin-bottom: 4px; }
.rp-issues { margin: 10px 0 0; font-size: .9rem; font-weight: 600; color: var(--muted); }
.rp-cats { list-style: none; margin: 14px 0 16px; padding: 12px 0 0; border-top: 1px solid var(--line); text-align: left; }
.rp-cats li { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; }
.rp-cats a { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.rp-cats a:hover { text-decoration: underline; }
.rp-pill { display: inline-block; min-width: 46px; padding: 3px 9px; border-radius: 99px; font-size: .78rem; font-weight: 800; text-align: center; }
.rp-pill.good { background: #DCFCE7; color: #15803D; } .rp-pill.mid { background: #FEF3C7; color: #B45309; } .rp-pill.bad { background: #FEE2E2; color: #B91C1C; }
.rp-main > .pf-card { margin: 0 0 14px; }
.rp-intro h2 { margin-bottom: 6px; }
.rp-intro p { margin: 0; color: var(--muted); }
.rp-sec { scroll-margin-top: calc(var(--header-h) + 14px); }
.rp-sec header { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.rp-sec h3 { margin: 0; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.rp-sec header small { margin-left: auto; color: var(--muted); font-weight: 600; font-size: .82rem; }
.rp-list { list-style: none; margin: 0; padding: 0; }
.rp-chk { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); align-items: start; }
.rp-chk:first-child { border-top: 0; }
.rp-ico { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: .75rem; font-weight: 800; }
.rp-chk.ok .rp-ico { background: #DCFCE7; color: #15803D; } .rp-chk.bad .rp-ico { background: #FEE2E2; color: #B91C1C; } .rp-chk.locked .rp-ico { background: var(--grey); font-size: .7rem; }
.rp-chk b { font-size: .95rem; }
.rp-chk p { margin: 4px 0 0; font-size: .88rem; line-height: 1.5; color: var(--muted); }
.rp-chk em { font-style: normal; font-weight: 800; font-size: .85rem; color: #B91C1C; }
.rp-chk.ok b { color: var(--muted); font-weight: 600; }
.rp-blur { filter: blur(4px); user-select: none; }
.rp-chk.locked .pf-link { padding: 4px 0 0; font-size: .85rem; }
.rp-kw { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.rp-kw p { margin: 8px 0 6px; font-size: .85rem; font-weight: 700; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-chips span { padding: 4px 10px; border-radius: 99px; font-size: .8rem; font-weight: 600; }
.rp-chips .ok { background: #DCFCE7; color: #15803D; } .rp-chips .bad { background: #FEE2E2; color: #B91C1C; } .rp-chips .lock { background: var(--grey); color: var(--muted); }
.rp-cta { text-align: center; background: linear-gradient(160deg, #FFFBEF, #fff); border: 1.5px solid var(--gold); }
.rp-cta h2 { justify-content: center; }

/* Template gallery */
.tp-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 16px; }
.tp-head h2 { margin: 0 0 4px; font-size: 1.35rem; }
.tp-head p { margin: 0; color: var(--muted); font-size: .92rem; }
.ed-score { display: inline-flex; align-items: baseline; gap: 4px; padding: 6px 12px; border-radius: 99px; background: #DCFCE7; color: #15803D; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.ed-score b { font-size: 1.05rem; }
/* minmax(0, …) + min-width: 0: the full-size A4 page inside each thumbnail must not set the column width */
.tp-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.tp-card, .co-side, .co-main, .rp-main, .ed-paper { min-width: 0; }
.tp-thumb, .co-thumb, .pf-frame { contain: paint; }
@media (max-width: 499px) { .tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tp-card .btn { font-size: .8rem; padding: 9px 6px; min-height: 40px; } .tp-info small { display: none; } }
.tp-card { display: flex; flex-direction: column; gap: 10px; padding: 10px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); border: 2px solid transparent; }
.tp-card.on { border-color: var(--gold); }
.tp-thumb { position: relative; display: block; width: 100%; aspect-ratio: 794 / 1123; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.tp-thumb:hover { border-color: var(--navy); }
.tp-thumb:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.tp-scale { width: 794px; transform-origin: top left; pointer-events: none; }
.tp-info { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.tp-info b { font-size: 1rem; }
.tp-info em { font-style: normal; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #DCFCE7; color: #15803D; }
.tp-info small { width: 100%; color: var(--muted); font-size: .8rem; }
.tp-card .btn { margin-top: auto; white-space: normal; min-height: 46px; padding: 10px 8px; font-size: .9rem; }
.tp-short { display: none; }
@media (max-width: 499px) { .tp-long { display: none; } .tp-short { display: inline; } }

/* The resume page (editor) */
.ed-bar { position: sticky; top: var(--header-h); z-index: 5; display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, .96); box-shadow: var(--shadow-sm); backdrop-filter: blur(8px); }
.ed-bar .ed-score { margin-left: auto; }
.ed-tool { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-weight: 700; font-size: .9rem; color: var(--ink); cursor: pointer; }
.ed-tool:hover { background: var(--grey); }
.ed-dl { flex: none; }
@media (max-width: 699px) { .ed-tool span { display: none; } .ed-bar .ed-dl { display: none; } }
.ed-body { display: grid; gap: 16px; align-items: start; }
@media (min-width: 1100px) { .ed-body { grid-template-columns: minmax(0, 820px) 220px; justify-content: center; } }
.ed-paper { min-width: 0; }
.ed-frame { border-radius: 4px; box-shadow: 0 18px 40px -18px rgba(10, 31, 79, .35); }
.ed-legend { margin: 10px 0 0; font-size: .82rem; color: var(--muted); text-align: center; }
.ed-legend .rs-ph { font-size: .8rem; }
.ed-rail { display: none; }
@media (min-width: 1100px) {
  .ed-rail { position: sticky; top: calc(var(--header-h) + 76px); display: grid; gap: 8px; }
  .ed-rail > button { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; }
  .ed-rail > button:first-child { background: var(--gold); border-color: var(--gold); }
  .ed-rail > button:hover { border-color: var(--navy); }
}
.ed-tips { margin-top: 8px; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: .82rem; line-height: 1.45; }
.ed-tips ul { margin: 6px 0; padding-left: 16px; color: var(--muted); }
.ed-mbar { position: sticky; bottom: 0; z-index: 5; display: grid; grid-template-columns: auto auto 1fr; gap: 8px; margin: 14px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -6px 20px rgba(10, 31, 79, .1); }
.ed-mbar > button:not(.btn) { min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-weight: 700; font-size: .88rem; color: var(--ink); }
@media (min-width: 700px) { .ed-mbar { display: none; } }
.ed-paid { margin: 0 0 14px; }
.ed-paid.flash { box-shadow: 0 0 0 3px var(--gold), var(--shadow-sm); }
.ed-paid-top { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.ed-paid-top h2 { margin: 0; }
.ed-paid-top p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.ed-paid .pf-note { margin: 10px 0 0; }

/* Placeholders inside the on-screen resume (never in downloads) */
.rs-ph { display: inline-block; padding: 0 6px; border: 1.5px dashed #A8B3C9; border-radius: 6px; color: #8A94AD; font-style: italic; font-weight: 500; background: rgba(168, 179, 201, .08); }
.rs-chips li:has(.rs-ph), .rs-contact li:has(.rs-ph) { background: none; padding: 0; }

/* Payment page */
.co { display: grid; gap: 14px; align-items: start; }
@media (min-width: 900px) { .co { grid-template-columns: 1fr 320px; gap: 20px; max-width: 980px; margin: 0 auto; } .co-side { position: sticky; top: calc(var(--header-h) + 14px); } }
.co-main, .co-side { margin: 0; }
.co-back { display: inline-block; margin-bottom: 6px; font-size: .9rem; }
.co-main > p { margin: 0 0 14px; color: var(--muted); }
.co-plans { display: grid; gap: 10px; margin: 0 0 16px; }
.co-plan { position: relative; display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: start; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; }
.co-plan.on { border-color: var(--navy); background: #F5F7FF; box-shadow: inset 0 0 0 1px var(--navy); }
.co-plan input { position: absolute; opacity: 0; }
.co-plan input:focus-visible + .co-radio { outline: 3px solid var(--gold); outline-offset: 2px; }
.co-radio { width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; border: 2px solid #A8B3C9; box-sizing: border-box; }
.co-plan.on .co-radio { border: 7px solid var(--navy); }
.co-body { display: grid; gap: 2px; }
.co-body b { font-size: 1rem; }
.co-body em { justify-self: start; font-style: normal; font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--gold); color: var(--navy); }
.co-body small { color: var(--muted); font-size: .82rem; }
.co-items { margin-top: 4px; font-size: .82rem; color: #4A5877; line-height: 1.45; }
.co-price { font-size: 1.35rem; font-weight: 800; }
.co-trust { display: grid; gap: 2px; margin: 12px 0 0; text-align: center; font-size: .85rem; font-weight: 700; }
.co-trust span { font-weight: 500; color: var(--muted); font-size: .8rem; }
.co-thumb { position: relative; width: 100%; aspect-ratio: 794 / 1123; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
@media (max-width: 899px) { .co-side { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; } }
.co-side dl { margin: 12px 0 0; display: grid; gap: 8px; font-size: .88rem; }
@media (max-width: 899px) { .co-side dl { margin: 0; } }
.co-side dl div { display: flex; justify-content: space-between; gap: 10px; }
.co-side dt { color: var(--muted); }
.co-side dd { margin: 0; font-weight: 700; }

/* ---------- 2. Resume designs (A4: 794px wide on screen, 210mm in print) ---------- */
.rs-doc { --acc: #1F4E8C; --ink2: #222; --mut: #5B6372; width: 794px; min-height: 1123px; box-sizing: border-box; padding: 48px 54px; background: #fff;
  color: var(--ink2); font: 13.5px/1.5 Inter, "Segoe UI", Arial, sans-serif; text-align: left; }
.rs-doc *, .rs-doc *::before, .rs-doc *::after { box-sizing: border-box; }
.rs-doc h1, .rs-doc h2, .rs-doc h3, .rs-doc p, .rs-doc ul { margin: 0; }
.rs-name { font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -.01em; color: var(--acc); }
.rs-headline { margin-top: 4px !important; font-size: 15px; font-weight: 600; color: var(--mut); }
.rs-contact { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px !important; padding: 0; list-style: none; font-size: 12.5px; color: var(--mut); }
.rs-contact li { display: inline-flex; align-items: center; gap: 6px; }
.rs-contact svg { width: 13px; height: 13px; fill: var(--acc); flex: none; }
.rs-sec { margin-top: 20px; }
.rs-sec h2 { margin-bottom: 8px; padding-bottom: 4px; border-bottom: 2px solid var(--acc); font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--acc); }
.rs-sec > p { line-height: 1.6; }
.rs-list, .rs-bullets { padding-left: 18px; }
.rs-list li, .rs-bullets li { margin: 2px 0; }
.rs-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
.rs-chips li { padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--acc) 12%, #fff); color: var(--acc); font-size: 12px; font-weight: 600; }
.rs-chips-soft li { background: #F1F3F6; color: var(--ink2); }
.rs-tools { margin-top: 8px !important; font-size: 12.5px; }
.rs-job { margin-bottom: 12px; break-inside: avoid; }
.rs-job-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rs-job h3 { font-size: 14.5px; font-weight: 700; color: var(--ink2); }
.rs-date { flex: none; font-size: 12px; font-weight: 600; color: var(--mut); }
.rs-org { font-size: 13px; font-weight: 600; color: var(--acc); }
.rs-bullets { margin-top: 4px !important; }
.rs-cols { display: grid; grid-template-columns: 1fr 230px; gap: 28px; }
.rs-side .rs-sec:first-child { margin-top: 20px; }
.rs-mono { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: var(--acc); color: #fff; font-size: 24px; font-weight: 800; }

/* Clarity: one column, blue */
.rs-t-clarity .rs-head { padding-bottom: 14px; border-bottom: 1px solid #E3E8F1; }
/* Horizon: colour band + two columns */
.rs-t-horizon { --acc: #0F766E; padding: 0 0 40px; }
.rs-t-horizon .rs-band { padding: 36px 54px 26px; background: var(--acc); color: #fff; }
.rs-t-horizon .rs-band .rs-name, .rs-t-horizon .rs-band .rs-headline, .rs-t-horizon .rs-band .rs-contact { color: #fff; }
.rs-t-horizon .rs-band .rs-contact svg { fill: #fff; }
.rs-t-horizon .rs-cols { padding: 0 54px; }
.rs-t-horizon .rs-side { padding-left: 20px; border-left: 1px solid #E3E8F1; }
/* Metro: dark sidebar */
.rs-t-metro { --acc: #312E81; padding: 0; }
.rs-t-metro .rs-cols { grid-template-columns: 1fr 250px; gap: 0; min-height: 1123px; }
.rs-t-metro .rs-main { padding: 48px 34px 40px 48px; }
.rs-t-metro .rs-side { order: 0; padding: 48px 26px 40px; background: #1E1B4B; color: #E0E7FF; }
.rs-t-metro .rs-side .rs-sec h2 { color: #fff; border-color: rgba(255, 255, 255, .35); }
.rs-t-metro .rs-side .rs-contact { flex-direction: column; color: #E0E7FF; }
.rs-t-metro .rs-side .rs-contact svg { fill: #A5B4FC; }
.rs-t-metro .rs-side .rs-chips li { background: rgba(255, 255, 255, .12); color: #fff; }
.rs-t-metro .rs-side .rs-mono { background: #A5B4FC; color: #1E1B4B; }
/* Elegant: serif, one column */
.rs-t-elegant { --acc: #7A2E3B; font-family: Georgia, "Times New Roman", serif; }
.rs-t-elegant .rs-head { text-align: center; padding-bottom: 14px; border-bottom: 3px double var(--acc); }
.rs-t-elegant .rs-name { font-family: "Playfair Display", Georgia, serif; font-size: 34px; font-weight: 700; }
.rs-t-elegant .rs-contact { justify-content: center; }
.rs-t-elegant .rs-sec h2 { font-family: "Playfair Display", Georgia, serif; letter-spacing: .06em; border-bottom-width: 1px; }
/* Impact: bold header + timeline */
.rs-t-impact { --acc: #E4572E; font-family: Poppins, Inter, Arial, sans-serif; }
.rs-t-impact .rs-hero { display: flex; gap: 18px; align-items: center; padding-bottom: 18px; border-bottom: 4px solid var(--acc); }
.rs-t-impact .rs-mono { border-radius: 50%; width: 76px; height: 76px; font-size: 28px; }
.rs-t-impact .rs-name { color: #1F2937; }
.rs-t-impact .rs-experience .rs-job { position: relative; padding-left: 18px; border-left: 2px solid color-mix(in srgb, var(--acc) 35%, #fff); }
.rs-t-impact .rs-experience .rs-job::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--acc); }
.rs-t-impact .rs-side { padding: 0 0 0 4px; }

/* Print / download page */
body.dl-page { margin: 0; background: #E9EDF3; font-family: Inter, Arial, sans-serif; }
.dl-bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 12px 16px; background: #0A1F4F; color: #fff; font-size: 14px; text-align: center; }
.dl-bar p { margin: 0; }
.dl-bar a { color: #FFD772; }
.dl-bar button { padding: 10px 18px; border: 0; border-radius: 10px; background: #F2B327; color: #0A1F4F; font: inherit; font-weight: 800; cursor: pointer; }
body.dl-page .rs-doc { margin: 20px auto; box-shadow: 0 10px 30px rgba(10, 31, 79, .15); }
@media (max-width: 820px) { body.dl-page { overflow-x: auto; } body.dl-page .rs-doc { margin: 12px; } }
@media print {
  @page { size: A4; margin: 0; }
  body.dl-page { background: #fff; }
  .no-print { display: none !important; }
  body.dl-page .rs-doc { margin: 0; box-shadow: none; width: 210mm; min-height: 297mm; }
  .rs-doc { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* /ats-resume/ – free CV maker: age + city side by side when there is room, consent, plain-words FAQ */
.ats-pitch > p + p { margin-top: 10px; }
.ats-two { display: grid; gap: 0 12px; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); }
.ats-consent { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 500 !important; font-size: .9rem !important; line-height: 1.45; color: var(--muted) !important; cursor: pointer; }
.ats-consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy); }
.ats-consent a { color: var(--navy); font-weight: 700; }
.ats-faq { display: grid; gap: 10px; margin: 0 0 8px; }
.ats-faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; }
.ats-faq summary { padding: 12px 0; font-weight: 700; color: var(--ink); cursor: pointer; }
.ats-faq p { margin: 0 0 14px; color: var(--muted); line-height: 1.6; }
.ats-form-card .btn-xl { min-height: 56px; }
@media (max-width: 380px) { .ats-two { grid-template-columns: 1fr; } }
