/* =========================================================================
   উত্তরাধিকার ক্যালকুলেটর — জমির টুলস
   style.css এর পরে লোড হয়। সব রং style.css এর ভেরিয়েবল থেকে আসে,
   তাই ডার্ক মোড নিজে থেকেই কাজ করে।
   ========================================================================= */

/* ------------------------------ হিরো ------------------------------ */
/* টোকেন — শুধু টুলস পাতার জন্য, style.css এর কিছুই বদলায় না */
.tool-hero,
.tools-section,
.tools-note {
  --s-12: 48px;
  --s-16: 64px;
  --r-card: 16px;
  --t-ui: 200ms var(--ease);
}

.tool-hero {
  padding: var(--s-8) 0 var(--s-6);
  text-align: center;
}
.tool-hero .tool-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 6px 10px;
  margin-bottom: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--brand-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.tool-hero .tool-eyebrow svg { flex: 0 0 auto; }
.tool-hero .tool-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--s-4);
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  color: var(--brand-text);
}
.tool-hero h1 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.42;
  letter-spacing: -.01em;
  color: var(--ink);
}
.tool-hero p {
  max-width: 62ch;
  margin: var(--s-3) auto 0;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* তালিকা পাতার হিরো — হালকা সবুজাভ পৃষ্ঠে বসে */
.tool-hero.is-page .tool-icon { display: none; }
.tool-hero.is-page {
  margin-top: var(--s-5);
  padding: var(--s-8) var(--s-5) var(--s-8);
  background: linear-gradient(180deg, var(--brand-softer), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2) var(--s-5);
  margin: var(--s-5) 0 0;
  padding: 0;
  list-style: none;
}
.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.hero-facts svg { color: var(--brand); flex: 0 0 auto; }

/* ------------------------------ কার্ড ------------------------------ */
.tool-card {
  max-width: 780px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-2);
}
.tool-card-wide { max-width: 960px; }
.tool-body { padding: var(--s-6); }

/* ------------------------------ তথ্য বক্স ------------------------------ */
.tool-info {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-4);
  margin-bottom: var(--s-5);
  background: var(--brand-softer);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.7;
}
.tool-info svg { flex: 0 0 auto; margin-top: 2px; color: var(--brand-text); }

/* ------------------------------ ট্যাব ------------------------------ */
.tool-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  margin-bottom: var(--s-5);
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.tool-tab {
  min-height: 46px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.tool-tab:hover { background: var(--surface); }
.tool-tab.is-active {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: var(--sh-1);
}
.tool-panel { display: none; }
.tool-panel.is-active { display: block; }

/* ------------------------------ ফিল্ড ------------------------------ */
.tool-group {
  padding: var(--s-4);
  margin-bottom: var(--s-4);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.tool-group-title {
  margin: 0 0 var(--s-1);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.tool-group-hint {
  margin: 0 0 var(--s-3);
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}
.tool-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
}
.tool-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-3);
}
.tool-field { min-width: 0; }
.tool-field.is-full { grid-column: 1 / -1; }
.tool-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.tool-field input,
.tool-field select {
  width: 100%;
  height: 52px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tool-field select {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235d716a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}
.tool-field input:hover,
.tool-field select:hover { border-color: var(--muted); }
.tool-field input:focus,
.tool-field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.tool-field .field-note {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* ঐচ্ছিক ফিল্ড */
.tool-optional {
  padding: var(--s-4);
  margin-bottom: var(--s-4);
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  border-radius: var(--r-md);
}
.tool-optional .tool-group-title { color: var(--warn-ink); }
.tool-optional .tool-group-hint { color: var(--warn-ink); opacity: .88; }
.opt-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--warn-line);
  color: var(--warn-ink);
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

/* ------------------------------ ডায়াগ্রাম ------------------------------ */
.tool-diagram {
  display: flex;
  justify-content: center;
  padding: var(--s-3) 0 var(--s-1);
}
.tool-diagram svg { width: 100%; max-width: 260px; height: auto; }
.dg-shape { fill: var(--brand-soft); stroke: var(--brand); stroke-width: 2; }
.dg-diag { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 4; fill: none; }
.dg-text { fill: var(--ink-2); font-size: 11px; font-weight: 700; }
.dg-text-accent { fill: var(--accent-ink); font-size: 11px; font-weight: 700; }

/* ------------------------------ বোতাম ------------------------------ */
.tool-actions {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--s-3);
  margin-top: var(--s-5);
}
.tool-btn {
  min-height: 54px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.tool-btn-main {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: var(--sh-brand);
}
.tool-btn-main:hover { background: var(--brand-strong); }
.tool-btn-main:active { transform: scale(.985); }
.tool-btn-ghost {
  background: var(--surface-3);
  border-color: var(--line);
  color: var(--ink-2);
}
.tool-btn-ghost:hover { background: var(--surface-2); }
.tool-btn-soft {
  width: 100%;
  min-height: 48px;
  margin-top: var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand-text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.tool-btn-soft:hover { background: var(--brand-softer); }

/* ------------------------------ ভুল বার্তা ------------------------------ */
.tool-error {
  display: none;
  align-items: flex-start;
  gap: var(--s-2);
  margin-top: var(--s-4);
  padding: var(--s-3) var(--s-4);
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  border-radius: var(--r-sm);
  color: var(--danger-ink);
  font-size: 14px;
  line-height: 1.65;
}
.tool-error.is-visible { display: flex; }

/* ------------------------------ ফলাফল ------------------------------ */
.tool-result {
  display: none;
  padding: var(--s-6);
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.tool-result.is-visible { display: block; }
.tool-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
}
.tool-result-head h2 {
  margin: 0;
  font-size: 17px;
  color: var(--ink);
}
.result-badge {
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 700;
}
.result-badge.is-exact {
  background: var(--brand-soft);
  border: 1px solid var(--brand);
  color: var(--brand-text);
}
.result-badge.is-approx {
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  color: var(--warn-ink);
}
.result-main {
  padding: var(--s-5);
  background: var(--brand-soft);
  border: 1px solid var(--brand);
  border-radius: var(--r-lg);
}
.result-main .result-label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-text);
}
.result-main .result-value {
  display: block;
  font-size: clamp(26px, 6vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--brand-text);
  overflow-wrap: anywhere;
}
.result-main .result-unit {
  font-size: 15px;
  font-weight: 600;
  opacity: .8;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-2);
  margin-top: var(--s-3);
}
.result-grid.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.result-item {
  min-width: 0;
  padding: var(--s-3) var(--s-2);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.result-item span {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
  color: var(--muted);
}
.result-item strong {
  display: block;
  font-size: 17px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.result-note {
  margin-top: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm);
  font-size: 14px;
  line-height: 1.75;
}
.result-note.is-formula {
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.result-note.is-warn {
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  color: var(--warn-ink);
}

/* ------------------------------ সারি (ডায়নামিক) ------------------------------ */
.row-list { display: grid; gap: var(--s-2); margin-top: var(--s-3); }
.row-head {
  display: grid;
  gap: var(--s-2);
  align-items: center;
  padding: var(--s-2) var(--s-3);
  background: var(--brand-softer);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-text);
}
.row-item { display: grid; gap: var(--s-2); align-items: center; }
.row-num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.row-out {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 6px 10px;
  background: var(--brand-soft);
  border: 1px solid var(--brand);
  border-radius: var(--r-sm);
  color: var(--brand-text);
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.row-del {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 18px;
  cursor: pointer;
}
.row-del:hover { filter: brightness(.96); }

/* ------------------------------ সম্পর্কিত টুল ------------------------------ */
.tool-related { max-width: 780px; margin: var(--s-8) auto 0; }
.tool-related h2 {
  margin: 0 0 var(--s-4);
  font-size: 18px;
  color: var(--ink);
}
.related-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-3);
}
.related-tool {
  display: block;
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.related-tool:hover {
  border-color: var(--brand);
  box-shadow: var(--sh-2);
  transform: translateY(-2px);
}
.related-tool strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14.5px;
  color: var(--ink);
}
.related-tool span { font-size: 13.5px; color: var(--muted); }

/* ------------------------------ টুলস তালিকা পাতা ------------------------------ */
.tools-section { margin-top: var(--s-16); }
.tools-section:first-of-type { margin-top: var(--s-12); }

.tools-section-head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.tools-section-head .sec-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-text);
}
.tools-section-head .sec-copy { min-width: 0; flex: 1 1 auto; }
.tools-section-head .sec-title {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.tools-section-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -.005em;
  color: var(--ink);
}
.tools-section-head p {
  margin: 3px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}
.tools-section-head .sec-count {
  flex: 0 0 auto;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
  align-items: stretch;
}
/* কার্ডের প্রস্থ সব সেকশনে হুবহু এক — কম কার্ড থাকলেও টেনে বড় হয় না।
   যে সেকশনে মাত্র একটি টুল, সেটি পাশাপাশি-সাজানো চওড়া কার্ড হয়, যাতে
   পাশে বড় ফাঁকা জায়গা না থাকে। */
.tools-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.tools-card.is-wide {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--s-4);
  row-gap: 4px;
  padding: var(--s-5) var(--s-6);
}
.tools-card.is-wide .card-icon { grid-row: 1 / span 2; margin-bottom: 0; }
.tools-card.is-wide h3 { grid-column: 2; margin: 0; }
.tools-card.is-wide p { grid-column: 2; margin: 0; max-width: 70ch; }
.tools-card.is-wide .card-go { grid-column: 3; grid-row: 1 / span 2; margin: 0; }
.tools-card.is-wide .card-tag { position: static; grid-column: 2; justify-self: start; margin-top: 4px; }

.tools-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--sh-1);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--t-ui), box-shadow var(--t-ui), transform var(--t-ui);
}
.tools-card .card-icon {
  width: 44px;
  height: 44px;
  margin-bottom: var(--s-4);
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-text);
  transition: background var(--t-ui), color var(--t-ui);
}
.tools-card .card-icon svg { width: 22px; height: 22px; }
.tools-card h3 {
  margin: 0 0 7px;
  padding-right: 4px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -.004em;
  color: var(--ink);
}
.tools-card p {
  margin: 0 0 var(--s-5);
  flex: 1 1 auto;
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--muted);
}
.tools-card .card-go {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-text);
}
.tools-card .card-go svg {
  flex: 0 0 auto;
  transition: transform var(--t-ui);
}
.tools-card .card-tag {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

@media (hover: hover) {
  .tools-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--sh-2);
  }
  .tools-card:hover .card-icon {
    background: var(--brand);
    color: var(--on-brand);
  }
  .tools-card:hover .card-go svg { transform: translateX(3px); }
}
.tools-card:active { transform: translateY(-1px); }

/* নিচের দ্রষ্টব্য */
.tools-note {
  display: flex;
  align-items: flex-start;
  gap: var(--s-4);
  margin-top: var(--s-16);
  padding: var(--s-5);
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.tools-note .note-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--brand-text);
}
.tools-note h2 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.tools-note p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--ink-2);
}
.tools-note p + p { margin-top: var(--s-2); }

/* ------------------------------ রেসপনসিভ ------------------------------ */
@media (max-width: 1024px) {
  .tools-grid { gap: var(--s-4); }
}

@media (max-width: 900px) {
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools-section { margin-top: var(--s-12); }
}

@media (max-width: 640px) {
  .tool-hero { padding: var(--s-6) 0 var(--s-5); }
  .tool-hero.is-page { margin-top: var(--s-4); padding: var(--s-6) var(--s-4); }
  .tool-hero .tool-icon { width: 50px; height: 50px; }
  .tool-hero p { font-size: 15px; }
  .hero-facts { gap: var(--s-2) var(--s-4); margin-top: var(--s-4); }
  .hero-facts li { font-size: 13.5px; }

  .tool-body { padding: var(--s-4); }
  .tool-result { padding: var(--s-4); }
  .tool-grid-2,
  .tool-grid-3 { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-tabs { grid-template-columns: 1fr; border-radius: var(--r-md); }
  .tool-tab { border-radius: var(--r-sm); }
  .related-tools { grid-template-columns: 1fr; }

  .tools-section-head { gap: var(--s-3); margin-bottom: var(--s-4); }
  .tools-section-head .sec-icon { width: 36px; height: 36px; flex-basis: 36px; }
  .tools-section-head h2 { font-size: 19px; }
  .tools-section-head p { font-size: 13.5px; }
  .tools-section-head .sec-count { display: none; }

  .tools-note { gap: var(--s-3); padding: var(--s-4); margin-top: var(--s-12); }

  .tools-card.is-wide {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 18px;
  }
  .tools-card.is-wide .card-go { grid-column: 2; grid-row: auto; margin-top: var(--s-3); }
  .tools-note p { font-size: 14px; }
}

/* ছোট পর্দায় এক কলাম — বাংলা লেখা ছোট করতে হয় না, ট্যাপ করাও সহজ */
@media (max-width: 560px) {
  .tools-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .tools-card { padding: 18px; }
  .tools-card .card-icon { width: 40px; height: 40px; margin-bottom: var(--s-3); }
  .tools-card h3 { font-size: 16px; }
  .tools-card p { margin-bottom: var(--s-4); font-size: 14px; }
  .tools-card .card-tag { top: 14px; right: 14px; }
}

@media (max-width: 420px) {
  .tool-actions { grid-template-columns: 1fr; }
}

@media (max-width: 359px) {
  .result-grid,
  .result-grid.is-2 { grid-template-columns: 1fr; }
  .tools-note { flex-direction: column; gap: var(--s-3); }
}

/* চলাচল কমানোর পছন্দ মানা হয় */
@media (prefers-reduced-motion: reduce) {
  .tools-card,
  .tools-card .card-icon,
  .tools-card .card-go svg { transition: none; }
  .tools-card:hover { transform: none; }
  .tools-card:hover .card-go svg { transform: none; }
}

/* ------------------------------ প্রিন্ট ------------------------------ */
@media print {
  .site-header, .site-footer, .tool-actions, .tool-tabs,
  .row-del, .tool-btn-soft, .tool-related { display: none !important; }
  .tool-card { box-shadow: none; border-color: #ccc; }
}

/* ---------------------- সারির কলাম (খতিয়ান ও অংশীদার) ---------------------- */
.row-head,
.row-item { grid-template-columns: 32px 1fr 1fr 1fr 40px; }
.row-head.is-2,
.row-item.is-2 { grid-template-columns: 32px 1.3fr 1fr 40px; }

/* সারির ঘরগুলোও সাধারণ ইনপুটের মতো উঁচু — আঙুলে চাপা সহজ */
.row-item input,
.row-item select { min-height: 48px; }
.row-del { min-width: 44px; min-height: 44px; }

/* ব্রেডক্রাম্বের লিংকে চাপার জায়গা বড়, দেখতে একই
   (tools.css শুধু টুলস পাতায় লোড হয়, তাই আর্টিকেল অপরিবর্তিত) */
.breadcrumb a {
  display: inline-block;
  padding-block: 10px;
  margin-block: -10px;
}

@media (max-width: 900px) {
  .row-head { display: none; }
  .row-item,
  .row-item.is-2 {
    grid-template-columns: 1fr 44px;
    row-gap: 10px;
    padding: var(--s-3);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
  }
  .row-item .row-num { grid-column: 1; grid-row: 1; justify-self: start; }
  .row-item .row-del { grid-column: 2; grid-row: 1; justify-self: end; }
  .row-item input { grid-column: 1 / -1; }
}

/* সূত্রের পাতায় ছবি-সহ কার্ড */
.tools-card .tool-diagram { margin: 0 0 var(--s-3); }
.tools-card .tool-diagram svg { width: 100%; height: auto; max-height: 140px; }

/* ফলাফলের টেবিল — সরু পর্দায় যেন কম কাটে */
@media (max-width: 520px) {
  .tool-result .ex-table { font-size: 12.5px; min-width: 0; }
  .tool-result .ex-table th { padding: 8px 6px; white-space: normal; }
  .tool-result .ex-table td { padding: 8px 6px; white-space: nowrap; }
}

