/* ============================================= */
/* FRANCIS' FACTBOOK — tourist-board leaflet      */
/* Blue + orange spot print on a folded sheet:    */
/* panels, fold lines, key facts, maps, coupons.  */
/* Scoped to #content.fb-page; the wiki is untouched. */
/* ============================================= */

/* ---- Scoped identity: fonts + palette ---- */

#content.fb-page {
  --font-heading: 'Overpass', 'Archivo', system-ui, sans-serif;
  --font-body: 'Overpass', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-meta: 'Overpass Mono', ui-monospace, monospace;

  --fb-table: #e7e3d8;
  --fb-paper: #f3f1ea;
  --fb-paper-2: #e9e5da;
  --fb-ink: #173a57;
  --fb-blue: #1c5fa8;
  --fb-orange: #e2621b;
  --fb-muted: #5a6672;
  --fb-rule: #b7bec2;
  --fb-highlight: #f6c945;

  font-family: var(--font-body);
  color: var(--fb-ink);
  background-color: var(--fb-table);
  background-image: none;
  border-color: var(--fb-rule);
  padding: clamp(0.9rem, 3vw, 2rem);
}

[data-theme="dark"] #content.fb-page {
  --fb-table: #0b141c;
  --fb-paper: #121f2b;
  --fb-paper-2: #182a38;
  --fb-ink: #e6e1d4;
  --fb-blue: #6fa8dc;
  --fb-orange: #ef8a4d;
  --fb-muted: #93a4b6;
  --fb-rule: #2b3d4b;
  --fb-highlight: #f6c945;
}

/* ---- The sheet ---- */

.fb-sheet {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  background: var(--fb-paper);
  border: 1px solid var(--fb-rule);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.14);
  padding: clamp(1.1rem, 3vw, 2.2rem);
}

/* ---- Sheet / leaflet header band ---- */

.fb-sheet-header {
  position: relative;
  border-top: 6px solid var(--fb-blue);
  border-bottom: 3px solid var(--fb-orange);
  padding: 1rem 0 0.7rem;
  margin-bottom: 1.4rem;
}

.fb-kicker {
  font-family: var(--font-meta);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fb-orange);
  margin-bottom: 0.35rem;
}

.fb-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: var(--fb-blue);
  margin-bottom: 0.4rem;
}

.fb-subtitle {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.08rem;
  color: var(--fb-muted);
  margin-bottom: 0.55rem;
}

.fb-byline {
  font-family: var(--font-meta);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fb-muted);
  border-top: 1px solid var(--fb-rule);
  padding-top: 0.4rem;
}

.fb-byline::before {
  content: "Words & pictures: ";
}

.fb-roundel {
  position: absolute;
  top: 0.7rem;
  right: 0;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--fb-orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transform: rotate(-8deg);
}

/* ---- Body: folded panels ---- */

.fb-body {
  font-size: 0.98rem;
  line-height: 1.6;
}

.fb-body > * {
  break-inside: avoid;
}

.fb-body > p {
  break-inside: auto;
  margin-bottom: 0.95rem;
}

.fb-body h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--fb-blue);
  border-bottom: 2px solid var(--fb-orange);
  padding-bottom: 0.15rem;
  margin: 1.4rem 0 0.6rem;
}

.fb-body a {
  color: var(--fb-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (min-width: 760px) {
  .fb-body {
    column-count: 2;
    column-gap: 2rem;
    column-rule: 1px dashed var(--fb-rule);
  }

  .fb-body h2,
  .fb-fact,
  .fb-note,
  .fb-pull,
  .fb-chart,
  .fb-cutout,
  .fb-check,
  .fb-body table {
    column-span: all;
  }
}

/* ---- Key facts / notes / pull quote ---- */

.fb-fact {
  background: #fff;
  border: 1px solid var(--fb-blue);
  border-left: 8px solid var(--fb-blue);
  margin: 0.2rem 0 1.1rem;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

[data-theme="dark"] .fb-fact {
  background: var(--fb-paper-2);
}

.fb-fact-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--fb-blue);
  padding: 0.3rem 0.7rem;
}

.fb-fact ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0.7rem;
}

.fb-fact li {
  padding: 0.26rem 0;
  border-bottom: 1px dotted var(--fb-rule);
  margin: 0;
}

.fb-fact li:last-child {
  border-bottom: none;
}

.fb-fact strong {
  display: block;
  font-family: var(--font-meta);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fb-orange);
}

.fb-note {
  border: 1px dashed var(--fb-orange);
  background: var(--fb-paper-2);
  padding: 0.65rem 0.85rem;
  margin: 1.1rem 0;
  font-size: 0.92rem;
}

.fb-note-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fb-orange);
  margin-bottom: 0.25rem;
}

.fb-pull {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.2;
  text-align: center;
  color: var(--fb-blue);
  border-top: 3px solid var(--fb-blue);
  border-bottom: 3px solid var(--fb-blue);
  padding: 0.8rem 0.5rem;
  margin: 1.3rem 0;
}

/* ---- Checklist / fares ---- */

.fb-check {
  list-style: none;
  margin: 1rem 0;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--fb-rule);
  background: #fff;
}

[data-theme="dark"] .fb-check {
  background: var(--fb-paper-2);
}

.fb-check li {
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 0.2rem 0 0.2rem 1.6rem;
  position: relative;
  margin: 0;
  list-style: none;
}

.fb-check li::before {
  content: "\2610";
  position: absolute;
  left: 0;
  color: var(--fb-orange);
  font-size: 1.05rem;
  line-height: 1.2;
}

.fb-body table,
.fb-fares {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin: 1rem 0;
  background: #fff;
}

[data-theme="dark"] .fb-body table,
[data-theme="dark"] .fb-fares {
  background: var(--fb-paper-2);
}

.fb-body th,
.fb-fares th {
  font-family: var(--font-meta);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
  background: var(--fb-blue);
  color: #fff;
  padding: 0.35rem 0.5rem;
}

.fb-body td,
.fb-fares td {
  padding: 0.32rem 0.5rem;
  border-bottom: 1px solid var(--fb-rule);
}

/* ---- Chart ---- */

.fb-chart {
  border: 1px solid var(--fb-blue);
  background: #fff;
  padding: 0 0 0.66rem;
  margin: 1.3rem 0;
}

[data-theme="dark"] .fb-chart {
  background: var(--fb-paper-2);
}

.fb-chart-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #fff;
  background: var(--fb-blue);
  padding: 0.3rem 0.7rem;
  margin-bottom: 0.55rem;
}

.fb-bar {
  display: block;
  font-family: var(--font-meta);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  margin: 0 0.7rem 0.32rem;
  color: #fff;
  background: var(--fb-orange);
  width: var(--v, 50%);
  min-width: 2.2rem;
  white-space: nowrap;
}

.fb-bar:nth-of-type(2) {
  background: var(--fb-blue);
}

.fb-bar:nth-of-type(3) {
  background: #4d7c9e;
}

.fb-bar:nth-of-type(4) {
  background: var(--fb-muted);
}

/* ---- Images (cheap-print treatment) ---- */

.fb-hero {
  margin: 1.3rem 0;
}

.fb-hero img {
  width: 100%;
  height: auto;
  display: block;
  border: 2px solid var(--fb-blue);
  filter: contrast(1.06) saturate(0.92);
}

.fb-hero figcaption,
.fb-cutout figcaption {
  font-family: var(--font-meta);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--fb-muted);
  padding-top: 0.35rem;
}

.fb-cutout {
  display: block;
  margin: 1.3rem 0;
  padding: 0.4rem;
  border: 2px solid var(--fb-orange);
  background: #fff;
}

[data-theme="dark"] .fb-cutout {
  background: var(--fb-paper-2);
}

.fb-cutout img {
  display: block;
  width: 100%;
  height: auto;
  filter: contrast(1.06) saturate(0.92);
}

/* ---- Stamp / tags / colophon ---- */

.fb-stamp {
  display: inline-block;
  font-family: var(--font-meta);
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fb-orange);
  border: 2px solid var(--fb-orange);
  padding: 0.18rem 0.5rem;
  transform: rotate(-3deg);
  margin: 0.5rem 0;
}

.fb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 1.4rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--fb-rule);
}

.fb-tag {
  font-family: var(--font-meta);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--fb-blue);
  color: var(--fb-blue);
  padding: 0.14rem 0.5rem;
}

.fb-colophon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1.4rem;
  padding-top: 0.6rem;
  border-top: 3px solid var(--fb-blue);
  font-family: var(--font-meta);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fb-muted);
}

/* ============================================= */
/* HUB — the leaflet rack                        */
/* ============================================= */

.fb-hub {
  max-width: 1080px;
  margin: 0 auto;
}

.fb-masthead {
  position: relative;
  background: var(--fb-blue);
  color: #fff;
  padding: 1.2rem 1.3rem 1.1rem;
  margin-bottom: 2rem;
}

.fb-masthead::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 8px;
  background: var(--fb-orange);
}

.fb-masthead-kicker {
  font-family: var(--font-meta);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--fb-highlight);
  margin-bottom: 0.35rem;
}

.fb-masthead-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 0.95;
  color: #fff;
}

.fb-masthead-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.35rem;
}

.fb-masthead-author {
  font-family: var(--font-meta);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 0.7rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.fb-hub-intro {
  max-width: 74ch;
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.fb-hub-intro a {
  color: var(--fb-blue);
}

.fb-hub-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fb-ink);
  border-top: 3px solid var(--fb-orange);
  border-bottom: 1px solid var(--fb-rule);
  padding: 0.35rem 0 0.2rem;
  margin: 1.4rem 0 1.1rem;
}

.fb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
}

/* Each card is a leaflet standing in the rack */
.fb-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--fb-paper);
  border: 1px solid var(--fb-rule);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.14);
  color: var(--fb-ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fb-card:nth-child(odd) {
  transform: rotate(-0.8deg);
}

.fb-card:nth-child(even) {
  transform: rotate(0.7deg);
}

.fb-card:hover {
  text-decoration: none;
  transform: rotate(0deg) translateY(-3px);
  box-shadow: 0 9px 0 rgba(0, 0, 0, 0.16);
}

.fb-card-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid var(--fb-rule);
  background: var(--fb-paper-2);
}

.fb-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.06) saturate(0.92);
}

.fb-card-body {
  padding: 0.7rem 0.8rem 1.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.fb-card-kicker {
  font-family: var(--font-meta);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fb-orange);
}

.fb-card-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.12;
  color: var(--fb-blue);
}

.fb-card-meta {
  font-family: var(--font-meta);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fb-muted);
}

.fb-card::after {
  content: "TAKE ONE";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  font-family: var(--font-meta);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: #fff;
  background: var(--fb-orange);
  padding: 0.22rem 0;
}

/* ---- Responsive ---- */

@media (max-width: 759px) {
  .fb-roundel {
    position: static;
    width: 64px;
    height: 64px;
    margin-bottom: 0.6rem;
    font-size: 0.82rem;
  }

  .fb-body {
    column-count: 1;
  }
}
