.cl-app {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0 28px;
  min-width: 0;
}

.cl-loading {
  padding: 24px;
  color: var(--muted);
}

.cl-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 16px;
}

.cl-project-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 260px;
  min-width: 0;
  max-width: 460px;
}

.cl-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.cl-project {
  width: 100%;
  min-width: 0;
}

.cl-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cl-actions [hidden] {
  display: none;
}

.cl-jar {
  border-color: var(--ok);
  color: var(--ok);
}

.cl-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 14px;
  color: var(--muted);
}

.cl-info:empty {
  display: none;
}

.cl-verified-note {
  flex-basis: 100%;
  margin: 0;
}

.cl-status:empty {
  display: none;
}

.cl-work {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--code-bg);
  overflow: hidden;
}

.cl-tree {
  min-width: 0;
  max-height: min(70vh, 640px);
  overflow: auto;
  padding: 8px 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
  font-size: 13.5px;
}

.cl-tree-head {
  padding: 2px 12px 6px;
  color: var(--text);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cl-tree-list {
  margin: 0;
  padding: 0 0 0 12px;
  list-style: none;
}

.cl-tree-root {
  padding-left: 6px;
}

.cl-folder-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 3px 6px;
  color: var(--muted);
}

.cl-folder-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cl-file-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 28px;
  padding: 3px 8px 3px 6px;
  border: 0;
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cl-file-btn:hover {
  background: var(--raised);
}

.cl-file-btn[aria-current="true"] {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 700;
}

.cl-file-btn:focus-visible,
.cl-tab-open:focus-visible,
.cl-tab-close:focus-visible,
.cl-problem-jump:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.cl-file-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cl-file-errors {
  flex: none;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--bad);
  color: var(--bg);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.cl-file-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warn);
}

.cl-ico {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-family: var(--font-code);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
}

.cl-ico-java {
  background: var(--info-soft);
  color: var(--info);
  box-shadow: inset 0 0 0 1px var(--info);
}

.cl-ico-java::before {
  content: "C";
}

.cl-ico-yaml {
  border-radius: 3px;
  background: var(--warn-soft);
  color: var(--warn);
  box-shadow: inset 0 0 0 1px var(--warn);
}

.cl-ico-yaml::before {
  content: "Y";
}

.cl-ico-file {
  border-radius: 3px;
  background: var(--raised);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
}

.cl-ico-file::before {
  content: "T";
}

.cl-ico-package {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--warn-soft);
  box-shadow: inset 0 0 0 1px var(--warn);
}

.cl-ico-folder {
  width: 15px;
  height: 11px;
  border-radius: 2px;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.cl-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cl-tabrow {
  display: flex;
  align-items: stretch;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.cl-tabs {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.cl-tab {
  display: flex;
  flex: none;
  align-items: center;
  border-right: 1px solid var(--line);
}

.cl-tab.is-active {
  background: var(--code-bg);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.cl-tab-open {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 4px 4px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}

.cl-tab.is-active .cl-tab-open {
  color: var(--text);
}

.cl-tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-right: 4px;
  padding: 6px;
  border: 0;
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.cl-tab-close svg {
  width: 100%;
  height: 100%;
}

.cl-tab-close:hover {
  background: var(--raised);
  color: var(--text);
}

.cl-tabtools {
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  border-left: 1px solid var(--line);
}

.cl-newfile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.cl-newfile[hidden] {
  display: none;
}

.cl-newfile-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.cl-newfile-label .input {
  width: 100%;
  font-family: var(--font-code);
  font-weight: 400;
}

.cl-newfile p {
  margin: 0;
}

.cl-newfile-error {
  color: var(--bad);
  font-size: 14px;
}

.cl-newfile-error:empty {
  display: none;
}

.cl-editor {
  min-width: 0;
}

.cl-editor .ed {
  border: 0;
  border-radius: 0;
}

.cl-editor .ed.ed-focused {
  box-shadow: inset 0 0 0 1px var(--accent);
}

.cl-pathbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 12px;
  padding: 5px 10px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
}

.cl-path {
  min-width: 0;
  font-family: var(--font-code);
  overflow-wrap: anywhere;
}

.cl-filehelp {
  padding: 14px 18px;
  border: 1px solid var(--info);
  border-radius: var(--radius-m);
  background: var(--info-soft);
  color: var(--text);
}

.cl-filehelp[hidden] {
  display: none;
}

.cl-app .cl-filehelp-title {
  margin: 0 0 6px;
  font-size: 17px;
}

.cl-filehelp ol {
  margin: 8px 0;
  padding-left: 22px;
}

.cl-filehelp li {
  margin: 4px 0;
}

.cl-filehelp p {
  margin: 6px 0;
}

.cl-success {
  padding: 10px 14px;
  border-left: 4px solid var(--ok);
  border-radius: var(--radius-s);
  background: var(--ok-soft);
  color: var(--text);
}

.cl-success[hidden] {
  display: none;
}

.cl-problems {
  padding: 12px 14px;
  border: 1px solid var(--bad);
  border-radius: var(--radius-m);
  background: var(--surface);
}

.cl-problems[hidden] {
  display: none;
}

.cl-app .cl-problems-title {
  margin: 0;
  font-size: 16px;
}

.cl-app .cl-problems-help {
  margin: 2px 0 8px;
}

.cl-app .cl-problem-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cl-problem {
  padding: 8px 10px;
  border-left: 3px solid var(--bad);
  border-radius: var(--radius-s);
  background: var(--bad-soft);
}

.cl-problem-warn {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

.cl-problem-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cl-problem-kind {
  color: var(--bad);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cl-problem-warn .cl-problem-kind {
  color: var(--warn);
}

.cl-problem-where {
  font-family: var(--font-code);
  font-size: 13.5px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cl-problem-msg {
  flex-basis: 100%;
  font-family: var(--font-code);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.cl-problem-details {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--font-code);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.cl-app .cl-problem-tip {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.cl-term .term {
  --term-height: 300px;
}

@container (max-width: 640px) {
  .cl-work {
    grid-template-columns: minmax(0, 1fr);
  }

  .cl-tree {
    max-height: 180px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .cl-project-field {
    max-width: none;
    flex-basis: 100%;
  }

  .cl-path-keys {
    display: none;
  }
}

.cl-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding: 8px 12px;
  border-left: 4px solid var(--info);
  border-radius: var(--radius-s);
  background: var(--info-soft);
  font-size: 14.5px;
}

.cl-result[hidden] {
  display: none;
}

.cl-result-ok {
  border-left-color: var(--ok);
  background: var(--ok-soft);
}

.cl-result-bad {
  border-left-color: var(--bad);
  background: var(--bad-soft);
}

.cl-result-warn {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

.cl-result-text {
  font-weight: 700;
}

.cl-result-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.cl-result-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.cl-app .cl-missions {
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-m);
  background: var(--surface);
}

.cl-missions[hidden] {
  display: none;
}

.cl-missions-summary {
  padding: 10px 0;
  font-weight: 700;
  cursor: pointer;
}

.cl-missions-summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-s);
}

.cl-missions-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 14px;
}

.cl-app .cl-missions-intro {
  margin: 0;
}

.cl-mission-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cl-mission-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cl-mission-dot:hover {
  border-color: var(--accent);
  color: var(--text);
}

.cl-mission-dot.is-done {
  border-color: var(--ok);
  background: var(--ok-soft);
  color: var(--ok);
}

.cl-mission-dot[aria-current="step"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.cl-mission-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cl-mission {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--bg);
}

.cl-app .cl-mission p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.cl-app .cl-mission .cl-mission-count {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cl-app .cl-mission-title {
  margin: 0;
  font-size: 18px;
}

.cl-mission-expect {
  color: var(--muted);
}

.cl-mission-label {
  color: var(--text);
  font-weight: 700;
}

.cl-mission code {
  padding: 1px 5px;
  border-radius: var(--radius-s);
  background: var(--code-bg);
  color: var(--code-fg);
  font-family: var(--font-code);
  font-size: 0.9em;
}

.cl-mission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
