body {
  font-family: Arial;
  padding: 20px;
  background: #f0f4f8;
  color: #1a1a2e;
  text-align: center;
}

/* ── navigation ── */
.nav-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  justify-content: center;
}

.site-title {
  text-decoration: none;
  color: #1a1a2e;
  display: inline-block;
}

.site-title:hover {
  color: #1a56db;
}

/* ── forms and inputs ── */
input,
select {
  padding: 8px;
  font-size: 14px;
  background: white;
  color: #1a1a2e;
  border: 1px solid #c3d4e8;
  border-radius: 4px;
}

button {
  padding: 8px 16px;
  font-size: 14px;
  background: #1a56db;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

button:hover {
  background: #1648c0;
}

/* ── homepage layout ── */
h1 {
  font-size: 28px;
  margin-bottom: 20px;
  color: #1a1a2e;
}

h2 {
  font-size: 16px;
  color: #4a5568;
  margin: 20px 0 10px;
  text-align: left;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

form {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.bills-search {
  display: flex;
  gap: 10px;
  margin: 16px auto;
  max-width: 1000px;
  flex-wrap: wrap;
}

.bills-search input {
  flex: 1;
  min-width: 200px;
}

/* ── cards ── */
#billContainer,
#billsContainer,
#favoritesContainer {
  display: flex;
  flex-direction: column;
  max-width: 1000px;
  margin: 0 auto;
}

.card {
  display: flex;
  background: white;
  border: 1px solid #c3d4e8;
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 12px;
  gap: 12px;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.card-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.star,
.expand {
  background: none;
  border: none;
  color: #a0aec0;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
}

.star {
  color: #1a56db;
}

.star:hover {
  color: #1648c0;
}

.expand:hover {
  color: #1a1a2e;
}

.card-right {
  flex: 1;
}

.card-top {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 4px;
}

.bill-number {
  font-weight: bold;
  color: #1a56db;
  min-width: 50px;
  font-size: 14px;
}

.bill-title {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a2e;
}

.card-status {
  font-size: 12px;
  color: #718096;
}

.card-details {
  display: none;
  margin-top: 10px;
  font-size: 13px;
  color: #4a5568;
  border-top: 1px solid #e2eaf4;
  padding-top: 10px;
}

.card-details p {
  margin: 4px 0;
}

/* ── bill detail page ── */
.bill-detail {
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
}

.bill-detail h1 {
  font-size: 22px;
  color: #1a56db;
  margin-bottom: 8px;
  text-align: left;
}

.bill-detail .description {
  font-size: 14px;
  color: #4a5568;
  margin-bottom: 24px;
  line-height: 1.6;
}

.bill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.bill-grid .bill-section {
  margin-bottom: 0;
}

.bill-section {
  background: white;
  border: 1px solid #c3d4e8;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.bill-section h2 {
  font-size: 14px;
  color: #1a56db;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  max-width: none;
}

.bill-section p {
  font-size: 13px;
  color: #4a5568;
  margin: 4px 0;
}

.bill-section strong {
  color: #1a1a2e;
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.sponsor-card {
  background: #f0f4f8;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
}

.sponsor-name {
  font-weight: bold;
  color: #1a1a2e;
  margin-bottom: 2px;
}

.sponsor-info {
  color: #718096;
}

.party-R {
  color: #cc0000;
}

.party-D {
  color: #1a56db;
}

.bill-links a {
  display: inline-block;
  margin-right: 12px;
  color: #1a56db;
  font-size: 13px;
}

/* ── table ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th {
  background: #e2eaf4;
  padding: 10px;
  text-align: left;
  color: #1a1a2e;
}

td {
  padding: 10px;
  border-bottom: 1px solid #e2eaf4;
  color: #4a5568;
}
#print-pdf-frame {
  page-break-before: always;
  display: block;
}

/* Account additions use the original colors, cards and spacing. */
[hidden] { display: none !important; }
* { box-sizing: border-box; }
a { color: #1a56db; }
.button { display: inline-block; padding: 8px 16px; font-size: 14px; background: #1a56db; color: white; border-radius: 4px; text-decoration: none; }
.button:hover { background: #1648c0; }
.secondary { background: #e2eaf4; color: #1a1a2e; }
.account-bar { max-width: 1000px; margin: 0 auto 22px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px; font-size: 14px; }
.account-bar form { margin: 0; }
.auth-box { max-width: 450px; margin: 24px auto; padding: 28px; background: white; border: 1px solid #c3d4e8; border-radius: 8px; text-align: left; }
.auth-box h2 { font-size: 21px; color: #1a1a2e; margin-top: 0; }
.stacked { display: flex; flex-direction: column; gap: 14px; text-align: left; margin-top: 20px; }
.stacked label { display: flex; flex-direction: column; gap: 7px; font-size: 14px; }
.stacked input, .stacked select { width: 100%; min-width: 0; }
.stacked p { margin: 0; }
.muted { color: #617086; font-size: 13px; line-height: 1.5; }
.notice { max-width: 1000px; margin: 14px auto; padding: 12px; background: #e2eaf4; border-radius: 6px; text-align: left; font-size: 14px; overflow-wrap: anywhere; }
.notice.error { background: #fff0f0; color: #8a2020; }
.notice.success { background: #e9f5ee; color: #235437; }
.admin-box { max-width: 850px; margin: 20px auto; text-align: left; }
.admin-box textarea { display: block; width: 100%; margin: 10px 0; padding: 10px; font: inherit; resize: vertical; }
.home-tools { max-width: 1000px; margin: 8px auto; text-align: left; display: flex; flex-wrap: wrap; gap: 8px; }
.table-scroll { overflow-x: auto; }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #7aa7f8; outline-offset: 3px; }
@media (max-width: 650px) {
  body { padding: 12px; }
  .bill-grid { grid-template-columns: 1fr; }
  .card-top { flex-wrap: wrap; gap: 4px; }
  .account-bar { gap: 10px; }
  .auth-box { padding: 20px; }
}

@media print {
  .account-bar, .no-print, .star, #save-status { display: none !important; }
  .nav-buttons {
    display: none;
  }
  #bill-text-frame {
    display: none;
  }
  .bill-section:has(#bill-text-frame) {
    display: none;
  }
}
