@layer evac-utilities, evac-framework, evac-pages;
@import url('https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css') layer(evac-framework);
@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700&display=swap');

/* Page-specific layouts are layered; shared components are defined only here. */
:root {
  color-scheme: dark;
  --bg-primary: #111310; --bg-secondary: #1b1e19; --bg-tertiary: #22271e;
  --text-primary: #e8e7df; --text-secondary: #a5aa9f; --text-muted: #8d9586;
  --accent-primary: #b5936b; --accent-secondary: #cc897b;
  --accent-orange: #b5936b; --accent-orange-dark: #967750;
  --accent-orange-hover: #cfb28d; --accent-orange-light: #cfb28d;
  --action-fill: #cca373; --action-hover: #d9b382; --action-edge: #e5c69f;
  --border-color: #343c2f; --shadow: 0 8px 24px #0003; --neon-glow: none; --gradient-orange: #b5936b;
  --faction-yellow: #c7b87e; --faction-yellow-dark: #978956; --faction-yellow-light: #e0d3a2;
  --faction-green: #8cab7a; --faction-green-dark: #607c50; --faction-green-light: #b6ceaa;
  --faction-red: #c4837b; --faction-red-dark: #965d55; --faction-red-light: #dfaaa2;
  --faction-orange: #b5936b; --faction-orange-dark: #967750; --faction-orange-light: #cfb28d;
}
html, body { background: var(--bg-primary); color: var(--text-primary); }
html { scroll-padding-top: 100px; }
body { min-height: 100vh; font: 400 15px/1.65 'Golos Text', sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font-family: inherit; }
h1, h2, h3, h4, h5, h6, .title, .subtitle, .label, strong, .content h1, .content h2, .content h3, .content h4, .content strong { color: var(--text-primary); }
.title, h1, h2, h3 { font-weight: 600; line-height: 1.25; letter-spacing: -.02em; }
.subtitle { color: var(--text-secondary); line-height: 1.55; }
a { color: var(--accent-orange-light); transition: color .16s; }
a:hover { color: #e0c5a2; }
hr { height: 1px; background: var(--border-color); }
::selection { background: #b5936b; color: #111310; }
:is(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid #cfb28d; outline-offset: 3px; }
.section { padding: 2.75rem 2rem; }
.hero, .hero-body { background: var(--bg-primary); }
.hero-body > .container { min-width: 0; width: 100%; }
.content { overflow-wrap: anywhere; }
/* Important Bulma utilities are replaced in the first layer; page and component
   rules remain ordinary declarations instead of competing with !important. */
@layer evac-utilities {
.has-background-dark, .has-background-darker { background-color: var(--bg-secondary) !important; }
.has-text-white, .has-text-light, .has-text-grey-lighter { color: var(--text-primary) !important; }
.has-text-grey, .has-text-grey-light, .help { color: var(--text-secondary) !important; }
.has-text-orange, .has-text-primary, .has-text-info { color: #cfb28d !important; }
.has-text-success { color: #9bb88b !important; }
.has-text-danger { color: #e3a094 !important; }
.has-text-warning { color: #d5bd88 !important; }
}

/* Public, admin and data headers use the same dimensions. */
.evac-header { position: sticky; top: 0; z-index: 40; background: #151812; border-bottom: 1px solid var(--border-color); }
.evac-header .navbar { min-height: 85px; padding: 0 max(24px, 4vw); background: transparent; }
.evac-header .navbar > .container { max-width: none; width: 100%; margin: 0; padding: 0; background: transparent; }
.evac-header .navbar > .container .navbar-brand { margin-left: 0; }
.evac-header .navbar > .container .navbar-menu { margin-right: 0; }
.evac-header .navbar-brand { min-height: 85px; align-items: center; }
.evac-header .evac-brand { color: #c4c18c; font: 900 32px/1 'Arial Black', Impact, sans-serif; letter-spacing: -.055em; padding-left: 0; }
.evac-header .evac-brand:hover { color: #d5d2a4; background: transparent; }
.evac-header .header-context { font-size: 12px; color: var(--text-secondary); margin: 0 1.5rem 0 .5rem; white-space: nowrap; }
.evac-header :is(.navbar-start, .navbar-end) { align-items: center; }
.evac-header :is(.navbar-item, .navbar-link) { color: var(--text-primary); font-size: 13px; font-weight: 500; background: transparent; }
.evac-header :is(a.navbar-item, .navbar-link):hover,
.evac-header .navbar-item.has-dropdown:focus-within > .navbar-link,
.evac-header .navbar-item.has-dropdown:hover > .navbar-link { color: #cfb28d; background: #ffffff06; }
.evac-header a[aria-current='page'] { color: #edd0a8; background: #b5936b24; }
.evac-header .navbar-burger { color: var(--text-primary); border: 0; background: transparent; margin-left: auto; }
.evac-header .navbar-dropdown { background: #1b1e19; border: 1px solid var(--border-color); border-radius: 6px; box-shadow: var(--shadow); min-width: 220px; }
.evac-header .navbar-dropdown .navbar-item { padding: .65rem 1rem; white-space: normal; }
.evac-header .navbar-divider { background: var(--border-color); }
.evac-header .navbar-link:not(.is-arrowless)::after { border-color: #b5936b; }
.evac-header .navbar-item.has-dropdown.is-active .navbar-dropdown { display: block; }
.evac-header .navbar-link { border: 0; font-family: inherit; cursor: pointer; text-align: left; width: 100%; }
.evac-header .navbar-brand .evac-brand { color: #c4c18c; font-size: 32px; font-weight: 900; }
.evac-avatar { width: 24px; height: 24px; border-radius: 50%; margin-right: 8px; object-fit: cover; }
.evac-skip { position: fixed; left: 16px; top: -100px; padding: 10px 18px; background: #b5936b; color: #111310; z-index: 100; }
.evac-skip:focus { top: 8px; color: #111310; }

.box, .card, .profile-box, .inventory-box, .discord-box, .stat-card, .select-box, .message-box, .support-card, .donate-card, .markdown-content, .donors-card {
  background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: 8px; box-shadow: var(--shadow);
}
.card-header { background: transparent; box-shadow: none; border-bottom: 1px solid var(--border-color); }
.card-header-title { color: var(--text-primary); font-weight: 500; }
.card-content { padding: 1.5rem; }
.card-footer, .card-footer-item { border-color: var(--border-color); }
.stat-card.balance { border-color: #78664e; }
.stat-value, .donor-amount { color: #cfb28d; font-variant-numeric: tabular-nums; }
.button, .action-button, .discord-connect-button, .support-card-button, .financial-button, .close-button, .select-button, .edit-button {
  --button-fill: #262d24; --button-hover: #303a2c; --button-border: #5d6b51; --button-edge: #b5936b;
  --button-ink: #f1f0e7; --button-ring: #b5936b20;
  background: var(--button-fill); border: 1px solid var(--button-border); border-radius: 5px; color: var(--button-ink); font-family: inherit;
  font-weight: 500; text-shadow: none; box-shadow: inset 0 1px 0 #ffffff09;
  transition: background-color 120ms ease-out, border-color 120ms ease-out, box-shadow 120ms ease-out, color 120ms ease-out; cursor: pointer;
  transform: none; animation: none;
}
.button:hover, .action-button:hover, .discord-connect-button:hover, .support-card-button:hover, .financial-button:hover, .close-button:hover, .select-button:hover, .edit-button:hover {
  background: var(--button-hover); border-color: var(--button-edge); color: var(--button-ink);
  box-shadow: inset 0 1px 0 #ffffff12, 0 0 0 3px var(--button-ring); transform: none;
}
:is(.financial-button, .action-button, .discord-connect-button, .close-button, .select-button) > i { color: inherit; }
.button.is-primary, .button.is-info {
  --button-fill: var(--action-fill); --button-hover: var(--action-hover); --button-border: #d3ad7e;
  --button-edge: var(--action-edge); --button-ink: #191b13; --button-ring: #cca37329; font-weight: 600;
}
.button.is-success { --button-fill: #3b512f; --button-hover: #49643a; --button-border: #789665; --button-edge: #a5c38f; --button-ink: #edf6e5; --button-ring: #8cab7a24; }
.button.is-danger { --button-fill: #57312a; --button-hover: #6a3b32; --button-border: #a06b5e; --button-edge: #d69b8c; --button-ink: #ffe3db; --button-ring: #c4837b24; }
.button.is-warning { --button-fill: #554529; --button-hover: #695636; --button-border: #a68b54; --button-edge: #d5bd88; --button-ink: #ffedc5; --button-ring: #c7b87e24; }
.button.is-dark, .button.is-light, .button.is-static { --button-fill: #242b21; --button-hover: #303a2c; }
.button.is-text { --button-fill: transparent; --button-hover: #b5936b12; --button-border: transparent; --button-ink: #dfbd91; }
.button[disabled], .button.is-disabled, .button.disabled, .select-button:disabled {
  background: #24291f; border-color: #414a38; color: #8d9586; box-shadow: none; opacity: .6; cursor: not-allowed;
}
.button.is-loading { pointer-events: none; }
.button.is-loading::after { border-color: transparent transparent currentColor currentColor; }
.button .icon-text { align-items: center; flex-wrap: nowrap; gap: .25rem; }
.input, .textarea, .select select { background: #12160f; color: #e8e7df; border: 1px solid #4a5540; border-radius: 5px; box-shadow: none; }
.input::placeholder, .textarea::placeholder { color: #8d9586; }
.input:hover, .textarea:hover, .select select:hover { border-color: #788566; }
.input:focus, .textarea:focus, .select select:focus { border-color: #b5936b; box-shadow: 0 0 0 2px #b5936b22; }
.input.is-danger, .textarea.is-danger { border-color: #cc897b; }
.input[disabled], .textarea[disabled], .select select[disabled] { background: #22271e; color: #8d9586; }
.select:not(.is-multiple):not(.is-loading)::after { border-color: #b5936b; }
select option { background: #1b1e19; color: #e8e7df; }
input[type='checkbox'], input[type='radio'], progress { accent-color: #b5936b; }
.checkbox:hover, .radio:hover { color: var(--text-primary); }
.control.has-icons-left .icon, .control.has-icons-right .icon { color: var(--text-secondary); }

.table, .table.is-dark { background: var(--bg-secondary); color: var(--text-primary); font-size: 14px; font-variant-numeric: tabular-nums; }
.table th, .table td { border-color: var(--border-color); padding: .85rem 1rem; vertical-align: middle; }
.table th, .table thead th { color: #d6dccf; background: #22271e; font-weight: 500; }
.table.is-striped tbody tr:not(.is-selected):nth-child(even) { background: #20251b; }
.table.is-hoverable tbody tr:not(.is-selected):hover { background: #2a3222; }
.table tbody tr.is-selected { background: #3a442f; color: #fff; }
.table-container { overflow-x: auto; max-width: 100%; }
.tag { background: #303929; color: #d6dccf; border-radius: 4px; font-variant-numeric: tabular-nums; }
.tag:not(body).is-primary, .tag:not(body).is-info, .tag:not(body).is-light, .tag:not(body).is-dark { background: #3a3a29; color: #dfc29d; }
.tag:not(body).is-success, .tag:not(body).is-success.is-light { background: #2c3b26; color: #bdd4b0; }
.tag:not(body).is-danger, .tag:not(body).is-danger.is-light { background: #3c2723; color: #efb2a6; }
.tag:not(body).is-warning, .tag:not(body).is-warning.is-light { background: #3d3522; color: #e2ca96; }
.notification, .notification.is-dark, .notification.is-light { background: #242b1e; color: #d6dccf; border: 1px solid #454f3b; border-radius: 6px; }
.notification.is-info, .notification.is-primary, .notification.is-info.is-light, .notification.is-primary.is-light { background: #302e22; color: #dfc29d; border-color: #78664e; }
.notification.is-success, .notification.is-success.is-light { background: #24301f; color: #bdd4b0; border-color: #556e45; }
.notification.is-danger, .notification.is-danger.is-light { background: #35231f; color: #efb2a6; border-color: #785046; }
.notification.is-warning, .notification.is-warning.is-light { background: #352e20; color: #e2ca96; border-color: #756240; }
.message { background: #1b1e19; }
.message-header, .message-body { background: #242b1e; color: #d6dccf; border-color: #454f3b; }
.modal-background { background: #080b07dc; }
.modal-card { max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); }
.modal-card-head, .modal-card-body, .modal-card-foot { background: #1b1e19; color: #e8e7df; border-color: #343c2f; }
.modal-card-head { border-radius: 8px 8px 0 0; }
.modal-card-foot { border-radius: 0 0 8px 8px; flex-wrap: wrap; gap: .5rem; }
.modal-card-title { color: #e8e7df; font-size: 1.2rem; }
.dropdown-content { background: #1b1e19; color: #e8e7df; border: 1px solid #343c2f; box-shadow: var(--shadow); }
.dropdown-item { color: #d6dccf; }
a.dropdown-item:hover { background: #2a3222; color: #cfb28d; }
.menu-label { color: #8d9586; }
.menu-list a { color: #d6dccf; border-radius: 4px; }
.menu-list a:hover, .panel-block:hover { background: #2a3222; color: #cfb28d; }
.menu-list a.is-active, .panel-block.is-active { background: #b5936b20; color: #cfb28d; }
.panel, .panel-heading, .panel-block { background: #1b1e19; color: #d6dccf; border-color: #343c2f; box-shadow: none; }
.tabs a, .tabs ul { border-color: #343c2f; color: #a5aa9f; }
.tabs a:hover { color: #e8e7df; border-color: #b5936b; }
.tabs li.is-active a, .tabs.is-boxed li.is-active a { background: #b5936b15; border-color: #b5936b; color: #cfb28d; }
.pagination-link, .pagination-previous, .pagination-next { border-color: #454f3b; color: #d6dccf; background: #1b1e19; }
.pagination-link.is-current { background: #b5936b; color: #151812; border-color: #b5936b; }
.footer, .page-footer { background: #0d100b; color: #a5aa9f; border-top: 1px solid #343c2f; }
.footer a { color: #cfb28d; }
.content blockquote { background: #22271e; border-color: #78664e; color: #d6dccf; }
pre, code { background: #12160f; color: #d4c5ac; }
.content table th, .content table td { color: #d6dccf; border-color: #343c2f; }
.content table thead th { color: #e8e7df; }
.content table tbody tr:hover { background: #242b1e; }
.legal-content p { text-align: left; }

/* Specialist pages retain existing IDs and business interactions. */
.donate-container { min-height: calc(100svh - 81px); background: #111310; }
.donate-card { padding: 2.5rem; border-radius: 8px; }
.step.active .step-icon, .step.completed .step-icon, .amount-option.selected, .payment-option.selected { background: #333c29; color: #dfc29d; border-color: #b5936b; }
.amount-option, .payment-option { background: #22271e; color: #e8e7df; border: 1px solid #454f3b; border-radius: 6px; }
.amount-option:hover, .payment-option:hover { background: #2c3424; border-color: #788566; }
.amount-value, .amount-price, .summary-value { color: #e8e7df; font-variant-numeric: tabular-nums; }
.summary-label, .payment-desc, .step-label { color: #a5aa9f; }
.support-container, .donors-container { padding-top: 3rem; }
.back-button { position: static; display: inline-flex; margin: 1rem max(24px, 4vw) 0; }
.page-container { padding-top: 2.5rem; }
.table-of-contents { top: 105px; max-height: calc(100vh - 130px); }
.toc-toggle-btn { top: 100px; }
.markdown-content { line-height: 1.85; }
.markdown-content p { text-align: left; }
.sortable { cursor: pointer; }
.sortable:hover { color: #cfb28d; }
.chart-container canvas { max-width: 100%; }
.tabs { max-width: 100%; overflow-x: auto; }
.spinner { border: 3px solid #343c2f; border-top-color: #b5936b; border-radius: 50%; width: 32px; height: 32px; animation: evac-spin 1s linear infinite; }
@keyframes evac-spin { to { transform: rotate(360deg); } }
@media (max-width: 1023px) {
  .evac-header .navbar { padding: 0 20px; }
  .evac-header .navbar-menu { background: #151812; box-shadow: none; padding: .5rem 0 1rem; max-height: calc(100dvh - 86px); overflow-y: auto; }
  .evac-header .navbar-dropdown { border: 0; border-left: 1px solid #343c2f; margin: .25rem 0 .75rem 1rem; border-radius: 0; box-shadow: none; }
  .evac-header .navbar-item.has-dropdown > .navbar-dropdown { display: none; }
  .evac-header .navbar-item.has-dropdown.is-active > .navbar-dropdown { display: block; }
  .evac-header .navbar-link { padding-left: .75rem; }
}
@media (max-width: 768px) {
  .section { padding: 1.5rem 1rem; }
  .box, .card-content { padding: 1.25rem; }
  .column, .level-left, .level-right, .level-item { min-width: 0; }
  .level-left, .level-right { flex-wrap: wrap; }
  .level-item { justify-content: flex-start; max-width: 100%; }
  .field.is-grouped { flex-wrap: wrap; gap: .5rem; }
  .field.is-grouped > .control { max-width: 100%; }
  .level-right .buttons { margin-top: .75rem; flex-wrap: wrap; }
  .buttons { gap: .35rem; }
  .buttons .button { white-space: normal; height: auto; min-height: 2.5em; }
  .button { max-width: 100%; white-space: normal; height: auto; min-height: 2.5em; }
  .button.is-large { font-size: 1rem; }
  .table th, .table td { padding: .65rem .75rem; }
  .table-container .table { min-width: 560px; }
  .modal-card-body { padding: 1.25rem; }
  .modal-card-head, .modal-card-foot { padding: 1rem; }
  .donate-card { padding: 1.5rem; }
  .donate-container { padding: 1rem; align-items: flex-start; }
  .legal-content { padding: .25rem; }
  .legal-content .title.is-2 { font-size: 1.8rem; }
  .page-header h1 { overflow-wrap: anywhere; }
}
@media (max-width: 600px) {
  .evac-header .navbar, .evac-header .navbar-brand { min-height: 69px; }
  .evac-header .navbar-menu { max-height: calc(100dvh - 70px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
