/* IA Community: dark indigo theme, with motion, larger type and open layouts. */

:root {
  --bg: #0a0a1f;
  --bg-raised: #11122b;
  --surface: rgba(255, 255, 255, .05);
  --surface-hover: rgba(255, 255, 255, .08);
  --panel: rgba(255, 255, 255, .06);
  --panel-strong: rgba(255, 255, 255, .1);
  --success: #22c55e;
  --warning: #f59e0b;
  --info: #3b82f6;
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #eef0ff;
  --text-soft: #d9dcf5;
  --muted: #a4a9cc;
  --accent: #8b6cff;
  --accent-2: #4f9dff;
  --accent-soft: rgba(139, 108, 255, .14);
  --link: #b7a6ff;
  --link-hover: #d6ccff;
  --danger: #f87171;
  --gradient: linear-gradient(135deg, #8b6cff 0%, #4f9dff 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 24px 48px -28px rgba(0, 0, 0, .85);
  --glow: 0 0 0 1px rgba(139, 108, 255, .35), 0 24px 60px -24px rgba(139, 108, 255, .55);
  --ring: 0 0 0 3px rgba(139, 108, 255, .4);
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

/* ---- Base ---------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column; /* footer stays at the bottom */
  color: var(--text);
  font: 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(79, 157, 255, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(139, 108, 255, .14), transparent 60%),
    var(--bg);
  overflow-x: hidden;
}
h1, h2, h3 { line-height: 1.15; letter-spacing: -.025em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 3.6vw, 3.2rem); margin: 0 0 14px; }
h2 { font-size: clamp(1.45rem, 2.2vw, 1.9rem); margin: 44px 0 16px; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .15s; }
a:hover { color: var(--link-hover); }
img { max-width: 100%; height: auto; }
code { font-size: .92em; padding: 2px 6px; border-radius: 6px; background: var(--surface-hover); word-break: break-all; }
::selection { background: rgba(139, 108, 255, .45); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

.container { width: 100%; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 16px; top: 16px; background: var(--bg-raised); padding: 8px 12px; z-index: 100; border-radius: 8px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Background: a slowly moving network of nodes (public/js/network-bg.js) ----------------------- */
#network-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .45; }
.login-page #network-bg { opacity: 1; }
.app-page .site-header, .app-page main, .app-page .site-footer, .login-page .site-header, .login-page main, .login-page .site-footer { position: relative; z-index: 1; }

/* ---- Reveal on scroll (only when the script runs) ------------------------------------------------ */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--delay, 0ms); }
html.js .reveal.in { opacity: 1; transform: none; }

/* ---- Header and footer --------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(to bottom, rgba(10, 10, 31, .9), rgba(10, 10, 31, .6));
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: background .3s, border-color .3s;
}
.site-header.scrolled { background: rgba(10, 10, 31, .92); border-bottom-color: var(--border-strong); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; transition: padding .3s; }
.header-inner { gap: 12px 20px; }
.header-inner nav { margin-right: auto; }
.scrolled .header-inner { padding-top: 6px; padding-bottom: 6px; }
.brand { display: inline-flex; align-items: center; color: var(--text); font-weight: 700; text-decoration: none; }
.brand img { display: block; height: 50px; width: auto; transition: height .3s; }
.scrolled .brand img { height: 42px; }
.nav { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav a { position: relative; display: inline-block; padding: 8px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: .97rem; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: var(--surface-hover); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--gradient); }
.nav a.button { color: #fff; margin-left: 8px; }
.nav a.button::after { display: none; }

/* User menu (right side of the header) and drop-downs */
.user-menu { display: flex; align-items: center; gap: 12px; }
.user-menu .nav-link { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .97rem; padding: 8px 10px; }
.user-menu .nav-link:hover { color: var(--text); }
.nav-group { position: relative; display: inline-flex; }
.nav-parent { appearance: none; background: none; border: 0; padding: 8px 14px; cursor: pointer; font: inherit; font-size: .97rem; color: var(--muted); }
.nav-parent::after { content: " \25BE"; font-size: .7em; opacity: .7; }
.nav-parent:hover, .nav-group.open > .nav-parent { color: var(--text); }
.nav-dropdown { position: absolute; top: calc(100% + 6px); left: -12px; display: none; flex-direction: column; min-width: 180px; padding: 6px 0; background: #14152e; border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .6); z-index: 60; }
.nav-dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; } /* keeps the menu open while the pointer crosses the gap */
@media (hover: hover) { .nav-group:hover .nav-dropdown { display: flex; } }
.nav-group.open .nav-dropdown { display: flex; }
.nav-dropdown-right { left: auto; right: 0; }
.nav-dropdown form { margin: 0; }
.nav-dropdown a, .nav-dropdown-item { appearance: none; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; font: inherit; font-size: .93rem; color: var(--muted); padding: 9px 16px; text-decoration: none; white-space: nowrap; display: block; }
.nav-dropdown a:hover, .nav-dropdown-item:hover { background: var(--accent-soft); color: var(--text); }
.user-button { appearance: none; cursor: pointer; font: inherit; color: var(--text); display: flex; flex-direction: column; align-items: flex-end; gap: 3px; padding: 6px 12px; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--border); line-height: 1.1; transition: border-color .15s; }
.user-button:hover, .user-group.open .user-button, .user-button.active { border-color: var(--accent); }
.user-button-name { font-size: .9rem; font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Pills: small coloured labels (status, plan, role) */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--panel-strong); border: 1px solid var(--border-strong); font-size: .75rem; font-weight: 600; line-height: 1.4; }
.pill.sm { font-size: .68rem; padding: 1px 7px; }
.pill.violet, .tag { background: var(--accent-soft); color: #cfc4ff; border-color: rgba(139, 108, 255, .4); }
.pill.blue, .tag-info { background: rgba(59, 130, 246, .18); color: #93c5fd; border-color: rgba(59, 130, 246, .4); }
.pill.green, .tag-success { background: rgba(34, 197, 94, .18); color: #86efac; border-color: rgba(34, 197, 94, .4); }
.pill.amber, .tag-warning { background: rgba(245, 158, 11, .18); color: #fcd34d; border-color: rgba(245, 158, 11, .4); }
.pill.red, .tag-danger { background: rgba(239, 68, 68, .18); color: #fca5a5; border-color: rgba(239, 68, 68, .4); }
.pill.grey, .tag-muted { background: var(--panel-strong); color: var(--muted); border-color: var(--border-strong); }

/* Quick filters: a row of chips above a list */
.quick-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 20px; }
.quick-filters-sep { width: 1px; height: 20px; background: var(--border-strong); margin: 0 4px; }
.chip { appearance: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); border-radius: 999px; padding: 6px 14px; font: 500 .86rem/1.3 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: color .15s, border-color .15s, background .15s; }
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.active, .chip[aria-current="page"] { background: var(--accent-soft); border-color: var(--accent); color: #cfc4ff; font-weight: 600; }
.chip-clear { border-style: dashed; }
.chip .count { font-size: .75rem; opacity: .75; }
.dashboard-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 16px; }
.dashboard-toolbar .field { margin: 0; flex: 1 1 280px; max-width: 480px; }
.dashboard-toolbar .field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

main { flex: 1 0 auto; padding-top: clamp(28px, 5vh, 64px); padding-bottom: 88px; }
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .92rem; background: rgba(0, 0, 0, .2); }
.site-footer .nav a { font-size: .9rem; padding: 4px 10px; }

/* ---- Buttons ------------------------------------------------------------------------------------- */
.button {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; border: 0; cursor: pointer; overflow: hidden;
  font: 600 1rem/1.2 var(--font); color: #fff; text-decoration: none;
  background: var(--gradient);
  box-shadow: 0 12px 30px -12px rgba(139, 108, 255, .9);
  transition: transform .2s var(--ease), box-shadow .2s, filter .2s;
}
.button::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%); transform: translateX(-120%); transition: transform .6s var(--ease); }
.button:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(139, 108, 255, 1); }
.button:hover::after { transform: translateX(120%); }
.button:active { transform: none; }
.button-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: none; }
.button-secondary:hover { color: var(--text); background: var(--surface-hover); box-shadow: none; border-color: rgba(139, 108, 255, .5); }
.button-secondary::after { display: none; }
.button-small { padding: 8px 18px; font-size: .92rem; }
.button[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.button-danger { background: rgba(248, 113, 113, .15); color: #fecaca; border: 1px solid rgba(248, 113, 113, .5); box-shadow: none; }
.button-danger:hover { background: rgba(248, 113, 113, .25); color: #fff; box-shadow: none; }
.button-danger::after { display: none; }
.link-button { background: none; border: 0; padding: 0; color: var(--link); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { color: var(--link-hover); }

/* ---- Type helpers -------------------------------------------------------------------------------- */
.eyebrow { margin: 0 0 16px; font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--link); }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: clamp(1.15rem, 1.5vw, 1.4rem); line-height: 1.55; max-width: 62ch; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.page-intro { max-width: 900px; margin-bottom: 40px; }
.message { max-width: 560px; padding: 40px 0; }
.section-head { max-width: 800px; margin-bottom: 28px; }
.section-head h2 { margin: 0 0 10px; font-size: clamp(1.7rem, 2.8vw, 2.4rem); }
.section-head p { font-size: 1.08rem; }

/* ---- Home ---------------------------------------------------------------------------------------- */
.hero { position: relative; padding: clamp(32px, 9vh, 120px) 0 clamp(32px, 7vh, 88px); }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 5.4rem); line-height: 1.02; letter-spacing: -.04em; margin: 0 0 26px; max-width: 16ch; }
.hero-split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.hero-globe { position: absolute; z-index: -1; right: -6vw; top: 50%; width: clamp(320px, 42vw, 720px); height: auto; transform: translateY(-50%); opacity: .5; pointer-events: none; animation: spin 140s linear infinite, breathe 9s ease-in-out infinite alternate; }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
@keyframes breathe { from { opacity: .4; } to { opacity: .6; } }
.stats { padding: 28px 30px; }
.stats h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 0 0 20px; }
.stat-list { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 20px; margin: 0; }
.stat-list dt { color: var(--muted); font-size: .88rem; }
.stat-list dd { margin: 2px 0 0; font-size: clamp(1.9rem, 2.8vw, 2.6rem); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.next-event { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; margin: 0 0 clamp(48px, 8vh, 96px); padding: 20px 26px; border-radius: var(--radius); background: linear-gradient(90deg, rgba(139, 108, 255, .18), rgba(79, 157, 255, .1)); border: 1px solid rgba(139, 108, 255, .35); color: var(--text); text-decoration: none; overflow: hidden; transition: border-color .2s, transform .25s var(--ease), box-shadow .25s; }
.next-event::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .08) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.next-event:hover { color: var(--text); border-color: rgba(139, 108, 255, .7); transform: translateY(-2px); box-shadow: var(--glow); }
.next-event:hover::before { transform: translateX(120%); }
.next-event-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: #cfc4ff; }
.next-event-title { font-weight: 700; font-size: 1.15rem; }
.next-event-arrow { margin-left: auto; font-size: 1.4rem; color: #cfc4ff; transition: transform .25s var(--ease); }
.next-event:hover .next-event-arrow { transform: translateX(6px); }
.home-section { margin: 0 0 clamp(56px, 10vh, 112px); }

/* Features: open items, no boxes */
.features { display: grid; gap: clamp(20px, 3vw, 40px) clamp(20px, 3vw, 48px); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); list-style: none; padding: 0; margin: 8px 0 0; }
.feature { position: relative; padding: 22px 0 0; border-top: 1px solid var(--border); transition: transform .3s var(--ease); }
.feature::before { content: ""; position: absolute; top: -1px; left: 0; width: 56px; height: 2px; background: var(--gradient); transition: width .4s var(--ease); }
.feature:hover { transform: translateY(-4px); }
.feature:hover::before { width: 100%; }
.feature h2, .feature h3 { font-size: 1.2rem; margin: 10px 0 8px; }
.feature .tag + h3 { margin-top: 14px; }
.feature h2 a { color: var(--text); text-decoration: none; }
.feature h2 a::after { content: ""; position: absolute; inset: 0; } /* whole item is clickable */
.feature p { margin: 0; color: var(--muted); font-size: 1rem; }
.feature-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: #cfc4ff; font-size: 1.3rem; font-weight: 700; }
.feature-link { margin-top: 12px !important; }

.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.split .card h2, .split .card h3 { margin-top: 0; }
.check-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 14px; }
.check-list li { position: relative; padding-left: 32px; color: var(--muted); font-size: 1.02rem; }
.check-list li strong { color: var(--text); }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: var(--accent-soft); color: #cfc4ff; font-size: .78rem; font-weight: 700; }
.cta-band { position: relative; margin: clamp(24px, 6vh, 64px) 0 0; padding: clamp(32px, 6vw, 72px); border-radius: calc(var(--radius) + 10px); text-align: center; overflow: hidden; background: radial-gradient(700px 300px at 50% 0%, rgba(139, 108, 255, .3), transparent 70%), var(--surface); border: 1px solid var(--border-strong); }
.cta-band h2 { margin: 0 0 12px; font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.cta-band p { color: var(--muted); max-width: 60ch; margin: 0 auto 20px; font-size: 1.08rem; }
.cta-band .hero-actions { justify-content: center; }
.cta-benefits { list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; color: var(--text); }
.cta-benefits li::before { content: "✓ "; color: var(--link); font-weight: 700; }

/* ---- Cards and image cards ----------------------------------------------------------------------- */
.card, .sub-form, .person, .badge-card, .event-card, .post-card, .initiative {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.person, .badge-card, .event-card, .post-card, .initiative { transition: transform .3s var(--ease), border-color .3s, box-shadow .3s, background .3s; }
.person:hover, .badge-card:hover, .event-card:hover, .post-card:hover, .initiative:hover { transform: translateY(-5px); border-color: rgba(139, 108, 255, .5); background: var(--surface-hover); box-shadow: var(--glow); }
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 24px 0; }
.card { padding: 24px 26px; }
.card h2 { font-size: 1.1rem; margin: 0 0 10px; }
.card p { margin: 0 0 8px; }
.tag { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; font-size: .8rem; font-weight: 600; border: 1px solid transparent; }

/* The picture (or generated visual) at the top of an image card */
.card-visual { display: grid; place-items: center; width: calc(100% + 2 * var(--card-pad, 22px)); max-width: none; margin: calc(-1 * var(--card-pad, 22px)) calc(-1 * var(--card-pad, 22px)) 16px; aspect-ratio: 2 / 1; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.event-visual, .post-visual { position: relative; color: #fff; font-weight: 700; font-size: 1.1rem; letter-spacing: .02em; text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.event-visual::after, .post-visual::after { content: ""; position: absolute; inset: 0; background: url("/static/img/globe.webp") no-repeat right -20% center / 70% auto; opacity: .35; mix-blend-mode: screen; transition: transform .6s var(--ease); }
.event-card:hover .event-visual::after, .post-card:hover .post-visual::after { transform: scale(1.08) rotate(4deg); }
.event-visual > span, .post-visual > span { position: relative; z-index: 1; padding: 6px 14px; border-radius: 999px; background: rgba(10, 10, 31, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: .9rem; }
.tone-1 { background: linear-gradient(135deg, #6d4dff, #3b82f6); }
.tone-2 { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.tone-3 { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.tone-4 { background: linear-gradient(135deg, #8b5cf6, #22d3ee); }
.tone-5 { background: linear-gradient(135deg, #4f46e5, #a855f7); }
.tone-6 { background: linear-gradient(135deg, #0ea5e9, #8b6cff); }
.card-kicker { font-size: .85rem; color: var(--muted); }
.card-title, .person-name { font-weight: 700; font-size: 1.12rem; line-height: 1.3; color: var(--text); }

/* ---- Forms --------------------------------------------------------------------------------------- */
.form-page { max-width: 480px; }
fieldset { border: 0; padding: 0; margin: 0 0 8px; }
legend { font-weight: 600; margin-bottom: 8px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 7px; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=url], .field input[type=search],
.field input[type=month], .field input[type=date], .field select, .field textarea, .filters select, .filters input[type=search] {
  width: 100%; padding: 12px 15px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, .25); color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:hover, .field select:hover, .field textarea:hover, .filters select:hover { border-color: rgba(255, 255, 255, .26); }
.field input:focus, .field select:focus, .field textarea:focus, .filters select:focus, .filters input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: rgba(0, 0, 0, .35); }
input[type=file] { color: var(--muted); font: inherit; }
input[type=file]::file-selector-button { margin-right: 12px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-hover); color: var(--text); font: inherit; cursor: pointer; }
input[type=checkbox] { accent-color: var(--accent); width: 17px; height: 17px; }
.field-check label { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; }
.field-check input { margin-top: 5px; }
.hint { color: var(--muted); font-size: .88rem; margin: 0 0 6px; }
.error { color: #fca5a5; font-size: .9rem; margin: 0 0 6px; }
.field-error input, .field-error select, .field-error textarea { border-color: var(--danger); }
.error-summary, .notice, .flash { border-radius: var(--radius-sm); padding: 14px 18px; margin: 0 0 24px; }
.error-summary { background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .4); }
.notice { background: rgba(79, 157, 255, .08); border: 1px solid rgba(79, 157, 255, .35); }
.notice p { margin: 0 0 8px; }
.notice p:last-child { margin-bottom: 0; }
.flash { background: rgba(74, 222, 128, .09); border: 1px solid rgba(74, 222, 128, .4); animation: pop .5s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-8px); } }
.two-col { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.checks { display: grid; gap: 8px 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 20px; }
.checks label { display: flex; gap: 8px; align-items: center; }
.code-input { font-family: ui-monospace, "Cascadia Code", Consolas, monospace !important; font-size: .9rem !important; line-height: 1.55; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.inline-form input:not([type=hidden]) { padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: rgba(0, 0, 0, .25); color: var(--text); font: inherit; min-width: 220px; }

/* ---- Editor (profile, articles, admin forms) ----------------------------------------------------- */
.editor { max-width: 980px; }
.editor h2 { margin-top: 40px; }
.publish-panel form { display: inline-block; margin-right: 12px; }
.photo-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.photo-row form { margin: 6px 0; }
.row-item { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--border); }
.row-actions { display: flex; gap: 14px; align-items: center; }
.row-actions form { margin: 0; }
details { margin: 12px 0 8px; }
summary { cursor: pointer; color: var(--link); font-weight: 600; }
.sub-form { margin-top: 14px; padding: 24px; }
.review-panel { margin: 20px 0 8px; }
.review-panel .hero-actions form { margin: 0; }

/* ---- Profiles ------------------------------------------------------------------------------------ */
.avatar { display: inline-grid; place-items: center; width: 80px; height: 80px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); border: 2px solid var(--border-strong); font-weight: 700; font-size: 1.6rem; color: #cfc4ff; flex: none; transition: transform .3s var(--ease); }
.avatar-large { width: 168px; height: 168px; font-size: 3.2rem; border-width: 3px; box-shadow: 0 0 0 8px rgba(139, 108, 255, .12), 0 30px 60px -30px rgba(0, 0, 0, .9); }
.profile { max-width: 1000px; }
.profile-header { display: flex; gap: 36px; align-items: flex-start; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.profile-header h1 { margin: 0 0 6px; font-size: clamp(2.2rem, 4vw, 3.4rem); }
.headline { font-size: 1.25rem; margin: 0 0 8px; color: var(--text-soft); }
.profile-header p { margin: 4px 0; }
.links a { margin-right: 16px; }
.profile-section { margin-top: 44px; }
.profile-section h2 { font-size: 1.35rem; margin-top: 0; }
.profile-section h3 { font-size: 1.05rem; margin: 0; }
.profile-section p, .event p, .award p { max-width: 75ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.chips li { padding: 6px 14px; border-radius: 999px; background: var(--surface-hover); border: 1px solid var(--border); font-size: .92rem; }
.timeline, .items, .badge-list { list-style: none; padding: 0; }
.timeline li, .items li { margin-bottom: 20px; padding-left: 20px; border-left: 2px solid rgba(139, 108, 255, .35); }
.badge-list a { display: flex; gap: 12px; align-items: center; color: var(--text); text-decoration: none; padding: 6px 0; }

/* ---- Directory and people cards ------------------------------------------------------------------ */
.filters { display: flex; flex-wrap: wrap; gap: 0 16px; align-items: flex-end; margin: 28px 0; padding: 18px 20px 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.filters .field { margin-bottom: 14px; min-width: 180px; }
.filters .button, .filters > a { margin-bottom: 14px; }
.people { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); list-style: none; padding: 0; }
.person { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 28px 20px 22px; }
.person > a { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--text); text-decoration: none; }
.person .avatar { width: 96px; height: 96px; font-size: 2rem; }
.person:hover .avatar { transform: scale(1.06); }
.person-headline { color: var(--muted); font-size: .95rem; }
.pager { display: flex; gap: 20px; justify-content: center; align-items: center; margin-top: 36px; }

/* ---- Badges -------------------------------------------------------------------------------------- */
.badge-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); list-style: none; padding: 0; }
.badge-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 18px 22px; text-align: center; }
.badge-card > a { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--text); text-decoration: none; }
.badge-card img, .badge-card .badge-placeholder { transition: transform .4s var(--ease); }
.badge-card:hover img, .badge-card:hover .badge-placeholder { transform: scale(1.08) rotate(-3deg); }
.badge-placeholder { display: inline-grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; background: var(--gradient); color: #fff; font-weight: 700; font-size: 2.2rem; flex: none; box-shadow: 0 16px 36px -14px rgba(139, 108, 255, .95); }
.badge-image { flex: none; filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .5)); }
.badge-card-image { width: min(360px, 80vw); height: auto; }
.badge-row { display: flex; gap: 14px; align-items: center; }
.badge-row img { flex: none; border-radius: 8px; }
.badge-detail, .award { max-width: 1000px; }
.award { text-align: center; margin: 0 auto; padding: clamp(28px, 5vw, 56px); background: radial-gradient(600px 260px at 50% 0%, rgba(139, 108, 255, .22), transparent 70%), var(--surface); border: 1px solid var(--border-strong); border-radius: calc(var(--radius) + 10px); box-shadow: var(--shadow); }
.award p { margin-left: auto; margin-right: auto; }
.award .badge-image { margin: 0 auto 18px; display: block; animation: float 7s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.actions { display: flex; gap: 18px; justify-content: center; align-items: center; flex-wrap: wrap; }
.holder-list { columns: 3 220px; padding-left: 18px; }
.holder-list li { margin-bottom: 4px; }

/* ---- Events -------------------------------------------------------------------------------------- */
.event-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); list-style: none; padding: 0; }
.event-card { --card-pad: 22px; display: flex; flex-direction: column; gap: 6px; padding: var(--card-pad); }
.event-card > a { display: flex; flex-direction: column; gap: 6px; color: var(--text); text-decoration: none; }
.event { max-width: 1000px; }
.event-banner { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin-bottom: 24px; box-shadow: var(--shadow); }
.event-facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; margin: 0 0 26px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); max-width: 640px; }
.event-facts dt { color: var(--muted); font-weight: 600; }
.event-facts dd { margin: 0; }

/* ---- Blog ---------------------------------------------------------------------------------------- */
.chip-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 32px; }
.chip-nav a { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500; transition: color .15s, border-color .15s, background .15s, transform .2s; }
.chip-nav a:hover { transform: translateY(-1px); }
.chip-nav a:hover, .chip-nav a[aria-current="page"] { color: var(--text); border-color: rgba(139, 108, 255, .5); background: var(--accent-soft); }
.post-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); list-style: none; padding: 0; margin: 0; }
.post-card { --card-pad: 24px; display: flex; flex-direction: column; gap: 8px; padding: var(--card-pad); }
.post-card h2, .post-card h3 { font-size: 1.25rem; margin: 4px 0 0; }
.post-card h2 a, .post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h2 a::after, .post-card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card is clickable */
.post-card p { margin: 0; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: .85rem; }
.post-author { margin-top: auto !important; padding-top: 8px; font-size: .9rem; color: var(--muted); }
.blog-cta { margin-top: 56px; max-width: 760px; }
.blog-cta h2 { margin-top: 0; }

.article { max-width: 800px; margin: 0 auto; }
.article-header { margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.article-header h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.08; letter-spacing: -.035em; }
.article-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.article-cats .tag { text-decoration: none; }
.article-byline { margin: 0; }
.prose { font-size: 1.12rem; line-height: 1.8; color: var(--text-soft); }
.prose h2 { font-size: 1.6rem; margin: 2.2em 0 .6em; color: var(--text); }
.prose h3 { font-size: 1.25rem; margin: 1.8em 0 .5em; color: var(--text); }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table { margin: 0 0 1.2em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--text); }
.prose blockquote { padding: 16px 22px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text); }
.prose pre { padding: 16px; overflow-x: auto; background: rgba(0, 0, 0, .35); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.article-footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); }
.legal .prose table { font-size: .95rem; }

/* ---- Initiatives --------------------------------------------------------------------------------- */
.initiative-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); list-style: none; padding: 0; margin: 0 0 24px; }
.initiative { display: flex; flex-direction: column; align-items: flex-start; padding: 28px; }
.initiative h2 { margin: 16px 0 10px; }
.initiative p { color: var(--muted); margin: 0; }
.initiative-cta { margin-top: auto !important; padding-top: 24px; }

/* ---- Account pages (login, sign-up, reset, claim) ------------------------------------------------- */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: clamp(32px, 6vw, 96px); align-items: center; max-width: 1240px; margin: 0 auto; padding: clamp(8px, 4vh, 48px) 0; }
.auth-compact { grid-template-columns: minmax(0, 500px); justify-content: center; }
.auth-aside-title { font-size: clamp(2rem, 3.8vw, 3.3rem); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 28px; max-width: 18ch; }
.auth-benefits { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; max-width: 46ch; }
.auth-benefits li { display: flex; gap: 14px; align-items: flex-start; color: var(--muted); }
.auth-benefits strong { color: var(--text); }
.auth-check { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); color: #cfc4ff; font-size: .85rem; font-weight: 700; margin-top: 1px; }
.auth-card { position: relative; padding: clamp(24px, 4vw, 44px); border-radius: calc(var(--radius) + 8px); background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025)); border: 1px solid var(--border-strong); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(139, 108, 255, .08); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.auth-card h1 { font-size: clamp(1.7rem, 2.5vw, 2.1rem); margin: 0 0 6px; }
.auth-sub { margin: 0 0 24px; }
.auth-row { display: flex; justify-content: flex-end; margin: -8px 0 18px; font-size: .9rem; }
.auth-submit { width: 100%; padding-top: 14px; padding-bottom: 14px; }
.auth-note { margin-top: 22px; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(79, 157, 255, .07); border: 1px solid rgba(79, 157, 255, .25); font-size: .9rem; color: var(--muted); }
.auth-switch { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: .95rem; }
.auth-card .two-col { gap: 0 14px; }

/* ---- Dashboard (account and admin areas) --------------------------------------------------------- */
.dash { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.dash-nav { position: sticky; top: 100px; padding: 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.dash-title { margin: 8px 12px 10px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.dash-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.dash-nav a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 500; transition: color .15s, background .15s, transform .2s var(--ease); }
.dash-nav a:hover { color: var(--text); background: var(--surface-hover); transform: translateX(3px); }
.dash-nav a[aria-current="page"] { color: var(--text); background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.dash-sep { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.dash-main { min-width: 0; }
.dash-main h1 { font-size: clamp(1.8rem, 2.8vw, 2.4rem); }
.account .cards { margin-top: 20px; }
.admin-wide { max-width: 1400px; }
.todo { margin: 0 0 24px; }
.todo h2 { margin: 0 0 8px; font-size: 1.05rem; }
.todo-active { border-color: rgba(139, 108, 255, .5); background: var(--accent-soft); }
.stat-tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin: 0; }
.stat-tiles > div { padding: 20px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: transform .3s var(--ease), border-color .3s; }
.stat-tiles > div:hover { transform: translateY(-3px); border-color: rgba(139, 108, 255, .45); }
.stat-tiles > .positive { border-left: 4px solid var(--success); }
.stat-tiles > .negative { border-left: 4px solid var(--danger); }
.stat-tiles > .pending { border-left: 4px solid var(--warning); }
.stat-tiles > .info { border-left: 4px solid var(--info); }
.stat-tiles dt { color: var(--muted); font-size: .85rem; }
.stat-tiles dd { margin: 4px 0 8px; font-size: 2.2rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-tiles a { font-size: .88rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; word-break: break-word; }
.action-list { display: grid; gap: 14px; }
.action-list form { margin: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---- Tables -------------------------------------------------------------------------------------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 12px 0 28px; font-size: .95rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover td { background: rgba(255, 255, 255, .03); }
.table th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; background: rgba(0, 0, 0, .2); }
.table form { margin: 0; }

/* ---- Cookie consent ------------------------------------------------------------------------------ */
.consent { position: fixed; z-index: 100; left: 16px; right: 16px; bottom: 16px; display: flex; justify-content: center; pointer-events: none; }
.consent[hidden] { display: none; }
.consent-inner { pointer-events: auto; display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; width: 100%; max-width: 1100px; padding: 18px 22px; border-radius: var(--radius); background: rgba(17, 18, 43, .96); border: 1px solid var(--border-strong); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); animation: rise .6s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
.consent-text { flex: 1 1 420px; font-size: .92rem; color: var(--muted); }
.consent-text p { margin: 0 0 8px; }
.consent-title { color: var(--text); font-weight: 700; font-size: 1rem; }
.consent-choice { display: inline-flex; gap: 8px; align-items: center; color: var(--text); font-weight: 500; cursor: pointer; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- Small screens and motion preferences -------------------------------------------------------- */
@media (max-width: 1000px) {
  .hero-split, .split { grid-template-columns: minmax(0, 1fr); }
  .hero-globe { right: -30vw; width: 70vw; opacity: .25; }
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash-nav { position: static; padding: 6px; }
  .dash-nav ul { display: flex; flex-wrap: wrap; gap: 4px; }
  .dash-nav .dash-title { display: none; }
  .dash-sep { margin: 0; padding: 0; border: 0; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); max-width: 540px; }
  .auth-aside { order: 2; }
  .auth-aside-title { font-size: 1.7rem; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand img { height: 44px; }
  .scrolled .brand img { height: 40px; }
  .nav a { padding: 6px 10px; font-size: .9rem; }
  .header-inner nav { order: 3; width: 100%; }
  .user-button-name { max-width: 120px; }
  .profile-header { gap: 20px; }
  .table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
