/* Both information views share one native modal, toolbar and scroll owner. */
#info-dialog {
  width: min(704px, calc(100% - 40px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  height: min(568px, calc(100dvh - 48px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 96px #0006;
}
#info-dialog[open] { display: flex; flex-direction: column; animation: info-open 280ms var(--ease-out) both; }
#info-dialog::backdrop { background: #080911ba; backdrop-filter: blur(6px); }
#info-dialog[open]::backdrop { animation: info-backdrop 200ms both; }
.info-header { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px 0 32px; }
.info-tabs { display: flex; align-self: stretch; gap: 24px; }
.info-tabs button { position: relative; min-height: 44px; padding: 8px 0; background: none; color: var(--subtle); font-size: 14px; font-weight: 500; transition: color 160ms; }
.info-tabs button::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; border-radius: 2px; background: var(--lavender); content: ''; transform: scaleX(0); transition: transform 220ms var(--ease-out); }
.info-tabs button[aria-selected=true] { color: var(--text); }
.info-tabs button[aria-selected=true]::after { transform: scaleX(1); }
.info-tabs button:hover { color: var(--white); }
.info-tabs button:active { color: var(--lavender); }
.info-close { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; background: none; color: var(--muted); border-radius: 50%; }
.info-close::before { position: absolute; inset: 4px; border: 1px solid var(--line); border-radius: inherit; background: #ffffff03; content: ''; transition: background 160ms, border-color 160ms; }
.info-close svg { position: relative; width: 16px; height: 16px; }
.info-close:hover { color: var(--white); }
.info-close:hover::before { background: #ffffff0b; border-color: #ffffff30; }
.info-close:active::before { background: #ffffff14; }
.info-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; scroll-padding: 24px; }
.info-panel { padding: 30px 32px 12px; animation: info-content-in 260ms var(--ease-out) both; }
#info-dialog h2 { margin: 0; font-family: var(--font-body); font-size: 30px; font-weight: 500; line-height: 1.2; letter-spacing: -.035em; }
.info-lead { margin: 14px 0 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.capital-flow { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 32px 0 24px; padding: 0; list-style: none; }
.capital-flow::before { position: absolute; top: 32px; right: 15%; left: 15%; height: 1px; background: linear-gradient(90deg, var(--line), var(--lavender), var(--line)); opacity: .45; content: ''; transform-origin: left; animation: capital-path 600ms var(--ease-out) both; }
.capital-flow li { position: relative; min-width: 0; text-align: center; animation: info-node-in 400ms var(--ease-out) both; }
.capital-flow li:nth-child(2) { animation-delay: 60ms; }
.capital-flow li:nth-child(3) { animation-delay: 120ms; }
.flow-symbol { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); }
.flow-symbol svg { width: 38px; height: 38px; stroke-width: 1.2; }
.flow-contribution { color: var(--peach); }
.flow-capital { color: var(--lavender); border-color: #cfb8ff40; box-shadow: 0 0 32px #cfb8ff0b; }
.flow-capital svg { width: 42px; height: 42px; }
.flow-particle { fill: currentColor; }
.flow-development { color: var(--mint); }
.capital-flow h3 { margin: 0 0 7px; font-size: 15px; font-weight: 500; line-height: 1.3; }
.capital-flow p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.info-documents { display: flex; align-items: center; gap: 28px; padding-top: 10px; border-top: 1px solid var(--line); }
.info-documents a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--muted); font-size: 13px; transition: color 160ms; }
.info-documents a:hover { color: var(--white); }
.info-documents a:active { color: var(--lavender); }
.info-documents svg { width: 15px; height: 15px; }
.info-footer { flex: none; display: flex; justify-content: flex-end; padding: 16px 32px 24px; }
.info-action { display: flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 48px; min-width: 228px; padding: 12px 18px; border-radius: 14px; background: var(--white); color: var(--on-white); font-size: 14px; font-weight: 500; transition: background 160ms, transform 160ms var(--ease-out); }
.info-action:hover { background: var(--lavender); }
.info-action:active { transform: scale(.985); }
.info-action .navigation-arrow { width: 22px; height: 22px; }
.info-close svg, .info-documents svg, .flow-symbol svg, .patron-retry svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.patron-empty { display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 264px; padding: 18px 12px 16px; }
#donors-panel { display: flex; flex-direction: column; min-height: 100%; }
#donors-panel .patron-empty { flex: 1; justify-content: center; }
.patron-emblem { display: grid; place-items: center; width: 180px; height: 120px; margin-bottom: 14px; color: var(--peach); background: radial-gradient(ellipse, #f4c5b710 0, #cfb8ff04 40%, transparent 70%); }
.patron-emblem svg { width: 160px; height: 112px; overflow: visible; }
.patron-orbit { fill: none; stroke: var(--lavender); stroke-width: .7; opacity: .35; }
.patron-orbit-inner { opacity: .15; }
.patron-spark { fill: #f4c5b710; stroke: var(--peach); stroke-width: 1; }
.patron-emblem circle { fill: currentColor; }
.patron-empty h3 { max-width: 24ch; margin: 0; font-size: 24px; font-weight: 400; line-height: 1.25; letter-spacing: -.025em; text-wrap: balance; white-space: pre-line; }
.patron-empty p { max-width: 38ch; margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.patron-retry { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; margin-top: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: none; color: var(--text); font-size: 13px; transition: background 160ms; }
.patron-retry svg { width: 16px; height: 16px; }
.patron-retry:hover { background: #ffffff08; }
.patron-retry:active { background: #ffffff12; }
.patron-retry:disabled { cursor: wait; }
.patron-summary { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; margin: 24px 0 14px; padding: 14px 0; border-block: 1px solid var(--line); }
.patron-summary>span { color: var(--muted); font-size: 13px; }
.patron-summary strong { font-family: var(--font-data); font-size: 23px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.patron-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 15px; }
.patron-table th, .patron-table td { padding: 16px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.patron-table th { color: var(--subtle); font-size: 11px; font-weight: 400; }
.patron-table th:first-child, .patron-table td:first-child { width: 48px; padding-left: 0; }
.patron-table th:last-child, .patron-table td:last-child { width: 144px; padding-right: 0; text-align: right; font-variant-numeric: tabular-nums; }
.patron-table td:nth-child(2) { overflow-wrap: anywhere; line-height: 1.45; }
.patron-table td:last-child { font-weight: 500; overflow-wrap: anywhere; }
.patron-table tbody tr:first-child { background: linear-gradient(90deg, #f4c5b708, transparent); }
.patron-rank { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid transparent; border-radius: 50%; color: var(--subtle); font-size: 12px; font-variant-numeric: tabular-nums; }
.patron-table tr:nth-child(-n+3) .patron-rank { border-color: var(--line); color: var(--lavender); }
.patron-table tr:first-child .patron-rank { border-color: #f4c5b740; background: #f4c5b70a; color: var(--peach); }
.patron-consent { margin: 18px 0 4px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.patron-date { margin: 0; color: var(--subtle); font-size: 11px; line-height: 1.5; }
@keyframes info-open { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes info-backdrop { from { opacity: 0; } to { opacity: 1; } }
@keyframes info-content-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes info-node-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes capital-path { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 760px) {
  #info-dialog { width: calc(100% - 20px); max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px); height: min(584px, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px)); margin: auto; border-radius: 22px; border-bottom: 1px solid var(--line); }
  .info-header { padding: 10px 10px 0 22px; }
  .info-tabs { gap: 22px; }
  .info-tabs button { font-size: 13px; }
  .info-panel { padding: 24px 22px 8px; }
  #info-dialog h2 { font-size: 27px; }
  .info-lead { font-size: 14px; line-height: 1.55; margin-top: 12px; }
  .capital-flow { display: flex; flex-direction: column; gap: 20px; margin: 26px 0 24px; }
  .capital-flow::before { top: 24px; bottom: 24px; right: auto; left: 24px; width: 1px; height: auto; background: linear-gradient(var(--line), var(--lavender), var(--line)); animation: none; }
  .capital-flow li { display: flex; align-items: flex-start; gap: 16px; text-align: left; }
  .flow-symbol { flex: none; width: 48px; height: 48px; margin: 0; }
  .flow-symbol svg, .flow-capital svg { width: 31px; height: 31px; }
  .capital-flow h3 { margin: 1px 0 4px; font-size: 15px; }
  .capital-flow p { max-width: 28ch; font-size: 13px; }
  .info-documents { justify-content: space-between; gap: 12px; padding-top: 6px; }
  .info-documents a { gap: 7px; font-size: 12px; }
  .info-footer { padding: 12px 22px 20px; }
  .info-action { width: 100%; min-width: 0; min-height: 48px; }
  .patron-empty { min-height: 272px; padding-inline: 0; }
  .patron-empty h3 { font-size: 23px; }
  .patron-empty p { font-size: 13px; }
  .patron-summary { margin-top: 20px; }
  .patron-summary strong { font-size: 21px; }
  .patron-table { font-size: 13px; }
  .patron-table th, .patron-table td { padding: 14px 6px; }
  .patron-table th:first-child, .patron-table td:first-child { width: 35px; }
  .patron-table th:last-child, .patron-table td:last-child { width: 100px; }
}
@media (prefers-reduced-motion: reduce) {
  #info-dialog[open], #info-dialog[open]::backdrop, .info-panel, .capital-flow li, .capital-flow::before { animation: none; }
  .info-tabs button::after, .info-action { transition: none; }
}
