/* Al-Burhan free legal tools */
.albft {
  --ab-ink: #0A2B2C;
  --ab-deep: #052627;
  --ab-teal: #1D494B;
  --ab-gold: #C5A979;
  --ab-gold-d: #8B6A33;
  --ab-bg: #F7F5F0;
  --ab-line: #E4DED2;
  --ab-text: #2B2B2B;
  --ab-muted: #5F6368;
  --ab-good: #1E6B4E;
  --ab-warn: #8A5A00;
  --ab-bad: #A23B2A;
  font-family: Cairo, "Segoe UI", Tahoma, sans-serif;
  color: var(--ab-text);
  line-height: 1.75;
  box-sizing: border-box;
}
.albft *, .albft *::before, .albft *::after { box-sizing: inherit; }
.albft [hidden] { display: none !important; }
.albft-ico { width: 1.25em; height: 1.25em; vertical-align: -0.25em; flex: none; }

/* Tool shell */
.albft-tool {
  background: #fff;
  border: 1px solid var(--ab-line);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(5, 38, 39, .08);
  overflow: hidden;
  margin: 0 auto 40px;
  max-width: 980px;
}
.albft-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 28px 30px 24px;
  background: linear-gradient(135deg, var(--ab-deep) 0%, var(--ab-teal) 100%);
  color: #fff;
  position: relative;
}
.albft-head::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--ab-gold), transparent);
}
.albft-head-ico {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: rgba(197, 169, 121, .16);
  color: var(--ab-gold);
  font-size: 30px;
  flex: none;
}
.albft-badge {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ab-deep);
  background: var(--ab-gold);
  border-radius: 999px;
  padding: 2px 12px;
  margin-bottom: 6px;
}
.albft .albft-title { color: #fff; font-size: clamp(20px, 3vw, 26px); margin: 0 0 6px; line-height: 1.4; }
.albft-intro { margin: 0; color: #E6EFEF; font-size: 15px; }
.albft-body { padding: 26px 30px 10px; }
.albft-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: space-between;
  padding: 14px 30px 18px;
  font-size: 13px;
  color: var(--ab-muted);
  border-top: 1px solid var(--ab-line);
  background: var(--ab-bg);
}
.albft-disc { flex-basis: 100%; }

/* Form */
.albft-form { display: grid; gap: 18px; }
.albft-group {
  border: 1px solid var(--ab-line);
  border-radius: 14px;
  padding: 16px 18px 18px;
  margin: 0;
}
.albft-group > legend { font-weight: 700; color: var(--ab-teal); padding: 0 8px; font-size: 15.5px; }
.albft-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 18px; }
.albft-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.albft-field > label, .albft-field > .albft-lbl { font-weight: 600; font-size: 14.5px; color: var(--ab-ink); }
.albft-hint { font-size: 12.5px; color: var(--ab-muted); }
.albft input[type="text"], .albft input[type="number"], .albft input[type="date"], .albft select, .albft textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1.5px solid #CFC7B8;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--ab-text);
  transition: border-color .15s, box-shadow .15s;
}
.albft textarea { min-height: 90px; resize: vertical; }
.albft input:focus, .albft select:focus, .albft textarea:focus {
  outline: none;
  border-color: var(--ab-teal);
  box-shadow: 0 0 0 3px rgba(29, 73, 75, .18);
}
.albft .is-invalid { border-color: var(--ab-bad) !important; }
.albft-err { color: var(--ab-bad); font-size: 13px; }

/* Segmented choices */
.albft-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.albft-seg label {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 16px;
  border: 1.5px solid #CFC7B8;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14.5px;
  background: #fff;
  transition: all .15s;
}
.albft-seg input { position: absolute; opacity: 0; pointer-events: none; }
.albft-seg input:checked + span { color: #fff; }
.albft-seg label:has(input:checked) { background: var(--ab-teal); border-color: var(--ab-teal); color: #fff; }
.albft-seg label:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(29, 73, 75, .25); }

/* Counters (heirs) */
.albft-counter { display: flex; align-items: center; gap: 8px; }
.albft-counter button {
  width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid #CFC7B8;
  background: #fff; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ab-teal);
}
.albft-counter input { text-align: center; max-width: 70px; }
.albft-check { display: flex; gap: 10px; align-items: center; font-size: 14.5px; cursor: pointer; }
.albft-check input { width: 20px; height: 20px; accent-color: var(--ab-teal); }

/* Buttons */
.albft-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.albft-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 26px; border-radius: 12px; border: 0;
  font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none;
  transition: transform .1s, box-shadow .15s, background .15s;
}
.albft-btn:active { transform: translateY(1px); }
.albft-btn-primary { background: var(--ab-gold); color: var(--ab-deep); box-shadow: 0 6px 16px rgba(139, 106, 51, .25); }
.albft-btn-primary:hover { background: #B8995F; color: var(--ab-deep); }
.albft-btn-ghost { background: transparent; color: var(--ab-teal); border: 1.5px solid var(--ab-teal); }
.albft-btn-ghost:hover { background: rgba(29, 73, 75, .06); color: var(--ab-teal); }
.albft-btn-wa { background: #1E7B4A; color: #fff; }
.albft-btn-wa:hover { background: #18663D; color: #fff; }
.albft-btn-sm { min-height: 40px; padding: 6px 14px; font-size: 14px; border-radius: 10px; }

/* Result */
.albft-result { margin: 24px 0 10px; animation: albftIn .35s ease; }
@keyframes albftIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.albft-total {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px;
  padding: 20px 22px; border-radius: 14px;
  background: linear-gradient(135deg, #FBF7EE, #F3EAD8);
  border: 1px solid #E8D9B8;
}
.albft-total-label { font-weight: 700; color: var(--ab-ink); }
.albft-total-value { font-size: clamp(24px, 4vw, 34px); font-weight: 800; color: var(--ab-gold-d); direction: ltr; unicode-bidi: plaintext; }
.albft-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.albft-table th, .albft-table td { padding: 11px 12px; border-bottom: 1px solid var(--ab-line); text-align: start; vertical-align: top; }
.albft-table th { background: var(--ab-bg); color: var(--ab-ink); font-weight: 700; }
.albft-table td.num { white-space: nowrap; font-weight: 700; color: var(--ab-ink); }
.albft-table .albft-sub { display: block; font-size: 12.5px; color: var(--ab-muted); font-weight: 400; }
.albft-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.albft-box { border-radius: 12px; padding: 14px 16px; margin: 12px 0; font-size: 14.5px; }
.albft-box ul { margin: 6px 0 0; padding-inline-start: 20px; }
.albft-box-basis { background: #F2F6F6; border: 1px solid #D5E2E2; }
.albft-box-warn { background: #FFF6E5; border: 1px solid #F0D9A8; color: #5A3D00; }
.albft-box-title { font-weight: 700; display: flex; gap: 8px; align-items: center; }
.albft-cta {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  margin: 18px 0 6px; padding: 18px 20px; border-radius: 14px;
  background: var(--ab-deep); color: #fff;
}
.albft-cta p { margin: 0; color: #fff; flex: 1 1 260px; }
.albft-cta.is-strong { background: linear-gradient(135deg, var(--ab-deep), #2A5A5C); border: 2px solid var(--ab-gold); }
.albft-cta a.albft-link { color: var(--ab-gold); }
.albft-tools-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.albft-doc {
  white-space: pre-wrap; background: #fff; border: 1px solid var(--ab-line); border-radius: 12px;
  padding: 26px 28px; font-size: 16px; line-height: 2; font-family: inherit;
  box-shadow: inset 0 0 0 6px var(--ab-bg);
}

/* Hub */
.albft-hub { margin: 10px 0 40px; }
.albft-hub-title { text-align: center; color: var(--ab-ink); margin-bottom: 24px; }
.albft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.albft-card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 26px 24px 22px; border-radius: 18px; background: #fff;
  border: 1px solid var(--ab-line); text-decoration: none !important; color: var(--ab-text);
  transition: transform .2s, box-shadow .2s, border-color .2s; overflow: hidden;
}
.albft-card::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(var(--ab-gold), var(--ab-teal)); opacity: .9;
}
.albft-card:hover, .albft-card:focus-visible {
  transform: translateY(-4px); box-shadow: 0 16px 34px rgba(5, 38, 39, .12); border-color: var(--ab-gold);
}
.albft-card-ico {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px;
  background: linear-gradient(135deg, var(--ab-deep), var(--ab-teal)); color: var(--ab-gold); font-size: 28px;
}
.albft-card-free {
  position: absolute; top: 18px; inset-inline-end: 18px; font-size: 12px; font-weight: 700;
  color: var(--ab-good); background: #E6F3EC; padding: 2px 10px; border-radius: 999px;
}
.albft-card-title { font-size: 18px; color: var(--ab-ink); line-height: 1.5; }
.albft-card-desc { font-size: 14.5px; color: var(--ab-muted); flex: 1; }
.albft-card-go { font-weight: 700; color: var(--ab-gold-d); }
.albft-hub.is-compact .albft-card-desc { display: none; }

/* FAQ */
.albft-faq { max-width: 980px; margin: 30px auto; }
.albft-faq details { border: 1px solid var(--ab-line); border-radius: 12px; margin: 10px 0; background: #fff; }
.albft-faq summary {
  cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--ab-ink); list-style: none;
  display: flex; justify-content: space-between; gap: 10px;
}
.albft-faq summary::-webkit-details-marker { display: none; }
.albft-faq summary::after { content: "+"; color: var(--ab-gold-d); font-size: 20px; line-height: 1; }
.albft-faq details[open] summary::after { content: "−"; }
.albft-faq details > div { padding: 0 18px 14px; color: var(--ab-text); }

.albft-grid2.is-counters { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
/* Mobile */
@media (max-width: 640px) {
  .albft-grid2.is-counters { grid-template-columns: 1fr 1fr; gap: 12px; }
  .albft-counter button { width: 36px; height: 36px; }
  .albft-counter input { max-width: 52px; padding: 8px 4px; }
  .albft-table.is-stack thead { display: none; }
  .albft-table.is-stack tr { display: block; border: 1px solid var(--ab-line); border-radius: 12px; margin: 0 0 10px; padding: 6px 12px; }
  .albft-table.is-stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 6px 0; }
  .albft-table.is-stack td:first-child { display: block; font-weight: 700; border-bottom: 1px dashed var(--ab-line); padding-bottom: 8px; }
  .albft-table.is-stack td:not(:first-child)::before { content: attr(data-label); color: var(--ab-muted); font-weight: 400; }
  .albft-table.is-stack td.num { text-align: end; flex-direction: row; }
  .albft-table.is-stack td.num .albft-sub { display: inline; margin-inline-start: 6px; }
  .albft-head { padding: 22px 18px 20px; gap: 14px; }
  .albft-head-ico { width: 48px; height: 48px; font-size: 24px; }
  .albft-body { padding: 18px 16px 6px; }
  .albft-foot { padding: 12px 16px 16px; }
  .albft-group { padding: 12px 12px 14px; }
  .albft-btn { width: 100%; }
  .albft-actions .albft-btn-sm { width: auto; }
  .albft-doc { padding: 18px 16px; font-size: 15px; }
  .albft-table { font-size: 14px; }
}

/* Print: result only, as a branded report */
.albft-print-head, .albft-print-foot { display: none; }
@media print {
  body * { visibility: hidden !important; }
  .albft-printing, .albft-printing * { visibility: visible !important; }
  .albft-printing { position: absolute; inset: 0 0 auto 0; padding: 0 10mm; }
  .albft-printing .albft-print-head, .albft-printing .albft-print-foot { display: flex !important; }
  .albft-print-head { justify-content: space-between; align-items: center; border-bottom: 2px solid #C5A979; padding-bottom: 8px; margin-bottom: 14px; }
  .albft-print-head img { height: 48px; }
  .albft-print-foot { justify-content: space-between; border-top: 1px solid #ccc; margin-top: 18px; padding-top: 8px; font-size: 11px; color: #555; }
  .albft-noprint { display: none !important; }
  .albft-total, .albft-cta { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .albft-doc { box-shadow: none; border: 0; padding: 0; }
}
.albft-lead { font-size: 18px; color: #3F3F3F; max-width: 980px; margin: 0 auto 24px; text-align: center; }
