/* Free tools: GST calculator, barcode generator, udhar reminder message. */
.tool { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .tool { grid-template-columns: minmax(0, 1fr); } }
.tool-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; display: grid; gap: .9rem; }
.tool-out { background: var(--surface); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 1.3rem; display: grid; gap: .9rem; min-width: 0; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg label { position: relative; padding: .55rem .8rem; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.seg input { position: absolute; inset: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.seg input:checked + span { color: var(--ink); }
.seg label:has(input:checked) { background: var(--marigold-soft); color: var(--ink); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: -3px; }
.big-total { font: 800 clamp(1.8rem, 5vw, 2.6rem)/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.out-table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.out-table td { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.out-table td.n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.out-table tr:last-child td { border-bottom: 0; font-weight: 700; }
.formula { font: 500 .85rem/1.5 var(--mono); color: var(--ink-2); background: var(--ground); border-radius: 8px; padding: .6rem .7rem; overflow-x: auto; }
.code-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.code-cell { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .5rem; display: grid; gap: .2rem; justify-items: center; color: #000; }
.code-cell svg { width: 100%; height: 52px; }
.code-cell .cap { font: 600 .72rem/1.2 var(--body); text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-cell .dig { font: 500 .72rem/1 var(--mono); letter-spacing: .08em; }
.msg-box { width: 100%; min-height: 11rem; font: 500 1rem/1.55 var(--body); padding: .8rem; border: 1.5px solid var(--line); border-radius: 10px; background: #FBFFFC; color: var(--ink); resize: vertical; }
html[lang="hi"] .msg-box { font-family: var(--deva); }
.err-text { color: #9B1C14; font-weight: 600; font-size: .9rem; }
@media print {
  body { background: #fff; padding: 0; }
  header.nav, footer.site, .bottomline, .cta-band, .page-hero, .tool-form, .no-print, .skip, main > section:not(.print-area) { display: none !important; }
  .print-area, .tool-out { border: 0; padding: 0; }
  .code-grid { grid-template-columns: repeat(3, 1fr); gap: 4mm; }
  .code-cell { break-inside: avoid; border: 0.2mm dashed #999; }
}
