/* LetterKit: letter form + live A4 preview (plain HTML/CSS, scales with the preview width) + print */
.lk-app{grid-template-columns:minmax(0,1fr) minmax(0,1.08fr)}
.lk-app:empty{min-height:150vh} /* until letterkit.js builds the form (next frame): keeps the article below from shifting */
.lk-form .lbl{display:block;margin:2px 0 7px}
.lk-pick{margin-bottom:14px}
.lk-pick .chip,.lk-chips .chip{min-height:38px}
.lk-sec{margin-bottom:6px}
.lk-sec+.lk-sec{margin-top:18px}
.lk-field{align-content:start}
.lk-sec h3{font-size:14px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin:6px 0 12px}
.lk-sub{font-weight:600;color:var(--muted);font-size:12.5px}
.lk-field .chips{margin-top:1px}
.lk-form input[type=date]{min-width:0}
.lk-form [aria-invalid=true]{border-color:var(--err);box-shadow:3px 3px 0 #f4b4ad}
.lk-edit,.lk-drafts{border:2px solid var(--ink);border-radius:var(--r-sm);padding:4px 14px;margin-bottom:14px;background:#fff}
.lk-edit summary,.lk-drafts summary{cursor:pointer;font-weight:800;min-height:40px;display:flex;align-items:center;gap:8px}
.lk-edit[open],.lk-drafts[open]{padding-bottom:14px}
.lk-edit.lk-edited summary::after{content:"edited";font-size:12px;font-weight:700;background:var(--sun);border:2px solid var(--ink);border-radius:999px;padding:1px 9px}
.lk-edit .hint{margin-bottom:12px}
.lk-ups{margin-bottom:14px}
.lk-up{display:flex;flex-wrap:wrap;gap:8px}
.lk-up .btn{padding:9px 16px;font-size:14px}
.lk-lhform{margin-bottom:16px}
#lk-lh-box{margin-top:14px}
.lk-dl{list-style:none;padding:0;margin:6px 0 8px;display:grid;gap:6px}
.lk-dl li{display:flex;gap:6px}
.lk-dload{flex:1;text-align:left;font:600 14px var(--font);background:var(--soft);border:1.5px solid var(--line);border-radius:10px;padding:9px 12px;cursor:pointer;color:var(--ink)}
.lk-dload:hover{border-color:var(--ink)}
.lk-ddel{width:40px;border:2px solid var(--ink);background:#fff;border-radius:10px;font-size:20px;line-height:1;cursor:pointer;color:var(--ink)}
.lk-ddel:hover{background:#fdecec;color:var(--err)}
.lk-actions .btn{padding:10px 16px}
.lk-note{margin-top:10px}

/* the paper: 100cqw = 210 mm, so 1 mm = .4762cqw; text never drops below 12px on small screens (the page then grows) */
.lk-paper{background:#e9e7df;border:2px solid var(--ink);border-radius:var(--r-sm);padding:14px}
.lk-sheet{container-type:inline-size}
.lk-page{background:#fff;color:#15182a;min-height:141.43cqw;padding:9.52cqw 10.48cqw;border-radius:4px;box-shadow:0 10px 26px rgba(0,0,0,.16);
  font-family:LKNoto,"Noto Sans",LKDeva,"Noto Sans Devanagari","Nirmala UI",Mangal,"Kohinoor Devanagari",Arial,sans-serif;font-size:max(12px,1.932cqw);line-height:1.5;overflow-wrap:anywhere}
.lk-page p{margin:0}
.lk-b{margin-top:1.275em}
.lk-b:first-child,.lk-lh+.lk-b,.lk-top+.lk-b{margin-top:0}
.lk-body p+p{margin-top:.75em}
.lk-sign p+p,.lk-after p+p,.lk-cols p+p{margin-top:.5em}
.lk-heading{font-weight:700;font-size:1.3em}
.lk-heading p+p{margin-top:.35em}
.lk-subject{font-weight:700}
.lk-signimg{min-height:14mm;height:6.67cqw;display:flex;align-items:flex-end;gap:2cqw;margin:.4em 0 .2em}
.lk-sign[style*=right] .lk-signimg{justify-content:flex-end}
.lk-signimg img{max-height:100%;max-width:26cqw;object-fit:contain}
.lk-signimg .lk-stamp{height:11.4cqw;max-height:none;max-width:16cqw}
.lk-cols{display:grid;gap:4.8cqw}
.lk-lh{display:flex;gap:2.4cqw;align-items:center;border-bottom:.33cqw solid var(--lk-acc,#15182a);padding-bottom:1.6cqw;margin-bottom:4.3cqw}
.lk-lh img{height:8.6cqw;max-width:20cqw;object-fit:contain}
.lk-lh strong{display:block;font-size:1.48em;line-height:1.2;color:var(--lk-acc,#15182a)}
.lk-lh span{display:block;font-size:.78em;color:#4a4f63}
.lk-ph{background:#fff1b8;color:inherit;border-bottom:1.5px dashed #b7791f;border-radius:3px;padding:0 .15em;cursor:pointer}
.lk-print{display:none}
@media (max-width:900px){.lk-app{grid-template-columns:1fr}.lk-preview{order:0}.lk-preview{position:static}}
@media (max-width:420px){.lk-form input[type=date]{padding-inline:8px;font-size:15px}.lk-paper{padding:8px}.lk-actions .btn{flex:1 1 40%}}
@media print{
  body.lk-printing>:not(.lk-print){display:none!important}
  body.lk-printing .lk-print{display:block}
  .lk-print .lk-sheet{width:166mm}
  .lk-print .lk-page{box-shadow:none;border-radius:0;min-height:0;font-size:11.5pt;padding:0}
  .lk-print .lk-ph{background:none;border:0}
  @page{size:A4;margin:20mm 22mm 18mm}
}
