:root { --bg: #fff; --ink: #111; --soft: #6b6b6b; --line: #e3e3e3; }
@media (prefers-color-scheme: dark) { :root { --bg: #111; --ink: #eee; --soft: #999; --line: #2c2c2c; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
main { max-width: 600px; margin: 0 auto; padding: 16px 16px 48px; overflow-wrap: anywhere; }
h1, h2, p { margin: 0; font-size: inherit; }
a { color: inherit; }
input, textarea, button { font: inherit; color: inherit; }

.top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.top h1 a { font-weight: 700; text-decoration: none; }
.top nav { flex: none; display: flex; gap: 12px; color: var(--soft); font-size: 14px; }

.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; }
.soft { color: var(--soft); }
button.go { flex: none; background: none; border: 1px solid var(--ink); border-radius: 4px; padding: 6px 12px; min-height: 36px; cursor: pointer; }
button.go.on { background: var(--ink); color: var(--bg); }
button.go:disabled { opacity: .5; cursor: default; }

.post { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.post > a { display: block; flex: 1; min-width: 0; text-decoration: none; }
.post b { font-weight: 600; }
.line { color: var(--soft); font-size: 15px; }
.off { text-decoration: line-through; }
.label { padding: 26px 0 4px; color: var(--soft); font-size: 14px; border-bottom: 1px solid var(--line); }
.actions { padding: 14px 0 0; }

.run { padding-top: 16px; }
.run h2 { font-size: 20px; font-weight: 600; }
.body { white-space: pre-wrap; margin-top: 14px; }
.map { height: 280px; margin-top: 14px; background: var(--line); z-index: 0; }
.map.tall { height: clamp(260px, 42vh, 460px); margin-top: 12px; }
.routebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.routebar .go { margin-top: 0; }
.routebar input[type=text].miles { width: 72px; margin: 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.tools { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 14px; color: var(--soft); }

.comment { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment p { white-space: pre-wrap; }
.comment .line { font-size: 13px; display: flex; gap: 10px; }

form label { display: block; margin-top: 12px; font-size: 14px; }
input[type=text], input[type=password], input[type=date], input[type=time], textarea {
  display: block; width: 100%; margin-top: 3px; padding: 8px 10px; min-height: 42px; font-size: 16px;
  background: var(--bg); border: 1px solid var(--soft); border-radius: 4px; -webkit-appearance: none; appearance: none;
}
input[type=file] { display: block; margin-top: 3px; max-width: 100%; }
textarea { min-height: 80px; resize: vertical; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pair label { min-width: 0; }
.err { margin-top: 10px; color: #c62a12; }
@media (prefers-color-scheme: dark) { .err { color: #ff7a60; } }
form .go { margin-top: 14px; }
.formfoot { display: flex; gap: 14px; align-items: center; }
.formfoot .go { margin-top: 14px; }
.formfoot .link { margin-top: 14px; }

.gate { max-width: 320px; margin: 12vh auto 0; }
.gate h1 { font-weight: 700; font-size: 20px; }
.gate .go { width: 100%; }
.gate .switch { margin-top: 16px; font-size: 14px; color: var(--soft); }

.person { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
