
:root{
  --paper:#f3f1eb;
  --paper-2:#faf9f5;
  --ink:#20211f;
  --ink-2:#343531;
  --muted:#75756f;
  --line:#d6d2c8;
  --accent:#e2b94f;
  --accent-soft:#f4e7ba;
  --green:#457a5a;
  --shadow:0 12px 40px rgba(25,25,22,.08);
  --radius:16px;
  --max:1180px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  line-height:1.55;
}
a{color:inherit;text-decoration:none}
button{font:inherit}
.wrap{width:min(var(--max),calc(100% - 40px));margin:auto}

.site-header{
  position:sticky;
  top:0;
  z-index:30;
  width:100%;
  background:rgba(243,241,235,.58);
  backdrop-filter:blur(22px) saturate(180%);
  -webkit-backdrop-filter:blur(22px) saturate(180%);
  border-bottom:1px solid rgba(255,255,255,.48);
  box-shadow:0 8px 24px rgba(25,25,22,.08),inset 0 1px 0 rgba(255,255,255,.58);
}
.header-inner{
  min-height:70px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:900;
  letter-spacing:-.03em;
}
.brand-mark{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  flex:0 0 42px;
}
.brand-mark img{
  width:42px;
  height:42px;
  object-fit:contain;
  display:block;
}
.brand small{font-weight:700;color:var(--muted)}
.nav{
  display:flex;
  align-items:center;
  gap:24px;
  color:#4c4d48;
  font-size:14px;
}
.nav a:hover,.nav a.active{color:#000}
.nav-cta{
  border:1px solid rgba(32,33,31,.95);
  background:rgba(32,33,31,.92);
  color:white;
  padding:10px 14px;
  border-radius:9px;
  font-weight:800;
}
.menu-btn{display:none;background:none;border:0;font-size:24px;color:var(--ink)}

.hero{padding:34px 0 24px}
.hero-shell{
  background:var(--ink);
  color:white;
  border-radius:24px;
  min-height:500px;
  padding:64px;
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:50px;
  position:relative;
  overflow:hidden;
  box-shadow:var(--shadow);
}
.hero-shell:after{
  content:"";
  position:absolute;
  width:460px;height:460px;border-radius:50%;
  right:-150px;top:-160px;
  background:radial-gradient(circle,rgba(226,185,79,.26),rgba(226,185,79,.03) 55%,transparent 68%);
}
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#d7d5ce;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.12em;
}
.eyebrow .dot{width:7px;height:7px;border-radius:50%;background:var(--accent)}
.hero h1{
  font-size:clamp(54px,7vw,92px);
  line-height:.94;
  letter-spacing:-.065em;
  margin:22px 0 14px;
}
.hero h1 span{color:var(--accent)}
.hero h2{
  font-size:clamp(25px,3.3vw,38px);
  letter-spacing:-.04em;
  margin:0 0 18px;
}
.hero p{
  color:#c9c8c2;
  max-width:720px;
  font-size:18px;
  margin:0 0 28px;
}
.actions{display:flex;gap:10px;flex-wrap:wrap}
.btn{
  min-height:47px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 17px;
  border-radius:9px;
  font-weight:800;
  font-size:14px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.05);
  color:white;
}
.btn:hover{background:rgba(255,255,255,.10)}
.btn.primary{
  background:var(--accent);
  color:var(--ink);
  border-color:var(--accent);
}
.hero-side{align-self:end;position:relative;z-index:1}
.hero-note{
  border-top:1px solid rgba(255,255,255,.14);
  padding-top:18px;
  color:#c2c1bb;
  font-size:14px;
}
.hero-note strong{color:white;display:block;font-size:18px;margin-bottom:5px}
.hero-stat{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-bottom:20px;
}
.hero-stat .cell{
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  padding:16px;
  background:rgba(255,255,255,.04);
}
.hero-stat span{display:block;color:#9d9c97;font-size:11px}
.hero-stat b{display:block;font-size:21px;margin-top:4px}

.page-hero{padding:42px 0 16px}
.page-hero-box{
  background:var(--ink);
  color:white;
  border-radius:22px;
  padding:46px 50px;
  position:relative;
  overflow:hidden;
}
.page-hero-box:after{
  content:"";
  position:absolute;
  width:350px;height:350px;border-radius:50%;
  right:-120px;top:-150px;
  background:radial-gradient(circle,rgba(226,185,79,.25),transparent 68%);
}
.page-hero h1{
  margin:9px 0 10px;
  font-size:clamp(42px,6vw,68px);
  line-height:1;
  letter-spacing:-.055em;
}
.page-hero p{max-width:700px;margin:0;color:#c9c8c2;font-size:17px}

.section{padding:58px 0;border-bottom:1px solid var(--line)}
.section-head{
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:26px;
  margin-bottom:22px
}
.section-head h3{font-size:34px;letter-spacing:-.04em;margin:0}
.section-head p{margin:5px 0 0;color:var(--muted)}
.section-note{font-size:13px;color:#8c8b85}
.section-link{
  font-size:13px;
  font-weight:850;
  white-space:nowrap;
}
.section-link:hover{text-decoration:underline}

.tools-grid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:14px;
}
.tool{
  background:var(--paper-2);
  border:1px solid var(--line);
  border-radius:14px;
  padding:22px;
  min-height:220px;
  display:flex;
  flex-direction:column;
  transition:.18s ease;
}
.tool:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.tool-index{
  width:42px;height:42px;border-radius:10px;
  display:grid;place-items:center;
  background:var(--accent-soft);
  color:#5e4b17;
  font-weight:900;
  border:1px solid #d7c587;
  margin-bottom:18px;
}
.tool h4{font-size:21px;margin:0 0 7px;letter-spacing:-.025em}
.tool p{color:#666861;font-size:14px;margin:0 0 18px}
.tool a{margin-top:auto;font-size:13px;font-weight:800}

.snapshot{
  display:grid;
  grid-template-columns:1.45fr .55fr;
  gap:16px;
}
.metrics{
  background:var(--paper-2);
  border:1px solid var(--line);
  border-radius:14px;
  padding:16px;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:1px;
}
.metric{
  padding:18px;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.metric:nth-child(4n){border-right:0}
.metric:nth-last-child(-n+4){border-bottom:0}
.metric span{display:block;color:var(--muted);font-size:12px}
.metric b{display:block;font-size:20px;margin-top:5px;letter-spacing:-.025em}
.metric b.accent{color:#7f651c}
.snapshot-side{
  background:#e7e4dc;
  border:1px solid var(--line);
  border-radius:14px;
  padding:22px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.snapshot-side .big{font-size:52px;font-weight:900;letter-spacing:-.06em}
.snapshot-side p{margin:12px 0 18px;color:#5f605b;font-size:14px}
.status{display:inline-flex;align-items:center;gap:7px;color:#4d4f4b;font-size:12px}
.status-dot{width:8px;height:8px;border-radius:50%;background:var(--green)}

.market-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}
.panel{
  background:var(--paper-2);
  border:1px solid var(--line);
  border-radius:14px;
  padding:22px;
}
.panel h4{margin:0 0 14px;font-size:18px}
.price-line{display:flex;justify-content:space-between;align-items:end;gap:18px}
.price{font-size:42px;font-weight:900;letter-spacing:-.05em}
.price small{font-size:13px;color:var(--muted);display:block;font-weight:500;letter-spacing:0}
.market-mini{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
  margin-top:20px
}
.market-mini div{padding-top:12px;border-top:1px solid var(--line)}
.market-mini span{display:block;color:var(--muted);font-size:12px}
.market-mini b{font-size:16px}
.data-row{
  display:flex;
  justify-content:space-between;
  gap:18px;
  padding:11px 0;
  border-bottom:1px solid var(--line);
  font-size:13px
}
.data-row:last-child{border-bottom:0}
.data-row span{color:#6b6c66}
.data-row b{text-align:right}

.research-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px
}
.research-link{
  background:#ebe8e0;
  border:1px solid var(--line);
  border-radius:10px;
  padding:14px;
  font-size:13px;
  font-weight:800;
}
.research-link:hover{background:#e4e0d5}
.research-link small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
  font-weight:500;
}

.bottom-strip{
  margin:58px 0;
  background:var(--accent);
  color:var(--ink);
  border:2px solid var(--ink);
  border-radius:16px;
  box-shadow:0 5px 0 var(--ink);
  padding:26px 28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px
}
.bottom-strip strong{font-size:28px;letter-spacing:-.04em}
.bottom-strip p{margin:4px 0 0;color:#4a4025}
.bottom-strip a{
  white-space:nowrap;
  background:var(--ink);
  color:white;
  padding:11px 15px;
  border-radius:8px;
  font-weight:800;
  font-size:13px
}

.detail-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}
.orderbook{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
.orderbook th{
  text-align:left;
  color:var(--muted);
  padding:7px 0 10px;
  border-bottom:1px solid var(--line);
}
.orderbook th:last-child,.orderbook td:last-child{text-align:right}
.orderbook td{padding:9px 0;border-bottom:1px solid var(--line)}
.orderbook tr:last-child td{border-bottom:0}

.wealth-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0 28px;
}

footer{padding:0 0 28px;color:#87867f;font-size:12px}
.footer-row{
  padding-top:24px;
  display:flex;
  justify-content:space-between;
  gap:24px;
  flex-wrap:wrap;
}
.footer-links{display:flex;gap:18px;flex-wrap:wrap}


.tool-links{
  margin-top:auto;
  display:flex;
  flex-wrap:wrap;
  gap:8px 14px;
  align-items:center;
}
.tool-links a{
  margin-top:0;
}
.tool-links .secondary{
  color:var(--muted);
  font-weight:700;
}
.tool-links .secondary:hover{
  color:var(--ink);
}

@media(max-width:1080px){
  .tools-grid{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:980px){
  .nav{
    display:none;
    position:absolute;
    top:70px;left:20px;right:20px;
    background:rgba(250,249,245,.98);
    backdrop-filter:blur(10px) saturate(120%);
    -webkit-backdrop-filter:blur(10px) saturate(120%);
    border:1px solid rgba(32,33,31,.12);
    padding:18px;
    border-radius:14px;
    box-shadow:0 14px 36px rgba(25,25,22,.18);
    flex-direction:column;
    align-items:stretch
  }
  .nav.open{display:flex}
  .menu-btn{display:block}
  .nav-cta{display:none}
  .hero-shell{grid-template-columns:1fr;padding:44px;min-height:auto}
  .hero-side{align-self:auto}
  .snapshot{grid-template-columns:1fr}
  .metrics{grid-template-columns:repeat(2,1fr)}
  .metric{border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
  .metric:nth-child(2n){border-right:0}
  .metric:nth-last-child(-n+2){border-bottom:0}
  .market-grid,.detail-grid,.wealth-grid{grid-template-columns:1fr}
  .research-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:640px){
  .wrap{width:min(var(--max),calc(100% - 24px))}
  .hero-shell{padding:32px 24px;border-radius:16px}
  .hero p{font-size:16px}
  .actions .btn{width:100%}
  .hero-stat,.tools-grid,.metrics,.research-grid{grid-template-columns:1fr}
  .metric{border-right:0!important;border-bottom:1px solid var(--line)!important}
  .metric:last-child{border-bottom:0!important}
  .section{padding:44px 0}
  .section-head{align-items:flex-start;flex-direction:column}
  .bottom-strip{flex-direction:column;align-items:flex-start}
  .page-hero-box{padding:32px 24px}
}


/* ---------- dynamic API loading ---------- */
[data-api]{
  display:inline-block;
  min-width:2.8em;
  min-height:1em;
  vertical-align:baseline;
  transition:
    opacity .32s ease,
    transform .32s cubic-bezier(.22,.7,.28,1),
    filter .32s ease;
}

[data-api]:empty{
  position:relative;
  overflow:hidden;
  border-radius:6px;
  background:
    linear-gradient(
      100deg,
      rgba(32,33,31,.06) 18%,
      rgba(255,255,255,.48) 42%,
      rgba(32,33,31,.06) 66%
    );
  background-size:220% 100%;
  animation:apiShimmer 1.45s ease-in-out infinite;
  color:transparent;
}

.hero [data-api]:empty,
.page-hero [data-api]:empty{
  background:
    linear-gradient(
      100deg,
      rgba(255,255,255,.07) 18%,
      rgba(255,255,255,.18) 42%,
      rgba(255,255,255,.07) 66%
    );
  background-size:220% 100%;
}

[data-api]:empty::after{
  content:"\00a0\00a0\00a0\00a0\00a0";
}

[data-api].api-enter{
  opacity:0;
  transform:translateY(6px);
  filter:blur(2px);
}

[data-api].api-ready{
  opacity:1;
  transform:translateY(0);
  filter:blur(0);
}

[data-api].api-refresh{
  opacity:.36;
  transform:translateY(-2px);
}

/* Slightly wider skeletons for visually important values */
.price [data-api]:empty{min-width:5.5em}
.hero-stat [data-api]:empty{min-width:4.2em}
.metric [data-api]:empty{min-width:4.6em}

@keyframes apiShimmer{
  0%{background-position:200% 0}
  100%{background-position:-30% 0}
}

/* ---------- subtle page reveal ---------- */
.reveal{
  opacity:0;
  transform:translateY(14px);
  transition:
    opacity .62s cubic-bezier(.22,.7,.28,1),
    transform .62s cubic-bezier(.22,.7,.28,1);
  will-change:opacity,transform;
}

.reveal.reveal-visible{
  opacity:1;
  transform:translateY(0);
}

.tool,
.panel,
.snapshot-side,
.metric,
.research-link{
  transition:
    transform .20s ease,
    box-shadow .20s ease,
    border-color .20s ease,
    background-color .20s ease;
}

.tool:hover,
.panel:hover,
.snapshot-side:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 36px rgba(25,25,22,.07);
}

.metric:hover{
  background:rgba(255,255,255,.36);
}

.research-link:hover{
  transform:translateY(-1px);
}

@media (prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after{
    scroll-behavior:auto !important;
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }

  .reveal{
    opacity:1 !important;
    transform:none !important;
  }
}


/* ---------- Mined supply block refinement ---------- */
[data-api]{
  font-variant-numeric:tabular-nums lining-nums;
}

.snapshot-side .mined-supply-block{
  width:100%;
}

.snapshot-side .mined-supply-value{
  display:block;
  width:100%;
  min-width:0;
  min-height:1.02em;
  margin-top:5px;
  font-size:clamp(44px,4.3vw,56px);
  line-height:.96;
  font-weight:900;
  letter-spacing:-.055em;
  white-space:nowrap;
}

.snapshot-side .mined-supply-value:empty{
  width:72%;
  height:.96em;
  min-height:.96em;
  margin-top:8px;
  margin-bottom:4px;
  border-radius:9px;
}

.mined-progress{
  width:100%;
  height:6px;
  margin-top:14px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(32,33,31,.10);
}

.mined-progress span{
  display:block;
  width:0;
  height:100%;
  border-radius:inherit;
  background:var(--accent);
  transition:width .9s cubic-bezier(.22,.7,.28,1);
}

.hero-stat .cell b[data-api]{
  font-variant-numeric:tabular-nums lining-nums;
}

.hero-stat .cell b[data-api]:empty{
  width:68%;
  min-width:0;
  height:1.05em;
  min-height:1.05em;
  margin-top:7px;
  border-radius:6px;
}

@media(max-width:640px){
  .snapshot-side .mined-supply-value{
    font-size:48px;
  }
}


/* ---------- live API refinements ---------- */
.api-updated{
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}
.api-updated::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--green);
  box-shadow:0 0 0 3px rgba(69,122,90,.09);
}

.orderbook th:nth-child(2),
.orderbook td:nth-child(2),
.orderbook th:nth-child(3),
.orderbook td:nth-child(3){
  text-align:right;
}
.orderbook .ob-price{
  font-weight:800;
  font-variant-numeric:tabular-nums lining-nums;
}
.orderbook .ob-price.bid{color:#356d4b}
.orderbook .ob-price.ask{color:#92534d}

.orderbook tbody{
  transition:opacity .18s ease,transform .18s ease;
}
.orderbook tbody.orderbook-refresh{
  opacity:.28;
  transform:translateY(-2px);
}

.orderbook-loading td{padding:12px 0}
.orderbook-loading span{
  display:block;
  height:14px;
  border-radius:6px;
  background:
    linear-gradient(
      100deg,
      rgba(32,33,31,.06) 18%,
      rgba(255,255,255,.48) 42%,
      rgba(32,33,31,.06) 66%
    );
  background-size:220% 100%;
  animation:apiShimmer 1.45s ease-in-out infinite;
}
.orderbook-loading td:nth-child(1) span{width:58%}
.orderbook-loading td:nth-child(2) span{width:72%;margin-left:auto}
.orderbook-loading td:nth-child(3) span{width:64%;margin-left:auto}

@media(max-width:640px){
  .api-updated{white-space:normal}
  .orderbook{font-size:12px}
}


/* ---------- market links ---------- */
.chart-link{
  display:inline-flex;
  align-items:center;
  margin-left:7px;
  padding:2px 7px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.46);
  color:var(--ink);
  font-size:10px;
  line-height:1.4;
  font-weight:800;
  vertical-align:1px;
  transition:
    background-color .16s ease,
    border-color .16s ease,
    transform .16s ease;
}

.chart-link:hover{
  background:var(--accent-soft);
  border-color:#d8c27e;
  transform:translateY(-1px);
}

.market-head-actions{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:7px;
}

.exchange-link{
  font-size:12px;
  font-weight:850;
  color:var(--ink);
}

.exchange-link:hover{
  text-decoration:underline;
}

@media(max-width:640px){
  .market-head-actions{
    align-items:flex-start;
  }

  .data-row span .chart-link{
    margin-top:4px;
  }
}


/* ---------- research market / on-chain charts ---------- */
.research-data-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.research-data-card{
  min-height:190px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:20px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--paper-2);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}

.research-data-card:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadow);
}

.research-data-card.featured{
  background:#e8e5dd;
}

.research-card-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
}

.research-label{
  display:block;
  margin-bottom:5px;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.1em;
}

.research-data-card h4{
  margin:0;
  font-size:17px;
  line-height:1.25;
  letter-spacing:-.025em;
}

.research-value{
  margin-top:24px;
  font-size:28px;
  line-height:1;
  font-weight:900;
  letter-spacing:-.045em;
  font-variant-numeric:tabular-nums lining-nums;
}

.research-value[data-api]:empty{
  width:62%;
  min-width:0;
  height:1em;
  min-height:1em;
  border-radius:7px;
}

.research-unit{
  margin-top:7px;
  color:var(--muted);
  font-size:12px;
}

.research-pair{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:22px;
}

.research-pair > div{
  padding-top:12px;
  border-top:1px solid var(--line);
}

.research-pair span{
  display:block;
  color:var(--muted);
  font-size:11px;
}

.research-pair b{
  display:block;
  margin-top:4px;
  font-size:16px;
  font-variant-numeric:tabular-nums lining-nums;
}

.research-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:6px;
}

.research-action{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 9px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.5);
  color:var(--ink);
  font-size:10px;
  font-weight:850;
  white-space:nowrap;
  transition:
    background-color .15s ease,
    transform .15s ease,
    border-color .15s ease;
}

.research-action:hover{
  background:var(--accent-soft);
  border-color:#d8c27e;
  transform:translateY(-1px);
}

.research-action.primary-action{
  background:var(--ink);
  border-color:var(--ink);
  color:white;
}

.research-action.primary-action:hover{
  background:#30312e;
}

.research-subhead{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:24px;
  margin:42px 0 16px;
}

.research-subhead h4{
  margin:0;
  font-size:25px;
  letter-spacing:-.035em;
}

.research-subhead p{
  margin:4px 0 0;
  color:var(--muted);
  font-size:14px;
}

.research-description{
  margin:24px 0 0;
  color:var(--muted);
  font-size:13px;
}

.research-inline-link{
  display:inline-block;
  margin-top:12px;
  font-size:12px;
  font-weight:850;
}

.distribution-card{
  grid-column:span 2;
}

@media(max-width:980px){
  .research-data-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .distribution-card{
    grid-column:span 2;
  }
}

@media(max-width:640px){
  .research-data-grid{
    grid-template-columns:1fr;
  }

  .distribution-card{
    grid-column:auto;
  }

  .research-card-top,
  .research-subhead{
    flex-direction:column;
    align-items:flex-start;
  }

  .research-actions{
    justify-content:flex-start;
  }

  .research-pair{
    grid-template-columns:1fr;
  }
}


/* ---------- Treasury ---------- */
.treasury-source-state{
  display:flex;
  align-items:center;
  gap:15px;
  flex-wrap:wrap;
}

.treasury-summary-grid{
  display:grid;
  grid-template-columns:1.5fr .75fr .75fr;
  gap:14px;
}

.treasury-main-card{
  grid-row:span 2;
  min-height:270px;
  padding:26px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#e8e5dd;
  display:flex;
  flex-direction:column;
}

.treasury-balance{
  margin-top:10px;
  font-size:clamp(42px,5vw,68px);
  line-height:.95;
  font-weight:900;
  letter-spacing:-.06em;
  font-variant-numeric:tabular-nums lining-nums;
}

.treasury-share-row{
  margin-top:auto;
  padding-top:24px;
}

.treasury-share-row > div:first-child{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:baseline;
}

.treasury-share-row span{
  color:var(--muted);
  font-size:12px;
}

.treasury-share-row b{
  font-size:19px;
  font-variant-numeric:tabular-nums lining-nums;
}

.treasury-share-track{
  height:7px;
  margin-top:9px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(32,33,31,.10);
}

.treasury-share-track span{
  display:block;
  width:0;
  height:100%;
  background:var(--accent);
  border-radius:inherit;
  transition:width .9s cubic-bezier(.22,.7,.28,1);
}

.treasury-note{
  margin:14px 0 0;
  color:#666761;
  font-size:12px;
}

.treasury-stat-card{
  min-height:128px;
}

.treasury-stat-card h4{
  margin-bottom:12px;
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}

.treasury-stat-value{
  font-size:30px;
  line-height:1;
  font-weight:900;
  letter-spacing:-.045em;
  font-variant-numeric:tabular-nums lining-nums;
}

.treasury-stat-unit{
  display:block;
  margin-top:7px;
  color:var(--muted);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.vault-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.vault-card{
  min-height:210px;
}

.vault-head{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
}

.vault-head h4{
  margin:0;
  font-size:20px;
}

.vault-balance{
  margin-top:28px;
  font-size:29px;
  font-weight:900;
  letter-spacing:-.045em;
  font-variant-numeric:tabular-nums lining-nums;
}

.vault-address{
  margin-top:11px;
  color:var(--muted);
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:12px;
  word-break:break-all;
}

.treasury-history-tools{
  display:flex;
  align-items:center;
  gap:15px;
  flex-wrap:wrap;
}

.treasury-count{
  color:var(--muted);
  font-size:12px;
}

.treasury-filters{
  display:flex;
  gap:5px;
  padding:4px;
  border:1px solid var(--line);
  background:#e9e6de;
  border-radius:999px;
}

.treasury-filter{
  border:0;
  border-radius:999px;
  background:transparent;
  padding:6px 10px;
  color:#64655f;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}

.treasury-filter.active{
  background:var(--ink);
  color:#fff;
}

.treasury-table-shell{
  overflow-x:auto;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--paper-2);
}

.treasury-table{
  width:100%;
  border-collapse:collapse;
  min-width:790px;
  font-size:13px;
}

.treasury-table th{
  padding:13px 16px;
  text-align:left;
  color:var(--muted);
  background:#ebe8e0;
  border-bottom:1px solid var(--line);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.treasury-table th:nth-child(n+3),
.treasury-table td:nth-child(n+3){
  text-align:right;
}

.treasury-table td{
  padding:12px 16px;
  border-bottom:1px solid var(--line);
  font-variant-numeric:tabular-nums lining-nums;
}

.treasury-table tbody tr:last-child td{
  border-bottom:0;
}

.treasury-table tbody tr{
  transition:background-color .14s ease;
}

.treasury-table tbody tr:hover{
  background:#f2efe7;
}

.treasury-date{
  color:#666761;
  white-space:nowrap;
}

.treasury-side{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  padding:3px 7px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.04em;
}

.treasury-side.buy{
  color:#356d4b;
  background:rgba(69,122,90,.10);
  border:1px solid rgba(69,122,90,.18);
}

.treasury-side.sell{
  color:#92534d;
  background:rgba(146,83,77,.10);
  border:1px solid rgba(146,83,77,.18);
}

.treasury-more-wrap{
  display:flex;
  justify-content:center;
  margin-top:18px;
}

.treasury-more{
  border:1px solid var(--ink);
  border-radius:9px;
  background:transparent;
  color:var(--ink);
  padding:10px 16px;
  font-size:12px;
  font-weight:850;
  cursor:pointer;
}

.treasury-more:hover{
  background:var(--ink);
  color:#fff;
}

.treasury-loading-value:empty,
.treasury-loading-line:empty{
  display:block;
  border-radius:7px;
  background:
    linear-gradient(
      100deg,
      rgba(32,33,31,.06) 18%,
      rgba(255,255,255,.48) 42%,
      rgba(32,33,31,.06) 66%
    );
  background-size:220% 100%;
  animation:apiShimmer 1.45s ease-in-out infinite;
}

.treasury-loading-value:empty{
  width:65%;
  height:1em;
  min-height:1em;
}

.treasury-loading-line:empty{
  width:82%;
  height:13px;
}

.treasury-value-ready{
  animation:treasuryValueIn .35s cubic-bezier(.22,.7,.28,1);
}

@keyframes treasuryValueIn{
  from{opacity:0;transform:translateY(5px);filter:blur(2px)}
  to{opacity:1;transform:none;filter:none}
}

.treasury-table-loading span{
  display:block;
  height:13px;
  border-radius:5px;
  background:
    linear-gradient(
      100deg,
      rgba(32,33,31,.06) 18%,
      rgba(255,255,255,.48) 42%,
      rgba(32,33,31,.06) 66%
    );
  background-size:220% 100%;
  animation:apiShimmer 1.45s ease-in-out infinite;
}

.treasury-table-loading td:nth-child(1) span{width:80%}
.treasury-table-loading td:nth-child(2) span{width:55%}
.treasury-table-loading td:nth-child(3) span{width:70%;margin-left:auto}
.treasury-table-loading td:nth-child(4) span{width:65%;margin-left:auto}
.treasury-table-loading td:nth-child(5) span{width:72%;margin-left:auto}

@media(max-width:980px){
  .treasury-summary-grid{
    grid-template-columns:1fr 1fr;
  }

  .treasury-main-card{
    grid-column:span 2;
    grid-row:auto;
  }
}

@media(max-width:700px){
  .treasury-summary-grid,
  .vault-grid{
    grid-template-columns:1fr;
  }

  .treasury-main-card{
    grid-column:auto;
  }

  .treasury-history-head{
    align-items:flex-start;
  }

  .treasury-history-tools{
    width:100%;
    justify-content:space-between;
  }
}


/* ---------- methodology notes ---------- */
.methodology-row > span{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
}

.methodology{
  position:relative;
  display:inline-block;
}

.methodology summary{
  list-style:none;
  cursor:pointer;
  color:#6d6e68;
  font-size:10px;
  font-weight:800;
  white-space:nowrap;
  user-select:none;
}

.methodology summary::-webkit-details-marker{
  display:none;
}

.methodology summary:hover{
  color:var(--ink);
}

.methodology-popover{
  position:absolute;
  z-index:25;
  left:0;
  top:calc(100% + 8px);
  width:min(340px,calc(100vw - 40px));
  padding:12px 13px;
  border:1px solid var(--line);
  border-radius:10px;
  background:rgba(250,249,245,.98);
  box-shadow:0 12px 34px rgba(25,25,22,.12);
  color:#5e5f59;
  font-size:11px;
  line-height:1.5;
  font-weight:500;
}

.research-methodology{
  margin-top:14px;
}

.research-methodology .methodology-popover{
  left:auto;
  right:0;
}

/* ---------- homepage final CTA ---------- */
.bottom-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.bottom-actions a{
  white-space:nowrap;
  background:var(--ink);
  color:white;
  padding:11px 15px;
  border-radius:8px;
  font-weight:800;
  font-size:13px;
}

.bottom-actions a:last-child{
  background:transparent;
  color:var(--ink);
  border:1px solid var(--ink);
}

.bottom-actions a:hover{
  transform:translateY(-1px);
}

@media(max-width:640px){
  .methodology-popover{
    position:fixed;
    left:12px !important;
    right:12px !important;
    top:auto;
    bottom:18px;
    width:auto;
  }

  .bottom-actions{
    width:100%;
  }

  .bottom-actions a{
    flex:1;
    text-align:center;
  }
}
