/* The FXN DAO page (fxn.html): its own layout only. The look is css/fxn-govern.css (shared with treasury.defxn.com,
   byte-identical there); colour, buttons, fields, badges, refusals and the review dialog come from
   vendor/defxn/defxn-product.css (flux/defxn-product-kit, synced, never edited here). Type sizes are the scale's
   variables, declared once in fxn-govern.css. */

/* The proposals: a filter, then the list, which alone scrolls inside the lead column. */
.fd-proposals { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: var(--sp-4); }
.fd-item__state { display: inline-flex; align-items: center; gap: var(--sp-3); }
.fd-item__state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: hsl(var(--text-faint)); }
.fd-item__state[data-tone="info"]::before { background: hsl(var(--reference)); }
.fd-item__state[data-tone="warn"]::before { background: hsl(var(--warning)); }
.fd-item__state[data-tone="live"]::before { background: hsl(var(--live)); }
.fd-item__state[data-tone="danger"]::before { background: hsl(var(--danger)); }

/* The vote bar in the picked proposal: approve, reject and abstain as parts of the power, and the turnout it needs. */
.fd-tally { display: grid; gap: var(--sp-3); }
.fd-tally__bar { position: relative; display: flex; height: 8px; border-radius: 2px; overflow: hidden; background: hsl(var(--nested)); }
.fd-tally__bar > span { display: block; height: 100%; }
.fd-tally__bar > [data-part="approve"] { background: hsl(var(--primary)); }
.fd-tally__bar > [data-part="reject"] { background: hsl(var(--primary-300)); }
.fd-tally__bar > [data-part="abstain"] { background: hsl(var(--primary-100)); }
.fd-tally__need { position: absolute; top: -3px; bottom: -3px; width: 1px; background: hsl(var(--text-strong)); }
.fd-tally__bar[data-unread] { background: none; border: 1px dashed hsl(var(--border-default)); }
.fd-tally__key { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); font: 400 var(--fs-tertiary)/1.4 var(--dx-font-mono); color: hsl(var(--text-muted)); }
.fd-tally__key b { font-weight: 500; color: hsl(var(--text-strong)); }

/* The panel's tabs (Facts, Text, Discussion): drawn only when there is more than one. */
.fd-tabs { margin-top: calc(var(--sp-1) * -1); }
/* UI sweep 2026-11-13 (B2, B3): the tabs sit in the panel's head, right of the proposal's name and left of its state. The head's row is the strip's height, so the name and
   the state sit on its middle line; the strip keeps its buttons whole (it never shrinks). */
.fg-panel__head > .fd-tabs { margin: 0 0 0 auto; flex: 0 0 auto; }
.fg-panel__head > .fd-tabs + .fg-stamp { margin-left: var(--sp-2); }
.fg-panel__head > .fg-meta { min-width: 0; overflow-wrap: anywhere; }

/* Rehearsal 19 (fit items), measured in the FXN browser at 1280x720. Each rule says the number it pays.
   1. The proposal form's disclosure "Vote length, delay and the stake you need" open added 135px (Multisig members 736 in 601; spend 602 in 601) and pushed Review and sign off
      screen. Its notes now sit in a card drawn over the form, above the summary: out of flow, so the form is 601 in 601 open or closed and the button never moves. */
.fd-timing { position: relative; }
.fd-timing > .fd-timing__card { position: absolute; left: 0; right: 0; bottom: 100%; z-index: 2; margin: 0 0 var(--sp-3); padding: var(--sp-4); display: grid; gap: var(--sp-3);
  background: hsl(var(--overlay)); border: 1px solid hsl(var(--border-strong)); border-radius: var(--dx-radius); box-shadow: 0 10px 29px hsl(var(--theme-shadow, 0 0% 0% / .3)); }
/* UI sweep 2026-11-13 (B4), after the rule above: the card drawn over the form covered "Payee" and "Voting time". Open, the card now sits in the flow under its summary and the
   form steps aside (js/fxn-dao-app.mjs, the disclosure's toggle), so no field is covered and the drawer does not grow: the card is shorter than every form it replaces. */
.fd-timing > .fd-timing__card { position: static; margin: var(--sp-3) 0 0; box-shadow: none; }
/* A form hidden because the key cannot file its kind (the refusal takes its place). A grid's own display would win over the hidden attribute. */
.fg-grid[hidden] { display: none; }
/* 5. A note with no text (the "A safe's signers" disclosure held an empty paragraph, a result box and a count) takes no row and no margin. */
.fg-more > :empty { display: none; }
/* 2. The picked proposal's headline measured 37px of glyphs in a 32px box (29px x 1.12), so the tab strip under it touched the descenders. The headline's line is 1.28 (37px), 5px more. */
#detailBody > .fg-panel__name { line-height: 1.4; }
/* Rehearsal 22 (A5): 1.4 x 29px = 40.6px, so one line was 41 in 41 but two lines were 82 in 81. 41/29 is a whole 41px per line. Placed after the rule above (a test may pin that one). */
#detailBody > .fg-panel__name { line-height: calc(41 / 29); }
/* Rehearsal 20 (A5): the line was still 39 in 37. The display face's glyph area is 39px at 29px (about 1.345 x the size), taller than the 1.28 line (37px), so the glyphs
   overflowed their own box by 2px at both window sizes. A line of 1.4 (41px) holds them with 2px to spare; it costs 4px in the panel, paid back by the fact rows below. */
/* 3. The Discussion tab: the comment box's textarea kept the product's 120px minimum, so the comment list was squeezed to 27px of its 40. Two rows of text (about 70px) free about 50px;
   the empty result box takes no row and no 4px gap. */
.fd-commentbox .dx-textarea { min-height: 0; }
#detailBody > :empty { display: none; }

/* 8. The review dialog (js/ark/authorization-dialog.js, the kit's .admin-auth-* classes) scrolled inside at 1280x720: a fee proposal 681 in 676 and the second stake review 709 in 676, after
   the "Time stamp" fact added about 28px. No fact leaves and the two "Exact ... bytes to sign" blocks already sit in the dialog's own closed disclosures. The space between its parts steps down
   one token (--sp-5 to --sp-4, --sp-4 to --sp-3), kept in this page's sheet because vendor/defxn/defxn-product.css is a synced copy. Expected savings, with 10 fact rows:
   panel top and bottom 2 x 7 = 14, the fact list's margins 2 x 7 = 14, each fact row 2 x 4 = 8 (10 rows, 80), the digest box 2 x 7 = 14, the safety line 7, the footer 7. At least 56 even with no row saved. */
.admin-auth-panel { padding-block: var(--sp-4); }
.admin-auth-context { margin: var(--sp-4) 0; }
.admin-auth-context > div { padding: var(--sp-3) var(--sp-4); }
.admin-auth-digest { padding: var(--sp-4) var(--sp-5); }
.admin-auth-safety { margin-top: var(--sp-4); }
.admin-auth-panel > footer { margin-top: var(--sp-4); }

/* The rail's own tile: who signs. */
.fd-status { display: block; margin: 0; max-width: 100%; font: 400 var(--fs-tertiary)/1.3 var(--dx-font-mono); color: hsl(var(--text-muted)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg-tile--you { grid-template-columns: auto minmax(0, 1fr); column-gap: var(--sp-4); align-items: center; }
.fg-tile--you > dt { grid-row: 1; }
.fg-tile--you > dd:not(.fd-status) { grid-row: 1; }
.fg-tile--you > .fd-status { grid-column: 1 / -1; }

/* The alerts drawer and the kinds a proposal can be. */
.fd-alerts { list-style: none; margin: 0; padding: 0; display: grid; }
.fd-alert { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--sp-2) var(--sp-4); align-items: baseline; padding: var(--sp-4) 0; border-top: 1px solid hsl(var(--border-subtle)); font-size: var(--fs-tertiary); line-height: 1.5; color: hsl(var(--text-strong)); }
.fd-kinds { display: grid; gap: var(--sp-3); }
.fd-kinds .fg-seg { flex-wrap: wrap; }
.fd-approvals { display: grid; gap: var(--sp-4); }
.fd-lines { width: 100%; }

@media (max-width: 900px) {
  .fg-tile--you { grid-template-columns: minmax(0, 1fr); }
  .fg-tile--you > dt, .fg-tile--you > dd:not(.fd-status) { grid-row: auto; }
}

/* The picked proposal's text and its discussion. */
.fd-body { margin: 0; max-width: 72ch; font-size: var(--fs-tertiary); line-height: 1.7; color: hsl(var(--text)); white-space: pre-wrap; overflow-wrap: anywhere; }
.fd-comment { cursor: default; }
.fd-comment:hover { background: transparent; }
.fd-comment__text { font: 400 var(--fs-tertiary)/1.5 var(--dx-font-sans); color: hsl(var(--text-strong)); white-space: pre-wrap; overflow-wrap: anywhere; }
.fd-stance { text-transform: uppercase; letter-spacing: .14em; color: hsl(var(--text-muted)); }
.fd-stance[data-stance="support"] { color: hsl(var(--live)); }
.fd-stance[data-stance="oppose"] { color: hsl(var(--danger)); }
.fd-commentbox { display: grid; gap: var(--sp-3); }

/* Lock power beside the lock form: how far toward the cap this lock reaches. */
.fd-lockpower { display: grid; gap: var(--sp-3); }
.fd-lockpower__bar { height: 6px; background: hsl(var(--nested)); border-radius: 2px; overflow: hidden; }
.fd-lockpower__bar > span { display: block; height: 100%; background: hsl(var(--primary)); }

/* The page at 1280 wide scrolled sideways by 56 px (rehearsal 12). The cause is the body's grid: css/fxn-govern.css gives body.fg-page rows and no column
   template, so its one column is `auto` and grows to the widest content in it, which is the bar. Signed in, the bar's content (brand 297, links 378, Alerts,
   "Use a different key", the network pill and the theme button 542, gaps) is 1336 px, so the column, the bar and the document were 1336 px wide and the
   bar could never shrink. One column that may shrink (minmax(0, 1fr)) lets the bar take the window's width and shrink its brand block. The same rule
   belongs in fxn-govern.css, which treasury.defxn.com shares byte for byte; it is set here until that copy moves together. */
body.fg-page { grid-template-columns: minmax(0, 1fr); }

/* Fit at 1280x720 and 1440x900, signed in with a chain (fix-fit-dao, 2026-11-12). Three causes, measured in the FXN browser on a founded fxndao:
   1. The rail along the bottom (<dl class="fg-rail">) kept the browser's 1em margin of a <dl>: 18px above and below inside its 64px row, so it was 28px tall and every label and the
      "Sign with" tile were cut. The rail takes its row. The same line belongs in css/fxn-govern.css under .fg-rail, which treasury.defxn.com shares.
   2. The bar was 34px wider than 1280 minus the 47px gutters, so the product switcher was squeezed under the links (its content 177px in a 157px box, 3px into the nav). The gutter is the
      one css/dao.css sets for the tab page: 18px on a phone, 2vw between, 29px at most.
   3. A drawer's body scrolled inside itself at 1280x720 (Bind a quantum-safe key: 646px of content in 587px). The drawer body takes the space scale one step down. */
html[data-dx-product="dao"] { --dx-gutter: clamp(var(--sp-5), 2vw, var(--sp-6)); }
.fg-rail { margin: 0; }
.fg-drawer__body { padding: var(--sp-4) var(--sp-5) var(--sp-4); gap: var(--sp-4); }
/* Rehearsal 17 (R4), 1280x720. A grid gives an empty child a row, and the gap above it: the proposal drawer's empty gate and empty result held 11px each (22px), which was the
   19px the Multisig members form stood over a 601px body. An empty child takes no row. The result box fills when a button is pressed, and then it is no longer empty. */
.fg-drawer__body > :empty { display: none; }
/* The picked proposal's Facts tab stood 37px over its 359px body (396). Its six fact rows take 4px above and below instead of 7 (6 rows x 6px, 36px), and its blocks sit
   one or two steps closer (see the gap below). */
#detailBody .fg-row { padding: var(--sp-2) 0; }
/* Rehearsal 20 (A5), after the rule above (the R4 test pins that rule's text, so the tighter step is a separate, narrower rule instead of an edit to it).
   The Facts tab was 365 in 359 (6px over) at 1280x720, and the headline fix above adds about 4px. Six fact rows take 2px above and below instead of 4:
   6 rows x 4px = 24px back. Facts = 365 + 4 - 24 = 345 in 359 (14px spare); Text and Discussion are 359 in 359 and grow by the same 4px headline, which they absorb in their own
   slack (their content is shorter than the box). */
#detailBody .fg-rows > .fg-row { padding: var(--sp-1) 0; }
/* Rehearsal 18, 1280x720: the Facts, Text and Discussion buttons showed only their top half (the strip measured 30px of content in a 15px box). The strip clips its own
   overflow, so the panel's grid could shrink its row to nothing when the facts were taller than the panel; part of the old overflow was hidden that way, not closed. The strip
   keeps its content height. The 15px it takes back comes from the gaps between the panel's blocks: --sp-2 instead of the --sp-3 of rehearsal 17's fix (6 gaps, about 3px each, 18px). */
#detailBody > .fd-tabs { min-height: min-content; }
#detailBody { gap: var(--sp-2); }
/* Rehearsal 23 (K2): a budget of 9,223,372,036.854775807 FXN made the headline two lines at 1280x720. The content was then 386px in a 359px box, the grid shrank the tab strip's row to 2px,
   and the timeline was drawn 26px over the tab strip. A row here never shrinks below its content now. When the content is taller than the box, the panel scrolls (it is `overflow: auto`)
   and nothing is drawn over anything else. The normal budget and the fee fit the box (359 in 359), so they do not scroll. */
#detailBody { grid-auto-rows: max-content; }
.fg-drawer__head { padding: var(--sp-4) var(--sp-5); }
/* Rehearsal 20 (A4): the proposal drawer's "An ops budget" form (four grid rows, two with a help line) stood 636 in 601 at 1280x720 and Review and sign sat 24px below the window.
   The fee form (601 in 601) has two rows. Each space steps down one token in the drawer: between the body's children 5 gaps x 4px = 20, between the form's four rows 3 x 4 = 12, and
   inside the 6 labelled fields (label to input) 6 x 3 = 18. 636 - 50 = 586 in 601 (15px spare); the button then sits near 608 to 652 in the 678px window. Every drawer form
   shrinks by the same steps, none grows. No field leaves. */
.fg-drawer__body { gap: var(--sp-3); }
.fg-drawer__body > .fg-grid { gap: var(--sp-3) var(--sp-4); }
.fg-drawer__body .fg-field { gap: var(--sp-2); }
/* The bar's own rules are in css/fxn-govern.css, one copy for this site and the Treasury site (2026-11-29). */

/* UI sweep 2026-11-13 (B2), after the rules above (tests pin their text): the tab strip left the panel body for its head (about 36px) and the Approve, Reject and Turnout rows
   moved into the tally's key (two rows, about 44px). That room goes back to the space the 2px rows and the 4px gaps had given up: each fact row takes 4px above and below, and
   the panel's blocks stand 7px apart, so the headline, the timeline and the tally no longer touch. */
#detailBody .fg-rows > .fg-row { padding: var(--sp-2) 0; }
#detailBody { gap: var(--sp-3); }
/* The labels "Votes on the chain" and "Can execute from" broke onto two lines in the 38% label column of a two-column list. The dates are one line now (B2), so the label
   column takes 46% and the values keep their line. */
#detailBody .fg-rows--two > .fg-row:not(.fg-row--wide) { grid-template-columns: minmax(96px, 46%) minmax(0, 1fr); }
/* The wide Asks row's value began 6px right of the values under it (19% of the whole row against 38% of half). Its label column is the same width as theirs. */
#detailBody .fg-rows--two > .fg-row--wide { grid-template-columns: max(96px, calc((100% - var(--sp-6)) / 2 * .46)) minmax(0, 1fr); column-gap: var(--sp-4); }

/* UI sweep 2026-11-13 (B25, round 2): a refusal after Approve or Comment grew the panel's foot (or the Discussion tab) and the body shrank and scrolled (257 in 207 at
   1280x720). A result now stands over the lower part of the panel as a small dialog with its own Close (js/fxn-dao-app.mjs `closable`); the body keeps its height. */
#detail { position: relative; }
/* B34: the key's mark for the timeline's "now" line, the same 2px line in the same colour. */
.fd-nowkey { display: inline-flex; align-items: center; gap: var(--sp-2); }
.fd-nowkey > i { display: inline-block; width: 2px; height: 11px; background: hsl(var(--reference)); }
.fd-needkey > i { width: 1px; background: hsl(var(--text-strong)); }
.fd-result:empty { display: none; }
.fd-result:not(:empty) { position: absolute; z-index: 3; left: var(--sp-5); right: var(--sp-5); bottom: var(--sp-5); display: grid; gap: var(--sp-3);
  padding: var(--sp-4); background: hsl(var(--overlay)); border: 1px solid hsl(var(--border-strong)); border-radius: var(--dx-radius);
  box-shadow: 0 10px 29px hsl(var(--theme-shadow, 0 0% 0% / .3)); }
/* Sweep I round 2 (I3): in the picked proposal the result covered the foot's vote buttons until Close. It now stands in the body's box (top and height set by
   `placeResult`), and the body's own content steps aside while it shows; the head's tabs and the foot's buttons stay free. */
#detail .fd-result:not(:empty) { bottom: auto; align-content: start; }
/* Sweep I round 2 (I2): the Discussion list shows a page of comments with Earlier, the range and Later on one row; "Write a comment", open, takes the list's place. */
.fd-pager { align-items: center; }
#detailBody:has(> .fd-write[open]) > :is([role="list"], .fd-pager) { display: none; }
#detailBody.fd-body--result > * { visibility: hidden; }
#detailBody.fd-body--result .fd-result { visibility: visible; }
.fd-result > .dx-refusal, .fd-result > p { margin: 0; }
.fd-result__close { justify-content: flex-end; }
/* UI sweep 2026-11-13 (B9): a proposal's row cut its name with an ellipsis ("maintainers: 9,223,372,036.854775807 FXN per 366 d, …", the end date lost). A name takes
   the lines it needs. */
.fd-proposals .fg-item__name { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
/* UI sweep 2026-11-13 (B10): at 1280 wide "The money" fell alone onto a second line under New proposal, Members and Report cheating. The four sit on one line with the
   smaller gap of the scale. */
.fd-page #tools { column-gap: var(--sp-4); }

/* UI sweep 2026-11-13 (B14): in a two-column form a short field beside a text box ("Approvals needed" beside "Delegates", "Weeks" beside a field with a help line) stretched
   its input to the row's height (82px). A field's label and box keep their own heights and sit at the top of the row. */
.fg-drawer__body .fg-field { align-content: start; }
/* B17: the multisig act's drawer is wide and holds two columns (what the act does, its approvals), so a drafted act with its bytes, approval lines and buttons stands whole
   at 1280x720 and the bytes box needs no scroll of its own. */
.fg-drawer.fg-drawer--wide { width: min(1080px, 100vw); }
.fg-drawer--wide .fg-drawer__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--sp-6); align-items: start; }
.fd-act__what, .fd-act__approve { display: grid; gap: var(--sp-3); min-width: 0; align-content: start; }
.fd-act__approve .fg-bytes { max-height: none; overflow: visible; }
.fd-act__pq { display: grid; gap: var(--sp-3); }
.fd-act__pq .fg-bytes { max-height: none; overflow: visible; }
/* Offline audit 2026-11-17 (lane 7): a multisig-members or safe-signers proposal lists its keys whole, one per line, in the Facts tab's closed row. Open, the list
   keeps the bytes box's height and scrolls inside it, so the panel does not grow. */
.fd-keys__list { white-space: pre-wrap; }
@media (max-width: 900px) { .fg-drawer--wide .fg-drawer__body { grid-template-columns: minmax(0, 1fr); } }
/* B15: a button in the act's approvals box keeps its own width instead of the drawer's. */
.fd-approvals > button { justify-self: start; }
/* B22: "Review and sign" and "Review the lock" stretched across the whole drawer while the same action elsewhere ("Review and bind", "Review and delegate") keeps its own
   width. The dominant action keeps its own width in every drawer. */
.fg-drawer__body > .fg-go { justify-self: start; }

/* UI sweep 2026-11-13 (B1): the bottom strip cut "DELAY 48 hours · stri…", "YOUR POWER 0 F…", "SIGN WITH Genes▾" and "Signed in as …" at 1280x720, because its eight tiles
   took equal shares of the width whatever they held. Each tile now starts from what it holds and gives up or takes the rest in proportion; a strict value takes a second
   line of its tile; a quiet action goes under its value when the two do not fit side by side. */
.fd-page .fg-rail .fg-tile { flex: 1 1 auto; padding: 0 var(--sp-4); }
.fd-page .fg-rail .fg-tile dd { flex-wrap: wrap; row-gap: 0; }
.fd-two { display: grid; }
.fd-two > .fd-two__sub { color: hsl(var(--text-muted)); }
.fd-page .fg-tile--you { flex: 1 1 auto; }
.fd-page .fg-tile--you .dx-select { width: auto; }

/* The sign-in's wrapped rows (B32), the review digest's 11 px step (B33), the review dialog layout (B6) and the lifted blur of a drawer that holds an open
   review (B6, page side) are product kit rules since fix/ui-1113 4733da0 (vendor/defxn/defxn-product.css); this page carries no copy. */
