:root {
  --deep-purple: #1E1038;
  --nova-purple: #6D3FE0;
  --nova-purple-dark: #5530B8;
  --nova-gold: #FFB703;
  --lilac-mist: #F5F1FC;
  --plum-slate: #4A3F66;
  --white: #FFFFFF;
  --line: #E4DCF5;
  --ok: #157A4A;
  --ok-bg: #E7F6EE;
  --warn: #8A5A00;
  --warn-bg: #FFF4D6;
  --err: #B42318;
  --err-bg: #FDECEA;

  --font-heading: 'Sora', 'Noto Sans Devanagari', 'Noto Sans Bengali', system-ui, sans-serif;
  --font-body: 'Manrope', 'Noto Sans Devanagari', 'Noto Sans Bengali', system-ui, sans-serif;
  --gutter: 16px;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--deep-purple);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
html[lang="hi"] body, html[lang="bn"] body { line-height: 1.75; }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
h1 { font-size: clamp(26px, 5vw, 40px); }
h2 { font-size: clamp(21px, 3.4vw, 28px); margin-top: 8px; }
h3 { font-size: 18px; }
p { margin: 0 0 14px; }

img, svg, canvas { max-width: 100%; }
a { color: var(--nova-purple); }
a:hover { color: var(--deep-purple); }
:focus-visible { outline: 3px solid var(--nova-gold); outline-offset: 2px; }

.skip-link {
  position: absolute; left: 16px; top: -60px;
  padding: 10px 14px; background: var(--nova-gold); color: var(--deep-purple);
  font-weight: 700; border-radius: 8px; z-index: 100;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

/* Header */
.site-header { background: var(--deep-purple); color: var(--white); }
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 19px; }
.brand:hover { color: var(--white); }
.brand img { width: 30px; height: 30px; }
.brand span { color: var(--nova-gold); font-weight: 500; }
.site-nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.site-nav a { color: #D9CFF5; text-decoration: none; padding: 8px 10px; border-radius: 8px; font-weight: 500; font-size: 15px; }
.site-nav a:hover { color: var(--white); background: rgba(255,255,255,.08); }
.site-nav .lang { border: 1px solid #8F7BD0; color: var(--white); padding: 6px 10px; }
@media (max-width: 560px) { .site-nav .hide-sm { display: none; } }

/* Hero */
.hero { background: linear-gradient(180deg, var(--deep-purple) 0%, #2B1752 100%); color: var(--white); padding: 36px 0 44px; }
.hero h1 { color: var(--white); }
.hero p { color: #D9CFF5; font-size: 17px; max-width: 640px; }
.hero .badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.badge { display: inline-block; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: var(--white); padding: 4px 12px; border-radius: 999px; font-size: 14px; }

.page-head { background: var(--lilac-mist); padding: 24px 0 20px; border-bottom: 1px solid var(--line); }
.crumbs { font-size: 14px; margin-bottom: 8px; color: var(--plum-slate); }
.crumbs a { color: var(--plum-slate); }
.page-head p { color: var(--plum-slate); margin: 0; max-width: 720px; }
.privacy-note { display: inline-flex; gap: 8px; align-items: center; margin-top: 12px !important; font-size: 14px; font-weight: 600; color: var(--ok) !important; background: var(--ok-bg); padding: 4px 12px; border-radius: 999px; }

main { padding: 24px 0 40px; }
section { margin: 0 0 32px; }

/* Tool grid */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { display: block; text-decoration: none; color: var(--deep-purple); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card:hover { color: var(--deep-purple); border-color: var(--nova-purple); box-shadow: 0 6px 20px rgba(109,63,224,.12); transform: translateY(-2px); }
.card .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--lilac-mist); color: var(--nova-purple); display: grid; place-items: center; margin-bottom: 10px; }
.card .ic svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; color: var(--plum-slate); font-size: 15px; }
.hero .grid { margin-top: 24px; }

/* Tool panel */
.tool { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 4px 18px rgba(30,16,56,.05); }
.tool + .tool { margin-top: 16px; }
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 6px; min-height: 150px; padding: 20px; cursor: pointer;
  border: 2px dashed #B9A6EE; border-radius: 14px; background: var(--lilac-mist);
}
.drop:hover, .drop.over { border-color: var(--nova-purple); background: #EDE5FC; }
.drop strong { font-size: 17px; }
.drop small { color: var(--plum-slate); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 16px 0; }
.fields .wide { grid-column: 1 / -1; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; color: var(--plum-slate); }
label.f input, label.f select {
  font: inherit; font-size: 16px; color: var(--deep-purple); background: var(--white);
  border: 1px solid #CFC3EE; border-radius: 10px; padding: 10px 12px; min-height: 46px; width: 100%;
}
label.c { display: flex; gap: 8px; align-items: center; font-size: 15px; }
label.c input { width: 20px; height: 20px; accent-color: var(--nova-purple); }
input[type=range] { width: 100%; accent-color: var(--nova-purple); }
.hint { font-size: 14px; color: var(--plum-slate); margin: 4px 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none;
  background: var(--nova-purple); color: var(--white);
}
.btn:hover { background: var(--nova-purple-dark); color: var(--white); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.gold { background: var(--nova-gold); color: var(--deep-purple); }
.btn.gold:hover { background: #F0A800; color: var(--deep-purple); }
.btn.ghost { background: transparent; color: var(--nova-purple); border: 1px solid #CFC3EE; }
.btn.ghost:hover { background: var(--lilac-mist); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.editor { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 760px) { .editor { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.stage { background: repeating-conic-gradient(#EEE 0% 25%, #FFF 0% 50%) 50% / 16px 16px; border-radius: 12px; border: 1px solid var(--line); display: grid; place-items: center; padding: 12px; min-height: 200px; }
.stage canvas { touch-action: none; cursor: grab; max-height: 420px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.stage canvas:active { cursor: grabbing; }
.stage img { max-height: 420px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }

.result { margin-top: 16px; padding: 14px; border-radius: 12px; background: var(--lilac-mist); }
.result[hidden] { display: none; }
.stat { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 15px; margin-bottom: 8px; }
.stat b { font-family: 'Sora', sans-serif; }
.msg { padding: 10px 12px; border-radius: 10px; font-size: 15px; margin: 8px 0; }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.msg.warn { background: var(--warn-bg); color: var(--warn); }
.msg.err { background: var(--err-bg); color: var(--err); }

.list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.list li { display: flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.list img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; background: #EEE; }
.list .nm { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list button { min-width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); cursor: pointer; font-size: 16px; color: var(--deep-purple); }
.list button:hover { border-color: var(--nova-purple); }

.age-out { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); text-align: center; margin-bottom: 12px; }
.age-out div { background: var(--white); border-radius: 12px; padding: 12px 6px; border: 1px solid var(--line); }
.age-out b { display: block; font-family: 'Sora', sans-serif; font-size: 28px; color: var(--nova-purple); }

/* Content */
.content h2 { margin-top: 28px; }
.content ol, .content ul { padding-left: 22px; }
.content li { margin-bottom: 6px; }
.content table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 16px; display: block; overflow-x: auto; }
.content th, .content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.content th { background: var(--lilac-mist); }
details { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; background: var(--white); }
details summary { cursor: pointer; font-weight: 700; }
details[open] summary { margin-bottom: 8px; }
details p:last-child { margin-bottom: 0; }

.related { margin-top: 28px; }

.ad-slot { margin: 20px 0; min-height: 100px; text-align: center; }
.ad-slot::before { content: attr(data-label); display: block; font-size: 11px; color: #8F86A3; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }

/* Footer */
.site-footer { background: var(--deep-purple); color: #D9CFF5; padding: 32px 0 24px; font-size: 15px; }
.site-footer a { color: #D9CFF5; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.foot-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h3 { color: var(--white); font-size: 16px; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.copy { border-top: 1px solid rgba(255,255,255,.12); margin-top: 24px; padding-top: 16px; font-size: 14px; color: #BFB2EB; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
div.card:hover { transform: none; box-shadow: none; border-color: var(--line); }

/* Business tools */
.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radios label { display: flex; align-items: center; gap: 8px; border: 1px solid #CFC3EE; border-radius: 10px; padding: 10px 12px; font-size: 15px; cursor: pointer; flex: 1 1 200px; }
.radios input { accent-color: var(--nova-purple); width: 18px; height: 18px; }
.radios label:has(input:checked) { border-color: var(--nova-purple); background: var(--lilac-mist); }
fieldset.f { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--plum-slate); }
fieldset.f legend { padding: 0; margin-bottom: 6px; }
.sum { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.sum > div { display: contents; }
.sum b { font-family: 'Sora', sans-serif; text-align: right; }
.sum .big { font-size: 22px; color: var(--nova-purple); }
.sum .line { grid-column: 1 / -1; border-top: 1px solid var(--line); }
textarea { font: inherit; font-size: 16px; color: var(--deep-purple); border: 1px solid #CFC3EE; border-radius: 10px; padding: 10px 12px; width: 100%; min-height: 90px; resize: vertical; }
label.f textarea { min-height: 80px; }
.tool h2 { font-size: 18px; margin: 18px 0 4px; }
.tool h2:first-child { margin-top: 0; }

.item-row { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; align-items: end; background: var(--lilac-mist); border-radius: 12px; padding: 10px; margin-bottom: 8px; position: relative; }
.item-row .desc { grid-column: 1 / -1; }
.item-row .i-amt { font-family: 'Sora', sans-serif; font-weight: 700; align-self: center; text-align: right; }
.item-row .i-del { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); cursor: pointer; }
.item-row .desc { padding-right: 36px; }
@media (min-width: 760px) {
  .item-row { grid-template-columns: 3fr 1fr 0.8fr 1.2fr 1fr 1.2fr; padding-right: 44px; }
  .item-row .desc { grid-column: auto; padding-right: 0; }
  .item-row .i-del { top: auto; bottom: 16px; }
}
.sum span { color: var(--plum-slate); }

.qr-wrap { display: grid; gap: 16px; }
@media (min-width: 760px) { .qr-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.qr-view { background: var(--lilac-mist); border-radius: 14px; padding: 16px; text-align: center; }
.qr-view canvas { width: 100%; max-width: 300px; height: auto; background: var(--white); border-radius: 8px; }
.cta-box { margin-top: 16px; padding: 16px; border-radius: 14px; background: var(--deep-purple); color: #D9CFF5; }
.cta-box b { color: var(--white); }
.cta-box .btn { margin-top: 10px; }
input[type=color] { min-height: 46px; padding: 4px; }

#print-doc { display: none; }
@media print {
  @page { size: A4; margin: 12mm; }
  body > *:not(main), main > .wrap > *:not(#print-doc), .page-head { display: none !important; }
  main { padding: 0; }
  #print-doc { display: block; }
}
.doc { font-family: Arial, sans-serif; font-size: 12px; color: #000; line-height: 1.45; }
.doc h1 { font-size: 20px; margin: 0 0 6px; letter-spacing: .04em; color: #1E1038; }
.doc h2 { font-size: 18px; margin: 0 0 4px; }
.doc p { margin: 0 0 4px; }
.doc .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #555; margin-top: 8px; }
.doc-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid #1E1038; padding-bottom: 10px; }
.doc-title { text-align: right; }
.doc-to { padding: 8px 0; }
.doc table { width: 100%; border-collapse: collapse; }
.doc-items th, .doc-items td { border: 1px solid #999; padding: 5px 6px; vertical-align: top; }
.doc-items th { background: #F0ECFA; font-size: 11px; text-align: left; }
.doc .r { text-align: right; }
.doc-foot { display: flex; gap: 16px; margin-top: 10px; }
.doc-words { flex: 1; }
.doc-tot { width: 46% !important; }
.doc-tot td { padding: 4px 6px; border-bottom: 1px solid #ddd; }
.doc-tot .grand td { font-weight: 700; font-size: 14px; border-top: 2px solid #1E1038; border-bottom: 2px solid #1E1038; }
.doc-sign { text-align: right; margin-top: 28px; }
.doc-sign .sig { margin-top: 36px; border-top: 1px solid #000; display: inline-block; padding-top: 4px; min-width: 180px; text-align: center; }
.doc-credit { text-align: center; color: #888; font-size: 9px; margin-top: 24px !important; }

/* Photo + signature joiner */
.two-drop { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.drop-sm { min-height: 150px; padding: 14px; }
.drop-sm img { max-width: 100%; max-height: 110px; border-radius: 6px; margin-top: 6px; }
.drop.done { border-style: solid; border-color: var(--nova-purple); }

/* Typing test */
.type-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 4px 0 10px; font-size: 16px; }
.type-bar b { font-family: 'Sora', sans-serif; font-size: 20px; color: var(--nova-purple); }
.type-bar .btn { margin-left: auto; }
.type-text { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 19px; line-height: 1.9; height: 180px; overflow: hidden; position: relative; margin-bottom: 10px; user-select: none; -webkit-user-select: none; }
.type-text span { border-radius: 4px; padding: 1px 1px; }
.type-text .ok { color: #157A3B; }
.type-text .bad { color: #B42318; background: #FDECEA; text-decoration: underline; }
.type-text .cur { background: #F1EAFE; outline: 2px solid var(--nova-purple); }
#t-in { font-size: 19px; min-height: 120px; }
#t-in:disabled { background: var(--lilac-mist); }
.type-out b { font-size: 34px; }

/* Resume rows */
.cv-row { grid-template-columns: 1fr 1fr; padding-right: 44px; }
.cv-row .i-del { top: 6px; bottom: auto; }
@media (min-width: 760px) { .cv-row { grid-template-columns: 1.4fr 1.4fr 0.8fr 1fr; } }

/* Rent receipts: three to an A4 page */
.rr { border: 1.5px dashed #555; padding: 12px 16px; margin-bottom: 8mm; break-inside: avoid; page-break-inside: avoid; }
.rr:nth-child(3n) { break-after: page; page-break-after: always; }
.rr-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #1E1038; margin-bottom: 8px; }
.rr-body { font-size: 13px; line-height: 1.7; }
.rr-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 10px; }
.rr-stamp { width: 62px; height: 62px; border: 1px dashed #777; font-size: 9px; color: #777; display: grid; place-items: center; text-align: center; }
.rr-sign { border-top: 1px solid #000; padding-top: 4px; min-width: 170px; text-align: center; margin-top: 30px; }

/* Resume / biodata document */
.cv { font-size: 13px; line-height: 1.5; }
.cv-kind { text-align: center; font-weight: 700; letter-spacing: .2em; text-decoration: underline; margin-bottom: 10px !important; }
.cv-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid #1E1038; padding-bottom: 10px; margin-bottom: 4px; }
.cv-head h1 { font-size: 24px; letter-spacing: 0; }
.cv-photo { width: 100px; height: 125px; object-fit: cover; border: 1px solid #555; }
.cv h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; background: #F0ECFA; padding: 4px 8px; margin: 14px 0 6px; }
.cv ul { margin: 0; padding-left: 20px; }
.cv-pers td { padding: 2px 6px 2px 0; vertical-align: top; }
.cv-pers td:first-child { width: 160px; }
.cv-sign { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 30px; }
.cv-sign .sig { border-top: 1px solid #000; padding-top: 4px; min-width: 180px; text-align: center; }
