/* home.css — animated tool mock for the nterm.ai hero.
   Loads after site.css, so it inherits the Soft Rack ladder (--s0..--s3),
   the radii and the accent containers defined there. All selectors are
   .ntm-* prefixed so the shared pages (about/help/terms/privacy) are
   unaffected. */

.ntm-frame {
  /* Mirrors the app shell exactly: left nav rail, session header, tab strip
     with the segmented layout control, terminal, one command bar. Sidebar and
     AI panel are collapsed — a real app state, both one keystroke away. */
  display: grid;
  grid-template-columns: 60px 1fr;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--s0);
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
  font-family: var(--mono);
  min-height: 340px;
}

/* ── left rail ── */
.ntm-rail {
  background: var(--s1);
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0; gap: 4px;
}
.ntm-mark { width: 22px; height: 22px; border-radius: var(--r-sm); display: block; margin-bottom: 12px; }
.ntm-r {
  width: 48px; height: 36px; border-radius: var(--r-pill); position: relative; display: block;
}
.ntm-r::before {
  content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 11px; border: 1.5px solid var(--muted); border-radius: 3px;
}
.ntm-r::after {
  content: attr(data-l); position: absolute; bottom: 4px; left: 0; right: 0;
  text-align: center; font-family: var(--body); font-size: 7.5px; line-height: 1;
  color: var(--muted); letter-spacing: 0;
}
.ntm-r.on::before { border-color: var(--text); }
.ntm-r.on::after { color: var(--text); }
.ntm-r.on { background: var(--s2); }
.ntm-rgrow { flex: 1; }

/* ── session header ── */
.ntm-body { display: flex; flex-direction: column; min-width: 0; }
.ntm-hdr {
  display: flex; align-items: center; gap: 9px; padding: 0 14px; height: 44px;
  background: var(--s0); flex-shrink: 0;
}
.ntm-led {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: 0 0 auto;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 15%, transparent);
  animation: ntm-led 3.4s ease-in-out infinite;
}
@keyframes ntm-led {
  0%,100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 15%, transparent); }
  50%     { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 24%, transparent); }
}
.ntm-host { font-family: var(--body); font-size: 12.5px; font-weight: 600; color: var(--text); }
.ntm-chip {
  font-family: var(--body); font-size: 10.5px; color: var(--muted);
  background: var(--s2); padding: 3px 10px; border-radius: var(--r-pill);
}
.ntm-hgrow { flex: 1; }
.ntm-hbtn {
  font-family: var(--body); font-size: 11px; font-weight: 500; color: var(--muted);
  padding: 5px 12px; border-radius: var(--r-pill);
}
.ntm-kbd {
  font-size: 9.5px; color: var(--muted); background: var(--s2);
  padding: 3px 8px; border-radius: 6px; flex-shrink: 0;
}

/* ── main ── */
.ntm-main {
  flex: 1; display: flex; flex-direction: column; min-height: 0;
  background: var(--s0); border-radius: 0;
}
.ntm-tabs { display: flex; align-items: center; gap: 0; padding: 0 8px; border-bottom: 1px solid var(--outline); background: var(--s1); }
.ntm-tab {
  font-size: 10px; padding: 8px 12px; border-radius: 0;
  color: var(--muted); background: transparent; white-space: nowrap;
  border-right: 1px solid var(--outline);
}
.ntm-tab.on { color: var(--text); background: var(--s0); font-weight: 500; box-shadow: inset 0 -2px 0 var(--acc); }
.ntm-seg {
  margin-left: auto; display: flex; gap: 2px; background: var(--s0);
  padding: 3px; border-radius: 6px; flex: 0 0 auto;
}
.ntm-seg b {
  font-family: var(--body); font-size: 9px; font-weight: 500; padding: 4px 10px;
  color: var(--muted); border-radius: 4px;
}
.ntm-seg b.on { background: var(--s2); color: var(--text); font-weight: 700; }

.ntm-term {
  background: var(--s0); color: #d6deea;
  font-size: 12px; line-height: 1.62;
  margin: 0; border-radius: 0;
  padding: 14px 16px; min-height: 224px;
}
.ntm-line { white-space: pre-wrap; word-break: break-word; }
.ntm-prompt { color: var(--ok); }
.ntm-dim    { color: var(--muted); }
.ntm-draft  { color: var(--accent); }          /* pending — drafted, not yet sent */
.ntm-sent   { color: var(--ok); }
.ntm-hide   { display: none; }

/* pending badge */
.ntm-pending {
  display: inline-block; margin-top: 8px;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); background: var(--acc-cont); border: none;
  border-radius: var(--r-pill); padding: 4px 11px; font-weight: 600;
}

/* confirm row */
.ntm-confirm { display: flex; gap: 7px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.ntm-btn {
  font-size: 10.5px; font-weight: 500; padding: 6px 13px; border-radius: var(--r-pill);
  border: 1px solid transparent; color: var(--muted); background: var(--s2);
}
.ntm-btn.go { background: var(--acc); color: var(--acc-ink); font-weight: 700; }
.ntm-btn.go.hit { animation: ntm-press .42s ease both; }
@keyframes ntm-press {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  40%  { transform: scale(.94);  box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 0%, transparent); }
  100% { transform: scale(1); }
}

/* Do bar */
.ntm-do {
  display: flex; align-items: center; gap: 9px;
  padding: 12px; font-size: 11px; min-height: 48px;
}
.ntm-modes {
  display: flex; gap: 2px; background: var(--s2); padding: 3px;
  border-radius: var(--r-pill); flex: 0 0 auto;
}
.ntm-modes b {
  font-family: var(--body); font-size: 9.5px; font-weight: 500;
  padding: 5px 12px; color: var(--muted); border-radius: var(--r-pill);
}
.ntm-modes b.on { background: var(--s2); color: var(--text); font-weight: 700; }
.ntm-go {
  margin-left: auto; font-family: var(--body); font-size: 10px; font-weight: 700;
  background: var(--acc); color: var(--acc-ink); padding: 7px 16px; border-radius: var(--r-pill);
  flex: 0 0 auto;
}
.ntm-do-text { color: var(--text); flex: 1; min-width: 0; }
.ntm-caret {
  display: inline-block; width: 7px; height: 13px; background: var(--accent);
  vertical-align: -2px; animation: ntm-blink 1.05s steps(1) infinite;
}
@keyframes ntm-blink { 50% { opacity: 0; } }

@media (max-width: 900px) {
  .ntm-frame { transform: none; animation: none; }
  .ntm-term { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ntm-frame { transform: none; animation: none; }
  .ntm-caret, .ntm-led, .ntm-btn.go.hit { animation: none; }
}
