:root {
  --red: #d71920;
  --red-dark: #a80f17;
  --ink: #1f242d;
  --muted: #6f7785;
  --line: #e7e9ee;
  --paper: #f7f8fa;
  --white: #ffffff;
  --soft-red: #fff1f1;
  --gold: #b99554;
  --shadow: 0 14px 36px rgba(31, 36, 45, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 83% 2%, rgba(215, 25, 32, 0.12), transparent 18rem),
    linear-gradient(180deg, #ffffff 0%, #f4f5f7 100%);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 22px;
  background: var(--white);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--red);
}

.brand {`n  display: flex;`n  align-items: center;`n  min-height: 52px;`n}`n`n.brand-logo {`n  display: block;`n  width: 188px;`n  height: auto;`n}`n
.nav-label,
.eyebrow {
  margin: 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.group-nav {
  display: grid;
  gap: 8px;
}

.nav-button {
  min-height: 44px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-button:hover,
.nav-button.active {
  border-color: #f0c8ca;
  background: var(--soft-red);
  color: var(--red-dark);
}

.nav-count {
  min-width: 24px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--red);
  background: var(--white);
  border: 1px solid #f0c8ca;
  border-radius: 999px;
  font-size: 12px;
}

.side-note {
  margin-top: auto;
  padding: 14px;
  border-top: 3px solid var(--red);
  background: #fafafa;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.note-title {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 800;
}

.main {
  padding: 30px 34px 38px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: var(--red);
  font-size: 34px;
  line-height: 1.18;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.35;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.35;
}

.top-actions {
  display: flex;
  gap: 12px;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 300px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
}

.search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: none;
  color: var(--ink);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  margin-bottom: 22px;
  padding: 32px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.94), rgba(255,255,255,0.82)),
    repeating-linear-gradient(-8deg, rgba(215,25,32,0.08) 0 2px, transparent 2px 12px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero-kicker {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.hero h2 {
  margin-bottom: 16px;
  color: var(--red);
  font-size: 32px;
}

.hero p {
  color: var(--muted);
  line-height: 1.8;
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  max-width: 760px;
  margin-top: 20px;
}

.stat {
  padding: 14px;
  border-left: 4px solid var(--red);
  background: rgba(255,255,255,0.88);
}

.stat-value {
  display: block;
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel-large {
  min-height: 480px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.filter-button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}

.filter-button.active {
  border-color: var(--red);
  color: var(--red);
  background: var(--soft-red);
}

.item-list {
  display: grid;
  gap: 10px;
}

.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  background: #fff;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.tag {
  padding: 2px 7px;
  border: 1px solid #f0c8ca;
  border-radius: 999px;
  color: var(--red);
  background: var(--soft-red);
}

.item p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.download-link {
  align-self: center;
  min-width: 82px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--red);
  border-radius: 6px;
  color: var(--red);
  font-weight: 800;
  font-size: 13px;
}

.download-link:hover {
  background: var(--red);
  color: var(--white);
}

.team-list {
  display: grid;
  gap: 11px;
}

.team-card {
  padding: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, #fff, #fbfbfc);
}

.team-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--red-dark);
}

.team-card span {
  color: var(--muted);
  font-size: 13px;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.skill-card {
  min-height: 136px;
  padding: 16px;
  border-top: 4px solid var(--red);
  background: var(--paper);
}

.skill-card p {
  color: var(--muted);
  line-height: 1.65;
  font-size: 13px;
}

.empty {
  padding: 22px;
  border: 1px dashed #d9dde5;
  color: var(--muted);
  background: #fbfbfc;
  line-height: 1.7;
}

.disclaimer {
  margin-top: 18px;
  border-left: 5px solid var(--red);
}

.disclaimer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

/* ===================== 部门 SkillHub ===================== */

.skillhub-entry {
  text-decoration: none;
}

.sh-topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.sh-back {
  flex-shrink: 0;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
}

.sh-back:hover {
  color: var(--red);
  border-color: var(--red);
}

.sh-topbar-title {
  flex: 1;
  min-width: 220px;
}

.sh-topbar-title h2 {
  color: var(--red);
}

.sh-topbar-actions {
  display: flex;
}

.sh-search {
  min-width: 280px;
}

.sh-hero h2 {
  font-size: 28px;
}

.sh-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sh-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-top: 4px solid var(--red);
  background: var(--paper);
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.sh-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  background: var(--white);
}

.sh-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sh-card-head h3 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sh-emoji {
  font-size: 22px;
  line-height: 1;
}

.sh-emoji-lg {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  font-size: 34px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  background: var(--paper);
}

.sh-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
}

.sh-card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.sh-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
}

.sh-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12px;
}

.sh-tag-btn {
  cursor: pointer;
}

.sh-tag-btn:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.sh-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sh-tag-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.sh-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.sh-toolbar-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.sh-result-info {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

.sh-select {
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}

.sh-detail {
  display: grid;
  gap: 18px;
}

.sh-detail-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.sh-detail-info {
  min-width: 0;
}

.sh-detail-info h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--red);
}

.sh-detail-desc {
  color: var(--muted);
  line-height: 1.75;
}

.sh-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.sh-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.sh-rating-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  background: #fbfaf7;
}

.sh-rating-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sh-rating-stars {
  color: var(--gold);
  font-size: 18px;
  letter-spacing: 2px;
}

.sh-rating-summary strong {
  color: var(--ink);
  font-size: 14px;
}

.sh-rating-action {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 13px;
}

.sh-star {
  border: 0;
  background: transparent;
  color: #c9cdd6;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px;
}

.sh-star.on,
.sh-star:hover {
  color: var(--gold);
}

.sh-rated-done {
  color: var(--gold);
  font-weight: 800;
}

.sh-version-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.sh-version-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.sh-changelog {
  color: var(--muted);
  font-size: 13px;
}

.sh-changelog strong {
  color: var(--ink);
}

.sh-doc {
  padding: 20px 22px;
  border: 1px solid var(--line);
  background: var(--white);
}

/* Markdown 排版 */
.sh-md {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.8;
  overflow-wrap: break-word;
}

.sh-md h1,
.sh-md h2 {
  color: var(--red-dark);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.sh-md h1 { font-size: 22px; }
.sh-md h2 { font-size: 19px; }
.sh-md h3 { font-size: 16px; }
.sh-md h4,
.sh-md h5,
.sh-md h6 { font-size: 14px; }

.sh-md p {
  margin: 0 0 10px;
}

.sh-md ul,
.sh-md ol {
  margin: 0 0 10px;
  padding-left: 22px;
}

.sh-md li {
  margin-bottom: 4px;
}

.sh-md blockquote {
  margin: 0 0 10px;
  padding: 8px 14px;
  border-left: 4px solid var(--red);
  background: var(--soft-red);
  color: #5a2025;
}

.sh-md pre {
  margin: 0 0 10px;
  padding: 14px;
  overflow-x: auto;
  background: #1f242d;
  color: #e8eaf0;
  border-radius: 6px;
  font-size: 12.5px;
  line-height: 1.6;
}

.sh-md code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #eef0f4;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12.5px;
}

.sh-md pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.sh-md table {
  width: 100%;
  margin: 0 0 10px;
  border-collapse: collapse;
  font-size: 13px;
}

.sh-md th,
.sh-md td {
  padding: 7px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.sh-md th {
  background: var(--soft-red);
  color: var(--red-dark);
  font-weight: 800;
}

.sh-md tr:nth-child(even) td {
  background: #fbfbfc;
}

.sh-md a {
  color: var(--red);
  text-decoration: underline;
}

.sh-md hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 14px 0;
}

.sh-download-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #f0c8ca;
  background: var(--soft-red);
}

.sh-download-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.sh-download-btn {
  border: 0;
}

.sh-download-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sh-download-btn:disabled:hover {
  background: var(--white);
  color: var(--red);
}

.sh-lock-state {
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 700;
}

.sh-lock-state.ok {
  color: #1d7a3d;
}

.sh-lock-toggle {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

.sh-unlock-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.sh-unlock-form input {
  height: 38px;
  min-width: 220px;
  padding: 0 12px;
  border: 1px solid #f0c8ca;
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
}

.sh-unlock-form input:focus {
  outline: 2px solid var(--red);
  outline-offset: -1px;
}

.sh-unlock-hint,
.sh-download-note,
.sh-offline-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.sh-comments {
  display: grid;
  gap: 12px;
}

.sh-comments h3 {
  margin: 0;
}

.sh-comment-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sh-comment {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  background: var(--white);
}

.sh-comment-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 13px;
}

.sh-comment-head strong {
  color: var(--red-dark);
}

.sh-comment-head span {
  color: var(--muted);
  font-size: 12px;
}

.sh-comment p {
  margin: 0;
  color: var(--ink);
  line-height: 1.7;
}

.sh-comment-form {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.sh-input {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
}

.sh-input:focus {
  outline: 2px solid var(--red);
  outline-offset: -1px;
}

.sh-submit-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.sh-submit-cta h2 {
  color: var(--red);
}

.sh-submit-cta p {
  margin: 6px 0 0;
  color: var(--muted);
}

.sh-submit-cta .download-link {
  border: 0;
  cursor: pointer;
}

.sh-upload-panel {
  display: grid;
  gap: 14px;
}

.sh-upload-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sh-upload-field,
.sh-upload-file {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.sh-upload-field span,
.sh-upload-file span {
  color: var(--ink);
  font-weight: 700;
}

.sh-upload-field input,
.sh-upload-field select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
}

.sh-upload-file input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #fbfbfc;
}

.sh-upload-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sh-upload-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  background: var(--white);
  font-size: 13px;
}

.sh-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sh-update-guide {
  padding: 12px 14px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.sh-update-guide .filter-button {
  margin-left: 8px;
}

.sh-toast {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 999;
  padding: 12px 18px;
  border-left: 4px solid #1d7a3d;
  background: #ffffff;
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 13px;
  max-width: 320px;
}

.sh-toast-error {
  border-left-color: var(--red);
  color: var(--red-dark);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .workspace-grid,
  .skill-grid,
  .hero-stats,
  .sh-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }

  .search,
  .sh-search {
    min-width: 0;
    width: 100%;
  }

  .sh-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .sh-topbar-actions {
    width: 100%;
  }

  .sh-detail-head {
    flex-direction: column;
  }

  .sh-result-info {
    margin-left: 0;
  }

  .sh-upload-form {
    grid-template-columns: 1fr;
  }
}

