/* Permits and filings. Tokens, buttons, the drawn drop-down and scrollbars come from shell.css.
   Rebuilt 2026-11-18 as a search directory: one search box with suggestions, a bar of filters that carry
   their counts, the list beside a map, and each record folding open under its row.
   Order: page, search, bar, pop-over, heading, list, record, side, full-record page, narrow screens. */

.permit-page { --pm-top: calc(var(--bar) + var(--pm-bar-h, 58px)); max-width: 2240px; padding-top: 28px; font-size: 14.5px; }
.permit-page button { font: inherit; }
.source-note { margin: 8px 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.permit-page > .source-note { max-width: 980px; margin-top: 28px; }
.not-reported { color: #9AA19C; font-weight: 400; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
#permit-error { margin: 16px 0; padding: 12px 16px; border-radius: 10px; background: #FBEDE8; color: var(--warn); font-weight: 600; }
.work-key { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--w-general)); }
[data-c=manhattan] { --c: #244D3D; }
[data-c=brooklyn] { --c: #E0A21C; }
[data-c=queens] { --c: #3F6F96; }
[data-c=bronx] { --c: #B5462C; }
[data-c=staten-island] { --c: #86B46F; }
[data-c=new] { --c: var(--w-new); }
[data-c=ground] { --c: var(--w-ground); }
[data-c=structure] { --c: var(--w-structure); }
[data-c=general] { --c: var(--w-general); }
[data-c=protect] { --c: var(--w-protect); }
[data-c=systems] { --c: var(--w-systems); }
[data-c=demo] { --c: var(--w-demo); }

/* ---------- Search ---------- */

.pm-hero { z-index: 6; overflow: visible; min-height: 0; margin-bottom: 14px; padding: 26px 290px 22px 32px; }
.pm-hero .tool-banner-art { bottom: 0; right: 30px; width: 214px; }
.pm-hero > p { margin-top: 6px; font-size: 15px; }
.pm-search { position: relative; max-width: 760px; margin-top: 18px; }
.cic-page .pm-search input {
  width: 100%;
  height: 54px;
  padding: 0 84px 0 50px;
  border: 0;
  border-radius: 13px;
  background: var(--panel);
  box-shadow: 0 0 0 1px rgba(12, 26, 21, .12), 0 1px 2px rgba(12, 26, 21, .06), 0 10px 24px -12px rgba(120, 84, 10, .35);
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  transition: box-shadow var(--t-2) var(--ease);
}
.cic-page .pm-search input::placeholder { color: #7A847E; font-weight: 400; }
.cic-page .pm-search input:hover { box-shadow: 0 0 0 1px rgba(12, 26, 21, .2), 0 1px 2px rgba(12, 26, 21, .06), 0 12px 26px -12px rgba(120, 84, 10, .4); }
.cic-page .pm-search input:focus { outline: none; box-shadow: 0 0 0 2px var(--forest), 0 0 0 5px rgba(63, 149, 80, .24), 0 12px 26px -12px rgba(120, 84, 10, .4); }
.pm-search-icon { position: absolute; left: 17px; top: 17px; color: var(--forest); pointer-events: none; }
.pm-search-key, .pm-sug kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: #F1F0EC;
  box-shadow: inset 0 0 0 1px rgba(12, 26, 21, .1), inset 0 -1px 0 rgba(12, 26, 21, .1);
  color: var(--ink-2);
  font: 600 12px/1 var(--sans);
}
.pm-search-key { position: absolute; right: 16px; top: 16px; pointer-events: none; transition: opacity var(--t-1) var(--ease); }
.pm-search input:focus ~ .pm-search-key, .pm-search-clear:not([hidden]) ~ .pm-search-key { opacity: 0; }
.pm-search-clear {
  position: absolute;
  right: 12px;
  top: 11px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  transition: background-color var(--t-1) var(--ease), color var(--t-1) var(--ease);
}
.pm-search-clear:hover { background: var(--concrete-50); color: var(--ink); }
.pm-search-clear[hidden] { display: none; }

.pm-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  max-height: min(64vh, 560px);
  overflow: auto;
  padding: 6px;
  border-radius: 13px;
  background: var(--panel);
  box-shadow: var(--e3);
  animation: pm-pop-in var(--t-2) var(--out) both;
}
.pm-suggest[hidden] { display: none; }
.cic-page .pm-sug-head { margin: 8px 0 2px; padding: 0 10px; color: var(--ink-2); font-size: 11.5px; line-height: 1.6; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.pm-sug {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  text-align: left;
  transition: background-color var(--t-1) var(--ease);
}
.pm-sug svg { color: var(--ink-2); }
.pm-sug span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-sug b { font-weight: 800; }
.pm-sug small { color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm-sug:hover, .pm-sug[aria-selected=true] { background: #EEF3EF; }
.pm-sug[aria-selected=true] svg { color: var(--forest); }

.pm-starts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 980px; margin-top: 14px; }
.pm-starts > span { flex: none; white-space: nowrap; margin-right: 4px; color: #6B6046; font-size: 13px; font-weight: 600; }
.pm-starts button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  box-shadow: inset 0 0 0 1px rgba(120, 84, 10, .18);
  color: #3D3A2C;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color var(--t-1) var(--ease), box-shadow var(--t-2) var(--ease), color var(--t-1) var(--ease), transform var(--t-1) var(--ease);
}
.pm-starts button:hover { background: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(120, 84, 10, .3), 0 4px 10px -4px rgba(120, 84, 10, .35); }
.pm-starts button:active { transform: translateY(1px); }
.pm-starts button[aria-pressed=true] { background: var(--forest); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); color: var(--on-forest); }

/* ---------- The filter bar ---------- */

.pm-bar {
  position: sticky;
  top: var(--bar);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 -10px 6px;
  padding: 10px;
  border-radius: 0 0 14px 14px;
  background: rgba(241, 240, 236, .88);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
}
.pm-bar .seg { padding: 3px; gap: 2px; border-radius: 10px; }
.pm-bar .seg button { min-height: 30px; min-width: 0; padding: 0 12px 1px; font-size: 14px; gap: 6px; }
.pm-bar .seg small { color: var(--ink-2); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pm-bar .seg [aria-pressed=true] small { color: #5F7A6D; }
.pm-pills { display: contents; }
.pm-pill { display: inline-flex; border-radius: 10px; background: var(--panel); box-shadow: var(--e1); transition: box-shadow var(--t-2) var(--ease), background-color var(--t-2) var(--ease); }
.pm-pill:hover { box-shadow: var(--e2); }
.pm-pill-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  max-width: 260px;
  padding: 0 11px 0 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pm-pill-main span { overflow: hidden; text-overflow: ellipsis; }
.pm-pill-main svg { flex: none; color: var(--ink-2); transition: transform var(--t-2) var(--out), color var(--t-1) var(--ease); }
.pm-pill-main[aria-expanded=true] svg { transform: rotate(180deg); color: var(--forest); }
.pm-pill:has([aria-expanded=true]) { box-shadow: 0 0 0 1.5px var(--forest), var(--ring); }
.pm-pill.is-on { background: #E2EDE5; box-shadow: 0 0 0 1px rgba(36, 77, 61, .34); }
.pm-pill.is-on .pm-pill-main { padding-right: 6px; color: var(--forest-deep); font-weight: 700; }
.pm-pill.is-on .pm-pill-main svg { color: var(--forest); }
.pm-pill-x, .pm-chip button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: 5px 5px 5px 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--forest);
  transition: background-color var(--t-1) var(--ease);
}
.pm-pill-x:hover, .pm-chip button:hover { background: rgba(36, 77, 61, .14); }
.pm-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px 0 10px;
  border: 0;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--e1);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: box-shadow var(--t-2) var(--ease), background-color var(--t-2) var(--ease);
}
.pm-toggle:hover { box-shadow: var(--e2); }
.pm-toggle i { position: relative; width: 28px; height: 16px; border-radius: 999px; background: #C9CEC9; transition: background-color var(--t-2) var(--ease); }
.pm-toggle i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(12, 26, 21, .3); transition: transform var(--t-2) var(--out); }
.pm-toggle small { color: var(--ink-2); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pm-toggle[aria-pressed=true] { background: #E2EDE5; box-shadow: 0 0 0 1px rgba(36, 77, 61, .34); color: var(--forest-deep); font-weight: 700; }
.pm-toggle[aria-pressed=true] i { background: var(--forest); }
.pm-toggle[aria-pressed=true] i::after { transform: translateX(12px); }
.pm-bar-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.pm-sort { display: block; width: 204px; }
.pm-sort .sel-btn, .cic-page .pm-sort select { height: 36px; min-height: 36px; border-radius: 10px; box-shadow: var(--e1); font-size: 14.5px; }
.pm-sort .sel-btn:hover { box-shadow: var(--e2); }
.pm-display { display: none; }
.pm-notice { margin: 4px 0 10px; padding: 11px 16px; border-radius: 10px; background: #FFF6DC; box-shadow: inset 0 0 0 1px rgba(217, 154, 20, .4); color: #5A4308; font-size: 14.5px; }

/* ---------- Filter pop-over ---------- */

.pm-pop {
  position: fixed;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: 320px;
  padding: 6px;
  border-radius: 13px;
  background: var(--panel);
  box-shadow: var(--e3);
  font-size: 14.5px;
  opacity: 0;
  transform: translateY(-4px) scale(.985);
  transform-origin: top left;
  transition: opacity var(--t-2) var(--out), transform var(--t-2) var(--out);
}
.pm-pop[hidden] { display: none; }
.pm-pop.is-in { opacity: 1; transform: none; }
.pm-pop[data-facet=status] { width: 380px; }
.pm-opts { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.pm-opt {
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 4px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: background-color var(--t-1) var(--ease);
}
.pm-opt:hover { background: #F1F0EC; }
.pm-opt > span, .pm-opt > b, .pm-opt > .pm-check { position: relative; }
.pm-opt > b { color: var(--ink-2); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pm-opt-bar { position: absolute; left: 0; top: 3px; bottom: 3px; min-width: 0; border-radius: 7px; background: rgba(36, 77, 61, .075); transition: width var(--t-3) var(--out); }
.pm-check { width: 16px; height: 16px; border-radius: 5px; background: #FFFFFF; box-shadow: inset 0 0 0 1.5px #A3ABA5; transition: background-color var(--t-1) var(--ease), box-shadow var(--t-1) var(--ease); }
.pm-opt.is-radio .pm-check { border-radius: 50%; }
.pm-opt[aria-checked=true] { font-weight: 700; }
.pm-opt[aria-checked=true] .pm-check {
  background: var(--forest) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.3 2.7 2.7L12 5.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
  box-shadow: none;
}
.pm-opt.is-radio[aria-checked=true] .pm-check { background: #FFFFFF; box-shadow: inset 0 0 0 5px var(--forest); }
.pm-opt-head { margin: 8px 0 2px; padding: 0 10px; color: var(--ink-2); font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.pm-opt-none { margin: 0; padding: 14px 10px; color: var(--ink-2); }
.pm-pop-find { display: block; padding: 2px 2px 6px; }
.cic-page .pm-pop input[type=text], .pm-dates input {
  width: 100%;
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px #BFC4BE;
  color: var(--ink);
  font: 500 14.5px/1.2 var(--sans);
}
.cic-page .pm-pop input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--forest), var(--ring); }
.pm-pop[data-facet=when] { width: 372px; }
.pm-dates label { min-width: 0; }
.pm-dates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 8px; margin-top: 6px; padding: 10px 6px 4px; border-top: 1px solid #ECEAE4; }
.cic-page .pm-dates label > span { display: block; margin-bottom: 4px; color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.pm-pop-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; padding: 8px 4px 2px 10px; border-top: 1px solid #ECEAE4; }
.pm-link { padding: 0; border: 0; background: none; color: var(--forest); font-weight: 700; text-align: left; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color var(--t-1) var(--ease); }
.pm-link:hover { text-decoration-color: currentColor; }
.pm-link[disabled] { color: #9AA19C; cursor: default; text-decoration: none; }
@keyframes pm-pop-in { from { opacity: 0; transform: translateY(-4px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- Heading over the list ---------- */

.pm-body { display: grid; grid-template-columns: minmax(0, 1fr) clamp(360px, 31vw, 640px); gap: 24px; align-items: start; }
.pm-results { min-width: 0; }
.pm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; min-height: 52px; margin: 8px 0 12px; }
.cic-page .pm-head h2 { font-size: 25px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pm-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.pm-head-actions { display: flex; align-items: center; gap: 14px; }
.pm-head-actions .btn[hidden] { display: none; }
.pm-clear { padding: 0; border: 0; background: none; color: var(--forest); font-size: 14.5px; font-weight: 700; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color var(--t-1) var(--ease); }
.pm-clear:hover { text-decoration-color: currentColor; }
.pm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -2px 0 12px; }
.pm-chips[hidden] { display: none; }
.pm-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding-left: 11px; border-radius: 9px; background: #E2EDE5; box-shadow: 0 0 0 1px rgba(36, 77, 61, .3); color: var(--forest-deep); font-size: 14px; font-weight: 700; animation: pm-pop-in var(--t-2) var(--out) both; }
.pm-chip small { color: #4E6B5D; font-size: 12.5px; font-weight: 600; }
.pm-chip button { margin: 3px 3px 3px 0; }

/* ---------- The list ---------- */

.pm-list {
  --cols: minmax(0, 1.25fr) minmax(0, 1.45fr) minmax(0, 1.1fr) 92px 108px 22px;
  position: relative;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--e1);
}
.pm-cols, .pm-row { display: grid; grid-template-columns: var(--cols); align-items: center; column-gap: 18px; padding: 0 12px 0 16px; }
.pm-cols {
  position: sticky;
  top: var(--pm-top);
  z-index: 2;
  height: 38px;
  border-bottom: 1px solid var(--rule);
  border-radius: 14px 14px 0 0;
  background: #F7F6F2;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pm-cols button { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: inherit; letter-spacing: inherit; text-transform: inherit; transition: color var(--t-1) var(--ease); }
.pm-cols button:hover, .pm-cols button[data-on=true] { color: var(--ink); }
.pm-cols button[data-on=true]::after { content: ""; width: 5px; height: 5px; margin-top: -3px; border-right: 2px solid var(--forest); border-bottom: 2px solid var(--forest); transform: rotate(45deg); }
.pm-cols button[data-on=true][data-dir=asc]::after { margin-top: 3px; transform: rotate(225deg); }
.pm-progress { position: absolute; left: 14px; right: 14px; top: 0; z-index: 3; height: 2px; overflow: hidden; border-radius: 2px; opacity: 0; transition: opacity var(--t-2) var(--ease) .1s; }
.pm-progress::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; border-radius: 2px; background: var(--leaf); animation: pm-slide 1s var(--ease) infinite; }
.pm-list.is-loading .pm-progress { opacity: 1; }
#pm-rows { transition: opacity var(--t-2) var(--ease); }
.pm-list.is-loading #pm-rows { opacity: .55; transition-delay: .12s; }
@keyframes pm-slide { to { left: 100%; } }

/* A row is two lines tall. Cost and date share the first line; the status runs under both. */
.pm-row { grid-template-rows: auto auto; row-gap: 1px; min-height: 58px; padding-top: 9px; padding-bottom: 9px; border-bottom: 1px solid #ECEAE4; cursor: pointer; transition: background-color var(--t-1) var(--ease); }
.pm-row > .pm-c { grid-row: 1 / 3; }
.pm-row > .pm-c-fig, .pm-row > .pm-c-date { grid-row: 1; align-self: end; }
.pm-row > .pm-c-status { grid-row: 2; grid-column: 4 / 6; align-self: start; overflow: hidden; color: var(--ink-2); font-size: 13px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
#pm-rows > :last-child { border-bottom: 0; border-radius: 0 0 14px 14px; }
.pm-row:hover { background: #FAF9F6; }
.pm-row:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--leaf); }
.pm-row.is-open { background: #F4F3EE; border-bottom-color: transparent; }
.pm-row.is-pinned { box-shadow: inset 3px 0 0 var(--amber); }
.pm-c { min-width: 0; }
.pm-c-place { display: flex; align-items: flex-start; gap: 10px; }
.pm-c-place .work-key { margin-top: 5px; }
.pm-two { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pm-two > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-two strong { color: var(--ink); font-size: 15.5px; font-weight: 700; letter-spacing: -.005em; }
.pm-two small { color: var(--ink-2); font-size: 13px; }
.pm-main { color: #2B3530; font-size: 14.5px; }
.pm-c-fig { color: var(--ink); font-size: 15px; font-weight: 700; white-space: nowrap; }
.pm-c-fig.is-large { color: var(--forest); }
.pm-c-date { color: #2B3530; font-size: 14px; white-space: nowrap; }
.pm-row mark, .pm-rec mark { padding: 0 1px; border-radius: 3px; background: rgba(242, 177, 46, .42); color: inherit; }
.pm-phone-only { display: none; }
.pm-chev { display: grid; place-items: center; }
.pm-chev i { width: 7px; height: 7px; margin-top: -4px; border-right: 2px solid var(--edge); border-bottom: 2px solid var(--edge); transform: rotate(45deg); transition: transform var(--t-3) var(--out), border-color var(--t-2) var(--ease), margin var(--t-3) var(--out); }
.pm-row:hover .pm-chev i { border-color: var(--forest); }
.pm-row.is-open .pm-chev i { margin-top: 4px; border-color: var(--forest); transform: rotate(225deg); }
.pm-row[aria-busy=true] .pm-chev i { animation: pm-wait .7s ease-in-out infinite alternate; }
@keyframes pm-wait { to { opacity: .25; } }
.pm-row.is-ghost { cursor: default; pointer-events: none; }
.pm-row.is-ghost i { display: block; width: 70%; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #ECEAE4 0%, #F6F5F1 50%, #ECEAE4 100%) 0 0 / 200% 100%; animation: pm-shimmer 1.2s linear infinite; }
.pm-row.is-ghost .pm-c:nth-child(2) i { width: 86%; }
.pm-row.is-ghost > .pm-c { grid-row: 1 / 3; align-self: center; }
.pm-row.is-ghost .pm-c:nth-child(4) i, .pm-row.is-ghost .pm-c:nth-child(5) i { width: 60%; margin-left: auto; }
@keyframes pm-shimmer { to { background-position: -200% 0; } }

.pm-empty { padding: 44px 24px 48px; text-align: center; }
.pm-empty[hidden] { display: none; }
.cic-page .pm-empty h3 { font-size: 19px; }
.pm-empty p { margin: 8px 0 16px; color: var(--ink-2); }
.pm-relax { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 18px; }
.pm-relax button { display: inline-flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--panel); box-shadow: var(--e1); color: var(--ink); font-weight: 600; transition: box-shadow var(--t-2) var(--ease); }
.pm-relax button:hover { box-shadow: var(--e2); }
.pm-relax b { color: var(--forest); font-variant-numeric: tabular-nums; }
.pm-more { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.pm-more .btn[hidden] { display: none; }
.pm-more p { margin: 0; color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---------- The record, folded under its row ---------- */

.pm-fold { display: grid; grid-template-rows: 0fr; border-bottom: 1px solid var(--rule); background: #F4F3EE; transition: grid-template-rows .36s var(--out); }
.pm-fold.is-open { grid-template-rows: 1fr; }
.pm-fold-in { min-height: 0; overflow: hidden; }
.pm-fold-body { padding: 4px 14px 16px; opacity: 0; transform: translateY(-6px); transition: opacity .28s var(--ease) .05s, transform .36s var(--out); }
.pm-fold.is-open .pm-fold-body { opacity: 1; transform: none; }
.pm-fold.is-still, .pm-fold.is-still .pm-fold-body { transition: none; }
.pm-fold-body.is-swapping { opacity: .5; }
.pm-fold-body.is-page { padding: 0; opacity: 1; transform: none; }
.pm-rec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 14px; }
.pm-rec-main { grid-column: 1 / -1; }
.pm-rec-main, .pm-rec-card { min-width: 0; padding: 16px 18px; border-radius: 12px; background: var(--panel); box-shadow: var(--e1); }
.pm-rec-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 10px; }
.pm-rec-status strong { font-size: 16px; }
.pm-rec-status span { color: var(--ink-2); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.pm-rec-desc { max-width: 76ch; margin: 0 0 16px; color: #2F3934; font-size: 15px; line-height: 1.55; }
.pm-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px 18px; margin: 0; }
.pm-facts div { min-width: 0; }
.pm-facts dt { color: var(--ink-2); font-size: 12.5px; }
.pm-facts dd { margin: 1px 0 0; font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.pm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pm-rec-card { padding: 14px 10px 8px; }
.pm-rec-card h4 { display: flex; align-items: center; gap: 8px; margin: 0 8px 8px; color: var(--ink-2); font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.pm-rec-card h4 b, .pm-pill-main b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #E2EDE5; color: var(--forest-deep); font-size: 12px; font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.pm-pill-main b { background: var(--forest); color: var(--on-forest); }
.pm-dot { display: inline-block; width: 3px; height: 3px; margin: 0 7px; border-radius: 50%; background: currentColor; opacity: .55; vertical-align: middle; }
.pm-rel { margin: 0; padding: 0; list-style: none; max-height: 420px; overflow: auto; }
.is-page .pm-rel { max-height: none; }
.pm-rel button { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; transition: background-color var(--t-1) var(--ease); }
.pm-rel button:hover { background: #F1F0EC; }
.pm-rel button[aria-current=true] { background: #E2EDE5; }
.pm-rel-main { display: flex; flex-direction: column; min-width: 0; }
.pm-rel-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-rel strong { font-size: 14px; font-weight: 700; }
.pm-rel small { color: var(--ink-2); font-size: 12.5px; }
.pm-rel-fig { display: flex; flex-direction: column; align-items: flex-end; color: #2B3530; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm-rel-more { margin: 6px 8px 8px; color: var(--ink-2); font-size: 13.5px; }
.pm-rel-more a { font-weight: 700; }

/* ---------- Map and breakdown ---------- */

.pm-side { position: sticky; top: calc(var(--pm-top) + 8px); display: grid; gap: 14px; max-height: calc(100dvh - var(--pm-top) - 20px); margin-top: 8px; padding: 1px; overflow: auto; overscroll-behavior: contain; scrollbar-width: none; }
.pm-side::-webkit-scrollbar { display: none; }
.pm-map-card { position: relative; overflow: hidden; border-radius: 14px; background: var(--panel); box-shadow: var(--e1); }
#permit-map { height: clamp(280px, 42vh, 560px); }
#permit-map .maplibregl-ctrl-attrib { font-size: 11.5px; }
#permit-map .maplibregl-ctrl-group { overflow: hidden; border-radius: 9px; box-shadow: var(--e2); }
.pm-area { position: absolute; left: 50%; top: 12px; z-index: 3; min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--forest); box-shadow: var(--e2); color: var(--on-forest); font-size: 13.5px; font-weight: 700; transform: translateX(-50%); animation: pm-area-in var(--t-3) var(--out) both; transition: background-color var(--t-1) var(--ease); }
.pm-area[hidden] { display: none; }
.pm-area:hover { background: #2E5E4B; }
@keyframes pm-area-in { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translateX(-50%); } }
.pm-map-status { min-height: 36px; margin: 0; padding: 9px 14px; color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.pm-popup { font: 13.5px/1.4 var(--sans); }
.pm-popup strong { display: block; font-size: 15px; }
.pm-popup p { margin: 3px 0; color: var(--ink-2); }
.pm-popup .btn { margin-top: 8px; }
.permit-page .maplibregl-popup-content { padding: 12px 14px; border-radius: 12px; box-shadow: var(--e3); }
.pm-break { display: grid; gap: 14px; }
.pm-card { min-width: 0; padding: 14px 16px 12px; border-radius: 14px; background: var(--panel); box-shadow: var(--e1); }
.cic-page .pm-card h3 { margin: 0 0 10px; color: var(--ink-2); font-size: 11.5px; font-weight: 700; letter-spacing: .07em; line-height: 1.3; text-transform: uppercase; }
.pm-years { display: flex; align-items: stretch; gap: 4px; height: 96px; }
.pm-years button { display: flex; flex: 1; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 5px; min-width: 0; padding: 0; border: 0; background: none; color: var(--ink-2); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.pm-years i { display: block; min-height: 3px; border-radius: 4px 4px 2px 2px; background: #C7D6CC; transition: height var(--t-3) var(--out), background-color var(--t-1) var(--ease); }
.pm-years button:hover i { background: var(--leaf); }
.pm-years button[aria-pressed=true] { color: var(--ink); font-weight: 700; }
.pm-years button[aria-pressed=true] i { background: var(--forest); }
.pm-share { display: flex; gap: 2px; height: 10px; margin-bottom: 8px; overflow: hidden; border-radius: 5px; }
.pm-share i { min-width: 3px; background: var(--c); transition: flex-grow var(--t-3) var(--out), opacity var(--t-2) var(--ease); }
.pm-share i.is-off { opacity: .3; }
.pm-legend { display: flex; flex-wrap: wrap; gap: 2px 2px; margin: 0 -6px; }
.pm-legend button { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 7px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); font-size: 13.5px; white-space: nowrap; transition: background-color var(--t-1) var(--ease); }
.pm-legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.pm-legend b { color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.pm-legend button:hover { background: #F1F0EC; }
.pm-legend button[aria-pressed=true] { background: #E2EDE5; font-weight: 700; }
.pm-rank { margin: 0 -8px; padding: 0; list-style: none; }
.pm-rank button { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 32px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); font-size: 14px; text-align: left; transition: background-color var(--t-1) var(--ease); }
.pm-rank i { position: absolute; left: 0; top: 3px; bottom: 3px; border-radius: 6px; background: rgba(36, 77, 61, .08); transition: width var(--t-3) var(--out), background-color var(--t-1) var(--ease); }
.pm-rank span, .pm-rank b { position: relative; }
.pm-rank span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-rank b { color: var(--ink-2); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pm-rank button:hover { background: #F1F0EC; }
.pm-rank button:hover i { background: rgba(36, 77, 61, .16); }
.pm-rank button[aria-pressed=true] { font-weight: 700; }
.pm-rank button[aria-pressed=true] i { background: rgba(36, 77, 61, .22); }

/* ---------- Full record page ---------- */

.permit-detail-page { max-width: 1280px; font-size: 14.5px; }
.back-link { display: inline-flex; align-items: center; min-height: 40px; margin-bottom: 12px; font-size: 15px; font-weight: 600; }
.back-link::before { content: ""; width: 8px; height: 8px; margin-right: 10px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.detail-head { margin-bottom: 22px; }
.detail-head h1 { font-size: 34px; }
.detail-head p { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; }
.detail-head #detail-subtitle { color: var(--ink); font-size: 16.5px; font-variant-numeric: tabular-nums; }
.detail-actions:empty { display: none; }
.detail-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--rule); }
.cic-page .detail-section h2 { margin: 0 0 14px; font-size: 20px; }
.detail-source-table { width: 100%; max-width: 760px; border-collapse: collapse; font-size: 14.5px; }
.detail-source-table th { width: 260px; color: var(--ink-2); font-weight: 400; text-align: left; text-transform: capitalize; }
.detail-source-table th, .detail-source-table td { padding: 8px 8px 8px 0; border-bottom: 1px solid #E6E4DD; vertical-align: top; }

/* ---------- Narrower screens ---------- */

@media (min-width: 1900px) {
  .pm-list { --cols: minmax(0, 1.15fr) minmax(0, 1.7fr) minmax(0, 1.1fr) 110px 120px 22px; }
}
@media (max-width: 1280px) {
  .pm-body { grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; }
  .pm-list { --cols: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) 78px 100px 18px; }
  .pm-cols, .pm-row { column-gap: 14px; }
  .pm-rec { grid-template-columns: 1fr; }
  .pm-hero { padding-right: 230px; }
  .pm-hero .tool-banner-art { width: 176px; right: 22px; }
}
@media (max-width: 980px) {
  .pm-body { grid-template-columns: 1fr; }
  .pm-side { position: static; max-height: none; overflow: visible; margin-top: 0; }
  .pm-display { display: inline-flex; }
  .pm-map-card { display: none; }
  .pm-body[data-display=map] .pm-map-card { display: block; }
  .pm-body[data-display=map] .pm-results { display: none; }
  .pm-body[data-display=map] #permit-map { height: 62vh; }
  .pm-list { --cols: minmax(0, 1fr) 18px; }
  .pm-cols, .pm-row > .pm-c-work, .pm-row > .pm-c-co, .pm-row > .pm-c-fig, .pm-row > .pm-c-date, .pm-row > .pm-c-status { display: none; }
  .pm-row { min-height: 60px; }
  .pm-phone-only { display: inline; }
  .pm-two strong { white-space: normal; }
}
@media (max-width: 700px) {
  .permit-page { padding-top: 16px; }
  .pm-hero { padding: 18px 16px 16px; }
  .pm-hero .tool-banner-art { display: none; }
  .cic-page .pm-search input { height: 50px; font-size: 16px; padding-right: 50px; }
  .pm-search-key { display: none; }
  .pm-starts { flex-wrap: nowrap; margin-right: -16px; padding-right: 16px; overflow-x: auto; scrollbar-width: none; }
  .pm-starts::-webkit-scrollbar { display: none; }
  .pm-bar { flex-wrap: nowrap; margin: 0 calc(var(--gutter) * -1) 6px; padding: 8px var(--gutter); border-radius: 0; overflow-x: auto; scrollbar-width: none; }
  .pm-bar::-webkit-scrollbar { display: none; }
  .pm-bar > *, .pm-pills > * { flex: none; }
  .pm-sort { width: 168px; }
  .pm-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .cic-page .pm-head h2 { font-size: 22px; }
  .pm-pop { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 76vh; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; transform: translateY(16px); transform-origin: bottom center; }
  .pm-pop[data-facet=status] { width: auto; }
  .pm-opt { min-height: 44px; }
  .pm-fold-body { padding: 2px 8px 12px; }
  .pm-actions .btn { flex: 1 1 100%; }
  .detail-source-table th, .detail-source-table td { display: block; width: auto; padding: 4px 0; border: 0; }
  .detail-source-table td { padding-bottom: 10px; border-bottom: 1px solid #E6E4DD; }
  .cic-page .detail-head h1 { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  .pm-fold, .pm-fold-body, .pm-pop, .pm-years i, .pm-rank i, .pm-opt-bar { transition: none; }
  .pm-progress::after, .pm-row.is-ghost i { animation: none; }
}

/* ---------- Phone (860 px and under), 2026-11-18 ----------
   The shell's phone kit gives the page its dock (the search form, sticky, with a Filters button), its sheets and
   its floating List / Map switch. Here: the record type stays in view as one row, every other filter moves to the
   sheet, a row becomes four short lines that say where, what, who and when, a record opens in a sheet over the
   list, the breakdown gets a sheet of its own, and the map takes the whole screen. */

.pm-actions-more { display: contents; }
.pm-break-open { display: none; }

@media (max-width: 860px) {
  .permit-page { font-size: 15px; }
  .pm-starts { display: none; }
  .pm-suggest { left: 8px; right: 8px; top: calc(100% - 2px); }
  .pm-sug { min-height: 48px; padding: 6px 10px; }
  .pm-sug span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; line-height: 1.3; }
  .pm-sug kbd { display: none; }

  /* The bar keeps one thing: filings, permits or both. */
  .pm-bar { position: static; display: block; margin: 10px 0 0; padding: 0; overflow: visible; border-radius: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .pm-pills, .pm-bar-end { display: none; }
  .pm-bar .pm-kind { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 4px; border-radius: 12px; }
  .pm-bar .pm-kind button { min-height: 40px; padding: 0 6px 1px; border-radius: 9px; font-size: 14.5px; }

  .pm-head { flex-direction: row; align-items: flex-end; gap: 12px; min-height: 0; margin: 16px 0 10px; }
  .cic-page .pm-head h2 { font-size: 21px; }
  .pm-head p { font-size: 13.5px; line-height: 1.4; }
  .pm-head-actions { flex: none; }
  .pm-head-actions .btn, .pm-head .pm-clear { display: none; }
  .pm-break-open { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 13px; border: 0; border-radius: 10px; background: var(--panel); box-shadow: var(--e1); color: var(--ink); font: 600 14.5px/1 var(--sans); cursor: pointer; }
  .pm-break-open::before { content: ""; width: 14px; height: 12px; background: linear-gradient(var(--forest), var(--forest)) 0 100% / 3px 6px no-repeat, linear-gradient(var(--forest), var(--forest)) 5.500px 100% / 3px 12px no-repeat, linear-gradient(var(--forest), var(--forest)) 11px 100% / 3px 9px no-repeat; }
  .pm-break-open:active { background: #F4F3EE; }
  .pm-break-open[hidden] { display: none; }

  /* What is on, in one row that scrolls sideways. */
  .pm-chips { flex-wrap: nowrap; gap: 6px; margin: 0 calc(var(--gutter) * -1) 10px; padding: 2px var(--gutter); overflow-x: auto; scrollbar-width: none; }
  .pm-chips::-webkit-scrollbar { display: none; }
  .pm-chip { flex: none; min-height: 40px; white-space: nowrap; }
  .pm-chip button { width: 36px; height: 40px; margin: 0; }
  .pm-chip-clear { flex: none; min-height: 40px; padding: 0 10px; border: 0; background: none; color: var(--forest); font: 700 14.5px/1 var(--sans); white-space: nowrap; }

  /* The list. The map and the breakdown leave the page for the full-screen view and the sheet. */
  .pm-side { display: none; }
  .pm-body[data-display=map] .pm-side, .pm-body[data-display=map] .pm-results { display: block; }
  .pm-row { grid-template-columns: 10px minmax(0, 1fr) auto; grid-template-rows: none; align-items: start; column-gap: 10px; row-gap: 3px; min-height: 0; padding: 13px 14px; }
  .pm-row > .pm-c { grid-row: auto; }
  .pm-row > .pm-c-place, .pm-c-place > .pm-two { display: contents; }
  .pm-c-place .work-key { grid-column: 1; grid-row: 1; margin-top: 6px; }
  .pm-c-place .pm-two > strong { grid-column: 2; grid-row: 1; overflow: visible; font-size: 16px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }
  .pm-row > .pm-c-fig { display: block; grid-column: 3; grid-row: 1; align-self: start; font-size: 15px; line-height: 1.4; }
  .pm-row > .pm-c-fig:has(.not-reported) { display: none; }
  .pm-row > .pm-c-work, .pm-row > .pm-c-co { display: block; grid-column: 2 / 4; }
  .pm-row > .pm-c-work { grid-row: 2; }
  .pm-row > .pm-c-co { grid-row: 3; }
  .pm-c-work small, .pm-c-co small { display: none; }
  .pm-c-work .pm-main { overflow: visible; color: #2B3530; font-size: 14.5px; line-height: 1.35; white-space: normal; }
  .pm-c-co .pm-main { font-size: 14.5px; line-height: 1.35; }
  .pm-c-co .pm-main::before { content: "Applicant"; margin-right: 7px; color: var(--ink-2); font-size: 13px; }
  .pm-row[data-kind=permit] .pm-c-co .pm-main::before { content: "Permit holder"; }
  .pm-c-place .pm-two > small { grid-column: 2 / 4; grid-row: 4; overflow: visible; margin-top: 1px; font-size: 13px; line-height: 1.35; white-space: normal; }
  .pm-row > .pm-c-date, .pm-row > .pm-c-status, .pm-row > .pm-chev { display: none; }
  .pm-row:active { background: #F4F3EE; }
  .pm-row[aria-busy=true] { opacity: .6; }
  .pm-row.is-ghost { grid-template-columns: minmax(0, 1fr); row-gap: 9px; padding: 16px 14px; }
  .pm-row.is-ghost > .pm-c { display: block; grid-column: 1; grid-row: auto; }
  .pm-row.is-ghost > .pm-c:nth-child(n+4) { display: none; }
  .pm-more { flex-direction: column; align-items: stretch; gap: 10px; }
  .pm-more .btn { min-height: 48px; }
  .pm-more p { text-align: center; }
  .pm-empty { padding: 32px 16px 36px; }
  .pm-relax { flex-direction: column; }
  .pm-relax button { justify-content: space-between; min-height: 48px; text-align: left; }

  /* The record: in its sheet, and on the full-record page. */
  #pm-rec-body { padding: 4px 16px 28px; }
  .pm-rec { display: block; }
  .pm-rec-main { display: flex; flex-direction: column; padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .pm-rec-status { order: 1; margin-bottom: 8px; }
  .pm-rec-status strong { font-size: 16.5px; }
  .pm-rec-desc { order: 2; margin-bottom: 14px; font-size: 15.5px; }
  .pm-actions { display: contents; }
  .pm-actions > .btn { order: 3; flex: none; width: 100%; min-height: 48px; font-size: 15.5px; }
  .pm-facts { order: 4; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 16px; margin-top: 16px; padding: 16px; border-radius: 14px; background: var(--panel); box-shadow: var(--e1); }
  .pm-facts .is-wide { grid-column: 1 / -1; }
  .pm-facts dd { font-size: 15px; }
  .pm-facts .pm-link { min-height: 28px; font: inherit; font-weight: 700; }
  .pm-actions-more { order: 5; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 12px; }
  .pm-actions-more .btn { flex: none; min-height: 46px; padding: 4px 8px; font-size: 14.5px; line-height: 1.2; text-align: center; white-space: normal; }
  .pm-actions-more > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* The sheet's own heading already carries the job number. */
  #pm-rec-body .pm-rec-status span { display: none; }
  .pm-rec-card { margin-top: 14px; }
  .pm-rel { max-height: none; }
  .pm-rel button { min-height: 52px; }
  .cic-page .detail-head h1 { font-size: 24px; }
  .back-link { min-height: 44px; margin-bottom: 4px; }

  /* The filter sheet. */
  .pm-sheet-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 14px; border: 0; background: none; color: var(--ink); font: 600 15.5px/1.3 var(--sans); text-align: left; }
  .pm-sheet-row > span { flex: 1; min-width: 0; }
  .pm-sheet-row small { display: block; margin-top: 2px; color: var(--ink-2); font-size: 13px; font-weight: 400; line-height: 1.35; }
  .cic-page .pm-sheet-row select { flex: none; width: auto; max-width: 62%; height: 42px; min-height: 42px; font-size: 16px; }
  .pm-sheet-switch b { flex: none; color: var(--ink-2); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
  .pm-sheet-switch i { position: relative; flex: none; width: 46px; height: 28px; border-radius: 14px; background: #C9CEC9; transition: background-color var(--t-2) var(--ease); }
  .pm-sheet-switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(12, 26, 21, .3); transition: transform var(--t-2) var(--out); }
  .pm-sheet-switch[aria-checked=true] i { background: var(--forest); }
  .pm-sheet-switch[aria-checked=true] i::after { transform: translateX(18px); }
  .pm-sec summary { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 16px 0 14px; color: var(--ink); font: 600 15.5px/1.3 var(--sans); list-style: none; cursor: pointer; }
  .pm-sec summary::-webkit-details-marker { display: none; }
  .pm-sec summary span { flex: 1; min-width: 0; }
  .pm-sec summary em { max-width: 54%; overflow: hidden; color: var(--forest); font-size: 14.5px; font-style: normal; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
  .pm-sec summary svg { flex: none; color: var(--ink-2); transition: transform var(--t-2) var(--out); }
  .pm-sec[open] summary svg { transform: rotate(180deg); color: var(--forest); }
  .pm-sec-body { padding: 0 6px 8px; }
  .pm-sec-body .pm-opts { overflow: visible; }
  .pm-sec-body .pm-opt { min-height: 46px; font-size: 15.5px; }
  .pm-sec-body .pm-opt-head { margin-top: 12px; }
  .pm-sec-body .pm-pop-find { padding: 0 2px 6px; }
  .cic-page .pm-sec-body input[type=text], .pm-sec-body .pm-dates input { width: 100%; height: 44px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 9px; background: #FFFFFF; box-shadow: inset 0 0 0 1px #BFC4BE; color: var(--ink); font: 500 16px/1.2 var(--sans); }
  .pm-sec-body .pm-dates { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin: 6px 4px 0; padding: 12px 4px 4px; }
  .pm-sec-body .pm-dates .btn { grid-column: 1 / -1; min-height: 44px; }
  .pm-sheet-starts { display: flex; flex-wrap: wrap; gap: 8px; }
  .pm-sheet-starts button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--panel); box-shadow: var(--e1); color: var(--ink); font: 600 14.5px/1 var(--sans); }
  .pm-sheet-starts button[aria-pressed=true] { background: var(--forest); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); color: var(--on-forest); }

  /* The breakdown sheet. */
  #pm-break-body { padding-top: 8px; }
  #pm-break-body .pm-years { height: 124px; }
  #pm-break-body .pm-years button { font-size: 12.5px; }
  #pm-break-body .pm-legend button { min-height: 44px; padding: 0 10px; font-size: 15px; }
  #pm-break-body .pm-rank button { min-height: 46px; font-size: 15px; }

  /* The map, full screen. */
  .pm-map-card.phone-map #permit-map { height: 100%; }
  .phone-map .pm-map-status { position: absolute; left: 10px; top: 10px; z-index: 2; max-width: calc(100% - 20px); min-height: 0; padding: 6px 10px; border-radius: 9px; background: rgba(255, 255, 255, .92); box-shadow: var(--e1); color: var(--ink); font-size: 12.5px; pointer-events: none; }
  .phone-map .pm-map-status:empty { display: none; }
  .phone-map .pm-area { top: 52px; min-height: 42px; padding: 0 16px; font-size: 14.5px; }
  .pm-pin strong { display: block; padding-right: 40px; font-size: 16px; line-height: 1.3; }
  .pm-pin p { margin: 2px 0 0; color: #2B3530; font-size: 14.5px; line-height: 1.35; }
  .pm-pin .pm-pin-meta, .pm-pin .pm-pin-wait { color: var(--ink-2); font-size: 13px; }
  .pm-pin-x { position: absolute; right: 2px; top: 2px; }
  .pm-pin-acts { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
  .pm-pin-acts .btn { min-height: 44px; }
  .pm-pin-pager { display: inline-flex; align-items: center; color: var(--ink-2); font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .pm-pin-pager button { display: grid; place-items: center; width: 40px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--forest); }
  .pm-pin-pager button:active { background: #F1F0EC; }
}
@media (prefers-reduced-motion: reduce) {
  .pm-sheet-switch i, .pm-sheet-switch i::after, .pm-sec summary svg { transition: none; }
}
@media (max-width: 860px) {
  /* No plate under the list on a phone: the rows run edge to edge on the page, parted by rules. */
  .pm-list { margin: 0 calc(var(--gutter) * -1); border-top: 1px solid #DDDBD4; border-radius: 0; background: none; box-shadow: none; }
  .pm-row { padding-left: var(--gutter); padding-right: var(--gutter); border-bottom-color: #DDDBD4; }
  #pm-rows > :last-child { border-bottom: 1px solid #DDDBD4; border-radius: 0; }
  .pm-row:hover { background: none; }
  .pm-row:active { background: #E7E5DF; }
  .pm-row.is-ghost i { background-image: linear-gradient(90deg, #E2E0D9 0%, #ECEAE4 50%, #E2E0D9 100%); }
  .pm-progress { left: 0; right: 0; }
}
