:root {
  --bg: #fbfaf7;
  --text: #1d1d1b;
  --muted: #5f5d57;
  --line: #e4e1d9;
  --card: #ffffff;
  --accent: #1f6f5c;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --text: #ecebe6;
    --muted: #a3a19a;
    --line: #2e2d2a;
    --card: #1c1c1a;
    --accent: #6cc4a9;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

main,
header,
footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  padding-top: 1.5rem;
}

header a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
}

main {
  padding-bottom: 3rem;
}

footer {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  padding-bottom: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

footer a {
  color: var(--muted);
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 0.5rem;
}

h2 {
  font-size: 1.2rem;
  margin: 2.25rem 0 0.5rem;
}

h3 {
  font-size: 1rem;
  margin: 1.5rem 0 0.25rem;
}

p,
ul {
  margin: 0 0 1rem;
}

li {
  margin-bottom: 0.35rem;
}

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

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.card h2,
.card h3 {
  margin-top: 0;
}

/* Where to get an app: the web app, and its store listings. */
.get {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 2rem;
}

.card .get {
  margin-bottom: 1rem;
}

.store {
  display: contents;
}

.get-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

a.get-link {
  background: var(--accent);
  color: var(--bg);
}

a.get-link:hover {
  opacity: 0.88;
}

a.get-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.store > .soon {
  display: none;
  color: var(--muted);
  border: 1px dashed var(--muted);
  font-weight: 500;
}

/*
  Coming soon: the stores that haven't approved Budget's first release yet show
  "Coming soon" in place of a link. When one does, take it out of both lists,
  and set its `live` in apps/budget/src/constants/stores.ts so the web app
  links to it too.
*/
:is(.app-store, .google-play) > .live {
  display: none;
}

:is(.app-store, .google-play) > .soon {
  display: inline-flex;
}
