:root {
  --ink: #172b2c;
  --muted: #54696a;
  --accent: #a83d17;
  --orange: #ff6e37;
  --border: #cbd4cf;
  --soft: #f3f6f2;
  --paper: #fcfdf9;
  font:
    100%/1.5 "Inter",
    "Helvetica Neue",
    Arial,
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
a {
  color: var(--accent);
  text-underline-offset: 0.25em;
}
button,
select {
  cursor: pointer;
}
button {
  border: 1px solid #a8b8ae;
  background: var(--paper);
  border-radius: 0.4rem;
  color: var(--ink);
  padding: 0.54rem 0.9rem;
  font-weight: 600;
}
button:hover:not(:disabled) {
  background: #edf1ea;
}
button:disabled {
  cursor: default;
  opacity: 0.48;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #dc6b31;
  outline-offset: 2px;
}
.wrap {
  width: min(73rem, calc(100% - 3rem));
  margin: auto;
}
.mast {
  border-bottom: 1px solid var(--border);
  background: var(--paper);
}
.mast-inner,
.brand,
nav,
.locale,
.intro-line,
.panel-head,
.panel-head h2,
.section-head,
.buttons,
.console-title,
.pager,
footer {
  display: flex;
  align-items: center;
}
.mast-inner {
  gap: 2rem;
  min-height: 4.2rem;
}
.brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.055em;
  gap: 0.65rem;
}
.brand-thin {
  font-weight: 500;
}
.brand-icon {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #ff8446;
  border-radius: 0.48rem;
  width: 2rem;
  height: 2rem;
  font: 800 2rem/1 monospace;
}
nav {
  gap: 1.4rem;
  margin-inline-start: auto;
}
nav a,
.panel-head a {
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 650;
}
.locale {
  gap: 0.3rem;
}
.locale select {
  max-width: 10rem;
}
.intro {
  padding: clamp(2.4rem, 5vw, 4.5rem) 0 2rem;
}
.intro-line {
  gap: 0.6rem;
  font:
    600 0.83rem/1.4 ui-monospace,
    monospace;
  letter-spacing: 0.05em;
}
.protocol {
  color: var(--accent);
}
.version,
.hint,
.section-head p {
  color: var(--muted);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  margin: 0.45rem 0 0.55rem;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  letter-spacing: -0.065em;
  line-height: 1.12;
}
h2 {
  font-size: clamp(1.28rem, 2vw, 1.85rem);
  letter-spacing: -0.04em;
}
.intro p {
  max-width: 65ch;
  color: var(--muted);
  font-size: 1.05rem;
}
.panel {
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: white;
  overflow: hidden;
}
.panel-head,
.section-head {
  justify-content: space-between;
  gap: 1rem;
}
.panel-head {
  padding: 0.85rem 1.35rem;
  border-bottom: 1px solid var(--border);
}
.panel-head h2 {
  font-size: 1.15rem;
  gap: 0.6rem;
}
.terminal-mark {
  font: 700 1.2rem/1 monospace;
  color: var(--accent);
}
.work-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.work-grid form,
.console {
  padding: 1.35rem;
}
.method-tabs {
  display: inline-flex;
  gap: 0.25rem;
  background: var(--soft);
  border-radius: 0.45rem;
  padding: 0.23rem;
}
.method-tabs button {
  font:
    600 0.87rem ui-monospace,
    monospace;
  border: 0;
  background: none;
  padding: 0.48rem 0.9rem;
}
.method-tabs button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
}
.work-grid label,
.admin label {
  display: grid;
  gap: 0.28rem;
  font-weight: 600;
  font-size: 0.89rem;
  margin-top: 0.8rem;
}
.work-grid input,
.work-grid textarea,
.work-grid select,
.locale select,
.admin input,
.admin select {
  border: 1px solid #afbeb3;
  border-radius: 0.35rem;
  background: white;
  color: var(--ink);
  padding: 0.44rem 0.6rem;
  min-width: 0;
  width: 100%;
}
.work-grid input,
.work-grid textarea,
code,
pre,
.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.work-grid input,
.work-grid textarea {
  font-size: 0.9rem;
}
.work-grid textarea {
  resize: vertical;
}
.pair {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 0.75rem;
}
.hint {
  font-size: 0.85rem;
  margin-top: 0.32rem;
}
.buttons {
  gap: 0.6rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.primary:hover:not(:disabled) {
  background: #843012;
}
.console {
  display: flex;
  flex-direction: column;
  background: #152829;
  color: #e2eee6;
  min-width: 0;
}
.console-title {
  font:
    600 1rem ui-monospace,
    monospace;
  gap: 0.6rem;
  padding: 0.2rem 0 0.85rem;
  border-bottom: 1px solid #405352;
}
.led {
  background: #ff8350;
  width: 0.56rem;
  height: 0.56rem;
  border-radius: 100%;
}
.terminal-section {
  padding: 0.95rem 0;
  border-bottom: 1px solid #354948;
  min-width: 0;
}
.terminal-section.grow {
  border: 0;
}
.terminal-section h3 {
  margin-bottom: 0.4rem;
  color: #adc2b6;
  font:
    600 0.79rem/1.5 ui-monospace,
    monospace;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}
.terminal-section pre,
.terminal-section code,
output {
  display: block;
  margin: 0;
  font:
    normal 0.88rem/1.55 ui-monospace,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 18rem;
  overflow: auto;
}
.terminal-section code {
  color: #ffbf94;
}
.section {
  margin: 3rem 0;
  scroll-margin: 1rem;
}
.section-head {
  margin-bottom: 1rem;
}
.section-head p {
  margin: 0.3rem 0;
}
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(8rem, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 0.87rem 1.15rem;
  font-size: 0.9rem;
}
.row > * {
  min-width: 0;
  overflow-wrap: anywhere;
}
.list-head {
  background: var(--soft);
  color: var(--muted);
}
.entry {
  border-top: 1px solid var(--border);
}
.entry summary {
  cursor: pointer;
}
.entry summary .mono {
  color: var(--accent);
  text-decoration: underline;
}
.value-snippet {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.preview,
.doc-list pre,
.admin pre {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  padding: 0.9rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 18rem;
  overflow: auto;
}
.preview {
  margin: 0 1rem 1rem;
}
.pager {
  justify-content: flex-end;
  gap: 0.85rem;
  margin-top: 0.75rem;
}
#list-message:not(:empty) {
  padding: 1.5rem;
  color: var(--muted);
  text-align: center;
}
.doc-list {
  margin-top: 1rem;
}
.doc-list details {
  padding: 0.85rem 1.2rem;
}
.doc-list details + details {
  border-top: 1px solid var(--border);
}
summary {
  cursor: pointer;
  font-weight: 650;
}
.doc-list summary code {
  margin-inline-start: 0.5rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.doc-list p,
.doc-list pre {
  margin-top: 0.65rem;
}
.doc-list pre {
  direction: ltr;
  text-align: left;
  border-radius: 0.4rem;
}
.doc-list dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
}
.doc-list dt {
  font-family: monospace;
  font-weight: 700;
}
.doc-list dd {
  margin: 0;
}
footer {
  border-top: 1px solid var(--border);
  justify-content: space-between;
  padding: 1.2rem 0;
  color: var(--muted);
  font-size: 0.88rem;
}
#notice:not(:empty) {
  position: fixed;
  bottom: 1rem;
  inset-inline-end: 1rem;
  max-width: 90vw;
  padding: 0.65rem 1rem;
  background: var(--ink);
  color: white;
  border-radius: 0.45rem;
}
.admin .panel {
  padding: 1rem;
  margin: 1rem 0;
}
.admin .fields {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.6rem;
}
.admin table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}
.admin th,
.admin td {
  border-bottom: 1px solid var(--border);
  text-align: start;
  padding: 0.6rem;
  max-width: 24rem;
  overflow-wrap: anywhere;
}
.scroller {
  overflow: auto;
  margin: 1rem 0;
}
.admin h3 {
  margin-top: 1rem;
}
.admin .metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.metrics div {
  background: var(--soft);
  padding: 0.65rem;
}
.metrics dd {
  font-weight: 700;
  margin: 0;
}
[hidden] {
  display: none !important;
}
@media (max-width: 48rem) {
  .wrap {
    width: calc(100% - 1.5rem);
  }
  .mast-inner {
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.65rem 0;
  }
  nav {
    gap: 0.65rem;
  }
  .locale {
    margin-inline-start: auto;
  }
  .work-grid {
    grid-template-columns: 1fr;
  }
  .work-grid form,
  .console,
  .panel-head {
    padding: 1rem;
  }
  .section {
    margin: 2rem 0;
  }
  .row {
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 0.7rem;
  }
  .list-head {
    display: none;
  }
  .entry time:before {
    content: attr(data-label) " ";
    font-size: 0.78rem;
    color: var(--muted);
  }
  .entry time {
    font-size: 0.82rem;
  }
  .section-head {
    align-items: end;
  }
}
@media (max-width: 30rem) {
  .mast-inner nav {
    order: 3;
    width: 100%;
    margin: 0;
  }
  .pair {
    grid-template-columns: 1fr;
  }
  .entry .row {
    grid-template-columns: 1fr;
  }
  .section-head {
    align-items: start;
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
}
.clipboard-helper {
  position: fixed;
  inset-inline-start: -10000px;
  top: 0;
}
.admin .key-preview {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  text-decoration: underline;
  text-align: start;
  overflow-wrap: anywhere;
}
.admin #keys table,
.admin #logs table {
  min-width: 58rem;
}
.admin .scroller pre {
  max-width: min(65rem, 80vw);
  margin-top: 0.4rem;
}
.docs-page {
  margin-bottom: 3rem;
}
#read-created {
  align-self: start;
  margin-top: 0.65rem;
}
.network-table {
  min-width: 50rem;
}
.network-table td {
  white-space: pre-line;
}
.network-table input,
.network-table textarea {
  min-width: 14rem;
}
.network-table textarea {
  width: 100%;
  border: 1px solid #afbeb3;
  padding: 0.44rem 0.6rem;
  border-radius: 0.35rem;
  font: inherit;
  color: inherit;
}
.copy-code {
  width: 100%;
  text-align: start;
  color: var(--accent);
  background: var(--soft);
  font: inherit;
  direction: ltr;
  overflow-wrap: anywhere;
}
.doc-list > details > .copy-code {
  margin-top: 0.6rem;
  width: auto;
  font:
    0.9rem ui-monospace,
    monospace;
}
.doc-list pre .copy-code {
  border: 0;
  padding: 0;
  white-space: pre-wrap;
  text-align: left;
  color: var(--ink);
}
.doc-list h3 {
  margin-top: 1rem;
  font-size: 1rem;
}
.params {
  border-collapse: collapse;
  margin-top: 0.5rem;
}
.params th,
.params td {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  text-align: start;
}
.workspace-tabs {
  margin-bottom: 0.75rem;
}
.queue-panel {
  padding: 1.35rem;
}
.queue-panel form {
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.queue-panel label,
.chat-compose label {
  display: grid;
  gap: 0.3rem;
  font-weight: 600;
}
.queue-panel input,
.chat-compose textarea {
  border: 1px solid #afbeb3;
  padding: 0.55rem 0.7rem;
  border-radius: 0.4rem;
  font: inherit;
  color: var(--ink);
  background: white;
}
.queue-panel label.toggle,
.work-grid label.toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.work-grid .toggle input {
  width: auto;
  accent-color: var(--accent);
}
.workspace-tabs button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
}
.chat {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
.chat-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 0.9rem 0;
}
.chat-heading {
  margin-bottom: 0.8rem;
}
.chat-heading h1 {
  font:
    650 clamp(1.25rem, 3vw, 2rem) / 1.3 ui-monospace,
    monospace;
  overflow-wrap: anywhere;
  max-height: 4.3em;
  overflow: auto;
  letter-spacing: -0.035em;
}
.chat-frame {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  overflow: hidden;
}
.chat-scroll {
  flex: 1;
  overflow: auto;
  padding: 1rem;
}
.chat-scroll ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.chat-scroll li + li {
  margin-top: 0.85rem;
}
.chat-scroll pre {
  margin: 0.15rem 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}
.chat-scroll time {
  font:
    normal 0.8rem ui-monospace,
    monospace;
  color: var(--muted);
}
.chat-compose {
  display: flex;
  align-items: end;
  gap: 0.75rem;
  padding: 0.8rem;
  border-top: 1px solid var(--border);
  background: var(--soft);
}
.chat-compose label {
  flex: 1;
  min-width: 0;
}
.chat-compose textarea {
  width: 100%;
  resize: vertical;
  max-height: 20vh;
}
.chat-status:not(:empty) {
  padding: 0.35rem 0.8rem;
  color: var(--accent);
}
@media (max-width: 480px) {
  .chat .mast-inner nav {
    order: 0;
    width: auto;
  }
  .queue-panel form > * {
    width: 100%;
  }
}

.docs-page > details {
  padding: 1rem clamp(1rem, 3vw, 2rem);
}
.docs-page > details > summary {
  font-size: 1.08rem;
  line-height: 1.5;
}
.docs-page p,
.docs-page dl {
  max-width: 74ch;
  line-height: 1.65;
}
.docs-page .params {
  width: min(100%, 44rem);
  font-variant-numeric: tabular-nums;
}
.docs-page details details {
  padding: 0.7rem 0;
  margin-top: 0.4rem;
  border-top: 1px solid var(--border);
}
.docs-page details details summary {
  color: var(--accent);
  font-size: 0.94rem;
}
.docs-page > details > .copy-code {
  font: inherit;
  font-size: 0.84rem;
  direction: inherit;
}

.row.queue-row {
  grid-template-columns: minmax(0, 2fr) minmax(7rem, 1fr);
}

.chat-compose label.chat-ttl {
  flex: 0 1 9rem;
}
.chat-ttl input {
  width: 100%;
  min-width: 0;
  border: 1px solid #afbeb3;
  border-radius: 0.4rem;
  padding: 0.55rem 0.6rem;
  background: white;
  color: var(--ink);
}
@media (max-width: 38rem) {
  .chat-compose {
    display: grid;
    grid-template-columns: 1fr auto;
  }
  .chat-compose label:first-child {
    grid-column: 1 / -1;
  }
  .chat-compose label.chat-ttl {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }
  .chat-ttl input {
    max-width: 8rem;
  }
}
