/* Muslimi client portal — brand tokens (Muslimi palette), mobile-first, light only. No webfonts are shipped: Avenir when the device has
   it, else the system UI font. */
:root {
  color-scheme: light;
  --blue: #1D41CC; --blue-700: #1733A6; --ink: #292C50; --text: #3A3F5C; --muted: #5C6385;
  --g50: #F5F6FA; --g100: #ECEEF6; --g200: #DBDFEC; --white: #fff;
  --bad: #B3122E; --bad-l: #FDECEF; --good: #00703A; --good-l: #E6F4EC; --warn: #8A4A00; --warn-l: #FFF4E5;
  --r: 14px; --sh: 0 2px 10px rgba(41, 44, 80, .08);
  --font: 'Avenir', 'Avenir Next', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--g50); color: var(--text); font: 16px/1.5 var(--font); }
.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }   /* headings the app focuses for screen readers */

.top { background: var(--white); border-bottom: 1px solid var(--g200); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 60px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }   /* a phone wraps the email under the logo: never against the header's edges */
.logo { display: block; height: 21px; width: auto; }
/* the portal's name and a small Beta pill beside the logo: static markup with a fixed line height, so nothing shifts as the page loads */
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.portal-name { font-size: 15px; line-height: 21px; font-weight: 700; color: var(--ink); white-space: nowrap; padding-left: 10px; border-left: 1px solid var(--g200); }
.beta { flex: none; font-size: 11px; line-height: 16px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); background: var(--g100);
        border-radius: 999px; padding: 0 7px; }
@media (max-width: 359px) { .portal-name { display: none; } }   /* the narrowest phones: the logo and the pill only */
.who { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); min-width: 0; }
.who-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; }

main, main.wrap { padding-top: 24px; padding-bottom: 32px; min-height: 60vh; }   /* main.wrap: .wrap's padding shorthand outranks a bare `main` */
main:focus { outline: none; }
h1 { color: var(--ink); font-size: 26px; line-height: 1.2; margin: 0 0 8px; font-weight: 800; letter-spacing: -.01em; }
h2 { color: var(--ink); font-size: 20px; margin: 0 0 6px; font-weight: 800; }
h3 { color: var(--ink); font-size: 16px; margin: 20px 0 8px; font-weight: 800; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.card { background: var(--white); border-radius: var(--r); box-shadow: var(--sh); padding: 20px; margin: 0 0 16px; }
.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }

label { display: block; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
input[type=email], input[type=text], select {
  width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid var(--g200); border-radius: 10px; background: var(--white); color: var(--ink);
}
input:focus, select:focus { border-color: var(--blue); }
input.code { font-size: 26px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.field { margin: 0 0 14px; }
form + p, .btn + p { margin-top: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

button { font: inherit; cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 0; font-weight: 800;
       background: var(--blue); color: var(--white); width: 100%; }
.btn:hover { background: var(--blue-700); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn.ghost { background: var(--white); color: var(--blue); border: 1.5px solid var(--g200); }
.btn.ghost:hover { border-color: var(--blue); }
.link { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin: 14px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--g200); }
.msg { border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; font-size: 15px; }
.msg.err { background: var(--bad-l); color: var(--bad); }
.msg.info { background: var(--g100); color: var(--ink); }
.msg.warn { background: var(--warn-l); color: var(--warn); }

.orgbar { display: flex; gap: 12px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin: 0 0 16px; }
.orgbar .field { margin: 0; min-width: 220px; flex: 1; max-width: 420px; }
.tabs { display: flex; gap: 6px; margin: 0 0 16px; border-bottom: 1px solid var(--g200); overflow-x: auto; }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 12px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.tab[aria-selected=true] { color: var(--blue); border-bottom-color: var(--blue); }

.badge { display: inline-block; font-size: 13px; font-weight: 800; border-radius: 999px; padding: 2px 10px; background: var(--warn-l); color: var(--warn); }

table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-weight: 800; color: var(--ink); padding: 0 0 8px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--g100); vertical-align: top; }
th { text-align: left; font-weight: 700; color: var(--ink); }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.total th, tr.total td { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 800; color: var(--ink); }
/* a payment sent in another currency: what was sent, under its US-dollar amount (Fadeel 2026-10-23) */
.pays .sent { display: block; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pays tr.sent-sub th, .pays tr.sent-sub td { border-top: 0; font-weight: 600; color: var(--muted); }
.neg { color: var(--bad); font-weight: 700; }
.neg-note { display: block; font-size: 12px; font-weight: 700; color: var(--bad); }
.final { margin: 16px 0 24px; background: var(--ink); color: var(--white); border-radius: var(--r); padding: 16px 18px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.final .lbl { font-weight: 800; }
.final .amt { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.final .neg, .final .neg-note { color: #FFC2CD; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroll table { min-width: 560px; }
.grid th:first-child { position: sticky; left: 0; background: var(--white); min-width: 190px; }
/* a phone or a narrow tablet: the All months table becomes one block per line — the line as its title, each month (and the Total) as a
   labelled figure, two to a row — instead of a table that scrolls sideways out of its card */
@media screen and (max-width: 760px) {
  .scroll table.grid, .grid tbody { display: block; width: 100%; min-width: 0; }
  .grid caption { display: block; }
  .grid thead { display: none; }
  .grid tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid var(--g100); }
  .grid th, .grid td { display: block; border: 0; padding: 0; text-align: left; white-space: normal; }
  .grid th:first-child { position: static; min-width: 0; grid-column: 1 / -1; }
  .grid td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
  .grid tr.total { border-top: 2px solid var(--ink); }
  .grid tr.total th, .grid tr.total td { border-top: 0; }
}
.note { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* The richer statement (client-statement/2; the approved mockup): ROI headline, month in review, highlight tiles, how it was raised, the
   breakdowns as bars. Widths are set through the CSSOM (style-src 'self': no style attributes). */
.hero { background: linear-gradient(135deg, var(--blue) 0%, var(--ink) 100%); color: var(--white); border-radius: var(--r); padding: 24px; margin: 0 0 16px; }
.hero .kicker { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.hero .big { font-size: 48px; font-weight: 800; line-height: 1.05; margin: 6px 0 8px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero p { margin: 0 0 6px; color: var(--white); }
.hero .sub { font-size: 14px; opacity: .9; }
.story { font-size: 16px; line-height: 1.6; color: var(--text); margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.tile { background: var(--white); border-radius: var(--r); box-shadow: var(--sh); padding: 16px; min-width: 0; }
.tile .k { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tile .v { font-size: 24px; font-weight: 800; color: var(--ink); margin-top: 4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile .s { font-size: 13px; color: var(--muted); }
.bars { list-style: none; margin: 0; padding: 0; }
.bars li { margin: 0 0 12px; }
.bars .row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.bars .row .n { color: var(--ink); font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.bars .row .a { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text); }
.bars .track { height: 8px; background: var(--g100); border-radius: 999px; margin-top: 6px; overflow: hidden; }
.bars .fill { height: 100%; background: var(--blue); border-radius: 999px; }
.split { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin: 8px 0 10px; background: var(--g100); }
.split .p { background: var(--blue); } .split .o { background: #48C0D8; } .split .d { background: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; }
.legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--blue); }
.legend span.o::before { background: #48C0D8; } .legend span.d::before { background: var(--ink); }
.two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; }
.notes { margin: 0 0 16px; }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } .two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero .big { font-size: 56px; } }

/* The fee worksheet, "How your fees were calculated" (client-statement/2 fee_breakdown; the approved fee mockup): each bucket as a short
   worksheet — raised, less what raised it, net, the fee at the agreement's rate — then the total; the rules that applied as chips. */
.fee { border-top: 4px solid var(--blue); }
.fee .lead { max-width: 68ch; }
.fee .lead strong { color: var(--ink); }
.sheet { border: 1px solid var(--g200); border-radius: 10px; overflow: hidden; margin: 0 0 4px; }
.sheet + .sheet { margin-top: 12px; }
.sheet .ln { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 14px; border-top: 1px solid var(--g100); }
.sheet .ln:first-child { border-top: 0; }
.sheet .lbl { min-width: 0; color: var(--text); overflow-wrap: anywhere; }
.sheet .math { display: block; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sheet .amt { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text); }
.sheet .ln.sub { background: var(--g50); } .sheet .ln.sub .lbl, .sheet .ln.sub .amt { font-weight: 700; color: var(--ink); }
.sheet .ln.result .lbl, .sheet .ln.result .amt { font-weight: 800; color: var(--blue); }
.sheet .ln.total { background: var(--ink); } .sheet .ln.total .lbl, .sheet .ln.total .amt { color: var(--white); font-weight: 800; font-size: 17px; }
.sheet .ln.total .math { color: #C9CDE6; }
.foot-note { font-size: 14px; color: var(--muted); margin: 12px 0 0; max-width: 72ch; }
.applied { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 10px; }
.applied li { display: flex; gap: 10px; align-items: baseline; font-size: 15px; }
.applied li > span:last-child { min-width: 0; }
.chip { flex: none; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; border-radius: 999px; padding: 3px 9px; }
.chip.late { background: var(--warn-l); color: var(--warn); }
@media (max-width: 420px) {
  .applied li { flex-direction: column; gap: 4px; }
  .sheet .ln { padding: 10px 12px; gap: 10px; }
}

/* The portfolio layout (plan portal-portfolio-redesign-plan.md v3, Release 1). Every width through the CSSOM or this sheet (CSP: no style
   attributes); SVG charts styled here by class. */
:root { --teal: #0E9F8E; --amber: #E2A300; --blue-100: #E8ECFB; --bar-i: #B8C3F0; }
#orghead .orgbar { margin: 0 0 4px; align-items: center; }
#orghead h1 { margin: 0; }
.acct-sub { color: var(--muted); font-size: 14px; margin: 2px 0 0; width: 100%; }
#orghead .acct-sub:empty { display: none; }
/* the period control: ‹ [📅 All statements · Feb – Sep 2026 ▾] › */
#period { position: relative; margin: 6px 0 14px; }
.pctl { display: flex; align-items: stretch; gap: 6px; max-width: 520px; }
.pstep { flex: none; width: 40px; min-height: 42px; border: 1.5px solid var(--g200); background: var(--white); border-radius: 10px; color: var(--ink); font-size: 18px; font-weight: 800; }
.pstep:disabled { opacity: .35; cursor: default; }
.ptrig { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 42px; border: 1.5px solid var(--g200); background: var(--white); border-radius: 10px;
         padding: 0 12px; font-weight: 800; color: var(--ink); text-align: left; }
.ptrig:hover, .ptrig[aria-expanded="true"] { border-color: var(--blue); }
.ptrig .plabel { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .ptrig .plabel { white-space: normal; line-height: 1.25; padding: 6px 0; } }   /* a phone: the label wraps, never cut */
.ptrig .car { color: var(--muted); font-size: 12px; }
/* the dialog: over a veil — near the top of the screen on wide screens (fixed, so it always fits the viewport and scrolls inside), a bottom
   sheet on phones */
.pveil { position: fixed; inset: 0; background: rgba(41, 44, 80, .25); z-index: 30; }
.pdialog { position: fixed; left: 50%; top: 24px; transform: translateX(-50%); z-index: 31; width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
           overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; background: var(--white); border-radius: 16px; box-shadow: 0 18px 48px rgba(41, 44, 80, .24); }
.phead { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px 6px; }
.phead h2 { font-size: 17px; margin: 0; }
.pbody { display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.psc { border-right: 1px solid var(--g100); padding: 6px 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.psc h3, .pgr h3 { margin: 6px 8px 6px; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.qp { display: flex; justify-content: space-between; gap: 10px; text-align: left; border: 0; background: none; border-radius: 9px; padding: 9px 10px; font-weight: 700; color: var(--ink); }
.qp small { color: var(--muted); font-weight: 500; font-size: 13px; text-align: right; }
.qp:hover { background: var(--g50); } .qp.on { background: var(--blue-100); color: var(--blue); }
.pgr { padding: 6px 14px 12px; }
.pyear h3 { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); margin: 8px 0 6px; }
.pgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pcell { border: 1.5px solid var(--g200); background: var(--white); border-radius: 9px; padding: 8px 0; font-weight: 800; color: var(--ink); }
.pcell:disabled { opacity: .3; cursor: default; }
.pcell.in { background: var(--blue-100); border-color: var(--bar-i); color: var(--blue); }
.pcell.end { background: var(--blue); border-color: var(--blue); color: var(--white); }
.pft { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px 14px; border-top: 1px solid var(--g100); }
.pft p { margin: 0; } .pft .btn { width: auto; min-height: 40px; }
@media (max-width: 640px) {
  .pdialog { position: fixed; left: 0; right: 0; bottom: 0; top: auto; transform: none; width: 100%; border-radius: 18px 18px 0 0; max-height: 86vh; overflow-y: auto; }
  .pbody { grid-template-columns: minmax(0, 1fr); } .psc { border-right: 0; border-bottom: 1px solid var(--g100); }
  .pft { flex-direction: column; align-items: stretch; } .pft .btn { width: 100%; }
}
/* the section bar stays at the top while scrolling */
.tabs { position: sticky; top: 0; z-index: 20; background: var(--g50); }
[role=tabpanel] h2[id], .card h2 { scroll-margin-top: 64px; }
/* the Overview: the hero (raised + growth), the key figures, Insights, charts, breakdowns */
.hero2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.hero2 .k { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.hero2 .big { font-size: 40px; font-weight: 800; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; margin: 4px 0; overflow-wrap: anywhere; }
.hero2 .big .cur { font-size: 16px; color: var(--muted); }
.hero2 .cover { color: var(--ink); font-weight: 700; margin: 0 0 6px; }
.tile .cur { font-size: 14px; font-weight: 700; color: var(--muted); }
.tile.accent { background: var(--ink); } .tile.accent .k, .tile.accent .s { color: #C9CDF2; } .tile.accent .v { color: var(--white); }
.tile.owed .v { color: var(--bad); }
.tile.lead .v { font-size: 28px; }
.kpis .tile .v { font-size: 22px; }
.chart { display: block; width: 100%; height: auto; }
.chart .bar-m { fill: var(--g200); } .chart .area { fill: var(--blue); fill-opacity: .14; } .chart .line { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--blue); stroke: var(--white); stroke-width: 2; }
.chart .tick { fill: var(--muted); font-size: 11px; }
.chart .bar-r { fill: var(--blue); } .chart .bar-i { fill: var(--bar-i); }
.chart .mult { fill: var(--ink); font-size: 11px; font-weight: 800; } .chart .mult.low { fill: var(--bad); }
@media (max-width: 640px) { .chart .tick, .chart .mult { font-size: 19px; } }   /* the chart scales down on a phone: its labels stay readable */
.legend .lg-r::before { background: var(--blue); } .legend .lg-i::before { background: var(--bar-i); }
.legend span:last-child:not(.lg-r):not(.lg-i)::before { display: none; }
details.figs { margin: 10px 0 0; }
details.figs summary { cursor: pointer; color: var(--blue); font-weight: 700; font-size: 14px; }
details.figs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
details.figs table { margin-top: 8px; font-size: 14px; }
details.figs th, details.figs td { padding: 6px; }
details.figs thead th { white-space: normal; vertical-align: bottom; }   /* a long header ("Marketing invested (USD)") wraps, never cut */
/* a phone: the figures reflow into one block per month — the month as its title, each figure under its own label — never a table that
   scrolls sideways inside its card */
@media screen and (max-width: 480px) {
  details.figs table, details.figs tbody { display: block; width: 100%; }
  details.figs thead { display: none; }
  details.figs tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid var(--g100); }
  details.figs th, details.figs td { display: block; border: 0; padding: 0; text-align: left; white-space: normal; }
  details.figs tbody th { grid-column: 1 / -1; }
  details.figs td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
}
.donut-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.donut { flex: none; }
.donut .seg-p { fill: var(--teal); } .donut .seg-o { fill: var(--blue); } .donut .seg-d { fill: var(--amber); }
.legend-list { list-style: none; margin: 0; padding: 0; flex: 1 1 200px; min-width: 0; }
.legend-list li { padding: 6px 0; border-bottom: 1px solid var(--g100); font-size: 15px; color: var(--ink); }
.legend-list li::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
.legend-list li.seg-p::before { background: var(--teal); } .legend-list li.seg-o::before { background: var(--blue); } .legend-list li.seg-d::before { background: var(--amber); }
.insights { list-style: none; margin: 4px 0 0; padding: 0; }
.ins { display: flex; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--g100); color: var(--ink); font-size: 15px; }
.ins:last-child { border-bottom: 0; }
.ins .cat { flex: none; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; border-radius: 6px; padding: 3px 7px; }
.cat.good { background: var(--good-l); color: var(--good); } .cat.info { background: var(--blue-100); color: var(--blue); } .cat.watch { background: var(--warn-l); color: var(--warn); }
/* the Statements tab: a table on wide screens, stacked rows (each value labelled) on phones */
.hold .mlink { text-align: left; text-decoration: none; display: block; }
.hold .mlink strong { display: block; color: var(--ink); font-size: 16px; }
.hold .mlink:hover strong { color: var(--blue); }
.hold td.mth .badge { margin-left: 8px; }
.hold tr.off td { color: var(--muted); }
.pill { display: inline-block; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 2px 8px; background: var(--good-l); color: var(--good); }
.pill.low { background: var(--bad-l); color: var(--bad); }
details.compare summary, details.issued summary { cursor: pointer; font-weight: 800; color: var(--ink); }
details.compare[open] summary, details.issued[open] summary { margin-bottom: 10px; }
@media (max-width: 640px) {
  .scroll table.hold { min-width: 0; }
  .hold thead { display: none; }
  .hold tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--g100); }
  .hold td, .hold th { border: 0; padding: 2px 0; text-align: left; }
  .hold td.mth, .hold tfoot th { grid-column: 1 / -1; }
  .hold td.num::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
  .hold tfoot tr { border-top: 2px solid var(--ink); }
  .hold tr.total th, .hold tr.total td { border-top: 0; }
}
/* the Overview's "Your account" card (the payment notice's account — one rule, lib/client_account.mjs) */
.account table.acct { margin: 6px 0 2px; }
.account .acct th, .account .acct td { padding: 10px 0; }
.account .acct td { padding-left: 12px; }
.account .acct tr.bal th, .account .acct tr.bal td { font-weight: 800; font-size: 17px; border-bottom: 0; border-top: 2px solid var(--ink); }
.account .acct tr.fully_paid td { color: var(--good); }
.account .acct tr.owed_to_muslimi td { color: var(--bad); white-space: normal; }
.account .acct tr.owed_to_client td { white-space: normal; }
/* "Muslimi boosts & matching included in your payouts": information inside the payouts above it — muted, indented, never a total */
.account .acct tr.part th, .account .acct tr.part td { color: var(--muted); font-size: 14px; font-weight: 400; padding-top: 4px; }
.account .acct tr.part th { padding-left: 14px; white-space: normal; }
@media (max-width: 480px) {   /* a phone: label and amount on one line; the balance's wording under its label, never squeezed beside it */
  .account table.acct, .account .acct tbody { display: block; }
  .account .acct tr { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--g100); }
  .account .acct th, .account .acct td { border: 0; white-space: nowrap; }
  .account .acct th { white-space: normal; flex: 1 1 auto; min-width: 0; }   /* "…, including Muslimi gifts": the label wraps, the amount never */
  .account .acct td { flex: 0 0 auto; }
  .account .acct tr.bal { display: block; border-bottom: 0; border-top: 2px solid var(--ink); padding-top: 8px; }
  .account .acct tr.bal th, .account .acct tr.bal td { display: block; border: 0; text-align: left; padding: 2px 0; white-space: normal; }
}
/* the Payments tab's "Total sent to you" breakdown: its labels are sentences — they wrap beside the amount (never past the screen) */
.account.sent .acct th { white-space: normal; text-align: left; }
.account.sent .acct tr.sub th, .account.sent .acct tr.sub td { font-weight: 800; border-top: 1px solid var(--g200); }   /* "Paid to you" = the card's */
@media (max-width: 480px) {
  .account.sent .acct th { white-space: normal; flex: 1 1 auto; min-width: 0; }
  .account.sent .acct td { flex: 0 0 auto; }
}
/* the Payments list: a table on wide screens, stacked rows on phones (each value labelled) — the months a payment covers always in view */
@media (max-width: 640px) {
  .scroll table.pays { min-width: 0; }
  .pays thead { display: none; }
  .pays tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--g100); }
  .pays td, .pays th { border: 0; padding: 2px 0; text-align: left; }
  .pays td.pdate, .pays tfoot th { grid-column: 1 / -1; font-weight: 800; color: var(--ink); }
  .pays td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
  .pays tfoot tr { border-top: 2px solid var(--ink); }
  .pays tfoot tr.sent-sub { border-top: 0; }
  .pays tr.total th, .pays tr.total td { border-top: 0; }
}
/* a statement: the step-by-step payout */
.wf th, .wf td { padding: 9px 6px; }
.wf td.op { width: 22px; color: var(--muted); font-weight: 800; text-align: center; }
.wf .hint { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.wf tr.sub th, .wf tr.sub td { background: var(--g50); font-weight: 800; color: var(--ink); }
.wf tr.info th, .wf tr.info td { color: var(--muted); font-weight: 400; }   /* shown, never added up (advertising the client paid itself) */
.wf tr.fin th, .wf tr.fin td { background: var(--ink); color: var(--white); font-weight: 800; font-size: 17px; border: 0; }
.wf tr.fin.neg th, .wf tr.fin.neg td { background: var(--bad); }
.wf tr.fin .hint { color: #FFD9DF; }
@media (min-width: 760px) {
  .hero2 { grid-template-columns: 300px minmax(0, 1fr); align-items: center; }
  .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.foot { color: var(--muted); font-size: 14px; padding-bottom: 32px; }

/* Phones: the four tabs share the row; where the device's font is wider than Avenir (Android, Linux) the last ones wrap onto a second row
   — never a tab off the screen, never a word broken mid-way (a one-column grid pushed "Agreement" 26px past a 375px screen). */
@media (max-width: 420px) {
  .tabs { display: flex; flex-wrap: wrap; gap: 0; overflow-x: visible; }
  .tab { flex: 1 1 auto; white-space: nowrap; padding: 10px 6px; font-size: 15px; line-height: 1.25; text-align: center; }
}

@media (min-width: 640px) {
  .btn { width: auto; }
  .card { padding: 28px; }
  h1 { font-size: 30px; }
}

/* ---- Print / Save as PDF (Release 2): the statement only, complete, with its attribution on every printed page ---- */
.stmt-acts { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stmt-acts p { margin: 0; }
.print-btn { width: auto; min-height: 40px; }
.print-head { display: none; }
/* Release 2 (client-statement/3): the agreement terms, recurring giving by frequency, Daily on its own */
.terms h3 { margin: 18px 0 6px; }
.kv { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 8px 16px; margin: 0 0 4px; }
.kv dt { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.kv dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.kv dd .hint { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
@media (max-width: 560px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kv dd { margin-bottom: 10px; } }
.freqs { list-style: none; margin: 0; padding: 0; }
.freqs li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--g100); font-size: 15px; }
.freqs li:last-child { border-bottom: 0; }
.freqs .n { color: var(--ink); font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.freqs .a { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.rec .daily { margin: 12px 0 0; font-size: 15px; color: var(--text); }
.rec h3 { margin: 18px 0 6px; }
/* Your donor data (plan portal-donor-data-plan.md §7.2): the delivered months; a replaced version's note under its date; the folder link */
.donor-list { margin-bottom: 16px; }   /* the folder link (or the note) never sits flush on the last row */
.donor-list .hint { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.donor a { color: var(--blue); font-weight: 700; text-underline-offset: 3px; overflow-wrap: anywhere; }

@media print {
  @page { margin: 16mm 14mm 14mm; }
  body { background: #fff; }
  header.top, .tabs, #period, .stmt-acts, footer, .figs > summary, details > summary::marker { display: none !important; }
  #orghead { display: none !important; }
  /* once, at the top of the statement (a fixed header repeated on every page overlapped a card that starts a page) */
  .print-head { display: block; margin: 0 0 8px; font-size: 11px; color: #555; }
  main.wrap { padding-top: 0; max-width: none; }
  .card, .tile, .steps, details.issued, .fee { break-inside: avoid; box-shadow: none !important; border: 1px solid #ddd; }
  a { color: inherit; text-decoration: none; }
}
