.instructions {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-top: 2rem;
}

.instructions-text {
    flex: 1;
}

.reference-link {
    flex: 0 0 auto;
    text-align: center;
}

.reference-link img {
    width: 18vw;
    height: auto;
    display: block;
    margin: 0 auto 0.75rem auto;
    border-style: ridge;
    border-width: 0.5vw;
}

.common-fields-container {
    border: 0.25vw dashed white;
    margin-top: 1vw;
}

.categories {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.categories details {
    border: 0.25vw dashed white;
    background: rgba(0,0,0,0.035);
}

.categories summary {
    list-style: none;
    cursor: pointer;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.categories summary::-webkit-details-marker {
    display: none;
}

.categories summary::before {
    content: "▶";
    position: absolute;
    left: 1rem;
    transition: transform 0.25s ease;
}

.categories summary h2 {
    margin: 0;
    text-align: center;
}

.categories details[open] summary::before {
    transform: rotate(90deg);
}

.categories details > div {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.categories details[open] > div {
    max-height: 1000px;
}

.endorsement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.endorsement-tile {
    border: 0.2vw solid white;
    padding: 0.75rem;
    cursor: pointer;
    background: rgba(0, 128, 0, 0.8);
}

.endorsement-tile:hover {
    background: rgba(0, 197, 0, 0.8);
}

.tile-title {
    font-weight: bold;
}

.tile-regulation {
    font-size: 0.85em;
    opacity: 0.8;
}

.input-error {
    border: 0.2vw solid red !important;
}

.error-message {
    color: red;
    margin-left: 1vw;
    margin-top: 0.5rem;
    font-weight: bold;
}

.unique-fields-container {
    border: 0.25vw dashed white;
    margin-top: 1vw;
}

.unique-field {
  display: flex;
  align-items: center;
  margin-top: 1vw;
  margin-bottom: 1vw;
}

.unique-field label {
  text-align: left;
  margin-left: 1vw;
  margin-right: 1vw;
}

.unique-field input,
.unique-field textarea {
  flex: 0.5;
}

.placeholder {
  color: gold;
}

.error-text {
  color: red;
  margin-top: 0.5em;
  text-align: left;
}

input.input-error, textarea.input-error {
  border: 2px solid red;
}

.size-container {
  text-align: center;
  margin: 1em 0;
}

.print-button {
  background-color: rgba(0, 128, 0, 0.8);
  color: white;
  font-size: 1.7em;
  font-family: 'FreeSans', sans-serif;
  padding: 0.40em 0.75em;
  border: 0.2vw solid white;
  cursor: pointer;
}

.print-button:hover {
  background-color: rgba(0, 197, 0, 0.8);
}

.endorsement-body {
  margin: 1em 0 2em 0;
  line-height: 1.4em;
}

.print-container {
  display: flex;
  justify-content: center;
  margin-top: 1.5em;
}
