/* ============================================================
   Alpha Finance: long-form article furniture
   Prose, the sticky table-of-contents rail and the FAQ accordion. Shared by
   every page that ends in a written guide, so the bottom of /buy/ and the
   bottom of a data page cannot drift apart. Loaded after alpha.css and before
   any page-scoped skin.
   ============================================================ */

/* ---------- breadcrumb ----------
   Page content inside the hero, not a chrome bar above it. */

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.crumb a { color: var(--muted); transition: color 0.15s; }
.crumb a:hover { color: var(--lime); }
.crumb .sep { color: var(--faint); }
.crumb .here { color: var(--text-2); }

/* ---------- asset rail ---------- */

/* asset rail sits on the hero's bottom edge and doubles as the section rule */
.assetrail {
  position: relative;
  display: flex;
  gap: 2px;
  margin-top: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}
.assetrail::-webkit-scrollbar { display: none; }
.assetrail > a, .assetrail > span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
/* real marks, normalised to fill="currentColor" so the tile drives the colour,
   the same convention as assets/logos/icons */
.assetrail .coin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--b);
  opacity: 0.42;
  transition: opacity 0.15s;
}
.assetrail .coin svg { width: 100%; height: 100%; display: block; }
.assetrail .on .coin { opacity: 1; }
.assetrail a:hover .coin { opacity: 0.85; }

.assetrail a:hover { color: var(--text-2); border-bottom-color: var(--line-2); }
.assetrail .on { color: var(--text); border-bottom-color: var(--lime); }
/* on the live tab the small text is the ticker, not a "soon" flag */
.assetrail .on .soon { color: var(--lime-dim); }
.assetrail .soon {
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

/* ---------- long-form ---------- */

.prose { max-width: 760px; }
.prose h2 {
  font-family: var(--display);
  font-size: clamp(21px, 2.2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 46px 0 14px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 26px 0 9px;
}
.prose p {
  font-size: 15px;
  line-height: 1.68;
  color: var(--text-2);
  margin-bottom: 15px;
}
.prose a { color: var(--lime); }
.prose a:hover { text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 16px 0; padding-left: 0; list-style: none; }
.prose li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
  margin-bottom: 9px;
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 5px; height: 5px;
  background: var(--lime-dim);
}
.prose ol { counter-reset: pn; }
.prose ol li { counter-increment: pn; }
.prose ol li::before {
  content: counter(pn, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--lime-dim);
}

/* key-fact callout inside prose */
.keyfact {
  border: 1px solid var(--line);
  border-left: 2px solid var(--lime);
  border-radius: 4px;
  background: var(--panel);
  padding: 15px 18px;
  margin: 22px 0;
}
.keyfact .kf-k {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 8px;
}
.keyfact p { font-size: 14px; margin-bottom: 0; color: var(--text-2); }

/* small data table inside prose */
.minitable {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 24px;
  font-variant-numeric: tabular-nums;
}
.minitable th {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  font-weight: 500;
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--line);
}
.minitable td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  font-size: 13.5px;
  color: var(--text-2);
}
.minitable td:first-child { color: var(--text); font-weight: 500; }
.minitable .mono { font-family: var(--mono); font-size: 12.5px; }

/* ---------- layout: prose + sticky rail ---------- */

.guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: start;
}
.rail { position: sticky; top: 78px; }
.rail-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  padding: 16px 18px 18px;
  margin-bottom: 16px;
}
.rail-box h4 {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 12px;
}
.toc { list-style: none; display: flex; flex-direction: column; }
.toc a {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  padding: 7px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  transition: color 0.15s;
}
.toc li:last-child a { border-bottom: 0; }
.toc a:hover { color: var(--lime); }

.rail-sub p { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 12px; }
.rail-sub input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 8px;
}
.rail-sub input:focus { outline: none; border-color: var(--lime); }
.rail-sub .btn { width: 100%; }

/* ---------- faq ---------- */

.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color 0.15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--lime); }
.faq summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--lime);
  line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-2);
  padding: 0 0 18px 0;
  max-width: 68ch;
}
.faq details p a { color: var(--lime); }

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

@media (max-width: 1080px) {
  .guide-grid { grid-template-columns: 1fr; gap: 40px; }
  .rail { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .rail-box { margin-bottom: 0; }
}
@media (max-width: 760px) {
  .rail { grid-template-columns: 1fr; }
  .prose h2 { margin-top: 32px; }
}

/* ============================================================
   Board-era chrome. Rail and callout headings in sentence case like the
   board row labels; lime kept for live state and primary actions only.
   ============================================================ */
.rail-box h4 {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-2);
}
.keyfact .kf-k {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-2);
  margin-bottom: 8px;
}
.toc a:hover { color: var(--text); }
.crumb a:hover { color: var(--text-2); }
.faq summary:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); }
.faq summary::after { color: var(--muted); }
