:root {
  color-scheme: dark;
  font-family: Barlow,"Avenir Next",system-ui,sans-serif;
  color: #f5f5f3;
  background: #0c141c;
  --accent: #ffaf60;
  --line: #34414c;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none!important;
}

body {
  margin: 0;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem max(1rem,calc((100vw - 800px)/2));
  background: #101923;
  border-bottom: 1px solid var(--line);
  gap: .5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-weight: 750;
}

.brand b {
  background: var(--accent);
  color: #17191c;
  padding: .4rem;
  border-radius: .35rem;
  font-style: italic;
}

main {
  max-width: 820px;
  margin: auto;
  padding: 1rem 1rem 4rem;
}

.eyebrow,legend {
  font-weight: 650;
  color: var(--accent);
}

h1 {
  font-size: clamp(1.8rem,5vw,3rem);
  margin: .3rem 0 1rem;
  line-height: 1.1;
}

h1::first-letter {
  text-transform: uppercase;
}

h2 {
  font-size: 1.25rem;
  margin: 0 0 1rem;
}

nav,.toggle,#actions,#navigation {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
}

nav input {
  width: auto;
  min-width: 0;
}

button,a,input,select {
  font: inherit;
}

button,a[href],input,select {
  border: 1px solid var(--line);
  background: #192530;
  color: inherit;
  border-radius: .45rem;
  min-height: 44px;
  padding: .55rem .7rem;
}

button,a[href] {
  cursor: pointer;
}

a[href] {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid #77cdf5;
  outline-offset: 2px;
}

button:disabled {
  opacity: .5;
  cursor: wait;
}

.primary,a.primary {
  background: var(--accent);
  color: #171a1c;
  border-color: transparent;
  font-weight: 750;
}

.card,#profile,#auth {
  padding: clamp(1rem,3vw,1.6rem);
  background: #121e28;
  border: 1px solid var(--line);
  border-radius: .8rem;
  margin-top: 1rem;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: .8rem;
}

legend {
  margin-bottom: .6rem;
}

label {
  display: grid;
  gap: .4rem;
  font-weight: 550;
}

input,select {
  width: 100%;
}

.toggle {
  margin: .9rem 0;
  font-size: .95rem;
}

.toggle input {
  width: 1.1rem;
  min-height: 1.1rem;
  accent-color: var(--accent);
}

#pm {
  margin: .5rem 0 1rem;
}

#home,#login {
  display: grid;
  gap: .8rem;
  max-width: 32rem;
}

#feedback:empty {
  display: none;
}

#feedback {
  padding: .8rem;
  border-left: 3px solid var(--accent);
  background: #192530;
}

#timeline {
  padding: 0;
  margin: 0;
  list-style: none;
}

#timeline li {
  display: grid;
  grid-template-columns: 4.2rem auto;
  align-items: baseline;
  padding: .65rem 0;
  gap: .5rem;
  border-top: 1px solid var(--line);
}

time {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-weight: 750;
}

#actions {
  margin-top: 1rem;
}

#navigation {
  width: 100%;
}

button:hover,a[href]:hover {
  filter: brightness(1.1);
}

@media(max-width:560px) {
  fieldset {
    grid-template-columns: 1fr 1fr;
  }
  fieldset label:last-child {
    grid-column: 1/-1;
  }
  header button {
    font-size: .8rem;
    padding: .45rem;
  }
  #today {
    font-size: .9rem;
  }
}

@font-face {
  font-family: Barlow;
  src: url('/fonts/barlow-400.woff2');
}

@font-face {
  font-family: Barlow;
  src: url('/fonts/barlow-600.woff2');
  font-weight: 600 900;
}

@font-face {
  font-family: BarlowCond;
  src: url('/fonts/barlow-semi-condensed-700.woff2');
  font-weight: 700;
}

:root {
  --accent: #ffca24;
  --line: #394246;
  background: #101416;
  font-family: Barlow,system-ui,sans-serif;
}

body {
  background: radial-gradient(ellipse at 80% -12%,#363322 0,transparent 50%),#101416;
  min-height: 100vh;
}

header {
  background: #121718;
  border-bottom: 1px solid #343936;
}

.brand {
  font-family: BarlowCond,system-ui,sans-serif;
  font-size: 1.5rem;
}

.brand b {
  font-size: 1.08rem;
  transform: skew(-5deg);
  border-radius: 3px;
  color: #131718;
  background: linear-gradient(120deg,#ffe059,#ffbd0a);
}

main {
  max-width: 960px;
}

.card,#profile,#auth {
  background: linear-gradient(130deg,#22292a,#191f20);
  border-color: #353e3e;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 190px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: repeating-linear-gradient(135deg,transparent 0 21px,#ffde6720 22px 23px),linear-gradient(115deg,#ffd64d 0%,#f7b800 66%,#e9a700 100%);
  color: #111719;
  border-radius: 12px 12px 3px 3px;
  border-bottom: 7px solid #db9e09;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: 66%;
  padding: clamp(1.1rem,4vw,2.3rem);
}

.hero .eyebrow {
  font: 700 .85rem BarlowCond,system-ui,sans-serif;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #4c3909;
  margin: 0 0 .4rem;
}

.hero h1 {
  font: 700 clamp(2rem,4vw,3.65rem)/.99 BarlowCond,system-ui,sans-serif;
  margin: .35rem 0;
  max-width: 12em;
}

.login-hero h1 {
  font-size: clamp(3rem,9vw,5.75rem);
  letter-spacing: -.055em;
}

.login-hero h1 span {
  font-style: italic;
}

.hero:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 5px;
  background: repeating-linear-gradient(115deg,#221d0d 0 12px,transparent 13px 22px);
}

.bus-art {
  position: absolute;
  right: clamp(.8rem,5vw,4rem);
  bottom: -15px;
  width: clamp(118px,22vw,196px);
  aspect-ratio: 1/1;
  transform: rotate(-4deg);
  filter: drop-shadow(0 12px 10px #553b0466);
  z-index: 1;
}

.vehicle {
  position: absolute;
  inset: 0 3% 9%;
  border: 3px solid #1d2526;
  border-radius: 24% 24% 9% 9%;
  background: linear-gradient(93deg,#b47600,#fac021 8%,#ffd651 53%,#eba20d 96%);
  box-shadow: inset -5px 0 #ad7405,inset 4px 0 #ffe58a;
}

.vehicle:before,.vehicle:after {
  content: "";
  position: absolute;
  width: 10%;
  height: 24%;
  top: 29%;
  background: linear-gradient(90deg,#1c2527,#424d4d);
  border-radius: 4px;
  box-shadow: 0 3px 0 #202627;
}

.vehicle:before {
  left: -11%;
  transform: rotate(-6deg);
}

.vehicle:after {
  right: -11%;
  transform: rotate(6deg);
}

.bus-lights,.front {
  display: flex;
  align-items: center;
  justify-content: space-around;
  position: absolute;
  inset: 9% 7% auto;
  height: 13%;
  gap: 2%;
}

.bus-lights strong {
  background: #242a27;
  color: #ffdc44;
  flex: 1;
  text-align: center;
  border-radius: 2px;
  font: 700 clamp(.43rem,1.2vw,.8rem) BarlowCond,system-ui,sans-serif;
  letter-spacing: .06em;
}

.bus-lights i {
  width: 8%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #9b251a;
  border: 2px solid #302e27;
}

.bus-lights i:nth-child(2),.bus-lights i:nth-last-child(2) {
  background: #e98f08;
}

.windshield {
  position: absolute;
  inset: 25% 5% 40%;
  display: flex;
  gap: 3%;
  background: #222829;
  border: 3px solid #242a2a;
  border-radius: 12% 12% 5% 5%;
  overflow: hidden;
}

.windshield i {
  width: 50%;
  background: linear-gradient(135deg,#425659 0 28%,#65716b 30% 35%,#33474a 36% 63%,#25373a 66%);
}

.hood {
  position: absolute;
  inset: 60% 19% 20%;
  border: 2px solid #b17a02;
  border-radius: 20% 20% 4% 4%;
  background: linear-gradient(#fdd75a,#f4b218);
}

.front {
  inset: auto 4% 12%;
  height: 15%;
}

.front i {
  height: 55%;
  width: 17%;
  border: 2px solid #343834;
  border-radius: 4px;
  background: #fff4c0;
  box-shadow: 0 0 6px #fff4a2;
}

.front b {
  width: 38%;
  height: 100%;
  border-radius: 4px;
  background: repeating-linear-gradient(#252b29 0 3px,#6d7264 4px 5px);
}

.bumper {
  position: absolute;
  inset: auto -2% 0;
  height: 10%;
  background: #262d2c;
  border-radius: 4px;
  border-top: 3px solid #49524d;
  box-shadow: 0 4px 0 #141a19;
}

nav {
  background: #202627;
  border: 1px solid #374041;
  border-top: 0;
  border-radius: 0 0 9px 9px;
  padding: .65rem;
}

.card h2,.login-panel h2,#profile h2 {
  font: 700 1.55rem BarlowCond,system-ui,sans-serif;
}

.card h2:before {
  content: "";
  display: inline-block;
  width: 5px;
  height: .75em;
  background: var(--accent);
  margin-right: .55rem;
  transform: skew(-12deg);
}

input,select,button,a[href] {
  background: #1c2324;
}

legend {
  font-family: BarlowCond,system-ui,sans-serif;
}

.plate {
  display: inline-flex;
  margin: .5rem .4rem 0 0;
  border: 1px solid #3c371b;
  border-radius: .3rem;
  box-shadow: inset 0 0 0 2px #edb817;
  background: #ffdf53;
  padding: .2rem .7rem;
  color: #272a1b;
  font: 700 .9rem BarlowCond,system-ui,sans-serif;
  text-transform: uppercase;
}

#auth {
  padding: 0;
  overflow: hidden;
  max-width: 680px;
  margin: 1.5rem auto;
}

.login-panel {
  padding: clamp(1rem,4vw,2.4rem);
}

#login {
  max-width: none;
}

#timeline li {
  grid-template-columns: 4.2rem auto;
  position: relative;
  padding: .85rem .2rem .85rem 1rem;
  margin-left: .25rem;
  border-top: 0;
  border-left: 2px solid #4e503b;
}

#timeline li:before {
  content: "";
  position: absolute;
  top: 1.25rem;
  left: -5px;
  background: var(--accent);
  height: 7px;
  width: 7px;
  border-radius: 50%;
}

#timeline li:first-child {
  margin-top: 1rem;
}

#timeline li:last-child {
  margin-bottom: 1rem;
}

.primary {
  transition: transform .18s,box-shadow .18s;
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 15px #ffc2212c;
}

.primary:active {
  transform: translateY(1px);
}

@keyframes pull-in {
  from {
    opacity: 0;
    translate: 22px 3px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes reveal {
  from {
    opacity: .2;
    translate: 0 3px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

.hero .vehicle {
  animation: pull-in .55s ease-out both;
}

#timeline li {
  animation: reveal .2s ease-out;
}

.hero-copy {
  animation: reveal .3s ease-out;
}

@media(max-width:520px) {
  .hero {
    min-height: 152px;
  }
  .hero-copy {
    width: 66%;
    padding: 1.05rem;
  }
  .hero h1 {
    font-size: clamp(1.65rem,6.7vw,2.55rem);
  }
  .login-hero h1 {
    font-size: clamp(2.5rem,11vw,4rem);
  }
  .bus-art {
    width: 29%;
    right: 4%;
    bottom: 0;
  }
  .hero:after {
    z-index: 3;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    animation: none!important;
    transition: none!important;
    scroll-behavior: auto!important;
  }
}

summary {
  cursor: pointer;
  min-height: 44px;
  display: list-item;
  align-content: center;
  color: var(--accent);
}

.coordinates {
  display: grid;
  gap: .7rem;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
}

.brand img {
  border-radius: 9px;
  background: #101416;
  object-fit: contain;
}

#week {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  gap: .35rem;
  margin-top: .65rem;
}

#week button {
  position: relative;
  display: grid;
  justify-items: center;
  gap: .15rem;
  padding: .4rem .1rem .65rem;
  font-size: .8rem;
}

#week strong {
  font: 700 1.3rem BarlowCond,system-ui,sans-serif;
}

#week [data-planned=yes]:after {
  content: "";
  position: absolute;
  width: .32rem;
  height: .32rem;
  background: var(--accent);
  border-radius: 50%;
  bottom: .16rem;
}

#week [aria-current=date] {
  color: #181c1b;
  background: #ffca24;
  border-color: #ffca24;
}

#week [aria-current=date]:after {
  background: #151c1d;
}

.week-row {
  display: grid;
  grid-template-columns: 32px minmax(0,1fr) 32px;
  gap: .3rem;
  align-items: stretch;
  margin-top: .65rem;
}

.week-row>button {
  padding: .3rem;
  font-size: 1.3rem;
}

#week {
  margin-top: 0;
}

#wakeInfo {
  width: 100%;
  margin: 0;
  font-weight: 600;
  color: #ffdc5e;
}

#feedbackBox:has(#retry:not([hidden])) {
  padding-bottom: .6rem;
}

@media(max-width:420px) {
  .week-row {
    grid-template-columns: 24px minmax(0,1fr) 24px;
    gap: .2rem;
  }
  #week {
    gap: .2rem;
  }
}
