/* templates.css — the biodata documents.
 *
 * One set of content rules serves every design. Each design only sets
 * custom properties on the page root (colours through --acc, --rule,
 * --label, --value; type through --f-head, --h-size, --kv-size …) and, where
 * it genuinely differs, a few rules under its own class at the end.
 *
 * Export note: the image exporter paints boxes, borders (one uniform
 * border), radii, gradients, text leaves and inline SVG. Rules are drawn as
 * thin filled boxes rather than one-sided borders for that reason.
 */

/* ====================================================== page + base type == */
.biodata-page.script-pa { --f-body:'Noto Sans Gurmukhi',sans-serif; --f-head:'Noto Sans Gurmukhi',sans-serif; }
.biodata-page.script-pa .bd-name,.biodata-page.script-pa .f-ui,.biodata-page.script-pa .bd-heading {font-family:'Noto Sans Gurmukhi',sans-serif!important;line-height:1.45;letter-spacing:0;}
.d-approved .bd-name {text-wrap:balance;}
.biodata-page {
  --f-body: 'EB Garamond', 'Tiro Devanagari Marathi', Georgia, serif;
  --f-head: 'Playfair Display', 'Tiro Devanagari Marathi', Georgia, serif;
  --h-size: 21px;
  --kv-size: 14.5px;
  --kv-gap: 4px;
  --sec-gap: 12px;
  --line-size: 16px;
  --label-w: 400;
  --value-w: 500;
  position: relative;
  overflow: hidden;
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 100%;
  box-shadow: 0 10px 40px rgba(40, 26, 12, .16);
  color: var(--ink, #2b2119);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.biodata-page * { box-sizing: border-box; }
.biodata-page p { margin: 0; }
.biodata-page.script-deva {
  --f-body: 'Tiro Devanagari Marathi', 'Mukta', 'Noto Sans Devanagari', serif;
  --f-head: 'Tiro Devanagari Marathi', 'Mukta', serif;
}
.biodata-page.script-gu {
  --f-body: 'Rasa', 'Mukta Vaani', 'Noto Sans Gujarati', serif;
  --f-head: 'Rasa', 'Mukta Vaani', serif;
}

/* type roles a design can opt into */
.f-ui { font-family: 'Outfit', 'Mukta', 'Mukta Vaani', system-ui, sans-serif; }
.f-display { font-family: 'Fraunces', 'Tiro Devanagari Marathi', 'Rasa', Georgia, serif; font-weight: 600; }
.f-editorial { font-family: 'Instrument Serif', 'Tiro Devanagari Marathi', 'Rasa', Georgia, serif; font-weight: 400; }
.f-corm { font-family: 'Cormorant Garamond', 'Tiro Devanagari Marathi', 'Rasa', Georgia, serif; }
.f-play { font-family: 'Playfair Display', 'Tiro Devanagari Marathi', 'Rasa', Georgia, serif; }
.f-script { font-family: 'Great Vibes', 'Tiro Devanagari Marathi', 'Rasa', cursive; font-weight: 400; line-height: 1.1; }
.script-deva .f-display, .script-deva .f-editorial, .script-deva .f-corm, .script-deva .f-play { font-family: 'Tiro Devanagari Marathi', 'Mukta', serif; font-weight: 700; }
.script-deva .f-ui { font-family: 'Mukta', 'Noto Sans Devanagari', sans-serif; }
.script-deva .f-script { font-family: 'Tiro Devanagari Marathi', 'Mukta', serif; font-style: normal; font-weight: 400; }
.script-gu .f-display, .script-gu .f-editorial, .script-gu .f-corm, .script-gu .f-play { font-family: 'Rasa', 'Mukta Vaani', serif; font-weight: 700; }
.script-gu .f-ui { font-family: 'Mukta Vaani', 'Noto Sans Gujarati', sans-serif; text-transform: none !important; letter-spacing: .02em !important; }
.script-gu .f-script { font-family: 'Rasa', 'Mukta Vaani', serif; font-style: normal; }
.script-deva .f-ui { text-transform: none !important; }

/* decorative layers sit behind everything */
.bd-layer { position: absolute; pointer-events: none; }
.bd-layer > svg { width: 100%; height: 100%; display: block; }
.bd-mono-layer { display: flex; align-items: center; justify-content: center; line-height: 1; font-family: 'Cormorant Garamond', 'Tiro Devanagari Marathi', 'Rasa', serif; }
.bd-abs { position: absolute; margin: 0; }

.bd-kicker { font-family: 'Cormorant Garamond', 'Tiro Devanagari Marathi', 'Rasa', Georgia, serif; line-height: 1.22; }
.script-deva .bd-kicker { font-family: 'Tiro Devanagari Marathi', 'Mukta', serif; }
.script-gu .bd-kicker { font-family: 'Rasa', 'Mukta Vaani', serif; }

.bd-name {
  font-family: 'Playfair Display', 'Tiro Devanagari Marathi', 'Rasa', Georgia, serif;
  font-weight: 700; line-height: 1.04; letter-spacing: -.015em;
  overflow-wrap: break-word; word-break: break-word; text-wrap: balance;
}
.script-deva .bd-name { line-height: 1.24; letter-spacing: 0; }
.script-gu .bd-name { line-height: 1.2; letter-spacing: 0; }
.bd-quickline { line-height: 1.4; }
.bd-headrule { position: absolute; }

/* header stack: kicker, name and quick line in normal flow */
.bd-stack { position: absolute; display: flex; flex-direction: column; }
.bd-stack .bd-stack-item { margin: 0; position: static; }
.bd-stack .bd-stack-rule { flex: 0 0 auto; }
.bd-orn, .bd-sprout { flex: 0 0 auto; height: 16px; }
.bd-orn svg, .bd-sprout svg { display: block; width: 100%; height: 100%; }
.bd-sprout { height: 20px; }

/* ------------------------------------------------------------- photo -- */
.bd-photo-frame {
  position: absolute; overflow: hidden;
  background: rgba(0, 0, 0, .06);
  display: flex; align-items: center; justify-content: center;
}
.bd-photo-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bd-photo-outline { z-index: 3; }
.bd-photo-outline svg, .lux-shape, .lux-beads { width: 100%; height: 100%; display: block; }
.bd-photo-frame.has-shape { box-shadow: none !important; }
.ph-ring { box-shadow: 0 0 0 1px rgba(255, 255, 255, .22), 0 18px 46px rgba(0, 0, 0, .45); }

/* -------------------------------------------------------------- body -- */
.bd-body { position: absolute; }
.bd-fit { transform-origin: top left; transform: scale(var(--fit, 1)); width: calc(100% / var(--fit, 1)); }

.bd-section { margin-bottom: var(--sec-gap); }
.bd-section:last-child { margin-bottom: 0; }

.bd-heading {
  display: flex; align-items: center; gap: 9px; margin: 0 0 7px;
  font-family: var(--f-head);
  font-weight: 600; font-size: var(--h-size); line-height: 1.2; white-space: nowrap;
  color: var(--head);
}
.script-deva .bd-heading, .script-gu .bd-heading { font-size: calc(var(--h-size) - 1px); font-weight: 700; }
.bd-heading .h-text { flex: 0 0 auto; }
.bd-heading .h-rule { flex: 1 1 auto; height: 1px; min-width: 8px; background: var(--rule); opacity: .7; }
.bd-heading .h-leaf { flex: 0 0 auto; width: 26px; height: 20px; }
.bd-heading .h-icon { flex: 0 0 auto; width: 20px; height: 20px; color: var(--acc); }
.bd-heading .h-badge {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
  background: var(--badge-bg); color: var(--acc);
  display: flex; align-items: center; justify-content: center;
}
.bd-heading .h-badge svg { width: 16px; height: 16px; }
.bd-heading .h-bar { flex: 0 0 auto; width: 3px; height: 15px; border-radius: 2px; background: var(--acc); }
.bd-heading .h-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); }
.bd-heading .h-flourish { flex: 0 0 auto; width: 42px; height: 13px; color: var(--rule); }
.bd-heading .h-flower { flex: 0 0 auto; width: 17px; height: 17px; color: var(--rule); }
.bd-heading .h-sprig { flex: 0 0 auto; width: 30px; height: 25px; margin-right: 1px; }
.bd-heading .h-sprig svg, .bd-heading .h-loz svg, .bd-heading .h-line svg, .bd-heading .h-glyph svg { display: block; width: 100%; height: 100%; }
.bd-heading .h-loz { flex: 0 0 auto; width: 26px; height: 14px; margin-right: -4px; }
.bd-heading .h-line { flex: 0 0 auto; width: 25px; height: 25px; }
.bd-heading.is-glyph { gap: 14px; margin-bottom: 9px; font-weight: 700; }
.bd-heading .h-glyph { flex: 0 0 auto; width: 30px; height: 30px; color: var(--acc); }

/* centred heading with a lozenge rule beneath it */
.bd-heading.is-under { justify-content: center; margin-bottom: 2px; }
.h-under { width: 150px; height: 12px; margin: 0 auto 8px; }
.h-under svg { display: block; width: 100%; height: 100%; }
.bd-col .bd-heading.is-under, .bd-col .h-under { justify-content: flex-start; margin-left: 0; }

/* heading set in a tinted pill */
.bd-heading.is-pill { display: inline-flex; padding: 5px 16px 5px 10px; border-radius: 30px; background: var(--pill, rgba(0,0,0,.05)); }

/* the modern designs use a small letterspaced label instead of a serif head */
.bd-heading.is-caps {
  font-family: 'Outfit', 'Mukta', system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: .2em;
  font-size: 12.5px; font-weight: 600; color: var(--acc);
}
.script-deva .bd-heading.is-caps { font-family: 'Mukta', sans-serif; text-transform: none; letter-spacing: .02em; font-size: 16px; }
.script-gu .bd-heading.is-caps { font-family: 'Mukta Vaani', sans-serif; text-transform: none; letter-spacing: .02em; font-size: 16px; }

/* key : value rows */
/* The label column takes what it needs up to 42% of the width; a longer
   label wraps rather than squeezing the value into a narrow strip. */
.kv-grid { display: grid; grid-template-columns: fit-content(42%) minmax(0, 1fr); gap: var(--kv-gap) 16px; align-items: baseline; }
.kv-label { font-size: var(--kv-size); font-weight: var(--label-w); color: var(--label); line-height: 1.35; }
.kv-value { line-height: 1.4; }
.kv-label::after { content: ":"; }
.kv-value { font-size: var(--kv-size); font-weight: var(--value-w); color: var(--value); overflow-wrap: break-word; word-break: break-word; }
.script-deva .kv-label, .script-deva .kv-value, .script-gu .kv-label, .script-gu .kv-value { font-size: calc(var(--kv-size) - .5px); }

/* education as set lines */
.bd-lines { display: flex; flex-direction: column; gap: 2px; }
.bd-line { font-size: var(--line-size); color: var(--value); line-height: 1.34; }
.bd-line.is-lead { font-weight: 600; }
.bd-line.is-em { font-weight: 600; color: var(--value); }

.bd-about-text { font-size: var(--kv-size); line-height: 1.58; color: var(--value); }
.bd-inline { font-size: var(--kv-size); line-height: 1.55; color: var(--value); }
.bd-pairs { display: flex; flex-wrap: wrap; gap: 1px 20px; font-size: var(--kv-size); line-height: 1.5; }
.bd-centre .bd-pairs { justify-content: center; }
.bd-pair .pl { color: var(--label); font-weight: var(--label-w); }
.bd-pair .pv { color: var(--value); font-weight: var(--value-w); }
.bd-divider { display: block; width: 100%; height: 12px; margin: 8px 0; color: var(--rule); }

/* separators between sections */
.bd-sep { display: flex; align-items: center; gap: 6px; margin: 2px 0 calc(var(--sec-gap) + 2px); }
.bd-sep .sp-l { flex: 1 1 auto; height: 1px; background: var(--rule); opacity: .6; }
.bd-sep .sp-m { flex: 0 0 auto; width: 30px; height: 16px; }
.bd-sep.is-sprout .sp-m { width: 56px; height: 20px; }
.bd-sep .sp-m svg { display: block; width: 100%; height: 100%; }
.bd-sep.is-line { height: 1px; background: var(--rule); opacity: .75; margin: 4px 0 calc(var(--sec-gap) + 4px); }
.bd-sep + .bd-section { margin-top: 0; }

/* two columns side by side with a rule between */
.bd-split { display: grid; gap: 0 22px; align-items: start; }
.bd-vdiv { align-self: stretch; width: 1px; background: linear-gradient(180deg, transparent 0%, var(--rule) 16%, var(--rule) 84%, transparent 100%); opacity: .8; }

/* two-column flow */
.bd-body.cols2 .bd-fit { column-count: 2; column-gap: 30px; }
.bd-body.cols2 .bd-section { break-inside: avoid; margin-bottom: 14px; }

.bd-centre { text-align: center; }
.bd-centre .bd-heading { justify-content: center; }
.bd-centre .bd-heading .h-rule { display: none; }
.bd-centre .kv-grid { width: max-content; max-width: 100%; margin: 0 auto; text-align: left; }
.bd-centre .bd-sep .sp-l { max-width: 180px; }
.bd-centre .bd-sep { justify-content: center; }

/* bento tiles */
.bd-bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; align-content: start; align-items: start; }
.bd-tile { background: var(--tile); border: 1px solid var(--tile-line); border-radius: 18px; padding: 15px 17px; }
.bd-tile .bd-section { margin-bottom: 0; }

/* ------------------------------------------------ illustrated family tree */
.ft2 { position: relative; margin: 2px auto 4px; }
.ft2-art { margin: 0 auto; }
.ft2-art svg { display: block; width: 100%; height: 100%; }
.ft2-p { position: absolute; width: 31%; text-align: center; }
.ft2-l { left: 0; } .ft2-r { right: 0; }
.ft2-fan .ft2-p { bottom: 0; }
.ft2-fan .ft2-l { left: 0; } .ft2-fan .ft2-r { right: 0; }
.ft2-tee .ft2-p { top: 31%; }
.ft2-rel { font-size: calc(var(--kv-size) - .5px); color: var(--label); line-height: 1.25; }
.ft2-name { font-size: calc(var(--kv-size) + 1.5px); font-weight: 700; color: var(--value); line-height: 1.22; }
.ft2-occ { font-size: calc(var(--kv-size) - .5px); color: var(--label); line-height: 1.25; }
.ft2-foot { text-align: center; font-size: var(--kv-size); color: var(--value); line-height: 1.45; }
.ft2-roots { color: var(--label); }
.ft2 + .ft2-foot { margin-top: 4px; }
.s-family.is-tree .kv-grid { margin-top: 6px; }

/* legacy compact tree (kept for older configs) */
.ft-wrap { display: grid; grid-template-columns: 1fr 180px 1fr; align-items: center; gap: 0 6px; margin: 2px 0 4px; }
.ft-tree { display: block; width: 180px; height: 118px; }

/* ---------------------------------------------- framed partner box -- */
.bd-pbox { position: relative; border: 1px solid var(--rule); border-radius: 14px; padding: 5px; }
.bd-pbox-in { border: 1px solid color-mix(in srgb, var(--rule) 55%, transparent); border-radius: 10px; padding: 11px 22px 13px; }
.bd-pc { position: absolute; width: 22px; height: 22px; }
.bd-pc svg { display: block; width: 100%; height: 100%; }
.bd-pc.tl { left: -3px; top: -3px; } .bd-pc.tr { right: -3px; top: -3px; }
.bd-pc.br { right: -3px; bottom: -3px; } .bd-pc.bl { left: -3px; bottom: -3px; }
.bd-pbox .bd-heading { margin-bottom: 4px; }
.bd-pbox .bd-heading .h-rule, .bd-pbox .bd-heading .h-loz { display: none; }

/* centred contact */
.bd-contact { display: flex; flex-direction: column; gap: 2px; }
.bd-cline { font-size: calc(var(--kv-size) + 2.5px); font-weight: 600; color: var(--value); line-height: 1.35; }
.bd-cline2 { font-size: var(--kv-size); color: var(--label); line-height: 1.4; }

/* legacy partner box */
.bd-partner-box { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 16px 12px; position: relative; }
.bd-monogram { position: absolute; }

/* ---------------------------------------------- surfaces for details -- */
.bd-body.sheet {
  background: rgba(255, 255, 255, .84);
  border: 1px solid color-mix(in srgb, var(--rule) 55%, transparent);
  border-radius: 20px;
  padding: 22px 26px 18px;
  box-shadow: 0 10px 30px rgba(120, 70, 20, .08);
}
.bd-body.sheet.cols2 .bd-fit { column-gap: 32px; }
.bd-body.paper {
  background: linear-gradient(180deg, #fefaf0 0%, #fbf4e6 100%);
  border-radius: 6px; padding: 24px 28px;
  box-shadow: 0 0 0 1px rgba(201, 153, 47, .55), 0 0 0 5px rgba(201, 153, 47, .16), 0 18px 46px rgba(0, 0, 0, .3);
}
.bd-body.tile { background: var(--tile); border: 1px solid var(--tile-line); border-radius: 22px; padding: 13px 18px 12px; }
.bd-body.card { background: #fff; border-radius: 24px; padding: 24px 28px; box-shadow: 0 18px 50px rgba(0, 0, 0, .08); }
.bd-body.glass {
  background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 26px; padding: 26px 30px; box-shadow: 0 24px 60px rgba(0, 0, 0, .34);
}

/* the legacy lux helpers */
.lux-mandala, .lux-frame, .lux-bracket, .lux-arch,
.lux-divider, .lux-paisley, .lux-corner, .lux-jali { width: 100%; height: 100%; display: block; }

/* preview watermark on locked premium designs */
.bd-watermark { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.bd-watermark svg { display: block; width: 100%; height: 100%; }

/* blessing line */
.bd-invocation { margin: 0; font-family: 'Tiro Devanagari Marathi', 'Rasa', 'EB Garamond', serif; font-weight: 600; letter-spacing: .05em; line-height: 1.3; white-space: nowrap; overflow: hidden; }
.bd-empty-art svg { display: block; width: 100%; height: 100%; }

/* ---- gentle on-screen motion — never in the print or export */
@keyframes il-sway { 0%, 100% { transform: rotate(-1.4deg); } 50% { transform: rotate(1.4deg); } }
@keyframes il-beat { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.18); } }
@keyframes il-twinkle { 0%, 100% { opacity: .2; transform: scale(.55); } 50% { opacity: 1; transform: scale(1); } }
@keyframes il-fall {
  0% { transform: translate(0, -30px) rotate(0deg); opacity: 0; }
  10% { opacity: .9; }
  100% { transform: translate(40px, 460px) rotate(300deg); opacity: 0; }
}
@keyframes il-flicker { 0%, 100% { transform: scale(1, 1); } 40% { transform: scale(.94, 1.06); } 70% { transform: scale(1.04, .97); } }
.il-anim .il-couple { transform-origin: 50% 96%; animation: il-sway 4.2s ease-in-out infinite; }
.il-anim .il-beat { transform-box: fill-box; transform-origin: center; animation: il-beat 1.5s ease-in-out infinite; }
.il-anim .il-beat.d2 { animation-delay: .5s; }
.il-anim .il-twinkle { transform-box: fill-box; transform-origin: center; animation: il-twinkle 2.6s ease-in-out infinite; }
.il-anim .il-twinkle.d1 { animation-delay: .6s; } .il-anim .il-twinkle.d2 { animation-delay: 1.2s; } .il-anim .il-twinkle.d3 { animation-delay: 1.8s; }
.il-anim .il-petal { transform-box: fill-box; animation: il-fall 9s linear infinite; }
.il-anim svg.il-petals { overflow: visible; }
@media (prefers-reduced-motion: reduce) {
  .il-anim .il-couple, .il-anim .il-beat, .il-anim .il-twinkle, .il-anim .il-petal { animation: none; }
}

/* ======================================================= design accents == */
.d-rose .bd-name, .d-royale .bd-name, .d-emerald .bd-name { font-family: 'Cormorant Garamond', 'Tiro Devanagari Marathi', 'Rasa', Georgia, serif; font-weight: 600; letter-spacing: .01em; }
.d-aurora .bd-name { letter-spacing: -.028em; }
.d-aurora .bd-heading .h-rule { opacity: .35; }
.d-deco .bd-heading .h-rule { opacity: .45; }
.d-editorial .bd-name { letter-spacing: -.02em; line-height: .98; }
.d-editorial .side .bd-heading { color: var(--acc); }
.d-illustrated .bd-body.sheet.cols2 .bd-fit { column-rule: 1px dashed color-mix(in srgb, var(--rule) 40%, transparent); }
.script-deva.d-editorial .bd-name, .script-gu.d-editorial .bd-name { line-height: 1.2; }
/* a key/value list set as two pairs per row */
.bd-body.kv2 .kv-grid { grid-template-columns: fit-content(22%) minmax(0, 1fr) fit-content(22%) minmax(0, 1fr); column-gap: 14px; }

/* ---- Editorial: letterspaced serif caps beside a tan badge */
.d-editorial .bd-heading { font-family: 'Cormorant Garamond', 'Tiro Devanagari Marathi', 'Rasa', serif; font-weight: 600; font-style: italic; font-size: 23px; gap: 8px; color: var(--head); }
.script-deva.d-editorial .bd-heading, .script-gu.d-editorial .bd-heading { font-style: normal; font-size: 20px; }
.d-editorial .side .bd-heading { font-size: 20px; gap: 6px; white-space: normal; }
.d-editorial .side .bd-heading .h-text { line-height: 1.2; }
.d-editorial .side .bd-heading .h-rule, .d-editorial .side .bd-heading .h-loz { display: none; }
.d-editorial .side .kv-grid { grid-template-columns: fit-content(44%) minmax(0, 1fr); column-gap: 8px; }

.d-editorial .side .bd-pairs { flex-direction: column; gap: 4px; }
.d-editorial .side .bd-pair .pl { display: inline; color: var(--label); }

/* ---- Indigo: the family sits in its cream panel */
.i-family .bd-heading.is-pill { margin: 0 auto 6px; }
.i-family .ft2 { margin-top: 0; }

/* ---- Blossom: the parents sit in peach pills either side of the sprig */
.d-blossom .ft2-p { background: rgba(251,229,212,.78); border-radius: 14px; padding: 6px 8px; width: 30%; }
.d-blossom .ft2-fan .ft2-p { bottom: 6px; }
.d-blossom .b-family .ft2-foot:not(.ft2-roots) { display: inline-block; background: rgba(226,233,212,.8); border-radius: 12px; padding: 2px 14px; margin-top: 8px; }
.bd-split .bd-col { min-width: 0; }
.bd-about-head { font-style: italic; line-height: 1.5; }
.script-deva .bd-about-head, .script-gu .bd-about-head { font-style: normal; }
.i-about .bd-heading { display: none; }
.i-about .bd-about-text { font-style: italic; font-size: calc(var(--kv-size) + .5px); color: var(--label); }
.script-deva .i-about .bd-about-text, .script-gu .i-about .bd-about-text { font-style: normal; }
.d-blossom .bd-contact .bd-cline { font-size: var(--kv-size); }

/* Indic scripts join letters into conjuncts: tracking pulls them apart, so
   every letter-spaced style is set solid in Devanagari and Gujarati. */
.biodata-page.script-deva *, .biodata-page.script-gu * { letter-spacing: normal !important; }
.script-deva .k-caps, .script-gu .k-caps { font-size: calc(var(--ks, 13px) * 1.3) !important; text-transform: none !important; }

/* ---- earlier designs (kept for hand-picking) */
.bd-body.sheet-soft { background: rgba(255, 255, 255, .8); border-radius: 26px; }
.bd-body.sheet-leaf { background: rgba(255, 255, 255, .78); }
.bd-body.sheet-teal { background: rgba(255, 255, 255, .86); border-color: rgba(15, 107, 118, .22); }
.bd-monogram svg { width: 100%; height: 100%; display: block; }
.d-noir .bd-name { letter-spacing: -.01em; line-height: .98; }
.d-noir .bd-heading .h-rule { opacity: .5; }
.d-kamal .bd-heading, .d-mehendi .bd-heading, .d-mor .bd-heading { font-size: 19px; }
.d-bento .bd-tile .bd-heading { margin-bottom: 9px; }
.d-bento .ft2 { transform-origin: top center; }
.ft-wrap .ft-person { text-align: center; }
.ft-person .ft-rel { font-size: 12.5px; color: var(--label); }
.ft-person .ft-name { font-size: 15px; font-weight: 700; color: var(--value); line-height: 1.25; }
.ft-person .ft-occ { font-size: 12.5px; color: var(--label); }
.ft-foot { text-align: center; font-size: 13.5px; margin-top: 2px; color: var(--value); }

/* ---- stacked label-over-value pairs, two per row */
.kv-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 22px; }
.kv-p { display: flex; flex-direction: column; min-width: 0; }
.kv-p.is-wide { grid-column: span 2; }
.kvs-label { font-size: calc(var(--kv-size) - 3px); color: var(--label); line-height: 1.3; }
.kvs-value { font-size: var(--kv-size); color: var(--value); font-weight: var(--value-w); line-height: 1.35; overflow-wrap: break-word; }
.bd-heading.is-band { background: var(--band, rgba(0,0,0,.05)); border-radius: 6px; padding: 4px 10px; font-size: calc(var(--h-size) - 2px); margin-bottom: 9px; }
.bd-centre .bd-heading.is-band { justify-content: center; }
.d-folio2 .bd-heading { font-weight: 700; }
.d-folio2.is-dark .bd-body.tile { background: rgba(255,255,255,.06); }
.d-folio2 .bd-vdiv { opacity: .45; }

/* row layout: side-by-side pairs and centred full-width rows */
.bd-row.is-one { text-align: center; }
.bd-row.is-one .bd-heading { justify-content: center; }
.bd-row.is-one .bd-heading .h-rule { display: none; }
.bd-row.is-one .kv-grid { width: max-content; max-width: 100%; margin: 0 auto; text-align: left; }
.bd-row.is-one .bd-pairs { justify-content: center; }
.bd-row + .bd-row { margin-top: var(--sec-gap, 10px); }
.bd-row .bd-section { margin-bottom: 0; }
.bd-row.bd-split .bd-col > .bd-section + .bd-section { margin-top: var(--sec-gap, 10px); }
/* label : value on a centre axis — the classic printed biodata */
.bd-body.axis .kv-grid { width: 100%; grid-template-columns: fit-content(50%) minmax(0, 1fr); column-gap: 14px; }
.bd-body.axis .kv-label { text-align: right; }
.bd-body.axis .bd-row.is-one .kv-grid, .bd-body.axis.bd-centre .kv-grid { width: max-content; max-width: 100%; }
.bd-cellgap { height: var(--sec-gap, 10px); }
/* Emerald Jali: "about me" set in the green band under the portrait */
.bd-body.jali-about { --head: #e6cc8a; --rule: #c7a45a; --value: #f1ead6; }
.bd-body.jali-about .bd-about-text { font-style: italic; color: #efe6cf; line-height: 1.5; }
.bd-body.jali-about .bd-heading { color: #e6cc8a; }
.bd-contact .nw { white-space: nowrap; }
.d-bento2 .bd-body.tile { border-radius: 24px; padding: 18px 22px; box-shadow: 0 6px 20px rgba(120, 70, 40, .06); }
.d-bento2 .bd-body.tile .bd-heading { margin-bottom: 8px; }
/* a full-width family row without a tree: two pairs to a line */
.bd-row.is-one .s-family:not(.is-tree) .kv-grid { width: 100%; grid-template-columns: fit-content(22%) minmax(0, 1fr) fit-content(22%) minmax(0, 1fr); column-gap: 14px; text-align: left; }
.bd-row.is-one .s-family:not(.is-tree) .kv-label { text-align: right; }
/* approved designs whose art cuts the page into small panels: one label/value column, so family facts never break mid-word */
.bd-body.narrow .bd-row.is-one .s-family:not(.is-tree) .kv-grid { grid-template-columns: fit-content(36%) minmax(0, 1fr); }
/* a shallow colour band: heading and details sit close together */
.bd-body.tight .bd-heading { margin-bottom: 2px; }
.bd-body.tight .bd-cline, .bd-body.tight .bd-cline2 { line-height: 1.25; }
/* hairline separators inside a row layout read lighter than a full rule */
.bd-row + .bd-sep.is-line, .bd-sep.is-line + .bd-row { }

/* ---- Tamil, Telugu, Kannada, Bengali (script-indic2) and Urdu (script-ur) ----
   Every face in the designs is a Latin display face, so for these scripts the
   whole page switches to one serif and one sans made for the script. */
.biodata-page.script-ta { --sc-serif: 'Tiro Tamil', 'Noto Serif Tamil', 'Noto Sans Tamil', serif; --sc-sans: 'Noto Sans Tamil', 'Tiro Tamil', sans-serif; }
.biodata-page.script-te { --sc-serif: 'Tiro Telugu', 'Noto Serif Telugu', 'Noto Sans Telugu', serif; --sc-sans: 'Noto Sans Telugu', 'Tiro Telugu', sans-serif; }
.biodata-page.script-kn { --sc-serif: 'Tiro Kannada', 'Noto Serif Kannada', 'Noto Sans Kannada', serif; --sc-sans: 'Noto Sans Kannada', 'Tiro Kannada', sans-serif; }
.biodata-page.script-bn { --sc-serif: 'Tiro Bangla', 'Noto Serif Bengali', 'Noto Sans Bengali', serif; --sc-sans: 'Noto Sans Bengali', 'Tiro Bangla', sans-serif; }
.biodata-page.script-ur { --sc-serif: 'Noto Naskh Arabic', 'Noto Nastaliq Urdu', serif; --sc-sans: 'Noto Naskh Arabic', sans-serif; }
.biodata-page.script-indic2, .biodata-page.script-indic2 *, .biodata-page.script-ur, .biodata-page.script-ur * { font-family: var(--sc-serif) !important; letter-spacing: normal !important; }
.script-indic2 .f-ui, .script-indic2 .f-ui *, .script-indic2 .is-caps, .script-indic2 .is-caps *, .script-indic2 .kvs-label, .script-indic2 .bd-quickline,
.script-ur .f-ui, .script-ur .is-caps, .script-ur .bd-quickline { font-family: var(--sc-sans) !important; }
.script-indic2 .f-ui, .script-indic2 .k-caps, .script-indic2 .is-caps, .script-ur .f-ui, .script-ur .k-caps, .script-ur .is-caps { text-transform: none !important; }
.script-indic2 .k-caps, .script-ur .k-caps { font-size: calc(var(--ks, 13px) * 1.25) !important; }
.script-indic2 .bd-heading.is-caps, .script-ur .bd-heading.is-caps { font-size: 15px; font-weight: 700; }
.script-indic2 .bd-heading, .script-ur .bd-heading { font-size: calc(var(--h-size) - 2px); font-weight: 700; font-style: normal !important; }
.script-indic2 .bd-name { line-height: 1.25; }
.script-indic2 .f-script, .script-ur .f-script { font-style: normal; font-weight: 700; }
.script-indic2 .kv-label, .script-indic2 .kv-value, .script-indic2 .bd-line, .script-indic2 .bd-pairs, .script-indic2 .ft2-foot { font-size: calc(var(--kv-size) - 1.5px); }
.script-ta .kv-label, .script-ta .kv-value, .script-ta .bd-line, .script-ta .bd-pairs, .script-ta .ft2-foot { font-size: calc(var(--kv-size) - 2.5px); }
.script-indic2 .bd-about-head, .script-indic2 .bd-about-text, .script-ur .bd-about-head, .script-ur .bd-about-text { font-style: normal !important; }
/* Urdu: right to left, Naskh wants generous leading */
.biodata-page.script-ur { direction: rtl; }
.script-ur .kv-value, .script-ur .kv-label, .script-ur .bd-line, .script-ur .bd-pairs, .script-ur p { line-height: 1.7; }
.script-ur .kv-label, .script-ur .kv-value, .script-ur .bd-line, .script-ur .bd-pairs, .script-ur .ft2-foot { font-size: calc(var(--kv-size) - 1px); }
.script-ur .bd-name { line-height: 1.5; }
/* header stacks keep the design's own left/centre alignment; only the text inside runs right to left */
.script-ur .bd-stack { direction: ltr; }
.script-ur .bd-stack > * { direction: rtl; }
.script-ur .bd-body.axis .kv-label { text-align: left; }
.script-ur .bd-row.is-one .s-family:not(.is-tree) .kv-label { text-align: left; }
.script-ur .kv-grid, .script-ur .bd-contact, .script-ur .bd-lines { direction: rtl; }
.script-ur .nw, .script-ur .bd-cline { unicode-bidi: plaintext; }
.biodata-page.script-ur { text-align: right; }
.script-ur .bd-centre .kv-grid, .script-ur .bd-row.is-one .kv-grid { text-align: right; }

/* sacred lines in Arabic or Gurmukhi keep their own face whatever the page language */
.biodata-page .bd-invocation.sac-ar, .biodata-page.script-indic2 .bd-invocation.sac-ar, .biodata-page.script-ur .bd-invocation.sac-ar { font-family: 'Amiri', 'Noto Naskh Arabic', serif !important; direction: rtl; line-height: 1.6; }
.biodata-page .bd-invocation.sac-pa, .biodata-page.script-indic2 .bd-invocation.sac-pa, .biodata-page.script-ur .bd-invocation.sac-pa { font-family: 'Noto Sans Gurmukhi', serif !important; }
.bd-invocation { line-height: 1.35; }
/* the fitted box scales from its top-left corner, so it is placed left to
   right and only its contents run right to left */
.biodata-page.script-ur .bd-body { direction: ltr; }
.biodata-page.script-ur .bd-body > .bd-fit { direction: rtl; }

/* faith symbol beside the blessing line (any non-faith design) */
.bd-invocation .bd-fsym { display: inline-block; width: 1.6em; height: 1.6em; vertical-align: middle; margin-inline-end: .4em; position: relative; top: -.08em; }
.bd-invocation .bd-fsym svg { width: 100%; height: 100%; display: block; }
.bd-invocation .bd-fsym-hindu { width: 2.1em; height: 2.25em; }
.bd-invocation .bd-fsym:only-child { width: 2.6em; height: 2.6em; margin: 0; }
.bd-invocation .bd-fsym-hindu:only-child { width: 3em; height: 3.2em; }

/* Stable header space: never compress a text item's box around overflowing glyphs. */
.bd-stack .bd-stack-item{flex:none;max-width:100%}.bd-stack .bd-name{width:100%;word-break:normal;overflow-wrap:normal}
/* Long section titles wrap within their own column; decorative rules yield first. */
.bd-heading .h-text{flex:0 1 auto;min-width:0;white-space:normal}
.bd-heading .h-rule{min-width:0}
.bd-heading .h-flourish{flex:0 1 42px;min-width:0}
