/* Mbiyuini Welfare. Mobile first (360px), then 768, 1024, 1280 and 1920.
   Colour roles: deep green = structure and links, bright green = status,
   golden yellow = the one main action. Tints and shades are of deep green only. */
:root {
  --primary: #00632D;
  --secondary: #3BB342;
  --accent: #FDBE0C;
  --white: #FFFFFF;
  --primary-dark: #004A22;
  --ink: #0B2A17;
  --muted: #3F5C4B;
  --line: #C9DBCF;
  --line-strong: #5E8570;
  --tint: #EEF5F0;
  --tint-strong: #DCEADF;
  --status-tint: #E4F4E5;
  --accent-pressed: #E6AB00;

  /* Image slots: change one value here when the real photos arrive. */
  --ratio-hero: 4 / 3;
  --ratio-about: 3 / 2;
  --ratio-portrait: 1 / 1;
  --ratio-card: 1.586 / 1;
  --ratio-logo: 1080 / 290;
  --logo-height: 40px;

  --radius: 6px;        /* buttons, inputs, tabs */
  --radius-card: 8px;   /* cards, panels, tiles */
  --radius-chip: 3px;   /* small badges and status chips */
  --gap: 16px;
  --bar: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6;
  color: var(--ink); background: var(--white); overflow-wrap: break-word;
}
img, svg { max-width: 100%; display: block; }
img { height: auto; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .875rem; word-break: break-all;
  background: var(--tint); padding: .1em .35em; border-radius: var(--radius-chip); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.panel { border: 1px solid var(--line); padding: 16px; }
fieldset.panel--tint { border-color: var(--tint-strong); }
legend { padding: 0; }
details > .panel { margin-top: 8px; text-align: left; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; color: var(--primary); letter-spacing: -.01em;
  text-wrap: balance; }
h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; color: var(--ink); }
p { margin: 0 0 1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }
.lead, .prose p { text-wrap: pretty; }
::selection { background: var(--accent); color: var(--ink); }
a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--primary-dark); }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 2px; }
.on-green :focus-visible { outline-color: var(--white); }
[hidden] { display: none !important; }

.skip { position: absolute; left: 8px; top: -80px; z-index: 50; background: var(--white); color: var(--ink);
  padding: 12px 16px; font-weight: 600; border: 2px solid var(--ink); }
.skip:focus { top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 16px; }
.section { padding-block: 40px; }
.section--tint { background: var(--tint); }
.section--green { background: var(--primary); color: var(--white); }
.section--green h2, .section--green h3 { color: var(--white); }
.section--green a { color: var(--white); }
.section--line { border-top: 1px solid var(--line); }
.stack > * + * { margin-top: var(--gap); }
.stack-lg > * + * { margin-top: 32px; }
.cluster { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.split, .grid-2, .grid-3 { display: grid; gap: 24px; }
.narrow { max-width: 600px; }
.lead { font-size: 1.1875rem; }
.muted { color: var(--muted); }
.small { font-size: .9375rem; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: .875rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.section--green .eyebrow { color: var(--white); }

/* ---------- signature: the three-bar mark and the member card ---------- */
.mark { width: 28px; height: 20px; flex: none; }
.mark .b1 { fill: var(--secondary); }
.mark .b2 { fill: var(--accent); }
.mark .b3 { fill: var(--primary); }
.on-green .mark .b3, .mcard .mark .b3 { fill: var(--white); }

.mcard { background: linear-gradient(155deg, var(--primary) 55%, var(--primary-dark)); color: var(--white);
  border-radius: var(--radius-card); padding: 18px; width: 100%;
  max-width: 400px; aspect-ratio: var(--ratio-card); display: flex; flex-direction: column;
  justify-content: space-between; border: 1px solid var(--primary-dark);
  box-shadow: 0 10px 24px -12px rgba(11, 42, 23, .55); }
.mcard__top { display: flex; justify-content: space-between; align-items: center; font-size: .75rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; }
.mcard__icon { width: 34px; height: 34px; border-radius: 8px; flex: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.mcard__label { font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; display: block; opacity: .85; }
.mcard__name { font-size: 1.25rem; font-weight: 700; line-height: 1.2; display: block; }
.mcard__id { font-size: 1.875rem; font-weight: 700; letter-spacing: .04em; line-height: 1.1; display: block;
  font-variant-numeric: tabular-nums; }
.mcard__foot { font-size: .875rem; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mcard--small { max-width: none; aspect-ratio: auto; padding: 14px; gap: 10px; }
.mcard--small .mcard__id { font-size: 1.25rem; }
.mcard--small .mcard__name { font-size: 1.0625rem; }
.mcard--ghost { background: var(--white); color: var(--ink); border: 2px dashed var(--line-strong); }
.mcard--ghost .mark .b3 { fill: var(--primary); }

/* Two-sided member card: tap or Enter/Space to turn over. */
.mcard--flip { position: relative; padding: 0; background: none; border: 0; box-shadow: none;
  cursor: pointer; perspective: 1000px; }
.mcard--flip:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.mcard__inner { position: absolute; inset: 0; transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.32, .72, .35, 1); }
.mcard.is-flipped .mcard__inner { transform: rotateY(180deg); }
.mcard__face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  gap: 8px; padding: 18px; border-radius: var(--radius-card); border: 1px solid var(--primary-dark);
  background: linear-gradient(155deg, var(--primary) 55%, var(--primary-dark)); color: var(--white);
  box-shadow: 0 10px 24px -12px rgba(11, 42, 23, .55); overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mcard__back { transform: rotateY(180deg); background: linear-gradient(160deg, var(--primary-dark), #07311B 55%); }
.mcard__rings { position: absolute; top: 0; right: 0; width: 45%; height: auto; pointer-events: none; }
.mcard__rings circle { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 1.2; }
.mcard__rule { height: 2px; border-radius: 1px; margin: -2px 0;
  background: linear-gradient(90deg, var(--accent), rgba(253, 190, 12, 0) 65%); }
.mcard__front .mcard__id { color: var(--accent); }
.mcard__hint { display: inline-flex; align-items: center; gap: 5px; font-size: .6875rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.mcard__hint svg { width: 13px; height: 13px; }
.mcard__band { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, .22); font-size: .75rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; }
.mcard__band span:last-child { opacity: .7; font-weight: 600; font-size: .625rem; }
.mcard__payline { display: block; font-size: .875rem; font-weight: 600; line-height: 1.35; }
.mcard__payline strong { color: var(--accent); }
.mcard__code { align-self: flex-start; background: var(--white); color: var(--ink); border-radius: var(--radius-chip);
  padding: 8px 12px 6px; }
.mcard__barcode { display: block; width: 150px; height: 30px; }
.mcard__codeid { display: block; font-size: .6875rem; font-weight: 700; letter-spacing: .18em; text-align: center;
  font-variant-numeric: tabular-nums; }
.mcard__fine { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px;
  font-size: .625rem; line-height: 1.45; opacity: .82; }
.mcard__sig { flex: none; text-align: right; text-transform: uppercase; letter-spacing: .1em; }
.mcard__sigline { display: block; width: 84px; border-bottom: 1px solid rgba(255, 255, 255, .55); margin-bottom: 3px; }

@media (max-width: 520px) {
  .mcard__face { padding: 13px; gap: 5px; }
  .mcard__band { padding-bottom: 6px; }
  .mcard__payline { font-size: .8125rem; }
  .mcard__code { padding: 5px 9px 4px; }
  .mcard__barcode { width: 118px; height: 24px; }
  .mcard__fine { font-size: .5625rem; gap: 10px; }
  .mcard__sigline { width: 62px; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 10px 20px; font: 600 1.0625rem/1.2 var(--font); border-radius: var(--radius); border: 2px solid var(--primary);
  background: var(--white); color: var(--primary); text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color .15s, border-color .15s, color .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn:hover { background: var(--tint); color: var(--primary-dark); }
.btn--main { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn--main:hover { background: var(--accent-pressed); border-color: var(--accent-pressed); color: var(--ink); }
.btn--green { background: var(--primary); color: var(--white); }
.btn--green:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }
.btn--onwhite { border-color: var(--white); background: transparent; color: var(--white); }
.btn--onwhite:hover { background: var(--primary-dark); color: var(--white); }
.btn--small { min-height: 44px; padding: 6px 14px; font-size: .9375rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn svg { width: 20px; height: 20px; flex: none; }
.linkbtn { background: none; border: 0; padding: 0; min-height: 44px; font: inherit; color: var(--primary);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* "See more" links: bold link + chevron that nudges on hover */
.link-arrow { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }
.link-arrow::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor;
  border-top: 2px solid currentColor; transform: rotate(45deg); margin-left: 8px; transition: transform .15s; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-arrow:hover::after { transform: rotate(45deg) translate(2px, -2px); }

/* ---------- forms ---------- */
.field { display: block; }
.field label, .label { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { display: block; font-size: .9375rem; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=password], input[type=date],
input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font: 400 1.0625rem/1.4 var(--font); color: var(--ink);
  background: var(--white); border: 1.5px solid var(--line-strong); border-radius: var(--radius); }
textarea { min-height: 120px; resize: vertical; }
select { appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%2300632D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
input[type=file] { width: 100%; font: 400 1rem var(--font); min-height: 48px; padding: 10px 12px;
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--tint); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--ink); }
.field--error input, .field--error select, .field--error textarea { border: 2.5px solid var(--ink); }
.error { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; margin-top: 6px; font-size: .9375rem; }
.error::before { content: "!"; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--ink);
  color: var(--white); font-size: .8125rem; line-height: 20px; text-align: center; margin-top: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; }
.check input { width: 24px; height: 24px; margin: 3px 0 0; flex: none; accent-color: var(--primary); }
.check label { font-weight: 400; margin: 0; }
.hp { position: absolute; left: -9999px; }
.code-input { font-size: 1.75rem !important; letter-spacing: .3em; text-align: center; font-weight: 700; }
.form-row { display: grid; gap: var(--gap); }

/* ---------- messages and states ---------- */
.notice { border: 1.5px solid var(--secondary); background: var(--status-tint);
  padding: 12px 14px; border-radius: var(--radius); font-weight: 600; }
.notice--error { border-color: var(--ink); background: var(--white); }
.notice p { margin: 0; font-weight: 400; }
.empty { border: 2px dashed var(--line-strong); border-radius: var(--radius-card); padding: 24px 16px; text-align: center;
  background: var(--tint); }
.empty::before { content: ""; display: block; width: 42px; height: 30px; margin: 0 auto 10px; opacity: .55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 20'%3E%3Crect width='28' height='4' fill='%233BB342'/%3E%3Crect y='8' width='21' height='4' fill='%23FDBE0C'/%3E%3Crect y='16' width='14' height='4' fill='%2300632D'/%3E%3C/svg%3E") no-repeat center / contain; }
.empty h2, .empty h3 { color: var(--ink); font-size: 1.125rem; }
.empty p { margin-inline: auto; }
.spinner { width: 44px; height: 44px; border: 5px solid var(--tint-strong); border-top-color: var(--primary);
  border-radius: 50%; animation: spin 1s linear infinite; margin-inline: auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; }
}

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 600; padding: 2px 10px;
  border-radius: var(--radius-chip); border: 1px solid var(--line-strong); background: var(--white); white-space: nowrap; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.chip--confirmed, .chip--sent, .chip--new, .chip--active, .chip--paid, .chip--published { background: var(--status-tint); border-color: var(--secondary); }
.chip--confirmed::before, .chip--sent::before, .chip--new::before, .chip--active::before, .chip--paid::before,
.chip--published::before { background: var(--secondary); border-color: var(--primary); }
.chip--pending, .chip--unmatched, .chip--open, .chip--not_connected { border-style: dashed; }
.chip--reversed, .chip--failed, .chip--suspended, .chip--withdrawn { background: var(--ink); color: var(--white); border-color: var(--ink); }
.chip--reversed::before, .chip--failed::before, .chip--suspended::before, .chip--withdrawn::before { border-color: var(--white); }
.struck { text-decoration: line-through; }

/* ---------- panels, stats, lists ---------- */
.panel { border: 1px solid var(--line); border-radius: var(--radius-card); padding: 16px; background: var(--white); }
.panel--tint { background: var(--tint); border-color: var(--tint-strong); }
.panel--rule { background: var(--tint); border-color: var(--tint-strong); }
.panel h2 { font-size: 1.25rem; }
.stat__label { font-size: .75rem; font-weight: 700; color: var(--muted); display: block;
  text-transform: uppercase; letter-spacing: .07em; }
.stat__value { font-size: 1.75rem; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; display: block; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-card); }
.stats > * { padding: 14px; border-top: 1px solid var(--line); }
.stats > *:nth-child(-n+2) { border-top: 0; }
.stats > *:nth-child(odd) { border-right: 1px solid var(--line); }
progress { width: 100%; height: 12px; appearance: none; -webkit-appearance: none; border: 1px solid var(--line-strong);
  border-radius: 999px; overflow: hidden; background: var(--white); display: block; }
progress::-webkit-progress-bar { background: var(--white); }
progress::-webkit-progress-value { background: var(--secondary); }
progress::-moz-progress-bar { background: var(--secondary); }

.rows { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.rows > li { border-bottom: 1px solid var(--line); }
.rows a.row, .rows .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px;
  padding: 10px 2px; text-decoration: none; color: var(--ink); }
.rows a.row { transition: background-color .15s; }
.rows a.row:hover { background: var(--tint); }
.rows a.row::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--primary);
  border-top: 2px solid var(--primary); transform: rotate(45deg); flex: none; margin-right: 6px; }
.row__main { flex: 1; min-width: 0; }
.row__title { font-weight: 600; display: block; }
.row__sub { font-size: .9375rem; color: var(--muted); display: block; }
.row__amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.kv { margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.steps li { padding: 12px 0 12px 24px; position: relative; }
.steps li + li { margin-top: 0; }
.steps li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 12px; height: 12px;
  background: var(--primary); border-radius: 50%; }
.steps li::after { content: ""; position: absolute; left: 7px; top: 36px; bottom: -6px; width: 2px;
  background: var(--tint-strong); }
.steps li:last-child::after { display: none; }
.steps p { margin: 0; }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 36px 14px 0; min-height: 52px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 20px; width: 10px; height: 10px;
  border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(45deg); }
.faq details[open] summary::after { transform: rotate(-135deg); top: 26px; }
.faq details p { padding-bottom: 14px; margin: 0; }

.paysteps { list-style: none; padding: 0; margin: 0; counter-reset: none; }
.paysteps li { padding: 12px 0; border-bottom: 1px solid var(--primary-dark); display: flex; justify-content: space-between; gap: 16px; }
.paysteps span:last-child { font-weight: 700; text-align: right; }
.panel .paysteps li { border-color: var(--line); }

.slot { aspect-ratio: var(--ratio-hero); background: linear-gradient(150deg, var(--tint) 0%, var(--tint-strong) 100%);
  border-radius: var(--radius-card); overflow: hidden; display: grid; place-items: center; width: 100%;
  border: 1px solid var(--line); }
.slot--about { aspect-ratio: var(--ratio-about); }
.slot--portrait { aspect-ratio: var(--ratio-portrait); max-width: 160px; }
.slot img { width: 100%; height: 100%; object-fit: cover; }
.slot .mark { width: 56px; height: 40px; }

/* ---------- tables ---------- */
.rtable { width: 100%; border-collapse: collapse; font-size: 1rem; }
.rtable th { text-align: left; font-size: .8125rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  padding: 10px 12px 10px 0; border-bottom: 2px solid var(--primary); white-space: nowrap; }
.rtable td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.rtable th:last-child, .rtable td:last-child { padding-right: 0; }
.rtable td.right, .nowrap { white-space: nowrap; }
.rtable a { font-weight: 600; }
.table-note { font-size: .9375rem; color: var(--muted); display: block; }
@media (max-width: 1199px) {
  .rtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; }
  .rtable tr { border-bottom: 2px solid var(--line); padding: 10px 0; }
  .rtable td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 16px; text-align: right; }
  .rtable td::before { content: attr(data-label); color: var(--muted); font-size: .9375rem; text-align: left; flex: none; }
  .rtable td.cell-main { font-weight: 700; font-size: 1.0625rem; }
  .rtable td:empty { display: none; }
}

.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end;
  background: var(--tint); border: 1px solid var(--tint-strong); border-radius: var(--radius-card); padding: 14px; }
.filters .field label { font-size: .9375rem; }
.filters .btn { grid-column: 1 / -1; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; border: 1.5px solid var(--line-strong);
  border-radius: var(--radius); text-decoration: none; font-weight: 600; font-size: .9375rem; color: var(--ink);
  transition: background-color .15s, border-color .15s, color .15s; }
.tabs a:hover { border-color: var(--primary); }
.tabs a[aria-current] { background: var(--primary); border-color: var(--primary); color: var(--white); }
.tabs a[aria-current] .muted { color: var(--tint-strong); }

/* ---------- public shell ---------- */
/* The supplied logo has a white background, so every bar that carries it is white with a deep green rule. */
.site-header { background: var(--white); color: var(--primary); border-bottom: 4px solid var(--primary); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700;
  font-size: 1.0625rem; min-height: 48px; }
.brand:hover { color: inherit; }
.brand-logo { height: var(--logo-height); width: auto; aspect-ratio: var(--ratio-logo); object-fit: contain; display: block; }
.brand-logo-footer { background: var(--white); padding: 8px 12px; border-radius: var(--radius); box-sizing: content-box; }
.nav-toggle { background: none; border: 2px solid var(--primary); color: var(--primary); border-radius: var(--radius);
  min-height: 44px; padding: 6px 14px; font: 600 1rem var(--font); cursor: pointer; display: none; }
.js .nav-toggle { display: inline-flex; align-items: center; }
.nav { width: 100%; }
.js .nav { display: none; }
.js .nav.is-open { display: block; }
.nav ul { list-style: none; margin: 0; padding: 0 0 12px; }
.nav a { display: flex; align-items: center; min-height: 48px; color: var(--primary); text-decoration: none; font-weight: 600;
  border-top: 1px solid var(--line); }
.nav a.btn { color: var(--ink); border: 2px solid var(--accent); justify-content: center; margin-top: 8px; }
.nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }

.hero { padding-block: 32px 40px; background: linear-gradient(180deg, var(--tint) 0%, var(--white) 100%); }
.hero h1 { font-size: 2rem; }
.hero__card { margin-top: 28px; }
.hero__card p { margin-top: 10px; }
.ann-band { background: var(--status-tint); border-bottom: 1px solid var(--tint-strong); padding-block: 20px; }
.ann-band__date { font-weight: 700; font-size: .9375rem; color: var(--muted); }
.ann-band h2 { font-size: 1.25rem; margin: 4px 0 6px; }
.ann-band h2 a { text-decoration: none; }

.site-footer { background: var(--ink); color: var(--white); padding-block: 32px; font-size: .9375rem; }
.site-footer a { color: var(--white); display: inline-flex; align-items: center; min-height: 44px; }
.site-footer ul a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer h2 { color: var(--accent); font-size: .8125rem; text-transform: uppercase; letter-spacing: .09em;
  margin-bottom: 10px; }
.site-footer .footgrid { display: grid; gap: 24px; margin-bottom: 24px; }

.float-help { position: fixed; right: 12px; bottom: calc(var(--bar) + 20px + env(safe-area-inset-bottom));
  z-index: 25; display: grid; gap: 10px; }
.float-help a { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--white); }
.float-help a.wa { background: #25D366; }
.float-help a.wa:hover { background: #1DA851; }
.float-help a.call { background: var(--primary); }
.float-help a.call:hover { background: var(--primary-dark); }
.float-help svg { width: 24px; height: 24px; }

/* ---------- member and admin shell ---------- */
.appbar { background: var(--white); color: var(--primary); border-bottom: 4px solid var(--primary); position: sticky; top: 0; z-index: 15; }
.appbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; max-width: none; }
.appbar a.appbar__link { color: var(--primary); font-weight: 600; font-size: .9375rem; display: inline-flex; align-items: center; min-height: 44px; }
.appnav--tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--white);
  border-top: 1px solid var(--line-strong); padding-bottom: env(safe-area-inset-bottom); }
.appnav--tabs ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.appnav--tabs li.more, .appnav--tabs .appnav__foot, .appnav--tabs .appnav__brand { display: none; }
.appnav--tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--bar);
  font-size: .75rem; font-weight: 600; color: var(--muted); text-decoration: none; border-top: 4px solid transparent; }
.appnav--tabs a svg { width: 24px; height: 24px; }
.appnav--tabs a[aria-current] { color: var(--primary); border-top-color: var(--primary); }
.appnav--tabs a.is-main { color: var(--ink); }
.appnav--tabs a.is-main svg { background: var(--accent); border-radius: 50%; padding: 5px; width: 34px; height: 34px; margin-top: -4px; }
.app-main { padding: 20px 0 calc(var(--bar) + 32px); }
.app-main > .wrap { max-width: 720px; }
.app-main--wide > .wrap { max-width: 1280px; }
.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: 1.625rem; margin-bottom: 4px; }
.page-head p { margin: 0; color: var(--muted); }

.appnav--menu { background: var(--tint); color: var(--ink); border-bottom: 1px solid var(--line); }
.js .appnav--menu { display: none; }
.js .appnav--menu.is-open { display: block; }
.appnav--menu .appnav__brand { display: none; }
.appnav--menu ul { list-style: none; margin: 0; padding: 4px 16px 12px; }
.appnav--menu a, .appnav--menu .linkbtn { display: flex; align-items: center; gap: 10px; min-height: 48px; color: var(--primary);
  text-decoration: none; font-weight: 600; width: 100%; }
.appnav--menu a[aria-current] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 3px; }
.appnav--menu svg { width: 22px; height: 22px; }
.appnav--menu .appnav__foot { padding: 0 16px 16px; border-top: 1px solid var(--line); font-size: .9375rem; }
.shell-admin .app-main { padding-bottom: 40px; }

.pay-line { display: grid; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.pay-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; font-weight: 700; }
.pay-total output { font-size: 1.75rem; font-variant-numeric: tabular-nums; }
.preview { border: 1px solid var(--line); border-radius: var(--radius-card); padding: 12px; background: var(--tint); }
.preview img { max-height: 220px; width: auto; border-radius: 4px; }
.preview__name { font-weight: 600; word-break: break-all; }
.status-box { text-align: center; padding: 32px 16px; border: 1px solid var(--line); border-radius: var(--radius-card); }
.status-box h1 { font-size: 1.5rem; margin-top: 16px; }
.status-box p { margin-inline: auto; }
.tick { width: 56px; height: 56px; border-radius: 50%; background: var(--secondary); margin-inline: auto; display: grid; place-items: center; color: var(--ink); }
.tick svg { width: 30px; height: 30px; }
.tick--off { background: var(--ink); color: var(--white); }
.errcode { font-size: 4rem; font-weight: 700; line-height: 1; color: var(--tint-strong); }

/* ---------- 768px: tablets ---------- */
@media (min-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  .wrap { padding-inline: 24px; }
  .section { padding-block: 56px; }
  .nav-toggle, .js .nav-toggle { display: none; }
  .nav, .js .nav { display: block; width: auto; }
  .nav ul { display: flex; gap: 4px; padding: 0; align-items: center; }
  .nav a { border: 0; padding: 0 12px; }
  .nav a.btn { margin: 0 0 0 8px; min-height: 44px; padding: 6px 16px; }
  .float-help { bottom: 20px; right: 20px; }
  .shell-member .float-help { bottom: calc(var(--bar) + 20px); }
  .hero { padding-block: 56px; }
  .hero .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
  .hero h1 { font-size: 2.5rem; }
  .hero__card { margin-top: 0; }
  .ann-band .wrap { display: grid; grid-template-columns: 180px 1fr auto; gap: 24px; align-items: center; }
  .split { grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
  .split--wide { grid-template-columns: 1fr 1.6fr; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .form-row { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { padding: 24px 20px 0 0; }
  .steps li::before { left: 0; top: 0; }
  .steps li::after { left: 18px; top: 5px; right: 6px; bottom: auto; width: auto; height: 2px; }
  .site-footer .footgrid { grid-template-columns: 1.4fr 1fr 1fr; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats > * { border-top: 0; border-right: 1px solid var(--line); }
  .stats > *:last-child { border-right: 0; }
  .filters { grid-template-columns: repeat(4, 1fr) auto; }
  .filters .btn { grid-column: auto; }
  .pay-line { grid-template-columns: 1.2fr 1fr 1fr; align-items: end; }
  .split > .sticky { position: sticky; top: 24px; }
  .grid-2.stack-lg > * + *, .grid-3.stack-lg > * + * { margin-top: 0; }
}

/* ---------- 1024px: laptops. The app gets a sidebar. ---------- */
@media (min-width: 1024px) {
  .shell-member .appbar, .shell-admin .appbar { display: none; }
  .shell-member, .shell-admin { display: grid; grid-template-columns: 256px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; }
  .appnav--tabs, .appnav--menu, .js .appnav--menu { position: sticky; top: 0; bottom: auto; left: auto; right: auto; align-self: start;
    height: 100vh; overflow-y: auto; display: flex; flex-direction: column; background: var(--white); color: var(--ink);
    border: 0; border-right: 1px solid var(--line); padding: 20px 16px; grid-row: 2; }
  .appnav--tabs .appnav__brand, .appnav--menu .appnav__brand { display: flex; margin: 0 0 20px 8px; }
  .appnav--tabs ul, .appnav--menu ul { display: block; padding: 0; flex: 1; }
  .appnav--tabs li.more { display: block; }
  .appnav--tabs a, .appnav--menu a { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 48px; font-size: 1rem; color: var(--primary);
    border: 0; padding: 0 12px; border-radius: var(--radius); }
  .appnav--tabs a:hover, .appnav--menu a:hover { background: var(--tint); color: var(--primary-dark); }
  .appnav--tabs a[aria-current], .appnav--menu a[aria-current] { background: var(--primary); color: var(--white); border: 0; text-decoration: none; }
  .appnav--tabs a.is-main { color: var(--ink); background: var(--accent); margin-block: 8px; }
  .appnav--tabs a.is-main:hover { background: var(--accent-pressed); color: var(--ink); }
  .appnav--tabs a.is-main svg { background: none; padding: 0; width: 24px; height: 24px; margin: 0; }
  .appnav--tabs .appnav__foot, .appnav--menu .appnav__foot { display: block; border-top: 1px solid var(--line); padding: 12px 12px 0; font-size: .9375rem; }
  .appnav__foot a { display: inline; min-height: 0; padding: 0; text-decoration: underline; }
  .appnav__foot a:hover { background: none; }
  .app-main { padding: 40px 0 56px; grid-row: 2; }
  .app-main > .wrap { max-width: 1040px; padding-inline: 40px; }
  .dash { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 40px; align-items: start; }
  .with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
  .dash.stack-lg > * + *, .with-aside.stack-lg > * + * { margin-top: 0; }
  .shell-member .float-help { bottom: 20px; }
  .section { padding-block: 72px; }
}
@media (min-width: 1024px) and (min-height: 820px) {
  .dash > .sticky { position: sticky; top: 24px; }
}
@media (min-width: 1024px) {
  .hero h1 { font-size: 3rem; }
}

/* ---------- 1280px and wider ---------- */
@media (min-width: 1280px) {
  .wrap { padding-inline: 32px; }
  .hero .wrap { gap: 80px; }
  .app-main > .wrap { max-width: 1120px; }
  .app-main--wide > .wrap { max-width: 1400px; }
}
@media (min-width: 1920px) {
  body { font-size: 1.125rem; }
  .wrap { max-width: 1240px; }
  .shell-member, .shell-admin { grid-template-columns: 300px minmax(0, 1fr); }
  .app-main > .wrap { max-width: 1200px; margin-inline: 80px auto; }
}

@media print {
  .site-header, .site-footer, .appbar, .appnav--tabs, .appnav--menu, .float-help, .no-print { display: none !important; }
  .shell-member, .shell-admin { display: block; }
}

/* ---------- phones (under 768px) ----------
   One 6px horizontal rhythm: the container side padding, the gap between
   cards and the card padding are all 6px, so cards sit exactly one gap
   from the screen edge. Card grids that stay readable at half width go
   two-per-line; single-column card layouts get an extra 2px inset so they
   sit 8px from the edge. Steps, forms and long-form blocks stay single. */
@media (max-width: 767px) {
  .wrap { padding-inline: 6px; }
  .appnav--menu ul { padding-inline: 6px; }
  .appnav--menu .appnav__foot { padding-inline: 6px; }

  /* two-per-line card grids: gap between cards equals the edge distance */
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .grid-3 > :nth-child(odd):last-child { grid-column: 1 / -1; }

  /* single-column card layouts: 8px from the screen edge */
  .mcard, .panel, .empty, .status-box, .stats, .steps, .rows, .paysteps, .preview, .faq, .slot { margin-inline: 2px; }
  .grid-3 > .panel { margin-inline: 0; padding: 6px; }
  .rtable { margin-inline: 2px; width: calc(100% - 4px); }

  /* paired actions share one line: equal width, shorter height, single-line labels */
  .cluster--split { gap: 6px; }
  .cluster--split > .btn, .cluster--split > form { flex: 1 1 calc(50% - 3px); min-width: 0; }
  .cluster--split > form > .btn { width: 100%; }
  .cluster--split .btn { min-height: 44px; padding: 8px 10px; font-size: .9375rem;
    letter-spacing: -.01em; white-space: nowrap; }
}

/* ---------- blog ---------- */
.post-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.post-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; text-decoration: none; color: inherit; background: var(--white); transition: border-color .15s, background-color .15s; }
.post-card:hover { border-color: var(--line-strong); background: var(--tint); }
.post-card:hover .post-card__title { text-decoration: underline; text-underline-offset: 3px; }
.post-card__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.post-card__body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.post-card__title { font-size: 1.125rem; margin: 0; }
.post-card__excerpt { margin: 0; color: var(--muted); font-size: .9375rem; }
.prose > * + * { margin-top: 16px; }
.prose h2, .prose h3, .prose h4 { margin-top: 28px; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-card); }
.prose blockquote { margin: 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--secondary); color: var(--muted); font-style: italic; }
@media (min-width: 768px) {
  .post-grid { gap: 20px; }
  .post-card__title { font-size: 1.25rem; }
}
@media (min-width: 1024px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }
}
