/* ============================================================
   refunded.vip — global stylesheet
   Identity: near-black surfaces, vivid green accents.
   ============================================================ */

:root {
  --bg: #0a0c0d;
  --surface: #121517;
  --surface-2: #171b1e;
  --surface-3: #1d2226;
  --border: #242a2f;
  --border-soft: #1b2024;
  --text: #e9edef;
  --muted: #98a2ab;
  --faint: #5c656d;
  /* The one accent knob. Every green below derives from it, so theming a
     page means overriding --accent alone. --green-bright and --green-deep
     keep hand-picked literals for the stock green; a custom accent gets
     computed equivalents from Util::accentBright()/accentDeep(). */
  --accent: #2fd66f;
  --green: var(--accent);
  --green-bright: #46e484;
  --green-deep: #17331f;
  --green-wash: color-mix(in srgb, var(--accent) 10%, transparent);
  /* Text drawn ON an accent background. Flips to the brand near-white
     when the accent is dark; layout.php emits the computed value. */
  --on-accent: #08130c;
  /* The "refunded" of refunded.vip — outlines a dark accent. */
  --accent-outline: var(--text);
  /* Eight offsets make a solid ring. text-shadow is painted BEHIND the glyph
     in every browser, unlike -webkit-text-stroke, which paints centred over
     it (paint-order is ignored for HTML text outside Firefox). */
  --accent-ring:
    1px 0 0 var(--accent-outline), -1px 0 0 var(--accent-outline),
    0 1px 0 var(--accent-outline), 0 -1px 0 var(--accent-outline),
    1px 1px 0 var(--accent-outline), -1px -1px 0 var(--accent-outline),
    1px -1px 0 var(--accent-outline), -1px 1px 0 var(--accent-outline);
  --danger: #ff6262;
  --danger-wash: rgba(255, 98, 98, 0.10);
  --warn: #e8b33e;
  --info: #5cb2ff;
  --radius: 8px;
  --radius-lg: 12px;
  --nav-h: 56px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* The hidden attribute must always win, even over display:flex rules. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { margin: 0 0 0.4em; line-height: 1.25; font-weight: 650; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.05rem; }
p { margin: 0 0 0.8em; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-bright); text-decoration: underline; }
code { font-family: var(--mono); background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 4px; padding: 0.1em 0.35em; font-size: 0.9em; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 3px; }

/* ============ Navigation ============ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 13, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  font-weight: 750;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand span { color: var(--green); }
.brand:hover { text-decoration: none; color: var(--text); }

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a,
.nav-logout {
  color: var(--muted);
  padding: 7px 11px;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
}
.nav-links a:hover, .nav-logout:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-links a.active { color: var(--green); background: var(--green-wash); }
.discord-link { border: 1px solid var(--border); }
.discord-link:hover { border-color: var(--green); color: var(--green); }

.nav-toggle { display: none; }

/* Wrapper for the collapsible mobile menu; transparent to desktop layout. */
.nav-collapse { display: contents; }

/* Nav user search */
/* The wrapper owns the positioning and the width; the inner .nav-search is
   just the bordered field. The results panel is their sibling, so it sits
   under the field instead of inside its border. */
.nav-search-wrap { position: relative; min-width: 210px; }
.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--faint);
}
.nav-search:focus-within { border-color: var(--green); color: var(--green); }
.nav-search input[type="search"] {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  padding: 7px 0;
  width: 100%;
  min-width: 0;
  outline: none;
}
.nav-search input[type="search"]:focus {
  border: none;
  box-shadow: none;
  outline: none;
}
/* Hide the browser's built-in clear/decoration widgets. */
.nav-search input[type="search"]::-webkit-search-cancel-button,
.nav-search input[type="search"]::-webkit-search-decoration,
.nav-search input[type="search"]::-webkit-search-results-button,
.nav-search input[type="search"]::-webkit-search-results-decoration {
  appearance: none;
  -webkit-appearance: none;
  display: none;
}
.nav-search input[type="search"]::placeholder { color: var(--faint); }
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.search-results a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--text);
  font-size: 0.9rem;
}
.search-results a:hover { background: var(--surface-3); text-decoration: none; }
.search-results .sr-id { margin-left: auto; color: var(--faint); font-family: var(--mono); font-size: 0.8rem; }
.search-results .sr-empty { padding: 10px 12px; color: var(--muted); font-size: 0.88rem; }
.sr-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-3); object-fit: cover; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--green); font-size: 0.7rem; font-weight: 700;
}

/* ============ Layout scaffolding ============ */

.site-main { flex: 1; width: 100%; }

.page-narrow, .page-wide {
  margin: 0 auto;
  padding: 32px 20px 64px;
}
.page-narrow { max-width: 760px; }
.page-wide { max-width: 1080px; }

.page-head { margin-bottom: 24px; }
.page-head p { margin: 4px 0 0; }

.site-footer { border-top: 1px solid var(--border-soft); }
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--faint);
  font-size: 0.85rem;
  flex-wrap: wrap;
}
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--green); }

/* ============ Panels, forms, buttons ============ */

.panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 18px;
}
.panel-flush { padding: 0; overflow: hidden; }
.panel-title { margin-bottom: 14px; font-size: 0.95rem; color: var(--text); }

.field { margin-bottom: 16px; }
.field label, .inline-label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }

input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="search"], input[type="number"], select, textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  padding: 9px 12px;
}
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: none; }
input[readonly] { color: var(--muted); background: var(--surface); }
textarea { resize: vertical; min-height: 90px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2398a2ab'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; padding-right: 32px; }

.field-hint { font-size: 0.8rem; color: var(--faint); margin: 6px 0 0; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-link { font-size: 0.8rem; font-weight: 500; }
.field-error, .form-error { font-size: 0.83rem; color: var(--danger); margin: 6px 0 0; min-height: 0; }
.field-error:empty, .form-error:empty { display: none; }
.form-error { margin-bottom: 12px; }
input.invalid, select.invalid, textarea.invalid { border-color: var(--danger); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 7px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--green); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--green-bright); color: var(--on-accent); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { border-color: var(--green); color: var(--green); }

.btn-danger { background: var(--danger); color: #1a0808; }
.btn-danger:hover:not(:disabled) { background: #ff7d7d; }
.btn-danger-ghost { color: var(--muted); }
.btn-danger-ghost:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }

.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }

.btn-spinner {
  display: none;
  width: 14px; height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn.loading .btn-spinner { display: inline-block; }
.btn.loading .btn-label { opacity: 0.7; }
@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
  display: inline-block;
  width: 22px; height: 22px;
  border: 2.5px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.inline-form { display: flex; gap: 12px; align-items: flex-end; }
.inline-form.wrap { flex-wrap: wrap; }
.inline-form input { width: auto; min-width: 110px; }
.inline-label { margin-bottom: 0; }
.inline-label input { display: block; margin-top: 6px; }
.inline-label.grow { flex: 1; }
.inline-label.grow input { width: 100%; }

/* ============ Auth pages ============ */

.auth-wrap {
  min-height: calc(100vh - var(--nav-h) - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
}
.auth-card h1 { font-size: 1.3rem; }
.auth-sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 22px; }
.auth-alt { margin: 18px 0 0; font-size: 0.88rem; color: var(--muted); text-align: center; }

.status-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.status-icon.success { background: var(--green-wash); color: var(--green); }
.status-icon.danger { background: var(--danger-wash); color: var(--danger); }
.status-icon.neutral { background: var(--surface-2); color: var(--muted); }

.unverified-help {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.87rem;
}
.unverified-help p { color: var(--muted); margin-bottom: 10px; }
.resend-row { display: flex; gap: 8px; }
.resend-block { margin: 14px 0; text-align: left; }
.resend-block label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }

/* ============ Profile ============ */

.profile-scope {
  --profile-accent: var(--green);
  --profile-name: var(--text);
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.profile-banner {
  height: 220px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  position: relative;
}
.profile-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-fallback {
  background:
    radial-gradient(ellipse 90% 120% at 15% -10%, color-mix(in srgb, var(--profile-accent, var(--green)) 22%, transparent), transparent 55%),
    linear-gradient(160deg, var(--surface-2), var(--surface));
}

.profile-head {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding: 0 24px;
  margin-top: -44px;
  position: relative;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 112px; height: 112px;
  border-radius: 50%;
  border: 4px solid var(--bg);
  background: var(--surface-2);
  overflow: hidden;
  flex: none;
  box-shadow: 0 0 0 2px var(--profile-accent);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; font-weight: 700;
  color: var(--profile-accent, var(--green));
}

.profile-id-block { padding-bottom: 6px; min-width: 0; }
.profile-username {
  font-size: 1.65rem;
  margin-bottom: 6px;
  color: var(--profile-name);
  overflow-wrap: anywhere;
}
.profile-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.uid-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.8rem;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px 2px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}
.role-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.role-admin i { background: var(--danger); }
.role-developer i { background: #b57bff; }
.role-moderator i { background: var(--warn); }
.role-beta_tester i { background: var(--info); }
.role-premium i { background: var(--green); }
.role-registered i { background: var(--faint); }

.profile-actions { margin-left: auto; padding-bottom: 8px; display: flex; gap: 10px; }
.btn-accented {
  background: transparent;
  color: var(--profile-accent, var(--green));
  border-color: var(--profile-accent, var(--green));
}
.btn-accented:hover:not(:disabled) { background: color-mix(in srgb, var(--profile-accent, var(--green)) 14%, transparent); color: var(--profile-accent, var(--green)); }

.profile-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 28px;
}
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--profile-accent, var(--green));
  border-radius: var(--radius);
  padding: 14px 18px;
}
.detail-card h2 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); margin-bottom: 4px; }
.detail-card p { margin: 0; font-size: 1.02rem; font-weight: 600; }

/* ============ Settings ============ */

.settings-grid { display: grid; gap: 18px; }

.kv { margin: 0; display: grid; gap: 10px; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border-soft); padding-bottom: 10px; flex-wrap: wrap; }
.kv > div:last-child { border-bottom: none; padding-bottom: 0; }
.kv dt { color: var(--muted); font-size: 0.9rem; }
.kv dd { margin: 0; font-weight: 600; font-size: 0.92rem; display: flex; gap: 8px; align-items: center; }

.status-pill {
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid transparent;
}
.status-active, .status-unused { background: var(--green-wash); color: var(--green); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.status-open { background: var(--danger-wash); color: var(--danger); border-color: rgba(255, 98, 98, 0.3); }
.status-under_review { background: rgba(232, 179, 62, 0.12); color: var(--warn); border-color: rgba(232, 179, 62, 0.3); }
.status-resolved { background: var(--green-wash); color: var(--green); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.status-dismissed, .status-used, .status-expired { background: var(--surface-3); color: var(--muted); border-color: var(--border); }

.username-change { margin-top: 16px; border-top: 1px solid var(--border-soft); padding-top: 14px; }
.username-change summary {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green);
  list-style: none;
}
.username-change summary::before { content: "+ "; }
.username-change[open] summary::before { content: "− "; }
.username-change form { margin-top: 14px; }

.color-row { display: flex; gap: 10px; align-items: center; }
.color-row input[type="text"] { max-width: 130px; }
input[type="color"] {
  width: 42px; height: 38px;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
}

.upload-block { display: flex; gap: 20px; align-items: flex-start; }
.upload-block-banner { flex-direction: column; }
.upload-preview {
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
  flex: none;
  position: relative;
}
.avatar-preview { width: 96px; height: 96px; border-radius: 50%; }
.avatar-preview .avatar-fallback { font-size: 2rem; position: absolute; inset: 0; }
.banner-preview { width: 100%; max-width: 560px; height: 130px; border-radius: var(--radius); }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-controls { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; width: 100%; max-width: 420px; }
.file-btn { position: relative; }
.url-row { display: flex; gap: 8px; width: 100%; }
.url-row input { flex: 1; }

/* ============ Tables ============ */

.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.89rem; }
.data-table th {
  text-align: left;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--faint);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-2); }
.table-empty { text-align: center; color: var(--muted); padding: 28px 14px !important; }
.cell-actions { text-align: right; white-space: nowrap; }

/* ============ Tabs ============ */

.tab-row { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 14px;
  cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--green); border-color: var(--green); background: var(--green-wash); }
.tab-count { color: var(--faint); font-weight: 500; font-size: 0.8rem; }
.tab.active .tab-count { color: var(--green); }

/* ============ Stats ============ */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}
.stat-value { font-size: 1.45rem; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.78rem; color: var(--muted); }

/* ============ Drawer (report details) ============ */

.drawer-backdrop, .modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 6, 0.72);
  z-index: 80;
}
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(480px, 100%);
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 90;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
  flex: none;
}
.drawer-head h2 { margin: 0; font-size: 1rem; }
.drawer-close {
  font-size: 1.4rem;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
}
.drawer-close:hover { color: var(--text); background: var(--surface-2); }
.drawer-body { padding: 18px 20px; overflow-y: auto; }

.report-kv { display: grid; gap: 8px; margin-bottom: 18px; }
.report-kv > div { display: flex; gap: 12px; font-size: 0.9rem; }
.report-kv dt { color: var(--faint); width: 110px; flex: none; }
.report-kv dd { margin: 0; }

.note-list { display: grid; gap: 10px; margin: 12px 0; }
.note-item {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 0.88rem;
}
.note-meta { color: var(--faint); font-size: 0.76rem; margin-bottom: 4px; }
.note-item p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.drawer-section { border-top: 1px solid var(--border-soft); padding-top: 16px; margin-top: 16px; }
.drawer-section h3 { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.report-desc {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 0.9rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ============ Modal ============ */

.modal-backdrop { display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 420px;
  width: 100%;
}
.modal h2 { font-size: 1.05rem; }

/* ============ Admin bits ============ */

.admin-user-card { margin-bottom: 18px; }
.admin-user-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-user-head .sr-avatar { width: 44px; height: 44px; font-size: 1.1rem; }
.admin-user-name { font-size: 1.15rem; font-weight: 700; }
.role-manage-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }

.code-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.code-chip {
  font-family: var(--mono);
  font-size: 0.88rem;
  background: var(--green-deep);
  color: var(--green-bright);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
}
.code-chip:hover { border-color: var(--green); }

.fresh-invites { margin-top: 16px; border-top: 1px solid var(--border-soft); padding-top: 14px; }

/* ============ Premium pricing ============ */

.pricing-head { text-align: center; margin-bottom: 32px; }

.premium-active-note {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  background: var(--green-wash);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 0 auto 28px;
  max-width: 640px;
  font-size: 0.92rem;
  flex-wrap: wrap;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  max-width: 880px;
  margin: 0 auto;
}

.pricing-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  text-align: center;
}
.pricing-card.featured { border-color: var(--green); }

.pricing-flag {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: var(--on-accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  padding: 3px 12px;
  white-space: nowrap;
}

.pricing-days { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }

.pricing-price {
  font-size: 2.6rem;
  font-weight: 750;
  color: var(--text);
  margin: 0;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.pricing-price span { font-size: 1.3rem; color: var(--green); font-weight: 700; }
.pricing-card.featured .pricing-price { color: var(--green); }
.pricing-card.featured .pricing-price span { color: var(--green); }

.pricing-permonth { font-size: 0.82rem; margin: 6px 0 18px; }

.pricing-features {
  list-style: none;
  margin: 0 0 22px;
  padding: 16px 0 0;
  border-top: 1px solid var(--border-soft);
  display: grid;
  gap: 9px;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: left;
}
.pricing-features li { padding-left: 22px; position: relative; }
.pricing-features li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 5px;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}

.pricing-card .btn { margin-top: auto; }

.pricing-note { text-align: center; max-width: 560px; margin: 26px auto 0; font-size: 0.86rem; }

/* ============ Errors ============ */

.error-wrap {
  min-height: calc(100vh - var(--nav-h) - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
}
.error-card { max-width: 420px; }
.error-code {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--green);
  background: var(--green-wash);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  display: inline-block;
  border-radius: 6px;
  padding: 2px 10px;
  margin-bottom: 14px;
}
.error-message { color: var(--muted); }
.error-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

/* ============ Toasts ============ */

.toast-region {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 40px));
}
.toast {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 0.9rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.18s ease;
}
.toast.toast-error { border-left-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

/* ============ Nav additions ============ */

.nav-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 6px;
  white-space: nowrap;
}
/* The avatar carries its own state — no pill background behind it. */
.nav-primary,
.nav-primary:hover,
.nav-primary.active {
  background: none;
  padding: 3px;
  border-radius: 50%;
  gap: 0;
}

.nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.nav-primary:hover .nav-avatar { border-color: var(--green); }
.nav-primary.active .nav-avatar {
  border-color: var(--green);
  box-shadow: 0 0 0 2px var(--green-wash);
}

.search-icon { flex: none; }
.sr-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-results a.sr-active { background: var(--surface-3); }

.nav-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
  color: var(--muted);
  padding: 7px 10px;
  border-radius: 6px;
}
.nav-bell:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-bell.active { color: var(--green); background: var(--green-wash); }
.bell-badge {
  position: absolute;
  top: 1px; right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--green);
  color: var(--on-accent);
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.footer-brand span { color: var(--green); }
.footer-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-discord { display: inline-flex; align-items: center; gap: 6px; }

/* ============ Shared bits ============ */

.page-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.panel-lead { font-size: 0.88rem; margin-top: -6px; margin-bottom: 14px; }
.section-title { font-size: 1.05rem; margin: 30px 0 14px; }
.back-link { font-size: 0.85rem; color: var(--muted); display: inline-block; margin-bottom: 6px; }
.back-link:hover { color: var(--green); text-decoration: none; }
.card-section { border-top: 1px solid var(--border-soft); margin-top: 18px; padding-top: 16px; }

.notice {
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 0.89rem;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.notice-warn { border-color: rgba(232, 179, 62, 0.35); background: rgba(232, 179, 62, 0.08); color: #f0cd82; }
.notice-info { border-color: color-mix(in srgb, var(--accent) 30%, transparent); background: var(--green-wash); }

.check-row { display: flex; align-items: center; gap: 9px; font-weight: 500; font-size: 0.9rem; cursor: pointer; margin: 0; }
.check-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--green); cursor: pointer; }

.code-input { letter-spacing: 0.32em; font-size: 1.1rem; text-align: center; }

.disclosure { margin-top: 16px; border-top: 1px solid var(--border-soft); padding-top: 14px; }
.disclosure summary {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green);
  list-style: none;
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::before { content: "+ "; }
.disclosure[open] summary::before { content: "− "; }
.disclosure form { margin-top: 14px; }
.danger-summary { color: var(--danger) !important; }

.settings-footer-row { display: flex; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border-soft); flex-wrap: wrap; }
.panel-danger { border-color: rgba(255, 98, 98, 0.28); }

.legal-consent { font-size: 0.78rem; text-align: center; margin: 14px 0 0; }

/* ============ Two-factor ============ */

.method-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.method-info { display: flex; flex-direction: column; flex: 1; min-width: 180px; }
.method-name { font-weight: 600; font-size: 0.92rem; }
.method-desc { font-size: 0.8rem; }

.recovery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  font-size: 0.87rem;
  flex-wrap: wrap;
}

.enroll-box {
  margin-top: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.enroll-box h3 { font-size: 0.95rem; margin-bottom: 12px; }
.qr-holder {
  width: 220px;
  max-width: 100%;
  background: #fff;
  border-radius: var(--radius);
  padding: 10px;
  margin-bottom: 12px;
}
.qr-holder svg { display: block; width: 100%; height: auto; }
.secret-key {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 0.9rem;
  word-break: break-all;
  margin-bottom: 14px;
}

.twofa-alt { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }

.ban-notice {
  background: var(--danger-wash);
  border: 1px solid rgba(255, 98, 98, 0.35);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}
.ban-notice h2 { font-size: 0.95rem; color: var(--danger); margin-bottom: 6px; }
.ban-notice p { font-size: 0.88rem; margin-bottom: 6px; }
.ban-notice p:last-child { margin-bottom: 0; }

.ban-box {
  background: var(--danger-wash);
  border: 1px solid rgba(255, 98, 98, 0.3);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.ban-box p { margin: 6px 0 0; }

/* ============ Invites in settings ============ */

.invite-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.invite-row:last-child { border-bottom: none; }
.invite-code { font-size: 0.9rem; color: var(--green); }
.invite-meta { font-size: 0.83rem; margin-left: auto; }

/* ============ Comments ============ */

.comments-section { margin-top: 34px; }
.comment-form {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 18px;
}
.comment-form textarea { min-height: 60px; }
.comment-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.char-count { font-size: 0.78rem; }

.comment-list { display: grid; gap: 12px; }
.comment-item {
  display: flex;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 13px 15px;
}
.comment-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  flex: none;
  object-fit: cover;
  background: var(--surface-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-weight: 700;
  font-size: 0.85rem;
}
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 9px; margin-bottom: 3px; }
.comment-author { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.comment-author:hover { text-decoration: none; opacity: 0.85; }
.comment-time { font-size: 0.76rem; }
.comment-delete {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--faint);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
}
.comment-delete:hover { color: var(--danger); background: var(--danger-wash); }
.comment-body p { margin: 0; font-size: 0.91rem; white-space: pre-wrap; overflow-wrap: anywhere; }

.private-note { margin-top: 20px; font-size: 0.88rem; }
.role-private i { background: var(--faint); }

/* ============ Tickets ============ */

.ticket-meta-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 6px; }
.ticket-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.thread { display: grid; gap: 12px; margin-bottom: 18px; }
.msg {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}
.msg-note { border-color: rgba(232, 179, 62, 0.3); background: rgba(232, 179, 62, 0.05); }
.msg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.msg-author { font-weight: 650; font-size: 0.9rem; }
.msg-time { font-size: 0.76rem; margin-left: auto; }
.note-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--warn);
  border: 1px solid rgba(232, 179, 62, 0.4);
  border-radius: 999px;
  padding: 1px 8px;
}
.msg-body { margin: 0; font-size: 0.92rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.reply-panel { margin-bottom: 0; }

/* ============ Notifications ============ */

.notif-list { display: grid; gap: 8px; margin-bottom: 20px; }
.notif-item {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 15px;
  color: var(--text);
}
a.notif-item:hover { border-color: var(--border); border-left-color: var(--green); background: var(--surface-2); text-decoration: none; }
.notif-item.unread { border-left-color: var(--green); background: var(--surface-2); }
.notif-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  flex: none;
}
.notif-item.unread .notif-icon { background: var(--green-wash); color: var(--green); }
.notif-warning .notif-icon, .notif-ban .notif-icon { background: var(--danger-wash); color: var(--danger); }
.notif-main { min-width: 0; flex: 1; }
.notif-title { font-weight: 600; font-size: 0.92rem; }
.notif-body { font-size: 0.85rem; margin: 3px 0 0; overflow-wrap: anywhere; }
.notif-time { font-size: 0.75rem; display: block; margin-top: 4px; }

.warning-item {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.warning-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.warning-item p { margin: 0; font-size: 0.9rem; }

/* ============ Premium dashboard ============ */

.sub-status-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.sub-status-main { flex: 1; min-width: 220px; }
.sub-expiry { margin: 10px 0 2px; font-size: 1.05rem; }
.sub-since { font-size: 0.83rem; margin: 0; }

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.resource-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.resource-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  background: var(--green-wash);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.resource-card h2 { font-size: 1rem; }
.resource-card p { font-size: 0.86rem; flex: 1; }

.update-log { display: grid; gap: 12px; }
.update-entry {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.update-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.version-chip {
  background: var(--green-deep);
  color: var(--green-bright);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 5px;
  padding: 1px 8px;
  font-size: 0.78rem;
}
.update-meta time { font-size: 0.78rem; }
.update-entry h3 { font-size: 0.98rem; margin-bottom: 6px; }
.update-body { margin: 0; font-size: 0.89rem; color: var(--muted); overflow-wrap: anywhere; }

/* ============ Admin visibility control ============ */

.vis-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.vis-row select { max-width: 340px; }

.section-lead { font-size: 0.9rem; margin-bottom: 18px; max-width: 640px; }
/* ============ Legal pages ============ */

.legal-page .legal-body { font-size: 0.92rem; color: var(--muted); }
.legal-body h2 { font-size: 0.98rem; color: var(--text); margin: 26px 0 8px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body ul { margin: 0 0 12px; padding-left: 20px; }
.legal-body li { margin-bottom: 6px; }
.legal-body strong { color: var(--text); }

/* ============ Responsive ============ */

@media (max-width: 1000px) {
  .nav-search-wrap { min-width: 150px; }
}

@media (max-width: 880px) {
  .nav-search-wrap { display: none; }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    margin-left: auto;
    background: none;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 9px;
    cursor: pointer;
  }
  .nav-toggle span { display: block; width: 16px; height: 2px; background: var(--text); border-radius: 2px; }
  /* No double-tap-to-zoom on the tap targets in the bar. */
  .nav-toggle, .nav-bell, .nav-primary { touch-action: manipulation; }

  .nav-collapse {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 10px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px 16px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-collapse.open { display: flex; }

  /* Search is hidden in the compact bar but returns inside the menu. */
  .nav-search-wrap { display: block; width: 100%; min-width: 0; }
  .nav-search { width: 100%; min-width: 0; }
  /* In flow rather than absolute: .nav-collapse scrolls (overflow-y: auto), so
     an absolutely positioned panel would be clipped by it. As a sibling of the
     field it sits under the field, outside its border. */
  .search-results {
    position: static;
    width: 100%;
    margin-top: 8px;
    box-shadow: none;
    max-height: 280px;
    overflow-y: auto;
  }
  /* iOS zooms the viewport whenever a focused input is under 16px, and opening
     the burger focuses this one (app.js), so the menu appeared to zoom in.
     16px is the threshold, not a preference. */
  .nav-search input[type="search"] { font-size: 16px; }

  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    gap: 2px;
  }
  .nav-links a, .nav-logout { padding: 11px 12px; justify-content: flex-start; }

  .profile-banner { height: 140px; }
  .profile-head { padding: 0 8px; gap: 14px; }
  .profile-avatar { width: 88px; height: 88px; }
  .profile-actions { margin-left: 0; width: 100%; }
  .upload-block { flex-direction: column; }
  .inline-form { flex-direction: column; align-items: stretch; }
  .inline-form input { width: 100%; }
  .kv > div { flex-direction: column; gap: 2px; }

  /* Phone bar order: brand … bell, avatar, burger. The brand's auto margin
     pushes the trio right, so no competing auto margins on the buttons. */
  .brand { margin-right: auto; }
  .nav-bell { order: 2; }
  .nav-primary { order: 3; }
  .nav-toggle { order: 4; margin-left: 0; }
  .page-head-row { flex-direction: column; }
  .sub-status-card { flex-direction: column; align-items: stretch; }
  .sub-status-card .btn { width: 100%; }
  .method-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .msg-time { margin-left: 0; }
  .invite-meta { margin-left: 0; width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .vis-row select { max-width: 100%; width: 100%; }
}

/* ---------- dark accent ----------
   Any accent is allowed, including one that would vanish on our near-black
   surfaces. When a member picks one, <html> carries data-accent-dark and the
   accent is ringed in the brand color — the "refunded" of refunded.vip — so
   it stays legible instead of being refused.

   Scope: TEXT that takes its colour from the accent, and nothing else.
   Accent-filled surfaces (primary buttons, the pricing flag, the bell badge,
   the Premium dot) are deliberately left alone — their labels already flip to
   --on-accent, and outlining the shapes themselves is not what this is for. */

/* Text that takes its colour from the accent by default. */
[data-accent-dark] .brand span,
[data-accent-dark] .footer-brand span,
[data-accent-dark] .stat-value,
[data-accent-dark] .error-code,
[data-accent-dark] .invite-code,
[data-accent-dark] .code-chip,
[data-accent-dark] .nav-avatar,
[data-accent-dark] .sr-avatar,
[data-accent-dark] .comment-avatar,
[data-accent-dark] .resource-icon,
[data-accent-dark] .pricing-price span,
[data-accent-dark] .pricing-card.featured .pricing-price,
[data-accent-dark] .username-change summary,
[data-accent-dark] .disclosure summary,
/* Accent-coloured state text. */
[data-accent-dark] .tab.active,
[data-accent-dark] .tab.active .tab-count,
[data-accent-dark] .nav-links a.active,
[data-accent-dark] .nav-bell.active,
[data-accent-dark] .status-icon.success,
[data-accent-dark] .status-active,
[data-accent-dark] .status-unused,
[data-accent-dark] .status-resolved,
[data-accent-dark] .notif-item.unread .notif-icon,
/* Accent-coloured only on hover. */
[data-accent-dark] .footer-inner a:hover,
[data-accent-dark] .discord-link:hover,
[data-accent-dark] .back-link:hover,
[data-accent-dark] .btn-ghost:hover:not(:disabled),
[data-accent-dark] .code-chip:hover,
[data-accent-dark] .nav-primary:hover .nav-avatar,
/* Prose links are accent-coloured. The exclusions are the <a> elements that
   override that colour — leave them off this list and they would get a ring
   around text that never changes with the accent. */
[data-accent-dark] a:not(.btn):not(.brand):not(.back-link):not(.discord-link):not(.nav-primary):not(.nav-bell):not(.nav-logout):not(.footer-discord):not(.notif-item):not(.comment-author):not(.nav-links a):not(.footer-inner a):not(.search-results a) {
  text-shadow: var(--accent-ring);
}

/* The inviter's name on someone else's profile: coloured inline from the
   inviter's own pick, so it carries its own flag rather than the page's. */
.inviter-name.is-dark {
  text-shadow: var(--accent-ring);
}

/* ---------- public landing (/) ----------
   The one page a signed-out visitor sees before /login. Same chrome as every
   other page — top bar and footer come from layout.php — with a centred
   holding message between them. */

/* Only the landing page opts into filling the space between nav and footer.
   :has() keeps this off every other page; where it is unsupported the
   min-height below still gives a sensible centred block. */
.site-main:has(.landing) { display: flex; flex-direction: column; }
.landing {
  flex: 1;
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 48px 20px 64px;
}
.landing-art { line-height: 0; margin-bottom: 22px; }
.landing-art svg { display: block; }

/* Emblem colours live here, not in SVG presentation attributes: var() is not
   reliably resolved inside those, which would paint the mark black on black.
   Everything derives from var(--green) — never the literal — so the ring
   always matches the site accent (see §7 of mind.md). */
.la-track {
  fill: none;
  stroke: color-mix(in srgb, var(--green) 12%, transparent);
  stroke-width: 3;
}
.la-progress {
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  stroke-linecap: round;
  /* Kept low on purpose — a halo, not a lamp. */
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--green) 45%, transparent));
  animation: la-loader 6.8s linear infinite;
}
.la-plate { fill: var(--bg); }
/* The badge is the favicon as-is: no outline, no glow. */
.la-r { fill: var(--green); }

/* One cycle: draw clockwise from 12 o'clock to a full circle, then erase from
   that same start point around to the end, then repeat.
   r=50, so the circumference is 314.16. In the second half the dash shortens
   while the offset walks it forward, which holds the arc's END still and
   pulls its START along behind it. */
@keyframes la-loader {
  0%   { stroke-dasharray: 0 314.16;      stroke-dashoffset: 0; }
  50%  { stroke-dasharray: 314.16 314.16; stroke-dashoffset: 0; }
  100% { stroke-dasharray: 0 314.16;      stroke-dashoffset: -314.16; }
}

.landing-title {
  font-size: clamp(1.9rem, 6vw, 2.9rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 0;
}
.landing-sub { color: var(--muted); margin: 0; font-size: 0.98rem; max-width: 46ch; }
.landing-dot { color: var(--green); font-weight: 650; }

/* Motion is decorative: hold the completed circle instead of animating. */
@media (prefers-reduced-motion: reduce) {
  .la-progress { animation: none; stroke-dasharray: 314.16 314.16; stroke-dashoffset: 0; }
}

@media (max-width: 480px) {
  .landing-art svg { width: 148px; height: 148px; }
}
