/* CES City - public site styles. Accent colors come from Admin > Settings (CSS variables --accent / --accent2). */
:root {
  --bg: #0a0b14;
  --bg2: #10121e;
  --card: #151828;
  --card2: #1b1f33;
  --line: rgba(255, 255, 255, .09);
  --text: #e9ebf5;
  --muted: #9aa2bb;
  --good: #34d399;
  --bad: #f87171;
  --warn: #fbbf24;
  --radius: 14px;
  --head-font: "Bahnschrift", "Oswald", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--head-font); line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); text-transform: uppercase; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); text-transform: uppercase; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.section { padding: 44px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.link-more { font-weight: 600; font-size: .95rem; }
.sub-h { margin: 8px 0 16px; font-size: 1.3rem; color: var(--muted); }
.back-link { display: inline-block; margin-bottom: 14px; color: var(--muted); font-size: .9rem; }
.stack { display: grid; gap: 14px; }
.disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* ---- Top bar ---- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(10, 11, 20, .82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--head-font); font-size: 1.25rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.brand:hover { text-decoration: none; }
.brand .emblem { color: var(--accent); }
.brand-logo { height: 34px; width: auto; border-radius: 6px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav > a, .more-menu > summary { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .95rem; cursor: pointer; list-style: none; }
.nav > a:hover, .more-menu > summary:hover { color: var(--text); background: rgba(255, 255, 255, .06); text-decoration: none; }
.nav > a.active, .more-menu > summary.active { color: var(--text); background: rgba(var(--accent-rgb), .16); }
.nav > a.nav-apply { margin-left: 6px; color: #fff; }
summary::-webkit-details-marker { display: none; }
.more-menu, .account-menu { position: relative; }
.menu-pop { position: absolute; top: calc(100% + 6px); left: 0; min-width: 190px; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); display: grid; z-index: 60; }
.menu-pop.menu-right { left: auto; right: 0; }
.menu-pop a { color: var(--text); padding: 9px 12px; border-radius: 8px; font-size: .95rem; }
.menu-pop a:hover { background: rgba(255, 255, 255, .07); text-decoration: none; }
.menu-pop a.active { color: var(--accent); }
.account { margin-left: 4px; }
.account-menu > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; padding: 4px 6px; border-radius: 999px; }
.account-menu > summary:hover { background: rgba(255, 255, 255, .06); }
.account-name { font-weight: 600; font-size: .9rem; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { border-radius: 50%; object-fit: cover; display: inline-block; }
.avatar-initial { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 42px; margin-left: auto; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none !important; transition: transform .12s, filter .12s, background .12s; line-height: 1.2; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-sm { padding: 7px 14px; font-size: .9rem; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-accent { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 65%, var(--accent2))); color: #fff; box-shadow: 0 8px 24px rgba(var(--accent-rgb), .3); }
.btn-accent:hover { filter: brightness(1.08); }
.btn-outline { border-color: rgba(255, 255, 255, .35); color: #fff; background: rgba(255, 255, 255, .04); }
.btn-outline:hover { background: rgba(255, 255, 255, .12); }
.btn-ghost { background: rgba(255, 255, 255, .07); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .13); }
.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { filter: brightness(1.1); }
.btn-danger { background: #b91c1c; color: #fff; }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; min-height: 640px; display: flex; align-items: center; isolation: isolate;
  background: linear-gradient(180deg, #05040f 0%, #0d0824 38%, color-mix(in srgb, var(--accent2) 45%, #0d0824) 72%, color-mix(in srgb, var(--accent) 55%, #1a0f2e) 100%); }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.skyline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 56%; }
.hero-bg::before { content: ""; position: absolute; inset: 0; z-index: 0; background: radial-gradient(ellipse 70% 45% at 50% 100%, rgba(var(--accent-rgb), .55), rgba(var(--accent-rgb), 0) 70%); }
.hero-bg .skyline { z-index: 1; }
.hero-fade { z-index: 2; }
.skyline .star { fill: #fff; }
.skyline .moon { fill: #f6f1e4; }
.skyline .moon-glow { fill: url(#moonglow); }
.skyline .bld-far { fill: color-mix(in srgb, var(--accent2) 38%, #170f2e); }
.skyline .bld-mid { fill: #150d2b; }
.skyline .bld-near { fill: #0b0718; }
.skyline .w1 { fill: #ffd98a; }
.skyline .w2 { fill: var(--accent); }
.skyline .w3 { fill: var(--accent2); }
.skyline .ground { fill: var(--accent); opacity: .7; }
.skyline .tw { animation: twinkle 3.2s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: 1; } to { opacity: .15; } }
.hero-photo { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 11, 20, .35) 0%, rgba(10, 11, 20, 0) 40%, rgba(10, 11, 20, 0) 80%, var(--bg) 100%); }
.hero-content { padding: 70px 0 210px; position: relative; z-index: 3; }
.hero .btn-ghost, .hero .btn-outline { background: rgba(10, 8, 25, .72); backdrop-filter: blur(6px); }
.hero h1 { font-size: clamp(2.4rem, 7vw, 5rem); max-width: 14ch; text-shadow: 0 4px 30px rgba(0, 0, 0, .55); margin-bottom: .3em; }
.hero-text { max-width: 56ch; font-size: 1.15rem; color: #d6d9ea; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.status-line { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-weight: 600; }
.status-count { color: #d6d9ea; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px; border-radius: 999px; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; background: rgba(255, 255, 255, .1); color: var(--muted); }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.is-online { color: var(--good); background: rgba(52, 211, 153, .14); }
.pill.is-online::before { box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: pulse 1.8s infinite; }
.pill.is-offline { color: var(--bad); background: rgba(248, 113, 113, .14); }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: -86px; position: relative; z-index: 5; }
.stat { background: rgba(21, 24, 40, .92); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; box-shadow: 0 14px 40px rgba(0, 0, 0, .35); }
.stat-num { font-family: var(--head-font); font-size: 2.1rem; font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }

.page-hero { padding: 56px 0 30px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent2) 22%, var(--bg)) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: .2em; font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
.page-hero p { color: var(--muted); margin: 0; max-width: 60ch; }

/* ---- Cards / grids ---- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card-body { padding: 18px 20px 20px; }
.empty { padding: 32px; text-align: center; color: var(--muted); }
.feature { padding: 24px; transition: transform .15s, border-color .15s; }
.feature:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), .5); }
.feature-icon { font-size: 1.9rem; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px; background: rgba(var(--accent-rgb), .14); margin-bottom: 14px; }
.feature p { margin: 0; color: var(--muted); }

.news-card { display: block; color: var(--text); overflow: hidden; transition: transform .15s, border-color .15s; }
.news-card:hover { text-decoration: none; transform: translateY(-3px); border-color: rgba(var(--accent-rgb), .5); }
.news-cover { aspect-ratio: 16 / 9; background: linear-gradient(135deg, color-mix(in srgb, var(--accent2) 60%, #10121e), color-mix(in srgb, var(--accent) 50%, #10121e)) center / cover; display: grid; place-items: center; color: rgba(255, 255, 255, .8); }
.news-card h3 { margin: 4px 0 6px; }
.news-card p { margin: 0; font-size: .95rem; }

.event-list { display: grid; gap: 12px; }
.event-row { display: flex; align-items: center; gap: 16px; padding: 14px 18px; }
.event-row h3 { margin: 0; font-size: 1.1rem; }
.event-row p { margin: 0; }
.event-date { flex: 0 0 62px; text-align: center; border-radius: 12px; background: rgba(var(--accent-rgb), .14); border: 1px solid rgba(var(--accent-rgb), .35); padding: 8px 0; line-height: 1.1; }
.event-month { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.event-day { display: block; font-family: var(--head-font); font-size: 1.7rem; font-weight: 700; }
.event-card { overflow: hidden; }
.event-card.is-past { opacity: .6; }
.event-cover { aspect-ratio: 21 / 6; background: center / cover; }
.event-card-body { display: flex; gap: 16px; padding: 18px 20px; }
.event-card-body h3 { margin: 0 0 2px; }

.package { padding: 24px; position: relative; display: flex; flex-direction: column; gap: 6px; }
.package .prose { flex: 1; color: var(--muted); }
.package .prose ul { padding-left: 1.1em; }
.package-img { border-radius: 10px; margin-bottom: 8px; aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.price { font-family: var(--head-font); font-size: 2rem; font-weight: 700; color: var(--accent); }
.badge { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; padding: 4px 10px; border-radius: 999px; background: rgba(var(--accent-rgb), .18); color: var(--accent); }
.package > .badge { position: absolute; top: 14px; right: 14px; }
.badge-pending { background: rgba(251, 191, 36, .16); color: var(--warn); }
.badge-accepted { background: rgba(52, 211, 153, .15); color: var(--good); }
.badge-denied { background: rgba(248, 113, 113, .15); color: var(--bad); }

.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 34px 38px; border-radius: 20px; background: linear-gradient(120deg, color-mix(in srgb, var(--accent2) 55%, #10121e), color-mix(in srgb, var(--accent) 60%, #10121e)); border: 1px solid var(--line); }
.cta-band h2 { margin: 0 0 4px; }
.cta-band p { margin: 0; color: #e4e6f5; }

/* ---- Departments / staff / rules ---- */
.dept { overflow: hidden; border-top: 3px solid var(--dept, var(--accent)); display: flex; flex-direction: column; }
.dept .card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.dept .prose { flex: 1; color: var(--muted); }
.dept-banner { height: 110px; background: linear-gradient(135deg, var(--dept), #10121e) center / cover; }
.dept-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dept-head h1, .dept-head h3 { margin: 0; }
.app-card .card-body { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.app-card .prose { flex: 1; color: var(--muted); }
.staff-group { margin-bottom: 36px; }
.staff-card { padding: 22px 16px; text-align: center; }
.staff-avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; border: 3px solid rgba(var(--accent-rgb), .6); }
.staff-initial { display: grid; place-items: center; font-family: var(--head-font); font-size: 2rem; font-weight: 700; background: rgba(var(--accent-rgb), .18); color: var(--accent); }
.staff-card h3 { margin: 0; }
.rank { color: var(--accent); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.rules-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.rules-nav { position: sticky; top: 84px; padding: 16px; display: grid; gap: 2px; }
.rules-nav h4 { margin: 0 0 6px; color: var(--muted); text-transform: uppercase; font-size: .8rem; letter-spacing: .08em; }
.rules-nav a { color: var(--text); padding: 7px 10px; border-radius: 8px; font-size: .95rem; }
.rules-nav a:hover { background: rgba(255, 255, 255, .06); text-decoration: none; }
.rules-body { display: grid; gap: 20px; }
.rules-section { padding: 24px 26px; scroll-margin-top: 84px; }
.rules-section h2 { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; }
.rule-num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 1.1rem; }
.rule-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rule-list li { display: flex; gap: 14px; padding: 12px 14px; background: var(--card2); border-radius: 10px; }
.rule-list .prose p { margin: 0; }
.rule-id { flex: 0 0 auto; color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; min-width: 2.4em; }

/* ---- Articles / prose ---- */
.article { max-width: 780px; }
.article h1 { text-transform: none; }
.article-cover { border-radius: var(--radius); margin: 18px 0; width: 100%; }
.prose { overflow-wrap: anywhere; }
.prose h3, .prose h4, .prose h5 { margin: 1.2em 0 .4em; }
.prose ul { padding-left: 1.3em; margin: 0 0 1em; }
.prose code { background: rgba(255, 255, 255, .08); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
.prose > :last-child { margin-bottom: 0; }
.more-news { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.more-news a { display: flex; justify-content: space-between; gap: 12px; color: var(--text); }

/* ---- Gallery ---- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.gallery-item { border: 1px solid var(--line); padding: 0; background: var(--card); border-radius: 12px; overflow: hidden; cursor: zoom-in; aspect-ratio: 16 / 10; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gallery-item:hover img { transform: scale(1.05); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 94vh; color: #fff; text-align: center; }
.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.lightbox img { max-width: 94vw; max-height: 82vh; margin: 0 auto; border-radius: 10px; }
.lightbox-close { position: absolute; top: 6px; right: 6px; background: rgba(0, 0, 0, .6); color: #fff; border: 0; width: 38px; height: 38px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; line-height: 1; }

/* ---- FAQ ---- */
.faq { padding: 0; margin-bottom: 12px; }
.faq > summary { padding: 16px 20px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq > summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; }
.faq[open] > summary::after { content: "−"; }
.faq .prose { padding: 0 20px 18px; color: var(--muted); }

/* ---- Status ---- */
.status-card, .chart-card, .status-list { margin-bottom: 18px; }
.status-card { padding: 26px; }
.status-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.status-top h2 { margin: 8px 0 0; text-transform: none; }
.meter-label { margin-bottom: 8px; font-size: 1.1rem; }
.meter { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent2), var(--accent)); transition: width .6s; }
.status-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; margin-top: 20px; }
.status-facts div { background: var(--card2); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.status-facts strong { font-family: var(--head-font); font-size: 1.4rem; }
.chart-card, .section > .card { padding: 22px 24px; }
.chart-card h3 { margin-bottom: 12px; }
.spark { width: 100%; height: 110px; display: block; }
.spark-line { stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark-area { fill: rgba(var(--accent-rgb), .15); }

/* ---- Tables, pager ---- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 26px; }
.pager a, .pager .current { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--text); }
.pager .current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }

/* ---- Forms & alerts ---- */
label { display: block; font-weight: 600; margin-bottom: 14px; font-size: .95rem; }
input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], input[type=datetime-local], select, textarea {
  width: 100%; margin-top: 6px; padding: 11px 13px; background: #0e1020; color: var(--text); border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; font: inherit; }
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(var(--accent-rgb), .6); outline-offset: 1px; border-color: transparent; }
.form-card { padding: 24px; margin-bottom: 18px; }
.form-card h3 { margin-bottom: 14px; }
.field { margin-bottom: 20px; }
.field-label { display: block; margin-bottom: 4px; }
.req { color: var(--bad); }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: .85rem; margin-top: 4px; }
.checks { display: grid; gap: 8px; margin-top: 6px; }
.check { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 500; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid transparent; }
.alert-success { background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .4); color: #a7f3d0; }
.alert-error { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .4); color: #fecaca; }
.alert-warn { background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .4); color: #fde68a; }
.alert-info { background: rgba(96, 165, 250, .12); border-color: rgba(96, 165, 250, .4); color: #bfdbfe; }
.flash-wrap { padding-top: 16px; }
.auth-wrap { display: grid; place-items: center; min-height: 60vh; }
.auth-card { width: min(440px, 100%); padding: 32px; }
.auth-card h1 { font-size: 2rem; text-align: center; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 18px 0; font-size: .85rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.account-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.message-card { padding: 16px 20px; margin-bottom: 18px; border-left: 4px solid var(--good); }
.message-card.is-bad { border-left-color: var(--bad); }
.qa { padding: 12px 0; border-bottom: 1px solid var(--line); }
.qa:last-child { border-bottom: 0; }
.qa .q { font-weight: 700; margin-bottom: 4px; }
.qa .a { color: #d4d7e8; overflow-wrap: anywhere; }
.app-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; color: var(--text); }
.app-row:hover { text-decoration: none; border-color: rgba(var(--accent-rgb), .5); }

/* ---- Footer ---- */
.site-footer { margin-top: 60px; border-top: 1px solid var(--line); background: var(--bg2); padding-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding-bottom: 28px; }
.footer-grid h4 { text-transform: uppercase; font-size: .85rem; letter-spacing: .08em; color: var(--muted); }
.footer-grid a { display: block; color: var(--text); padding: 3px 0; }
.brand-footer { margin-bottom: 8px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .rules-layout { grid-template-columns: 1fr; }
  .rules-nav { position: static; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg2); border-bottom: 1px solid var(--line); padding: 10px 20px 18px; margin: 0; }
  .nav.open { display: flex; }
  .nav > a.nav-apply { margin: 8px 0 0; text-align: center; justify-content: center; }
  .more-menu .menu-pop { position: static; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 10px; }
  .account { margin-left: 0; }
  .account-name { display: none; }
  .topbar-inner { position: relative; }
}
@media (max-width: 640px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { min-height: 560px; }
  .hero-content { padding-bottom: 170px; }
  .footer-grid { grid-template-columns: 1fr; }
  .stat-strip { margin-top: -70px; gap: 10px; }
  .stat-num { font-size: 1.6rem; }
  .cta-band { padding: 26px; }
  .event-card-body { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
