/* The few rules that belong to one screen and would be noise in
 * components.css. Anything reused by a second screen moves out of here. */

/* -------------------------------------------------------------- overview -- */

.overview__chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.range-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.range-custom {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  margin-top: var(--space-3);
}
.range-custom .field { flex: 1 1 150px; }

/* ------------------------------------------------------------ link detail -- */

.short-url {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.short-url__text {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.analytics-split {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: var(--space-6);
  margin-top: var(--space-6);
}
@media (max-width: 760px) {
  .analytics-split { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
}

.notes {
  margin: 0;
  padding-left: var(--space-5);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
}
.notes li { margin-bottom: var(--space-2); }
.notes li:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ help -- */

.help-toc {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
/* Buttons rather than anchors: an `href="#id"` inside a hash-routed app would
 * replace the route and navigate away. They still have to read as links. */
.help-toc button {
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
}
.help-toc button:hover { border-color: var(--accent); color: var(--accent); }

/* A section reached from the contents list is focused so a screen reader
 * starts there, and that focus should be visible without ringing the whole
 * card in a 2px outline. */
.card[tabindex="-1"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.prose { max-width: 74ch; line-height: var(--leading-relaxed); }
.prose h3 { margin-top: var(--space-6); margin-bottom: var(--space-2); }
.prose h3:first-child { margin-top: 0; }
.prose p { margin-bottom: var(--space-3); color: var(--text-muted); }
.prose ul { padding-left: var(--space-5); margin-bottom: var(--space-3); color: var(--text-muted); }
.prose li { margin-bottom: var(--space-2); }
.prose strong { color: var(--text); font-weight: var(--weight-medium); }

.shortcut-table td { padding: var(--space-2) var(--space-3) var(--space-2) 0; border-bottom: 1px solid var(--border); }
.shortcut-table tr:last-child td { border-bottom: 0; }
.shortcut-table tr:hover { background: none; }
.shortcut-table__keys { white-space: nowrap; width: 1%; }

/* --------------------------------------------------------------- account -- */

.theme-choice {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
