/* PizzaFinderNY — NYC pizza directory. One family (Archivo, variable width) and a subway-line motif. */
:root {
  --paper: #ffffff;
  --tile: #eef1ef;
  --ink: #15191d;
  --muted: #5b6268;
  --rule: #d5dad7;
  --sauce: #c8202a;
  --sauce-dark: #a2161f;
  --open: #0e7a3f;
  --closed: #8a2a1f;

  --mn: #d7262e; --bk: #f5a800; --qn: #7b3fa0; --bx: #0e8a47; --si: #0b63b5;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --step--1: .875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.563rem;
  --step-3: 1.953rem;
  --step-4: 2.441rem;
  --step-5: clamp(2.6rem, 6.5vw, 4.4rem);
  --gutter: clamp(16px, 4vw, 40px);
  --measure: 68ch;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: var(--step-0); line-height: 1.55;
  font-variation-settings: "wdth" 100;
}
img, svg, iframe { max-width: 100%; }
a { color: var(--ink); text-decoration-color: var(--sauce); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--sauce); }
:focus-visible { outline: 3px solid var(--sauce); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 9; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

h1, h2, h3 { font-variation-settings: "wdth" 75; font-weight: 800; line-height: 1.05; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-variation-settings: "wdth" 88; line-height: 1.2; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: var(--step-1); color: var(--muted); line-height: 1.45; }

/* ---------- bullets: the borough marks ---------- */
.bullet {
  --c: var(--ink);
  display: inline-grid; place-items: center; flex: none;
  width: 2em; height: 2em; border-radius: 50%;
  background: var(--c); color: #fff;
  font-size: .8rem; font-weight: 800; font-variation-settings: "wdth" 75; letter-spacing: .02em;
  text-decoration: none; line-height: 1;
}
.bullet.lg { font-size: 1.15rem; }
.bullet.xl { font-size: 1.6rem; }
.b-manhattan { --c: var(--mn); }
.b-brooklyn { --c: var(--bk); color: var(--ink); }
.b-queens { --c: var(--qn); }
.b-bronx { --c: var(--bx); }
.b-staten-island { --c: var(--si); }

/* ---------- header / footer ---------- */
.site-head { border-bottom: 1px solid var(--rule); background: var(--paper); position: relative; z-index: 10; }
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.3rem; font-variation-settings: "wdth" 72; letter-spacing: -.01em; }
.logo .bullet { font-size: .95rem; --c: var(--sauce); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav > a, .dd-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 6px;
  font: inherit; font-weight: 600; font-size: 1rem; color: var(--ink); text-decoration: none;
  background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.nav > a:hover, .dd-btn:hover, .dd-btn[aria-expanded="true"] { background: var(--tile); color: var(--ink); }
.nav > a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--sauce); text-decoration-thickness: 3px; text-underline-offset: 8px; }
.dd-btn svg { transition: transform .15s ease; }
.dd-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-search { margin-left: 12px; }
.dd { position: relative; }
.dd-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 250px; margin: 0; padding: 6px;
  list-style: none; background: #fff; border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 10px 30px -12px rgba(21, 25, 29, .35);
}
.dd-panel a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 6px; text-decoration: none; font-weight: 600; }
.dd-panel a:hover, .dd-panel a[aria-current="page"] { background: var(--tile); color: var(--ink); }
.dd-name { flex: 1; }
.dd-count { color: var(--muted); font-weight: 400; font-size: var(--step--1); }
.menu-btn { display: none; margin-left: auto; align-items: center; gap: 8px; font: inherit; font-weight: 600; background: none; border: 1px solid var(--rule); border-radius: 6px; padding: 8px 12px; cursor: pointer; color: var(--ink); }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; margin: 0 0 12px; border-top: 1px solid var(--rule); padding-top: 8px; }
  .nav.open { display: flex; }
  .nav > a, .dd-btn { width: 100%; justify-content: space-between; padding: 12px 4px; border-radius: 0; }
  .nav-search { margin-left: 0; justify-content: flex-start !important; }
  .dd-panel { position: static; box-shadow: none; border: 0; padding: 0 0 6px 4px; min-width: 0; }
}

/* near me + open now */
.nearbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  margin: 18px 0 10px; padding: 12px; background: var(--tile); border: 1px solid var(--rule); border-radius: 12px;
}
.nearbar .loc { background: var(--ink); border-color: var(--ink); border-radius: 999px; padding: 12px 20px; }
.nearbar .loc:hover { background: #000; border-color: #000; }
.nearbar .or { color: var(--muted); }
.nearbar input[type=search] {
  flex: 1 1 240px; min-width: 0; font: inherit; padding: 13px 16px;
  border: 1px solid #b9c0bc; border-radius: 8px; background: #fff;
}
.nearbar .check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.nearbar .check input { width: 18px; height: 18px; accent-color: var(--sauce); margin: 0; }
.near-status { margin: 18px 0 6px; font-weight: 600; }
@media (max-width: 640px) {
  .nearbar .loc { width: 100%; }
  .nearbar .or { display: none; }
  .nearbar input[type=search] { flex-basis: 100%; }
  .nearbar button[type=submit] { margin-left: auto; }
}
.dist { color: var(--ink); font-weight: 700; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }

.site-foot { margin-top: 72px; background: var(--ink); color: #cfd4d8; padding: 48px 0 32px; font-size: var(--step--1); }
.site-foot a { color: #fff; text-decoration-color: rgba(255,255,255,.35); }
.site-foot .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 28px; }
.site-foot h2 { font-size: var(--step-0); color: #fff; font-variation-settings: "wdth" 90; margin-bottom: .6em; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin: 0 0 6px; }
.site-foot .fine { margin-top: 36px; border-top: 1px solid #2c3339; padding-top: 18px; color: #9aa1a7; max-width: none; }

/* ---------- breadcrumb ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: var(--step--1); color: var(--muted); padding: 18px 0 0; margin: 0; list-style: none; }
.crumbs li { display: flex; align-items: center; gap: 10px; }
.crumbs li + li::before { content: ""; width: 14px; height: 2px; background: var(--rule); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--sauce); }

/* ---------- home hero: the five-stop line ---------- */
.hero { padding: 56px 0 40px; }
.hero h1 { max-width: 15ch; }
.search { display: flex; gap: 8px; max-width: 640px; margin: 28px 0 0; }
.search input {
  flex: 1; min-width: 0; font: inherit; font-size: var(--step-1); padding: 14px 16px;
  border: 2px solid var(--ink); border-radius: 6px; background: #fff;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; padding: 12px 18px; border-radius: 6px; cursor: pointer;
  background: var(--sauce); color: #fff; border: 2px solid var(--sauce); text-decoration: none;
}
.btn:hover { background: var(--sauce-dark); border-color: var(--sauce-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }

.routemap { position: relative; margin: 48px 0 8px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); }
.routemap::before {
  content: ""; position: absolute; left: 10%; right: 10%; top: 19px; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, var(--mn) 0 25%, var(--bk) 25% 50%, var(--qn) 50% 75%, var(--bx) 75% 100%);
  transform-origin: left; animation: draw 1.1s cubic-bezier(.6,.05,.3,1) .15s both;
}
.routemap li { position: relative; text-align: center; }
.routemap a { display: grid; justify-items: center; gap: 10px; text-decoration: none; padding: 0 4px; }
.routemap .bullet { font-size: 1.45rem; box-shadow: 0 0 0 6px var(--paper); animation: pop .35s ease-out both; }
.routemap li:nth-child(1) .bullet { animation-delay: .15s; }
.routemap li:nth-child(2) .bullet { animation-delay: .4s; }
.routemap li:nth-child(3) .bullet { animation-delay: .65s; }
.routemap li:nth-child(4) .bullet { animation-delay: .9s; }
.routemap li:nth-child(5) .bullet { animation-delay: 1.15s; }
.routemap .bn { font-weight: 800; font-size: var(--step-1); font-variation-settings: "wdth" 80; line-height: 1.1; }
.routemap .bc { color: var(--muted); font-size: var(--step--1); }
.routemap a:hover .bn { color: var(--sauce); }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (max-width: 720px) {
  .routemap { grid-template-columns: 1fr; gap: 18px; }
  .routemap::before { left: 30px; right: auto; top: 10px; bottom: 10px; width: 8px; height: auto; transform-origin: top;
    background: linear-gradient(180deg, var(--mn) 0 25%, var(--bk) 25% 50%, var(--qn) 50% 75%, var(--bx) 75% 100%); animation-name: drawv; }
  .routemap a { grid-template-columns: auto 1fr; justify-items: start; align-items: center; column-gap: 16px; row-gap: 0; text-align: left; }
  .routemap .bullet { grid-row: span 2; }
}
@keyframes drawv { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .routemap::before, .routemap .bullet { animation: none; } }

/* ---------- sections ---------- */
.section { padding: 48px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; font-size: var(--step--1); }
.band { background: var(--tile); margin-top: 48px; padding-bottom: 48px; }

/* ---------- the line: listings as stops ---------- */
.line { --c: var(--ink); list-style: none; margin: 0; padding: 0; position: relative; }
.line::before { content: ""; position: absolute; left: 11px; top: 14px; bottom: 14px; width: 6px; background: var(--c); border-radius: 3px; }
.line.manhattan { --c: var(--mn); } .line.brooklyn { --c: var(--bk); } .line.queens { --c: var(--qn); }
.line.bronx { --c: var(--bx); } .line.staten-island { --c: var(--si); }
.stop { position: relative; padding: 12px 0 12px 44px; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: start; }
.stop:last-child { border-bottom: 0; }
.stop::before { content: ""; position: absolute; left: 4px; top: 16px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 5px solid var(--c); }
.stop.mixed::before { border-color: var(--sc, var(--ink)); }
.stop .nm { font-weight: 700; font-size: var(--step-1); font-variation-settings: "wdth" 88; line-height: 1.25; text-decoration: none; }
.stop .nm:hover { color: var(--sauce); }
.stop .meta { grid-column: 1; color: var(--muted); font-size: var(--step--1); }
.stop .side { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: var(--step--1); white-space: nowrap; }
.stop .side a { text-decoration: none; font-weight: 600; }
.stop .tags { grid-column: 1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.band .tag { background: #fff; }
.tag { font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: var(--tile); color: var(--ink); }
.status { display: inline-block; font-weight: 700; font-size: .78rem; }
.status.open { color: var(--open); }
.status.closed { color: var(--closed); }
.stop[hidden] { display: none; }
@media (max-width: 560px) {
  .stop { grid-template-columns: 1fr; }
  .stop .side { grid-column: 1; grid-row: auto; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
}

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 20px; padding: 14px; background: var(--tile); border-radius: 8px; }
.filters input[type=search], .filters select { font: inherit; padding: 9px 12px; border: 1px solid #b9c0bc; border-radius: 6px; background: #fff; }
.filters input[type=search] { flex: 1 1 220px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: var(--step--1); padding: 8px 12px; border-radius: 999px; border: 1px solid #b9c0bc; background: #fff; cursor: pointer; user-select: none; }
.chip input { accent-color: var(--sauce); margin: 0; }
.count { margin-left: auto; color: var(--muted); font-size: var(--step--1); }

/* ---------- grids of neighborhoods / styles ---------- */
.nb-grid { columns: 3 220px; column-gap: 32px; list-style: none; padding: 0; margin: 0; }
.nb-grid li { break-inside: avoid; padding: 7px 0; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 10px; }
.nb-grid a { text-decoration: none; font-weight: 600; }
.nb-grid span { color: var(--muted); font-size: var(--step--1); }

.style-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 32px; list-style: none; padding: 0; margin: 0; }
.style-list li { padding: 14px 0; border-top: 2px solid var(--ink); }
.style-list a { font-weight: 800; font-size: var(--step-2); font-variation-settings: "wdth" 75; text-decoration: none; }
.style-list p { color: var(--muted); font-size: var(--step--1); margin: 4px 0 0; }

/* ---------- page heads ---------- */
.page-head { padding: 24px 0 8px; }
.page-head .title { display: flex; gap: 18px; align-items: center; }
.page-head .title h1 { margin: 0; }
.page-head .lede { margin-top: 14px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 18px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: var(--step--1); }
.stats b { color: var(--ink); font-size: var(--step-1); font-variation-settings: "wdth" 80; margin-right: 4px; }

/* ---------- shop page ---------- */
.shop-head { padding: 22px 0 6px; }
.shop-head h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); margin-bottom: 10px; }
.shop-head .where { color: var(--muted); font-size: var(--step-1); margin: 0; }
.shop-head .status { font-size: var(--step-0); margin-top: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 6px; }
.shop-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; margin-top: 28px; }
@media (max-width: 860px) { .shop-grid { grid-template-columns: 1fr; gap: 28px; } }
.facts { margin: 0; display: grid; grid-template-columns: 9.5em 1fr; border-top: 2px solid var(--ink); }
.facts dt, .facts dd { padding: 11px 0; border-bottom: 1px solid var(--rule); margin: 0; }
.facts dt { font-weight: 700; font-variation-settings: "wdth" 88; }
.facts dd a { word-break: break-word; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } .facts dt { border-bottom: 0; padding-bottom: 0; } }
.hours { width: 100%; border-collapse: collapse; font-size: var(--step-0); }
.hours th, .hours td { text-align: left; padding: 7px 0; border-bottom: 1px solid var(--rule); font-weight: 400; }
.hours th { width: 9.5em; font-weight: 600; }
.hours tr.today th, .hours tr.today td { font-weight: 800; }
.hours tr.today th::after { content: " (today)"; font-weight: 400; color: var(--muted); }
.mapbox { border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--tile); display: grid; place-items: center; }
.mapbox iframe { width: 100%; height: 100%; border: 0; display: block; }
.mapbox button { margin: 0; }
.why { border-left: 6px solid var(--c, var(--sauce)); padding: 4px 0 4px 18px; margin: 28px 0; }
.why p { font-size: var(--step-1); line-height: 1.5; }
.note { color: var(--muted); font-size: var(--step--1); }
.sources { font-size: var(--step--1); color: var(--muted); }
.sources a { color: var(--muted); }

/* ---------- prose pages ---------- */
.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--step-2); margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

/* ---------- ranked list ---------- */
.picks { list-style: none; padding: 0; margin: 0; counter-reset: pick; }
.picks > li { display: block; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.picks h3 { margin: 0; font-size: var(--step-2); font-variation-settings: "wdth" 78; }
.picks h3 a { text-decoration: none; }
.picks .meta { color: var(--muted); font-size: var(--step--1); margin: 0; }
.picks p { margin: 6px 0 0; }

.empty { padding: 24px; background: var(--tile); border-radius: 8px; }
