/* Attempt pages reuse the homepage brand and theme picker. */
html[data-theme] .race-answer-page > .attempt-banner {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 24px;
  height: 72px;
  min-height: 72px;
  padding: 0 3vw;
  border: 0;
  background: #08090b;
  color: #fff;
}
html[data-theme="purple"] .race-answer-page > .attempt-banner {
  width: calc(100% + 4vw);
  margin: 0 -2vw 12px;
  background: #101013;
}
html[data-theme] .race-answer-page > .attempt-banner::before { display: none; }
html[data-theme] .attempt-banner > .brand { flex: none; color: #fff; }
html[data-theme] .attempt-banner > .race-day {
  flex: none;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
  padding: 8px 18px;
  border-radius: 0;
  background: var(--color-accent);
  color: #fff;
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
  transform: none;
  font: 700 16px/24px Arial, "PingFang SC", sans-serif;
}
html[data-theme="purple"] .attempt-banner > .race-day { background: #5000ef; }
html[data-theme] .attempt-banner > .workpaper-status {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  gap: 20px;
  margin: 0;
  order: 0;
  font: 500 15px/1.4 Arial, "PingFang SC", sans-serif;
}
html[data-theme] .attempt-banner .race-count,
html[data-theme] .attempt-banner .race-clock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  color: #d7dcec;
  font: inherit;
  white-space: nowrap;
}
html[data-theme] .attempt-banner .race-count strong,
html[data-theme] .attempt-banner .race-clock strong { color: #fff; font-size: inherit; }
html[data-theme] .attempt-banner .race-clock .icon { display: block; width: 18px; height: 18px; }
html[data-theme] .attempt-banner .button.secondary,
html[data-theme] .attempt-banner .save-controls > .button {
  display: inline-flex;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid #8997ae66;
  border-radius: 2px;
  background: transparent;
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
}
html[data-theme] .attempt-banner .save-controls > .save-button {
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
html[data-theme] .attempt-banner .save-controls > .save-button[data-saved] {
  border-color: #6ba88c;
  background-color: #1b392f;
  color: #cef5e1;
}
.save-button-content {
  display: grid;
  place-items: center;
}
.save-button-label {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 180ms ease;
}
.save-button-confirmed,
.save-button[data-saved] .save-button-label { opacity: 0; }
.save-button[data-saved] .save-button-confirmed { opacity: 1; }
.save-announcement {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
html[data-theme] .attempt-banner > .theme-switch.theme-picker { margin: 0; color: #cbd2e6; }
html[data-theme] .attempt-banner > .theme-switch .theme-picker-trigger { color: inherit; }
html[data-theme] .attempt-banner .save-state { min-inline-size: 5em; font-size: 12px; }
html[data-theme] .race-answer-header.attempt-banner .save-state::before,
html[data-theme] .workpaper-header.attempt-banner .save-state::before { content: none; display: none; }
@media (max-width: 1100px) {
  html[data-theme] .race-answer-page > .attempt-banner { gap: 16px; padding-inline: 20px; }
  html[data-theme] .attempt-banner > .workpaper-status { gap: 12px; font-size: 14px; }
  html[data-theme] .attempt-banner > .race-day { padding-inline: 12px; font-size: 14px; }
}
@media (max-width: 900px) {
  html[data-theme] .race-answer-page > .attempt-banner { height: auto; min-height: 72px; flex-wrap: wrap; padding-block: 12px; gap: 12px; }
  html[data-theme] .attempt-banner > .brand { margin-right: auto; }
  html[data-theme] .attempt-banner > .workpaper-status { order: 2; flex-basis: 100%; justify-content: flex-start; }
  html[data-theme] .attempt-banner > .theme-switch { order: 1; }
  html[data-theme] .attempt-banner > [data-submit-button] { order: 3; margin-left: auto; }
  html[data-theme] .attempt-banner:has([data-submit-button]) > .workpaper-status { flex-basis: auto; }
}
@media (max-width: 480px) {
  html[data-theme] .race-answer-page > .attempt-banner { padding-inline: 14px; gap: 10px; }
  html[data-theme] .attempt-banner > .race-day { order: 2; padding: 4px 10px; font-size: 12px; }
  html[data-theme] .attempt-banner > .workpaper-status { flex-basis: auto; gap: 10px; font-size: 12px; }
  html[data-theme] .attempt-banner .button.secondary { min-height: 30px; padding: 4px 6px; font-size: 12px; }
}
@media (max-width: 760px) {
  html[data-theme="purple"] .race-answer-page > .attempt-banner {
    width: calc(100% + 20px);
    margin-inline: -10px;
  }
}
