:root {
  --bg: #f4f5f6;
  --card: #ffffff;
  --ink: #131517;
  --muted: rgb(19 21 23 / 0.62);
  --faint: rgb(19 21 23 / 0.42);
  --line: rgb(19 21 23 / 0.08);
  --hover: rgb(19 21 23 / 0.04);
  --wash-a: hsl(26 100% 88%);
  --wash-b: hsl(330 90% 92%);
  --wash-c: hsl(200 100% 90%);
  --font: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #131517;
    --card: #1c1e20;
    --ink: #f4f5f6;
    --muted: rgb(244 245 246 / 0.62);
    --faint: rgb(244 245 246 / 0.4);
    --line: rgb(244 245 246 / 0.08);
    --hover: rgb(244 245 246 / 0.05);
    --wash-a: hsl(26 60% 22%);
    --wash-b: hsl(330 40% 20%);
    --wash-c: hsl(200 50% 18%);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #131517;
  --card: #1c1e20;
  --ink: #f4f5f6;
  --muted: rgb(244 245 246 / 0.62);
  --faint: rgb(244 245 246 / 0.4);
  --line: rgb(244 245 246 / 0.08);
  --hover: rgb(244 245 246 / 0.05);
  --wash-a: hsl(26 60% 22%);
  --wash-b: hsl(330 40% 20%);
  --wash-c: hsl(200 50% 18%);
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
/* A soft wash across the top, as on a Luma calendar */
body::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 340px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 120% at 15% 0%, var(--wash-a), transparent 70%),
    radial-gradient(50% 120% at 55% 0%, var(--wash-b), transparent 70%),
    radial-gradient(50% 120% at 95% 0%, var(--wash-c), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
}
a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 10px;
}
.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-left, 0px));
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}
.brand i {
  display: grid;
  grid-template-columns: repeat(2, 7px);
  gap: 2px;
}
.brand i b {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--ink);
}
.brand i b:nth-child(2) {
  opacity: 0.55;
}
.brand i b:nth-child(3) {
  opacity: 0.3;
}
.top nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.top nav a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
}
.pill {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 0;
  background: var(--hover);
  color: var(--ink);
  font: 500 13px/1 var(--font);
  cursor: pointer;
  white-space: nowrap;
}
.pill.dark {
  background: var(--ink);
  color: var(--bg);
}
.theme {
  width: 32px;
  padding: 0;
  justify-content: center;
  background: transparent;
  color: var(--muted);
}
.theme svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (hover: hover) and (pointer: fine) {
  .top nav a,
  .pill,
  .row {
    transition:
      background-color 150ms ease-out,
      color 150ms ease-out;
  }
  .top nav a:hover {
    color: var(--ink);
  }
  .pill:hover {
    background: color-mix(in srgb, var(--ink) 9%, transparent);
  }
  .pill.dark:hover {
    background: color-mix(in srgb, var(--ink) 85%, var(--bg));
  }
  .row:hover {
    background: var(--hover);
  }
}
.pill:active {
  transform: scale(0.97);
}

header.head {
  padding: 72px 0 36px;
}
header.head h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
header.head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 17px;
  max-width: 34rem;
}

h2 {
  margin: 40px 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--faint);
  letter-spacing: 0.01em;
}
.list {
  display: grid;
  gap: 4px;
  margin: 0 -12px;
}
.row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
}
.tile {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
}
.tile svg {
  width: 26px;
  height: 26px;
}
/* Every community logo is an ink mark on a card-coloured tile with a hairline, like the Partners tile; dark mode
   flips it with the theme */
.t-bc,
.t-nl,
.t-shift,
.t-support {
  background: var(--card);
  color: var(--ink);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent),
    0 1px 2px rgb(0 0 0 / 0.05);
}
.go {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: var(--faint);
}
.go svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (hover: hover) and (pointer: fine) {
  .row:hover .go {
    color: var(--ink);
  }
}
.tile.plain {
  background: var(--card);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.tile.plain svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.top nav a[aria-current='page'] {
  color: var(--ink);
  font-weight: 500;
}
.row .meta {
  font-size: 13px;
  color: var(--faint);
}
.row h3 {
  margin: 1px 0 2px;
  font-size: 16px;
  font-weight: 600;
}
.row p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.date {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  line-height: 1;
}

footer {
  margin-top: 64px;
  padding: 20px 0 40px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--faint);
}
footer a {
  color: var(--muted);
}

@media (max-width: 560px) {
  header.head {
    padding-top: 48px;
  }
  .row {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
  }
  .tile,
  .date {
    width: 48px;
    height: 48px;
  }
  .top nav a.hide-sm {
    display: none;
  }
}

/* Partner cards: three in a row */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
/* A column, so the link at the end ("Read more", "Join in Discord", "Details") sits on the card's bottom edge and
   lines up across a row whatever the text length */
.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.card h3 {
  margin: 10px 0 0;
  font-size: 17px;
  font-weight: 600;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.card .more {
  margin-top: auto;
  padding-top: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--faint);
}
@media (hover: hover) and (pointer: fine) {
  .card {
    transition:
      border-color 150ms ease-out,
      transform 150ms ease-out;
  }
  .card:hover {
    border-color: color-mix(in srgb, var(--ink) 18%, transparent);
  }
  .card:hover .more {
    color: var(--ink);
  }
}
.card:active {
  transform: scale(0.98);
}
.card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
/* Line icons are ink: black in light mode, white in dark */
.ico {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.partners-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}
@media (max-width: 760px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The details popup */
.sheet {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.35);
}
.sheet::backdrop {
  background: rgb(10 10 12 / 0.35);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sheet .ico {
  width: 30px;
  height: 30px;
}
.x {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: var(--hover);
  color: var(--muted);
  cursor: pointer;
}
.x svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.sheet h3 {
  margin: 14px 0 4px;
  font-size: 20px;
  font-weight: 600;
}
.sheet .intro {
  margin: 0;
  color: var(--muted);
}
.cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.cols h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--faint);
}
.cols ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.sheet-actions .pill {
  height: 38px;
  padding: 0 16px;
}
@media (prefers-reduced-motion: no-preference) {
  .sheet[open] {
    animation: sheet-in 220ms cubic-bezier(0.23, 1, 0.32, 1);
  }
}
@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}
@media (max-width: 520px) {
  .cols {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Start a community: the one dark button in the top bar */
.top .start {
  margin-left: 4px;
}
.top .start .short {
  display: none;
}
@media (max-width: 420px) {
  .brand {
    font-size: 14px;
  }
  .top .start .long {
    display: none;
  }
  .top .start .short {
    display: inline;
  }
}

/* Community cards on the hub: the logo tile on top */
.card.community {
  text-decoration: none;
  gap: 4px;
}
.card.community .tile {
  width: 44px;
  height: 44px;
  border-radius: 11px;
}
.card.community .tile svg {
  width: 22px;
  height: 22px;
}
.card.community .meta {
  font-size: 13.5px;
  color: var(--faint);
}
.card.community h3 {
  margin: 0;
  font-size: 18px;
}

.card.community .t-support svg {
  width: 14px;
  height: 21px;
}

/* Hub: all four communities in one row; a wider column so the cards keep room */
.hub .wrap {
  max-width: 1040px;
}
.cards.c4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .cards.c4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .cards.c4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The Start a community link on other pages looks exactly like the button on the hub */
.top nav a.pill {
  padding: 0 14px;
}
.top nav a.pill.dark {
  color: var(--bg);
}

/* A popup opener inside a sentence, styled as a link */
header.head p button.inline {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 3px;
  cursor: pointer;
}
header.head p button.inline:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Hub cards: the logo and the opening date share the top row */
.card.community .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.card.community .when {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
}

/* A card that explains and links nowhere: no pointer, no hover, no press */
.card.static {
  cursor: default;
}
.card.static:hover {
  border-color: var(--line);
}
.card.static:active {
  transform: none;
}

/* No date yet: a calendar in the date's place */
.date svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
