/* Bills library and reader. Red/green follows the answer checker (style.css .claim-added/.claim-removed). */
/* Same shell as Projects and Monitoring (issues.css, projects.css). */
.bills-open #chatThread, .bills-open #chatComposer, .bills-open #rightRail,
.bills-open #reopenSourcesTab, .bills-open #projectCrumb { display: none !important; }
.bills-open .chat-shell, .bills-open .chat-shell.rail-open { grid-template-columns: 274px minmax(0,1fr) 0; }
@media (max-width: 768px) { .bills-open .chat-shell, .bills-open .chat-shell.rail-open { grid-template-columns: minmax(0,1fr); } }
.monitoring-content.bills-content { width: min(1240px, calc(100% - 64px)); }
.monitoring-content.bills-content.is-library { width: min(960px, calc(100% - 64px)); }
@media (max-width: 768px) { .monitoring-content.bills-content, .monitoring-content.bills-content.is-library { width: calc(100% - 32px); padding-top: 20px; } }
:root { --bill: #2b3a55; --bill-soft: #eef1f6; --bill-add: #e2efe6; --bill-del: #f7e3dc; --bill-del-ink: #8a4a3a; --bill-del-rule: #b4533a; --bill-ghost: #8b9691; }

.bill-glyph { width: 16px; height: 18px; flex: none; color: var(--bill); }
.sidebar-bills .chat-history-item { display: flex; align-items: center; gap: 8px; }
.sidebar-bills .bills-row-text { display: flex; flex-direction: column; min-width: 0; }
.sidebar-bills .bills-row-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-bills .bills-row-text small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bill-track { display: flex; gap: 2px; align-items: center; }
.bill-track i { display: block; width: 7px; height: 4px; border-radius: 1px; background: #d5dbe5; }
.bill-track i.done { background: var(--bill); }
.bill-track i.current { background: var(--bill); box-shadow: 0 0 0 2px #c9d2e2; }
.bill-track i.sep { width: 1px; height: 8px; background: #b8c0cc; margin: 0 2px; }
.bill-track.big i { width: 22px; height: 6px; }
.bill-track.big i.sep { height: 12px; }



.bills-reader-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 4px 0 16px; }
.bills-act-link { font-size: 13px; }
.bills-reader { display: grid; grid-template-columns: 240px minmax(0, 1fr) 290px; gap: 22px; align-items: start; }
.bills-timeline { display: block; position: sticky; top: 8px; max-height: calc(100dvh - 24px); overflow: auto; border-right: 1px solid var(--line); padding-right: 12px; }
.bills-tl-house { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 6px; }
.bills-tl { position: relative; display: block; width: 100%; text-align: left; padding: 5px 4px 7px 18px; margin-left: 5px; border: 0; border-left: 2px solid #d5dbe5; border-radius: 0; background: none; font: inherit; font-size: 12.5px; line-height: 1.35; color: var(--ink); cursor: default; }
.bills-tl::before { content: ""; position: absolute; left: -6px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--bill); }
.bills-tl.print::before { border-radius: 2px; background: var(--bill-soft); }
.bills-tl[role="button"], button.bills-tl:not(:disabled) { cursor: pointer; }
.bills-tl[role="button"]:hover, button.bills-tl:not(:disabled):hover { background: var(--ui-hover); }
.bills-tl.sel { background: var(--ui-hover); box-shadow: inset 2px 0 0 var(--green); }
.bills-tl small { display: block; color: var(--muted); font-size: 11.5px; }
.bills-tl:disabled { color: var(--muted); }
.bills-tl-sub { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

.bills-versionbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 12px; }
.bills-toggle { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.bills-legend { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 6px; white-space: pre; }
.bills-pages { font-family: Georgia, serif; font-size: 15px; line-height: 1.55; }
.bills-page { border-top: 1px solid var(--line); padding: 8px 0 12px; }
.bills-page-no { font: 11px Inter, sans-serif; color: var(--muted); margin-bottom: 4px; }
.bills-line { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 6px; }
.bills-ln { font: 10.5px Inter, sans-serif; color: #9aa6a0; text-align: right; padding-top: 4px; }
.bills-lt { overflow-wrap: anywhere; }
ins.bill-add, ins.bill-would, del.bill-del, del.bill-would-del { border-radius: 3px; cursor: pointer; }
ins.bill-add { background: var(--bill-add); text-decoration: none; }
del.bill-del { background: var(--bill-del); color: var(--bill-del-ink); text-decoration: line-through; text-decoration-color: var(--bill-del-rule); }
ins.bill-would { color: var(--bill-ghost); text-decoration: none; border: 1px dashed #b9c2bd; padding: 0 2px; }
del.bill-would-del { color: var(--bill-ghost); text-decoration: line-through dashed; }
.bill-tag { font: 600 10.5px Inter, sans-serif; color: var(--green-deep); background: var(--bill-add); border-radius: 3px; padding: 0 4px; margin: 0 3px; vertical-align: 2px; }
.bill-tag.grey { color: var(--muted); background: #f1f3f2; }

.bills-panel { position: sticky; top: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 14px; font-size: 13px; max-height: calc(100dvh - 24px); overflow: auto; }
.bills-panel h3 { font-size: 11.5px; font-weight: 500; color: var(--muted); margin: 12px 0 2px; }
.bills-panel p { margin: 2px 0; }
.bills-sponsors { margin: 2px 0; padding-left: 16px; }
.bills-wording { white-space: pre-wrap; font-family: Georgia, serif; font-size: 13px; }
.bills-provenance { margin-top: 12px !important; }

.bills-amend-list { margin-top: 18px; }
.bills-amend-list h2 { font-size: 15px; margin: 0 0 6px; }
.bills-amend-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 2px 10px; width: 100%; text-align: left; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink); }
.bills-amend-row:hover { background: var(--ui-hover); }
.bills-amend-row small { grid-column: 2; color: var(--muted); }
.bills-amend-row.not_made span, .bills-amend-row.pending span { color: var(--muted); }

.bills-summary { border: 1px solid var(--line); background: var(--surface-muted); border-radius: 6px; padding: 12px 14px; margin: 10px 0; font-size: 13.5px; }
.bills-diff { font-family: Georgia, serif; font-size: 15px; line-height: 1.6; }
.bills-hunk { border-top: 1px solid var(--line); padding: 10px 0; }
.bills-hunk-head { font: 600 13px Inter, sans-serif; }

@media (max-width: 900px) {
  .bills-reader { grid-template-columns: minmax(0, 1fr); }
  .bills-timeline { position: static; max-height: none; border-right: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; white-space: nowrap; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
  .bills-tl-house { display: none; }
  .bills-tl { flex: none; width: auto; margin: 0; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
  .bills-tl::before, .bills-tl-sub, .bills-tl small { display: none; }
  .bills-panel { position: static; max-height: none; }
  .bills-line { grid-template-columns: 20px minmax(0, 1fr); }
  .bills-pages { font-size: 14.5px; }
}
.bills-tl.unreadable { color: var(--muted); }

/* Bills on the shared layout (pages.css): only what the shared parts don't cover. */
.bills-tab-later { flex: none; padding: 10px 0; color: var(--muted); font-size: 13px; opacity: .7; }
.bills-filters .bills-search-field { flex: 2 1 260px; max-width: none; }
.bills-table .bills-title { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.bills-table .bills-title:hover .primary { text-decoration: underline; text-underline-offset: 3px; }
.bills-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bills-badges a.ui-badge { text-decoration: none; }
.bills-stage-cell { min-width: 200px; }
.bills-stage-cell .bill-track { margin: 4px 0; }
.bills-tl-sub .ui-badge { font-size: 11.5px; }
.ui-badge.bills-vote { background: var(--bill-soft); color: var(--bill); text-decoration: none; }
.bills-gap { background: #fdf8f0; border-color: #ecd9bd; color: #5c4012; }
.bills-panel .ui-badge { margin: 4px 0; }
@media (max-width: 760px) { .bills-stage-cell { min-width: 0; } }
.bills-table { table-layout: fixed; }
.bills-table th:nth-child(2) { width: 230px; }
.bills-table th:nth-child(3) { width: 120px; }
.bills-table .sub { overflow-wrap: anywhere; }
.bills-updated { margin-top: 4px !important; font-size: 12px; }
.bills-fresh { display: flex; align-items: center; gap: 6px; margin: 4px 0 10px; padding: 6px 10px; border-radius: 6px; background: var(--ui-hover); font-size: 13px; }
.bills-timeline .bills-fresh { margin: 0 0 8px; }
.bills-fresh .ui-btn { flex: none; white-space: nowrap; }
.bills-timeline .bills-fresh { display: block; }
.bills-timeline .bills-fresh .ui-btn { display: inline; }
