/* Enclawed Code page: terminal player and a few page-only blocks, on top of
   style.css + home.css + landing.css. The terminal stays dark in both
   themes, like the homepage install terminal (.h-term). */

.cz-player { max-width: 980px; margin: 0 auto; }
.cz-player .h-term-bar { flex-wrap: wrap; gap: 0.6rem 1rem; }
.cz-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; min-width: 0; }
.cz-tab {
  border: 1px solid transparent;
  background: transparent;
  color: #A3B1C6;
  font: 600 0.78rem/1 'JetBrains Mono', ui-monospace, monospace;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  white-space: nowrap;
  cursor: pointer;
}
.cz-tab:hover { color: #E2E8F0; }
.cz-tab[aria-pressed="true"] { color: #E0F2FE; background: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.45); }
.cz-controls { display: flex; gap: 0.4rem; margin-left: auto; }
.cz-controls button {
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.1);
  color: #BAE6FD;
  font: 600 0.76rem/1 'JetBrains Mono', ui-monospace, monospace;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
}
.cz-controls button:hover:not(:disabled) { background: rgba(56, 189, 248, 0.22); color: #fff; }
.cz-controls button:disabled { opacity: 0.45; cursor: default; }
.cz-tab:focus-visible, .cz-controls button:focus-visible, .cz-screen:focus-visible { outline: 2px solid #38BDF8; outline-offset: 2px; }

.cz-screen {
  height: 30rem;
  overflow-y: auto;
  padding: 1rem 1.2rem 1.3rem;
  font: 400 0.8rem/1.6 'JetBrains Mono', ui-monospace, monospace;
  color: #CBD5E1;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}
.cz-line { white-space: pre-wrap; overflow-wrap: anywhere; }
.cz-cmdline { margin-top: 0.5rem; color: #F1F5F9; }
.cz-cmdline:first-child { margin-top: 0; }
.cz-ps { color: #38BDF8; font-weight: 700; }
.cz-cmd { font-weight: 500; }
.cz-idle .cz-cmd::after,
.cz-cmdline:last-child .cz-cmd::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: #38BDF8;
}
.cz-idle .cz-cmd::after { animation: czBlink 1s steps(1) infinite; }
@keyframes czBlink { 50% { opacity: 0; } }
.cz-dim { color: #7C8BA1; }
.cz-ok { color: #86EFAC; }
.cz-warn { color: #FCD34D; }
.cz-cz { color: #BAE6FD; }
.cz-ask { color: #FDE68A; font-weight: 700; }
.cz-deny { color: #FCA5A5; font-weight: 700; }
.cz-agent { color: #F1F5F9; margin-top: 0.4rem; }
/* Full-screen chapters: a fixed grid of the recording's columns and rows; codenclawed.js sizes the font to fit. */
.cz-screen.is-screen { position: relative; height: auto; min-height: 0; overflow: hidden; padding: 0.7rem 0.5rem 0.8rem; }
.cz-grid { font-family: 'JetBrains Mono', ui-monospace, 'DejaVu Sans Mono', 'Segoe UI Symbol', 'Noto Sans Symbols 2', monospace; font-size: 12px; line-height: 1.32; color: #CBD5E1; font-variant-ligatures: none; }
.cz-grid .cz-bx { display: inline-block; width: 1ch; overflow: visible; text-align: center; }
.cz-row { white-space: pre; overflow: hidden; height: 1.32em; }
.cz-cur { background: #CBD5E1; color: #050A14; }
.cz-key {
  position: absolute; right: 0.8rem; bottom: 0.8rem;
  padding: 0.3rem 0.6rem; border-radius: 6px;
  background: rgba(56, 189, 248, 0.16); border: 1px solid rgba(56, 189, 248, 0.5); color: #E0F2FE;
  font: 600 0.74rem/1.2 'JetBrains Mono', ui-monospace, monospace;
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.cz-key.is-on { opacity: 1; }
.cz-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }

/* Page annotation, not terminal output: set apart by font, rule and label. */
.cz-note {
  margin: 0.7rem 0;
  padding: 0.5rem 0.8rem;
  border-left: 3px solid #38BDF8;
  background: rgba(56, 189, 248, 0.08);
  border-radius: 0 8px 8px 0;
  font: 400 0.84rem/1.5 Inter, system-ui, sans-serif;
  color: #E0F2FE;
}
.cz-note-label { font-weight: 700; color: #7DD3FC; }
.cz-status { min-height: 1.2em; margin: 0; padding: 0 1.2rem 0.8rem; color: #8B9AB0; font: 500 0.74rem/1.4 'JetBrains Mono', ui-monospace, monospace; }

.cz-caption { max-width: 980px; margin: 0.9rem auto 0; color: var(--text-muted); font-size: 0.9rem; line-height: 1.55; text-align: center; }
.cz-caption strong { color: var(--text); }
.cz-caption a { color: var(--brand); font-weight: 600; }

/* The four decisions of the recorded session, as plain text under the player. */
.cz-decisions { max-width: 980px; margin: 1.4rem auto 0; }
.cz-decisions summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.cz-decisions ol { margin: 0.8rem 0 0; padding-left: 1.3rem; display: grid; gap: 0.45rem; line-height: 1.5; font-size: 0.92rem; }
.cz-decisions code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.85em; }
.cz-tag { display: inline-block; min-width: 3.2em; padding: 0.05rem 0.4rem; margin-right: 0.35rem; border-radius: 4px; font: 700 0.72rem/1.5 'JetBrains Mono', ui-monospace, monospace; text-align: center; color: #fff; background: var(--matrix-good); }
.cz-tag.is-ask { background: #B45309; }

/* Install steps */
.cz-install { max-width: 760px; margin: 0 auto; padding: 0; list-style: none; display: grid; gap: 0.9rem; counter-reset: czstep; }
.cz-install li { counter-increment: czstep; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.2rem 0.6rem; align-items: start; }
.cz-install li::before { content: counter(czstep); grid-row: span 2; display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--brand); color: var(--text-on-brand); font-weight: 700; font-size: 0.9rem; }
[data-theme="dark"] .cz-install li::before { color: #082F49; }
.cz-install p { margin: 0; line-height: 1.5; }
.cz-install .h-cmd { justify-self: start; }
/* Every item after the number stays in the content column, however many there are. */
.cz-install li > * { grid-column: 2; }
.cz-install li::before { grid-column: 1; grid-row: 1 / span 3; }
.cz-reqs { max-width: 760px; margin: 1.4rem auto 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }

.cz-fine { max-width: 860px; margin: 1.4rem auto 0; color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; text-align: center; }

@media (max-width: 720px) {
  .cz-screen { height: 26rem; padding: 0.8rem 0.8rem 1rem; font-size: 0.72rem; }
  .cz-player .h-term-dots { display: none; }
  .cz-controls { margin-left: 0; }
  .cz-status { padding: 0 0.8rem 0.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cz-idle .cz-cmd::after { animation: none; }
}

.cz-same { margin: 0.6rem 0 0; font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

/* Full-screen chapter on a narrow screen: readable text, panned sideways. */
.cz-screen.is-screen.is-pannable { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y pinch-zoom; overscroll-behavior-x: contain; }
.cz-screen.is-screen.is-pannable .cz-grid { width: max-content; }
.cz-pan-hint { margin: 0.4rem 0 0; text-align: center; font-size: 0.8rem; color: var(--text-muted); }

/* The Anthropic notice: a footer strip of the player, under the screen. */
.cz-notice { margin: 0; padding: 0.55rem 1.2rem 0.65rem; font-size: 0.74rem; line-height: 1.5; color: #B6C2D2; background: rgba(2, 132, 199, 0.08); border-top: 1px solid rgba(2, 132, 199, 0.35); }
.cz-notice strong { color: #E2E8F0; }
