/* ============================================================================
   base.css — reset, typography, layout primitives, utilities
   Layer 2 of 3. Requires tokens.css.
   Flat specificity: one class per thing, element selectors only for elements
   that carry no class of their own.
   ========================================================================== */

/* ---------- reset ---------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;font-size:100%}
body{
  margin:0;
  min-width:320px;
  background:var(--c-plate);
  color:var(--c-legend);
  font:var(--fw-body) var(--fs-16)/var(--lh-base) var(--f-ui);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
img,svg,video{display:block;max-width:100%}
img{height:auto}
h1,h2,h3,h4,h5,h6,p,ul,ol,dl,dd,figure,blockquote,fieldset{margin:0}
ul,ol{padding:0}
fieldset{border:0;padding:0;min-width:0}
button,input,select,textarea{font:inherit;color:inherit;margin:0}
table{border-collapse:collapse}
a{color:var(--c-post);text-underline-offset:.15em}
a:hover{color:var(--c-post-hover)}
/* The ring is a box-shadow so it can be two-tone on any ground. The
   transparent outline is not decoration: forced-colors mode discards
   box-shadow but repaints outline in a system colour, so this one line
   is what keeps a focus indicator visible in High Contrast. */
:focus-visible{outline:2px solid transparent;outline-offset:2px;box-shadow:var(--focus-on-white)}
strong,b{font-weight:var(--fw-bold)}
em{font-style:normal;font-weight:var(--fw-med)}
abbr[title]{text-decoration:underline dotted;cursor:help}
hr{border:0;border-top:var(--plate-border) solid var(--c-hairline);margin:var(--s-8) 0}
::selection{background:var(--c-tint)}

/* ---------- headings ---------- */
/* Poppins, always. The accent face never sets a heading. */
.h1,.h2,.h3,.h4{font-family:var(--f-ui)}
/* One long word ("Commissioners", "Estacionamiento") at display size, with
   the WCAG 1.4.12 spacing overrides, is wider than a 320 px screen. */
.h1,.h2{overflow-wrap:break-word;hyphens:auto}
.h1{font-weight:var(--fw-bold);font-size:var(--fs-32);line-height:2.5rem;color:var(--c-post);letter-spacing:-.01em}
.h2{font-weight:var(--fw-bold);font-size:var(--fs-24);line-height:2rem;color:var(--c-post)}
.h3{font-weight:var(--fw-bold);font-size:var(--fs-20);line-height:1.75rem;color:var(--c-legend)}
.h4{font-weight:var(--fw-med);font-size:var(--fs-16);line-height:1.5rem;color:var(--c-legend)}
.h2--ink,.h3--post{color:inherit}
.h3--post{color:var(--c-post)}
@media (min-width:960px){
  .h1{font-size:var(--fs-40);line-height:3rem}
  .h2{font-size:var(--fs-28);line-height:2.25rem}
}

/* Page title: the page's own sign band standing to the left of the H1.
   NOTE the horizontal padding is never zeroed here — the container owns it.
   (`padding: X 0 Y` in a page-head rule is the classic gutter bug; do not.) */
.title{padding-block:var(--s-8) 0}
.title__h{border-left:6px solid var(--c-post);padding-left:var(--s-4)}
.title__lead{margin-top:var(--s-4);max-width:var(--measure)}
@media (min-width:960px){
  .title{padding-block:var(--s-12) 0}
  .title__h{padding-left:var(--s-6)}
  .title__lead{padding-left:calc(var(--s-6) + 6px)}
}

/* ---------- the figure ---------- */
/* The one place Overpass 700 is allowed: a number, a price, a clearance, a
   count, a month abbreviation. Never a sentence, never a link, never a heading. */
.fig{
  font-family:var(--f-fig);
  font-weight:var(--fw-fig);
  font-variant-numeric:tabular-nums;
  line-height:1;
  color:var(--c-post);
  white-space:nowrap;
}
.fig--s{font-size:var(--fs-fig-s)}
.fig--m{font-size:var(--fs-fig-m)}
.fig--l{font-size:var(--fs-fig-l)}
.fig--xl{font-size:var(--fs-fig-xl)}
.fig--ink{color:var(--c-legend)}
.fig sup{font-size:.45em;vertical-align:.8em;font-weight:var(--fw-fig)}

/* ---------- layout primitives ---------- */
.container{
  max-width:calc(var(--container) + 2 * var(--pad-x));
  margin-inline:auto;
  padding-inline:var(--pad-x);
}
.section{padding-block:var(--section)}
.section--tight{padding-block:var(--s-8)}
.section--flush{padding-block:0 var(--section)}
.section--stripe{background:var(--c-stripe)}
.flow>*+*{margin-top:var(--s-4)}
.flow-l>*+*{margin-top:var(--s-6)}
.flow-xl>*+*{margin-top:var(--s-8)}
.measure{max-width:var(--measure)}
.cols{display:grid;gap:var(--s-6)}
.cols>*,.stack>*,.shell>*{min-width:0}
.stack{display:grid;gap:var(--s-3)}
.stack--joined{gap:0}
.stack--joined>*+*{border-top:0}
.cluster{display:flex;flex-wrap:wrap;gap:var(--s-3) var(--s-4);align-items:center}
@media (min-width:640px){
  .stack--2{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stack--3{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (min-width:960px){
  .cols--2{grid-template-columns:1fr 1fr}
  .cols--3{grid-template-columns:repeat(3,minmax(0,1fr))}
  .cols--5-7{grid-template-columns:5fr 7fr}
  .cols--7-5{grid-template-columns:7fr 5fr}
  .cols--8-4{grid-template-columns:8fr 4fr}
  .stack--4{grid-template-columns:repeat(4,minmax(0,1fr))}
  .stack--5{grid-template-columns:repeat(5,minmax(0,1fr))}
}

/* Page shell: content + sidebar. Sidebar follows content in the source order
   and in the DOM, so it is also last for a screen reader and on a phone. */
.shell{display:grid;gap:var(--s-8)}
@media (min-width:960px){
  .shell{grid-template-columns:minmax(0,8fr) minmax(0,4fr);gap:var(--s-12);align-items:start}
  .shell--narrow{grid-template-columns:minmax(0,7fr) minmax(0,5fr)}
}

/* ---------- text utilities ---------- */
.lead{font-size:var(--fs-18);line-height:1.75rem}
.meta{color:var(--c-meta);font-size:var(--fs-14);line-height:1.25rem}
.small{font-size:var(--fs-13);line-height:1.25rem}
.tabular{font-variant-numeric:tabular-nums}
.nowrap{white-space:nowrap}
.right{text-align:right}
.med{font-weight:var(--fw-med)}
.bold{font-weight:var(--fw-bold)}
.mono{font-family:var(--f-mono);font-size:.95em;overflow-wrap:anywhere}
.list{padding-left:1.25em}
.list li+li{margin-top:var(--s-1)}
.list--bare{list-style:none;padding:0}
.list--check{list-style:none;padding:0}
.list--check li{display:grid;grid-template-columns:24px 1fr;gap:var(--s-2);align-items:start}
.list--check li+li{margin-top:var(--s-2)}
.vh{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
.vh-focusable:not(:focus):not(:focus-within){position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* Standalone (non-prose) links get a real target. WCAG 2.5.8 asks for 24px;
   this system's floor is 44px, so every block link is padded to it. */
.link-block{display:inline-block;line-height:1.5rem;padding-block:10px;font-weight:var(--fw-med)}
.link-block .i{display:inline-block;vertical-align:-.35em;margin-left:.25em}
.link-block .i:first-child{margin-left:0;margin-right:.25em}
/* Prose links inside running text keep the inline target but get vertical
   padding that does not disturb the line box. */
.prose a,.flow p a,.faq__a a,.ftr__office a,.note a,
.fac__addr a,.ftr__copy a{display:inline-block;padding-block:10px;margin-block:-10px}

/* External-link marker, drawn from currentColor so it works on any ground. */
.ext::after{
  content:"";display:inline-block;width:.8em;height:.8em;margin-left:.3em;
  vertical-align:-.05em;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4 10 14M18 14v6H4V6h6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4 10 14M18 14v6H4V6h6'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ---------- icons ---------- */
/* One stroke language: 24px box, 2px stroke, round caps and joins, no fills
   except the two solid marks (#i-Psign, #i-roundel). */
.i{width:24px;height:24px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.i--s{width:20px;height:20px}
.i--xs{width:16px;height:16px}
.i--l{width:32px;height:32px}
.i--xl{width:40px;height:40px}

/* ---------- rules and dividers ---------- */
.rule{height:4px;width:48px;background:var(--c-permit);margin-top:var(--s-3)}
.hr-soft{border:0;border-top:var(--hairline) solid var(--c-hairline);margin:var(--s-6) 0}

/* ---------- spacing helpers (used sparingly, never to fix a component) ---- */
.mt-0{margin-top:0}
.mt-2{margin-top:var(--s-2)}
.mt-4{margin-top:var(--s-4)}
.mt-6{margin-top:var(--s-6)}
.mt-8{margin-top:var(--s-8)}
.mb-4{margin-bottom:var(--s-4)}
.mb-6{margin-bottom:var(--s-6)}

/* ---------- motion ---------- */
.reveal{animation:reveal var(--dur-med) ease-out}
@keyframes reveal{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    transition-duration:.001ms!important;
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    scroll-behavior:auto!important;
  }
  .arrow-nudge{transform:none!important}
}

/* ---------- forced colours (Windows High Contrast) ---------- */
/* HCM discards box-shadow, so the ring above would vanish; the transparent
   outline it repaints is what is left. Component-level HCM overrides live at
   the end of components.css, because that file loads after this one and would
   otherwise win on source order. */
@media (forced-colors:active){
  :focus-visible{outline:3px solid Highlight;outline-offset:2px}
}

/* ---------- print ----------
   Two audiences. A resident printing a content page keeps the masthead, so the
   sheet says who it came from. A staff print view — a letter, the interim
   permit, a receipt, a label sheet — carries `class="sheet"` on <body> and
   drops every piece of site chrome, because the paper IS the document
   (spec §C). `.no-print` removes a control that only makes sense on screen.
   The .paper component's own print rules live with the component, at the end
   of components.css, so they outrank these by source order. */
@media print{
  @page{margin:14mm}
  .skip,.util-bar,.hdr__row2,.alert__dismiss,.nav,.pager,.no-print{display:none!important}
  .sheet .hdr,.sheet .proto,.sheet .ftr,.sheet .console,.sheet .crumbs{display:none!important}
  .proto{border-bottom:2px solid #000}
  a[href^="http"]::after{content:" (" attr(href) ")";font-size:11px}
  body{font-size:12pt}
  h1,h2,h3{break-after:avoid}
  table,figure,.sign,.permit,.note,.box{break-inside:avoid}
}
