:root {
  --bg: #07090f;
  --bg-elev: #0d111a;
  --bg-panel: rgba(16, 20, 30, 0.88);
  --line: rgba(244, 242, 236, 0.08);
  --line-strong: rgba(201, 145, 124, 0.35);
  --text: #f4f2ec;
  --muted: rgba(244, 242, 236, 0.58);
  --gold: #c9917c;
  --gold-soft: rgba(201, 145, 124, 0.16);
  --hit: #34d399;
  --hit-bg: linear-gradient(135deg, #166534, #4ade80 48%, #15803d);
  --stop: #f87171;
  --stop-bg: linear-gradient(135deg, #991b1b, #f87171 48%, #b91c1c);
  --exp: #cbd5e1;
  --exp-bg: linear-gradient(135deg, #334155, #94a3b8 48%, #475569);
  --sans: "Stack Sans Notch", system-ui, sans-serif;
  --radius: 18px;
  --max: 920px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

.hidden { display: none !important; }

.pf-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.pf-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
}

.pf-glow-a {
  width: 48vw;
  height: 48vw;
  top: -18vw;
  right: -12vw;
  background: radial-gradient(circle, rgba(201, 145, 124, 0.35), transparent 70%);
  animation: pfDrift 18s ease-in-out infinite alternate;
}

.pf-glow-b {
  width: 40vw;
  height: 40vw;
  bottom: -10vw;
  left: -14vw;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.12), transparent 70%);
  animation: pfDrift 22s ease-in-out infinite alternate-reverse;
}

.pf-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(244, 242, 236, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 242, 236, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  opacity: 0.5;
}

@keyframes pfDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-3%, 4%, 0) scale(1.08); }
}

.pf-top,
.pf-main,
.pf-foot {
  position: relative;
  z-index: 1;
}

.pf-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: calc(var(--max) + 4rem);
  margin: 0 auto;
  padding: 1.25rem 1.5rem 0.5rem;
}

.pf-brand img {
  display: block;
  height: 34px;
  width: auto;
  filter: drop-shadow(0 0 18px rgba(201, 145, 124, 0.25));
}

.pf-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.86rem;
  font-weight: 600;
}

.pf-nav a { color: var(--muted); text-decoration: none; }
.pf-nav a:hover { color: var(--text); }

.pf-nav-live {
  color: #99f6e4 !important;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(45, 212, 191, 0.4);
  background: rgba(45, 212, 191, 0.12);
  font-weight: 700;
}

.pf-nav-cta {
  color: #0a0e16 !important;
  background: linear-gradient(135deg, #e2b5a3, var(--gold));
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(201, 145, 124, 0.28);
}

.pf-nav-cta:hover { text-decoration: none; filter: brightness(1.05); }

.pf-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

.pf-hero {
  padding: 2.2rem 0 1.6rem;
  animation: pfRise 0.7s ease both;
}

.pf-kicker {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.pf-hero h1 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2.1rem, 5.5vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.pf-hero h1 span {
  color: var(--gold);
}

.pf-lead {
  margin: 1.1rem 0 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.pf-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.pf-disclaimer {
  margin-top: 0.5rem;
  padding: 1.35rem 1.4rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid rgba(248, 113, 113, 0.28);
  background:
    linear-gradient(160deg, rgba(127, 29, 29, 0.22), rgba(16, 20, 30, 0.92) 45%),
    var(--bg-panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  animation: pfRise 0.8s ease 0.08s both;
}

.pf-disclaimer-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.pf-disc-mark {
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
  font-size: 0.85rem;
}

.pf-disclaimer h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.pf-disclaimer-body {
  font-size: 0.9rem;
  color: rgba(244, 242, 236, 0.78);
}

.pf-disclaimer-body p { margin: 0 0 0.75rem; }
.pf-disclaimer-body p:last-child { margin-bottom: 0; }
.pf-disclaimer-body strong { color: var(--text); font-weight: 700; }

.pf-disc-foot {
  margin-top: 0.9rem !important;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  color: var(--muted) !important;
  font-size: 0.82rem !important;
}

.pf-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0 1.75rem;
  animation: pfRise 0.85s ease 0.12s both;
}

.pf-stat {
  padding: 1rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
}

.pf-stat-val {
  display: block;
  font-family: var(--sans);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.pf-stat-lbl {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.pf-stat-hit .pf-stat-val { color: var(--hit); }
.pf-stat-stop .pf-stat-val { color: var(--stop); }
.pf-stat-exp .pf-stat-val { color: var(--exp); }

.pf-board {
  animation: pfRise 0.9s ease 0.16s both;
}

.pf-board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.pf-board-head h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pf-updated {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.pf-days {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.pf-day {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.pf-day[open] {
  border-color: var(--line-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.pf-day-sum {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1rem 1.15rem;
  user-select: none;
}

.pf-day-sum::-webkit-details-marker { display: none; }

.pf-day-date {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pf-day-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.pf-day-meta {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
}

.pf-day-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.pf-chip {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.pf-chip-hit { color: var(--hit); border-color: rgba(52, 211, 153, 0.35); background: rgba(34, 197, 94, 0.08); }
.pf-chip-stop { color: var(--stop); border-color: rgba(248, 113, 113, 0.35); background: rgba(239, 68, 68, 0.08); }
.pf-chip-exp { color: var(--exp); border-color: rgba(148, 163, 184, 0.35); background: rgba(100, 116, 139, 0.1); }

.pf-day-chev {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  font-size: 0.7rem;
}

.pf-day[open] .pf-day-chev {
  transform: rotate(180deg);
  color: var(--gold);
  border-color: var(--line-strong);
}

.pf-day-body {
  border-top: 1px solid var(--line);
  padding: 0.35rem 0.55rem 0.7rem;
}

.pf-trade {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem 0.9rem;
  align-items: center;
  padding: 0.95rem 0.85rem;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pf-trade + .pf-trade {
  border-top: 1px solid rgba(244, 242, 236, 0.05);
  margin-top: 0.15rem;
}

.pf-trade:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(201, 145, 124, 0.18);
  transform: translateY(-1px);
}

.pf-trade-id {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #2dd4bf;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.28);
  white-space: nowrap;
}

.pf-trade-main {
  min-width: 0;
}

.pf-trade-pair {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.pf-trade-sub {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.pf-dir-long { color: var(--hit); }
.pf-dir-short { color: var(--stop); }

.pf-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.4rem;
  padding: 0.52rem 0.95rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2) inset,
    0 10px 24px rgba(0, 0, 0, 0.32);
}

.pf-badge-hit { background: var(--hit-bg); }
.pf-badge-stop { background: var(--stop-bg); }
.pf-badge-exp {
  background: var(--exp-bg);
  color: #f8fafc;
  cursor: help;
}

.pf-badge[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 220px;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #121722;
  border: 1px solid rgba(201, 145, 124, 0.35);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  text-shadow: none;
  line-height: 1.35;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  z-index: 5;
}

.pf-badge[data-tip]::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(201, 145, 124, 0.55);
  opacity: 0;
  transition: opacity 0.18s ease;
  z-index: 5;
}

.pf-badge[data-tip]:hover::after,
.pf-badge[data-tip]:focus-visible::after,
.pf-badge[data-tip]:hover::before,
.pf-badge[data-tip]:focus-visible::before {
  opacity: 1;
}

.pf-badge[data-tip]:hover::after,
.pf-badge[data-tip]:focus-visible::after {
  transform: translateX(-50%) translateY(0);
}

.pf-empty,
.pf-error {
  margin: 1.5rem 0 0;
  padding: 1.4rem;
  text-align: center;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
  color: var(--muted);
}

.pf-error {
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

.pf-cta {
  margin-top: 2.5rem;
  padding: 2rem 1.5rem;
  text-align: center;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(ellipse at top, rgba(201, 145, 124, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(20, 24, 34, 0.95), rgba(10, 12, 18, 0.98));
  animation: pfRise 1s ease 0.2s both;
}

.pf-cta h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pf-cta p {
  margin: 0.55rem auto 1.25rem;
  max-width: 28rem;
  color: var(--muted);
}

.pf-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none !important;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.pf-btn:hover { transform: translateY(-1px); }

.pf-btn-primary {
  color: #0a0e16;
  background: linear-gradient(135deg, #e2b5a3, var(--gold));
  box-shadow: 0 12px 32px rgba(201, 145, 124, 0.32);
}

.pf-btn-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.pf-foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.pf-foot-brand {
  margin: 0 0 0.45rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.pf-foot p { margin: 0.35rem 0; }

@keyframes pfRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .pf-summary { grid-template-columns: repeat(2, 1fr); }

  .pf-day-sum {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "date chev"
      "side side";
  }

  .pf-day-date { grid-area: date; }
  .pf-day-chev { grid-area: chev; }
  .pf-day-side {
    grid-area: side;
    align-items: flex-start;
  }
  .pf-day-meta { text-align: left; }
  .pf-day-chips { justify-content: flex-start; }

  .pf-trade {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "id badge"
      "main main";
  }

  .pf-trade-id { grid-area: id; }
  .pf-badge { grid-area: badge; justify-self: end; }
  .pf-trade-main { grid-area: main; }
}

@media (prefers-reduced-motion: reduce) {
  .pf-glow-a,
  .pf-glow-b,
  .pf-hero,
  .pf-disclaimer,
  .pf-summary,
  .pf-board,
  .pf-cta { animation: none; }
}
