/* The official site: dark like the IDE, one blue accent (the IDE's --accent). System fonts only:
   Google Fonts and most font CDNs don't load reliably in mainland China. */
:root {
  --bg: #141517;
  --bg-band: #17181b;
  --surface: #1d1e22;
  --border: #26282d;
  --border-card: #2a2c32;
  --border-strong: #383b42;
  --fg-strong: #f1f2f4;
  --fg-title: #e6e7ea;
  --fg: #c9ccd2;
  --fg-body: #a9acb3;
  --fg-muted: #8c8f95;
  --accent: #3871e1;
  --accent-hover: #2f62c8;
  --accent-soft: #26324a;
  --link: #71a1fe;
  --link-hover: #92b7ff;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
}

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

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 4px;
}

h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin: 0;
}

img {
  max-width: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 40px;
}

.muted {
  color: var(--fg-muted);
}

.nowrap {
  white-space: nowrap;
}

.mono {
  font-family: var(--mono);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.btn-lg {
  min-height: 52px;
  padding: 0 24px;
  font-size: 17px;
}

.btn small {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.85;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

.btn-ghost {
  border-color: var(--border-strong);
  color: #dfe1e5;
  font-weight: 400;
}

.btn-ghost:hover {
  border-color: #4a4e57;
  color: #ffffff;
}

/* Header and footer */

.site-header {
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
  padding-block: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-title);
  font-size: 17px;
  font-weight: 600;
}

.brand:hover {
  color: #ffffff;
}

.nav-links {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 4px 24px;
  font-size: 15px;
}

.nav-links a,
.footer-links a {
  color: #9fa2a8;
}

.nav-links a:hover,
.footer-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--fg-title);
}

.nav-cta {
  min-height: 40px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 500;
}

.site-footer {
  border-top: 1px solid var(--border);
}

.footer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-block: 40px 48px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 40px;
}

.brand-small {
  font-size: 16px;
  color: var(--fg);
}

.brand-tag {
  font-size: 14px;
  font-weight: 400;
  color: var(--fg-muted);
}

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

.legal,
.legal a {
  font-size: 13px;
  color: var(--fg-muted);
}

/* Home */

.hero {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-block: 96px 56px;
}

.hero-small {
  padding-block: 120px 160px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #9fa2a8;
}

.pill {
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid #33363d;
  color: var(--fg);
}

.hero h1 {
  max-width: 860px;
  color: var(--fg-strong);
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lead {
  max-width: 700px;
  font-size: 19px;
  line-height: 1.7;
  color: var(--fg-body);
  text-wrap: pretty;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding-top: 8px;
}

.cta-macos,
.mobile-note {
  display: none;
}

:root[data-os="macos"] .cta-default {
  display: none;
}

:root[data-os="macos"] .cta-macos {
  display: flex;
}

:root[data-os="mobile"] .mobile-note {
  display: block;
}

.mobile-note {
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: #dfe1e5;
  font-size: 15px;
}

.hint {
  font-size: 14px;
  color: var(--fg-muted);
}

.shot {
  padding-bottom: 112px;
}

.shot figure {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shot-frame {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #2e3036;
  box-shadow:
    0 40px 120px rgba(47, 134, 255, 0.1),
    0 12px 32px rgba(0, 0, 0, 0.45);
}

.shot-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.shot figcaption {
  font-size: 14px;
  color: var(--fg-muted);
}

.band {
  border-top: 1px solid var(--border);
  background: var(--bg-band);
}

.section-border {
  border-top: 1px solid var(--border);
}

.section {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-block: 96px;
}

.section h2 {
  color: var(--fg-strong);
  font-size: 34px;
  line-height: 1.25;
  font-weight: 700;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
}

.section-head p {
  color: var(--fg-body);
  font-size: 17px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border-card);
  color: var(--link);
}

.card h3 {
  color: var(--fg-title);
  font-size: 19px;
  font-weight: 600;
}

.card p {
  color: var(--fg-body);
  font-size: 15px;
}

.rows {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 48px;
  padding-block: 28px;
  border-top: 1px solid var(--border);
}

.row h3 {
  flex: 0 0 300px;
  color: var(--fg-title);
  font-size: 19px;
  font-weight: 600;
}

.row p {
  flex: 999 1 420px;
  min-width: 0;
  color: var(--fg-body);
}

.closing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding-block: 88px;
}

.closing-title {
  display: flex;
  align-items: center;
  gap: 20px;
}

.closing-title h2 {
  color: var(--fg-strong);
  font-size: 28px;
  font-weight: 700;
}

.closing-title p {
  color: #9fa2a8;
  font-size: 15px;
}

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

/* Download */

.page-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-block: 72px 40px;
}

.page-head h1 {
  color: var(--fg-strong);
  font-size: clamp(34px, 4.4vw, 48px);
  line-height: 1.2;
  font-weight: 700;
}

.page-head .mobile-note {
  margin-top: 12px;
}

.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  gap: 20px;
  padding-bottom: 72px;
  scroll-margin-top: 24px;
}

.dl-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border-card);
}

.dl-card h2 {
  color: var(--fg-strong);
  font-size: 26px;
  font-weight: 700;
}

/* Shown on the visitor's system; the other card keeps the row empty so both titles line up. */
.dl-detected {
  display: none;
  visibility: hidden;
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #dfe1e5;
  font-size: 13px;
}

:root[data-os="windows"] .dl-windows,
:root[data-os="macos"] .dl-macos {
  border-color: var(--accent);
}

:root[data-os="windows"] .dl-detected,
:root[data-os="macos"] .dl-detected {
  display: block;
}

:root[data-os="windows"] .dl-windows .dl-detected,
:root[data-os="macos"] .dl-macos .dl-detected {
  visibility: visible;
}

:root[data-os="macos"] .dl-macos {
  order: -1;
}

.dl-meta {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 6px 12px;
  font-size: 13px;
}

.dl-meta dt {
  color: var(--fg-muted);
}

.dl-meta dd {
  color: var(--fg);
}

.dl-meta .sha {
  color: var(--fg-body);
  overflow-wrap: anywhere;
}

.dl-first-run {
  padding-top: 14px;
  border-top: 1px solid var(--border-card);
  color: var(--fg-body);
  font-size: 14px;
}

.release {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 48px;
}

.release-meta {
  display: flex;
  flex: 0 0 200px;
  flex-direction: column;
  gap: 2px;
  padding-top: 14px;
}

.release-meta b {
  color: var(--fg-title);
  font-size: 20px;
  font-weight: 600;
}

.release-meta span {
  color: var(--fg-muted);
  font-size: 14px;
}

.release-notes {
  display: flex;
  flex: 999 1 560px;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--border);
}

.release-notes li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-block: 16px;
  border-top: 1px solid var(--border);
}

.release-notes b {
  color: var(--fg-title);
  font-weight: 600;
}

.release-notes span {
  color: var(--fg-body);
}

@media (max-width: 640px) {
  .container {
    padding-inline: 20px;
  }

  /* 下载 is already in the links; the button would take a row of its own. */
  .nav-cta {
    display: none;
  }

  .hero {
    padding-block: 56px 40px;
  }

  .section {
    padding-block: 64px;
  }

  .section h2 {
    font-size: 28px;
  }

  .shot {
    padding-bottom: 64px;
  }

  .btn-lg {
    white-space: normal;
    text-align: left;
  }

  .dl-card {
    padding: 24px;
  }
}
