/* ==========================================================================
   Український Легіон — Modern Military Civic Defense
   Dark graphite base · khaki · sand · burgundy CTA · subtle UA accents
   ========================================================================== */

:root {
  --bg: #0d100e;
  --bg-2: #11161300;
  --graphite: #15191700;
  --surface: #161b18;
  --surface-2: #1c2420;
  --surface-3: #232d27;
  --line: #2c352f;
  --line-soft: #222a25;

  --ink: #eef2ec;
  --muted: #9aa79e;
  --muted-2: #6f7a72;

  --khaki: #7c8556;
  --khaki-2: #99a06a;
  --sand: #cdbd97;
  --sand-2: #ddcfa8;

  --red: #9e2f2f;
  --red-2: #bb3b3b;
  --red-soft: rgba(187, 59, 59, .14);

  --blue: #2f6fb0;
  --yellow: #e8bd3a;

  --shadow: 0 26px 60px rgba(0, 0, 0, .55);
  --shadow-soft: 0 16px 36px rgba(0, 0, 0, .4);
  --radius: 4px;
  --radius-lg: 8px;

  --maxw: 1200px;
  --gutter: clamp(18px, 5vw, 64px);

  --mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* tactical grid texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(124, 133, 86, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 133, 86, .035) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: .6;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

h1, h2, h3, h4, p { margin-top: 0; }

h1 {
  margin-bottom: 20px;
  font-size: clamp(40px, 6vw, 82px);
  font-weight: 850;
  line-height: .96;
  letter-spacing: -.01em;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 820;
  line-height: 1.04;
  letter-spacing: -.005em;
  text-transform: uppercase;
}

h3 {
  margin-bottom: 10px;
  font-size: 21px;
  font-weight: 750;
  line-height: 1.2;
}

main { position: relative; z-index: 1; }

/* ---------- Eyebrow / tactical label ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  color: var(--sand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 9px;
  height: 17px;
  background: var(--red-2);
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px 24px;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}

.button.primary {
  color: #fff;
  background: var(--red);
  border-color: var(--red-2);
}
.button.primary:hover { background: var(--red-2); transform: translateY(-2px); }

.button.ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}
.button.ghost:hover { border-color: var(--khaki-2); background: rgba(124, 133, 86, .12); }

.button.sand {
  color: #1a1a14;
  background: var(--sand);
  border-color: var(--sand);
}
.button.sand:hover { background: var(--sand-2); transform: translateY(-2px); }

.button.compact { min-height: 40px; padding: 9px 16px; font-size: 12px; }
.button.danger { color: #fff; background: var(--red); border-color: var(--red-2); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  min-height: 74px;
  padding: 10px var(--gutter);
  background: rgba(13, 16, 14, .82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.site-header.scrolled { background: rgba(13, 16, 14, .96); border-bottom-color: var(--surface-3); }

.brand { display: inline-flex; align-items: center; gap: 13px; min-width: 0; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  color: var(--sand);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .04em;
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--blue) 50%, var(--yellow) 50%);
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; line-height: 1.1; letter-spacing: .02em; text-transform: uppercase; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 11px; font-family: var(--mono); letter-spacing: .04em; }

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  flex-wrap: nowrap;
}

.main-nav a, .admin-nav a, .cabinet-nav a {
  border-radius: var(--radius);
  padding: 9px 11px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: color .15s ease, background .15s ease;
}
.main-nav a.active, .main-nav a:hover,
.admin-nav a.active, .admin-nav a:hover,
.cabinet-nav a.active, .cabinet-nav a:hover {
  color: var(--ink);
  background: rgba(124, 133, 86, .14);
}

.main-nav .nav-cta {
  flex: 0 0 auto;
  margin-left: 8px;
  padding: 10px 18px;
  color: #fff;
  background: var(--red);
  border: 1px solid var(--red-2);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 800;
  font-size: 13px;
}
.main-nav .nav-cta:hover { background: var(--red-2); color: #fff; }

.nav-toggle {
  display: none;
  width: 46px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle span { display: block; width: 20px; height: 2px; margin: 4px auto; background: var(--ink); transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(760px, 88svh);
  display: grid;
  align-items: center;
  padding: clamp(70px, 9vw, 120px) var(--gutter) clamp(60px, 8vw, 96px);
  overflow: hidden;
  background-color: #0a0d0b;
  background-image:
    linear-gradient(180deg, rgba(8, 11, 9, .72) 0%, rgba(8, 11, 9, .55) 40%, rgba(8, 11, 9, .9) 100%),
    linear-gradient(90deg, rgba(8, 11, 9, .94) 0%, rgba(8, 11, 9, .65) 45%, rgba(8, 11, 9, .2) 100%),
    url("../img/hero-support.png");
  background-position: center, center, center right;
  background-size: cover, cover, cover;
  background-repeat: no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 0, 0, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, .12) 1px, transparent 1px);
  background-size: 60px 60px;
  mix-blend-mode: overlay;
  opacity: .5;
}

.hero-inner { position: relative; z-index: 2; width: min(var(--maxw), 100%); margin: 0 auto; }
.hero-copy { width: min(760px, 100%); }
.hero h1 { color: #fff; }
.hero h1 .accent { color: var(--sand); }
.hero-sub {
  margin: 0 0 16px;
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 750;
  color: var(--sand-2);
  letter-spacing: .01em;
}
.hero-lead {
  max-width: 640px;
  margin-bottom: 30px;
  font-size: clamp(16px, 1.6vw, 19px);
  color: rgba(238, 242, 236, .82);
}
.hero-actions, .row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-actions.center { justify-content: center; }

.hero-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 34px;
}
.hero-tags span {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 12px;
  border: 1px solid rgba(205, 189, 151, .25);
  border-radius: 999px;
}

/* ---------- Containers / sections ---------- */
.section, .content-section {
  width: min(var(--maxw), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) 0;
}
.content-section { max-width: 860px; }
.section.tight { padding: clamp(40px, 6vw, 72px) 0; }

.section-heading, .panel-head, .admin-page-head, .cabinet-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 32px;
}
.section-heading h2, .admin-page-head h1, .cabinet-head h1 { margin-bottom: 0; }
.section-heading .lead { color: var(--muted); max-width: 540px; margin: 10px 0 0; }
.section-heading > div { min-width: 0; }
.section-heading a.more, .panel-head a {
  color: var(--sand);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.section-heading a.more:hover, .panel-head a:hover { color: var(--sand-2); }

/* ---------- Three messages band ---------- */
.messages-band {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.messages-grid {
  width: min(var(--maxw), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.message-cell {
  padding: clamp(34px, 4vw, 52px) clamp(20px, 3vw, 40px);
  border-right: 1px solid var(--line);
}
.message-cell:last-child { border-right: none; }
.message-cell .num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--red-2);
  letter-spacing: .12em;
}
.message-cell h3 { margin: 14px 0 8px; font-size: 24px; text-transform: uppercase; }
.message-cell p { color: var(--muted); margin: 0; }

/* ---------- Stats ---------- */
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  width: min(var(--maxw), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--line);
}
.stats-band div { padding: 28px 26px; background: var(--surface); }
.stats-band strong, .stats-band span { display: block; }
.stats-band strong { font-size: clamp(28px, 4vw, 42px); font-weight: 850; color: var(--sand); line-height: 1; }
.stats-band span { margin-top: 8px; color: var(--muted); font-size: 13.5px; }

/* ---------- Directions / cards grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.card-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.direction-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.direction-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 3px; height: 100%;
  background: var(--khaki);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .22s ease;
}
.direction-card:hover { transform: translateY(-4px); border-color: var(--surface-3); background: var(--surface-2); }
.direction-card:hover::before { transform: scaleY(1); }
.direction-card .ic {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--sand);
}
.direction-card .ic svg { width: 24px; height: 24px; }
.direction-card h3 { text-transform: uppercase; font-size: 19px; }
.direction-card p { color: var(--muted); margin: 0 0 16px; font-size: 15px; }
.direction-card .tag {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sand);
}

/* ---------- Program / project cards ---------- */
.program-card {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform .18s ease, border-color .18s ease;
}
.program-card:hover { transform: translateY(-4px); border-color: var(--surface-3); }
.program-card > span {
  font-family: var(--mono);
  color: var(--khaki-2);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.program-card h3, .program-card h2 { margin: 12px 0 8px; text-transform: none; font-weight: 780; }
.program-card p { color: var(--muted); font-size: 15px; }
.program-card .button { align-self: start; margin-top: auto; }

.progress {
  height: 8px;
  margin: 18px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--khaki), var(--sand)); }

.program-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.program-meta b { color: var(--sand); font-size: 18px; }
.program-meta small { color: var(--muted); font-family: var(--mono); }

/* ---------- Split / who-we-are ---------- */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 6vw, 72px);
  align-items: center;
  width: min(var(--maxw), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) 0;
}
.split-section.framed {
  width: 100%;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.split-section.framed > * { width: min(calc(var(--maxw) / 2 - 36px), 100%); }
.split-section.framed { display: grid; place-items: center; grid-template-columns: 1fr 1fr; }
.split-section p { color: var(--muted); font-size: 17px; }

.bullet-list { display: grid; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.bullet-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--ink);
}
.bullet-list li::before {
  content: "";
  margin-top: 9px;
  width: 12px; height: 12px;
  border: 2px solid var(--red-2);
  transform: rotate(45deg);
}

.steps { display: grid; gap: 12px; }
.steps div {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steps b {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--radius);
  color: var(--sand);
  background: var(--surface-3);
  font-family: var(--mono);
}

/* ---------- Training levels ---------- */
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.level-card {
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--khaki);
  border-radius: var(--radius-lg);
}
.level-card .lvl { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--red-2); text-transform: uppercase; }
.level-card h3 { margin: 10px 0 10px; text-transform: uppercase; }
.level-card p { color: var(--muted); margin: 0; font-size: 15px; }

/* ---------- FPV feature ---------- */
.fpv-band {
  width: 100%;
  padding: clamp(56px, 8vw, 104px) var(--gutter);
  background:
    linear-gradient(180deg, rgba(13, 16, 14, .85), rgba(13, 16, 14, .96)),
    radial-gradient(circle at 80% 20%, rgba(47, 111, 176, .18), transparent 45%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fpv-inner {
  width: min(var(--maxw), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.fpv-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.fpv-stats div {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.fpv-stats strong { display: block; font-size: 30px; color: var(--sand); }
.fpv-stats span { color: var(--muted); font-size: 14px; }

/* ---------- Fundraiser highlight ---------- */
.fundraiser {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  padding: clamp(30px, 4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--radius-lg);
}
.fundraiser .meter strong { font-size: 26px; color: var(--sand); }
.fundraiser .meter small { color: var(--muted); font-family: var(--mono); }

/* ---------- Reports ---------- */
.report-list { display: grid; gap: 14px; }
.report-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.report-row time { font-family: var(--mono); color: var(--sand); font-size: 13px; white-space: nowrap; }
.report-row p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- News ---------- */
.news-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.news-list.wide { grid-template-columns: 1fr; gap: 16px; }
.news-list article {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.news-list.wide article {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(22, 27, 24, .62);
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.news-list.wide article > * { min-width: 0; }
.news-list.wide article:hover {
  transform: translateY(-2px);
  border-color: var(--surface-3);
  background: rgba(28, 34, 30, .8);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
}
.news-thumb {
  position: relative;
  display: block;
  min-width: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(124, 133, 86, .28), rgba(13, 16, 14, .92)),
    var(--surface-2);
  border: 1px solid rgba(255,255,255,.06);
}
.news-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 11, 9, .28));
  pointer-events: none;
}
.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
}
.news-list.wide article:hover .news-thumb img {
  transform: scale(1.045);
  filter: brightness(1.04);
}
.news-thumb.is-empty {
  display: grid;
  place-items: center;
}
.news-thumb.is-empty span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: var(--sand);
  font-weight: 900;
  border: 1px solid rgba(205, 189, 151, .35);
  background: rgba(8, 11, 9, .35);
}
.news-summary {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 8px;
}
.news-list.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.news-list.cards article {
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color .18s ease, transform .18s ease;
}
.news-list.cards article:hover { transform: translateY(-3px); border-color: var(--surface-3); }
.news-list time { color: var(--sand); font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; }
.news-list h3, .news-list h2 { margin: 10px 0 8px; text-transform: none; font-weight: 760; font-size: 20px; }
.news-list.wide h2 { font-size: clamp(19px, 1.8vw, 25px); line-height: 1.2; }
.news-list p { color: var(--muted); margin: 0; }
.news-list.wide p {
  max-width: 780px;
  line-height: 1.62;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-list a:hover { color: var(--sand); }

/* ---------- Memorial ---------- */
.memorial-band {
  width: 100%;
  padding: clamp(56px, 8vw, 104px) var(--gutter);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(10, 13, 11, .9), rgba(10, 13, 11, .98)),
    url("../img/hero-support.png");
  background-size: cover;
  background-position: center;
  border-top: 1px solid var(--line);
}
.memorial-band .inner { width: min(720px, 100%); margin: 0 auto; }
.memorial-band p { color: var(--muted); font-size: 18px; }

.memorial-hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}
.memorial-hero-stat {
  display: grid;
  gap: 6px;
  min-width: 160px;
  padding: 14px 18px;
  border: 1px solid rgba(205, 189, 151, .18);
  border-radius: var(--radius-lg);
  background: rgba(13, 16, 14, .55);
  backdrop-filter: blur(8px);
  text-align: center;
}
.memorial-hero-stat span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--khaki-2);
}
.memorial-hero-stat strong {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--sand);
}
.memorial-year-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
}
.memorial-year-count {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid rgba(205, 189, 151, .16);
  border-radius: 999px;
  background: rgba(124, 133, 86, .1);
  font-size: clamp(15px, 2vw, 20px);
  white-space: nowrap;
}

.memorial-wall-section { padding-top: 0; }
.memorial-wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}
.memorial-person-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(22, 27, 24, .95), rgba(16, 20, 17, .98));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: center;
}
.memorial-person-card::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--sand), transparent);
  opacity: .55;
}
.memorial-person-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(124, 133, 86, .08), var(--surface-2));
  border-bottom: 1px solid rgba(205, 189, 151, .1);
}
.memorial-person-photo img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: center top;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}
.memorial-person-body { padding: 18px 20px 24px; }
.memorial-person-body h3 {
  margin: 0 0 12px;
  font-size: 19px;
  text-transform: none;
  font-weight: 780;
  color: var(--ink);
}
.memorial-person-copy {
  display: grid;
  gap: 12px;
}
.memorial-person-meta-block {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(205, 189, 151, .12);
}
.memorial-person-rank {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--khaki-2);
}
.memorial-person-dates {
  margin: 0;
}
.memorial-person-dates span {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid rgba(205, 189, 151, .22);
  border-radius: 999px;
  background: rgba(124, 133, 86, .08);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--sand);
}
.memorial-person-about {
  margin: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
}
.memorial-awards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.memorial-award {
  margin: 0;
  display: grid;
  gap: 8px;
  justify-items: center;
}
.memorial-award img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .4));
}
.memorial-award figcaption {
  margin: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  max-width: 140px;
}

.award-picker-field { display: grid; gap: 10px; }
.award-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.award-picker-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.award-picker-item:has(input:checked) {
  border-color: rgba(205, 189, 151, .45);
  background: rgba(124, 133, 86, .12);
}
.award-picker-item input { width: auto; justify-self: start; }
.award-picker-visual {
  display: grid;
  place-items: center;
  min-height: 64px;
}
.award-picker-visual img { width: 52px; height: 52px; object-fit: contain; }
.award-picker-label { font-size: 12px; line-height: 1.35; color: var(--muted); text-transform: none; }

.settings-awards-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.settings-awards-section h2 {
  margin: 0 0 8px;
  font-size: 18px;
  text-transform: uppercase;
}
.settings-awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.settings-award-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.settings-award-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.settings-award-head strong {
  font-size: 13px;
  line-height: 1.35;
  text-transform: none;
}
.settings-award-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(124, 133, 86, .16);
  color: var(--sand);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.settings-award-badge.muted-badge {
  background: rgba(255, 255, 255, .04);
  color: var(--muted-2);
}
.settings-award-preview img { object-fit: contain; background: rgba(0, 0, 0, .15); }

.memorial-photo-preview {
  width: min(100%, 320px);
  aspect-ratio: 16 / 10;
  height: auto;
}
.memorial-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-crop-workspace {
  display: grid;
  gap: 16px;
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}
.photo-crop-stage {
  max-height: 420px;
  background: #0a0d0b;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.photo-crop-stage img {
  display: block;
  max-width: 100%;
}
.photo-crop-toolbar {
  display: grid;
  gap: 12px;
}
.photo-crop-zoom-label {
  display: grid;
  gap: 8px;
  text-transform: none;
}
.photo-crop-zoom-label span {
  font-size: 12px;
  color: var(--muted);
}
.photo-crop-preview-wrap {
  display: grid;
  gap: 8px;
}
.photo-crop-preview-card {
  width: min(100%, 320px);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(205, 189, 151, .18);
  background: var(--surface);
}
.photo-crop-preview-card canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.photo-crop-workspace .cropper-view-box,
.photo-crop-workspace .cropper-face {
  border-radius: 0;
}
.photo-crop-workspace .cropper-view-box {
  outline: 1px solid rgba(205, 189, 151, .75);
  outline-color: rgba(205, 189, 151, .75);
}
.photo-crop-workspace .cropper-line,
.photo-crop-workspace .cropper-point {
  background-color: var(--sand);
}

/* ---------- Thanks wall ---------- */
.thanks-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(124, 133, 86, .18), transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(205, 189, 151, .08), transparent 50%),
    linear-gradient(180deg, rgba(13, 16, 14, .4), var(--bg));
}
.thanks-hero-glow {
  position: absolute;
  inset: auto -10% -40% 30%;
  height: 280px;
  background: radial-gradient(circle, rgba(124, 133, 86, .12), transparent 70%);
  pointer-events: none;
}
.thanks-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 28px;
}
.thanks-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid rgba(205, 189, 151, .22);
  border-radius: 999px;
  background: rgba(22, 27, 24, .72);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.thanks-stat-pill strong {
  font-size: 18px;
  color: var(--sand);
  letter-spacing: 0;
}
.thanks-stat-note { color: var(--muted-2); font-size: 14px; }

.thanks-section {
  width: min(var(--maxw), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: clamp(36px, 6vw, 72px) 0 clamp(48px, 7vw, 80px);
}
.thanks-section-head {
  max-width: 640px;
  margin-bottom: clamp(28px, 5vw, 44px);
}
.thanks-section-head h2 {
  margin-bottom: 12px;
  font-size: clamp(24px, 3vw, 36px);
}
.thanks-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.thanks-wall-list,
.thanks-wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: clamp(18px, 3vw, 28px);
}
.thanks-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(28, 36, 32, .95), rgba(22, 27, 24, .98));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-lg) + 2px);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.thanks-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--khaki), var(--sand), var(--khaki-2));
  opacity: .85;
  z-index: 1;
}
.thanks-card:hover {
  transform: translateY(-6px);
  border-color: rgba(205, 189, 151, .22);
  box-shadow: 0 28px 56px rgba(0, 0, 0, .45), 0 0 0 1px rgba(124, 133, 86, .12);
}
.thanks-card-image {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 14px 14px 0;
  border: 0;
  appearance: none;
  cursor: zoom-in;
  background: transparent;
  text-align: left;
}
.thanks-card-frame {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(124, 133, 86, .08), rgba(255, 255, 255, .02)),
    var(--surface-2);
  border: 1px solid rgba(255, 255, 255, .06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.thanks-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .35s ease, filter .35s ease;
}
.thanks-card-overlay {
  position: absolute;
  inset: 14px 14px 0;
  display: grid;
  place-content: center;
  gap: 10px;
  justify-items: center;
  border-radius: var(--radius-lg);
  background: rgba(8, 11, 9, .62);
  color: var(--sand);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .25s ease;
}
.thanks-card-zoom {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(205, 189, 151, .35);
  border-radius: 999px;
  background: rgba(22, 27, 24, .75);
}
.thanks-card-zoom svg { width: 22px; height: 22px; }
.thanks-card:hover .thanks-card-overlay { opacity: 1; }
.thanks-card:hover .thanks-card-image img { transform: scale(1.04); filter: brightness(1.05); }
.thanks-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 26px;
}
.thanks-card-tag {
  width: fit-content;
  padding: 4px 10px;
  border: 1px solid rgba(124, 133, 86, .35);
  border-radius: 999px;
  background: rgba(124, 133, 86, .1);
  color: var(--khaki-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.thanks-card-body h3 {
  margin: 0;
  font-size: clamp(17px, 2vw, 20px);
  text-transform: none;
  font-weight: 780;
  line-height: 1.25;
  color: var(--ink);
}
.thanks-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.thanks-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: clamp(48px, 8vw, 88px) 24px;
  text-align: center;
  border: 1px dashed rgba(124, 133, 86, .28);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(22, 27, 24, .8), rgba(16, 20, 17, .9));
}
.thanks-empty-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(124, 133, 86, .12);
  color: var(--sand);
}
.thanks-empty-icon svg { width: 28px; height: 28px; }
.thanks-empty h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
}
.thanks-cta { position: relative; overflow: hidden; }
.thanks-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(205, 189, 151, .08), transparent 55%);
  pointer-events: none;
}
.thanks-preview img { object-fit: contain; background: var(--surface-2); }

.thanks-wall-list [data-reveal].in,
.thanks-section [data-reveal].in {
  transition-delay: var(--reveal-delay, 0ms);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 32px);
  animation: thanks-lightbox-in .28s ease;
}
.image-lightbox[hidden] { display: none; }
@keyframes thanks-lightbox-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(6, 9, 7, .88);
  backdrop-filter: blur(10px);
  cursor: zoom-out;
}
.image-lightbox-frame {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(960px, 100%);
  max-height: 90vh;
  animation: thanks-lightbox-zoom .32s ease;
}
@keyframes thanks-lightbox-zoom {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: scale(1); }
}
.image-lightbox-frame img {
  display: block;
  max-width: min(960px, 100%);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: calc(var(--radius-lg) + 2px);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 32px 80px rgba(0, 0, 0, .65);
}
.image-lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--sand);
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.image-lightbox-close svg { width: 18px; height: 18px; }
.image-lightbox-close:hover { background: var(--surface-2); transform: scale(1.05); }

/* ---------- Partners ---------- */
.partners {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.partners span {
  padding: 16px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---------- CTA strip ---------- */
.cta-strip {
  width: min(var(--maxw), calc(100% - 2 * var(--gutter)));
  margin: 0 auto clamp(56px, 8vw, 96px);
  padding: clamp(36px, 5vw, 60px);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(158, 47, 47, .22), rgba(124, 133, 86, .14)),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.cta-strip h2 { color: #fff; }
.cta-strip p { color: var(--muted); max-width: 560px; margin: 0 auto 26px; }

/* ---------- Page hero (internal) ---------- */
.page-hero {
  padding: clamp(70px, 9vw, 120px) var(--gutter) clamp(40px, 6vw, 64px);
  background:
    linear-gradient(180deg, rgba(13, 16, 14, .6), var(--bg)),
    var(--surface);
  border-bottom: 1px solid var(--line);
}
.page-hero .inner { width: min(var(--maxw), 100%); margin: 0 auto; }
.page-hero h1 { color: #fff; }
.page-hero p { max-width: 720px; color: var(--muted); font-size: 18px; }
.page-hero.centered { text-align: center; }
.page-hero.centered .inner { display: grid; justify-items: center; }

/* ---------- Detail layout ---------- */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: clamp(24px, 5vw, 56px);
  width: min(var(--maxw), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) 0;
}
.program-detail-hero { background: var(--surface); }

.prose { font-size: 17px; color: var(--ink); }
.prose p { color: var(--muted); }
.prose h2, .prose h3 { color: var(--ink); margin-top: 28px; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-lg); margin: 18px 0; display: block; }
.prose a { color: var(--sand-2); text-decoration: underline; }
.prose ul, .prose ol { color: var(--muted); padding-left: 22px; margin: 14px 0; }
.prose li { margin: 6px 0; }
.prose blockquote { margin: 18px 0; padding: 12px 18px; border-left: 3px solid var(--sand); color: var(--ink); background: rgba(255,255,255,.03); border-radius: 0 8px 8px 0; }

/* ---------- Rich text editor (admin) ---------- */
.rte-field { display: grid; gap: 6px; }
.rte-label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.rte {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(0,0,0,.18);
  overflow: hidden;
}
.rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.03);
}
.rte-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.rte-btn:hover { border-color: var(--sand); color: var(--sand-2); }
.rte-btn:disabled { opacity: .5; cursor: progress; }
.rte-sep { width: 1px; align-self: stretch; margin: 2px 4px; background: var(--line); }
.rte-editor {
  min-height: 220px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 16px 18px;
  outline: none;
  font-size: 16px;
  line-height: 1.65;
}
.rte-editor:focus { outline: none; }
.rte-editor:empty::before {
  content: "Почніть писати текст новини…";
  color: var(--muted);
  opacity: .7;
}

/* ---------- Recruiting / vacancies ---------- */
.vacancy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.vacancy-card {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform .2s ease, border-color .2s ease;
}
.vacancy-card:hover { transform: translateY(-4px); border-color: var(--surface-3); }
.vacancy-tag {
  font-family: var(--mono);
  color: var(--khaki-2);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.vacancy-card h3 { margin: 12px 0 10px; font-weight: 780; }
.vacancy-meta { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 4px; color: var(--muted); font-size: 14px; }
.vacancy-meta b { color: var(--ink); font-weight: 700; }
.vacancy-summary { color: var(--muted); font-size: 15px; margin: 0 0 8px; }
.vacancy-block { margin-top: 6px; }
.vacancy-block h4 {
  margin: 14px 0 4px;
  font-size: 12.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--sand-2);
}
.vacancy-block .bullet-list { gap: 9px; margin-top: 8px; }
.vacancy-block .bullet-list li { font-size: 14.5px; color: var(--muted); }
.vacancy-card .vacancy-apply { align-self: start; margin-top: auto; padding-top: 0; }
.vacancy-card .vacancy-block:last-of-type { margin-bottom: 22px; }

.report-amount {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--khaki-2);
  letter-spacing: .02em;
}
.report-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  font-family: var(--mono);
  font-weight: 700;
  color: var(--sand-2);
}

/* ---------- Panels / forms ---------- */
.panel, .form-panel, .donation-panel, .auth-card, .admin-record, .request-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.panel { padding: 22px; }
.donation-panel, .form-panel { align-self: start; padding: 24px; }
.form-stack { display: grid; gap: 14px; }
.password-input-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.password-input-wrap input { min-width: 0; }
.password-toggle {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--sand);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.password-toggle:hover { border-color: rgba(240,222,179,.35); }
.city-district-fields select:disabled { opacity: .55; cursor: not-allowed; }
.gender-field { display: grid; gap: 8px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 16px; }
.form-panel h2, .donation-panel h2 { font-size: 22px; text-transform: uppercase; }

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 13px;
  color: var(--ink);
  background: var(--bg);
  font: inherit;
  font-size: 15px;
  text-transform: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--khaki-2);
  box-shadow: 0 0 0 3px rgba(124, 133, 86, .18);
}
textarea { resize: vertical; }
select option { background: var(--surface-2); color: var(--ink); }

.check-row { display: flex; align-items: center; gap: 10px; text-transform: none; }
.check-row input { width: auto; }
.consent-row { align-items: flex-start; }
.consent-row span { font-size: 14px; line-height: 1.45; color: var(--muted); }

.pay-box, .contact-list div {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line);
}
.pay-box strong { color: var(--sand); }
.pay-box p { color: var(--muted); font-size: 14px; white-space: pre-line; }
.pay-box a { color: var(--sand); font-weight: 700; }

.contact-list { display: grid; gap: 14px; }
.contact-list div { margin: 0; }
.contact-list span, .contact-list strong { display: block; }
.contact-list span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.contact-list strong { color: var(--ink); font-size: 16px; margin-top: 4px; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  padding: clamp(48px, 6vw, 72px) var(--gutter) 0;
  background: #090c0a;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.footer-grid {
  width: min(var(--maxw), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: clamp(24px, 4vw, 48px);
  padding-bottom: 40px;
}
.footer-grid h4 {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sand);
}
.footer-brand strong { display: block; color: var(--ink); font-size: 18px; text-transform: uppercase; margin-bottom: 10px; }
.footer-brand p { max-width: 320px; margin: 0; color: var(--muted); font-size: 14px; }
.footer-col a { display: block; color: var(--muted); padding: 5px 0; font-size: 14px; transition: color .15s; }
.footer-col a:hover { color: var(--sand); }
.footer-req { white-space: pre-line; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.footer-socials { display: flex; gap: 10px; margin-top: 14px; }
.footer-socials a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}
.footer-socials a:hover { border-color: var(--khaki-2); background: var(--surface); color: var(--sand); }
.footer-socials svg { width: 18px; height: 18px; display: block; }
.footer-bottom {
  width: min(var(--maxw), 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  font-family: var(--mono);
  color: var(--muted-2);
}
.footer-bottom a { color: var(--muted); }
.footer-bottom .ua { display: inline-flex; align-items: center; gap: 8px; }
.footer-bottom .ua::before {
  content: ""; width: 26px; height: 14px;
  background: linear-gradient(180deg, var(--blue) 50%, var(--yellow) 50%);
  border-radius: 2px;
}

/* ---------- Flash ---------- */
.flash-wrap { width: min(var(--maxw), calc(100% - 2 * var(--gutter))); margin: 18px auto 0; position: relative; z-index: 2; }
.flash {
  padding: 13px 16px;
  border-radius: var(--radius);
  background: rgba(124, 133, 86, .16);
  border: 1px solid var(--khaki);
  color: var(--ink);
  font-weight: 700;
}
.flash.error { background: var(--red-soft); border-color: var(--red-2); color: #f1d4d4; }

/* ---------- Status badges ---------- */
.status {
  display: inline-flex;
  min-width: 88px;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--yellow);
  background: rgba(232, 189, 58, .14);
  border: 1px solid rgba(232, 189, 58, .3);
}
.status.confirmed, .status.completed, .status.active, .status.published, .status.sent {
  color: var(--khaki-2);
  background: rgba(124, 133, 86, .16);
  border-color: var(--khaki);
}
.status.cancelled, .status.rejected, .status.blocked, .status.closed, .status.failed {
  color: #e89a9a;
  background: var(--red-soft);
  border-color: var(--red-2);
}
.status.in_progress, .status.paused, .status.draft {
  color: #8fb6e0;
  background: rgba(47, 111, 176, .16);
  border-color: var(--blue);
}

/* ---------- Tables ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 11px; font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
tr:last-child td { border-bottom: none; }

/* ---------- Line items ---------- */
.line-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.line-item:first-of-type { border-top: none; }
.line-item b, .line-item span { display: block; }
.line-item b { color: var(--ink); }
.line-item span, .request-card small { color: var(--muted); font-size: 13px; }
.line-item-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.report-thumb {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 56px;
  height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}
.report-thumb img { width: 100%; height: 100%; object-fit: cover; }
.report-thumb span { color: var(--muted); font-family: var(--mono); }

/* ---------- Auth ---------- */
.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(124, 133, 86, .14), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(158, 47, 47, .14), transparent 40%),
    var(--bg);
}
.auth-shell { width: min(460px, 100%); position: relative; z-index: 1; }
.auth-brand { margin-bottom: 18px; }
.auth-card { padding: 28px; }
.auth-card h1 { font-size: 30px; margin-top: 8px; }
main > .auth-card { width: min(480px, calc(100% - 2 * var(--gutter))); margin: clamp(48px, 9vw, 104px) auto; }
.form-note { margin: 18px 0 0; color: var(--muted); text-transform: none; }
.form-note a { color: var(--sand); font-weight: 700; }

/* ---------- Cabinet ---------- */
.cabinet-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  width: min(1240px, calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: clamp(34px, 5vw, 64px) 0;
}
.cabinet-nav, .admin-sidebar { align-self: start; position: sticky; top: 92px; display: grid; gap: 6px; }
.cabinet-nav { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.cabinet-content.narrow { max-width: 760px; }
.cabinet-stats { width: 100%; margin: 0 0 24px; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cabinet-detail { width: 100%; padding: 0; }
.requests-stack {
  display: grid;
  gap: 28px;
  max-width: 820px;
}
.requests-history { margin-top: 4px; }
.requests-history-list { display: grid; gap: 14px; margin-top: 6px; }
.request-card {
  margin-top: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.02);
}
.request-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.request-card-head h3 {
  margin: 4px 0 6px;
  font-size: 18px;
  color: var(--ink);
}
.request-card-meta {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}
.request-card-body {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}
.admin-reply-note {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
}
.admin-reply-note p { margin: 6px 0 0; color: var(--sand); }
.request-followup-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.request-replies { margin-top: 14px; display: grid; gap: 10px; }
.request-replies strong { font-size: 13px; color: var(--sand); }
.request-reply {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.request-reply p { margin: 6px 0 0; color: var(--ink); }
.followup-checks { display: grid; gap: 8px; }
.admin-user-link { color: var(--sand); text-decoration: underline; text-underline-offset: 3px; }
.admin-user-link:hover { color: var(--ink); }
.admin-user-profile { margin-bottom: 8px; }

/* ---------- Admin ---------- */
.admin-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; background: var(--bg); }
.admin-sidebar { top: 0; min-height: 100vh; padding: 20px; color: var(--ink); background: #090c0a; border-right: 1px solid var(--line); }
.admin-brand { color: #fff; min-width: 0; }
.admin-brand small { color: var(--muted); }
.admin-nav { display: grid; gap: 8px; margin-top: 24px; }
.admin-nav a { color: var(--muted); }
.admin-nav-group {
  display: grid;
  gap: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.admin-nav-group:first-of-type {
  padding-top: 10px;
  border-top: 0;
}
.admin-nav-label {
  padding: 0 10px 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--khaki-2);
}
.admin-public-link { color: var(--sand); font-weight: 700; margin-top: 18px; }
.admin-main { min-width: 0; padding: clamp(22px, 4vw, 44px); }
.admin-page { display: grid; gap: 22px; }
.admin-stats { width: 100%; margin: 0; }
.admin-list { display: grid; gap: 16px; }
.admin-record { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; padding: 18px; }
.admin-record-side { display: grid; gap: 16px; align-self: start; }
.admin-record-form h3 { margin: 0 0 4px; font-size: 1rem; }
.admin-forward-form {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.request-id-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--sand);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
}
.admin-record--fpv .request-id-badge {
  color: #8fb6e0;
  border-color: rgba(47, 111, 176, .35);
  background: rgba(47, 111, 176, .12);
}
.admin-record--fpv {
  border-color: rgba(47, 111, 176, .42);
  background: linear-gradient(135deg, rgba(47, 111, 176, .08), rgba(47, 111, 176, .02));
  box-shadow: inset 0 0 0 1px rgba(47, 111, 176, .12);
}
.admin-page--requests { gap: 14px; }
.admin-page-head--compact h1 { font-size: clamp(24px, 3vw, 30px); }
.admin-request-filters { flex-wrap: wrap; }
.admin-requests-list { display: grid; gap: 8px; }
.admin-request-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel, rgba(255, 255, 255, .02));
  overflow: hidden;
}
.admin-request-item--fpv {
  border-color: rgba(47, 111, 176, .35);
  background: linear-gradient(135deg, rgba(47, 111, 176, .07), rgba(47, 111, 176, .015));
}
.admin-request-details > summary { list-style: none; }
.admin-request-details > summary::-webkit-details-marker { display: none; }
.admin-request-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
}
.admin-request-summary .request-id-badge { margin: 0; }
.admin-request-summary-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.admin-request-summary-main strong {
  color: var(--ink);
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-request-summary-main > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.admin-request-summary-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.admin-request-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  gap: 12px 16px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
}
.admin-request-text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  max-height: 140px;
  overflow: auto;
}
.admin-request-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--muted);
}
.admin-request-meta b { color: var(--sand); font-weight: 600; }
.admin-request-meta a { color: var(--sand); }
.admin-request-replies { margin-top: 10px; }
.admin-request-replies .request-reply { padding: 8px 10px; }
.admin-request-actions {
  display: grid;
  gap: 8px;
  align-self: start;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .14);
  border: 1px solid var(--line);
}
.admin-request-form { gap: 8px; }
.admin-request-form label { gap: 4px; font-size: 12px; }
.admin-request-form textarea,
.admin-request-form select,
.admin-request-form input[type="email"] {
  font-size: 13px;
  padding: 8px 10px;
}
.admin-request-form-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.admin-request-field-inline { flex: 1; min-width: 0; }
.admin-request-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.admin-request-checks .check-row { font-size: 12px; }
.admin-request-forward {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.admin-request-forward > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--sand);
  list-style: none;
}
.admin-request-forward > summary::-webkit-details-marker { display: none; }
.admin-request-forward .admin-request-form { margin-top: 8px; }
.admin-request-empty { padding: 14px 16px; }
@media (max-width: 900px) {
  .admin-request-panel { grid-template-columns: 1fr; }
  .admin-request-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .admin-request-summary-badges {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
.admin-record-form { align-self: start; }
.admin-edit-layout { width: 100%; padding: 0; }
.inline-form, .row-actions { display: flex; align-items: center; gap: 8px; }
.row-actions { flex-wrap: wrap; }
.inline-form select { min-width: 120px; }
.settings-form { max-width: 760px; }
.admin-mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.admin-mini-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.03);
  font-size: 12px;
}
.admin-mini-stats b { color: var(--sand); }
.admin-form-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.admin-form-title h2 { margin: 0; }
.form-grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--sand);
}
.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}
.inline-check input { width: auto; }
.admin-news-layout { grid-template-columns: minmax(420px, .9fr) minmax(0, 1.1fr); }
.admin-news-cover-field small {
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}
.admin-news-cover-preview {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: var(--surface-2);
}
.admin-news-cover-preview span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}
.admin-news-panel { min-width: 0; }
.admin-news-list {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding-right: 4px;
}
.admin-news-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
}
.admin-news-item.is-draft {
  opacity: .76;
  background: rgba(47, 111, 176, .05);
}
.admin-news-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.admin-news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-news-thumb span {
  color: var(--sand);
  font-family: var(--mono);
  font-weight: 800;
}
.admin-news-meta {
  min-width: 0;
  display: grid;
  gap: 7px;
}
.admin-news-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.admin-news-title-row b {
  min-width: 0;
  color: var(--ink);
  line-height: 1.25;
}
.admin-news-meta > span {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-news-meta p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ---------- Brand logo ---------- */
.brand-mark.has-logo { background: var(--surface-2); overflow: hidden; padding: 3px; }
.brand-mark.has-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-mark.has-logo::after { display: none; }

/* ---------- Upload widgets ---------- */
.upload-field {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.upload-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--sand);
}
.upload-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.upload-controls { display: grid; gap: 10px; flex: 1; min-width: 220px; }
.logo-preview {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  overflow: hidden;
  flex: 0 0 auto;
}
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.logo-fallback { font-family: var(--mono); font-weight: 800; font-size: 26px; color: var(--sand); }
.cover-preview {
  display: grid;
  place-items: center;
  width: 160px;
  height: 96px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.report-cover {
  margin: 0 0 26px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}
.report-cover img { display: block; width: 100%; height: auto; }
.file-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px dashed var(--khaki);
  border-radius: var(--radius);
  background: rgba(124, 133, 86, .1);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: none;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.file-pick:hover { border-color: var(--khaki-2); background: rgba(124, 133, 86, .18); }
.file-pick input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Header account link ---------- */
.nav-account {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  margin-left: 6px;
  border: 1px solid var(--line);
}
.nav-account svg { color: var(--sand); }
.nav-account.active, .nav-account:hover { border-color: var(--khaki-2); }

/* ---------- Cabinet sidebar ---------- */
.cabinet-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}
.cab-user {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.cab-user strong { display: block; color: var(--ink); font-size: 14px; line-height: 1.2; }
.avatar {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: var(--radius);
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--sand);
  font-family: var(--mono);
  font-weight: 800;
  font-size: 18px;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 84px; height: 84px; font-size: 30px; }
.member-badge {
  display: inline-flex;
  margin-top: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(124, 133, 86, .16);
  border: 1px solid var(--khaki);
  color: var(--khaki-2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.member-badge.lg { padding: 6px 14px; font-size: 12px; }
.cab-links { display: grid; gap: 3px; }
.cab-logout { margin-top: 4px; }
.cab-logout .button { width: 100%; }

/* ---------- Quick actions ---------- */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.quick-action {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: var(--radius-lg);
  transition: transform .16s ease, border-color .16s ease;
}
.quick-action:hover { transform: translateY(-3px); border-color: var(--surface-3); border-left-color: var(--red-2); }
.quick-action b { display: block; color: var(--ink); font-size: 15px; }
.quick-action span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }

/* ---------- Profile card ---------- */
.profile-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 20px;
  align-items: center;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.profile-meta h2 { margin: 0 0 6px; text-transform: none; }
.profile-meta p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.profile-contacts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; }
.profile-contacts span { color: var(--muted); font-family: var(--mono); font-size: 13px; }

/* ---------- Course cards ---------- */
.course-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--khaki);
  border-radius: var(--radius-lg);
}
.course-card h3 { text-transform: none; margin: 8px 0; }
.course-card p { color: var(--muted); font-size: 14px; }
.course-level { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--red-2); }
.course-info { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 16px; }
.course-info span { color: var(--sand); font-family: var(--mono); font-size: 12.5px; }
.course-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.course-row:first-of-type { border-top: none; }
.course-row b { display: block; color: var(--ink); margin: 3px 0; }
.course-row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.course-meta { display: block; color: var(--muted); font-size: 13px; }

/* ---------- Project (cabinet) ---------- */
.project-mine {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.project-mine span { color: var(--muted); font-size: 13px; }
.project-mine b { color: var(--sand); }

.status.enrolled { color: #8fb6e0; background: rgba(47, 111, 176, .16); border-color: var(--blue); }

/* ---------- Scroll reveal ---------- */
html.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal],
html.reveal-ready [data-reveal].in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  html.reveal-ready [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- FPV Legion page ---------- */
.fpv-hero {
  position: relative;
  padding: clamp(64px, 9vw, 120px) var(--gutter);
  background:
    linear-gradient(180deg, rgba(13, 16, 14, .82), rgba(13, 16, 14, .96)),
    radial-gradient(circle at 18% 22%, rgba(47, 111, 176, .16), transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(124, 133, 86, .12), transparent 38%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.fpv-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(124, 133, 86, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 133, 86, .04) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: .75;
}
.fpv-hero .inner {
  position: relative;
  z-index: 1;
  width: min(var(--maxw), 100%);
  margin: 0 auto;
}
.fpv-hero h1 { color: #fff; margin-bottom: 16px; }
.fpv-hero p { max-width: 760px; color: var(--muted); font-size: 18px; }
.fpv-hero-tagline {
  display: block;
  margin: 18px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sand);
}
.fpv-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.fpv-hero-actions .button.primary {
  background: var(--red);
  border-color: var(--red);
}
.fpv-hero-actions .button.primary:hover { background: var(--red-2); }

.fpv-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
.fpv-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 26px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--khaki);
  border-radius: var(--radius-lg);
}
.fpv-card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--sand);
}
.fpv-card-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fpv-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  text-transform: uppercase;
}
.fpv-card p {
  margin: 0;
  flex: 1;
  color: var(--muted);
  font-size: 15px;
}

.fpv-training-split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
.fpv-training-photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  aspect-ratio: 4 / 3;
}
.fpv-training-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fpv-training-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(13, 16, 14, .42));
}

.fpv-fund-panel {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: clamp(24px, 4vw, 44px);
  align-items: start;
  padding: clamp(28px, 4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--khaki);
  border-radius: var(--radius-lg);
}
.fpv-fund-panel .meter strong {
  display: block;
  font-size: 28px;
  color: var(--sand);
}
.fpv-fund-panel .meter small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}
.fpv-fund-panel .qr {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
}
.fpv-fund-panel .qr img {
  width: min(220px, 100%);
  margin: 0 auto;
  border-radius: var(--radius);
}
.fpv-fund-uses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.fpv-fund-uses div {
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
}

.fpv-gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}
.fpv-gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
}
.fpv-gallery-grid figure:nth-child(6n + 1) { grid-column: span 7; }
.fpv-gallery-grid figure:nth-child(6n + 2) { grid-column: span 5; }
.fpv-gallery-grid figure:nth-child(6n + 3) { grid-column: span 4; }
.fpv-gallery-grid figure:nth-child(6n + 4) { grid-column: span 4; }
.fpv-gallery-grid figure:nth-child(6n + 5) { grid-column: span 4; }
.fpv-gallery-grid figure:nth-child(6n + 6) { grid-column: span 12; }
.fpv-gallery-grid img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  transition: transform .35s ease;
}
.fpv-gallery-grid figure:hover img { transform: scale(1.03); }
.fpv-gallery-grid figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}
.fpv-gallery-grid.scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
.fpv-gallery-grid.scroll figure {
  flex: 0 0 calc(50% - 7px);
  scroll-snap-align: start;
}

.fpv-community-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  padding: clamp(36px, 5vw, 56px);
  background:
    linear-gradient(135deg, rgba(22, 27, 24, .96), rgba(28, 36, 32, .92)),
    radial-gradient(circle at 100% 0%, rgba(47, 111, 176, .12), transparent 45%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.fpv-community-band .fpv-community-photo {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  aspect-ratio: 5 / 4;
  background: var(--surface);
}
.fpv-community-band .fpv-community-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fpv-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgba(8, 10, 9, .78);
  backdrop-filter: blur(6px);
}
.fpv-modal[hidden] { display: none; }
.fpv-modal-dialog {
  position: relative;
  width: min(640px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  padding: clamp(24px, 4vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.fpv-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.fpv-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.fpv-modal-close:hover {
  color: var(--ink);
  border-color: var(--surface-3);
}
.fpv-gallery-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: clamp(12px, 2.5vw, 18px);
}
.fpv-gallery-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
  appearance: none;
  cursor: zoom-in;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.fpv-gallery-item:hover {
  transform: translateY(-4px);
  border-color: rgba(205, 189, 151, .22);
  box-shadow: 0 20px 44px rgba(0, 0, 0, .35);
}
.fpv-gallery-frame {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(124, 133, 86, .08), rgba(255, 255, 255, .02)),
    var(--surface-2);
}
.fpv-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .35s ease;
}
.fpv-gallery-item:hover img { transform: scale(1.03); }
.fpv-gallery-caption {
  display: block;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.fpv-training-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}
.fpv-media-frame {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(124, 133, 86, .08), rgba(255, 255, 255, .02)),
    var(--surface-2);
}
.fpv-training-media,
.fpv-community-media {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}
.fpv-training-media img,
.fpv-community-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.fpv-fund-qr {
  margin: 0;
  width: 100%;
  max-width: 280px;
  justify-self: center;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.fpv-fund-qr img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}
.fpv-report-cover {
  margin: 0 0 12px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.fpv-report-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.fpv-gallery-section,
.fpv-training-section,
.fpv-community-section,
.fpv-support-section {
  overflow-x: clip;
}
.fpv-gallery-section .fpv-gallery-masonry,
.fpv-training-section .fpv-training-media,
.fpv-community-section .fpv-community-media {
  max-width: 100%;
}

.fpv-modal-panel {
  width: min(640px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  padding: clamp(24px, 4vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.fpv-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.fpv-modal-head h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  text-transform: uppercase;
}
.fpv-modal-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.fpv-modal-close:hover {
  color: var(--ink);
  border-color: var(--surface-3);
}

.fpv-report-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.fpv-report-cards article {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .2s ease, transform .2s ease;
}
.fpv-report-cards article:hover {
  border-color: var(--surface-3);
  transform: translateY(-2px);
}
.fpv-report-cards time {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--sand);
  text-transform: uppercase;
}
.fpv-report-cards h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  text-transform: uppercase;
}
.fpv-report-cards p {
  margin: 0 0 16px;
  flex: 1;
  color: var(--muted);
  font-size: 14px;
}
.fpv-report-cards .button {
  align-self: flex-start;
}

@media (max-width: 980px) {
  .fpv-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fpv-training-split,
  .fpv-fund-panel,
  .fpv-community-band { grid-template-columns: 1fr; }
  .fpv-report-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fpv-gallery-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
  }
  .fpv-gallery-grid figure {
    flex: 0 0 calc(50% - 7px);
    scroll-snap-align: start;
    grid-column: auto !important;
  }
  .fpv-training-media,
  .fpv-community-media {
    max-width: min(560px, 100%);
    margin-inline: auto;
  }
  .split-section.framed.fpv-training-section > *,
  .split-section.framed.fpv-unit-section > *,
  .split-section.fpv-community-section > * {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .fpv-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .fpv-hero-actions .button {
    width: 100%;
    justify-content: center;
  }
  .fpv-card-grid { grid-template-columns: 1fr; }
  .fpv-gallery-masonry {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .fpv-training-steps { grid-template-columns: 1fr; }
  .fpv-fund-uses { grid-template-columns: 1fr; }
  .fpv-report-cards { grid-template-columns: 1fr; }
  .fpv-fund-qr { max-width: 100%; }
  .split-section.framed.fpv-training-section > *,
  .split-section.framed.fpv-unit-section > *,
  .split-section.fpv-community-section > * {
    width: 100%;
  }
  .image-lightbox-frame {
    max-width: 100%;
    width: 100%;
    padding-top: 8px;
  }
  .image-lightbox-frame img {
    max-width: 100%;
    max-height: calc(100vh - 96px);
    width: auto;
    height: auto;
  }
  .image-lightbox-close {
    top: 8px;
    right: 8px;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .fpv-inner { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .site-header { grid-template-columns: minmax(0, 1fr) auto; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    grid-column: 1 / -1;
    position: absolute;
    top: 100%;
    left: var(--gutter);
    right: var(--gutter);
    z-index: 60;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: grid; gap: 2px; }
  .main-nav a { padding: 12px; }
  .main-nav .nav-cta { margin: 6px 0 0; text-align: center; justify-content: center; }

  .card-grid, .card-grid.cols-2, .news-list, .news-list.cards, .two-columns,
  .split-section, .split-section.framed, .detail-layout, .cabinet-shell,
  .admin-record, .levels, .messages-grid, .fundraiser, .fpv-stats, .vacancy-grid,
  .thanks-wall-grid,
  .thanks-wall-list,
  .memorial-wall-grid {
    grid-template-columns: 1fr;
  }
  .news-list.wide article {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .news-thumb {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  .news-summary { padding-right: 0; }
  .message-cell { border-right: none; border-bottom: 1px solid var(--line); }
  .message-cell:last-child { border-bottom: none; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .fundraiser { grid-template-columns: 1fr; }

  .cabinet-nav { position: static; }
  .cab-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .admin-body { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; min-height: auto; }
  .admin-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-news-layout { grid-template-columns: 1fr; }
  .admin-news-list { max-height: none; overflow: visible; padding-right: 0; }
}

@media (max-width: 640px) {
  .brand small { display: none; }
  .stats-band { grid-template-columns: 1fr; }
  .section-heading, .panel-head, .admin-page-head, .cabinet-head, .footer-bottom {
    flex-direction: column;
    align-items: start;
  }
  .footer-grid { grid-template-columns: 1fr; }
  .admin-nav { grid-template-columns: 1fr; }
  .admin-nav-group { border-top-color: var(--line); }
  .admin-mini-stats { justify-content: flex-start; }
  .form-grid.two { grid-template-columns: 1fr; }
  .admin-news-item { grid-template-columns: 1fr; }
  .admin-news-title-row { display: grid; }
  .cab-links, .quick-actions { grid-template-columns: 1fr; }
  .profile-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .profile-contacts { justify-content: center; }
  .report-row { grid-template-columns: 1fr; gap: 8px; }
  h1 { font-size: clamp(34px, 11vw, 48px); }
}
