*, *::before, *::after { box-sizing: border-box; }

.flyer-body {
  background: #f0f0ec;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
}

/* ── Screen-only chrome ── */
.flyer-print-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #1a1a1a;
  color: #fff;
}

.flyer-back-link {
  color: #ccc;
  text-decoration: none;
  font-size: 0.85rem;
}
.flyer-back-link:hover { color: #fff; }

.flyer-print-btn {
  padding: 8px 18px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.flyer-print-btn:hover { background: #1d4ed8; }

.flyer-download-btn {
  padding: 8px 18px;
  background: #16a34a;
  color: #fff;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}
.flyer-download-btn:hover { background: #15803d; }

/* ── Two-up wrapper (admin screen preview) ── */
.flyer-twoUp {
  max-width: 680px;
  margin: 32px auto 48px;
}

.flyer-twoUp .flyer-page {
  margin: 0 0 32px;
}

/* ── Page ── */
.flyer-page {
  max-width: 680px;
  margin: 32px auto 48px;
  background: #fff;
  padding: 48px 52px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

/* ── Top section: headline + QR side by side ── */
.flyer-top {
  display: flex;
  gap: 28px;
  align-items: center;
  margin-bottom: 24px;
}

.flyer-top-text {
  flex: 1;
  min-width: 0;
}

/* Hero stat — leads the flyer */
.flyer-hero {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.flyer-hero-number {
  font-size: 3.4rem;
  font-weight: 900;
  color: #1a1a1a;
  line-height: 1;
  letter-spacing: -0.03em;
}

.flyer-hero-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: #555;
  line-height: 1.35;
  padding-top: 8px;
}

.flyer-hero-question {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.25;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.flyer-hero-question--large {
  font-size: 2rem;
}

.flyer-hero-sub {
  font-size: 0.92rem;
  color: #444;
  line-height: 1.5;
  margin-bottom: 4px;
}

.flyer-fines {
  font-size: 0.88rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 16px;
}

.flyer-address {
  font-size: 1rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 2px;
}

.flyer-address--sub {
  font-size: 0.82rem;
  font-weight: 400;
  color: #888;
}

.flyer-address--spaced {
  margin-top: 10px;
}

.flyer-building-name--spaced {
  margin-top: 10px;
}

.flyer-building-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 2px;
}

.flyer-building-name--prominent {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 4px;
}

/* QR column */
.flyer-top-qr {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.flyer-top-qr svg {
  width: 148px;
  height: 148px;
  display: block;
}

.flyer-qr-cta {
  font-size: 0.75rem;
  font-weight: 700;
  color: #333;
  text-align: center;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.flyer-qr-url {
  font-size: 0.68rem;
  color: #888;
  text-align: center;
  letter-spacing: 0.04em;
}

/* ── Divider ── */
.flyer-divider {
  border: none;
  border-top: 1.5px solid #e0e0dc;
  margin: 20px 0;
}

/* ── Bullet list ── */
.flyer-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
}

.flyer-bullets li {
  position: relative;
  padding: 5px 0 5px 22px;
  font-size: 0.97rem;
  color: #222;
  line-height: 1.4;
}

.flyer-bullets li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #2563eb;
  font-weight: 700;
}

/* ── Tagline ── */
.flyer-tagline {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 20px;
}

/* ── Footer ── */
.flyer-footer {
  font-size: 0.68rem;
  color: #bbb;
  margin-top: 20px;
  line-height: 1.6;
  border-top: 1px solid #f0f0ec;
  padding-top: 12px;
}

.flyer-legal {
  display: block;
  font-size: 0.63rem;
  color: #ccc;
  margin-top: 3px;
}

/* ── Packet: cover page ── */
.packet-body {
  background: #f0f0ec;
}

.packet-cover {
  max-width: 680px;
  margin: 32px auto 0;
  background: #fff;
  padding: 40px 48px 32px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

.packet-cover-header {
  margin-bottom: 24px;
}

.packet-cover-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.2;
  margin-bottom: 6px;
}

.packet-cover-meta {
  font-size: 0.82rem;
  color: #888;
  letter-spacing: 0.02em;
}

#packet-map {
  width: 100%;
  height: 340px;
  border-radius: 6px;
  margin-bottom: 28px;
  border: 1px solid #e0e0dc;
}

/* ── Packet: building list on cover ── */
.packet-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.packet-list-row td {
  padding: 7px 10px 7px 0;
  border-bottom: 1px solid #f0f0ec;
  vertical-align: top;
}

.packet-stop-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: #1a1a1a;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.packet-list-address {
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
}

.packet-list-name {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: #888;
  font-style: italic;
}

.packet-list-stats {
  color: #888;
  font-size: 0.78rem;
  white-space: nowrap;
  text-align: right;
  padding-right: 0;
}

/* ── Packet: per-building flyer pages ── */
.packet-flyer-page {
  max-width: 680px;
  margin: 0 auto;
  page-break-before: always;
  break-before: page;
}

.packet-flyer-page .flyer-page {
  margin: 0;
  border-left: none;
  border-right: none;
  box-shadow: none;
  max-width: 100%;
}

/* ── Walk map pin (Leaflet divIcon) ── */
.walk-map-pin {
  width: 28px;
  height: 28px;
  background: #1a1a1a;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ── Print ── */
@media print {
  @page {
    size: letter portrait;
    margin: 0.4in 0.5in;
  }

  .flyer-print-bar { display: none; }
  .flyer-body { background: #fff; }

  /* Force black and white */
  * { color: #000 !important; background: #fff !important; box-shadow: none !important; }
  .flyer-hero-number { color: #000 !important; }
  .flyer-bullets li::before { color: #000 !important; }
  .flyer-divider { border-top-color: #ccc !important; }
  .flyer-footer, .flyer-legal { color: #555 !important; }
  .flyer-tagline { color: #000 !important; }
  .flyer-page {
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    max-width: 100%;
  }

  .flyer-twoUp .flyer-page {
    padding: 0;
    border: none;
    box-shadow: none;
    max-width: 100%;
    page-break-inside: avoid;
    margin: 0;
  }

  .flyer-twoUp .flyer-page:first-child {
    margin-bottom: 0.4in;
  }

  .packet-cover {
    margin: 0;
    padding: 0.4in 0;
    border: none;
    box-shadow: none;
    max-width: 100%;
  }

  .packet-flyer-page .flyer-page {
    padding: 0.4in 0;
  }

  .packet-flyer-twoUp .flyer-page {
    padding: 0;
    margin: 0;
  }

  .packet-flyer-twoUp .flyer-page:first-child {
    padding-bottom: 0.4in;
    margin-bottom: 0.4in;
  }
}
