body {
  font-family: 'IM Fell English', serif;
  /* margin: 2em; */
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #F1E9D2; /*parchment*/;
  color: #000000; /*black*/ 
}

#topmenu {
  width: 100%;              /* fills the container width */
  display: flex;
  justify-content: space-between; /* nav-links left, clock right */
  align-items: center;
  background-color: #f1e9d2;
  padding: 10px 20px;
  border-top: 2px solid #2d2f24;
  border-bottom: 2px solid #2d2f24;
  box-sizing: border-box;
}

#topmenu .nav-links {
  display: flex;
  flex: 1;                  /* stretch across available space */
  justify-content: center;  /* center the links inside */
  gap: 25px;                /* spacing between links */
}

#topmenu a {
  text-decoration: none;
  color: #000;
  font-weight: bold;
  text-align: center;
}
#topmenu a:hover {
	color: #7a5c2e
}

/* Keep the clock in the menu row;  positions it absolutely,
   which lets it slide over the links. If the row is too full, the clock
   drops to its own line instead. */
#topmenu {
  flex-wrap: wrap;
  row-gap: 6px;
}

#topmenu .nav-links {
  flex: 1 0 auto;           /* don't squeeze the links to make room for the clock */
}

#topmenu a {
  white-space: nowrap;      /* keep "Family Lineage" on one line */
}

#topmenu #clockbox {
  position: static;
  margin-left: auto;
  padding-left: 20px;
}

/* Narrow windows: let the links wrap onto more lines */
@media (max-width: 900px) {
  #topmenu .nav-links {
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: 6px 20px;
  }

  #topmenu #clockbox {
    margin: 0 auto;
    padding-left: 0;
  }
}



.person-section {
  border-bottom: 1px solid #ccc;
  padding-bottom: 1em;
}
.person-section h2 {
  margin-bottom: 0.5em;
}
.doc-list li {
  margin: 0.1em 0;
}
.doc-note {
  font-size: 0.9em;
  color: #555;
  margin-left: 1em;
}

#doc-notes {
  margin-bottom: 0em; 
  text-align: center;
  width: 80%;
  margin: auto;
}
.edit-button {
  display: inline-block;
  padding: 0.6em 1.2em;
  /* background-color: #0078d4;
  color: white; */
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  font-size: 1em;
}

.edit-button:hover {
  background-color: #89cbec;
}

.doc-container {
  position: relative;
  display: inline-block;
  width: 100%;
}
.highlight-box {
  position: absolute;
  border: 2px solid red;
  pointer-events: none;
  border-radius: 10px;
}

/* styles for the  Add New Document to the 
  Genealogy Document Archives form */
#title {
  width: 50%;
}

.styled-form {
  max-width: 800px;
  margin: 2em auto;
  padding: 1em;
  background: #f9f9f9;
  border-radius: 8px;
  font-family: Arial, sans-serif;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.styled-form fieldset {
  border: none;
}

.styled-form legend {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 1em;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 1em;
  margin-bottom: 1em;
}

.form-row label {
  width: 120px;
  font-weight: bold;
  font-size: 1em;
  white-space: nowrap;
}

.form-row input[type="text"],
.form-row input[type="url"],
.form-row textarea {
  flex: 1;
  padding: 0.4em;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.form-actions {
  display: flex;
  gap: 1em;
  justify-content: flex-start;
}

.form-actions button {
  padding: 0.6em 1.2em;
  font-size: 1em;
  border: none;
  border-radius: 4px;
  background-color: #0078d4;
  color: white;
  cursor: pointer;
}

.form-actions button:hover {
  background-color: #005fa3;
}

.percent-group {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 1em;
  margin-bottom: 1em;
}

.percent-pair {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.percent-pair label {
  font-weight: bold;
  font-size: 0.95em;
  white-space: nowrap;
}

.percent-pair input[type="number"] {
  max-width: 60px;
  height: 2em;
  padding: 0.2em;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;

}
#xPercent, #yPercent,  #widthPercent, #heightPercent {
  width: 60px;
}

.person-section ul {
  margin: 0;
}