:root{
	--pico-form-element-spacing-vertical: 0.5rem;
}

/* ── Pico theme — WyoBill patriotic palette ─────────────── */
:root:not([data-theme=dark]),
[data-theme=light] {
  --pico-primary:                  #1B3F87;
  --pico-primary-background:       #1B3F87;
  --pico-primary-border:           #1B3F87;
  --pico-primary-underline:        rgba(27, 63, 135, 0.5);
  --pico-primary-hover:            #152f6a;
  --pico-primary-hover-background: #152f6a;
  --pico-primary-hover-border:     #152f6a;
  --pico-primary-hover-underline:  rgba(27, 63, 135, 0.5);
  --pico-primary-focus:            rgba(27, 63, 135, 0.25);
  --pico-primary-inverse:          #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --pico-primary:                  #6b93e0;
    --pico-primary-background:       #1B3F87;
    --pico-primary-border:           #6b93e0;
    --pico-primary-underline:        rgba(107, 147, 224, 0.5);
    --pico-primary-hover:            #90aee8;
    --pico-primary-hover-background: #152f6a;
    --pico-primary-hover-border:     #90aee8;
    --pico-primary-hover-underline:  rgba(107, 147, 224, 0.5);
    --pico-primary-focus:            rgba(107, 147, 224, 0.25);
    --pico-primary-inverse:          #ffffff;
  }
}

[data-theme=dark] {
  --pico-primary:                  #6b93e0;
  --pico-primary-background:       #1B3F87;
  --pico-primary-border:           #6b93e0;
  --pico-primary-underline:        rgba(107, 147, 224, 0.5);
  --pico-primary-hover:            #90aee8;
  --pico-primary-hover-background: #152f6a;
  --pico-primary-hover-border:     #90aee8;
  --pico-primary-hover-underline:  rgba(107, 147, 224, 0.5);
  --pico-primary-focus:            rgba(107, 147, 224, 0.25);
  --pico-primary-inverse:          #ffffff;
}

/* ── Homepage ────────────────────────────────────────────── */
.hero-logo {
  width: 420px;
  max-width: 100%;
  margin-bottom: .25rem;
}

.nav-logo {
  width: 125px;
  max-width: 100%;
  vertical-align: middle;
  margin-right: .4rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.hero {
  text-align: center;
  padding: 0 1rem 1.5rem;
}

.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: .15rem;
}

.hero-sub {
  font-size: 1rem;
  color: var(--pico-muted-color);
  margin-bottom: 0;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
  padding-top: 2rem;
  border-top: 1px solid var(--pico-muted-border-color);
}

.feature h3 {
  margin-bottom: .4rem;
}

.popular-bills {
  margin: 2rem 0;
  padding-top: 2rem;
  border-top: 1px solid var(--pico-muted-border-color);
}

.bill-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.bill-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
}

.bill-cards article {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.bill-cards article > p {
  flex: 1;
}

.bill-cards article p {
  margin-bottom: 0;
}

.bill-cards article footer {
  margin-top: .5rem;
  color: var(--pico-muted-color);
}

.home-footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--pico-muted-color);
  border-top: 1px solid var(--pico-muted-border-color);
  margin-top: 1rem;
}

/* ── Layout ──────────────────────────────────────────────── */
header.container {
  border-bottom: 1px solid var(--pico-muted-border-color);
  margin-bottom: 2em;
}

/* ── Page layout (aside + main) ──────────────────────────── */
.page-layout {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  align-items: start;
}

.mobile-nav {
  display: none;
}

@media (max-width: 768px) {
  .page-layout {
	display: block;
  }

  .side-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
    margin-bottom: 1rem;
  }
}

.side-nav {
  position: sticky;
  top: 1rem;
}

/* ── Bill header (title + follow button side by side) ────── */
.bill-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: var(--pico-spacing);
}

.bill-header h2 {
  margin: 0;
}

/* ── Status badge ─────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .2em .55em;
  border-radius: .3rem;
  font-size: .75em;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  text-transform: capitalize;
  vertical-align: middle;
  background: var(--pico-muted-background-color);
  color: var(--pico-muted-color);
}

.badge[data-status="active"]   { background: #dce8f8; color: #1B3F87; }
.badge[data-status="inactive"] { background: #f4f4f5; color: #52525b; }
.badge[data-status="enrolled"] { background: #eef3fc; color: #2d5bb5; }
.badge[data-status="signed"]   { background: #d1fae5; color: #065f46; }
.badge[data-status="vetoed"]   { background: #fde8e8; color: #C8102E; }

/* ── Notification count pill ─────────────────────────────── */
.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  height: 1.4em;
  padding: 0 .4em;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  background: var(--pico-primary);
  color: var(--pico-primary-inverse);
  vertical-align: middle;
}

/* ── Tables ──────────────────────────────────────────────── */
td form {
  margin: 0;
}

/* Shrink action columns to their content */
td:last-child,
th:last-child {
  width: 1%;
}

/* ── Nav buttons ─────────────────────────────────────────── */
header nav form {
  margin-bottom: 0;
}

header nav button[type="submit"],
header nav button {
  width: auto;
  margin-bottom: 0;
}

/* ── Theme toggle ────────────────────────────────────────── */
.theme-toggle {
  width: auto;
  padding: .25rem .5rem;
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 0;
  background: none;
  border: none;
  box-shadow: none;
  color: inherit;
}

/* ── Buttons ─────────────────────────────────────────────── */
button[type="submit"].small {
  padding: .25rem .75rem;
  font-size: .85rem;
}

a[role="button"] {
	margin-bottom: var(--pico-spacing);
}

/* Unstyled button that looks like a muted inline link */
.link-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--pico-muted-color);
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
}

.link-button:hover {
  color: var(--pico-color);
}
