/* =====================================================================
   Binchika v3 — wordmark, minimal footer, full-bleed world, monitor, portal, about
   Loaded after main.css. Brand colours never encode party data.
   ===================================================================== */

/* ---------- Wordmark: "Bin" in ink, "chika" in hot gradient, embossed ---------- */
.wordmark { font-family: "Unbounded", var(--f-display); font-weight: 900; letter-spacing: -.045em; line-height: .92; display: inline-flex; align-items: baseline; }
.wordmark > span { display: inline-block; }
.wordmark .wm-hot { background: linear-gradient(175deg, #FFD23F 0%, #FF9F1C 38%, #F2600C 78%, #C2410C 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 1px 0 rgb(255 255 255 / .35)) drop-shadow(0 6px 14px rgb(242 96 12 / .28)); }
.wordmark > span:first-child { color: var(--ink); text-shadow: 0 1px 0 rgb(255 255 255 / .25), 0 6px 18px rgb(0 0 0 / .18); }
.wm-sm { font-size: 1.28rem; }
.wm-hero { font-size: clamp(3.2rem, 15.5vw, 12.5rem); margin: .1em 0 .25em -.04em; display: flex; }
.brand img { width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 2px 6px rgb(0 0 0 / .25)); }
@media (max-width: 400px) { .wm-sm { font-size: 1.05rem; } }

/* ---------- Hero caption + motto on one line ---------- */
.caption-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1.1rem; margin: .25rem 0 0; }
.caption-line .claim { font: 800 clamp(1.05rem, 2.1vw, 1.45rem)/1.25 var(--f-display); letter-spacing: -.02em; }
.caption-line .motto { font: 500 clamp(.95rem, 1.6vw, 1.1rem) var(--f-mono); color: var(--ink-2); }
.caption-line .motto b { color: var(--accent-ink); font-weight: 600; }

/* ---------- Full-bleed flat world map ---------- */
.world-bleed { position: relative; width: 100%; background: var(--sea); border-block: 1px solid var(--line); isolation: isolate; overflow: hidden; }
.world-bleed svg { width: 100%; height: auto; display: block; max-height: 78vh; touch-action: pan-y; }
@media (max-width: 700px) { .world-bleed svg { height: 62vh; max-height: none; } }
.world-bleed .country { fill: var(--land); stroke: var(--sea); stroke-width: .7; cursor: pointer; transition: fill .2s ease; vector-effect: non-scaling-stroke; }
.world-bleed .country.af { fill: var(--africa); }
.world-bleed .country.ng { fill: var(--accent); }
.world-bleed .country:hover { fill: color-mix(in oklab, var(--accent) 60%, var(--land)); }
.world-bleed .country.sel { fill: var(--signal); }
.world-bleed .pulse { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { .world-bleed .pulse { animation: pulse 2.6s var(--spring) infinite; transform-box: fill-box; transform-origin: center; } }
.world-bleed .world-tools { position: absolute; left: max(16px, calc((100% - var(--max)) / 2)); top: 16px; z-index: 3; display: flex; gap: .5rem; flex-wrap: wrap; }
.world-bleed .world-tools select { min-height: 46px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: var(--ink); padding: .5rem 1rem; font: 700 .95rem var(--f-body); max-width: min(320px, 70vw); box-shadow: var(--shadow-1); }
.world-bleed .zoom-btns { right: max(16px, calc((100% - var(--max)) / 2)); }
.world-bleed .world-legend { left: max(16px, calc((100% - var(--max)) / 2)); }
.world-bleed .country-panel { right: max(12px, calc((100% - var(--max)) / 2)); }
.more-btn { margin-top: .25rem; }
.fact-list { margin: .2rem 0 0; font: 400 .92rem/1.45 var(--f-body); color: var(--ink-2); }
.writing { display: inline-flex; gap: .35rem; align-items: center; font: 700 .72rem var(--f-body); color: var(--warn); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Minimal footer ---------- */
.site-foot { background: var(--bg-2); border-top: 1px solid var(--line); padding-block: 2.5rem 2rem; }
.foot-min { display: grid; justify-items: center; gap: 1.1rem; text-align: center; }
.site-foot .socials { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem 1.3rem; padding: 0; margin: 0; }
.social { display: grid; place-items: center; width: 44px; height: 44px; color: color-mix(in oklab, var(--ink) 72%, var(--bg-2)); transition: transform .45s var(--spring), color .25s; }
.social svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 0 rgb(255 255 255 / .75)) drop-shadow(0 -1px 0 rgb(0 0 0 / .35)) drop-shadow(0 8px 10px rgb(0 0 0 / .22)); }
:root[data-theme="dark"] .social svg { filter: drop-shadow(0 1px 0 rgb(255 255 255 / .12)) drop-shadow(0 -1px 0 rgb(0 0 0 / .8)) drop-shadow(0 8px 12px rgb(0 0 0 / .6)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .social svg { filter: drop-shadow(0 1px 0 rgb(255 255 255 / .12)) drop-shadow(0 -1px 0 rgb(0 0 0 / .8)) drop-shadow(0 8px 12px rgb(0 0 0 / .6)); } }
@media (prefers-reduced-motion: no-preference) {
  .social { animation: float 6s ease-in-out infinite; }
  .socials li:nth-child(2n) .social { animation-delay: -1.5s; }
  .socials li:nth-child(3n) .social { animation-delay: -3s; }
  .social:hover { transform: translateY(-5px) scale(1.08); }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.social:hover { color: var(--accent-ink); }
.foot-line { margin: 0; font-size: .9rem; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem .6rem; }
.foot-line .sep { opacity: .4; }
.oru img { height: 36px; width: auto; display: inline-block; vertical-align: middle; transition: transform .4s var(--spring), filter .3s; filter: drop-shadow(0 2px 6px rgb(0 0 0 / .2)); }
.oru:hover img { transform: translateY(-2px) scale(1.04); filter: drop-shadow(0 6px 14px rgb(21 89 214 / .35)); }
.foot-small { margin: 0; font-size: .8rem; color: var(--ink-3); }

/* ---------- Glass bars (About, Sources, Portal) ---------- */
.glass-bar { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--r-xl); background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); border: 1px solid var(--glass-line); box-shadow: var(--shadow-2), inset 0 1px 0 rgb(255 255 255 / .35); }
@media (max-width: 640px) { .glass-bar { grid-template-columns: 1fr; } }
@media (prefers-reduced-transparency: reduce) { .glass-bar { background: var(--surface); backdrop-filter: none; } }
.glass-stack { display: grid; gap: 1.1rem; position: relative; }
.about-aura { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.about-aura::before, .about-aura::after { content: ""; position: absolute; width: 60vmax; aspect-ratio: 1; border-radius: 50%; filter: blur(60px); opacity: .42; }
.about-aura::before { background: radial-gradient(circle, #FF9F1C, transparent 60%); top: -20vmax; left: -15vmax; }
.about-aura::after { background: radial-gradient(circle, #1559D6, transparent 60%); bottom: -25vmax; right: -20vmax; opacity: .3; }
@media (prefers-reduced-motion: no-preference) { .about-aura::before { animation: drift 22s ease-in-out infinite alternate; } .about-aura::after { animation: drift 28s ease-in-out infinite alternate-reverse; } }
.emb-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; flex: none; background: linear-gradient(145deg, #2A2C31, #121316); color: #F2A672; box-shadow: inset 2px 2px 3px rgb(255 255 255 / .12), inset -3px -3px 6px rgb(0 0 0 / .6), 0 10px 24px -8px rgb(0 0 0 / .45); }
.emb-icon svg { width: 32px; height: 32px; filter: drop-shadow(0 1px 0 rgb(255 255 255 / .25)) drop-shadow(0 -1px 0 rgb(0 0 0 / .7)); }
.glass-bar h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: .35rem; }
.glass-bar p, .glass-bar li { color: var(--ink-2); }
.glass-bar ul, .glass-bar ol { padding-left: 1.2rem; margin: .4rem 0 0; }
.tick-list { list-style: none; padding: 0 !important; display: grid; gap: .45rem; }
.tick-list li { display: grid; grid-template-columns: 1.4rem 1fr; gap: .4rem; }
.tick-list li::before { content: "✓"; color: var(--ok); font-weight: 800; }
.tick-list.todo li::before { content: "○"; color: var(--warn); }

/* ---------- Contact: full-bleed background with the form on top ---------- */
.contact-bleed { position: relative; padding-block: clamp(4rem, 10vw, 8rem); isolation: isolate; overflow: hidden; color: #F4F2EE; }
.contact-bleed .bg { position: absolute; inset: 0; z-index: -2; background: #0B0C0F center / cover no-repeat; }
.contact-bleed::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(10 11 13 / .45), rgb(10 11 13 / .8)); }
.contact-card { max-width: 760px; margin-inline: auto; padding: clamp(1.25rem, 3vw, 2.2rem); border-radius: var(--r-xl); background: rgb(16 18 21 / .58); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); border: 1px solid rgb(255 255 255 / .12); box-shadow: 0 30px 80px -20px rgb(0 0 0 / .7); }
.contact-card h2 { color: #fff; }
.contact-card p { color: #D9D4CA; }
.contact-card label { display: grid; gap: .35rem; font: 700 .85rem var(--f-body); color: #E7E3DA; }
.contact-card input, .contact-card select, .contact-card textarea { width: 100%; min-height: 48px; border-radius: 14px; border: 1px solid rgb(255 255 255 / .2); background: rgb(255 255 255 / .08); color: #fff; padding: .7rem .9rem; font: 500 1rem var(--f-body); }
.contact-card select option { color: #111; }
.contact-card textarea { min-height: 150px; resize: vertical; }
.contact-card :focus-visible { outline: 3px solid #7AA7FF; outline-offset: 2px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .wide { grid-column: 1 / -1; }
.attach { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.attach-list { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .3rem; font: 500 .82rem var(--f-mono); color: #CFC9BD; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-card .btn-solid { background: #F4F2EE; color: #0D0E10; }
.contact-card .btn-solid:hover { background: #F2A672; color: #0D0E10; }
.contact-card .btn-ghost { background: rgb(255 255 255 / .08); color: #fff; border-color: rgb(255 255 255 / .25); }
.form-status { min-height: 1.5em; font-weight: 700; }

/* ---------- Election Monitor ---------- */
.race-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 1.25rem 0 0; }
.race-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 140px; padding: 1rem 1.1rem; border-radius: var(--r-l); overflow: hidden; color: #fff; isolation: isolate; box-shadow: var(--shadow-2); border: 3px solid transparent; cursor: pointer; text-align: left; font: inherit; width: 100%; background: none; }
.race-tile::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--tile-bg); }
.race-tile::after { content: ""; position: absolute; inset: -30% -40% auto auto; width: 90%; height: 160%; z-index: -1; background: repeating-linear-gradient(-28deg, rgb(255 255 255 / .16) 0 18px, transparent 18px 46px); transform: rotate(8deg); }
.race-tile b { font: 900 1.2rem/1.05 var(--f-display); letter-spacing: -.01em; text-transform: uppercase; }
.race-tile span { font: 600 .82rem var(--f-body); opacity: .92; margin-top: .3rem; }
.race-tile[aria-pressed="true"] { border-color: var(--ink); }
@media (prefers-reduced-motion: no-preference) { .race-tile { transition: transform .4s var(--spring); } .race-tile:hover { transform: translateY(-3px); } }
.tally-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 1rem; margin: 1.5rem 0 .6rem; }
.tally-head .big { font: 600 clamp(2.2rem, 7vw, 3.8rem)/1 var(--f-mono); letter-spacing: -.05em; }
.tally-head .who { font: 700 1rem var(--f-display); }
.tally-head .right { text-align: right; }
.tally-head .goal-label { text-align: center; font: 700 .8rem var(--f-body); color: var(--ink-2); }
.tally-bar { position: relative; height: 26px; border-radius: 8px; background: var(--pending); display: flex; box-shadow: inset 0 0 0 1px var(--line); }
.tally-bar span { height: 100%; transition: width .8s var(--spring); }
.tally-bar span:first-child { border-radius: 8px 0 0 8px; }
.tally-bar .goal { position: absolute; top: -7px; bottom: -7px; width: 0; border-left: 2px dotted var(--ink); }
.tally-notes { display: flex; justify-content: space-between; gap: 1rem; font: 600 .8rem var(--f-body); color: var(--ink-2); margin-top: .5rem; flex-wrap: wrap; }
.mon-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 1.25rem; align-items: start; margin-top: 1.5rem; }
@media (max-width: 1000px) { .mon-layout { grid-template-columns: 1fr; } }
.mon-map { position: relative; height: clamp(420px, 62vh, 660px); border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-2); }
.hover-card { position: absolute; z-index: 5; min-width: 250px; max-width: 320px; background: var(--surface); color: var(--ink); border-radius: 14px; box-shadow: var(--shadow-2); border: 1px solid var(--line); overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .12s; }
.hover-card h3 { font-size: 1.05rem; margin: 0; padding: .8rem 1rem .6rem; }
.hover-card .row { display: grid; grid-template-columns: 6px 1fr auto; gap: .6rem; align-items: center; padding: .45rem 1rem .45rem 0; border-top: 1px solid var(--line); font-size: .9rem; }
.hover-card .row i { align-self: stretch; }
.hover-card .row b { font-family: var(--f-mono); }
.hover-card .row small { display: block; color: var(--ink-3); }
.hover-card .foot { display: flex; justify-content: space-between; gap: .5rem; padding: .55rem 1rem; font-size: .75rem; color: var(--ink-3); border-top: 1px solid var(--line); }
.demo-watermark { position: absolute; inset: 0; z-index: 4; pointer-events: none; display: grid; place-items: center; font: 900 clamp(3rem, 12vw, 8rem) var(--f-display); color: rgb(220 30 30 / .2); transform: rotate(-18deg); letter-spacing: .05em; }
.lgl { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .8rem; color: var(--ink-2); margin-top: .7rem; }
.lgl i { display: inline-block; width: 26px; height: 10px; border-radius: 3px; margin-right: .3rem; vertical-align: middle; }
.lgl .hatch { background: repeating-linear-gradient(-45deg, var(--ink-3) 0 3px, transparent 3px 6px); }

/* ---------- Portal ---------- */
.portal-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.25rem; align-items: start; }
@media (max-width: 960px) { .portal-grid { grid-template-columns: 1fr; } }
.id-badge { display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .9rem .45rem .5rem; border-radius: 999px; background: var(--ink); color: var(--bg); font: 700 .9rem var(--f-body); }
.id-badge code { font: 600 .95rem var(--f-mono); background: var(--accent); color: #fff; padding: .15rem .55rem; border-radius: 999px; letter-spacing: .06em; }
.tree { overflow-x: auto; }
.tree svg { width: 100%; min-width: 760px; height: auto; }
.tree .node rect { fill: var(--surface); stroke: var(--line-2); }
.tree .node.me rect { stroke: var(--accent); stroke-width: 2.5; fill: color-mix(in oklab, var(--accent) 14%, var(--surface)); }
.tree .node text { fill: var(--ink); font: 700 11px var(--f-body); }
.tree .node text.sub { fill: var(--ink-3); font: 500 9.5px var(--f-mono); }
.tree path.edge { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.tree path.edge.me { stroke: var(--accent); stroke-width: 2.5; }
.flag-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.flag-item { border: 1px solid var(--line); border-radius: var(--r-m); padding: .9rem 1rem; background: var(--surface); }
.flag-item header { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; align-items: center; }
.flag-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.preview-banner { background: repeating-linear-gradient(-45deg, #DCEBFF, #DCEBFF 14px, #C7DDFF 14px, #C7DDFF 28px); color: #0B2A5C; font: 800 .9rem var(--f-body); padding: .7rem 1rem; border-radius: var(--r-m); margin-bottom: 1rem; text-align: center; }
.portal-form label { display: grid; gap: .35rem; font: 700 .85rem var(--f-body); margin-bottom: .8rem; }
.portal-form input, .portal-form select, .portal-form textarea { min-height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); padding: .6rem .8rem; font: 500 1rem var(--f-body); width: 100%; }

/* ---------- Sources page ---------- */
.src-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.src-list li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: .85rem 1rem; display: grid; gap: .2rem; }
.src-list li b { font-family: var(--f-display); }
.src-list li span { font-size: .875rem; color: var(--ink-2); }
.src-list .lic { font: 600 .75rem var(--f-mono); color: var(--ink-3); }

/* header fit on phones: portal moves into the menu; logo, wordmark, WAT clock and theme stay visible */
.nav-portal { display: none !important; }
@media (max-width: 960px) { .portal-btn { display: none !important; } .nav.open .nav-portal { display: block !important; } }
@media (max-width: 420px) { .bar .wrap { gap: .45rem; } .brand { gap: .35rem; } .brand img { width: 34px; height: 34px; } .clock { padding: .25rem .45rem; } .clock-time { font-size: .9rem; } }
.page-home .hero-top { align-items: start; }

:root[data-theme="dark"] .oru img { filter: drop-shadow(0 0 10px rgb(150 190 255 / .35)) drop-shadow(0 2px 6px rgb(0 0 0 / .4)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .oru img { filter: drop-shadow(0 0 10px rgb(150 190 255 / .35)) drop-shadow(0 2px 6px rgb(0 0 0 / .4)); } }

/* grid children may shrink; wide content (hierarchy graph) scrolls inside its own box */
.glass-bar > * { min-width: 0; }
@media (max-width: 700px) { .glass-bar .pledge { grid-template-columns: 1fr !important; } }
