/* =========================================================================
   Arak Hamyar — design system
   Warm terracotta (Arak's Persian brickwork) + leaf green (the original logo)
   on soft sand. Uses CSS logical properties throughout so the whole layout
   mirrors automatically for Farsi (dir="rtl").
   ========================================================================= */

:root {
    --brand-50: #fbf1ea;
    --brand-100: #f6e0d2;
    --brand-500: #c25a2c;
    --brand-600: #a8471f;
    --brand-700: #8f3b18;
    --brand-800: #6d2c12;
    --green-50: #eaf5ee;
    --green-600: #2f7a4f;
    --green-700: #256340;
    --gold-500: #c9932f;
    --warn-50: #fff6e0;
    --warn-700: #8a5a00;
    --alert-50: #fdecea;
    --alert-700: #a3261b;
    --info-50: #eaf1fb;
    --info-700: #24508f;

    --bg: #fbf7f2;
    --bg-tint: #f4ebe1;
    --surface: #ffffff;
    --surface-2: #fbf6f0;
    --text: #2b211b;
    --text-muted: #6b5a4e;
    --line: #eadfd3;
    --link: var(--brand-700);
    --focus: #1f6feb;

    --radius-sm: 10px;
    --radius: 18px;
    --radius-lg: 28px;
    --shadow-sm: 0 1px 2px rgba(80, 40, 20, .06), 0 2px 8px rgba(80, 40, 20, .05);
    --shadow: 0 2px 6px rgba(80, 40, 20, .06), 0 12px 32px rgba(80, 40, 20, .08);
    --shadow-lg: 0 24px 60px rgba(80, 40, 20, .16);

    --font-latin: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-fa: "Vazirmatn", "Inter", Tahoma, system-ui, sans-serif;
    --font: var(--font-latin);
    --leading: 1.65;

    --gutter: 16px;
    --container: 1180px;
    --header-h: 72px;
    --ease: cubic-bezier(.2, .7, .2, 1);

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --brand-50: #3a2216;
        --brand-100: #4a2b1c;
        --brand-600: #e0794a;
        --brand-700: #ef9a72;
        --green-50: #1b3326;
        --green-600: #6cc18f;
        --green-700: #8fd3aa;
        --warn-50: #3a2f14;
        --warn-700: #f2c66d;
        --alert-50: #3d1d1a;
        --alert-700: #f29a90;
        --info-50: #1a2a40;
        --info-700: #9cc0f2;
        --bg: #17120f;
        --bg-tint: #1f1915;
        --surface: #241c17;
        --surface-2: #2b221c;
        --text: #f3ebe4;
        --text-muted: #c2b1a3;
        --line: #3b2f27;
        --link: #ef9a72;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow: 0 10px 30px rgba(0, 0, 0, .35);
        --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] { color-scheme: dark; }

html[lang="fa"] { --font: var(--font-fa); --leading: 1.9; }

@media (min-width: 768px) { :root { --gutter: 24px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: var(--leading);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
img, video, iframe { max-width: 100%; }
img, video { height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-600); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.015em; }
html[lang="fa"] :is(h1, h2, h3, h4) { letter-spacing: 0; line-height: 1.5; }
h1, .h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); }
h2, .h2 { font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.35rem); }
h3, .h3 { font-size: 1.3rem; }
.h4, h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
code { font-size: .9em; background: var(--bg-tint); padding: .1em .35em; border-radius: 6px; }
.muted { color: var(--text-muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.mt-xl { margin-top: 2.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--brand-700); color: #fff; padding: 10px 16px; border-radius: 10px; transition: top .2s; }
.skip-link:focus { top: 12px; color: #fff; }
main:focus { outline: none; }

/* Directional icons mirror in RTL */
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container.narrow { max-width: 820px; }
.container-wide { width: 100%; max-width: 1400px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Buttons ---------- */
.btn {
    --btn-bg: var(--surface); --btn-fg: var(--text); --btn-border: var(--line);
    display: inline-flex; align-items: center; justify-content: center; gap: .55em;
    min-height: 44px; padding: .65em 1.25em;
    font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
    color: var(--btn-fg); background: var(--btn-bg); border: 1.5px solid var(--btn-border); border-radius: 999px;
    cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s, color .18s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); color: var(--btn-fg); }
.btn:active { transform: translateY(0); }
.btn-primary { --btn-bg: var(--brand-600); --btn-fg: #fff; --btn-border: var(--brand-600); }
.btn-primary:hover { --btn-bg: var(--brand-700); --btn-border: var(--brand-700); box-shadow: 0 8px 22px rgba(168, 71, 31, .3); }
.btn-light { --btn-bg: rgba(255, 255, 255, .95); --btn-fg: #2b211b; --btn-border: transparent; }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--text); --btn-border: var(--line); }
.btn-ghost:hover { --btn-bg: var(--surface); }
.btn-danger { --btn-bg: transparent; --btn-fg: var(--alert-700); --btn-border: currentColor; }
.btn-sm { min-height: 38px; padding: .45em .95em; font-size: .9rem; }
.btn-lg { min-height: 52px; padding: .8em 1.6em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.link-arrow { display: inline-flex; align-items: center; gap: .45em; font-weight: 600; text-decoration: none; color: var(--brand-700); }
.link-arrow i { transition: transform .2s var(--ease); }
.link-arrow:hover i { transform: translateX(4px); }
[dir="rtl"] .link-arrow:hover i.flip-rtl { transform: scaleX(-1) translateX(4px); }
.link-back { margin-bottom: 1.25rem; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-logo { width: 44px; height: 44px; object-fit: contain; border-radius: 50%; background: #fff; padding: 3px; box-shadow: var(--shadow-sm); flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.08rem; }
.brand-text small { color: var(--text-muted); font-size: .78rem; }
.nav-toggle {
    margin-inline-start: auto; display: inline-grid; place-items: center; width: 44px; height: 44px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; font-size: 1.1rem;
}
.site-nav {
    position: absolute; inset-inline: 0; top: 100%;
    display: none; flex-direction: column; gap: 8px;
    padding: 12px var(--gutter) 20px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.site-nav.is-open { display: flex; animation: slideDown .22s var(--ease); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.site-nav ul a { display: block; padding: 12px 14px; border-radius: 12px; font-weight: 500; text-decoration: none; color: var(--text); }
.site-nav ul a:hover { background: var(--bg-tint); }
.site-nav ul a[aria-current="page"] { color: var(--brand-700); background: var(--brand-50); font-weight: 600; }
.nav-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line); }
/* ---------- Members portal ---------- */
.portal-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 1.75rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.portal-bar .eyebrow { margin-bottom: .2rem; }
.portal-hello { margin: 0; font-size: 1.35rem; font-weight: 700; }
.portal-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.portal-tabs a { display: inline-flex; align-items: center; gap: .45em; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem; }
.portal-tabs a:hover { border-color: var(--brand-600); color: var(--brand-700); }
.portal-tabs a[aria-current="page"] { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.portal-grid { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; margin-bottom: 20px; }
@media (min-width: 960px) { .portal-grid { grid-template-columns: 2fr 1fr; } .portal-grid-even { grid-template-columns: 1fr; } }
@media (min-width: 1280px) { .portal-grid-even { grid-template-columns: 3fr 2fr; } }
.portal-grid > * { min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.card-head h2 i, .panel > h2 i { color: var(--brand-600); }
.report-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 1.5rem; }
.report-head h1, .report-head p { margin: 0; }
.summary-small { font-size: 1.15rem !important; }
.summary-card-warn { background: var(--warn-50); }
.summary-card-alert { background: var(--alert-50); }
.table-card { margin-bottom: 20px; }
.panel { margin-bottom: 0; }
.bar-chart { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 220px; }
.bar-chart li { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.bar { width: 100%; max-width: 44px; height: var(--h); min-height: 2px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--brand-500), var(--brand-700)); transition: height .6s var(--ease); }
.bar-value { font-size: .72rem; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.bar-label { font-size: .7rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 640px) { .bar-chart { gap: 3px; height: 180px; } .bar-value { display: none; } .bar-label { writing-mode: vertical-rl; transform: rotate(180deg); height: 48px; } }
.password-field { position: relative; display: block; }
.password-field input { padding-inline-end: 48px; }
.password-toggle { position: absolute; inset-block: 0; inset-inline-end: 4px; width: 40px; border: 0; background: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; }
.password-toggle:hover { color: var(--brand-700); }
.flash-wrap { padding-top: 20px; }
.flash-wrap .alert { margin: 0; }
.login-panel > a.small { align-self: center; }
.nav-lock { font-size: .75em; opacity: .6; margin-inline-end: 4px; }
.nav-signout { margin: 0; }
.login-panel { max-width: 520px; margin-inline: auto; display: flex; flex-direction: column; gap: 14px; }
.login-panel h1 { margin: 0; }
.login-panel .alert, .login-panel p { margin: 0; }
.lang-switch {
    display: inline-flex; align-items: center; gap: .45em; min-height: 38px; padding: .4em .9em;
    border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .92rem;
}
.lang-switch[lang="fa"] { font-family: var(--font-fa); }
.lang-switch[lang="en"] { font-family: var(--font-latin); }
.lang-switch:hover { border-color: var(--brand-600); color: var(--brand-700); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } }

@media (min-width: 1024px) {
    .nav-toggle { display: none; }
    .site-nav { position: static; display: flex; flex-direction: row; align-items: center; margin-inline-start: auto; padding: 0; background: none; border: 0; box-shadow: none; gap: 18px; }
    .site-nav ul { flex-direction: row; gap: 2px; }
    .site-nav ul a { padding: 8px 12px; }
    .nav-actions { border: 0; padding: 0; }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; color: #fff; min-height: min(86vh, 760px); display: grid; align-items: center; overflow: hidden; }
.hero-bg, .page-hero-bg, .cta-band-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img, .page-hero-bg img, .cta-band-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(100deg, rgba(36, 18, 8, .9) 0%, rgba(60, 28, 12, .72) 45%, rgba(60, 28, 12, .25) 100%);
}
[dir="rtl"] .hero-bg::after { background: linear-gradient(-100deg, rgba(36, 18, 8, .9) 0%, rgba(60, 28, 12, .72) 45%, rgba(60, 28, 12, .25) 100%); }
.hero-inner { padding-block: 96px 140px; }
.hero-copy { max-width: 640px; }
.hero h1 { color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, .3); }
.hero .lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); color: rgba(255, 255, 255, .9); max-width: 560px; margin-bottom: 2rem; }
.eyebrow {
    display: inline-flex; align-items: center; gap: .5em; margin: 0 0 .9rem;
    font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-600);
}
html[lang="fa"] .eyebrow { letter-spacing: 0; font-size: .9rem; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; border-radius: 2px; }
.eyebrow-light { color: #f6c9a8; }
.lead-dark { font-size: 1.12rem; color: var(--text); }

/* Smaller hero for inner pages */
.page-hero { position: relative; isolation: isolate; color: #fff; overflow: hidden; }
.page-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(36, 18, 8, .72), rgba(60, 28, 12, .86)); }
.page-hero-inner { padding-block: 72px 64px; max-width: 820px; }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 1.4rem + 2vw, 2.9rem); }
.page-hero .lead { color: rgba(255, 255, 255, .88); font-size: 1.1rem; margin: 0; }

/* ---------- Stats ---------- */
.stats-band { position: relative; z-index: 2; margin-top: -84px; }
.stats { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.stat { background: var(--surface); padding: 22px 18px; display: flex; flex-direction: column-reverse; gap: 4px; text-align: center; }
.stat dd { margin: 0; font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.1rem); font-weight: 800; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.stat dt { color: var(--text-muted); font-size: .9rem; }
@media (min-width: 768px) { .stats { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; } .stat { padding: 30px 20px; } }

/* ---------- Sections & layout ---------- */
.section { padding-block: clamp(56px, 4rem + 3vw, 104px); }
.section-top { padding-top: clamp(32px, 2rem + 2vw, 56px); }
.section-tint { background: var(--bg-tint); }
.section-head { max-width: 680px; margin-bottom: 2.5rem; }
.section-head h2 { margin: 0; }
.section-head-row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

.grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
    .split { grid-template-columns: 1fr 1fr; gap: 64px; }
    .split-reverse .split-media { order: -1; }
}
.split-media { position: relative; }
.split-media > img:first-child { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.split-media-accent {
    position: absolute; inset-block-end: -26px; inset-inline-end: -10px; width: 112px !important; height: 112px; aspect-ratio: 1 !important;
    object-fit: cover; border-radius: 50% !important; border: 6px solid var(--bg); box-shadow: var(--shadow);
}
@media (min-width: 900px) { .split-media-accent { inset-inline-end: -26px; width: 140px !important; height: 140px; } }

/* ---------- Cards ---------- */
.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover, .post-card:hover, .feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand-600) 30%, var(--line)); }
.feature-card, .value-card, .about-card, .contact-card { position: relative; padding: 28px 24px; }
.feature-card h3, .value-card h3 { font-size: 1.15rem; margin-top: 18px; }
.feature-card p, .value-card p, .about-card p, .contact-card p { color: var(--text-muted); margin: 0; }
.feature-icon {
    display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 16px;
    background: var(--brand-50); color: var(--brand-600); font-size: 1.3rem;
}
.feature-icon-green { background: var(--green-50); color: var(--green-600); }
.feature-num { position: absolute; inset-block-start: 20px; inset-inline-end: 22px; font-size: 2.2rem; font-weight: 800; color: var(--line); line-height: 1; }
.about-card h2 { margin-top: 18px; }
.contact-card h2 { margin: 16px 0 4px; }

.post-card { display: flex; flex-direction: column; overflow: hidden; }
.post-card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-tint); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.post-card:hover .post-card-media img { transform: scale(1.05); }
.post-card-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 24px; flex: 1; }
.post-card-title { font-size: 1.12rem; margin: 0; }
.post-card-title a { color: var(--text); text-decoration: none; }
.post-card-title a::after { content: ""; position: absolute; inset: 0; }
.post-card { position: relative; }
.post-card-excerpt { color: var(--text-muted); font-size: .95rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .link-arrow { margin-top: auto; font-size: .92rem; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--text-muted); font-size: .88rem; margin: 0; }

.badge {
    display: inline-flex; align-items: center; gap: .3em; padding: .2em .65em; border-radius: 999px;
    font-size: .76rem; font-weight: 600; line-height: 1.5; background: var(--bg-tint); color: var(--text-muted); white-space: nowrap;
}
.badge-green { background: var(--green-50); color: var(--green-700); }
.badge-warn { background: var(--warn-50); color: var(--warn-700); }
.badge-alert { background: var(--alert-50); color: var(--alert-700); }
.badge-info { background: var(--info-50); color: var(--info-700); }

/* ---------- Meeting card ---------- */
.meeting-card { display: flex; gap: 20px; align-items: flex-start; padding: 24px; margin-top: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.meeting-date {
    flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 84px; height: 92px; border-radius: 18px; color: #fff;
    background: linear-gradient(160deg, var(--brand-500), var(--brand-800));
}
.meeting-day { font-size: 2rem; font-weight: 800; line-height: 1; }
.meeting-month { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.meeting-info { flex: 1; min-width: 0; }
.meeting-info .eyebrow { margin-bottom: .3rem; }
.meeting-info h3 { margin-bottom: .4rem; }
.meeting-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--text-muted); margin-bottom: .6rem; }
@media (max-width: 520px) { .meeting-card { flex-direction: column; } .meeting-date { flex-direction: row; gap: 8px; width: auto; height: auto; padding: 8px 16px; } .meeting-day { font-size: 1.4rem; } .meeting-month { margin: 0; } }

/* ---------- CTA band ---------- */
.cta-band { position: relative; isolation: isolate; overflow: hidden; color: #fff; text-align: center; }
.cta-band-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(143, 59, 24, .93), rgba(37, 99, 64, .88)); }
.cta-inner { padding-block: clamp(64px, 5rem + 2vw, 112px); max-width: 760px; }
.cta-inner h2 { color: #fff; }
.cta-inner p { font-size: 1.12rem; color: rgba(255, 255, 255, .9); margin-bottom: 2rem; }

/* ---------- Search & toolbar ---------- */
.search-bar { position: relative; display: flex; align-items: center; gap: 8px; max-width: 560px; margin: 0 auto 2.5rem; padding: 6px; padding-inline-start: 44px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm); }
.search-bar:focus-within { border-color: var(--brand-600); }
.search-bar > i { position: absolute; inset-inline-start: 18px; color: var(--text-muted); }
.search-bar input { flex: 1; min-width: 0; min-height: 40px; border: 0; background: transparent; font: inherit; color: var(--text); outline: none; }
.search-bar-inline { margin: 0; max-width: 340px; flex: 1 1 240px; padding-block: 2px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 1.5rem; }
.toolbar p { margin: 0; }

/* ---------- Members ---------- */
.member-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .member-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .member-grid { grid-template-columns: repeat(3, 1fr); } }
.member-card { display: flex !important; align-items: center; gap: 14px; padding: 16px 18px; }
.member-card-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.member-card-body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.member-card-total { display: flex; flex-direction: column; align-items: flex-end; text-align: end; }
.member-card-total strong { color: var(--green-700); font-variant-numeric: tabular-nums; }
.avatar {
    display: inline-grid; place-items: center; flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%;
    background: linear-gradient(140deg, var(--brand-100), var(--green-50)); color: var(--brand-700); font-weight: 800; font-size: 1.15rem;
}
.avatar-lg { width: 72px; height: 72px; font-size: 1.8rem; }
.person-card { display: flex !important; flex-direction: column; align-items: center; gap: 8px; padding: 28px; text-align: center; }
.person-card .avatar { width: 64px; height: 64px; font-size: 1.5rem; }

.statement-head { display: flex; align-items: center; gap: 18px; margin-bottom: 1.75rem; }
.statement-head h1 { margin: 0; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
.statement-head .eyebrow { margin-bottom: .2rem; }
.summary-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 0 0 1.75rem; }
.summary-card { padding: 20px 22px; }
.summary-card dt { color: var(--text-muted); font-size: .9rem; }
.summary-card dd { margin: 4px 0 0; font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.summary-card-primary { background: linear-gradient(140deg, var(--brand-600), var(--brand-800)); border-color: transparent; color: #fff; }
.summary-card-primary dt { color: rgba(255, 255, 255, .85); }

/* ---------- Tables ---------- */
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.data-table th, .data-table td { padding: 14px 18px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table thead th { background: var(--surface-2); color: var(--text-muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
html[lang="fa"] .data-table thead th { text-transform: none; letter-spacing: 0; font-size: .88rem; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table .num { text-align: end; font-variant-numeric: tabular-nums; }
.data-table td[dir="ltr"] { text-align: start; }
[dir="rtl"] .data-table td[dir="ltr"] { text-align: right; }
.amount { font-weight: 700; margin-inline-end: 6px; }
.amount-in { color: var(--green-700); }
.amount-collected { color: var(--text-muted); }
.data-table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.data-table .actions form { margin: 0; }

/* Stack table rows as cards on small screens */
@media (max-width: 720px) {
    .responsive-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
    .responsive-table tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
    .responsive-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border: 0; text-align: end !important; }
    .responsive-table td::before { content: attr(data-label); color: var(--text-muted); font-size: .85rem; font-weight: 600; text-align: start; }
    .responsive-table td:not([data-label])::before { content: none; }
    .data-table .actions { justify-content: flex-start; padding-top: 10px; }
}

/* ---------- Timeline & steps ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; inset-block: 8px; inset-inline-start: 11px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-inline-start: 44px; padding-bottom: 28px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--brand-600); box-shadow: 0 0 0 5px var(--brand-50); }
.timeline-date { display: block; font-weight: 700; color: var(--brand-700); }
.timeline p { margin: 2px 0 0; color: var(--text-muted); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.steps li::before { content: counter(step); flex-shrink: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-600); color: #fff; font-weight: 700; }
html[lang="fa"] .steps li::before { content: counter(step, persian); }

/* ---------- Single post ---------- */
.post-hero { padding-block: clamp(36px, 3rem + 2vw, 72px) 24px; }
.post-hero h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.7rem); }
.post-cover { margin: 0 0 2rem; }
.post-cover img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.prose { font-size: 1.06rem; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { margin-top: 1.8em; }
.prose img { border-radius: var(--radius-sm); margin-inline: auto; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { text-align: center; color: var(--text-muted); font-size: .9rem; margin-top: .5em; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose blockquote { margin: 1.5em 0; padding: 1em 1.4em; border-inline-start: 4px solid var(--brand-600); background: var(--brand-50); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; }
.prose iframe, .prose video { width: 100%; border-radius: var(--radius-sm); }
.prose iframe { aspect-ratio: 16 / 9; height: auto; border: 0; }
.prose .wp-block-gallery, .prose .blocks-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; padding: 0; list-style: none; }
.prose .wp-block-gallery figure, .prose .blocks-gallery-item { margin: 0; }
.prose .wp-block-gallery img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.prose .wp-block-columns, .prose .uagb-columns__inner-wrap, .prose .uagb-container-inner-blocks-wrap { display: flex; flex-wrap: wrap; gap: 24px; }
.prose .wp-block-column { flex: 1 1 260px; min-width: 0; }
.prose .aligncenter { margin-inline: auto; text-align: center; }
.prose .wp-block-button__link, .prose .uagb-buttons-repeater { display: inline-flex; padding: .6em 1.2em; border-radius: 999px; background: var(--brand-600); color: #fff; text-decoration: none; }
.prose .has-text-align-center { text-align: center; }
.prose .has-text-align-right { text-align: right; }
.prose .has-text-align-left { text-align: left; }
.post-nav { display: grid; gap: 14px; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav-link { display: flex !important; flex-direction: column; gap: 4px; padding: 18px 20px; }
.post-nav-next { text-align: end; grid-column: -2; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 2.5rem; flex-wrap: wrap; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 24px; text-align: center; color: var(--text-muted); }
.empty-state > i { font-size: 2rem; color: var(--brand-600); }
.big-number { font-size: 4.5rem; font-weight: 800; color: var(--brand-100); line-height: 1; }

/* ---------- Forms ---------- */
.stack { display: flex; flex-direction: column; gap: 16px; }
.form-card { padding: clamp(22px, 2rem + 1vw, 40px); }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; }
.field > span:first-child { color: var(--text); }
.field small { font-weight: 400; }
.field-wide { grid-column: 1 / -1; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
    width: 100%; min-height: 44px; padding: 10px 14px; font: inherit; font-weight: 400; color: var(--text);
    background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-600) 18%, transparent); }
.search-bar input:focus { box-shadow: none; }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--brand-600); flex-shrink: 0; margin-top: 3px; }
.field-error { color: var(--alert-700); font-weight: 500; font-size: .85rem; }
.toggle-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); }
.toggle-row span { display: flex; flex-direction: column; }
.toggle-row:hover { border-color: color-mix(in srgb, var(--brand-600) 40%, var(--line)); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 700; font-size: 1.05rem; margin-bottom: 12px; padding: 0; }
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid legend { grid-column: 1 / -1; } }

.alert { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 18px; margin: 0 0 1.25rem; border-radius: 12px; border: 1px solid transparent; }
.alert-success { background: var(--green-50); color: var(--green-700); border-color: color-mix(in srgb, var(--green-600) 25%, transparent); }
.alert-error { background: var(--alert-50); color: var(--alert-700); border-color: color-mix(in srgb, var(--alert-700) 25%, transparent); }
.alert-info { background: var(--info-50); color: var(--info-700); border-color: color-mix(in srgb, var(--info-700) 20%, transparent); }
.alert-warn { background: var(--warn-50); color: var(--warn-700); }
.alert form, .alert p { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: #24170f; color: #e9ddd2; padding-top: 64px; }
.site-footer a { color: #f6c9a8; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1fr; padding-bottom: 40px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1.2fr; } }
.footer-about p { color: #cbb9aa; max-width: 420px; margin-top: 16px; }
.brand-footer, .brand-footer:hover { color: #fff; }
.brand-footer .brand-text small { color: #cbb9aa; }
.brand-footer .brand-logo { width: 52px; height: 52px; padding: 0; object-fit: cover; }
.footer-title { font-size: 1rem; color: #fff; margin-bottom: 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: #cbb9aa; }
.footer-links i { width: 18px; color: #f6c9a8; margin-inline-end: 6px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-block: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .88rem; color: #a8968a; }

/* ---------- Reveal animation ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .js [data-reveal] { opacity: 1; transform: none; }
}

/* =========================================================================
   Admin
   ========================================================================= */
.admin { background: var(--bg); }
.admin-bar { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); }
.admin-bar-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; position: relative; }
.admin-bar .brand-logo { width: 36px; height: 36px; }
.admin-nav { position: absolute; inset-inline: calc(var(--gutter) * -1); top: 100%; display: none; flex-direction: column; gap: 4px; padding: 12px var(--gutter); background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.admin-nav.is-open { display: flex; }
.admin-nav a { padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 500; }
.admin-nav a:hover { background: var(--bg-tint); }
.admin-nav a[aria-current="page"] { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.admin-nav form { margin: 0; }
@media (min-width: 1024px) {
    .admin-bar .nav-toggle { display: none; }
    .admin-nav { position: static; display: flex; flex-direction: row; align-items: center; margin-inline-start: auto; padding: 0; border: 0; box-shadow: none; background: none; }
}
.admin-main { padding-block: 28px 64px; display: flex; flex-direction: column; gap: 20px; }
.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.admin-head h1 { font-size: 1.7rem; margin: 0; }
.admin-head-sm { margin-bottom: 12px; }
.admin-head-sm h2 { margin: 0; }
.admin-head form { margin: 0; }
.panel { padding: 22px 24px; }
.panel > h2 { display: flex; align-items: center; gap: 8px; }
.panel > h2 i { color: var(--brand-600); }
.kpi-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .kpi-grid { grid-template-columns: repeat(4, 1fr); } }
.kpi { display: flex !important; flex-direction: column; gap: 2px; padding: 18px 20px; }
.kpi strong { font-size: 2rem; line-height: 1.1; }
.kpi-label { font-weight: 600; color: var(--text-muted); font-size: .9rem; }
.kpi-warn { border-color: color-mix(in srgb, var(--warn-700) 35%, var(--line)); background: var(--warn-50); }
.kpi-alert { border-color: color-mix(in srgb, var(--alert-700) 35%, var(--line)); background: var(--alert-50); }
.admin-grid { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .admin-grid { grid-template-columns: 1fr 1fr; } .admin-grid-form { grid-template-columns: 2fr 1fr; } }
.plain-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--text); font-size: .88rem; font-weight: 500; }
.chip[aria-current="true"] { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.filter-bar { display: grid; gap: 12px; grid-template-columns: 1fr; align-items: start; }
.filter-bar input, .filter-bar select { height: 44px; }
.filter-actions { align-self: end; }
@media (min-width: 720px) { .filter-bar { grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr auto; } }
.filter-actions { flex-wrap: nowrap; }
.form-narrow { max-width: 920px; }
.form-grid-tight { grid-template-columns: 1fr 1fr; gap: 12px; }
.table-card .data-table { min-width: 0; }
.sticky-actions { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 40%); }
.login-page { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 20% 20%, var(--brand-50), var(--bg) 60%); }
.login-wrap { width: 100%; max-width: 420px; padding: var(--gutter); }
.login-card { text-align: center; }
.login-card .field { text-align: start; }
.login-logo { width: 96px; height: 96px; margin: 0 auto; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); }
html[lang="fa"] .summary-card dd { font-size: 1.35rem; }

/* ---------- Bank-style statement ---------- */
.statement { margin-bottom: 28px; scroll-margin-top: calc(var(--header-h) + 12px); }
.statement-heading { display: flex; align-items: center; gap: 10px; margin: 2.5rem 0 1rem; }
.statement-heading i { color: var(--brand-600); }
.statement-controls { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
.statement-range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.statement-range .field { font-size: .8rem; }
.statement-range input { min-height: 38px !important; padding: 6px 10px !important; }
.statement-sheet { padding: clamp(18px, 1rem + 1.5vw, 34px); }
.statement-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 18px; border-bottom: 3px solid var(--brand-600); }
.statement-org { display: flex; align-items: center; gap: 12px; }
.statement-org img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.statement-org strong { display: block; font-size: 1.2rem; }
.statement-title { text-align: end; }
.statement-title h2 { margin: 0; font-size: 1.3rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-700); }
html[lang="fa"] .statement-title h2 { text-transform: none; letter-spacing: 0; }
.statement-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 24px; margin: 18px 0; }
.statement-meta dt, .statement-summary dt { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
html[lang="fa"] .statement-meta dt, html[lang="fa"] .statement-summary dt { text-transform: none; letter-spacing: 0; font-size: .82rem; }
.statement-meta dd { margin: 2px 0 0; font-weight: 600; }
.statement-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 0 0 18px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
@media (min-width: 720px) { .statement-summary { grid-template-columns: repeat(4, 1fr); } }
.statement-summary > div { background: var(--surface-2); padding: 12px 16px; }
.statement-summary dd { margin: 4px 0 0; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.statement-closing { background: var(--brand-50) !important; }
.statement-closing dd { color: var(--brand-700); }
.bank-table { font-size: .9rem; }
.bank-table th, .bank-table td { padding: 10px 12px; }
.bank-table tbody tr:nth-child(even) { background: var(--surface-2); }
.bank-table .num { white-space: nowrap; }
.bank-table td.num { font-variant-numeric: tabular-nums; }
.bank-opening td { font-style: italic; background: var(--bg-tint) !important; }
.bank-table tfoot th, .bank-table tfoot td { border-top: 2px solid var(--text); font-weight: 700; background: var(--surface-2); }
.bank-empty { text-align: center; padding: 28px !important; }
.statement-note { margin: 14px 0 0; }
.account-cards { margin-top: 8px; }
@media (max-width: 720px) {
    .bank-table thead th:nth-child(2), .bank-table tbody td:nth-child(2) { display: none; }
    .bank-table th, .bank-table td { padding: 8px; }
    .bank-table tfoot th { font-size: .8rem; }
}

/* Print: only the statement sheet, A4, black on white */
@media print {
    @page { size: A4; margin: 14mm 12mm; }
    :root { --surface: #fff; --surface-2: #f6f6f6; --bg: #fff; --text: #000; --text-muted: #444; --line: #ccc; --brand-700: #6d2c12; }
    body { background: #fff !important; }
    .site-header, .site-footer, .skip-link, .no-print, .portal-bar, .flash-wrap { display: none !important; }
    body.printing-statement main > section > .container > *:not(.statement) { display: none !important; }
    body.printing-statement main > section ~ section { display: none !important; }
    .section, .section-top { padding: 0 !important; }
    .card { box-shadow: none !important; border: 0 !important; }
    .statement-sheet { padding: 0 !important; }
    .table-scroll { overflow: visible !important; }
    .bank-table { font-size: 9pt; }
    .bank-table thead { display: table-header-group; }
    .bank-table tr { break-inside: avoid; }
    .bank-table a { color: #000; text-decoration: none; }
    .bank-table thead th:nth-child(2), .bank-table tbody td:nth-child(2) { display: table-cell !important; }
    .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- Sorting ---------- */
.sort-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; }
.sort-btn:hover, .sort-btn:focus-visible { color: var(--brand-700); }
th.num .sort-btn { flex-direction: row-reverse; }
.sort-icon { font-size: .8em; opacity: .35; transition: opacity .15s; }
.sort-btn:hover .sort-icon { opacity: .7; }
.sort-icon.is-active { opacity: 1; color: var(--brand-600); }
th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--brand-700); }
.sort-select { display: inline-flex; align-items: center; gap: 8px; }
.sort-select select { width: auto; min-height: 38px; padding: 6px 12px; }
.sort-mobile { display: none; align-items: center; gap: 8px; padding: 12px 16px 0; font-size: .85rem; color: var(--text-muted); }
.sort-mobile select { width: auto; flex: 1; min-height: 38px; padding: 6px 10px; }
@media (max-width: 720px) { .sort-mobile { display: flex; } }
@media print { .sort-icon, .sort-mobile { display: none !important; } }

/* ---------- Contact preference choice cards ---------- */
.profile-panel { max-width: 600px; }
.choice-group legend { font-size: .92rem; font-weight: 600; margin-bottom: 8px; }
.choice-cards { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .choice-cards { grid-template-columns: repeat(3, 1fr); } }
.choice-card { position: relative; cursor: pointer; }
.choice-card input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-body { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; padding: 16px 12px; text-align: center; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .15s, background-color .15s, box-shadow .15s; }
.choice-body i { font-size: 1.4rem; color: var(--text-muted); margin-bottom: 2px; }
.choice-card:hover .choice-body { border-color: color-mix(in srgb, var(--brand-600) 45%, var(--line)); }
.choice-card input:checked + .choice-body { border-color: var(--brand-600); background: var(--brand-50); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-600) 15%, transparent); }
.choice-card input:checked + .choice-body i { color: var(--brand-600); }
.choice-card input:focus-visible + .choice-body { outline: 3px solid var(--focus); outline-offset: 2px; }
input[aria-invalid="true"] { border-color: var(--alert-700) !important; }
.contact-pref { display: inline-flex; gap: 4px; align-items: center; }

/* ---------- Sign-up ---------- */
.signup-panel { max-width: 760px; }
.signup-panel fieldset legend { font-size: 1rem; font-weight: 700; color: var(--brand-700); margin-bottom: 4px; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.input-affix { display: flex; align-items: stretch; }
.input-affix input { border-start-end-radius: 0 !important; border-end-end-radius: 0 !important; }
.input-affix > span { display: inline-flex; align-items: center; padding: 0 12px; white-space: nowrap; font-weight: 500; font-size: .85rem; color: var(--text-muted); background: var(--bg-tint); border: 1.5px solid var(--line); border-inline-start: 0; border-start-end-radius: 12px; border-end-end-radius: 12px; }

.pending-panel { border-color: color-mix(in srgb, var(--warn-700) 40%, var(--line)); background: var(--warn-50); }
.pending-panel blockquote { margin: 8px 0; padding: 10px 14px; background: var(--surface); border-inline-start: 4px solid var(--warn-700); border-radius: 8px; }
