:root {
  --header-bg: linear-gradient(#ffffff, #e3e7eb);
  --header-band: #77a13d;
  --header-ink: #22303c;
  --header-tagline: #55606a;

  --accent: #006600;
  --accent-ink: #1f3d00;
  --accent-strong: #4d7c0f;
  --accent-strong-hover: #3f6212;
  --accent-soft: #f2f7e9;
  --accent-soft-2: #e3efcf;
  --accent-line: #d3e0bf;
  --accent-mark: #77a13d;
  --arrow: #a9c37f;

  --line: #dde5d0;
  --frame: #c4ccb8;
  --footer-bg: #f4f6f1;
  --text: #333;
  --muted: #5f6659;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: linear-gradient(#fff, #e2e2e2 300px) no-repeat, #e2e2e2;
  font: 16px/1.6 var(--font-sans);
  color: var(--text);
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-ink); text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; border-radius: 2px; }

/* Page frame */
.page {
  max-width: 1080px;
  margin: 24px auto;
  background: #fff;
  border: 1px solid var(--frame);
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  grid-template-areas:
    "header header"
    "sidebar content"
    "footer footer";
}

/* Header */
.site-header {
  grid-area: header;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding: 14px 24px;
  background: var(--header-bg);
  border-bottom: 6px solid var(--header-band);
}
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--header-ink);
  text-decoration: none;
}
.site-header__brand:hover { color: var(--header-ink); }
.site-header__brand img { width: 52px; height: 52px; }
.site-header__name { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.site-header__tagline { color: var(--header-tagline); font-size: 15px; }

/* Sidebar */
.sidebar { grid-area: sidebar; padding: 24px 0 24px 24px; }

.site-nav ul { margin: 0; padding: 0; list-style: none; border: 1px solid var(--accent-line); border-radius: 6px; overflow: hidden; }
.site-nav li + li { border-top: 1px solid var(--accent-line); }
.site-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.site-nav a::before {
  content: "";
  border: 5px solid transparent;
  border-left: 6px solid var(--arrow);
  border-right: 0;
}
.site-nav a:hover { background: var(--accent-soft-2); }
.site-nav a:hover::before { border-left-color: var(--accent-mark); }
.site-nav a[aria-current="page"] {
  background: var(--accent-soft-2);
  color: var(--accent-ink);
  box-shadow: inset 4px 0 0 var(--accent-mark);
}
.site-nav a[aria-current="page"]::before { border-left-color: var(--accent-strong); }

.download-box {
  margin-top: 24px;
  padding: 12px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  background: var(--accent-soft);
  text-align: center;
}
.download-box__title { margin: 0 0 10px; color: var(--accent-ink); font-size: 18px; font-weight: 700; line-height: 1.25; }
.download-box__version { display: block; color: var(--muted); font-size: 14px; font-weight: 600; }
/* The buttons share the outer columns through subgrid so the logos and labels line up. */
.download-box__buttons { display: grid; grid-template-columns: 1fr auto auto 1fr; row-gap: 6px; }
.download-button {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--accent-strong);
  border-radius: 5px;
  background: var(--accent-strong);
  color: #fff;
  text-align: left;
  text-decoration: none;
}
.download-button:hover { background: var(--accent-strong-hover); border-color: var(--accent-strong-hover); color: #fff; }
.os-icon { grid-column: 2; width: 22px; height: 22px; margin-right: 9px; fill: currentColor; }
.download-button__text { grid-column: 3; display: flex; flex-direction: column; }
.download-button__os { font-size: 15px; font-weight: 600; line-height: 1.25; }
.download-button__arch { font-size: 12px; line-height: 1.3; }
.download-box__alt { display: inline-block; margin-top: 8px; font-size: 14px; }

.badge { display: block; margin-top: 28px; text-align: center; }
.badge img { display: inline-block; }
.badge + .badge { margin-top: 12px; }

.site-links { display: table; margin: 24px auto 0; padding: 0; list-style: none; font-size: 14px; line-height: 20px; }
.site-links li + li { margin-top: 6px; }
.site-links a { display: inline-flex; align-items: center; gap: 8px; }
.site-links img { flex: none; }

/* Content */
.content { grid-area: content; min-width: 0; padding: 24px 32px 32px; overflow-wrap: break-word; }

.content h1, .content h2, .content h3, .content h4, .content h5 {
  color: var(--accent-ink);
  line-height: 1.25;
  font-weight: 600;
}
.content h2 {
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 28px;
  color: var(--accent);
}
.content h3, .content h4 { margin: 28px 0 8px; font-size: 20px; color: var(--accent); }
.content h5 { margin: 24px 0 8px; font-size: 17px; border-bottom: 1px solid var(--line); }

.content p { margin: 0 0 16px; }
.content ul, .content ol { margin: 8px 0 16px; padding-left: 24px; }
.content li { margin: 4px 0; }
.content li::marker { color: var(--accent-mark); }
.content ul ul { margin: 4px 0 8px; list-style-type: circle; }
.content ul ul ul { list-style-type: square; }
.content small { font-size: 14px; color: var(--muted); }
.content sup { line-height: 0; }
.content .center { text-align: center; }
.content hr { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }

.content blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--accent-line); }

.content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: #f4f6f0;
  padding: 1px 4px;
  border-radius: 3px;
  overflow-wrap: anywhere;
}
.content pre {
  margin: 0 0 16px;
  padding: 12px 16px;
  background: #f4f6f0;
  border: 1px solid var(--line);
  border-radius: 4px;
  white-space: pre-wrap;
  line-height: 1.5;
}
.content pre code { padding: 0; background: none; font-size: 14px; overflow-wrap: normal; }

.content img { border: 1px solid #dde3d4; border-radius: 4px; }

/* Footer */
.site-footer {
  grid-area: footer;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: var(--footer-bg);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* Phones */
@media (max-width: 760px) {
  .page {
    margin: 0;
    border: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "header" "sidebar" "content" "footer";
  }
  .site-header { padding: 12px 16px; }
  .site-header__brand img { width: 40px; height: 40px; }
  .site-header__name { font-size: 26px; }
  .site-header__tagline { display: none; }
  .sidebar { padding: 16px 16px 0; }
  .site-nav ul { display: flex; flex-wrap: wrap; border: 0; border-radius: 0; gap: 6px; overflow: visible; }
  .site-nav li + li { border: 0; }
  .site-nav a { padding: 6px 12px; border: 1px solid var(--accent-line); border-radius: 999px; }
  .site-nav a::before { display: none; }
  .site-nav a[aria-current="page"] { box-shadow: none; border-color: var(--accent-mark); }
  .download-box { margin-top: 16px; }
  .download-box__version { display: inline; }
  .badge, .site-links { display: none; }
  .content { padding: 20px 16px 24px; }
  .content h2 { font-size: 24px; }
}
