:root {
  --brand: #0b4771;
  --brand-dark: #08314f;
  --accent: #20a69a;
  --ink: #172a3a;
  --muted: #637282;
  --line: #dce4ea;
  --soft: #f5f8fa;
  --paper: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

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

.page-shell {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.top-strip {
  color: rgba(255, 255, 255, .78);
  background: var(--brand-dark);
  font-size: 13px;
}

.top-strip .page-shell {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.top-strip a:hover,
.main-nav a:hover,
.footer-links a:hover {
  color: var(--accent);
}

.site-header {
  color: #fff;
  background: linear-gradient(90deg, #0b4771, #0d5d82);
  box-shadow: 0 10px 30px rgba(7, 38, 62, .14);
}

.masthead {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand {
  font-size: 22px;
}

.brand img,
.footer-brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 15px;
  font-weight: 700;
}

.page-title {
  padding: 42px 0 46px;
  color: #fff;
  background: linear-gradient(90deg, rgba(8, 49, 79, .96), rgba(11, 71, 113, .9)), url("assets/future/robomaster.webp") center 42% / cover;
}

.breadcrumb {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, .68);
  font-size: 13px;
}

.page-title h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.2;
  letter-spacing: 0;
}

.page-title p:last-child {
  max-width: 680px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, .78);
  line-height: 1.8;
}

.content-wrap {
  padding: 34px 0 70px;
}

.content-grid {
  display: grid;
  grid-template-columns: 236px 1fr;
  gap: 26px;
  align-items: start;
}

.sidebar,
.download-panel,
.notice {
  background: var(--paper);
  border: 1px solid var(--line);
}

.sidebar {
  position: sticky;
  top: 20px;
}

.sidebar h2 {
  margin: 0;
  padding: 20px 22px;
  color: #fff;
  background: var(--brand);
  font-size: 18px;
}

.sidebar a {
  display: block;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  color: #33485b;
  font-size: 15px;
}

.sidebar a:last-child {
  border-bottom: 0;
}

.sidebar a.active,
.sidebar a:hover {
  color: var(--brand);
  background: #eef7f8;
  font-weight: 800;
}

.download-panel {
  padding: 30px;
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--brand);
}

.section-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.panel-head h2,
.notice h2 {
  margin: 6px 0 0;
  font-size: 28px;
  line-height: 1.25;
}

.panel-head p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

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

.software-item.featured {
  padding: 28px 24px;
  margin-top: 24px;
  border: 1px solid #c9e4e2;
  border-left: 5px solid var(--accent);
  background: #f8fcfc;
}

.software-tag {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.software-meta h3 {
  margin: 0;
  font-size: 22px;
}

.software-meta p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.software-actions {
  min-width: 310px;
}

.primary-action {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  padding: 13px 18px;
  color: #fff;
  background: var(--brand);
  border-radius: 4px;
  font-weight: 800;
}

.primary-action:hover {
  background: var(--brand-dark);
}

.link-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.link-row a {
  display: inline-flex;
  justify-content: center;
  min-height: 40px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  color: var(--brand);
  background: #fff;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 750;
}

.link-row a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.software-list {
  margin-top: 10px;
}

.software-item.muted {
  grid-template-columns: 1fr 88px;
}

.state {
  justify-self: end;
  padding: 7px 12px;
  color: #7b8b98;
  background: #eef2f4;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 750;
}

.notice {
  margin-top: 28px;
  padding: 24px 28px;
}

.notice h2 {
  font-size: 22px;
}

.notice ul {
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.9;
}

.footer {
  color: rgba(255, 255, 255, .78);
  background: #061827;
}

.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 34px 0;
}

.footer-brand img {
  width: 38px;
  height: 38px;
}

.footer-main p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, .52);
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
}

.footer-bottom {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .42);
  font-size: 12px;
}

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .sidebar a {
    display: inline-flex;
    border-right: 1px solid var(--line);
  }

  .software-item,
  .software-item.muted {
    grid-template-columns: 1fr;
  }

  .software-actions {
    min-width: 0;
  }

  .state {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: calc(100% - 32px);
  }

  .top-strip .page-shell,
  .masthead,
  .panel-head,
  .footer-main,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .masthead {
    padding: 18px 0;
  }

  .main-nav,
  .footer-links {
    flex-wrap: wrap;
    gap: 14px 18px;
  }

  .page-title {
    padding: 32px 0 36px;
  }

  .page-title h1 {
    font-size: 32px;
  }

  .download-panel {
    padding: 22px 18px;
  }

  .software-item.featured {
    padding: 22px 18px;
  }

  .link-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
