/* ===========================================================
   PORTAL — design tokens
   =========================================================== */
:root{
  --ink: #0A0E0C;
  --panel: #12181A;
  --panel-2: #171F1C;
  --line: #263029;
  --line-soft: #1B2320;
  --text: #ECEFEA;
  --muted: #8B968E;
  --muted-dim: #5E6862;
  --amber: #E3A53D;
  --amber-dim: #8A6A31;
  --green: #5FA97A;
  --red: #C9614F;

  --font-display: 'Sora', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  --radius: 3px;
  --container: 1180px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4{ margin:0; font-weight: 600; letter-spacing: -0.01em; }
p{ margin:0; }
a{ color: inherit; text-decoration: none; }
img,svg{ display:block; max-width:100%; }
ul{ margin:0; padding:0; list-style:none; }
code, pre, .mono{ font-family: var(--font-mono); }

::selection{ background: var(--amber); color: var(--ink); }

:focus-visible{
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
}

.wrap{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- ticker ---------- */
.ticker{
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  white-space: nowrap;
}
.ticker__track{
  display: inline-flex;
  animation: ticker-scroll 38s linear infinite;
  padding: 9px 0;
}
.ticker__track span{
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  padding: 0 22px;
  border-right: 1px solid var(--line-soft);
}
.ticker__track span b{
  color: var(--text);
  font-weight: 500;
  margin-right: 8px;
}
.ticker__track span.up{ color: var(--green); }
.ticker__track span.down{ color: var(--red); }
@keyframes ticker-scroll{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

/* ---------- header ---------- */
header.site{
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10,14,12,0.92);
  backdrop-filter: blur(8px);
}
header.site .wrap{
  height: 64px;
  display:flex;
  align-items:center;
  justify-content: space-between;
}
.logo{
  display:flex;
  align-items:center;
  gap:10px;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text);
}
.logo .mark{ width:20px; height:20px; }
.logo b{ font-weight: 600; letter-spacing: 0.01em; }
.logo span{ color: var(--muted-dim); }

nav.primary{
  display:flex;
  align-items:center;
  gap: 30px;
}
nav.primary a.navlink{
  font-size: 14px;
  color: var(--muted);
  transition: color .15s ease;
}
nav.primary a.navlink:hover{ color: var(--text); }
nav.primary a.navlink.current{ color: var(--text); }

.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-amber{ background: var(--amber); color: #1B1204; }
.btn-ghost{ background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover{ border-color: var(--muted-dim); }
.btn-sm{ font-size: 13px; padding: 7px 12px; }

/* ---------- hero ---------- */
.hero{
  padding: 76px 0 64px;
  border-bottom: 1px solid var(--line);
}
.hero__grid{
  display:grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow-line{
  display:flex;
  align-items:center;
  gap:10px;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 13px;
  margin-bottom: 22px;
}
.eyebrow-line::before{
  content:'';
  width: 7px; height:7px;
  border-radius: 50%;
  background: var(--amber);
}
.hero h1{
  font-size: 46px;
  line-height: 1.12;
  max-width: 620px;
  margin-bottom: 20px;
}
.hero p.lede{
  font-size: 17px;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 32px;
}
.hero .cta-row{ display:flex; gap:14px; margin-bottom: 40px; }

.stat-row{
  display:flex;
  gap: 36px;
  flex-wrap: wrap;
}
.stat-row .stat b{
  display:block;
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--text);
}
.stat-row .stat span{
  font-size: 12.5px;
  color: var(--muted-dim);
}

/* ---------- terminal panel ---------- */
.terminal{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.terminal__bar{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.terminal__dots{ display:flex; gap:6px; }
.terminal__dots i{
  width:8px; height:8px; border-radius:50%;
  background: var(--line);
  display:block;
}
.terminal__label{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-dim);
}
.terminal__body{ padding: 20px; }
.terminal pre{
  margin:0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  overflow-x:auto;
}
.terminal .req{ color: var(--muted); }
.terminal .key{ color: var(--green); }
.terminal .str{ color: var(--amber); }
.terminal .num{ color: #7FB0C9; }
.terminal .comment{ color: var(--muted-dim); }
.terminal__status{
  display:inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--green);
  border: 1px solid var(--green);
  padding: 1px 7px;
  border-radius: 20px;
  margin-bottom: 12px;
}

/* ---------- section shell ---------- */
section.block{ padding: 72px 0; border-bottom: 1px solid var(--line); }
.section-head{
  display:flex;
  justify-content: space-between;
  align-items:flex-end;
  gap: 24px;
  margin-bottom: 44px;
}
.section-head h2{ font-size: 30px; max-width: 480px; }
.section-head p{ color: var(--muted); max-width: 360px; font-size: 14.5px; }
.section-num{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted-dim);
}

/* ---------- endpoints list ---------- */
.endpoint-list{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
}
.endpoint{
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  display:grid;
  grid-template-columns: 100px 1fr;
  gap: 18px;
}
.endpoint:nth-child(odd){ padding-right: 40px; border-right: 1px solid var(--line); }
.endpoint:nth-child(even){ padding-left: 40px; }
.endpoint__tag{
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink);
  background: var(--amber);
  height: 22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 20px;
  align-self: start;
}
.endpoint h3{ font-size: 16px; margin-bottom: 8px; }
.endpoint p{ font-size: 14px; color: var(--muted); }
.endpoint code{ font-size: 12.5px; color: var(--muted-dim); }

/* ---------- tabs ---------- */
.tabbar{
  display:flex;
  gap: 4px;
  margin-bottom: -1px;
  position: relative;
  z-index:1;
}
.tabbar button{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom: none;
  padding: 10px 16px;
  cursor:pointer;
  border-radius: var(--radius) var(--radius) 0 0;
}
.tabbar button.active{
  color: var(--text);
  background: var(--panel-2);
}
.tabpanel{ display:none; }
.tabpanel.active{ display:block; }

/* ---------- tokenomics ---------- */
.token-grid{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.token-cell{
  background: var(--ink);
  padding: 26px;
}
.token-cell h4{
  font-size: 14px;
  color: var(--amber);
  font-family: var(--font-mono);
  margin-bottom: 10px;
}
.token-cell p{ font-size: 14px; color: var(--muted); }

.rewards-flow{
  margin-top: 40px;
  border: 1px solid var(--line);
  padding: 28px;
  background: var(--panel);
}
.rewards-flow__steps{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 22px;
}
.rf-step{ position:relative; padding-left: 22px; border-left: 2px solid var(--amber-dim); }
.rf-step b{ display:block; font-size: 13px; color: var(--text); margin-bottom:6px; }
.rf-step span{ font-size: 13px; color: var(--muted); }

/* ---------- footer ---------- */
footer.site{ padding: 48px 0 60px; }
footer.site .wrap{
  display:flex;
  justify-content: space-between;
  align-items:center;
  flex-wrap: wrap;
  gap: 20px;
}
footer.site .cols{ display:flex; gap: 56px; }
footer.site .col b{ display:block; font-size: 13px; margin-bottom: 12px; color: var(--text); }
footer.site .col a{ display:block; font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
footer.site .col a:hover{ color: var(--text); }
.fine{ font-size: 12.5px; color: var(--muted-dim); max-width: 460px; }

/* ---------- docs layout ---------- */
.docs-shell{
  display:grid;
  grid-template-columns: 250px 1fr;
  gap: 56px;
  padding: 40px 0 90px;
}
.docs-nav{
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.docs-nav .group{ margin-bottom: 26px; }
.docs-nav .group b{
  display:block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-dim);
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}
.docs-nav a{
  display:block;
  font-size: 14px;
  color: var(--muted);
  padding: 5px 0;
  border-left: 2px solid transparent;
  padding-left: 12px;
  margin-left: -13px;
}
.docs-nav a:hover{ color: var(--text); }
.docs-nav a.active{ color: var(--amber); border-left-color: var(--amber); }

.docs-content section{ margin-bottom: 64px; scroll-margin-top: 90px; }
.docs-content h2{ font-size: 26px; margin-bottom: 14px; }
.docs-content h3{ font-size: 17px; margin: 28px 0 10px; }
.docs-content p{ color: var(--muted); font-size: 14.5px; margin-bottom: 14px; max-width: 640px; }
.docs-content .lead{ font-size: 15.5px; color: var(--text); }

.param-table{ width:100%; border-collapse: collapse; margin: 18px 0 24px; font-size: 13.5px; }
.param-table th{
  text-align:left; font-family: var(--font-mono); font-weight:500;
  color: var(--muted-dim); font-size: 11.5px; padding: 8px 12px; border-bottom: 1px solid var(--line);
}
.param-table td{ padding: 10px 12px; border-bottom: 1px solid var(--line-soft); color: var(--muted); vertical-align: top; }
.param-table td:first-child{ font-family: var(--font-mono); color: var(--text); white-space:nowrap; }
.param-table td.req-y{ color: var(--amber); font-family: var(--font-mono); font-size: 12px; }

.codeblock{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 16px 0 26px;
  overflow:hidden;
}
.codeblock__head{
  display:flex; justify-content:space-between; align-items:center;
  padding: 8px 14px; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-dim);
  background: var(--panel-2);
}
.codeblock pre{ margin:0; padding: 16px; font-size: 13px; line-height:1.7; overflow-x:auto; color: var(--text); }

.badge-method{
  font-family: var(--font-mono); font-size: 11px; font-weight:600;
  padding: 2px 8px; border-radius: 3px; margin-right: 10px;
}
.badge-method.post{ background: rgba(95,169,122,0.15); color: var(--green); }
.badge-method.get{ background: rgba(127,176,201,0.15); color: #7FB0C9; }

.callout{
  border-left: 3px solid var(--amber-dim);
  background: var(--panel);
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--muted);
  margin: 18px 0 26px;
}
.callout b{ color: var(--text); }

/* mobile nav toggle (hidden desktop) */
.nav-toggle{ display:none; }

@media (max-width: 900px){
  .hero__grid{ grid-template-columns: 1fr; }
  .endpoint-list{ grid-template-columns: 1fr; }
  .endpoint:nth-child(odd){ border-right:none; padding-right:0; }
  .endpoint:nth-child(even){ padding-left:0; }
  .token-grid{ grid-template-columns: 1fr; }
  .rewards-flow__steps{ grid-template-columns: 1fr 1fr; }
  .docs-shell{ grid-template-columns: 1fr; }
  .docs-nav{ position: static; max-height:none; }
  nav.primary{ display:none; }
  .nav-toggle{ display:inline-flex; }
  .hero h1{ font-size: 34px; }
}
