/* Small layout corrections kept separate from the basic stylesheet. */

main > form[method="get"] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
}

main > form[method="get"] label {
  margin-left: 0.25rem;
}

.top-notice {
  width: 80%;
  max-width: 1100px;
  margin: 0.5rem auto 0.75rem auto;
  padding: 0.5rem 1rem;
  text-align: center;
  color: #ff2d2d;
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-weight: 700;
  line-height: 1.35;
}

/* Keep admin pages plain while preserving the existing structure.
   Admin is back-office only: the poster/logo theme is reserved for
   teacher (user) facing pages. */

body.admin-shell {
  color: #111;
  background-color: #f6f6f6;
  background-image: none;
}

body.admin-shell a {
  color: #0645ad;
}

body.admin-shell a:visited {
  color: #551a8b;
}

body.admin-shell a:hover {
  color: #0b4fc7;
  text-shadow: none;
}

body.admin-shell header {
  background: #fff;
  border-bottom: 1px solid #999;
  box-shadow: none;
}

body.admin-shell header > h1 {
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
  text-shadow: none;
}

body.admin-shell header > h1 a,
body.admin-shell header > h1 a:visited {
  color: #111;
}

/* no contest emblem on the plain admin header */
body.admin-shell header > h1 a::before {
  content: none;
}

body.admin-shell header > nav {
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: normal;
  text-transform: none;
}

body.admin-shell header > nav a,
body.admin-shell header > nav a:visited {
  color: #0645ad;
  border-bottom-color: transparent;
}

body.admin-shell header > nav a:hover,
body.admin-shell header > nav a:focus {
  color: #0b4fc7;
  border-bottom-color: #0645ad;
  text-shadow: none;
}

/* undo the chalk-styled logout pill from main.css */
body.admin-shell header > nav button {
  min-height: 2rem;
  padding: 0.25rem 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: normal;
  text-transform: none;
}

body.admin-shell section,
body.admin-shell article,
body.admin-shell form,
body.admin-shell table,
body.admin-shell dl {
  border: 1px solid #999;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}

body.admin-shell h2,
body.admin-shell h3,
body.admin-shell caption {
  color: #111;
  font-family: inherit;
  text-shadow: none;
}

body.admin-shell th,
body.admin-shell td {
  border-bottom-color: #ddd;
}

body.admin-shell dt,
body.admin-shell label,
body.admin-shell th {
  color: #111;
}

body.admin-shell th {
  background: #ddd;
  border-bottom-color: #999;
}

body.admin-shell tbody tr:hover td {
  background: #f2f7fb;
}

body.admin-shell button {
  color: #000;
  background: #eee;
  border: 1px solid #888;
  border-radius: 4px;
  font-family: inherit;
  font-weight: 400;
}

body.admin-shell button:hover,
body.admin-shell button:focus {
  color: #000;
  background: #ddd;
}

/* undo the gold primary submit from main.css */
body.admin-shell input[type="submit"] {
  padding: 0.25rem 0.5rem;
  color: #000;
  background: #eee;
  border: 1px solid #888;
  border-radius: 4px;
  font-family: inherit;
  font-weight: 400;
  cursor: pointer;
}

body.admin-shell input[type="submit"]:hover,
body.admin-shell input[type="submit"]:focus {
  background: #ddd;
  border-color: #888;
  filter: none;
  box-shadow: none;
}

body.admin-shell input,
body.admin-shell select {
  color: #000;
  background: #fff;
  border: 1px solid #888;
  color-scheme: light;
}

body.admin-shell input::placeholder {
  color: #666;
}

body.admin-shell [role="status"] {
  color: #111;
  border-color: #888;
  background: #eef4f8;
}

body.admin-shell form span {
  color: #b00020;
}

body.admin-shell footer {
  color: #444;
  border-top-color: #999;
}

body.admin-shell a:focus-visible,
body.admin-shell button:focus-visible,
body.admin-shell input:focus-visible,
body.admin-shell select:focus-visible {
  outline-color: #444;
}
