/* GIVING portal (prototype). Follows the GIVING Design System (brand-book theme)
   and "Giving portal — screens v0.1" (18 Nov): InitiativeDesktop / Account, RequestDesktop / Request, TeamQueue, Home. */
:root {
  --giving-purple: #662482; --purple-deep: #5a1f76; --purple-mid: #7c3da1; --purple-light: #c4a0d8;
  --giving-berry: #a2195b; --giving-pink: #da3b8d; --blush: #f3d6e8;
  --ink: #1a1a1a; --ink-2: #4a4a4a; --line: #e8e0ee; --line-soft: #f0eaf4; --lavender: #f3edf8; --page: #faf8fc;
  --shadow-1: 0 1px 2px rgba(26,26,26,.06), 0 1px 1px rgba(26,26,26,.04);
  --shadow-2: 0 4px 16px rgba(102,36,130,.10), 0 1px 2px rgba(26,26,26,.06);
  --shadow-3: 0 16px 40px rgba(102,36,130,.18), 0 2px 6px rgba(26,26,26,.08);
  --shadow-purple: 0 8px 24px rgba(102,36,130,.30);
  --r-sm: 8px; --r-md: 12px; --r-card: 14px; --r-lg: 20px; --r-pill: 999px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --st1-bg: #e6effa; --st1-fg: #1f4e8c;
  --st4-bg: #f3edf8; --st4-fg: #662482;
  --st6-bg: #fdf1dc; --st6-fg: #5c3a00;
  --st7-bg: #e3f3e8; --st7-fg: #1f6b3a;
  --stx-bg: #eeeeee; --stx-fg: #4a4a4a;
  --warn-bg: #fff4dc; --warn-fg: #7a4b00;
  --font-he: 'Heebo', 'Assistant', system-ui, sans-serif;
  --font-en: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --header-h: 68px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font-family: var(--font-he); font-size: 16px; line-height: 1.55; }
html[lang="en"] body { font-family: var(--font-en); }
a { color: var(--giving-purple); }
a:hover { color: var(--giving-berry); }
button { font: inherit; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.num { direction: ltr; unicode-bidi: isolate; font-family: var(--font-en); font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--ink-2); font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid rgba(102,36,130,.35); outline-offset: 2px; border-radius: 6px; }

/* ---------- top header: logo, prototype mark, actions ---------- */
.topbar { position: sticky; top: 0; z-index: 20; height: var(--header-h); background: rgba(255,255,255,.94); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow-1); display: flex; align-items: center; gap: 16px; padding: 0 24px; }
.topbar .brand { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }
.topbar .brand img { height: 44px; width: auto; display: block; }
.topbar .brand .divider { width: 1px; height: 32px; background: var(--line); }
.topbar .brand .product { display: flex; flex-direction: column; line-height: 1.2; color: var(--ink); }
.topbar .brand .product b { font-size: 15px; font-weight: 700; color: var(--giving-purple); }
.topbar .brand .product span { font-size: 12px; color: var(--ink-2); }
.proto { font-size: 12px; font-weight: 700; color: var(--warn-fg); background: var(--warn-bg); border: 1px solid #f0d9a0; border-radius: var(--r-pill); padding: 2px 10px; white-space: nowrap; }
.topbar .tools { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.iconbtn { position: relative; width: 40px; height: 40px; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: #fff; color: var(--giving-purple);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color .14s var(--ease), background .14s var(--ease); }
.iconbtn:hover { border-color: var(--giving-purple); background: var(--lavender); }
.iconbtn[aria-disabled="true"] { color: #9a8fa3; }
.textbtn { height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: #fff; color: var(--giving-purple); font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.textbtn:hover { border-color: var(--giving-purple); }
.avatar { width: 40px; height: 40px; border-radius: var(--r-pill); background: var(--giving-purple); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-en); font-size: 14px; border: 0; cursor: pointer; }
.menu { position: fixed; top: calc(var(--header-h) - 6px); inset-inline-end: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-3); min-width: 220px; padding: 8px; z-index: 30; }
.menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.menu .who b { display: block; font-size: 14px; }
.menu .who span { font-size: 12px; color: var(--ink-2); }
.menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border: 0; background: none; border-radius: var(--r-sm); cursor: pointer; color: var(--ink); text-align: start; font-size: 14px; }
.menu button:hover { background: var(--lavender); }

/* ---------- shell: side navigation with icons and dormant items ---------- */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); }
.side { background: #fff; border-inline-end: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; }
.side .group { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a7f93; padding: 14px 12px 6px; }
html[lang="he"] .side .group { letter-spacing: 0; text-transform: none; font-size: 12px; }
.navitem { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 15px; background: none; border: 0; width: 100%; cursor: pointer; text-align: start; transition: background .14s var(--ease); }
.navitem:hover { background: var(--page); color: var(--ink); }
.navitem[aria-current="page"] { background: var(--lavender); color: var(--giving-purple); font-weight: 700; }
.navitem[aria-current="page"] svg.i { stroke: var(--giving-purple); }
.navitem.dormant { color: #8a7f93; cursor: not-allowed; }
.navitem.dormant:hover { background: none; color: #8a7f93; }
.soon { margin-inline-start: auto; font-size: 11px; font-weight: 700; color: var(--giving-purple); background: var(--lavender); border-radius: var(--r-pill); padding: 1px 8px; white-space: nowrap; }
.side .foot { margin-top: auto; padding: 14px 12px 4px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); line-height: 1.5; }

/* ---------- page hero banner ---------- */
main.page { min-width: 0; }
.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--giving-purple) 0%, var(--purple-mid) 62%, #8e4fb3 100%); color: #fff; padding: 28px 32px 64px; }
.hero::after { content: ""; position: absolute; inset-inline-end: -60px; top: -70px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16) 2px, transparent 2.5px) 0 0 / 18px 18px; opacity: .55; pointer-events: none;
  -webkit-mask: radial-gradient(circle, #000 55%, transparent 72%); mask: radial-gradient(circle, #000 55%, transparent 72%); }
.hero .crumbs { font-size: 13px; color: var(--blush); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.hero .crumbs a { color: #fff; text-decoration: none; opacity: .92; }
.hero .crumbs a:hover { text-decoration: underline; color: #fff; }
.hero .row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; position: relative; z-index: 1; }
.hero h1 { margin: 0; font-size: 30px; font-weight: 700; line-height: 1.2; }
.hero .sub { color: var(--blush); font-size: 14px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hero .chip { background: rgba(255,255,255,.16); color: #fff; }
.hero .actions .btn { border-color: rgba(255,255,255,.7); color: #fff; background: transparent; }
.hero .actions .btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.hero .actions .btn.primary { background: #fff; color: var(--giving-purple); border-color: #fff; }
.hero .actions .btn.dormant, .hero .actions .btn.primary.dormant { opacity: .85; }
.body { padding: 0 32px 40px; margin-top: -40px; position: relative; z-index: 2; display: flex; flex-direction: column; gap: 24px; max-width: 1240px; }
.body.flat { margin-top: 24px; }
html[dir="rtl"] svg.flip { transform: scaleX(-1); }
.hero .crumbs svg.i { width: 14px; height: 14px; opacity: .7; }
.btn svg.i, .textbtn svg.i, .pills svg.i { width: 18px; height: 18px; }
.notice.strip { border-radius: 0; border-width: 0 0 1px; padding: 8px 32px; }
.notice svg.i { width: 18px; height: 18px; }
.menu button svg.i, .menu button .soon { flex: none; }
.menu button[aria-disabled="true"] { color: #8a7f93; }
.kpi .label svg.i { width: 16px; height: 16px; }
.notice { font-size: 13px; color: var(--warn-fg); background: var(--warn-bg); border: 1px solid #f0d9a0; border-radius: var(--r-md); padding: 10px 14px; display: flex; gap: 8px; align-items: center; }

/* ---------- controls ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1.5px solid var(--giving-purple); background: #fff; color: var(--giving-purple); transition: transform .14s var(--ease), background .14s var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--giving-purple); color: #fff; box-shadow: var(--shadow-purple); }
.btn.primary:hover { background: var(--purple-deep); color: #fff; }
.btn.small { min-height: 36px; font-size: 14px; padding: 0 14px; }
.btn.dormant { cursor: not-allowed; transform: none; }
.btn.dormant .soon { margin-inline-start: 4px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills button { min-height: 38px; padding: 0 14px; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); font-size: 14px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.pills button[aria-pressed="true"] { border-color: var(--giving-purple); background: var(--giving-purple); color: #fff; font-weight: 600; }
.pills button .n { font-family: var(--font-en); font-size: 12px; opacity: .85; }
.search { position: relative; flex: 1 1 240px; display: block; }
.card > .search { flex: none; }
.trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.trio .attention { max-height: 330px; overflow-y: auto; }
table.list td:first-child { white-space: nowrap; }
.acc .top { flex-wrap: wrap; }
.acc .top .chip { margin-inline-start: auto; }
.search svg.i { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: #8a7f93; width: 18px; height: 18px; }
.search input { width: 100%; min-height: 44px; border: 1.5px solid var(--line); border-radius: var(--r-pill); padding-inline: 42px 16px; font: inherit; font-size: 15px; background: #fff; }
.search input:focus { outline: none; border-color: var(--giving-purple); box-shadow: 0 0 0 3px rgba(102,36,130,.13); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
select.sort { min-height: 40px; border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 0 14px; font: inherit; font-size: 14px; background: #fff; color: var(--ink); }

/* ---------- cards ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; box-shadow: var(--shadow-1); }
.card h2 { margin: 0; font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card h2 svg.i { color: var(--giving-purple); }
.cardhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr)); gap: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-2); }
.kpi .label { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 22px; font-weight: 700; }
.kpi .sub { font-size: 12px; color: var(--ink-2); }
.kpi.main { background: linear-gradient(160deg, var(--purple-deep), var(--giving-purple)); color: #fff; border-color: transparent; box-shadow: var(--shadow-purple); }
.kpi.main .label, .kpi.main .sub { color: #fff; opacity: .92; }
.kpi.main .value { font-size: 30px; }
.flags { display: flex; gap: 6px; flex-wrap: wrap; }
.flag { font-size: 12px; font-weight: 600; color: var(--warn-fg); background: var(--warn-bg); border-radius: var(--r-pill); padding: 2px 10px; }
.kpi.main .flag { background: rgba(255,255,255,.18); color: #fff; }
details.parts summary { cursor: pointer; color: var(--giving-purple); font-size: 14px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 6px; }
details.parts summary::-webkit-details-marker { display: none; }
details.parts[open] summary svg.i { transform: rotate(90deg); }
html[dir="rtl"] details.parts summary svg.i { transform: scaleX(-1); }
html[dir="rtl"] details.parts[open] summary svg.i { transform: rotate(90deg); }
details.parts table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
details.parts td { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
details.parts td:last-child { text-align: end; }
.cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.colstack { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat { background: #fff; border-radius: var(--r-card); padding: 16px 18px; box-shadow: var(--shadow-2); border: 1px solid var(--line); }
.stat .v { font-size: 24px; font-weight: 700; font-family: var(--font-en); }
.stat .l { font-size: 13px; color: var(--ink-2); }

.acclist { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.acc { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--ink); background: #fff; border-radius: var(--r-md); padding: 18px; box-shadow: var(--shadow-2); border: 1px solid transparent; transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s; }
.acc:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); border-color: var(--line); color: var(--ink); }
.acc .top { display: flex; gap: 12px; align-items: flex-start; }
.mono { width: 40px; height: 40px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--lavender); color: var(--giving-purple); font-weight: 700; font-size: 15px; }
.acc .name { font-size: 16px; font-weight: 700; line-height: 1.3; }
.acc .row { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.acc .bal { font-size: 22px; font-weight: 700; }
.chip { font-size: 12px; font-weight: 600; color: var(--giving-purple); background: var(--lavender); border-radius: var(--r-pill); padding: 3px 10px; white-space: nowrap; }
.chip.open { background: var(--st1-bg); color: var(--st1-fg); }

/* ---------- tables in a scrolling frame, loaded in batches ---------- */
.frame { max-height: 520px; overflow: auto; border: 1px solid var(--line-soft); border-radius: var(--r-md); overscroll-behavior: contain; }
table.list { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; min-width: 560px; }
table.list thead th { position: sticky; top: 0; z-index: 1; background: #fbf9fd; text-align: start; color: var(--ink-2); font-size: 12.5px; font-weight: 600; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 11px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.list td.amt, table.list th.amt { text-align: end; }
table.list tbody tr:nth-child(even) td { background: #fdfcfe; }
table.list tr.go { cursor: pointer; }
table.list tr.go:hover td { background: var(--lavender); }
.framefoot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.sentinel td { text-align: center; color: var(--ink-2); padding: 14px; }
.pos { color: #1f6b3a; }
.neg { color: var(--giving-berry); }
.anon { color: var(--ink-2); font-style: italic; }

/* skeletons while loading */
.skel { display: flex; flex-direction: column; gap: 10px; }
.skel i { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, #f1ecf5 25%, #e7dfee 37%, #f1ecf5 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.skel i:nth-child(2) { width: 85%; } .skel i:nth-child(3) { width: 70%; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .skel i { animation: none; } .acc, .btn { transition: none; } }

/* ---------- status pills ---------- */
.st { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-pill); padding: 3px 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.st-1 { background: var(--st1-bg); color: var(--st1-fg); }
.st-4 { background: var(--st4-bg); color: var(--st4-fg); }
.st-6 { background: var(--st6-bg); color: var(--st6-fg); }
.st-7 { background: var(--st7-bg); color: var(--st7-fg); }
.st-x, .st-q { background: var(--stx-bg); color: var(--stx-fg); }

/* ---------- attention panel ---------- */
.attention { background: var(--st6-bg); border-radius: var(--r-card); padding: 20px; display: flex; flex-direction: column; gap: 10px; border: 1px solid #f2dfb8; }
.attention h2 { margin: 0; font-size: 17px; font-weight: 700; color: var(--st6-fg); display: flex; align-items: center; gap: 8px; }
.attention a { display: flex; justify-content: space-between; gap: 8px; background: #fff; border-radius: 10px; padding: 12px 14px; text-decoration: none; color: var(--ink); font-size: 14px; box-shadow: var(--shadow-1); }
.attention a span:last-child { color: var(--giving-purple); font-weight: 600; white-space: nowrap; }

/* ---------- request ---------- */
.amountcard { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.amountcard .big { font-size: 32px; font-weight: 700; }
ol.path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
ol.path li { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
ol.path li .bar { height: 6px; border-radius: var(--r-pill); background: var(--line); }
ol.path li.done .bar { background: var(--giving-purple); }
ol.path li.now .bar { background: #c98a1a; }
ol.path li.done, ol.path li.now { color: var(--ink); }
ol.path li.future { opacity: .6; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; font-size: 14px; }
.facts div { display: flex; flex-direction: column; gap: 2px; }
.facts span:first-child { color: var(--ink-2); font-size: 13px; }
ul.history { list-style: none; margin: 0; padding: 0; position: relative; }
ul.history li { position: relative; padding: 4px 0 14px; padding-inline-start: 24px; font-size: 14px; }
ul.history li::before { content: ""; position: absolute; inset-inline-start: 5px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--giving-purple); }
ul.history li::after { content: ""; position: absolute; inset-inline-start: 9.5px; top: 22px; bottom: -4px; width: 1px; background: var(--line); }
ul.history li:last-child::after { display: none; }
.thread textarea { width: 100%; min-height: 88px; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; font: inherit; font-size: 15px; background: #fbf9fd; resize: vertical; }
.thread .bubble { align-self: flex-start; max-width: 85%; background: var(--lavender); border-radius: 12px; padding: 10px 14px; font-size: 14px; }

/* ---------- queue ---------- */
.qgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.qcol { background: #fff; border-radius: var(--r-md); display: flex; flex-direction: column; box-shadow: var(--shadow-2); border: 1px solid var(--line); overflow: hidden; }
.qcol header { padding: 14px; border-top: 4px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.qcol.c1 header { border-top-color: var(--st1-fg); } .qcol.c4 header { border-top-color: var(--giving-purple); } .qcol.c6 header { border-top-color: #c98a1a; }
.qcol h2 { margin: 0; display: flex; justify-content: space-between; gap: 8px; font-size: 15px; font-weight: 700; }
.qcol h2 .count { color: var(--giving-purple); font-family: var(--font-en); }
.qlist { max-height: 560px; overflow-y: auto; padding: 0 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.qitem { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); background: #fff; }
.qitem:hover { border-color: var(--giving-purple); color: var(--ink); box-shadow: var(--shadow-1); }
.qitem b { font-size: 14px; }
.qitem span { font-size: 13px; color: var(--ink-2); }
.qitem .age { display: inline-flex; gap: 4px; align-items: center; }
.qitem svg.i { width: 14px; height: 14px; vertical-align: -2px; color: var(--giving-purple); }
details.parts.card { padding: 14px 20px; }
.qitem .old { color: var(--warn-fg); font-weight: 600; }

/* ---------- help, toast, misc ---------- */
.help { background: #fff; border: 1.5px solid var(--giving-purple); border-radius: var(--r-card); padding: 16px 20px; box-shadow: var(--shadow-2); }
.help h3 { margin: 0 0 6px; font-size: 16px; color: var(--giving-purple); }
.help dt { font-weight: 700; margin-top: 8px; font-size: 14px; }
.help dd { margin: 0; font-size: 14px; color: var(--ink-2); }
.err { background: #fdecea; border: 1px solid #f5c2bd; color: #7a1c12; padding: 12px 14px; border-radius: var(--r-md); }
.empty { color: var(--ink-2); font-size: 14px; text-align: center; padding: 18px; }
.toast { position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-md); font-size: 14px; box-shadow: var(--shadow-3); z-index: 50; max-width: min(92vw, 520px); }
html[dir="rtl"] .toast { transform: translateX(50%); }
.viewbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #7a1c12; color: #fff; padding: 8px 32px; font-size: 14px; position: sticky; top: var(--header-h); z-index: 15; }
.viewbar .btn { border-color: #fff; color: #fff; background: transparent; min-height: 32px; }
.viewbar .btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.acc .name { text-decoration: none; color: var(--ink); }
.acc .name:hover { color: var(--giving-purple); text-decoration: underline; }
.iconbtn[disabled] { opacity: .35; cursor: default; }
.msg { border-radius: 12px; padding: 12px 14px; max-width: 92%; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.msg.in { background: var(--page); border: 1px solid var(--line); align-self: flex-start; }
.msg.out { background: var(--lavender); align-self: flex-end; }
.msg .meta { font-size: 12.5px; color: var(--ink-2); }
.msg .text { white-space: normal; overflow-wrap: anywhere; }
.thread { display: flex; flex-direction: column; gap: 10px; }
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(26,26,26,.42); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-3); width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.dialog h2 { margin: 0; font-size: 19px; display: flex; gap: 8px; align-items: center; color: var(--giving-purple); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.field input, .field textarea { font: inherit; font-weight: 400; font-size: 15px; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; background: #fff; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--giving-purple); box-shadow: 0 0 0 3px rgba(102,36,130,.13); }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--giving-purple); }
.dialog .result:empty { display: none; }
.dialog .result { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.sitefoot { padding: 18px 32px 28px; font-size: 12px; color: var(--ink-2); display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.bottomnav { display: none; }

/* ---------- tablet and phone (designs 2, 3, 5 at 390 wide) ---------- */
@media (max-width: 1080px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  :root { --header-h: 60px; }
  body { background: var(--lavender); }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar .brand img { height: 36px; }
  .topbar .brand .divider, .topbar .brand .product { display: none; }
  .topbar .tools .hide-sm { display: none; }
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .hero { padding: 20px 16px 56px; }
  .hero h1 { font-size: 23px; }
  .hero .actions .btn { min-height: 36px; font-size: 13px; padding: 0 12px; }
  .hero .actions .btn svg.i { width: 16px; height: 16px; }
  .notice.strip { padding: 8px 14px; font-size: 12px; }
  .body { padding: 0 14px 90px; gap: 16px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi.main { grid-column: 1 / -1; }
  .card { padding: 16px; }
  ol.path { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  table.list .hide-sm { display: none; }
  table.list { min-width: 0; }
  .frame { max-height: 460px; }
  .bottomnav { display: grid; grid-template-columns: repeat(var(--navn, 4), minmax(0, 1fr)); position: fixed; inset-inline: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); z-index: 20; padding-bottom: env(safe-area-inset-bottom); }
  .bottomnav a, .bottomnav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 10px; text-decoration: none; color: var(--ink-2); font-size: 11.5px; background: none; border: 0; cursor: pointer; }
  .bottomnav a[aria-current="page"] { color: var(--giving-purple); font-weight: 600; }
  .bottomnav .dormant { color: #a89fb0; }
  .sitefoot { padding: 12px 14px 90px; }
  .menu { inset-inline-end: 12px; }
}

/* 0.5.2: Avner's feedback (26 Nov) */
.announce { display: flex; gap: 10px; align-items: center; margin: 14px 32px 0; padding: 12px 16px; border-radius: var(--r-md); background: var(--lavender); color: var(--ink); font-size: 14px; border: 1px solid #d9cdf3; }
.updates .upd { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.updates .upd .muted { grid-column: 1 / -1; font-size: 12px; }
.updates { max-height: 330px; overflow-y: auto; }
.initlinks { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.initlinks details > summary { list-style: none; cursor: pointer; }
.initlinks details > summary::-webkit-details-marker { display: none; }
.initlinks .n { margin-inline-start: auto; font-size: 12px; color: var(--ink-2); }
ul.mini { list-style: none; margin: 4px 0 8px; padding: 0 12px; max-height: 180px; overflow-y: auto; font-size: 13px; color: var(--ink-2); }
ul.mini li { padding: 3px 0; border-bottom: 1px dashed var(--line); }
ol.path li.done .bar { background: #2e9d5b; }
ol.path li.now .bar { background: #e0a91b; }
ol.path li.need .bar { background: #d64545; }
ol.path.cancelled li .bar { background: #d64545; opacity: .5; }
.tasksbox { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; background: var(--lavender); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
@media (max-width: 720px) { .announce { margin: 10px 14px 0; } }
