:root {
  --site-background-color: #dddddd;
}

html,
body {
  min-height: 100vh;
}

body {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: var(--site-background-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-align: center;
}

dialog {
  /* sizing is relative to the view port  */
  width: 70vw;
  height: 65vh;

  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* perfectly center */

  /* make it pretty  */
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);

  /* make it large enough to be at the top of every other elements  */
  z-index: 1000;

  /* allow scrolling if the content is larger than dialog  */
  overflow: auto;

  /* allow resizing both set a min width and eight */
  resize: both;
  min-width: 20vw;
  min-height: 15vh;
}

/* header that has h1 as immediate child  */
header:has(> h1),
header:has(> h2),
header:has(> h3) {
  overflow: hidden;
  text-align: center;
}

.site-header {
  min-height: 4rem;
  width: 100%;
  background: #f8f8f8;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.layout-middle {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}

.site-nav {
  min-width: 260px;
  background: #e9ecef;
  padding: 1rem;
  flex-shrink: 0;
}

main {
  width: 100%;
  padding: 2rem;
  background: #fff;
}

.site-footer {
  min-height: 2rem;
  width: 100%;
  background: darkgray;
  color: #fff;
  text-align: center;
  padding: 0.5rem 0;
  margin-top: auto;
}
