/* Palette shared with the application (drawn from the logo). Light is the
   base; dark applies when the system asks for it (unless the visitor chose
   light) or when the visitor chose dark with the header toggle, which sets
   data-theme on <html>. */
:root {
  --primary: #007830;
  --primary-dark: #00551f;
  --accent: #0078c0;
  --warning: #c09030;
  --bg: #fafcfa;
  --surface: #ffffff;
  --text: #1c241e;
  --muted: #5a6a5e;
  --border: #dde5de;
  --notice-bg: #fbeceb;
  --notice-border: #c05048;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --primary: #2fa35c;
  --primary-dark: #47b871;
  --accent: #4aa8e0;
  --bg: #141a15;
  --surface: #1c241e;
  --text: #e8eee9;
  --muted: #a4b2a7;
  --border: #2e3a30;
  --notice-bg: #31201d;
  --notice-border: #b0655e;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #2fa35c;
    --primary-dark: #47b871;
    --accent: #4aa8e0;
    --bg: #141a15;
    --surface: #1c241e;
    --text: #e8eee9;
    --muted: #a4b2a7;
    --border: #2e3a30;
    --notice-bg: #31201d;
    --notice-border: #b0655e;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--accent);
}

header.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0.8rem 1.2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.15rem;
}

header.top nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

header.top nav a {
  text-decoration: none;
  font-weight: 500;
}

#theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.25rem 0.55rem;
  font-size: 1rem;
  line-height: 1.4;
  cursor: pointer;
}

main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.2rem 3rem;
}

.hero {
  text-align: center;
  padding: 3rem 0 3.5rem;
}

.hero-logo {
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  margin: 0.2rem 0 0.8rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 38rem;
  margin: 0 auto 1.6rem;
}

.cta {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 0 1.6rem;
}

.button {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--primary);
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.button.primary {
  background: var(--primary);
  color: #fff;
}

.button.primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.notice {
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  border-left-width: 4px;
  border-radius: 0.6rem;
  padding: 0.9rem 1.1rem;
  max-width: 38rem;
  margin: 0 auto;
  text-align: left;
  font-size: 0.95rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.features article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  padding: 1.2rem 1.3rem;
}

.features .icon {
  font-size: 1.6rem;
}

.features h2 {
  font-size: 1.05rem;
  margin: 0.4rem 0;
}

.features p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.badge {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--warning);
  border: 1px solid var(--warning);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  vertical-align: 0.12em;
  white-space: nowrap;
}

.download {
  margin-top: 3rem;
}

.download h2 {
  font-size: 1.5rem;
}

#release-info {
  color: var(--muted);
}

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

.dl-grid article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  padding: 1rem 1.3rem 1.2rem;
}

.dl-grid h3 {
  font-size: 1.1rem;
  margin: 0.2rem 0 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.os-icon {
  width: 1.05em;
  height: 1.05em;
  max-width: 20px;
  max-height: 20px;
  fill: currentColor;
  flex: none;
}

.dl-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dl-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--primary);
  border-radius: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.dl-list a:hover {
  background: var(--primary);
  color: #fff;
}

.dl-list a:hover .dl-meta {
  color: #fff;
}

.dl-meta {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.85rem;
  text-align: right;
}

.dl-note {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.8rem 0 0;
}

/* Prose pages (privacy policy). */
.prose {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.6rem 0 1rem;
}

.prose h1 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  margin: 0 0 0.2rem;
}

.prose h2 {
  font-size: 1.15rem;
  margin: 1.8rem 0 0.5rem;
}

.prose p,
.prose li {
  font-size: 0.98rem;
}

.prose ul {
  padding-left: 1.3rem;
}

.policy-date {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
}

footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.6rem 1.2rem 2.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

footer p {
  margin: 0.3rem 0;
}
