/* ============================================================
   banglaconverter.co — site UI v2 (2026-08)
   Full design system. Replaces Bootstrap; implements the legacy
   class names used in page post_content (row/col/card/btn/faq…)
   in the new visual language. Loads AFTER main.css and page CSS
   so it wins the cascade.
   ============================================================ */

/* ---------- fonts (self-hosted, variable weight) ---------- */
@font-face {
  font-family: "Noto Sans Bengali";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/vendor/fonts/NotoSansBengali-bengali.woff2") format("woff2");
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
}
@font-face {
  font-family: "Noto Sans Bengali";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/vendor/fonts/NotoSansBengali-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "SutonnyMJ";
  src: url('/assets/fonts/SutonnyMJ.woff2') format('woff2'), url('/assets/fonts/SutonnyMJ.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: "SolaimanLipi";
  src: url('/assets/fonts/SolaimanLipi_29-05-06.woff2') format('woff2'), url('/assets/fonts/SolaimanLipi_29-05-06.ttf') format('truetype');
  font-display: swap;
}

/* ---------- tokens (v4: clean light minimal — white, hairlines, one blue accent) ---------- */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface2: #f8f9fa;
  --ink: #202124;
  --muted: #5f6368;
  --line: #dadce0;
  --green: #1a73e8;        /* accent (name kept for legacy references) */
  --green-ink: #185abc;
  --green-soft: #e8f0fe;
  --deep: #ffffff;
  --deep2: #ffffff;
  --on-deep: #5f6368;
  --on-deep-dim: #80868b;
  --red: #d93025;
  --shadow: none;
  --radius: 8px;
  --font: "Noto Sans Bengali", "Nirmala UI", "SolaimanLipi", "Hind Siliguri", system-ui, sans-serif;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
}
img { max-width: 100%; height: auto; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-ink); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

h1, .h1 { font-size: 26px; font-weight: 700; line-height: 1.3; margin: 0; letter-spacing: -.01em; }
h2, .h2 { font-size: 20px; font-weight: 700; line-height: 1.35; margin: 0; }
h3, .h3 { font-size: 17px; font-weight: 700; line-height: 1.4; margin: 0; }
p { margin: 0 0 12px; }
@media (max-width: 767px) {
  h1, .h1 { font-size: 21px; }
  h2, .h2 { font-size: 17.5px; }
  h3, .h3 { font-size: 16px; }
  .hide-mobile { display: none; }
}

/* ---------- layout compat (legacy grid classes) ---------- */
.container-fluid { max-width: 1180px; margin: 0 auto; padding: 0 14px; }
.row { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.row > [class*="col-"], .row > .col-12 { padding: 0 8px; width: 100%; min-width: 0; }
.d-flex { display: flex; }
.text-center { text-align: center; }
.ml-auto { margin-left: auto; }
.img-fluid { max-width: 100%; height: auto; }
.form-group { margin-bottom: 14px; }
.d-none { display: none; }
@media (min-width: 768px) {
  .d-md-block { display: block; }
  .col-md-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
  .col-md-3  { flex: 0 0 25%; max-width: 25%; }
  .col-md-6  { flex: 0 0 50%; max-width: 50%; }
  .col-md-9  { flex: 0 0 75%; max-width: 75%; }
  .col-md-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
  .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}
@media (min-width: 992px) {
  .d-lg-block { display: block; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
}
.sticky-top { position: sticky; top: 74px; }
.main-container { padding: 0; }
.main-content-body { margin: 4px 0 0; }
.bd-bottom { margin-bottom: 4px; }
.padrow { margin-top: 4px; }
.bg, .bg-white, .bg-main-content { background: transparent; }

/* ---------- content sections (v4.1: structured minimal) ---------- */
.card {
  display: block;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 4px 2px 16px;
  margin-bottom: 8px;
}
/* readable measure — long-form text stops at ~78ch instead of full width */
.card .card-body p, .card .card-body li { max-width: 78ch; }

.card .card-header {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 26px 0 0;
  margin: 10px 0 6px;
}
.card .card-header:first-child { margin-top: 4px; padding-top: 8px; }
.card .card-header h1 { font-size: 28px; letter-spacing: -.02em; }
/* section headings: small blue kicker line above, like a tab marker */
.card .card-header h2, .card .card-header h3 {
  position: relative;
  padding-top: 12px;
}
.card .card-header h2::before, .card .card-header h3::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 4px;
  border-radius: 2px;
  background: var(--green);
}
.card .card-body { padding: 4px 0 6px; border: 0; }
.card .card-body > p:last-child { margin-bottom: 0; }

/* numbered how-to steps: blue circled counters */
.card .card-body ol {
  list-style: none;
  counter-reset: bcstep;
  padding-left: 0;
  margin: 8px 0 12px;
}
.card .card-body ol > li {
  counter-increment: bcstep;
  position: relative;
  padding: 6px 0 6px 44px;
  margin: 0 0 6px;
}
.card .card-body ol > li::before {
  content: counter(bcstep);
  position: absolute;
  left: 0;
  top: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-ink);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}
.card .card-body ul { padding-left: 20px; }
.card .card-body ul > li { margin-bottom: 6px; }
.card .card-body ul > li::marker { color: var(--green); }

/* wide content (keymap tables, code) scrolls inside the card */
.card-body { overflow-x: auto; }
table { border-collapse: collapse; max-width: 100%; }
table td, table th { border: 1px solid var(--line); padding: 6px 12px; }
table tr:nth-child(even) td { background: var(--surface2); }
table th { background: var(--surface2); font-weight: 600; }

/* FAQ cards: white, hairline, blue Q marker */
.faq {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px 14px 46px;
  margin-bottom: 12px;
  line-height: 1.7;
  font-weight: 400;
  position: relative;
}
.faq::before {
  content: "?";
  position: absolute;
  left: 12px;
  top: 15px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-ink);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.faq h2, .faq h3 { font-size: 15.5px; margin-bottom: 4px; color: var(--ink); }
.faq p { color: var(--muted); margin-bottom: 0; }

/* legacy BS3 glyphicon (used as checkmarks in content) */
.glyphicon { font-style: normal; }
.glyphicon-ok::before { content: "\2713"; color: var(--green); font-weight: 700; margin-right: 4px; }

/* ---------- buttons (legacy .btn API, new look) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 16px;
  min-height: 40px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { border-color: var(--green); color: var(--green-ink); text-decoration: none; }
.btn-success, .btn-primary, .btn-info {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.btn-success:hover, .btn-primary:hover, .btn-info:hover { background: var(--green-ink); border-color: var(--green-ink); color: #fff; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #b93531; border-color: #b93531; color: #fff; }
.btn-default { background: var(--surface); color: var(--ink); }
button.btn { margin: 4px 2px; border-radius: 8px !important; }
/* phonetic page brand-colored search buttons keep their bg; ensure legible text */
button#google, button#bing, button#yahoo, button#tweeter, button#gtranslate { color: #fff; border-radius: 8px; }
button#bnwiki { color: var(--ink); }
button#select, button#clear {
  float: right;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  margin: 0 0 8px 8px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  color: #fff;
}
button#select { background: var(--green); }
button#select:hover { background: var(--green-ink); }
button#clear { background: var(--red); }

/* phonetic typing area */
.phonetic_textarea, .phonetic_textarea:focus {
  width: 100%;
  height: 300px;
  font-family: "Noto Sans Bengali", "SolaimanLipi", "Nirmala UI", sans-serif;
  font-size: 20px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  outline: none;
  box-shadow: none;
  padding: 12px 14px;
  box-sizing: border-box;
}
.phonetic_textarea:focus { border-color: var(--green); }

/* avro keyboard iframe */
#iframe { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line) !important; }

/* ---------- site header / nav (nv2) ---------- */
.nv2-head {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.nv2-bar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 14px;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.nv2-brand { display: inline-flex; align-items: baseline; gap: 9px; text-decoration: none; flex: none; }
.nv2-brand:hover { text-decoration: none; }
.nv2-disc { width: 13px; height: 13px; border-radius: 50%; background: var(--red); align-self: center; flex: none; }
.nv2-icon { align-self: center; flex: none; display: block; }
.nv2-footer .nv2-icon { width: 24px; height: 24px; }
.nv2-head .nv2-name { font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.nv2-head .nv2-sub { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.nv2-links { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nv2-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 18px 13px;
  border-bottom: 3px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.nv2-links a:hover { color: var(--ink); background: var(--surface2); text-decoration: none; }
.nv2-links a.on { color: var(--green); border-bottom-color: var(--green); }
.nv2-burger {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
@media (max-width: 860px) {
  .nv2-burger { display: block; }
  .nv2-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(32,33,36,.12);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 14px 14px;
    gap: 4px;
  }
  .nv2-links.open { display: flex; }
  .nv2-links a { padding: 12px 14px; border-bottom: 0; border-radius: 8px; }
  .nv2-links a.on { background: var(--green-soft); }
  .nv2-sub { display: none; }
}
/* top ad strip (desktop only, below nav so the tool stays the hero on mobile) */
.nv2-topad { max-width: 1180px; margin: 10px auto 0; padding: 0 14px; }
.nv2-topad ins { border-radius: 10px; overflow: hidden; }
/* collapse the strip entirely when AdSense doesn't fill (adblock, no inventory) */
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.nv2-topad:has(ins[data-ad-status="unfilled"]) { margin: 0; }

/* page shell spacing */
.nv2-main { padding-top: 14px; }

/* right sidebar */
.right-sidebar { margin-top: 0; }
.top-header-ads { margin: 0; }

/* ---------- footer (nv2) ---------- */
.nv2-footer {
  margin-top: 30px;
  background: var(--surface2);
  border-top: 1px solid var(--line);
}
.nv2-footer .nv2-name { color: var(--ink); font-size: 17px; }
.nv2-footwrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 14px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px 48px;
}
.nv2-footbrand { max-width: 320px; }
.nv2-tagline { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.nv2-footcol h4 {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.nv2-footcol a { display: block; color: var(--ink); font-size: 14px; padding: 3px 0; text-decoration: none; }
.nv2-footcol a:hover { color: var(--green-ink); text-decoration: underline; }
.nv2-copy {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 14px 18px;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 16px;
}
.nv2-copy a { color: var(--muted); }

/* legacy footer class (kept for safety if referenced anywhere) */
.footer { background: none; border: 0; color: var(--muted); text-align: center; height: auto; }

/* toast reused by bookmark hint */
.nv2-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(90px);
  background: #1b2420;
  color: #fff;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  transition: transform .25s ease;
  pointer-events: none;
  font-family: var(--font);
}
.nv2-toast.show { transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .nv2-toast { transition: none; }
}

/* ---------- legacy cleanup ---------- */
.body-top { border: 0; margin: 0; }

/* ---------- dark theme (toggle in navbar; persisted in localStorage) ---------- */
[data-theme="dark"] {
  --bg: #131314;
  --surface: #1e1f20;
  --surface2: #28292a;
  --ink: #e3e3e3;
  --muted: #9aa0a6;
  --line: #3c4043;
  --green: #8ab4f8;
  --green-ink: #aecbfa;
  --green-soft: #233246;
  --red: #f28b82;
}
[data-theme="dark"] .btn-success, [data-theme="dark"] .btn-primary, [data-theme="dark"] .btn-info { color: #131314; }
[data-theme="dark"] .nv2-links a.on { color: #131314; }
[data-theme="dark"] .nv2-toast { background: #e3e3e3; color: #131314; }
.nv2-theme {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  flex: none;
  align-self: center;
}
.nv2-theme:hover { border-color: var(--green); }
@media (max-width: 860px) { .nv2-theme { margin-left: auto; } .nv2-burger { margin-left: 0; } }
.nv2-theme svg { width: 18px; height: 18px; display: block; margin: 0 auto; }
.nv2-theme .ic-sun { display: none; }
[data-theme="dark"] .nv2-theme .ic-moon { display: none; }
[data-theme="dark"] .nv2-theme .ic-sun { display: block; }

/* ================= tool pages (date converter / typing test / spell / calendars) ================= */
.tool-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 6px 0 16px;
}
.tool-title { font-size: 17px; margin-bottom: 10px; }
.tool-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.bc-sel {
  flex: 1; min-width: 90px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink);
  font-family: var(--font); font-size: 15px;
  padding: 9px 10px; min-height: 44px;
}
.bc-go {
  background: var(--green); color: #fff; border: 0; border-radius: 8px;
  padding: 10px 22px; font-size: 15px; font-weight: 700; cursor: pointer;
  font-family: var(--font); min-height: 44px;
}
.bc-go:hover { background: var(--green-ink); }
[data-theme="dark"] .bc-go { color: #131314; }
.bc-result {
  margin-top: 12px; padding: 12px 14px;
  background: var(--green-soft); color: var(--ink);
  border-radius: 8px; font-size: 17px; line-height: 1.6;
}
.bc-result small { color: var(--muted); }
.bdc-big { font-size: 19px; font-weight: 600; line-height: 1.6; }
.bdc-hijri { color: var(--muted); font-size: 14.5px; margin-top: 2px; }

/* typing test */
.tt-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.tt-stat { font-size: 14px; color: var(--muted); }
.tt-stat b { color: var(--ink); font-size: 16px; }
.tt-restart { margin-left: auto; }
.tt-text {
  background: var(--surface2); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px; font-size: 18px; line-height: 2; margin-bottom: 10px;
  user-select: none;
}
.tt-text span.ok { color: var(--green-ink); }
.tt-text span.err { color: #d93025; text-decoration: underline wavy #d93025; }
.tt-text span.cur { background: var(--green-soft); border-radius: 4px; padding: 0 2px; }
.tt-input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.8;
  padding: 10px 14px; resize: vertical;
}
.tt-input:focus { outline: none; border-color: var(--green); }
.tt-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 12px; }
.tt-card {
  background: var(--green-soft); border-radius: 10px; text-align: center; padding: 14px 8px;
}
.tt-card b { display: block; font-size: 26px; color: var(--green-ink); font-variant-numeric: tabular-nums; }
.tt-card span { font-size: 12px; color: var(--muted); }

/* spell checker */
.sp-out {
  background: var(--surface2); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; margin-top: 12px; font-size: 16.5px; line-height: 1.9;
}
mark.sp-bad { background: #fde0de; color: #a50e0e; border-radius: 4px; padding: 0 3px; }
[data-theme="dark"] mark.sp-bad { background: #4a201d; color: #f28b82; }
.sp-sugs { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.sp-item { font-size: 15.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp-chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--green-ink);
  border-radius: 999px; padding: 4px 14px; font-family: var(--font); font-size: 14.5px;
  cursor: pointer; font-weight: 600;
}
.sp-chip:hover { border-color: var(--green); background: var(--green-soft); }
.sp-allok { color: var(--green-ink); font-weight: 600; padding: 8px 0; }
.sp-nosug { color: var(--muted); font-size: 13.5px; }

/* calendars */
.cal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; margin: 8px 0 20px; }
.cal-month { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cal-head b { font-size: 16px; }
.cal-head span { font-size: 11.5px; color: var(--muted); text-align: right; }
table.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.cal th { font-size: 11px; color: var(--muted); font-weight: 600; padding: 6px 0; border: 0; background: var(--surface2); }
table.cal td { border: 0; text-align: center; padding: 4px 0 6px; }
table.cal td.d b { display: block; font-size: 15px; font-weight: 600; line-height: 1.2; }
table.cal td.d small { display: block; font-size: 10px; color: var(--muted); }
table.cal td.we b { color: #d93025; }
[data-theme="dark"] table.cal td.we b { color: #f28b82; }
table.cal td.today { background: var(--green-soft); border-radius: 8px; box-shadow: inset 0 0 0 2px var(--green); }
table.cal tr:nth-child(even) td { background: transparent; }
/* typing test v2 */
.tt-text { max-height: 180px; overflow-y: auto; }
.tt-dur { flex: none; min-width: 110px; }
.tt-actions { margin-left: auto; display: flex; gap: 8px; }
.tt-mode { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; font-size: 14.5px; }
.tt-mode label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.tt-mode input { accent-color: var(--green); width: 16px; height: 16px; }
/* site-wide secondary button (bcv2-btn was converter-only; tool pages need it too) */
.bcv2-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
}
.bcv2-btn:hover { border-color: var(--green); color: var(--green-ink); }
/* typing test history */
.tt-hist-table { width: 100%; border-collapse: collapse; }
.tt-hist-table th, .tt-hist-table td { border: 1px solid var(--line); padding: 7px 12px; font-size: 13.5px; text-align: center; }
.tt-hist-table th { background: var(--surface2); font-weight: 600; color: var(--muted); }
.tt-hist-table td b { color: var(--green-ink); }
.tt-src { text-align: right; font-size: 12.5px; color: var(--muted); margin: 4px 2px 10px; }
.tt-src a { color: var(--green-ink); }
.sp-acts { margin-left: auto; display: inline-flex; gap: 6px; }
.sp-mini { border: 1px solid var(--line); background: var(--surface2); color: var(--muted); border-radius: 6px; padding: 3px 10px; font-family: var(--font); font-size: 12px; cursor: pointer; }
.sp-mini:hover { color: var(--green-ink); border-color: var(--green); }
/* avro page: BN/EN toggle + draft chips */
.av-lang {
  border: 1px solid var(--green); background: var(--green); color: #fff;
  border-radius: 8px; min-width: 52px; min-height: 40px; font-family: var(--font);
  font-size: 15px; font-weight: 700; cursor: pointer;
}
.av-lang.en { background: var(--surface); color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .av-lang { color: #131314; }
[data-theme="dark"] .av-lang.en { color: var(--ink); }
.av-drafts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.av-draft {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  border-radius: 8px; padding: 6px 14px; min-height: 38px; font-family: var(--font);
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.av-draft.on { background: var(--green-soft); color: var(--green-ink); border-color: var(--green); }
/* date strip under the header */
.nv2-datebar {
  max-width: 1180px; margin: 0 auto; padding: 0 14px 7px;
  font-size: 12.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nv2-datebar:empty { display: none; }

/* ---------- header v5: single row with date + "সব টুলস" dropdown ---------- */
.nv2-date {
  flex: 1 1 auto; min-width: 0;
  font-size: 12.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: center; padding: 0 10px;
}
.nv2-date:empty { visibility: hidden; }
.nv2-menu { position: relative; flex: none; }
.nv2-menubtn {
  border: 1px solid var(--green); background: var(--green); color: #fff;
  border-radius: 8px; padding: 9px 16px; min-height: 40px;
  font-family: var(--font); font-size: 14px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
}
.nv2-menubtn .caret { font-size: 11px; transition: transform .15s ease; }
.nv2-menubtn.open .caret { transform: rotate(180deg); }
.nv2-menubtn:hover { background: var(--green-ink); border-color: var(--green-ink); }
[data-theme="dark"] .nv2-menubtn { color: #131314; }
.nv2-links {
  display: none;
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 200;
  width: min(560px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 40px rgba(32,33,36,.18);
  padding: 12px; margin: 0;
  grid-template-columns: 1fr 1fr;
  gap: 2px 10px;
}
.nv2-links.open { display: grid; }
.nv2-group {
  grid-column: 1 / -1;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: 10px 10px 4px;
}
.nv2-group:first-child { padding-top: 2px; }
.nv2-links a {
  color: var(--ink); font-size: 14px; font-weight: 600;
  padding: 9px 10px; border-radius: 8px; border-bottom: 0;
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nv2-links a:hover { background: var(--surface2); color: var(--green-ink); text-decoration: none; }
.nv2-links a.on { background: var(--green-soft); color: var(--green-ink); border-bottom: 0; }
@media (max-width: 640px) {
  .nv2-links { grid-template-columns: 1fr; }
  .nv2-date { display: none; }
  .nv2-menubtn { padding: 9px 12px; }
}
/* retire old strip + burger remnants */
.nv2-datebar, .nv2-burger { display: none !important; }
/* weather chip */
.nv2-wx { flex: none; font-size: 13px; color: var(--muted); white-space: nowrap; align-self: center; }
.nv2-wx:empty { display: none; }

/* ---------- dictionary / translator components ---------- */
.dc-card {
  background: var(--surface2); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 18px; margin-top: 12px; font-size: 15.5px; line-height: 1.8;
}
.dc-head { font-size: 19px; margin-bottom: 6px; }
.dc-head b { color: var(--ink); }
.dc-bn { color: var(--green-ink); }
.dc-pron { color: var(--muted); font-size: 14px; }
.dc-lbl { color: var(--muted); font-size: 13px; font-weight: 600; }
.dc-sent { color: var(--muted); font-style: italic; margin: 4px 0; }
.dc-letters { display: flex; flex-wrap: wrap; gap: 8px; }
.dc-letters a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px;
  font-weight: 700; font-size: 16px; text-decoration: none;
}
.dc-letters a:hover { background: var(--green-soft); border-color: var(--green); text-decoration: none; }
.dc-browse { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 14px; }
.dc-browse a {
  padding: 6px 8px; border-radius: 6px; text-decoration: none; color: var(--ink);
  font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dc-browse a span { color: var(--muted); font-size: 12.5px; }
.dc-browse a:hover { background: var(--surface2); text-decoration: none; }
/* duration chips */
.tt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.tt-chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 8px; padding: 8px 14px; min-height: 40px; min-width: 56px;
  font-family: var(--font); font-size: 14px; font-weight: 700; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.tt-chip:hover { border-color: var(--green); color: var(--green-ink); }
.tt-chip.on { background: var(--green); border-color: var(--green); color: #fff; }
[data-theme="dark"] .tt-chip.on { color: #131314; }

/* ===== inline typing engine (typing-test2) ===== */
.tt-text.tt-live { font-size: 21px; line-height: 2; letter-spacing: .2px; color: var(--muted); max-height: 168px; overflow-y: auto; cursor: text; user-select: none; scroll-behavior: smooth; }
.tt-live .w { display: inline-block; margin-right: .05em; border-radius: 4px; }
.tt-live .w.cur { background: var(--green-soft); padding: 0 2px; }
.tt-live .w-err { text-decoration: underline wavy #d93025; }
.tt-live .c-ok { color: var(--ink); }
.tt-live .c-bad { color: #d93025; }
.tt-live .c-extra { color: #d93025; opacity: .55; }
.tt-caret { display: inline-block; width: 2px; height: 1.15em; background: var(--green); vertical-align: text-bottom; margin: 0 -1px; animation: ttblink 1s step-end infinite; }
@keyframes ttblink { 50% { opacity: 0; } }
.tt-ghost { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: .01; overflow: hidden; }
.tt-mchips { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.tt-mchip { border: 0; background: var(--card); color: var(--muted); font: inherit; font-size: 13.5px; padding: 6px 16px; cursor: pointer; min-height: 36px; }
.tt-mchip.on { background: var(--green-soft); color: var(--green-ink); font-weight: 600; }
.tt-graph-wrap { margin-top: 14px; }
.tt-graph { width: 100%; height: 120px; display: block; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.tt-graph-max { font-size: 12px; fill: var(--muted); }
[data-theme="dark"] .tt-live .c-bad, [data-theme="dark"] .tt-live .c-extra, [data-theme="dark"] .tt-live .w-err { color: #f28b82; text-decoration-color: #f28b82; }

/* ===== unicode editor key-map ===== */
.ue-kh { font-size: 14px; font-weight: 600; color: var(--muted); margin: 14px 0 8px; }
.ue-keys { display: flex; flex-wrap: wrap; gap: 6px; }
.ue-key { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; min-width: 46px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer; font: inherit; }
.ue-key b { font-size: 18px; color: var(--ink); font-weight: 600; line-height: 1.2; }
.ue-key span { font-size: 11px; color: var(--green-ink); font-family: Consolas, monospace; }
.ue-key:hover { background: var(--green-soft); border-color: var(--green); }

/* ===== rich text editor (unicode editor) ===== */
.rte-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--card); padding: 6px 8px; margin-top: 10px; }
.rte-fmt { border: 1px solid transparent; border-radius: 6px; background: var(--card); color: var(--ink); font: inherit; font-size: 13.5px; padding: 5px 6px; cursor: pointer; }
.rte-fmt:hover { border-color: var(--line); }
.rte-btn { border: 0; border-radius: 6px; background: transparent; color: var(--ink); font-size: 14px; width: 34px; height: 32px; cursor: pointer; }
.rte-btn:hover { background: var(--green-soft); color: var(--green-ink); }
.rte-sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }
.rte-area { min-height: 260px; max-height: 480px; overflow-y: auto; border: 1px solid var(--line); border-radius: 0 0 10px 10px; background: var(--card); color: var(--ink); padding: 14px 16px; font-size: 17px; line-height: 1.9; outline: none; }
.rte-area:focus { border-color: var(--green); }
.rte-area:empty:before { content: attr(data-ph); color: var(--muted); pointer-events: none; }
.rte-area h2, .rte-area h3, .rte-area h4 { margin: 12px 0 6px; line-height: 1.4; }
.rte-area p { margin: 0 0 8px; }
.rte-area ul, .rte-area ol { margin: 0 0 8px; padding-inline-start: 28px; }
.rte-area a { color: var(--green-ink); text-decoration: underline; }
.rte-area table { border-collapse: collapse; margin: 8px 0; }
.rte-area td { border: 1px solid var(--line); padding: 6px 10px; min-width: 48px; }
.rte-tblwrap { position: relative; display: inline-block; }
.rte-tbl-pop { position: absolute; top: 36px; left: 0; z-index: 40; display: block; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 10px; }
.rte-tbl-grid { display: grid; grid-template-columns: repeat(6, 18px); gap: 4px; }
.rte-tbl-cell { width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 3px; background: var(--card); cursor: pointer; display: block; }
.rte-tbl-cell.hot { background: var(--green-soft); border-color: var(--green); }
.rte-tbl-lbl { display: block; text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ===== rte v2: states, table btn, fullscreen, formatting visibility ===== */
.rte-btn.on { background: var(--green-soft); color: var(--green-ink); }
.rte-tbl-btn { width: auto; padding: 0 9px; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.rte-tbl-btn .fa-caret-down { font-size: 11px; }
.rte-tbl-pop { z-index: 1000; top: 38px; }
.rte-grow { flex: 1; }
.rte-area b, .rte-area strong { font-weight: 700; }
.rte-area i, .rte-area em { font-style: italic; }
.rte-area u { text-decoration: underline; }
.rte-area s, .rte-area strike { text-decoration: line-through; }
.rte-area blockquote { border-left: 3px solid var(--line); margin: 8px 0; padding: 2px 14px; color: var(--muted); }
.tool-box.rte-full { position: fixed; inset: 0; z-index: 2000; margin: 0; border-radius: 0; overflow: auto; display: flex; flex-direction: column; background: var(--bg, var(--card)); }
.tool-box.rte-full .rte-area { flex: 1; max-height: none; }
.rte-tbl-pop[hidden] { display: none; }

/* ===== font download pages ===== */
.fd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin-top: 16px; }
.fd-card { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.fd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.fd-head b { font-size: 16px; color: var(--ink); }
.fd-bn { display: block; font-size: 12.5px; color: var(--muted); }
.fd-lic { font-size: 11px; color: var(--green-ink); background: var(--green-soft); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.fd-sample { min-height: 74px; font-size: 26px; line-height: 1.7; color: var(--ink); overflow-wrap: anywhere; }
.fd-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.fd-dl { text-decoration: none; }
.fp-glyphs { margin-top: 10px; font-size: 22px; line-height: 2; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; overflow-wrap: anywhere; }

/* anchor-styled buttons: keep button text color on hover (global a:hover made blue-on-blue) */
a.bc-go { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
a.bc-go:hover, a.bc-go:focus { color: #fff; text-decoration: none; }
[data-theme="dark"] a.bc-go, [data-theme="dark"] a.bc-go:hover, [data-theme="dark"] a.bc-go:focus { color: #131314; }
a.bcv2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
a.bcv2-btn:hover, a.bcv2-btn:focus { color: var(--green-ink); text-decoration: none; }

/* ===== number tools ===== */
.nw-in { flex: 1; min-width: 220px; font-size: 22px; font-weight: 600; letter-spacing: .5px; min-height: 52px; }
.nw-outs { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.nw-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--card); }
.nw-label { font-size: 12.5px; color: var(--muted); min-width: 190px; flex-shrink: 0; }
.nw-out { flex: 1; font-size: 17px; line-height: 1.7; color: var(--ink); overflow-wrap: anywhere; min-height: 26px; }
.nw-row.nw-hi { border-color: var(--green); background: var(--green-soft); }
.nw-row.nw-hi .nw-out { font-weight: 700; }
.nw-copy { padding: 6px 10px; min-height: 36px; flex-shrink: 0; }
.nw-copy.ok { border-color: var(--green); color: var(--green-ink); }
.bn-chart td:nth-child(3) { text-align: right; }
.bn-chart td { text-align: center; }
@media (max-width: 640px) {
  .nw-row { flex-wrap: wrap; }
  .nw-label { min-width: 100%; }
}
@media print {
  .nv2-bar, .nv2-foot, .right-sidebar, .bc-go, .tool-box { display: none !important; }
  .bn-chart { font-size: 11pt; }
}

/* ===== OCR (image to text) ===== */
.oc-drop { margin-top: 12px; border: 2px dashed var(--line); border-radius: 14px; background: var(--card); padding: 34px 18px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.oc-drop:hover, .oc-drop.over { border-color: var(--green); background: var(--green-soft); }
.oc-drop.working { opacity: .6; pointer-events: none; }
.oc-drop-in { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.oc-drop-in .fa { font-size: 30px; color: var(--green); }
.oc-drop-in b { font-size: 16px; color: var(--ink); }
.oc-drop-in span { font-size: 13px; color: var(--muted); }
.oc-prog { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.oc-bar-wrap { flex: 1; height: 8px; background: var(--surface2, var(--green-soft)); border-radius: 999px; overflow: hidden; }
.oc-bar { height: 100%; width: 2%; background: var(--green); border-radius: 999px; transition: width .25s; }
.oc-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.oc-thumb { position: relative; width: 84px; height: 84px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card); }
.oc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oc-thumb span { position: absolute; right: 3px; bottom: 3px; font-size: 11px; background: rgba(0,0,0,.65); color: #fff; border-radius: 5px; padding: 1px 5px; }
.oc-thumb.pending { opacity: .55; }
.oc-canvas-wrap { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface2, #f1f3f4); display: flex; justify-content: center; }
#ocCanvas { max-width: 100%; height: auto; display: block; cursor: crosshair; touch-action: none; }
.oc-thumb.sel { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-soft); }

/* ===== voice typing ===== */
.vt-stage { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); margin-top: 4px; }
.vt-mic { width: 74px; height: 74px; border-radius: 50%; border: 0; background: var(--green); color: #fff; font-size: 28px; cursor: pointer; flex-shrink: 0; transition: transform .15s, background .15s; }
.vt-mic:hover { transform: scale(1.05); }
.vt-mic:disabled { background: var(--muted); cursor: not-allowed; transform: none; }
.vt-mic.on { background: #d93025; animation: vtpulse 1.4s ease-out infinite; }
@keyframes vtpulse { 0% { box-shadow: 0 0 0 0 rgba(217,48,37,.45); } 70% { box-shadow: 0 0 0 18px rgba(217,48,37,0); } 100% { box-shadow: 0 0 0 0 rgba(217,48,37,0); } }
.vt-stage-txt { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 3px; }
.vt-stage-txt b { font-size: 17px; color: var(--ink); }
.vt-interim { color: var(--muted); font-style: italic; min-height: 22px; font-size: 15px; }
.vt-punc { min-width: 44px; font-size: 16px; }

/* ===== mobile dropdown fix =====
   The retired burger-menu block still sets left:0/right:0 on .nv2-links; with a width
   that over-constrains the box, so the panel anchored to the button's LEFT edge and ran
   off the right of the screen. Re-anchor it to the right and let it scroll. */
@media (max-width: 860px) {
  .nv2-links {
    left: auto; right: 0;
    top: calc(100% + 8px);
    width: min(330px, calc(100vw - 20px));
    max-height: min(70vh, 560px);
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line); border-bottom: 1px solid var(--line);
    border-radius: 12px; padding: 10px;
    box-shadow: 0 14px 40px rgba(32,33,36,.22);
  }
  .nv2-links a { white-space: normal; overflow: visible; text-overflow: clip; padding: 11px 12px; }
  .nv2-group { padding: 12px 12px 4px; }
}

/* ===== land converter ===== */
.ld-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.ld-cell { border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; }
.ld-cell span { font-size: 12px; color: var(--muted); }
.ld-cell b { font-size: 17px; color: var(--ink); overflow-wrap: anywhere; }
.ld-cell.hi { border-color: var(--green); background: var(--green-soft); }
.ld-cell.hi b { color: var(--green-ink); }
.ld-deed { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ld-deed:empty { display: none; }
.ld-deed-h { background: var(--green-soft); color: var(--green-ink); font-size: 12.5px; font-weight: 700; padding: 8px 14px; }
.ld-deed-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ld-deed-row span { font-size: 13px; color: var(--muted); }
.ld-deed-row b { font-size: 15.5px; color: var(--ink); }

/* ===== letter / application generator ===== */
.lt-wrap { display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: 16px; margin-top: 12px; }
.lt-form { display: grid; grid-template-columns: 1fr; gap: 10px; align-content: start; max-height: 620px; overflow-y: auto; padding-right: 4px; }
.lt-field { display: flex; flex-direction: column; gap: 4px; }
.lt-field span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.lt-field input, .lt-field textarea {
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink);
  font-family: var(--font); font-size: 15px; padding: 9px 11px; width: 100%;
}
.lt-field input:focus, .lt-field textarea:focus { outline: none; border-color: var(--green); }
.lt-out { font-size: 15.5px; line-height: 1.95; white-space: pre-wrap; min-height: 480px; }
.lt-preview { display: flex; flex-direction: column; }
@media (max-width: 860px) {
  .lt-wrap { grid-template-columns: 1fr; }
  .lt-form { max-height: none; }
  .lt-out { min-height: 360px; }
}

/* ===== word counter ===== */
.wc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.wc-cell { border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.wc-cell b { font-size: 20px; color: var(--ink); }
.wc-cell span { font-size: 12px; color: var(--muted); }
.wc-cell.hi { border-color: var(--green); background: var(--green-soft); }
.wc-cell.hi b { color: var(--green-ink); }
.wc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.wc-panel { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.wc-panel-h { background: var(--green-soft); color: var(--green-ink); font-size: 12.5px; font-weight: 700; padding: 8px 14px; }
.wc-panel-b { padding: 12px 14px; }
.wc-head-track { height: 10px; background: var(--surface2, #eef1f4); border-radius: 999px; overflow: hidden; }
.wc-head-bar { height: 100%; width: 0; background: var(--green); border-radius: 999px; transition: width .15s; }
.wc-head-bar.near { background: #f9ab00; }
.wc-head-bar.over { background: #d93025; }
.wc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wc-chip { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13.5px; color: var(--ink); background: var(--card); }
.wc-chip b { color: var(--green-ink); margin-left: 4px; }
@media (max-width: 720px) { .wc-two { grid-template-columns: 1fr; } }

/* desktop dropdown now holds 25 links — cap it to the viewport and let it scroll */
.nv2-links { max-height: min(72vh, 640px); overflow-y: auto; overscroll-behavior: contain; }
.nv2-links::-webkit-scrollbar { width: 10px; }
.nv2-links::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 3px solid var(--surface); }
.nv2-links::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ===== narrow-phone header fit =====
   At ~390px the bar's fixed-width children (brand + weather + theme + menu) summed to
   more than the viewport, so the whole header overflowed and pushed the dropdown
   off-screen with it. Let the brand give up space instead of the bar overflowing. */
@media (max-width: 520px) {
  .nv2-bar { gap: 8px; padding: 0 10px; }
  .nv2-brand { min-width: 0; flex: 0 1 auto; overflow: hidden; }
  .nv2-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nv2-wx, .nv2-theme, .nv2-menu { flex: none; }
}
/* anchor the mobile panel to the viewport, so header layout can never drag it off-screen */
@media (max-width: 860px) {
  .nv2-links {
    position: fixed;
    top: 58px; right: 8px; left: auto;
    width: min(330px, calc(100vw - 16px));
  }
}

/* ===== prayer times ===== */
.py-next { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; padding: 14px 16px; border: 1px solid var(--green); border-radius: 12px; background: var(--green-soft); }
.py-next-label { font-size: 12.5px; color: var(--muted); }
.py-next-name { font-size: 22px; color: var(--green-ink); }
.py-next-time { font-size: 20px; font-weight: 700; color: var(--ink); }
.py-next-count { font-size: 14px; color: var(--muted); margin-left: auto; }
.py-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 12px; }
.py-cell { border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 12px; display: flex; flex-direction: column; gap: 3px; text-align: center; }
.py-cell span { font-size: 13px; color: var(--muted); }
.py-cell b { font-size: 19px; color: var(--ink); }
.py-cell.on { border-color: var(--green); background: var(--green-soft); }
.py-cell.on b { color: var(--green-ink); }
.py-sehri { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.py-sehri-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; background: var(--card); display: flex; flex-direction: column; }
.py-sehri-item span { font-size: 12.5px; color: var(--muted); }
.py-sehri-item b { font-size: 18px; color: var(--ink); }
.py-sehri-note { margin-left: auto; }
.py-today td { background: var(--green-soft); font-weight: 700; }
@media print {
  .py-next, .py-sehri, .tool-box, .nv2-head, .nv2-footer, .right-sidebar { display: none !important; }
  #pyMonth { font-size: 10.5pt; }
}

/* ===== currency converter ===== */
.cc-head { font-size: 20px; color: var(--ink); padding: 12px 16px; border: 1px solid var(--green); background: var(--green-soft); border-radius: 12px; }
.cc-head b { font-size: 26px; color: var(--green-ink); }
.cc-head span { font-size: 15px; color: var(--muted); }
.cc-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.cc-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 180px; }
.cc-field span { font-size: 12.5px; color: var(--muted); }
.cc-field input, .cc-field select { width: 100%; }
.cc-field input { font-size: 20px; font-weight: 600; min-height: 48px; }
.cc-swap { min-height: 48px; font-size: 18px; flex: none; }
.cc-result { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 18px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.cc-result b { font-size: 28px; color: var(--green-ink); }
.cc-result .cc-bn { font-size: 16px; color: var(--muted); }
.cc-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.cc-chip { border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 8px 14px; cursor: pointer; font: inherit; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 92px; }
.cc-chip b { font-size: 13px; color: var(--muted); }
.cc-chip span { font-size: 16px; font-weight: 700; color: var(--ink); }
.cc-chip:hover { border-color: var(--green); background: var(--green-soft); }

/* ===== homepage daily strip + link grids ===== */
.hp-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.hp-card { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 12px 14px; text-decoration: none; }
.hp-card:hover { border-color: var(--green); background: var(--green-soft); text-decoration: none; }
.hp-k { font-size: 12px; color: var(--muted); }
.hp-card b { font-size: 21px; color: var(--green-ink); line-height: 1.3; }
.hp-v { font-size: 15px; color: var(--ink); }
.hp-sub { font-size: 12px; color: var(--muted); }
.hp-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.hp-group h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; }
.hp-group a { display: block; padding: 6px 0; color: var(--ink); font-size: 14.5px; text-decoration: none; border-bottom: 1px solid transparent; }
.hp-group a:hover { color: var(--green-ink); text-decoration: none; border-bottom-color: var(--line); }
.hp-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
.hp-links a { display: block; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-size: 14px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-links a:hover { border-color: var(--green); background: var(--green-soft); color: var(--green-ink); text-decoration: none; }
@media (max-width: 520px) { .hp-strip { grid-template-columns: 1fr 1fr; } .hp-links { grid-template-columns: 1fr 1fr; } }

/* link tiles with site logos */
.hp-links a { display: flex; align-items: center; gap: 8px; }
.hp-links img { width: 20px; height: 20px; flex: none; object-fit: contain; border-radius: 4px; }
.hp-ico-txt { width: 20px; height: 20px; flex: none; border-radius: 4px; background: var(--green-soft); color: var(--green-ink); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* homepage district picker */
.hp-dist { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.hp-dist select { max-width: 190px; }

/* ===== slim daily bar above the converter ===== */
.hp-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; row-gap: 2px;
  margin: 10px 0 4px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.hp-bit { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 3px 10px; border-radius: 8px;
  text-decoration: none; color: var(--ink); font-size: 14px; flex: none; }
.hp-bit + .hp-bit { border-left: 1px solid var(--line); }
.hp-bit:hover { background: var(--green-soft); text-decoration: none; }
.hp-bit span { color: var(--muted); font-size: 12.5px; }
.hp-bit b { color: var(--green-ink); font-weight: 700; }
.hp-bit i { color: var(--muted); font-style: normal; font-size: 12.5px; }
.hp-bit-pick { flex: none; gap: 4px; margin-left: auto; padding: 0 0 0 8px; border-left: 1px solid var(--line); }
/* rotating rate ticker — fixed width so the row never reflows as it steps */
.hp-tick { min-width: 124px; }
.hp-tick-win { display: block; height: 22px; overflow: hidden; }
.hp-tick-list { display: block; will-change: transform; }
.hp-tick-row { display: flex; align-items: center; gap: 6px; height: 22px; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .hp-tick-list { transition: none !important; } }

.hp-bit-pick select { font-size: 13px; padding: 3px 6px; min-height: 30px; max-width: 118px; }
.hp-bit-pick button { border: 1px solid var(--line); background: var(--card); border-radius: 8px; min-height: 30px; padding: 2px 8px; cursor: pointer; font-size: 13px; }
.hp-bit-pick button:hover { border-color: var(--green); background: var(--green-soft); }

/* phones: drop the words that the numbers already imply, so it stays two short lines */
@media (max-width: 620px) {
  .hp-bar { gap: 4px; padding: 6px; }
  .hp-bit { padding: 3px 6px; font-size: 13.5px; }
  .hp-bit + .hp-bit { border-left: 0; }
  .hp-bit-pick { border-left: 0; padding-left: 0; }
  .lbl-next, .lbl-sehri, #hpSehri { display: none; }
  .hp-bit-pick select { max-width: 104px; }
  .hp-tick { min-width: 116px; }
  #hpPrayerLeft { font-size: 12px; }
}

/* ===== আজকের আবহাওয়া ===== */
.wx-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.wx-pick label { color: var(--muted); font-size: 13px; }
.wx-pick select { max-width: 190px; }
.wx-now { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.wx-big { display: flex; align-items: center; gap: 12px; }
.wx-emo { font-size: 42px; line-height: 1; }
.wx-temp { font-size: 40px; font-weight: 700; color: var(--green-ink); line-height: 1; }
.wx-temp sup { font-size: 18px; top: -.6em; }
.wx-cond { font-size: 16px; color: var(--ink); }
.wx-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.wx-meta b { color: var(--ink); }
a.nv2-wx { text-decoration: none; color: inherit; }
a.nv2-wx:hover { text-decoration: none; opacity: .75; }
@media (max-width: 620px) { .wx-emo { font-size: 34px; } .wx-temp { font-size: 32px; } .wx-now { gap: 12px; } }

/* avro-typing toggle on /avro-to-bijoy/ */
.a2b-avro { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 14px; line-height: 1.5; }
.a2b-avro input { accent-color: var(--green); width: 17px; height: 17px; margin-top: 2px; flex: none; }
.a2b-avro code { background: var(--green-soft); padding: 1px 5px; border-radius: 4px; }

/* opt-in rich-text mode toggle on the converter */
.bcv2-rich { margin: 10px 2px 0; padding-top: 10px; border-top: 1px solid var(--line); }
.bcv2-rich label { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 14px; line-height: 1.5; }
.bcv2-rich input { accent-color: var(--green); width: 17px; height: 17px; margin-top: 2px; flex: none; }
.bcv2-rich .cke { border-radius: 8px; overflow: hidden; }

/* converter pages get more room for the two panes (modern browsers only — older
   ones keep the standard 1180px, which is a graceful fallback) */
@supports selector(:has(*)) {
  /* only the converter CARD gets the extra room; the article below keeps its
     original measure so line length stays readable */
  .container-fluid:has(.bcv2) { max-width: 1400px; }
  /* Auto Ads never fills the reserved right column, so on converter pages it is
     248px of dead space shoving everything left. Hidden by CSS only — the ad
     markup is untouched; delete these two lines if a manual unit goes back in. */
  .container-fluid:has(.bcv2) > .row > .col-md-2 { display: none; }
  .container-fluid:has(.bcv2) > .row > .col-md-10 { max-width: 100%; flex: 0 0 100%; }
  /* article keeps its old measure AND stays centred under the wider box */
  .container-fluid:has(.bcv2) .main-content-body { max-width: 957px; margin-left: auto; margin-right: auto; }
}
/* Styles for the About / Contact / Privacy / Terms / Disclaimer / Credits pages.
   Appended to site-v2.css. Long-form prose needs a comfortable measure and clear
   heading rhythm — the tool pages are dense by design, these should not be. */

.card h1 + .tt-stat { margin: -4px 0 18px; }

/* the Bangla summary box at the top of each page */
.lp-summary {
	background: #f3f8f4;
	border: 1px solid #d7e7dc;
	border-left: 4px solid var(--green, #1f8a4c);
	border-radius: 6px;
	padding: 13px 16px;
	margin: 0 0 26px;
	line-height: 1.9;
}
.lp-summary p { margin: 0; }

/* readable measure for long-form text, without touching the tool pages */
.card h2 { margin: 30px 0 10px; font-size: 21px; line-height: 1.35; }
.card h3 { margin: 22px 0 8px; font-size: 17px; line-height: 1.4; }
.card h2:first-of-type { margin-top: 24px; }
.card p, .card li { line-height: 1.85; }
.card ul, .card ol { padding-left: 22px; margin: 0 0 14px; }
.card li { margin-bottom: 7px; }

.lp-table-wrap { overflow-x: auto; margin: 0 0 18px; }
.lp-table { border-collapse: collapse; width: 100%; min-width: 460px; font-size: 15px; }
.lp-table th, .lp-table td { border: 1px solid var(--line, #e3e5e8); padding: 9px 11px; text-align: left; vertical-align: top; }
.lp-table th { background: #f7f8f9; font-weight: 600; }
.lp-table code { font-size: 13px; word-break: break-word; }

/* the three tool columns on About */
.lp-cols { display: flex; flex-wrap: wrap; gap: 8px 34px; margin: 0 0 12px; }
.lp-cols > div { flex: 1 1 210px; min-width: 190px; }
.lp-cols h3 { margin-top: 12px; }
.lp-cols ul { padding-left: 20px; }

/* contact address block */
.lp-contact {
	background: #f7f8f9;
	border: 1px solid var(--line, #e3e5e8);
	border-radius: 8px;
	padding: 18px 20px;
	margin: 0 0 26px;
	text-align: center;
}
.lp-email { margin: 0 0 6px; font-size: 21px; font-weight: 600; word-break: break-word; }
.lp-email a { text-decoration: none; }
.lp-contact .tt-stat { margin: 0; }

@media (max-width: 600px) {
	.card h2 { font-size: 19px; }
	.lp-email { font-size: 18px; }
	.lp-summary { padding: 11px 13px; }
}

/* dark mode follows the site's existing theme switch */
html[data-theme="dark"] .lp-summary { background: #16241b; border-color: #24402c; }
html[data-theme="dark"] .lp-contact,
html[data-theme="dark"] .lp-table th { background: #1b1c1e; }
html[data-theme="dark"] .lp-table th,
html[data-theme="dark"] .lp-table td { border-color: #2c2e31; }

/* A footer column can now hold two groups (the taxonomy has six groups but the
   footer keeps four columns), so a second heading in the same column needs air. */
.nv2-footcol h4 ~ h4 { margin-top: 20px; }

/* The dropdown has six group headings; make them read as separators rather than
   as another link, and keep the first one tight to the top edge. */
.nv2-links .nv2-group { margin-top: 4px; }
.nv2-links .nv2-group:not(:first-child) {
	border-top: 1px solid var(--line);
	margin-top: 8px;
	padding-top: 12px;
}
