@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font: 18px/1.5 Montserrat;
  background: #fff;
  color: #000;
}

@media (prefers-color-scheme: dark) {
  html {
    background: #333;
    color: #eee;
  }
}

@media (max-width: 500px) {
  html {
    font-size: 14px;
  }
}

body {
  margin: 0 auto;
  padding: 1rem;
  max-width: 50ch;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 6rem);
}

header {
  flex: 0 0 auto;
}

main {
  flex: 1 1 auto;
}

footer {
  margin-top: 2rem;
  flex: 0 0 auto;
}

h1, h2 {
  font-size: inherit;
  line-height: inherit;
  margin-bottom: 1rem;
}

header a {
  display: flex;
  border-bottom: 1px solid #ccc;
  padding: 1rem;
  line-height: 4rem;
  margin: -1rem -1rem 1rem;
}

header svg {
  display: block;
  height: 2rem;
  margin-right: 1rem;
}

header h1 {
  line-height: 2rem;
  margin: 0;
}

p {
  margin-bottom: 1rem;
}

footer p {
  margin: 0;
  color: #999;
  font-size: .75rem;
  line-height: 1rem;
}

a {
  color: #77f;
}

header a {
  color: inherit;
  text-decoration: none;
}

footer a {
  color: inherit;
}

form > div,
fieldset,
fieldset > div {
  margin-bottom: 1rem;
}

fieldset {
  border: 0;
}

label {
  display: block;
  cursor: pointer;
}

input[type="text"],
textarea {
  display: block;
  width: 100%;
  font: inherit;
  background: #fff;
  border-radius: 0;
  border: 1px solid #999;
  padding: .5rem;
}

@media (prefers-color-scheme: dark) {
  input[type="text"],
  textarea {
    color: #fff;
    background: #444;
  }
}

.checkbox {
  position: relative;
  overflow: hidden;
}

input[type="checkbox"] {
  position: absolute;
  top: -2rem;
}

input[type="checkbox"] + label {
  position: relative;
  padding-left: 1.5rem;
}

input[type="checkbox"] + label:before {
  content: " ";
  position: absolute;
  left: 0;
  top: 50%;
  margin-top: -.5rem;
  display: block;
  float: left;
  width: 1rem;
  height: 1rem;
  font-size: .75rem;
  line-height: 1rem;
  text-align: center;
  background: #fff;
  border: 1px solid #333;
  vertical-align: baseline;
}

@media (prefers-color-scheme: dark) {
  input[type="checkbox"] + label:before {
    color: #fff;
    background: #444;
    border-color: #999;
  }
}

input[type="checkbox"]:checked + label:before {
  content: "✓";
}

button {
  font: inherit;
  line-height: 2rem;
  display: inline-block;
  -webkit-appearance: none;
  background: #77f;
  color: #fff;
  border: 0;
  border-radius: 2rem;
  padding: .5rem 1rem;
  cursor: pointer;
  width: 100%;
}

@media (prefers-color-scheme: dark) {
  button {
    color: #333;
    background: #9797f8;
  }
}

button.secondary {
  background: transparent;
  color: #77f;
  border: .125rem solid #77f;
}

@media (prefers-color-scheme: dark) {
  button.secondary {
    color: #9797f8;
    border-color: #9797f8;
  }
}

p.error {
  color: #f05252;
}

.responses {
  list-style: none;
}

.responses h2 {
  margin-bottom: 0;
  display: flex;
}

.responses li {
  margin-bottom: 1rem;
}

.responses p {
  margin: 0;
}

.choice-count {
  order: -1;
  margin-left: -.5rem;
  margin-right: .5rem;
  font-size: .75rem;
  display: inline-block;
  line-height: 1rem;
  padding: .25rem;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.3);
  width: 1.5rem;
  height: 1.5rem;
  text-align: center;
  font-weight: 300;
}

.choices {
  list-style: none;
}

.response-form {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #eee;
  border-radius: 1rem;
}

@media (prefers-color-scheme: dark) {
  .response-form {
    background: #111;
  }
}

.response-form:target {
  box-shadow: 0 0 1rem rgba(255, 215, 0, 0.3);
}

.response-form > *:last-child {
  margin-bottom: 0;
}

.calendar {
  margin-bottom: 1rem;
}

.calendar ul {
  display: flex;
  flex-wrap: wrap;
  position: relative;
  list-style: none;
  overflow: hidden;
  padding-top: 1rem;
}

.calendar li {
  flex: 0 0 14.286%;
}

.calendar .month-label {
  position: absolute;
  left: 0;
  margin-top: -1rem;
  line-height: 1rem;
  font-size: .5rem;
  text-transform: uppercase;
  letter-spacing: .125rem;
  z-index: 3;
}

.calendar input[type="checkbox"] + label {
  padding-top: 1rem;
  padding-left: 0;
  position: relative;
}

.calendar input[type="checkbox"] + label:before {
  display: none;
}

.calendar input[type="checkbox"]:checked + label {
  font-weight: bold;
  text-decoration: underline;
  text-decoration-thickness: .25rem;
}

.calendar button {
  margin-top: 1rem;
}

.just-created {
  background: #b0ffcd;
  margin-bottom: 1rem;
  padding: 1.5rem;
  border-radius: 1rem;
}

.just-created a {
  color: #168942;
  font-weight: bold;
}

@media (prefers-color-scheme: dark) {
  .just-created {
    color: #fff;
    background: #24673c;
  }

  .just-created a {
    color: #64de92;
  }
}

.just-created > *:last-child {
  margin-bottom: 0;
}
