/* Official One-Page Security Certificate & Formal Marksheet Print Layout (Exact A4 & US Letter Symmetry) */
.tx {
  position: relative;
  width: 196mm;
  max-width: 100%;
  height: 282mm;
  margin: 0 auto;
  background: #fffefa;
  color: #111827;
  font-family: 'Inter', 'Hind Siliguri', Arial, sans-serif;
  box-sizing: border-box;
  padding: 8.5mm 8.5mm 7.5mm;
  border: 0.55mm solid #065f46;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  break-inside: avoid;
  page-break-after: avoid;
  page-break-inside: avoid;
}
.tx.sz-letter {
  width: 201mm;
  height: 264mm;
  padding: 7.5mm 8.5mm 7mm;
}
.tx-frame  { position: absolute; inset: 1.5mm; border: 0.28mm solid #065f46; pointer-events: none; box-sizing: border-box; }
.tx-frame2 { position: absolute; inset: 2.5mm; border: 0.18mm solid #d97706; pointer-events: none; box-sizing: border-box; }
.tx-micro  {
  position: absolute; font-size: 4px; line-height: 1; letter-spacing: 0.3px;
  color: #065f46; opacity: 0.65; white-space: nowrap; overflow: hidden;
  font-weight: 600; pointer-events: none;
}
.tx-micro.t { top: 2.85mm; left: 5.5mm; right: 5.5mm; }
.tx-micro.b { bottom: 2.85mm; left: 5.5mm; right: 5.5mm; }
.tx-micro.l { left: 2.85mm; top: 5.5mm; bottom: 5.5mm; width: 4px; writing-mode: vertical-rl; }
.tx-micro.r { right: 2.85mm; top: 5.5mm; bottom: 5.5mm; width: 4px; writing-mode: vertical-rl; }

.tx-bg { position: absolute; inset: 3.2mm; pointer-events: none; }
.tx-wm { position: absolute; top: 44mm; bottom: 44mm; left: 0; right: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.tx-wm img { width: 92mm; height: 92mm; object-fit: contain; opacity: 0.042; }
.tx-diag {
  position: absolute; inset: -25mm; display: flex; flex-wrap: wrap;
  align-content: space-around; justify-content: space-around;
  transform: rotate(-30deg); pointer-events: none;
}
.tx-diag span {
  font-size: 7px; font-weight: 700; letter-spacing: 1.4px;
  color: rgba(16, 185, 129, 0.04); padding: 6mm 5mm; white-space: nowrap;
}
.tx-corner { position: absolute; width: 14mm; height: 14mm; pointer-events: none; }
.tx-in {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5mm;
}
.tx-sec { display: flex; flex-direction: column; }
.tx-bottom { padding-top: 1mm; }
.tx table { width: 100%; border-collapse: collapse; }
.tx-head { margin-top: 0; }
.tx-head td { vertical-align: middle; }
.tx-logo { width: 19.5mm; height: 19.5mm; object-fit: contain; display: block; }
.tx-gov { font-size: 8.2px; letter-spacing: 1.5px; font-weight: 700; color: #334155; text-transform: uppercase; }
.tx-board { font-size: 14px; font-weight: 800; color: #065f46; text-transform: uppercase; margin: 1mm 0 0.5mm; line-height: 1.18; letter-spacing: 0.2px; }
.tx-exam { font-size: 9.4px; font-weight: 700; color: #b45309; letter-spacing: 0.6px; text-transform: uppercase; }
.tx-pill {
  display: inline-block; margin-top: 1.5mm; padding: 0.85mm 5.2mm;
  border-top: 0.35mm solid #065f46; border-bottom: 0.35mm solid #065f46;
  background: rgba(236, 253, 245, 0.55);
  font-size: 8.8px; font-weight: 800; letter-spacing: 2px; color: #065f46;
}
.tx-rule { height: 0.6mm; background: linear-gradient(90deg, #065f46 0 72%, #b45309 72% 100%); margin: 2.2mm 0 0; opacity: 0.88; }
.tx-sec-hd {
  font-size: 8.8px; font-weight: 800; letter-spacing: 0.75px; text-transform: uppercase;
  color: #065f46; margin: 0 0 1.4mm; padding-left: 1.8mm; border-left: 0.8mm solid #065f46;
}
.tx-info td { border: 0.22mm solid #cbd5e1; padding: 1.5mm 2.2mm; font-size: 9px; line-height: 1.3; }
.tx-info td.k { color: #475569; font-weight: 600; width: 18%; background: rgba(236, 253, 245, 0.55); }
.tx-info td.v { color: #0f172a; font-weight: 700; text-transform: uppercase; }

.tx-sub th {
  background: #065f46; color: #fff; font-size: 8.2px; letter-spacing: 0.5px;
  text-transform: uppercase; padding: 1.55mm 1.4mm; border: 0.22mm solid #065f46;
}
.tx-sub td { border: 0.22mm solid #94a3b8; padding: 1.55mm 1.8mm; font-size: 8.9px; line-height: 1.25; background: rgba(255, 255, 255, 0.74); }
.tx-sub tr:nth-child(even) td { background: rgba(236, 253, 245, 0.45); }
.tx-c { text-align: center; }
.tx-b { font-weight: 800; }

.tx-sum td {
  border: 0.3mm solid #065f46; padding: 1.8mm 2mm; text-align: center;
  background: rgba(254, 252, 232, 0.62);
}
.tx-sum .k { display: block; font-size: 7px; font-weight: 700; letter-spacing: 0.6px; color: #64748b; text-transform: uppercase; }
.tx-sum .v { display: block; font-size: 12.6px; font-weight: 800; color: #065f46; font-family: 'JetBrains Mono', monospace; margin-top: 0.35mm; }

.tx-grade-tbl { margin-top: 1.8mm; table-layout: fixed; width: 100%; border-collapse: collapse; }
.tx-grade-tbl th, .tx-grade-tbl td {
  display: table-cell;
  margin: 0;
  border: 0.22mm solid #cbd5e1;
  text-align: center;
  padding: 1mm 1.2mm;
  font-size: 7.6px;
  line-height: 1.2;
  background: rgba(255, 255, 255, 0.72);
  vertical-align: middle;
}
.tx-grade-tbl th { background: rgba(236, 253, 245, 0.75); color: #065f46; font-weight: 800; }
.tx-grade-tbl td.g-lbl { font-weight: 700; color: #475569; text-align: left; padding-left: 2mm; background: rgba(248, 250, 252, 0.9); }

.tx-merit td {
  border: 0.22mm dashed #d97706; padding: 1.4mm 2mm; font-size: 8.7px;
  text-align: center; background: rgba(254, 252, 232, 0.52);
}

.tx-foot-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 4mm;
  padding-top: 2.5mm;
  border-top: 0.28mm solid #cbd5e1;
}
.tx-qr-wrap { display: flex; align-items: center; gap: 2.5mm; }
.tx-qr-box { width: 22mm; height: 22mm; padding: 0.8mm; background: #fff; border: 0.28mm solid #065f46; flex-shrink: 0; }
.tx-seal-wrap { display: flex; align-items: center; justify-content: center; }
.tx-sig-wrap { text-align: right; }
.tx-note { font-size: 7px; color: #64748b; line-height: 1.42; }
.tx-disc {
  margin-top: 2mm; padding-top: 1.4mm; border-top: 0.22mm solid #cbd5e1;
  font-size: 6.8px; color: #64748b; text-align: center; line-height: 1.4;
}

/* Distinct Official Verification Certificate Theme (/verify PDF) */
.tx.tx-verify {
  background: #f9fbfd;
  border-color: #0f2942;
}
.tx-verify .tx-frame { border-color: #0f766e; }
.tx-verify .tx-frame2 { border-color: #b45309; }
.tx-verify .tx-micro { color: #0f2942; }
.tx-verify .tx-diag span { color: rgba(15, 118, 110, 0.04); }
.tx-verify .tx-board { color: #0f2942; }
.tx-verify .tx-exam { color: #0f766e; }
.tx-verify .tx-pill {
  background: #0f2942; color: #ffffff;
  border: none; border-radius: 1.5px; padding: 0.95mm 5mm;
}
.tx-verify .tx-rule { background: linear-gradient(90deg, #0f2942 0 42%, #0f766e 42% 78%, #b45309 78% 100%); }
.tx-verify .tx-sec-hd { color: #0f2942; border-left-color: #0f766e; }
.tx-verify .tx-info td.k { background: rgba(241, 245, 249, 0.88); color: #334155; }
.tx-verify .tx-sub th { background: #0f2942; border-color: #0f2942; }
.tx-verify .tx-sub tr:nth-child(even) td { background: rgba(240, 253, 250, 0.55); }
.tx-verify .tx-sum td { border-color: #0f766e; background: rgba(240, 253, 250, 0.72); }
.tx-verify .tx-sum .v { color: #0f2942; }
.tx-verify .tx-grade-tbl th { background: rgba(240, 253, 250, 0.85); color: #0f2942; }
.tx-verify .tx-qr-box { border-color: #0f2942; }
.tx-audit-strip {
  margin-top: 0;
  border: 0.3mm solid #0f766e;
  background: rgba(240, 253, 250, 0.82);
  padding: 1.7mm 2.5mm;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2mm;
  font-size: 7.8px;
  color: #0f2942;
}
.tx-audit-badge {
  background: #0f766e;
  color: #fff;
  font-weight: 800;
  font-size: 7.2px;
  padding: 0.8mm 2.4mm;
  border-radius: 1.5px;
  letter-spacing: 0.6px;
  white-space: nowrap;
}
