/* KOSA 007 Foundation: forest green and kente gold */
:root {
  --forest: #0f3d2e;
  --forest-2: #17543f;
  --leaf: #1f7a55;
  --leaf-soft: #e3f0e8;
  --gold: #e0a526;
  --gold-deep: #b57f0c;
  --gold-soft: #f8ebc6;
  --chalk: #f4f5f0;
  --paper: #ffffff;
  --ink: #1b221e;
  --muted: #5b655e;
  --line: #d9ddd3;
  --red: #b2362a;
  --red-soft: #f8e1dd;
  --radius: 10px;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--chalk); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--leaf); }
a:hover { color: var(--forest); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; color: var(--forest); letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--ink); padding: .5rem 1rem; z-index: 99; }
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.wrap.narrow { width: min(720px, 100% - 2.5rem); }
.page { padding-block: 2.5rem 4rem; }
.section { padding-block: 3.5rem; }
.section.tint { background: var(--paper); border-block: 1px solid var(--line); }
.section.dark { background: var(--forest); color: #e9efe9; }
.section.dark h2, .section.dark h3 { color: #fff; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.sm { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.cols-2 { display: grid; gap: 2rem; grid-template-columns: repeat(2, 1fr); }
.split { display: grid; gap: 2.5rem; grid-template-columns: 1.1fr .9fr; align-items: start; }
.stack > * + * { margin-top: 1.1rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }

/* ---------------------------------------------------------------- header */
.site-header { background: var(--forest); color: #fff; position: sticky; top: 0; z-index: 30; box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: #fff; }
.brand-num { font-family: var(--display); font-weight: 800; font-size: 1.6rem; color: var(--gold); letter-spacing: -.03em; border: 2px solid var(--gold); border-radius: 8px; padding: .05rem .45rem; line-height: 1.2; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--display); font-size: 1.05rem; }
.brand-text small { color: #b9cdbf; font-size: .78rem; letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.nav a, .nav button.linklike { color: #e2ebe4; text-decoration: none; padding: .5rem .7rem; border-radius: 8px; font: inherit; font-size: .95rem; background: none; border: 0; cursor: pointer; }
.nav a:hover, .nav button.linklike:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav a.active { color: var(--gold); }
.nav .btn { margin-left: .4rem; }
.nav-toggle { display: none; background: none; color: #fff; border: 1.5px solid rgba(255,255,255,.4); border-radius: 8px; padding: .4rem .8rem; font: inherit; cursor: pointer; }
.subnav { background: var(--forest-2); border-top: 1px solid rgba(255,255,255,.08); }
.subnav .wrap { display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: thin; }
.subnav a { color: #d3e3d8; text-decoration: none; padding: .55rem .8rem; white-space: nowrap; font-size: .9rem; border-bottom: 3px solid transparent; }
.subnav a:hover { color: #fff; }
.subnav a.active { color: #fff; border-bottom-color: var(--gold); }
.pill { background: var(--gold); color: var(--ink); border-radius: 999px; font-size: .72rem; font-weight: 700; padding: .05rem .45rem; margin-left: .25rem; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 600; font-size: .95rem; padding: .6rem 1.15rem; border-radius: 8px; border: 2px solid var(--forest); background: var(--forest); color: #fff; text-decoration: none; cursor: pointer; transition: background .15s, transform .1s; }
.btn:hover { background: var(--forest-2); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #ecb53a; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--forest); }
.btn-ghost:hover { background: var(--leaf-soft); color: var(--forest); }
.site-header .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.site-header .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-danger { background: var(--red); border-color: var(--red); }
.btn-danger:hover { background: #8f2a20; }
.btn-sm { padding: .3rem .7rem; font-size: .85rem; }
button.linklike { background: none; border: 0; padding: 0; color: var(--leaf); text-decoration: underline; cursor: pointer; font: inherit; }
.inline { display: inline; }

/* ---------------------------------------------------------------- flash + banners */
.flashes { padding-top: 1rem; }
.flash { padding: .75rem 1rem; border-radius: 8px; margin-bottom: .6rem; border-left: 5px solid var(--leaf); background: var(--leaf-soft); }
.flash.error { border-color: var(--red); background: var(--red-soft); }
.flash.info { border-color: var(--gold); background: var(--gold-soft); }
.banner { padding: 1rem 1.25rem; border-radius: var(--radius); background: var(--gold-soft); border: 1px solid #ecd48f; margin-bottom: 1.5rem; }
.banner.green { background: var(--leaf-soft); border-color: #b8d6c3; }
.banner strong { color: var(--forest); }

/* ---------------------------------------------------------------- hero */
.hero { background: var(--chalk); overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2rem; align-items: center; padding-block: 4rem 4.5rem; }
.hero h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); max-width: 14ch; }
.hero .lead { margin-bottom: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.mark { font-family: var(--display); font-weight: 800; font-size: clamp(9rem, 24vw, 19rem); line-height: .85; letter-spacing: -.06em; display: flex; justify-content: center; user-select: none; }
.mark i { font-style: normal; color: transparent; -webkit-text-stroke: 3px var(--forest); }
.mark b { color: var(--gold); }
.mark-caption { text-align: center; font-family: var(--display); font-weight: 700; color: var(--forest); margin-top: .5rem; font-size: 1.15rem; }
.page-head { background: var(--forest); color: #dbe7de; padding-block: 3rem; }
.page-head h1 { color: #fff; margin-bottom: .4rem; }
.page-head p { margin: 0; max-width: 60ch; font-size: 1.1rem; }

/* ---------------------------------------------------------------- panels and cards */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.panel + .panel { margin-top: 1.25rem; }
.panel h3:first-child, .panel h2:first-child { margin-top: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; display: flex; flex-direction: column; gap: .5rem; }
.card h3 { margin: 0; font-size: 1.1rem; }
.card .foot { margin-top: auto; padding-top: .6rem; }
a.card { text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--leaf); transform: translateY(-2px); }
.rule-list { list-style: none; padding: 0; margin: 0; }
.rule-list li { padding: .85rem 0; border-top: 1px solid var(--line); }
.rule-list li:first-child { border-top: 0; }
.numbered { counter-reset: n; list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.numbered li { counter-increment: n; display: grid; grid-template-columns: 2.4rem 1fr; gap: .75rem; align-items: start; }
.numbered li::before { content: counter(n); font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: var(--forest); background: var(--gold); border-radius: 50%; width: 2.1rem; height: 2.1rem; display: grid; place-items: center; }
.values { display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; list-style: none; margin: 0; }
.values li { border: 1.5px solid var(--forest); color: var(--forest); border-radius: 999px; padding: .35rem .95rem; font-weight: 600; background: var(--paper); }
.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 1.5rem; }
.stat { background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: var(--radius); padding: .9rem 1.1rem; }
.stat b { display: block; font-family: var(--display); font-size: 1.9rem; color: var(--forest); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .88rem; }
.stat.good { border-left-color: var(--leaf); }
.stat.bad { border-left-color: var(--red); }

/* ---------------------------------------------------------------- avatars */
.avatar { border-radius: 50%; object-fit: cover; background: var(--leaf-soft); flex: none; }
.avatar.sm { width: 36px; height: 36px; }
.avatar.md { width: 56px; height: 56px; }
.avatar.lg { width: 96px; height: 96px; }
.avatar.xl { width: 150px; height: 150px; }
.avatar.ph { display: grid; place-items: center; font-family: var(--display); font-weight: 700; color: var(--forest); background: var(--gold-soft); border: 2px solid var(--gold); }
.avatar.sm.ph { font-size: .8rem; } .avatar.md.ph { font-size: 1.1rem; } .avatar.lg.ph { font-size: 1.9rem; } .avatar.xl.ph { font-size: 3rem; }
.person { display: flex; gap: .85rem; align-items: center; }
.officer { text-align: center; }
.officer .avatar { margin: 0 auto .6rem; }
.officer.vacant { opacity: .65; }
.officer h4 { margin-bottom: .1rem; }
.officer .role { color: var(--leaf); font-weight: 600; font-size: .9rem; }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: .3rem; }
.field label { font-weight: 600; font-size: .92rem; }
.input, input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=url], input[type=search], select, textarea {
  width: 100%; font: inherit; padding: .65rem .8rem; border: 1.5px solid #bcc3b9; border-radius: 8px; background: #fff; color: var(--ink);
}
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 3px rgba(31,122,85,.2); }
.field.has-error .input, .field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red); }
.field.check { flex-direction: row; flex-wrap: wrap; }
.check-label { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check-label input { width: 1.1rem; height: 1.1rem; margin-top: .25rem; accent-color: var(--forest); }
.hint { color: var(--muted); font-size: .85rem; margin: 0; }
.error { color: var(--red); font-size: .88rem; margin: 0; font-weight: 600; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.4rem; }
.two { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.filters { display: flex; gap: .75rem; flex-wrap: wrap; align-items: end; margin-bottom: 1.5rem; }
.filters .field { min-width: 160px; flex: 1; }
.filters .field.grow { flex: 2; min-width: 220px; }
form.inline-form { display: inline-flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
form.inline-form select, form.inline-form input { width: auto; padding: .35rem .5rem; font-size: .88rem; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.data th { text-align: left; background: #eef1ea; color: var(--forest); font-weight: 700; padding: .7rem .9rem; white-space: nowrap; }
table.data td { padding: .7rem .9rem; border-top: 1px solid var(--line); vertical-align: middle; }
table.data tr:hover td { background: #fafbf8; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: #e6e9e2; color: #3d463f; }
.badge.ok { background: var(--leaf-soft); color: var(--forest); }
.badge.warn { background: var(--gold-soft); color: #7a5600; }
.badge.bad { background: var(--red-soft); color: var(--red); }
.badge.gold { background: var(--gold); color: var(--ink); }
.pager { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 1.5rem; align-items: center; }
.pager a, .pager span { padding: .35rem .75rem; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; font-size: .9rem; }
.pager .current { background: var(--forest); color: #fff; border-color: var(--forest); }
.empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; border: 1.5px dashed var(--line); border-radius: var(--radius); background: var(--paper); }
dl.kv { display: grid; grid-template-columns: 9rem 1fr; gap: .45rem 1rem; margin: 0; }
dl.kv dt { color: var(--muted); font-size: .9rem; }
dl.kv dd { margin: 0; font-weight: 500; }

/* ---------------------------------------------------------------- progress and bars */
.progress { height: 10px; background: #e3e6dd; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--leaf), var(--gold)); border-radius: 99px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 3.4rem; gap: .75rem; align-items: center; margin: .45rem 0; font-size: .9rem; }
.bar-row .track { height: 14px; background: #e8ebe3; border-radius: 4px; overflow: hidden; }
.bar-row .track > span { display: block; height: 100%; background: var(--leaf); border-radius: 4px; }
.bar-row.gold .track > span { background: var(--gold); }
.bar-row .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.columns-chart { display: flex; align-items: flex-end; gap: .4rem; height: 160px; padding-top: 1rem; }
.columns-chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; font-size: .72rem; color: var(--muted); }
.columns-chart .col i { display: block; width: 100%; background: var(--leaf); border-radius: 4px 4px 0 0; min-height: 2px; }
.columns-chart .col b { font-size: .72rem; color: var(--ink); }
.columns-chart.gold .col i { background: var(--gold); }

/* ---------------------------------------------------------------- tabs */
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--line); margin-bottom: 1.5rem; flex-wrap: wrap; }
.tabs a { padding: .6rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a.active { color: var(--forest); border-bottom-color: var(--gold); }

/* ---------------------------------------------------------------- messages */
.msg-row { display: grid; grid-template-columns: 11rem 1fr auto; gap: 1rem; padding: .8rem 1rem; border-top: 1px solid var(--line); text-decoration: none; color: inherit; align-items: center; }
.msg-row:first-child { border-top: 0; }
.msg-row:hover { background: #fafbf8; }
.msg-row.unread { font-weight: 700; background: #fffdf3; }
.msg-body { white-space: normal; line-height: 1.7; }

/* ---------------------------------------------------------------- ballot */
.ballot-pos { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.choice { display: flex; gap: .9rem; align-items: flex-start; padding: .8rem; border: 1.5px solid var(--line); border-radius: 8px; margin-top: .6rem; cursor: pointer; }
.choice:hover { border-color: var(--leaf); }
.choice input { margin-top: .4rem; accent-color: var(--forest); width: 1.1rem; height: 1.1rem; }
.choice:has(input:checked) { border-color: var(--forest); background: var(--leaf-soft); }

/* ---------------------------------------------------------------- member card */
.id-card { width: min(380px, 100%); background: linear-gradient(145deg, var(--forest) 0%, var(--forest-2) 100%); color: #fff; border-radius: 16px; padding: 1.4rem; position: relative; overflow: hidden; box-shadow: 0 10px 30px rgba(15,61,46,.3); }
.id-card::after { content: "007"; position: absolute; right: -.6rem; bottom: -2.2rem; font-family: var(--display); font-weight: 800; font-size: 9rem; color: rgba(224,165,38,.14); letter-spacing: -.06em; pointer-events: none; }
.id-card .org { display: flex; justify-content: space-between; align-items: center; font-family: var(--display); font-weight: 700; }
.id-card .org small { color: var(--gold); font-weight: 600; }
.id-card .who { display: flex; gap: 1rem; align-items: center; margin: 1.1rem 0; }
.id-card .who h3 { color: #fff; margin: 0; font-size: 1.3rem; }
.id-card .who p { margin: 0; color: #c7d9cd; font-size: .9rem; }
.id-card .qr { background: #fff; border-radius: 10px; padding: .4rem; width: 130px; height: 130px; }
.id-card .meta { display: flex; justify-content: space-between; align-items: end; gap: 1rem; position: relative; z-index: 1; }
.id-card .num-tag { font-family: var(--display); font-size: 1.15rem; font-weight: 700; color: var(--gold); letter-spacing: .04em; }
.verify-box { text-align: center; padding: 2.5rem 1.5rem; }
.verify-box .tick { width: 72px; height: 72px; border-radius: 50%; background: var(--leaf); color: #fff; display: grid; place-items: center; font-size: 2.2rem; margin: 0 auto 1rem; }
.verify-box .tick.no { background: var(--red); }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--forest); color: #c8d9ce; padding-block: 3rem 2rem; margin-top: 4rem; }
.site-footer a { color: #e7f0ea; }
.site-footer h4 { color: var(--gold); font-size: 1rem; }
.site-footer .cols { display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.14); margin-top: 2rem; padding-top: 1.2rem; font-size: .85rem; }

/* ---------------------------------------------------------------- error page */
.error-page { text-align: center; padding-block: 5rem; }
.error-page .code { font-family: var(--display); font-weight: 800; font-size: 7rem; color: var(--gold); line-height: 1; }

@media (max-width: 860px) {
  .hero-inner, .split, .cols-2, .site-footer .cols { grid-template-columns: 1fr; }
  .mark { font-size: clamp(7rem, 38vw, 11rem); }
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--forest); padding: .75rem 1.25rem 1rem; flex-direction: column; align-items: stretch; border-top: 1px solid rgba(255,255,255,.1); }
  .nav.open { display: flex; }
  .nav .btn { margin: .4rem 0 0; }
  .two { grid-template-columns: 1fr; }
  .msg-row { grid-template-columns: 1fr; gap: .2rem; }
  dl.kv { grid-template-columns: 1fr; gap: .1rem; }
  dl.kv dd { margin-bottom: .6rem; }
}
@media print {
  .site-header, .site-footer, .subnav, .no-print, .flashes { display: none !important; }
  body { background: #fff; }
  .id-card { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .page { padding: 0; }
}
