:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", sans-serif;
  background: #101312;
  color: #f1f5ef;
  --muted: #aeb9b1;
  --surface: #171d19;
  --border: #344039;
  --accent: #b9ed9a;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a { color: var(--accent); }
.top {
  padding: 20px clamp(20px, 6vw, 96px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  background: #151a17;
}
.brand, nav a { text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; color: #f1f5ef; font-size: 1.05rem; font-weight: 700; }
.mark { display: grid; place-items: center; background: var(--accent); color: #192813; border-radius: 7px; width: 31px; height: 31px; font-size: 1.6rem; }
nav { display: flex; gap: 24px; font-size: .85rem; white-space: nowrap; }
nav a { color: var(--muted); }
nav a:hover { color: var(--accent); }
main { max-width: 1660px; padding: 44px clamp(20px, 6vw, 96px) 55px; margin: auto; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 35px; }
h1 { margin: 0; font-size: clamp(2.9rem, 6.3vw, 5.8rem); line-height: .98; letter-spacing: -.065em; font-weight: 720; }
.intro p { margin: 22px 0 0; max-width: 490px; line-height: 1.6; color: var(--muted); }
.connection { margin: 0; min-width: 208px; border-top: 1px solid var(--border); }
.connection div { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); padding: 10px 0; font: .83rem var(--mono); }
.connection dt { color: var(--muted); }
.connection dd { margin: 0; color: var(--accent); }
.workspace { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 14px; }
.library, .console { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.library { padding: 18px 14px; }
.library h2 { display: flex; justify-content: space-between; margin: 0 0 20px; padding: 0 3px; font-size: 1rem; }
#tool-count { color: var(--muted); font: .76rem var(--mono); }
.credentials label { display: block; color: var(--muted); font-size: .74rem; margin-bottom: 7px; }
.input-with-action { display: flex; gap: 6px; }
input, textarea { border: 1px solid var(--border); background: #101512; border-radius: 6px; }
input { min-width: 0; width: 100%; padding: 8px; font-size: .8rem; }
.input-with-action button, .pane-head button { border: 1px solid var(--border); border-radius: 6px; background: #202922; padding: 7px; font-size: .74rem; white-space: nowrap; }
#filter { margin: 12px 0 9px; }
.tools { display: grid; gap: 4px; align-content: start; overflow: auto; overflow-x: hidden; max-height: 390px; }
.tool { border: 1px solid transparent; text-align: left; background: transparent; border-radius: 6px; padding: 9px 8px; font: .75rem var(--mono); overflow-wrap: anywhere; }
.tool[aria-pressed="true"], .tool:hover { background: #25331f; border-color: #43543c; color: var(--accent); }
.tools p { color: var(--muted); font-size: .85rem; margin: 8px; }
.tool-head { padding: 20px 20px 15px; }
.tool-head h2 { margin: 8px 0; font: 600 clamp(1.12rem, 2.2vw, 1.6rem) var(--mono); overflow-wrap: anywhere; }
.tool-head p { color: var(--muted); font-size: .88rem; margin: 0; line-height: 1.5; }
.route { color: var(--accent); font: .76rem var(--mono); overflow-wrap: anywhere; }
.console-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 12px; }
.pane { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border); border-radius: 8px; background: #101512; overflow: hidden; }
.pane-head { min-height: 48px; display: flex; gap: 6px; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.pane-head label, .pane-head h3 { margin: 0; font-size: .8rem; font-weight: 650; }
#status { font: .74rem var(--mono); color: var(--accent); }
#status.failed { color: #ffacaa; }
textarea, pre { margin: 0; font: .82rem/1.6 var(--mono); tab-size: 2; }
textarea { flex: 1; width: 100%; padding: 14px 12px; border: 0; min-height: 260px; resize: vertical; border-radius: 0; }
textarea:focus-visible { outline-offset: -2px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 14px 12px; color: #bce6aa; max-height: 320px; overflow: auto; }
.actions { padding: 10px 12px; border-top: 1px solid var(--border); }
#run { background: var(--accent); color: #182213; border: 0; border-radius: 5px; font-weight: 700; padding: 9px 13px; font-size: .8rem; }
#run span { padding-left: 6px; }
.schema { margin: 12px; color: var(--muted); font-size: .8rem; }
summary { cursor: pointer; padding: 8px; }
#downloads { display: flex; gap: 5px; flex-wrap: wrap; padding: 0 12px 9px; }
#downloads button, #downloads a { padding: 4px 7px; font: .72rem var(--mono); color: inherit; text-decoration: none; background: #263321; border: 1px solid #485c3c; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 900px) {
  .workspace { grid-template-columns: 206px minmax(0, 1fr); }
  .console-grid { grid-template-columns: minmax(0, 1fr); }
  textarea { min-height: 192px; }
}
@media (max-width: 620px) {
  .top { gap: 12px; padding: 16px 18px; }
  .brand { font-size: .87rem; }
  nav { gap: 8px; font-size: .72rem; }
  nav a:last-child { display: none; }
  main { padding-top: 33px; }
  .intro { display: block; }
  .connection { margin-top: 19px; }
  .workspace { display: flex; flex-direction: column; }
  .tools { max-height: 150px; }
}
