/* The rail panels on the home page and beside a sheet: a folding panel
   with a sentence case header over a hairline and a chevron, token rows,
   label and value lists, the sheet history and the change table. */

.rail, .sheet-rail { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel { padding: 2px 6px 8px; background: var(--tile); border-radius: var(--r-panel); box-shadow: var(--ring-tile); }
.panel-sum {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 8px;
  list-style: none; cursor: pointer; user-select: none;
}
.panel[open] > .panel-sum { margin: 0 -6px 6px; padding: 0 14px; border-bottom: 1px solid var(--hairline); }
.panel-sum::-webkit-details-marker { display: none; }
.panel-sum .chevron { flex: none; margin-left: auto; color: var(--ink-muted); transition: transform var(--quick) var(--ease), color var(--quick) var(--ease); }
.panel:not([open]) .chevron { transform: rotate(-90deg); }
.panel-sum:hover .chevron { color: var(--ink-2); }
.panel-h { font-size: 15px; line-height: 20px; font-weight: var(--w-title); color: var(--ink); }
.panel-q { margin-left: 6px; font-weight: var(--w-body); color: var(--ink-muted); }
.panel-note { padding: 0 8px 6px; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.panel.is-live > .panel-note, .panel.is-live > .panel-list { display: none; }
.panel-more { padding: 8px 8px 2px; font-size: 14px; line-height: 20px; }
.panel-more a { color: var(--ink-2); }

/* Token and wallet rows */
.rail-link, .rail-row.is-busy {
  display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 8px;
  border-radius: var(--r-input); font-size: 14px; line-height: 20px;
  transition: background-color var(--quick) var(--ease);
}
.rail-link:hover { background: var(--hover-fill); }
.rail-sym, .rail-addr { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-sym { font-weight: var(--w-title); }
.rail-addr { color: var(--ink-2); font-size: 14px; }
.rail-v { color: var(--ink-2); white-space: nowrap; }
.rail-d { min-width: 64px; text-align: right; color: var(--ink-muted); white-space: nowrap; }
.rail-row.is-busy::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: var(--live); box-shadow: 0 0 0 3px var(--live-ring);
}
@media (prefers-reduced-motion: no-preference) {
  .rail-row.is-busy::before { animation: beat 1.4s var(--ease) infinite; }
}
@keyframes beat { 50% { opacity: 0.35; } }
.panel-lines { padding: 0 8px; }
.panel-lines li { padding: 7px 0; border-top: 1px solid var(--divider); font-size: 14px; line-height: 20px; color: var(--ink-2); }
.panel-lines li:first-child { border-top: 0; padding-top: 0; }

/* Label and value lists beside a sheet */
.rail-dl { padding: 0 8px; }
.rail-dl > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 8px 0; border-top: 1px solid var(--divider); font-size: 14px; line-height: 20px;
}
.rail-dl > div:first-child { border-top: 0; padding-top: 2px; }
.rail-dl dt { flex: none; color: var(--ink-muted); }
.rail-dl dd { min-width: 0; text-align: right; overflow-wrap: anywhere; color: var(--ink); }
.rail-dl .addr { font-size: 14px; color: var(--ink-2); }
.rail-dl .copy { height: 26px; margin-left: 6px; padding: 0 8px; font-size: 12px; }
.ext { color: var(--ink-2); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.24); text-underline-offset: 3px; }
.ext:hover { color: var(--ink); }

/* Sheet history and the change table */
.hist { padding: 0 8px; }
.hist-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  min-height: 38px; border-top: 1px solid var(--divider); font-size: 14px;
}
.hist-row:first-child { border-top: 0; }
.hist-row a { color: var(--ink-2); }
.hist-row a[aria-current="page"] { color: var(--ink); font-weight: var(--w-heading); }
.changes { width: calc(100% - 16px); margin: 0 8px; font-size: 14px; line-height: 20px; }
.changes th, .changes td { padding: 7px 0 7px 8px; text-align: right; border-top: 1px solid var(--divider); white-space: nowrap; }
.changes th:first-child, .changes td:first-child { padding-left: 0; text-align: left; }
.changes thead th { border-top: 0; color: var(--ink-muted); font-weight: var(--w-body); }
.changes tbody th { color: var(--ink-muted); font-weight: var(--w-body); }
.rule-changes { padding: 6px 8px 0; font-size: 14px; line-height: 20px; }
.rule-new { color: var(--tier-medium); }
.rule-gone { color: var(--ink-muted); }
.share { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 8px 2px; }
