/* Colours come from the app's dark theme. */
:root {
  color-scheme: dark;
  --ground: #0f1013;
  --surface: #1a1c20;
  --text: #f2f3f5;
  --muted: #a3a8b2;
  --divider: #2a2d34;
  --accent: #4cc3cd;
  --red: #e05555;
  --yellow: #d4a72c;
  --green: #3fa65a;
  --blue: #2e9bd6;
  --violet: #8a6fd8;
}

* {
  box-sizing: border-box;
}

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

.bar {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
}

.bar nav,
main,
footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

.bar nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.bar nav > a:not(.brand) {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
}

.bar nav > a:not(.brand):hover {
  color: var(--text);
  background: #ffffff14;
}

.bar nav > a[aria-current="page"] {
  color: var(--accent);
}

main {
  padding-top: 8px;
  padding-bottom: 48px;
}

h1 {
  font-size: 34px;
  line-height: 1.2;
  margin: 32px 0 8px;
}

h2 {
  font-size: 21px;
  margin: 32px 0 8px;
}

.lead {
  font-size: 20px;
  color: var(--muted);
  margin-top: 0;
}

.updated {
  color: var(--muted);
  font-size: 15px;
}

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

/* Feature tiles, tinted like the app's member and chat tiles. */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 32px 0;
  padding: 0;
  list-style: none;
}

.tiles li {
  --tint: var(--accent);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--tint) 22%, var(--ground));
  color: #c9cdd4;
  font-size: 16px;
  line-height: 1.5;
}

.tiles .icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: var(--tint);
  color: #ffffff;
}

.tiles .icon svg {
  width: 24px;
  height: 24px;
}

.tiles strong {
  color: var(--text);
  font-size: 18px;
}

/* An odd tile out at the end takes the whole row, so there's no gap beside it. */
.tiles li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.tiles .red { --tint: var(--red); }
.tiles .yellow { --tint: var(--yellow); }
.tiles .green { --tint: var(--green); }
.tiles .blue { --tint: var(--blue); }
.tiles .violet { --tint: var(--violet); }

footer {
  border-top: 1px solid var(--divider);
  padding-top: 16px;
  padding-bottom: 32px;
  color: var(--muted);
  font-size: 15px;
}

/* On narrow phones the logo is the way home, so the header fits on one line. */
@media (max-width: 480px) {
  .bar nav > a[href="/"]:not(.brand) {
    display: none;
  }

  .bar nav > a:not(.brand) {
    padding: 8px;
  }

  h1 {
    font-size: 28px;
  }
}
