:root {
  --bg: #eef1f5;
  --page-top: #ffffff;
  --page-stripe: #0c7ffb;

  --card: #ffffff;
  --card-strong: #ffffff;
  --surface: #f6f7f9;
  --surface-hover: #eceff3;
  --surface-strong: #e5e9ef;

  --border: #d7dce5;
  --border-strong: #c1c9d4;
  --focus-border: #0c7ffb;

  --text: #000000;
 /* #172b43; */
  --muted: #000000; /* #172b43 ;#44566c; */
  --soft-text:#000000; /*  #172b43;  #6d7b8b; */
  --placeholder: #98a2af;

  --blue: #0c7ffb;
  --blue-soft: #1e63b6;
  --gold: #ffcc16;
  --green: #35ff23;
  --green-text: #123d0f;
  --red: #d9364f;

  --info-bg: #f3f5f8;
  --info-border: #d6dce5;
  --status-bg: #f6f7f9;
  --code-bg: #eef1f5;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
}

/* Main documentation page content */
.txdoc {
  max-width: none;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 22px 28px 34px;
  box-shadow: none;
  font-size: 13px;
}

.txdoc_title {
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
}

.txdoc_subline {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--blue-soft);
  font-weight: 700;
}

.txdoc_intro {
  margin: 0 0 18px;
  max-width: 940px;
  color: var(--muted);
  line-height: 1.5;
}

.txdoc_section_title {
  margin: 24px 0 10px;
  font-size: 17px;
  line-height: 1.25;
  color: var(--text);
}

.txdoc p {
  margin: 0 0 10px;
  line-height: 1.5;
}

.txdoc ul,
.txdoc ol {
  margin: 8px 0 12px;
  padding-left: 22px;
}

.txdoc li {
  margin: 4px 0;
  line-height: 1.45;
}

/* Tables */
.txdoc_param_table,
.txdoc_cli_param_table,
.txdoc_wasm_param_table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 12px;
}

.txdoc_param_table th,
.txdoc_cli_param_table th,
.txdoc_wasm_param_table th {
  background: var(--surface-strong);
  color: var(--text);
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  border-bottom: 1px solid var(--border);
}

.txdoc_param_table td,
.txdoc_cli_param_table td,
.txdoc_wasm_param_table td {
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  vertical-align: top;
  line-height: 1.4;
}

.txdoc_param_table tr:hover td,
.txdoc_cli_param_table tr:hover td,
.txdoc_wasm_param_table tr:hover td {
  background: var(--surface-hover);
}

.txdoc_param_id,
.txdoc_param_type,
.txdoc_param_required {
  font-weight: 700;
  color: var(--text);
}

/* Tabs and examples */
.txdoc_tabs {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--card);
}

.txdoc_tab_buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.txdoc_tab_button {
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
}

.txdoc_tab_button:hover,
.txdoc_tab_button.active {
  background: var(--blue);
  color: #ffffff;
}

.txdoc_tab_content {
  display: none;
  padding: 14px;
}

.txdoc_tab_content.active {
  display: block;
}

.txdoc_tab_content h4 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 16px;
}

.txdoc_tab_content h5 {
  margin: 14px 0 7px;
  color: var(--blue-soft);
  font-size: 13px;
}

.txdoc_tab_content h6 {
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.txdoc_code {
  margin: 8px 0;
  background: var(--code-bg);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 10px 12px;
  color: #000000; /* 152f4f; */
  overflow-x: auto;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.42;
  white-space: pre-wrap;
}

.txdoc_cli_summary,
.txdoc_wasm_note,
.txdoc_bolt_note {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-left: 3px solid var(--blue);
  border-radius: 5px;
  padding: 9px 11px;
  color: var(--muted);
  line-height: 1.45;
  margin: 8px 0 12px;
}

.txdoc_rpc_example,
.txdoc_bolt_example,
.txdoc_cli_example,
.txdoc_wasm_function {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 10px 0;
}

.txdoc_errors {
  margin-top: 18px;
  background: #fff7f8;
  border: 1px solid #efc8cf;
  border-radius: 6px;
  padding: 12px 14px;
}

.txdoc_error_list {
  margin: 0;
  padding-left: 20px;
}

.txdoc_error_list li {
  color: var(--muted);
  margin: 5px 0;
  line-height: 1.4;
}

.txdoc_missing {
  color: var(--soft-text);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
  padding: 10px 12px;
}

code {
  background: var(--surface-strong);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--blue-soft);
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 0.92em;
}

.txdoc_codeblock {
  margin: 10px 0 14px;
  padding: 12px 14px;
  background: var(--code-bg);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text);
  overflow-x: auto;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.txdoc_demo {
  margin: 12px 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.txdoc_demo label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 10px 4px 0;
}

.txdoc_demo input,
.txdoc_demo select {
  padding: 6px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--card);
  color: var(--text);
}

.txdoc_demo button {
  padding: 7px 10px;
  border: 1px solid var(--blue);
  border-radius: 4px;
  background: var(--blue);
  color: white;
  cursor: pointer;
}

.txdoc_demo button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.txdoc_demo [data-demo-status] {
  min-height: 18px;
  font-weight: 700;
}

/* App shell */
.doc_shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.doc_topnav {
  height: 56px;
  flex: 0 0 auto;
  background: var(--page-top);
  border-bottom: 1px solid var(--border);
  border-top: 4px solid var(--page-stripe);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: none;
}

.doc_menu_toggle {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  color: var(--text);
}

.doc_menu_toggle:hover {
  background: var(--surface-hover);
  border-color: var(--focus-border);
}

.doc_logo_mark {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 19px;
}

.doc_logo_text {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.doc_layout {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
}

.doc_sidebar {
  width: 300px;
  flex: 0 0 300px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
  border-right: 1px solid var(--border);
  padding: 12px;
  transition: width 0.2s ease, padding 0.2s ease;
}

.doc_sidebar.closed {
  width: 0;
  flex-basis: 0;
  padding-left: 0;
  padding-right: 0;
  overflow: hidden;
}

.doc_menu {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.doc_menu_group {
  margin-bottom: 2px;
}

.doc_menu_heading {
  margin: 10px 4px 4px;
  color: var(--soft-text);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 800;
}

.doc_menu_heading.doc_collapser {
  width: 100%;
  cursor: pointer;
  text-align: left;
  border: 0;
  background: transparent;
  font: inherit;
  padding: 7px 8px;
  border-radius: 5px;
}

.doc_menu_heading.doc_collapser:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.doc_menu_children {
  display: none;
  padding-bottom: 3px;
}

.doc_menu_group.open .doc_menu_children {
  display: block;
}

.doc_menu_group.open .doc_collapser::after {
/*  content: "−"; */
  float: right;
  font-weight: 900;
}

.doc_collapser::after {
/*  content: "+"; */
  float: right;
  font-weight: 900;
}


.doc_collapser::after {
    content: "▸";
    float: right;
    color: var(--soft-text);
    transition: transform .15s ease;
    display: inline-block;
}

.doc_menu_group.open .doc_collapser::after {
    transform: rotate(90deg);
}

.doc_menu_item {
  display: block;
  text-decoration: none;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 7px 9px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.25;

    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.doc_menu_item:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border);
}

.doc_menu_item.active {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
  box-shadow: none;
}

.doc_transaction_link {
  font-size: 12px;
  padding-left: 16px;
}

/* Right pane: flat full-space documentation surface */
.doc_main {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  padding: 0;
  background: #f8fafc;
}

.doc_page .txdoc {
  margin: 0;
}

/* Home page */
.doc_home_card {
  max-width: none;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 22px 28px 12px;
  box-shadow: none;
}

.doc_home_card h1 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 26px;
  line-height: 1.15;
}

.doc_home_card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.doc_home_grid {
  max-width: none;
  margin: 0;
  padding: 10px 28px 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.doc_home_tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  box-shadow: none;
}

.doc_home_tile h2 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 16px;
}

.doc_home_tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}


@media (max-width: 850px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .doc_shell {
    height: 100dvh;
  }

  .doc_topnav {
    height: 54px;
    padding: 0 12px;
    z-index: 1000;
  }

  .doc_logo_text {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .doc_layout {
    position: relative;
    display: block;
    height: calc(100dvh - 54px);
    min-height: 0;
    overflow: hidden;
  }

  .doc_sidebar {
    position: fixed;
    top: 54px;
    left: 0;
    bottom: 0;
    width: 86vw;
    max-width: 360px;
    height: auto;
    max-height: none;
    z-index: 900;
    padding: 14px;
    background: #ffffff;
    border-right: 1px solid var(--border);
    border-bottom: 0;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
    transform: translateX(0);
    transition: transform 0.2s ease;
  }

  .doc_sidebar.closed {
    display: block;
    width: 86vw;
    max-width: 360px;
    padding: 14px;
    transform: translateX(-105%);
    overflow-y: auto;
  }

  .doc_sidebar::after {
    content: "";
    position: fixed;
    top: 0;
    left: 100%;
    width: 100vw;
    height: 100%;
    background: rgba(15, 23, 42, 0.45);
    pointer-events: none;
  }

  .doc_sidebar.closed::after {
    display: none;
  }

  .doc_main {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
  }

  .doc_home_grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .txdoc {
    padding: 16px;
  }

  .txdoc_title,
  .doc_home_card h1 {
    font-size: 22px;
  }

  .txdoc_intro {
    max-width: none;
  }

  .txdoc_tab_buttons {
    display: block;
  }

  .txdoc_tab_button {
    width: 100%;
    text-align: left;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .txdoc_param_table,
  .txdoc_cli_param_table,
  .txdoc_wasm_param_table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }

  .txdoc_code,
  .txdoc_codeblock {
    overflow-x: auto;
    white-space: pre;
    font-size: 11px;
  }

  .txdoc_tab_content {
    padding: 12px;
  }

  .doc_home_card,
  .doc_home_grid {
    padding-left: 16px;
    padding-right: 16px;
  }
}
