/*
 * fembois.wtf — shared look for all three hosts.
 *
 * Lilac paper and deep indigo ink; one hot pink that marks "yours / act here",
 * a periwinkle second for the second series in a chart. The wordmark is a
 * tilted sticker — that is the one loud thing; everything else stays quiet.
 */

:root {
  --bg: #f1ecf8;
  --surface: #ffffff;
  --surface-2: #f8f5fc;
  --ink: #22183a;
  --ink-2: #5b4f75;
  --ink-3: #8a7fa1;
  --line: #ddd3ec;
  --line-strong: #c4b6da;
  --pink: #d63a7f;
  --pink-soft: #fbe3ee;
  --peri: #5466d6;
  --on-pink: #ffffff;
  --good: #1f8a64;
  --warn: #b26a00;
  --denied: #b26a00;
  --bad: #c42b3b;
  --bad-soft: #fbe4e6;
  --shadow: 0 1px 0 var(--line), 0 8px 24px -16px rgba(34, 24, 58, 0.35);

  --font-display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #181225;
    --surface: #221a33;
    --surface-2: #2a2140;
    --ink: #f1eafb;
    --ink-2: #b9acd2;
    --ink-3: #8b7fa6;
    --line: #362b4d;
    --line-strong: #4b3e66;
    --pink: #e24b8e;
    --pink-soft: #3d2140;
    --peri: #6b7ceb;
    --on-pink: #ffffff;
    --good: #47c695;
    --warn: #f0aa3c;
    --denied: #bd801c;
    --bad: #ff6b78;
    --bad-soft: #3f1d29;
    --shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #181225;
  --surface: #221a33;
  --surface-2: #2a2140;
  --ink: #f1eafb;
  --ink-2: #b9acd2;
  --ink-3: #8b7fa6;
  --line: #362b4d;
  --line-strong: #4b3e66;
  --pink: #e24b8e;
  --pink-soft: #3d2140;
  --peri: #6b7ceb;
  --on-pink: #ffffff;
  --good: #47c695;
  --warn: #f0aa3c;
  --denied: #bd801c;
  --bad: #ff6b78;
  --bad-soft: #3f1d29;
  --shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* component display rules must not resurrect hidden elements */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}
h1 {
  font-size: 1.9rem;
}
h2 {
  font-size: 1.15rem;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.86em;
}
.muted {
  color: var(--ink-2);
}
.faint {
  color: var(--ink-3);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- sticker wordmark */

.sticker {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  background: var(--pink-soft);
  border: 2px solid var(--ink);
  border-radius: 0.38em;
  padding: 0.12em 0.32em 0.16em;
  box-shadow: 0.08em 0.08em 0 var(--pink);
  transform: rotate(-3deg);
  text-decoration: none;
  white-space: nowrap;
}
.sticker .tld {
  font-weight: 500;
}

/* ---------------------------------------------------------------- top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .sticker {
  font-size: 1.15rem;
}
.topbar nav {
  display: flex;
  gap: 4px;
}
.topbar nav a {
  text-decoration: none;
  color: var(--ink-2);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}
.topbar nav a:hover {
  color: var(--ink);
  background: var(--surface-2);
}
.topbar nav a[aria-current='page'] {
  color: var(--ink);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.topbar .who {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--pink-soft);
  border: 1px solid var(--line-strong);
  object-fit: cover;
}

/* ---------------------------------------------------------------- controls */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  border-color: var(--ink-3);
}
.btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.btn.primary {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--on-pink);
}
.btn.primary:hover {
  filter: brightness(1.07);
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ink-2);
}
.btn.ghost:hover {
  color: var(--ink);
  background: var(--surface-2);
}
.btn.danger {
  color: var(--bad);
}
.btn.danger:hover {
  background: var(--bad-soft);
  border-color: var(--bad);
}
.btn.small {
  padding: 4px 10px;
  font-size: 0.86rem;
}
.icon-btn {
  padding: 6px;
  width: 32px;
  height: 32px;
}

.input {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  min-width: 0;
}
.input:focus-visible {
  outline-offset: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.chip.pink {
  background: var(--pink-soft);
  color: var(--pink);
  border-color: transparent;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
}

.empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--ink-2);
}
.empty strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

/* ---------------------------------------------------------------- toast */

.toasts {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  z-index: 100;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.18s ease-out;
}
.toast.bad {
  background: var(--bad);
  color: #fff;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 10px 16px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .topbar nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .topbar nav a {
    white-space: nowrap;
  }
  .topbar .who .name {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
