/* ==========================================================================
   Two draggable Kali-style terminal windows (home experience B).
   Namespaced under .term / .terms.
   ========================================================================== */
.terms {
  position: relative;
  margin: 18px 0 0 0;
  min-height: 512px;
  font-family: "DejaVu Sans Mono", "Roboto Mono", "Liberation Mono", Menlo, Consolas, monospace;
}

.term {
  position: absolute;
  width: 540px;
  max-width: 100%;
  background: #000;
  border: 1px solid #0a0a0a;
  border-radius: 6px 6px 3px 3px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  color: #d0d0d0;
  font-size: 12.5px;
  line-height: 1.32;
}
#term1 { left: 0;    top: 0;    z-index: 2; }
#term2 { left: 280px; top: 150px; z-index: 1; }
.term.is-dragging { box-shadow: 0 26px 64px rgba(0, 0, 0, 0.6); }

.term * { box-sizing: border-box; }

/* title bar */
.term-titlebar {
  display: flex;
  align-items: center;
  height: 26px;
  padding: 0 8px;
  background: linear-gradient(#4a4a4a, #383838);
  border-bottom: 1px solid #000;
  cursor: grab;
  touch-action: none;
}
.term.is-dragging .term-titlebar { cursor: grabbing; }
.term-title {
  flex: 1;
  text-align: center;
  font-family: "DejaVu Sans", Arial, sans-serif;
  font-size: 12px;
  color: #e8e8e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.term-btns { display: flex; gap: 6px; align-items: center; width: 58px; justify-content: flex-end; }
.term-btns-left { justify-content: flex-start; }
.term-btns i {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #6a6a6a;
  display: inline-block;
  position: relative;
}
.term-btns i.min { background: #d8b12a; }
.term-btns i.max { background: #4a9a4a; }
.term-btns i.cls { background: #c0392b; }

/* menu bar */
.term-menubar {
  display: flex;
  gap: 16px;
  padding: 3px 10px;
  background: #2b2b2b;
  border-bottom: 1px solid #000;
  font-family: "DejaVu Sans", Arial, sans-serif;
  font-size: 12px;
  color: #cfcfcf;
}

/* body / scrollback */
.term-body { background: #000; }
.term-scroll {
  height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 8px 8px;
}
.term-scroll::-webkit-scrollbar { width: 10px; }
.term-scroll::-webkit-scrollbar-thumb { background: #2a2a2a; }
.term-scroll::-webkit-scrollbar-track { background: #000; }

.ln { min-height: 1.32em; white-space: pre-wrap; word-break: break-word; }
.ln.warn { color: #d7d75f; }
.ln.dim  { color: #9a9a9a; }
.ln.err  { color: #ff6b6b; }
.ln.ok   { color: #8fd98f; }

/* bash prompt colours */
.p-user { color: #ff5555; font-weight: bold; }
.p-c    { color: #d0d0d0; }
.p-dir  { color: #5f8fff; font-weight: bold; }
.p-h    { color: #d0d0d0; }
/* r2 prompt */
.p-r2   { color: #34c6c6; }

/* r2 disassembly columns */
.ln.r2 { white-space: pre; }
.ln.r2 .ar { color: #34c6c6; display: inline-block; width: 4ch; }
.ln.r2 .ad { color: #2f9f6f; display: inline-block; width: 12ch; }
.ln.r2 .by { color: #7fbf9f; display: inline-block; width: 12ch; }
.ln.r2 .as { color: #d0d0d0; }
.mn-mov { color: #5fd7a7; }
.mn-alu { color: #86c98a; }
.mn-jmp { color: #e0a83a; }
.mn-int { color: #ff6b6b; }
.mn-nop { color: #5f8fff; }
.cmt    { color: #6f7f6f; }

/* live input line */
.term-inputline { display: flex; align-items: baseline; flex-wrap: wrap; }
.term-prompt { white-space: pre; }
.term-typed { white-space: pre-wrap; color: #f0f0f0; }
.term-cursor {
  display: inline-block;
  width: 7px; height: 1em;
  background: #e5e5e5;
  vertical-align: text-bottom;
  margin-left: 1px;
  opacity: 0;
}
.term.is-focused .term-cursor { animation: term-blink 1.05s steps(1) infinite; }
@keyframes term-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
.term-input {
  flex: 0 0 1px;
  width: 1px;
  min-width: 0;
  opacity: 0;
  border: 0; padding: 0; margin: 0;
  background: transparent;
  color: transparent;
  font: inherit;
  outline: none;
}

.terms-hint {
  font-family: var(--ui, Verdana, sans-serif);
  font-size: 12px;
  color: #8a8a8a;
  margin: 8px 0 0 0;
}
.terms-hint code {
  font-family: "DejaVu Sans Mono", monospace;
  background: #ededed;
  padding: 0 3px;
}

/* mobile: stack, no dragging */
@media (max-width: 1079px) {
  .terms { min-height: 0; }
  .term {
    position: static !important;
    width: 100%;
    margin: 0 0 16px 0;
    z-index: auto !important;
  }
  .term-titlebar { cursor: default; }
  .term-scroll { height: 260px; font-size: 12px; }
  .term-menubar { gap: 12px; }
}
