/* -- Reset & Base --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: #222;
  background: #f0f0f5;
}

/* -- Layout --------------------------------------------------------- */
main {
  max-width: 840px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
  background: #fff;
  min-height: 100vh;
  box-shadow: 0 0 40px rgba(0,0,0,0.07);
  border-top: 5px solid #006400;
}

/* -- Headings ------------------------------------------------------- */
h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #006400;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #006400;
  margin: 2.5rem 0 0.75rem;
  padding: 0 0 0.4rem 0.65rem;
  border-left: 4px solid #006400;
  border-bottom: 2px solid #e0e0ea;
}

/* -- Text ----------------------------------------------------------- */
p { margin: 0.85rem 0; }

.intro {
  font-size: 1.1rem;
  color: #555;
  margin: 0.25rem 0 0.5rem;
}

/* -- Links ---------------------------------------------------------- */
a { color: #0044cc; text-decoration: none; }
a:hover { color: #002288; text-decoration: underline; }
a:visited { color: #5500aa; }

/* -- Lists ---------------------------------------------------------- */
ul { padding-left: 1.4rem; margin: 0.5rem 0; }
li { margin-bottom: 0.5rem; }

/* -- Code ----------------------------------------------------------- */
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875em;
  background: #f3f3f8;
  padding: 0.15em 0.45em;
  border-radius: 4px;
  border: 1px solid #dddde8;
}

/* -- Splash image --------------------------------------------------- */
.splash {
  display: block;
  width: 100%;
  height: auto;
  margin: 1rem 0 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* -- Video ---------------------------------------------------------- */
video {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  margin: 1rem 0 1.5rem;
}

/* -- "new" badge ---------------------------------------------------- */
.badge {
  display: inline-block;
  font-size: 0.68em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #1a7a44;
  color: #fff;
  padding: 0.15em 0.5em;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 0.35em;
  line-height: 1.4;
}

/* -- Collapsible info panels ---------------------------------------- */
.info-panel {
  border: 1px solid #e0e0ea;
  border-radius: 8px;
  padding: 0;
  margin: 0.5rem 0;
  background: #f8f8fc;
}

.info-panel summary {
  cursor: pointer;
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a2e;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}

.info-panel summary::before {
  content: "▸";
  font-size: 0.75em;
  color: #888;
  transition: transform 0.15s;
  flex-shrink: 0;
}

.info-panel[open] summary::before {
  transform: rotate(90deg);
}

.info-panel[open] summary {
  border-bottom: 1px solid #e0e0ea;
}

.info-panel > :not(summary) {
  padding: 0.75rem 0.9rem;
  font-size: 0.875rem;
  color: #444;
  line-height: 1.6;
  margin: 0;
}

/* -- Download tiles ------------------------------------------------- */
.dl-wrap  { padding: 1rem 0; }

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.dl-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  gap: 12px;
  background: #fff;
  border: 1px solid #d0cfc8;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
}

a.dl-tile:hover {
  border-color: #aab;
  box-shadow: 0 2px 10px rgba(0,0,0,0.09);
}

.dl-tile.unavailable {
  background: #f5f4f0;
  border-color: #e0dfd8;
  opacity: 0.55;
  cursor: default;
}

.dl-tile.unavailable img { filter: grayscale(1); }

.dl-os  { font-size: 16px; font-weight: 500; color: #111; }
.dl-sub { font-size: 13px; color: #888; margin-top: 4px; line-height: 1.4; }

.dl-action {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #2563eb;
}

.dl-unavail {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #888;
}

.dl-footer    { margin-top: 6px; margin-bottom: 6px; font-size: 13px; color: #888; }
.dl-footer a  { color: #888; text-decoration: none; }

/* -- GitHub button -------------------------------------------------- */
.github-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.75rem 1.1rem;
  margin: 0.5rem 0;
  background: #1a1a2e;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.15s;
}

.github-btn:hover,
.github-btn:visited {
  color: #fff;
  text-decoration: none;
}

.github-btn:hover { background: #2d2d50; }

.github-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: currentColor;
}

/* -- Mobile --------------------------------------------------------- */
@media (max-width: 600px) {
  body  { font-size: 16px; }
  h1    { font-size: 1.5rem; }
  h2    { font-size: 1.15rem; }
  main  { padding: 1.25rem 1rem 2.5rem; box-shadow: none; }
}
