/* style.css: shared look for all the specimen pages */

body {
  font-family: Georgia, "Times New Roman", serif;
  color: #22301f;
  background: #fbfcf8;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
  line-height: 1.45;
}

h1 {
  font-weight: normal;
  font-size: 1.9rem;
  color: #2e5631;
  border-bottom: 2px solid #2e5631;
  padding-bottom: 0.3rem;
}

.hint, .count { max-width: 70ch; }
.count { font-weight: bold; margin-top: 1.5rem; }

/* Search form */
form {
  background: #eef2e8;
  border: 1px solid #c9d3c0;
  padding: 1rem 1.2rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.8rem 1.2rem;
}
label { display: block; font-size: 0.95rem; }
input[type=text], input[type=number], select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.2rem;
  padding: 0.35rem;
  font: inherit;
  border: 1px solid #a9b5a0;
  background: #fff;
}
label.check { margin-top: 0.9rem; }
.buttons { margin-top: 1rem; display: flex; gap: 1.2rem; align-items: center; }
button {
  font: inherit;
  padding: 0.4rem 1.4rem;
  background: #2e5631;
  color: #fff;
  border: none;
  cursor: pointer;
}
button:hover { background: #3d6e41; }
a { color: #2e5631; }
:focus-visible { outline: 3px solid #d9a72b; outline-offset: 2px; }

/* Results table */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th {
  text-align: left;
  background: #2e5631;
  color: #fff;
  font-weight: normal;
  padding: 0.4rem 0.5rem;
}
td {
  vertical-align: top;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid #d6ddd0;
}
tbody tr:nth-child(even) { background: #f2f5ee; }
.sub { font-size: 0.85rem; color: #5b6656; }

/* Specimen detail page */
.nav { font-size: 0.95rem; }
.specimen-name {
  font-size: 2.1rem;
  border-bottom: none;
  margin-bottom: 0.1rem;
  padding-bottom: 0;
}
.specimen-name .author { font-size: 1.2rem; color: #5b6656; }
.lead { font-size: 1.1rem; margin-top: 0; color: #3d4a38; }
.rare {
  border-left: 4px solid #b5651d;
  background: #f8efe4;
  padding: 0.5rem 0.8rem;
  max-width: 70ch;
}
.sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0 2.5rem;
  border-top: 2px solid #2e5631;
}
h2 {
  font-weight: normal;
  font-size: 1.25rem;
  color: #2e5631;
  margin: 1.2rem 0 0.5rem;
}
dl {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
}
dt { color: #5b6656; font-size: 0.92rem; }
dd { margin: 0; }
.record-info {
  margin-top: 2rem;
  padding-top: 0.6rem;
  border-top: 1px solid #c9d3c0;
  font-size: 0.85rem;
  color: #5b6656;
}
@media (max-width: 480px) {
  dl { grid-template-columns: 1fr; }
  dd { margin-bottom: 0.4rem; }
}

/* Edit page */
.edit-form { background: none; border: none; padding: 0; }
fieldset {
  border: 1px solid #c9d3c0;
  background: #eef2e8;
  margin: 0 0 1.2rem;
  padding: 0.8rem 1.2rem 1.1rem;
}
legend { font-size: 1.15rem; color: #2e5631; padding: 0 0.4rem; }
label.wide { grid-column: 1 / -1; }
textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.2rem;
  padding: 0.35rem;
  font: inherit;
  border: 1px solid #a9b5a0;
  background: #fff;
}
label.check { align-self: end; margin-top: 0; }
.message { padding: 0.6rem 0.9rem; max-width: 70ch; }
.message.ok { background: #e3f0de; border-left: 4px solid #2e5631; }
.message.error { background: #f8e6e1; border-left: 4px solid #a23b2a; }
.message.error p { margin: 0 0 0.3rem; }
