/* Subscription lab: publication layout, dark slate, high contrast. */

:root {
  --bg: #070b12;
  --sheet: #121a26;
  --elev: #1a2433;
  --ink: #f7fafc;
  --muted: #c9d4e3;
  --line: #3d4d64;
  --line-strong: #5b6d86;
  --accent: #c5d8ee;
  --accent-hover: #ffffff;
  --ok: #9ee0bc;
  --ok-soft: rgba(158, 224, 188, 0.14);
  --warn: #f0c56e;
  --warn-soft: rgba(240, 197, 110, 0.14);
  --err: #f0a0a3;
  --err-soft: rgba(240, 160, 163, 0.14);
  --code: #05080d;
  --code-ink: #f4f7fb;
  --code-dim: #c5d0de;
  --code-key: #d7e4f4;
  --radius: 8px;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --pad: clamp(1rem, 2vw, 1.75rem);
  --bar: 52px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background-image: radial-gradient(800px 360px at 85% -15%, rgba(197, 216, 238, 0.07), transparent 55%);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--elev);
  padding: 0.05em 0.3em;
  border-radius: 3px;
  color: var(--accent);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  padding: 0.45rem var(--pad);
  background: rgba(7, 11, 18, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.wordmark-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  gap: 0.05rem;
}
.wordmark {
  font-family: var(--serif);
  font-size: clamp(0.92rem, 3.6vw, 1.05rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wordmark-sub {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
  line-height: 1.2;
}
a.wordmark {
  color: var(--ink);
  text-decoration: none;
}
a.wordmark:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}
a.wordmark:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.topbar-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.3rem 0.4rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--mono);
  text-align: right;
  min-width: 0;
  flex: 1 1 12rem;
}
.topbar-conn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.topbar-sep {
  color: var(--line-strong);
  flex-shrink: 0;
}
#ledgerIndex,
#ledgerTime {
  white-space: nowrap;
}
.topbar-time {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem 0.4rem;
}
.topbar-time:has(#ledgerTime:empty) {
  display: none;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4b5568;
  flex-shrink: 0;
}
.dot.live { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.err { background: var(--err); }

.shell {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.1rem var(--pad) 2.5rem;
}

.mast {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}
.mast-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.mast h1 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.2;
}
.mast p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: none;
  width: 100%;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--elev);
  color: var(--muted);
}
.pill--ok {
  background: var(--ok-soft);
  border-color: rgba(158, 224, 188, 0.4);
  color: var(--ok);
}
.pill--busy {
  background: var(--warn-soft);
  border-color: rgba(240, 197, 110, 0.4);
  color: var(--warn);
}
.pill--err {
  background: var(--err-soft);
  border-color: rgba(240, 160, 163, 0.4);
  color: var(--err);
}

.panel {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.stack > .panel {
  margin-top: 0;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
}
.panel-head h2 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}
.panel-head p,
.hint {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

button,
.btn {
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.38rem 0.7rem;
  min-height: 2.15rem;
  border-radius: 5px;
  border: 1px solid var(--line-strong);
  background: var(--elev);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
button:hover,
.btn:hover {
  background: #243044;
  text-decoration: none;
  color: var(--ink);
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button.primary,
.btn.primary {
  background: #4a5d75;
  border-color: #5b738f;
  color: #f8fafc;
}
button.primary:hover,
.btn.primary:hover {
  background: #5b738f;
}
button.warn,
.btn.warn {
  background: #334155;
  border-color: #64748b;
  color: #e2e8f0;
}

.paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}
.path-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  min-height: 0;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem 0.75rem;
  color: var(--ink);
  font-weight: 400;
  cursor: pointer;
}
button.path-card:hover {
  background: var(--elev);
  border-color: var(--accent);
  color: var(--ink);
  text-decoration: none;
}
.path-card h2 {
  font-family: var(--serif);
  font-size: 1.05rem;
  margin: 0;
  font-weight: 600;
}
.path-card .tt {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-top: 0.12rem;
}
.path-card p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
  font-weight: 400;
  flex: 1;
}
.path-card strong {
  color: var(--ink);
  font-weight: 600;
}
.path-more {
  margin-top: auto;
  padding-top: 0.55rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.accounts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}
.acct {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem 0.6rem 0.55rem;
  background: var(--elev);
  min-width: 0;
}
.acct-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.acct-top .links {
  display: flex;
  gap: 0.25rem;
  letter-spacing: 0;
  text-transform: none;
}
.icon-btn {
  width: 1.85rem;
  height: 1.85rem;
  min-height: 1.85rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}
.icon-btn i {
  font-size: 0.78rem;
  line-height: 1;
}
.icon-btn:hover,
a.icon-btn:hover {
  color: #fff;
  border-color: var(--accent);
  background: #243044;
  text-decoration: none;
}
.icon-btn:disabled,
.icon-btn.is-disabled {
  opacity: 0.45;
}
.acct-blurb {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  margin: 0.2rem 0 0.3rem;
  line-height: 1.35;
}
.acct-addr {
  font-family: var(--mono);
  font-size: 0.75rem;
  word-break: break-all;
  color: var(--ink);
  line-height: 1.35;
}
.acct-meta {
  display: flex;
  gap: 0.7rem;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.acct-meta b {
  color: var(--ink);
  font-weight: 600;
}

.lab {
  margin-top: 0.7rem;
  padding: 0;
  overflow: hidden;
}
.tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: var(--elev);
}
.tab {
  min-height: 2.6rem;
  width: 100%;
  justify-content: center;
  padding: 0.5rem 0.4rem;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}
.tab:last-child {
  border-right: 0;
}
.tab:hover {
  background: rgba(197, 216, 238, 0.06);
  color: var(--ink);
}
.tab.is-active {
  color: var(--ink);
  background: var(--sheet);
  border-bottom-color: var(--accent);
}
.tab-panel {
  display: none;
  padding: 1rem 1.05rem 0.85rem;
}
.tab-panel.is-active { display: block; }
#unsignedPanel[hidden],
#subLookup[hidden],
#spSubmitDock[hidden] { display: none !important; }

.iou-fields {
  margin-top: 0.5rem;
}
.iou-fields[hidden] {
  display: none !important;
}

.unsigned-wrap {
  border-top: 1px solid var(--line);
  padding: 0;
  background: #080c14;
  margin-top: 0;
}
.unsigned-head {
  padding: 0.75rem 1.05rem 0.4rem;
}
.unsigned-wrap .json-kicker,
.unsigned-wrap h2 {
  color: var(--code-ink);
}
.unsigned-wrap h2 {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0 0 0.15rem;
}
.unsigned-wrap .hint {
  color: var(--code-dim);
}
.unsigned-frame {
  position: relative;
  margin: 0 1.05rem;
}
.unsigned-frame .icon-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 1;
  background: #0c121c;
}
.unsigned-frame pre.tx {
  margin: 0;
  min-height: 10rem;
  max-height: 16rem;
  padding: 0.65rem 2.5rem 0.65rem 0.65rem;
}
.submit-dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-top: 0.75rem;
  padding: 0.7rem 1.05rem;
  border-top: 1px solid #1e293b;
  background: #0c121c;
}
.submit-meta {
  min-width: 0;
  font-size: 0.82rem;
  color: var(--code-dim);
  font-family: var(--mono);
  line-height: 1.4;
}
.submit-meta span {
  color: var(--code-ink);
}
.submit-sep {
  color: var(--code-dim) !important;
  margin: 0 0.15rem;
}
.submit-cta {
  flex-shrink: 0;
  min-width: 11rem;
  justify-content: center;
  min-height: 2.45rem;
  font-size: 0.92rem;
}
.submit-sep-amt[hidden],
#submitMetaAmt[hidden] {
  display: none;
}

.sub-lookup {
  border-top: 1px solid var(--line);
  background: var(--elev);
}
.sub-lookup > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.62rem 1.05rem;
  user-select: none;
}
.sub-lookup > summary::-webkit-details-marker {
  display: none;
}
.sub-lookup > summary::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  margin-left: auto;
  flex-shrink: 0;
}
.sub-lookup[open] > summary::after {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}
.sub-lookup-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 650;
  color: var(--muted);
  flex-shrink: 0;
}
.sub-lookup-status {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sub-lookup.has-sub .sub-lookup-status { color: var(--ok); }
.sub-lookup.is-soon .sub-lookup-status { color: var(--warn); }
.sub-lookup.is-missing .sub-lookup-status { color: var(--err); }
.sub-lookup-body {
  padding: 0 1.05rem 0.85rem;
  border-top: 1px solid var(--line);
}
.sub-lookup-id {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  align-items: end;
  padding-top: 0.7rem;
}
.sub-id-slot {
  margin: 0.55rem 0 0.75rem;
}
.sub-id-slot:empty {
  display: none;
  margin: 0;
}
.sub-id-slot .sub-lookup-id {
  padding-top: 0;
}
.sub-id-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}
.sub-id-wrap input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.sub-id-wrap > .icon-btn {
  flex-shrink: 0;
  width: 2.35rem;
  min-height: 2.35rem;
  height: auto;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: 0;
}
.sub-search-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 3px);
  z-index: 8;
  margin: 0;
  padding: 0.2rem 0;
  list-style: none;
  background: var(--sheet);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  max-height: 12rem;
  overflow: auto;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}
.sub-search-menu[hidden] {
  display: none !important;
}
.sub-search-menu li {
  margin: 0;
}
.sub-search-menu button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 400;
  min-height: 2.2rem;
}
.sub-search-menu button:hover,
.sub-search-menu button:focus {
  background: #243044;
  color: var(--ink);
}
.sub-search-menu .empty {
  padding: 0.45rem 0.7rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.inspect-sheet {
  margin-top: 0.35rem;
}
.inspect-sheet.is-empty td {
  color: var(--muted);
}
.inspect-empty {
  margin-top: 0.45rem;
}

#spSubmitDock {
  margin-top: 0.7rem;
  margin-bottom: 0.7rem;
}
[hidden] {
  display: none !important;
}

.json-col {
  position: static;
  max-height: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}
.field-hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.35;
}
.fields-follow {
  margin-top: 0.5rem;
}
.field select,
select {
  font-family: var(--sans);
  font-size: 16px;
  padding: 0.38rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
  width: 100%;
}
.field.check {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
  font-size: 0.84rem;
  color: var(--muted);
}
.field.check input[type="checkbox"] {
  width: auto;
  accent-color: var(--accent);
}
.field.check.wait-until {
  flex-wrap: wrap;
}
.field.check.wait-until label {
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
}
.field.check.wait-until input[type="number"] {
  width: 4.75rem;
  flex: 0 0 4.75rem;
}
#claimWaitHint {
  margin: 0.3rem 0 0;
}
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.guide-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.85rem 0.9rem;
  background: var(--elev);
  color: var(--ink);
  cursor: pointer;
}
.guide-card:hover {
  background: #243044;
  border-color: var(--accent);
  color: var(--ink);
  text-decoration: none;
}
.guide-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-family: var(--serif);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
}
.guide-details {
  margin-top: 0.85rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--sheet);
}
.guide-details h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-family: var(--serif);
  font-weight: 600;
}
.guide-details h3 + ol,
.guide-details h3 + p {
  margin-top: 0;
}
.guide-details h3:not(:first-child) {
  margin-top: 0.85rem;
}
.guide-details ol {
  margin: 0.2rem 0 0.55rem;
  padding-left: 1.2rem;
}
.guide-details li {
  margin: 0.2rem 0;
}
.guide-details p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;

}
.guide-card p {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.4;
}
.guide-go {
  margin-top: auto;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.field input,
input[type="text"],
input[type="number"] {
  font-family: var(--mono);
  font-size: 16px;
  padding: 0.38rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
  width: 100%;
}
.field input:focus,
input:focus {
  outline: 2px solid rgba(197, 216, 238, 0.35);
  border-color: var(--accent);
}

.fields-4,
.fields-3,
.fields-2 {
  display: grid;
  gap: 0.4rem;
}
.fields-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fields-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fields-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.action {
  border-top: 1px solid var(--line);
  padding-top: 0.65rem;
  margin-top: 0.65rem;
}
.action:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}
.action h3 {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.why,
.action .why {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}
.path-label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-left: 0.3rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}

.json-block {
  background: var(--code);
  color: var(--code-ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem 0.75rem;
}
.json-block.prepare {
  border-color: var(--accent);
}
.json-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--code-key);
  margin: 0 0 0.08rem;
  font-weight: 600;
}
.json-block h2 {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: #f8fafc;
}
.json-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.45rem;
}
.json-head .icon-btn {
  flex-shrink: 0;
  background: transparent;
  color: var(--code-ink);
  border-color: var(--line-strong);
}
.json-block .btn,
.json-block button {
  background: transparent;
  color: var(--code-ink);
  border-color: var(--line-strong);
  min-height: 1.9rem;
  font-size: 0.78rem;
  padding: 0.25rem 0.5rem;
}
.json-block .hint {
  color: var(--code-dim);
  font-size: 0.75rem;
}
.json-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.json-split .json-kicker {
  margin-top: 0;
}
pre.tx,
.json-tree.tx {
  margin: 0.3rem 0 0;
  max-height: 14rem;
  min-height: 6.5rem;
  overflow: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--code-ink);
  background: #05080c;
  border: 1px solid #1e293b;
  border-radius: 4px;
  padding: 0.5rem 0.55rem;
}
.json-tree.tx {
  max-height: none;
  min-height: 0;
  overflow: hidden;
  height: auto;
  padding-left: 1.45rem;
}
.json-block.prepare pre.tx {
  min-height: 11rem;
  max-height: 18rem;
}

.hist { margin: 0.25rem 0 0.35rem; }
.chip {
  display: inline-block;
  margin: 0.1rem 0.18rem 0 0;
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--code-dim);
  font-size: 0.7rem;
  font-family: var(--mono);
  cursor: pointer;
}
.chip.is-active {
  border-color: var(--code-key);
  color: var(--code-key);
}

.sub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-top: 0.4rem;
}
.sub-table th,
.sub-table td {
  text-align: left;
  padding: 0.28rem 0.22rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.sub-table th {
  width: 8.5rem;
  color: var(--muted);
  font-weight: 600;
}
.sub-table td {
  font-family: var(--mono);
  font-size: 0.75rem;
  word-break: break-all;
}

.note {
  margin: 0.4rem 0 0;
  font-size: 0.84rem;
  color: var(--warn);
}
.muted {
  color: var(--muted);
  font-size: 0.82rem;
}

.sub-log-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: 0.3rem;
  height: 18rem;
  min-height: 8rem;
  background: #05080c;
  border: 1px solid #1e293b;
  border-radius: 4px;
  overflow: hidden;
}
.sub-log {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--code-dim);
  margin-top: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0.5rem 0.55rem 0.35rem;
}
.sub-log-grip {
  flex: 0 0 0.72rem;
  width: 100%;
  height: 0.72rem;
  min-height: 0.72rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #0b1220;
  cursor: ns-resize;
  position: relative;
  touch-action: none;
}
.json-block .sub-log-grip {
  background: #0b1220;
  color: inherit;
  border: 0;
  min-height: 0.72rem;
  font-size: 0;
  padding: 0;
}
.sub-log-grip::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.4rem;
  height: 3px;
  margin: -1.5px 0 0 -1.2rem;
  border-radius: 99px;
  background: var(--line-strong);
}
.sub-log-grip:hover::after,
.sub-log-grip:focus-visible::after {
  background: var(--accent);
}
.sub-log-frame.is-resizing {
  user-select: none;
}
.sub-log-line { margin-bottom: 0.22rem; }
.sub-log-line--ok { color: var(--ok); }
.sub-log-line--err { color: var(--err); }
.sub-log-line--warn { color: var(--warn); }
.sub-log-pre {
  margin: 0.1rem 0 0;
  white-space: pre-wrap;
  opacity: 0.75;
}
.sub-log .json-tree {
  margin-top: 0.15rem;
  min-height: 0;
  max-height: none;
  overflow: visible;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.4;
  white-space: pre-wrap;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0 0 0 1.25rem;
  opacity: 0.9;
}
.json-line {
  white-space: pre-wrap;
  word-break: break-word;
}
.json-line.is-meta {
  position: relative;
}
.json-tree .json-chevron,
.json-block .json-chevron {
  position: absolute;
  left: -1.2rem;
  top: 0.12em;
  width: 1rem;
  height: 1rem;
  min-height: 1rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--code-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.json-tree .json-chevron:hover,
.json-block .json-chevron:hover {
  background: transparent;
  color: var(--code-ink);
}
.json-chevron::before {
  content: "";
  width: 0.36rem;
  height: 0.36rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}
.json-line.is-meta.is-open .json-chevron::before {
  transform: rotate(45deg);
}
.json-hash {
  color: var(--accent);
  text-decoration: none;
  font-family: var(--mono);
  word-break: break-all;
}
.json-hash:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}
.sub-log-line .json-hash {
  margin-left: 0.35rem;
}

.notes {
  margin-top: 0.7rem;
}
.notes summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}
.notes ul {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.84rem;
}
.notes li { margin: 0.22rem 0; }
.note-link {
  background: none;
  border: 0;
  padding: 0;
  min-height: 0;
  color: var(--accent);
  font-weight: 500;
  font-size: inherit;
  display: inline;
}
.note-link:hover {
  background: none;
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}
.doc-prose h1 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.45rem;
}
.doc-prose h2 {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  margin: 1.1rem 0 0.4rem;
}
.doc-prose .doc-meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0 0 0.7rem;
}
.faq-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--elev);
  margin: 0.4rem 0;
}
.faq-item > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.9rem;
}
.faq-item > summary::-webkit-details-marker {
  display: none;
}
.faq-item > summary::after {
  content: "";
  flex-shrink: 0;
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}
.faq-item[open] > summary::after {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}
.faq-answer {
  padding: 0.55rem 0.75rem 0.7rem;
  border-top: 1px solid var(--line);
}
.faq-answer > :first-child {
  margin-top: 0;
}

.foot {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--pad) 1.75rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.tx-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3.25rem 0.75rem 1rem;
}
.tx-modal[hidden] {
  display: none !important;
}
.tx-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 11, 18, 0.72);
  backdrop-filter: blur(6px);
}
.tx-modal-sheet {
  position: relative;
  width: min(42rem, 100%);
  max-height: calc(100vh - 6rem);
  overflow: auto;
  background: var(--sheet);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.tx-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1.05rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--sheet);
  z-index: 1;
}
.tx-modal-head h2 {
  font-family: var(--serif);
  margin: 0.08rem 0 0;
  font-size: 1.25rem;
  font-weight: 600;
}
.tx-modal-head .tt {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin: 0;
}
.tx-modal-body {
  padding: 0.85rem 1.05rem 1.2rem;
}
.tx-modal-body h3 {
  margin: 1rem 0 0.28rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
.tx-modal-body p,
.tx-modal-body li {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}
.tx-modal-body p { margin: 0 0 0.4rem; }
.tx-modal-body ul {
  margin: 0;
  padding-left: 1.1rem;
}
.tx-modal-body li { margin: 0.18rem 0; }
.tx-modal-body strong { color: var(--ink); font-weight: 600; }
.tx-modal-body .sub-table { margin-top: 0.15rem; }
.tx-modal-body .sub-table th { width: 8.25rem; }
.tx-modal-body .sub-table td {
  font-family: var(--sans);
  font-size: 0.88rem;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.45;
}
.tx-modal-body pre.tx {
  min-height: 0;
  max-height: 13rem;
  margin-top: 0.35rem;
}
.tx-modal-sheet.is-wide {
  width: min(1400px, calc(100vw - 1.5rem));
}
.tx-modal-body.doc-prose h1 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.45rem;
}
.tx-modal-body.doc-prose h2,
.tx-modal-body.doc-prose h3,
.tx-modal-body.doc-prose h4,
.tx-modal-body.doc-prose h5 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ink);
  margin: 1.15rem 0 0.4rem;
}
.tx-modal-body.doc-prose h2 { font-size: 1.12rem; }
.tx-modal-body.doc-prose h3 { font-size: 1rem; }
.tx-modal-body.doc-prose h4,
.tx-modal-body.doc-prose h5 { font-size: 0.92rem; }
.tx-modal-body.doc-prose .doc-meta,
.tx-modal-body.doc-prose .json-kicker {
  margin-bottom: 0.35rem;
}
.tx-modal-body.doc-prose table {
  width: max-content;
  min-width: 100%;
  max-width: none;
  table-layout: auto;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin: 0.4rem 0 0.85rem;
}
.tx-modal-body.doc-prose .sub-table th {
  width: auto;
}
.tx-modal-body.doc-prose th,
.tx-modal-body.doc-prose td {
  font-family: var(--sans);
  font-size: 0.8rem;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  white-space: nowrap;
  text-align: left;
  padding: 0.32rem 0.55rem 0.32rem 0.35rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  width: auto;
}
.tx-modal-body.doc-prose th {
  color: var(--muted);
  font-weight: 600;
}
.tx-modal-body.doc-prose td { color: var(--ink); }
.tx-modal-body.doc-prose th:last-child,
.tx-modal-body.doc-prose td:last-child {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  min-width: 18rem;
  max-width: 36rem;
}
.tx-modal-body.doc-prose pre,
.tx-modal-body.doc-prose pre.tx {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.4;
  background: var(--code);
  color: var(--code-ink);
  border: 1px solid #1e293b;
  border-radius: 4px;
  padding: 0.55rem;
  overflow: auto;
  max-height: 18rem;
  min-height: 0;
  white-space: pre-wrap;
}
.tx-modal-body.doc-prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  font-family: inherit;
}
.tx-modal-body.doc-prose blockquote {
  margin: 0.5rem 0;
  padding: 0.15rem 0 0.15rem 0.75rem;
  border-left: 2px solid var(--line-strong);
  color: var(--muted);
}
.tx-modal-body.doc-prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1rem 0;
}
.path-ok { color: var(--ok); }
.path-warn { color: var(--warn); }
body.tx-modal-open { overflow: hidden; }

.is-disabled {
  pointer-events: none;
  opacity: 0.4;
}

@media (max-width: 1100px) {
  .accounts { grid-template-columns: 1fr 1fr; }
  .paths { grid-template-columns: 1fr; }
  .mast-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .pills { justify-content: flex-start; }
}
@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.28rem;
  }
  .wordmark {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
  .wordmark-sub {
    white-space: normal;
  }
  .topbar-status {
    justify-content: flex-start;
    width: 100%;
    text-align: left;
    font-size: 0.68rem;
    line-height: 1.4;
  }
  .accounts,
  .fields-4,
  .fields-3,
  .fields-2,
  .sub-lookup-id,
  .submit-dock {
    grid-template-columns: 1fr;
  }
  .tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow-x: auto;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .submit-dock {
    display: flex;
    flex-wrap: wrap;
  }
  .submit-cta {
    width: 100%;
  }
  .tab {
    border-bottom: 1px solid var(--line);
  }
  .json-block.prepare pre.tx {
    min-height: 9rem;
    max-height: 14rem;
  }
  button,
  .btn {
    min-height: 2.5rem;
  }
  .icon-btn {
    width: 2.35rem;
    height: 2.35rem;
    min-height: 2.35rem;
  }
}
