kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 0.35em;
  border: 1px solid var(--g66);
  border-bottom-width: 3px;
  border-radius: 3px;
  color: var(--white);
  font-size: 0.9em;
  line-height: 1.35;
  text-align: center;
}

.nav-shell {
  padding: 0;
  border: 0;
  background: none;
  color: var(--white);
  font: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--g66);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
  cursor: pointer;
}
.nav-shell:hover {
  background: var(--neon);
  color: var(--black);
  text-decoration: none;
}

.shell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--g10);
  border: 1px solid var(--g27);
  border-radius: 7px;
  overflow: hidden;
}

.shell-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 8px 14px;
  background: var(--g14);
  border-bottom: 1px solid var(--g27);
}
.shell-title {
  overflow: hidden;
  color: var(--gcf);
  font-family: var(--mono);
  font-size: var(--s-1);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.shell-close {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 24px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--g43);
  border-radius: 3px;
  background: var(--g27);
  color: var(--gcf);
  cursor: pointer;
}
.shell-close svg { display: block; width: 9px; height: 9px; }
.shell-close:hover { background: var(--neon); border-color: var(--neon); color: var(--black); }

.shell-screen {
  height: 380px;
  padding: 16px 18px 18px;
  overflow-y: auto;
  color: var(--gcf);
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.6;
  cursor: text;
  scrollbar-color: var(--g43) var(--g10);
}
@media (max-width: 500px) {
  .shell-screen { padding: 12px 13px 14px; font-size: 0.8rem; }
}

.shell-block + .shell-block { margin-top: 2px; }
.shell-line {
  min-height: 1.6em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.shell-line a { color: var(--white); text-decoration-thickness: 1px; }
.shell-line a:hover { color: var(--black); }
.shell-line .is-prompt, .shell-prompt { color: var(--neon); }
.shell-line .is-command, .shell-line .is-heading { color: var(--white); }
.shell-line .is-dim, .shell-line .is-unlit { color: var(--g92); }
.shell-line .is-unlit { opacity: 0.5; }
.shell-line .is-error { color: var(--white); text-decoration: underline wavy var(--neon) 1px; text-underline-offset: 0.25em; }
.shell-line .is-dir, .shell-line .is-neon, .shell-line .is-lit { color: var(--neon); }
.shell-line .is-match { background: var(--neon); color: var(--black); }
.shell-line .is-swatch { display: inline-block; border: 1px solid var(--g43); }
.is-swatch-black { background: var(--black); }
.is-swatch-g14 { background: var(--g14); }
.is-swatch-g27 { background: var(--g27); }
.is-swatch-g43 { background: var(--g43); }
.is-swatch-g66 { background: var(--g66); }
.is-swatch-g92 { background: var(--g92); }
.is-swatch-gcf { background: var(--gcf); }
.is-swatch-white { background: var(--white); }
.is-swatch-neon { background: var(--neon); }

.shell-entry {
  display: flex;
  align-items: baseline;
  gap: 1ch;
  margin-top: 2px;
}
.shell-entry[hidden] { display: none; }
.shell-prompt { flex-shrink: 0; white-space: nowrap; }
.shell-input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--white);
  font: inherit;
  caret-color: var(--neon);
}
.shell-input:disabled { opacity: 0.4; }
.shell:focus-within { border-color: var(--g66); }

.shell-offline { margin: 0; font-family: var(--body); }

.shell-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--g27);
}
.shell-chips[hidden] { display: none; }
.shell-chips button { padding: 3px 10px; font-family: var(--mono); font-size: 0.8rem; }

.shell-dialog {
  width: min(760px, calc(100vw - 2 * var(--gutter)));
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}
.shell-dialog::backdrop { background: rgba(0, 0, 0, 0.72); }
.shell-dialog .shell-screen { height: min(460px, calc(100vh - 220px)); }

.guest-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding-bottom: 96px;
}
@media (min-width: 900px) {
  .guest-shell { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: start; }
}
.guest-shell h2 { margin-bottom: 16px; font-size: var(--s5); }
.guest-shell p { max-width: 40ch; margin: 0 0 12px; }
@media (pointer: coarse) {
  .shell-key-hint { display: none; }
}
