/* Permits per Year (Robert, 2026-11-07): narrow scrolling grid at left, tall detail panel at right. Grid and page
   frame come from water-systems.css; only the layout and the panel are here. */
.permits-layout{display:grid;grid-template-columns:minmax(440px,560px) 1fr;gap:28px;align-items:start;margin-top:18px}
.permits-master-head{display:flex;align-items:center;gap:10px}
.permits-master-head h2{margin:0 auto 0 0}
.permits-scroll{height:calc(100vh - 260px);min-height:480px;overflow-y:auto}
.permits-scroll thead th{position:sticky;top:0;z-index:1}
.permits-scroll tbody tr{cursor:pointer}
.permits-scroll tbody tr:hover td{background:var(--wash)}
.permits-scroll tbody tr.picked td{background:var(--filter-on);font-weight:700}
.permits-detail{position:sticky;top:12px;min-height:calc(100vh - 220px);padding:6px 0 0 24px;border-left:1px solid var(--rule)}
.permits-detail h2{margin:2px 0 4px;color:var(--title-navy);font:700 28px/1.15 var(--font-title)}
.permits-detail h3{margin:22px 0 4px;color:var(--title-navy);font:700 17px var(--font-title)}
.permits-sub{margin:0 0 10px;color:var(--muted);font-size:13px}
.permits-figures{width:100%;max-width:640px;border-collapse:collapse;font-size:14px;color:var(--ink);font-variant-numeric:tabular-nums}
.permits-figures th{padding:6px 8px;border-bottom:2px solid var(--rule-strong);font-size:11px;letter-spacing:.04em;text-transform:uppercase;text-align:left}
.permits-figures td{padding:6px 8px;border-bottom:1px solid var(--rule)}
.permits-figures .num{text-align:right}
/* Identifiers: one per line, "County FIPS: 001" (Robert, 2026-11-18). */
.permits-ids{display:grid;grid-template-columns:max-content 1fr;gap:0 12px;margin:4px 0 0;font-size:13px;line-height:1.35}
.permits-ids>div{display:contents}
.permits-ids dt{color:var(--muted);font-size:13px}
.permits-ids dt::after{content:":"}
.permits-ids dd{margin:0;color:var(--ink)}
.permits-ids-cols{display:flex;flex-wrap:wrap;gap:6px 48px;align-items:flex-start}
.permits-source{margin:10px 0 0;text-align:right;color:var(--muted);font-size:11px}
@media (max-width:900px){.permits-layout{grid-template-columns:1fr}.permits-detail{position:static;border-left:0;padding-left:0}}
.permits-scroll th:nth-child(2),.permits-scroll td:nth-child(2){text-align:left}
.permits-scroll th:nth-child(3),.permits-scroll td:nth-child(3){text-align:left}
/* Notes tab (temporary, 2026-11-08); tab buttons reuse .wo-tabs from water-systems.css */
.permits-tabs{display:inline-flex;margin-top:14px}
.permits-notes{max-width:820px;margin-top:18px}
.permits-notes h2{margin:0 0 8px;color:var(--title-navy);font:700 22px var(--font-title)}
.permits-notes ol{margin:0;padding-left:22px;color:var(--ink);font-size:15px;line-height:1.5}
.permits-notes li{margin:0 0 10px}
.permits-notes h2+ol+h2,.permits-notes ol+h2{margin-top:28px}
.permits-notes h3{margin:16px 0 4px;color:var(--title-navy);font:700 17px var(--font-title)}
.permits-notes ul{margin:0;padding-left:22px;color:var(--ink);font-size:15px;line-height:1.5}
.permits-notes ul li{margin:0 0 4px}
/* Units Authorized by Year chart in the detail panel (2026-11-08) */
.permits-chart{max-width:820px;margin:14px 0 6px}
.permits-chart-head{display:flex;align-items:center;justify-content:space-between}
.permits-chart-head h3{margin:0}
.permits-chart-note{margin:2px 0 4px;color:var(--blue);font-size:13px}
.permits-chart-key{display:flex;gap:16px;margin:0 0 4px;color:var(--ink);font-size:12px}
.permits-chart-key span{display:inline-flex;align-items:center;gap:5px}
.permits-chart-frame{position:relative}
.permits-chart-frame svg{display:block;width:100%;height:auto}
.permits-grid{stroke:var(--rule);stroke-width:1}
.permits-axis{fill:var(--muted);font:11px var(--font-body)}
.permits-end{fill:var(--ink);font:12px var(--font-body)}
.permits-cross{stroke:var(--muted);stroke-width:1;stroke-dasharray:3 3}
.permits-tip{position:absolute;top:8px;transform:translateX(12px);padding:6px 9px;background:#fff;border:1px solid var(--rule-strong);font-size:12px;color:var(--ink);pointer-events:none;white-space:nowrap}
/* Combinations tab (2026-11-09): scrolls both ways; column labels wrap */
.permits-combos{max-width:720px;margin-top:18px}
.permits-combos-scroll{height:calc(100vh - 300px);min-height:420px;overflow:auto}
.permits-combos-scroll table{min-width:520px}
.permits-combos-scroll thead th{position:sticky;top:0;z-index:1;white-space:normal;vertical-align:bottom;line-height:1.25}
.permits-combos-scroll th:first-child,.permits-combos-scroll td:first-child{position:sticky;left:0;background:#fff;text-align:left}
.permits-combos-scroll thead th:first-child{z-index:2;background:#f7f9f7}
.permits-scroll thead th{white-space:normal;vertical-align:bottom;line-height:1.25}
.permits-scroll{overflow:auto}
/* Narrower Place and County columns on the Data grid (Robert, 2026-11-09); long names wrap */
.permits-layout{grid-template-columns:minmax(380px,440px) 1fr}
.permits-scroll table{table-layout:fixed;width:100%}
.permits-scroll th:nth-child(1),.permits-scroll td:nth-child(1){width:74px}
.permits-scroll th:nth-child(2),.permits-scroll td:nth-child(2){width:150px;white-space:normal}
.permits-scroll th:nth-child(3),.permits-scroll td:nth-child(3){width:90px;white-space:normal}
.permits-scroll th:nth-child(4),.permits-scroll td:nth-child(4){width:76px}
.permits-combos{max-width:520px}
.permits-combos-scroll table{min-width:0;width:100%;table-layout:fixed}
.permits-combos-scroll th:nth-child(1),.permits-combos-scroll td:nth-child(1){width:130px}
/* Detail panel scrolls inside its own box, beside the grid (Robert, 2026-11-09: "It should scroll bars") */
.permits-detail{position:static;min-height:0;height:calc(100vh - 260px);min-height:480px;overflow:auto;padding-right:12px;margin-top:47px}
/* Both sets in one table (2026-11-09) */
.permits-both{max-width:900px}
.permits-both th.grp{text-align:center;border-bottom:1px solid var(--rule);text-transform:none;letter-spacing:0;font-size:12px}
.permits-both .rep{border-left:2px solid var(--rule-strong)}
.permits-both th[rowspan]{vertical-align:bottom}
/* Census Estimate Y/N column (2026-11-09); red comes from the site's .acs-unreliable rule */
.permits-scroll th:nth-child(5),.permits-scroll td:nth-child(5){width:72px;text-align:center;white-space:normal}
.permits-est{text-align:center;font-weight:700}
.permits-layout{grid-template-columns:minmax(440px,500px) 1fr}
/* Data tab (2026-11-09): every column, full page width, scrolls both ways, labels wrap, ID and Place stay put */
.permits-wide{margin-top:18px}
.permits-wide-scroll{height:calc(100vh - 300px);min-height:480px;overflow:auto}
.permits-wide-scroll table{width:max-content;border-collapse:separate;border-spacing:0}
.permits-wide-scroll th{white-space:normal;vertical-align:bottom;line-height:1.25;max-width:110px;min-width:64px}
.permits-wide-scroll th.grp{text-align:center;max-width:none;text-transform:none;letter-spacing:0;font-size:12px}
.permits-wide-scroll thead tr:first-child th{position:sticky;top:0;z-index:2}
.permits-wide-scroll thead tr:nth-child(2) th{position:sticky;top:31px;z-index:2}
.permits-wide-scroll thead th[rowspan]{z-index:3}
.permits-wide-scroll td{white-space:nowrap}
.permits-wide-scroll .stick1{position:sticky;left:0;z-index:1;background:#fff;min-width:70px}
.permits-wide-scroll .stick2{position:sticky;left:70px;z-index:1;background:#fff;min-width:150px;box-shadow:1px 0 0 var(--rule-strong)}
.permits-wide-scroll thead .stick1,.permits-wide-scroll thead .stick2{z-index:4;background:#f7f9f7}
.permits-wide-scroll tr.picked td{background:var(--filter-on)}
.permits-wide-scroll .rep{border-left:2px solid var(--rule-strong)}
.permits-wide-scroll tbody tr{cursor:pointer}
.permits-wide-scroll th:not(.num):not(.grp),.permits-wide-scroll td:not(.num):not(.permits-est){text-align:left}
.permits-wide-scroll th.num{max-width:84px}
/* Data warning under the title (Robert, 2026-11-09: "I need a data warning for this form"); same look as .cc-caution on Child Care. */
/* Data warning up top in the unreliable dark red (Robert, 2026-11-15: "data warning on the page (up top) should be red"). */
.permits-warning{margin:10px 0 0;padding:8px 12px;border-left:4px solid #a61b1b;background:#f3f7f4;color:#a61b1b;font:700 13px/1.45 var(--font-body)}
/* Pager and Total row under the grids (Robert, 2026-11-12): 15 rows a page (shared Pagination), so the boxes size to
   their rows; Total row black and bold with the heavy totals line over it, as on the site's other totals rows. */
.permits-paged{height:auto;min-height:0;max-height:none}
/* Vertical scroll: about 13 rows tall, the header stays put (Robert, 2026-11-18; Site Defaults, Grids). */
.permits-page .permits-paged{max-height:520px;overflow-y:auto}
.permits-find{margin:10px 0 8px}
.permits-find input{width:280px;border-radius:6px}
.permits-find input::-webkit-search-cancel-button{cursor:pointer}
.permits-scroll tfoot td,.permits-wide-scroll tfoot td{border-top:2px solid var(--rule-strong);font-weight:700;color:var(--total-grid-text);background:#fff}
.permits-wide-scroll tfoot td.stick2{white-space:nowrap;font-weight:400}
/* Sortable headings (Robert, 2026-11-12): the Water Systems .wv-sort button; the sorted column's arrow in the medium blue. */
.permits-page .wv-sort i.on{color:var(--blue);font-size:13px;font-weight:700}
.permits-page th.num .wv-sort{justify-content:flex-end}
/* "Permit Details" over the panel, level with the grid's title (Robert, 2026-11-12). */
.permits-layout .permits-detail{margin-top:20px;padding-top:0}
.permits-detail .permits-detail-head{display:flex;align-items:flex-end;min-height:var(--permits-head-h,27px);padding-bottom:10px;margin-bottom:16px;border-bottom:1px solid var(--rule,#c9d6cc)}
.permits-detail .permits-detail-head h2{margin:0;font:700 22px/1.15 var(--font-title)}
.permits-find select{height:34px;border-radius:6px}
/* Download icons in the medium blue (Robert, 2026-11-12). */
.permits-page .download-icon-button{color:var(--blue)}
.permits-page .download-icon-button svg{stroke:currentColor}

/* Summary grid Total row (Robert, 2026-11-13): heavy line above, black bold, calculated label regular. */
.permits-both tfoot td{border-top:2px solid var(--rule-strong);border-bottom:none;font-weight:700;color:var(--total-grid-text)}
.permits-both tfoot .permits-calc{font-weight:400;font-size:11px;color:var(--muted)}
/* Permit Details column (Robert, 2026-11-13: notes and a download control "stranded" at the far right): the notes,
   source lines, chart and identifiers share the Summary grid's 900px width, so each source line ends under its own
   display and the chart's download button sits at the chart's corner. */
.permits-detail .permits-sub,.permits-detail .source-line,.permits-detail .permits-chart,.permits-detail .permits-ids{max-width:900px}
/* Permits by Month (Robert, 2026-11-13/14): area drop-down and building-size buttons over the chart; years with
   checkboxes beside it, like the Cost of Living chart. */
.permits-month{max-width:1240px;margin-top:18px}
.permits-month-controls{display:flex;flex-wrap:wrap;align-items:flex-end;gap:22px;margin:0 0 16px}
.permits-month-area{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:700;color:var(--forest)}
.permits-month-area select{height:36px;padding:0 10px;border:1px solid #6b7f73;border-radius:6px;font:14px var(--font-body);min-width:220px}
.permits-month-measures{display:flex;gap:8px;flex-wrap:wrap}
.permits-month-body{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:18px;align-items:start}
.permits-month-frame{max-width:none}
.permits-month-years{max-height:390px;overflow-y:auto;border-left:1px solid var(--rule);padding-left:12px;font-size:13px;color:var(--ink)}
.permits-month-years label{display:flex;align-items:center;gap:6px;padding:2px 0;cursor:pointer}
.permits-month-years i{display:inline-block;width:16px;height:3px;border-radius:2px}
.permits-month-all{font-weight:700;border-bottom:1px solid var(--rule);margin-bottom:4px;padding-bottom:4px!important}
.permits-month-part{color:var(--muted);font-size:11px}
@media (max-width:760px){.permits-month-body{grid-template-columns:1fr}.permits-month-years{border-left:0;padding-left:0;max-height:none}}
/* Line between the graphs: thin (Robert, 2026-11-29: "lighten the horizontal line. It's too heavy"); was 3px dark. */
.permits-sizes{margin-top:34px;padding-top:18px;border-top:1px solid var(--rule)}
/* Controls on a Chart / Data tab row, at the right, sitting just above the tab line (2026-11-29). */
.permits-tabs-row{display:flex;align-items:flex-end;border-bottom:3px solid var(--blue);margin:8px 0 10px}
.permits-tabs-row .wo-tabs.permits-chart-tabs{border-bottom:0;margin:0}
.permits-tab-extra{margin-left:auto;padding-bottom:6px}
.permits-tab-extra .permits-sizes-range{margin:0}
.permits-sizes-year{margin-bottom:10px}
.permits-sizes-year select{min-width:0;width:100%}
.permits-sizes-range{margin:0 0 12px}
.permits-sizes-year{align-items:stretch!important;flex-direction:column}
/* Permits by Month popup (county page) */
.permits-month-open{margin:6px 0 10px}
.permits-popup-overlay{position:fixed;inset:0;z-index:1000;padding:3vh 2vw;display:flex;justify-content:center;align-items:flex-start;background:rgb(6 27 42 / 56%);overflow-y:auto}
.permits-popup{width:min(1320px,100%);background:var(--page-bg,#fff);border:1px solid var(--rule-strong);padding:18px 28px 28px}
.permits-popup-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;border-bottom:2px solid var(--rule-strong);padding-bottom:10px;margin-bottom:6px}
.permits-popup-head .eyebrow{margin:0 0 4px}
.permits-popup-sub{margin:0;color:var(--muted)}
.permits-popup-sub a{color:var(--blue);font-weight:700;margin-left:6px}
/* Subtotals tab (county page) */
.permits-subtotals{max-height:560px;overflow:auto;max-width:900px;border-bottom:1px solid var(--rule)}
.permits-subtotals thead th{position:sticky;background:#f7f9f7;z-index:1}
.permits-subtotals thead tr:first-child th{top:0}
.permits-subtotals thead tr:nth-child(2) th{top:29px}
.permits-subtotals tfoot td{position:sticky;bottom:0;background:#fff;border-top:2px solid var(--rule-strong);font-weight:700}
.permits-sub-county td{font-weight:700;background:var(--wash);border-top:1px solid var(--rule-strong)}
.permits-sub-fips{font-weight:400;color:var(--muted);font-size:12px;margin-left:6px}
.permits-sub-size td:first-child{padding-left:28px}
.permits-sub-actions{display:flex;align-items:center;gap:12px}
@media print{
  body:has(.permits-sub-report) header:not(.water-hero):not(.permits-master-head),body:has(.permits-sub-report) nav,body:has(.permits-sub-report) footer,.permits-tabs,.permits-sub-report .permits-find,.permits-sub-actions,.beta-watermark,[class*=watermark]{display:none!important}
  .permits-subtotals{max-height:none;overflow:visible;max-width:none;border:0}
  .permits-subtotals thead th,.permits-subtotals tfoot td{position:static}
  .permits-subtotals thead{display:table-header-group}
  .permits-subtotals tfoot{display:table-row-group}
  .permits-sub-group{break-inside:avoid}
  .permits-sub-report .permits-both{max-width:none;font-size:11px}
  .permits-sub-report .permits-both td,.permits-sub-report .permits-both th{padding:2px 8px}
  body:has(.permits-sub-report) .page-download-top{display:none!important}
  .permits-sub-county td{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  @page{margin:12mm}
}
.permits-sub-table{max-width:720px}
.permits-sub-table td,.permits-sub-table th{padding:4px 10px}
.permits-sub-totcol{border-left:2px solid var(--rule-strong)}
.permits-subtotals:has(.permits-sub-table){max-width:720px}
@media print{.permits-sub-report .permits-sub-table td,.permits-sub-report .permits-sub-table th{padding:1px 10px}}
.permits-sub-table .permits-sub-size td:first-child{padding-left:30px}
.permits-sub-table,.permits-subtotals:has(.permits-sub-table){max-width:980px}
/* Subtotals: full width, no inner scroll (Robert, 2026-11-14: "make it wide enough to remove scroll bar") */
.permits-subtotals,.permits-subtotals:has(.permits-sub-table){max-height:none;overflow:visible;max-width:none;border-bottom:0}
.permits-sub-table{max-width:none;width:auto}
.permits-sub-table th{white-space:nowrap}
.permits-sub-table th .wv-sort{font:inherit;text-transform:inherit;letter-spacing:inherit;color:inherit}
.permits-subtotals thead th{top:0}
/* Folder tabs (Robert, 2026-11-14: "the buttons should be tab pages"; Site Defaults tab look: Methodologies tabs a touch smaller) */
.wo-tabs.permits-tabs{display:flex;flex-wrap:wrap;align-items:flex-end;gap:2px;margin:14px 0 8px;padding-left:4px;border:0;border-bottom:3px solid var(--blue)}
.wo-tabs.permits-tabs button{height:32px;padding:0 24px;border:0;background:#dde5ef;color:var(--blue);font:700 13px var(--font-body);cursor:pointer;clip-path:polygon(12px 0,calc(100% - 12px) 0,100% 100%,0 100%)}
.wo-tabs.permits-tabs button:hover{background:#cbd7e6}
.wo-tabs.permits-tabs button.on{background:var(--blue);color:#fff}
.wo-tabs.permits-tabs button:focus-visible{outline:3px solid #ffca45;outline-offset:-3px}
/* Notes tab lines up with the other tabs' top left corner (Robert, 2026-11-14) */
.permits-notes{margin-top:30px}
.permits-notes > ol{padding-left:0}
/* Cautions tab in the unreliable dark red (Robert, 2026-11-15: "notes tab should say cautions. and be red"): red label,
   red fill with a white label when picked. */
.wo-tabs.permits-tabs button.permits-tab-caution{color:#a61b1b}
.wo-tabs.permits-tabs button.permits-tab-caution.on{background:#a61b1b;color:#fff}
/* All Permits on Record buttons under the Data tab's grid (Robert, 2026-11-15). */
.permits-on-record{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:14px 0 0}
.permits-on-record-label{font:700 12px var(--font-body);color:var(--forest)}
.permits-on-record .secondary-button{display:inline-flex;align-items:center;text-decoration:none}

/* Title over the lower (1 to 4 units) chart (2026-11-18). */
.permits-panel-title{margin:18px 0 6px}

/* Chart / Data tabs over each Permits by Month chart (2026-11-18). */
.wo-tabs.permits-chart-tabs{margin:8px 0 10px}
.permits-chart-data .grid-scroll-13 table{width:100%}
/* Numbers right-aligned with even-width digits, headers over them too (Robert, 2026-11-29: "the numbers are left
   alligned!"); the first column (Year or Month) stays left. */
.permits-chart-data :is(td,th).num{text-align:right;font-variant-numeric:tabular-nums}
.permits-chart-data :is(td,th):first-child{text-align:left}
.permits-chart-data-note{margin:6px 0 0;color:var(--muted);font-size:12px}
.permits-panel-title-top{margin-top:4px}
/* A line between the two halves of a split chart (2026-11-18: "separation lines between graphs need to be bolder"). */
.permits-panel-title:not(.permits-panel-title-top){padding-top:14px;border-top:1px solid var(--rule-strong)}
.permits-split-row + .permits-split-row{margin-top:6px}
/* The average line on each chart (2026-11-18). */
.permits-mean-label{fill:#000;font:700 11px var(--font-body)}
.permits-legend-year{margin:0 0 6px;font:700 14px var(--font-body);text-decoration:underline;color:var(--ink)}
/* The lower legend level with the lower chart title (2026-11-18). */
.permits-legend-lower{margin-top:32px}

/* Private Sector Jobs and Jobs by Industry pages (2026-11-19). */
.county-jobs-page .county-jobs-pick{margin:18px 0 14px}
.county-jobs-page .county-jobs-panel .ue-private-jobs-panel,.county-jobs-page .county-jobs-panel .ue-jobs-panel{width:100%;max-width:none}

/* Crimes page: wide grids scroll sideways; the agency grid sits below the county grid (2026-11-19). */
.crimes-grid .water-grid-scroll{overflow:auto}
.crimes-grid table{min-width:1500px}
.crimes-grid th{white-space:nowrap}
.crimes-agency-grid{margin-top:40px}

/* Police Agencies by County: map left, grid right (2026-11-19). */
.police-cols{display:flex;gap:28px;align-items:flex-start;flex-wrap:wrap;margin-top:12px}
.police-map{flex:0 0 760px;max-width:100%}
.police-map-frame{border:1px solid var(--rule-strong)}
.police-how{margin:0 0 8px;color:var(--blue);font-weight:700;font-size:13px}
.police-grid{flex:1 1 560px;min-width:0}
.police-grid table{width:100%}

/* Law Enforcement Agencies: map on top, full-width grid, agency chart below (2026-11-19). */
.police-page .police-map{max-width:900px;margin:0 auto 24px}
.police-page .police-grid,.police-page .police-history{width:100%;margin-top:18px}
.police-grid-scroll{max-height:760px;overflow:auto}
.police-grid-scroll thead th{position:sticky;top:0;background:#f7f9f7;z-index:1}
.police-grid-scroll td,.police-grid-scroll th{white-space:nowrap}
.police-short{color:#b35900}
.police-chart{margin-top:8px}
.police-grid-scroll td:not(.num),.police-grid-scroll th:not(.num){text-align:left}
.police-county-row td{background:#f3f7f4;border-top:1px solid var(--rule-strong);font-weight:700}
.police-county-row.picked td,.police-agency-row.picked td{background:var(--filter-on);color:#000}
/* Picked county on the map in the same gold as the picked grid row (Robert, 2026-11-23) */
.police-map-frame .ha-ny-map g.selected path:not(.hit-target){fill:var(--filter-on)!important;stroke:#082f21;stroke-width:2.5}
#site .police-map-frame .ha-county-labels g.selected :is(text,tspan){fill:#000!important;stroke:none!important}
.police-indent{padding-left:22px !important}
.police-tree-cell{width:34px}
.police-count{font-weight:400;color:var(--muted)}
