/* Blackout Interactive community mail — base: tokens, type, controls, dialogs */
/* Brand fonts. Used if they are installed on the visitor's device. To ship them with the site, put Fraunces.woff2 and
   Outfit.woff2 in assets/fonts/ and swap each src below for the commented one (see assets/fonts/README.txt). */
@font-face { font-family: "Fraunces"; src: local("Fraunces"), local("Fraunces 72pt"); /* src: url("../fonts/Fraunces.woff2") format("woff2"); */ font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Outfit"; src: local("Outfit"); /* src: url("../fonts/Outfit.woff2") format("woff2"); */ font-weight: 300 700; font-display: swap; }

:root {
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 2px;
  --rail: 232px;
  --top: 52px;
  --gold: #d6a651;
  --gold-ink: #17130a;
  --gold-hi: #e4b968;
  --blue: #1e82b8;
  --blue-text: #5aaedb;
  --danger: #d8604f;
  --ok: #7fae6b;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
:root, [data-theme="dark"] {
  --bg: #0e0d0c;
  --panel: #161513;
  --panel2: #201f1d;
  --hover: #1b1a18;
  --sel: #25221c;
  --line: #322f29;
  --line2: #26241f;
  --text: #ede7de;
  --muted: #a39c90;
  --dim: #756f66;
  --accent-text: #d6a651;
  --shadow: 0 10px 30px rgba(0, 0, 0, .55);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #efeae0;
  --panel: #f8f5ee;
  --panel2: #e8e2d5;
  --hover: #f2eee4;
  --sel: #efe6cf;
  --line: #cfc7b6;
  --line2: #ddd6c6;
  --text: #1d1b17;
  --muted: #5e584d;
  --dim: #8a8373;
  --accent-text: #8a5f0c;
  --blue-text: #146a99;
  --danger: #b4382a;
  --ok: #4d7a3a;
  --shadow: 0 10px 28px rgba(60, 48, 20, .2);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 400 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; }
#app { height: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--blue-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0; }
::selection { background: color-mix(in srgb, var(--gold) 35%, transparent); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); font-size: .92em; }
.grow { flex: 1 1 auto; min-width: 0; }
.row-flex { display: flex; align-items: center; gap: 8px; }
.nowrap { white-space: nowrap; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border: 3px solid transparent; background-clip: content-box; border-radius: 6px; }

/* label above a field / section tag */
.tag { font: 500 10.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }

/* icons */
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; vertical-align: middle; }
.ic.fill { fill: currentColor; stroke: none; }
.ic.sm { width: 15px; height: 15px; }
.ic.lg { width: 22px; height: 22px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel2); color: var(--text); font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { border-color: var(--dim); background: color-mix(in srgb, var(--panel2) 80%, var(--text) 8%); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-busy { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn.primary:hover { background: var(--gold-hi); border-color: var(--gold-hi); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, var(--line)); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--hover); border-color: transparent; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; }
.ibtn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r); color: var(--muted); position: relative; }
.ibtn:hover { background: var(--hover); color: var(--text); }
.ibtn[aria-pressed="true"], .ibtn.on { color: var(--gold); }
.ibtn[disabled] { opacity: .35; pointer-events: none; }
.ibtn.sm { width: 28px; height: 28px; }

/* form controls */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label, .field > .lbl { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.field .hint { font-size: 12.5px; color: var(--dim); }
.in, select.in, textarea.in { width: 100%; height: 36px; padding: 0 11px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); transition: border-color .12s; }
textarea.in { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.in:hover { border-color: var(--dim); }
.in:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.in::placeholder { color: var(--dim); }
select.in { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 15px, calc(100% - 12px) 15px; background-size: 5px 5px; background-repeat: no-repeat; }
.in.mono { font-family: var(--mono); }
.input-addon { display: flex; align-items: stretch; }
.input-addon .in { border-right: 0; border-radius: var(--r) 0 0 var(--r); }
.input-addon .suffix { display: grid; place-items: center; padding: 0 11px; background: var(--panel2); border: 1px solid var(--line); border-radius: 0 var(--r) var(--r) 0; color: var(--muted); white-space: nowrap; font-size: 13px; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.check input { appearance: none; width: 16px; height: 16px; margin: 0; border: 1px solid var(--dim); border-radius: var(--r); background: var(--bg); display: grid; place-items: center; flex: none; cursor: pointer; }
.check input:checked { background: var(--gold); border-color: var(--gold); }
.check input:checked::after { content: ""; width: 8px; height: 4px; border-left: 2px solid var(--gold-ink); border-bottom: 2px solid var(--gold-ink); transform: translateY(-1px) rotate(-45deg); }
.check input:indeterminate { background: var(--gold); border-color: var(--gold); }
.check input:indeterminate::after { content: ""; width: 8px; height: 2px; background: var(--gold-ink); }
.check.radio input { border-radius: 50%; }
.check.radio input:checked::after { width: 6px; height: 6px; border: 0; border-radius: 50%; background: var(--gold-ink); transform: none; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { appearance: none; width: 34px; height: 18px; margin: 0; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; position: relative; cursor: pointer; flex: none; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; background: var(--muted); border-radius: 50%; transition: transform .15s var(--ease), background .15s; }
.switch input:checked { background: var(--gold); border-color: var(--gold); }
.switch input:checked::after { transform: translateX(16px); background: var(--gold-ink); }
.err { color: var(--danger); font-size: 13px; }
.ok-text { color: var(--ok); }
.notice { padding: 11px 14px; border: 1px solid var(--line); border-left: 3px solid var(--gold); background: var(--panel); font-size: 13.5px; color: var(--muted); }
.notice.bad { border-left-color: var(--danger); }
.notice b { color: var(--text); font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: var(--r); font-size: 11.5px; font-weight: 500; background: var(--panel2); color: var(--muted); border: 1px solid var(--line2); white-space: nowrap; }
.chip.gold { color: var(--gold-ink); background: var(--gold); border-color: var(--gold); }
.chip.pro { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); background: transparent; letter-spacing: .08em; text-transform: uppercase; font-size: 10px; }
.sep { height: 1px; background: var(--line); margin: 18px 0; border: 0; }
.kbd { font: 500 11px var(--mono); padding: 1px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; background: var(--panel2); color: var(--muted); }

/* avatars: flat squares with a muted tone, not coloured blobs */
.av { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: var(--r); font: 600 13px var(--sans); color: #fff; letter-spacing: .02em; user-select: none; }
.av.sm { width: 26px; height: 26px; font-size: 11px; }
.av.lg { width: 44px; height: 44px; font-size: 16px; }

/* meters */
.meter { height: 6px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 1px; overflow: hidden; display: flex; }
.meter i { display: block; height: 100%; background: var(--gold); }
.meter i.b { background: var(--blue); }
.meter i.d { background: var(--dim); }
.meter.warn i { background: var(--danger); }

/* tables */
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th { text-align: left; font: 500 10.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 0 12px 9px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.t tr:hover td { background: color-mix(in srgb, var(--hover) 70%, transparent); }
.t .r { text-align: right; }

/* layers: modal, menu, toast */
#layer { position: fixed; inset: 0; pointer-events: none; z-index: 100; }
#layer > * { pointer-events: auto; }
.scrim { position: fixed; inset: 0; background: rgba(5, 4, 3, .62); display: grid; place-items: center; padding: 16px; animation: fade .12s linear; }
[data-theme="light"] .scrim { background: rgba(40, 32, 14, .4); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.dlg { width: min(100%, 460px); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); animation: rise .16s var(--ease); }
.dlg.wide { width: min(100%, 640px); }
.dlg.xl { width: min(100%, 860px); }
.dlg > header { display: flex; align-items: center; gap: 10px; padding: 16px 20px 0; }
.dlg > header h2 { font: 500 20px/1.2 var(--serif); flex: 1; }
.dlg > .body { padding: 14px 20px 6px; overflow: auto; }
.dlg > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; }
.dlg > footer .left { margin-right: auto; }
.menu { position: fixed; min-width: 190px; max-width: 320px; max-height: min(70vh, 480px); overflow: auto; padding: 5px 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); animation: rise .1s var(--ease); z-index: 5; }
.menu button, .menu .mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 14px; text-align: left; color: var(--text); font-size: 13.5px; }
.menu button:hover, .menu button:focus-visible { background: var(--hover); outline: none; }
.menu button[disabled] { opacity: .4; pointer-events: none; }
.menu .danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line2); margin: 5px 0; }
.menu .hd { padding: 6px 14px 4px; }
.menu .ic { color: var(--muted); }
.menu .ck { margin-left: auto; color: var(--gold); }
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; width: max-content; max-width: calc(100vw - 24px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 16px; padding: 11px 14px 11px 16px; background: var(--text); color: var(--bg); border-radius: var(--r); box-shadow: var(--shadow); animation: rise .16s var(--ease); pointer-events: auto; font-size: 13.5px; }
.toast.bad { background: #a3352a; color: #fff; }
.toast button { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.toast.bad button { color: #fff; }

/* boot + auth */
.boot { height: 100%; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--dim); }
.boot img { opacity: .9; }
.auth { min-height: 100%; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(360px, 520px); overflow: auto; background: var(--bg); }
.auth .side { position: relative; padding: 44px 56px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); background: var(--panel); min-height: 100vh; }
.auth .side .brand { display: flex; align-items: center; gap: 12px; }
.auth .side .brand img { width: 36px; height: 36px; }
.auth .side .brand b { font: 500 15px var(--sans); letter-spacing: .02em; }
.auth .side .brand span { display: block; font-size: 12px; color: var(--dim); letter-spacing: .1em; text-transform: uppercase; }
.auth .side h1 { font: 400 clamp(34px, 4.4vw, 56px)/1.04 var(--serif); letter-spacing: -.012em; max-width: 11em; }
.auth .side h1 em { font-style: italic; color: var(--gold); }
.auth .side p.lede { margin-top: 18px; max-width: 30em; color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.auth .side .foot { font-size: 12.5px; color: var(--dim); display: flex; gap: 18px; flex-wrap: wrap; }
.auth .side .rule { height: 1px; background: var(--line); margin: 0 0 18px; }
.auth .form { padding: 44px 48px; display: flex; flex-direction: column; justify-content: center; min-height: 100vh; }
.auth .form h2 { font: 500 28px/1.15 var(--serif); margin-bottom: 6px; }
.auth .form .sub { color: var(--muted); margin-bottom: 24px; }
.auth .form form { max-width: 380px; width: 100%; }
.auth .alt { margin-top: 20px; font-size: 13.5px; color: var(--muted); display: flex; gap: 6px 16px; flex-wrap: wrap; }
.auth .pwmeter { display: flex; gap: 3px; margin-top: 6px; }
.auth .pwmeter i { flex: 1; height: 3px; background: var(--line); }
.auth .pwmeter i.on { background: var(--gold); }
.codebox { font: 600 22px/1 var(--mono); letter-spacing: .4em; text-align: center; height: 48px; }
.err-screen { height: 100%; display: grid; place-content: center; justify-items: start; gap: 14px; padding: 24px; max-width: 520px; margin: 0 auto; }
.err-screen h1 { font: 400 32px var(--serif); }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth .side { min-height: 0; padding: 26px 24px 28px; border-right: 0; border-bottom: 1px solid var(--line); gap: 26px; }
  .auth .side .foot { display: none; }
  .auth .form { min-height: 0; padding: 28px 24px 48px; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
