/* Islamic Inheritance Calculator - application styles (Hanafi). All selectors namespaced under .faraid */
.faraid{ --bg:#faf7f0; --card:#fffdf8; --ink:#1d2b23; --muted:#6b7568; --line:#e8e0cf;
  --green:#07452f; --green-2:#0b6b4e; --gold:#d9a441; --gold-2:#e3b84f; --red:#b3402e;
  max-width: 1080px; margin: 0 auto; padding: 8px 16px 40px; color: var(--ink);
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif; }
.faraid-hero{ text-align: center; padding: 26px 8px 18px; }
.faraid .eyebrow{ display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--green-2); background: #e7f0ea; border: 1px solid #cfe0d4; padding: 6px 14px; border-radius: 999px; margin-bottom: 14px; }
.faraid-hero h2.calc-title{ font-size: clamp(30px, 5.4vw, 46px); letter-spacing: -1.5px; margin: 0 0 10px; color: var(--green); }
.faraid-hero .lede{ max-width: 640px; margin: 0 auto; color: var(--muted); font-size: 16.5px; line-height: 1.65; }
.faraid-steps{ display: grid; gap: 18px; margin-top: 18px; }
.faraid .fcard{ background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 20px;
  box-shadow: 0 2px 14px rgba(7,69,47,.06); }
.faraid .fcard h2{ font-size: 19px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; color: var(--green); }
.faraid .stepn{ width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.faraid .frow{ display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
@media (min-width: 640px) {.faraid .frow{ grid-template-columns: 1fr 150px; }
}
.faraid .field{ display: flex; flex-direction: column; gap: 6px; }
.faraid .field > span{ font-size: 13px; font-weight: 600; color: var(--muted); }
.faraid .field input,.faraid .field select{ font: inherit; font-size: 16px; padding: 11px 13px; border: 1.5px solid var(--line);
  border-radius: 12px; background: #fff; color: var(--ink); width: 100%; box-sizing: border-box; }
.faraid .field input:focus,.faraid .field select:focus{ outline: 2px solid var(--green-2); border-color: var(--green-2); }
.faraid .hint{ font-size: 13.5px; color: var(--muted); line-height: 1.6; margin: 10px 0 0; }
.faraid .netline{ font-weight: 700; color: var(--green-2); }
.faraid .pills{ display: flex; gap: 10px; }
.faraid .pill{ font: inherit; font-weight: 700; font-size: 15px; padding: 11px 26px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); }
.faraid .pill.is-on{ background: var(--green); border-color: var(--green); color: #fff; }
.faraid 
.hgroup{ border-top: 1px dashed var(--line); padding: 12px 0 4px; }
.faraid .hgroup:first-of-type{ border-top: 0; padding-top: 2px; }
.faraid .hgroup > h3{ font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--green-2); margin: 0 0 6px; }
.faraid .heir{ display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f1ebdb; }
.faraid .heir:last-child{ border-bottom: 0; }
.faraid .heir .hinfo{ flex: 1; min-width: 0; }
.faraid .heir .hname{ font-weight: 600; font-size: 15px; }
.faraid .heir .hqual{ font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.faraid .stepper{ display: flex; align-items: center; gap: 10px; flex: none; }
.faraid .stepper button{ width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff;
  font-size: 18px; font-weight: 700; color: var(--green); cursor: pointer; line-height: 1; display: flex; align-items: center; justify-content: center; }
.faraid .stepper button:hover{ border-color: var(--green-2); }
.faraid .stepper button:disabled{ opacity: .35; cursor: default; }
.faraid .stepper .cnt{ min-width: 26px; text-align: center; font-weight: 800; font-size: 16px; }
.faraid .f-actions{ display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.faraid .btn{ font: inherit; font-weight: 700; border-radius: 12px; cursor: pointer; border: 1.5px solid transparent; }
.faraid .btn-primary{ background: var(--green); color: #fff; padding: 13px 26px; font-size: 16px; }
.faraid .btn-primary:hover{ background: var(--green-2); }
.faraid .btn-lg{ flex: 1; min-width: 200px; }
.faraid .btn-ghost{ background: #fff; border-color: var(--line); color: var(--green); padding: 11px 20px; font-size: 14.5px; }
.faraid .btn-ghost:hover{ border-color: var(--green-2); }
.faraid .form-err{ color: var(--red); font-weight: 600; font-size: 14px; margin-top: 12px; }
.faraid 
.f-results{ border: 2px solid var(--green); }
.faraid .sumstrip{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 640px) {.faraid .sumstrip{ grid-template-columns: repeat(4, 1fr); }
}
.faraid .sum{ background: #f4efe2; border-radius: 12px; padding: 10px 12px; }
.faraid .sum .k{ font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 700; }
.faraid .sum .v{ font-size: 17px; font-weight: 800; color: var(--green); margin-top: 3px; }
.faraid .tablewrap{ overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.faraid .ftable{ width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.faraid .ftable th{ text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted);
  padding: 10px 12px; background: #f6f1e4; border-bottom: 1px solid var(--line); }
.faraid .ftable td{ padding: 11px 12px; border-bottom: 1px solid #f1ebdb; vertical-align: top; }
.faraid .ftable tr:last-child td{ border-bottom: 0; }
.faraid .ftable .num{ text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.faraid .ftable .share-frac{ display: inline-block; background: #eef4ee; color: var(--green); font-weight: 800; border-radius: 8px; padding: 3px 10px; margin-right: 8px; }
.faraid .ftable .hsub{ font-size: 12.5px; color: var(--muted); }
.faraid .bars{ margin-top: 16px; display: grid; gap: 8px; }
.faraid .bar-row{ display: grid; grid-template-columns: 150px 1fr 64px; gap: 10px; align-items: center; font-size: 13px; }
.faraid .bar-row .bl{ font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.faraid .bar-track{ height: 14px; background: #efe9d8; border-radius: 999px; overflow: hidden; }
.faraid .bar-fill{ height: 100%; background: linear-gradient(90deg, var(--green-2), var(--gold-2)); border-radius: 999px; }
.faraid .bar-row .bp{ text-align: right; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; }
.faraid .excluded{ margin-top: 16px; background: #faf6ec; border: 1px dashed var(--line); border-radius: 12px; padding: 14px 16px; }
.faraid .excluded h3{ margin: 0 0 8px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; }
.faraid .excluded ul{ margin: 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
.faraid .excluded li{ margin: 4px 0; }
.faraid .fnotes{ margin-top: 14px; display: grid; gap: 8px; }
.faraid .fnote{ background: #eef4fb; border-left: 4px solid var(--green-2); padding: 10px 14px; border-radius: 0 10px 10px 0; font-size: 14px; line-height: 1.55; }
.faraid 
.rules-grid{ display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) {.faraid .rules-grid{ grid-template-columns: 1fr 1fr; }
}
.faraid .rules-grid > div{ background: #f7f3e8; border-radius: 12px; padding: 14px 16px; }
.faraid .rules-grid h3{ margin: 0 0 6px; font-size: 15px; color: var(--green); }
.faraid .rules-grid p{ margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }
.faraid .faq-item{ border-bottom: 1px solid var(--line); }
.faraid .faq-item:last-child{ border-bottom: 0; }
.faraid .faq-q{ width: 100%; background: none; border: 0; font: inherit; font-size: 15.5px; font-weight: 700; text-align: left;
  padding: 14px 4px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--ink); }
.faraid .faq-q .fx{ flex: none; width: 22px; height: 22px; position: relative; }
.faraid .faq-q .fx::before,.faraid .faq-q .fx::after{ content: ""; position: absolute; background: var(--green-2); border-radius: 2px; }
.faraid .faq-q .fx::before{ left: 2px; right: 2px; top: 10px; height: 2px; }
.faraid .faq-q .fx::after{ top: 2px; bottom: 2px; left: 10px; width: 2px; }
.faraid .faq-item.open .faq-q .fx::after{ display: none; }
.faraid .faq-a{ max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faraid .faq-item.open .faq-a{ max-height: 300px; }
.faraid .faq-a p{ margin: 0 0 14px; font-size: 14.5px; color: var(--muted); line-height: 1.65; padding: 0 4px; }
.faraid .disclaimer{ font-size: 13px; color: var(--muted); line-height: 1.65; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 20px; }
.faraid .toast{ position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--green);
  color: #fff; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0;
  pointer-events: none; transition: opacity .25s, transform .25s; z-index: 99; }
.faraid .toast.show{ opacity: 1; transform: translateX(-50%) translateY(0); }
@media print {.faraid-hero,.faraid-steps,.faraid .f-actions,.faraid .faq,.faraid .disclaimer{ display: none !important; }
.faraid .fcard{ box-shadow: none; break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {.faraid *{ transition: none !important; }
}

/* Madhhab selector */
.madhhab-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.madhhab-label { font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.madhhab-pick .pill .beta {
  font-style: normal; font-size: 0.68rem; font-weight: 700;
  background: #b9862f; color: #fff; border-radius: 999px;
  padding: 2px 7px; margin-left: 4px; vertical-align: 1px;
}
.madhhab-note { margin-top: 8px; font-size: 0.88rem; }
