/* =========================================================
   Florence Wedding Travel Guide · print.css
   Optimized for Chrome/Edge "Print → Save as PDF".
   A4 + US Letter safe. Keeps links clickable in the PDF.
   Editorial single-flow layout; two columns on paper to
   stay compact without splitting entries.
   ========================================================= */

@page { margin: 14mm 14mm; }

html, body {
  background: #fff !important;
  background-image: none !important;
  font-size: calc(10pt * var(--type-scale));
  line-height: 1.45;
  color: #2b2620;
}

* { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

.guide, .toc { max-width: none; padding: 0; margin: 0; }

/* ---------- Cover (skyline hero) ---------- */
.cover {
  border: none;
  break-after: page;
  min-height: 0;
  height: 232mm;
  padding: 12mm 12mm 12mm;
  background-image:
    linear-gradient(180deg, rgba(243,235,221,.78) 0%, rgba(243,235,221,.32) 26%, rgba(243,235,221,.02) 46%, rgba(35,30,22,.10) 78%, rgba(35,30,22,.32) 100%),
    linear-gradient(rgba(35, 30, 22, .08), rgba(35, 30, 22, .14)),
    url("cover-skyline.jpg") !important;
  background-size: cover !important;
  background-position: center 60% !important;
}
.cover__title { font-size: calc(44pt * var(--type-scale)); }
.cover__couple { font-size: calc(21pt * var(--type-scale)); margin-top: 2mm; }
.cover__issue { margin-top: auto; }
.entry__pin {
  width: 17px; height: 17px; padding: 3px; vertical-align: -3px;
  background: #f9f5ec !important;
  color: #B15C41 !important;
  border: 1px solid #D9C29A;
  box-shadow: none !important;
}
.entry__place--tel .entry__pin { color: #6E7150 !important; }
.rsv { color: #B08D4E; font-weight: 600; }
.tix { color: #B08D4E; font-weight: 600; }
.aside--legend { font-size: calc(8.5pt * var(--type-scale)); }

/* ---------- Contents ---------- */
.toc { margin: 0 0 4mm; padding-top: 2mm; break-after: page; }
.toc__pdf { display: none !important; }
.toc__title { font-size: calc(20pt * var(--type-scale)); margin-bottom: 6mm; }
.toc__list { columns: 1; }
.toc__list li { break-inside: avoid; padding: 1.2mm 0; }
.toc__list li::after { display: none; }
.toc__num {
  font-size: calc(10pt * var(--type-scale));
  color: #B15C41;
  min-width: 5mm;
}
.toc__label { font-size: calc(10.5pt * var(--type-scale)); }

/* ---------- Chapters (each section starts on its own PDF page) ---------- */
.chapter {
  padding: 4mm 0 3mm;
  break-before: page;
  break-inside: auto;
}
#welcome { break-before: auto; } /* Contents already ends with a page break */
.chapter__head {
  break-inside: avoid; break-after: avoid;
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 4mm;
  box-shadow: none !important;
}
.chapter__head-text {
  text-align: center;
  padding: 7mm 8mm 6mm;
  background: #f9f5ec !important;
  border: 1px solid #d8cbb2;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
}
.chapter__head-photo {
  width: 100%;
  height: 42mm;
  background-size: cover !important;
  background-position: center 56% !important;
  background-repeat: no-repeat !important;
  border: 1px solid #d8cbb2;
  border-top: none;
  border-radius: 0 0 6px 6px;
}
#welcome      .chapter__head-photo { background-image: url("sec-welcome.jpg") !important; background-position: center 48% !important; }
#planning     .chapter__head-photo { background-image: url("sec-planning.jpg") !important; background-position: center center !important; }
#neighborhoods .chapter__head-photo { background-image: url("sec-neighborhoods.jpg") !important; }
#sights       .chapter__head-photo { background-image: url("sec-landmarks.jpg") !important; background-position: center 50% !important; }
#coffee       .chapter__head-photo { background-image: url("sec-coffee.jpg") !important; background-position: center 55% !important; }
#gelato       .chapter__head-photo { background-image: url("sec-gelato.jpg") !important; background-position: center 55% !important; }
#restaurants  .chapter__head-photo {
  background-image: url("sec-restaurants.jpg") !important;
  background-position: center center !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-color: #EBE2D2 !important;
  height: 42mm !important;
  aspect-ratio: auto !important;
}
#cocktails    .chapter__head-photo { background-image: url("sec-cocktails.jpg") !important; background-position: center 55% !important; }
#experiences  .chapter__head-photo { background-image: url("sec-experiences.jpg") !important; background-position: center 82% !important; }
#daytrips     .chapter__head-photo { background-image: url("sec-daytrips.jpg") !important; background-position: center 40% !important; }
#safety       .chapter__head-photo { background-image: url("sec-safety.jpg") !important; }
#italian      .chapter__head-photo { background-image: url("sec-italian.jpg") !important; background-position: center 50% !important; }
.chapter__icon { box-shadow: none !important; border: 1px solid #d8cbb2; width: 40px; height: 40px; margin-bottom: .5rem; background: #fff !important; }
.chapter__icon svg { width: 19px; height: 19px; }
.chapter__kicker { font-size: calc(7.5pt * var(--type-scale)); }
.chapter__title { font-size: calc(22pt * var(--type-scale)); }
.chapter__lede { font-size: calc(12.5pt * var(--type-scale)); color: #464832; }
.chapter__bg { display: none !important; }

/* Lead paragraph */
.lead { font-size: calc(11pt * var(--type-scale)); }
.lead::first-letter { font-size: 3.2em; }

/* Welcome magazine spread */
#welcome .prose--spread {
  columns: 2;
  column-gap: 10mm;
  padding: 4mm 0 2mm;
}
#welcome .prose--spread p {
  margin: 0 0 2.5mm;
  font-size: calc(9.5pt * var(--type-scale));
  line-height: 1.48;
  break-inside: avoid;
}
#welcome .prose--spread .lead { font-size: calc(10pt * var(--type-scale)); }
#welcome .welcome__signoff {
  column-span: all;
  margin-top: 3mm;
  padding-top: 2.5mm;
  border-top: 1px solid #e2d6bf;
  font-family: var(--serif);
  font-size: calc(10.5pt * var(--type-scale));
  line-height: 1.45;
  color: #B15C41;
  text-align: right;
  break-inside: avoid;
}

/* Two-column flow for dense lists; entries never split */
.prose:not(.prose--spread) { columns: 2; column-gap: 10mm; }
.group { column-span: all; font-size: calc(10pt * var(--type-scale)); margin: 3.5mm 0 2mm; color: #2b2620; }
.group--page { break-before: page; }
#experiences .prose { columns: 1; } /* cleaner page breaks within this long chapter */
#planning .prose { columns: 1 !important; }
#planning .notes {
  columns: 1 !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  column-gap: 8mm;
  row-gap: 0;
  margin: 0 0 2mm;
}
#planning .notes li {
  padding: 2mm 0 2mm 1.4rem;
  font-size: calc(8.6pt * var(--type-scale));
  line-height: 1.4;
  border-bottom: 1px solid #e2d6bf;
  break-inside: avoid;
}
#planning .callout {
  column-span: all;
  margin: 2mm 0 3mm;
  padding: 2.5mm 3.5mm;
}
#planning .taglist {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5mm 2mm;
}
#planning .taglist li {
  font-size: calc(7.2pt * var(--type-scale));
  padding: .8mm 2.2mm;
}
.entry, .notes li, .phrase { break-inside: avoid; }
.entry { padding: 1.6mm 0; font-size: calc(8.6pt * var(--type-scale)); line-height: 1.4; border-bottom: 1px solid #e2d6bf; }
.entry:hover { background-color: transparent !important; }
.entry__place { font-size: calc(10pt * var(--type-scale)); }
.entry__desc { color: #4a4338; }
.aside { column-span: all; font-size: calc(9.5pt * var(--type-scale)); margin: 2.5mm 0; color: #4a4338; }

/* Notes & phrases also flow in two columns */
.notes, .phrases { columns: 2; column-gap: 10mm; }
.notes li { padding: 1.4mm 0 1.4mm 1.4rem; font-size: calc(8.8pt * var(--type-scale)); border-bottom: 1px solid #e2d6bf; }
.notes li::before { top: .7rem; }
.phrase { padding: 1.4mm 0; font-size: calc(8.8pt * var(--type-scale)); border-bottom: 1px solid #e2d6bf; }
.phrase dt { font-size: calc(10.5pt * var(--type-scale)); }
.phrase dd { font-size: calc(8.5pt * var(--type-scale)); color: #4a4338; }

/* Callout */
.callout { break-inside: avoid; column-span: all; margin: 3mm 0; padding: 3mm 4mm; background: #ebe2d2 !important; }
.callout__title { font-size: calc(8pt * var(--type-scale)); color: #464832; }
.taglist li { font-size: calc(7.5pt * var(--type-scale)); padding: .12rem .5rem; background: #fff !important; }

/* ---------- Category column grid chapters (multi-page with descriptions) ---------- */
.chapter--grid .chapter__head-text { padding: 4mm 6mm 3mm; }
.chapter--grid .chapter__head-photo { height: 20mm !important; }
.chapter--grid .chapter__title { font-size: calc(18pt * var(--type-scale)); }
.chapter--grid .chapter__lede { font-size: calc(9pt * var(--type-scale)); margin-top: 1mm; }
.chapter--grid .prose--dining { columns: 1 !important; }
.chapter--grid .aside--legend {
  font-size: calc(7pt * var(--type-scale));
  margin: 0 0 2mm;
  text-align: left;
}
.chapter--grid .dining-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5mm 4mm;
}
.chapter--grid .dining-grid--two {
  grid-template-columns: repeat(2, 1fr);
}
.chapter--grid .dining-grid--strip {
  grid-template-columns: repeat(3, 1fr);
  gap: 2mm 3.5mm;
  max-width: none;
}
.chapter--grid .dining-col { break-inside: avoid; }
.chapter--grid .dining-col__title {
  font-size: calc(7pt * var(--type-scale));
  letter-spacing: .1em;
  color: #B08D4E;
  margin: 0 0 1mm;
  padding-bottom: .8mm;
  border-bottom: 1px solid #e2d6bf;
}
.chapter--grid .entry--stacked {
  padding: 0.5mm 0;
  border-bottom: none;
  font-size: calc(7.5pt * var(--type-scale));
  line-height: 1.35;
  break-inside: avoid;
}
.chapter--grid .entry--stacked .entry__place { font-size: calc(7.5pt * var(--type-scale)); }
.chapter--grid .entry--stacked .entry__desc {
  display: block;
  margin-top: 0.3mm;
  font-size: calc(6.5pt * var(--type-scale));
  line-height: 1.35;
  color: #4a4338;
}
.chapter--grid .entry__pin {
  width: 11px; height: 11px; padding: 1.5px; vertical-align: -2px;
}

/* Coffee bands — sequential groups in print */
#coffee .dining-bands {
  display: flex;
  flex-direction: column;
  gap: 3mm;
  max-width: none;
}
#coffee .dining-band { break-inside: avoid; }
#coffee .dining-band .entry {
  padding: 0.6mm 0;
  border-bottom: none;
  font-size: calc(7.5pt * var(--type-scale));
  line-height: 1.35;
  break-inside: avoid;
}
#coffee .dining-band .entry .entry__place { font-size: calc(7.5pt * var(--type-scale)); }
#coffee .dining-band .entry .entry__desc {
  font-size: calc(6.5pt * var(--type-scale));
  color: #4a4338;
}

/* Restaurants — slightly denser print rows */
#restaurants .entry--stacked {
  padding: 0.35mm 0;
}

/* ---------- Sights & Museums — vertical stacked list ---------- */
#sights .prose--sights { columns: 1 !important; }
#sights .sights-section { margin-bottom: 5mm; }
#sights .sights-section:last-child { margin-bottom: 0; }
#sights .sights-section .group {
  column-span: all;
  margin: 0 0 2.5mm;
}
#sights .entry--stacked {
  padding: 1.2mm 0;
  border-bottom: 1px solid #e2d6bf;
  break-inside: avoid;
}
#sights .entry--stacked:last-child { border-bottom: none; }
#sights .entry--stacked .entry__place { font-size: calc(9pt * var(--type-scale)); }
#sights .entry--stacked .entry__desc {
  display: block;
  margin-top: 0.4mm;
  font-size: calc(7pt * var(--type-scale));
  line-height: 1.4;
  color: #4a4338;
}

/* ---------- Neighborhoods — stacked entries ---------- */
#neighborhoods .entry--stacked {
  padding: 1.2mm 0;
  border-bottom: 1px solid #e2d6bf;
  break-inside: avoid;
}
#neighborhoods .entry--stacked:last-child { border-bottom: none; }
#neighborhoods .entry--stacked .entry__place { font-size: calc(9pt * var(--type-scale)); }
#neighborhoods .entry--stacked .entry__desc {
  display: block;
  margin-top: 0.4mm;
  font-size: calc(7pt * var(--type-scale));
  line-height: 1.4;
  color: #4a4338;
}

/* ---------- Dividers (hidden in print — page breaks separate chapters) ---------- */
.divider { display: none !important; }
.footer__rule .divider__mark { width: 80px; height: 20px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid #d8cbb2; background: #fff !important; break-before: page; padding: 10mm 0 8mm; margin-top: 0; }
.footer__watermark { opacity: .07; width: 150px; height: 150px; }
.footer__names { font-size: calc(16pt * var(--type-scale)); }
h2, h3 { break-after: avoid; }

/* ---------- City center map (landscape A4; guide closes with footer) ---------- */
@page mapPage { size: A4 landscape; margin: 8mm; }
.mappage {
  page: mapPage;
  break-before: page;
  padding: 0; margin: 0;
  background: #fff !important;
  border: none;
  text-align: center;
}
.mappage__kicker { font-size: calc(8pt * var(--type-scale)); margin: 0 0 1.5mm; }
.mappage__title { font-size: calc(15pt * var(--type-scale)); margin: 0 0 3mm; }
.mappage__img {
  width: auto; max-width: 100%;
  max-height: 176mm;
  margin: 0 auto;
  border: none !important; border-radius: 0;
  box-shadow: none !important;
}
