/* ============================================================
   Prime - stakedocs.css
   The Season 2 staking guide, stake/docs.html. Loaded after main.css,
   whose tokens, fonts and reset it uses. One spacing scale:
   4 8 12 16 24 32 48 64.
   ============================================================ */

.dx {
  --dx-top: 60px;
  --dx-side: 248px;
  --dx-toc: 224px;
  --dx-doc: 720px;
  --dx-text: #2A2F33;
  background: var(--card);
  color: var(--dx-text);
  font-size: 16px;
  line-height: 1.65;
}
html:has(body.dx) { scroll-padding-top: calc(var(--dx-top, 60px) + 24px); }

/* ---------- top bar ---------- */
.dx-top { position: sticky; top: 0; z-index: 50; background: var(--nav); color: #fff; }
.dx-top-in {
  height: var(--dx-top); display: flex; align-items: center; gap: 16px;
  padding: 0 var(--gx);
}
.dx-brand { display: flex; align-items: center; gap: 12px; color: #fff; flex: none; }
.dx-brand:hover { color: #fff; text-decoration: none; }
.dx-logo { height: 30px; width: auto; }
.dx-brand-t {
  font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  padding-left: 12px; border-left: 1px solid rgba(255,255,255,.22); line-height: 24px;
}
.dx-menu {
  display: none; width: 40px; height: 40px; margin-left: -8px; border-radius: var(--r-ctl);
  align-items: center; justify-content: center; color: #fff; flex: none;
}

.dx-search { position: relative; flex: 1 1 auto; max-width: 440px; margin-left: auto; }
.dx-search-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.6); pointer-events: none; }
.dx-q {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 40px; padding: 0 40px 0 40px;
  background: var(--nav-2); color: #fff; font-size: 15px;
  border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-ctl);
  outline: none; transition: border-color var(--t-micro), background var(--t-micro);
}
.dx-q::placeholder { color: rgba(255,255,255,.55); }
.dx-q::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.dx-q:focus { border-color: var(--blue-hi); background: #16213F; }
.dx-kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  min-width: 24px; height: 24px; display: grid; place-items: center;
  font: 500 12px/1 var(--mono); color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.2); border-radius: 4px;
}
.dx-q:focus + .dx-kbd, .dx-q:not(:placeholder-shown) + .dx-kbd { display: none; }

.dx-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 70;
  max-height: min(70vh, 480px); overflow: auto; padding: 8px;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--sh-pop);
}
.dx-results li { list-style: none; }
.dx-results a {
  display: block; padding: 12px; border-radius: 6px; color: var(--ink); text-decoration: none;
}
.dx-results a b { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; }
.dx-results a small { display: block; margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.dx-results a i { display: block; font-style: normal; font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.dx-results a[aria-selected="true"] { background: var(--blue-tint); }
.dx-results mark { background: none; color: var(--blue-deep); font-weight: 700; }
.dx-results .dx-none { padding: 12px; font-size: 14px; color: var(--ink-2); }

.dx-cta, .dx-side-cta, .dx-end-cta {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 16px; border-radius: var(--r-ctl);
  background: var(--blue); color: #fff; font-size: 14px; font-weight: 600; flex: none;
  transition: background var(--t-micro);
}
.dx-cta:hover, .dx-side-cta:hover, .dx-end-cta:hover { color: #fff; text-decoration: none; }
@media (hover: hover) {
  .dx-cta:hover, .dx-side-cta:hover, .dx-end-cta:hover { background: var(--blue-deep); }
  .dx-menu:hover { background: rgba(255,255,255,.08); }
}

/* ---------- three columns ---------- */
.dx-shell {
  display: grid; grid-template-columns: var(--dx-side) minmax(0, 1fr) var(--dx-toc);
  gap: 48px; max-width: 1360px; margin: 0 auto; padding: 0 var(--gx);
}
.dx-side, .dx-toc {
  position: sticky; top: var(--dx-top); align-self: start;
  max-height: calc(100vh - var(--dx-top)); overflow: auto; padding: 32px 0 48px;
}
.dx-nav { list-style: none; display: grid; gap: 4px; }
.dx-nav a {
  display: block; padding: 8px 12px; border-radius: 6px;
  font-size: 15px; font-weight: 500; color: var(--ink-2); line-height: 1.4;
}
.dx-nav a:hover { text-decoration: none; color: var(--ink); }
.dx-nav a[aria-current="true"] { background: var(--blue-tint); color: var(--blue-deep); font-weight: 600; }
@media (hover: hover) { .dx-nav a:not([aria-current="true"]):hover { background: var(--fill); } }
.dx-side-cta { display: none; margin-top: 24px; width: 100%; }

.dx-toc-t { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.dx-toc-list { list-style: none; display: grid; gap: 4px; border-left: 1px solid var(--line-soft); }
.dx-toc-list a {
  display: block; padding: 4px 0 4px 16px; margin-left: -1px; border-left: 2px solid transparent;
  font-size: 14px; color: var(--ink-2); line-height: 1.45;
}
.dx-toc-list a:hover { color: var(--ink); text-decoration: none; }
.dx-toc-list a[aria-current="true"] { color: var(--blue-deep); border-left-color: var(--blue); font-weight: 500; }

/* ---------- the content column ---------- */
.dx-main { min-width: 0; padding: 48px 0 64px; }
.dx-doc { max-width: var(--dx-doc); }
.dx-sec { padding-bottom: 48px; margin-bottom: 48px; border-bottom: 1px solid var(--line-soft); }
.dx-sec:last-of-type { border-bottom: 0; margin-bottom: 0; }

.dx-doc h1 { font-size: clamp(32px, 4.4vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -.025em; color: var(--ink); }
.dx-doc h2 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.2; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.dx-doc h3 { font-size: 19px; line-height: 1.35; font-weight: 600; letter-spacing: -.01em; color: var(--ink); margin-top: 32px; }
.dx-sec > h2:first-child { margin-bottom: 16px; }
.dx-sec > h2:not(:first-child) { margin-top: 48px; font-size: 22px; }
.dx-doc p, .dx-doc .dx-list { margin-top: 12px; }
.dx-doc h1 + .dx-lede { margin-top: 16px; }
.dx-lede { font-size: 19px; line-height: 1.6; color: var(--ink-2); }
.dx-doc b { font-weight: 600; color: var(--ink); }
.dx-doc a { color: var(--blue-deep); text-decoration: underline; text-decoration-color: var(--blue-line); text-underline-offset: 3px; }
.dx-doc a:hover { text-decoration-color: currentColor; }

/* the anchor link each heading gets from js/stakedocs.js */
.dx-h { position: relative; }
.dx-anchor {
  display: inline-grid; place-items: center; width: 28px; height: 28px; margin-left: 8px;
  vertical-align: middle; border-radius: 6px; color: var(--ink-3) !important; text-decoration: none !important;
  opacity: 0; transition: opacity var(--t-micro), color var(--t-micro), background var(--t-micro);
}
.dx-h:hover .dx-anchor, .dx-anchor:focus-visible { opacity: 1; }
@media (hover: none) { .dx-anchor { opacity: .7; } }
@media (hover: hover) { .dx-anchor:hover { color: var(--blue) !important; background: var(--blue-tint); } }
.dx-anchor.is-copied { opacity: 1; color: var(--pos) !important; }

.dx-list { padding-left: 0; display: grid; gap: 8px; }
.dx-list li { list-style: none; position: relative; padding-left: 24px; }
.dx-list li::before {
  content: ""; position: absolute; left: 6px; top: .72em; width: 6px; height: 6px;
  border-radius: 50%; background: var(--blue);
}

/* what staking earns */
.dx-earn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.dx-earn li {
  list-style: none; display: grid; gap: 12px; align-content: start;
  padding: 24px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--card);
}
.dx-earn img, .dx-earn-ic { width: 40px; height: 40px; border-radius: 50%; }
.dx-earn-ic { display: grid; place-items: center; background: var(--blue-tint); color: var(--blue); }
.dx-earn .dx-earn-amzn { box-shadow: inset 0 0 0 1px var(--line); border: 1px solid var(--line-soft); }
.dx-earn-t { display: block; font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.dx-earn p { margin-top: 4px !important; font-size: 15px; line-height: 1.55; color: var(--ink-2); }

/* a season at a glance */
.dx-time { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 24px; counter-reset: dx-step; }
.dx-time li { position: relative; padding-top: 32px; counter-increment: dx-step; }
.dx-time li::before {
  content: counter(dx-step); position: absolute; left: 0; top: 0; width: 24px; height: 24px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
}
.dx-time li::after {
  content: ""; position: absolute; left: 32px; right: -4px; top: 11px; height: 2px; background: var(--blue-line);
}
.dx-time li:last-child::after { display: none; }
.dx-time b { display: block; font-size: 15px; line-height: 1.35; }
.dx-time span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.dx-time span span { display: inline; margin: 0; }

/* example and tip panels: tinted, never white on white */
.dx-ex, .dx-tip { margin-top: 16px; padding: 16px 24px; border-radius: 10px; }
.dx-ex { background: var(--fill); }
.dx-tip { background: var(--blue-tint); }
.dx-ex p, .dx-tip p { margin-top: 0 !important; font-size: 15px; }

/* the exit cost chart */
.dx-fig { margin-top: 24px; padding: 24px; border: 1px solid var(--line-soft); border-radius: 12px; }
.dx-chart { width: 100%; height: auto; display: block; overflow: visible; }
.dx-grid line { stroke: var(--line-soft); stroke-width: 1; }
.dx-axis text, .dx-free { font: 500 13px var(--sans); fill: var(--ink-2); }
.dx-free { fill: var(--pos); font-weight: 600; }
.dx-area { fill: var(--blue-tint); }
.dx-line { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; }
.dx-line-free { stroke: var(--pos); }
.dx-drop { stroke: var(--blue-line); stroke-width: 2; stroke-dasharray: 4 4; }
.dx-dot { fill: var(--card); stroke: var(--blue); stroke-width: 3; }
.dx-dot-free { stroke: var(--pos); }

/* the streak table */
.dx-table { margin-top: 16px; overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 10px; }
.dx-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.dx-table th, .dx-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.dx-table thead th { background: var(--fill); font-weight: 600; color: var(--ink); font-size: 14px; }
.dx-table tbody tr:last-child > * { border-bottom: 0; }
.dx-table tbody th { font-weight: 600; color: var(--ink); }

/* FAQ */
.dx-faq { display: grid; margin-top: 8px; border-top: 1px solid var(--line-soft); }
.dx-faq details { border-bottom: 1px solid var(--line-soft); }
.dx-faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 16px 40px 16px 0; font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.4;
}
.dx-faq summary::-webkit-details-marker { display: none; }
.dx-faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg);
  transition: transform var(--t-micro);
}
.dx-faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.dx-faq details p { margin: 0 0 16px !important; color: var(--ink-2); }
@media (hover: hover) { .dx-faq summary:hover { color: var(--blue-deep); } }

.dx-end {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line-soft);
}
.dx-doc .dx-end-cta { color: #fff; text-decoration: none; }
.dx-end p { margin: 0 !important; font-size: 15px; color: var(--ink-2); max-width: 480px; }

.dx-scrim { display: none; }

/* ---------- widths ---------- */
/* no room for the on this page list: two columns */
@media (max-width: 1199px) {
  .dx-shell { grid-template-columns: var(--dx-side) minmax(0, 1fr); gap: 40px; }
  .dx-toc { display: none; }
}

/* tablets and phones: the sections become a drawer */
@media (max-width: 899px) {
  .dx-shell { display: block; }
  .dx-menu { display: inline-flex; }
  .dx-search { max-width: none; }
  .dx-side {
    position: fixed; z-index: 60; top: var(--dx-top); left: 0; bottom: 0;
    width: min(320px, 86vw); max-height: none; padding: 24px 16px 32px;
    background: var(--card); border-right: 1px solid var(--line);
    transform: translateX(-100%); visibility: hidden;
  }
  .dx-side.is-open { transform: none; visibility: visible; box-shadow: var(--sh-pop); }
  /* the slide runs only for the menu button, never when a window is
     resized across this width */
  .dx-side.is-anim { transition: transform 240ms var(--ease), visibility 0s linear 240ms; }
  .dx-side.is-anim.is-open { transition: transform 240ms var(--ease); }
  .dx-side-cta { display: flex; }
  .dx-scrim:not([hidden]) {
    display: block; position: fixed; inset: var(--dx-top) 0 0 0; z-index: 55; background: rgba(10,16,36,.4);
  }
  .dx-main { padding-top: 32px; }
  .dx-time { grid-template-columns: 1fr; gap: 16px; }
  .dx-time li { padding: 0 0 0 40px; }
  .dx-time li::after { left: 11px; right: auto; top: 32px; bottom: -12px; width: 2px; height: auto; }
}

@media (max-width: 720px) {
  .dx-earn { grid-template-columns: 1fr; }
  .dx-earn li { grid-template-columns: 40px minmax(0, 1fr); padding: 16px; gap: 16px; }
}

/* phones: the brand shortens and the button goes to the drawer */
@media (max-width: 599px) {
  .dx { --dx-top: 56px; }
  .dx-top-in { gap: 12px; padding: 0 16px; }
  .dx-brand-t, .dx-cta { display: none; }
  .dx-logo { height: 24px; }
  .dx-kbd { display: none; }
  .dx-q { font-size: 16px; }
  .dx-main { padding: 24px 0 48px; }
  .dx-shell { padding: 0 16px; }
  .dx-sec { padding-bottom: 32px; margin-bottom: 32px; }
  .dx-lede { font-size: 17px; }
  .dx-doc h3 { margin-top: 24px; font-size: 18px; }
  .dx-fig { padding: 16px 12px; }
  /* the chart scales down by about half here: its labels go up to match */
  .dx-axis text, .dx-free { font-size: 22px; }
  .dx-ex, .dx-tip { padding: 16px; }
  .dx-end { flex-direction: column; align-items: stretch; }
  .dx-end-cta { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .dx-side.is-anim, .dx-side.is-anim.is-open, .dx-anchor, .dx-faq summary::after { transition: none; }
}
