/* v3: tokens for the interactive parts, mapped onto the main site theme */
:root { --bg: var(--straw); --bg2: var(--straw-2); --glass: var(--panel); --glass-line: var(--line);
  --gold: #E2A831; --ember: #C8352B; --terra: #B9603A; --night: #14171D; --night-2: #1E222A; --ok: #2E8B57; --lock: #8A6418; --ease: cubic-bezier(.23, 1, .32, 1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --lock: #E2A831; } }
:root[data-theme="dark"] { --lock: #E2A831; }
.app svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app .kicker { display: inline-flex; align-items: center; gap: 10px; font: italic 600 16px var(--font-body); color: var(--gold); }
.app .kicker::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.app h3, .app h4 { text-wrap: balance; margin: 0; }
.app-modal h3, .app-modal h4 { margin: 0; }
.app button { font: inherit; color: inherit; }
.app .sr, .app-modal .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.app-modal { font: 16px/1.55 var(--font-body); color: var(--ink); }
.app-modal svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.app-modal h3 { font-family: var(--font-display); }
/* ripple keyframes */
@keyframes rip { to { transform: scale(2.6); opacity: 0; } }
@keyframes pop { from { transform: scale(.96) translateY(6px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes nodeIn { from { transform: translateX(-10px) scale(.96); opacity: 0; } }
/* buttons + ripple */
.app .abtn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 22px; font: 600 15.5px var(--font-body); cursor: pointer; text-decoration: none; transition: transform .16s var(--ease), background-color .2s, box-shadow .2s; }

.app .abtn:active { transform: scale(.97); }

.app .abtn-gold { background: var(--gold); color: #17191E; box-shadow: 0 8px 26px rgba(226,168,49,.28); }

.app .abtn-gold:hover { background: #ECB542; }

.app .abtn-ember { background: var(--ember); color: #fff; }

.app .abtn-glass { background: rgba(255,255,255,.08); color: #F5F1E8; border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(8px); }

.app .abtn-line { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }

.app .abtn-sm { padding: 8px 14px; font-size: 14px; }

.app .ripple { position: absolute; border-radius: 50%; transform: scale(0); background: currentColor; opacity: .25; pointer-events: none; animation: rip .55s var(--ease) forwards; }

@keyframes rip { to { transform: scale(2.6); opacity: 0; } }
/* glass cards */
.app .glass { background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 30px rgba(20,23,29,.06); }

.app .lift { transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }

@media (hover: hover) {
.app .lift:hover { transform: scale(1.02); border-color: rgba(226,168,49,.55); box-shadow: 0 0 0 1px rgba(226,168,49,.25), 0 18px 40px rgba(226,168,49,.14); }
 }
/* badges */
.app .badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(226,168,49,.16); color: var(--lock); white-space: nowrap; }

.app .badge.elder { background: rgba(226,168,49,.18); color: #8A6418; }

.app .badge.exec { background: rgba(200,53,43,.12); color: var(--ember); }

.app .badge.youth { background: rgba(46,139,87,.14); color: var(--ok); }

:root[data-theme="dark"] .app .badge.elder { color: var(--gold); }

@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .app .badge.elder { color: var(--gold); }
 }

.app .lock { display: inline-flex; align-items: center; gap: 6px; color: var(--lock); font-size: 13.5px; font-weight: 600; }

.app .lock svg.i { width: 15px; height: 15px; }
/* tabs with moving pill */
.app .tabs { position: relative; display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); flex-wrap: wrap; }

.app .tabs button { position: relative; z-index: 1; border: 0; background: none; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--muted); transition: color .2s; white-space: nowrap; }

.app .tabs button[aria-selected="true"] { color: #17191E; }

.app .tabs .pill { position: absolute; z-index: 0; border-radius: 999px; background: var(--gold); transition: left .35s var(--ease), top .35s var(--ease), width .35s var(--ease), height .35s var(--ease); }
/* lineage explorer */
.app .tree-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }

.app .search { position: relative; flex: 1 1 260px; max-width: 360px; }

.app .search input { width: 100%; padding: 11px 14px 11px 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--ink); font: 15px var(--font-body); }

.app .search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.app .search-hits { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 10; max-height: 260px; overflow: auto; display: none; padding: 6px; }

.app .search-hits.show { display: block; animation: pop .16s var(--ease); }

.app .search-hits button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 10px; cursor: pointer; font-size: 14.5px; }

.app .search-hits button:hover, .app .search-hits button:focus { background: rgba(226,168,49,.16); outline: none; }

.app .search-hits small { color: var(--muted); display: block; font-size: 12.5px; }

.app select.f { padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--ink); font: 14.5px var(--font-body); }

.app .zoom { display: inline-flex; gap: 6px; margin-left: auto; }

.app .zoom button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); cursor: pointer; display: grid; place-items: center; }

.app .tree-shell { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }

.app .viewport { position: relative; height: 560px; overflow: hidden; border-radius: 18px; background:
  radial-gradient(circle at 1px 1px, rgba(127,127,127,.18) 1px, transparent 0) 0 0 / 22px 22px, var(--glass); border: 1px solid var(--glass-line); cursor: grab; touch-action: none; }

.app .viewport.drag { cursor: grabbing; }

.app .stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }

.app .stage.anim { transition: transform .55s var(--ease); }

.app .stage svg.links-svg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }

.app .stage path { fill: none; stroke: var(--line); stroke-width: 2; }

.app .stage path.hl { stroke: var(--gold); stroke-width: 2.5; }

.app .tn { position: absolute; width: 190px; min-height: 46px; padding: 8px 12px 8px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.25; transition: border-color .2s, box-shadow .2s, opacity .3s, transform .2s var(--ease); animation: nodeIn .4s var(--ease) both; }

@keyframes nodeIn { from { transform: translateX(-10px) scale(.96); opacity: 0; } }

.app .tn:hover { border-color: var(--gold); }

.app .tn .nm { flex: 1; font-weight: 600; }

.app .tn small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }

.app .tn .tg { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--bg2); font-size: 13px; font-weight: 700; flex: none; color: var(--muted); }

.app .tn.open .tg { background: var(--gold); color: #17191E; }

.app .tn.head { background: var(--night); color: #F5F1E8; border-color: var(--gold); }

.app .tn.head small { color: var(--gold); }

.app .tn.anc { border-style: dashed; }

.app .tn.sel { box-shadow: 0 0 0 3px rgba(226,168,49,.55); border-color: var(--gold); }

.app .tn.dim { opacity: .28; }

.app .tn.locked { background: repeating-linear-gradient(135deg, var(--bg), var(--bg) 6px, var(--bg2) 6px, var(--bg2) 12px); }

.app .tn.locked .nm { filter: blur(4px); user-select: none; }

.app .tn .ty { width: 8px; align-self: stretch; border-radius: 4px; flex: none; margin-left: -6px; }

.app .detail { padding: 20px; height: 560px; overflow: auto; }

.app .detail h3 { font-size: 22px; margin: 6px 0 10px; }

.app .detail dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0; font-size: 15px; }

.app .detail dt { color: var(--muted); }

.app .detail dd { margin: 0; font-weight: 600; }

.app .detail .path { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 13px; color: var(--muted); margin-top: 6px; }

.app .detail .path button { border: 0; background: none; padding: 0; cursor: pointer; color: var(--ember); font-weight: 600; font-size: 13px; }

.app .legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; font-size: 13px; color: var(--muted); }

.app .legend span { display: inline-flex; align-items: center; gap: 6px; }

.app .legend i { width: 10px; height: 10px; border-radius: 3px; }

@media (max-width: 900px) {
.app .tree-shell { grid-template-columns: 1fr; }

.app .viewport { height: 460px; }

.app .detail { height: auto; }

.app .zoom { margin-left: 0; }
 }
/* lineage: tap-through list (default, and the only view on phones) */
.app .lv-toggle { margin-bottom: 14px; }

.app #explorer[data-view="list"] .tree-shell, .app #explorer[data-view="list"] .tree-only { display: none; }

.app #explorer[data-view="tree"] .line-list { display: none; }

@media (max-width: 899px) {
.app .lv-toggle { display: none; }

.app #explorer .tree-shell, .app #explorer .tree-only { display: none !important; }

.app #explorer .line-list { display: block !important; }
 }

.app .crumbs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 8px; scrollbar-width: none; }

.app .crumbs::-webkit-scrollbar { display: none; }

.app .crumbs button { flex: none; border: 1px solid var(--line); background: var(--glass); border-radius: 999px; padding: 7px 13px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--muted); }

.app .crumbs button[aria-current] { background: var(--gold); border-color: var(--gold); color: #17191E; }

.app .crumbs span { flex: none; align-self: center; color: var(--muted); }

.app .ll-head { padding: 20px; margin-bottom: 18px; display: grid; gap: 10px; }

.app .ll-head .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.app .ll-head h3 { font-size: clamp(24px, 4vw, 30px); }

.app .ll-head dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 4px 0 0; font-size: 15px; }

.app .ll-head dt { color: var(--muted); }

.app .ll-head dd { margin: 0; font-weight: 600; }

.app .back { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--ember); font-weight: 600; cursor: pointer; padding: 4px 0; font-size: 15px; }

.app .lh { font-size: 20px; margin: 26px 0 12px; }

.app .sg { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }

.app .sgc { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 12px; text-align: left; cursor: pointer; color: inherit; font: inherit; width: 100%; min-height: 64px; }

.app .sgc .ty { width: 6px; align-self: stretch; border-radius: 4px; flex: none; }

.app .sgc .nm { flex: 1; min-width: 0; font-weight: 600; font-size: 16px; line-height: 1.25; }

.app .sgc small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 2px; }

.app .sgc .num { width: 34px; height: 34px; border-radius: 10px; background: var(--bg2); display: grid; place-items: center; font: 700 14px var(--font-display); color: var(--muted); flex: none; }

.app .sgc > svg.i { color: var(--muted); }

.app .tl { list-style: none; margin: 0; padding: 0; position: relative; }

.app .tl::before { content: ""; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 2px; background: var(--line); }

.app .tl li { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; padding: 8px 0; }

.app .tl .dot { width: 40px; height: 40px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); display: grid; place-items: center; font: 700 14px var(--font-display); color: var(--muted); position: relative; z-index: 1; }

.app .tl li.now .dot { background: var(--night); border-color: var(--gold); color: var(--gold); }

.app .tl .card { padding: 10px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-line); transition: box-shadow .3s, border-color .3s; }

.app .tl .card b { font-size: 16px; }

.app .tl .card small { display: block; color: var(--muted); font-size: 13px; }

.app .tl .card p { font-size: 14.5px; margin-top: 4px; color: var(--muted); }

.app .tl li.locked .card b { filter: blur(4px); user-select: none; }

.app .tl li.hl .card { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(226,168,49,.4); }

.app .tl li.hl .dot { border-color: var(--gold); color: var(--ink); }

.app .branches { display: grid; gap: 8px; margin-top: 10px; }

.app .ll-empty { padding: 18px; color: var(--muted); }
/* tabs on phones: one swipeable row instead of a wrapped blob */
@media (max-width: 760px) {
.app .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; -webkit-mask: linear-gradient(90deg, #000 85%, transparent); mask: linear-gradient(90deg, #000 85%, transparent); }

.app .tabs.end { -webkit-mask: none; mask: none; }

.app .tabs::-webkit-scrollbar { display: none; }

.app .tabs button { flex: none; scroll-snap-align: start; padding: 9px 15px; }

.app .mem-tools .tabs { width: 100%; }

}
/* members */
.app .mem-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }

.app .grid-m { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }

.app .mc { padding: 16px; display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: start; cursor: pointer; text-align: left; width: 100%; color: inherit; font: inherit; }

.app .mc .av { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; background: var(--night); display: grid; place-items: center; color: var(--gold); font: 700 19px var(--font-display); }

.app .mc h4 { font-size: 16px; }

.app .mc p { font-size: 13.5px; color: var(--muted); margin: 2px 0 6px; }

.app .empty { color: var(--muted); padding: 30px; text-align: center; }
/* events */
.app .ev-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }

.app .ev-main { padding: 26px; position: relative; overflow: hidden; background: linear-gradient(135deg, var(--night), #2a2219); color: #F5F1E8; border-color: rgba(226,168,49,.25); }

.app .ev-main::after { content: ""; position: absolute; right: -60px; bottom: -40px; width: 260px; height: 270px; background: url(img/cow-line-light.png) center / contain no-repeat; opacity: .14; }

.app .ev-main .meta { color: #C8CBD1; font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 18px; }

.app .ev-main .meta span { display: inline-flex; align-items: center; gap: 6px; }

.app .count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 8px 0 22px; position: relative; z-index: 1; }

.app .count div { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 12px 6px; text-align: center; }

.app .count b { display: block; font: 700 clamp(26px, 4vw, 38px)/1 var(--font-display); color: var(--gold); font-variant-numeric: tabular-nums; }

.app .count span { font-size: 12.5px; color: #C8CBD1; }

.app .ev-main .row { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }

.app .map { margin-top: 18px; height: 140px; border-radius: 14px; border: 1px dashed rgba(255,255,255,.25); display: grid; place-items: center; color: #A3A7AE; font-size: 14px; position: relative; z-index: 1; text-align: center; padding: 10px; }

.app .ev-list { display: grid; gap: 12px; }

.app .ev { padding: 14px 16px; display: grid; grid-template-columns: 58px 1fr auto; gap: 14px; align-items: center; cursor: pointer; text-align: left; width: 100%; color: inherit; font: inherit; }

.app .ev .cal { background: var(--night); color: #F5F1E8; border-radius: 12px; text-align: center; padding: 6px 0; line-height: 1.1; }

.app .ev .cal b { display: block; font: 700 22px var(--font-display); }

.app .ev .cal span { font-size: 12px; color: var(--gold); font-weight: 700; }

.app .ev h4 { font-size: 16px; }

.app .ev p { font-size: 13.5px; color: var(--muted); }

.app .ev.sel { border-color: var(--gold); }

.app .tag-ex { font-size: 11.5px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }

@media (max-width: 900px) {
.app .ev-grid { grid-template-columns: 1fr; }
 }
/* vault */
.app .vault { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 20px; }

.app .vi { overflow: hidden; cursor: pointer; text-align: left; padding: 0; color: inherit; font: inherit; width: 100%; display: flex; flex-direction: column; }

.app .vi .th { height: 170px; background: var(--night); position: relative; display: grid; place-items: center; color: var(--gold); overflow: hidden; }

.app .vi .th img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }

@media (hover: hover) {
.app .vi:hover .th img { transform: scale(1.05); }
 }

.app .vi .th .lk { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20,23,29,.62); backdrop-filter: blur(6px); color: var(--gold); gap: 6px; align-content: center; font-size: 13.5px; font-weight: 600; }

.app .vi .bd { padding: 12px 14px 14px; }

.app .vi h4 { font-size: 15.5px; }

.app .vi p { font-size: 13px; color: var(--muted); margin-top: 4px; }

.app .vi .cat { font-size: 12px; font-weight: 700; color: var(--ember); }
/* bulletin */
.app .bul { display: grid; grid-template-columns: 1fr 340px; gap: 18px; margin-top: 20px; align-items: start; }

.app .posts { display: grid; gap: 12px; }

.app .post { padding: 18px; }

.app .post .top { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 6px; }

.app .post time { font-size: 13px; color: var(--muted); }

.app .post h4 { font-size: 18px; margin-bottom: 4px; }

.app .post p { color: var(--muted); font-size: 15px; }

.app .post.pending { border-style: dashed; }

.app .t { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--bg2); color: var(--muted); }

.app .t.Achievements { background: rgba(226,168,49,.18); color: #8A6418; }

.app .t.Milestones { background: rgba(185,96,58,.15); color: var(--terra); }

.app .t.Council { background: rgba(30,34,42,.1); }

.app .t.Births { background: rgba(46,139,87,.14); color: var(--ok); }

.app .t.Obituaries { background: rgba(94,97,104,.16); }

.app .submit { padding: 20px; position: sticky; top: 84px; }

.app .field { margin-bottom: 12px; }

.app .field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; }

.app .field input, .app .field textarea, .app .field select { width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 15px var(--font-body); }

.app .field textarea { resize: vertical; min-height: 90px; }

.app .field .er { color: var(--ember); font-size: 13px; min-height: 1em; display: block; margin-top: 3px; }

.app .field input.bad, .app .field textarea.bad { border-color: var(--ember); }

@media (max-width: 900px) {
.app .bul { grid-template-columns: 1fr; }

.app .submit { position: static; }
 }
/* security panel */
.app .sec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }

.app .sc { padding: 18px; }

.app .sc h4 { font-size: 16px; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }

.app .sc p { font-size: 14px; color: var(--muted); }

.app .state { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-top: 10px; display: inline-block; }

.app .state.live { background: rgba(46,139,87,.14); color: var(--ok); }

.app .state.srv { background: rgba(226,168,49,.16); color: #8A6418; }

.app .matrix { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 14.5px; }

.app .matrix th, .app .matrix td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }

.app .matrix td:not(:first-child), .app .matrix th:not(:first-child) { text-align: center; }

.app .mx-wrap { overflow-x: auto; }
/* modal + toast */
.app-modal { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; padding: 20px; background: rgba(10,11,14,.6); backdrop-filter: blur(4px); }

.app-modal.open { display: grid; animation: fade .18s var(--ease); }

.app-modal .box { width: min(520px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 24px; background: var(--bg); border: 1px solid var(--glass-line); border-radius: 20px; animation: pop .24s var(--ease); position: relative; }

.app-modal .x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; display: grid; place-items: center; }

.app-modal h3 { font-size: 23px; margin-bottom: 8px; padding-right: 40px; }

.app .role-opt { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); margin-bottom: 10px; cursor: pointer; text-align: left; width: 100%; background: none; }

.app .role-opt[aria-pressed="true"] { border-color: var(--gold); background: rgba(226,168,49,.08); }

.app .role-opt b { display: block; }

.app .role-opt small { color: var(--muted); font-size: 13.5px; }

.app .lb img { width: 100%; border-radius: 12px; display: block; }

@keyframes pop { from { transform: scale(.96) translateY(6px); opacity: 0; } }

@keyframes fade { from { opacity: 0; } }

.app .note { font-size: 13.5px; color: var(--muted); }


/* ===== v3 additions: header portal, home strip, section rhythm ===== */
.role-ic { position: relative; }
.role-ic i { position: absolute; right: 4px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: #8C939E; box-shadow: 0 0 0 2px var(--bark); }
.role-ic i[data-r="member"] { background: #2E8B57; } .role-ic i[data-r="elder"] { background: #E2A831; }
.portal-li { display: none; }
.portal-link b { color: var(--gold); font-weight: 600; }
@media (max-width: 1140px) { .role-ic { display: none; } .portal-li { display: list-item; } }
.app .next-wrap { padding: 44px 0 0; }
.app .next-g { display: grid; grid-template-columns: 1.25fr 1fr auto; gap: 22px; align-items: center; padding: 22px 26px; background: linear-gradient(135deg, var(--night), #2a2219); color: #F5F1E8; border-radius: 18px; border: 1px solid rgba(226,168,49,.25); }
.app .next-g h3 { font: 600 22px/1.2 var(--font-display); margin: 8px 0 6px; }
.app .next-g .tag-ex { color: #C8CBD1; border-color: rgba(255,255,255,.25); }
.app .next-g .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: #C8CBD1; font-size: 14.5px; }
.app .next-g .meta span { display: inline-flex; gap: 6px; align-items: center; }
.app .next-g .count { margin: 0; }
.app .next-g .count b { font-size: clamp(22px, 3vw, 30px); }
@media (max-width: 960px) { .app .next-g { grid-template-columns: 1fr; padding: 20px; } .app .next-g .abtn { justify-self: start; } }
.app .ev-main::after { background-image: url(img/cow-line-light.png); }
.app #bulletin .tabs, .app #vault .tabs { margin-bottom: 4px; }
.app .tabs { max-width: 100%; }
footer a { color: inherit; }
@media (min-width: 1141px) and (max-width: 1460px) { .nav ul { gap: 10px !important; } .nav ul a { font-size: 13.5px !important; } .nav-right { gap: 5px !important; } }
@media (min-width: 1141px) and (max-width: 1300px) { .brand span { display: none; } }

/* ===== phone menu: one column, full width, scrolls inside itself ===== */
@media (max-width: 1140px) {
  .nav ul#menu { flex-wrap: nowrap; position: fixed; top: var(--menu-top, 76px); left: 0; right: 0; bottom: auto; max-height: calc(100vh - var(--menu-top, 76px)); max-height: calc(100dvh - var(--menu-top, 76px)); overflow-y: auto; overscroll-behavior: contain; padding: 6px 20px 28px; background: var(--bark); box-shadow: 0 24px 40px rgba(0,0,0,.45); border-top: 1px solid rgba(255,255,255,.08); z-index: 70; }
  .nav ul#menu li { flex: none; width: 100%; }
  .nav ul#menu a { padding: 11px 0; }
  .nav ul#menu .portal-li { border-top: 1px solid rgba(255,255,255,.12); margin-top: 6px; padding-top: 4px; }
  .nav ul#menu a.portal-link { display: flex; flex-wrap: wrap; gap: 2px 6px; }
  .nav ul#menu a.nav-join { display: block; text-align: center; margin-top: 10px; padding: 12px 16px; }
  body.menu-open { overflow: hidden; }
}

/* ===== narrow phones + bigger text sizes: nothing wider than the screen ===== */
.app .grid-m { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.app .sg { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.app .vault { grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
.app .sec-grid { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.app .next-g > *, .app .ev-grid > *, .app .tree-shell > *, .app .bul > *, .app .ll-head, .app .tl .card { min-width: 0; }
.app .count { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.app .ev { grid-template-columns: 58px minmax(0, 1fr) auto; }
.app h3, .app h4, .app p, .app .nm, .app dd { overflow-wrap: break-word; }
@media (max-width: 420px) {
  .types, .customs, .news-grid { grid-template-columns: 1fr !important; }
  .head-card { grid-template-columns: 80px minmax(0, 1fr) !important; } .head-card > * { min-width: 0; overflow-wrap: break-word; } .head-photo { width: 80px !important; height: 98px !important; }
  .news > * { min-width: 0; }
  .type > *, .custom > * { min-width: 0; overflow-wrap: break-word; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .steps li { min-width: 0; } .steps li b { overflow-wrap: anywhere; font-size: .82em; }
  .app .next-g { padding: 18px 16px; }
  .app .count { gap: 6px; } .app .count div { padding: 10px 2px; } .app .count span { font-size: 11px; }
  .app .count b { font-size: clamp(20px, 7vw, 26px) !important; }
  .app .ev-main { padding: 20px 16px; }
  .app .sgc { padding: 12px 10px 12px 10px; gap: 10px; }
  .app .sec-head p, .app .glass p { hyphens: auto; }
}
@media (max-width: 1140px) { body.menu-open .chat-btn, body.menu-open .to-top, body.menu-open .chat-panel { display: none !important; } }

/* ===== footer: three items in two lines, never a second column ===== */
footer .wrap { flex-wrap: nowrap; }
@media (max-width: 760px) {
  footer .wrap { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; grid-auto-rows: auto; align-content: center; column-gap: 12px; row-gap: 2px; height: auto !important; min-height: 54px; padding: 8px 0 !important; }
  footer .wrap > :nth-child(1) { grid-column: 1; grid-row: 1; min-width: 0; }
  footer .wrap > :nth-child(2) { grid-column: 2; grid-row: 1; }
  footer .wrap > :nth-child(3) { grid-column: 1 / -1; grid-row: 2; }
}
html, body { max-width: 100%; overflow-x: clip; }

/* ===== scroll animations ===== */
.sa-progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #C8352B, #E2A831); z-index: 120; pointer-events: none; }
html.sa-on .sa { opacity: 0; transform: translate3d(0, 28px, 0) scale(.985); transition: opacity .7s var(--ease), transform .8s var(--ease); transition-delay: var(--sa-d, 0ms); will-change: opacity, transform; }
html.sa-on .sa.sa-l { transform: translate3d(-34px, 0, 0); }
html.sa-on .sa.sa-r { transform: translate3d(34px, 0, 0); }
html.sa-on .sa.sa-z { transform: scale(.94); }
html.sa-on .sa.sa-in { opacity: 1; transform: none; }
.page-hero h1, .page-hero .sub { transition: transform .1s linear; }
@media (prefers-reduced-motion: reduce) { .sa-progress { display: none; } html.sa-on .sa { opacity: 1 !important; transform: none !important; transition: none !important; } }

/* ===== online clan office, diaspora ===== */
.app .svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 12px; }
.app .svc { display: flex; align-items: flex-start; gap: 14px; padding: 16px; text-align: left; text-decoration: none; color: inherit; cursor: pointer; width: 100%; font: inherit; min-width: 0; }
.app .svc-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--night); color: var(--gold); display: grid; place-items: center; flex: none; }
.app .svc-ic svg.i { width: 22px; height: 22px; }
.app .svc-b { flex: 1; min-width: 0; }
.app .svc h4 { font-size: 16.5px; margin-bottom: 4px; }
.app .svc p { font-size: 14px; color: var(--muted); }
.app .svc .lock { margin-top: 6px; }
.app .svc > svg.i { color: var(--muted); margin-top: 12px; }
.app .reqs { margin-top: 26px; display: grid; gap: 10px; }
.app .req { padding: 16px; }
.app .req .top { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 6px; }
.app .req h4 { font-size: 16px; margin-bottom: 2px; }
.app .req p { font-size: 14px; } .app .req-act { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.app .badge.st-new { background: rgba(60,120,180,.14); color: #3C78B4; } .app .badge.st-doing { background: rgba(226,168,49,.18); color: var(--lock); } .app .badge.st-done { background: rgba(46,139,87,.14); color: var(--ok); }
.app .ref-no, .app-modal .ref-no { font: 700 28px var(--font-display); letter-spacing: .04em; color: var(--ember); }
.app .online-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 600; }
.app .pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 14px; }
.app .t.Diaspora { background: rgba(60,120,180,.14); color: #3C78B4; }
/* radio / checkbox choice cards (join, RSVP, office forms) */
.v3-choice { display: grid; gap: 8px; }
.v3-choice .lbl { font-weight: 600; font-size: 14.5px; }
.v3-choice label { display: grid !important; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 400 !important; margin: 0 !important; background: var(--panel); }
.v3-choice label:has(input:checked) { border-color: #E2A831; background: rgba(226,168,49,.08); }
.v3-choice input { width: 18px !important; height: 18px; margin: 2px 0 0 !important; accent-color: #C98E1C; }
.v3-choice b { display: block; font-size: 15px; } .v3-choice small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.4; margin-top: 2px; }
.app-modal .v3-choice label { background: var(--bg); }
.app .ev-main .badge, .app .row .badge { white-space: normal; line-height: 1.35; text-align: left; }

/* ===== any currency, settled in UGX ===== */
.fx-box { margin: 2px 0 14px; padding: 14px; border-radius: 14px; background: rgba(226,168,49,.08); border: 1px solid rgba(226,168,49,.35); font-size: 14.5px; }
.fx-box .fx-est { margin: 0 0 10px; } .fx-box .fx-est b { font-size: 18px; }
.fx-flow { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; counter-reset: fx; }
.fx-flow li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 10px 8px 34px; border-radius: 10px; background: rgba(127,127,127,.14); position: relative; counter-increment: fx; }
.fx-flow li::before { content: counter(fx); position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border-radius: 50%; background: #E2A831; color: #17191E; font: 700 11px/18px var(--font-body); text-align: center; }
.fx-flow li:last-child { background: rgba(46,139,87,.2); } .fx-flow li:last-child b { color: #4CC38A; }
.fx-flow span { opacity: .75; } .fx-box .note { margin: 0; font-size: 13px; color: inherit; opacity: .8; }
#g-cur { max-width: 100%; }

/* ===== real contacts: bank box, WhatsApp buttons ===== */
.app .pay-now { padding: 22px; margin-bottom: 22px; display: grid; gap: 16px; border-color: rgba(226,168,49,.5); }
.app .pay-now h3 { font: 600 22px/1.2 var(--font-display); margin-top: 6px; } .app .pay-now .kicker { color: var(--ember); }
.app .pay-now .note { margin-top: 6px; }
.bank-lines { display: grid; gap: 8px; }
.bank-lines > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 12px; border-radius: 12px; background: rgba(127,127,127,.1); }
.bank-lines b { min-width: 130px; font-size: 14px; color: var(--muted); font-weight: 600; }
.bank-lines span { font-weight: 600; } .bank-lines .acct { font: 700 20px var(--font-display); letter-spacing: .04em; }
.bank-lines .copy { margin-left: auto; }
.app .wa-send, .app #sendProof { background: #25D366; color: #0B2E17; box-shadow: none; justify-self: start; }
.app .wa-send:hover, .app #sendProof:hover { background: #2EE173; }
.contact-info small { color: var(--muted); font-weight: 400; }
@media (max-width: 420px) { .bank-lines b { min-width: 0; width: 100%; } .app .pay-now { padding: 18px 16px; } }
.app .pay-now { color: var(--ink); } .app .pay-now .copy { color: var(--ink); border-color: var(--line); background: transparent; }

.live-note{background:#E2A831;color:#17191E;font-size:13.5px;font-weight:600;text-align:center;padding:7px 0;line-height:1.35}
