/* lda-ll.css — the few things Lobbying pages need beyond css/legilist.css.
   Kept beside the section rather than added to the shared stylesheet, per the
   rollout rule: shared files are not edited while sections migrate. Every
   colour comes from the ll- tokens, so the silo accent applies. */

/* A note that changes how a figure on the page should be read: a filing
   replaced by a later version, a figure left out of totals, a lobbyist also
   listed under another firm record. Tinted with the silo accent, no side rule. */
.lda-note {
  margin: 18px 0 0;
  padding: 12px 16px;
  background: var(--ll-accent-soft);
  color: var(--ll-ink-2);
  border-radius: 6px;
  font-size: 0.92rem;
  line-height: 1.55;
}
.lda-note a { color: var(--ll-accent); font-weight: 600; }

/* Two figures shown side by side and deliberately never summed. */
.lda-pair-note {
  margin: 10px 0 0;
  color: var(--ll-ink-3);
  font-size: 0.88rem;
  line-height: 1.55;
  max-width: 62ch;
}

/* Letter strip for directories browsed A–Z. */
.lda-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 18px 0 0;
}
.lda-letters a {
  min-width: 2em;
  padding: 4px 6px;
  text-align: center;
  color: var(--ll-ink-2);
  text-decoration: none;
  border-radius: 4px;
}
.lda-letters a:hover { background: var(--ll-accent-soft); }
.lda-letters a[aria-current="page"] { background: var(--ll-accent); color: #fff; }

/* Free text quoted from a filing (activity descriptions, covered positions). */
.lda-quote {
  margin: 6px 0 0;
  color: var(--ll-ink-2);
  line-height: 1.6;
  white-space: pre-line;
}

/* One issue area of a filing: the issue as a run-in head, the filer's own
   description, then who lobbied and where. Separated by space and a hairline,
   not boxed. */
.lda-activity { padding: 22px 0 6px; border-top: 1px solid var(--ll-line); }
.lda-activity:first-of-type { border-top: 0; padding-top: 8px; }
.lda-activity-head { margin: 0; font-size: 1.05rem; font-weight: 650; color: var(--ll-ink); }
.lda-activity-head a { color: var(--ll-accent); text-decoration: none; }
.lda-activity-head a:hover { text-decoration: underline; }
.lda-code { margin-left: 8px; font-size: 0.82rem; font-weight: 500; color: var(--ll-ink-4); }
.lda-activity .ll-table-wrap { margin-top: 12px; }
.lda-meta { margin: 10px 0 0; color: var(--ll-ink-2); font-size: 0.92rem; line-height: 1.55; }

/* The quieter second line in a table cell (a filing's period under its type). */
.lda-sub { margin-top: 2px; color: var(--ll-ink-4); font-size: 0.84rem; }

/* A directory's search panel holds just the one keyword field. */
.lda-search-one .ll-fields { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 640px) { .lda-search-one .ll-fields { grid-template-columns: 1fr; } }

/* Directory tables led by the name in their first column (the A–Z lists,
   a country's entities). On a phone the shared contract promotes the second
   column to the title line; here the first leads and the rest follow as the
   muted line. Numbers carry a word on a phone, where there is no header. */
.lda-cell-label { display: none; }
@media (max-width: 640px) {
  .lda-dir-first td:nth-child(1) {
    order: 1;
    flex: 0 0 100%;
    margin-bottom: 3px;
    color: var(--ll-ink);
    font-size: 0.98rem;
    line-height: 1.45;
  }
  .lda-dir-first td:nth-child(2) {
    order: 2;
    flex: 0 1 auto;
    margin-bottom: 0;
    color: var(--ll-ink-4);
    font-size: 0.84rem;
  }
  .lda-cell-label { display: inline; }
}

/* A fifth column (a legislator's contribution rows) joins the muted line
   last; without this it would jump ahead of the title. */
@media (max-width: 640px) {
  .ll-directory td:nth-child(5) { order: 5; }
  .ll-directory td:nth-child(5)::before {
    content: "\00B7";
    margin-right: 9px;
    color: var(--ll-line-strong);
  }
}

/* In the name-led tables, a long name in the muted line (a payee, an
   honoree, a client) takes a line of its own rather than wrapping
   mid-line, and what follows it starts its line without a separator. */
@media (max-width: 640px) {
  .lda-dir-first td.ll-question:not(:first-child) { flex: 0 0 100%; }
  .lda-dir-first td.ll-question::before,
  .lda-dir-first td.ll-question + td::before { content: none; }
}

/* A figure the filing left blank shows as a dash in the table; in a phone
   row a lone dash says nothing, so it is left out. */
@media (max-width: 640px) {
  .ll-directory td.lda-empty { display: none; }
}

/* Links inside running text (the methodology page) take the silo accent,
   as they do in notes. */
/* links in running text: the section colour, never the browser's blue */
.ll-doc a, .ll-sub a, .ll-coverage a { color: var(--ll-accent); font-weight: 600; }

/* Home's lead figure is a full dollar amount, too wide to share a line with
   its label, which was squeezed into a narrow column beside it: the label
   sits on one line under the figure instead */
.ll-headline-figure.lda-headline-stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

/* Home: year-by-year table */
.lda-years th[scope="row"] {
  padding: 12px 14px 12px 0; border-bottom: 1px solid var(--ll-line);
  color: var(--ll-ink); font-weight: 700; white-space: nowrap; vertical-align: top;
}
.lda-years tr:last-child th[scope="row"] { border-bottom: 0; }
.lda-years tbody tr:hover th { background: #f5f7fa; }
.lda-sub-inline { margin-left: 4px; color: var(--ll-ink-4); font-size: 0.78rem; font-weight: 500; }
.lda-muted { color: var(--ll-ink-4); }
@media (max-width: 640px) {
  /* six figures will not fit a phone: keep year, spending, change, lobbyists */
  .lda-years th:nth-child(4), .lda-years td:nth-child(4),
  .lda-years th:nth-child(6), .lda-years td:nth-child(6) { display: none; }
}

/* Ranked tables with the shared in-row bar (.ll-bar-cell, as on Analytics).
   On a phone the bar column will not fit beside the figures, so each row
   becomes name and figure on one line with the bar full width beneath; the
   minor column (filings, issue code) is dropped */
@media (max-width: 640px) {
  .lda-bar-table thead { display: none; }
  .lda-bar-table tr {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
    padding: 12px 0; border-bottom: 1px solid var(--ll-line);
  }
  .lda-bar-table tr:last-child { border-bottom: 0; }
  .lda-bar-table td { padding: 0; border: 0; }
  .lda-bar-table td:first-child { flex: 1 1 0; min-width: 0; }
  .lda-bar-table td.lda-bar-hide { display: none; }
  .lda-bar-table td.ll-bar-cell { flex: 0 0 100%; width: auto; min-width: 0; padding-top: 4px; }
}

/* Home's directory list carries no figures, so its rows drop the empty
   third column the shared index leaves for them */
@media (min-width: 641px) {
  .lda-index-plain .ll-index-row { grid-template-columns: 215px minmax(0, 1fr); }
}

/* Tab rows (.ll-switch) wider than their column: twenty years on a desktop,
   the directory tabs on a phone. The shared .ll-switch scrolls with no
   scrollbar and fades the cut-off edge.
   Here the fade itself becomes a button (the script in _ll_foot.php adds
   it, and only while there is more to see that way), and a thin line on
   the row's rule shows which stretch of the years is in view. */
/* The shared row's own edge shading is meant to vanish when the tabs fit,
   but a faint band stays at each end; the fades below replace it, shown
   only where a row runs on. */
.ll-switch {
  background-image: none;
}

.lda-switch-wrap {
  position: relative;
  margin: 0 0 26px;
}

.lda-switch-wrap > .ll-switch {
  margin-bottom: 0;
}

.lda-switch-edge {
  position: absolute;
  top: 0;
  bottom: 1px;
  display: flex;
  align-items: center;
  width: 56px;
  padding: 0 4px 3px;
  border: 0;
  color: var(--ll-accent);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.lda-switch-edge.is-on {
  opacity: 1;
  pointer-events: auto;
}

.lda-switch-edge.is-left {
  left: 0;
  justify-content: flex-start;
  background: linear-gradient(to right, var(--ll-canvas) 45%, rgba(251, 251, 250, 0));
}

.lda-switch-edge.is-right {
  right: 0;
  justify-content: flex-end;
  background: linear-gradient(to left, var(--ll-canvas) 45%, rgba(251, 251, 250, 0));
}

.lda-switch-edge svg {
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}

.lda-switch-edge.is-left:hover svg { transform: translateX(-2px); }
.lda-switch-edge.is-right:hover svg { transform: translateX(2px); }

.lda-switch-edge:focus-visible {
  outline: 2px solid var(--ll-accent);
  outline-offset: -2px;
}

/* where the visible stretch sits along the whole row */
.lda-switch-pos {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  pointer-events: none;
}

.lda-switch-pos > span {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 2px;
  background: var(--ll-line-strong);
}

/* A chart's year range ("2007 to 2026") stays on one line beside its
   caption; on a phone the caption wraps instead. */
.ll-chart-caption > span:last-child {
  flex-shrink: 0;
  white-space: nowrap;
}
