/* 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: 20px;
  height: 64px;
  min-height: 64px;
  padding: 0 clamp(18px, 2.5vw, 32px);
  border: 0;
  border-bottom: 1px solid rgb(255 255 255 / .08);
  background: #0b0f19;
  color: #fff;
  font-family: var(--font-sans, inherit);
}
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 {
  position: relative;
  isolation: isolate;
  flex: none;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
  padding: 5px 15px;
  border-radius: 7px;
  background: linear-gradient(180deg, #1d51f0 0%, #1447e6 100%);
  color: #fff;
  clip-path: none;
  transform: none;
  font-family: var(--font-sans, inherit);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 20px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .2);
}
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: 16px;
  margin: 0;
  order: 0;
  font-family: var(--font-sans, inherit);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
}
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: #cbd5e7;
  font: inherit;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
html[data-theme] .attempt-banner .race-count strong,
html[data-theme] .attempt-banner .race-clock strong { color: #fff; font-size: inherit; font-weight: 650; }
html[data-theme] .attempt-banner .race-clock .icon { display: block; width: 16px; height: 16px; color: #94a3b8; }
html[data-theme] .attempt-banner .button.secondary,
html[data-theme] .attempt-banner .save-controls > .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 13px;
  border: 1px solid rgb(255 255 255 / .18);
  border-radius: 8px;
  background: rgb(255 255 255 / .06);
  color: #eef3ff;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
html[data-theme] .attempt-banner .button.secondary:hover:not(:disabled),
html[data-theme] .attempt-banner .save-controls > .button:hover:not(:disabled) {
  background: rgb(255 255 255 / .13);
  border-color: rgb(255 255 255 / .3);
  color: #fff;
}
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;
  }
}
