:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-2: #f0edff;
  --ink: #111322;
  --muted: #6b7280;
  --line: #e6e8f0;
  --brand: #5a3ff2;
  --brand-dark: #3d2ac8;
  --green: #16a34a;
  --yellow: #ffd21e;
  --shadow: 0 18px 50px rgba(31, 35, 66, 0.1);
  --radius: 8px;
  font-family: Inter, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.mobile-menu {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  padding: 10px 0 2px;
  border-top: 1px solid #eef0f6;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: #111827;
  font-weight: 800;
}

.mobile-menu a:hover,
.mobile-menu a:focus-visible {
  color: var(--brand);
}

.brand {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0;
}

.brand span,
.hero h1 span {
  color: var(--brand);
}

.desktop-nav {
  display: none;
}

.mobile-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

.header-cta {
  display: none;
}

.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
}

.search-toggle::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 3px solid currentColor;
  border-radius: 999px;
}

.search-toggle::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(10px, 10px) rotate(45deg);
}

.menu-toggle::before {
  content: "";
  width: 22px;
  height: 16px;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 22px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 0 6px / 22px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 0 12px / 22px 3px no-repeat;
  border-radius: 4px;
}

.menu-toggle[aria-expanded="true"]::before {
  width: 20px;
  height: 20px;
  background:
    linear-gradient(currentColor, currentColor) center / 22px 3px no-repeat;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"]::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-45deg);
}

.primary-action,
.cv-button,
.load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  background: var(--brand);
  color: white;
  font-weight: 800;
  cursor: pointer;
  min-height: 44px;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.primary-action {
  padding: 0 16px;
  box-shadow: 0 10px 26px rgba(90, 63, 242, 0.24);
}

.primary-action:hover,
.cv-button:hover,
.load-more:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

main {
  width: min(100%, 1860px);
  margin: 0 auto;
  padding: 18px 18px 56px;
}

.hero {
  position: relative;
  display: block;
  width: min(100%, 1080px);
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  overflow: hidden;
  box-shadow: 0 14px 38px rgba(42, 46, 74, 0.06);
}

.hero-overview {
  display: block;
}

.hero-banner-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  border: 1px solid #ece8ff;
  border-radius: 12px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero h1,
.category-strip h2,
.cv-panel h2,
.admin-panel h2 {
  margin: 0;
  line-height: 1.02;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 250px;
  font-size: clamp(2rem, 10vw, 2.9rem);
}

.hero-copy p:last-child,
.cv-panel p,
.admin-intro p {
  max-width: 560px;
  color: #273044;
  line-height: 1.5;
}

.hero-copy p:last-child {
  max-width: 265px;
  margin-bottom: 0;
  font-size: 1.02rem;
}

.hero-visual {
  display: none;
}

.hero-person {
  position: absolute;
  right: 8px;
  bottom: 0;
  width: 102px;
  height: 126px;
  border-radius: 58px 58px 12px 12px;
  background:
    radial-gradient(circle at 54% 21%, #ffd0b6 0 15%, transparent 16%),
    radial-gradient(circle at 52% 11%, #10234d 0 23%, transparent 24%),
    linear-gradient(135deg, #6047ff 0%, #725ff6 55%, #3c2aa6 100%);
  box-shadow: 0 22px 45px rgba(70, 47, 181, 0.22);
}

.phone-card {
  position: absolute;
  left: 14px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 58px;
  min-height: 58px;
  border-radius: 10px;
  background: var(--brand);
  box-shadow: 0 16px 28px rgba(90, 63, 242, 0.28);
}

.phone-card span {
  width: 24px;
  height: 20px;
  border: 3px solid white;
  border-radius: 4px;
}

.phone-card strong {
  display: none;
}

.phone-card small {
  display: none;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 1080px);
  margin: 14px auto 0;
}

.hero-stats article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 64px;
  padding: 10px;
  border: 1px solid #eceef7;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(29, 36, 66, 0.05);
}

.hero-stats strong {
  font-size: 1.18rem;
  line-height: 1;
}

.hero-stats small,
.section-title p,
label span {
  color: var(--muted);
  font-size: 0.76rem;
}

.hero-stats small {
  white-space: nowrap;
  line-height: 1;
}

.stat-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #f3f0ff;
}

.stat-icon::before,
.stat-icon::after {
  content: "";
  position: absolute;
}

.stat-icon.briefcase::before {
  width: 17px;
  height: 13px;
  border: 2px solid var(--brand);
  border-radius: 5px;
}

.stat-icon.briefcase::after {
  width: 7px;
  height: 5px;
  top: 9px;
  border: 2px solid var(--brand);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}

.stat-icon.sun {
  background: #ecfbf0;
}

.stat-icon.sun::before {
  width: 13px;
  height: 13px;
  border: 2px solid #16a34a;
  border-radius: 999px;
}

.stat-icon.sun::after {
  width: 25px;
  height: 25px;
  background:
    linear-gradient(#16a34a, #16a34a) center 0 / 1.5px 5px no-repeat,
    linear-gradient(#16a34a, #16a34a) center 100% / 1.5px 5px no-repeat,
    linear-gradient(90deg, #16a34a, #16a34a) 0 center / 5px 1.5px no-repeat,
    linear-gradient(90deg, #16a34a, #16a34a) 100% center / 5px 1.5px no-repeat;
}

.stat-icon.calendar {
  background: #fff4e6;
}

.stat-icon.calendar::before {
  width: 25px;
  height: 25px;
  background: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='4' y='5.5' width='16' height='14.5' rx='3' stroke='%23F97316' stroke-width='2'/%3E%3Cpath d='M8 3.75V7.25M16 3.75V7.25M4.5 10H19.5' stroke='%23F97316' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M8.25 14H8.35M12 14H12.1M15.75 14H15.85M8.25 17H8.35M12 17H12.1' stroke='%23F97316' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 25px 25px no-repeat;
}

.stat-icon.calendar::after {
  display: none;
}

.stat-icon.pin {
  background: #edf4ff;
}

.stat-icon.pin::before {
  width: 15px;
  height: 15px;
  border: 2px solid #2563eb;
  border-radius: 999px 999px 999px 2px;
  transform: translateY(-1px) rotate(-45deg);
}

.stat-icon.pin::after {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #2563eb;
  transform: translateY(-1px);
}

.toolbar {
  display: grid;
  gap: 18px;
  padding: 28px 0 18px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.7rem, 7vw, 2.25rem);
}

.section-title p {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0 0;
}

.section-title p span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
}

.filters,
.offer-form,
.cv-form {
  display: grid;
  gap: 12px;
}

.filters label {
  font-weight: 600;
}

.filters label > span {
  font-weight: 600;
}

.filters {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.search-field {
  grid-column: 1 / -1;
  position: relative;
}

.search-field::before {
  content: "";
  position: absolute;
  left: 15px;
  bottom: 15px;
  width: 15px;
  height: 15px;
  border: 2px solid #64748b;
  border-radius: 999px;
  pointer-events: none;
}

.search-field::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: 13px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: #64748b;
  transform: rotate(45deg);
  pointer-events: none;
}

.search-field input {
  padding-left: 42px;
}

.search-field input::placeholder {
  font-size: 0.86rem;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d7dbea;
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  padding: 0 13px;
  outline: none;
}

.filters input,
.filters select {
  border-color: #dfe3ef;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(28, 34, 58, 0.04);
  font-weight: 400;
}

textarea {
  min-height: 92px;
  padding-top: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(90, 63, 242, 0.12);
}

.template-picker {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.template-picker legend {
  margin-bottom: 8px;
  font-weight: 900;
}

.template-picker label {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 10px;
  min-height: 68px;
  padding: 12px;
  border: 1px solid #d8d9ff;
  border-radius: var(--radius);
  background: #fbfbff;
  cursor: pointer;
}

.template-picker input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
  accent-color: var(--brand);
}

.template-picker span {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.template-picker strong {
  color: var(--ink);
}

.offers-grid {
  display: grid;
  gap: 18px;
}

.offer-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  font-family: Inter, sans-serif;
}

.offer-art {
  position: relative;
  display: flex;
  align-items: end;
  min-height: 188px;
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(5, 13, 35, 0.82), rgba(5, 13, 35, 0.16)),
    var(--offer-bg, linear-gradient(135deg, #0f4f8f, #5a3ff2));
  background-size: cover;
  background-position: center;
  color: white;
  isolation: isolate;
}

.offer-art::after {
  content: "";
  position: absolute;
  inset: auto 8px 8px auto;
  width: 45%;
  height: 72%;
  border-radius: 50% 50% 12px 12px;
  background:
    radial-gradient(circle at 52% 24%, rgba(255, 255, 255, 0.85) 0 10%, transparent 11%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.06));
  opacity: 0.88;
  z-index: -1;
}

.offer-art.has-image::after {
  display: none;
}

.offer-art h3 {
  max-width: 260px;
  margin: 0 0 8px;
  font-size: clamp(2.05rem, 9.2vw, 2.7rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: none;
}

.offer-art p {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
}

.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  border-radius: 5px;
  background: var(--yellow);
  color: #241b00;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.offer-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.company-block {
  display: grid;
  gap: 4px;
  margin-bottom: 4px;
}

.company-label {
  color: #6b7280;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.company {
  margin: 0;
  color: #111827;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.25;
}

.offer-section-title {
  display: block;
  margin: 20px 0 10px;
  color: #111827;
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.offer-copy ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #1f2937;
  font-size: 0.94rem;
  line-height: 1.35;
}

.offer-copy li {
  position: relative;
  padding-left: 20px;
}

.offer-copy li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.08em;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
}

.contact-row {
  display: grid;
  gap: 8px;
}

.contact-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
  color: #111827;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.contact-box::before {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
}

.contact-box.phone::before {
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%2316a34a' d='M16 3.2A12.7 12.7 0 0 0 5.1 22.4L3.7 28.8l6.5-1.5A12.7 12.7 0 1 0 16 3.2Z'/%3E%3Cpath fill='%23fff' d='M22.9 18.9c-.4-.2-2.2-1.1-2.5-1.2-.3-.1-.6-.2-.8.2-.2.4-.9 1.2-1.1 1.4-.2.2-.4.3-.8.1-.4-.2-1.5-.6-2.8-1.7-1-1-1.7-2.1-1.9-2.5-.2-.4 0-.6.2-.8l.5-.6c.2-.2.2-.4.3-.6.1-.2 0-.5 0-.7-.1-.2-.8-1.9-1.1-2.6-.3-.7-.6-.6-.8-.6h-.7c-.2 0-.7.1-1 .5-.3.4-1.3 1.3-1.3 3.1s1.3 3.6 1.5 3.9c.2.2 2.6 4 6.3 5.6.9.4 1.6.6 2.1.8.9.3 1.7.2 2.4.1.7-.1 2.2-.9 2.5-1.8.3-.9.3-1.6.2-1.8-.1-.2-.4-.3-.8-.5Z'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

.contact-box.email::before {
  width: 16px;
  height: 12px;
  border: 2px solid var(--brand);
  border-radius: 3px;
  background:
    linear-gradient(35deg, transparent 45%, var(--brand) 46% 54%, transparent 55%) left top / 50% 100% no-repeat,
    linear-gradient(-35deg, transparent 45%, var(--brand) 46% 54%, transparent 55%) right top / 50% 100% no-repeat;
}

.application-note {
  margin: 0 0 10px;
  color: #4b5563;
  font-size: 0.88rem;
  line-height: 1.45;
  padding: 10px 12px;
  border-left: 3px solid var(--brand);
  border-radius: 10px;
  background: #f8fafc;
}

.cv-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--brand);
  background: white;
  color: var(--brand);
  border-radius: 12px;
  font-size: 0.94rem;
  font-weight: 700;
}

.cv-button:hover {
  color: white;
}

.offer-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding-top: 18px;
}

.share-offer {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.share-offer::before {
  content: "";
  width: 20px;
  height: 20px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11A2.99 2.99 0 1 0 15 5c0 .24.04.47.09.7L8.04 9.81A3 3 0 1 0 8.04 14l7.12 4.18c-.05.21-.08.43-.08.65A2.92 2.92 0 1 0 18 16.08Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.share-offer:hover,
.share-offer:focus-visible {
  border-color: #c7c2ff;
  color: var(--brand);
  box-shadow: 0 8px 20px rgba(90, 63, 242, 0.1);
  transform: translateY(-1px);
}

.share-tools {
  position: relative;
}

.share-tooltip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 11;
  padding: 7px 10px;
  border-radius: 9px;
  background: #111827;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
  white-space: nowrap;
}

.share-tools:hover .share-tooltip,
.share-tools:focus-within .share-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.share-tools:has(.share-menu:not([hidden])) .share-tooltip {
  opacity: 0;
}

.share-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 12;
  display: grid;
  min-width: 168px;
  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.14);
}

.share-menu[hidden] {
  display: none;
}

.share-menu a,
.share-menu button {
  display: flex;
  align-items: center;
  min-height: 40px;
  width: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #111827;
  padding: 0 10px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.share-menu a:hover,
.share-menu a:focus-visible,
.share-menu button:hover,
.share-menu button:focus-visible {
  background: #f4f2ff;
  color: var(--brand);
}

.load-more {
  display: block;
  min-width: min(100%, 260px);
  margin: 22px auto 0;
  padding: 0 22px;
  background: white;
  color: var(--brand);
  border: 1px solid #d8d9ff;
}

.empty-state {
  padding: 28px;
  border: 1px dashed #c7c8e8;
  border-radius: var(--radius);
  background: white;
  text-align: center;
}

.category-strip,
.cv-panel,
.admin-panel {
  margin-top: 34px;
  padding: 22px;
  border-radius: var(--radius);
  background: white;
  border: 1px solid var(--line);
}

.category-strip {
  display: none;
  gap: 18px;
  scroll-margin-top: 96px;
}

.category-pills {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.category-pills button {
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid #d8d9ff;
  border-radius: 999px;
  background: #fbfbff;
  color: var(--brand);
  padding: 0 15px;
  font-weight: 900;
  cursor: pointer;
}

.cv-panel {
  display: block;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.cv-cta-image-link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(61, 42, 200, 0.12);
}

.cv-cta-image-link picture,
.cv-cta-image-link img {
  display: block;
  width: 100%;
  height: auto;
}

.admin-panel {
  display: grid;
  gap: 20px;
}

.admin-login {
  display: grid;
  min-height: calc(100vh - 70px);
  place-items: center;
  padding: 24px;
  background: #f7f8fc;
}

.admin-login[hidden] {
  display: none;
}

.admin-login-card {
  display: grid;
  gap: 16px;
  width: min(100%, 420px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.admin-login-card h1 {
  margin: 0;
  font-size: 1.6rem;
}

.admin-login-card label {
  display: grid;
  gap: 8px;
  color: #374151;
  font-weight: 800;
}

.admin-login-card input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
}

.admin-login-error {
  margin: 0;
  color: #b91c1c;
  font-weight: 800;
}

.offer-form {
  grid-template-columns: 1fr;
}

.wide {
  grid-column: 1 / -1;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(12, 15, 26, 0.62);
}

.modal[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: min(100%, 720px);
  max-height: 92vh;
  overflow: auto;
  border-radius: 14px;
  background: white;
  padding: 22px;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  cursor: pointer;
  font-weight: 900;
}

.cv-preview {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #d8d9ff;
  border-radius: var(--radius);
  background: #fbfbff;
}

.cv-preview h3 {
  margin: 0 0 4px;
  font-size: 1.7rem;
}

.cv-preview.is-photo {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  align-items: start;
}

.cv-preview.is-modern {
  border-left: 6px solid var(--brand);
}

.cv-photo {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  background: #e8e9f7;
}

.cv-preview p {
  color: #2f3748;
  line-height: 1.45;
}

.cv-builder-page {
  background: #f5f6fb;
}

.cv-builder-shell {
  max-width: 1500px;
}

.cv-builder-intro {
  display: grid;
  gap: 10px;
  padding: 24px 4px 18px;
}

.cv-builder-intro h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1.02;
}

.cv-builder-intro p:last-child {
  max-width: 680px;
  margin: 0;
  color: #333b4c;
  line-height: 1.5;
}

.cv-builder-layout {
  display: grid;
  gap: 18px;
  align-items: start;
}

.cv-builder-form {
  display: grid;
  gap: 16px;
}

.form-block,
.cv-preview-panel,
.payment-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 10px 28px rgba(20, 25, 50, 0.05);
}

.form-block {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.block-title {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
}

.block-title > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--brand);
  font-weight: 900;
}

.block-title h2,
.preview-toolbar h2 {
  margin: 0;
  font-size: 1.2rem;
}

.block-title p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.dynamic-list {
  display: grid;
  gap: 12px;
}

.dynamic-item {
  position: relative;
  padding: 14px;
  border: 1px solid #e2e5f2;
  border-radius: var(--radius);
  background: #fbfbff;
}

.remove-item {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 30px;
  height: 30px;
  border: 1px solid #d9dcec;
  border-radius: 999px;
  background: white;
  color: #384156;
  cursor: pointer;
  font-weight: 900;
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid #d8d9ff;
  border-radius: var(--radius);
  background: white;
  color: var(--brand);
  padding: 0 16px;
  font-weight: 900;
  cursor: pointer;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #30394c;
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--brand);
}

.builder-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.cv-preview-panel {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 16px;
  padding: 16px;
}

.preview-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.cv-paper {
  min-height: 620px;
  border: 1px solid #e5e7f1;
  background: white;
  color: #131827;
  padding: 24px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.cv-paper-header {
  display: grid;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 2px solid #1f2937;
}

.cv-paper-header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 7vw, 2.4rem);
  line-height: 1;
}

.cv-paper-header strong {
  display: block;
  margin-top: 5px;
  color: var(--brand);
  font-size: 1.02rem;
}

.cv-paper-header p,
.cv-paper section p {
  color: #343d50;
  line-height: 1.45;
}

.cv-paper section {
  margin-top: 18px;
}

.cv-paper h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cv-entry {
  display: grid;
  gap: 3px;
  margin-top: 12px;
}

.cv-entry span,
.cv-entry small {
  color: #4b5563;
}

.cv-entry p {
  margin: 4px 0 0;
}

.cv-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cv-skills span {
  padding: 6px 9px;
  border-radius: 6px;
  background: #eef0ff;
  color: #312e81;
  font-weight: 800;
  font-size: 0.86rem;
}

.template-modern {
  border-top: 8px solid var(--brand);
}

.template-modern .cv-paper-header {
  border-bottom-color: var(--brand);
}

.template-photo .cv-paper-header {
  grid-template-columns: 96px 1fr;
  align-items: center;
  border-bottom-color: #d8d9ff;
}

.cv-paper-photo {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  object-fit: cover;
  background: #e7e9f5;
}

.payment-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  background:
    radial-gradient(circle at 96% 8%, rgba(90, 63, 242, 0.1), transparent 28%),
    white;
}

.payment-card p {
  margin: 0;
  color: #4b5563;
  line-height: 1.45;
}

.payment-note {
  color: var(--green) !important;
  font-weight: 900;
}

.admin-page {
  background: #f6f7fb;
}

.admin-shell {
  max-width: 1500px;
}

.admin-hero {
  display: grid;
  gap: 10px;
  padding: 24px 4px 18px;
}

.admin-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1.02;
}

.admin-hero p:last-child {
  max-width: 680px;
  margin: 0;
  color: #333b4c;
  line-height: 1.5;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.admin-stats article {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 10px 28px rgba(20, 25, 50, 0.05);
}

.admin-stats strong {
  font-size: clamp(1.7rem, 7vw, 2.4rem);
}

.admin-stats span {
  color: var(--muted);
  font-weight: 800;
}

.admin-layout {
  display: grid;
  gap: 18px;
  align-items: start;
}

.admin-form,
.admin-list-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 10px 28px rgba(20, 25, 50, 0.05);
}

.admin-list-head {
  display: grid;
  gap: 12px;
}

.admin-list-head h2 {
  margin: 0;
}

.admin-offer-list {
  display: grid;
  gap: 12px;
}

.admin-offer-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid #e1e4f0;
  border-radius: var(--radius);
  background: #fbfbff;
}

.admin-thumb {
  width: 92px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(6, 15, 38, 0.5), rgba(90, 63, 242, 0.2)),
    linear-gradient(135deg, #3d2ac8, #98b5ff);
  background-position: center;
  background-size: cover;
}

.admin-status {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8f9ed;
  color: #166534;
  font-size: 0.74rem;
  font-weight: 900;
}

.admin-status[data-status="paused"] {
  background: #fff7dd;
  color: #8a5b00;
}

.admin-status[data-status="expired"] {
  background: #fee2e2;
  color: #991b1b;
}

.admin-offer-item h3,
.admin-offer-item p {
  margin: 0;
}

.admin-offer-item p,
.admin-offer-item small {
  color: var(--muted);
}

.admin-item-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-item-actions button {
  min-height: 38px;
  border: 1px solid #d8d9ff;
  border-radius: var(--radius);
  background: white;
  color: var(--brand);
  cursor: pointer;
  font-weight: 900;
}

.admin-item-actions [data-action="delete"] {
  border-color: #fecaca;
  color: #b91c1c;
}

@media (min-width: 760px) {
  .site-header {
    grid-template-columns: 220px 1fr auto;
    padding: 16px 54px;
  }

  .mobile-actions {
    display: none;
  }

  .mobile-menu {
    display: none !important;
  }

  .header-cta {
    display: inline-flex;
  }

  .desktop-nav {
    display: flex;
    justify-content: center;
    gap: 42px;
    font-weight: 800;
  }

  .desktop-nav a {
    position: relative;
    padding: 10px 0;
  }

  .desktop-nav a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -16px;
    height: 3px;
    background: var(--brand);
  }

  main {
    padding: 14px 54px 70px;
  }

  .hero-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.95fr);
    gap: 18px;
    align-items: stretch;
    max-width: 1450px;
    margin: 0 auto;
    padding: 12px;
    border: 1px solid #ece8ff;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(42, 46, 74, 0.06);
  }

  .hero {
    width: 100%;
    margin: 0;
    grid-template-columns: none;
    min-height: 0;
    border-radius: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .hero-banner-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    border: 0;
    border-radius: 10px;
  }

  .hero-stats {
    width: 100%;
    margin: 0;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 12px;
  }

  .hero-stats article {
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 74px;
    padding: 12px 14px;
    border-color: rgba(229, 231, 235, 0.9);
    box-shadow: 0 10px 24px rgba(31, 35, 66, 0.06);
  }

  .hero-stats small {
    white-space: normal;
    line-height: 1.15;
  }

  .hero .hero-copy.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .hero-visual {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    min-height: 164px;
  }

  .hero .eyebrow {
    display: block;
  }

  .hero h1 {
    max-width: 560px;
    font-size: clamp(2rem, 4vw, 3.5rem);
  }

  .hero-copy p:last-child {
    max-width: 560px;
  }

  .phone-card {
    left: 6%;
    top: 8px;
    width: 118px;
    min-height: 104px;
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow);
  }

  .phone-card span {
    width: 32px;
    height: 42px;
    border: 4px solid var(--brand);
    border-radius: 8px;
  }

  .phone-card strong,
  .phone-card small {
    display: block;
  }

  .phone-card strong {
    color: var(--brand);
  }

  .phone-card small {
    color: var(--muted);
    font-weight: 700;
  }

  .hero-person {
    right: 12%;
    width: 118px;
    height: 138px;
  }

  .hero-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 0;
  }

  .hero-stats article {
    grid-template-columns: 42px 1fr;
    min-height: 96px;
  }

  .toolbar {
    grid-template-columns: 1fr 1.9fr;
    align-items: end;
    padding-top: 28px;
  }

  .filters {
    grid-template-columns: minmax(250px, 1.5fr) repeat(4, minmax(130px, 1fr));
    align-items: end;
  }

  .search-field {
    grid-column: auto;
  }

  .offers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .offer-form,
  .cv-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cv-panel,
  .category-strip {
    grid-template-columns: 1fr auto;
  }

  .cv-panel {
    max-width: 1450px;
    margin-right: auto;
    margin-left: auto;
    padding: 12px;
    border-radius: 14px;
    background: #f5f4ff;
  }

  .cv-panel .cv-cta-image-link {
    width: min(100%, 820px);
    margin-right: auto;
    margin-left: auto;
  }

  .category-strip {
    display: grid;
  }

  .cv-builder-layout {
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.82fr);
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .template-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .builder-actions {
    grid-template-columns: auto auto;
    justify-content: end;
  }

  .admin-layout {
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.78fr);
  }

  .admin-list-panel {
    position: sticky;
    top: 86px;
  }

  .admin-list-head {
    grid-template-columns: 1fr 170px;
    align-items: end;
  }

  .admin-item-actions {
    grid-template-columns: repeat(4, auto);
    justify-content: start;
  }
}

@media (min-width: 1160px) {
  .offers-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .offer-art {
    min-height: 150px;
  }

  .offer-art h3 {
    font-size: 2.05rem;
  }
}

@media print {
  body.is-printing-cv {
    background: #ffffff;
  }

  body.is-printing-cv .cv-flow-header,
  body.is-printing-cv .cv-steps,
  body.is-printing-cv .step-intro,
  body.is-printing-cv .checkout-card,
  body.is-printing-cv .change-template {
    display: none !important;
  }

  body.is-printing-cv .cv-flow-shell,
  body.is-printing-cv .cv-flow-form,
  body.is-printing-cv .cv-flow-step[data-step="3"],
  body.is-printing-cv .cv-preview-scale {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  body.is-printing-cv .cv-flow-step:not([data-step="3"]) {
    display: none !important;
  }

  body.is-printing-cv .cv-preview-scale .cv-page-modern,
  body.is-printing-cv .cv-preview-scale .template-classic,
  body.is-printing-cv .cv-preview-scale .template-creative {
    transform: none !important;
    margin: 0 auto !important;
    box-shadow: none !important;
  }
}

/* CV flow v2 */
.cv-flow-page {
  background: #ffffff;
}

.cv-flow-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #eef0f6;
  backdrop-filter: blur(18px);
}

.cv-flow-header strong {
  text-align: center;
  font-size: 1.05rem;
}

.back-link {
  position: relative;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.back-link::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 11px;
  width: 12px;
  height: 12px;
  border-left: 2px solid #111827;
  border-bottom: 2px solid #111827;
  transform: rotate(45deg);
}

.offers-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #d8d9ff;
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.cv-flow-shell {
  width: min(100%, 760px);
  padding: 18px 18px 48px;
}

.cv-stepper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 36px;
}

.cv-stepper::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 16%;
  right: 16%;
  height: 2px;
  background: #e8e8f3;
}

.cv-stepper button {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #9ca3af;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.cv-stepper span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #eef0f7;
  color: #8b92a3;
  font-size: 1rem;
}

.cv-stepper .is-active,
.cv-stepper .is-done {
  color: var(--brand);
}

.cv-stepper .is-active span,
.cv-stepper .is-done span {
  background: var(--brand);
  color: white;
  box-shadow: 0 8px 18px rgba(90, 63, 242, 0.24);
}

.cv-flow-step {
  display: none;
  min-width: 0;
}

.cv-flow-step.is-active {
  display: grid;
  gap: 20px;
}

.step-intro h1 {
  margin: 0;
  font-size: clamp(1.65rem, 8vw, 2.4rem);
  line-height: 1.05;
}

.step-intro p {
  margin: 12px 0 0;
  color: #485165;
  line-height: 1.55;
}

.template-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 0;
  padding: 0;
  border: 0;
}

.template-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding: 20px;
  border: 1px solid #e2e5ef;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(20, 25, 50, 0.08);
  cursor: pointer;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.template-card::before {
  content: "ATS";
  position: absolute;
  top: 34px;
  right: 34px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #16a34a;
  font-size: 0.74rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.08);
}

.template-card:first-of-type::before {
  content: "Mas usada";
  left: 34px;
  right: auto;
  border-color: #d8d0ff;
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(90, 63, 242, 0.26);
}

.template-card:hover,
.template-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 24px 58px rgba(20, 25, 50, 0.13);
}

.template-card:hover .template-preview,
.template-card:focus-within .template-preview {
  transform: scale(1.015);
}

.template-card.is-selected {
  border-color: var(--brand);
  box-shadow:
    0 0 0 2px rgba(90, 63, 242, 0.14),
    0 24px 58px rgba(90, 63, 242, 0.14);
}

.template-card input {
  position: absolute;
  opacity: 0;
}

.radio-dot {
  position: absolute;
  bottom: 36px;
  left: calc(50% - 104px);
  z-index: 2;
  width: 24px;
  height: 24px;
  border: 2px solid #aab1c2;
  border-radius: 999px;
  background: #ffffff;
}

.template-card.is-selected .radio-dot {
  border: 7px solid #ffffff;
  background: var(--brand);
}

.template-copy {
  display: grid;
  gap: 6px;
  color: #4b5563;
  min-height: 88px;
  line-height: 1.45;
}

.template-copy strong {
  color: #111827;
  font-size: 1.18rem;
}

.template-preview {
  display: block;
  order: -1;
  width: 100%;
  height: 420px;
  border: 1px solid #e2e5f0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(20, 25, 50, 0.09);
  object-fit: cover;
  object-position: top center;
  transition: transform 180ms ease;
}

.template-card::after {
  content: "Seleccionar plantilla";
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 2px;
  border: 1px solid var(--brand);
  border-radius: 14px;
  background: #ffffff;
  color: var(--brand);
  font-weight: 900;
  padding-left: 28px;
}

.template-card.is-selected::after {
  background: var(--brand);
  color: #ffffff;
}

.template-mini {
  display: block;
  width: 112px;
  height: 164px;
  border: 1px solid #e2e5f0;
  border-radius: 8px;
  background:
    linear-gradient(#111827, #111827) 18px 22px / 42px 8px no-repeat,
    linear-gradient(#e2e5f0, #e2e5f0) 18px 44px / 74px 5px no-repeat,
    linear-gradient(#e2e5f0, #e2e5f0) 18px 58px / 58px 5px no-repeat,
    linear-gradient(#5a3ff2, #5a3ff2) 18px 86px / 14px 14px no-repeat,
    linear-gradient(#e2e5f0, #e2e5f0) 40px 88px / 50px 5px no-repeat,
    linear-gradient(#e2e5f0, #e2e5f0) 40px 102px / 44px 5px no-repeat,
    white;
  box-shadow: 0 12px 28px rgba(20, 25, 50, 0.08);
}

.mini-classic {
  background:
    linear-gradient(#111827, #111827) 0 0 / 28px 164px no-repeat,
    linear-gradient(#111827, #111827) 40px 22px / 42px 8px no-repeat,
    linear-gradient(#e2e5f0, #e2e5f0) 40px 44px / 58px 5px no-repeat,
    linear-gradient(#e2e5f0, #e2e5f0) 40px 58px / 50px 5px no-repeat,
    linear-gradient(#e2e5f0, #e2e5f0) 40px 92px / 54px 5px no-repeat,
    white;
}

.mini-photo {
  background:
    radial-gradient(circle at 32px 30px, #b7e4e6 0 20px, transparent 21px),
    linear-gradient(#111827, #111827) 18px 62px / 46px 8px no-repeat,
    linear-gradient(#e2e5f0, #e2e5f0) 18px 84px / 72px 5px no-repeat,
    linear-gradient(#e2e5f0, #e2e5f0) 18px 100px / 58px 5px no-repeat,
    linear-gradient(#29b6b8, #29b6b8) 0 142px / 112px 22px no-repeat,
    white;
}

.cv-note {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #e7e4ff;
  border-radius: 10px;
  background: #f7f5ff;
  color: #4b5563;
  line-height: 1.4;
}

.cv-note strong {
  color: var(--brand);
}

.flow-block {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e5e7f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(20, 25, 50, 0.05);
}

.flow-block h2 {
  margin: 0;
  font-size: 1.08rem;
}

.flow-block h2 span {
  color: #8a93a7;
  font-weight: 600;
}

.char-count {
  justify-self: end;
  color: #8a93a7;
}

.flow-list {
  display: grid;
  gap: 12px;
}

.flow-item {
  position: relative;
  padding: 14px;
  border: 1px solid #eceef6;
  border-radius: 10px;
  background: #fbfcff;
}

.flow-item.compact {
  padding-right: 46px;
}

.month-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(92px, 0.85fr);
  gap: 8px;
}

.month-fields select {
  min-height: 48px;
  padding-right: 34px;
}

.add-line-button {
  min-height: 48px;
  border: 1px solid #d9d8ff;
  border-radius: 9px;
  background: #fff;
  color: var(--brand);
  cursor: pointer;
  font-weight: 900;
}

.add-line-button::before {
  content: "+";
  margin-right: 8px;
  font-size: 1.2rem;
}

.flow-actions {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.flow-actions.two {
  grid-template-columns: 1fr 1fr;
}

.cv-flow-paper {
  display: grid;
  grid-template-columns: 34% 66%;
  gap: 0;
  min-height: 680px;
  padding: 0;
  border: 1px solid #e5e7f0;
  border-radius: 12px;
  background: white;
  box-shadow: 0 16px 38px rgba(20, 25, 50, 0.08);
  overflow: hidden;
}

.paper-head {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7ef;
}

.paper-sidebar {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 26px 18px;
  color: #0f2b3a;
}

.paper-sidebar.teal {
  background: linear-gradient(180deg, #aee8e3 0%, #dff8f6 100%);
}

.paper-sidebar.classic-side {
  background:
    radial-gradient(circle at 50% 0, #004640 0 82px, transparent 83px),
    #f8fafc;
}

.paper-sidebar.navy {
  background: linear-gradient(180deg, #15263d 0%, #203955 100%);
  color: #f8fafc;
}

.paper-photo-wrap,
.paper-photo-arch {
  display: grid;
  place-items: center;
  padding-top: 4px;
}

.paper-photo-arch {
  padding-top: 16px;
}

.cv-preview-avatar,
.cv-preview-photo {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: #ebe7ff;
  color: var(--brand);
  font-weight: 900;
  border: 3px solid rgba(255, 255, 255, 0.85);
}

.cv-preview-photo {
  object-fit: cover;
}

.paper-main {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 34px 28px;
  background: #ffffff;
}

.paper-name h2 {
  margin: 0;
  color: #071426;
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 0.98;
  text-transform: uppercase;
}

.paper-name h2 span {
  display: block;
}

.paper-name.teal .first-name,
.paper-name.purple .first-name {
  color: #071426;
}

.paper-name.teal .last-name {
  color: #07817d;
}

.paper-name.purple .last-name {
  color: #071426;
}

.paper-name strong {
  display: block;
  margin-top: 8px;
  color: #5a3ff2;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.template-modern .paper-name strong,
.template-classic .paper-name strong {
  color: #07817d;
}

.template-creative .paper-name strong {
  color: #5a3ff2;
}

.side-section {
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(7, 129, 125, 0.35);
}

.paper-sidebar.navy .side-section {
  border-top-color: rgba(255, 255, 255, 0.22);
}

.side-section h3 {
  margin: 0;
  color: #07817d;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.paper-sidebar.navy .side-section h3 {
  color: #ffffff;
}

.side-section ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 16px;
  font-size: 0.84rem;
  line-height: 1.4;
}

.side-section article {
  display: grid;
  gap: 3px;
  font-size: 0.84rem;
}

.side-section article span,
.side-section article small {
  color: inherit;
  opacity: 0.82;
}

.paper-section {
  display: grid;
  gap: 8px;
}

.paper-head h2 {
  margin: 0;
  font-size: 1.35rem;
  text-transform: uppercase;
}

.paper-head strong {
  display: block;
  margin-top: 3px;
  color: #4f46e5;
}

.paper-head p,
.cv-flow-paper p {
  margin: 6px 0 0;
  color: #4b5563;
  line-height: 1.45;
}

.cv-flow-paper h3 {
  margin: 0 0 8px;
  color: #07817d;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(7, 129, 125, 0.45);
  padding-bottom: 6px;
}

.template-creative .paper-main h3 {
  color: #111827;
  border-bottom-color: #a8afbf;
}

.paper-entry {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.paper-entry strong {
  color: #111827;
}

.paper-entry span {
  color: #07817d;
}

.paper-entry span {
  color: #6b7280;
  font-size: 0.9rem;
}

.paper-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.paper-skills span {
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: #e9f4f3;
  color: #08736f;
  font-size: 0.84rem;
  font-weight: 800;
}

.template-creative .paper-skills span {
  background: #efecff;
  color: #5141b8;
}

/* Classic editorial CV */
.cv-flow-paper.template-classic {
  display: block;
  width: 760px;
  max-width: none;
  min-height: 980px;
  padding: 38px 44px;
  border: 1px solid #b7c9df;
  border-radius: 0;
  background: #ffffff;
  color: #0d1220;
  box-shadow: 0 16px 38px rgba(20, 25, 50, 0.08);
}

.classic-editorial {
  --classic-blue: #173f73;
  --classic-line: #9cb7d5;
  display: grid;
  gap: 26px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.classic-hero {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--classic-line);
  text-align: center;
}

.classic-photo {
  display: grid;
  place-items: center;
  width: 136px;
  height: 136px;
  border: 4px solid #d6e1ef;
  border-radius: 999px;
  overflow: hidden;
}

.classic-photo .cv-preview-photo,
.classic-photo .cv-preview-avatar {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 999px;
  object-fit: cover;
}

.classic-photo .cv-preview-avatar {
  background: #eef3f9;
  color: var(--classic-blue);
}

.classic-name h2 {
  margin: 0;
  color: #071426;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 7vw, 2.95rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.classic-name span,
.classic-rule {
  display: block;
  width: 58px;
  height: 4px;
  margin: 18px auto 0;
  background: var(--classic-blue);
}

.classic-name strong {
  display: block;
  margin-top: 16px;
  color: var(--classic-blue);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.36em;
  text-transform: uppercase;
}

.classic-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  color: #111827;
  font-size: 0.9rem;
}

.classic-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.classic-contact-item svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: var(--classic-blue);
}

.classic-contact-item svg path,
.classic-contact-item svg circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.classic-contact-item + .classic-contact-item::before {
  content: "|";
  margin-right: 14px;
  color: var(--classic-blue);
}

.classic-section {
  display: grid;
  gap: 14px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--classic-line);
}

.classic-section:last-child {
  border-bottom: 0;
}

.classic-section h3 {
  margin: 0;
  border: 0;
  padding: 0;
  color: var(--classic-blue);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1.1;
  text-transform: uppercase;
}

.classic-section .classic-rule {
  margin: -4px 0 4px;
}

.classic-section p {
  margin: 0;
  color: #151a25;
  font-size: 0.98rem;
  line-height: 1.7;
}

.classic-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 0 0 20px 56px;
  border-bottom: 1px dashed #c7d7ea;
}

.classic-entry:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.classic-entry strong,
.classic-education-item strong,
.classic-reference-item strong {
  color: #101828;
  font-size: 1rem;
  font-weight: 900;
}

.classic-entry time {
  color: var(--classic-blue);
  white-space: nowrap;
}

.classic-entry ul {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
  padding-left: 18px;
}

.classic-entry li {
  line-height: 1.45;
}

.classic-entry li::marker {
  color: var(--classic-blue);
}

.classic-two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
  padding-left: 56px;
}

.classic-two-columns > article + article {
  border-left: 1px solid var(--classic-line);
  padding-left: 34px;
}

.classic-education-item,
.classic-reference-item {
  display: grid;
  gap: 6px;
}

.classic-education-item strong {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.classic-education-item em,
.classic-reference-item em {
  color: var(--classic-blue);
  font-style: italic;
}

.classic-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.classic-skills span {
  color: #111827;
  font-size: 0.92rem;
}

.classic-skills span + span::before {
  content: "|";
  margin-right: 14px;
  color: var(--classic-blue);
}

@media (max-width: 767px) {
  .cv-preview-scale .template-classic {
    transform: scale(0.46);
    transform-origin: top left;
    margin-right: -410px;
    margin-bottom: 0;
  }
}

/* Creative editorial CV */
.cv-flow-paper.template-creative {
  display: block;
  width: 760px;
  max-width: none;
  min-height: 1120px;
  padding: 42px 52px 34px;
  border: 1px solid #b7c9df;
  border-radius: 0;
  background:
    radial-gradient(ellipse at 0 0, rgba(214, 226, 240, 0.66) 0 86px, rgba(214, 226, 240, 0.28) 87px, transparent 176px),
    linear-gradient(#ffffff, #ffffff) padding-box;
  color: #0d1220;
  box-shadow: 0 16px 38px rgba(20, 25, 50, 0.08);
}

.creative-editorial {
  --creative-blue: #23568d;
  --creative-line: #b5cce4;
  display: grid;
  gap: 25px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.creative-hero {
  position: relative;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 22px 32px;
  align-items: center;
}

.creative-dots {
  position: absolute;
  left: -16px;
  top: 92px;
  width: 76px;
  height: 96px;
  opacity: 0.95;
  background-image: radial-gradient(circle, var(--creative-blue) 2px, transparent 2.5px);
  background-size: 16px 16px;
}

.creative-photo {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  margin-left: 22px;
  border: 2px solid var(--creative-blue);
  border-radius: 999px;
  overflow: hidden;
  background: #eef3f9;
}

.creative-photo .cv-preview-photo,
.creative-photo .cv-preview-avatar {
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  border: 0;
  border-radius: 999px;
  object-fit: cover;
}

.creative-photo .cv-preview-avatar {
  background: #eef3f9;
  color: var(--creative-blue);
}

.creative-name {
  align-self: center;
  padding-top: 4px;
}

.creative-name span {
  display: block;
  margin-bottom: -12px;
  color: #071426;
  font-family: "Allura", "Brush Script MT", cursive;
  font-size: 4.9rem;
  line-height: 0.9;
  text-transform: capitalize;
}

.creative-name h2 {
  margin: 0;
  color: #071426;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 4.4rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  line-height: 0.95;
  text-transform: uppercase;
}

.creative-name i {
  display: block;
  width: 40px;
  height: 5px;
  margin: 18px 0 14px;
  background: var(--creative-blue);
}

.creative-name strong {
  color: var(--creative-blue);
  font-size: 1.08rem;
  font-weight: 500;
  letter-spacing: 0.44em;
  text-transform: uppercase;
}

.creative-contact {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  padding: 14px 22px;
  border-radius: 14px;
  background: #edf2f8;
  color: #10243f;
  font-size: 0.86rem;
}

.creative-contact span + span::before {
  content: "|";
  margin-right: 18px;
  color: var(--creative-blue);
}

.creative-section {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 0 0 22px 30px;
  border-bottom: 1px solid var(--creative-line);
}

.creative-section:last-child {
  border-bottom: 0;
}

.creative-section::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 7px;
  height: 22px;
  background: var(--creative-blue);
}

.creative-section h3 {
  margin: 0;
  border: 0;
  padding: 0;
  color: #111827;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1;
  text-transform: uppercase;
}

.creative-section p {
  margin: 0;
  color: #151a25;
  font-size: 0.98rem;
  line-height: 1.7;
}

.creative-timeline {
  position: relative;
  display: grid;
  gap: 24px;
  padding-left: 42px;
}

.creative-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 12px;
  width: 1px;
  background: var(--creative-line);
}

.creative-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px dashed var(--creative-line);
}

.creative-entry:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.creative-entry::before {
  content: "";
  position: absolute;
  left: -42px;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--creative-blue);
}

.creative-entry strong,
.creative-education-item strong,
.creative-reference-item strong {
  color: #101828;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.creative-entry i,
.creative-reference-item i {
  display: block;
  width: 32px;
  height: 3px;
  margin: 10px 0 12px;
  background: var(--creative-blue);
}

.creative-entry time {
  color: var(--creative-blue);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.creative-entry ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.creative-entry li {
  line-height: 1.45;
}

.creative-entry li::marker {
  color: var(--creative-blue);
}

.creative-education-grid,
.creative-references-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
}

.creative-education-grid > article + article,
.creative-references-grid > article + article {
  border-left: 1px solid var(--creative-line);
  padding-left: 34px;
}

.creative-education-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 24px;
  align-items: center;
}

.creative-education-item > span {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 10px;
  background: #edf2f8;
  color: var(--creative-blue);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 2.55rem;
  line-height: 1;
}

.creative-education-item div,
.creative-reference-item {
  display: grid;
  gap: 6px;
}

.creative-education-item em,
.creative-reference-item em {
  color: var(--creative-blue);
  font-style: italic;
}

.creative-education-item small {
  color: #111827;
  font-size: 0.9rem;
}

.creative-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px 14px;
  padding-left: 42px;
}

.creative-skills span {
  min-width: 132px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #edf2f8;
  color: #10243f;
  font-size: 0.86rem;
  text-align: center;
}

@media (max-width: 767px) {
  .cv-preview-scale .template-creative {
    transform: scale(0.46);
    transform-origin: top left;
    margin-right: -410px;
    margin-bottom: 0;
  }
}

.checkout-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid #b9adff;
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 6%, rgba(90, 63, 242, 0.12), transparent 24%),
    #ffffff;
}

.checkout-card h2,
.checkout-card p {
  margin: 0;
}

.checkout-card h2 {
  color: var(--brand);
  font-size: 1.6rem;
}

.price-line {
  display: flex;
  gap: 10px;
  align-items: end;
}

.price-line strong {
  font-size: 3rem;
  line-height: 1;
}

.price-line span {
  color: #4b5563;
}

.checkout-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #4b5563;
}

.checkout-card li::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border-radius: 999px;
  background: #ede9ff;
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 900;
}

.checkout-email {
  display: grid;
  gap: 7px;
  color: #111827;
  font-size: 0.92rem;
  font-weight: 800;
}

.checkout-email input {
  min-height: 46px;
  width: 100%;
  border: 1px solid #d8dcef;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-weight: 600;
  padding: 0 13px;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.checkout-email input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(90, 63, 242, 0.14);
}

.checkout-email span {
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
}

.checkout-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e0e5f2;
  border-radius: 12px;
  background: #f8f9ff;
  color: #4b5563;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.checkout-disclaimer input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--brand);
  flex: 0 0 18px;
}

.checkout-complete {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
  color: #166534;
  line-height: 1.35;
}

.checkout-complete[hidden] {
  display: none;
}

.checkout-complete strong {
  color: #14532d;
}

.checkout-complete span {
  font-size: 0.82rem;
  font-weight: 700;
}

.cv-finalized .checkout-email,
.cv-finalized .checkout-disclaimer {
  display: none;
}

.checkout-card small {
  text-align: center;
  color: #6b7280;
}

.change-template {
  width: 100%;
}

.pdf-capture-host {
  position: fixed;
  left: -10000px;
  top: 0;
  z-index: -1;
  width: max-content;
  background: #ffffff;
  pointer-events: none;
}

.pdf-capture-host .pdf-capture-page {
  transform: none !important;
  margin: 0 !important;
  box-shadow: none !important;
}

@media (min-width: 860px) {
  .cv-flow-shell {
    width: min(100%, 1440px);
  }

  .cv-flow-form {
    max-width: 1400px;
    margin: 0 auto;
  }

  .cv-flow-step[data-step="2"].is-active {
    width: min(100%, 760px);
    justify-self: center;
  }

  .cv-flow-step[data-step="1"].is-active {
    gap: 26px;
  }

  .cv-flow-step[data-step="1"] .step-intro {
    width: min(100%, 760px);
  }

  .cv-flow-step[data-step="1"] .step-intro p {
    white-space: nowrap;
  }

  .cv-flow-step[data-step="1"] .flow-actions {
    justify-content: center;
  }

  .cv-flow-step[data-step="1"] .flow-actions .primary-action {
    width: auto;
    min-width: 220px;
    min-height: 42px;
    padding: 0 22px;
    font-size: 0.95rem;
  }

  .cv-flow-step[data-step="1"] .template-card {
    padding: 22px;
  }

  .cv-flow-step[data-step="1"] .template-preview {
    height: 520px;
  }

  .cv-flow-step[data-step="3"].is-active,
  .cv-flow-step[data-step="3"] {
    width: min(100%, 1280px);
    justify-self: center;
  }

  .cv-flow-step[data-step="3"].is-active {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 24px;
  }

  .cv-flow-step[data-step="3"] .step-intro,
  .cv-flow-step[data-step="3"] .step-intro {
    grid-column: 1 / -1;
  }

  .cv-flow-step[data-step="3"] .cv-preview-scale {
    grid-column: 1;
    grid-row: 2;
  }

  .cv-flow-step[data-step="3"] .checkout-card {
    grid-column: 2;
    grid-row: 2;
  }

  .cv-flow-step[data-step="3"] .change-template {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    width: 100%;
    min-height: 44px;
    margin-top: 352px;
  }

  .cv-flow-step[data-step="3"] .cv-preview-scale {
    display: grid;
    justify-items: center;
    align-items: start;
    height: min(78vh, 760px);
    min-height: 620px;
    padding: 34px;
    overflow: auto;
    border: 1px solid #e0e5f2;
    border-radius: 22px;
    background:
      linear-gradient(90deg, rgba(72, 82, 113, 0.05) 1px, transparent 1px) 0 0 / 28px 28px,
      linear-gradient(rgba(72, 82, 113, 0.05) 1px, transparent 1px) 0 0 / 28px 28px,
      #f3f5fb;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      0 18px 44px rgba(31, 41, 55, 0.08);
  }

  .cv-flow-step[data-step="3"] .checkout-card {
    position: sticky;
    top: 18px;
  }

  .cv-flow-step[data-step="3"] .cv-preview-scale .cv-page-modern,
  .cv-flow-step[data-step="3"] .cv-preview-scale .template-classic,
  .cv-flow-step[data-step="3"] .cv-preview-scale .template-creative {
    transform: scale(var(--desktop-preview-scale, 0.55));
    transform-origin: top center;
    margin-bottom: var(--desktop-preview-trim, -500px);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
  }

  .cv-flow-step[data-step="3"] .cv-preview-scale .template-classic {
    --desktop-preview-scale: 0.62;
    --desktop-preview-trim: -370px;
  }

  .cv-flow-step[data-step="3"] .cv-preview-scale .template-creative,
  .cv-flow-step[data-step="3"] .cv-preview-scale .cv-page-modern {
    --desktop-preview-scale: 0.55;
    --desktop-preview-trim: -500px;
  }
}

@media (min-width: 760px) {
  .template-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
}

@media (min-width: 1160px) {
  .template-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }
}

/* Modern CV template preview */
.cv-page {
  --primary: #007c78;
  --primary-dark: #005e5b;
  --text: #101828;
  --muted: #667085;
  --line: #d9e4e3;
  --soft: #eef8f7;
  --sidebar: #eaf7f6;
  --white: #ffffff;
  width: 900px;
  max-width: 100%;
  margin: 0 auto;
  background: var(--white);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
}

.cv-preview-scale {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}

.cv-preview-scale .cv-page {
  margin: 0;
}

.cv-header {
  grid-column: 1;
  grid-row: 1;
  background: linear-gradient(180deg, #00615f, #004b4a);
  padding: 28px 24px 36px;
  text-align: center;
  border-radius: 0 0 70px 70px;
}

.cv-page .cv-preview-photo,
.cv-page .cv-preview-avatar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
}

.cv-page .cv-preview-avatar {
  margin: 0 auto;
  background: #e7f4f3;
  color: var(--primary-dark);
  font-size: 2rem;
}

.cv-main {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 52px;
}

.cv-name {
  font-size: 38px;
  line-height: 0.95;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -1px;
  margin: 0;
}

.cv-name span {
  display: block;
  color: var(--primary);
}

.cv-role {
  margin-top: 12px;
  font-size: 16px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--text);
}

.cv-accent {
  width: 54px;
  height: 4px;
  background: var(--primary);
  border-radius: 20px;
  margin: 18px 0 24px;
}

.cv-profile {
  font-size: 15px;
  line-height: 1.65;
  color: #263238;
  margin-bottom: 32px;
}

.cv-section {
  margin-bottom: 32px;
}

.cv-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 18px;
}

.cv-section-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--primary);
  opacity: 0.6;
}

.cv-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.cv-item {
  margin-bottom: 22px;
}

.cv-item h3 {
  font-size: 16px;
  margin: 0 0 6px;
  font-weight: 800;
}

.cv-meta {
  color: var(--primary);
  font-size: 14px;
  margin-bottom: 10px;
}

.cv-list {
  padding-left: 18px;
  margin: 0;
}

.cv-list li {
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 4px;
}

.cv-divider {
  border: none;
  border-top: 1px dashed var(--line);
  margin: 20px 0;
}

.cv-side {
  grid-column: 1;
  grid-row: 2;
  background: var(--sidebar);
  padding: 26px 24px;
}

.cv-side-section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.cv-side-section:last-child {
  border-bottom: none;
}

.cv-side-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: var(--primary-dark);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.cv-contact-item,
.cv-side li {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 10px;
  color: #263238;
}

.cv-contact-item {
  display: block;
}

.cv-side ul {
  padding-left: 18px;
  margin: 0;
}

.cv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cv-tag {
  background: var(--soft);
  color: var(--primary-dark);
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
}

.cv-references {
  display: grid;
  gap: 12px;
}

.cv-reference-card {
  background: var(--soft);
  border-radius: 14px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.5;
}

.cv-reference-card strong {
  color: var(--primary-dark);
  display: block;
  margin-bottom: 4px;
}

.cv-page-modern {
  display: grid;
  grid-template-columns: 280px 1fr;
  border-radius: 10px;
}

.cv-page-modern .cv-name {
  font-size: 54px;
}

.cv-page-modern .cv-references {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 767px) {
  .cv-preview-scale {
    border: 1px solid #e5e7f0;
    border-radius: 14px;
    background: #f8fafc;
    padding: 10px 10px 14px;
    max-height: 72vh;
    overflow-y: auto;
  }

  .cv-preview-scale .cv-page-modern {
    width: 900px;
    max-width: none;
    transform: scale(0.72);
    transform-origin: top left;
    margin-right: -252px;
    margin-bottom: -300px;
  }
}

/* Modern single-column CV trial */
.cv-preview-scale .cv-page-modern {
  --primary: #5a3ff2;
  --primary-dark: #3d2ac8;
  --text: #101828;
  --muted: #667085;
  width: 760px;
  max-width: none;
  display: block;
  padding: 52px 56px;
  border-radius: 0;
  background: #ffffff;
  color: var(--text);
}

.cv-page-modern .simple-head {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 28px;
  align-items: start;
  margin-bottom: 34px;
}

.cv-page-modern .cv-name {
  margin: 0;
  color: var(--primary);
  font-size: 56px;
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -1px;
  text-transform: none;
}

.cv-page-modern .cv-name span {
  display: block;
  color: var(--primary);
}

.cv-page-modern .cv-role {
  margin-top: 14px;
  color: #101828;
  font-size: 15px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.cv-page-modern .cv-accent {
  display: none;
}

.cv-page-modern .simple-contact {
  display: grid;
  gap: 7px;
  color: #4b5563;
  font-size: 0.88rem;
  line-height: 1.35;
}

.cv-page-modern .simple-contact::before {
  content: "";
  width: 34px;
  height: 2px;
  margin-bottom: 7px;
  background: var(--primary);
}

.cv-page-modern .contact-mini {
  position: relative;
  display: block;
  padding-left: 22px;
}

.cv-page-modern .contact-mini::before,
.cv-page-modern .contact-mini::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  color: var(--primary);
}

.cv-page-modern .contact-mini.pin::before {
  width: 11px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 999px 999px 999px 2px;
  transform: rotate(-45deg);
}

.cv-page-modern .contact-mini.pin::after {
  width: 4px;
  height: 4px;
  top: 0.45em;
  left: 3.5px;
  border-radius: 999px;
  background: currentColor;
}

.cv-page-modern .contact-mini.phone::before {
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-right-color: transparent;
  border-radius: 4px 0 4px 6px;
  transform: rotate(-45deg);
}

.cv-page-modern .contact-mini.mail::before {
  width: 15px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.cv-page-modern .contact-mini.mail::after {
  width: 10px;
  height: 10px;
  top: 0.08em;
  left: 3px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.cv-page-modern .simple-intro {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 34px;
  align-items: center;
  margin-bottom: 36px;
}

.cv-page-modern .simple-photo {
  display: grid;
  place-items: center;
}

.cv-page-modern .cv-preview-photo,
.cv-page-modern .cv-preview-avatar {
  width: 156px;
  height: 156px;
  border: 0;
  border-radius: 999px;
  object-fit: cover;
}

.cv-page-modern .cv-preview-avatar {
  background: #f4e7f0;
  color: var(--primary);
  font-size: 2rem;
}

.cv-page-modern .simple-profile p,
.cv-page-modern .simple-row p {
  margin: 0;
  color: #263238;
  font-size: 0.94rem;
  line-height: 1.65;
}

.cv-page-modern .simple-profile h3 {
  margin: 0 0 12px;
  color: #475467;
  font-size: 1rem;
  font-weight: 700;
}

.cv-page-modern .simple-profile h3::after {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin-top: 10px;
  background: var(--primary);
}

.cv-page-modern .simple-row {
  display: block;
  margin-bottom: 30px;
}

.cv-page-modern .simple-row h3 {
  margin: 0;
  color: #475467;
  font-size: 1rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  border: 0;
  padding: 0;
}

.cv-page-modern .simple-row h3::after {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin: 10px 0 16px;
  background: var(--primary);
}

.cv-page-modern .simple-item {
  margin-bottom: 22px;
}

.cv-page-modern .simple-item strong {
  color: #101828;
  font-size: 0.94rem;
  font-weight: 800;
}

.cv-page-modern .simple-item strong:first-letter {
  color: var(--primary);
}

@media (max-width: 767px) {
  .cv-preview-scale .cv-page-modern {
    width: 760px;
    transform: scale(0.52);
    transform-origin: top left;
    margin-right: -365px;
    margin-bottom: -500px;
  }
}

/* Modern CV refinements */
.cv-preview-scale .cv-page-modern {
  --primary: #d86fa6;
  --primary-dark: #b64f87;
  --primary-soft: #f8e8f1;
  min-height: 1120px;
}

.cv-page-modern .simple-head {
  display: block;
  margin-bottom: 28px;
}

.cv-page-modern .cv-name,
.cv-page-modern .cv-name span {
  color: var(--primary);
}

.cv-page-modern .cv-role {
  display: none;
}

.cv-page-modern .simple-intro {
  grid-template-columns: 190px minmax(0, 1fr) 218px;
  gap: 26px;
  align-items: start;
  margin-bottom: 30px;
}

.cv-page-modern .simple-photo {
  justify-content: start;
  margin-bottom: 18px;
}

.cv-page-modern .cv-preview-photo,
.cv-page-modern .cv-preview-avatar {
  width: 178px;
  height: 178px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.1);
}

.cv-page-modern .simple-profile h3,
.cv-page-modern .simple-objective h3 {
  margin: 0 0 12px;
  color: #475467;
  font-size: 1rem;
  font-weight: 700;
}

.cv-page-modern .simple-profile h3::after,
.cv-page-modern .simple-objective h3::after {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin-top: 10px;
  background: var(--primary);
}

.cv-page-modern .simple-objective strong {
  display: block;
  color: #101828;
  font-size: 1.08rem;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.cv-page-modern .simple-contact-panel {
  justify-self: end;
  width: 218px;
  padding-top: 2px;
}

.cv-page-modern .simple-contact::before {
  width: 30px;
  height: 2px;
  margin-bottom: 9px;
}

.cv-page-modern .contact-mini {
  position: static;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding-left: 0;
}

.cv-page-modern .contact-mini::before,
.cv-page-modern .contact-mini::after {
  display: none !important;
}

.cv-page-modern .contact-mini svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin-top: 1px;
  color: var(--primary-dark);
}

.cv-page-modern .contact-mini svg path,
.cv-page-modern .contact-mini svg rect,
.cv-page-modern .contact-mini svg circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cv-page-modern .cv-preview-avatar {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

@media (max-width: 767px) {
  .cv-preview-scale {
    height: 440px;
    max-height: 440px;
    overflow-y: hidden;
  }

  .cv-preview-scale .cv-page-modern {
    min-height: 930px;
    transform: scale(0.46);
    margin-right: -410px;
    margin-bottom: 0;
  }
}
