.basic-activity {
  --lab-ink: #172a42;
  --lab-blue: #285cff;
  --lab-line: #dbe4f2;
  --lab-fill: #f3f6fb;
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: clamp(14px, 3vw, 26px);
  border: 1px solid var(--lab-line);
  border-radius: 18px;
  color: var(--lab-ink);
  background: white;
}

.basic-activity :is(button, input, textarea, select) { font: inherit; }

.basic-button {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--lab-line);
  border-radius: 9px;
  color: var(--lab-ink);
  background: white;
  text-align: start;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.basic-button:hover:not(:disabled) { border-color: var(--lab-blue); }
.basic-button:disabled { cursor: default; color: inherit; opacity: 1; }

.basic-tools, .basic-folder-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.basic-status {
  min-height: 1.4em;
  margin: 0;
  color: #415975;
  font-size: .86rem;
  overflow-wrap: anywhere;
}

.basic-activity .is-indicated {
  outline: 2px solid var(--lab-blue);
  outline-offset: 2px;
  background-color: #eaf0ff;
}

.basic-field {
  display: grid;
  gap: 5px;
  color: #415975;
  font-size: .86rem;
  font-weight: 650;
}

.basic-input, .basic-textarea {
  min-width: 0;
  max-width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--lab-line);
  border-radius: 8px;
  color: var(--lab-ink);
  background: white;
}

.basic-input { min-height: 38px; }
.basic-input[type="search"] { flex: 1 1 155px; }
.basic-textarea { width: 100%; min-height: 58px; resize: vertical; }
.basic-textarea[readonly] { background: var(--lab-fill); }
.is-demo .basic-textarea { resize: none; }

.basic-activity--text.is-demo { gap: 10px; padding: 12px; background: #f7f9fe; }
.text-demo-cards { display: flex; flex-wrap: wrap; gap: 8px; }
.text-demo-card { flex: 1 1 145px; min-width: 0; min-height: 90px; padding: 10px; border: 1px solid #dce6f8; border-radius: 8px; background: #fff; }
.text-demo-card h3 { margin: 0 0 8px; color: #4f6685; font-size: 12px; font-weight: 700; }
.text-demo-content { margin: 0; color: #1e3c68; font-size: clamp(14px, 2vw, 20px); font-weight: 640; line-height: 1.28; white-space: pre-wrap; overflow-wrap: anywhere; }
.text-demo-empty { color: #5e7594; font-size: 14px; font-weight: 520; }
.text-demo-content mark { padding: 1px 2px; border-radius: 3px; color: #fff; background: #285cff; }
.text-demo-buffer { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px 10px; margin-top: 9px; padding: 6px 8px; color: #415a7e; background: #eaf0fc; border-radius: 6px; font-size: 12px; font-weight: 650; }
.text-demo-buffer span { color: #536b8d; font-weight: 530; }
.text-demo-buffer .has-text { color: #1b5d42; background: #daf3e7; border-radius: 4px; padding: 2px 5px; font-weight: 690; }
.text-demo-search { margin: 9px 0 0; font-size: 13px; font-weight: 670; color: #224ab7; }
.text-demo-changed { animation: text-demo-reveal 390ms 140ms cubic-bezier(.23, 1, .32, 1) both; }
@keyframes text-demo-reveal {
  from { transform: translateY(3px); opacity: .35; }
  to { transform: translateY(0); opacity: 1; }
}

.basic-sequence, .basic-browser-page, .basic-file-preview {
  margin: 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--lab-fill);
}

.basic-file-list { display: grid; gap: 6px; }
.basic-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid var(--lab-line);
  border-radius: 9px;
  background: var(--lab-fill);
}

.basic-file-row small { color: #415975; }
.basic-file-name { border-color: transparent; background: transparent; }
.basic-file-name::before { margin-inline-end: 8px; content: "▤"; color: var(--lab-blue); }

.basic-folder {
  padding: 4px 10px;
  border: 1px solid var(--lab-line);
  border-radius: 7px;
  background: var(--lab-fill);
  overflow-wrap: anywhere;
}

.basic-folder::before { margin-inline-end: 6px; content: "▰"; color: var(--lab-blue); }

.basic-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 5px;
  border-radius: 10px;
  background: #e9eef7;
}

.basic-tab {
  display: flex;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
  border-radius: 7px;
  background: var(--lab-fill);
}

.basic-tab[data-active="true"] { background: white; }
.basic-tab .basic-button { border-color: transparent; background: transparent; }
.basic-tab .basic-tab-close { min-width: 35px; padding-inline: 7px; text-align: center; }
.basic-browser-page { min-height: 85px; overflow-wrap: anywhere; }
.basic-browser-page h3, .basic-browser-page p { margin: 0; }
.basic-browser-page p { margin-top: 8px; }
.basic-browser-page mark { border-radius: 3px; color: #142746; background: #fce39d; }

.course-keyboard {
  display: grid;
  gap: clamp(3px, .7vw, 7px);
  min-width: 0;
  padding: clamp(5px, 1.5vw, 14px);
  border: 1px solid #15213a;
  border-radius: 14px;
  color: #eef4ff;
  background: #17253d;
  user-select: none;
}

.course-keyboard__row {
  display: flex;
  gap: clamp(2px, .45vw, 5px);
  min-width: 0;
}

.course-keyboard__key {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  min-width: 0;
  min-height: clamp(25px, 4vw, 42px);
  padding: 2px 0;
  border: 1px solid #506181;
  border-bottom-width: 2px;
  border-radius: clamp(3px, .55vw, 7px);
  color: #f4f7ff;
  background: #2c3d5b;
  font: 650 clamp(.52rem, 1.2vw, .78rem)/1.05 system-ui, sans-serif;
  overflow-wrap: anywhere;
  text-align: center;
}

button.course-keyboard__key { cursor: pointer; }
.course-keyboard__key small { color: #c7d4eb; font-size: .74em; }
.course-keyboard__key[data-code="Space"] { flex-grow: 5; }
.course-keyboard__key:is([data-code^="Shift"], [data-code^="Control"], [data-code^="Meta"], [data-code^="Alt"], [data-code="CapsLock"], [data-code="Enter"], [data-code="Backspace"], [data-code="Tab"]) { flex-grow: 1.5; }
.course-keyboard__key.is-pressed { border-color: #b6c8ff; color: white; background: #285cff; }
.course-keyboard__key.is-pressed small { color: white; }
.course-keyboard__key.is-suggested:not(.is-pressed) { border-color: #f6ca70; color: #fff4d8; background: #604922; }

@media (max-width: 540px) {
  .course-keyboard__key {
    min-height: 32px;
    font-size: .63rem;
  }

  .course-keyboard__key small { font-size: .56rem; }
}

button.basic-folder[aria-pressed="true"] {
  border-color: var(--lab-blue);
  color: var(--lab-blue);
  background: #eaf0ff;
  font-weight: 700;
}

.basic-file-preview h3,
.basic-file-preview p {
  margin: 0;
}

.basic-file-preview h3 {
  font-size: .93rem;
  overflow-wrap: anywhere;
}

.basic-file-preview p {
  margin-top: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.basic-empty-folder {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed var(--lab-line);
  border-radius: 8px;
  color: #415975;
  font-size: .9rem;
}

.basic-system-guide, .basic-system-usage {
  margin: 0;
  line-height: 1.45;
}

.basic-system-guide { color: var(--lab-blue); font-weight: 750; }
.basic-system-usage { color: #415975; font-size: .85rem; }

.basic-system-view, .basic-system-result {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 9px;
  padding: 10px;
  border-radius: 12px;
  background: var(--lab-fill);
}

.basic-system-window, .basic-system-slot {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--lab-line);
  border-radius: 9px;
  background: #fff;
  overflow-wrap: anywhere;
}

.basic-system-window p { margin: 0; color: #415975; }
.basic-system-slot > span { color: #415975; font-size: .85rem; }
.basic-activity--system .basic-button[aria-pressed="true"] {
  border-color: var(--lab-blue);
  color: var(--lab-blue);
  background: #eaf0ff;
}
.basic-file-preview > .basic-button { margin-top: 8px; }
