/* The model bill and where each state stands, on one page (/model-bill). Loaded after map.css. */
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 4px; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--rule2, #CBD3C8); }
.btn.ghost:hover { background: var(--panel); color: var(--ink); text-decoration: none; }
a.btn { display: inline-block; text-decoration: none; }
a.btn:hover { text-decoration: none; }

.bill .why { margin-top: 8px; align-items: start; }
.standing { background: var(--panel); border: 1px solid var(--rule2, #CBD3C8); border-radius: 8px; padding: 4px 18px 14px; font-size: 15px; }
.standing h2 { border-bottom: 0; margin-top: 14px; }
.standing ul { padding-left: 18px; margin: 8px 0 10px; }
.standing li { margin: 5px 0; }
.promises { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px 28px; }
.promises div { font-size: 15px; padding: 10px 0; border-bottom: 1px solid var(--tint); }
.promises b { color: var(--ink); }
.secref { display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: 8px; }
.promises .secref { display: block; margin-bottom: 3px; }

.bill-text { font-family: var(--font-text, var(--font-body)); font-size: 17px; line-height: 1.65; max-width: 74ch; margin-top: 8px; }
.bill-text h3 { font: 700 18px/1.3 var(--font-display); margin: 28px 0 8px; scroll-margin-top: 16px; }
.bill-text .secno { color: var(--accent); }
.bill-text p { margin: 0 0 10px; }
.bill-text p.l1 { margin-left: 1.6em; }
.bill-text p.l2 { margin-left: 3.2em; }
.bill-text .enact { font-weight: 700; margin-top: 18px; }
.bill-text h3:target { background: #FFF4CC; }

.open-score p { margin: 6px 0 10px; font-size: 16px; }
.tally { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.tally div { background: var(--panel); border: 1px solid var(--rule2, #CBD3C8); border-radius: 6px; padding: 8px 10px; font-size: 13.5px; color: var(--text); }
.tally .n { display: block; font: 700 24px/1.1 var(--font-display); color: var(--ink); }
.checks { font-weight: 700; color: var(--ink); white-space: nowrap; font-size: 15px; }

.states-open path.st { stroke: #fff; stroke-width: 1; cursor: pointer; transition: fill .2s; }
.states-open path.st:hover { stroke: var(--ink); stroke-width: 1.6; }
.states-open path.st.on { stroke: var(--ink); stroke-width: 2.4; }
.dcbox rect.on { stroke: var(--ink); stroke-width: 2.4; }
.dcbox text { fill: var(--ink); font-weight: 600; }
.legend .means { flex-basis: 100%; font-size: 13px; }

#panel .statecard, .statecard { display: grid; gap: 10px; }
.statecard .titlerow { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.statecard h3.big { font: 700 22px/1.15 var(--font-display); margin: 0; }
.tests { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tests li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; font-size: 14px; line-height: 1.45; }
.tests .secref { font-size: 10.5px; }
.tests a.cite, .tests span.cite { font-size: 13px; white-space: nowrap; }
.tests .src { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.pill { display: inline-block; text-align: center; font-size: 12px; font-weight: 700; border-radius: 4px; padding: 3px 4px; height: fit-content; }
.pill.meets { background: #2E5E3A; color: #fff; }
.pill.partly { background: #E6DAAE; color: #1B3326; }
.pill.no { background: #8C5A2B; color: #fff; }
.pill.unknown { background: #E4E7E0; color: #4A5A4E; }

#opentable th { cursor: pointer; }
#opentable tbody tr { cursor: pointer; }
#opentable tbody tr:hover td { background: var(--panel); }
#opentable tr.hit td { background: #FFF4CC; }
#opentable td.mark { font-size: 12px; font-weight: 600; text-align: center; }
#opentable td.mark.meets { font-size: 16px; }
#opentable td.mark.meets { color: #2E5E3A; }
#opentable td.mark.partly { color: #8A6D2B; }
#opentable td.mark.no { color: #8C5A2B; background: #F6EDE3; }
#opentable td.mark.unknown { color: #8C9A88; }
.defs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px 28px; font-size: 15px; }

.statecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.statecards .statecard { background: #fff; border: 1px solid var(--rule2, #CBD3C8); border-radius: 8px; padding: 16px; scroll-margin-top: 16px; }
.statecards .statecard:target { box-shadow: 0 0 0 3px #FFE08A; }

@media (max-width: 860px) {
  .bill .why { grid-template-columns: 1fr; }
}

/* "Where does my state stand?" on the model bill page */
.mystate { background: var(--panel); border: 1px solid var(--rule2, #CBD3C8); border-radius: 10px; padding: 6px 20px 14px; margin: 18px 0 8px; }
.mystate h2 { border-bottom: 0; margin-top: 14px; }
.mystate > p { max-width: 72ch; font-size: 15.5px; }
.mystate .pickrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 14px; }
.mystate .pickrow label { font-weight: 600; color: var(--ink); }
.mystate select { font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid var(--rule2, #CBD3C8); border-radius: 6px; background: #fff; min-width: 240px; max-width: 100%; }
.mystate .pickrow select { flex: 1 1 200px; min-width: 0; }
.mystate .mapmain { margin-bottom: 14px; }
.mystate .mapbox { background: #fff; border: 1px solid var(--rule2, #CBD3C8); border-radius: 8px; padding: 10px 12px; }
.mystate .mapbox .controls { margin: 0 0 6px; }
.mystate .panel .pickrow { margin: 0; }
.mystate .statecard[hidden], .mystate [hidden] { display: none; }
.mystate .tallyline { margin: 4px 0 10px; font-size: 15.5px; }
/* on a phone the map and the picker stack: the picker comes first, so your state is the first thing you reach */
@media (max-width: 900px) { .mystate .panel { order: -1; } }

/* the page's four tabs (Your state, Every state, What the bill does, Full text); with no script they stack */
.billtabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--rule2, #CBD3C8); margin: 18px 0 0; scroll-margin-top: 8px; }
.billtabs a { padding: 9px 16px; font-weight: 600; font-size: 15px; color: var(--muted); border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; margin-bottom: -2px; text-decoration: none; }
.billtabs a:hover { color: var(--ink); background: var(--panel); text-decoration: none; }
.billtabs a[aria-selected="true"] { color: var(--ink); background: #fff; border-color: var(--rule2, #CBD3C8); border-bottom: 2px solid #fff; }
.tabpanel { padding-top: 4px; }
.tabpanel[hidden] { display: none; }
.tabpanel > h2:first-child, .tabpanel > .twocol:first-child h2 { margin-top: 18px; }
.bill .mystate { background: none; border: 0; border-radius: 0; padding: 0; margin: 0; }
.bill .gamehead .lede { margin-bottom: 4px; }
details.more { border-top: 1px solid var(--tint); margin-top: 18px; padding-top: 8px; }
details.more summary { cursor: pointer; font: 700 18px/1.3 var(--font-display); color: var(--ink); padding: 6px 0; }
details.more[open] summary { margin-bottom: 8px; }
@media (max-width: 520px) { .billtabs a { padding: 8px 10px; font-size: 14px; } }

/* how one state keeps its law today (/model-bill/arkansas) */
.keptlink { margin: 0; }
.keptpage .lede { max-width: none; }
.kept { border-collapse: collapse; width: 100%; font-size: 16px; line-height: 1.45; margin: 18px 0 8px; }
.kept th { text-align: left; font: 600 12px/1.3 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 16px 8px 0; border-bottom: 2px solid var(--rule); }
.kept td { vertical-align: top; padding: 11px 16px 11px 0; border-bottom: 1px solid var(--tint); }
.kept td:first-child { font-weight: 700; color: var(--ink); white-space: nowrap; }
.kept td:nth-child(3) { width: 38%; }
.kept .pill { min-width: 92px; padding: 3px 8px; }
.kept .whynot { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }
.fixes { padding-left: 20px; margin: 8px 0; }
.fixes li { margin: 8px 0; }
.fixes .secref { margin-left: 4px; white-space: nowrap; }
@media (max-width: 560px) {
  .kept thead { display: none; }
  .kept, .kept tbody, .kept tr, .kept td { display: block; width: auto !important; }
  .kept td { border: 0; padding: 2px 0; }
  .kept tr { padding: 12px 0; border-bottom: 1px solid var(--tint); }
}
