/* Page shell: home bar, content area, forms and flash messages. */
.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px var(--gutter);
}

.button,
input[type="submit"],
button {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
input[type="submit"]:hover,
button:hover {
  border-color: var(--color-muted);
}

/* The one lime button: Save in the Live Calendar's popup (docs/visual-design.md). */
input[type="submit"].button--brand {
  padding: 8px 24px;
  border-color: var(--color-brand);
  background: var(--color-brand);
  color: var(--color-bg);
  font-weight: 600;
}

input[type="submit"].button--brand:hover {
  filter: brightness(0.9);
}

input[type="submit"].button--brand:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

input[type="date"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="text"],
input[type="time"],
select {
  width: 100%;
  max-width: 320px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
}

/* A wider page for screens with a list beside a form. */
.page--wide {
  max-width: 1200px;
}

/* A form with a list beside it (the Members page; also meant for Activities). The form comes
   first in the page; on a narrow screen the list moves above it. */
.list-form {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

@media (max-width: 767px) {
  .list-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .list-form__aside {
    order: -1;
  }
}

.flash {
  margin-bottom: 16px;
  padding: 8px 12px;
  border: 1px solid currentColor;
  border-radius: var(--radius);
}

.flash--alert {
  color: var(--color-danger);
}

.flash--notice {
  color: var(--color-success);
}

/* Home page */
.home-bar {
  display: flex;
  justify-content: flex-end;
  padding: 12px var(--gutter);
}

.home {
  max-width: 960px;
  margin: 15vh auto 0;
  padding: 0 var(--gutter);
  text-align: center;
}

.home__logo {
  width: 120px;
  height: 120px;
}

.home__name {
  margin: 16px 0 0;
}

.home__name .wordmark {
  height: 72px;
}

.home p {
  color: var(--color-muted);
}

.home p.home__strapline {
  margin-bottom: 24px;
  color: var(--color-text);
  font-size: 1.25rem;
  font-weight: 600;
}

/* The ducklings under the strapline, larger to match the home page's logo and name. Still: the
   swim is the header's. */
.home__ducklings .ducklings {
  --duckling-size: 40px;
  --duckling-gap: 5px;
}

/* The public home page's panels: solid duckling fills with dark text. Panels inside the app use
   the bordered style instead (docs/visual-design.md, Panels). */
.home-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.home-panel {
  padding: 20px;
  border-radius: 12px;
  color: var(--color-bg);
}

.home-panel h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.home .home-panel p {
  margin: 0;
  color: var(--color-bg);
}

.home-panel--1 { background: var(--duckling-1); }
.home-panel--2 { background: var(--duckling-2); }
.home-panel--3 { background: var(--duckling-3); }

@media (max-width: 679px) {
  .home-panels {
    grid-template-columns: minmax(0, 1fr);
  }
}
