/* Sources page in the redesign (flag new_ui). Layout from css/new-ui/layout.css;
   this file only styles what is particular to the page. Tokens: css/ui-tokens.css. */
body.new-ui #viewSources > h1,
body.new-ui #viewSources > .sub,
body.new-ui #srcEmpty { display: none; }

body.new-ui .src-page .src-grid { margin-top: 4px; }
body.new-ui .src-page .src-muted { color: var(--ui-ink-3); }
body.new-ui .src-page .src-weak {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--ui-ink-2);
}

/* Where to start */
body.new-ui .src-start { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px; }
body.new-ui .src-start .src-eyebrow { margin: 0; font-size: 13px; color: var(--ui-ink-2); }
body.new-ui .src-start h3 {
  margin: 0;
  max-width: 34ch;
  font-size: 22px;
  line-height: 1.28;
  font-weight: 600;
  letter-spacing: -.02em;
}
body.new-ui .src-start p { margin: 0; font-size: 14px; color: var(--ui-ink-2); }
body.new-ui .src-start .src-muted { font-size: 13px; }
body.new-ui .src-qs { margin: 2px 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
body.new-ui .src-qs li {
  padding: 8px 12px;
  border: 1px solid var(--ui-line);
  border-radius: 9px;
  background: var(--ui-paper-2);
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.new-ui .src-qs .src-qs-more { border-color: transparent; background: none; color: var(--ui-ink-3); }
body.new-ui .src-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }

/* What kind of sites: counts from zero */
body.new-ui .src-tp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 28px;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--ui-line);
  font-size: 14px;
}
body.new-ui .src-tp:last-child { border-bottom: 0; }
body.new-ui .src-tp b { font: 500 13px var(--ui-mono); text-align: right; color: var(--ui-ink-2); }
body.new-ui .src-bar, body.new-ui .src-cov {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: var(--ui-paper-2);
  overflow: hidden;
}
body.new-ui .src-bar i, body.new-ui .src-cov i { display: block; height: 100%; background: var(--ui-ink-2); }
body.new-ui .src-bar i.me, body.new-ui .src-page .src-table tr.me .src-cov i { background: var(--ui-accent); }

/* Most cited */
body.new-ui .src-site { display: flex; align-items: center; gap: 10px; min-width: 0; }
body.new-ui .src-site > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
body.new-ui .src-site b { font-weight: 500; white-space: nowrap; }
body.new-ui .src-site small { font-size: 12.5px; color: var(--ui-ink-3); }
body.new-ui .src-site a { color: inherit; text-decoration: underline; text-decoration-color: var(--ui-line); text-underline-offset: 3px; }
body.new-ui .src-site a:hover { color: var(--ui-ink); text-decoration-color: currentColor; }
body.new-ui .src-fav { width: 20px; height: 20px; border-radius: 5px; flex: none; }
body.new-ui .src-page .src-table .src-cov { display: inline-block; width: 72px; vertical-align: middle; }
body.new-ui .src-ct { margin-left: 8px; font: 13px var(--ui-mono); color: var(--ui-ink-2); white-space: nowrap; }
body.new-ui .src-no { color: var(--ui-ink); font-weight: 500; }
body.new-ui .src-r { text-align: right; }
body.new-ui .src-inplan { font-size: 13px; color: var(--ui-ink-2); white-space: nowrap; }
body.new-ui .src-page .src-gone { padding-top: 12px; border-top: 1px solid var(--ui-line); font-size: 13px; color: var(--ui-ink-3); }
body.new-ui .src-page .src-gone p { margin: 0; }
body.new-ui .src-page .src-gone p + p { margin-top: 4px; }

/* Over time: one row per site, one bar per measurement */
body.new-ui .src-trend-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 76px;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--ui-line);
  font-size: 14px;
}
body.new-ui .src-trend-row:last-child { border-bottom: 0; }
body.new-ui .src-trend-row.gone .src-dom { color: var(--ui-ink-3); text-decoration: line-through; }
body.new-ui .src-dom .src-dn { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
body.new-ui .src-dom { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.new-ui .src-spark { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
body.new-ui .src-spark i { flex: 1; min-height: 2px; border-radius: 2px 2px 0 0; background: var(--ui-ink-2); }
body.new-ui .src-spark i.z { background: var(--ui-line); }
body.new-ui .src-trend-row .src-ct { margin: 0; text-align: right; }

/* How to read this */
body.new-ui .src-how ul { margin: 0; padding: 0 0 0 18px; display: grid; gap: 8px; font-size: 14px; color: var(--ui-ink-2); }

body.new-ui .src-page .ui-empty .src-empty-t { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--ui-ink); }
body.new-ui .src-page .ui-empty p { margin: 0 0 14px; }
body.new-ui .src-page .ui-empty .ui-btn { margin-top: 4px; }

/* The lead number: the sites to work on. */
body.new-ui .src-page .src-lead .big { font-size: 56px; }
body.new-ui .src-page .src-rival-m { display: none; }
@media (max-width: 900px) {
  body.new-ui .src-page .src-lead .big { font-size: 44px; }
  body.new-ui .src-page .src-rival-m { display: block; color: var(--ui-ink-2); }
  body.new-ui .src-start { padding: 18px 16px; }
  body.new-ui .src-start h3 { font-size: 19px; }
  body.new-ui .src-acts .ui-btn { flex: 1 1 100%; }
  body.new-ui .src-qs { grid-template-columns: 1fr; }
  /* Most cited on a phone: one block per site, the two numbers under it. */
  body.new-ui .src-page .src-table thead { display: none; }
  body.new-ui .src-page .src-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 12px 16px; border-bottom: 1px solid var(--ui-line); }
  body.new-ui .src-page .src-table tr:last-child { border-bottom: 0; }
  body.new-ui .src-page .src-table td { padding: 0; border: 0; background: none; }
  body.new-ui .src-page .src-table tr.me { background: var(--ui-accent-soft); }
  body.new-ui .src-page .src-table td:first-child { grid-column: 1 / -1; }
  body.new-ui .src-page .src-table td[data-l]::before { content: attr(data-l); display: block; margin-bottom: 2px; font-size: 12px; color: var(--ui-ink-3); }
  body.new-ui .src-page .src-table .src-cov { width: 48px; }
  body.new-ui .src-site b { white-space: normal; overflow-wrap: anywhere; }
  body.new-ui .src-trend-row { grid-template-columns: minmax(0, 1fr) 72px 64px; }
  body.new-ui .src-tp { grid-template-columns: minmax(0, 1fr) 72px 28px; }
}
