/*
 * v2.css — iSpy redesign design system (NEW_UI flag).
 * Loaded ONLY by layouts/application.html+v2.erb. Never require this from
 * application.css.scss or it will leak into the old UI.
 *
 * Aesthetic: near-black canvas, hairline white-alpha borders, one indigo
 * accent, Clash Display for display type, JetBrains Mono for technical
 * texture, white inverted primary CTAs. Restrained — no colored blobs.
 */

:root {
  --bg: #0a0a0c;
  --ink: #f4f5f7;
  --muted: #8a8d99;
  --dim: #5a5d68;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.05);
  --surface: rgba(255, 255, 255, 0.025);
  --accent: #6e72f0;
  --accent-light: #8f92f5;
  --green: #5fd08b;
  --red: #f0746a;
  --amber: #febc2e;
}

/* ---------- Base ---------- */

html.v2 {
  background: var(--bg);
}

.v2 body,
body.v2 {
  margin: 0;
  font-family: 'Satoshi', 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: -0.011em;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

body.v2 ::selection {
  background: rgba(110, 114, 240, 0.3);
}

body.v2 a {
  color: inherit;
  text-decoration: none;
}

/* v2.css loads after Tailwind, so component display rules (e.g. .modal-back
   display:flex) would otherwise beat Tailwind's .hidden. Keep .hidden
   authoritative so hidden modals/menus actually stay hidden. */
body.v2 .hidden {
  display: none !important;
}

body.v2 h1,
body.v2 h2,
body.v2 h3,
body.v2 h4 {
  margin: 0;
  color: #fff;
}

.display {
  font-family: 'Clash Display', 'Satoshi', sans-serif;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

.muted { color: var(--muted); }
.dim { color: var(--dim); }
.accent { color: var(--accent); }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow--muted { color: var(--muted); }

/* Hero underline: accent bar instead of a real underline */
.hero-h1 u,
.u-accent {
  text-decoration: none;
  position: relative;
  white-space: nowrap;
}

.hero-h1 u::after,
.u-accent::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.02em;
  height: 2px;
  background: var(--accent);
  opacity: 0.85;
}

.hero-h1 {
  font-family: 'Clash Display', 'Satoshi', sans-serif;
  font-size: clamp(2.6rem, 6.2vw, 4.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #fff;
}

.h2 {
  font-family: 'Clash Display', 'Satoshi', sans-serif;
  font-size: clamp(1.9rem, 3.7vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.lead {
  font-size: 1.14rem;
  color: var(--muted);
}

/* ---------- Layout ---------- */

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

.wrap--app {
  max-width: 1180px;
}

.wrap--narrow {
  max-width: 860px;
}

/* Single-column form pages (new/edit): header + form share one narrow,
   left-aligned column so they read as one cohesive block. */
.wrap--form {
  max-width: 640px;
}

section.block {
  padding: 96px 0;
}

@media (max-width: 720px) {
  section.block { padding: 58px 0; }
  .wrap { padding: 0 20px; }
}

/* ---------- Fixed background layers ---------- */

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(900px 500px at 50% -8%, rgba(110, 114, 240, 0.07), transparent 70%), var(--bg);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.7;
  background-image: linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.016) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 12%, #000, transparent 78%);
  mask-image: radial-gradient(ellipse 60% 50% at 50% 12%, #000, transparent 78%);
}

/* ---------- Top nav ---------- */

.nav-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  background: rgba(10, 10, 12, 0.7);
  border-bottom: 1px solid var(--line2);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 62px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  white-space: nowrap;
}

.nav-logo .glyph {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.7rem;
}

.nav-logo .tld { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  font-size: 0.88rem;
  color: var(--muted);
  transition: color 0.15s;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--ink); }

.nav-links a.active {
  color: var(--ink);
  position: relative;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -21px;
  height: 2px;
  background: var(--accent);
}

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

/* Avatar / account button */
.avatar-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.avatar-btn:hover { border-color: rgba(255, 255, 255, 0.25); }

/* Dropdown menu (account menu, context menus) */
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: #101014;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 6px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.85);
  z-index: 60;
}

.menu a,
.menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  background: none;
  border-radius: 8px;
  font-size: 0.86rem;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.menu a:hover,
.menu button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

.menu .menu-label {
  padding: 8px 12px 4px;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--dim);
}

.menu hr {
  border: none;
  border-top: 1px solid var(--line2);
  margin: 6px 4px;
}

.menu .danger { color: var(--red); }
.menu .danger:hover { background: rgba(240, 116, 106, 0.1); color: var(--red); }

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(10, 10, 12, 0.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overflow-y: auto;
  padding: 20px 24px 40px;
}

/* Explicit open state — avoids depending on toggling Tailwind's .hidden,
   which .btn/.modal display rules and the global !important reset can fight. */
.mobile-nav.open { display: block; }

.mobile-nav a,
.mobile-nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 4px;
  font-size: 1rem;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 1px solid var(--line2);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.mobile-nav a.active { color: #fff; }

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 1023px) {
  .nav-links--desktop { display: none; }
  .hamburger { display: inline-flex; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  border-radius: 9px;
  padding: 10px 20px;
  transition: transform 0.14s, background 0.2s, border-color 0.2s, opacity 0.2s, color 0.2s;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: #fff;
  color: #0a0a0c;
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: #e9e9ec;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 9px 18px;
  font-size: 0.88rem;
}

.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.2); }

.btn-accent {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(110, 114, 240, 0.45);
  border-radius: 11px;
}

.btn-accent:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: rgba(110, 114, 240, 0.08);
}

.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(240, 116, 106, 0.4);
}

.btn-danger:hover {
  border-color: var(--red);
  background: rgba(240, 116, 106, 0.08);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
  border-radius: 8px;
}

.btn[disabled],
.btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* Borderless icon button — a light secondary affordance (e.g. a row's
   kebab menu) that doesn't compete with a bordered primary button. */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  border: none;
  background: none;
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.icon-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

/* When a button is an <a>, the `body.v2 a { color: inherit }` reset outweighs
   the plain .btn-* color rules, turning primary buttons white-on-white. These
   raise the specificity so link-buttons keep their intended text color.
   Order matters: a.btn-primary must come AFTER a.btn — a primary button
   matches both selectors at equal specificity, so the later rule wins. */
body.v2 a.btn,
body.v2 a.btn-ghost,
body.v2 a.btn-accent { color: var(--ink); }
body.v2 a.btn-danger { color: var(--red); }
body.v2 a.btn-primary { color: #0a0a0c; }

/* ---------- Cards / panels ---------- */

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 20px;
}

.card--flush { padding: 0; overflow: hidden; }

.card-hover {
  transition: border-color 0.2s, transform 0.15s;
}

.card-hover:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 650;
  color: #fff;
}

/* Stat card */
.stat-key {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.stat-value {
  font-family: 'Clash Display', 'Satoshi', sans-serif;
  font-size: 1.7rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

.stat-sub {
  font-size: 0.76rem;
  color: var(--dim);
}

.stat-delta-up { color: var(--green); font-size: 0.76rem; font-weight: 600; }
.stat-delta-down { color: var(--red); font-size: 0.76rem; font-weight: 600; }

/* Divided feature grid (1px gridlines via gap trick) */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.feat-cell {
  background: var(--bg);
  padding: 32px 28px;
  transition: background 0.2s;
}

.feat-cell:hover { background: #101013; }

@media (max-width: 860px) {
  .feat-grid { grid-template-columns: 1fr; }
}

.icon-chip {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(110, 114, 240, 0.08);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.badge-success { background: rgba(63, 174, 111, 0.15); color: #5fd08b; }
.badge-accent { background: rgba(110, 114, 240, 0.15); color: #9ea0f5; }
.badge-danger { background: rgba(240, 116, 106, 0.15); color: #f0746a; }
.badge-neutral { background: rgba(255, 255, 255, 0.07); color: var(--muted); }
.badge-warning { background: rgba(250, 180, 60, 0.14); color: #febc2e; }
.badge-info { background: rgba(122, 162, 247, 0.14); color: #7aa2f7; }

/* ---------- Tables ---------- */

.tbl-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.tbl-scroll { overflow-x: auto; }

.tbl {
  width: 100%;
  border-collapse: collapse;
}

.tbl th,
.tbl td {
  text-align: left;
  padding: 11px 14px;
  font-size: 0.84rem;
  border-bottom: 1px solid var(--line2);
}

.tbl th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.02);
}

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

.tbl tbody tr { transition: background 0.12s; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

.tbl .id,
.tbl .cell-mono {
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted);
  font-size: 0.78rem;
}

/* ---------- Forms ---------- */

.field { margin-bottom: 18px; }

.field label,
.form-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 7px;
}

.input,
.field input[type='text'],
.field input[type='email'],
.field input[type='password'],
.field input[type='url'],
.field input[type='number'],
.field textarea,
.field select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  color: #d9dbe2;
  background: rgba(0, 0, 0, 0.28);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input--mono,
.field textarea {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84rem;
}

.input::placeholder,
.field input::placeholder,
.field textarea::placeholder {
  color: #4f5260;
}

.input:focus,
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(110, 114, 240, 0.55);
  box-shadow: 0 0 0 3px rgba(110, 114, 240, 0.12);
}

.field select option { background: #101014; color: var(--ink); }

.field-hint {
  font-size: 0.78rem;
  color: var(--dim);
  margin-top: 6px;
}

.field-error {
  font-size: 0.78rem;
  color: var(--red);
  margin-top: 6px;
}

/* Checkbox / toggle-ish */
body.v2 input[type='checkbox'] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* Segmented tabs */
.seg-tab {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  padding: 8px 15px;
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.seg-tab:hover { color: var(--ink); }

.seg-tab.active {
  color: var(--ink);
  border-color: rgba(110, 114, 240, 0.55);
  background: rgba(110, 114, 240, 0.1);
}

/* ---------- Flash / notices ---------- */

.notice-banner {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #14141a;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.notice-banner--success { border-color: rgba(63, 174, 111, 0.35); color: var(--green); }
.notice-banner--error { border-color: rgba(240, 116, 106, 0.35); color: var(--red); }

/* Floating toast (shared/_notification) */
.toast {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 100;
  background: #101014;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px 16px;
  font-size: 0.88rem;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 380px;
}

.toast--success { border-color: rgba(63, 174, 111, 0.4); }
.toast--error { border-color: rgba(240, 116, 106, 0.4); }

/* ---------- Modals ---------- */

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(4, 4, 6, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: #101014;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 26px 24px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-card--wide { max-width: 640px; }

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--dim);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.modal-close:hover { color: var(--ink); }

/* ---------- Charts (bespoke CSS bars) ---------- */

.spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 34px;
}

.spark span {
  flex: 1;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
  background: rgba(255, 255, 255, 0.1);
}

.spark span.hot {
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
}

.daychart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
}

.daychart .col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  gap: 5px;
  text-align: center;
}

.daychart .daybar {
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
  min-height: 2px;
}

.daychart .lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--dim);
}

/* Horizontal bar rows (referrers, top-lists) */
.hbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  font-size: 0.84rem;
}

.hbar-name {
  width: 34%;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hbar-track {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.hbar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.hbar-fill--green { background: linear-gradient(90deg, #3fae6f, var(--green)); }

.hbar-count {
  min-width: 44px;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  color: var(--muted);
}

/* ---------- Spinner / progress ---------- */

.spinner {
  width: 42px;
  height: 42px;
  border: 2.5px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: v2spin 0.8s linear infinite;
}

.spinner--sm { width: 18px; height: 18px; border-width: 2px; }

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

.progress-track {
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: v2sheen 1.5s infinite;
}

@keyframes v2sheen {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* ---------- Scroll reveal ---------- */

.rv {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.rv.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
}

/* ---------- Empty state ---------- */

.empty {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 44px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.empty .btn { margin-top: 14px; }

/* ---------- Pagination (will_paginate markup) ---------- */

body.v2 .pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.84rem;
}

body.v2 .pagination a,
body.v2 .pagination .current,
body.v2 .pagination .disabled,
body.v2 .pagination .gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.6rem;
  border-radius: 8px;
  font-weight: 500;
}

body.v2 .pagination a {
  color: var(--muted);
  border: 1px solid var(--line);
  background: transparent;
  transition: border-color 0.15s, color 0.15s;
}

body.v2 .pagination a:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.22);
}

body.v2 .pagination .current {
  color: #0a0a0c;
  background: #fff;
  font-weight: 650;
}

body.v2 .pagination .disabled {
  color: var(--dim);
  border: 1px solid var(--line2);
  cursor: not-allowed;
}

body.v2 .pagination .gap { color: var(--dim); }

/* ---------- Page header ---------- */

.page-head {
  padding: 30px 0 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.page-head h1 {
  font-family: 'Clash Display', 'Satoshi', sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.page-head .sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line2);
  padding: 56px 0 30px;
  margin-top: 40px;
}

.footer a { color: var(--muted); font-size: 0.86rem; }
.footer a:hover { color: var(--ink); }

.footer-cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
}

@media (max-width: 860px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
}

.footer h5 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--dim);
  margin: 0 0 12px;
}

.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line2);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--dim);
}

/* ---------- CTA block ---------- */

.cta-block {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 64px 40px;
  text-align: center;
  background: radial-gradient(700px 300px at 50% 0%, rgba(110, 114, 240, 0.1), transparent 70%), var(--surface);
}

/* ---------- Slider (landing live findings) ---------- */

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #101014;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.slider-arrow:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.25); }

.slider-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 0.2s;
}

.slider-dot.active { background: var(--accent); }

/* ---------- Live findings feed ---------- */

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  position: relative;
  flex-shrink: 0;
}

.live-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--green);
  animation: live-pulse 1.8s ease-out infinite;
}

@keyframes live-pulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(3.2); opacity: 0; }
}

.finding-card {
  flex-shrink: 0;
  width: 340px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s;
}

.finding-card:hover {
  border-color: rgba(110, 114, 240, 0.4);
  transform: translateY(-2px);
}

.finding-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line2);
  background: rgba(0, 0, 0, 0.25);
}

.finding-bar .dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.finding-bar .dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: block;
}

.finding-body { padding: 16px; }

.mask-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line2);
  border-radius: 6px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .live-dot::after { animation: none; }
}

/* ---------- Misc utilities ---------- */

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar { display: none; }

.divider { border: none; border-top: 1px solid var(--line2); margin: 22px 0; }

.kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.code-inline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82em;
  color: #b9a3ff;
  background: rgba(110, 114, 240, 0.08);
  border-radius: 5px;
  padding: 1px 6px;
  word-break: break-all;
}

/* Prose (static/legal pages) */
.prose-v2 h2 {
  font-family: 'Clash Display', 'Satoshi', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 34px 0 10px;
}

.prose-v2 h3 { font-size: 1.02rem; font-weight: 650; margin: 24px 0 8px; }
.prose-v2 p, .prose-v2 li { color: var(--muted); font-size: 0.94rem; }
.prose-v2 a { color: var(--accent-light); }
.prose-v2 a:hover { text-decoration: underline; }
.prose-v2 ul { padding-left: 20px; }
