/* We Friends Association — design modeled on nastonas.org (deep green + sand gold, RTL-first) */
:root {
  --green-900: #012916;
  --green-800: #024322;
  --green-700: #036234;
  --green-600: #0a7a45;
  --green-50: #eef5ef;
  --sand-300: #e9d9a8;
  --sand-500: #cfae5a;
  --sand-900: #4d3b0a;
  --ink: #1f2e25;
  --ink-soft: #4a5d52;
  --line: #dce7dd;
  --bg: #f4f8f4;
  --card: #ffffff;
  --danger: #b42318;
  --ok-bg: #e7f6ec;
  --warn-bg: #fdf5df;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px -12px rgba(1, 41, 22, .18);
  --wrap: 1180px;
  --font: "Cairo", "Plus Jakarta Sans", "Segoe UI", Tahoma, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.75;
  color: var(--ink); background: var(--bg); overflow-x: hidden;
}
html[lang="en"] body { line-height: 1.65; }
html[dir="ltr"] body { font-family: "Plus Jakarta Sans", "Cairo", "Segoe UI", system-ui, sans-serif; }
img { max-width: 100%; display: block; }
a { color: var(--green-700); text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; color: var(--green-900); }
h1 { font-size: clamp(1.8rem, 4.6vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 3.2vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--green-900); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--sand-500); outline-offset: 2px; border-radius: 6px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .65em 1.4em; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-donate { background: var(--sand-500); color: var(--green-900); }
.btn-donate:hover { background: var(--sand-300); }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-800); }
.btn-ghost { background: transparent; color: var(--green-700); border-color: var(--green-700); }
.btn-ghost:hover { background: var(--green-50); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); }
.btn-lg { min-height: 56px; font-size: 1.1rem; padding-inline: 1.8em; }
.btn-sm { min-height: 40px; font-size: .92rem; padding: .4em 1em; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--green-900); }
.brand img { width: 52px; height: 52px; border-radius: 12px; border: 1px solid var(--line); background: #fff; object-fit: contain; }
.brand strong { display: block; font-size: 1.05rem; line-height: 1.3; }
.brand small { display: block; font-size: .8rem; color: var(--ink-soft); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: .5em .8em; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .97rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--green-50); color: var(--green-700); }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.lang-btn { min-height: 44px; min-width: 44px; padding: 0 .8em; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 700; color: var(--green-700); cursor: pointer; }
.menu-btn { display: none; min-height: 44px; min-width: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--green-900); font-size: 1.2rem; cursor: pointer; }
.nav-links a, .btn, .brand strong { white-space: nowrap; }
/* collapse the menu earlier so longer English/Italian labels never wrap */
@media (max-width: 1440px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links { display: none; position: absolute; inset-inline: 0; top: 100%; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8em 1em; font-size: 1.05rem; }
}
@media (max-width: 980px) {
  .nav-tools .btn-donate { display: none; }
  .brand small { display: none; }
}

/* ---------- hero ---------- */
.hero { background: radial-gradient(120% 90% at 85% 0%, var(--green-700) 0%, var(--green-900) 62%); color: #fff; padding: 56px 0 64px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .95fr); gap: 40px; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--sand-300); }
.hero .lead { font-size: 1.12rem; color: #e3eee7; max-width: 60ch; }
.status-pill { display: inline-flex; align-items: center; gap: .5em; padding: .4em 1em; border-radius: 999px; background: rgba(233,217,168,.14); border: 1px solid rgba(233,217,168,.45); color: var(--sand-300); font-weight: 700; font-size: .93rem; margin-bottom: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-card { background: #fff; color: var(--ink); border-radius: 22px; padding: 26px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); }
.hero-card h2 { font-size: 1.2rem; margin-bottom: .3em; }
.hero-card .muted { font-size: .92rem; }
.hero-photo { border-radius: 14px; overflow: hidden; aspect-ratio: 16/10; margin-bottom: 16px; background: var(--green-50); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.qa { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.qa li { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 12px 14px; font-size: .95rem; color: #e3eee7; }
.qa b { display: block; color: var(--sand-300); font-size: .85rem; margin-bottom: 2px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero { padding: 36px 0 44px; } }
@media (max-width: 520px) { .qa { grid-template-columns: minmax(0, 1fr); } .hero-actions .btn { width: 100%; } }

/* ---------- progress ---------- */
.progress { margin: 14px 0 6px; }
.progress-track { height: 14px; border-radius: 999px; background: var(--green-50); overflow: hidden; border: 1px solid var(--line); }
.progress-bar { height: 100%; width: 0; background: repeating-linear-gradient(45deg, var(--green-700) 0 10px, var(--green-600) 10px 20px); border-radius: 999px; transition: width 1s ease; }
.progress-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: .92rem; color: var(--ink-soft); margin-top: 6px; }
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.figure { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; }
.figure b { display: block; font-size: 1.15rem; color: var(--green-900); }
.figure span { font-size: .8rem; color: var(--ink-soft); }
.pending { color: var(--sand-900); font-weight: 700; font-size: .95rem; }

/* ---------- sections ---------- */
section { padding: 64px 0; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.section-dark { background: var(--green-900); color: #e3eee7; }
.section-dark h2, .section-dark h3 { color: #fff; }
.eyebrow { display: inline-flex; align-items: center; gap: .5em; color: var(--green-700); font-weight: 800; font-size: .92rem; margin-bottom: 8px; }
.section-dark .eyebrow { color: var(--sand-300); }
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--sand-500); }
.section-head { max-width: 760px; margin-bottom: 32px; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }
.section-dark .section-head p { color: #c9d9cf; }
.muted { color: var(--ink-soft); }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } section { padding: 44px 0; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 1px 0 rgba(1,41,22,.03); }
.card h3 { margin-bottom: .35em; }
.icon { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: var(--green-50); color: var(--green-700); font-size: 1.25rem; margin-bottom: 12px; }

/* stats */
.stat { text-align: center; padding: 22px 12px; }
.stat b { display: block; font-size: clamp(1.6rem, 3.5vw, 2.2rem); color: var(--sand-300); line-height: 1.2; }
.stat span { color: #c9d9cf; font-size: .95rem; }
.stat small { display: block; color: #9fb6a8; font-size: .8rem; margin-top: 4px; }

/* project cards */
.project { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.project figure { margin: 0; aspect-ratio: 4/3; background: var(--green-50); overflow: hidden; }
.project figure img { width: 100%; height: 100%; object-fit: cover; }
.project .body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.project dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 10px; }
.project dt { font-size: .8rem; color: var(--ink-soft); }
.project dd { margin: 0; font-weight: 700; color: var(--green-900); }
.project .actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* badges (icon + text, never colour alone) */
.badge { display: inline-flex; align-items: center; gap: .4em; padding: .2em .75em; border-radius: 999px; font-size: .82rem; font-weight: 700; border: 1px solid; width: fit-content; }
.badge-done { background: var(--ok-bg); color: #145c32; border-color: #a6d8b8; }
.badge-progress { background: var(--warn-bg); color: var(--sand-900); border-color: #e8cf8a; }
.badge-pending { background: #f1f3f2; color: #3d4a43; border-color: #cdd6d0; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding-inline-start: 46px; padding-bottom: 22px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 16px; top: 34px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; inset-inline-start: 0; top: 2px; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .9rem; border: 2px solid; background: #fff; }
.timeline .done .dot { color: #145c32; border-color: #3c9a62; background: var(--ok-bg); }
.timeline .progress-step .dot { color: var(--sand-900); border-color: var(--sand-500); background: var(--warn-bg); }
.timeline .pending-step .dot { color: #5b6a61; border-color: #b9c6be; }
.timeline h3 { margin: 0 0 4px; font-size: 1.05rem; }
.timeline p { margin: 6px 0 0; color: var(--ink-soft); font-size: .96rem; }

/* flow diagram */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: step; }
.flow li { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; counter-increment: step; }
.flow li::before { content: counter(step); position: absolute; top: -14px; inset-inline-start: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--green-700); color: #fff; font-weight: 800; font-size: .9rem; display: flex; align-items: center; justify-content: center; }
.flow li:not(:last-child)::after { content: "\2190"; position: absolute; top: 50%; inset-inline-end: -14px; transform: translateY(-50%); color: var(--sand-500); font-weight: 900; font-size: 1.2rem; z-index: 1; }
html[dir="ltr"] .flow li:not(:last-child)::after { content: "\2192"; }
.flow h3 { font-size: 1rem; margin: 6px 0 6px; }
.flow p { font-size: .9rem; color: var(--ink-soft); margin: 0; }
.flow .who { display: block; margin-top: 8px; font-size: .82rem; font-weight: 700; color: var(--green-700); }
@media (max-width: 980px) {
  .flow { grid-template-columns: 1fr; gap: 22px; }
  .flow li:not(:last-child)::after, html[dir="ltr"] .flow li:not(:last-child)::after { content: "\2193"; top: auto; bottom: -22px; inset-inline-end: auto; inset-inline-start: 50%; transform: translateX(50%); }
}

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .96rem; }
th { background: var(--green-50); color: var(--green-900); font-weight: 800; font-size: .9rem; }
tfoot td { font-weight: 800; background: var(--bg); }
td.num, th.num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* notice */
.notice { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--radius-sm); padding: 14px 16px; border: 1px solid #e8cf8a; background: var(--warn-bg); color: var(--sand-900); font-size: .96rem; }
.notice.info { border-color: #a6d8b8; background: var(--ok-bg); color: #145c32; }
.notice i { margin-top: 4px; }

/* docs/updates */
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.log li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; }
.log time { font-weight: 700; color: var(--green-700); font-size: .9rem; white-space: nowrap; }
.log p { margin: 2px 0 0; font-size: .94rem; color: var(--ink-soft); }
@media (max-width: 640px) { .log li { grid-template-columns: minmax(0, 1fr); } }

/* team */
.person { display: flex; gap: 14px; align-items: flex-start; }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--green-700); color: var(--sand-300); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; }
.person .role { color: var(--green-700); font-weight: 700; font-size: .92rem; margin: 0 0 6px; }

/* faq */
details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 18px; }
details + details { margin-top: 10px; }
summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 700; color: var(--green-900); display: flex; justify-content: space-between; gap: 12px; min-height: 48px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.3rem; color: var(--green-700); line-height: 1; }
details[open] summary::after { content: "\2212"; }
details p { color: var(--ink-soft); }

/* forms */
.form { display: grid; gap: 16px; }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; color: var(--green-900); }
.field .hint { display: block; font-weight: 400; font-size: .85rem; color: var(--ink-soft); margin-top: 4px; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 16px; /* >=16px prevents iOS zoom */
  min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid #b9c9bf; background: #fff; color: var(--ink);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green-700); outline: 3px solid rgba(207,174,90,.45); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: .88rem; margin-top: 4px; display: none; }
.field .err.show { display: block; }
.types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border: 0; padding: 0; margin: 0; }
.types label { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-weight: 600; min-height: 48px; margin: 0; }
.types input { width: 20px; height: 20px; min-height: 0; accent-color: var(--green-700); }
.types label:has(input:checked) { border-color: var(--green-700); background: var(--green-50); }
@media (max-width: 640px) { .types { grid-template-columns: minmax(0, 1fr); } }
.hp { position: absolute; inset-inline-start: -9999px; }
.form-status { border-radius: 12px; padding: 14px 16px; display: none; }
.form-status.show { display: block; }
.form-status.ok { background: var(--ok-bg); color: #145c32; border: 1px solid #a6d8b8; }
.form-status.fail { background: #fdecea; color: var(--danger); border: 1px solid #f3b8b1; }

/* share */
.share { display: flex; flex-wrap: wrap; gap: 10px; }
.share .btn { border-color: var(--line); background: #fff; color: var(--ink); }
.share .btn:hover { border-color: var(--green-700); }
.share .wa i { color: #128c4a; }
.share .fb i { color: #1877f2; }

/* footer */
.site-footer { background: var(--green-900); color: #c9d9cf; padding: 48px 0 110px; font-size: .95rem; }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer a { color: #e3eee7; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding-top: 18px; font-size: .85rem; color: #9fb6a8; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 981px) { .site-footer { padding-bottom: 48px; } }

/* mobile donate bar */
.mobile-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 60; display: none; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgba(1,41,22,.25); }
.mobile-bar .btn { flex: 1; min-height: 50px; }
@media (max-width: 980px) { .mobile-bar { display: flex; } }

/* toast */
.toast { position: fixed; top: 90px; left: 50%; transform: translateX(-50%); z-index: 90; background: var(--green-900); color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 700; box-shadow: var(--shadow); display: none; max-width: calc(100% - 32px); }
.toast.show { display: block; }

/* page hero (inner pages) */
.page-hero { background: var(--green-900); color: #e3eee7; padding: 44px 0; }
.page-hero h1 { color: #fff; }
.page-hero p { max-width: 70ch; color: #c9d9cf; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.toc a { color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: .35em .9em; text-decoration: none; font-size: .92rem; min-height: 40px; display: inline-flex; align-items: center; }
.toc a:hover { background: rgba(255,255,255,.1); }

.glossary { font-size: .9rem; color: var(--ink-soft); }
abbr[title] { text-decoration: underline dotted; cursor: help; }

/* stat: number large, unit smaller */
.stat b .ltr { font-size: inherit; }
.stat b .unit { display: block; font-size: 1rem; color: #fff; font-weight: 700; }
.figure b.pending, .card b.pending { font-size: .92rem; color: var(--sand-900); }

/* ===== projects page (modeled on nastonas.org/projects/development) ===== */
.pj-banner { background-color: #d5e4d8; background-image: radial-gradient(rgba(3,98,52,.10) 1.5px, transparent 1.5px); background-size: 22px 22px; padding: 30px 0 34px; }
.pj-banner h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 8px 0 10px; }
.pj-banner p { max-width: 95ch; color: var(--ink); margin: 0; }
.crumbs { font-size: .92rem; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.crumbs a { color: var(--green-900); text-decoration: none; font-weight: 600; }
.pj-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.pj-stat { border-radius: 22px; padding: 22px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pj-stat b { font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.2; margin-top: 8px; }
.pj-stat span:last-child { font-size: .98rem; }
.pj-stat-icon { width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.pj-stat-1 { background: #7d6a32; color: #fff; } .pj-stat-1 .pj-stat-icon { background: rgba(0,0,0,.22); }
.pj-stat-2 { background: var(--green-700); color: #fff; } .pj-stat-2 .pj-stat-icon { background: rgba(0,0,0,.22); }
.pj-stat-3 { background: #ece3c8; color: var(--sand-900); } .pj-stat-3 .pj-stat-icon { background: rgba(77,59,10,.12); }
.pj-stat-4 { background: #d5e8db; color: var(--green-900); } .pj-stat-4 .pj-stat-icon { background: rgba(3,98,52,.12); }
.pj-general { background: #d5e4d8; background-image: radial-gradient(rgba(3,98,52,.10) 1.5px, transparent 1.5px); background-size: 22px 22px; border-radius: 22px; padding: 18px; margin-bottom: 40px; }
.pj-general-inner { background: #fff; border-radius: 18px; padding: 24px; display: flex; gap: 22px; align-items: flex-start; }
.pj-general-icon { flex: none; width: 72px; height: 72px; border-radius: 18px; background: var(--green-50); color: var(--green-700); display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.pj-general h2 { font-size: 1.5rem; margin: 10px 0 6px; }
.pj-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; padding: .15em .75em; border-radius: 999px; border: 1px solid #c9b98a; color: #6b5a26; font-size: .82rem; font-weight: 600; background: #fff; }
.pj-list-title { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 18px; }
.pj-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px; align-items: start; }
.pj-filter { background: #e3ede5; border-radius: 18px; padding: 14px; position: sticky; top: 92px; }
.pj-filter h3 { font-size: 1.05rem; margin: 2px 4px 10px; }
.pj-filter-box { background: #fff; border-radius: 14px; padding: 6px; display: grid; gap: 2px; }
.pj-cat { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; cursor: pointer; min-height: 46px; font-weight: 600; }
.pj-cat:hover { background: var(--green-50); }
.pj-cat input { width: 20px; height: 20px; accent-color: var(--green-700); flex: none; }
.pj-cat:has(input:checked) { background: var(--green-50); color: var(--green-800); }
.pj-cat-n { margin-inline-start: auto; font-size: .85rem; color: var(--ink-soft); background: var(--bg); border-radius: 999px; padding: 0 .6em; }
.pj-tools { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.pj-search { position: relative; flex: 1 1 260px; max-width: 360px; }
.pj-search i { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.pj-search input { padding-inline-start: 40px; border-radius: 999px; }
.pj-status { flex: 0 1 240px; }
.pj-status label { font-size: .88rem; margin-bottom: 4px; }
.pj-status select { border-radius: 999px; }
.pj-count { font-size: .9rem; margin: 6px 0 14px; }
.pj-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pj-card { background: #f3f1ec; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; border: 1px solid #e6e1d3; }
.pj-card-top { display: flex; justify-content: space-between; align-items: center; }
.pj-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--green-700); color: var(--sand-300); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.pj-code { font-size: .8rem; font-weight: 700; color: var(--ink-soft); background: #fff; border-radius: 8px; padding: .15em .6em; }
.pj-card h3 { font-size: 1.08rem; margin: 2px 0 0; }
.pj-summary { color: var(--ink-soft); font-size: .94rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pj-block h4 { margin: 0 0 4px; font-size: .86rem; color: var(--green-700); display: flex; align-items: center; gap: 6px; }
.pj-block p { margin: 0; color: var(--ink-soft); font-size: .94rem; }
.pj-block ul { margin: 0; padding-inline-start: 18px; color: var(--ink-soft); font-size: .92rem; display: grid; gap: 3px; }
.pj-block li::marker { color: var(--green-700); }
.pj-locked { margin: 2px 0 0; display: flex; gap: 7px; align-items: flex-start; font-size: .8rem; color: var(--muted, #6b7280); background: #fff; border: 1px dashed #d8d1bd; border-radius: 10px; padding: 7px 10px; }
.pj-locked i { margin-top: 4px; font-size: .75rem; }
.pj-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 2px 0 4px; padding-top: 10px; border-top: 1px dashed #d6cfbb; }
.pj-meta dt { font-size: .78rem; color: var(--ink-soft); }
.pj-meta dd { margin: 0; font-weight: 700; font-size: .9rem; color: var(--green-900); }
.pj-meta-wide { grid-column: 1 / -1; }
.pj-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.pj-actions .btn { flex: 1 1 auto; }
@media (max-width: 1180px) { .pj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .pj-layout { grid-template-columns: minmax(0, 1fr); }
  .pj-filter { position: static; }
  .pj-filter-box { display: flex; flex-wrap: wrap; gap: 6px; background: transparent; padding: 0; }
  .pj-cat { background: #fff; flex: 1 1 auto; }
  .pj-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .pj-stat { padding: 16px 8px; }
}
@media (max-width: 640px) {
  .pj-grid { grid-template-columns: minmax(0, 1fr); }
  .pj-general-inner { flex-direction: column; }
  .pj-search { max-width: none; }
  .pj-status { flex: 1 1 100%; }
}
.pj-dialog { border: 0; border-radius: 20px; padding: 0; width: min(520px, calc(100% - 32px)); max-height: calc(100% - 32px); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
.pj-dialog::backdrop { background: rgba(1,41,22,.55); }
.pj-dialog .form { padding: 22px; }
.pj-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pj-dialog-head h2 { font-size: 1.3rem; margin: 0; }
.pj-close { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1.1rem; color: var(--ink); }
.req-project { background: var(--green-50); border-radius: 12px; padding: 10px 14px; font-size: .95rem; }

/* language switcher (ع / EN / IT) */
.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: #fff; }
.lang-switch button { min-width: 40px; min-height: 38px; padding: 0 .6em; border: 0; border-radius: 999px; background: transparent; font: inherit; font-weight: 700; font-size: .9rem; color: var(--ink-soft); cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--green-700); color: #fff; }
.lang-switch button:hover:not([aria-pressed="true"]) { color: var(--green-700); }
@media (max-width: 420px) { .lang-switch button { min-width: 34px; padding: 0 .4em; } .brand strong { font-size: .95rem; } }
.brand { min-width: 0; flex: 0 1 auto; }
.brand > span { min-width: 0; overflow: hidden; }
.brand strong { overflow: hidden; text-overflow: ellipsis; }
.nav-tools { flex: none; }
@media (max-width: 520px) { .brand > span { display: none; } }

.pj-list-title { scroll-margin-top: 90px; }
