/* Attentia underlying tracker — Pangea Wealth skin, dark (white-on-green)
   Palette + Montserrat lifted from pangeawealth.org's Avada theme:
   #121c13 / #1f2326 / #2e592a / #65bc7b / #9fce64 / #8c8989 / #f6f6f6 */

:root {
  --bg: #0e1510;
  --panel: #151f17;
  --panel-2: #1b271d;
  --line: rgba(246, 246, 246, 0.07);
  --line-strong: rgba(246, 246, 246, 0.15);
  --text: #eef2ea;
  --muted: #a3b09e;
  --faint: #71806f;
  --gold: #9fce64;           /* primary accent: Pangea bright green */
  --deep: #2e592a;           /* Pangea forest green */
  --mid: #65bc7b;            /* Pangea medium green */
  --up: #65bc7b;
  --down: #e2605c;
  --openai: #1ec99b;
  --spacex: #7da7f0;
  --anthropic: #e08a5e;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Montserrat", "Helvetica Neue", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

/* atmosphere: deep green washes + grain */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(159, 206, 100, 0.08), transparent 60%),
    radial-gradient(820px 460px at 88% -4%, rgba(101, 188, 123, 0.06), transparent 60%),
    radial-gradient(640px 420px at 50% 110%, rgba(46, 89, 42, 0.22), transparent 60%);
}
.bg-fx::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 28px 64px;
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--deep);
}

.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.brand {
  font-family: var(--sans);
  font-weight: 275;
  font-size: clamp(40px, 6.5vw, 64px);
  line-height: 0.98;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}
.brand .tm {
  font-size: 0.3em;
  vertical-align: super;
  color: var(--faint);
  margin-left: 2px;
  letter-spacing: 0;
}

.mast-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.mast-right {
  text-align: right;
  flex-shrink: 0;
}

.live-line {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mid);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(101, 188, 123, 0.55); }
  55% { box-shadow: 0 0 0 7px rgba(101, 188, 123, 0); }
}

/* showing build-time snapshot data, live fetch still in flight */
.live-dot.warm {
  background: var(--faint);
  animation: pulse-warm 1.4s ease-in-out infinite;
}
@keyframes pulse-warm {
  0%, 100% { box-shadow: 0 0 0 0 rgba(113, 128, 111, 0.5); }
  55% { box-shadow: 0 0 0 7px rgba(113, 128, 111, 0); }
}

.mast-mults {
  display: flex;
  gap: 26px;
  justify-content: flex-end;
  align-items: baseline;
}

.mast-mult {
  font-family: var(--sans);
  font-size: 52px;
  font-weight: 250;
  color: var(--gold);
  line-height: 1.05;
  margin-top: 8px;
}
.mast-mult.net { color: var(--mid); }
.mast-mult-sub {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.error-bar {
  margin-top: 14px;
  padding: 8px 14px;
  border: 1px solid rgba(226, 96, 92, 0.4);
  background: rgba(226, 96, 92, 0.08);
  color: var(--down);
  font-size: 11px;
}

/* ---------- ticker ---------- */

.ticker {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-top: none;
  background: var(--panel);
}

.tick {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 18px;
  border-right: 1px solid var(--line);
  flex: 1 1 auto;
}
.tick:last-child { border-right: none; }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  align-self: center;
}

.tick-name {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.tick-px { font-family: var(--mono); font-weight: 600; font-size: 15px; }
.tick-chg { font-family: var(--mono); font-size: 11px; }
.tick-vol { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.fxcell { justify-content: flex-end; flex-grow: 0; }

.up { color: var(--up); }
.down { color: var(--down); }
.gold { color: var(--gold); }

/* ---------- panels & grid ---------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
}

.grid-main {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 14px;
  margin-top: 14px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 12px;
}

.panel-head h2 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}
.panel-sub {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 500;
  color: var(--faint);
}

.legend { display: flex; gap: 14px; }
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* pan-y lets the browser scroll the page vertically over the chart;
   horizontal/pinch gestures still reach lightweight-charts */
.chart { width: 100%; touch-action: pan-y; }
.hero .chart { height: 380px; }

.chart-wrap { position: relative; }

.chart-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}

.spin {
  width: 14px;
  height: 14px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .spin { animation-duration: 2s; }
}

/* ---------- side: donut + sleeves ---------- */

.side { display: flex; flex-direction: column; }

.donut-wrap {
  position: relative;
  width: 170px;
  margin: 6px auto 2px;
}
.donut svg { width: 100%; transform: rotate(0.001deg); }
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.donut-center strong {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 26px;
  color: var(--text);
}
.donut-center span {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}

.sleeves { padding: 12px 18px 18px; display: flex; flex-direction: column; }

.sleeve {
  display: flex;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px dotted var(--line-strong);
}
.sleeve:first-child { border-top: none; }

.chip {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-top: 5px;
  flex-shrink: 0;
}
.sleeve-body { flex: 1; }
.sleeve-top {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 13px;
}
.sleeve-top .sleeve-val { font-family: var(--mono); }
.sleeve-sub {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- minis ---------- */

.minis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.mini-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 16px 2px;
}
.mini-id { display: flex; align-items: baseline; gap: 8px; }
.mini-id .dot { align-self: center; }
.mini-name { font-weight: 700; font-size: 14px; }
.mini-coin { font-family: var(--mono); font-size: 9px; color: var(--faint); letter-spacing: 0.08em; }
.mini-stats { display: flex; gap: 8px; align-items: baseline; font-family: var(--mono); }
.mini-px { font-weight: 600; font-size: 14px; }
.mini-chg { font-size: 11px; }
.mini-meta {
  padding: 0 16px 6px;
  font-size: 9.5px;
  color: var(--faint);
}
.mini-chart { height: 150px; }

/* ---------- calculator / term sheet ---------- */

.calc { margin-top: 14px; }

.calc-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 220px));
  gap: 14px;
  padding: 6px 18px 16px;
  border-bottom: 1px solid var(--line);
}

.calc-inputs label span:first-child {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.calc-inputs .in {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  padding: 8px 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.calc-inputs .in:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(159, 206, 100, 0.18);
}
.calc-inputs .unit { color: var(--gold); font-size: 12px; font-weight: 600; }

.calc-inputs input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.calc-inputs input[type="date"] { color-scheme: dark; }

.in-note {
  display: block;
  margin-top: 5px;
  font-size: 9.5px;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.ts { padding: 8px 18px 4px; max-width: 720px; }

.ts-section {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 18px 0 4px;
}

.ts-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
}

.ts-label { color: var(--text); white-space: nowrap; font-weight: 500; min-width: 0; }
.ts-label em {
  display: block;
  font-style: normal;
  font-size: 10px;
  font-weight: 400;
  color: var(--faint);
  white-space: normal;   /* long fee notes wrap instead of overflowing right */
}

.leader {
  flex: 1;
  border-bottom: 1px dotted rgba(246, 246, 246, 0.2);
  transform: translateY(-4px);
}

.ts-amount { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.ts-row.fee .ts-amount { color: var(--down); }
.ts-row.total { border-top: 1px solid var(--line-strong); margin-top: 4px; padding-top: 10px; }
.ts-row.total .ts-amount { color: var(--text); }
.ts-row.grand { border-top: 3px double var(--gold); margin-top: 6px; padding-top: 12px; }
.ts-row.grand .ts-label { font-weight: 700; }
.ts-row.grand .ts-amount {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 300;
  color: var(--gold);
}

.calc-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  margin-top: 18px;
}

.sum-card {
  background: var(--panel-2);
  padding: 14px 18px;
}
.sum-card span {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.sum-card strong { font-family: var(--mono); font-size: 17px; font-weight: 600; }

/* ---------- Pangea brand band ---------- */

.pangea-band {
  margin-top: 14px;
  background: var(--deep);
  border: 1px solid rgba(159, 206, 100, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
}

.pangea-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.pangea-brand img {
  height: 34px;
  width: 34px;
  display: block;
}
.pangea-word {
  font-family: var(--sans);
  color: #ffffff;
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.pangea-word b { font-weight: 700; }

.pangea-tag {
  color: rgba(255, 255, 255, 0.85);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: right;
}
.pangea-tag a { color: var(--gold); text-decoration: none; font-weight: 700; }
.pangea-tag a:hover { text-decoration: underline; }

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

.foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 10px;
  line-height: 1.7;
  max-width: 880px;
}

/* ---------- motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.reveal:nth-child(2) { animation-delay: 0.06s; }
.reveal:nth-child(3) { animation-delay: 0.12s; }
.grid-main .reveal:nth-child(2) { animation-delay: 0.18s; }
.minis .reveal:nth-child(1) { animation-delay: 0.2s; }
.minis .reveal:nth-child(2) { animation-delay: 0.26s; }
.minis .reveal:nth-child(3) { animation-delay: 0.32s; }
.calc.reveal { animation-delay: 0.3s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .live-dot { animation: none; }
}

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

@media (max-width: 960px) {
  .grid-main { grid-template-columns: 1fr; }
  .minis { grid-template-columns: 1fr; }
  .calc-inputs { grid-template-columns: 1fr; }
  .calc-summary { grid-template-columns: repeat(2, 1fr); }
  .masthead { flex-direction: column; align-items: flex-start; }
  .mast-right { text-align: left; }
  .live-line { justify-content: flex-start; }
  .mast-mults { justify-content: flex-start; }
  .pangea-band { flex-direction: column; align-items: flex-start; }
  .pangea-tag { text-align: left; }
}
