/* ==========================================================================
   Campaign page. Visual language: an architect's drawing sheet laid on
   Jerusalem stone. Theme colours are injected per campaign by the server.
   ========================================================================== */
@property --p { syntax: '<number>'; inherits: true; initial-value: 0; }

:root {
  --primary: #1f3b5c;
  --accent: #b08d3e;
  --bg: #f4efe6;
  --surface: #fbf8f2;
  --text: #1e2a36;
  --font-heading: 'Frank Ruhl Libre', serif;
  --font-body: 'Heebo', system-ui, sans-serif;

  --ink: var(--text);
  --muted: color-mix(in srgb, var(--text) 60%, var(--bg));
  --line: color-mix(in srgb, var(--text) 14%, transparent);
  --hair: color-mix(in srgb, var(--text) 22%, transparent);
  --stone: color-mix(in srgb, var(--accent) 14%, #efe7d8);
  --stone-dark: color-mix(in srgb, var(--accent) 22%, #d9ccb4);
  --mortar: color-mix(in srgb, var(--text) 10%, #cfc3ad);
  --brass: var(--accent);
  --brass-ink: color-mix(in srgb, var(--accent) 58%, #000);
  --blueprint: color-mix(in srgb, var(--primary) 55%, #5b7fa6);
  --success: #2f6b4a;
  --danger: #9b2c2c;
  --r: 6px;
  --wrap: 1180px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.3 0 0 0 0 0.22 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg) var(--grain);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 900; line-height: 1.1; margin: 0 0 .4em; color: var(--primary); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); letter-spacing: -.015em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: 12px; top: 12px; z-index: 100; background: #fff; padding: 8px 12px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.serif { font-family: var(--font-heading); }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  --b: var(--primary); --f: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  border: 0; border-radius: var(--r); padding: .8em 1.5em;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  background: var(--b); color: var(--f);
  transition: background .15s, transform .15s;
}
.btn:hover { background: color-mix(in srgb, var(--b) 88%, #000); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.btn--accent { --b: var(--brass); --f: #17130a; }
.btn--ghost { --b: transparent; --f: var(--primary); box-shadow: inset 0 0 0 1.5px var(--hair); }
.btn--ghost:hover { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.btn--sm { padding: .45em 1em; font-size: .92rem; }
.btn--lg { padding: .95em 2em; font-size: 1.12rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--wa { --b: #1d8a4c; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; align-items: center; gap: 22px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--primary); font-family: var(--font-heading); font-weight: 900; font-size: 1.15rem; min-width: 0; }
.brand__logo { height: 40px; width: auto; }
.brand__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav { display: flex; gap: 24px; margin-inline-start: auto; }
.topnav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; }
.topnav a:hover { color: var(--primary); text-decoration: underline; }
.topbar__actions { display: flex; gap: 8px; }
@media (max-width: 860px) {
  .topnav { display: none; }
  .topbar__actions { margin-inline-start: auto; }
  .topbar__actions .btn--accent { display: none; }
}

.loading { min-height: 70vh; display: grid; place-items: center; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- opening ---------- */
.opening { padding: 44px 0 26px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px 56px; align-items: end; }
.opening__org { font-weight: 700; color: var(--brass-ink); letter-spacing: .02em; margin-bottom: 10px; display: flex; gap: 10px; align-items: center; }
.opening__org::before { content: ''; width: 28px; height: 1.5px; background: currentColor; }
.opening h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); margin: 0; text-wrap: balance; }
.opening__sub { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: color-mix(in srgb, var(--text) 85%, var(--bg)); margin: 16px 0 0; max-width: 46ch; }
.tally { border-inline-start: 1.5px solid var(--hair); padding-inline-start: 28px; }
.tally__amount { font-family: var(--font-heading); font-weight: 900; font-size: clamp(2.8rem, 5.6vw, 4.4rem); line-height: 1; color: var(--primary); }
.tally__goal { margin-top: 8px; color: var(--muted); font-size: 1.05rem; }
.tally__goal b { color: var(--text); }
.notes { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: .92rem; }
.note { display: inline-flex; align-items: center; gap: 6px; }
.note--draft { background: #f3e3b5; color: #5d4500; padding: 3px 10px; border-radius: 3px; font-weight: 600; }
@media (max-width: 860px) {
  .opening { grid-template-columns: 1fr; padding-top: 28px; }
  .tally { border: 0; padding: 0; }
}

/* ---------- the drawing sheet (rendering fills up) ---------- */
.sheet { position: relative; background: var(--surface); border: 1.5px solid var(--hair); padding: 14px; box-shadow: 0 1px 0 var(--line), 0 30px 60px -40px rgba(30, 30, 20, .45); }
.sheet::before { content: ''; position: absolute; inset: 6px; border: 1px solid var(--line); pointer-events: none; }
.plan { position: relative; margin: 0; overflow: hidden; background: #f7f3ea; }
.plan__sketch { width: 100%; height: auto; filter: grayscale(1) contrast(1.15) brightness(1.35); opacity: .42; mix-blend-mode: multiply; }
.plan__color, .plan__grid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.plan--up .plan__color { clip-path: inset(calc((1 - var(--p)) * 100%) 0 0 0); }
.plan--rtl .plan__color { clip-path: inset(0 0 0 calc((1 - var(--p)) * 100%)); }
.plan__grid {
  background-image:
    linear-gradient(color-mix(in srgb, var(--blueprint) 22%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--blueprint) 22%, transparent) 1px, transparent 1px);
  background-size: 28px 28px; pointer-events: none;
}
.plan--up .plan__grid { clip-path: inset(0 0 calc(var(--p) * 100%) 0); }
.plan--rtl .plan__grid { clip-path: inset(0 calc(var(--p) * 100%) 0 0); }
.plan, .plan * { transition: --p 2.6s cubic-bezier(.25, .8, .25, 1); }
.plan__level { position: absolute; pointer-events: none; }
.plan--up .plan__level { inset-inline: 0; top: calc((1 - var(--p)) * 100%); border-top: 2px solid var(--brass); }
.plan--rtl .plan__level { inset-block: 0; left: calc((1 - var(--p)) * 100%); border-left: 2px solid var(--brass); }
.plan__tag {
  position: absolute; inset-inline-start: 14px; transform: translateY(-50%);
  background: var(--brass); color: #17130a; font-weight: 800; font-size: .9rem; padding: 4px 12px; border-radius: 3px; white-space: nowrap;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.4);
}
.plan--rtl .plan__tag { top: 18px; inset-inline-start: auto; left: 0; transform: translateX(-50%); }
.plan.is-done .plan__level { display: none; }
.plan__ruler { position: absolute; inset-block: 0; inset-inline-end: 0; width: 64px; pointer-events: none; }
.plan--rtl .plan__ruler { display: none; }
.plan__tick { position: absolute; inset-inline-end: 0; display: flex; white-space: nowrap; align-items: center; gap: 6px; transform: translateY(-50%); font-size: .72rem; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.plan__tick::after { content: ''; width: 14px; height: 1.5px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.5); }

.titleblock { display: grid; grid-template-columns: 2fr repeat(3, 1fr); border: 1.5px solid var(--hair); border-top: 0; background: var(--surface); }
.titleblock > div { padding: 10px 14px; border-inline-start: 1px solid var(--line); }
.titleblock > div:first-child { border-inline-start: 0; }
.titleblock small { display: block; font-size: .7rem; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.titleblock b { font-family: var(--font-heading); font-size: 1.15rem; color: var(--primary); }
@media (max-width: 640px) {
  .titleblock { grid-template-columns: 1fr 1fr; }
  .titleblock > div:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .titleblock > div:nth-child(2) { border-inline-start: 0; }
  .plan__ruler { width: 46px; }
  .sheet { padding: 8px; }
  .sheet::before { inset: 3px; }
}

/* progress row under the sheet */
.ledger { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding: 22px 0 6px; }
.ledger__bar { flex: 1 1 260px; height: 8px; background: color-mix(in srgb, var(--primary) 10%, transparent); position: relative; }
.ledger__bar i { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--primary); width: 0; transition: width 2s cubic-bezier(.25,.8,.25,1); }
.ledger__bar span { position: absolute; top: 14px; font-size: .75rem; color: var(--muted); transform: translateX(50%); }
.ledger__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.matching {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: center; margin-top: 18px;
  padding: 14px 18px; border: 1.5px solid var(--brass); background: color-mix(in srgb, var(--brass) 8%, var(--surface));
}
.matching__x { grid-row: span 2; font-family: var(--font-heading); font-weight: 900; font-size: 2.6rem; line-height: 1; color: var(--brass-ink); }
.matching b { font-size: 1.05rem; }
.bonus { margin-top: 14px; padding: 10px 16px; border-inline-start: 3px solid var(--brass); background: var(--surface); font-weight: 600; }
.countdown { display: inline-flex; gap: 2px; direction: rtl; font-family: var(--font-heading); }
.countdown__cell { text-align: center; padding: 2px 8px; border-inline-start: 1px solid var(--line); }
.countdown__cell:first-child { border: 0; }
.countdown__cell b { display: block; font-size: 1.5rem; font-weight: 900; color: var(--primary); line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown__cell small { font-family: var(--font-body); font-size: .7rem; color: var(--muted); }
.countdown-label { font-size: .8rem; color: var(--muted); font-weight: 600; }

/* fallback meters */
.alt-meter { display: grid; grid-template-columns: 1fr 260px; gap: 28px; align-items: center; background: var(--surface); border: 1.5px solid var(--hair); padding: 22px; }
.building svg { width: 100%; height: auto; overflow: visible; }
.building__caption { text-align: center; font-weight: 700; color: var(--primary); margin-top: 6px; }
@media (max-width: 760px) { .alt-meter { grid-template-columns: 1fr; } .alt-meter .building { max-width: 200px; margin: auto; } }

/* ---------- personal banner (ambassador / team) ---------- */
.amb-banner { margin-top: 28px; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; background: var(--surface); padding: 18px 22px; border: 1.5px solid var(--hair); border-inline-start: 5px solid var(--brass); }
.avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; background: var(--stone); display: grid; place-items: center; font-family: var(--font-heading); font-weight: 900; color: var(--primary); font-size: 1.35rem; flex-shrink: 0; overflow: hidden; }
.avatar--lg { width: 84px; height: 84px; font-size: 1.8rem; }
.mini-bar { height: 5px; background: color-mix(in srgb, var(--primary) 10%, transparent); margin: 8px 0 4px; }
.mini-bar > i { display: block; height: 100%; background: var(--brass); width: 0; transition: width 1.4s ease; }
@media (max-width: 640px) { .amb-banner { grid-template-columns: auto 1fr; } .amb-banner .btn { grid-column: 1 / -1; } }

/* ---------- sections ---------- */
.section { padding: 84px 0 0; }
.sec { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: start; margin-bottom: 30px; }
.sec__mark {
  width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--primary); display: grid; place-items: center;
  font-family: var(--font-heading); font-weight: 900; font-size: 1.25rem; color: var(--primary); position: relative; margin-top: 4px;
}
.sec__mark::after { content: ''; position: absolute; top: 50%; inset-inline-end: -14px; width: 14px; height: 1.5px; background: var(--primary); }
.sec h2 { margin: 0; }
.sec p { grid-column: 2; margin: 0; color: var(--muted); max-width: 62ch; }
.sec__tools { grid-column: 2; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

.story { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.story__text { font-size: 1.1rem; }
.story__text h2 { font-size: 1.9rem; }
.story__text h3 { font-size: 1.35rem; margin-top: 1.2em; }
.story__text blockquote { margin: 1.6em 0; padding: 0 22px; border-inline-start: 3px solid var(--brass); font-family: var(--font-heading); font-size: 1.45rem; line-height: 1.4; color: var(--primary); }
.story__text ul { padding-inline-start: 1.2em; }
.story__text li::marker { color: var(--brass); }
.story__media { position: sticky; top: 86px; display: grid; gap: 10px; }
.video { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gallery figure { margin: 0; overflow: hidden; position: relative; aspect-ratio: 4/3; background: var(--stone); cursor: zoom-in; }
.gallery figure:first-child { grid-column: 1 / -1; aspect-ratio: 16/10; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption { position: absolute; inset-inline: 0; bottom: 0; padding: 22px 12px 8px; color: #fff; font-size: .85rem; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
@media (max-width: 860px) { .story { grid-template-columns: 1fr; } .story__media { position: static; } }

/* bill of quantities */
.boq { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--primary); }
.boq li { display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.boq__n { font-family: var(--font-heading); font-weight: 900; color: var(--brass-ink); font-size: 1.1rem; }
.boq__t b { font-size: 1.12rem; display: block; }
.boq__t span { color: var(--muted); font-size: .95rem; }
.boq__a { font-family: var(--font-heading); font-weight: 900; font-size: 1.3rem; color: var(--primary); white-space: nowrap; }

/* dedication plaques */
.plaques { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.plaque {
  --s: 5px;
  position: relative; text-align: center; font: inherit; color: inherit; cursor: pointer;
  background: var(--stone) var(--grain); border: 1px solid var(--stone-dark);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -2px 0 rgba(0,0,0,.05), 0 10px 24px -18px rgba(40,30,10,.55);
  padding: 30px 22px 22px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform .2s, box-shadow .2s;
}
.plaque::before {
  content: ''; position: absolute; inset: 8px; pointer-events: none; border: 1px solid color-mix(in srgb, var(--brass) 45%, transparent);
  background:
    radial-gradient(circle at 10px 10px, var(--stone-dark) 2.5px, transparent 3.5px),
    radial-gradient(circle at calc(100% - 10px) 10px, var(--stone-dark) 2.5px, transparent 3.5px),
    radial-gradient(circle at 10px calc(100% - 10px), var(--stone-dark) 2.5px, transparent 3.5px),
    radial-gradient(circle at calc(100% - 10px) calc(100% - 10px), var(--stone-dark) 2.5px, transparent 3.5px);
}
.plaque:hover:not([disabled]) { transform: translateY(-3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 18px 30px -18px rgba(40,30,10,.6); }
.plaque[disabled] { opacity: .55; cursor: not-allowed; }
.plaque__icon { color: var(--brass-ink); margin-bottom: 2px; }
.plaque__name { font-family: var(--font-heading); font-weight: 900; font-size: 1.45rem; color: var(--primary); text-shadow: 0 1px 0 rgba(255,255,255,.7); }
.plaque__amount { font-weight: 800; font-size: 1.1rem; }
.plaque__desc { color: var(--muted); font-size: .92rem; line-height: 1.5; flex: 1; }
.plaque__left { margin-top: 8px; font-size: .8rem; font-weight: 700; color: var(--brass-ink); border-top: 1px solid color-mix(in srgb, var(--brass) 35%, transparent); padding-top: 8px; width: 70%; }
.plaque__left.is-out { color: var(--danger); }

/* the brick wall of donors */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; border: 1.5px solid var(--hair); }
.seg button { border: 0; background: transparent; font: inherit; padding: 6px 16px; cursor: pointer; color: var(--muted); font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--primary); color: #fff; }
.search { border: 1.5px solid var(--hair); background: var(--surface); padding: 7px 14px; font: inherit; min-width: 220px; border-radius: 0; }
.search:focus { outline: none; border-color: var(--primary); }
.wall { background: var(--mortar); padding: 7px; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; box-shadow: inset 0 2px 8px rgba(0,0,0,.12); }
.brick {
  flex: 1 0 170px; min-height: 84px; padding: 12px 16px; position: relative;
  background: var(--stone) var(--grain);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 0 rgba(0,0,0,.06), inset 2px 0 0 rgba(255,255,255,.2);
  display: flex; flex-direction: column; justify-content: center; animation: lay .6s cubic-bezier(.2,.8,.3,1) both;
}
.brick--md { flex-basis: 250px; }
.brick--lg { flex-basis: 360px; min-height: 100px; background-color: color-mix(in srgb, var(--brass) 22%, var(--stone)); }
.brick__name { font-family: var(--font-heading); font-weight: 900; font-size: 1.12rem; color: color-mix(in srgb, var(--text) 85%, var(--stone-dark)); text-shadow: 0 1px 0 rgba(255,255,255,.65), 0 -1px 0 rgba(0,0,0,.08); line-height: 1.25; }
.brick--lg .brick__name { font-size: 1.4rem; }
.brick__ded { font-size: .86rem; color: var(--brass-ink); font-weight: 600; }
.brick__comment { font-size: .86rem; margin-top: 2px; }
.brick__meta { font-size: .76rem; color: var(--muted); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.brick__amount { font-weight: 800; color: var(--text); }
.brick__x { color: var(--brass-ink); font-weight: 700; }
@keyframes lay { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
.more { display: flex; justify-content: center; margin-top: 18px; }

/* teams: a leaderboard table */
.board { border-top: 1.5px solid var(--primary); }
.board__row { display: grid; grid-template-columns: 44px 56px 1fr 1.2fr auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.board__row:hover { background: color-mix(in srgb, var(--primary) 4%, transparent); }
.board__rank { font-family: var(--font-heading); font-weight: 900; font-size: 1.5rem; color: var(--brass-ink); text-align: center; }
.board__name { font-weight: 800; font-size: 1.08rem; }
.board__sum { font-family: var(--font-heading); font-weight: 900; color: var(--primary); white-space: nowrap; }
@media (max-width: 640px) { .board__row { grid-template-columns: 34px 44px 1fr auto; } .board__row .mini-bar { grid-column: 3 / -1; grid-row: 2; margin: 0; } .board .avatar { width: 44px; height: 44px; } }

/* ambassadors */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0; border-top: 1.5px solid var(--primary); }
.person { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; padding: 14px 12px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; position: relative; }
.person:hover { background: color-mix(in srgb, var(--primary) 4%, transparent); }
.person .avatar { grid-row: span 2; width: 50px; height: 50px; font-size: 1.1rem; }
.person__name { font-weight: 800; }
.person__sum { font-size: .9rem; color: var(--muted); }
.person__sum b { color: var(--primary); }
.person__rank { position: absolute; top: 10px; inset-inline-end: 12px; font-family: var(--font-heading); font-weight: 900; color: var(--brass-ink); }
.person .mini-bar { grid-column: 1 / -1; margin: 6px 0 0; }

/* work log (updates) */
.log { border-inline-start: 1.5px solid var(--primary); margin-inline-start: 8px; }
.log__item { position: relative; padding: 0 28px 34px; display: grid; grid-template-columns: 1fr 220px; gap: 20px; }
.log__item::before { content: ''; position: absolute; inset-inline-start: -7px; top: 6px; width: 12px; height: 12px; background: var(--bg); border: 2px solid var(--primary); border-radius: 50%; }
.log__item time { font-weight: 700; color: var(--brass-ink); font-size: .9rem; }
.log__item h3 { margin: 2px 0 6px; }
.log__item img { aspect-ratio: 4/3; object-fit: cover; }
@media (max-width: 640px) { .log__item { grid-template-columns: 1fr; } }

.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq details:first-child { border-top: 1.5px solid var(--primary); }
.faq summary { font-weight: 700; cursor: pointer; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-heading); font-size: 1.4rem; color: var(--brass-ink); line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 10px 0 0; color: var(--muted); max-width: 70ch; }

/* closing stone band */
.band {
  margin-top: 96px; padding: 56px 40px; text-align: center; position: relative;
  background: var(--stone) var(--grain); border: 1px solid var(--stone-dark);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 30px 50px -40px rgba(40,30,10,.5);
}
.band::before { content: ''; position: absolute; inset: 10px; border: 1px solid color-mix(in srgb, var(--brass) 45%, transparent); pointer-events: none; }
.band h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); text-shadow: 0 1px 0 rgba(255,255,255,.7); }
.band p { color: var(--muted); max-width: 52ch; margin: 0 auto 22px; }
@media (max-width: 640px) { .band { padding: 40px 20px; } }

.footer { margin-top: 80px; padding: 36px 0 120px; border-top: 1.5px solid var(--primary); color: var(--muted); font-size: .92rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.footer strong { color: var(--text); display: block; margin-bottom: 4px; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; } }

/* mobile sticky bar */
.mobilebar { display: none; }
@media (max-width: 860px) {
  .mobilebar {
    display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 40; gap: 12px; align-items: center;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1.5px solid var(--hair);
    transform: translateY(110%); transition: transform .3s;
  }
  .mobilebar.is-visible { transform: none; }
  .mobilebar .btn { flex: 1; }
  .mobilebar__stat { display: flex; flex-direction: column; line-height: 1.2; }
  .mobilebar__stat strong { color: var(--primary); font-family: var(--font-heading); font-size: 1.15rem; }
  .mobilebar__stat span { font-size: .78rem; color: var(--muted); }
}

/* toasts: a new brick was laid */
.toast-stack { position: fixed; z-index: 60; bottom: 20px; inset-inline-start: 20px; display: grid; gap: 8px; max-width: min(340px, calc(100vw - 40px)); }
.toast { background: var(--surface); border: 1px solid var(--hair); border-inline-start: 4px solid var(--brass); padding: 10px 14px; font-size: .95rem; animation: toastIn .35s ease both; box-shadow: 0 16px 30px -18px rgba(0,0,0,.4); }
.toast.is-leaving { animation: toastOut .35s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(12px); } }
@media (max-width: 860px) { .toast-stack { bottom: 86px; inset-inline-start: 12px; } }

/* ---------- modal ---------- */
.modal { border: 0; padding: 0; border-radius: 8px; width: min(560px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); background: var(--surface); color: var(--text); box-shadow: 0 40px 80px -30px rgba(0,0,0,.5); overflow: hidden; }
.modal::backdrop { background: rgba(20, 22, 26, .55); }
.modal[open] { animation: modalIn .22s ease; display: flex; flex-direction: column; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.modal__head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal__head h2 { font-size: 1.35rem; margin: 0; flex: 1; }
.modal__close { border: 0; background: transparent; width: 34px; height: 34px; cursor: pointer; font-size: 1.5rem; color: var(--primary); line-height: 1; }
.modal__back { border: 0; background: none; cursor: pointer; color: var(--primary); font: inherit; font-weight: 700; }
.modal__body { padding: 20px; overflow-y: auto; }
.modal__foot { padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.modal--pay { width: min(620px, calc(100vw - 12px)); }
.pay-frame { width: 100%; height: min(720px, calc(100dvh - 110px)); border: 0; display: block; background: #fff; }
.steps { display: flex; gap: 4px; }
.steps i { width: 22px; height: 3px; background: var(--line); }
.steps i.on { background: var(--brass); }

.kind { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); border: 1.5px solid var(--hair); }
.kind button { border: 0; background: transparent; padding: 11px 6px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; border-inline-start: 1px solid var(--line); }
.kind button:first-child { border-inline-start: 0; }
.kind button[aria-pressed="true"] { background: var(--primary); color: #fff; }
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.amounts button { border: 1.5px solid var(--hair); background: var(--surface); padding: 14px 6px; font-family: var(--font-heading); font-weight: 900; font-size: 1.3rem; cursor: pointer; color: var(--text); border-radius: var(--r); }
.amounts button[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: #fff; }
.field { display: grid; gap: 6px; margin-top: 14px; }
.field label, .label { font-weight: 600; font-size: .92rem; }
.input, .select, textarea.input { width: 100%; border: 1.5px solid var(--hair); border-radius: var(--r); padding: 11px 13px; font: inherit; background: #fff; color: var(--text); }
.input:focus, .select:focus { outline: none; border-color: var(--primary); }
.input--amount { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 900; padding-inline-start: 40px; }
.amount-wrap { position: relative; }
.amount-wrap::before { content: '₪'; position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); font-weight: 800; font-size: 1.2rem; color: var(--muted); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .row { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; cursor: pointer; font-size: .95rem; }
.check input { width: 19px; height: 19px; accent-color: var(--primary); margin-top: 4px; flex-shrink: 0; }
.summary { margin-top: 16px; padding: 14px 16px; background: var(--stone) var(--grain); border: 1px solid var(--stone-dark); }
.summary__big { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 900; color: var(--primary); }
.summary__x { color: var(--brass-ink); font-weight: 700; }
.error { color: var(--danger); font-weight: 600; margin-top: 10px; font-size: .95rem; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--stone); border: 1px solid var(--stone-dark); color: var(--primary); padding: 3px 6px 3px 12px; font-weight: 700; font-size: .88rem; }
.pill button { border: 0; background: transparent; width: 22px; height: 22px; cursor: pointer; font-size: 1rem; }
.collapse summary { cursor: pointer; font-weight: 700; color: var(--primary); margin-top: 16px; }
.secure-note { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 10px; }

/* thanks */
.thanks { text-align: center; padding: 64px 0 24px; }
.thanks__seal { width: 110px; height: 110px; margin: 0 auto 20px; border-radius: 50%; border: 2px solid var(--brass); display: grid; place-items: center; color: var(--brass-ink); position: relative; }
.thanks__seal::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--brass) 50%, transparent); }
.thanks h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.share-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; }
.thanks .brick { max-width: 420px; margin: 28px auto 0; flex: none; }

.lightbox { width: min(1100px, calc(100vw - 16px)); background: #000; }
.lightbox img { max-height: calc(100dvh - 60px); margin: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
