/* Real terminal styles — for TerminalDemo.jsx */

.rt-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
}

.rt-aside { display: flex; flex-direction: column; }

.rt-scenarios { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.rt-sc-btn {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--paper-2);
  text-align: left;
  font-family: inherit;
  padding: 14px;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 14px;
  align-items: flex-start;
  transition: all 140ms ease;
}
.rt-sc-btn:hover { background: rgba(236,229,211,0.03); border-color: var(--line); }
.rt-sc-btn.active { background: rgba(212,168,90,0.06); border-color: rgba(212,168,90,0.25); color: var(--paper-0); }
.rt-sc-idx { color: var(--paper-4); font-size: 11px; padding-top: 2px; }
.rt-sc-btn.active .rt-sc-idx { color: var(--halo); }
.rt-sc-text { display: flex; flex-direction: column; gap: 4px; }
.rt-sc-title { font-size: 14px; color: var(--paper-0); font-weight: 500; }
.rt-sc-blurb { font-size: 12px; color: var(--paper-4); line-height: 1.45; }

.rt-controls { display: flex; gap: 8px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.rt-controls .btn { padding: 7px 12px; font-size: 12px; }
.rt-meta { margin-top: 14px; }

/* terminal frame */
.rt-frame {
  background: #0a0907;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.7), 0 0 0 1px rgba(0,0,0,0.4) inset;
  display: flex;
  flex-direction: column;
  min-height: 540px;
  position: relative;
}
.rt-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #131210;
  border-bottom: 1px solid var(--line);
}
.rt-bar-dots { display: flex; gap: 6px; }
.rt-bar-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-4); }
.rt-bar-dot.r { background: #5d4540; }
.rt-bar-dot.y { background: #5d4f33; }
.rt-bar-dot.g { background: #3d5a3a; }

.rt-body {
  flex: 1;
  padding: 18px 22px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--paper-1);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  scroll-behavior: smooth;
  max-height: 540px;
}

.rt-body::-webkit-scrollbar { width: 8px; }
.rt-body::-webkit-scrollbar-track { background: transparent; }
.rt-body::-webkit-scrollbar-thumb { background: var(--ink-4); border-radius: 4px; }

.rt-line {
  white-space: pre-wrap;
  word-break: break-word;
  animation: rt-line-in 80ms ease-out;
}
@keyframes rt-line-in {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: none; }
}

.rt-prompt { color: var(--sage); user-select: none; }
.rt-input-text { color: var(--paper-0); }
.rt-out { color: var(--paper-2); }
.rt-ai { color: var(--halo); }
.rt-ok { color: var(--sage); }
.rt-err { color: var(--oxide); }
.rt-faint { color: var(--paper-5); margin-top: 12px; font-style: italic; }
.rt-danger { color: var(--oxide); }
.rt-safe { color: var(--sage); }

.rt-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--paper-1);
  vertical-align: -2px;
  margin-left: 2px;
  animation: rt-blink 1s steps(2) infinite;
}
@keyframes rt-blink { 50% { opacity: 0; } }

/* floating modal overlay */
.rt-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 9, 7, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 24px;
  animation: rt-overlay-in 180ms ease-out;
}
@keyframes rt-overlay-in {
  from { opacity: 0; backdrop-filter: blur(0); }
  to   { opacity: 1; backdrop-filter: blur(6px); }
}

.rt-modal {
  width: 100%;
  max-width: 620px;
  max-height: calc(100% - 8px);
  overflow-y: auto;
  background: linear-gradient(180deg, #1a1815 0%, #131210 100%);
  border: 1px solid rgba(208, 87, 60, 0.35);
  border-radius: 12px;
  box-shadow: 0 40px 120px -30px rgba(0,0,0,0.9), 0 0 0 1px rgba(208,87,60,0.15) inset;
  padding: 22px;
  font-family: var(--font-sans);
  animation: rt-modal-in 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes rt-modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.rt-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.rt-modal-warn {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--oxide);
  box-shadow: 0 0 0 6px rgba(208, 87, 60, 0.14);
  animation: rt-pulse 2s ease-in-out infinite;
}
@keyframes rt-pulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(208, 87, 60, 0.14); }
  50%      { box-shadow: 0 0 0 9px rgba(208, 87, 60, 0.06); }
}

.rt-modal-rows { display: flex; flex-direction: column; }
.rt-modal-row { display: grid; grid-template-columns: 110px 1fr; gap: 18px; padding: 10px 0; border-top: 1px solid var(--line); }
.rt-modal-row:first-child { border-top: none; }
.rt-modal-key { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--paper-4); padding-top: 3px; }
.rt-modal-val { color: var(--paper-1); font-size: 13px; line-height: 1.55; }

.rt-commits { display: flex; flex-direction: column; gap: 4px; }
.rt-commit { display: flex; gap: 12px; align-items: center; font-family: var(--font-mono); font-size: 12px; }

.rt-modal-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.rt-modal-list li { font-size: 12.5px; color: var(--paper-1); }

.rt-typed { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.rt-typed-input {
  width: 100%;
  background: #0a0907;
  border: 1px solid var(--line-3);
  border-radius: 6px;
  color: var(--paper-0);
  font-size: 15px;
  padding: 10px 12px;
  outline: none;
  font-family: var(--font-mono);
}
.rt-typed-input:focus { border-color: var(--oxide); box-shadow: 0 0 0 3px rgba(208, 87, 60, 0.18); }

.rt-modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.rt-modal-actions .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.rt-shake { animation: rt-shake 280ms ease-in-out; }
@keyframes rt-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

@media (max-width: 980px) {
  .rt-grid { grid-template-columns: 1fr; }
  .rt-modal-row { grid-template-columns: 1fr; gap: 4px; }
}

.rt-replay {
  border-color: rgba(212,168,90,0.4) !important;
  color: var(--halo) !important;
}
.rt-replay:hover { background: rgba(212,168,90,0.08) !important; }

.rt-done { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }

/* ----- Methodology comparison panel ----- */

.rt-meth {
  padding: 36px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(236,229,211,0.025), rgba(236,229,211,0.005));
}
.rt-meth-head { max-width: 720px; }
.rt-meth-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}
.rt-meth-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}
.rt-meth-table th,
.rt-meth-table td {
  padding: 12px 14px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--paper-2);
}
.rt-meth-table tbody tr:last-child th,
.rt-meth-table tbody tr:last-child td { border-bottom: none; }
.rt-meth-table th {
  background: rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
}
.rt-meth-dim-head {
  text-align: left !important;
  font-family: var(--font-mono);
  font-size: 10.5px !important;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--paper-4) !important;
  min-width: 220px;
}
.rt-meth-dim {
  text-align: left !important;
  color: var(--paper-1) !important;
  font-size: 13px !important;
  min-width: 220px;
}
.rt-meth-hl {
  background: rgba(212, 168, 90, 0.08);
}
.rt-meth-table th.rt-meth-hl {
  background: rgba(212, 168, 90, 0.16);
}
.rt-meth-yes {
  display: inline-block;
  min-width: 28px;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--sage);
  background: rgba(106, 148, 121, 0.12);
  padding: 4px 10px;
  border-radius: 4px;
  line-height: 1;
}
.rt-meth-no {
  font-family: var(--font-mono);
  color: var(--paper-5);
  font-size: 14px;
}
.rt-meth-val {
  color: var(--paper-2);
  font-size: 12px;
  line-height: 1.4;
}
.rt-meth-star {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--halo);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  padding: 4px 8px;
  background: rgba(212, 168, 90, 0.1);
  border: 1px solid rgba(212, 168, 90, 0.3);
  border-radius: 4px;
}
.rt-meth-mark {
  font-family: var(--font-mono);
  color: var(--halo);
}
.rt-meth-text {
  color: var(--paper-0);
}

@media (max-width: 860px) {
  .rt-meth { padding: 22px; }
  .rt-meth-dim-head, .rt-meth-dim { min-width: 180px; }
}
.rt-replay-cta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 10px;
  padding: 10px 16px;
  background: rgba(212,168,90,0.08);
  border: 1px solid rgba(212,168,90,0.3);
  border-radius: 8px;
  color: var(--halo);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  transition: all 140ms ease;
}
.rt-replay-cta:hover {
  background: rgba(212,168,90,0.15);
  border-color: var(--halo);
}
