:root {
  --focus: #ffb52e;
  --cmd-bg: #1a1b1e;
  --cmd-text: #f3f2ed;
  --cmd-line: #383a3f;
  --cmd-focus: #2b2c31;
  --cmd-radius: 7px;
}

body.design-command {
  overflow: hidden;
  background: #0d0e10;
  color: #f1f0eb;
}
.kc-shell {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: 100dvh;
}
.kc-rail {
  display: flex;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  padding: 14px 9px;
  border-right: 1px solid #292b2f;
  background: #111214;
}
.kc-logo {
  display: grid;
  width: 46px;
  height: 42px;
  place-items: center;
  margin-bottom: 18px;
  border-bottom: 1px solid #393b3f;
  color: #ffb52e;
  font-weight: 800;
  letter-spacing: -0.06em;
}
.kc-logo span {
  font-size: 12px;
}
.kc-rail-nav {
  display: grid;
  gap: 6px;
}
.kc-rail button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #85878c;
}
.kc-rail button:hover {
  background: #1c1d20;
  color: #fff;
}
.kc-rail button.is-active {
  border-color: #46484d;
  background: #27282c;
  color: #ffbf45;
}
.kc-rail .kc-bottom {
  display: grid;
  gap: 6px;
  margin-top: auto;
}
.kc-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3bb77e;
}

.kc-app {
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) 28px;
  min-width: 0;
  min-height: 0;
}
.kc-top {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(340px, 720px) minmax(
      220px,
      1fr
    );
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border-bottom: 1px solid #292b2f;
  background: #111214;
}
.kc-context {
  min-width: 0;
}
.kc-context strong {
  display: block;
  font-size: 13px;
}
.kc-context span {
  display: block;
  margin-top: 2px;
  color: #72747a;
  font:
    9px ui-monospace,
    monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.kc-search {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 1px solid #44464b;
  border-radius: 6px;
  background: #1a1b1e;
  color: #a6a8ad;
}
.kc-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f1f0eb;
  font-size: 12px;
}
.kc-search kbd {
  padding: 3px 6px;
  border: 1px solid #44464b;
  border-radius: 4px;
  color: #77797f;
  font:
    9px ui-monospace,
    monospace;
}
.kc-top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}
.kc-top-actions button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid #3a3c41;
  border-radius: 6px;
  background: #191a1d;
  font-size: 11px;
}
.kc-top-actions .primary {
  border-color: #ffb52e;
  background: #ffb52e;
  color: #1b1304;
  font-weight: 730;
}

.kc-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  min-height: 0;
}
.kc-stage {
  display: grid;
  grid-template-rows: 254px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}
.kc-command-surface {
  padding: 18px;
  border-bottom: 1px solid #292b2f;
  background: #151619;
}
.kc-command-box {
  height: 100%;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #3e4045;
  border-radius: 8px;
  background: #1a1b1e;
}
.kc-command-query {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  min-height: 54px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid #34363b;
}
.kc-command-query strong {
  font-size: 14px;
  font-weight: 580;
}
.kc-command-query .sample-tag {
  color: #ffbf45;
}
.kc-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.kc-result-group {
  min-width: 0;
  padding: 9px;
}
.kc-result-group + .kc-result-group {
  border-left: 1px solid #34363b;
}
.kc-result-label {
  padding: 4px 8px 7px;
  color: #77797f;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kc-result {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #bbbcc0;
  text-align: left;
}
.kc-result.is-selected {
  background: #2a2b2f;
  color: #fff;
}
.kc-result .icon {
  width: 16px;
  height: 16px;
}
.kc-result strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kc-result small {
  color: #73757b;
  font-size: 9px;
}
.kc-result .key {
  color: #62646a;
  font:
    9px ui-monospace,
    monospace;
}
.kc-result.is-offline {
  color: #e99789;
}

.kc-focus {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  min-height: 0;
}
.kc-terminal {
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr);
  min-height: 0;
  border-right: 1px solid #292b2f;
}
.kc-panel-head {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid #292b2f;
  color: #989a9f;
  font-size: 10px;
}
.kc-panel-head strong {
  color: #e9e8e3;
  font-size: 11px;
}
.kc-panel-head .push {
  margin-left: auto;
}
.kc-terminal-body {
  padding: 16px;
  overflow: auto;
  background: #0f1012;
  color: #d9dad5;
  font:
    11px/1.65 ui-monospace,
    monospace;
}
.kc-terminal-body p {
  margin: 0;
}
.kc-terminal-body .amber {
  color: #ffbf45;
}
.kc-terminal-body .dim {
  color: #65686d;
}
.kc-active-list {
  min-height: 0;
  overflow: auto;
  background: #141518;
}
.kc-active-item {
  padding: 12px;
  border-bottom: 1px solid #292b2f;
}
.kc-active-item .meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #77797f;
  font-size: 9px;
}
.kc-active-item strong {
  display: block;
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.35;
}
.kc-active-item p {
  margin: 5px 0 0;
  color: #7f8187;
  font-size: 9.5px;
}
.kc-active-item.is-empty {
  min-height: 92px;
  background: #191a1d;
  color: #8a8c91;
}

.kc-context-pane {
  min-height: 0;
  overflow: auto;
  border-left: 1px solid #292b2f;
  background: #17181b;
}
.kc-pane-head {
  padding: 16px;
  border-bottom: 1px solid #292b2f;
}
.kc-pane-head .eyebrow {
  color: #71737a;
  font:
    9px ui-monospace,
    monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kc-pane-head h2 {
  margin: 7px 0 0;
  font-size: 15px;
}
.kc-timeline {
  position: relative;
  padding: 8px 16px 18px;
}
.kc-timeline::before {
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 22px;
  width: 1px;
  background: #383a3f;
  content: "";
}
.kc-event {
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
}
.kc-event-dot {
  z-index: 1;
  width: 9px;
  height: 9px;
  margin-top: 3px;
  border: 2px solid #17181b;
  border-radius: 50%;
  background: #74767b;
  box-shadow: 0 0 0 1px #4c4e53;
}
.kc-event strong {
  display: block;
  font-size: 10.5px;
}
.kc-event p {
  margin: 3px 0 0;
  color: #77797f;
  font-size: 9.5px;
  line-height: 1.4;
}
.kc-offline {
  margin: 4px 14px 14px;
  padding: 12px;
  border: 1px solid #814337;
  border-radius: 6px;
  background: #291b19;
}
.kc-offline strong {
  display: block;
  color: #f0a294;
  font-size: 11px;
}
.kc-offline p {
  margin: 5px 0 9px;
  color: #bd8177;
  font-size: 9.5px;
}
.kc-offline button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #814337;
  border-radius: 4px;
  background: transparent;
  color: #f0a294;
  font-size: 9px;
}

.kc-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 10px;
  border-top: 1px solid #292b2f;
  background: #111214;
  color: #66686e;
  font:
    9px ui-monospace,
    monospace;
  text-transform: uppercase;
}
.kc-foot .sample-tag {
  margin-left: auto;
  color: #a1a3a7;
}

@media (max-width: 1080px) {
  .kc-content {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .kc-top {
    grid-template-columns: 150px minmax(280px, 1fr) auto;
  }
  .kc-top-actions .primary span {
    display: none;
  }
}

@media (max-width: 760px) {
  body.design-command {
    overflow: auto;
    padding-bottom: 60px;
  }
  .kc-shell {
    display: block;
  }
  .kc-rail {
    position: fixed;
    z-index: 40;
    inset: auto 0 0;
    height: 58px;
    flex-direction: row;
    justify-content: space-around;
    padding: 7px 10px;
    border: 0;
    border-top: 1px solid #292b2f;
  }
  .kc-logo,
  .kc-rail .kc-bottom {
    display: none;
  }
  .kc-rail-nav {
    display: flex;
    width: 100%;
    justify-content: space-around;
  }
  .kc-rail button {
    width: 44px;
    height: 44px;
  }
  .kc-app {
    display: block;
  }
  .kc-top {
    position: sticky;
    top: 0;
    z-index: 20;
    grid-template-columns: minmax(0, 1fr) auto;
    height: 56px;
    padding: 0 10px;
  }
  .kc-context {
    display: none;
  }
  .kc-search {
    min-width: 0;
  }
  .kc-top-actions button:not(.primary) {
    display: none;
  }
  .kc-content {
    display: block;
  }
  .kc-stage {
    display: block;
  }
  .kc-command-surface {
    padding: 10px;
  }
  .kc-command-box {
    height: auto;
  }
  .kc-command-query {
    min-height: 48px;
  }
  .kc-result-grid {
    display: block;
  }
  .kc-result-group + .kc-result-group {
    display: none;
  }
  .kc-focus {
    display: block;
  }
  .kc-terminal {
    min-height: 53vh;
    border-right: 0;
  }
  .kc-active-list {
    max-height: none;
  }
  .kc-context-pane {
    border-top: 1px solid #292b2f;
    border-left: 0;
  }
  .kc-foot {
    min-height: 28px;
  }
}
