/* Nikighest base styles. Self-hosted only (no external fonts or CDNs). */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn/Vazirmatn-Variable.f6d31671339d.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* The designs' palette (batch 1). Text colours meet 4.5:1 on the grounds they are
     used on, the focus ring 3:1 (tested: core/tests/test_contrast.py). #C9A45C (gold)
     is only for grounds, lines and progress bars, never for text. */
  --bg: #f7f3ea;          /* cream */
  --surface: #ffffff;
  --surface-2: #f2ecdc;
  --teal-soft: #e3efec;
  --text: #1e2a28;
  --muted: #5b6663;
  --border: #e2dccd;
  --field-border: #8c8573; /* form fields: 3:1 against white (WCAG 1.4.11) */
  --primary: #0e5a52;     /* teal green: trust */
  --primary-text: #ffffff;
  --accent: #c9a45c;      /* gold: grounds, lines and progress only */
  --danger: #8c1d17;
  --danger-bg: #fbe9e7;
  --success: #2f6b3a;
  --warning-bg: #fff4d6;
  --gold-soft: #f5ebd6;
  --gold-text: #6b4e14;   /* gold text, always */
  --focus: #0e5a52;
  --radius: 12px;
  --text-scale: 1;
  color-scheme: light;    /* no dark mode until after the pilot (decisions.md) */
}

:root[data-text-size="large"] { --text-scale: 1.2; }
:root[data-text-size="xlarge"] { --text-scale: 1.4; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { font-size: calc(17px * var(--text-scale)); }

body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  line-height: 1.8;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--primary); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex="-1"]:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
/* On the teal card the ring is white. */
.next-installment :focus-visible { outline-color: #ffffff; }

.skip-link {
  position: absolute; inset-inline-start: -9999px; top: 0;
  background: var(--surface); padding: .5rem 1rem;
}
.skip-link:focus { inset-inline-start: 1rem; z-index: 10; }

.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .75rem; padding: .75rem 1rem;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--text); }
.brand-name { font-weight: 800; font-size: 1.25rem; color: var(--primary); }
.brand-slogan { font-size: .8rem; color: var(--muted); }
.header-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

.container { width: 100%; max-width: 960px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.narrow { max-width: 480px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 1rem;
}

h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

label { display: block; font-weight: 600; margin-bottom: .25rem; }
.field { margin-bottom: 1rem; }
.help { font-size: .85rem; color: var(--muted); margin-top: .25rem; }
input[type="text"], input[type="tel"], input[type="password"], input[type="search"],
input[type="number"], textarea, select {
  width: 100%; font: inherit; padding: .7rem .8rem; min-height: 48px;
  border: 1px solid var(--field-border); border-radius: 10px;
  background: var(--surface); color: var(--text);
}
input.ltr, .ltr { direction: ltr; text-align: left; }
textarea { min-height: 6rem; }
.checkbox { display: flex; align-items: center; gap: .5rem; font-weight: 400; min-height: 44px; }
.checkbox input { width: 1.25rem; height: 1.25rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 48px; padding: .6rem 1.2rem; border-radius: 10px;
  border: 1px solid var(--primary); background: var(--primary); color: var(--primary-text);
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn-secondary { background: transparent; color: var(--primary); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-small { min-height: 44px; padding: .3rem .8rem; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-link { background: none; border: none; color: var(--primary); padding: 0; min-height: 0;
            font: inherit; cursor: pointer; text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
form.inline { display: inline; }

.messages { list-style: none; padding: 0; margin: 0 0 1rem; }
.message { padding: .75rem 1rem; border-radius: 10px; margin-bottom: .5rem;
           border: 1px solid var(--border); background: var(--surface); }
.message.error, .errorlist { color: var(--danger); }
.message.error { background: var(--danger-bg); }
.message.success { color: var(--success); }
.message.warning, .notice { background: var(--warning-bg); }
.errorlist { list-style: none; padding: 0; margin: .25rem 0 0; font-size: .9rem; }
.notice { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1rem;
          border: 1px solid var(--accent); }

.captcha { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem;
           padding: .75rem; border: 1px dashed var(--border); border-radius: 10px;
           margin-bottom: 1rem; }
.captcha img { border-radius: 8px; border: 1px solid var(--border); }

.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
         gap: .5rem; direction: ltr; font-family: monospace; font-size: 1.1rem; }
.codes li { list-style: none; padding: .4rem .6rem; background: var(--surface-2);
            border-radius: 8px; text-align: center; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: start; padding: .55rem .5rem; border-bottom: 1px solid var(--border);
         vertical-align: top; }
th { font-size: .9rem; color: var(--muted); font-weight: 600; }

.badge { display: inline-block; padding: .05rem .6rem; border-radius: 999px; font-size: .8rem;
         background: var(--surface-2); border: 1px solid var(--border); }
.badge.ok { color: var(--success); border-color: var(--success); }
.badge.warn { color: var(--gold-text); border-color: var(--accent); }
.badge.bad { color: var(--danger); border-color: var(--danger); }

.qr { max-width: 220px; background: #fff; padding: .5rem; border-radius: 8px; }

/* Panel layout */
.panel { display: grid; grid-template-columns: 220px 1fr; gap: 1.25rem;
         max-width: 1200px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.panel-nav { background: var(--surface); border: 1px solid var(--border);
             border-radius: var(--radius); padding: .75rem; align-self: start; }
.panel-nav a { display: flex; align-items: center; min-height: 44px; padding: .3rem .6rem;
               border-radius: 8px;
               text-decoration: none; color: var(--text); }
.panel-nav a[aria-current="page"] { background: var(--surface-2); color: var(--primary);
                                     font-weight: 700; }
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.filters .field { margin: 0; min-width: 10rem; flex: 1; }

@media (max-width: 760px) {
  .panel { grid-template-columns: 1fr; }
}

/* Donor pages: finding projects (phase 3) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden;
                   clip: rect(0 0 0 0); white-space: nowrap; }
.btn-gold { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--gold-text); }
.badge.gold { color: var(--gold-text); background: var(--gold-soft); border-color: transparent; }
.next-installment { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem;
  background: var(--primary); color: var(--primary-text); border-radius: 20px; padding: 1.1rem;
  margin-bottom: 1rem; }
.next-installment .small { opacity: .85; }
.next-amount { font-size: 1.5rem; font-weight: 800; }
.search-box { display: flex; gap: .5rem; margin-bottom: 1rem; }
.search-box input { flex: 1; }
.chips { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; margin-bottom: 1rem; }
.chip { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); text-decoration: none; font-size: .9rem; white-space: nowrap; }
.chip.active { background: var(--primary); border-color: var(--primary); color: var(--primary-text);
  font-weight: 700; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.section-head h2 { margin: 1rem 0 .5rem; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1rem; margin-bottom: 1rem; }
.project-card { display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  text-decoration: none; color: var(--text); }
.project-card:hover { border-color: var(--primary); }
.project-cover { height: 8rem; background: var(--surface-2); display: flex; align-items: center;
  justify-content: center; }
.project-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-placeholder { color: var(--muted); font-size: .9rem; }
.cover-placeholder.big { height: 12rem; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border-radius: 18px; }
.project-body { padding: .75rem 1rem 1rem; display: flex; flex-direction: column; gap: .5rem; }
.project-title { font-size: 1rem; margin: 0; }
.project-org { font-size: .85rem; color: var(--muted); margin: 0; display: flex; flex-wrap: wrap;
  gap: .35rem; align-items: center; }
.progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 8px;
  border: 0; border-radius: 4px; background: var(--surface-2); overflow: hidden; color: var(--primary); }
.progress.big { height: 10px; }
.progress::-webkit-progress-bar { background: var(--surface-2); border-radius: 4px; }
.progress::-webkit-progress-value { background: var(--primary); border-radius: 4px; }
.progress::-moz-progress-bar { background: var(--primary); border-radius: 4px; }
.project-numbers { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem;
  font-size: .82rem; color: var(--muted); }
.project-numbers b { color: var(--primary); }
.project-gallery { display: flex; gap: .5rem; overflow-x: auto; margin-bottom: 1rem; }
.project-gallery img { height: 14rem; width: auto; max-width: 100%; border-radius: 18px;
  object-fit: cover; flex-shrink: 0; }
.project-head h1 { margin-bottom: .25rem; }
.progress-card { display: flex; flex-direction: column; gap: .6rem; }
.progress-headline { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.big-percent { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: center;
  gap: .5rem; }
.stats-grid div { display: flex; flex-direction: column; }
.stats-grid span { font-size: .8rem; color: var(--muted); }
.project-description { line-height: 2; }
.cost-list { margin: 0; }
.cost-list div { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0;
  border-bottom: 1px solid var(--border); }
.cost-list dd { margin: 0; color: var(--muted); }
.action-bar { position: sticky; bottom: 0; display: flex; gap: .5rem; flex-wrap: wrap;
  background: var(--surface); border-top: 1px solid var(--border); padding: .75rem 1rem;
  margin: 1rem -1rem -3rem; }
.action-bar .btn { flex: 1; min-height: 52px; white-space: nowrap; }
.action-bar .btn-secondary { flex: 0 0 auto; padding-inline: 1.4rem; }
.action-bar .notice { margin: 0; flex: 1; }
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list .card { display: flex; flex-direction: column; gap: .35rem; }
.small-gallery img { height: 9rem; }
.news-admin { list-style: none; padding: 0; }
.news-admin li { padding: .5rem 0; border-bottom: 1px solid var(--border); }
.impact-verse { text-align: center; color: var(--gold-text); line-height: 2; margin: 0 0 .5rem; }
.impact-head { text-align: center; }
.impact-share { display: flex; flex-direction: column; gap: .2rem; background: var(--gold-soft);
  color: var(--gold-text); border-radius: 16px; padding: .9rem 1rem; margin-bottom: 1rem; }
.impact-share b { font-size: 1.15rem; }
.impact-checks { list-style: none; padding: 0; color: var(--muted); font-size: .9rem; }
.impact-checks li::before { content: "✓ "; color: var(--primary); }
.cost-list.plain { list-style: none; padding: 0; margin: 0; }
.cost-list.plain li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0;
  border-bottom: 1px solid var(--border); }
.receipt-head { display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border); padding-bottom: .5rem; margin-bottom: .5rem; }
.receipt-number { font-weight: 800; letter-spacing: .05em; }
.receipt-qr { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 1rem; }
.receipt-qr p { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.receipt-number { overflow-wrap: anywhere; }
.receipt-qr img { background: #fff; padding: .4rem; border-radius: 8px; }
@media print {
  .site-header, .no-print, .skip-link, .messages { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border: 0; }
}

/* --- Donor app shell (design batch 1) --------------------------------------------- */
.donor { background: var(--bg); }
.donor main.container { max-width: 640px; padding-bottom: 1.5rem; }
/* Room for the fixed bottom bar, after the footer (the bar's template adds it). */
.tab-bar-space { height: 5.5rem; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  max-width: 640px; margin: 0 auto; padding: 1rem 1rem 0; }
.app-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.app-brand > span { display: flex; flex-direction: column; line-height: 1.4; }
.app-brand .brand-slogan { color: var(--gold-text); font-size: .75rem; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 22px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; }
.text-size { display: flex; gap: .25rem; }
.bell-count { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 20px; height: 20px;
  padding: 0 5px; border-radius: 10px; background: #b3261e; color: #fff; font-size: .7rem;
  font-weight: 800; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg); }
.tab-bar { position: fixed; bottom: 0; inset-inline: 0; z-index: 20; display: flex;
  justify-content: space-around; align-items: center; height: 72px; background: var(--surface);
  border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.tab-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-width: 64px; min-height: 56px; font-size: .75rem; color: var(--muted);
  text-decoration: none; }
.tab-bar a[aria-current="page"] { color: var(--primary); font-weight: 700; }
.page-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.page-title { flex: 1; display: flex; flex-direction: column; }
.page-title h1 { margin: 0; font-size: 1.25rem; }
.btn-text { background: none; border: 0; color: var(--primary); font: inherit; font-weight: 700;
  min-height: 44px; padding: 0 .25rem; cursor: pointer; }
.center { text-align: center; }
.empty-state { color: var(--muted); background: var(--surface); border: 1px dashed var(--border);
  border-radius: 16px; padding: 1rem; margin: 0; }
.hint-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: .9rem 1rem; }

/* Home */
.next-installment .btn-gold { color: var(--gold-text); }
.search-field { display: flex; align-items: center; gap: .6rem; min-height: 48px; padding: 0 .9rem;
  margin-bottom: 1rem; background: var(--surface); border: 1px solid var(--field-border);
  border-radius: 14px; color: var(--muted); }
.search-field input { flex: 1; border: 0; min-height: 46px; padding: 0; background: transparent; }
.search-field input:focus-visible { outline: none; }
.search-field:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.ourpick-card { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem;
  padding: .9rem 1rem; background: var(--gold-soft); border: 1px solid #e8d6ae; border-radius: 18px;
  color: var(--gold-text); text-decoration: none; }
.ourpick-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 22px; background: #fff;
  display: flex; align-items: center; justify-content: center; }
.ourpick-text { flex: 1; display: flex; flex-direction: column; }
.ourpick-text b { color: #3e2c06; }
.row-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.project-row { display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  color: var(--text); text-decoration: none; }
.project-row:hover { border-color: var(--primary); }
.row-badge { width: 52px; height: 52px; flex-shrink: 0; border-radius: 12px;
  background: var(--teal-soft); color: var(--primary); display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1.2; }
.row-badge.gold { background: var(--gold-soft); color: var(--gold-text); }
.row-badge b { font-size: 1.05rem; }
.row-badge span { font-size: .7rem; }
.row-body { flex: 1; display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.row-title { font-weight: 700; font-size: .95rem; }
.progress.thin { height: 6px; }

/* Notification centre */
.notice-list { list-style: none; padding: 0; margin: .5rem 0 1rem; display: flex;
  flex-direction: column; gap: .6rem; }
.notice-item { display: flex; gap: .75rem; padding: .9rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: 16px; color: var(--text); text-decoration: none; }
.notice-item.security { background: var(--danger-bg); border-color: #f2c9c4; }
.notice-item.security .notice-title { color: var(--danger); }
.notice-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 20px;
  background: var(--teal-soft); }
.notice-item.security .notice-icon { background: #fff; }
.notice-body { flex: 1; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.notice-title { display: flex; justify-content: space-between; gap: .5rem; font-weight: 700; }
.notice-item:not(.unread) .notice-title { font-weight: 600; }
.notice-text { font-size: .85rem; color: var(--muted); line-height: 1.7; }
.notice-item.unread .notice-text { color: var(--text); }
.notice-time { font-size: .75rem; color: var(--muted); }
.unread-dot { width: 10px; height: 10px; flex-shrink: 0; margin-top: .45rem; border-radius: 5px;
  background: var(--primary); }
.notice-item.security .unread-dot { background: #b3261e; }
.pager { display: flex; justify-content: center; gap: .5rem; margin-bottom: 1rem; }

/* Step-by-step guide layer */
.guide-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(30, 42, 40, .55); }
.guide-target { position: relative; z-index: 41; box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--accent);
  border-radius: 12px; }
.guide-card { position: fixed; z-index: 42; inset-inline: 1rem; bottom: 5.5rem; max-width: 560px;
  margin: 0 auto; background: var(--surface); border-radius: 18px; padding: 1rem 1.1rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25); display: flex; flex-direction: column; gap: .4rem; }
.guide-card h2 { margin: 0; font-size: 1.1rem; }
.guide-card h2:focus { outline: none; } /* the card itself shows where focus is */
.guide-card p { margin: 0; line-height: 1.9; }
.guide-counter { font-size: .8rem; color: var(--muted); }
.guide-card .btn-text { position: absolute; top: .5rem; inset-inline-end: .75rem; font-size: .85rem; }
.guide-actions { display: flex; gap: .5rem; margin-top: .4rem; }
.guide-actions .btn { flex: 1; }
.guide-link { align-self: flex-start; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Project page (design batch 1) */
.project-hero { position: relative; margin: 0 -1rem 1rem; }
.project-hero .project-gallery { margin: 0; }
.project-hero .project-gallery img, .project-hero .cover-placeholder.big { border-radius: 0; }
.hero-back, .hero-share { position: absolute; top: .75rem; border: 0; }
.hero-back { inset-inline-start: .75rem; }
.hero-share { inset-inline-end: .75rem; }
.org-line { display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  flex-wrap: wrap; margin-bottom: .5rem; }
.org-line > a { color: var(--text); text-decoration: none; font-size: .9rem; }
.pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem;
  border-radius: 22px; border: 1.5px solid var(--primary); background: var(--surface);
  color: var(--primary); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer;
  text-decoration: none; white-space: nowrap; }
.pill[aria-pressed="true"] { background: var(--teal-soft); }
.badge-row { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0;
  margin: 0 0 .5rem; }
.trust-badge { padding: .15rem .6rem; border-radius: 10px; background: var(--teal-soft);
  color: var(--primary); font-size: .75rem; font-weight: 700; }
.trust-badge.gold { background: var(--gold-soft); color: var(--gold-text); }
.impact-link { display: block; margin-bottom: 1rem; padding: .9rem 1rem; border-radius: 16px;
  background: var(--teal-soft); color: var(--primary); font-weight: 700; text-decoration: none; }
.split-bar { display: block; width: 100%; height: 10px; border-radius: 5px; overflow: hidden; }
.bar-ground { fill: var(--teal-soft); }
.bar-online { fill: var(--primary); }
.bar-offline { fill: var(--accent); }
.bar-legend { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .8rem; }
.bar-legend > span { display: inline-flex; align-items: center; gap: .4rem; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.swatch.online { background: var(--primary); }
.swatch.offline { background: var(--accent); }
.news-item { display: flex; gap: .75rem; padding: .75rem .9rem; margin-bottom: .6rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.news-item img { width: 64px; height: 64px; flex-shrink: 0; border-radius: 12px; object-fit: cover; }
.report-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 1rem;
  color: var(--danger); font-weight: 700; font-size: .9rem; }

/* Choice buttons (radio inputs that look like the designs' buttons) */
.js .no-js-only { display: none; }
.choice-group { border: 0; padding: 0; margin: 0 0 1.1rem; }
.choice-group legend { font-weight: 700; margin-bottom: .5rem; padding: 0; }
.chip-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.grid-options { display: grid; gap: .5rem; }
.grid-options.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-options.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.option, .chip-option { position: relative; margin: 0; font-weight: 400; }
.option input, .chip-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option span, .chip-option span { display: flex; align-items: center; justify-content: center;
  gap: .25rem; min-height: 52px; padding: 0 .75rem; border: 1px solid var(--field-border);
  border-radius: 14px; background: var(--surface); color: var(--text); font-weight: 700;
  cursor: pointer; text-align: center; }
.chip-option span { min-height: 44px; border-radius: 22px; padding: 0 1rem; font-weight: 400; }
.option.dashed span { border-style: dashed; font-weight: 400; }
.option small { font-size: .7rem; font-weight: 400; }
.option input:checked + span, .chip-option input:checked + span { border: 2px solid var(--primary);
  background: var(--teal-soft); color: var(--primary); font-weight: 800; }
.option input:focus-visible + span, .chip-option input:focus-visible + span {
  outline: 3px solid var(--focus); outline-offset: 2px; }
.custom-amount { margin-top: .6rem; }
.check-list { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.checkbox.top { align-items: flex-start; }
.checkbox.top input { margin-top: .35rem; flex-shrink: 0; }
.summary-box { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .75rem;
  padding: 1rem; border-radius: 18px; background: var(--gold-soft); color: var(--gold-text); }
.summary-total { font-size: 1.35rem; font-weight: 800; color: #3e2c06; }
.summary-total small { font-size: .9rem; font-weight: 500; }
.strong-teal { color: var(--primary); font-weight: 800; }

/* My pledges (design batch 1) */
.page-h1 { font-size: 1.35rem; margin: .25rem 0 .9rem; }
.total-card { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  margin-bottom: .9rem; padding: 1rem 1.1rem; border-radius: 20px; background: var(--primary);
  color: var(--primary-text); }
.total-card > div { display: flex; flex-direction: column; gap: .2rem; }
.total-card .small { color: #cfe5e0; }
.total-amount { font-size: 1.4rem; font-weight: 800; }
.total-card a { color: var(--gold-soft); font-weight: 700; font-size: .85rem; }
.total-card :focus-visible { outline-color: #fff; }
.alert-card { display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  margin-bottom: .75rem; padding: .9rem; border-radius: 16px; text-decoration: none; }
.alert-card > div, a.alert-card { flex-direction: column; align-items: flex-start; }
.alert-card > div { display: flex; gap: .15rem; }
.alert-card.gold { display: flex; background: var(--gold-soft); color: var(--gold-text);
  border: 1px solid #e8d6ae; }
.alert-card.danger { background: var(--danger-bg); border: 1px solid #f2c9c4; color: var(--danger); }
.alert-card.danger .small { color: #5e2420; }
.pledge-card { display: flex; flex-direction: column; gap: .45rem; margin-bottom: .6rem;
  padding: .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  color: var(--text); text-decoration: none; }
.pledge-card.muted-card { background: var(--surface-2); }
.pledge-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.pledge-foot { display: flex; justify-content: space-between; gap: .5rem; font-size: .8rem;
  color: var(--muted); }
.state { font-size: .75rem; font-weight: 700; padding: .1rem .55rem; border-radius: 10px;
  background: var(--surface-2); color: var(--gold-text); white-space: nowrap; }
.state.danger { background: var(--danger-bg); color: var(--danger); }
.danger-text { color: var(--danger); font-weight: 700; }
.progress.danger::-webkit-progress-value { background: #b3261e; }
.progress.danger::-moz-progress-bar { background: #b3261e; }
.progress.danger { color: #b3261e; }
.ended-list { margin: 1rem 0; }
.ended-list summary { min-height: 44px; display: flex; align-items: center; cursor: pointer;
  font-weight: 700; color: var(--primary); }

/* Profile (design batch 1) */
.profile-head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.profile-head > div { display: flex; flex-direction: column; gap: .15rem; align-items: flex-start; }
.photo-form { display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.avatar { width: 72px; height: 72px; border-radius: 36px; background: var(--teal-soft);
  color: var(--primary); display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 800; cursor: pointer; margin: 0; border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border); }
.photo-form:focus-within .avatar { outline: 3px solid var(--focus); outline-offset: 2px; }
.two-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.link-list a { display: flex; align-items: center; justify-content: space-between; min-height: 48px;
  border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.link-list a:last-child { border-bottom: 0; }
.link-list .count { color: var(--muted); font-size: .85rem; }
.danger-link { color: var(--danger) !important; font-weight: 700; }
.alert-card.stacked { flex-direction: column; align-items: flex-start; display: flex; }
.preview-card { display: flex; flex-direction: column; gap: .2rem; padding: .9rem; margin-bottom: .75rem;
  border: 1px dashed var(--border); border-radius: 14px; background: var(--bg); }
.waiting-card ul { padding-inline-start: 1.1rem; margin: .5rem 0 0; }

.card > h2:first-child, .card > input[type="hidden"] + h2 { margin-top: 0; }
.new-link { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .75rem; padding: .9rem;
  border-radius: 14px; background: var(--teal-soft); }

/* «به انتخاب نیکی‌قسط» (design batch 1) */
.intro-card { margin: 0 0 1rem; padding: .9rem 1rem; border-radius: 16px; background: var(--gold-soft);
  color: var(--gold-text); }
.intro-card p { margin: 0 0 .4rem; }
.intro-card b, .intro-card strong { color: #3e2c06; }
.plain-list { list-style: none; display: flex; flex-direction: column; gap: .3rem; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 1rem;
  border-radius: 14px; background: var(--surface-2); }
.segmented a { display: flex; align-items: center; justify-content: center; min-height: 44px;
  border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.segmented a[aria-current="page"] { background: var(--surface); color: var(--primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.grid-options.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.option.wide { display: block; margin-top: .5rem; }
.filters-box { margin-bottom: 1rem; padding: .25rem .9rem; border: 1px solid var(--border);
  border-radius: 14px; background: var(--surface); }
.filters-box summary { min-height: 44px; display: flex; align-items: center; cursor: pointer;
  font-weight: 700; color: var(--primary); }
.stacked-card { flex-direction: column; align-items: flex-start; }
.next-month { display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  flex-wrap: wrap; }
.next-month p { margin: 0; }
.paylink-card { display: flex; flex-direction: column; gap: .3rem; text-align: center;
  align-items: center; }
.how-list { padding-inline-start: 1.1rem; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.intro-card .how-list { list-style: none; padding: 0; }

/* Money path (design batch 2): sign-in, one-off gift, payment result, receipt */
html:not(.js) .js-only { display: none; }
.brand-stack { display: flex; flex-direction: column; align-items: center; gap: .3rem;
  margin: 1rem 0 1.25rem; text-decoration: none; }
.brand-stack .logo { width: 48px; height: 48px; }
.brand-stack .brand-slogan { color: var(--gold-text); }
.auth-card h1 { font-size: 1.2rem; margin-top: 0; }
.terms-line { margin: .9rem 0 0; line-height: 1.8; }
.code-input { font-size: 1.5rem; font-weight: 700; text-align: center; letter-spacing: .5em; }
.resend { display: flex; flex-direction: column; align-items: center; gap: .25rem; margin-top: .75rem; }
.resend p { margin: 0; }
.legal-text { line-height: 2; }
.small-title { font-size: 1rem; margin: 0 0 .75rem; }
.fitra-box { margin-bottom: 1.1rem; }
.fitra-box .choice-group { margin-bottom: .8rem; }
.option span.stacked { flex-direction: column; gap: 0; min-height: 56px; }
.stepper-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  margin-bottom: .5rem; }
.stepper-row label { margin: 0; white-space: nowrap; }
.stepper { display: flex; align-items: center; gap: .6rem; }
.stepper .icon-btn { width: 44px; height: 44px; border: 1px solid var(--field-border);
  font-size: 1.25rem; }
.stepper-value { width: 4rem; text-align: center; font-size: 1.1rem; font-weight: 800; }
.notice.quiet { background: var(--surface-2); border-color: var(--border); }
.result-card { display: flex; flex-direction: column; gap: .75rem; }
.result-card.pending { border-color: #e8d6ae; text-align: center; align-items: center; }
.result-card.failed { border-color: #f2c9c4; text-align: center; }
.result-card p { margin: 0; line-height: 1.9; }
.result-head { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; }
.result-head h1 { margin: 0; font-size: 1.25rem; }
.result-card:not(.pending):not(.failed) .result-head h1 { color: var(--primary); }
.result-card.failed .result-head h1 { color: var(--danger); }
.result-icon { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px;
  border-radius: 50%; }
.result-icon.ok { background: var(--teal-soft); color: var(--primary); }
.result-icon.wait { background: var(--gold-soft); color: var(--gold-text); }
.result-icon.bad { background: var(--danger-bg); color: var(--danger); }
.result-icon.small-icon { width: 44px; height: 44px; flex-shrink: 0; }
.result-rows { padding-top: .5rem; border-top: 1px solid var(--border); }
.gold-label { color: var(--gold-text); font-weight: 700; }
.intro-card.picked { display: flex; flex-direction: column; gap: .2rem; margin: 0; }
.intro-card.picked a { color: #3e2c06; text-decoration: none; }
.two-buttons { display: flex; gap: .6rem; }
.two-buttons .btn { flex: 1; white-space: nowrap; padding-inline: .75rem; }
.center-link { display: inline-flex; align-self: center; align-items: center; min-height: 44px;
  font-weight: 700; }
.receipt-brand { display: flex; align-items: center; gap: .4rem; }
.receipt-brand .logo { width: 30px; height: 30px; }
.receipt-amount { text-align: center; padding: .6rem 0; margin: .75rem 0;
  border-top: 1px dashed #d9d2c2; border-bottom: 1px dashed #d9d2c2; }
.receipt-amount .total-amount { color: var(--primary); font-size: 1.6rem; font-weight: 800; }
.receipt-refunded { display: inline-block; margin: .5rem 0 0; }
.receipt-qr { background: var(--bg); border-radius: 14px; padding: .75rem; }
.verify-card.ok { border: 2px solid var(--primary); }
.verify-card.bad { background: var(--danger-bg); border-color: #f2c9c4; }
.verify-card.refunded { background: var(--surface-2); }
.verify-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; font-size: 1.05rem; }
.receipt-head { flex-wrap: wrap; gap: .5rem; }
.receipt-head .receipt-number { white-space: nowrap; overflow-wrap: normal; }

/* Account and pledges (design batch 2) */
.chip[aria-current="page"] { background: var(--primary); border-color: var(--primary);
  color: var(--primary-text); font-weight: 700; }
.month-head { font-size: .85rem; color: var(--muted); margin: 1rem 0 .5rem; }
.pay-item { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .6rem; }
.pay-row { display: flex; justify-content: space-between; gap: .75rem; }
.pay-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.pay-amount { white-space: nowrap; }
.pay-amount.struck { color: var(--muted); text-decoration: line-through; }
.pay-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; padding-top: .5rem;
  border-top: 1px solid var(--border); }
.pay-foot a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.pay-foot a.muted-link { color: var(--muted); font-weight: 400; }
.section-title { font-size: 1rem; font-weight: 800; margin: 0 0 .6rem; padding: 0; }
.choice-card { margin: 0 0 1rem; }
.choice-card legend { font-weight: 700; padding: 0 .4rem; }
.choice-card .checkbox + .checkbox { margin-top: .5rem; }
.steps-card .how-list { padding-inline-start: 1.1rem; list-style: decimal; }
.pledge-summary { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; padding: 1.1rem;
  border-radius: 20px; background: var(--primary); color: var(--primary-text); }
.pledge-summary .summary-line { display: flex; justify-content: space-between; align-items: baseline;
  gap: .5rem; flex-wrap: wrap; }
.pledge-summary .small { color: #e3efec; }
.progress.on-dark::-webkit-progress-bar { background: #2d7a70; }
.progress.on-dark::-webkit-progress-value { background: var(--gold-soft); }
.progress.on-dark::-moz-progress-bar { background: var(--gold-soft); }
.progress.on-dark { background: #2d7a70; }
.refund-offer form { display: flex; flex-direction: column; gap: .5rem; }
.refund-offer .checkbox { color: var(--text); }
.pay-box { margin-bottom: 1rem; }
.installment-list { list-style: none; padding: 0 .9rem; margin: 0 0 1rem; }
.installment-list li { display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  min-height: 46px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.installment-list li:last-child { border-bottom: 0; }
.installment-list li.is-next { font-weight: 800; }
.installment-list li.muted { color: var(--muted); }
.state.ok { background: var(--teal-soft); color: var(--primary); }
.state.gold { background: var(--gold-soft); color: var(--gold-text); }
.btn-danger-outline { background: var(--surface); border: 1.5px solid var(--danger); color: var(--danger); }
.history summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.history ul { margin: 0 0 .5rem; }
.does-not-fit form { display: flex; flex-direction: column; gap: .5rem; }
.does-not-fit .checkbox { color: var(--text); }
.danger-card { border-color: #f2c9c4; }
.option-cards { display: flex; flex-direction: column; gap: .6rem; }
.option-card { position: relative; display: block; margin: 0; }
.option-card input { position: absolute; inset-inline-start: 14px; top: 18px; width: 20px; height: 20px; }
.option-card > span { display: flex; flex-direction: column; gap: .15rem; min-height: 56px;
  padding: .85rem .9rem .85rem .9rem; padding-inline-start: 2.6rem; border: 1px solid var(--field-border);
  border-radius: 16px; background: var(--surface); cursor: pointer; }
.option-card input:checked + span { border: 2px solid var(--primary); }
.option-card input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.sub-options { border: 0; margin: 0; padding: 0; padding-inline-start: 2rem; display: flex;
  flex-direction: column; gap: .4rem; }
.ok-notice { background: var(--teal-soft); border-color: var(--primary); color: var(--primary); }
.danger-notice { background: var(--danger-bg); border-color: #f2c9c4; color: #5e2420; }
.code-input.national { letter-spacing: .15em; font-size: 1.2rem; }
.lock-note { display: flex; align-items: flex-start; justify-content: center; gap: .35rem; margin: .75rem 0 0; }
.lock-note svg { flex-shrink: 0; margin-top: .3rem; }
.list-filters { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .5rem; }
.three-selects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.three-selects .field { margin: 0; }
.three-selects label { font-size: .8rem; color: var(--muted); font-weight: 400; }
.three-selects select { min-height: 44px; padding-inline: .4rem; font-size: .85rem; }
.row-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.list-row { display: flex; gap: .75rem; padding: .75rem; border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface); color: var(--text); text-decoration: none; }
.list-thumb { width: 72px; height: 72px; flex-shrink: 0; border-radius: 12px; object-fit: cover;
  background: var(--teal-soft); }
.list-row .row-body { display: flex; flex-direction: column; gap: .3rem; flex: 1; min-width: 0; }
.pager-more { display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.full-width { width: 100%; }
.big-amount { font-size: 1.8rem; color: var(--primary); }

/* Footer (decisions.md, showcase): about, contact, terms, privacy, and the enamad seal */
.site-footer { display: flex; flex-direction: column; align-items: center; gap: .6rem;
  max-width: 720px; margin: 2rem auto 0; padding: 1rem 1rem 1.5rem; text-align: center;
  border-top: 1px solid var(--border); }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1rem; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer p { margin: 0; }
.trust-seal img { display: block; }
.contact-list dd a { font-weight: 700; }
