/* Evenkeel professional polish.
   Load AFTER app.css, v2.css, ek.css, and mobile-overrides.css.
   Identity is unchanged: Joint logo, v2 palette, Inter + Geist Mono.
   This file only removes template chrome (gradient CTAs, floating card
   collage, badge noise, default charts, hover-lift) and tightens type,
   radius and spacing. Colors keep AA contrast in both themes. */

/* ------------------------------------------------------------------ */
/* P0  Solid accent buttons, no mint gradient, no glow                */
/* ------------------------------------------------------------------ */
:root {
  --grad: var(--accent);
  --on-grad: #FFFFFF;
  --btn-ring: transparent;
  --glow: transparent;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 16px;
  --r-2xl: 20px;
  --shadow-card: 0 1px 1px rgba(12,24,20,.04);
  --shadow-float: 0 8px 24px -12px rgba(12,24,20,.16), 0 0 0 1px var(--line);
}
:root[data-theme="dark"] {
  --on-grad: #101614;
  --shadow-card: inset 0 1px 0 rgba(255,255,255,.03);
  --shadow-float: 0 12px 32px -16px rgba(0,0,0,.7), 0 0 0 1px var(--line);
}

.btn-primary,
.ek .btn.p,
.wallet-btn.connect,
a.btn.p,
button.btn.p {
  background: var(--accent);
  background-image: none;
  color: var(--on-grad);
  border: 1px solid transparent;
  box-shadow: none;
  filter: none;
}
.btn-primary:hover,
.ek .btn.p:hover,
.wallet-btn.connect:hover,
a.btn.p:hover {
  background: color-mix(in srgb, var(--accent) 88%, #000);
  background-image: none;
  filter: none;
  box-shadow: none;
}
:root[data-theme="dark"] .btn-primary:hover,
:root[data-theme="dark"] .ek .btn.p:hover,
:root[data-theme="dark"] .wallet-btn.connect:hover {
  background: color-mix(in srgb, var(--accent) 88%, #fff);
}

.btn-secondary,
.ek .btn.s,
a.btn.s {
  background: var(--s1);
  color: var(--text);
  border: 1px solid var(--line-2);
  box-shadow: none;
}
.btn-secondary:hover,
.ek .btn.s:hover {
  background: var(--s2);
  box-shadow: none;
}
:root[data-theme="dark"] .btn-secondary,
:root[data-theme="dark"] .ek .btn.s {
  background: var(--s2);
  border-color: var(--line-2);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  background: var(--s2);
  background-image: none;
  color: var(--text-3);
  border-color: var(--line);
  box-shadow: none;
  filter: none;
}

/* Header Connect stays quiet; Open app is the one solid accent in the bar. */
.wallet-btn.btn-primary,
.wallet-btn.btn-secondary {
  background: var(--s1);
  background-image: none;
  color: var(--text);
  border: 1px solid var(--line-2);
  box-shadow: none;
}
.wallet-btn.btn-primary:hover,
.wallet-btn:hover {
  background: var(--s2);
  filter: none;
}

/* No hover-lift. Financial UI should sit still. */
.ek .lift:hover,
.btn:not([disabled]):hover,
.ek .lift-card:hover,
.card.kpi:hover {
  transform: none;
  box-shadow: var(--shadow-card);
  filter: none;
}

/* ------------------------------------------------------------------ */
/* P0  Landing collage, mesh, floating shadows                        */
/* ------------------------------------------------------------------ */
.ek .herobg,
.herobg { display: none !important; }

/* Mini APY / hedge cards that overlap the hero chart. The stat strip
   below already carries the same numbers. */
.ek .hero-media .mini,
.ek .mini1,
.ek .mini2,
.hero-media > .hide-m { display: none !important; }

.ek .hero-grid.wrap {
  padding-top: 72px;
  padding-bottom: 56px;
  align-items: center;
}
@media (max-width: 767px) {
  .ek .hero-grid.wrap { padding-top: 28px; padding-bottom: 40px; }
}
.ek .stat-wrap { margin-top: 0; }

.ek .card.float,
.card.float {
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
}

/* ------------------------------------------------------------------ */
/* P0  Chips, badges, freshness                                       */
/* ------------------------------------------------------------------ */
/* Default chips no longer carry a status dot. Live / stale keep one. */
.chip::before,
.ek .chip::before { display: none; }
.chip.live::before,
.chip.stale::before,
.chip.bad::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  opacity: 1;
}

.chip,
.ek .chip {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  height: auto;
  min-height: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
}
.chip.live,
.ek .chip.live,
.chip.pos,
.ek .chip.pos { background: transparent; color: var(--pos); }
.chip.stale,
.chip.warn,
.ek .chip.warn { background: transparent; color: var(--warn); }
.chip.bad,
.chip.neg,
.ek .chip.neg { background: transparent; color: var(--neg); }
.chip.neu,
.ek .chip.neu,
.chip.info,
.ek .chip.info { background: transparent; color: var(--text-2); }
.chip.acc,
.ek .chip.acc { background: transparent; color: var(--accent); }

/* Pill-strip on Transparency: a quiet row of facts, not a badge bar. */
.pill-strip { gap: 14px 20px; }
.pill-strip .chip {
  height: auto;
  min-height: 0;
  padding: 0;
  font-size: 12px;
  border: 0;
  background: transparent;
  border-radius: 0;
  white-space: normal;
}

/* MODEL / ESTIMATE / EXAMPLE / SAMPLE: caption, not a gold sticker. */
.sample,
.badge-sample,
.ek .sample {
  height: auto;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 450;
}

/* ------------------------------------------------------------------ */
/* P0  Charts                                                         */
/* ------------------------------------------------------------------ */
.chart .ln-vault,
.chart path.ln-vault,
.chart .line-vault {
  stroke-width: 1.5px;
  stroke: var(--accent);
}
.chart .ln-hold,
.chart path.ln-hold,
.chart .line-hold {
  stroke-width: 1.15px;
  stroke-dasharray: 3 4;
  stroke: var(--hold);
}
.chart .grid-line,
.chart line[stroke="var(--grid)"] {
  stroke: var(--grid);
  stroke-opacity: .7;
}
.chart circle {
  r: 3px;
  stroke-width: 1.5px;
}
.chart-tip {
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 16px;
  min-width: 128px;
  font-variant-numeric: tabular-nums;
}
.chart-axis,
.chart .axis-text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ */
/* P0  Token marks, icon tiles                                        */
/* ------------------------------------------------------------------ */
.token-pill { box-shadow: none; border-color: var(--line); }
.token-pill .t-ico,
.ek .tokic,
.tok .tokic {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0;
  color: transparent;
  background-size: 20px 20px;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: none;
  overflow: hidden;
}
/* geometric token placeholders removed: official logos are <img> files in /img/tokens */

/* Generic grey icon tiles on KPI and empty states. */
.card.kpi .icotile,
.kpi .icotile,
.empty-ico {
  background: transparent;
  box-shadow: none;
  border: 0;
  width: 24px;
  height: 24px;
  border-radius: 0;
  color: var(--text-3);
  margin-bottom: 12px;
}
.ek .icotile {
  background: transparent;
  box-shadow: none;
  width: 28px;
  height: 28px;
}

/* ------------------------------------------------------------------ */
/* P0 / P1  Radius, type, numbers, focus, spacing                     */
/* ------------------------------------------------------------------ */
.card, .ek .card { border-radius: var(--r-xl); box-shadow: var(--shadow-card); }
.panel, .sub-card, .req-card, .inner, .ek .inner { border-radius: var(--r-lg); }
.tabs { border-radius: 12px; }
.tab, .seg, .seg label { border-radius: 8px; }
.banner { border-radius: 10px; }
.icon-btn { border-radius: 8px; }
.dialog, .toast { border-radius: 16px; box-shadow: var(--shadow-float); }

.v-md, .v-lg, .v-sm, .v-xl, .ek .v-md, .ek .v-lg, .ek .v-sm, .ek .v-xl,
.delta, .chip, .lm-val, .meter-row b, .chart-tip, .chart-axis,
.num, .stat-value, .kv dd {
  font-variant-numeric: tabular-nums lining-nums;
}

/* Long definition values wrap as a block, not a jagged right column. */
.kv > div {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.kv dd {
  max-width: 58%;
  text-align: right;
  line-height: 1.4;
  overflow-wrap: break-word;
}

:focus-visible,
.btn:focus-visible,
.tab:focus-visible,
.theme-btn:focus-visible,
.wallet-btn:focus-visible,
.max-btn:focus-visible,
.link-btn:focus-visible,
.icon-btn:focus-visible,
.nav-links a:focus-visible,
.seg label:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.amount:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 404 / empty pages: keep the footer at the bottom of the viewport. */
body { min-height: 100vh; display: flex; flex-direction: column; }
#main, main { flex: 1 0 auto; }
.err-page { padding: 80px 0 96px; min-height: 48vh; display: flex; flex-direction: column; justify-content: center; }

/* ------------------------------------------------------------------ */
/* P1  Banners, info slab, nested chrome, skeleton                    */
/* ------------------------------------------------------------------ */
.banner {
  background: var(--s2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--text-3);
  box-shadow: none;
}
.banner.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.banner.neg { border-left-color: var(--neg); background: var(--neg-soft); }
.banner.info { border-left-color: var(--info); background: var(--info-soft); }
.banner.ok { border-left-color: var(--pos); background: var(--pos-soft); }

/* "How hedging works today" was a pale mint slab. Quiet surface instead. */
.hedge-now,
.card.hedge-now,
#hedge-now,
section.hedge,
.ek .hedge-card {
  background: var(--s1);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.skel {
  background: var(--s3);
  background-image: none;
  animation: none;
}
.skel-lg { border-radius: 6px; }

/* Amount / receive boxes: one surface, no extra drop shadows inside. */
.amount, .recv, .ek .amount, .ek .inner {
  box-shadow: none;
  border-color: var(--line);
}

/* Nav chrome: less of a pill-in-a-tray. */
.nav-links,
.ek .pillnav {
  box-shadow: none;
  background: transparent;
  border-color: var(--line);
}
.nav-links a[aria-current="page"],
.ek .pillnav a.on {
  background: var(--s2);
  box-shadow: none;
}

.net-chip { box-shadow: none; }
.theme-btn { box-shadow: none; }

/* Limits / inner tiles already sit in a parent card: slightly flatter. */
.inner-tile, .ek .inner {
  box-shadow: none;
}

/* Dashboard empty-state CTA row already tightened by mobile-overrides.
   On desktop, keep them inline and not full width. */
.empty-actions .btn { min-width: 0; }

/* Ring / gauge when there is no short: do not pretend to be a chart. */
/* (Copy for the "None" label is a markup change.) */

/* Footer always at the end, no mid-page jump on short pages. */
.footer { margin-top: auto; }

/* ------------------------------------------------------------------ */
/* P1  Dark-theme residuals                                           */
/* ------------------------------------------------------------------ */
:root[data-theme="dark"] .btn-primary,
:root[data-theme="dark"] .ek .btn.p {
  box-shadow: none;
}

/* Closing CTA card: no gradient fill. */
.ek .cta {
  background: var(--s1);
  border: 1px solid var(--line);
}

@media (max-width: 767px) {
  .ek .hero-grid.wrap { padding-top: 28px; padding-bottom: 40px; }
  .ek .stat-wrap { margin-top: 0; }
  .err-page { padding: 48px 0 64px; min-height: 40vh; }
}

/* Transparency intro callout (was a pale mint slab). */
.card.callout {
  background: var(--s1);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

/* Data-source hint under the receive box: a caption, not a status pill. */
#dep-pv-chip,
.recv .chip.live {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 450;
}
#dep-pv-chip::before,
.recv .chip.live::before { display: none; }

/* Page-level freshness in the head: muted mono, not a green lozenge. */
.page-head .chip.live,
.page-head .chip {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  font-weight: 450;
}
.page-head .chip.live::before { background: var(--pos); }

/* KPI / how-it-works / callout icon wells */
.k-ico,
.kpi .k-ico,
.how .k-ico,
.callout .k-ico {
  background: transparent;
  box-shadow: none;
  border: 0;
  color: var(--text-3);
}
.callout .k-ico { color: var(--accent); }

/* Chips sit next to values with a real gap once the pill fill is gone. */
.chip,
.ek .chip { margin-left: 8px; }
.pill-strip .chip { margin-left: 0; }
.row .chip:first-child,
.pill-strip .chip:first-child { margin-left: 0; }

.badge-est,
.badge-sample,
.sample,
.ek .sample {
  height: auto;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 450;
}

/* Evenkeel override: token marks are the official USDC (Circle) and HYPE (Hyperliquid) logos and the
   Joint mark for shares, as <img> files in /img/tokens. Never paint the geometric placeholders under them. */
img.t-ico, img.tokic, img.tk { background: none !important; font-size: inherit; color: inherit; border-radius: 50% !important; }

/* Evenkeel primary button texture. Plain-CSS port of the cult-ui Texture Button (MIT, 21st.dev):
   a 1px top-lit gradient rim around a soft top-to-bottom fill, on the solid accent. Kept faint. */
:root { --tx-top: #137A6A; --tx-bot: #0B5F51; --tx-rim-t: #4FA595; --tx-rim-b: #084A3F; --tx-ring: rgba(4,19,15,.14); --tx-top-h: #0F6F60; --tx-bot-h: #095447; }
:root[data-theme="dark"] { --tx-top: #8DE7D0; --tx-bot: #70D4BA; --tx-rim-t: #CBF6EA; --tx-rim-b: #4DB498; --tx-ring: #000; --tx-top-h: #9DEDD8; --tx-bot-h: #7FDDC4; }
.btn-primary:not(.wallet-btn):not([disabled]):not([aria-disabled="true"]),
.ek .btn.p:not([disabled]):not([aria-disabled="true"]),
a.btn.p, button.btn.p:not([disabled]) {
  border: 1px solid transparent;
  background: linear-gradient(180deg, var(--tx-top), var(--tx-bot)) padding-box, linear-gradient(180deg, var(--tx-rim-t), var(--tx-rim-b)) border-box;
  box-shadow: 0 0 0 1px var(--tx-ring), 0 1px 2px rgba(4,19,15,.12);
}
.btn-primary:not(.wallet-btn):not([disabled]):not([aria-disabled="true"]):hover,
.ek .btn.p:not([disabled]):not([aria-disabled="true"]):hover,
a.btn.p:hover, button.btn.p:not([disabled]):hover {
  background: linear-gradient(180deg, var(--tx-top-h), var(--tx-bot-h)) padding-box, linear-gradient(180deg, var(--tx-rim-t), var(--tx-rim-b)) border-box;
}
.btn-primary:not(.wallet-btn):not([disabled]):active, .ek .btn.p:active, a.btn.p:active, button.btn.p:not([disabled]):active {
  background: linear-gradient(180deg, var(--tx-bot), var(--tx-bot)) padding-box, linear-gradient(180deg, var(--tx-rim-b), var(--tx-rim-b)) border-box;
  box-shadow: 0 0 0 1px var(--tx-ring);
}
