/* ny-site.css — nyc.com.im, the /inspections/ and /311/ sections (newsites544, 2026-09-28).
   Loaded after house.css. Every class here starts ny- ; every colour is a house token, so the dark skin needs
   no rule of its own except where a token pair has to swap. The accent stays the house orange. */

/* ------------------------------------------------------------------ section nav (under the hero) */
.ny-sub { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.ny-sub a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line);
    border-radius: 999px; text-decoration: none; font-size: .9rem; color: var(--ink-77); background: var(--card);
}
.ny-sub a:hover { border-color: var(--ink-55); color: var(--ink); }
.ny-sub a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.ny-hero { padding-block: clamp(24px, 4vw, 52px) clamp(24px, 3vw, 40px); }
.ny-hero h1 { max-width: 20ch; }
.mast__brand .ny-brand-sub { font-weight: 400; color: var(--ink-55); font-size: .86rem; letter-spacing: 0; }
@media (max-width: 520px) { .mast__brand .ny-brand-sub { display: none; } }

/* ------------------------------------------------------------------ the instrument */
.ny-tool { padding-block: 0 clamp(36px, 5vw, 64px); }
.ny-panel { border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.ny-panel__head {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
    padding: 12px clamp(14px, 3vw, 22px); background: var(--tint); border-bottom: 1px solid var(--line);
}
.ny-panel__head h2 { font: 500 .74rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-77); margin: 0; }
.ny-panel__body { padding: clamp(14px, 3vw, 22px); }
.ny-form { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.ny-form .ny-wide { grid-column: span 2; }
.ny-form__go { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@media (max-width: 860px) { .ny-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .ny-form { grid-template-columns: minmax(0, 1fr); } .ny-form .ny-wide { grid-column: auto; } }
.ny-form .select { appearance: auto; }
.ny-or { font: 500 .72rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-55); }
.ny-chipset { display: flex; flex-wrap: wrap; gap: 8px; }
.ny-chipset .chip { min-height: 44px; padding: 0 16px; font-size: .9rem; }

.ny-status { margin: 14px 0 0; min-height: 1.6em; }
.ny-out { margin-top: 18px; min-height: 420px; }
.ny-out[data-state="idle"] { min-height: 0; }

/* result rows */
.ny-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.ny-list > li + li { border-top: 1px solid var(--line-soft); }
.ny-row {
    display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center;
    padding: 12px 14px; min-height: 72px; text-decoration: none; color: inherit;
}
a.ny-row:hover { background: var(--tint); }
a.ny-row:hover .ny-row__name { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.ny-row__name { font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.ny-row__meta { font-size: .86rem; color: var(--ink-77); overflow-wrap: anywhere; }
.ny-row__side { font: 400 .76rem/1.4 var(--mono); color: var(--ink-55); text-align: right; white-space: nowrap; }
@media (max-width: 560px) {
    .ny-row { grid-template-columns: 52px minmax(0, 1fr); }
    .ny-row__side { grid-column: 2; text-align: left; white-space: normal; }
}
.ny-skel { height: 72px; display: block; background: linear-gradient(90deg, var(--line-soft), transparent 60%); }
.ny-more { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }

/* the grade mark: the dataset's letter, in ink — no colour, no judgement */
.ny-grade {
    display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 8px;
    border: 2px solid var(--ink); background: var(--ink); color: var(--paper);
    font: 600 1.5rem/1 var(--sans); letter-spacing: -.02em;
}
.ny-grade--open { background: transparent; color: var(--ink); border-style: dashed; border-color: var(--ink-55); font: 500 .62rem/1.15 var(--mono); letter-spacing: .04em; text-transform: uppercase; text-align: center; padding: 2px; }
.ny-grade--wait { background: transparent; border-color: var(--line); color: var(--ink-55); font-size: 1rem; }
.ny-grade--big { width: 72px; height: 72px; font-size: 2.3rem; border-radius: 10px; }
.ny-grade--big.ny-grade--open { font-size: .7rem; }
.ny-grade--sm { width: 34px; height: 34px; font-size: 1.05rem; border-radius: 6px; }
.ny-grade--sm.ny-grade--open { font-size: .5rem; }

/* one establishment's record */
.ny-rec__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.ny-rec__top h2, .ny-rec__top h3 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.12; margin: 0 0 6px; overflow-wrap: anywhere; }
.ny-rec__addr { color: var(--ink-77); margin: 0; overflow-wrap: anywhere; }
.ny-rec__ids { font: 400 .78rem/1.5 var(--mono); color: var(--ink-55); margin: 6px 0 0; overflow-wrap: anywhere; }
.ny-rec__grade { display: flex; gap: 12px; align-items: center; max-width: 300px; }
.ny-rec__grade p { margin: 0; font-size: .86rem; line-height: 1.45; color: var(--ink-77); }
.ny-rec__grade b { color: var(--ink); }
@media (max-width: 640px) { .ny-rec__top { grid-template-columns: minmax(0, 1fr); } .ny-rec__grade { max-width: none; } }
.ny-rec__bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 0 0 16px; }
.ny-rec__tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 18px 0 12px; }
.ny-rec__tools p { margin: 0; }

.ny-insp { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin: 0 0 12px; overflow: hidden; }
.ny-insp__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 12px 14px; background: var(--tint); border-bottom: 1px solid var(--line-soft); }
.ny-insp__date { font-weight: 600; letter-spacing: -.01em; margin: 0; font-size: 1rem; }
.ny-insp__type { font-size: .86rem; color: var(--ink-77); margin: 2px 0 0; overflow-wrap: anywhere; }
.ny-insp__marks { display: flex; gap: 10px; align-items: center; }
.ny-score { display: inline-grid; justify-items: center; min-width: 58px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.ny-score b { font: 600 1.15rem/1.1 var(--sans); font-variant-numeric: tabular-nums; }
.ny-score span { font: 500 .6rem/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-55); }
.ny-insp__action { padding: 10px 14px 0; margin: 0; font-size: .9rem; color: var(--ink-77); }
.ny-viol { list-style: none; margin: 0; padding: 4px 14px 8px; }
.ny-viol li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: .9rem; line-height: 1.5; }
.ny-viol li:first-child { border-top: 0; }
.ny-viol__code { font: 500 .8rem/1.6 var(--mono); color: var(--ink-77); }
.ny-viol__text { overflow-wrap: anywhere; }
.ny-flag { display: inline-block; font: 500 .66rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 4px 7px; border-radius: 5px; border: 1px solid var(--line); color: var(--ink-77); margin: 0 8px 4px 0; vertical-align: 1px; }
.ny-flag--critical { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.ny-insp__none { padding: 10px 14px 14px; margin: 0; font-size: .9rem; color: var(--ink-77); }

/* ------------------------------------------------------------------ 311 */
.ny-duo { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 6px; }
@media (max-width: 900px) { .ny-duo { grid-template-columns: minmax(0, 1fr); } }
.ny-box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 14px 16px 16px; min-width: 0; }
.ny-box h3 { font: 500 .74rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-77); margin: 0 0 4px; }
.ny-box__sub { font-size: .84rem; color: var(--ink-55); margin: 0 0 12px; min-height: 2.6em; }
.ny-total { font: 200 clamp(1.8rem, 4vw, 2.6rem)/1.1 var(--sans); letter-spacing: -.03em; margin: 0; min-height: 1.1em; font-variant-numeric: tabular-nums; }
.ny-total small { font: 400 .9rem/1.4 var(--sans); letter-spacing: 0; color: var(--ink-77); display: block; margin-top: 6px; min-height: 2.8em; }
.ny-sum { margin: 18px 0; min-height: 96px; }

.ny-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; min-height: 568px; align-content: start; }
.ny-bar {
    -webkit-appearance: none; appearance: none; width: 100%; min-height: 44px; border: 0; border-radius: 6px; margin: 0;
    background: transparent; cursor: pointer; text-align: left; padding: 4px 6px; display: grid;
    grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; color: var(--ink);
}
.ny-bar:hover { background: var(--line-soft); }
.ny-bar[aria-pressed="true"] { background: var(--line-soft); box-shadow: inset 3px 0 0 var(--accent); }
.ny-bar__name { font-size: .9rem; overflow-wrap: anywhere; }
.ny-bar__n { font: 500 .82rem/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-77); }
.ny-bar__track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.ny-bar__fill { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.ny-bar--skel { cursor: default; }
.ny-bar--skel:hover { background: transparent; }

.ny-chart { position: relative; width: 100%; height: 260px; }
.ny-chart canvas { display: block; width: 100%; height: 100%; }
.ny-chartnote { font-size: .8rem; color: var(--ink-55); margin: 10px 0 0; }
.ny-days { margin-top: 12px; font-size: .88rem; }
.ny-days summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--ink-77); }
.ny-days .tablewrap { max-height: 300px; overflow-y: auto; }

.ny-reqs { margin-top: 18px; }
.ny-reqs__head { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; justify-content: space-between; margin: 0 0 10px; }
.ny-reqs__head h3 { font: 500 .74rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-77); margin: 0; }
.ny-reqlist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; min-height: 420px; }
.ny-req { padding: 12px 14px; display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 4px 16px; align-items: start; }
.ny-req + .ny-req { border-top: 1px solid var(--line-soft); }
.ny-req__when { font: 400 .78rem/1.5 var(--mono); color: var(--ink-77); }
.ny-req__what b { font-weight: 600; overflow-wrap: anywhere; }
.ny-req__what span { display: block; font-size: .88rem; color: var(--ink-77); overflow-wrap: anywhere; }
.ny-req__what .ny-req__res { font-size: .82rem; color: var(--ink-55); margin-top: 4px; }
.ny-req__st { text-align: right; }
@media (max-width: 640px) {
    .ny-req { grid-template-columns: minmax(0, 1fr); }
    .ny-req__st { text-align: left; }
}

/* ------------------------------------------------------------------ static pages */
.ny-scale { margin: 22px 0 10px; max-width: 820px; }
.ny-scale__cap { font: 500 .72rem/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-55); display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.ny-scale__cap::before { content: ''; width: 26px; height: 1px; background: var(--accent); }
.ny-scale__row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.ny-scale__band { display: flex; align-items: center; gap: 12px; padding: 14px; font-size: .98rem; line-height: 1.35; color: var(--ink); }
.ny-scale__band + .ny-scale__band { border-left: 2px solid var(--ink); }
.ny-scale__band--a { background: var(--card); }
.ny-scale__band--b { background: var(--line-soft); }
.ny-scale__band--c { background: var(--line); }
@media (max-width: 700px) {
    .ny-scale__row { grid-template-columns: minmax(0, 1fr); }
    .ny-scale__band + .ny-scale__band { border-left: 0; border-top: 2px solid var(--ink); }
}

.ny-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin: 18px 0; }
.ny-fact { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 16px 18px; }
.ny-fact b { display: block; font: 200 2.2rem/1.1 var(--sans); letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ny-fact span { display: block; font-size: .9rem; color: var(--ink-77); margin-top: 6px; line-height: 1.5; }

.ny-codes { display: grid; gap: 10px; margin: 16px 0; padding: 0; list-style: none; max-width: 70ch; }
.ny-codes li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; align-items: center; color: var(--ink-77); }

.ny-stack { display: grid; gap: 14px; margin: 20px 0 8px; }
.ny-stack__row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px 14px; align-items: center; }
.ny-stack__name { font-weight: 600; font-size: .95rem; }
.ny-stack__bar { display: flex; height: 26px; border-radius: 5px; overflow: hidden; border: 1px solid var(--ink); background: var(--card); }
.ny-stack__bar i { display: block; height: 100%; min-width: 0; }
.ny-k-a { background: var(--ink); }
.ny-k-b { background: var(--accent); }
.ny-k-c { background: var(--ink-55); }
.ny-k-z { background: repeating-linear-gradient(135deg, var(--ink-55) 0 2px, transparent 2px 6px); }
.ny-k-0 { background: transparent; }
.ny-key { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 0; padding: 0; list-style: none; font-size: .84rem; color: var(--ink-77); }
.ny-key li { display: inline-flex; align-items: center; gap: 7px; }
.ny-key i { width: 16px; height: 12px; border-radius: 3px; border: 1px solid var(--ink); display: inline-block; }
@media (max-width: 520px) { .ny-stack__row { grid-template-columns: minmax(0, 1fr); } }

.ny-query { font: 400 .78rem/1.6 var(--mono); color: var(--ink-77); background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 10px 0 16px; max-width: 100%; }
.ny-stamp { font: 400 .8rem/1.6 var(--mono); color: var(--ink-77); border-left: 2px solid var(--accent); padding: 2px 0 2px 12px; margin: 0 0 18px; max-width: 80ch; overflow-wrap: anywhere; }
table.t td.ny-verb { font-family: var(--mono); font-size: .84rem; }
table.t .ny-small { font-size: .84rem; color: var(--ink-77); }
.ny-srcs { margin: 0; padding: 0 0 0 1.1em; max-width: 80ch; color: var(--ink-77); font-size: .92rem; line-height: 1.65; }
.ny-srcs li { margin: 0 0 8px; overflow-wrap: anywhere; }
.ny-srcs a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.ny-srcs a:hover { text-decoration-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin: 0 0 .4em; }
.ny-next { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); margin-top: 8px; }

@media print { .ny-tool form, .ny-sub, .ny-more { display: none !important; } }

/* the section a sub-page belongs to, marked in the masthead */
.mast__nav a.ny-here { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
@media (max-width: 420px) { .mast__brand .ny-brand { display: none; } }

/* phone: the house masthead, trail and footer keep their look, and every target in them grows to 44 px */
@media (max-width: 640px) {
    .mast__nav a { min-height: 44px; display: inline-flex; align-items: center; }
    .mast__brand { min-height: 44px; min-width: 44px; }
    .ed button { width: 44px; height: 44px; }
    .crumbs { padding-top: 8px; }
    .crumbs ol { align-items: center; }
    .crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
    .foot ul { gap: 0; }
    .foot li a, .foot__legal a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* row headers in a data table read as names, not as column labels */
table.t tbody th { font: 600 .92rem/1.5 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); background: transparent; white-space: normal; min-width: 9ch; }
table.t tbody th.ny-verb { font: 500 .84rem/1.5 var(--mono); }
table.t tbody tr.ny-sumrow th, table.t tbody tr.ny-sumrow td { border-top: 1px solid var(--line); background: var(--tint); }
@media (max-width: 560px) {
    .ny-viol li { grid-template-columns: 50px minmax(0, 1fr); }
    .ny-flag { display: table; margin: 2px 0 6px; }
}

.ny-insp__action:last-child { padding-bottom: 14px; }

table.t td.ny-small { min-width: 24ch; }
table.t td.n .ny-small { white-space: nowrap; }

/* the narrowest phones: the switch shows only the skin you can change TO, so the three sections fit beside it */
@media (max-width: 420px) {
    .ed button.is-on { display: none; }
    .mast__in { gap: 8px; }
}
