@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

/*
  Light theme aligned with https://arbiway.com/.

  Design rules used here:
  - Three font weights only: 400 / 500 / 600.
  - Single 8px spacing scale via the --space-* tokens.
  - One accent (emerald) reserved for primary actions and the LISTING signal.
  - One critical (red) reserved for the DELISTING signal and errors.
  - Borders are 1px slate-200; elevation is conveyed through borders + tiny
    shadows, never large drops.
*/

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

:root {
  --bg-page: #fafbfc;
  --bg-soft: #f1f5f9;
  --bg-card: #ffffff;
  --bg-row-hover: #f8fafc;

  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --text-1: #0f172a;
  --text-2: #475569;
  --text-3: #64748b;
  --text-4: #94a3b8;

  --accent: #059669;
  --accent-strong: #047857;
  --accent-soft: #ecfdf5;
  --accent-border: #a7f3d0;

  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --danger-border: #fecaca;

  --info: #0369a1;
  --info-soft: #eff6ff;
  --info-border: #bfdbfe;

  --warn: #b45309;
  --warn-soft: #fffbeb;
  --warn-border: #fde68a;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);

  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "Consolas", monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-1);
  background-color: var(--bg-page);
  background-image:
    radial-gradient(720px 280px at 8% -8%, rgba(5, 150, 105, 0.05), transparent 60%),
    radial-gradient(720px 280px at 105% 0%, rgba(56, 189, 248, 0.05), transparent 65%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
  font-size: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) clamp(var(--space-4), 3vw, var(--space-8));
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  color: var(--text-1);
}
.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(140deg, #10b981, #047857);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 13px;
  box-shadow: var(--shadow-xs);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 13px;
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
  transition: background 0.12s;
}
.pill-btn:hover {
  background: var(--accent-strong);
  text-decoration: none;
}
.pill-btn--ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
}
.pill-btn--ghost:hover {
  background: var(--bg-soft);
  color: var(--text-1);
}

/* ----------------------------- layout ----------------------------- */

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-8) clamp(var(--space-4), 3vw, var(--space-8));
}

/* hero typography: only 3 sizes, weight 400 / 500 / 600 */
.hero {
  margin-bottom: var(--space-6);
}
.hero-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-2);
  line-height: 1.2;
  color: var(--text-1);
}
.hero-sub {
  margin: 0;
  max-width: 680px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
}
.hero-sub strong {
  font-weight: 500;
  color: var(--text-1);
}

/* ----------------------------- stats ----------------------------- */

.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.stat-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.stat-chip__label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-4);
}

.stat-chip__value {
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  color: var(--text-1);
  line-height: 1.2;
}

/* ----------------------------- toolbar (filters) ----------------------------- */

.toolbar {
  margin-top: var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-xs);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  align-items: center;
}

.filter-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-4);
  margin-inline-end: var(--space-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  color: var(--text-2);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  user-select: none;
}
.chip:hover {
  background: var(--bg-soft);
  color: var(--text-1);
}
.chip[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.chip[aria-pressed="true"]:hover {
  background: var(--accent-strong);
  color: #fff;
}
.chip[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.chip[disabled]:hover {
  background: transparent;
  color: var(--text-2);
}

.chip__count {
  font-size: 11px;
  font-weight: 500;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-3);
  padding: 1px 6px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.chip[aria-pressed="true"] .chip__count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.chip__hint {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ----------------------------- meta line ----------------------------- */

.status-line {
  font-size: 12px;
  color: var(--text-4);
  margin: var(--space-3) 0 var(--space-4);
}

/* ----------------------------- feed ----------------------------- */

.feed {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.feed-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.feed-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-1);
}

.feed-meta {
  font-size: 12px;
  color: var(--text-4);
  font-variant-numeric: tabular-nums;
}

.feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feed-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(0, 2fr) minmax(170px, 1.1fr) auto;
  gap: var(--space-3) var(--space-5);
  align-items: center;
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--border);
  transition: background 0.12s;
}
.feed-row:first-child {
  border-top: none;
}
.feed-row:hover {
  background: var(--bg-row-hover);
}

.feed-row__left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.feed-row__symbol {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  color: var(--text-1);
  letter-spacing: 0;
}

.feed-row__exchange {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  background: var(--bg-soft);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.feed-row__title {
  font-size: 13px;
  color: var(--text-2);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-row__when {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 12px;
  color: var(--text-3);
}
.feed-row__when strong {
  color: var(--text-1);
  font-weight: 500;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.feed-row__when small {
  font-size: 11px;
  color: var(--text-4);
}

.feed-row__right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* tags share one shape and weight; only color hints intent */
.tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  border: 1px solid;
}
.tag--listing {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: var(--accent-border);
}
.tag--delisting {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger-border);
}
.tag--review {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: var(--warn-border);
}
.tag--neutral {
  background: var(--bg-soft);
  color: var(--text-3);
  border-color: var(--border);
}
.tag--done {
  background: var(--info-soft);
  color: var(--info);
  border-color: var(--info-border);
}

.link-arrow {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  font-weight: 500;
}
.link-arrow:hover {
  color: var(--accent-strong);
}

.feed-empty {
  padding: var(--space-8) var(--space-5);
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}
.feed-empty strong {
  display: block;
  color: var(--text-1);
  font-size: 14px;
  margin-bottom: var(--space-1);
  font-weight: 500;
}

/* ----------------------------- error / disclaimer ----------------------------- */

.error-banner {
  display: none;
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--danger-border);
  background: var(--danger-soft);
  color: #7f1d1d;
  font-size: 13px;
}
.error-banner.is-visible {
  display: block;
}

.disclaimer {
  margin-top: var(--space-8);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
}
.disclaimer strong {
  color: var(--text-1);
  font-weight: 500;
}

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

@media (max-width: 720px) {
  .feed-row {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
  .feed-row__when {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  .feed-row__right {
    justify-content: flex-start;
  }
  .feed-row__title {
    white-space: normal;
  }
}

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