:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #60706c;
  --line: #d9e2df;
  --paper: #ffffff;
  --soft: #f3f7f5;
  --green: #17695d;
  --green-dark: #123e37;
  --teal: #66cfc3;
  --blue: #2e5f89;
  --amber: #b46b19;
  --max-width: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 68px;
  padding: 10px max(24px, calc((100% - var(--max-width)) / 2));
  border-bottom: 1px solid rgba(23, 33, 31, 0.1);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav a {
  color: #46534f;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

nav a:hover { color: var(--green); }

nav .nav-login {
  min-height: 38px;
  padding: 7px 15px;
  border: 1px solid var(--green);
  border-radius: 6px;
  color: var(--green);
}

main { overflow: hidden; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  align-items: center;
  gap: clamp(40px, 7vw, 96px);
  width: min(var(--max-width), calc(100% - 48px));
  min-height: min(670px, calc(100vh - 68px));
  padding: 72px 0 88px;
}

.intro,
.section,
.work-entry,
footer {
  margin-right: auto;
  margin-left: auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p { overflow-wrap: break-word; }

h1 {
  max-width: 760px;
  margin: 0;
  font-size: 60px;
  line-height: 1.13;
  letter-spacing: 0;
}

.intro-lead {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button:hover { transform: translateY(-1px); }

.button-primary { background: var(--green); color: #fff; }
.button-primary:hover { background: #11574e; }
.button-secondary { border-color: #afbbb7; background: #fff; color: #32413d; }
.button-secondary:hover { border-color: var(--green); color: var(--green); }

.system-panel {
  border: 1px solid #cbd8d4;
  border-radius: 8px;
  background: var(--green-dark);
  color: #fff;
  box-shadow: 0 22px 60px rgba(18, 62, 55, 0.16);
}

.system-panel-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.system-panel-heading img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.system-panel-heading span { display: block; color: #b8d4ce; font-size: 12px; }
.system-panel-heading strong { display: block; font-size: 25px; line-height: 1.3; }

.system-panel dl { margin: 0; padding: 8px 24px; }
.system-panel dl div { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 15px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.system-panel dt { color: var(--teal); font-weight: 800; }
.system-panel dd { margin: 0; color: #e5eeeb; }
.system-panel > a { display: flex; justify-content: space-between; padding: 20px 24px; color: #fff; font-weight: 750; text-decoration: none; }
.link-arrow {
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.section {
  width: min(var(--max-width), calc(100% - 48px));
  padding: 80px 0;
}

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

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 32px;
}

.section-heading h2,
.work-entry h2 { margin: 0; font-size: 30px; line-height: 1.25; letter-spacing: 0; }
.section-heading > p { max-width: 420px; margin: 0; color: var(--muted); font-size: 14px; }

.note-list,
.download-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.note-list article {
  min-height: 238px;
  padding: 24px;
  border-top: 3px solid var(--green);
  background: var(--soft);
}

.note-list article:nth-child(2) { border-top-color: var(--blue); }
.note-list article:nth-child(3) { border-top-color: var(--amber); }
.note-list article > span { color: var(--green); font-size: 12px; font-weight: 800; }
.note-list article:nth-child(2) > span { color: var(--blue); }
.note-list article:nth-child(3) > span { color: var(--amber); }
.note-list h3 { margin: 17px 0 10px; font-size: 19px; line-height: 1.4; letter-spacing: 0; }
.note-list p { margin: 0; color: var(--muted); font-size: 14px; }
.note-list small { display: block; margin-top: 24px; color: #74817d; }

.downloads {
  width: 100%;
  max-width: none;
  padding-right: max(24px, calc((100% - var(--max-width)) / 2));
  padding-left: max(24px, calc((100% - var(--max-width)) / 2));
  background: #f1f5f7;
}

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

.download-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 268px;
  padding: 26px;
  border: 1px solid #ccd9dd;
  border-radius: 8px;
  background: #fff;
}

.download-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.platform { margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.download-card h3 { margin: 3px 0 0; font-size: 22px; letter-spacing: 0; }
.file-type { flex: 0 0 auto; padding: 4px 8px; border: 1px solid #c6d4d0; border-radius: 4px; color: var(--green); font-size: 11px; font-weight: 800; }
.file-name { margin: 22px 0 8px; color: #33423e; font: 13px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.file-meta { margin: 0; color: var(--muted); font-size: 13px; }
.download-actions { display: flex; align-items: center; gap: 16px; margin-top: 24px; }
.checksum-link { color: var(--green); font-size: 13px; font-weight: 700; }
.download-placeholder,
.download-error { grid-column: 1 / -1; min-height: 110px; padding: 36px; border: 1px solid #ccd9dd; border-radius: 8px; background: #fff; color: var(--muted); text-align: center; }

.work-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  width: min(var(--max-width), calc(100% - 48px));
  margin-top: 80px;
  margin-bottom: 80px;
  padding: 38px 42px;
  background: #173f38;
  color: #fff;
}

.work-entry .eyebrow { color: var(--teal); }
.work-entry p:last-child { margin: 10px 0 0; color: #c7d9d4; }
.button-light { flex: 0 0 auto; background: #fff; color: var(--green-dark); }

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--max-width), calc(100% - 48px));
  padding: 24px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

footer p { margin: 0; }
footer a { color: #53635f; text-decoration: none; }
footer a:hover { color: var(--green); text-decoration: underline; }

@media (max-width: 800px) {
  .site-header { min-height: 60px; padding: 9px 18px; }
  nav { gap: 12px; }
  nav a:not(.nav-login) { display: none; }
  nav .nav-login { min-height: 36px; padding: 6px 12px; }
  .intro { grid-template-columns: 1fr; width: min(100% - 36px, 620px); min-height: auto; gap: 38px; padding: 54px 0 62px; }
  h1 { font-size: 39px; }
  .intro-lead { font-size: 16px; }
  .system-panel { width: 100%; }
  .section { width: min(100% - 36px, 620px); padding: 60px 0; }
  .downloads { width: 100%; padding-right: 18px; padding-left: 18px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 12px; }
  .note-list,
  .download-list { grid-template-columns: 1fr; }
  .note-list article { min-height: 0; }
  .work-entry { display: block; width: calc(100% - 36px); margin: 60px 18px; padding: 30px 24px; }
  .work-entry .button { width: 100%; margin-top: 24px; }
  footer { display: grid; justify-content: center; gap: 6px; width: calc(100% - 36px); text-align: center; }
}

@media (max-width: 380px) {
  h1 { font-size: 34px; }
  .intro-actions .button { width: 100%; }
  .download-card { padding: 22px 20px; }
  .download-actions { align-items: stretch; flex-direction: column; }
  .download-actions .button { width: 100%; }
  .checksum-link { text-align: center; }
}

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