:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0b1d2a; color: #f2f5f7; font: 20px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }
main { min-height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 1.2rem; padding: 2rem 1.5rem calc(2rem + env(safe-area-inset-bottom)); max-width: 32rem; margin: 0 auto; }
h1 { margin: 0; font-size: 2.6rem; font-weight: 700; text-align: center; }
#detail { margin: 0; min-height: 1.4em; text-align: center; color: #b9c7d1; }
form { display: flex; flex-direction: column; gap: 0.8rem; }
label { font-size: 1rem; color: #b9c7d1; }
input { font: inherit; font-size: 1.8rem; letter-spacing: 0.3em; text-align: center; padding: 0.8rem; border-radius: 0.8rem; border: 2px solid #5b7a8e; background: #102a3b; color: inherit; }
input:focus-visible { outline: 3px solid #ffd166; outline-offset: 2px; }
button { font: inherit; font-size: 1.5rem; font-weight: 700; padding: 1.4rem 1rem; border: 0; border-radius: 1rem; background: #2a9d8f; color: #04130f; min-height: 4.5rem; }
button:focus-visible { outline: 3px solid #ffd166; outline-offset: 3px; }
#end { background: #e76f51; color: #1d0a04; }
#resume { background: #ffd166; color: #2b1d00; font-size: 2rem; min-height: 8rem; }
[hidden] { display: none !important; }
body.speaking h1 { color: #8ecae6; }
body.listening h1 { color: #95d5b2; }
#sources { margin-top: 0.6rem; padding-top: 0.8rem; border-top: 1px solid #2c4a5e; }
#sources h2 { margin: 0 0 0.2rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #b9c7d1; }
#source-list { list-style: none; margin: 0; padding: 0; }
#source-list li { position: relative; padding: 0.6rem 0; border-bottom: 1px solid #1d3a4d; }
#source-list a { font-size: 1rem; line-height: 1.35; color: #8ecae6; text-underline-offset: 0.15em; overflow-wrap: anywhere; unicode-bidi: isolate; }
#source-list a:visited { color: #c9b8ea; }
#source-list a:focus-visible { outline: 3px solid #ffd166; outline-offset: 2px; }
/* The whole row is the link's tap area, its host line too. */
#source-list a::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
#source-list .host { display: block; margin-top: 0.15rem; font-size: 0.8rem; color: #b9c7d1; overflow-wrap: anywhere; unicode-bidi: isolate; }
#lastmile { display: flex; flex-direction: column; gap: 0.7rem; }
#lastmile h2 { margin: 0.4rem 0 0; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: #b9c7d1; }
#routes { display: flex; flex-direction: column; gap: 0.5rem; }
button.route { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; min-height: 0; padding: 0.8rem 1rem; font-size: 1.05rem; background: #ff9900; color: #131921; text-align: left; }
button.route small { font-size: 0.8rem; font-weight: 500; color: #3b2a00; }
button.route:disabled { opacity: 0.45; }
#turn { font-size: 1.1rem; font-weight: 700; min-height: 1.4em; }
#turn.unknown { color: #ffd166; }
#convo, #commits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
#convo li { font-size: 0.95rem; padding: 0.45rem 0.6rem; border-radius: 0.5rem; background: #102a3b; }
#convo li.driver { background: #1d3a4d; }
#convo li.agent { background: #12324a; color: #8ecae6; }
#convo li.prompt { color: #ffd166; }
#convo li.note { background: none; color: #b9c7d1; font-size: 0.85rem; }
#commits li { font-size: 0.95rem; padding: 0.5rem 0.6rem; border-left: 4px solid #ff9900; background: #102a3b; }
