:root {
  --bg: #f3efe9;
  --paper: rgba(255, 250, 245, 0.82);
  --ink: #251d18;
  --muted: #706760;
  --line: rgba(37, 29, 24, 0.1);
  --accent: #8d6948;
  --shadow: 0 22px 50px rgba(44, 28, 16, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(173, 140, 102, 0.16), transparent 28%),
    linear-gradient(180deg, #faf5ef 0%, #f1e8dd 100%);
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 29, 24, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 29, 24, 0.025) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 96%);
}

.sidebar {
  position: relative;
  z-index: 1;
  padding: 22px;
  border-right: 1px solid rgba(37, 29, 24, 0.08);
  background: rgba(255, 250, 245, 0.84);
  backdrop-filter: blur(14px);
}

.logo,
.panel-head,
.header-links,
.stats,
.mapping-layout {
  display: flex;
}

.logo {
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #b78d65, #6b4d34);
}

.logo strong,
.logo small {
  display: block;
}

.logo small,
.header-links a,
.stack-list span,
.mapping-flow,
th,
td {
  color: var(--muted);
}

.menu {
  display: grid;
  gap: 8px;
}

.menu a {
  color: var(--muted);
  padding: 12px 14px;
  border-radius: 14px;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.menu a.active,
.menu a:hover {
  background: rgba(143, 107, 73, 0.12);
  color: var(--ink);
  transform: translateY(-1px);
}

.content {
  position: relative;
  z-index: 1;
  padding: 28px;
}

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

.content-header h1 {
  margin: 0;
  max-width: 15ch;
  font-size: clamp(26px, 2.8vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-links {
  gap: 14px;
  padding-top: 8px;
}

.header-links a {
  font-size: 13px;
  letter-spacing: 0.02em;
}

.stats {
  gap: 14px;
  margin-bottom: 18px;
}

.stats article,
.panel,
.mapping-card {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.stats article {
  flex: 1;
  padding: 18px 18px 20px;
  border-radius: 20px;
}

.stats span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.7;
}

.stats strong {
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  padding: 20px;
  border-radius: 24px;
}

.panel-head {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.panel-head h2,
.mapping-card strong {
  margin: 0;
}

.panel-head h2 {
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #7e5b3e, #a8845a);
  color: #fff;
  cursor: pointer;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  line-height: 1.8;
}

.stack-list {
  display: grid;
  gap: 12px;
}

.stack-list > div {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
}

.stack-list strong,
.stack-list span {
  display: block;
}

.stack-list strong {
  font-size: 15px;
  line-height: 1.38;
  letter-spacing: -0.02em;
}

.stack-list span {
  font-size: 13px;
  line-height: 1.82;
}

.mapping-layout {
  gap: 14px;
}

.mapping-card {
  flex: 1;
  padding: 16px;
  border-radius: 18px;
}

.mapping-flow {
  margin: 12px 0 0;
  padding-left: 18px;
  line-height: 1.92;
  font-size: 13px;
}

.code-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.code-list span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(143, 107, 73, 0.12);
  font-size: 12px;
  color: var(--accent);
}

@media (max-width: 1100px) {
  body {
    grid-template-columns: 1fr;
  }

  .grid-2,
  .stats,
  .mapping-layout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .content-header {
    flex-direction: column;
  }
}
