/* EtherFi Pulse: standalone app styles. Everything is scoped under #etherfi-pulse / .efp. */
html, body {
  margin: 0;
  min-height: 100%;
  background: #f8f6f0;
}
html[data-theme="dark"], html[data-theme="dark"] body {
  background: #0e0e0d;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

.efp {
  --efp-bg: #f8f6f0;
  --efp-bg-glow: rgba(255, 226, 190, 0.55);
  --efp-card: #ffffff;
  --efp-card-2: #fffdf8;
  --efp-ink: #0e0e0d;
  --efp-muted: rgba(14, 14, 13, 0.62);
  --efp-faint: rgba(14, 14, 13, 0.46);
  --efp-line: rgba(14, 14, 13, 0.08);
  --efp-line-strong: rgba(14, 14, 13, 0.14);
  --efp-chip: rgba(14, 14, 13, 0.05);
  --efp-up: #1f8a5b;
  --efp-down: #c2532f;
  --efp-shadow: 0 1px 2px rgba(14, 14, 13, 0.04), 0 12px 32px rgba(14, 14, 13, 0.06);
  --efp-spectrum: linear-gradient(90deg, #7a5eff 0%, #58aaff 32%, #ffd862 66%, #ff864a 100%);
  --efp-sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --efp-serif: "Instrument Serif", "Iowan Old Style", Baskerville, "Times New Roman", serif;
  --efp-max: 1120px;

  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--efp-ink);
  font-family: var(--efp-sans);
  letter-spacing: -0.01em;
  background:
    radial-gradient(ellipse 70% 60% at 100% 0%, var(--efp-bg-glow), transparent 60%),
    radial-gradient(ellipse 50% 50% at 0% 100%, rgba(122, 94, 255, 0.08), transparent 60%),
    var(--efp-bg);
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}
.efp[data-theme="dark"] {
  --efp-bg: #0e0e0d;
  --efp-bg-glow: rgba(255, 172, 92, 0.12);
  --efp-card: #151518;
  --efp-card-2: #18181b;
  --efp-ink: #ffffff;
  --efp-muted: rgba(255, 255, 255, 0.6);
  --efp-faint: rgba(255, 255, 255, 0.42);
  --efp-line: rgba(255, 255, 255, 0.08);
  --efp-line-strong: rgba(255, 255, 255, 0.16);
  --efp-chip: rgba(255, 255, 255, 0.08);
  --efp-up: #5fd39a;
  --efp-down: #ff8a63;
  --efp-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.35);
}
.efp::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: var(--efp-spectrum);
  opacity: 0.9;
}
.efp-inner {
  width: min(var(--efp-max), calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 12px;
  flex: 1 0 auto;
}
.efp a { color: inherit; }

.efp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.efp-eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--efp-faint);
}
.efp-title {
  margin: 0 0 8px;
  font-family: var(--efp-serif);
  font-weight: 400;
  font-size: clamp(38px, 7vw, 60px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--efp-ink);
}
.efp-lede {
  margin: 0;
  max-width: 34em;
  font-size: 15px;
  line-height: 1.5;
  color: var(--efp-muted);
}

.efp-toggle {
  flex: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--efp-line-strong);
  background: var(--efp-card);
  color: var(--efp-ink);
  font: 500 13px/1 var(--efp-sans);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.efp-toggle:hover { border-color: var(--efp-ink); }
.efp-toggle-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #0e0e0d;
  box-shadow: inset -5px -3px 0 0 #3a3a38;
}
.efp[data-theme="dark"] .efp-toggle-dot {
  background: radial-gradient(circle, #fffdf4 0 30%, #ffca7c 55%, rgba(255, 172, 92, 0.2) 100%);
  box-shadow: 0 0 12px rgba(255, 202, 124, 0.6);
}
.efp-toggle:focus-visible, .efp a:focus-visible {
  outline: 2px solid #7a5eff;
  outline-offset: 3px;
}

.efp-live, .efp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.efp-live { margin-bottom: 10px; }

.efp-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px 16px 14px;
  border-radius: 18px;
  background: var(--efp-card);
  border: 1px solid var(--efp-line);
  box-shadow: var(--efp-shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.3s ease;
}
.efp-stat:hover { transform: translateY(-2px); border-color: var(--efp-line-strong); }
.efp-stat p { margin: 0; }
.efp-feature {
  background:
    linear-gradient(120deg, rgba(122, 94, 255, 0.06), rgba(88, 170, 255, 0.04) 40%, rgba(255, 216, 98, 0.06) 75%, rgba(255, 134, 74, 0.07)),
    var(--efp-card-2);
}
.efp-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--efp-muted);
}
.efp-pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #58aaff;
  box-shadow: 0 0 0 0 rgba(88, 170, 255, 0.5);
  animation: efp-ping 2.4s ease-out infinite;
}
@keyframes efp-ping {
  0% { box-shadow: 0 0 0 0 rgba(88, 170, 255, 0.45); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(88, 170, 255, 0); }
}
.efp-value {
  margin-top: 10px !important;
  font-size: clamp(28px, 3.4vw, 34px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  color: var(--efp-ink);
  overflow-wrap: anywhere;
}
.efp-feature .efp-value { font-size: clamp(32px, 4.4vw, 42px); }
.efp-sub {
  margin-top: 8px !important;
  font-size: 13px;
  line-height: 1.45;
  color: var(--efp-muted);
  font-variant-numeric: tabular-nums;
}
.efp-change.is-up { color: var(--efp-up); font-weight: 500; }
.efp-change.is-down { color: var(--efp-down); font-weight: 500; }
.efp-meta {
  margin-top: auto !important;
  padding-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  font-size: 11.5px;
  color: var(--efp-faint);
}
.efp-meta a {
  color: var(--efp-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--efp-line-strong);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.efp-meta a:hover { color: var(--efp-ink); border-color: var(--efp-ink); }
.efp-meta time { font-variant-numeric: tabular-nums; }

.efp-attr {
  margin: 18px 2px 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--efp-faint);
}
.efp-attr a {
  color: var(--efp-muted);
  text-decoration: underline;
  text-decoration-color: var(--efp-line-strong);
  text-underline-offset: 2px;
}
.efp-attr a:hover { color: var(--efp-ink); text-decoration-color: currentColor; }

.efp-foot {
  width: min(var(--efp-max), calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 2px 28px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--efp-faint);
}
.efp-foot a {
  color: var(--efp-muted);
  text-decoration: underline;
  text-decoration-color: var(--efp-line-strong);
  text-underline-offset: 2px;
}
.efp-foot a:hover { color: var(--efp-ink); text-decoration-color: currentColor; }

@media (min-width: 520px) {
  .efp-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 760px) {
  .efp-inner { width: min(var(--efp-max), calc(100% - 64px)); padding-top: 48px; }
  .efp-foot { width: min(var(--efp-max), calc(100% - 64px)); padding-bottom: 40px; }
  .efp-head { margin-bottom: 28px; align-items: flex-end; }
  .efp-live { grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
  .efp-grid { gap: 14px; }
  .efp-stat { padding: 20px 20px 16px; }
}
@media (min-width: 1000px) {
  .efp-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .efp, .efp-stat, .efp-toggle, .efp-meta a { transition: none; }
  .efp-stat:hover { transform: none; }
  .efp-pulse { animation: none; }
}
