/* ==========================================================================
   MakeMyBio – Design system & site styles
   Layer order: tokens → Bootstrap overrides → base → components → sections
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  --sb-primary: #873F32;
  --sb-primary-600: #74352A;
  --sb-primary-700: #5E2A21;
  --sb-primary-50: #F6ECE8;
  --sb-gold: #C9A66B;
  --sb-gold-600: #B08D52;
  --sb-gold-100: #F3E9D6;
  --sb-bg: #FAF7F2;
  --sb-bg-tint: #F4EEE4;
  --sb-surface: #FFFFFF;
  --sb-text: #292421;
  --sb-muted: #80766F;
  --sb-line: #EAE2D6;

  --sb-font-display: "Cormorant Garamond", "Tiro Devanagari Hindi", Georgia, serif;
  --sb-font-body: "Mukta", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sb-font-hindi: "Tiro Devanagari Hindi", "Mukta", serif;

  --sb-radius-sm: 10px;
  --sb-radius: 16px;
  --sb-radius-lg: 24px;
  --sb-radius-pill: 999px;

  --sb-shadow-sm: 0 1px 2px rgba(41, 36, 33, .06), 0 2px 8px rgba(41, 36, 33, .04);
  --sb-shadow: 0 6px 24px rgba(68, 40, 28, .08), 0 2px 6px rgba(68, 40, 28, .05);
  --sb-shadow-lg: 0 24px 60px rgba(68, 40, 28, .16), 0 8px 18px rgba(68, 40, 28, .08);

  --sb-ease: cubic-bezier(.2, .7, .2, 1);
  --sb-section-y: clamp(4rem, 8vw, 7rem);

  /* Bootstrap variable bridge */
  --bs-body-bg: var(--sb-bg);
  --bs-body-color: var(--sb-text);
  --bs-body-font-family: var(--sb-font-body);
  --bs-body-font-size: 1.0625rem;
  --bs-body-line-height: 1.6;
  --bs-primary: var(--sb-primary);
  --bs-primary-rgb: 135, 63, 50;
  --bs-link-color: var(--sb-primary);
  --bs-link-color-rgb: 135, 63, 50;
  --bs-link-hover-color: var(--sb-primary-700);
  --bs-link-hover-color-rgb: 94, 42, 33;
  --bs-border-color: var(--sb-line);
  --bs-secondary-color: var(--sb-muted);
  --bs-focus-ring-color: rgba(135, 63, 50, .25);
}

/* ---------- 2. Base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  background: var(--sb-bg);
  color: var(--sb-text);
  font-family: var(--sb-font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:lang(hi) body, html[lang="hi"] body { --bs-body-line-height: 1.7; }

h1, h2, h3, h4 { color: var(--sb-text); letter-spacing: -0.01em; }
h1, h2 { font-family: var(--sb-font-display); font-weight: 600; line-height: 1.1; }
html[lang="hi"] h1, html[lang="hi"] h2 { font-family: var(--sb-font-hindi); font-weight: 400; line-height: 1.3; }
h3 { font-weight: 600; }

a { text-decoration: none; transition: color .2s var(--sb-ease); }
img { max-width: 100%; height: auto; }
::selection { background: var(--sb-gold-100); color: var(--sb-primary-700); }

.skip-link {
  position: absolute; z-index: 2000; top: .5rem; left: .5rem;
  background: var(--sb-primary); color: #fff; padding: .5rem 1rem; border-radius: var(--sb-radius-sm);
}
:focus-visible { outline: 3px solid rgba(201, 166, 107, .7); outline-offset: 2px; }

/* ---------- 3. Buttons ---------- */
.btn {
  --bs-btn-font-weight: 600;
  --bs-btn-padding-x: 1.25rem;
  --bs-btn-padding-y: .62rem;
  --bs-btn-border-radius: var(--sb-radius-pill);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  transition: transform .2s var(--sb-ease), box-shadow .2s var(--sb-ease), background-color .2s, color .2s, border-color .2s;
}
.btn-lg { --bs-btn-padding-x: 1.75rem; --bs-btn-padding-y: .85rem; --bs-btn-font-size: 1.0625rem; }
.btn:active { transform: translateY(1px); }

.btn-brand {
  --bs-btn-color: #fff; --bs-btn-bg: var(--sb-primary); --bs-btn-border-color: var(--sb-primary);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--sb-primary-600); --bs-btn-hover-border-color: var(--sb-primary-600);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--sb-primary-700); --bs-btn-active-border-color: var(--sb-primary-700);
  box-shadow: 0 6px 18px rgba(135, 63, 50, .25);
}
.btn-brand:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(135, 63, 50, .3); }

.btn-outline-brand {
  --bs-btn-color: var(--sb-primary); --bs-btn-bg: transparent; --bs-btn-border-color: rgba(135, 63, 50, .35);
  --bs-btn-hover-color: var(--sb-primary-700); --bs-btn-hover-bg: var(--sb-primary-50); --bs-btn-hover-border-color: var(--sb-primary);
  --bs-btn-active-color: var(--sb-primary-700); --bs-btn-active-bg: var(--sb-primary-50); --bs-btn-active-border-color: var(--sb-primary);
  background: var(--sb-surface);
}

.btn-gold {
  --bs-btn-color: #3B2414; --bs-btn-bg: var(--sb-gold); --bs-btn-border-color: var(--sb-gold);
  --bs-btn-hover-color: #2C1A0E; --bs-btn-hover-bg: #D6B67E; --bs-btn-hover-border-color: #D6B67E;
  --bs-btn-active-color: #2C1A0E; --bs-btn-active-bg: var(--sb-gold-600); --bs-btn-active-border-color: var(--sb-gold-600);
  box-shadow: 0 6px 18px rgba(176, 141, 82, .3);
}
.btn-gold:hover { transform: translateY(-2px); }

.btn-ghost {
  --bs-btn-color: var(--sb-text); --bs-btn-hover-bg: var(--sb-primary-50); --bs-btn-hover-color: var(--sb-primary);
  --bs-btn-active-bg: var(--sb-primary-50); --bs-btn-padding-x: .9rem; --bs-btn-font-weight: 500;
}

/* ---------- 4. Header / navbar ---------- */
.site-header {
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s var(--sb-ease), border-color .25s;
}
/* Blur lives on a pseudo-element: backdrop-filter on the header itself would
   become the containing block of the fixed mobile off-canvas menu. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(250, 247, 242, .86);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
}
.site-header.is-scrolled { border-color: var(--sb-line); box-shadow: 0 6px 20px rgba(41, 36, 33, .05); }
.site-header .navbar { --bs-navbar-padding-y: .8rem; }

.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--sb-text); }
.brand-mark { display: inline-flex; filter: drop-shadow(0 3px 6px rgba(135, 63, 50, .25)); }
.brand-word { font-family: var(--sb-font-display); font-weight: 700; font-size: 1.65rem; letter-spacing: -.01em; line-height: 1; }
.brand-word span { color: var(--sb-primary); }
.brand--light .brand-word { color: #fff; }
.brand--light .brand-word span { color: var(--sb-gold); }

.navbar-toggler { border: 0; font-size: 1.75rem; padding: .25rem .5rem; color: var(--sb-text); }
.navbar-toggler:focus { box-shadow: 0 0 0 3px var(--bs-focus-ring-color); }

.navbar .nav-link {
  font-weight: 500; color: var(--sb-text); padding: .5rem .9rem !important;
  border-radius: var(--sb-radius-pill); position: relative;
}
.navbar .nav-link:hover { color: var(--sb-primary); background: var(--sb-primary-50); }
.navbar .nav-link.active { color: var(--sb-primary); }

.nav-actions { display: flex; align-items: center; gap: .5rem; }
.lang-switch .dropdown-menu {
  --bs-dropdown-border-color: var(--sb-line); --bs-dropdown-border-radius: var(--sb-radius);
  --bs-dropdown-link-active-bg: var(--sb-primary-50); --bs-dropdown-link-active-color: var(--sb-primary);
  box-shadow: var(--sb-shadow); padding: .4rem; min-width: 11rem;
}
.lang-switch .dropdown-item { border-radius: var(--sb-radius-sm); padding: .5rem .75rem; display: flex; justify-content: space-between; gap: 1rem; }

@media (max-width: 991.98px) {
  .offcanvas { --bs-offcanvas-width: min(86vw, 340px); background: var(--sb-bg); }
  .offcanvas-body { display: flex; flex-direction: column; gap: 1.25rem; }
  .navbar .nav-link { font-size: 1.125rem; padding: .75rem 1rem !important; }
  .nav-actions { flex-direction: column; align-items: stretch; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--sb-line); }
  .nav-actions .btn { width: 100%; justify-content: center; }
  .lang-switch .dropdown-toggle { border: 1px solid var(--sb-line); background: var(--sb-surface); }
}
@media (min-width: 992px) {
  .offcanvas-body { display: flex; align-items: center; flex-grow: 1; }
}

/* ---------- 5. Section scaffolding ---------- */
.section { padding-block: var(--sb-section-y); position: relative; }
.section--tint { background: var(--sb-bg-tint); }
.section-head { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section-head--split { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 3rem; }
.section-head--split .section-lead { max-width: 30rem; margin: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sb-gold-600); margin-bottom: .9rem;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.text-center .eyebrow::after { content: ""; width: 26px; height: 1px; background: currentColor; }
html[lang="hi"] .eyebrow { letter-spacing: .02em; font-size: .95rem; }

.section-title { font-size: clamp(2rem, 4.2vw, 3rem); margin-bottom: 1rem; }
.section-lead { color: var(--sb-muted); font-size: 1.125rem; max-width: 40rem; }

/* ---------- 6. Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(3rem, 7vw, 6rem) clamp(4rem, 8vw, 7rem); }
.hero__bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60rem 30rem at 85% 30%, rgba(201, 166, 107, .22), transparent 60%),
    radial-gradient(40rem 26rem at 0% 0%, rgba(135, 63, 50, .08), transparent 60%);
}
.hero__bg::after { /* faint jaali pattern */
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M28 4c4 8 16 20 24 24-8 4-20 16-24 24-4-8-16-20-24-24 8-4 20-16 24-24z' fill='none' stroke='%23C9A66B' stroke-opacity='.18'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000 75%);
  mask-image: linear-gradient(90deg, transparent 35%, #000 75%);
}

.eyebrow-pill {
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--sb-surface); border: 1px solid var(--sb-line); box-shadow: var(--sb-shadow-sm);
  padding: .4rem .95rem; border-radius: var(--sb-radius-pill);
  font-size: .9rem; font-weight: 500; color: var(--sb-primary-700); margin-bottom: 1.5rem;
}
.eyebrow-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #3E9B6B; box-shadow: 0 0 0 4px rgba(62, 155, 107, .15); }

.hero__title { font-size: clamp(2.6rem, 6.4vw, 4.6rem); line-height: 1.02; margin-bottom: 1.4rem; }
html[lang="hi"] .hero__title { line-height: 1.25; font-size: clamp(2.3rem, 5.6vw, 4rem); }
.hero__title em { font-style: italic; color: var(--sb-primary); position: relative; white-space: nowrap; }
.hero__title em::after {
  content: ""; position: absolute; left: 2%; right: 2%; bottom: .04em; height: .14em;
  background: linear-gradient(90deg, rgba(201, 166, 107, .0), rgba(201, 166, 107, .65), rgba(201, 166, 107, .0));
  border-radius: 2px; z-index: -1;
}
.hero__lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--sb-muted); max-width: 33rem; margin-bottom: 2rem; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }

.privacy-note { display: flex; align-items: center; gap: .55rem; color: var(--sb-text); font-size: .975rem; margin-bottom: 2.25rem; }
.privacy-note i { color: #3E9B6B; font-size: 1.1rem; }

.hero__facts { display: flex; flex-wrap: wrap; gap: 0; list-style: none; padding: 0; margin: 0; }
.hero__facts li { display: flex; flex-direction: column; padding-right: 1.5rem; margin-right: 1.5rem; border-right: 1px solid var(--sb-line); }
.hero__facts li:last-child { border: 0; margin: 0; padding: 0; }
.hero__facts strong { font-family: var(--sb-font-display); font-size: 1.85rem; line-height: 1.1; color: var(--sb-primary); }
.hero__facts strong[lang="hi"] { font-family: var(--sb-font-hindi); font-weight: 400; font-size: 1.55rem; }
.hero__facts span { font-size: .875rem; color: var(--sb-muted); }

/* Fanned document stage */
.hero__stage { position: relative; aspect-ratio: 1 / .96; max-width: 560px; margin-inline: auto; }
.hero__doc { position: absolute; width: 56%; transition: transform .6s var(--sb-ease); }
.hero__doc .bd { box-shadow: var(--sb-shadow-lg); }
.hero__doc--1 { left: 0; top: 12%; transform: rotate(-8deg); z-index: 1; }
.hero__doc--2 { right: 0; top: 9%; transform: rotate(7deg); z-index: 2; }
.hero__doc--3 { left: 22%; top: 0; z-index: 3; width: 58%; }
.hero__stage:hover .hero__doc--1 { transform: rotate(-11deg) translateX(-10px); }
.hero__stage:hover .hero__doc--2 { transform: rotate(10deg) translateX(10px); }
.hero__stage:hover .hero__doc--3 { transform: translateY(-8px); }

.hero__chip {
  position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: .45rem;
  background: var(--sb-surface); border: 1px solid var(--sb-line); box-shadow: var(--sb-shadow);
  padding: .5rem .9rem; border-radius: var(--sb-radius-pill); font-size: .875rem; font-weight: 600;
  animation: float 6s ease-in-out infinite;
}
.hero__chip--live { left: -2%; bottom: 14%; color: var(--sb-primary); }
.hero__chip--live i { color: var(--sb-gold-600); }
.hero__chip--pdf { right: 0; bottom: 4%; animation-delay: -3s; }
.hero__chip--pdf i { color: #C24A3A; }
@keyframes float { 50% { transform: translateY(-8px); } }

@media (max-width: 991.98px) {
  .hero { text-align: left; }
  .hero__stage { max-width: 460px; margin-top: 1rem; }
}
@media (max-width: 575.98px) {
  .hero__ctas .btn { flex: 1 1 100%; }
  .hero__facts li { padding-right: 1rem; margin-right: 1rem; }
  .hero__stage { aspect-ratio: 1 / 1; }
  .hero__chip { font-size: .8rem; }
}

/* ---------- 7. Template cards ---------- */
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
.template-card {
  background: var(--sb-surface); border: 1px solid var(--sb-line); border-radius: var(--sb-radius-lg);
  padding: .9rem; box-shadow: var(--sb-shadow-sm);
  transition: transform .35s var(--sb-ease), box-shadow .35s var(--sb-ease), border-color .35s;
}
.template-card:hover { transform: translateY(-6px); box-shadow: var(--sb-shadow-lg); border-color: rgba(201, 166, 107, .55); }
.template-card__preview {
  position: relative; background: var(--sb-bg-tint); border-radius: calc(var(--sb-radius-lg) - 8px);
  padding: 1.6rem 2.2rem; overflow: hidden;
}
.template-card__preview .bd { box-shadow: 0 10px 30px rgba(41, 36, 33, .14); transition: transform .45s var(--sb-ease); }
.template-card:hover .template-card__preview .bd { transform: scale(1.03); }
.template-card__body { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem .6rem .4rem; }
.template-card__title { font-size: 1.15rem; margin-bottom: .2rem; }
.template-card__text { color: var(--sb-muted); font-size: .925rem; margin: 0; line-height: 1.45; }
.template-card__link {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--sb-line); color: var(--sb-primary); font-size: 1.1rem;
  transition: background .25s, color .25s, transform .25s var(--sb-ease);
}
.template-card__link::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.template-card { position: relative; }
.template-card:hover .template-card__link { background: var(--sb-primary); color: #fff; transform: rotate(45deg); }

.badge-tier {
  position: absolute; top: .9rem; left: .9rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .3rem;
  background: rgba(255, 255, 255, .92); color: #2F6E4E; border: 1px solid rgba(62, 155, 107, .25);
  font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .25rem .65rem; border-radius: var(--sb-radius-pill);
}
.badge-tier--premium { background: linear-gradient(135deg, #3B2414, #5E2A21); color: var(--sb-gold); border-color: transparent; }

@media (max-width: 991.98px) { .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) {
  /* Swipeable row on phones */
  .template-grid {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 1rem;
    margin-inline: calc(var(--bs-gutter-x, 1.5rem) * -.5); padding: .5rem calc(var(--bs-gutter-x, 1.5rem) * .5) 1.5rem;
    scrollbar-width: none;
  }
  .template-grid::-webkit-scrollbar { display: none; }
  .template-card { flex: 0 0 82%; scroll-snap-align: center; }
  .template-card:hover { transform: none; }
}

/* ---------- 8. Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; counter-reset: step; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 46px; left: 12%; right: 12%; height: 1px;
  background: repeating-linear-gradient(90deg, var(--sb-gold) 0 6px, transparent 6px 12px); opacity: .7;
}
.step { position: relative; text-align: center; padding: 0 .5rem; }
.step__icon {
  width: 92px; height: 92px; margin: 0 auto 1.25rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 2rem; color: var(--sb-primary);
  background: var(--sb-surface); border: 1px solid var(--sb-line); box-shadow: var(--sb-shadow);
  position: relative; z-index: 1; transition: transform .3s var(--sb-ease);
}
.step:hover .step__icon { transform: translateY(-4px); }
.step__num {
  position: absolute; z-index: 2; top: -4px; left: calc(50% + 22px);
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sb-primary); color: #fff; font-weight: 700; font-size: .875rem; border: 3px solid var(--sb-bg-tint);
}
.step__title { font-size: 1.15rem; margin-bottom: .5rem; }
.step__text { color: var(--sb-muted); font-size: .95rem; margin: 0; }

@media (max-width: 991.98px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
  .steps::before { display: none; }
}
@media (max-width: 575.98px) {
  .steps { grid-template-columns: 1fr; gap: 1rem; }
  .step { display: grid; grid-template-columns: 64px 1fr; column-gap: 1rem; text-align: left; align-items: start;
          background: var(--sb-surface); border: 1px solid var(--sb-line); border-radius: var(--sb-radius); padding: 1rem; }
  .step__icon { width: 64px; height: 64px; font-size: 1.5rem; margin: 0; grid-row: span 2; box-shadow: none; background: var(--sb-primary-50); border: 0; }
  .step__num { left: 52px; top: 8px; width: 24px; height: 24px; font-size: .75rem; border-color: var(--sb-surface); }
  .step__title { margin: .2rem 0 .25rem; }
}

/* ---------- 9. Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.feature {
  background: var(--sb-surface); border: 1px solid var(--sb-line); border-radius: var(--sb-radius);
  padding: 1.6rem; transition: transform .3s var(--sb-ease), box-shadow .3s var(--sb-ease), border-color .3s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--sb-shadow); border-color: rgba(201, 166, 107, .5); }
.feature__icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--sb-primary-50), var(--sb-gold-100)); color: var(--sb-primary); font-size: 1.35rem;
}
.feature__title { font-size: 1.1rem; margin-bottom: .35rem; }
.feature__text { color: var(--sb-muted); font-size: .95rem; margin: 0; }

.privacy-card {
  display: flex; gap: 1rem; align-items: flex-start; margin-top: 2rem; padding: 1.25rem;
  background: linear-gradient(135deg, var(--sb-primary), var(--sb-primary-700)); color: #fff; border-radius: var(--sb-radius);
  box-shadow: 0 14px 30px rgba(135, 63, 50, .25);
}
.privacy-card i { font-size: 1.75rem; color: var(--sb-gold); line-height: 1; }
.privacy-card strong { display: block; font-size: 1.05rem; }
.privacy-card span { opacity: .85; font-size: .95rem; }

@media (max-width: 575.98px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- 10. Languages ---------- */
.lang-panel {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 3rem; align-items: center;
  background: var(--sb-surface); border: 1px solid var(--sb-line); border-radius: var(--sb-radius-lg);
  padding: clamp(1.75rem, 4vw, 3.5rem); box-shadow: var(--sb-shadow-sm);
}
.lang-chips { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.lang-chip {
  display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem;
  border: 1px dashed #D8CDBE; border-radius: var(--sb-radius-pill); color: var(--sb-muted); font-size: .975rem;
}
.lang-chip.is-live { border: 1px solid rgba(135, 63, 50, .3); background: var(--sb-primary-50); color: var(--sb-primary-700); font-weight: 600; }
.lang-chip.is-live i { color: #3E9B6B; }
.lang-chip__soon { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sb-gold-600); }

.lang-panel__art {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 300px; border-radius: var(--sb-radius); padding: 2rem;
  background:
    radial-gradient(circle at 50% 50%, rgba(201, 166, 107, .18), transparent 65%),
    var(--sb-bg);
  border: 1px solid var(--sb-gold-100);
}
.lang-panel__art::before {
  content: ""; position: absolute; inset: 12px; border: 1px solid rgba(201, 166, 107, .45); border-radius: calc(var(--sb-radius) - 6px);
}
.lang-art__hi { font-family: var(--sb-font-hindi); font-size: clamp(2.2rem, 4.5vw, 3.2rem); color: var(--sb-primary); line-height: 1.35; }
.lang-art__en { font-family: var(--sb-font-display); font-style: italic; font-size: 1.6rem; color: var(--sb-text); }
.lang-art__rule { width: 120px; height: 10px; margin: 1rem 0 .75rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10'%3E%3Cpath d='M0 5h48M72 5h48' stroke='%23C9A66B'/%3E%3Cpath d='M60 0l5 5-5 5-5-5z' fill='%23C9A66B'/%3E%3C/svg%3E") center / contain no-repeat; }
.lang-art__note { font-family: var(--sb-font-hindi); color: var(--sb-gold-600); font-size: 1.1rem; }

@media (max-width: 991.98px) { .lang-panel { grid-template-columns: 1fr; } .lang-panel__art { min-height: 220px; } }

/* ---------- 11. Pricing ---------- */
.plan {
  position: relative; height: 100%; display: flex; flex-direction: column;
  background: var(--sb-surface); border: 1px solid var(--sb-line); border-radius: var(--sb-radius-lg);
  padding: 2.25rem 2rem 2rem; box-shadow: var(--sb-shadow-sm);
}
.plan--highlight {
  background: linear-gradient(160deg, #3B2414 0%, var(--sb-primary-700) 55%, var(--sb-primary) 120%);
  border-color: transparent; color: #F5EDE3; box-shadow: var(--sb-shadow-lg);
}
.plan--highlight .plan__name, .plan--highlight .plan__price { color: #fff; }
.plan__ribbon {
  position: absolute; top: 1.25rem; right: 1.25rem; background: var(--sb-gold); color: #3B2414;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .25rem .7rem; border-radius: var(--sb-radius-pill);
}
.plan__name { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .12em; color: var(--sb-muted); margin-bottom: 1rem; }
.plan--highlight .plan__name { color: var(--sb-gold); }
.plan__price { font-family: var(--sb-font-display); font-size: 3.6rem; font-weight: 600; line-height: 1; margin-bottom: .4rem; color: var(--sb-text); }
.plan__currency { font-size: .55em; vertical-align: .5em; margin-right: .1em; }
.plan__unit { font-family: var(--sb-font-body); font-size: 1rem; font-weight: 400; color: var(--sb-muted); margin-left: .4rem; }
.plan--highlight .plan__unit, .plan--highlight .plan__note { color: rgba(245, 237, 227, .75); }
.plan__note { font-size: .925rem; color: var(--sb-muted); margin-bottom: 1.5rem; }
.plan__features { list-style: none; padding: 1.5rem 0 0; margin: 0 0 2rem; border-top: 1px solid var(--sb-line); flex-grow: 1; }
.plan--highlight .plan__features { border-color: rgba(255, 255, 255, .14); }
.plan__features li { display: flex; gap: .7rem; align-items: center; padding: .4rem 0; }
.plan__features i { color: #3E9B6B; font-size: 1.15rem; }
.plan--highlight .plan__features i { color: var(--sb-gold); }
.plan__features li.is-muted { color: var(--sb-muted); }
.plan__features li.is-muted i { color: var(--sb-muted); }

/* ---------- 12. FAQ ---------- */
.faq {
  --bs-accordion-bg: var(--sb-surface);
  --bs-accordion-border-color: var(--sb-line);
  --bs-accordion-border-radius: var(--sb-radius);
  --bs-accordion-inner-border-radius: var(--sb-radius);
  --bs-accordion-btn-padding-y: 1.15rem;
  --bs-accordion-btn-padding-x: 1.4rem;
  --bs-accordion-body-padding-x: 1.4rem;
  --bs-accordion-active-bg: var(--sb-surface);
  --bs-accordion-active-color: var(--sb-primary);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 3px var(--bs-focus-ring-color);
  display: grid; gap: .75rem;
}
.faq .accordion-item { border: 1px solid var(--sb-line) !important; border-radius: var(--sb-radius) !important; overflow: hidden; }
.faq .accordion-button { font-weight: 600; font-size: 1.05rem; }
.faq .accordion-button:not(.collapsed) { box-shadow: none; }
.faq .accordion-body { color: var(--sb-muted); padding-top: 0; }

/* ---------- 13. CTA band ---------- */
.cta-band { padding-block: 0 var(--sb-section-y); background: var(--sb-bg-tint); }
.cta-band__inner {
  position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem;
  padding: clamp(2rem, 5vw, 3.5rem); border-radius: var(--sb-radius-lg); color: #fff;
  background: linear-gradient(120deg, var(--sb-primary-700), var(--sb-primary) 60%, #A0563F);
  box-shadow: var(--sb-shadow-lg);
}
.cta-band__inner::after { /* soft mandala */
  content: ""; position: absolute; right: -80px; top: 50%; width: 340px; height: 340px; transform: translateY(-50%); opacity: .18; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%23E2C48E'%3E%3Ccircle cx='100' cy='100' r='96'/%3E%3Ccircle cx='100' cy='100' r='70'/%3E%3Ccircle cx='100' cy='100' r='40'/%3E%3Cg id='p'%3E%3Cpath d='M100 4c12 20 12 46 0 66-12-20-12-46 0-66z'/%3E%3C/g%3E%3Cuse href='%23p' transform='rotate(30 100 100)'/%3E%3Cuse href='%23p' transform='rotate(60 100 100)'/%3E%3Cuse href='%23p' transform='rotate(90 100 100)'/%3E%3Cuse href='%23p' transform='rotate(120 100 100)'/%3E%3Cuse href='%23p' transform='rotate(150 100 100)'/%3E%3Cuse href='%23p' transform='rotate(180 100 100)'/%3E%3Cuse href='%23p' transform='rotate(210 100 100)'/%3E%3Cuse href='%23p' transform='rotate(240 100 100)'/%3E%3Cuse href='%23p' transform='rotate(270 100 100)'/%3E%3Cuse href='%23p' transform='rotate(300 100 100)'/%3E%3Cuse href='%23p' transform='rotate(330 100 100)'/%3E%3C/svg%3E") center / contain no-repeat;
}
.cta-band__title { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: .5rem; }
.cta-band__text { margin: 0; opacity: .85; font-size: 1.1rem; max-width: 34rem; }
.cta-band .btn { position: relative; z-index: 1; }

/* ---------- 14. Footer ---------- */
.site-footer { background: #241815; color: rgba(255, 255, 255, .72); padding: 4.5rem 0 2rem; font-size: .975rem; }
.footer-tagline { margin: 1.1rem 0 .75rem; color: rgba(255, 255, 255, .85); font-family: var(--sb-font-display); font-size: 1.3rem; font-style: italic; }
.footer-privacy { display: flex; gap: .5rem; align-items: flex-start; font-size: .9rem; }
.footer-privacy i { color: var(--sb-gold); }
.footer-heading { font-family: var(--sb-font-body); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sb-gold); margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer-links a { color: rgba(255, 255, 255, .72); }
.footer-links a:hover { color: #fff; }
.link-soon { color: rgba(255, 255, 255, .45); cursor: default; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem;
  margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .875rem; color: rgba(255, 255, 255, .5);
}

/* ---------- 15. Placeholder page ---------- */
.soon__card {
  max-width: 640px; margin: 0 auto; text-align: center; background: var(--sb-surface);
  border: 1px solid var(--sb-line); border-radius: var(--sb-radius-lg); padding: clamp(2rem, 5vw, 3.5rem); box-shadow: var(--sb-shadow);
}
.soon__icon { width: 72px; height: 72px; margin: 0 auto 1.25rem; display: grid; place-items: center; border-radius: 50%; background: var(--sb-primary-50); color: var(--sb-primary); font-size: 1.75rem; }
.soon__pick { display: inline-flex; gap: .4rem; align-items: center; background: var(--sb-gold-100); color: var(--sb-primary-700); padding: .4rem .9rem; border-radius: var(--sb-radius-pill); }

/* ---------- 16. Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 17. Template gallery ---------- */
.gallery__head { max-width: 46rem; margin-bottom: 2rem; }
.gallery-filters {
  position: sticky; top: 76px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem;
  padding: .85rem 1rem; margin-bottom: 2rem; background: rgba(250, 247, 242, .94); backdrop-filter: blur(8px);
  border: 1px solid var(--sb-line); border-radius: var(--sb-radius);
}
.filter-group { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter-group--price { padding-left: 1.25rem; border-left: 1px solid var(--sb-line); }
.filter-chip {
  display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .95rem; border-radius: var(--sb-radius-pill);
  border: 1px solid var(--sb-line); background: var(--sb-surface); color: var(--sb-text); font-weight: 500; font-size: .925rem;
  transition: background .2s, color .2s, border-color .2s;
}
.filter-chip:hover { border-color: var(--sb-primary); color: var(--sb-primary); }
.filter-chip.is-active { background: var(--sb-primary); border-color: var(--sb-primary); color: #fff; }
.filter-chip .bi-gem { color: var(--sb-gold); }
.filter-chip.is-active .bi-gem { color: #F3D9A4; }
.gallery-count { margin: 0 0 0 auto; color: var(--sb-muted); font-size: .925rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
.gallery-grid__item { content-visibility: auto; contain-intrinsic-size: auto 640px; }
.gallery-grid__item .template-card { height: 100%; }
.template-card__meta { margin: 0 0 .15rem; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sb-gold-600); }
.gallery-empty { text-align: center; color: var(--sb-muted); padding: 3rem 0; }
@media (max-width: 991.98px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .filter-group--price { padding-left: 0; border-left: 0; }
  .gallery-count { margin-left: 0; width: 100%; }
}
@media (max-width: 575.98px) {
  .gallery-filters { position: static; margin-inline: calc(var(--bs-gutter-x, 1.5rem) * -.5); border-radius: 0; border-inline: 0; }
  .filter-group { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .gallery-grid .template-card { padding: .5rem; }
  .gallery-grid .template-card__preview { padding: .75rem; }
  .gallery-grid .template-card__text { display: none; }
  .gallery-grid .template-card__link { width: 36px; height: 36px; }
  .gallery-grid .template-card__body { padding: .7rem .2rem .2rem; }
  .gallery-grid .template-card__title { font-size: 1rem; }
}

/* ---------- 18. Template detail ---------- */
/* Segmented language switch (creator preview + template pages) */
.lang-toggle { display: grid; grid-template-columns: 1fr 1fr; background: var(--sb-bg-tint); border-radius: var(--sb-radius-pill); padding: 4px; }
.lang-toggle__opt { position: relative; margin: 0; cursor: pointer; }
.lang-toggle__opt input { position: absolute; opacity: 0; pointer-events: none; }
.lang-toggle__opt span { display: block; text-align: center; padding: .4rem .5rem; border-radius: var(--sb-radius-pill); font-weight: 600; font-size: .925rem; color: var(--sb-muted); transition: all .2s var(--sb-ease); }
.lang-toggle__opt input:checked + span { background: var(--sb-surface); color: var(--sb-primary); box-shadow: var(--sb-shadow-sm); }
.lang-toggle__opt input:focus-visible + span { outline: 3px solid rgba(201, 166, 107, .7); }

.tpl-detail { padding: 1.25rem 0 clamp(3rem, 6vw, 5rem); }
.tpl-crumbs { --bs-breadcrumb-divider-color: var(--sb-muted); --bs-breadcrumb-item-active-color: var(--sb-muted); font-size: .875rem; margin-bottom: 1rem; }
.tpl-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; }

/* Viewer: the whole A4 page always fits on screen.
   Paper width = available height × (210 / 297); 250px covers header, toolbar and note. */
.tpl-viewer {
  --tpl-chrome: 250px;
  position: sticky; top: 84px;
  background: var(--sb-bg-tint); border-radius: var(--sb-radius-lg);
  padding: .9rem clamp(.9rem, 2.5vw, 1.5rem) 1rem;
}
.tpl-viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; }
.tpl-viewer__lang { width: 200px; background: var(--sb-surface); }
.tpl-viewer__lang .lang-toggle__opt span { padding: .3rem .5rem; font-size: .875rem; }
.tpl-viewer__zoom, .template-card__quick {
  display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--sb-line); background: var(--sb-surface);
  color: var(--sb-text); font-weight: 600; font-size: .875rem; padding: .4rem .85rem; border-radius: var(--sb-radius-pill);
  transition: border-color .2s, color .2s, box-shadow .2s;
}
.tpl-viewer__zoom:hover { border-color: var(--sb-primary); color: var(--sb-primary); }
.tpl-viewer__stage { display: grid; place-items: center; }
.tpl-viewer__paper {
  display: block; padding: 0; border: 0; background: none; cursor: zoom-in;
  width: min(100%, max(260px, calc((100svh - var(--tpl-chrome)) * .7071)));
}
.tpl-viewer__paper .bd { box-shadow: var(--sb-shadow-lg); transition: transform .35s var(--sb-ease), box-shadow .35s; }
.tpl-viewer__paper:hover .bd { transform: translateY(-3px); box-shadow: 0 30px 70px rgba(68, 40, 28, .2); }
.tpl-viewer__paper:focus-visible { outline: 3px solid rgba(201, 166, 107, .8); outline-offset: 6px; }
.tpl-viewer__note { text-align: center; color: var(--sb-muted); font-size: .8rem; margin: .8rem 0 0; }

.tpl-info { padding-top: .5rem; }
.tpl-info__title { font-size: clamp(2rem, 3.6vw, 2.9rem); margin: .2rem 0 .75rem; }
.tpl-info__tags { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.tpl-info .badge-tier { position: static; }
.tpl-tag { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; color: var(--sb-muted); padding: .22rem .65rem; border: 1px solid var(--sb-line); border-radius: var(--sb-radius-pill); background: var(--sb-surface); }
.tpl-info__desc { font-size: 1.1rem; color: var(--sb-muted); margin: 1rem 0 1.25rem; }
.tpl-info__price { background: var(--sb-surface); border: 1px solid var(--sb-line); border-radius: var(--sb-radius); padding: .9rem 1.2rem; margin-bottom: 1.25rem; }
.tpl-price { display: flex; justify-content: space-between; align-items: baseline; padding: .25rem 0; }
.tpl-price strong { font-family: var(--sb-font-display); font-size: 1.6rem; color: var(--sb-primary); }
.tpl-price__note { margin: .5rem 0 0; font-size: .85rem; color: var(--sb-muted); }
.tpl-info__ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.75rem; }
.tpl-info__list { list-style: none; padding: 1.25rem 0 0; margin: 0; display: grid; gap: .55rem; border-top: 1px solid var(--sb-line); font-size: .95rem; }
.tpl-info__list i { color: #3E9B6B; margin-right: .35rem; }
.tpl-related { margin-top: clamp(3rem, 7vw, 5rem); }
.tpl-related__title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1.5rem; }
.tpl-mobile-cta { display: none; }

@media (max-width: 991.98px) {
  .tpl-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .tpl-viewer { position: static; --tpl-chrome: 230px; }
  .tpl-info { padding-top: 0; }
  .tpl-info__ctas { display: none; }               /* replaced by the sticky bar */
  .tpl-mobile-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1020;
    padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
    border-top: 1px solid var(--sb-line); box-shadow: 0 -8px 24px rgba(41, 36, 33, .08);
  }
  .tpl-mobile-cta__price { color: var(--sb-muted); font-size: .9rem; }
  .tpl-mobile-cta__price strong { font-family: var(--sb-font-display); font-size: 1.4rem; color: var(--sb-primary); }
  .tpl-mobile-cta .btn { flex: 0 0 auto; padding-inline: 1.4rem; }
  .page-template-detail .site-footer { padding-bottom: 6rem; }
}
@media (max-width: 575.98px) {
  .tpl-viewer { margin-inline: calc(var(--bs-gutter-x, 1.5rem) * -.5); border-radius: 0; }
  .tpl-viewer__lang { width: 170px; }
  .tpl-viewer__zoom span, .tpl-viewer__zoom { font-size: .8rem; }
}

/* ---------- 19. Pricing page ---------- */
.pricing-notice { max-width: 46rem; margin: 2rem auto 0; text-align: center; color: var(--sb-muted); font-size: .95rem; }
.pricing-notice i { color: var(--sb-gold-600); }
.compare { margin-top: clamp(3rem, 7vw, 5rem); }
.compare__title { font-size: clamp(1.6rem, 3vw, 2.2rem); text-align: center; margin-bottom: 1.5rem; }
.compare__table { --bs-table-bg: transparent; background: var(--sb-surface); border-radius: var(--sb-radius); overflow: hidden; border: 1px solid var(--sb-line); margin: 0; }
.compare__table th, .compare__table td { padding: .85rem 1rem; vertical-align: middle; border-color: var(--sb-line); }
.compare__table thead th { text-align: center; font-weight: 700; background: var(--sb-bg-tint); }
.compare__table thead th span { display: block; font-family: var(--sb-font-display); font-size: 1.3rem; color: var(--sb-primary); }
.compare__table thead th.is-highlight { background: var(--sb-gold-100); }
.compare__table tbody th { font-weight: 500; }
.compare__table td { text-align: center; }
.pricing-faq { margin-top: clamp(3rem, 7vw, 5rem); }

/* ==========================================================================
   20. Purchases & receipt (Milestone 6)
   ========================================================================== */
.container--narrow { max-width: 780px; }
.purchase-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.purchase {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
  padding: 1rem 1.15rem; background: #fff; border: 1px solid var(--sb-line); border-radius: var(--sb-radius-sm, 12px);
}
.purchase__main { flex: 1 1 260px; min-width: 0; }
.purchase__title { font-weight: 600; margin: 0; }
.purchase__meta { margin: .15rem 0 0; font-size: .85rem; color: var(--sb-muted); }
.purchase__status { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .2rem .6rem; border-radius: 99px; background: #F1ECE6; color: var(--sb-muted); }
.purchase__status--paid { background: #E3F4EA; color: #1F7A4D; }
.purchase__status--failed { background: #FBE7E4; color: #A63A2B; }
.purchase__actions { display: flex; gap: .5rem; }
.purchase-empty { text-align: center; padding: 3rem 1rem; border: 1px dashed var(--sb-line); border-radius: var(--sb-radius-sm, 12px); }
.purchase-empty .bi { font-size: 2rem; color: var(--sb-gold-600); }

.receipt { background: #fff; border: 1px solid var(--sb-line); border-radius: var(--sb-radius-sm, 12px); padding: clamp(1.25rem, 4vw, 2.25rem); }
.receipt__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; border-bottom: 1px solid var(--sb-line); padding-bottom: 1rem; margin-bottom: 1rem; }
.receipt__title { font-size: 1.35rem; margin: 0; }
.receipt__rows { margin: 0; }
.receipt__rows > div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--sb-line); }
.receipt__rows dt { font-weight: 500; color: var(--sb-muted); }
.receipt__rows dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.receipt__rows code { color: inherit; font-size: .85em; }
.receipt__total { border-bottom: 0 !important; font-size: 1.1rem; }
.receipt__total dt, .receipt__total dd { font-weight: 700; color: inherit; }
.receipt__note { margin: 1rem 0 0; font-size: .8rem; color: var(--sb-muted); }
.receipt-actions { display: flex; gap: .6rem; margin-top: 1.25rem; }
@media print {
  .page-receipt .site-header, .page-receipt .site-footer, .page-receipt .receipt-actions { display: none !important; }
  .page-receipt .section { padding: 0; }
  .receipt { border: 0; }
}


/* ==========================================================================
   21. Quick view on cards + full-screen design viewer
   ========================================================================== */
.template-card__quick {
  position: absolute; left: 50%; bottom: 1.25rem; z-index: 3; transform: translate(-50%, 8px);
  opacity: 0; box-shadow: var(--sb-shadow); white-space: nowrap;
  transition: opacity .25s var(--sb-ease), transform .25s var(--sb-ease), color .2s;
}
.template-card:hover .template-card__quick, .template-card__quick:focus-visible { opacity: 1; transform: translate(-50%, 0); }
.template-card__quick:hover { color: var(--sb-primary); border-color: var(--sb-primary); }
@media (hover: none) {               /* phones: always visible, compact */
  .template-card__quick { opacity: 1; transform: none; left: auto; right: .6rem; bottom: .6rem; padding: .35rem; width: 34px; height: 34px; justify-content: center; }
  .template-card__quick { font-size: 0; }
  .template-card__quick .bi { font-size: .9rem; }
}

.lightbox .modal-content { background: rgba(26, 19, 16, .97); color: #fff; }
.lightbox__bar { display: flex; align-items: center; gap: .6rem; padding: .7rem clamp(.75rem, 2vw, 1.5rem); flex: none; }
.lightbox__title { flex: 1; min-width: 0; margin: 0; color: #fff; font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lightbox__zoom { display: inline-flex; background: rgba(255, 255, 255, .08); border-radius: var(--sb-radius-pill); padding: 3px; }
.lightbox__zoom button { border: 0; background: none; color: rgba(255, 255, 255, .75); font-size: .85rem; font-weight: 600; padding: .3rem .8rem; border-radius: var(--sb-radius-pill); }
.lightbox__zoom button.is-active { background: #fff; color: #2A1D18; }
.lightbox__close { border: 0; background: rgba(255, 255, 255, .1); color: #fff; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.lightbox__close:hover { background: rgba(255, 255, 255, .2); }
.lightbox__body { flex: 1; min-height: 0; overflow: auto; display: flex; padding: .5rem 1rem 1.5rem; }
.lightbox__paper { margin: auto; flex: none; cursor: zoom-in; width: min(100%, max(240px, calc((100svh - 110px) * .7071))); }
.lightbox__paper .bd { box-shadow: 0 30px 90px rgba(0, 0, 0, .55); }
.lightbox.is-actual .lightbox__paper { width: 794px; max-width: none; cursor: zoom-out; }  /* 210 mm at 96 dpi */
@media (max-width: 575.98px) {
  .lightbox__zoom span { display: none; }
  .lightbox__use { display: none; }
  .lightbox.is-actual .lightbox__paper { width: 620px; }
}

.purchase-forget { margin-top: 1.5rem; padding: 1rem 1.15rem; border: 1px dashed var(--sb-line); border-radius: var(--sb-radius-sm, 12px); }
.purchase-forget p { font-size: .85rem; color: var(--sb-muted); margin-bottom: .6rem; }

.plan--free { max-width: 460px; }
.restore-form { background: #fff; border: 1px solid var(--sb-line); border-radius: var(--sb-radius-sm, 12px); padding: 1.25rem; }
.restore-form__row { display: flex; gap: .6rem; }
.restore-form__error { color: #A63A2B; margin: .6rem 0 0; font-size: .9rem; }
.purchase-restore-link { margin-bottom: 1rem; font-size: .92rem; }

/* ==========================================================================
   22. Legal, landing and error pages (Milestone 7)
   ========================================================================== */
.legal__layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.legal__nav { position: sticky; top: 96px; display: grid; gap: .2rem; }
.legal__nav a { padding: .5rem .8rem; border-radius: 10px; color: var(--sb-muted); text-decoration: none; font-weight: 500; }
.legal__nav a:hover { background: var(--sb-bg-tint); color: var(--sb-primary); }
.legal__nav a.is-active { background: var(--sb-primary); color: #fff; }
.legal__body { max-width: 760px; }
.legal__body p { color: #4A3C35; }
.legal__h2 { font-size: 1.5rem; margin: 2rem 0 .6rem; }
.legal__updated, .legal__lang-note { font-size: .85rem; color: var(--sb-muted); }
.contact-card { background: #fff; border: 1px solid var(--sb-line); border-radius: var(--sb-radius); padding: 1.25rem 1.4rem; margin: 1.5rem 0; }
.contact-card p { margin: .35rem 0; }
.contact-card__name { font-weight: 700; font-size: 1.1rem; }
.contact-card .bi { color: var(--sb-primary); margin-right: .4rem; }
@media (max-width: 991.98px) {
  .legal__layout { grid-template-columns: minmax(0, 1fr); }
  .legal__nav { position: static; display: flex; flex-wrap: wrap; gap: .4rem; }
  .legal__nav a { border: 1px solid var(--sb-line); font-size: .85rem; padding: .35rem .7rem; }
}
.landing__head { max-width: 760px; margin-bottom: 2.5rem; }
.landing__ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.landing__h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 1.25rem; }
.landing__guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem 2.5rem; margin: 3.5rem 0 0; }
.landing__guide-part ul { list-style: none; padding: 0; margin: 0; }
.landing__guide-part li { position: relative; padding: .55rem 0 .55rem 1.4rem; border-bottom: 1px solid var(--sb-line); }
.landing__guide-part li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: 7px; height: 7px; border-radius: 50%; background: var(--sb-primary); }
.landing__tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin: 3.5rem 0; }
.landing__tip { background: #fff; border: 1px solid var(--sb-line); border-radius: var(--sb-radius); padding: 1.4rem; }
.landing__tip h3 { font-size: 1.25rem; margin: .6rem 0 .4rem; }
.landing__tip p { color: var(--sb-muted); margin: 0; font-size: .95rem; }
.landing__tip-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sb-primary); color: #fff; font-weight: 700; }
.landing__faq { max-width: 820px; }
.landing__more { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.5rem; }
.error-page { padding: clamp(4rem, 12vw, 8rem) 0; }
.error-page__code { font-family: var(--sb-font-display); font-size: clamp(4rem, 12vw, 7rem); color: var(--sb-gold); line-height: 1; margin: 0; }

/* ---------- Card extras: "New" badge, languages, select button ---------- */
.badge-new {
  position: absolute; top: .9rem; right: .9rem; z-index: 2;
  background: var(--sb-primary); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: .22rem .6rem; border-radius: var(--sb-radius-pill);
}
.template-card__langs { margin: .45rem 0 0; font-size: .8rem; color: var(--sb-muted); }
.template-card__langs .bi { color: var(--sb-primary); }
.template-card__select { position: relative; z-index: 2; margin-top: .7rem; white-space: nowrap; }
@media (max-width: 575.98px) {
  .gallery-grid .template-card__langs { font-size: .72rem; }
  .gallery-grid .template-card__select { font-size: .78rem; padding: .25rem .6rem; }
}

/* Language menu: website languages, then the extra biodata languages */
.lang-switch .dropdown-menu { max-height: min(75vh, 34rem); overflow-y: auto; min-width: 14rem; }
.lang-switch__note { font-size: .74rem; line-height: 1.35; color: var(--sb-muted); padding: .55rem .75rem .35rem; margin-top: .25rem; border-top: 1px solid var(--sb-line); max-width: 15rem; }
