/* Genesis learn pages: the reading pages under learn/ that explain where the
   FXN supply goes and how each part is released. They sit on the DEFXN
   product kit (vendor/defxn/defxn-product.css) and take their type from
   css/genesis.css (--font-head, --font-body), so no font name is written
   here. Every paint is a kit role token as hsl(var(--token)), so both
   themes come from the kit.

   Fold budget: each page fits within 1.6x the viewport at 1280x720. Depth
   comes from tabs and sections that open in place, never a long stack.
   Phone: the kit's gutter is 16px at 375, and nothing scrolls sideways. */

/* The main page is one screen tall and never scrolls (css/genesis.css,
   Responsive). These are reading pages: they grow with their content, up to
   the fold budget, and the footer follows them. */
[data-dx-product="genesis"] body.dx-page.l-page { height: auto; min-height: 100dvh; overflow-x: clip; }
[data-dx-product="genesis"] body.l-page #main { flex: 1 0 auto; min-height: auto; display: grid; gap: var(--sp-5); align-content: start; }
[data-dx-product="genesis"] .l-main { max-width: 1280px; padding-top: var(--sp-5); padding-bottom: var(--sp-6); }

/* The head, the 3D figure and the page list: each learn file's own head (.l-head, .l-fig) is lifted out by the app, which draws one head and
   one page list for every learn page (index.html, css/genesis-learn-view.css). Their old rules went on 2026-11-25. */
.l-meta, .dx-page :is(h2, h3).l-meta { font: 500 var(--fs-tertiary)/1.3 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: hsl(var(--text-muted)); margin: 0; }
.l-p { margin: 0; font-size: var(--fs-secondary); line-height: 1.6; color: hsl(var(--text)); max-width: 75ch; }
.l-muted { color: hsl(var(--text-muted)); }
.l-num { font-variant-numeric: tabular-nums; color: hsl(var(--text-strong)); font-weight: 600; }

/* A number that was not read: a dash, and the reason beside it. */
.l-dash { color: hsl(var(--text-muted)); font-weight: 600; }
.l-why { display: block; font-size: var(--fs-tertiary); line-height: 1.4; color: hsl(var(--text-muted)); font-weight: 400; }

/* Status tags and rule lines live in css/genesis.css, which every learn
   page loads too: the main page's Operations drawer draws the same lines. */

/* Two columns: the figure, and its facts. */
.l-split { display: grid; gap: var(--sp-6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 981px) { .l-split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; } }

/* Panels: each is the clean card (class g-card l-panel, css/genesis-home.css); this rule lays out its inside only. */
.l-panel { padding: var(--sp-5); display: grid; gap: var(--sp-4); min-width: 0; }
.l-panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.l-h2 { margin: 0; font: 800 var(--fs-primary)/1.15 var(--font-display); letter-spacing: -.025em; color: hsl(var(--text-strong)); }
.l-h3 { margin: 0; font: 700 var(--fs-secondary)/1.2 var(--font-display); letter-spacing: -.015em; color: hsl(var(--text-strong)); }

/* Facts: a label and its value, in rows. */
.l-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-4) var(--sp-5); margin: 0; }
.l-facts > div { display: grid; gap: var(--sp-1); min-width: 0; }
.l-facts dt { font: 500 var(--fs-tertiary)/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: hsl(var(--text-muted)); }
.l-facts dd { margin: 0; font: 700 var(--fs-secondary)/1.35 var(--font-display); color: hsl(var(--text-strong)); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* Tabs: the plain text tabs (class g-tabs l-tabs, each tab g-tab, css/genesis-home.css), laid out to wrap. */
.l-tabs { display: flex; flex-wrap: wrap; }
.l-tabpanel { display: grid; gap: var(--sp-4); min-width: 0; }
.l-tabpanel[hidden] { display: none; }

/* Sections that open in place. */
.l-more { display: grid; gap: var(--sp-3); }
.l-more .dx-disclosure__body { gap: var(--sp-4); }

/* Links onward. */
.l-onward { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); align-items: center; }
.l-onward a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 var(--sp-5); border: 1px solid hsl(var(--border-default)); border-radius: 999px; text-decoration: none; color: hsl(var(--text)); font: 500 var(--fs-tertiary)/1 var(--font-sans); }
.l-onward a:hover { border-color: hsl(var(--signal) / .6); color: hsl(var(--text-strong)); }
.l-onward a[href*="index.html"] { background: hsl(var(--accent)); border-color: hsl(var(--accent)); color: hsl(var(--action-ink)); font-weight: 600; order: -1; }
.l-onward a[href*="index.html"]::before { content: "←"; margin-right: var(--sp-4); }
.l-onward a[href*="index.html"]:hover { background: hsl(var(--accent-strong)); color: hsl(var(--action-ink)); }

/* Charts: inline SVG, drawn from the read. Every paint is a role token. */
.l-chart { width: 100%; height: auto; display: block; overflow: visible; }
.l-chart text { font-family: var(--font-sans); font-size: var(--fs-tertiary); fill: hsl(var(--text-muted)); }
.l-chart .l-c-strong { fill: hsl(var(--text-strong)); font-weight: 600; }
.l-chart .l-c-axis { stroke: hsl(var(--border-default)); stroke-width: 1; fill: none; }
.l-chart .l-c-grid { stroke: hsl(var(--border-subtle)); stroke-width: 1; fill: none; }
.l-chart .l-c-locked { fill: hsl(var(--nested) / .55); }
.l-chart .l-c-area { fill: hsl(var(--signal) / .3); }
.l-chart .l-c-line { stroke: hsl(var(--signal)); stroke-width: 2.25; fill: none; stroke-linejoin: round; }
.l-chart .l-c-vote { fill: url(#l-hatch); }
.l-chart .l-c-hatch { stroke: hsl(var(--reference) / .6); stroke-width: 1.5; }
.l-chart .l-c-now { stroke: hsl(var(--accent)); stroke-width: 1.5; stroke-dasharray: 4 3; }
.l-chart .l-c-pool { fill: hsl(var(--signal) / .8); }
.l-chart .l-c-safe { fill: hsl(var(--raised)); stroke: hsl(var(--border-strong)); stroke-width: 1; }
.l-chart .l-c-safe--group { fill: hsl(var(--nested)); }
.l-chart .l-c-plan { fill: none; stroke: hsl(var(--border-strong)); stroke-width: 1.5; stroke-dasharray: 5 4; }
.l-chart .l-c-phase { fill: hsl(var(--reference) / .22); stroke: hsl(var(--reference)); stroke-width: 1.5; }
.l-chart .l-c-phase--now { fill: hsl(var(--reference) / .5); }
.l-chart .l-c-bracket { stroke: hsl(var(--text-muted)); stroke-width: 1.5; fill: none; }
.l-chart a:focus-visible rect { outline: 2px solid hsl(var(--reference)); }
.l-chart .l-c-hit { fill: transparent; }
.l-chart .l-c-hit:hover + .l-c-safe, .l-chart a:hover .l-c-safe, .l-chart a:hover .l-c-pool { stroke: hsl(var(--reference)); stroke-width: 2; }

/* A chart's key: swatch and word, never colour alone. */
.l-key { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); margin: 0; padding: 0; list-style: none; font-size: var(--fs-tertiary); color: hsl(var(--text-muted)); }
.l-key li { display: inline-flex; align-items: center; gap: var(--sp-3); }
.l-sw { width: 14px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }
.l-sw--area { background: hsl(var(--signal) / .45); border-top: 2px solid hsl(var(--signal)); }
.l-sw--locked { background: hsl(var(--nested)); border: 1px solid hsl(var(--border-default)); }
.l-sw--vote { background: repeating-linear-gradient(45deg, hsl(var(--reference) / .65) 0 2px, transparent 2px 5px); border: 1px solid hsl(var(--reference) / .6); }
.l-sw--now { width: 2px; height: 12px; background: hsl(var(--accent)); }
.l-sw--pool { background: hsl(var(--signal) / .8); }
.l-sw--safe { background: hsl(var(--raised)); border: 1px solid hsl(var(--border-strong)); }

/* Overview: the parts as rows under the figure. */
.l-parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-3) var(--sp-5); }
.l-part { display: grid; align-content: start; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--sp-1) var(--sp-4); align-items: baseline; padding: var(--sp-3) 0; border-top: 1px solid hsl(var(--border-subtle)); }
.l-part__name { font-weight: 600; color: hsl(var(--text-strong)); }
.l-part__share { font-weight: 600; color: hsl(var(--text-strong)); font-variant-numeric: tabular-nums; }
.l-part__line { grid-column: 2 / -1; font-size: var(--fs-tertiary); line-height: 1.4; color: hsl(var(--text-muted)); }
.l-part__amt { grid-column: 2 / -1; font-size: var(--fs-tertiary); color: hsl(var(--text)); font-variant-numeric: tabular-nums; }
.l-part .l-sw { align-self: center; }
.l-pages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-3) var(--sp-5); }
.l-pages a { position: relative; display: grid; gap: var(--sp-2); padding: var(--sp-4) var(--sp-7) var(--sp-4) var(--sp-5); min-height: 44px; border: 1px solid hsl(var(--border-default)); border-radius: 14px; text-decoration: none; color: hsl(var(--text-strong)); background: linear-gradient(180deg, hsl(var(--raised) / .55), hsl(var(--surface) / .42)); }
.l-pages a::after { content: ""; position: absolute; top: 20px; right: 18px; width: 7px; height: 7px; border-right: 1.6px solid hsl(var(--text-muted)); border-top: 1.6px solid hsl(var(--text-muted)); transform: rotate(45deg); }
.l-pages a:hover { border-color: hsl(var(--signal) / .55); }
.l-pages a:focus-visible { outline: 2px solid hsl(var(--reference)); outline-offset: 2px; }
.l-pages__name { font: 700 var(--fs-secondary)/1.2 var(--font-display); letter-spacing: -.015em; }
.l-pages__line { font-size: var(--fs-tertiary); line-height: 1.4; color: hsl(var(--text-muted)); font-weight: 400; }

/* Vesting: the parts as tabs on the left, the open part on the right, the
   words once on the far right. */
.l-vest { display: grid; gap: var(--sp-5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 981px) { .l-vest { grid-template-columns: 240px minmax(0, 1fr); align-items: start; } }
.l-vside { display: grid; gap: var(--sp-4); min-width: 0; }
.l-vtabs { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
@media (min-width: 981px) { .l-vtabs { flex-direction: column; flex-wrap: nowrap; } }
.l-vbody { display: grid; gap: var(--sp-5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) {
  .l-vbody { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-areas: "fig limits" "when limits"; align-items: start; }
  .l-vbody > .l-vfig { grid-area: fig; }
  .l-vbody > .l-vwhen { grid-area: when; }
  .l-vbody > .l-vlimits { grid-area: limits; }
}
.l-vfig { display: grid; gap: var(--sp-4); min-width: 0; }
.l-words-box > summary { font-size: var(--fs-secondary); }
.l-words-box .l-words { padding-top: 0; }
.l-vtab {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 var(--sp-3); align-items: baseline; text-align: left;
  min-height: 44px; padding: var(--sp-3) var(--sp-4); border-radius: 12px; border: 1px solid transparent;
  background: transparent; color: hsl(var(--text)); font: 600 var(--fs-secondary)/1.3 var(--font-sans); cursor: pointer;
}
.l-vtab:hover { border-color: hsl(var(--border-strong)); color: hsl(var(--text-strong)); }
.l-vtab[aria-selected="true"] { background: hsl(var(--signal) / .14); border-color: hsl(var(--signal) / .5); color: hsl(var(--text-strong)); }
.l-vtab:focus-visible { outline: 2px solid hsl(var(--reference)); outline-offset: 2px; }
.l-vtab__share { font-weight: 400; font-size: var(--fs-tertiary); color: inherit; font-variant-numeric: tabular-nums; }
.l-vtab__group { font-weight: 400; font-size: var(--fs-tertiary); color: hsl(var(--text-muted)); }
.l-vtab__name { display: inline-flex; gap: var(--sp-3); align-items: baseline; flex-wrap: wrap; }
.l-words { display: grid; gap: var(--sp-3); margin: 0; }
.l-words > div { font-size: var(--fs-tertiary); line-height: 1.45; color: hsl(var(--text-muted)); }
.l-words dt { display: inline; font-weight: 600; color: hsl(var(--text-strong)); }
.l-words dt .l-tag { font-size: var(--fs-tertiary); padding: 0 var(--sp-3); margin-left: var(--sp-2); }
.l-words dd { display: inline; margin: 0; }

/* Mining: payouts in a capped list that scrolls in its panel. */
/* No scroll box in a card (owner 2026-11-25): the first six payouts at full height, "Show all" (learn/mining.js) opens the rest. */
.l-pays { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.l-pays:not([data-all]) > li:nth-child(n+7) { display: none; }
.l-pays li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--sp-1) var(--sp-4); padding: var(--sp-3) 0; border-top: 1px solid hsl(var(--border-subtle)); font-size: var(--fs-tertiary); font-variant-numeric: tabular-nums; }
.l-pays .l-cid { grid-column: 1 / -1; color: hsl(var(--text-muted)); overflow-wrap: anywhere; }
.l-splitbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: hsl(var(--nested)); gap: var(--sp-1); }
.l-splitbar > span { display: block; height: 100%; }
.l-splitbar__a { background: hsl(var(--signal) / .8); }
.l-splitbar__b { background: hsl(var(--signal) / .35); }

/* Tables: the phase list and a safe's movements. */
.l-table-wrap { max-width: 100%; overflow-x: auto; }
.l-table { width: 100%; border-collapse: collapse; font-size: var(--fs-secondary); font-variant-numeric: tabular-nums; }
.l-table th { text-align: left; font: 500 var(--fs-tertiary)/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: hsl(var(--text-muted)); padding: var(--sp-3) var(--sp-3) var(--sp-3) 0; border-bottom: 1px solid hsl(var(--border-default)); }
.l-table td { padding: var(--sp-3) var(--sp-3) var(--sp-3) 0; border-bottom: 1px solid hsl(var(--border-subtle)); color: hsl(var(--text)); vertical-align: top; }

/* Safes: the spend path as one figure. */
.l-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); grid-template-columns: minmax(0, 1fr); counter-reset: flow; }
@media (min-width: 641px) { .l-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.l-flow li { counter-increment: flow; position: relative; display: grid; gap: var(--sp-2); align-content: start; padding: var(--sp-5); border: 1px solid hsl(var(--border-default)); border-radius: 14px; background: linear-gradient(180deg, hsl(var(--raised) / .55), hsl(var(--surface) / .42)); }
.l-flow li { grid-template-columns: auto minmax(0, 1fr); column-gap: var(--sp-4); }
.l-flow li::before { content: counter(flow, decimal-leading-zero); font: 500 var(--fs-tertiary)/1.6 var(--font-mono); color: hsl(var(--signal)); grid-row: span 2; }
.l-flow__what { font-weight: 600; color: hsl(var(--text-strong)); }
.l-flow__who { font-size: var(--fs-tertiary); line-height: 1.4; color: hsl(var(--text-muted)); }
.l-check { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.l-check .dx-input { flex: 1 1 260px; min-width: 0; }
.l-out { display: grid; gap: var(--sp-3); min-height: 24px; }

/* Phone: one column, the tabs scroll sideways inside their own row so the
   page never does. */
@media (max-width: 640px) {
  .l-rule { grid-template-columns: minmax(0, 1fr); }
  .l-vtabs { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: var(--sp-2); }
  .l-vtab { flex: none; }
}

/* Rules inside a tab panel sit in two columns on a wide screen. */
@media (min-width: 981px) {
  .l-tabpanel > .l-rules, .l-caps { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sp-6); }
  .l-caps { display: grid; row-gap: var(--sp-4); }
}

/* Phone parts as tabs (learn.js mountPhoneTabs). */
.l-phone-hidden { display: none !important; }
.l-phonetabs { width: 100%; }

/* A column that stacks two parts (mining: the curve, then its rules). */
.l-col { display: grid; gap: var(--sp-5); min-width: 0; align-content: start; }
@media (min-width: 981px) { .l-split .l-tabpanel > .l-rules { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .l-panel { padding: var(--sp-4); }
  .l-part { padding: var(--sp-3) 0; }
}

/* Overview: the parts grouped by band (public, team, operations). Public is
   the widest column, as it is the largest band. */
.l-bands { display: grid; gap: var(--sp-5) var(--sp-6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 981px) {
  .l-bands { grid-template-columns: minmax(0, 3fr) minmax(0, 1.15fr) minmax(0, 1.15fr); align-items: start; }
  .l-band--public .l-parts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .l-pages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .l-pages a { padding: var(--sp-3) var(--sp-4); }
}
.l-band { display: grid; gap: var(--sp-3); min-width: 0; }
.dx-page h3.l-band__head, .l-band__head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); margin: 0; font: 500 var(--fs-tertiary)/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: hsl(var(--signal)); }
.l-band__share { color: hsl(var(--text-muted)); font-variant-numeric: tabular-nums; }
.l-band .l-parts { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.l-chart .l-c-safe--public { fill: hsl(var(--signal) / .3); stroke: hsl(var(--signal) / .7); }

/* Operations and Threats: rule tables that keep each line's status beside it. */
.l-threats { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.l-threat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 120px; gap: var(--sp-2) var(--sp-5); padding: var(--sp-4) 0; border-top: 1px solid hsl(var(--border-subtle)); align-items: start; }
.l-threat__harm { margin: 0; font-size: var(--fs-secondary); line-height: 1.45; color: hsl(var(--text-strong)); }
.l-threat__rule { margin: 0; font-size: var(--fs-secondary); line-height: 1.45; color: hsl(var(--text)); }
.l-threat__now, .l-threat__where { display: block; font-size: var(--fs-tertiary); line-height: 1.4; color: hsl(var(--text-muted)); }
.l-threat > .l-tag { justify-self: start; }
.l-threats__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 120px; gap: var(--sp-5); padding-bottom: var(--sp-3); }
.l-threats__head span { font: 500 var(--fs-tertiary)/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: hsl(var(--text-muted)); }
.l-count { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-4); align-items: center; margin: 0; padding: 0; list-style: none; font-size: var(--fs-tertiary); color: hsl(var(--text-muted)); }
.l-count li { display: inline-flex; gap: var(--sp-3); align-items: center; }
@media (max-width: 980px) {
  .l-threats__head { display: none; }
  .l-threat { grid-template-columns: minmax(0, 1fr); }
  .l-threat > .l-tag { grid-row: 1; }
}
/* A phone folds each threat to its words and its status; it opens to the rule. */
.l-threat--fold { display: block; padding: 0; }
.l-threats > li:has(> .l-threat--fold) { border-top: 1px solid hsl(var(--border-subtle)); }
.l-threat__sum { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-4); align-items: start; padding: var(--sp-4) 0; cursor: pointer; list-style: none; min-height: 44px; }
.l-threat__sum::-webkit-details-marker { display: none; }
.l-threat--fold .l-threat__rule { padding: 0 0 var(--sp-4); }
.l-rule__where, .l-threat__now { overflow-wrap: anywhere; }

/* Disclosures on the learn pages are glass panels too (audit L-31). */
.l-page .dx-disclosure { border: 1px solid hsl(var(--border-default)); border-radius: 14px; background: linear-gradient(180deg, hsl(var(--raised) / .5), hsl(var(--surface) / .4)); }
.l-page .dx-disclosure > summary { font: 600 var(--fs-secondary)/1.3 var(--font-sans); }
/* A tag beside a name keeps its own line, never over the name (audit L-12). */
.l-part__name { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2) var(--sp-3); }
.l-part .l-tag { white-space: nowrap; }
/* Section labels between panels (audit L-13). */
.l-more > .l-meta, .l-page main > .l-meta { margin-top: var(--sp-3); }
/* The footer on a reading page carries the same flow line as the main page. */
.l-page .dx-foot { border-top: 1px solid hsl(var(--border-subtle)); }
/* Links inside the copy take the signal, and underline only on hover. */
.l-page .l-p a, .l-page .l-rule a, .l-page .l-why a { color: hsl(var(--reference)); text-decoration-color: hsl(var(--reference) / .4); }
