/* ==========================================================================
   Curb Your Dog NYC — design system
   Paper-forward and document-like: warm stock, serif headlines at moderate
   size, hairline rules, one deep red accent. The page doesn't perform
   seriousness; it's set seriously and lets the content be funny.
   No city marks, no agency identity.
   ========================================================================== */

:root {
  /* Palette */
  --paper:      #fbf8f3;   /* body stock */
  --panel:      #ffffff;   /* raised panel */
  --tint:       #f4efe6;   /* recessed band */
  --ink:        #1c1a17;
  --ink-soft:   #43403a;
  --muted:      #7b746a;
  --rule:       #ddd5c8;
  --accent:     #9c2b1b;   /* deep red */
  --accent-lift:#b8422f;   /* on dark */

  /* Type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Space */
  --wrap: 64rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(3rem, 6.5vw, 5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.09rem);
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(100% - (var(--gutter) * 2), var(--wrap)); margin-inline: auto; }
.measure { max-width: 40rem; }
.measure-wide { max-width: 46rem; }

img, svg { max-width: 100%; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 0.75rem 1rem; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* --- Headlines ----------------------------------------------------------- */

h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
}

h1 { font-size: clamp(2.3rem, 1.35rem + 4vw, 3.9rem); }
h2 { font-size: clamp(1.65rem, 1.1rem + 2.2vw, 2.35rem); margin-bottom: 1.05rem; }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.lede { font-size: clamp(1.08rem, 1rem + 0.4vw, 1.2rem); line-height: 1.6; color: var(--ink-soft); }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.85rem;
}

em, i { font-style: italic; }

/* --- The curb line -------------------------------------------------------
   One recurring motif: a dashed rule, the way a curb edge gets marked.      */

.curb-dash {
  border: 0; height: 0;
  border-top: 2px dashed var(--rule);
  margin: var(--section-y) 0;
}

/* --- Masthead ------------------------------------------------------------ */

.masthead { border-bottom: 1px solid var(--rule); background: var(--paper); }

.masthead-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 1.15rem 0; flex-wrap: wrap;
}

.wordmark { display: flex; align-items: stretch; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.wordmark-rule { width: 0.28rem; background: var(--accent); flex: none; }
.wordmark-text { display: flex; flex-direction: column; justify-content: center; }
.wordmark-line-1 { font-family: var(--display); font-weight: 700; font-size: 1.45rem; line-height: 1.05; }
.wordmark-line-2 {
  font-size: 0.64rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted); margin-top: 0.22rem;
}

.nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.35rem; margin: 0; padding: 0; }

.nav-link {
  display: inline-block; font-size: 0.85rem; font-weight: 500;
  text-decoration: none; color: var(--ink-soft);
  padding: 0.3rem 0; border-bottom: 1.5px solid transparent;
}
.nav-link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.nav-link.is-current { color: var(--ink); border-bottom-color: var(--ink); }
.nav-link.is-pending { color: #b0a99e; cursor: default; }

.nav-toggle {
  display: none; align-items: center; gap: 0.55rem;
  background: transparent; color: var(--ink); border: 1px solid var(--rule);
  padding: 0.5rem 0.8rem; font: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer;
}
.nav-toggle-bars { display: grid; gap: 3px; }
.nav-toggle-bars span { display: block; width: 16px; height: 1.5px; background: currentColor; }

@media (max-width: 58rem) {
  .nav-toggle { display: inline-flex; }
  .nav { flex-basis: 100%; display: none; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; border-top: 1px solid var(--rule); }
  .nav li { border-bottom: 1px solid var(--rule); }
  .nav-link { display: block; padding: 0.7rem 0; border-bottom: 0; }
}

/* --- Sections ------------------------------------------------------------ */

.section { padding-block: var(--section-y); }
.section-tight { padding-block: calc(var(--section-y) * 0.6); }
.section-alt { background: var(--tint); border-block: 1px solid var(--rule); }
.section-tile { background: var(--panel); border-block: 1px solid var(--rule); }

/* --- Hero ---------------------------------------------------------------- */

.hero { padding-block: clamp(3rem, 7vw, 5.25rem); border-bottom: 1px solid var(--rule); }
.hero h1 { max-width: 18ch; }
.hero .lede { margin-top: 1.5rem; max-width: 40rem; }

/* --- Page head ----------------------------------------------------------- */

.page-head { padding-block: clamp(2.5rem, 5.5vw, 3.75rem); border-bottom: 1px solid var(--rule); }
.page-head .lede { margin-top: 1.15rem; max-width: 42rem; }

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  border: 1px solid var(--accent); color: var(--accent); background: transparent;
  padding: 0.7rem 1.2rem; font-size: 0.86rem; font-weight: 600; text-decoration: none;
}
.btn:hover { background: var(--accent); color: var(--panel); }
.btn svg { width: 1rem; height: 1rem; }
.btn-ghost { border-color: var(--rule); color: var(--ink-soft); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }

/* --- The two steps, in order --------------------------------------------- */

.steps { display: grid; gap: 1.5rem 2.5rem; margin-top: 2.25rem; }
@media (min-width: 46rem) { .steps { grid-template-columns: 1fr 1fr; } }

.step { border-top: 2px solid var(--ink); padding-top: 1.1rem; display: flex; flex-direction: column; }
.step.is-skipped { border-top-color: var(--accent); }
.step-order { display: flex; align-items: baseline; gap: 0.65rem; margin: 0 0 0.7rem; }
.step-order b { font-family: var(--display); font-size: 2.1rem; font-weight: 700; line-height: 0.9; color: var(--accent); }
.step-order span { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.step h3 { margin-bottom: 0.55rem; }
.step p { font-size: 0.97rem; }
.step-note { font-size: 0.87rem; color: var(--muted); margin-top: auto; padding-top: 0.9rem; }
.step.is-skipped .step-note { color: var(--accent); }

/* --- Numbered points ----------------------------------------------------- */

.points { list-style: none; margin: 2.25rem 0 0; padding: 0; display: grid; gap: 1.75rem; }
@media (min-width: 52rem) { .points { grid-template-columns: repeat(3, 1fr); gap: 2.25rem; } }

.point { border-top: 1px solid var(--rule); padding-top: 1rem; }
.point-num {
  font-family: var(--display); font-size: 1.6rem; font-weight: 700;
  line-height: 1; color: var(--accent); display: block; margin-bottom: 0.4rem;
}
.point h3 { font-size: 1.12rem; margin-bottom: 0.45rem; }
.point p { font-size: 0.95rem; color: var(--ink-soft); }

/* --- Statute quotation --------------------------------------------------- */

.statute { border-left: 2px solid var(--accent); padding: 0.25rem 0 0.25rem 1.4rem; margin: 1.75rem 0; }
.statute-cite {
  display: block; margin-bottom: 0.6rem;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--muted);
}
.statute blockquote { margin: 0; font-family: var(--display); font-size: 1.1rem; line-height: 1.5; }
.statute q { font-family: var(--display); }

/* --- Inline citations ---------------------------------------------------- */

.cite { font-size: 0.68em; line-height: 0; margin-left: 0.12em; font-weight: 600; }
.cite a { text-decoration: none; color: var(--accent); }
.cite a:hover { text-decoration: underline; }

/* --- Courtesy note -------------------------------------------------------
   Advice, not a rule. Styled apart from .statute so it never reads as one.  */

.tip { border: 1px dashed var(--muted); padding: clamp(1.3rem, 3.5vw, 2rem); margin-top: 2rem; }
.tip-label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.6rem;
}
.tip h3 { margin-bottom: 0.6rem; }
.tip p { font-size: 0.97rem; }

/* --- Sources list -------------------------------------------------------- */

.source-list { list-style: none; margin: 0; padding: 0; }
.source-item {
  display: grid; grid-template-columns: 2.25rem 1fr; gap: 0.4rem 1rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--rule);
}
.source-item:first-child { border-top: 2px solid var(--ink); }
.source-num { font-family: var(--display); font-size: 1.35rem; font-weight: 700; line-height: 1.2; color: var(--accent); }
.source-title { font-family: var(--display); font-size: 1.1rem; font-weight: 600; margin: 0 0 0.3rem; line-height: 1.3; }
.source-pub {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 0.5rem;
}
.source-note { font-size: 0.94rem; color: var(--ink-soft); margin: 0 0 0.5rem; }
.source-link { font-size: 0.85rem; word-break: break-word; }
.source-item:target { background: var(--panel); box-shadow: 0 0 0 0.75rem var(--panel); }

/* --- Footer -------------------------------------------------------------- */

.footer { background: #211f1b; color: #b3aca1; margin-top: var(--section-y); }
.footer-inner { padding-block: clamp(2.25rem, 5vw, 3.25rem); max-width: 44rem; }
.footer-mark { font-family: var(--display); font-size: 1.35rem; font-weight: 700; color: var(--paper); margin-bottom: 0.8rem; }
.footer-body { font-size: 0.95rem; }
.hashtag { color: var(--accent-lift); font-weight: 600; }
.footer a { color: #d8cfc2; }
.footer a:hover { color: var(--paper); }
.disclaimer {
  font-size: 0.79rem; line-height: 1.55; color: #8a8378;
  border-top: 1px solid #34312c; padding-top: 1.1rem; margin-top: 1.6rem;
}

/* --- Motion -------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --- Sidewalk diagram ----------------------------------------------------
   Inline SVG so it inherits the palette and stays crisp at any size.       */

.diagram { margin: 2.25rem 0 0; padding: 0; }
.diagram-svg { display: block; width: 100%; height: auto; }
.diagram figcaption {
  font-size: 0.88rem; color: var(--muted); margin-top: 0.9rem;
  max-width: 38rem; line-height: 1.55;
}

.dg-solid { fill: var(--tint); stroke: var(--ink); stroke-width: 2; }
.dg-hatch { fill: none; stroke: var(--rule); stroke-width: 1; }
.dg-void  { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.dg-slab  { fill: var(--panel); stroke: var(--ink); stroke-width: 2; }
.dg-pit   { fill: var(--tint); stroke: var(--ink); stroke-width: 2; }
.dg-trunk { fill: var(--ink-soft); }
.dg-canopy{ fill: none; stroke: var(--ink-soft); stroke-width: 2; }
.dg-curb  { fill: var(--accent); stroke: var(--accent); stroke-width: 2; }
.dg-road  { fill: var(--ink-soft); }

.dg-zone path { fill: none; stroke-width: 2; }
.dg-zone text {
  font-family: var(--body); font-size: 20px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; text-anchor: middle;
}
.dg-zone-no path { stroke: var(--muted); stroke-dasharray: 6 5; }
.dg-zone-no text { fill: var(--muted); }
.dg-zone-yes path { stroke: var(--accent); }
.dg-zone-yes text { fill: var(--accent); }

.dg-leader path { stroke: var(--rule); stroke-width: 1.5; fill: none; }
.dg-label text {
  font-family: var(--body); font-size: 16px; fill: var(--ink-soft); text-anchor: middle;
}

@media (max-width: 40rem) {
  .dg-zone text { font-size: 26px; }
  .dg-label text { font-size: 21px; }
}

/* --- News list ------------------------------------------------------------ */

.news-list { list-style: none; margin: 0; padding: 0; }
.news-item { padding: 1.4rem 0; border-bottom: 1px solid var(--rule); }
.news-item:first-child { border-top: 2px solid var(--ink); }
.news-meta { display: flex; gap: 0.7rem; align-items: baseline; margin: 0 0 0.4rem; flex-wrap: wrap; }
.news-outlet {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
.news-date { font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.news-title { font-family: var(--display); font-size: 1.12rem; font-weight: 600; line-height: 1.32; margin: 0 0 0.4rem; }
.news-title a { color: var(--ink); text-decoration: none; }
.news-title a:hover { color: var(--accent); text-decoration: underline; }
.news-title a::after { content: " ↗"; font-size: 0.8em; color: var(--muted); }
.news-note { font-size: 0.93rem; color: var(--ink-soft); margin: 0; }
.news-standfirst {
  font-family: var(--display); font-size: 0.97rem; font-style: italic;
  color: var(--ink-soft); margin: 0 0 0.4rem; line-height: 1.45;
}

/* --- Hero panel ----------------------------------------------------------
   Our own panel — site palette, site typefaces, our words. Explicitly NOT a
   reproduction of the historical Sanitation signs: those are a named
   designer's work for a city agency and must not be imitated.              */

.hero-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 56rem) { .hero-grid { grid-template-columns: 1.35fr 1fr; } }

.plate { margin: 0; }
.plate-inner {
  border: 3px solid var(--accent);
  background: var(--panel);
  padding: clamp(1.6rem, 4vw, 2.4rem) clamp(1.4rem, 3.5vw, 2rem);
  text-align: center;
}
.plate p { margin: 0; }
.plate-kicker {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1rem;
}
.plate-first, .plate-second {
  font-family: var(--display); font-weight: 700; line-height: 1.02;
  letter-spacing: -0.02em; color: var(--ink);
}
.plate-first { font-size: clamp(2rem, 1.2rem + 2.6vw, 2.7rem); }
.plate-second { font-size: clamp(1.7rem, 1.1rem + 2vw, 2.2rem); color: var(--accent); }
.plate-then {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--muted); margin: 1.15rem 0 0.95rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.plate-then::before, .plate-then::after {
  content: ""; flex: 1; border-top: 2px dashed var(--rule);
}
.plate-foot {
  margin-top: 1.2rem; padding-top: 0.9rem; border-top: 1px solid var(--rule);
  font-size: 0.78rem; color: var(--muted); letter-spacing: 0.04em;
}
.news-byline { font-size: 0.78rem; color: var(--muted); margin: 0 0 0.45rem; }

/* --- Timeline ------------------------------------------------------------ */

.timeline { list-style: none; margin: 2rem 0 0; padding: 0 0 0 1.5rem; border-left: 2px solid var(--rule); }
.timeline li { position: relative; padding: 0 0 1.6rem 0; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1.5rem - 6px); top: 0.5rem;
  width: 10px; height: 10px; background: var(--paper);
  border: 2px solid var(--muted); border-radius: 50%;
}
.timeline .tl-now::before { background: var(--accent); border-color: var(--accent); }
.tl-year {
  display: block; font-family: var(--display); font-weight: 700;
  font-size: 1.05rem; color: var(--accent); margin-bottom: 0.25rem;
  font-variant-numeric: lining-nums;
}
.timeline p { font-size: 0.96rem; color: var(--ink-soft); margin: 0; }
.timeline .tl-now .tl-year { color: var(--ink); }
.timeline .tl-now p { color: var(--ink); }

/* --- Span bar ------------------------------------------------------------
   The 1930s-to-today split, drawn once at the top of the history page.     */

.spanbar { margin: 0; padding: 0; }
.spanbar-svg { display: block; width: 100%; height: auto; }
.spanbar figcaption {
  font-size: 0.88rem; color: var(--muted); margin-top: 0.9rem;
  max-width: 40rem; line-height: 1.55;
}

.sb-on  { fill: var(--accent); }
.sb-off { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 7 6; }
.sb-split { stroke: var(--ink); stroke-width: 2; fill: none; }

.sb-head {
  font-family: var(--display); font-weight: 700; font-size: 21px; text-anchor: middle;
}
.sb-head-on { fill: var(--ink); }
.sb-head-off { fill: var(--muted); }
.sb-sub {
  font-family: var(--body); font-size: 14px; text-anchor: middle; fill: var(--muted);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.sb-year text {
  font-family: var(--display); font-weight: 700; font-size: 19px; fill: var(--ink);
}
.sb-note {
  font-family: var(--body); font-size: 14px; text-anchor: middle; fill: var(--muted);
}

@media (max-width: 44rem) {
  .sb-head { font-size: 27px; }
  .sb-sub, .sb-note { font-size: 18px; }
  .sb-year text { font-size: 24px; }
}

/* --- Doorway diagram (plan view) ----------------------------------------- */

.dw-building { fill: var(--tint); stroke: var(--ink); stroke-width: 2; }
.dw-jamb { stroke: var(--ink); stroke-width: 2; fill: none; }
.dw-path { fill: var(--panel); stroke: var(--rule); stroke-width: 1.5;
  stroke-dasharray: 5 5; }
.dw-zone { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 8 6; }
.dw-zone-label {
  font-family: var(--body); font-size: 19px; font-weight: 600; fill: var(--accent);
  text-anchor: middle; letter-spacing: 0.12em; text-transform: uppercase;
}
.dw-curb { fill: var(--accent); }
.dw-road { fill: var(--ink-soft); }

.dw-span path { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.dw-span text { font-family: var(--body); font-size: 16px; fill: var(--ink-soft); }
.dw-span .dw-span-sub { fill: var(--muted); font-size: 14px; }

.dw-label text {
  font-family: var(--body); font-size: 16px; fill: var(--ink-soft); text-anchor: middle;
}
.dw-label .dw-label-door { font-weight: 600; fill: var(--ink); }
.dw-label .dw-label-curb { fill: var(--panel); text-anchor: start; font-weight: 600; }

@media (max-width: 44rem) {
  .dw-zone-label { font-size: 24px; }
  .dw-label text, .dw-span text { font-size: 21px; }
  .dw-span .dw-span-sub { font-size: 19px; }
}

/* --- Filth cards ---------------------------------------------------------- */

.filth-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
@media (min-width: 46rem) { .filth-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }

.filth-card { border-top: 2px solid var(--ink); padding-top: 1.1rem; }
.filth-icon { width: 1.6rem; height: 1.6rem; color: var(--accent); display: block; margin-bottom: 0.7rem; }
.filth-card h2 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.filth-card p { font-size: 0.96rem; }
.filth-note { color: var(--muted); font-size: 0.9rem; border-top: 1px dashed var(--rule); padding-top: 0.7rem; }

/* --- FAQ accordion -------------------------------------------------------
   Native <details>. Works with JS off and is keyboard-accessible for free. */

.faq { border-top: 2px solid var(--ink); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary {
  cursor: pointer; list-style: none;
  padding: 1.15rem 2.5rem 1.15rem 0; position: relative;
  font-family: var(--display); font-size: 1.1rem; font-weight: 600;
  line-height: 1.35; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-item summary::after {
  content: ""; position: absolute; right: 0.5rem; top: 1.55rem;
  width: 10px; height: 10px; border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent); transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg); top: 1.8rem; }
.faq-body { padding: 0 2.5rem 1.4rem 0; }
.faq-body p { font-size: 0.97rem; color: var(--ink-soft); }
