/* S2N Data — design system */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/inter-latin.260c81a4759b.woff2") format("woff2");
}
/* Dark is the default theme (matches the brand's black/red identity and
   avoids a mostly-white interface). Light mode is an explicit opt-in via
   [data-theme="light"] below, toggled by the theme switch in the header and
   remembered per-visitor — see the toggle script in s2n.js. Defining dark as
   the bare :root default (rather than gating it behind a class the toggle
   script would need to add) means the very first paint is already correct
   with no flash, even before any JavaScript runs. */
:root {
  --bg: #0a0a0b;
  --surface: #131314;
  --surface-2: #1b1b1d;
  --surface-3: #242426;
  --ink: #f5f5f6;
  --ink-2: #b4b4b8;
  --muted: #8a8a8e;
  --faint: #6b6b6b;
  --line: #2a2a2d;
  --line-2: #38383b;

  --brand: #e31b23;
  --brand-ink: #ff3b3b;
  --brand-tint: #3a1214;

  /* Choropleth intensity steps for the country-activity map -- graduated
     tints of the brand color rather than one flat block, so a single very
     active country doesn't visually flatten the whole map into solid red. */
  --map-empty: var(--surface-3);
  --map-level-1: rgba(227,27,35,.28);
  --map-level-2: rgba(227,27,35,.5);
  --map-level-3: rgba(227,27,35,.72);
  --map-level-4: var(--brand);

  /* Status colors are always paired with a text label and an icon/dot shape,
     never used as the sole signal (see .status component below). */
  --ok: #2fb673;
  --ok-tint: rgba(47,182,115,.16);
  --warn: #e3a72e;
  --warn-tint: rgba(227,167,46,.16);
  --danger: #ff5c5c;
  --danger-tint: rgba(255,92,92,.16);
  --info: #4c8dff;
  --info-tint: rgba(76,141,255,.16);

  --ink-invert: #0a0a0a;
  /* Neutral, hue-free darks (no blue/navy cast) for the app shell and hero —
     these sections are always dark, in both themes. */
  --night: #0a0a0a;
  --night-2: #161616;
  --night-line: #272727;
  --night-muted: #a3a3a3;

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.5), 0 1px 3px rgba(0,0,0,.4);
  --shadow: 0 4px 16px rgba(0,0,0,.5);
  --shadow-lg: 0 18px 48px rgba(0,0,0,.6);
  --header-glass: rgba(0,0,0,.75);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --step-0: 0.9375rem;
  --step-1: 1.0625rem;
  --step-2: 1.375rem;
  --step-3: 1.75rem;
  --step-4: 2.25rem;
  --step-5: 3rem;

  --space: 1rem;
  --sidebar-w: 256px;
  --header-h: 64px;
}

/* Light mode — opt-in, preserves the platform's original light appearance. */
[data-theme="light"] {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f2f2f3;
  --surface-3: #e9e9ea;
  --ink: #0a0a0b;
  --ink-2: #4a4a4e;
  --muted: #8a8a8e;
  --faint: #999999;
  --line: #e5e5e7;
  --line-2: #d3d3d5;

  --brand: #d01920;
  --brand-ink: #b3141b;
  --brand-tint: #fdecec;

  --map-empty: var(--surface-3);
  --map-level-1: rgba(208,25,32,.22);
  --map-level-2: rgba(208,25,32,.42);
  --map-level-3: rgba(208,25,32,.65);
  --map-level-4: var(--brand);

  --ok: #1b8a4b;
  --ok-tint: #e7f4ec;
  --warn: #b06a10;
  --warn-tint: #fbf0dd;
  --danger: #c1121f;
  --danger-tint: #fbe9ea;
  --info: #1d4ed8;
  --info-tint: #e8edfb;

  --ink-invert: #f5f5f5;

  --shadow-sm: 0 1px 2px rgba(11,11,12,.06), 0 1px 3px rgba(11,11,12,.04);
  --shadow: 0 4px 16px rgba(11,11,12,.08);
  --shadow-lg: 0 18px 48px rgba(11,11,12,.16);
  --header-glass: rgba(255,255,255,.86);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
p { margin: 0 0 1em; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
small { font-size: .82rem; }
code, kbd { font-family: var(--mono); font-size: .85em; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 24px; }
.container-narrow { max-width: 760px; }

/* ---- Buttons ---- */
.btn {
  --btn-bg: var(--night); --btn-fg: #fff; --btn-bd: var(--night);
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  font: inherit; font-weight: 600; font-size: .85rem; line-height: 1;
  padding: .55em .95em; border-radius: var(--radius-sm);
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  cursor: pointer; text-decoration: none;
  transition: filter .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn:active { filter: brightness(.95); }
.btn:focus-visible { outline: 3px solid var(--brand-tint); outline-offset: 2px; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-brand { --btn-bg: var(--brand); --btn-bd: var(--brand); }
.btn-brand:hover { --btn-bg: var(--brand-ink); --btn-bd: var(--brand-ink); filter: none; }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-2); }
.btn-ghost:hover { --btn-bg: var(--surface-2); --btn-bd: var(--line-2); filter: none; }
.btn-danger { --btn-bg: var(--danger); --btn-bd: var(--danger); }
.btn-sm { padding: .4em .7em; font-size: .78rem; }
.btn-lg { padding: .7em 1.3em; font-size: .95rem; }
.btn-block { width: 100%; }
.btn .ico { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

/* ---- Forms ---- */
.field { margin-bottom: 1.1rem; }
.field > label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: .4rem; color: var(--ink-2); }
.input, .select, .textarea, input[type="text"], input[type="email"], input[type="password"],
input[type="url"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  padding: .65em .8em; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; }
.input:focus, select:focus, textarea:focus, input:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint);
}
.field .help { font-size: .8rem; color: var(--muted); margin-top: .35rem; }
.field .errorlist, .form-error { color: var(--danger); font-size: .82rem; margin: .35rem 0 0; padding: 0; list-style: none; }
.field.has-error .input, .field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.checkbox { display: flex; align-items: flex-start; gap: .6rem; font-size: .9rem; }
.checkbox input { width: auto; margin-top: .2rem; accent-color: var(--brand); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* ---- Cards ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 1.4rem; }
.card-head { padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.card-head h3 { margin: 0; font-size: 1.05rem; }
.card-body { padding: 1.4rem; }
.card-foot { padding: 1rem 1.4rem; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card-danger { border-color: var(--danger); }
.card-danger .card-head { border-bottom-color: var(--danger); background: var(--danger-tint); }
.card-danger .card-head h3 { color: var(--danger); }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: .8rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table a { color: var(--ink); font-weight: 600; }

/* ---- Badges ----
   Reserved for short tag-like labels (plan names, "Free", "Public"), not for
   state indicators — those use .status below so the interface isn't wrapped
   in colored pills everywhere. */
.badge { display: inline-flex; align-items: center; gap: .35em; font-size: .72rem; font-weight: 600; padding: .22em .55em; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-2); }
.badge.ok { background: var(--ok-tint); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-tint); color: var(--warn); border-color: transparent; }
.badge.danger { background: var(--danger-tint); color: var(--danger); border-color: transparent; }
.badge.info { background: var(--info-tint); color: var(--info); border-color: transparent; }
.badge.brand { background: var(--brand-tint); color: var(--brand-ink); border-color: transparent; }
.badge.muted { background: var(--surface-2); color: var(--muted); }

/* ---- Status ----
   Plain-text state indicator: a small dot plus a label, no background pill.
   Color is a supporting cue only — the word itself always carries the meaning,
   so this remains legible without relying on color perception. */
.status { display: inline-flex; align-items: center; gap: .45em; font-size: .85rem; font-weight: 500; color: var(--ink-2); }
.status .dot { width: 7px; height: 7px; min-width: 7px; border-radius: 50%; background: var(--faint); }
.status.ok .dot { background: var(--ok); } .status.ok { color: var(--ok); }
.status.warn .dot { background: var(--warn); } .status.warn { color: var(--warn); }
.status.danger .dot { background: var(--danger); } .status.danger { color: var(--danger); }
.status.info .dot { background: var(--info); } .status.info { color: var(--info); }
.status.muted .dot { background: var(--faint); } .status.muted { color: var(--muted); }
.status-sm { font-size: .78rem; }

/* Plain descriptive tag (a data source, a fixed reporting window) — text only,
   no capsule, since it isn't conveying state. */
.meta-tag { font-size: .78rem; color: var(--muted); font-weight: 500; }

/* ---- Alerts ---- */
.alert { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); margin-bottom: 1rem; font-size: .9rem; }
.alert .ico { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert-success { background: var(--ok-tint); border-color: transparent; color: var(--ok); }
.alert-danger { background: var(--danger-tint); border-color: transparent; color: var(--danger); }
.alert-warning { background: var(--warn-tint); border-color: transparent; color: var(--warn); }
.alert-info { background: var(--info-tint); border-color: transparent; color: var(--info); }
.alert .close { margin-left: auto; background: none; border: 0; cursor: pointer; color: inherit; opacity: .6; }
.alert .close:hover { opacity: 1; }

/* ---- Stat tiles ---- */
.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; transition: border-color .2s ease; }
.stat:hover { border-color: var(--line-2); }
@media (prefers-reduced-motion: reduce) { .stat, .feature, .price-card, .step { transition: none; } }
.stat .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.stat .label .ico { width: 16px; height: 16px; color: var(--brand); }
.stat .value { font-size: var(--step-4); font-weight: 700; margin-top: .35rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .delta { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.delta.up { color: var(--ok); } .delta.down { color: var(--danger); }

/* ---- Empty / loading states ---- */
.empty { text-align: center; padding: 3rem 1.5rem; color: var(--muted); }
.empty .ico { width: 40px; height: 40px; color: var(--faint); margin: 0 auto .8rem; }
.empty h3 { color: var(--ink-2); margin-bottom: .3rem; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line-2) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.skeleton-row { height: 16px; margin: .5rem 0; }

/* ---- Utilities ---- */
.stack > * + * { margin-top: var(--gap, 1rem); }
.flex { display: flex; gap: 1rem; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .82rem; }
.strong { font-weight: 700; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); }
.mt-0{margin-top:0}.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}.mt-4{margin-top:2rem}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:.5rem}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.5rem}
.hide { display: none !important; }
.spread { flex: 1; }
.divider { height: 1px; background: var(--line); margin: 1.25rem 0; }
.ico { display: inline-block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* ---- Pagination ---- */
.pagination { display: flex; gap: .35rem; align-items: center; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }
.pagination a, .pagination span { padding: .45em .8em; border: 1px solid var(--line-2); border-radius: var(--radius-sm); font-size: .85rem; color: var(--ink-2); background: var(--surface); }
.pagination .current { background: var(--night); color: #fff; border-color: var(--night); }
.pagination a:hover { background: var(--surface-2); text-decoration: none; }

/* ---- Modal ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(10,10,10,.55); display: flex;
  align-items: center; justify-content: center; padding: 24px; z-index: 100; }
.modal-box { background: var(--surface-3); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 1.5rem; width: 100%; max-width: 640px; max-height: 85vh; overflow-y: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.modal-loading { padding: 3rem; text-align: center; color: var(--muted); }

/* ---- Toolbar / filters ---- */
.toolbar { display: flex; gap: .75rem; flex-wrap: wrap; align-items: end; margin-bottom: 1.25rem; }
.toolbar .field { margin-bottom: 0; }
.toolbar .grow { flex: 1; min-width: 180px; }

/* social link rows (+ Add social media) */
.social-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.social-row select { flex: 0 0 9.5rem; }
.social-row input[type="url"] { flex: 1; }
.social-del { white-space: nowrap; font-size: .8rem; }

/* role picker on sign-up */
.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
@media (max-width: 480px) { .role-cards { grid-template-columns: 1fr; } }
.role-card { position: relative; display: flex; flex-direction: column; gap: .15rem; padding: .8rem .9rem; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); transition: border-color .15s, background .15s; }
.role-card input { position: absolute; opacity: 0; pointer-events: none; }
.role-card:hover { border-color: var(--brand); }
.role-card:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); box-shadow: 0 0 0 1px var(--brand) inset; }
.role-title { font-weight: 700; font-size: .92rem; }
.role-blurb { font-size: .76rem; color: var(--muted); line-height: 1.35; }

/* searchable selects follow the site theme */
.ts-wrapper .ts-control, .ts-dropdown { background: var(--surface); color: var(--ink); border-color: var(--line-2); font: inherit; font-size: .95rem; }
.ts-wrapper.single .ts-control { padding: .55em .8em; border-radius: var(--radius-sm); box-shadow: none; }
.ts-control input { color: var(--ink) !important; }
.ts-dropdown { border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.ts-dropdown .option { color: var(--ink); }
.ts-dropdown .active { background: var(--brand-tint); color: var(--ink); }
.ts-wrapper.focus .ts-control { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.ts-wrapper.multi .ts-control > div { background: var(--brand-tint); color: var(--ink); border-radius: 4px; }

/* Searchable selects: always follow the page theme (light or dark), whatever order the vendor sheet loads in */
body .ts-wrapper .ts-control, body .ts-wrapper.single .ts-control, body .ts-wrapper.single.input-active .ts-control,
body .ts-dropdown, body .ts-dropdown.single { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line-2) !important; }
body .ts-wrapper .ts-control > .item, body .ts-wrapper.single .ts-control > .item { color: var(--ink) !important; }
body .ts-control input, body .ts-control input::placeholder { color: var(--ink) !important; opacity: 1; }
body .ts-control input::placeholder { color: var(--muted) !important; }
body .ts-dropdown .option, body .ts-dropdown .no-results, body .ts-dropdown .optgroup-header { color: var(--ink) !important; background: transparent !important; }
body .ts-dropdown .active, body .ts-dropdown .option:hover { background: var(--brand-tint) !important; color: var(--ink) !important; }
body .ts-wrapper.single .ts-control:not(.rtl)::after { border-color: var(--muted) transparent transparent transparent; }
/* an odd card out (5 account types) spans the full row instead of sitting alone */
.role-cards .role-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
