/* Poozer Mail — decoy sign-in page
   Palette derived from the poozer mascot: flesh tone, green/red eyes,
   umber linework, set adrift in a starfield. */

:root {
  --ink: #2a1810;
  --ink-soft: #6b5344;
  --leaf: #7cb83f;
  --leaf-strong: #669934;
  --leaf-deep: #4f7a28;
  --ember: #c73a3a;
  --ember-deep: #8f2a2a;
  --ember-wash: rgba(199, 58, 58, 0.1);

  --card-bg: #faf3ec;
  --card-border: rgba(42, 24, 16, 0.09);
  --card-shadow: 0 40px 90px -30px rgba(2, 1, 8, 0.65), 0 12px 34px rgba(2, 1, 8, 0.35);

  --void-1: #0a0916;
  --void-2: #17102b;
  --void-3: #241a3c;
  --star-color: #fdfaf5;
  --text-on-void: #f2e9de;
  --muted-on-void: rgba(242, 233, 222, 0.6);

  --font-display: "Quicksand", "Trebuchet MS", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --card-shadow: 0 30px 70px -28px rgba(60, 40, 90, 0.35), 0 8px 24px rgba(60, 40, 90, 0.18);
  --void-1: #cdd2ea;
  --void-2: #dcd4ee;
  --void-3: #efe0ea;
  --star-color: #6b5344;
  --text-on-void: #2a1810;
  --muted-on-void: rgba(42, 24, 16, 0.55);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  background: radial-gradient(120% 90% at 50% -10%, var(--void-3) 0%, var(--void-2) 45%, var(--void-1) 100%);
  color: var(--text-on-void);
  overflow-x: hidden;
  transition: color 0.4s ease;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- background: sky, stars, poozers ---------- */

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.stars {
  position: absolute;
  inset: -10%;
  background-repeat: repeat;
  will-change: transform;
}

.stars--near {
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, var(--star-color) 55%, transparent 60%),
    radial-gradient(1.3px 1.3px at 68% 8%, var(--star-color) 55%, transparent 60%),
    radial-gradient(1.4px 1.4px at 34% 64%, var(--star-color) 55%, transparent 60%),
    radial-gradient(1.1px 1.1px at 82% 48%, var(--star-color) 55%, transparent 60%),
    radial-gradient(1.5px 1.5px at 50% 88%, var(--star-color) 55%, transparent 60%),
    radial-gradient(1.2px 1.2px at 6% 78%, var(--star-color) 55%, transparent 60%);
  background-size: 260px 260px;
  opacity: 0.55;
  animation: twinkle 7s ease-in-out infinite alternate, drift-transform 160s ease-in-out infinite alternate;
}

.stars--far {
  background-image:
    radial-gradient(1px 1px at 20% 30%, var(--star-color) 55%, transparent 60%),
    radial-gradient(1px 1px at 60% 70%, var(--star-color) 55%, transparent 60%),
    radial-gradient(0.9px 0.9px at 85% 15%, var(--star-color) 55%, transparent 60%),
    radial-gradient(1px 1px at 40% 90%, var(--star-color) 55%, transparent 60%),
    radial-gradient(0.9px 0.9px at 5% 55%, var(--star-color) 55%, transparent 60%);
  background-size: 380px 380px;
  opacity: 0.3;
  animation: twinkle 11s ease-in-out infinite alternate-reverse, drift-transform 280s ease-in-out infinite alternate-reverse;
}

@keyframes twinkle {
  from {
    opacity: 0.18;
  }
  to {
    opacity: 0.6;
  }
}

/* transform, not background-position: keeps the drift on the compositor
   thread instead of forcing a full-page repaint every frame */
@keyframes drift-transform {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(3%, 2%, 0);
  }
}

.poozers {
  position: absolute;
  inset: 0;
}

.poozer {
  position: absolute;
  width: min(var(--size, 120px), 26vw);
  opacity: var(--op, 0.35);
  animation: poozer-drift var(--dur, 26s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform;
}

/* Depth blur is baked into three separate PNGs (sharp/mid/far) rather than
   a live `filter: blur()` — CSS filters cost a real per-frame shader pass
   even for a static blur radius, which adds up fast across many
   simultaneously-animating layers. */

body.anim-paused .poozer,
body.anim-paused .stars {
  animation-play-state: paused;
}

@keyframes poozer-drift {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(var(--dx, 16px), var(--dy, -24px)) rotate(var(--rot, 4deg));
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

/* ---------- topbar ---------- */

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(18px, 4vw, 40px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: 0.01em;
}

.brand-poozer {
  color: var(--text-on-void);
}

.brand-mail {
  color: var(--leaf);
}

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

.lang-select select {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(242, 233, 222, 0.22);
  color: var(--muted-on-void);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 7px 30px 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

:root[data-theme="light"] .lang-select select {
  border-color: rgba(42, 24, 16, 0.18);
}

.lang-select select:hover {
  color: var(--text-on-void);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(242, 233, 222, 0.22);
  background: transparent;
  color: var(--muted-on-void);
  cursor: pointer;
}

:root[data-theme="light"] .theme-toggle {
  border-color: rgba(42, 24, 16, 0.18);
}

.theme-toggle:hover {
  color: var(--text-on-void);
  border-color: var(--leaf);
}

.icon {
  width: 18px;
  height: 18px;
}

.icon-moon {
  display: none;
}

:root[data-theme="light"] .icon-sun {
  display: none;
}

:root[data-theme="light"] .icon-moon {
  display: block;
}

/* ---------- stage & card ---------- */

.stage[hidden] {
  display: none;
}

.stage {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px clamp(16px, 5vw, 40px) 48px;
}

.card {
  position: relative;
  width: min(440px, 100%);
  background: var(--card-bg);
  color: var(--ink);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  padding: clamp(28px, 4vw, 44px);
  animation: card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card.is-shaking {
  animation: card-shake 0.4s ease;
}

@keyframes card-shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

.view h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 1.9rem);
}

.subtext {
  margin: 0 0 26px;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field-label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="password"],
.field input[type="email"] {
  width: 100%;
  font: inherit;
  font-family: var(--font-body);
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(42, 24, 16, 0.16);
  background: #fff;
  color: var(--ink);
}

.field input:focus-visible {
  outline: none;
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(124, 184, 63, 0.22);
}

.field input.is-invalid {
  border-color: var(--ember);
}

.field input.is-invalid:focus-visible {
  border-color: var(--ember);
  box-shadow: 0 0 0 3px var(--ember-wash);
}

.field-error[hidden] {
  display: none;
}

.field-error {
  display: block;
  color: var(--ember-deep);
  font-size: 0.82rem;
  margin-top: 6px;
}

.password-field,
.username-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 42px;
}

.username-field input {
  padding-right: 128px;
}

.domain-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  font-size: 0.85rem;
  pointer-events: none;
}

.visibility-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--ink-soft);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.visibility-toggle:hover {
  color: var(--ink);
  background: rgba(42, 24, 16, 0.06);
}

.visibility-toggle.is-active {
  color: var(--leaf-deep);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 24px;
  font-size: 0.9rem;
  cursor: pointer;
}

.checkbox-row input {
  margin-top: 3px;
  accent-color: var(--leaf);
  width: 16px;
  height: 16px;
  flex: none;
}

.checkbox-row small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.8rem;
  margin-top: 2px;
}

.btn-primary {
  position: relative;
  width: 100%;
  border: none;
  border-radius: 11px;
  background: var(--leaf);
  color: #10230a;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 18px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover {
  background: var(--leaf-strong);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--leaf-deep);
  outline-offset: 2px;
}

.btn-primary .btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(16, 35, 10, 0.35);
  border-top-color: #10230a;
  margin: 0 auto;
  animation: spin 0.7s linear infinite;
}

.btn-primary.is-loading .btn-label {
  display: none;
}

.btn-primary.is-loading .btn-spinner {
  display: block;
}

.btn-primary:disabled {
  cursor: default;
  opacity: 0.9;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.alt-action {
  text-align: center;
  font-size: 0.92rem;
  margin: 20px 0 0;
}

a {
  color: var(--leaf-deep);
  font-weight: 600;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 2px;
}

hr {
  border: none;
  border-top: 1px solid rgba(42, 24, 16, 0.12);
  margin: 22px 0;
}

.center-link {
  text-align: center;
  margin: 0;
  font-size: 0.9rem;
}

.notice[hidden] {
  display: none;
}

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--ember-wash);
  border: 1px solid rgba(199, 58, 58, 0.3);
  color: var(--ember-deep);
  font-size: 0.88rem;
  line-height: 1.4;
  animation: notice-in 0.3s ease;
}

.notice .icon-alert {
  flex: none;
  margin-top: 1px;
}

@keyframes notice-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- footer ---------- */

.pagefoot {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 8px 20px 32px;
  color: var(--muted-on-void);
  font-size: 0.82rem;
}

.pagefoot .tagline {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-on-void);
}

.pagefoot .legal {
  margin: 0;
}

.pagefoot a {
  color: var(--muted-on-void);
  font-weight: 500;
}

.pagefoot a:hover {
  color: var(--text-on-void);
}

.pagefoot .version {
  color: var(--muted-on-void);
}

/* ---------- legal modals (Terms / Privacy policy) ---------- */

.modal {
  border: none;
  padding: 0;
  border-radius: 20px;
  background: var(--card-bg);
  color: var(--ink);
  box-shadow: var(--card-shadow);
  width: min(560px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 64px));
  overflow: hidden;
}

.modal[open] {
  display: flex;
  flex-direction: column;
}

.modal::backdrop {
  background: rgba(10, 9, 22, 0.6);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--card-border);
  flex: none;
}

.modal-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}

.modal-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--ink);
  background: rgba(42, 24, 16, 0.08);
}

.modal-body {
  overflow-y: auto;
  padding: 18px 20px 24px;
}

.modal-updated {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.modal-body h3 {
  margin: 20px 0 8px;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
}

.modal-body h3:first-of-type {
  margin-top: 0;
}

.modal-body p,
.modal-body li {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.55;
}

.modal-body ul {
  margin: 0 0 10px;
  padding-left: 20px;
}

/* ---------- responsive ---------- */

@media (max-width: 520px) {
  .topbar {
    padding: 16px;
  }

  .brand-word {
    font-size: 1.1rem;
  }

  .stage {
    padding-top: 8px;
  }
}

/* ---------- motion & contrast preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .stars,
  .poozer,
  .card,
  .notice,
  .btn-primary .btn-spinner {
    animation: none !important;
  }
}

/* ---------- dashboard (merged from dashboard.css -- see CLAUDE.md
   "Dashboard" for why there's no longer a separate page/stylesheet for
   this) ---------- */

:root {
  --dash-register: #4f7fd9;
  --dash-register-deep: #3a63b3;
  --map-ramp-1: #d99494;
  --map-ramp-2: #c96e6e;
  --map-ramp-3: #b84545;
  --map-ramp-4: #962c2c;
  --map-ramp-5: #6e1f1f;
  --map-empty: rgba(42, 24, 16, 0.1);
  --map-ocean: rgba(42, 24, 16, 0.04);
}

:root[data-theme="light"] {
  --map-empty: rgba(42, 24, 16, 0.08);
  --map-ocean: rgba(42, 24, 16, 0.03);
}

.dash-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-on-void);
  border: 1px solid rgba(242, 233, 222, 0.22);
  border-radius: 999px;
  padding: 3px 10px;
  margin-left: 4px;
}

:root[data-theme="light"] .dash-label {
  border-color: rgba(42, 24, 16, 0.18);
}

.btn-logout {
  border: 1px solid rgba(242, 233, 222, 0.22);
  background: transparent;
  color: var(--muted-on-void);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
}

:root[data-theme="light"] .btn-logout {
  border-color: rgba(42, 24, 16, 0.18);
}

.btn-logout:hover {
  color: var(--text-on-void);
  border-color: var(--leaf);
}

.btn-clear-data {
  border: 1px solid rgba(199, 58, 58, 0.35);
  background: transparent;
  color: var(--ember);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.btn-clear-data:hover {
  color: var(--card-bg);
  background: var(--ember-deep);
  border-color: var(--ember-deep);
}

.dash-stage[hidden] {
  display: none;
}

.dash-stage {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 8px clamp(16px, 4vw, 40px) 56px;
}

.dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.range-select {
  display: inline-flex;
  background: rgba(242, 233, 222, 0.08);
  border: 1px solid rgba(242, 233, 222, 0.16);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

:root[data-theme="light"] .range-select {
  background: rgba(42, 24, 16, 0.05);
  border-color: rgba(42, 24, 16, 0.12);
}

.range-select button {
  border: none;
  background: transparent;
  color: var(--muted-on-void);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.range-select button.is-active {
  background: var(--leaf);
  color: #10230a;
}

.range-select button:not(.is-active):hover {
  color: var(--text-on-void);
}

/* Table filters (scoped to the "Recent attempts" panel -- these sit on
   the ivory card surface, not the dark sky, so use the card's ink tokens
   rather than the sky's muted-on-void ones the range selector uses). */

.table-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--card-border);
}

#table-search {
  flex: 1 1 240px;
  min-width: 200px;
  font: inherit;
  font-family: var(--font-body);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid rgba(42, 24, 16, 0.16);
  background: #fff;
  color: var(--ink);
  font-size: 0.85rem;
}

#table-search:focus-visible {
  outline: none;
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(124, 184, 63, 0.22);
}

/* Every filterable column's own <th> IS the dropdown trigger (changed
   2026-09-26, was a separate row of buttons above the table) -- "zero
   checked" always means "no constraint" for all four (Kind, Location,
   Client, Signals). The button fills the header cell (`th.filter-th` hands
   its padding over to the button) and is styled to match the plain <th>
   headers next to it -- uppercase, same size/weight/color -- rather than
   standing out as a distinct chip/pill the way it did in the old toolbar.
   The menu itself is `position: fixed`, not `absolute`: `.table-wrap`'s
   `overflow-x: auto` also computes `overflow-y` to `auto` per the CSS
   spec (an old, well-known gotcha -- see MDN's overflow-x page), which
   would otherwise clip a menu positioned relative to a `<th>` inside it.
   script.js's positionFilterMenu() sets top/left from the button's
   getBoundingClientRect() when opening; closeAllFilterDropdowns() runs on
   scroll/resize instead of continuously repositioning, since a fixed menu
   won't track its button through a scroll anyway. */
.filter-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 8px 10px;
  cursor: pointer;
}

.attempts-table th.filter-th {
  padding: 0;
}

.filter-dropdown-btn:hover,
.filter-dropdown-btn[aria-expanded="true"] {
  color: var(--ink);
}

.filter-dropdown-btn .icon-chevron {
  width: 11px;
  height: 11px;
  flex: none;
  transition: transform 0.15s ease;
}

.filter-dropdown-btn[aria-expanded="true"] .icon-chevron {
  transform: rotate(180deg);
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--leaf);
  color: #10230a;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
}

.filter-dropdown-menu {
  position: fixed;
  z-index: 30;
  min-width: 210px;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filter-dropdown-empty {
  color: var(--ink-soft);
  font-size: 0.82rem;
  padding: 5px 4px;
}

/* See CLAUDE.md "Dashboard" -- an author stylesheet rule always beats the
   browser's default [hidden] { display: none }, so the unconditional
   `display: flex` above needs its own override or `menu.hidden = true` in
   script.js is a no-op and the menu never actually closes. */
.filter-dropdown-menu[hidden] {
  display: none;
}

.filter-dropdown-menu label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 5px 4px;
  border-radius: 6px;
}

.filter-dropdown-menu label:hover {
  background: rgba(42, 24, 16, 0.04);
  color: var(--ink);
}

.filter-dropdown-menu input {
  accent-color: var(--leaf);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.filter-dropdown-clear {
  margin-top: 6px;
  padding-top: 8px;
  border: none;
  border-top: 1px solid var(--card-border);
  background: transparent;
  color: var(--leaf-deep);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.filter-dropdown-clear:hover {
  text-decoration: underline;
}

.dash-updated {
  color: var(--muted-on-void);
  font-size: 0.8rem;
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.stat-tile {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--ink);
  line-height: 1;
}

.stat-value.stat-login {
  color: var(--leaf-deep);
}

.stat-value.stat-register {
  color: var(--dash-register-deep);
}

.stat-label {
  color: var(--ink-soft);
  font-size: 0.82rem;
}

/* Deliberately neutral, not red/green -- "more attempts than last period"
   isn't good or bad news for a honeypot the way it would be for a normal
   product metric, so this doesn't pass a value judgment either way. Empty
   (no text) when there's nothing meaningful to compare against, e.g. 0
   vs. 0 -- see formatDelta() in script.js. */
.stat-delta {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.dash-panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  padding: clamp(18px, 3vw, 28px);
  color: var(--ink);
}

.dash-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.dash-panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.panel-subhead {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.dash-panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-panel-actions-sep {
  color: var(--card-border);
}

.legend {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.legend-login {
  background: var(--leaf);
}

.legend-register {
  background: var(--dash-register);
}

.map-credit {
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.map-credit a {
  color: var(--ink-soft);
  text-decoration: underline;
}

/* ---------- timeline chart ---------- */

.chart-wrap {
  position: relative;
  width: 100%;
}

#timeline-chart {
  width: 100%;
  height: 220px;
  display: block;
  overflow: visible;
}

.chart-bar {
  cursor: pointer;
}

.chart-bar-login {
  fill: var(--leaf);
}

.chart-bar-register {
  fill: var(--dash-register);
}

.chart-axis-label {
  fill: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 10px;
}

.chart-gridline {
  stroke: var(--card-border);
  stroke-width: 1;
}

.chart-tooltip,
.map-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: var(--card-bg);
  font-size: 0.78rem;
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1.4;
  white-space: nowrap;
  transform: translate(-50%, -110%);
  z-index: 5;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ---------- map ---------- */

.map-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--map-ocean);
}

#map-container svg {
  display: block;
  width: 100%;
  height: auto;
}

#map-container path {
  fill: var(--map-empty);
  stroke: var(--card-bg);
  stroke-width: 0.5;
  cursor: pointer;
  transition: opacity 0.1s ease;
}

#map-container path:hover {
  opacity: 0.75;
}

.rank-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 20px;
}

.rank-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.rank-list .rank-name {
  flex: 1;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.rank-list .rank-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--map-ramp-3);
  flex: none;
}

.rank-list .rank-count {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  flex: none;
  width: 2.5em;
  text-align: right;
}

.two-col-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.signal-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.signal-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.signal-badge-alert {
  background: var(--ember-wash);
  color: var(--ember-deep);
}

.signal-badge-neutral {
  background: rgba(79, 127, 217, 0.14);
  color: var(--dash-register-deep);
}

/* ---------- table ---------- */

.link-button {
  border: none;
  background: transparent;
  color: var(--leaf-deep);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
}

.link-button:hover {
  text-decoration: underline;
}

.table-wrap {
  overflow-x: auto;
}

.attempts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.attempts-table th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 8px 10px;
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}

.attempts-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--card-border);
  color: var(--ink);
  white-space: nowrap;
}

/* Only identifier/client are unbounded-length in practice (an attacker's
   script can send an arbitrarily long one); everything else is naturally
   short, so don't cap it too -- that's what was forcing the table wider
   than its columns actually needed and triggering the scrollbar. */
.truncate-cell {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attempts-table tr:last-child td {
  border-bottom: none;
}

.kind-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

/* Color is by outcome, not kind -- the pill text ("login"/"register")
   already says which endpoint was hit, so the color answers the other
   question: did it succeed? A successful login is always the real owner
   (see CLAUDE.md "Dashboard"); a register attempt is always is-fail, since
   there's no real signup behind this domain for it to ever succeed. */
.kind-pill.is-success {
  background: rgba(124, 184, 63, 0.16);
  color: var(--leaf-deep);
}

.kind-pill.is-fail {
  background: var(--ember-wash);
  color: var(--ember-deep);
}

.password-cell {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  cursor: pointer;
}

/* Clicking a row (anywhere but the password cell, which has its own
   click-to-reveal -- see the stopPropagation() next to it in script.js)
   expands a detail row underneath with the columns that don't fit in the
   table: postal code, lat/long, timezone, ASN/AS-org, HTTP/TLS version,
   Sec-Fetch-Site, Accept-Language. */
.attempt-row {
  cursor: pointer;
}

.attempt-row:hover td {
  background: rgba(124, 184, 63, 0.05);
}

.attempt-row.is-expanded td {
  background: rgba(124, 184, 63, 0.08);
}

.detail-row td {
  padding: 4px 10px 16px;
  background: rgba(42, 24, 16, 0.02);
  white-space: normal;
}

.detail-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 20px;
  white-space: normal;
}

.detail-grid dt {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.detail-grid dd {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: var(--ink);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  word-break: break-word;
}

#btn-load-more {
  margin-top: 14px;
}

.table-note {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.dash-empty {
  color: var(--ink-soft);
  font-size: 0.9rem;
  padding: 8px 2px;
}

@media (max-width: 640px) {
  .attempts-table {
    font-size: 0.78rem;
  }
}
