/* Topic-browse page. Reuses tokens/base from measure.css (:root, .m-topbar, .m-wrap). */

.t-wrap { max-width: 1040px; }

.t-header { margin: 0 0 18px; }
.t-header h1 { font-size: 1.6rem; margin: 0 0 4px; color: var(--brand-dark); }
.t-header p { color: var(--ink-soft); margin: 0; font-size: .95rem; }

.t-note { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 16px; margin-bottom: 18px; font-size: .85rem; color: var(--ink-soft); }

.t-major { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 14px; box-shadow: 0 6px 20px rgba(120,90,20,.05); overflow: hidden; }

.t-major-head { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: 0; cursor: pointer; padding: 16px 20px; font: inherit; color: inherit; }
.t-major-head:hover { background: var(--marble); }
.t-major-title { font-weight: 700; font-size: 1.08rem; color: var(--brand-dark); flex: 1; }
.t-major-count { font-size: .8rem; font-weight: 700; color: var(--ink-soft); background: var(--marble);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.t-major-chevron { transition: transform .15s; color: var(--ink-soft); }
.t-major.open .t-major-chevron { transform: rotate(90deg); }

.t-subtopics { display: none; padding: 0 20px 16px; }
.t-major.open .t-subtopics { display: block; }

/* One toolbar per major card: track-all checkbox + per-major summary controls,
   with the Confidence column header pushed to the far right (aligns with the
   per-bill confidence value in .t-bill-row1). */
.t-major-toolbar { display: flex; align-items: center; gap: 16px; padding: 8px 0 12px;
  border-bottom: 1px solid var(--line); margin-bottom: 10px; flex-wrap: wrap; }
.t-track-all { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600;
  color: var(--ink-soft); cursor: pointer; flex-shrink: 0; }
.t-ctrl-btn-sm { padding: 5px 10px; font-size: .74rem; }
/* Acts as both the "Confidence" column header and a >= threshold filter. */
.t-conf-filter { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-soft); flex-shrink: 0; margin-left: auto; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.t-conf-filter:focus { outline: none; border-color: var(--brand); }

.t-sub { margin: 10px 0; }
.t-sub-headrow { display: flex; align-items: baseline; gap: 12px; }
.t-sub-title { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--gold-deep); margin: 0 0 8px; }
.t-track-all-sub { font-size: .74rem; flex-shrink: 0; }
.t-sub-new { font-size: .68rem; font-weight: 700; text-transform: none; letter-spacing: 0;
  color: var(--gold-deep); background: #fbf1dc; border: 1px solid #e9d19c; border-radius: 999px;
  padding: 1px 8px; margin-left: 4px; }

.t-bill-list { display: flex; flex-direction: column; gap: 6px; }

.t-bill-card { padding: 8px 12px; border-radius: 10px; background: var(--marble);
  border: 1px solid transparent; }
.t-bill-card:hover { border-color: var(--line); }
.t-bill-row1 { display: flex; align-items: flex-start; gap: 10px; }
.t-bill-check { flex-shrink: 0; margin-top: 3px; width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.t-bill-num { flex-shrink: 0; min-width: 62px; font-weight: 700; color: var(--brand-dark);
  text-decoration: none; }
.t-bill-num:hover { text-decoration: underline; }

/* flex:1 (not a fixed px width) so the field uses ALL the space actually left
   between the fixed-width siblings (checkbox/num on the left, badge/confidence
   on the right) instead of stopping short and leaving a dead gap -- while
   still landing at the exact same right edge on every row, since that
   remaining space is identical row to row. The chevron is a flex-shrink:0
   sibling of the truncated text (not nested inside it), so it never gets
   clipped by the text's own ellipsis truncation. */
.t-bill-catch-wrap { display: flex; align-items: baseline; gap: 6px; flex: 1 1 auto; min-width: 0; }
.t-bill-catch-toggle { cursor: pointer; }
.t-bill-catch-toggle:hover .t-bill-catch { color: var(--brand-dark); }
.t-bill-catch { min-width: 0; color: var(--ink); font-size: .93rem; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
/* Expanded: the SAME field grows (wraps in place) to show the full summary,
   instead of a separate box appearing elsewhere. */
.t-bill-catch-expanded .t-bill-catch { white-space: normal; overflow: visible; text-overflow: clip; }
.t-catch-chevron { flex-shrink: 0; font-size: 1.15em; line-height: 1; color: var(--ink-soft); }

.t-bill-conf { flex-shrink: 0; font-size: .74rem; font-weight: 700; color: var(--ink-soft); }
.t-bill-new { font-size: .68rem; font-weight: 700; color: var(--gold-deep); background: #fbf1dc;
  border: 1px solid #e9d19c; border-radius: 999px; padding: 1px 8px; flex-shrink: 0; }

.t-bill-row2 { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; padding-left: 97px; }
.t-b2-item { font-size: .78rem; color: var(--ink-soft); }
.t-b2-link { color: var(--brand); text-decoration: none; font-weight: 600; }
.t-b2-link:hover { text-decoration: underline; }
.t-b2-badge { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; }
.t-b2-clickable { cursor: pointer; }
.t-b2-clickable:hover { color: var(--brand); text-decoration: underline; }
.t-b2-chevron { font-size: 1.25em; line-height: 0; vertical-align: middle; display: inline-block; }

.t-bill-othertopics { margin: 6px 0 2px 97px; padding: 8px 12px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; font-size: .82rem; color: var(--ink-soft); }
.t-bill-othertopics div { padding: 2px 0; }
.t-otherjump { cursor: pointer; }
.t-otherjump:hover { color: var(--brand); text-decoration: underline; }

.t-b2-omnibus { color: var(--gold-deep); font-weight: 600; }
.t-bill-omnibus-agencies { margin: 6px 0 2px 97px; padding: 8px 12px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; font-size: .82rem; color: var(--ink-soft); }

.t-newtopics { margin-top: 24px; }
.t-newtopics h2 { font-size: 1rem; color: var(--ink-soft); }

/* ---- Top controls: filter box + expand/collapse-all ---------------------- */
.t-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.t-filter-input { flex: 0 1 520px; min-width: 160px; padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; font: inherit; font-size: .92rem; color: var(--ink); }
.t-filter-input:focus { outline: none; border-color: var(--brand); }
.t-controls-btns { display: flex; gap: 8px; flex-shrink: 0; }
.t-ctrl-btn { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
  font: inherit; font-size: .82rem; font-weight: 600; color: var(--brand-dark); cursor: pointer; }
.t-ctrl-btn:hover { border-color: var(--brand); }

/* ---- Sign-in widget (docked in .m-topbar-inner) + magic-link modal -------- */
.m-topbar-spacer { flex: 1 1 auto; }

.a-widget { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.a-status { color: #cfe0f0; font-size: .82rem; }
.a-link { color: var(--accent); font-size: .85rem; font-weight: 700; text-decoration: none; }
.a-link:hover { text-decoration: underline; }
.a-btn { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28); color: #fff;
  border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.a-btn:hover { background: rgba(255,255,255,.18); }

.a-modal-backdrop { position: fixed; inset: 0; background: rgba(20,48,79,.55); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 16px; }
.a-modal-backdrop[hidden] { display: none; }
.a-modal { position: relative; background: #fff; border-radius: var(--radius); max-width: 380px;
  width: 100%; padding: 28px 24px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.a-modal h2 { margin: 0 0 8px; font-size: 1.15rem; color: var(--brand-dark); }
.a-modal p { margin: 0 0 16px; font-size: .88rem; color: var(--ink-soft); }
.a-modal-close { position: absolute; top: 10px; right: 12px; background: none; border: 0;
  font-size: 1.4rem; line-height: 1; color: var(--ink-soft); cursor: pointer; }
.a-modal-form { display: flex; gap: 8px; }
.a-modal-email { flex: 1 1 auto; min-width: 0; padding: 9px 12px; border-radius: 999px;
  border: 1px solid var(--line); font: inherit; font-size: .9rem; }
.a-modal-email:focus { outline: none; border-color: var(--brand); }
.a-btn-accent { background: var(--brand); border-color: var(--brand); white-space: nowrap; }
.a-btn-accent:hover { background: var(--brand-dark); }
.a-modal-note { margin-top: 12px; font-size: .85rem; }
.a-modal-note.ok { color: var(--ok); }
.a-modal-note.err { color: var(--die); }
