:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f7faff;
  --text: #121722;
  --muted: #5f6b7a;
  --line: #dce3ee;
  --line-soft: #edf1f7;
  --accent: #1557e6;
  --accent-dark: #0d3fb7;
  --green: #178a42;
  --surface: #ffffff;
  --code-bg: #0f172a;
  --code-text: #dbeafe;
  --shadow: 0 14px 40px rgba(18, 23, 34, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

a:hover {
  color: var(--accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brand,
.site-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  color: var(--accent);
  font-size: 24px;
  font-weight: 780;
}

.brand-mark {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 25px;
}

.site-nav {
  gap: 6px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 6px;
  color: #1e2633;
  font-size: 15px;
  font-weight: 650;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: #eef4ff;
  color: var(--accent);
}

.grid-bg {
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 70px 70px;
}

.hero {
  border-bottom: 1px solid var(--line);
}

.hero-inner,
.content-shell,
.split-section {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.hero-inner {
  padding: 82px 0 54px;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  color: var(--green);
  font-size: 15px;
  font-weight: 650;
}

.status-line span {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: #45cc75;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: 76px;
  line-height: 1.04;
  letter-spacing: 0;
}

h1::after {
  content: "";
  display: block;
  width: 78px;
  height: 4px;
  margin-top: 28px;
  background: var(--accent);
}

h2 {
  margin-bottom: 18px;
  font-size: 24px;
  line-height: 1.3;
}

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

.hero-copy {
  max-width: 650px;
  margin-bottom: 24px;
  color: #273142;
  font-size: 21px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 42px;
  padding: 0;
  margin: 0 0 54px;
  list-style: none;
  color: #253045;
  font-weight: 620;
}

.hero-points li::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  border: 1px solid #3eae5f;
  border-radius: 50%;
  color: var(--green);
  font-size: 13px;
}

.entry-grid,
.file-grid,
.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.entry-card,
.file-card,
.demo-card,
.article-card {
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 6px 24px rgba(18, 23, 34, 0.04);
}

.entry-card:hover,
.file-card:hover,
.demo-card:hover,
.article-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.entry-icon {
  position: relative;
  display: block;
  width: 48px;
  height: 48px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 800;
  line-height: 1;
}

.entry-icon::before,
.entry-icon::after {
  position: absolute;
  content: "";
  display: block;
}

.icon-folder::before {
  left: 2px;
  bottom: 7px;
  width: 44px;
  height: 30px;
  border: 4px solid var(--accent);
  border-radius: 5px;
}

.icon-folder::after {
  left: 2px;
  top: 8px;
  width: 24px;
  height: 12px;
  border: 4px solid var(--accent);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}

.icon-terminal::before {
  inset: 5px 2px 4px;
  border: 4px solid var(--accent);
  border-radius: 5px;
}

.icon-terminal::after {
  left: 14px;
  top: 18px;
  width: 20px;
  height: 16px;
  border-right: 4px solid var(--accent);
  border-bottom: 4px solid var(--accent);
  transform: skewX(-10deg);
}

.icon-doc::before {
  inset: 3px 8px 3px 8px;
  border: 4px solid var(--accent);
  border-radius: 4px;
}

.icon-doc::after {
  left: 18px;
  top: 17px;
  width: 18px;
  height: 4px;
  background: var(--accent);
  box-shadow: 0 10px 0 var(--accent), 0 20px 0 var(--accent);
}

.entry-card strong,
.file-card strong,
.demo-card strong {
  margin-top: 22px;
  font-size: 22px;
  line-height: 1.3;
}

.entry-card small,
.file-card small,
.demo-card small {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}

.entry-action,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  margin-top: auto;
  padding: 9px 18px;
  border: 1px solid #b8c8e8;
  border-radius: 4px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
}

.entry-action:hover,
.button-link:hover {
  border-color: var(--accent);
  background: #f2f6ff;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 28px;
  padding: 46px 0 70px;
}

.panel-list {
  min-width: 0;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.section-title-row a {
  color: var(--accent);
  font-weight: 700;
}

.list-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}

.list-item p,
.article-card p,
.file-card p,
.demo-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.list-item time {
  color: var(--muted);
  font-size: 14px;
}

.item-badge {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 6px;
  background: #eaf1ff;
  color: var(--accent);
  font-weight: 800;
}

.item-badge.green {
  background: #eaf8ef;
  color: var(--green);
}

.category-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 19px 0;
  border-bottom: 1px solid var(--line-soft);
}

.category-row span {
  color: var(--text);
  font-weight: 760;
}

.category-row small {
  color: var(--muted);
  font-size: 15px;
}

.content-shell {
  padding: 50px 0 76px;
}

.page-head {
  max-width: 780px;
  margin-bottom: 38px;
}

.page-head p {
  color: var(--muted);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--accent);
  font-weight: 650;
}

.file-grid,
.demo-grid,
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.file-card,
.demo-card {
  min-height: 190px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.tag {
  padding: 2px 8px;
  border-radius: 4px;
  background: #eef4ff;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.resource-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.resource-table th,
.resource-table td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.resource-table th {
  background: var(--bg-soft);
  color: #273142;
  font-size: 14px;
}

.resource-table tr:last-child td {
  border-bottom: 0;
}

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

.preview-frame {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
}

.image-preview {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
}

.code-block {
  overflow: auto;
  padding: 22px;
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 14px;
  line-height: 1.7;
}

.article-layout {
  max-width: 820px;
}

.article-layout time {
  color: var(--muted);
}

.article-layout p,
.article-layout li {
  color: #273142;
  font-size: 18px;
}

.article-layout h2 {
  margin-top: 40px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 840px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 16px 22px;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero-inner,
  .content-shell,
  .split-section,
  .site-footer {
    width: min(100% - 32px, 680px);
  }

  .hero-inner {
    padding: 52px 0 40px;
  }

  h1 {
    font-size: 42px;
  }

  .hero-copy {
    font-size: 18px;
  }

  .entry-grid,
  .split-section,
  .file-grid,
  .demo-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .list-item {
    grid-template-columns: 54px 1fr;
  }

  .list-item time {
    grid-column: 2;
  }

  .resource-table,
  .resource-table tbody,
  .resource-table tr,
  .resource-table td {
    display: block;
  }

  .resource-table thead {
    display: none;
  }

  .resource-table td {
    padding: 12px 14px;
  }
}
