@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/SourceSerif4-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "Source Serif 4", Georgia, serif;
  --ink: #1c1917;
  --paper: #f4f1ea;
  --muted: #5c564e;
  --line: #d4cdc2;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.75rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --text-sm: 0.875rem;
  --text: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;
  --measure: 34rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font);
  font-size: var(--text);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
}

.site {
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
}

.site-name {
  font-size: var(--text-lg);
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

nav a,
nav button {
  text-decoration: none;
}

nav button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.main {
  flex: 1 1 auto;
  padding: var(--space-6) var(--space-4);
}

.main-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--measure);
  min-height: 100%;
}

.lead {
  margin: 0 0 var(--space-3);
  font-size: var(--text-xl);
}

.main-page p {
  margin: 0;
}

.main-home {
  max-width: var(--measure);
  margin: 0 auto;
}

.home-intro {
  margin: 0 0 var(--space-5);
}

.home-tiles {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.home-tiles .tile {
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}

.legal {
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) var(--space-6);
}

.legal h2 {
  font-size: var(--text-lg);
  font-weight: 400;
  margin: var(--space-4) 0 var(--space-2);
}

.legal p {
  margin: 0 0 var(--space-3);
}

.main-taverns {
  padding: 0;
  min-height: 0;
  display: flex;
}

.site-footer {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--line);
  font-size: var(--text-sm);
  color: var(--muted);
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover,
.main-page a:hover,
.main-home a:hover,
.main-tavern a:hover,
.main-admin a:hover,
nav a:hover,
nav button:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.main-tavern,
.main-admin {
  max-width: var(--measure);
  margin: 0 auto;
}

.main-tavern h1,
.main-admin h1 {
  font-size: var(--text-xl);
  font-weight: 400;
  margin: 0 0 var(--space-3);
}

.main-tavern p,
.main-admin p {
  margin: 0 0 var(--space-2);
}

.main-tavern > a {
  display: inline-block;
  margin: 0 0 var(--space-2);
}

.main-tavern h2 {
  font-size: var(--text-lg);
  font-weight: 400;
  margin: var(--space-5) 0 var(--space-3);
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.event-list .tile {
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}

.event-list .when {
  margin: 0;
  color: var(--muted);
}

.event-list h2 {
  margin: var(--space-2) 0 0;
  font-size: var(--text);
}

.event-list p {
  margin: var(--space-2) 0 0;
}

.panel-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}

.panel-form > div:not(.actions) {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.panel-form [hidden] {
  display: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.field span {
  font-size: var(--text-sm);
  color: var(--muted);
}

.field input,
.field select,
.field textarea,
.actions button,
.owner-schedule > button {
  font: inherit;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: var(--space-2);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.actions button,
.owner-schedule > button {
  cursor: pointer;
  padding: var(--space-1) var(--space-3);
}

.actions button:hover,
.owner-schedule > button:hover {
  border-color: var(--ink);
}

.actions button:disabled {
  cursor: default;
  color: var(--muted);
}

.owner-schedule > button {
  margin-top: var(--space-4);
}

.owner-schedule > .event-list {
  margin-top: var(--space-3);
}

.form-error:empty {
  display: none;
}

.form-error {
  color: #8a1c1c;
}

.taverns {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
}

#map {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
}

aside {
  flex: 0 0 22rem;
  height: 100%;
  overflow: auto;
  padding: var(--space-5) var(--space-4);
}

h1 {
  font-size: var(--text-lg);
  font-weight: 400;
  margin: 0 0 var(--space-4);
}

#list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.tile .name,
.tile h2,
.leaflet-popup-content h2 {
  font-size: var(--text);
  font-weight: 400;
  margin: 0;
}

.tile a.name {
  display: block;
  width: 100%;
  text-underline-offset: 0.2em;
}

.tile p,
.leaflet-popup-content p {
  margin: var(--space-2) 0 0;
}

.tile a:not(.name),
.leaflet-popup-content a {
  display: inline-block;
  margin-top: var(--space-2);
}

.leaflet-container,
.leaflet-popup-content-wrapper,
.leaflet-popup-content,
.leaflet-control {
  font-family: var(--font);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--paper);
  color: var(--ink);
  box-shadow: none;
  border-radius: 0;
}

@media (max-width: 720px) {
  .site-header,
  .site-footer {
    padding: var(--space-3);
  }

  .site-header {
    flex-direction: column;
    gap: var(--space-2);
  }

  .main {
    padding: var(--space-5) var(--space-3);
  }

  .taverns {
    flex-direction: column;
  }

  #map {
    flex: none;
    height: 55%;
  }

  aside {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
  }
}

@media (min-width: 800px) {
  .main-home {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 52rem;
    min-height: 100%;
  }

  .home-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-5);
  }
}
