/* Styles shared by every page of the site. */
:root{--ink:#101418;--ink-2:#4f565e;--line:#e1e4e7;--paper:#f7f8f7}
*{box-sizing:border-box}
html,body{margin:0;background:var(--paper);color:var(--ink);font-family:Inter,system-ui,sans-serif;-webkit-font-smoothing:antialiased}
a{color:inherit;text-underline-offset:3px}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* The search bar: a white pill with a round black button. */
.search{display:flex;align-items:center;height:74px;border-radius:37px;padding:0 11px 0 30px;background:#fff;
  border:1px solid var(--line);box-shadow:0 20px 60px rgba(16,20,24,.14)}
.search input{flex:1;min-width:0;border:0;outline:0;background:transparent;font:inherit;font-size:20px;color:var(--ink)}
.search input::placeholder{color:#8a9097}
.search input::-webkit-search-cancel-button{display:none}
.search button{flex:none;width:52px;height:52px;border:0;border-radius:50%;background:var(--ink);color:#fff;display:grid;place-items:center;cursor:pointer}
.search:focus-within{border-color:#9aa1a8}
a:focus-visible,button:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
@media (max-width:640px){.search{height:60px;padding:0 8px 0 20px}.search input{font-size:17px}.search button{width:44px;height:44px}}

/* Inner pages: the same chamber photo and straight fade as the front page, fixed behind the text as it scrolls.
   The fade is stronger than on the front page because these pages hold long lists. */
body.photo{min-height:100vh;display:flex;flex-direction:column;background:#eef0ee url("img/texas-house-chamber.jpg") center 78%/cover fixed}
body.photo .page{flex:1;width:100%}
body.photo::before{content:"";position:fixed;inset:0;background:linear-gradient(180deg,rgba(247,248,247,.95) 0%,rgba(247,248,247,.78) 100%);pointer-events:none}
.page{position:relative;max-width:1240px;padding:28px 64px 40px}
.page .search{width:min(560px,100%);height:52px;padding:0 6px 0 22px;box-shadow:0 8px 30px rgba(16,20,24,.1)}
.page .search input{font-size:16px}.page .search button{width:40px;height:40px}
.page h1{font-family:"Schibsted Grotesk",sans-serif;font-weight:600;font-size:clamp(44px,6.4vw,92px);line-height:1;letter-spacing:-.04em;margin:88px 0 18px}
.otitle{font-size:15px;color:var(--ink-2);margin:0 0 6px;max-width:900px}
.does{font-family:"Schibsted Grotesk",sans-serif;font-weight:500;font-size:24px;letter-spacing:-.01em;line-height:1.3;max-width:820px;margin:0 0 16px}
.meta{display:flex;flex-wrap:wrap;gap:8px 28px;font-size:15px;color:var(--ink-2)}
.meta a{color:var(--ink);text-underline-offset:4px}
.page section{max-width:1040px;margin:44px 0 0}
.lab{margin:0 0 12px;font-size:16px;color:#3d434a}
.names{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:10px 26px}
.names li{font-family:"Schibsted Grotesk",sans-serif;font-weight:500;font-size:17px;line-height:1.6}
.names a{text-decoration:none}.names a:hover{text-decoration:underline;text-underline-offset:4px}
.names.big li{font-size:26px;letter-spacing:-.015em}
.names.cols{display:block;columns:3;column-gap:40px}.names.cols li{break-inside:avoid;margin-bottom:6px}
.plain{margin:0;font-size:16px;color:var(--ink-2)}
.ev{width:100%;border-collapse:collapse;font-size:14px;margin-top:16px}
.ev th{text-align:left;font-weight:500;color:var(--ink-2);padding:8px 16px 8px 0;border-bottom:1px solid rgba(16,20,24,.2)}
.ev td{padding:8px 16px 8px 0;border-top:1px solid rgba(16,20,24,.08);vertical-align:top}
.toggle{background:none;border:0;padding:0;font:inherit;font-family:"Schibsted Grotesk",sans-serif;font-weight:500;font-size:17px;color:var(--ink);text-decoration:underline;text-underline-offset:4px;cursor:pointer}
/* One footer, in the same place on every page: 64px from each side, 30px from the bottom. */
.foot{position:relative;display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:56px 64px 30px;font-size:14px;color:var(--ink-2)}
.foot a{color:var(--ink)}
body.photo .foot{color:var(--ink);font-weight:500}
@media (max-width:900px){.page{padding:20px 16px 32px}.foot{padding:40px 16px 24px}.names.cols{columns:2}.page h1{margin-top:56px}}
@media (max-width:640px){.foot{flex-direction:column}}
@media (max-width:560px){.names.cols{columns:1}.does{font-size:20px}}

/* Group page: law names in four columns (they are short), and the wording a group wrote. */
.names.cols4{display:grid;grid-template-columns:repeat(4,1fr);gap:4px 32px}
.wrote{margin:0 0 22px}
.wname{font-family:"Schibsted Grotesk",sans-serif;font-weight:500;font-size:26px;letter-spacing:-.015em;margin:0 0 4px}
.wrote .plain{display:flex;gap:24px;flex-wrap:wrap;font-size:15px}
.toggle.small{font-family:Inter,sans-serif;font-weight:400;font-size:15px}
.wrote .names{margin-top:12px}
@media (max-width:900px){.names.cols4{grid-template-columns:repeat(2,1fr)}}
/* State page: one row per law, the bill number beside what it does. */
.rows{list-style:none;margin:44px 0 0;padding:0;max-width:1040px}
.rows li{display:grid;grid-template-columns:160px 1fr;gap:24px;padding:14px 0;border-top:1px solid rgba(16,20,24,.1)}
.rows .bill{font-family:"Schibsted Grotesk",sans-serif;font-weight:500;font-size:20px;letter-spacing:-.01em;text-decoration:none}
.rows .bill:hover{text-decoration:underline;text-underline-offset:4px}
.rows p{margin:0;font-size:17px;line-height:1.45}
.rows .from{margin-top:4px;font-size:15px;color:var(--ink-2)}
@media (max-width:560px){.rows li{grid-template-columns:1fr;gap:4px}}
/* All-laws page: the downloads, then one sortable table. */
.dl .names span{font-family:Inter,sans-serif;font-weight:400;font-size:14px;color:var(--ink-2);margin-left:4px}
.all{width:100%;table-layout:fixed;border-collapse:collapse;margin-top:48px;font-size:15px}
.all th{text-align:left;font-weight:400;padding:0 20px 10px 0;border-bottom:1px solid rgba(16,20,24,.3)}
.all th button{background:none;border:0;padding:0;font:inherit;font-size:14px;color:var(--ink-2);cursor:pointer}
.all th button[aria-sort="ascending"]::after{content:" ↑"}.all th button[aria-sort="descending"]::after{content:" ↓"}
.all th button[aria-sort$="ending"]{color:var(--ink);font-weight:500}
.all td{padding:10px 20px 10px 0;border-top:1px solid rgba(16,20,24,.1);vertical-align:top;line-height:1.4}
.all td:nth-child(-n+2){font-family:"Schibsted Grotesk",sans-serif;font-weight:500;font-size:16px;white-space:nowrap}
.all td:nth-child(4){white-space:nowrap;color:var(--ink-2)}
.all td:last-child{font-size:14px;color:var(--ink-2)}
.all td a{text-decoration:none}.all td a:hover{text-decoration:underline;text-underline-offset:3px}
@media (max-width:900px){.all{table-layout:auto}.all th:nth-child(4),.all td:nth-child(4){display:none}}
@media (max-width:560px){.all th:nth-child(5),.all td:nth-child(5){display:none}}
/* Search results: the same lists as the other pages, under a bigger search bar. */
section.first{margin-top:56px}
section.first .rows{margin-top:0}
.results-page .rows li{grid-template-columns:220px 1fr}
.plain.big{margin-top:56px;font-size:20px;color:var(--ink)}
.more{margin-top:16px}
[hidden]{display:none !important}

/* The footer stays fixed at the bottom of the window, in the same spot as on the front page,
   and the lists scroll under it. A short straight fade behind it keeps it readable over the lists. */
.foot{position:fixed;left:0;right:0;bottom:0;z-index:2}
body.photo .foot{padding-top:40px;
  background:linear-gradient(0deg,rgba(247,248,247,.97) 0%,rgba(247,248,247,.97) 45%,rgba(247,248,247,0) 100%)}
body.photo .page{padding-bottom:120px}

/* Inner pages: one row at the top, "Home" on the left and the search bar on the right,
   lined up with the footer's edges (64px from each side). */
.top{position:relative;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:40px 64px 0}
.home-link{flex:none;font-family:"Schibsted Grotesk",sans-serif;font-weight:500;font-size:18px;color:var(--ink);text-decoration:none}
.home-link:hover{text-decoration:underline;text-underline-offset:4px}
.top .search{width:min(560px,100%);height:52px;padding:0 6px 0 22px;box-shadow:0 8px 30px rgba(16,20,24,.1)}
.top .search input{font-size:16px}.top .search button{width:40px;height:40px}
.page{padding-top:0}
.page h1{margin-top:72px}
@media (max-width:900px){.top{padding:20px 16px 0;gap:16px}.page h1{margin-top:48px}}
@media (max-width:560px){.home-link{font-size:16px}.top .search{height:46px;padding-left:16px}.top .search input{font-size:15px}.top .search button{width:36px;height:36px}}
@media (max-width:900px){.all col{width:auto !important}}
@media (max-width:560px){.all td:nth-child(-n+2){white-space:normal;font-size:15px}.all td,.all th{padding-right:12px}.all{font-size:14px}}
/* On phones the footer takes three lines, so the solid part behind it is taller. */
@media (max-width:640px){
  body.photo .foot{padding-top:28px;background:linear-gradient(0deg,rgba(247,248,247,.98) 0%,rgba(247,248,247,.98) 78%,rgba(247,248,247,0) 100%)}
  body.photo .page{padding-bottom:150px}
}
@media (max-width:560px){.results-page .rows li{grid-template-columns:1fr;gap:4px}}
.credit{margin:18px 0 0;font-size:13px;color:var(--ink-2)}
