/* Sempon resume builder: touch-friendly editor, 12 resume designs, A4 print. */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- editor layout ---------- */
.resume-app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 520px); gap: 20px; align-items: start; }
.resume-tabs { display: none; }
.resume-side { position: sticky; top: 12px; display: grid; gap: 10px; min-width: 0; }
.rb-card { background: var(--surface, #fff); border: 1px solid var(--line-strong, #d9dfec); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; }
.rb-card h2 { font-size: 1.05rem; margin: 0 0 12px; }
.rb-sub { font-size: .95rem; margin: 18px 0 8px; }
.resume-form .input, .resume-form .select, .resume-form .textarea { font-size: 16px; min-height: 44px; width: 100%; }
.resume-form .btn { min-height: 44px; }
.resume-row { border: 1px dashed var(--line-strong, #cbd5e1); border-radius: 12px; padding: 12px; margin-bottom: 10px; display: grid; gap: 6px; }

.resume-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface, #fff); border: 1px solid var(--line-strong, #d9dfec); border-radius: 14px; }
.resume-actions .btn { min-height: 44px; }
.resume-status { display: flex; align-items: center; gap: 6px; flex: 1 1 100%; font-size: .85rem; color: var(--muted, #5b6478); }
.resume-status-dot { width: 9px; height: 9px; border-radius: 50%; background: #16a34a; }
.resume-status-dot.is-error { background: #dc2626; }
.resume-lock-note { margin: 0; }
.resume-preview-wrap { min-width: 0; }
.resume-preview { position: relative; overflow: hidden; background: #e8ecf3; border: 1px solid var(--line-strong, #d9dfec); border-radius: 12px; padding: 0; box-shadow: none; color: inherit; }
.resume-preview.is-locked::after { content: "SAMPLE · PAY TO DOWNLOAD"; position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font: 800 2rem/1.2 system-ui, sans-serif; letter-spacing: .08em; color: rgba(200, 40, 58, .16); transform: rotate(-24deg); pointer-events: none; }

/* design gallery */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.tpl { display: grid; gap: 4px; text-align: left; padding: 8px; border: 2px solid var(--line-strong, #d9dfec); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: inherit; min-height: 44px; -webkit-tap-highlight-color: transparent; }
.tpl.is-selected { border-color: var(--blue, #2457f0); box-shadow: 0 0 0 3px rgba(36, 87, 240, .18); }
.tpl-name { font-weight: 700; font-size: .88rem; }
.tpl-desc { font-size: .74rem; color: var(--muted, #5b6478); line-height: 1.25; }
.tt { --c: #1d4ed8; position: relative; display: block; height: 108px; border-radius: 6px; background: #fff; border: 1px solid #e2e8f0; overflow: hidden; padding: 7px; }
.tt i { display: block; height: 4px; margin-top: 5px; background: #cbd5e1; border-radius: 2px; }
.tt i.h { height: 15px; margin: 0 0 6px; background: var(--c); border-radius: 2px; }
.tt i.p { position: absolute; right: 8px; top: 8px; width: 16px; height: 16px; margin: 0; background: #94a3b8; border-radius: 50%; }
.tt i.s { width: 60%; }
.tt b { position: absolute; left: 7px; right: 7px; bottom: 7px; height: 14px; border-top: 3px solid var(--c); }
.tt-classic { --c: #1f2937; } .tt-classic i.h { height: 6px; background: transparent; border-bottom: 2px solid var(--c); border-radius: 0; width: 70%; margin: 14px auto 8px; } .tt-classic i.p { right: 50%; margin-right: -8px; top: 3px; }
.tt-modern i.h { height: 24px; margin: -7px -7px 6px; border-radius: 0; }
.tt-executive { --c: #0f172a; } .tt-executive i.p { left: 8px; right: auto; border-radius: 3px; } .tt-executive i.h { margin-left: 22px; width: 60%; height: 8px; }
.tt-technical { --c: #0f766e; background: linear-gradient(to left, #e2e8f0 0 30%, #fff 30%); }
.tt-fresher { --c: #7c3aed; } .tt-fresher i.h { border-radius: 999px; width: 50%; }
.tt-two_column { --c: #0f172a; background: linear-gradient(to right, var(--c) 0 32%, #fff 32%); } .tt-two_column i.h { background: #cbd5e1; margin-left: 34%; width: 50%; height: 8px; } .tt-two_column i.p { left: 9px; right: auto; top: 10px; background: #fff; width: 20px; height: 20px; }
.tt-ats { --c: #111; } .tt-ats i.p { display: none; } .tt-ats i.h { height: 6px; background: #111; width: 45%; }
.tt-manager { --c: #c2410c; } .tt-manager i.h { border-left: 5px solid #7c2d12; }
.tt-academic { --c: #7f1d1d; } .tt-academic i.h { height: 6px; width: 60%; margin: 6px auto; } .tt-academic i.p { display: none; }
.tt-sales { --c: #be185d; } .tt-sales i.h { height: 30px; margin: -7px -7px 6px; border-radius: 0; }
.tt-corporate { --c: #1e40af; background: linear-gradient(to right, #e0e7ff 0 32%, #fff 32%); } .tt-corporate i.h { margin-left: 34%; width: 55%; height: 8px; } .tt-corporate i.p { left: 9px; right: auto; top: 10px; }
.tt-one_page { --c: #15803d; } .tt-one_page i { height: 3px; margin-top: 3px; } .tt-one_page i.p { width: 12px; height: 12px; }

/* photo and colours */
.photo-box { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.photo-thumb { width: 88px; height: 88px; border-radius: 50%; background: #e2e8f0 center / cover no-repeat; display: grid; place-items: center; color: #64748b; font-size: .75rem; flex: none; }
.photo-thumb:not(.has-photo)::after { content: "No photo"; }
.photo-actions { display: grid; gap: 8px; justify-items: start; }
.swatches { display: flex; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; margin: 0 8px 8px 0; cursor: pointer; font-weight: 800; color: #475569; background: #f1f5f9; }
.swatch.is-selected { box-shadow: 0 0 0 3px var(--blue, #2457f0); }

/* ---------- phones and tablets ---------- */
@media (max-width: 900px) {
  .resume-app { display: block; padding-bottom: 130px; }
  .resume-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; position: sticky; top: 0; z-index: 30; padding: 8px 0; background: var(--bg, #fff); }
  .resume-tabs button { min-height: 46px; border-radius: 12px; font: 700 1rem inherit; border: 1px solid var(--line-strong, #cbd5e1); background: #fff; color: var(--ink, #0c1a3a); }
  .resume-tabs button.is-active { background: var(--ink, #0c1a3a); color: #fff; }
  .resume-app:not(.show-preview) .resume-preview-wrap { display: none; }
  .resume-app.show-preview .resume-form { display: none; }
  .resume-side { position: static; }
  .resume-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; border-radius: 16px 16px 0 0; border-width: 1px 0 0; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 24px rgba(12, 26, 58, .12); }
  .resume-actions .btn { flex: 1 1 0; min-height: 48px; padding-left: 8px; padding-right: 8px; }
  .resume-actions #resume-save { flex: 0 0 auto; }
  .resume-lock-note { padding: 0 2px; }
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- the resume sheet (A4 = 794 px wide) ---------- */
.rs { --rs-accent: #1f2937; --fs: 10.5pt; position: relative; box-sizing: border-box; width: 794px; min-height: 1123px; --px: 48px; --py: 40px; padding: var(--py) var(--px); background: #fff; color: var(--rs-text, #1b1f27); font-size: var(--fs); line-height: var(--lh, 1.45); text-align: left; font-family: var(--ff-body, var(--ff-default, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif)); word-wrap: break-word; }
.rs-classic, .rs-academic, .rs-executive { --ff-default: Georgia, "Times New Roman", serif; }
.rs-ats { --ff-default: Arial, Helvetica, sans-serif; }
.rs-fresher, .rs-sales { --ff-default: "Trebuchet MS", "Gill Sans", Verdana, sans-serif; }

.rs h1, .rs h2 { font-family: var(--ff-head, var(--ff-head-default, inherit)); }
.rs h1 { margin: 0; font-size: var(--h1, 2.3em); line-height: 1.1; letter-spacing: -.01em; }
.rs h2 { margin: 0 0 .5em; font-size: var(--h2, 1em); line-height: 1.3; text-transform: uppercase; letter-spacing: .1em; color: var(--rs-accent); border-bottom: 1.5px solid var(--rs-accent); padding-bottom: .2em; }
.rs p { margin: .15em 0; } .rs ul { margin: .2em 0 .2em 1.2em; padding: 0; } .rs li { margin: .1em 0; }
.rs-headline { margin: .25em 0 0; font-size: 1.15em; color: #475569; }
.rs-contact { margin-top: .5em; font-size: .92em; color: #475569; }
.rs-section { margin-top: var(--gap, 1.15em); }
.rs-item { margin-bottom: .8em; break-inside: avoid; }
.rs-item-head { display: flex; justify-content: space-between; gap: 12px; }
.rs-item-head span { color: #475569; white-space: nowrap; font-size: .95em; }
.rs-meta { font-style: italic; color: #475569; font-size: .95em; }
.rs-subheading { margin-top: .4em; font-weight: 700; }
.rs-tags span { display: inline-block; margin: 0 .35em .35em 0; padding: .1em .65em; border: 1px solid var(--rs-accent); border-radius: 999px; font-size: .92em; }
.rs-language { display: flex; justify-content: space-between; gap: 10px; }
.rs-language span { color: #475569; }
.rs-contact-list { list-style: none; margin: 0; padding: 0; } .rs-contact-list li { margin: .3em 0; word-break: break-all; }
.rs-header { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.rs-head-text { flex: 1; min-width: 0; }
.rs-photo { width: var(--photo, 98px); height: var(--photo, 98px); object-fit: cover; flex: none; border: 3px solid var(--rs-accent); background: #fff; }
.rs-shape-round { border-radius: 50%; } .rs-shape-rounded { border-radius: 16px; } .rs-shape-square { border-radius: 0; }

/* classic */
.rs-classic { --rs-accent: #1f2937; }
.rs-classic .rs-header { flex-direction: column-reverse; text-align: center; border-bottom: 2px solid var(--rs-accent); padding-bottom: 14px; gap: 10px; }
.rs-classic h2 { border-bottom-width: 1px; }
/* modern */
.rs-modern { --rs-accent: #1d4ed8; }
.rs-modern .rs-header { margin: calc(var(--py) * -1) calc(var(--px) * -1) 0; padding: 30px var(--px); background: var(--rs-accent); color: #fff; }
.rs-modern h1, .rs-modern .rs-headline, .rs-modern .rs-contact { color: #fff; }
.rs-modern .rs-photo { border-color: #fff; }
.rs-modern h2 { border: 0; border-left: 5px solid var(--rs-accent); padding-left: .6em; }
/* executive */
.rs-executive { --rs-accent: #0f172a; }
.rs-executive .rs-header { border-bottom: 4px solid var(--rs-accent); padding-bottom: 16px; justify-content: flex-start; }
.rs-executive h1 { text-transform: uppercase; letter-spacing: .08em; font-size: 2em; }
.rs-executive h2 { background: #f1f5f9; border: 0; border-left: 5px solid var(--rs-accent); padding: .3em .6em; }
/* technical */
.rs-technical { --rs-accent: #0f766e; }
.rs-technical .rs-header { border-bottom: 3px solid var(--rs-accent); padding-bottom: 14px; }
.rs-technical { --ff-head-default: Consolas, "SFMono-Regular", "Courier New", monospace; }
.rs-technical h2::before { content: "// "; }
.rs-columns { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 26px; }
.rs-technical .rs-side { background: #f1f5f9; padding: 6px 14px 14px; border-radius: 8px; align-self: start; }
.rs-technical .rs-side .rs-tags span { background: #fff; }
/* fresher */
.rs-fresher { --rs-accent: #7c3aed; }
.rs-fresher .rs-header { background: #f4f0ff; background: color-mix(in srgb, var(--rs-accent) 10%, #fff); padding: 20px 24px; border-radius: 18px; }
.rs-fresher h2 { display: inline-block; background: var(--rs-accent); color: #fff; border: 0; padding: .2em .9em; border-radius: 999px; }
/* two column (dark sidebar) */
.rs-two_column { --rs-accent: #0f172a; display: grid; grid-template-columns: 262px minmax(0, 1fr); padding: 0; background: linear-gradient(to right, var(--rs-accent) 0 262px, #fff 262px); }
.rs-two_column .rs-side { padding: 36px 22px; color: #fff; }
.rs-two_column .rs-side h2 { color: #fff; border-bottom-color: rgba(255, 255, 255, .4); }
.rs-two_column .rs-side .rs-tags span { border-color: rgba(255, 255, 255, .6); color: #fff; }
.rs-two_column .rs-side .rs-language span { color: #dbe4f0; }
.rs-two_column .rs-photo-wrap, .rs-corporate .rs-photo-wrap { text-align: center; margin-bottom: 14px; }
.rs-two_column { --photo: 150px; } .rs-two_column .rs-photo { border-color: #fff; }
.rs-two_column .rs-main, .rs-corporate .rs-main { padding: 40px 36px 40px 34px; }
.rs-two_column .rs-main .rs-header, .rs-corporate .rs-main .rs-header { display: block; }
.rs-two_column h1 { color: #111; }
.rs-two_column .rs-main h2 { color: #0f172a; border-bottom-color: #0f172a; }
/* ATS */
.rs-ats { --rs-accent: #111; }
.rs-ats h1 { font-size: 1.9em; }
.rs-ats h2 { color: #111; border-bottom: 1px solid #111; letter-spacing: .05em; }
.rs-ats .rs-tags span { border: 0; padding: 0; margin: 0; border-radius: 0; }
.rs-ats .rs-tags span:not(:last-child)::after { content: ", "; }
/* manager */
.rs-manager { --rs-accent: #c2410c; }
.rs-manager .rs-header { border-bottom: 3px solid var(--rs-accent); padding-bottom: 14px; }
.rs-manager .rs-photo { border-radius: 0; }
.rs-manager h2 { border: 0; border-left: 6px solid var(--rs-accent); padding: .2em .6em; background: linear-gradient(90deg, rgba(0, 0, 0, .06), transparent); }
/* academic */
.rs-academic { --rs-accent: #7f1d1d; }
.rs-academic .rs-header { flex-direction: column-reverse; text-align: center; border-bottom: 3px double var(--rs-accent); padding-bottom: 14px; gap: 10px; }
.rs-academic h2 { text-align: center; text-transform: none; font-variant: small-caps; letter-spacing: .06em; font-size: 1.15em; color: #1b1f27; border-bottom: 1px solid #1b1f27; }
/* sales */
.rs-sales { --rs-accent: #be185d; }
.rs-sales .rs-header { margin: calc(var(--py) * -1) calc(var(--px) * -1) 0; padding: 34px var(--px); background: var(--rs-accent); color: #fff; }
.rs-sales h1 { font-size: 2.8em; } .rs-sales h1, .rs-sales .rs-headline, .rs-sales .rs-contact { color: #fff; }
.rs-sales { --photo: 112px; } .rs-sales .rs-photo { border-color: #fff; }
.rs-sales h2 { border: 0; } .rs-sales h2::after { content: ""; display: block; width: 52px; height: 4px; margin-top: .3em; background: var(--rs-accent); }
.rs-sales .rs-tags span { background: var(--rs-accent); color: #fff; border: 0; }
/* corporate */
.rs-corporate { --rs-accent: #1e40af; display: grid; grid-template-columns: 250px minmax(0, 1fr); padding: 0; background: linear-gradient(to right, #eef2ff 0 250px, #fff 250px); }
.rs-corporate .rs-side { padding: 36px 20px; border-right: 3px solid var(--rs-accent); }
.rs-corporate { --photo: 140px; }
.rs-corporate h1 { color: var(--rs-accent); }
.rs-corporate .rs-main .rs-header { border-bottom: 4px solid var(--rs-accent); padding-bottom: 12px; }
/* one page */
.rs-one_page { --rs-accent: #15803d; --px: 36px; --py: 28px; --photo: 76px; font-size: calc(var(--fs) * .93); line-height: 1.35; }
.rs-one_page h1 { font-size: var(--h1, 1.9em); }
.rs-one_page .rs-section { margin-top: .8em; } .rs-one_page .rs-item { margin-bottom: .5em; } .rs-one_page h2 { font-size: .92em; }
.rs-one_page .rs-header { border-bottom: 2px solid var(--rs-accent); padding-bottom: 8px; }

/* ---------- print page ---------- */
.resume-print-page { margin: 0; background: #e8ecf3; font-family: system-ui, "Segoe UI", sans-serif; color: #0c1a3a; }
.print-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 10px 14px; background: #fff; border-bottom: 1px solid #d9dfec; position: sticky; top: 0; z-index: 10; }
.print-bar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.resume-print-page .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid #cbd5e1; background: #fff; color: #0c1a3a; font: 700 .95rem inherit; text-decoration: none; cursor: pointer; }
.resume-print-page .btn-primary { background: #2457f0; border-color: #2457f0; color: #fff; }
.print-hint { margin: 10px auto; max-width: 794px; padding: 0 14px; font-size: .9rem; color: #475569; }
.print-stage { max-width: 794px; margin: 0 auto 30px; background: #fff; box-shadow: 0 10px 30px rgba(12, 26, 58, .15); overflow: hidden; }

@page { size: A4; margin: 10mm 0; }
@media print {
  .no-print { display: none !important; }
  html, body, .resume-print-page { background: #fff !important; }
  .resume-print-page, .rs, .rs * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-stage { max-width: none; margin: 0; box-shadow: none; height: auto !important; overflow: visible; }
  .rs { width: 210mm !important; min-height: 0; transform: none !important; padding-top: 0; padding-bottom: 0; }
  .rs-two_column, .rs-corporate { padding: 0; }
  .rs-modern .rs-header, .rs-sales .rs-header { margin-top: 0; }
  .rs-item, .rs-language { break-inside: avoid; }
  .rs h2 { break-after: avoid; }
}

.is-pulsing { animation: resumePulse 1.1s ease-in-out infinite; }
@keyframes resumePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(36, 87, 240, .55); } 50% { box-shadow: 0 0 0 10px rgba(36, 87, 240, 0); } }

/* ---------- customisation classes (written after the designs so they win) ---------- */
.rs.rs-caps h1 { text-transform: uppercase; letter-spacing: .06em; }
.rs.rs-align-center .rs-header { flex-direction: column-reverse; text-align: center; justify-content: center; }
.rs.rs-align-left .rs-header { flex-direction: row; text-align: left; }
.rs.rs-align-center:not(.rs-two_column):not(.rs-corporate) .rs-header { gap: 10px; }
.rs.rs-bul-none ul { list-style: none; margin-left: 0; }
.rs.rs-bul-dash ul, .rs.rs-bul-arrow ul, .rs.rs-bul-check ul { list-style: none; margin-left: .2em; }
.rs.rs-bul-dash li, .rs.rs-bul-arrow li, .rs.rs-bul-check li { position: relative; padding-left: 1.15em; }
.rs.rs-bul-dash li::before { content: "\2013"; position: absolute; left: 0; color: var(--rs-accent); }
.rs.rs-bul-arrow li::before { content: "\203A"; position: absolute; left: .1em; font-weight: 800; color: var(--rs-accent); }
.rs.rs-bul-check li::before { content: "\2713"; position: absolute; left: 0; font-weight: 800; color: var(--rs-accent); }
.rs.rs-h2-line h2 { background: none; border: 0; border-bottom: 1.5px solid var(--rs-accent); border-radius: 0; padding: 0 0 .2em; color: var(--rs-accent); display: block; }
.rs.rs-h2-bar h2 { background: none; border: 0; border-left: 5px solid var(--rs-accent); border-radius: 0; padding: .1em 0 .1em .6em; color: var(--rs-accent); display: block; }
.rs.rs-h2-pill h2 { display: inline-block; background: var(--rs-accent); color: #fff; border: 0; border-radius: 999px; padding: .2em .9em; }
.rs.rs-h2-boxed h2 { display: block; background: color-mix(in srgb, var(--rs-accent) 12%, #fff); color: var(--rs-accent); border: 0; border-left: 4px solid var(--rs-accent); border-radius: 0; padding: .3em .6em; }
.rs.rs-h2-plain h2 { display: block; background: none; border: 0; padding: 0; color: var(--rs-accent); }
.rs-two_column.rs-h2-line .rs-side h2, .rs-two_column.rs-h2-bar .rs-side h2, .rs-two_column.rs-h2-pill .rs-side h2, .rs-two_column.rs-h2-boxed .rs-side h2, .rs-two_column.rs-h2-plain .rs-side h2 { color: #fff; border-color: rgba(255, 255, 255, .5); background: none; }

/* ---------- editor extras ---------- */
.rb-fold > summary { cursor: pointer; font-weight: 800; font-size: 1.05rem; min-height: 44px; display: flex; align-items: center; list-style: none; }
.rb-fold > summary::-webkit-details-marker { display: none; }
.rb-fold > summary::after { content: "+"; margin-left: auto; font-size: 1.4rem; color: var(--muted, #5b6478); }
.rb-fold[open] > summary::after { content: "\2212"; }
.rb-fold[open] > summary { margin-bottom: 10px; }
.rng input[type="range"] { width: 100%; height: 44px; accent-color: var(--blue, #2457f0); }
.rng output { font-weight: 700; color: var(--blue, #2457f0); margin-left: 6px; }
.swatch-custom { position: relative; display: inline-grid; place-items: center; overflow: hidden; background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red); color: #fff; font-weight: 800; }
.swatch-custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.sections-ui { display: grid; gap: 8px; }
.sec-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line-strong, #d9dfec); border-radius: 12px; background: #fff; min-height: 52px; }
.sec-row.is-off { opacity: .55; }
.sec-row label { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 600; }
.sec-row input[type="checkbox"] { width: 22px; height: 22px; }
.sec-move { width: 44px; height: 44px; border: 1px solid var(--line-strong, #cbd5e1); border-radius: 10px; background: #fff; font-size: 1.1rem; cursor: pointer; }
.sec-move:disabled { opacity: .35; }
.resume-app.is-typing .resume-actions { display: none; }
