:root {
  --bg: #0f1419;
  --panel: #1a2230;
  --panel-2: #222c3c;
  --text: #e6edf3;
  --muted: #8b97a7;
  --accent: #3b6ea5;
  --accent-2: #5b9bd5;
  --danger: #c0506a;
  --warning: #d9a441;
  --line: #2c3848;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem 1.4rem;
  background: linear-gradient(180deg, #182230, #131a24);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.topbar nav {
  display: flex;
  gap: 1rem;
}

.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}

.topbar nav a:hover {
  color: var(--text);
}

.topbar nav a.on {
  color: var(--accent-2);
  border-bottom-color: var(--accent-2);
}

.who {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.8rem;
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.5rem 1.4rem 4rem;
}

h1 {
  font-size: 1.4rem;
  margin: 1rem 0 1.2rem;
}

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

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat .big {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-2);
}

.stat .cap {
  font-size: 0.8rem;
  color: var(--muted);
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin-bottom: 1.4rem;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.82rem;
}

a {
  color: var(--accent-2);
}

/* Forms */
.grid-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  align-items: end;
}

.grid-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.grid-form .wide {
  grid-column: 1 / -1;
}

.grid-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.field-label {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Segmented (radio-pill) type selector */
.segmented {
  display: inline-flex;
  width: fit-content;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.segmented label {
  position: relative;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.segmented span {
  display: block;
  padding: 0.4rem 1.1rem;
  font-size: 0.9rem;
  color: var(--muted);
  user-select: none;
}

.segmented input:checked + span {
  background: var(--accent);
  color: #fff;
}

.segmented input:focus-visible + span {
  outline: 2px solid var(--accent-2);
  outline-offset: -2px;
}

/* Parsed-shorthand info pills */
.info-pills,
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.info-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--panel-2);
  border: 1px solid var(--accent);
  color: var(--accent-2);
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.info-note {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
}

.injury-pill,
.niggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.injury-pill {
  background: rgba(192, 80, 106, 0.12);
  border: 1px solid var(--danger);
  color: #e08aa0;
}

.niggle-pill {
  background: rgba(217, 164, 65, 0.12);
  border: 1px solid var(--warning);
  color: #e6c074;
}

input,
select,
textarea {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  font-size: 0.95rem;
}

textarea {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 5rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* Theme the native file picker so it reads like a secondary button. */
input[type="file"] {
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

input[type="file"]::file-selector-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 6px;
  padding: 0.4rem 0.9rem;
  margin-right: 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  background: var(--panel-2);
  border-color: var(--accent);
}

/* Description header: caption on the left, the "Import GPX" action on the
   right. The native file input is hidden; the link triggers it. */
.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}

.link-action {
  background: none;
  border: none;
  color: var(--accent-2);
  font-size: 0.82rem;
  padding: 0;
  cursor: pointer;
}

.link-action:hover {
  background: none;
  text-decoration: underline;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Planned-vs-actual routes on a logged run. When a planned route exists the two
   stack with "Planned" above "Actual"; a single route shows no tag. The actual
   slot is one click target (thumbnail or "Route" chip) that opens the modal. */
.wk-routes {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-right: 0.6rem;
  border-right: 1px solid var(--line);
}

.wk-route {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.wk-route-tag {
  min-width: 3rem;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--muted);
}

/* Compact 40px thumbnail variant used in the history table. */
.route-thumb.sm img {
  width: 40px;
  height: 40px;
}

/* The actual-route click target: a thumbnail button, or a dashed "Route" chip
   when no route is attached yet. Both open the route modal. */
.route-trigger {
  cursor: pointer;
}

button.route-trigger.route-thumb {
  padding: 0;
  background: none;
}

.route-add {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 0.32rem 0.6rem;
}

.route-add:hover {
  border-color: var(--accent);
  color: var(--accent-2);
}

/* Route modal: drop a GPX or pick from the library. Shared, retargeted per row. */
.route-modal {
  width: min(92vw, 360px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.route-modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.route-modal > form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 0;
  padding: 1rem;
}

.route-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.route-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  padding: 0.2rem;
  cursor: pointer;
}

.route-modal-close:hover {
  color: var(--text);
}

.route-modal-current {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.route-modal-current img {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.route-modal-current[hidden] {
  display: none;
}

/* The drop zone fills the modal; this is its visible target. */
.route-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1.2rem;
  cursor: pointer;
}

.route-drop-zone:hover {
  border-color: var(--accent);
  color: var(--accent-2);
}

.route-drop-ic {
  font-size: 1.5rem;
  line-height: 1;
}

.route-drop.dragging .route-drop-zone {
  border-style: solid;
  border-color: var(--accent-2);
  background: var(--panel-2);
  color: var(--accent-2);
}

.route-modal-lib p {
  margin: 0 0 0.4rem;
}

.route-lib-list {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  max-height: 11rem;
  overflow-y: auto;
}

.route-lib-item {
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.85rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-lib-item:hover {
  background: var(--accent);
  color: #fff;
}

.route-lib-item:hover .muted {
  color: #e6edf3;
}

.row-actions a.link {
  font-size: 0.78rem;
  color: var(--muted);
}

.row-actions a.link:hover {
  color: var(--accent-2);
}

#strength-help code {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.05rem 0.3rem;
  font-size: 0.8rem;
}

button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
  cursor: pointer;
}

button:hover {
  background: var(--accent-2);
}

button.secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

button.secondary:hover {
  background: var(--panel-2);
  border-color: var(--accent);
}

.form-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.form-actions .secondary-link {
  font-size: 0.85rem;
  color: var(--muted);
}

.form-actions .secondary-link:hover {
  color: var(--text);
}

button.link {
  background: none;
  color: var(--muted);
  padding: 0.2rem 0.4rem;
}

button.link:hover {
  color: var(--text);
}

button.link.danger:hover {
  color: var(--danger);
}

/* Tables */
table.log {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.log th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.78rem;
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid var(--line);
}

table.log td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.log td.notes {
  color: var(--muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Workout description: one row per strength line, so an inline #injury / *niggle
   pill stays beside the effort it came up on. */
.workout {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.workout-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

table.log td.workout {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.pill {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.74rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  text-transform: capitalize;
}

.pill.run {
  border-color: #5b9bd5;
  color: #9cc4ec;
}
.pill.strength {
  border-color: #c08a4a;
  color: #e0b888;
}

/* Goals */
.goal {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.goal:last-child {
  border-bottom: none;
}

.goal.done {
  opacity: 0.6;
}

.goal-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.bar {
  height: 8px;
  background: var(--panel-2);
  border-radius: 999px;
  overflow: hidden;
}

.fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
}

.goal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.goal-race {
  margin: 0.1rem 0 0.6rem;
}

.race-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.race-row:last-child {
  border-bottom: none;
}

/* Plan */
.plan-day {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.plan-day:last-child {
  border-bottom: none;
}

.plan-date {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.plan-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.35rem 0;
}

.plan-item .pill {
  margin-top: 0.1rem;
  flex: 0 0 auto;
}

.plan-body {
  flex: 1 1 auto;
  min-width: 0;
}

.plan-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.route-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-right: 0.6rem;
  border-right: 1px solid var(--line);
}

.route-thumb {
  display: inline-flex;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
}

.route-thumb:hover {
  border-color: var(--accent);
}

.route-thumb img {
  display: block;
  width: 56px;
  height: 56px;
}

/* Route library catalog */
.route-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.route-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem;
  background: var(--bg);
}

.route-thumb.lg {
  align-self: center;
  width: 100%;
}

.route-thumb.lg img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}

.route-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.route-rename {
  margin: 0;
}

.route-rename input {
  width: 100%;
  font-weight: 600;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  padding: 0.2rem 0.3rem;
}

.route-rename input:hover {
  border-color: var(--line);
}

.route-rename input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel);
}

.route-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.9rem;
  margin-top: 0.2rem;
}

.route-card-actions form.inline,
.route-card-actions form {
  display: inline-flex;
  margin: 0;
}

/* Uniform, compact action links across the card (Details / Download / Delete). */
.route-card-actions a.link,
.route-card-actions button.link {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0;
  text-decoration: none;
}

.route-card-actions a.link:hover,
.route-card-actions button.link:hover {
  color: var(--text);
}

.route-card-actions button.link.danger:hover {
  color: var(--danger);
}

.route-name {
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Library picker on plan / workout rows */
.route-pick {
  margin: 0;
}

.route-pick select {
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1rem 0.3rem;
  max-width: 9rem;
}

/* Route detail page */
.route-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: flex-start;
}

.route-detail-map {
  flex: 0 0 auto;
  line-height: 0;
}

.route-detail-map svg {
  display: block;
  width: 280px;
  height: auto;
  max-width: 100%;
}

.route-detail-body {
  flex: 1 1 16rem;
  min-width: 0;
}

.route-detail-name {
  font-size: 1.4rem;
  font-weight: 700;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  padding: 0.2rem 0.4rem;
  margin-bottom: 0.8rem;
}

.route-detail-name:hover {
  border-color: var(--line);
}

.route-detail-name:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel);
}

.route-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.8rem 1.2rem;
  margin: 0 0 1rem;
}

.route-stats dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.route-stats dd {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.route-detail-actions {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-top: 0.4rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.route-detail-actions a.link {
  color: var(--accent-2);
  font-size: 0.9rem;
  text-decoration: none;
}

.route-detail-actions a.link:hover {
  text-decoration: underline;
}

.route-detail-actions button.link {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0;
}

.route-detail-actions button.link:hover {
  color: var(--danger);
}

.route-elevation {
  margin: 1.2rem 0;
}

.route-elevation h3 {
  margin: 0 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.elevation-wrap {
  line-height: 0;
}

.elevation-svg {
  width: 100%;
  height: auto;
}

.used-by {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.used-by h3 {
  margin: 0 0 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.used-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0;
  border-top: 1px solid var(--line);
}

/* Briefly highlight a day / workout linked to from a route's "Used by" list. */
.plan-day,
tbody tr {
  scroll-margin-top: 1rem;
}

.plan-day:target,
tbody tr:target {
  border-radius: 8px;
  box-shadow: 0 0 0 2px var(--accent);
  animation: target-fade 2.4s ease-out 1;
}

@keyframes target-fade {
  0%,
  55% {
    background: color-mix(in srgb, var(--accent) 16%, transparent);
  }
  100% {
    background: transparent;
  }
}

/* Danger zone at the bottom of the route detail page */
.danger-zone {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
}

.danger-zone h2 {
  color: var(--danger);
}

.danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.danger-row p {
  margin: 0.2rem 0 0;
}

.btn-danger {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.used-row .plan-body {
  flex: 1 1 auto;
  min-width: 0;
}

.plan-actions form.inline {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.plan-actions a.link,
.plan-actions label.link,
.plan-actions button.link {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  padding: 0;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.plan-actions a.link:hover,
.plan-actions label.link:hover,
.plan-actions button.link:hover {
  color: var(--text);
  text-decoration: none;
}

.plan-actions button.link.danger:hover {
  color: var(--danger);
}

/* Dashboard "Up next" rows */
.plan-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
}

.plan-row:last-of-type {
  border-bottom: none;
}

.plan-when {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: flex-start;
  min-width: 5.5rem;
}

.inline {
  display: inline;
}

.progress-set {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.progress-set input {
  width: 120px;
}

/* Auth pages (login / account) */
main.auth {
  max-width: 420px;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.auth-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.auth-card.wide-card {
  max-width: 100%;
}

.auth-card h1 {
  margin: 0;
}

.auth-card h2 {
  margin: 0.6rem 0 0.4rem;
}

.btn-primary,
.btn-secondary,
.btn-apple {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-2);
}

.btn-secondary {
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.btn-apple {
  background: #000;
  color: #fff;
}

.btn-apple:hover {
  background: #1a1a1a;
}

.secret-login {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
}

.secret-login label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.auth-error {
  background: rgba(192, 80, 106, 0.15);
  border: 1px solid var(--danger);
  color: #e6a3b3;
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font-size: 0.88rem;
  margin: 0;
}

.auth-note {
  background: rgba(91, 155, 213, 0.12);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-size: 0.88rem;
  margin: 0;
}

.dev-login,
.signout {
  margin: 0;
}

a.who {
  text-decoration: none;
}

@media (max-width: 640px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-form {
    grid-template-columns: 1fr 1fr;
  }
  .topbar {
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
  }
  .who {
    width: 100%;
    margin-left: 0;
    order: 3;
  }
}
