:root {
  --focus: #d6422b;
  --cmd-bg: #f7f7f2;
  --cmd-text: #11110f;
  --cmd-line: #11110f;
  --cmd-focus: #e6e6df;
  --cmd-radius: 0px;
}

body.design-raster {
  overflow: hidden;
  background: #e9e9e3;
  color: #11110f;
}

.rw-shell {
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) 34px;
  min-height: 100dvh;
}
.rw-top {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid #11110f;
  background: #f7f7f2;
}
.rw-brand {
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-right: 1px solid #11110f;
}
.rw-brand .brand-logo {
  filter: invert(1);
  width: 100px;
}
.rw-primary {
  display: flex;
  min-width: 0;
  align-items: stretch;
  overflow: hidden;
}
.rw-primary button {
  min-width: 110px;
  padding: 0 16px;
  border: 0;
  border-right: 1px solid #b9b9b2;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}
.rw-primary button.is-active {
  background: #11110f;
  color: #f7f7f2;
}
.rw-actions {
  display: flex;
  align-items: center;
  border-left: 1px solid #11110f;
}
.rw-actions button {
  display: grid;
  width: 54px;
  height: 63px;
  place-items: center;
  border: 0;
  border-left: 1px solid #b9b9b2;
  background: transparent;
}
.rw-actions .rw-create {
  width: auto;
  padding: 0 18px;
  background: #d6422b;
  color: #fff;
  font-size: 12px;
  font-weight: 720;
}

.rw-workspace {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr) 300px;
  min-height: 0;
}
.rw-index {
  min-height: 0;
  overflow: auto;
  border-right: 1px solid #11110f;
  background: #f7f7f2;
}
.rw-index-head {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid #11110f;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rw-index-group {
  border-bottom: 1px solid #b9b9b2;
}
.rw-index-group h2 {
  margin: 0;
  padding: 10px 14px 5px;
  color: #6c6c66;
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.rw-link {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  width: 100%;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 11px 0 14px;
  border: 0;
  border-top: 1px solid transparent;
  background: transparent;
  color: #33332f;
  font-size: 12px;
  text-align: left;
}
.rw-link .icon {
  width: 15px;
  height: 15px;
}
.rw-link small {
  color: #8b8b84;
  font:
    9px ui-monospace,
    monospace;
}
.rw-link.is-active {
  border-color: #11110f;
  background: #fff;
  color: #11110f;
  font-weight: 680;
}
.rw-link.is-active::before {
  position: absolute;
  left: 0;
  width: 4px;
  height: 33px;
  background: #d6422b;
  content: "";
}

.rw-main {
  display: grid;
  grid-template-rows: 50px minmax(0, 1fr) 190px;
  min-width: 0;
  min-height: 0;
  background: #fff;
}
.rw-context {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  border-bottom: 1px solid #11110f;
}
.rw-context h1 {
  margin: 0;
  font-size: 14px;
}
.rw-context p {
  margin: 0;
  color: #6c6c66;
  font-size: 10px;
}
.rw-context .rw-view {
  display: flex;
  margin-left: auto;
  border-left: 1px solid #b9b9b2;
}
.rw-context .rw-view button {
  width: 34px;
  height: 49px;
  border: 0;
  border-right: 1px solid #b9b9b2;
  background: transparent;
  font:
    11px ui-monospace,
    monospace;
}
.rw-context .rw-view button.is-active {
  background: #11110f;
  color: white;
}

.rw-terminals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
}
.rw-terminal {
  display: grid;
  grid-template-rows: 40px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  border-right: 1px solid #11110f;
}
.rw-terminal:last-child {
  border-right: 0;
}
.rw-term-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid #11110f;
  font-size: 11px;
  font-weight: 680;
}
.rw-term-head .status-mark {
  width: 7px;
  height: 7px;
  background: #15885a;
}
.rw-term-head .terminal-state {
  margin-left: auto;
  color: #6c6c66;
  font:
    9px ui-monospace,
    monospace;
  text-transform: uppercase;
}
.rw-console {
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background: #141513;
  color: #e4e6df;
  font:
    11px/1.65 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}
.rw-console p {
  margin: 0;
}
.rw-console .dim {
  color: #767b71;
}
.rw-console .prompt {
  color: #f1c65f;
}
.rw-console .error {
  color: #ff8b77;
}

.rw-ledger {
  min-width: 0;
  overflow: auto;
  border-top: 1px solid #11110f;
}
.rw-ledger-head,
.rw-row {
  display: grid;
  grid-template-columns: 130px 1fr 120px 112px;
  min-height: 36px;
  align-items: center;
}
.rw-ledger-head {
  background: #e9e9e3;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rw-ledger-head > *,
.rw-row > * {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid #b9b9b2;
}
.rw-row {
  border-top: 1px solid #b9b9b2;
  font-size: 11px;
}
.rw-row .mono {
  font-family: ui-monospace, monospace;
  font-size: 10px;
}
.rw-row.is-error {
  background: #fff0ed;
}
.rw-row.is-error .rw-state {
  color: #a72c1a;
  font-weight: 700;
}
.rw-row.is-recovered {
  background: #eef8f2;
}
.rw-row.is-recovered .rw-state {
  color: #0e7048;
}
.rw-ledger button {
  padding: 5px 8px;
  border: 1px solid #11110f;
  border-radius: 0;
  background: transparent;
  font-size: 10px;
  font-weight: 650;
}

.rw-aside {
  min-height: 0;
  overflow: auto;
  border-left: 1px solid #11110f;
  background: #f7f7f2;
}
.rw-aside-head {
  padding: 14px;
  border-bottom: 1px solid #11110f;
}
.rw-aside-head span {
  display: block;
  color: #73736d;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rw-aside-head h2 {
  margin: 5px 0 0;
  font-size: 16px;
}
.rw-task {
  padding: 14px;
  border-bottom: 1px solid #b9b9b2;
}
.rw-task-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rw-task strong {
  display: block;
  margin-top: 9px;
  font-size: 12px;
  line-height: 1.35;
}
.rw-task p {
  margin: 6px 0 0;
  color: #6c6c66;
  font-size: 10px;
}
.rw-task .rw-code {
  font:
    9px ui-monospace,
    monospace;
}
.rw-empty {
  padding: 16px 14px;
  border-bottom: 1px solid #11110f;
  background: #e9e9e3;
}
.rw-empty strong {
  font-size: 11px;
}
.rw-empty p {
  margin: 5px 0 0;
  color: #6c6c66;
  font-size: 10px;
}

.rw-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-top: 1px solid #11110f;
  background: #11110f;
  color: #f7f7f2;
  font:
    9px ui-monospace,
    monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.rw-foot .sample-tag {
  margin-left: auto;
}

@media (max-width: 1080px) {
  .rw-workspace {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .rw-aside {
    display: none;
  }
  .rw-top {
    grid-template-columns: 190px minmax(0, 1fr) auto;
  }
  .rw-primary button {
    min-width: 90px;
    padding-inline: 10px;
  }
}

@media (max-width: 760px) {
  body.design-raster {
    overflow: auto;
  }
  .rw-shell {
    grid-template-rows: 54px auto 32px;
    min-height: 100dvh;
  }
  .rw-top {
    position: sticky;
    top: 0;
    z-index: 20;
    grid-template-columns: 1fr auto;
    height: 54px;
  }
  .rw-brand {
    border-right: 0;
  }
  .rw-primary {
    display: none;
  }
  .rw-actions button {
    height: 53px;
  }
  .rw-actions .rw-create {
    display: none;
  }
  .rw-workspace {
    display: block;
  }
  .rw-index {
    position: fixed;
    z-index: 40;
    inset: 54px 52px 0 0;
    display: block;
    transform: translateX(-102%);
    transition: transform 160ms ease;
  }
  .nav-open .rw-index {
    transform: translateX(0);
  }
  .rw-main {
    grid-template-rows: 52px 58vh auto;
    min-height: calc(100dvh - 86px);
  }
  .rw-context {
    padding-inline: 12px;
  }
  .rw-context p,
  .rw-context .rw-view {
    display: none;
  }
  .rw-terminals {
    display: block;
    overflow: auto;
  }
  .rw-terminal {
    min-height: 58vh;
    border-right: 0;
  }
  .rw-terminal + .rw-terminal {
    display: none;
  }
  .rw-ledger {
    overflow: visible;
  }
  .rw-ledger-head {
    display: none;
  }
  .rw-row {
    grid-template-columns: 1fr auto;
    padding: 10px 12px;
  }
  .rw-row > * {
    min-height: 24px;
    padding: 0;
    border: 0;
  }
  .rw-row > :nth-child(2),
  .rw-row > :nth-child(3) {
    grid-column: 1;
  }
  .rw-row > :last-child {
    grid-column: 2;
    grid-row: 1 / span 3;
  }
  .rw-foot {
    position: static;
  }
}
