/* ═══════════════════════════════════════════════════════════════
   Miras Design System — Pages v2
   Header · Hero · Hesaplayıcı · Mirasçı · Sonuç ·
   Rehber · Kaynaklar · Footer
   ═══════════════════════════════════════════════════════════════ */

/* ═══ Header ═══ */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: var(--header-h); display: flex; align-items: center;
  justify-content: space-between; gap: var(--space-md);
}
.brand {
  display: inline-flex; align-items: center; gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: var(--fw-bold); color: var(--text); font-size: var(--text-md);
}
.brand-mark {
  width: 36px; height: 36px; border-radius: var(--radius);
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: var(--text-on-brand); box-shadow: var(--shadow-xs);
}
.brand-mark .icon { width: 18px; height: 18px; }
.brand-sub { color: var(--brand-500); }
.header-actions { display: flex; align-items: center; gap: var(--space-xs); }

/* ═══ Tab bar ═══ */
.main-tabs {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding-block: var(--space-sm);
}
.main-content { padding-block: var(--space-2xl); }
.print-header { display: none; }

/* ═══ Hero ═══ */
.hero {
  position: relative; overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 10% 0%, var(--brand-100), transparent 60%),
    radial-gradient(500px 250px at 90% 0%, var(--gold-100), transparent 50%);
  opacity: .6; pointer-events: none;
}
.hero-inner {
  position: relative; padding-block: var(--space-3xl);
  max-width: var(--container-narrow);
  text-align: left;
}
.hero-overline {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  padding: 5px 12px; border-radius: var(--radius-pill);
  background: var(--brand-50); color: var(--brand-600);
  font-family: var(--font-display);
  font-size: var(--text-2xs); font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-md);
}
.hero-title {
  font-size: var(--text-display);
  font-weight: var(--fw-bold);
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: 18ch;
}
.hero-title .accent { color: var(--brand-500); }
.hero-desc {
  margin-top: var(--space-md); color: var(--text-soft);
  font-size: var(--text-md); max-width: 50ch;
  line-height: var(--lh-normal);
}
.hero-cta {
  margin-top: var(--space-xl); display: flex;
  gap: var(--space-sm); flex-wrap: wrap;
}

/* Stats row */
.hero-stats {
  display: flex; gap: var(--space-2xl); margin-top: var(--space-2xl);
  flex-wrap: wrap;
}
.hero-stat { text-align: left; }
.hero-stat-value {
  font-family: var(--font-display);
  font-size: var(--text-3xl); font-weight: var(--fw-bold);
  color: var(--brand-600); line-height: 1;
}
.hero-stat-label {
  font-size: var(--text-xs); color: var(--text-faint);
  margin-top: var(--space-3xs);
}

/* ═══ Heir Cards ═══ */
.heir-group { margin-bottom: 0; }
.heir-group + .heir-group { margin-top: var(--space-sm); }
.heir-group-title {
  display: none;
}
.heir-group-title .icon { width: 14px; height: 14px; color: var(--brand-500); }

/* Accordion head */
.heir-group-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-xs); padding: var(--space-sm) var(--space-md); margin-bottom: 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--text-xs); font-weight: var(--fw-semibold);
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-soft);
  text-align: left; font-family: inherit;
  min-height: 44px;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.heir-group-head:hover { background: var(--surface-2); border-color: var(--brand-300); }
.heir-group-head .icon { width: 14px; height: 14px; color: var(--brand-500); flex: 0 0 14px; }
.heir-group-head .heir-group-label { flex: 1; display: flex; align-items: center; gap: var(--space-xs); }
.heir-group-head .chevron {
  width: 16px; height: 16px; color: var(--text-faint); flex: 0 0 16px;
  transition: transform var(--dur) var(--ease-out);
}
.heir-group-head:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; border-radius: var(--radius); }

/* Count badge */
.heir-group-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px; margin-left: auto; margin-right: var(--space-xs);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 11px; font-weight: var(--fw-bold); line-height: 1;
  color: var(--text-faint); background: var(--surface-2);
  border: 1px solid var(--border-strong);
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              transform var(--dur-instant) var(--ease-out);
  white-space: nowrap;
}
.heir-group-count.has-selection {
  color: var(--text-on-brand); background: var(--brand-600);
  border-color: var(--brand-600);
  animation: badge-pop var(--dur) var(--ease-out);
}
@keyframes badge-pop {
  0% { transform: scale(0.6); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Locked group (Eş) — kapatılamaz */
[data-locked] .heir-group-head {
  cursor: default;
  border-color: var(--brand-200);
  background: var(--brand-50);
}
[data-locked] .heir-group-head .chevron { display: none; }
[data-locked] .heir-group-head:focus-visible { outline: none; }

/* Accordion panel animation */
.heir-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-slow) var(--ease-out);
}
.heir-panel > .heir-grid { overflow: hidden; min-height: 0; }
.heir-group.open .heir-panel { grid-template-rows: 1fr; }
.heir-group.open .heir-group-head .chevron { transform: rotate(180deg); }
.heir-group.open .heir-group-head { border-color: var(--brand-300); }

/* Panel spacer for smooth bottom transition */
.heir-panel > .heir-grid > * { padding-bottom: 0.01px; }

/* Desktop: always open */
@media (min-width: 768px) {
  .heir-group-head .chevron { display: none; }
  .heir-panel { display: block !important; grid-template-rows: unset !important; }
  .heir-panel > .heir-grid { overflow: visible !important; min-height: unset !important; }
}

.heir-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm); align-items: start;
}
@media (max-width: 480px) { .heir-grid { grid-template-columns: 1fr; } }

.heir-label { position: relative; cursor: pointer; display: flex; flex-direction: column; }
.heir-label > input { position: absolute; opacity: 0; pointer-events: none; }
.heir-body {
  display: flex; align-items: center; gap: var(--space-sm);
  flex: 1 1 auto;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
  transition: border-color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              transform var(--dur-instant) var(--ease-out);
}
.heir-label:hover .heir-body { border-color: var(--brand-300); background: var(--surface-2); }
.heir-label input:checked ~ .heir-body {
  border-color: var(--brand-500); background: var(--brand-50);
  box-shadow: 0 0 0 3px oklch(50% 0.15 160 / 0.1);
}
.heir-label:focus-visible .heir-body { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.heir-label:active .heir-body { transform: translateY(1px); }
.heir-label.disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.heir-label:has(.heir-barriers.open) .heir-body { background: var(--surface-2); }

.heir-box {
  width: 26px; height: 26px; flex: 0 0 26px;
  border: 1.5px solid var(--border-strong); border-radius: 6px;
  display: grid; place-items: center; color: transparent;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}
.heir-box .icon { width: 16px; height: 16px; display: block; }
.heir-label input:checked ~ .heir-body .heir-box {
  background: var(--brand-600); border-color: var(--brand-600);
  color: var(--text-on-brand);
}
.heir-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.heir-name {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold); font-size: var(--text-sm); color: var(--text);
  min-width: 0;
  flex: 1 1 0%;
}
.heir-meta { color: var(--text-faint); font-size: var(--text-xs); }
.heir-count-input {
  flex: 0 0 auto; width: 40px; min-height: 44px;
  padding: 6px 4px; font-size: var(--text-xs);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  text-align: center;
}
.heir-count-input:focus { outline: none; border-color: var(--brand-500); box-shadow: var(--shadow-focus); }

/* ═══ Barriers ═══ */
.heir-barriers {
  margin-top: 8px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); cursor: default; position: relative;
  display: grid; grid-template-rows: auto 0fr;
  transition: grid-template-rows var(--dur-fast) var(--ease-out);
}
.heir-barriers.open { grid-template-rows: auto 1fr; }
.heir-bar-head {
  display: flex; align-items: center; gap: var(--space-xs);
  width: 100%; padding: 8px 10px;
  background: transparent; border: 0; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600;
  color: var(--text); text-align: left;
  position: relative; overflow: visible;
}
.heir-bar-head:hover { background: var(--brand-50); }
.heir-bar-head .icon { color: var(--brand-600); }

/* Info wrap */
.heir-bar-info-wrap {
  position: relative; display: inline-flex; align-items: center;
  gap: 4px; cursor: help; z-index: var(--z-base);
  border-radius: var(--radius-sm); outline: none;
}
.heir-bar-info-wrap:focus-visible { z-index: var(--z-tooltip); box-shadow: 0 0 0 2px var(--brand-300); }
.heir-bar-title-text { border-bottom: 1px dotted var(--brand-400); }

/* Info icon */
.heir-bar-info-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid var(--brand-200); background: var(--brand-50);
  color: var(--brand-700); font-size: 10px; font-weight: 600;
  line-height: 1; flex: 0 0 16px;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.heir-bar-info-wrap:hover .heir-bar-info-icon,
.heir-bar-info-wrap:focus .heir-bar-info-icon {
  background: var(--brand-500); color: var(--text-on-brand);
  border-color: var(--brand-500);
}

/* Info tooltip */
.heir-bar-info-tip {
  position: absolute; left: 0; top: calc(100% + 8px);
  z-index: var(--z-tooltip); width: 280px; max-width: 85vw;
  padding: 10px 12px; font-size: 12px; font-weight: 500;
  line-height: 1.6; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  pointer-events: none; opacity: 0; visibility: hidden;
  transition: opacity var(--dur-fast) var(--ease), visibility var(--dur-fast) var(--ease);
}
.heir-bar-info-wrap:hover .heir-bar-info-tip,
.heir-bar-info-wrap:focus .heir-bar-info-tip { opacity: 1; visibility: visible; }

@media (hover: none) {
  .heir-bar-info-tip {
    position: fixed; left: 50%; top: auto; bottom: 80px;
    transform: translateX(-50%); opacity: 0; visibility: hidden;
  }
  .heir-bar-info-tip.show { opacity: 1; visibility: visible; pointer-events: auto; }
}

/* Badge */
.heir-bar-badge {
  margin-left: auto; min-width: 20px; padding: 1px 6px;
  text-align: center; font-size: 10px; font-weight: 600;
  color: var(--text-faint); background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  line-height: 1.5;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.heir-bar-badge.hidden { display: none; }
.heir-bar-badge.has { color: var(--brand-700); background: var(--brand-50); border-color: var(--brand-300); }
.heir-bar-badge.has[data-tooltip] { cursor: help; }

/* Accent border for heirs with barriers */
.heir-label.has-barrier .heir-body { border-left: 3px solid var(--amber-400); padding-left: calc(var(--space-md) - 1px); }
.heir-label.has-barrier input:checked ~ .heir-body { border-left-color: var(--amber-700); }

/* Tooltip (badge) */
.heir-bar-tooltip {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  padding: 5px 8px; font-size: 10px; font-weight: 500;
  line-height: 1.5; color: var(--paper); background: var(--ink);
  border-radius: var(--radius-sm); white-space: nowrap;
  pointer-events: none; opacity: 0;
  transition: opacity var(--dur-fast) var(--ease); z-index: var(--z-base);
}
.heir-bar-tooltip::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--ink);
}
.heir-bar-badge.has:hover + .heir-bar-tooltip,
.heir-bar-badge.has:focus + .heir-bar-tooltip { opacity: 1; }

@media (hover: none) {
  .heir-bar-tooltip {
    position: fixed; bottom: auto; top: auto; left: 50%;
    transform: translateX(-50%); opacity: 0;
    transition: opacity var(--dur-fast) var(--ease);
  }
  .heir-bar-tooltip.show { opacity: 1; pointer-events: auto; }
  .heir-bar-tooltip::after { display: none; }
}

.heir-bar-head .chevron { margin-left: 2px; transition: transform var(--dur-fast) var(--ease-out); }
.heir-barriers.open .heir-bar-head .chevron { transform: rotate(180deg); }
.heir-bar-body { overflow: hidden; min-height: 0; padding: 0 10px 12px; }
.heir-bar-note { font-size: 12px; color: var(--text-faint); margin: 0 0 10px; line-height: 1.5; }
.heir-bar-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px; align-items: stretch;
}
@media (max-width: 400px) { .heir-bar-grid { grid-template-columns: 1fr; } }

.heir-bar-field {
  min-width: 0; width: 100%; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 6px;
  padding: 0; border: 0; border-radius: 0; background: transparent;
}
.heir-bar-field:nth-child(odd) { border-right: 1px solid var(--border); padding-right: 10px; }
.heir-bar-field:nth-child(3) { border-top: 1px solid var(--border); padding-top: 10px; }
.heir-bar-field:nth-child(4) { border-top: 1px solid var(--border); padding-top: 10px; }

.heir-bar-row { display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: 100%; min-width: 0; }
.heir-bar-label { display: block; width: 100%; min-width: 0; font-size: 11px; font-weight: 600; line-height: 1.3; color: var(--text); }

.heir-bar-stepper {
  display: flex; align-items: stretch; gap: 0; width: 100%; max-width: 100%;
  box-sizing: border-box; padding: 0; border: 0; border-radius: var(--radius);
  overflow: hidden; background: transparent;
}
.heir-bar-stepper::before, .heir-bar-stepper::after { display: none; }

.stepper-btn {
  display: grid; place-items: center; width: 44px; min-width: 44px; min-height: 44px;
  border: 1px solid var(--border-strong); background: var(--surface-2);
  color: var(--text); font-size: 16px; font-weight: var(--fw-bold);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.stepper-btn:first-child { border-right: none; border-radius: var(--radius) 0 0 var(--radius); }
.stepper-btn:last-child { border-left: none; border-radius: 0 var(--radius) var(--radius) 0; }
.stepper-btn:hover { background: var(--brand-50); color: var(--brand-600); }
.stepper-btn:focus-visible { outline: 2px solid var(--brand-500); outline-offset: -2px; z-index: 1; }
.stepper-btn:active { background: var(--brand-100); }
.stepper-btn:disabled { opacity: .4; cursor: not-allowed; }

.heir-bar-val {
  flex: 1; width: 100%; height: 44px; box-sizing: border-box; min-width: 0;
  border: 1px solid var(--border-strong); border-radius: 0;
  border-left: none; border-right: none;
  text-align: center; padding: 6px 4px; font: inherit;
  font-size: 13px; font-weight: var(--fw-semibold);
  background: var(--surface); color: var(--text);
  -moz-appearance: textfield; appearance: textfield;
}
.heir-bar-val::-webkit-outer-spin-button,
.heir-bar-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.heir-bar-val:focus-visible, .heir-bar-val:focus {
  outline: none; border-color: var(--brand-500); box-shadow: var(--shadow-focus);
}
.heir-bar-desc { display: none; }
.hidden-heir { display: none !important; }

/* ═══ Submit area ═══ */
#calcSubmit {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-xs); min-width: 200px;
}
@media (max-width: 480px) { #calcSubmit { min-width: 0; width: 100%; } }
.submit-area { margin-top: var(--space-lg); }
.calc-note {
  display: flex; align-items: flex-start; gap: var(--space-xs);
  margin-top: var(--space-sm); font-size: var(--text-xs); color: var(--text-faint);
}
.calc-note .icon { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 1px; }

/* ═══ Reset inline onay ═══ */
.reset-wrap { display: flex; align-items: center; gap: var(--space-xs); }
.reset-confirm { display: flex; align-items: center; gap: var(--space-xs); }
.btn-danger { color: var(--negative); }
.btn-danger:hover { background: var(--rose-50); color: var(--rose-600); }

/* ═══ Sonuç Skeleton Yükleme ═══ */
.result-skeleton { padding: var(--space-sm); }
.result-skeleton .skel-header { margin-bottom: var(--space-md); }
.result-skeleton .skel-kpi-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.result-skeleton .skel-chart { margin-bottom: var(--space-md); }
.result-skeleton .skel-table { margin-top: var(--space-sm); }
@media (max-width: 900px) { .result-skeleton .skel-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .result-skeleton .skel-kpi-grid { grid-template-columns: 1fr; } }

/* ═══ Hata Kartı ═══ */
.result-error-card {
  text-align: center; padding: var(--space-2xl) var(--space-lg);
  background: linear-gradient(135deg, var(--rose-50), color-mix(in srgb, var(--rose-50) 60%, var(--surface)));
  border: 1px solid var(--rose-100);
  border-radius: var(--radius-lg);
  animation: resultSlideIn var(--dur-slow) var(--ease-out);
}
.result-error-icon {
  width: 56px; height: 56px; margin: 0 auto var(--space-md);
  border-radius: 50%; display: grid; place-items: center;
  background: var(--rose-100); color: var(--rose-600);
}
.result-error-icon .icon { width: 28px; height: 28px; }
.result-error-title {
  font-family: var(--font-display);
  font-size: var(--text-lg); font-weight: var(--fw-bold);
  color: var(--rose-600); margin: 0 0 var(--space-xs);
}
.result-error-msg {
  font-size: var(--text-sm); color: var(--text-soft); margin: 0 0 var(--space-md);
}
.result-error-detail {
  font-size: var(--text-xs); color: var(--text-faint);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-sm) var(--space-md);
  max-width: 48ch; margin: 0 auto; word-break: break-word;
}

/* ═══ Yasal Uyarı ═══ */
.result-disclaimer {
  display: flex; align-items: flex-start; gap: var(--space-sm);
  margin-top: var(--space-lg); padding: var(--space-md);
  background: var(--amber-50); border: 1px solid var(--amber-100);
  border-radius: var(--radius); font-size: var(--text-xs); color: var(--text-soft);
  line-height: 1.6;
}
.result-disclaimer .icon { width: 16px; height: 16px; flex: 0 0 16px; color: var(--amber-500); margin-top: 2px; }

/* ═══ Results KPI ═══ */
#resultsContent { padding: var(--space-md); }
#resultsWrap.result-enter #resultsContent {
  animation: resultSlideIn var(--dur-slow) var(--ease-out);
}
@keyframes resultSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
#resultsWrap.result-loading #resultsContent {
  animation: none;
}
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--space-md); }
@media (max-width: 900px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 400px) { .kpi-grid { grid-template-columns: 1fr; } }

.kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-xs);
}
.kpi-label {
  display: flex; align-items: center; gap: var(--space-xs);
  font-family: var(--font-display);
  font-size: var(--text-2xs); color: var(--text-faint);
  font-weight: var(--fw-semibold); text-transform: uppercase;
  letter-spacing: 0.05em;
}
.kpi-label .icon { width: 14px; height: 14px; }
.kpi-value {
  font-family: var(--font-display);
  font-size: var(--text-lg); font-weight: var(--fw-bold);
  margin-top: var(--space-xs); color: var(--text);
}
.kpi-value.positive { color: var(--positive); }
.kpi-highlight { background: var(--brand-50); border-color: var(--brand-300); }
.kpi-value.negative { color: var(--negative); }

/* ═══ Results Layout ═══ */
.results-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: var(--space-lg); }
@media (max-width: 900px) { .results-layout { grid-template-columns: 1fr; } }

.chart-box { display: grid; place-items: center; position: relative; }
.chart-center { position: absolute; text-align: center; pointer-events: none; }
.chart-center .big { font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--fw-bold); }
.chart-center .small { font-size: var(--text-xs); color: var(--text-faint); }

/* Mobile table card view */
@media (max-width: 640px) {
  #resultsContent .table-wrap { overflow: visible; border: 0; background: transparent; }
  #resultsContent .table,
  #resultsContent .table tbody,
  #resultsContent .table tr,
  #resultsContent .table td { display: block; width: 100%; }
  #resultsContent .table thead { display: none; }
  #resultsContent .table tr {
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    margin-bottom: var(--space-sm); padding: var(--space-xs) var(--space-sm);
    background: var(--surface);
  }
  #resultsContent .table td {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm);
    border: 0; padding: 6px 2px; text-align: right;
  }
  #resultsContent .table td::before {
    content: attr(data-label); font-size: var(--text-2xs); font-weight: var(--fw-semibold);
    text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); text-align: left;
  }
  #resultsContent .table td[data-label="Mirasçı"] { font-size: var(--text-sm); }
  #resultsContent .table .badge { margin-left: auto; }
}

/* Legend */
.legend { display: flex; flex-direction: column; gap: var(--space-sm); }
.legend-item { display: flex; align-items: center; gap: var(--space-sm); font-size: var(--text-sm); }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.legend-name { display: flex; align-items: center; gap: var(--space-xs); color: var(--text); font-weight: var(--fw-medium); min-width: 0; flex: 1; }
.legend-name .count { color: var(--text-faint); font-weight: var(--fw-normal); }
.legend-val { text-align: right; }
.legend-val .frac { font-weight: var(--fw-bold); color: var(--text); }
.legend-val .amt { font-size: var(--text-xs); color: var(--text-faint); }

/* Bar chart */
.bars { display: flex; flex-direction: column; gap: var(--space-md); }
.bar-row { display: grid; grid-template-columns: minmax(80px, 1fr) auto; gap: var(--space-sm); align-items: center; }
.bar-label { font-size: var(--text-xs); color: var(--text-soft); font-weight: var(--fw-medium); text-align: right; }
.bar-track { height: 8px; background: var(--surface-2); border-radius: var(--radius-pill); overflow: hidden; }
.bar-fill { height: 100%; border-radius: var(--radius-pill); background: var(--brand-500); width: 0; transition: width .6s var(--ease-out); }
.bar-val { font-size: var(--text-xs); font-weight: var(--fw-semibold); color: var(--text); min-width: 40px; }

/* Split card */
.split-card {
  display: flex; align-items: center; gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.split-card:hover { border-color: var(--brand-300); box-shadow: var(--shadow-sm); }
.split-rank {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: var(--radius);
  display: grid; place-items: center; background: var(--surface-2);
  color: var(--text-soft); font-weight: var(--fw-bold); font-size: var(--text-sm);
}
.split-main { flex: 1; min-width: 0; }
.split-name { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: var(--text-sm); color: var(--text); }
.split-explain { font-size: var(--text-xs); color: var(--text-faint); margin-top: 2px; }
.split-amt { text-align: right; }
.split-amt .val { font-family: var(--font-display); font-weight: var(--fw-bold); color: var(--text); }
.split-amt .each { font-size: var(--text-xs); color: var(--text-faint); }

/* Log */
.log-card {
  background: var(--surface-2); color: var(--text); border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-mono); font-size: var(--text-2xs); line-height: 1.9; overflow: auto;
}
.log-line .ok { color: var(--brand-400); }
.log-line .err { color: var(--negative); }

/* Step line */
.step-line { display: flex; gap: var(--space-md); align-items: flex-start; padding: var(--space-md) var(--space-lg); }
.step-line + .step-line { border-top: 1px solid var(--border); }
.step-dot {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%;
  background: var(--brand-50); color: var(--brand-600);
  display: grid; place-items: center;
  font-weight: var(--fw-bold); font-size: var(--text-2xs); margin-top: 2px;
}
.step-text { flex: 1; }
.step-text .t { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: var(--text-sm); color: var(--text); }
.step-text .d { font-size: var(--text-xs); color: var(--text-faint); margin-top: 2px; }
.step-amt { font-family: var(--font-display); font-weight: var(--fw-bold); color: var(--brand-600); font-size: var(--text-sm); white-space: nowrap; }

/* Stepper timeline */
.stepper { padding: var(--space-md) var(--space-lg); }
.step-li { display: flex; gap: var(--space-md); align-items: stretch; }
.step-node { display: flex; flex-direction: column; align-items: center; flex: 0 0 32px; }
.step-dot {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%;
  background: var(--brand-600); color: var(--text-on-brand);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: var(--fw-bold); font-size: var(--text-2xs); z-index: 1;
  box-shadow: 0 0 0 4px var(--brand-50);
}
.step-connector { width: 2px; flex: 1; margin: 4px 0; background: var(--border-strong); min-height: 16px; }
.step-li:last-child .step-connector { background: transparent; }
.step-text { flex: 1; padding: 4px 0 var(--space-md); }
.step-li:last-child .step-text { padding-bottom: 0; }
.step-text .t { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: var(--text-sm); color: var(--text); }
.step-text .d { font-size: var(--text-xs); color: var(--text-faint); margin-top: 3px; }
.step-amt { font-family: var(--font-display); font-weight: var(--fw-bold); color: var(--brand-600); font-size: var(--text-sm); white-space: nowrap; padding-top: 4px; }
@media (max-width: 520px) { .step-amt { display: none; } }

/* ═══ Form validation ═══ */
.field-invalid > input,
.field-invalid > select { border-color: var(--negative) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--negative) 15%, transparent) !important; }
.field-hint-error { margin-top: var(--space-3xs); font-size: var(--text-2xs); color: var(--negative); display: flex; align-items: center; gap: 4px; }
.field-hint-error::before { content: "⚠"; font-size: 10px; }
[aria-invalid="true"] { border-color: var(--negative) !important; }

/* ═══ Mobil Sabit Hesaplama Barı ═══ */
.mobile-calc-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: var(--z-dropdown);
  display: none;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transform: translateY(0);
  transition: transform var(--dur) var(--ease-out),
              opacity var(--dur) var(--ease-out);
}
.mobile-calc-bar.hidden-bar {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}
.mobile-calc-bar.keyboard-up {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}
.mobile-calc-bar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px -2px oklch(20% 0.01 160 / 0.08),
              0 -1px 4px -1px oklch(20% 0.01 160 / 0.04);
}
.mobile-calc-bar-summary {
  display: flex; align-items: center; gap: var(--space-xs);
  flex: 1; min-width: 0;
  font-family: var(--font-display);
  font-size: var(--text-xs); font-weight: var(--fw-medium);
  color: var(--text-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mobile-calc-bar-summary .icon {
  width: 14px; height: 14px; flex: 0 0 14px;
  color: var(--brand-500);
}
.mobile-calc-bar-btn {
  flex: 0 0 auto;
  min-height: 44px; padding: 0 var(--space-md);
  font-size: var(--text-sm); font-weight: var(--fw-semibold);
  border-radius: var(--radius);
  white-space: nowrap;
}
.mobile-calc-bar-btn:disabled {
  opacity: .5; cursor: not-allowed;
  background: var(--surface-2); color: var(--text-faint);
  border: 1px solid var(--border);
}
@media (max-width: 767px) {
  .mobile-calc-bar { display: block; }
  .pane { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}

/* ═══ Source cards ═══ */
.source-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-lg);
  box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column; gap: var(--space-sm);
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
.source-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--brand-300); }
.source-card .arabic { font-size: 1.4rem; color: var(--brand-700); line-height: 1.9; }
.source-ref { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: var(--text-base); color: var(--text); display: flex; align-items: center; gap: var(--space-xs); }
.source-text { color: var(--text-soft); font-size: var(--text-sm); flex: 1; }

.source-toolbar {
  display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-lg);
  position: sticky; top: calc(var(--header-h)); z-index: var(--z-raised);
}
.search-box { position: relative; flex: 1 1 240px; }
.search-box .input { padding-left: 40px; padding-right: 40px; min-height: 44px; font-size: var(--text-sm); }
.search-box .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-faint); pointer-events: none; }
.search-clear {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; background: transparent; border-radius: 50%; cursor: pointer;
  color: var(--text-faint);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.search-clear:hover { background: var(--surface-2); color: var(--text); }
.search-clear .icon { position: static; width: 14px; height: 14px; transform: none; }
.search-box .input:focus { outline: none; border-color: var(--brand-500); box-shadow: var(--shadow-focus); }

/* ═══ Guide chips ═══ */
.guide-chips {
  display: flex; gap: var(--space-xs); overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; padding-block: var(--space-2xs);
}
.guide-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; white-space: nowrap; padding: 7px 14px;
  border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--surface); cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--text-soft);
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
  min-height: 44px;
}
.chip:hover { border-color: var(--brand-300); color: var(--text); }
.chip:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.chip.active {
  background: var(--brand-600); border-color: var(--brand-600); color: var(--text-on-brand);
  box-shadow: var(--shadow-xs);
}
.chip-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
  border-radius: var(--radius-pill); font-size: var(--text-2xs); font-weight: var(--fw-bold);
  background: var(--surface-2); color: var(--text-soft);
}
.chip.active .chip-count { background: rgba(255,255,255,.2); color: var(--text-on-brand); }

/* Section divider */
.section-divider {
  display: flex; align-items: center; gap: var(--space-sm); text-align: center;
  font-family: var(--font-display);
  font-size: var(--text-2xs); font-weight: var(--fw-bold);
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-soft); margin-block: var(--space-xl);
}
.section-divider::before, .section-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.section-divider span { padding: 0 var(--space-xs); }

/* ═══ Guide hero ═══ */
.guide-hero-eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  font-family: var(--font-display);
  font-size: var(--text-2xs); font-weight: var(--fw-bold);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--brand-600); background: var(--brand-50);
  border: 1px solid var(--brand-200);
  padding: 4px 10px; border-radius: var(--radius-pill); margin-bottom: var(--space-sm);
}
.guide-hero-eyebrow .icon { width: 12px; height: 12px; }

.fav-btn { color: var(--text-faint); min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; }
.fav-btn .icon { width: 18px; height: 18px; }
.fav-btn.active { color: var(--amber-500); fill: currentColor; }

.segmented { display: flex; gap: 3px; background: var(--surface-2); padding: 3px; border-radius: var(--radius); }
.seg-btn { padding: 10px 14px; min-height: 44px; border-radius: var(--radius-sm); font-size: var(--text-xs); font-weight: var(--fw-semibold); color: var(--text-soft); }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--surface); color: var(--brand-600); box-shadow: var(--shadow-xs); }

/* School row */
.school-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-sm); }
@media (max-width: 640px) { .school-row { grid-template-columns: 1fr; } }
.school-box { background: var(--surface-2); border-radius: var(--radius); padding: var(--space-sm) var(--space-md); font-size: var(--text-xs); }
.school-box .name { font-weight: var(--fw-bold); color: var(--brand-600); margin-bottom: 2px; }

/* ═══ Footer ═══ */
.site-footer {
  margin-top: auto; border-top: 1px solid var(--border);
  background: var(--surface-2); padding-block: var(--space-2xl);
}
.footer-inner { display: flex; flex-wrap: wrap; gap: var(--space-lg); align-items: center; justify-content: space-between; }
.footer-note { font-size: var(--text-xs); color: var(--text-faint); max-width: 46ch; }

/* ═══ Guide Cards ═══ */
:root, :root[data-theme="light"] {
  --guid-card-bg: #ffffff;
  --guid-card-border: #e2e7e2;
  --guid-card-hover: #b9d7c7;
  --guid-brand: #087a55;
  --guid-brand-deep: #06603f;
  --guid-num-bg: #ecf7f2;
  --guid-num-fg: #087a55;
  --guid-title: #202522;
  --guid-text: #3a413c;
  --guid-soft: #727a74;
  --guid-muted: #9aa49e;
  --guid-share-bg: #087a55;
  --guid-share-fg: #ffffff;
  --guid-ayet-bg: #e5f4ed;  --guid-ayet-fg: #087a55;
  --guid-hadis-bg: #eff6ff; --guid-hadis-fg: #2563eb;
  --guid-icma-bg: #fff7e6;  --guid-icma-fg: #a66a00;
  --guid-sahaba-bg: #f0f2ee; --guid-sahaba-fg: #5a6658;
  --guid-missing-bg: #fdf0f2; --guid-missing-fg: #c0394e;
  --guid-detail-line: #eaefea;
}
:root[data-theme="dark"] {
  --guid-card-bg: #1b211c;
  --guid-card-border: #30382f;
  --guid-card-hover: #3f6a56;
  --guid-num-bg: #153c2d;
  --guid-num-fg: #159a6a;
  --guid-title: #f2f4f1;
  --guid-text: #c9d0c7;
  --guid-soft: #9ca89f;
  --guid-muted: #6f7c74;
  --guid-brand: #159a6a;
  --guid-share-bg: #159a6a;
  --guid-share-fg: #08110d;
  --guid-ayet-bg: #143226; --guid-ayet-fg: #8fd9bb;
  --guid-hadis-bg: #16294a; --guid-hadis-fg: #8bb9ff;
  --guid-icma-bg: #382c13; --guid-icma-fg: #f2c176;
  --guid-sahaba-bg: #2b312a; --guid-sahaba-fg: #c3cbc0;
  --guid-missing-bg: #472527; --guid-missing-fg: #ff9daa;
  --guid-detail-line: #303b32;
}

/* Guide stats */
.guide-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-sm);
  max-width: 720px; margin-inline: auto;
}
@media (max-width: 480px) { .guide-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 360px) { .guide-stats { grid-template-columns: 1fr; } }
.guide-stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-sm) var(--space-md);
  text-align: center;
}
.guide-stat-value {
  font-family: var(--font-display);
  font-size: var(--text-xl); font-weight: var(--fw-bold);
  color: var(--brand-600); line-height: 1.1;
}
.guide-stat-label {
  font-family: var(--font-display);
  font-size: var(--text-2xs); font-weight: var(--fw-semibold);
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-faint); margin-top: 2px;
}
.guide-stats { margin-top: var(--space-md); }

/* Guide grid */
.guide-status { font-size: var(--text-xs); font-weight: var(--fw-semibold); color: var(--text-faint); }
.guide-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md); align-items: start; margin-bottom: var(--space-md);
}

/* Guide card */
.guide-card {
  background: var(--guid-card-bg); border: 1px solid var(--guid-card-border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: transform var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.guide-card:hover { transform: translateY(-1px); border-color: var(--guid-card-hover); box-shadow: var(--shadow-sm); }
.guide-card.open { border-color: var(--guid-num-fg); }
.guide-card:focus-within { border-color: var(--guid-num-fg); box-shadow: var(--shadow-focus); }

.guide-card-head {
  width: 100%; display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px; text-align: left; font-family: inherit;
  background: none; border: 0; cursor: pointer; color: var(--guid-title);
}
.guide-card-head:focus-visible { outline: 2px solid var(--guid-num-fg); outline-offset: -2px; border-radius: var(--radius-lg); }

.guide-num {
  flex: 0 0 auto; width: 48px; height: 48px;
  display: grid; place-items: center; border-radius: var(--radius);
  background: var(--guid-num-bg); color: var(--guid-num-fg);
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums;
}

.guide-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.guide-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; line-height: 1.32; color: var(--guid-title); letter-spacing: -0.01em; }
.guide-arabic {
  font-family: var(--font-arabic); font-size: 10px; font-weight: 500;
  line-height: 1.6; color: var(--guid-num-fg);
  text-align: center; direction: rtl; margin-top: 4px; padding-inline: 4px;
}
.guide-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.guide-share {
  display: inline-flex; align-items: center;
  background: var(--guid-share-bg); color: var(--guid-share-fg);
  border-radius: var(--radius-pill); padding: 8px 14px;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap;
  min-height: 44px;
}
.guide-src {
  display: inline-flex; align-items: center;
  border-radius: var(--radius-pill); padding: 4px 8px;
  font-size: 11px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.guide-src-ayet { background: var(--guid-ayet-bg); color: var(--guid-ayet-fg); }
.guide-src-hadis { background: var(--guid-hadis-bg); color: var(--guid-hadis-fg); }
.guide-src-icma { background: var(--guid-icma-bg); color: var(--guid-icma-fg); }
.guide-src-sahabe { background: var(--guid-sahaba-bg); color: var(--guid-sahaba-fg); }
.guide-src-missing { background: var(--guid-missing-bg); color: var(--guid-missing-fg); font-weight: 600; }

.guide-cond { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.guide-cond-label { font-size: 10px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--guid-muted); }
.guide-cond-text { font-size: 13px; font-weight: 600; color: var(--guid-soft); line-height: 1.4; }
.guide-cond-text.stale { color: var(--guid-muted); font-style: italic; font-weight: 500; }

.guide-chev {
  flex: 0 0 auto; width: 36px; height: 36px;
  display: grid; place-items: center; margin: -4px -6px 0 0;
  color: var(--guid-muted);
}
.guide-chev svg { width: 18px; height: 18px; transition: transform var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease); }
.guide-card.open .guide-chev { color: var(--guid-num-fg); }
.guide-card.open .guide-chev svg { transform: rotate(180deg); }

/* Guide detail */
.guide-card-body[hidden] { display: none; }
.guide-detail {
  padding: 16px 18px 18px; border-top: 1px solid var(--guid-detail-line);
  display: flex; flex-direction: column; gap: 16px;
}
.guide-sec { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.guide-sec-k {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--font-display);
  font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--guid-num-fg);
}
.guide-sec-k svg { width: 12px; height: 12px; }
.guide-para { margin: 0; font-size: 13px; line-height: 1.7; color: var(--guid-text); }
.guide-para-empty { color: var(--guid-muted); font-style: italic; }
.guide-example { margin: 0; font-size: 13px; line-height: 1.7; color: var(--guid-text); white-space: pre-line; }
.guide-evidence { margin: 0; font-size: 14px; line-height: 1.9; color: var(--guid-text); overflow-wrap: break-word; }
.guide-evidence-rtl {
  direction: rtl; text-align: right;
  font-family: var(--font-arabic); font-size: 14px; line-height: 2; color: var(--guid-text);
}
.guide-detail-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Guide responsive */
@media (max-width: 640px) {
  .source-toolbar { align-items: stretch; flex-direction: column; }
  .source-toolbar .search-box { flex: 1 1 auto; }
  .source-toolbar .select-wrap { width: 100% !important; }
  .source-toolbar .select-wrap .select { width: 100%; min-height: 44px; }
}
@media (max-width: 767px) {
  .guide-grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .guide-card-head { padding: 14px; gap: 10px; }
  .guide-num { width: 40px; height: 40px; border-radius: var(--radius-sm); font-size: 14px; }
  .guide-title { font-size: 15px; }
  .guide-arabic { font-size: 10px; line-height: 1.7; }
  .guide-share { font-size: 12px; padding: 4px 10px; }
  .guide-src { font-size: 10px; padding: 4px 8px; }
  .guide-detail { padding: 14px; }
  .guide-chev { margin: -2px -2px 0 0; }
  .guide-detail-cols { grid-template-columns: 1fr; gap: 14px; }
  .guide-evidence-rtl { font-size: 18px; line-height: 1.9; }
}
@media (max-width: 480px) {
  .guide-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Fıkıh sözlüğü */
@media (max-width: 768px) {
  .accordion { border: 0; box-shadow: none; }
  .acc-head { min-height: 48px; padding: var(--space-sm) var(--space-md); gap: var(--space-sm); }
  .acc-head span { font-size: var(--text-md); }
  .acc-head .chevron { flex: 0 0 auto; }
  .acc-body { padding: 0 var(--space-md) var(--space-md); font-size: 14px; line-height: 1.65; color: var(--text-soft); }
}

/* Footer mobile */
@media (max-width: 768px) {
  .site-footer { padding-block: var(--space-md); }
  .footer-inner { flex-direction: column; gap: var(--space-xs); text-align: center; }
  .footer-note { max-width: none; }
  .footer-inner .brand { margin-bottom: 0; }
  .footer-inner .text-right { text-align: center; }
}

/* ═══ Reduced motion — now handled globally in base.css ═══ */

/* ═══ Barrier details ═══ */
.barrier-count-info { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; font-size: 11px; line-height: 1.4; }
.barrier-selected { color: var(--text-faint); }
.barrier-effective { color: var(--brand-600); font-weight: 600; }
.barrier-excluded { color: var(--rose-500); font-weight: 500; }
.barrier-details { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.barrier-detail-item {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--text-soft);
  background: var(--amber-50); border: 1px solid var(--amber-400);
  border-radius: var(--radius-sm); padding: 2px 6px; width: fit-content;
}
@media (max-width: 768px) {
  .barrier-count-info { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .barrier-detail-item { font-size: 10px; }
}
