/* knossos.bar /terminal: loaded after css/site.css and css/app.css, so the page keeps the app's head, tabs and palette
   (.app). The console is a forest-ink panel in Geist Mono with lime for the prompt and aqua for links. */

.term-page .app-head{margin-bottom:40px}
/* the header's menu toggle has no box of its own; on this page it gets a full 44px tap height (it looks the same) */
.site-header .menu-toggle{min-height:44px}
.term-page .app-tabs{margin-bottom:44px}

.term{--t-bg:#0f2418;--t-panel:#132c1d;--t-line:#264731;--t-fg:#dcebdd;--t-dim:#93b09a;--t-strong:#ffffff;--t-lime:#b2e177;--t-aqua:#9fede5;--t-err:#ffb3bf;--t-warn:#f3d38a;
  position:relative;display:flex;flex-direction:column;min-width:0;background:var(--t-bg);color:var(--t-fg);border:1px solid #0a1a10;box-shadow:0 30px 60px #15331e33;
  font:14px/1.6 Geist Mono,ui-monospace,monospace;overflow-wrap:anywhere}
.term:focus-within{box-shadow:0 0 0 2px #4f845b,0 30px 60px #15331e33}

.term-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:40px;padding:0 16px;border-bottom:1px solid var(--t-line);background:var(--t-panel);
  font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--t-dim)}
.term-bar span{display:inline-flex;align-items:center;gap:8px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.term-bar i{width:7px;height:7px;flex-shrink:0;background:var(--t-dim)}
.term-bar .is-net i{background:var(--t-warn)}
.term-bar .is-net.is-ok i{background:var(--t-lime)}
.term-bar [data-term-acct].is-on{color:var(--t-fg)}
.term[data-watch=on] .term-bar .is-watch{display:inline-flex}
.term-bar .is-watch{display:none;color:var(--t-aqua)}

.term-out{height:min(64vh,640px);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:16px 18px 8px;scrollbar-width:thin;scrollbar-color:#36603f transparent;-webkit-overflow-scrolling:touch}
.term-out:focus-visible{outline:2px solid var(--t-aqua);outline-offset:-2px}

.t-block{margin:0 0 14px}
.t-block.is-watch,.t-block.is-note,.t-block.is-tab{margin-top:-6px}
.t-line{min-width:0;white-space:pre-wrap;overflow-wrap:anywhere}
.t-echo{color:var(--t-strong)}
.t-ps{color:var(--t-lime)}
.t-cmd{color:var(--t-strong)}
.t-strong{color:var(--t-strong);font-weight:500}
.t-dim{color:var(--t-dim)}
.t-err{color:var(--t-err)}
.t-warn{color:var(--t-warn)}
.t-ok{color:var(--t-lime)}
.t-run{color:var(--t-aqua)}
.t-ask{color:var(--t-warn);font-weight:500}
.t-fn{color:var(--t-aqua)}
.t-head{margin-top:10px;color:var(--t-lime);text-transform:uppercase;font-size:12px;letter-spacing:.06em}
.t-head:first-of-type{margin-top:0}
.t-cmdname{color:var(--t-strong)}
.t-wait::after{content:"";display:inline-block;width:7px;height:12px;margin-left:8px;background:var(--t-dim);vertical-align:-1px;animation:t-blink 1s steps(2) infinite}
.t-gap{height:8px}
.t-plan{margin-top:6px}
.t-sub{padding-left:3ch}
.t-pill{display:inline-block;padding:0 6px;line-height:1.5;font-size:12px;text-transform:uppercase;background:#264731;color:var(--t-fg)}
.t-pill.is-live{background:var(--t-lime);color:#15331e}
.t-pill.is-wait{background:#1d4a45;color:var(--t-aqua)}
.t-pill.is-stop{background:#4a2129;color:var(--t-err)}
.t-link{color:var(--t-aqua);text-decoration:underline;text-decoration-color:#9fede566;text-underline-offset:3px}
.t-link:hover{text-decoration-color:var(--t-aqua)}
.t-link:focus-visible{outline:2px solid var(--t-aqua);outline-offset:1px}
.t-addr{word-break:break-all}

/* the key column is 18ch, or wider on the one line whose key has a longer unbroken word (TICKER[:weight] on a phone),
   so a key never runs under its value */
.t-kv{display:grid;grid-template-columns:minmax(auto,18ch) minmax(0,1fr);gap:0 2ch}
.t-kv.t-sub{padding-left:0}
.t-kv.t-sub .t-k{padding-left:2ch}
.t-k{color:var(--t-dim);overflow-wrap:normal;word-break:normal}
.t-v{min-width:0}

.t-tbl{margin:4px 0 6px;min-width:0}
.t-row{display:grid;gap:0 2ch;min-width:0;padding:1px 0}
/* the head row keeps the body's font size, so its ch-sized tracks line up with the rows below; only its cells are small */
.t-row.is-head{color:var(--t-dim);text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid var(--t-line);padding-bottom:3px;margin-bottom:3px}
.t-row.is-head .t-c{font-size:12px}
.t-c{min-width:0}
/* a usage word never breaks inside ("--rate", "[--successor"); a long a|b|c word breaks only after a "|" */
.t-tok{white-space:nowrap}
.t-tbl.is-help .t-row{grid-template-columns:minmax(0,44ch) minmax(0,1fr)}
.t-tbl.is-help .is-head{display:none}
.t-tbl.is-history .t-row{grid-template-columns:5ch minmax(0,1fr)}
.t-tbl.is-history .is-head{display:none}
.t-tbl.is-contracts .t-row{grid-template-columns:minmax(0,26ch) minmax(0,1fr) 7ch}
.t-tbl.is-stocks .t-row{grid-template-columns:7ch 14ch 7ch minmax(0,14ch) minmax(0,1fr)}
.t-tbl.is-endowments .t-row{grid-template-columns:5ch 13ch minmax(0,21ch) 14ch 12ch 11ch minmax(0,1fr) 13ch}
.t-tbl.is-agent .t-row{grid-template-columns:5ch minmax(0,21ch) 16ch minmax(0,1fr)}
.t-tbl.is-marks .t-row{grid-template-columns:7ch 16ch minmax(0,1fr) 13ch 9ch}
.t-tbl.is-mandates .t-row{grid-template-columns:13ch 15ch 14ch 13ch 11ch minmax(0,16ch) minmax(0,1fr)}

.term-form{display:flex;align-items:center;gap:10px;min-width:0;padding:6px 6px 6px 18px;border-top:1px solid var(--t-line);background:var(--t-panel)}
.term-ps1{flex-shrink:0;color:var(--t-lime);white-space:nowrap;cursor:text}
.term[data-state=ask] .term-ps1{color:var(--t-warn)}
.term[data-state=busy] .term-ps1{color:var(--t-dim)}
.term-in{flex:1 1 auto;min-width:0;min-height:44px;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--t-strong);caret-color:var(--t-lime);
  font:16px/1.4 Geist Mono,ui-monospace,monospace;outline:none;-webkit-appearance:none;appearance:none}
.term-in::placeholder{color:#5f7f66}
.term-run{flex-shrink:0;min-width:64px;min-height:44px;padding:0 16px;border:1px solid #3d6b48;border-radius:0;background:#1c3b26;color:var(--t-lime);
  font:12px Geist Mono,monospace;text-transform:uppercase;cursor:pointer}
.term-run:hover{background:#25492f}
.term-run:focus-visible{outline:2px solid var(--t-aqua);outline-offset:2px}

.term-chips{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:18px}
.term-chips>span{font:11px Geist Mono,monospace;text-transform:uppercase;color:var(--muted);margin-right:4px}
.term-chips button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;padding:0 16px;border:1px solid var(--line);border-radius:0;background:#ffffff8c;
  color:var(--ink);font:12px Geist Mono,monospace;text-transform:lowercase;cursor:pointer;transition:background .25s}
.term-chips button:hover:not(:disabled){background:#d8e5d8}
.term-chips button:disabled{opacity:.45;cursor:not-allowed}
/* while a write asks send? [y/N], the chips give way to the two answers */
.term-chips .is-ask,.term-chips [data-answer]{display:none}
.term[data-state=ask]+.term-chips>*{display:none}
.term[data-state=ask]+.term-chips .is-ask{display:inline}
.term[data-state=ask]+.term-chips [data-answer]{display:inline-flex}
.term-chips [data-answer=y]{background:var(--forest);border-color:var(--forest);color:#fff}
.term-chips [data-answer=y]:hover:not(:disabled){background:#2d643b}
.term-note{margin-top:22px;max-width:760px;color:var(--muted);font-size:15px;line-height:1.55}

.term-keys{margin-top:72px}
.term-keys dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 40px;margin:0}
.term-keys dl>div{display:grid;grid-template-columns:minmax(120px,auto) 1fr;gap:16px;align-items:baseline;padding:14px 0;border-bottom:1px solid var(--line-soft)}
.term-keys dt{font:12px Geist Mono,monospace;text-transform:uppercase;color:var(--ink)}
.term-keys dd{margin:0;color:var(--muted);font-size:15px;line-height:1.5}
.term-keys kbd{display:inline-block;padding:1px 6px;border:1px solid var(--line);background:#ffffff8c;font:12px Geist Mono,monospace}

@keyframes t-blink{50%{opacity:0}}
@media (prefers-reduced-motion:reduce){.t-wait::after{animation:none}}

@media (max-width:1100px){
  .t-tbl.is-endowments .t-row,.t-tbl.is-mandates .t-row,.t-tbl.is-stocks .t-row,.t-tbl.is-marks .t-row,.t-tbl.is-agent .t-row,.t-tbl.is-contracts .t-row{display:flex;flex-wrap:wrap;gap:0 2ch;padding:4px 0;border-bottom:1px dashed var(--t-line)}
  .t-tbl.is-endowments .is-head,.t-tbl.is-mandates .is-head,.t-tbl.is-stocks .is-head,.t-tbl.is-marks .is-head,.t-tbl.is-agent .is-head,.t-tbl.is-contracts .is-head{display:none}
  .t-tbl .t-c.is-first{color:var(--t-strong)}
  .t-tbl.is-contracts .t-c:nth-child(2){flex-basis:100%}
  .t-tbl .t-row:not(.is-head) .t-c:empty{display:none}
  /* the headers are hidden here, so a cell that is only a figure or a yes carries its column's name */
  .t-tbl.is-contracts .t-c:nth-child(3)::before,.t-tbl.is-endowments .t-c:nth-child(4)::before,.t-tbl.is-agent .t-c:nth-child(3)::before,
  .t-tbl.is-marks .t-c:nth-child(4)::before,.t-tbl.is-mandates .t-c:nth-child(n+3)::before{content:attr(data-col) " ";color:var(--t-dim)}
}
@media (max-width:800px){
  .term-page .app-head{margin-bottom:28px}
  .term-page .app-tabs{margin-bottom:28px}
  .term{font-size:13px;line-height:1.55;margin-left:-8px;margin-right:-8px}
  .term-out{height:60vh;height:60svh;padding:12px 12px 6px}
  .term-bar{padding:0 12px}
  .term-form{padding:6px 6px 6px 12px;gap:8px}
  .term-ps1{font-size:13px}
  .term-run{min-width:56px;padding:0 12px}
  .t-kv{grid-template-columns:minmax(auto,15ch) minmax(0,1fr);gap:0 1.5ch}
  .t-tbl.is-help .t-row{grid-template-columns:1fr;padding:3px 0}
  .t-tbl.is-help .t-c:nth-child(2){color:var(--t-dim);padding-left:2ch}
  .term-keys{margin-top:56px}
  .term-keys dl{grid-template-columns:1fr}
}
@media (max-width:480px){
  .term-chips{gap:8px}
  .term-chips button{flex:1 1 auto;padding:0 12px}
  .t-kv{grid-template-columns:minmax(auto,14ch) minmax(0,1fr);gap:0 1ch}
  .t-sub{padding-left:2ch}
  .term-keys dl>div{grid-template-columns:1fr;gap:4px}
}
