:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --sidebar: #102236;
  --sidebar-soft: #183149;
  --text: #152235;
  --muted: #66758a;
  --line: #dfe5ec;
  --primary: #1e67d6;
  --primary-hover: #1759bd;
  --primary-soft: #eaf2ff;
  --green: #138a66;
  --green-soft: #e8f7f1;
  --violet: #7355c6;
  --violet-soft: #f0ecfc;
  --danger: #c93e4f;
  --danger-soft: #fff0f2;
  --shadow: 0 18px 50px rgba(30, 48, 72, 0.08);
  --shadow-small: 0 8px 26px rgba(30, 48, 72, 0.08);
  font-family: Inter, "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    radial-gradient(circle at 92% 2%, rgba(42, 113, 221, 0.07), transparent 28rem),
    var(--bg);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
label,
input[type="file"] {
  -webkit-tap-highlight-color: transparent;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

[hidden] {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 252px;
  flex-direction: column;
  padding: 28px 18px 22px;
  color: #dce8f4;
  background:
    linear-gradient(155deg, rgba(44, 94, 136, 0.22), transparent 45%),
    var(--sidebar);
  box-shadow: 8px 0 36px rgba(9, 27, 44, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 28px;
  border-bottom: 1px solid rgba(224, 237, 248, 0.1);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: linear-gradient(145deg, #2d79e4, #1b5ebf);
  box-shadow: 0 10px 25px rgba(14, 84, 174, 0.35);
}

.brand-mark svg {
  width: 25px;
  height: 25px;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.brand span {
  margin-top: 3px;
  color: #8ea7bd;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 7px;
  margin-top: 24px;
}

.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: #9fb4c7;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(52, 126, 226, 0.34), rgba(49, 112, 198, 0.13));
  box-shadow: inset 3px 0 #5aa0ff;
}

.sidebar-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: auto;
  padding: 15px 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.sidebar-note strong,
.sidebar-note span {
  display: block;
}

.sidebar-note strong {
  color: #d9e6f1;
  font-size: 12px;
  font-weight: 600;
}

.sidebar-note span:not(.status-dot) {
  margin-top: 4px;
  color: #7f98ae;
  font-size: 10px;
  line-height: 1.45;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 50%;
  background: #36d69b;
  box-shadow: 0 0 0 4px rgba(54, 214, 155, 0.1);
}

.main-content {
  min-height: 100vh;
  margin-left: 252px;
}

.topbar {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 38px;
  border-bottom: 1px solid rgba(214, 222, 231, 0.8);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(12px);
}

.mobile-brand {
  display: none;
  font-weight: 700;
}

.identity-panel {
  display: flex;
  align-items: center;
  gap: 15px;
}

.identity-copy {
  padding-right: 15px;
  border-right: 1px solid var(--line);
  text-align: right;
}

.eyebrow {
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.identity-hint {
  display: block;
  margin-top: 3px;
  color: #8b98a8;
  font-size: 10px;
}

.identity-panel label {
  display: grid;
  gap: 4px;
}

.identity-panel label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.identity-panel input {
  width: 142px;
  padding: 8px 10px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--surface-soft);
  font-size: 12px;
  transition: 160ms ease;
}

.identity-panel input:focus,
.field input:focus,
.search-box:focus-within {
  border-color: #79a8ea;
  box-shadow: 0 0 0 3px rgba(47, 116, 215, 0.1);
}

.connection-state {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  color: var(--muted);
  border-radius: 8px;
  background: #f2f5f8;
  font-size: 11px;
}

.connection-state span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d9a839;
}

.connection-state.online {
  color: #13785c;
  background: var(--green-soft);
}

.connection-state.online span {
  background: #1bb181;
}

.connection-state.offline {
  color: var(--danger);
  background: var(--danger-soft);
}

.connection-state.offline span {
  background: var(--danger);
}

.view {
  display: none;
  max-width: 1420px;
  margin: 0 auto;
  padding: 40px 44px 64px;
}

.view.active {
  display: block;
  animation: view-in 220ms ease both;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-heading h1 {
  margin: 5px 0 8px;
  color: #14243a;
  font-size: clamp(27px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.page-heading p {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  transition: 150ms ease;
}

.button svg {
  width: 17px;
  height: 17px;
}

.button.primary {
  color: #fff;
  border-color: #1b60c6;
  background: linear-gradient(180deg, #2a75df, var(--primary));
  box-shadow: 0 9px 20px rgba(30, 103, 214, 0.2);
}

.button.primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(30, 103, 214, 0.25);
}

.button.secondary {
  color: #405269;
  border-color: var(--line);
  background: var(--surface);
}

.button.secondary:hover {
  border-color: #b7c5d5;
  background: #f8fafc;
}

.button.compact {
  min-height: 38px;
  padding: 8px 13px;
}

.button.large {
  min-height: 46px;
  padding-inline: 22px;
}

.button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none !important;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat-card {
  position: relative;
  min-height: 148px;
  overflow: hidden;
  padding: 22px 23px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.stat-card::after {
  position: absolute;
  top: -38px;
  right: -28px;
  width: 125px;
  height: 125px;
  border-radius: 50%;
  content: "";
  opacity: 0.65;
}

.stat-card > span,
.stat-card > strong,
.stat-card > small {
  position: relative;
  z-index: 1;
  display: block;
}

.stat-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.stat-card > strong {
  max-width: 90%;
  overflow: hidden;
  margin-top: 12px;
  color: #14243a;
  font-size: 26px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-card > small {
  margin-top: 12px;
  color: #8a96a5;
  font-size: 11px;
}

.accent-blue::after { background: var(--primary-soft); }
.accent-green::after { background: var(--green-soft); }
.accent-violet::after { background: var(--violet-soft); }

.content-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #e7ebf0;
}

.search-box {
  display: flex;
  min-height: 40px;
  flex: 1;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  transition: 160ms ease;
}

.search-box svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #8695a7;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.search-box button {
  width: 25px;
  height: 25px;
  color: #8a98a8;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
}

.search-box button:hover {
  color: #46576c;
  background: #e9eef4;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
}

.skill-card {
  display: flex;
  min-height: 192px;
  flex-direction: column;
  padding: 20px;
  border: 1px solid #e1e7ed;
  border-radius: 12px;
  background: #fff;
  transition: 170ms ease;
}

.skill-card:hover {
  border-color: #b8cbea;
  box-shadow: 0 12px 30px rgba(31, 70, 115, 0.09);
  transform: translateY(-2px);
}

.skill-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.skill-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-glyph {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--primary);
  border-radius: 9px;
  background: var(--primary-soft);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.skill-title h2 {
  margin: 0;
  color: #17263a;
  font-size: 15px;
  line-height: 1.25;
}

.skill-title span {
  display: block;
  margin-top: 4px;
  color: #8a97a6;
  font-size: 10px;
}

.version-badge {
  padding: 4px 8px;
  color: #24599d;
  border: 1px solid #d5e3f7;
  border-radius: 999px;
  background: #f2f7fe;
  font-size: 10px;
  font-weight: 700;
}

.skill-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 15px 0 13px;
  color: #5f6f83;
  font-size: 12px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-list {
  display: flex;
  min-height: 24px;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 4px 7px;
  color: #586b82;
  border-radius: 5px;
  background: #f0f3f7;
  font-size: 9px;
  font-weight: 600;
}

.skill-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid #edf0f4;
}

.skill-meta {
  min-width: 0;
  color: #8b98a8;
  font-size: 9px;
  line-height: 1.55;
}

.skill-meta code {
  display: block;
  max-width: 240px;
  overflow: hidden;
  color: #708196;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  color: #426080;
  border: 1px solid #dce4ec;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
}

.download-button:hover {
  color: var(--primary);
  border-color: #a9c6ee;
  background: #f7faff;
}

.download-button svg {
  width: 14px;
  height: 14px;
}

.empty-state {
  display: grid;
  min-height: 390px;
  place-items: center;
  align-content: center;
  padding: 40px;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  color: #7394bd;
  border-radius: 22px;
  background: #edf4fb;
}

.empty-icon svg {
  width: 43px;
  height: 43px;
}

.empty-state h2 {
  margin: 18px 0 6px;
  font-size: 17px;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.loading-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
}

.loading-card {
  height: 190px;
  border-radius: 12px;
  background: linear-gradient(100deg, #f0f3f6 20%, #f8fafc 45%, #f0f3f6 70%);
  background-size: 240% 100%;
  animation: shimmer 1.4s infinite linear;
}

@keyframes shimmer {
  to { background-position: -240% 0; }
}

.baseline-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  color: #24715c;
  border: 1px solid #cce9df;
  border-radius: 999px;
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 650;
}

.baseline-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22a77f;
}

.initializer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 315px;
  gap: 18px;
  align-items: start;
}

.form-card {
  padding: 28px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.section-heading > span {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--primary);
  border-radius: 9px;
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 800;
}

.section-heading h2 {
  margin: 1px 0 4px;
  font-size: 16px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  margin-top: 22px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field > span {
  color: #43536a;
  font-size: 11px;
  font-weight: 700;
}

.field > span b {
  color: var(--danger);
}

.field input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: var(--surface-soft);
  font-size: 12px;
  transition: 160ms ease;
}

.field small {
  color: #8c99a8;
  font-size: 9px;
  line-height: 1.5;
}

.section-divider {
  height: 1px;
  margin: 28px 0;
  background: #e7ebef;
}

code {
  padding: 2px 4px;
  border-radius: 4px;
  background: #f0f3f7;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.92em;
}

.skill-selector {
  display: grid;
  max-height: 275px;
  gap: 8px;
  overflow: auto;
  margin-top: 18px;
  padding-right: 4px;
}

.selector-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid #e1e7ed;
  border-radius: 9px;
  cursor: pointer;
  background: #fff;
  transition: 150ms ease;
}

.selector-item:hover {
  border-color: #b9cbea;
  background: #fbfdff;
}

.selector-item:has(input:checked) {
  border-color: #79a9ea;
  background: #f3f8ff;
  box-shadow: inset 3px 0 var(--primary);
}

.selector-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.selector-copy {
  min-width: 0;
  flex: 1;
}

.selector-copy strong,
.selector-copy span {
  display: block;
}

.selector-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selector-copy span {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selector-version {
  color: #4b6382;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 10px;
}

.selector-empty {
  padding: 24px;
  color: var(--muted);
  border: 1px dashed #cad5e1;
  border-radius: 9px;
  background: #fafbfd;
  font-size: 11px;
  text-align: center;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #e7ebef;
}

.form-actions strong,
.form-actions span {
  display: block;
}

.form-actions strong {
  font-size: 11px;
}

.form-actions span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.preview-card {
  position: sticky;
  top: 95px;
  overflow: hidden;
  border: 1px solid #ccd8e5;
  border-radius: 15px;
  background: #152b42;
  box-shadow: 0 20px 50px rgba(21, 43, 66, 0.18);
}

.preview-top {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 19px;
  color: #eef6ff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.preview-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #7fb5ff;
  border-radius: 9px;
  background: rgba(75, 137, 221, 0.17);
}

.preview-icon svg {
  width: 21px;
  height: 21px;
}

.preview-top span:not(.preview-icon),
.preview-top strong {
  display: block;
}

.preview-top span:not(.preview-icon) {
  color: #8fa8bf;
  font-size: 9px;
}

.preview-top strong {
  max-width: 200px;
  overflow: hidden;
  margin-top: 4px;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree {
  padding: 20px;
  color: #adc1d3;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  line-height: 2;
}

.tree b {
  color: #eaf4fd;
  font-weight: 600;
}

.tree span {
  color: #587591;
}

.tree .indent {
  padding-left: 13px;
}

.preview-points {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 17px 20px 21px;
  list-style: none;
  color: #9cb2c5;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  font-size: 9px;
}

.preview-points li {
  display: flex;
  gap: 8px;
  align-items: center;
}

.preview-points span {
  color: #49c79d;
}

.modal {
  width: min(600px, calc(100vw - 32px));
  padding: 0;
  color: var(--text);
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(13, 28, 45, 0.25);
}

.modal::backdrop {
  background: rgba(13, 29, 46, 0.58);
  backdrop-filter: blur(3px);
}

.modal form {
  padding: 27px;
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.modal-heading h2 {
  margin: 5px 0 6px;
  font-size: 21px;
}

.modal-heading p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.icon-button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: #728196;
  border: 0;
  border-radius: 50%;
  background: #f1f4f7;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.upload-dropzone {
  display: grid;
  min-height: 155px;
  place-items: center;
  align-content: center;
  margin-top: 22px;
  padding: 22px;
  color: #5e7187;
  border: 1px dashed #aac0d8;
  border-radius: 12px;
  background: #f7fafd;
  cursor: pointer;
  text-align: center;
  transition: 150ms ease;
}

.upload-dropzone:hover {
  border-color: #5791df;
  background: #f1f7ff;
}

.upload-dropzone svg {
  width: 43px;
  height: 43px;
  margin-bottom: 10px;
  color: var(--primary);
}

.upload-dropzone strong {
  color: #2a4059;
  font-size: 13px;
}

.upload-dropzone span {
  margin-top: 6px;
  color: #8997a7;
  font-size: 9px;
}

.upload-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.modal-fields {
  margin-top: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 19px;
  border-top: 1px solid #e7ebef;
}

.toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  z-index: 100;
  display: flex;
  width: min(380px, calc(100vw - 32px));
  align-items: flex-start;
  gap: 11px;
  padding: 16px;
  color: #215b49;
  border: 1px solid #c3e6da;
  border-radius: 12px;
  background: #f1fbf7;
  box-shadow: 0 18px 50px rgba(28, 63, 52, 0.16);
  animation: toast-in 200ms ease both;
}

.toast.error {
  color: #8e2e3b;
  border-color: #f0c7cd;
  background: #fff5f6;
}

.toast > span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.toast.error > span {
  background: var(--danger);
}

.toast strong {
  font-size: 12px;
}

.toast p {
  margin: 4px 0 0;
  color: currentColor;
  font-size: 10px;
  line-height: 1.5;
  opacity: 0.85;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1080px) {
  .sidebar {
    width: 214px;
  }

  .main-content {
    margin-left: 214px;
  }

  .view {
    padding-inline: 28px;
  }

  .identity-copy {
    display: none;
  }

  .initializer-layout {
    grid-template-columns: 1fr;
  }

  .preview-card {
    position: static;
  }

  .tree {
    columns: 2;
  }
}

@media (max-width: 820px) {
  .sidebar {
    position: static;
    width: auto;
    min-height: auto;
    padding: 14px 18px;
    flex-direction: row;
    align-items: center;
  }

  .brand {
    padding: 0 18px 0 0;
    border: 0;
  }

  .brand span,
  .sidebar-note {
    display: none;
  }

  .nav-list {
    display: flex;
    margin: 0;
  }

  .nav-item {
    width: auto;
  }

  .main-content {
    margin-left: 0;
  }

  .topbar {
    min-height: auto;
    padding: 12px 20px;
  }

  .identity-panel {
    width: 100%;
    justify-content: flex-end;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 125px;
  }

  .skill-grid,
  .loading-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .sidebar {
    display: block;
  }

  .brand {
    display: none;
  }

  .nav-list {
    justify-content: space-between;
  }

  .nav-item {
    flex: 1;
    justify-content: center;
    padding: 10px;
    font-size: 11px;
  }

  .topbar {
    align-items: flex-start;
  }

  .identity-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .identity-panel input {
    width: 100%;
  }

  .connection-state {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .view {
    padding: 28px 16px 45px;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: auto;
  }

  .form-card {
    padding: 20px 16px;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .tree {
    columns: 1;
  }

  .modal form {
    padding: 21px 17px;
  }
}
