* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root { color-scheme: light; color: #122722; background: #f5f7f6; font: 16px/1.55 system-ui, sans-serif; }
body { margin: 0; }
header { padding: .65rem max(1rem, calc((100vw - 65rem) / 2)); border-bottom: 1px solid #cedbd6; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
h1, h2, p { margin: 0; }
h1 { font-size: 1.12rem; white-space: nowrap; }
h2 { font-size: 1.25rem; overflow-wrap: anywhere; }
main { max-width: 66rem; margin: auto; padding: 1rem; }
#login { max-width: 26rem; margin: 9vh auto; display: grid; gap: .75rem; padding: 1.35rem; border: 1px solid #cedbd6; background: #fff; border-radius: .8rem; }
input, button { font: inherit; color: inherit; padding: .55rem .8rem; min-height: 44px; border: 1px solid #bccdc5; background: #fff; border-radius: .55rem; }
input { width: 100%; }
button { cursor: pointer; }
button:hover { background: #edf4f0; }
button:focus-visible, input:focus-visible { outline: 2px solid #377c68; outline-offset: 2px; }
[aria-pressed="true"], #login button { background: #215f4e; color: #fff; border-color: #215f4e; }
#workspace { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: 1rem; }
#list-panel, #detail { min-width: 0; border: 1px solid #cedbd6; background: #fff; padding: .8rem; border-radius: .8rem; }
#routes { margin: .65rem 0; display: flex; gap: .4rem; }
ul { margin: 0; padding: 0; list-style: none; }
li + li { margin-top: .25rem; }
.chat { display: block; text-align: left; width: 100%; border-color: transparent; overflow-wrap: anywhere; }
.chat[aria-current="true"] { background: #e6f2ec; border-color: #8eaf9f; }
.meta, #status { color: #456257; font-size: .84rem; }
#chat-header { border-bottom: 1px solid #dce6e1; padding-bottom: .8rem; margin-bottom: .8rem; }
#status { margin-top: .3rem; }
#empty, #login-error { color: #435b52; }
#messages { display: grid; gap: .7rem; }
article { border: 1px solid #dce6e1; padding: .7rem .85rem; border-radius: .65rem; overflow-wrap: anywhere; }
article.user { background: #ebf3ef; }
article p { white-space: pre-wrap; }
article h3 { font-size: .82rem; margin: 0 0 .35rem; color: #456257; }
#back { display: none; margin-bottom: .7rem; }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
@media (max-width: 640px) {
  main { padding: .55rem; }
  #workspace { display: block; }
  #workspace:not(.show-chat) #detail, #workspace.show-chat #list-panel { display: none; }
  #back { display: inline-block; }
}

