/* TicketsFest UI polish | 10.2.73
   One small layer that loads after every other theme stylesheet. Breakpoints: phones up to 767px, tablets from 768px
   (an iPad held upright is exactly 768px wide). Until 10.2.68 half of the theme counted 768px as a phone and half as a
   tablet, so that one width showed a mix of both; every theme file now uses 767px / 768px. It only touches:
   - the fixed header under the WordPress admin bar, and the city button on phones
   - home section headings: one alignment, one colour, one icon tile
   - the home tours grid: cards fill their column and share one height
   - the home city block: same width as the other sections, two columns on phones
   - keyboard focus rings
   - related events on event pages, the subscribe box, short rows centred, heads kept in photos
   - artists page and tours page grids (four, three, two columns), artist card buttons, footer button, share button
   - tablet widths (768-1024px): banners full width, events filters, chip rows, home artist strip, subscribe pill
   - the event details list on phones (rows instead of square tiles)
   - phones (up to 767px), section 24: headings, titles and card names centred on every page; short intro texts, chip rows
     and the subscribe box centred; reading text, contact rows, schedule rows and lists stay left
   - the single event page (section 25): one frame for the hero, the section links, the columns and the blocks under
     them from 901px up (single-event.php renders those blocks in .tfe-event-story--wide), tablets 768-900px share one gutter
   - the event landing pages, country, venue and category (section 26): phone side padding of the events module
   - the artist page (section 27): one frame for the hero, the blocks and the event cards (same formula as the event page),
     a two-column hero on tablets, the round social buttons in their own centred row on phones (the wrapper
     .tfe-actions__social comes from single-performer.php), 3 to 6 event cards per row, no clipped card buttons
     (27.6, also used by the tour dates and recommendations of the event page), centred heading of the artists list,
     the hero and the booking block on small tablets, the hero label clear of the header, wrapping pills (27.7),
     wrapping category chips of the artists list on tablets (27.8)
   - action buttons of the tour, category, legal and 404 pages on small tablets, 768-820px (section 28)
   - the single tour page (section 29): one frame for the hero, the tabs and the blocks, a two-column hero and three stat
     boxes in a row on tablets, schedule rows with the price and the button on the right from 768px
   - 10.2.73 (section 31): audit of 34 page types at 360-1920px: one line height for page titles, footer rows and the
     e-mail link tall enough to tap on phones and tablets, footer titles 11px, home card captions 11px on tablets, a
     bigger touch area for the dots of the tours slider
   - 10.2.70: events filters from 1024px (section 6, was 1101px), the Apply and Reset buttons and the tablet filter grid
     (section 23, the old rule from 10.2.65 made Apply 200px high on phones), short rows that hold hidden cards
     (section 10), and the tablet audit of section 30: contacts cards, home tours strip, three-card blocks of the FAQ and
     the volunteers page, the side edges of the country, venue and category pages
   It never changes how many cards a full CRM row holds, booking widgets or checkout. Roll back with
   define('TFE_DISABLE_UI_POLISH', true); in wp-config.php. */

/* 1. Fixed header below the admin bar (signed-in staff only).
   WordPress keeps the bar fixed at 32px (46px on narrow screens) down to 601px and makes it
   scroll away on phones, so on phones the header follows the bar while the page scrolls. */
@media (min-width: 783px) {
  body.admin-bar .tfe-header-outer { top: 32px; }
}
@media (min-width: 601px) and (max-width: 782px) {
  body.admin-bar .tfe-header-outer { top: 46px; }
}
@supports (animation-timeline: scroll()) {
  @media (max-width: 600px) {
    body.admin-bar .tfe-header-outer {
      top: 46px;
      animation: tfe-adminbar-follow linear both;
      animation-timeline: scroll(root);
      animation-range: 0 46px;
    }
    @keyframes tfe-adminbar-follow { to { top: 0; } }
  }
}

/* 2. City button in the mobile header: show the whole label instead of "Choose ci...". */
@media (max-width: 1180px) {
  .tfe-header-outer .tfe-location-mobile-trigger span { max-width: min(190px, 44vw); }
}
@media (max-width: 430px) {
  .tfe-header-outer .tfe-logo img { height: 27px; width: auto; }
  .tfe-header-outer .tfe-location-mobile-trigger { flex: 1 1 auto; max-width: none; padding-inline: 9px; }
  .tfe-header-outer .tfe-location-mobile-trigger span { max-width: none; }
}

/* 3. Home headings: left aligned, solid ink, icon in a soft tile.
   Older stylesheets centre these with !important, so the few properties that decide the
   look repeat !important here and win by loading last. */
html body .tfe-discovery-home .tfe-section-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start !important;
  gap: 14px;
  max-width: none;
  margin: 0 0 clamp(18px, 2.2vw, 26px) !important;
  text-align: left;
}
.tfe-discovery-home .tfe-section-header > .tfe-flag-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--tfe-border, #e1e9f4);
  background: var(--tfe-soft, #eff5ff);
  color: var(--tfe-primary, #1d4ed8);
  font-size: 24px;
  line-height: 1;
}
.tfe-discovery-home .tfe-section-header > .tfe-flag-icon .tfe-icon {
  display: block;
  width: 1em;
  height: 1em;
}
html body .tfe-discovery-home .tfe-section-header .tfe-section-title {
  min-width: 0;
  margin: 0;
  font-family: var(--tfe-font-head, 'e-Ukraine Head', 'e-Ukraine', system-ui, sans-serif);
  font-size: clamp(25px, 2.9vw, 37px) !important;
  font-weight: 700;
  line-height: 1.2 !important;
  letter-spacing: -.032em !important;
  text-align: left !important;
  color: #122342 !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  text-wrap: balance;
}
.tfe-discovery-home .tfe-discovery-tours__heading h2 {
  font-size: clamp(25px, 2.9vw, 37px);
  font-weight: 700;
  letter-spacing: -.032em;
  color: #122342;
  text-wrap: balance;
}
@media (max-width: 767px) {
  html body .tfe-discovery-home .tfe-section-header { gap: 10px; }
  .tfe-discovery-home .tfe-section-header > .tfe-flag-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 20px;
  }
}

/* 4. Home tours: cards fill their column and share one height per row. */
.tfe-discovery-home .tfe-discovery-tours__grid { align-items: stretch; }
.tfe-discovery-home .tfe-discovery-tours__grid > .tfe-discovery-tour {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  height: auto;
}
.tfe-discovery-home .tfe-discovery-tour__image { flex: 0 0 auto; }
.tfe-discovery-home .tfe-discovery-tour__info { flex: 1 1 auto; }

/* 5. Home cities: same side padding as every other section, two columns on phones. */
.tfe-discovery-home .tfe-growth-section--cities {
  padding-left: var(--padding-x, 24px);
  padding-right: var(--padding-x, 24px);
}
@media (min-width: 341px) and (max-width: 420px) {
  .tfe-discovery-home .tfe-city-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tfe-discovery-home .tfe-city-card { min-height: 104px; padding: 13px; }
}

/* 6. Events filters from 1024px: the grid holds seven fields, older rules made six columns and
   left one field alone on a second row. Four selects fill the first row, three date fields the
   second. When the country is locked (city and country pages) three selects fill the first row.
   (Until 10.2.69 this started at 1101px and 1024-1100px had three columns with the last date field alone.
   The widest label, "Wszystkie obiekty", needs 202px; a select is 233px wide at 1024px.) Smaller screens: section 23. */
@media (min-width: 1024px) {
  html body :is(.tfe-events-page--premium, .tfe-premium-section--event-archive) .tfe-filter-gridline {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  }
  html body :is(.tfe-events-page--premium, .tfe-premium-section--event-archive) .tfe-filter-gridline > select {
    grid-column: span 3;
  }
  html body :is(.tfe-events-page--premium, .tfe-premium-section--event-archive) .tfe-filter-gridline:has(> select[aria-hidden="true"]) > select {
    grid-column: span 4;
  }
  html body :is(.tfe-events-page--premium, .tfe-premium-section--event-archive) .tfe-filter-gridline > input {
    grid-column: span 4;
  }
}

/* 7. Keyboard focus. Components with their own focus style keep it (higher specificity). */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid #74a5f5;
  outline-offset: 3px;
}

/* 8. Related events on an event page ("more from this tour", "you may also like").
   The plugin picks five columns from the screen width (1200px and up), but these blocks sit in the
   main column next to the ticket sidebar, about 700px wide. Five cards came out 119px wide with cut
   titles and a cut "Bilety" button. Three per row here, a short last row is centred. */
@media (min-width: 768px) {
  html body.single-event .tfe-related-events .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid {
    display: flex !important;
    flex-flow: row wrap !important;
    justify-content: center;
    gap: 24px !important;
    overflow: visible;
    margin-right: 0;
    padding-right: 0;
  }
  html body.single-event .tfe-related-events .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid > .tfe-card-item {
    flex: 0 0 calc((100% - 48px) / 3);
    width: calc((100% - 48px) / 3);
    min-width: 0;
    max-width: none;
  }
}

/* 9. Subscribe box on the event page. The v3 layout made the card light blue but left the title,
   text and field white, so they were hardly visible. Dark ink on light blue, white field, full width form. */
html body.single-event .tfe-event-v3 .tfe-event-story .tfe-sub-widget {
  background: linear-gradient(135deg, #e6efff 0%, #f4f8ff 100%);
  border: 1px solid #cfdcf3;
  color: #122342;
  box-shadow: none;
}
html body.single-event .tfe-event-v3 .tfe-sub-widget h3 {
  color: #122342;
  -webkit-text-fill-color: currentColor;
  font-size: clamp(20px, 2.1vw, 25px);
}
html body.single-event .tfe-event-v3 .tfe-sub-widget p { color: #46566f; }
html body.single-event .tfe-event-v3 .tfe-sub-form { max-width: none; flex-wrap: nowrap; }
html body.single-event .tfe-event-v3 .tfe-sub-input {
  background: #fff;
  border: 1px solid #b9cbe8;
  color: #122342;
}
html body.single-event .tfe-event-v3 .tfe-sub-input::placeholder { color: #66758c; opacity: 1; }
html body.single-event .tfe-event-v3 .tfe-sub-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
}
@media (max-width: 520px) {
  html body.single-event .tfe-event-v3 .tfe-sub-form { flex-wrap: wrap; }
}

/* 10. Short rows are centred. A last row with fewer cards than the grid has columns used to sit at the
   left with an empty right side (four events on a tablet gave three cards and one lonely card). Only grids
   whose last row is not full are touched: they become a centred row whose cards keep the width they have
   in a full row. Grids that end on a full row keep their CRM columns.
   A grid with cards hidden by "Show more" or by a filter counts as short: CSS counts the cards in the page, hidden
   ones too, so 15 cards with 12 shown looked like three full rows and the last two shown cards sat at the left.
   Event cards: 5 per row from 1200px, 3 from 768px. */
@media (min-width: 1200px) {
  html body .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid:is(:not(:has(> .tfe-card-item:nth-child(5n):last-child)), :has(> .tfe-card-item:is([style*="display:none"], [style*="display: none"]))):not(:where(.tfe-related-events *, .tfe-growth-section--country-fallback *)) {
    display: flex !important;
    flex-flow: row wrap !important;
    justify-content: center;
    gap: 24px !important;
    overflow: visible;
  }
  html body .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid:is(:not(:has(> .tfe-card-item:nth-child(5n):last-child)), :has(> .tfe-card-item:is([style*="display:none"], [style*="display: none"]))):not(:where(.tfe-related-events *, .tfe-growth-section--country-fallback *)) > .tfe-card-item {
    flex: 0 0 calc((100% - 96px) / 5);
    width: calc((100% - 96px) / 5);
    min-width: 0;
    max-width: none;
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  html body .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid:is(:not(:has(> .tfe-card-item:nth-child(3n):last-child)), :has(> .tfe-card-item:is([style*="display:none"], [style*="display: none"]))):not(:where(.tfe-related-events *, .tfe-growth-section--country-fallback *)) {
    display: flex !important;
    flex-flow: row wrap !important;
    justify-content: center;
    gap: 20px !important;
    overflow: visible;
  }
  html body .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid:is(:not(:has(> .tfe-card-item:nth-child(3n):last-child)), :has(> .tfe-card-item:is([style*="display:none"], [style*="display: none"]))):not(:where(.tfe-related-events *, .tfe-growth-section--country-fallback *)) > .tfe-card-item {
    flex: 0 0 calc((100% - 40px) / 3);
    width: calc((100% - 40px) / 3);
    min-width: 0;
    max-width: none;
  }
}
/* One card on a phone: two columns, so it spans both and keeps the width of one column. */
@media (max-width: 767px) {
  html body .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid:has(> .tfe-card-item:only-child) > .tfe-card-item {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 9px);
  }
}
/* Country strip on the home page: six cards across from 1100px. */
@media (min-width: 1100px) {
  html body .tfe-page-wrapper .tfe-growth-section--country-fallback .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid:not(:has(> .tfe-card-item:nth-child(6))) {
    display: flex !important;
    flex-flow: row wrap !important;
    justify-content: center;
    gap: clamp(10px, 1.1vw, 16px) !important;
  }
  html body .tfe-page-wrapper .tfe-growth-section--country-fallback .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid:not(:has(> .tfe-card-item:nth-child(6))) > .tfe-card-item {
    flex: 0 0 calc((100% - 5 * clamp(10px, 1.1vw, 16px)) / 6) !important;
    width: calc((100% - 5 * clamp(10px, 1.1vw, 16px)) / 6) !important;
  }
}
/* Tours on the home page: four across from 1051px, three from 701px, two on phones. */
@media (min-width: 1051px) {
  .tfe-discovery-home .tfe-discovery-tours__grid:not(:has(> :nth-child(4))) {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
  }
  .tfe-discovery-home .tfe-discovery-tours__grid:not(:has(> :nth-child(4))) > .tfe-discovery-tour {
    flex: 0 0 calc((100% - 3 * clamp(12px, 1.7vw, 20px)) / 4);
    width: calc((100% - 3 * clamp(12px, 1.7vw, 20px)) / 4);
  }
}
@media (min-width: 701px) and (max-width: 1050px) {
  .tfe-discovery-home .tfe-discovery-tours__grid:not(:has(> :nth-child(3))) {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
  }
  .tfe-discovery-home .tfe-discovery-tours__grid:not(:has(> :nth-child(3))) > .tfe-discovery-tour {
    flex: 0 0 calc((100% - 2 * clamp(12px, 1.7vw, 20px)) / 3);
    width: calc((100% - 2 * clamp(12px, 1.7vw, 20px)) / 3);
  }
}
@media (max-width: 700px) {
  .tfe-discovery-home .tfe-discovery-tours__grid:has(> :only-child) > .tfe-discovery-tour {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 6px);
  }
}
/* Popular cities on the home page: six across from 1101px, three from 721px, two on phones. */
@media (min-width: 1101px) {
  .tfe-discovery-home .tfe-city-grid:not(:has(> :nth-child(6))) {
    display: flex !important;
    flex-flow: row wrap;
    justify-content: center;
    gap: 14px;
  }
  .tfe-discovery-home .tfe-city-grid:not(:has(> :nth-child(6))) > .tfe-city-card {
    flex: 0 0 calc((100% - 70px) / 6);
    min-width: 0;
  }
}
@media (min-width: 721px) and (max-width: 1100px) {
  .tfe-discovery-home .tfe-city-grid:not(:has(> :nth-child(3))) {
    display: flex !important;
    flex-flow: row wrap;
    justify-content: center;
    gap: 14px;
  }
  .tfe-discovery-home .tfe-city-grid:not(:has(> :nth-child(3))) > .tfe-city-card {
    flex: 0 0 calc((100% - 28px) / 3);
    min-width: 0;
  }
}
@media (max-width: 720px) {
  .tfe-discovery-home .tfe-city-grid:has(> :only-child) > .tfe-city-card {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 5px);
  }
}
/* Home artists list: four across from 768px. The slider rule for 1024px and below gave every card
   min-width 260px, while the later grid rule put four 179px columns at 820px, so the cards lay over each
   other. Cards now fill their column, and a last row that is not full sits in the middle. The artists page
   grid has its own rule in section 16. */
@media (min-width: 768px) {
  html body .tfe-artists-responsive-list > .tfe-artist-card {
    min-width: 0;
    max-width: none;
    width: auto;
  }
  html body .tfe-artists-responsive-list:not(:has(> :nth-child(4n):last-child)) {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    gap: 20px;
    overflow: visible;
  }
  html body .tfe-artists-responsive-list:not(:has(> :nth-child(4n):last-child)) > .tfe-artist-card {
    flex: 0 0 calc((100% - 60px) / 4);
  }
}
/* Horizontal strips with few cards (home artists on tablets and phones) sit in the middle. */
@media (max-width: 1024px) {
  html body .tfe-artists-responsive-list { justify-content: safe center; }
}

/* 11. Heads stay in the picture. Photos of people are cut from the bottom, never from the top. */
html body .tfe-artist-cover img { object-position: center top; }
.tfe-discovery-home .tfe-discovery-tour__image img { object-position: center top !important; }

/* A home section with a short row of cards gets its heading and date chips centred too, so the
   heading sits over the cards. Sections with a full row keep the left aligned heading.
   ":last-child:nth-child(-n+4)" matches the last card only when the row holds four cards or fewer
   (:has() cannot be nested in :has(), so the count is read this way). */
@media (min-width: 768px) {
  html body .tfe-discovery-home :is(section, #tfe-home-top, #tfe-home-upcoming):has(.tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid > .tfe-card-item:last-child:nth-child(-n+4)) > :is(.tfe-section-header, .tfe-discovery-datebar),
  html body .tfe-discovery-home :is(section, #tfe-home-top, #tfe-home-upcoming):has(.tfe-artists-responsive-list > .tfe-artist-card:last-child:nth-child(-n+3)) > .tfe-section-header {
    justify-content: center !important;
    text-align: center !important;
  }
  html body .tfe-discovery-home :is(section, #tfe-home-top, #tfe-home-upcoming):has(.tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid > .tfe-card-item:last-child:nth-child(-n+4)) > .tfe-section-header .tfe-section-title,
  html body .tfe-discovery-home :is(section, #tfe-home-top, #tfe-home-upcoming):has(.tfe-artists-responsive-list > .tfe-artist-card:last-child:nth-child(-n+3)) > .tfe-section-header .tfe-section-title {
    text-align: center !important;
  }
  .tfe-discovery-home .tfe-discovery-tours:has(.tfe-discovery-tours__grid > .tfe-discovery-tour:last-child:nth-child(-n+3)) .tfe-discovery-tours__heading {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
  }
}

/* 12. Phones: a last card that sits alone in a two-column row is centred, like a single card already is.
   Three cities, five artists or seven events no longer leave the last one at the left with an empty
   right side. The width is the width of one column, so the card keeps the shape of the others. */
@media (max-width: 767px) {
  html body .tfe-wrap.tfe-instance[data-layout="grid"]:not([data-mobile-slider="1"]) > .tfe-grid > .tfe-card-item:last-child:nth-child(odd):not(:only-child) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 9px);
  }
}
@media (max-width: 700px) {
  .tfe-discovery-home .tfe-discovery-tours__grid > .tfe-discovery-tour:last-child:nth-child(odd):not(:only-child) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 6px);
  }
}
@media (max-width: 720px) {
  .tfe-discovery-home .tfe-city-grid > .tfe-city-card:last-child:nth-child(odd):not(:only-child) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 5px);
  }
}

/* 13. The brand shown on a card without a photo is never broken inside a word ("TicketsFest.PL", not "TicketsFest." over "PL").
   A name with a space ("TicketsFest Україна") may wrap at that space on a narrow card. */
.tfe-poster--empty span,
.tfe-discovery-tour__fallback {
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: balance;
}
.tfe-poster--empty span { font-size: clamp(13px, 4.2vw, 20px); letter-spacing: .02em; }

/* 14. The fixed header no longer covers the first line of a page. The header floats over the page: its
   bottom edge is at 78px from 1101px, 70px below that, 68px on phones. The small label above the title
   of the home hero, of the Artists, Tours, Events and Contacts heroes and of the static pages started
   at 34 to 66px, so it sat behind the header. Only a hero that is the first block of the page is moved. */
html body .tfe-discovery-home > .tfe-discovery-stage:first-child { padding-top: 94px !important; }
@media (max-width: 1100px) {
  html body .tfe-discovery-home > .tfe-discovery-stage:first-child { padding-top: 86px !important; }
  html body :is(.tfe-page-wrapper, main.tfe-events-page, main.tfs-page) > :is(.tfe-hero, .tfs-hero):first-child { padding-top: 80px !important; }
}
@media (max-width: 767px) {
  html body .tfe-discovery-home > .tfe-discovery-stage:first-child { padding-top: 84px !important; }
  html body :is(.tfe-page-wrapper, main.tfe-events-page, main.tfs-page) > :is(.tfe-hero, .tfs-hero):first-child { padding-top: 80px !important; }
}

/* 15. The city button in the desktop header holds the whole label ("Wybierz miasto" was cut to "Wybierz m..."). */
@media (min-width: 1181px) {
  html body .tfe-header-outer .tfe-location-picker > summary { max-width: 200px; }
}

/* 16. Artists page grid: one answer for every width. Older layers disagreed: one column of 700px wide
   cards from 621 to 767px, two 460px wide columns at 1024px. Now four across from 1025px, three from
   768px, two below. From 768px the grid is a centred flex row, so an incomplete last row (six artists in
   four columns, five in three) sits in the middle instead of leaning to the left. The cards keep the
   shape they have in a full row. */
@media (min-width: 768px) {
  html body .tfe-artists-grid {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    align-items: stretch;
    gap: 20px !important;
  }
  html body .tfe-artists-grid > .tfe-artist-card {
    flex: 0 0 calc((100% - 40px) / 3);
    min-width: 0;
    max-width: none;
  }
}
@media (min-width: 1025px) {
  html body .tfe-artists-grid > .tfe-artist-card { flex-basis: calc((100% - 60px) / 4); }
}
@media (max-width: 767px) {
  html body .tfe-artists-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 14px !important; }
  html body .tfe-artists-grid > .tfe-artist-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 7px);
  }
}
@media (max-width: 620px) {
  html body .tfe-artists-grid { gap: 12px !important; }
  html body .tfe-artists-grid > .tfe-artist-card:last-child:nth-child(odd) { width: calc(50% - 6px); }
}

/* 17. Buttons on an artist card. A card with "Book" and "View profile" used to put both in one row; at
   258px the second label broke over two lines, and at 768-820px an older rule made "Book" full width and
   squeezed "View profile" to 17px. Now each label stays on one line and the pair wraps into two full
   width buttons when they do not fit side by side. */
html body .tfe-artist-card .tfe-card-cta { flex-wrap: wrap; }
html body .tfe-artist-card .tfe-card-cta > :is(a.tfe-btn-view, .tfe-btn-book) {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  text-align: center;
}
@media (max-width: 767px) {
  html body .tfe-artist-card .tfe-card-cta > :is(a.tfe-btn-view, .tfe-btn-book) { white-space: normal; }
}

/* 18. Footer: the white "all events" button holds its text in the contact column. The column was 193px
   wide on desktop and the label broke into two lines inside a pill. The contact column is now at least
   240px, and if a longer translation still needs two lines the button turns into a rounded block. */
@media (min-width: 1101px) {
  html body .site-footer .footer-grid-v994 {
    grid-template-columns: minmax(220px, 1.25fr) repeat(3, minmax(130px, .75fr)) minmax(240px, 1fr) !important;
  }
}
html body .site-footer .footer-cta {
  box-sizing: border-box;
  max-width: 100%;
  padding-top: 9px !important;
  padding-bottom: 9px !important;
  line-height: 1.25;
  text-align: center;
  border-radius: 22px;
}

/* 19. Tablets: heroes reach the edges of the screen. From 768 to 1024px an older rule padded the whole page
   area by 22px on each side, so every dark hero (home, artists, tours, events, about, for organizers,
   volunteers) had a light strip down both sides and square corners, while phones and desktops are full
   width. Containers inside keep their own side padding, so the text does not move closer to the edge than
   it is on a desktop at 1100px. */
@media (min-width: 768px) and (max-width: 1024px) {
  html body #main.site-main,
  html body .site-main {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* 20. Share row on an artist page: "Copy link" is a text button but sat in a 44px circle, so "Kopiuj link"
   broke over three lines and spilled out of it. The button is now a pill that fits its label; the three
   round network buttons stay round. */
html body .tfe-share-btn--copy {
  width: auto;
  min-width: 44px;
  padding: 0 18px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.1;
}

/* 21. Tours page grid, same answer as the artists page: four across from 1025px, three from 768px, two from
   481px, one column on small phones. Older layers gave two 486px columns at 1024px, one column of 700px wide
   cards from 481 to 767px, and left two tours at the left edge on desktop. A short or incomplete row is
   centred. Only the tours page is touched; the tours list on an artist page keeps its own layout. */
@media (min-width: 768px) {
  html body.page-template-page-tours .tfe-tours-grid {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    align-items: stretch;
    gap: 18px !important;
  }
  html body.page-template-page-tours .tfe-tours-grid > .tfe-tour-card {
    flex: 0 0 calc((100% - 36px) / 3);
    min-width: 0;
  }
}
@media (min-width: 1025px) {
  html body.page-template-page-tours .tfe-tours-grid > .tfe-tour-card { flex-basis: calc((100% - 54px) / 4); }
}
@media (min-width: 481px) and (max-width: 767px) {
  html body.page-template-page-tours .tfe-tours-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    max-width: none;
  }
  html body.page-template-page-tours .tfe-tours-grid > .tfe-tour-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 7px);
  }
}


/* 22. Event details list on phones and small tablets. The v9.9.48 mobile layer turns every details card into a
   square tile (aspect-ratio 1/1, centred column). The current event page lays the details out as a list of rows
   (icon on the left, label above value), and on one column the square rule made each row 320px tall with the
   text floating in the middle. Rows stay compact here, left aligned next to the icon, with a thin divider. */
@media (max-width: 767px) {
  html body.single-event .tfe-event-v3 .tfe-event-details-section .tfe-info-card,
  html body.single-event .tfe-event-v3 .tfe-event-details-section .tfe-info-card:nth-child(odd):last-child,
  html body.single-event .tfe-event-v3 .tfe-event-details-section .tfe-info-card--address,
  html body.single-event .tfe-event-v3 .tfe-event-details-section .tfe-info-card:last-child {
    aspect-ratio: auto !important;
    height: auto !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 2px 12px !important;
    align-items: center !important;
    justify-content: stretch !important;
    text-align: left !important;
    padding: 12px 0 !important;
    border-radius: 0 !important;
  }
  html body.single-event .tfe-event-v3 .tfe-event-details-section .tfe-info-card:last-child {
    border-bottom: 0 !important;
  }
  html body.single-event .tfe-event-v3 .tfe-event-details-section .tfe-info-icon {
    grid-row: 1 / 3;
    grid-column: 1;
    margin: 0 !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
  }
  html body.single-event .tfe-event-v3 .tfe-event-details-section .tfe-info-label,
  html body.single-event .tfe-event-v3 .tfe-event-details-section .tfe-info-value {
    grid-column: 2;
    max-width: none !important;
    text-align: left !important;
  }
}

/* 23. Tablet fixes found on the events, tours and home pages at 768-1024px. The mobile layers were written for
   phones and stay active up to 820px or 1024px, so on a tablet they squeezed some blocks and let others spill.
   Each rule below undoes one of those cases and leaves the phone layout alone. */

/* Events filter panel (seven fields: country, city, venue, status, month, from, to; on the .pl site and the
   country pages the country select is hidden and six are left). Labels such as "Wszystkie obiekty" need 202px.
   - 768-1023px, six fields: three columns, three selects over three date fields. Seven fields: two selects per row,
     then the three date fields in one row (three columns left the last date field alone on a third row).
   - 640-767px, seven fields: the same two-and-three rows. 481-639px: two columns, the last date field spans both
     (it sat alone at the left). Up to 480px: one column (older layers). From 1024px: section 6.
   - Buttons: "Apply filters" keeps its laptop size and sits at the left with "Reset" beside it. On phones both are full
     width rows of normal height. Until 10.2.69 Apply was 200px high and Reset 120px high on phones (a flex-basis of
     200px and 120px, written for a row, was applied to a column), and on tablets Apply was 389px wide with Reset
     floating at the far right. The row also sat 4px under the date fields on every screen; it is 14px now. */
@media (min-width: 768px) and (max-width: 1023px) {
  html body :is(.tfe-events-page--premium, .tfe-premium-section--event-archive) .tfe-filter-gridline {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}
@media (min-width: 481px) and (max-width: 767px) {
  html body :is(.tfe-events-page--premium, .tfe-premium-section--event-archive) .tfe-filter-gridline {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}
@media (min-width: 481px) and (max-width: 639px) {
  html body :is(.tfe-events-page--premium, .tfe-premium-section--event-archive) .tfe-filter-gridline:not(:has(> select[aria-hidden="true"])) > input:last-child {
    grid-column: 1 / -1;
  }
}
@media (min-width: 640px) and (max-width: 1023px) {
  html body :is(.tfe-events-page--premium, .tfe-premium-section--event-archive) .tfe-filter-gridline:not(:has(> select[aria-hidden="true"])) {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  }
  html body :is(.tfe-events-page--premium, .tfe-premium-section--event-archive) .tfe-filter-gridline:not(:has(> select[aria-hidden="true"])) > select {
    grid-column: span 6;
  }
  html body :is(.tfe-events-page--premium, .tfe-premium-section--event-archive) .tfe-filter-gridline:not(:has(> select[aria-hidden="true"])) > input {
    grid-column: span 4;
  }
}
html body .tfe-advanced-filters .tfe-filter-actions {
  display: flex !important;
  flex-flow: row wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  margin-top: 14px !important;
}
html body .tfe-advanced-filters .tfe-filter-actions > :is(.tfe-btn-apply, .tfe-btn-reset--link) {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 0;
  white-space: nowrap;
}
@media (max-width: 767px) {
  html body .tfe-advanced-filters .tfe-filter-actions {
    flex-flow: column nowrap !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  html body .tfe-advanced-filters .tfe-filter-actions > :is(.tfe-btn-apply, .tfe-btn-reset--link) {
    width: 100% !important;
    justify-content: center;
    text-align: center;
  }
}

/* Chip rows: the phone rule made them one scrolling line with the scroll bar hidden. On a tablet that cut
   "Arena B" in half in the event header and squeezed "Popularne wyszukiwania:" into a column three words tall.
   They wrap again from 481px, and the label keeps its own line width. */
@media (min-width: 481px) and (max-width: 1024px) {
  html body .tfe-events-popular-links,
  html body .tfe-hero .tfe-hero-meta {
    flex-wrap: wrap !important;
    overflow: visible !important;
  }
  html body .tfe-events-popular-links > span {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  /* Hero buttons sit side by side on a tablet instead of two 770px wide bars. */
  html body .tfe-hero-actions > .tfe-btn,
  html body .tfe-events-hero-actions > .tfe-btn {
    width: auto !important;
    flex: 0 1 auto;
    min-width: 200px;
  }
}

/* Tours page search: the field is 200px, and the phone rule made the button 100% wide, so the button dropped
   under the field at 306px. Both stay on one line from 768px. */
@media (min-width: 768px) and (max-width: 1024px) {
  html body .tfe-search-form > .tfe-search-btn {
    width: auto !important;
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* Home subscribe pill: 60px high with the field and the button inside. The phone rule let the button wrap to a
   second line, which put it over the lower edge of the box. One line from 768px, the phone layout up to 767px
   stacks the field and the button as before. */
@media (min-width: 768px) and (max-width: 1024px) {
  html body .tfe-sub-wrapper .tfe-sub-form {
    flex-wrap: nowrap !important;
  }
  html body .tfe-sub-wrapper .tfe-sub-input {
    flex: 1 1 auto;
    min-width: 0;
  }
  html body .tfe-sub-wrapper .tfe-sub-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* Statistics tiles in the tours header: four tiles gave three and one alone. Two by two on a phone, one row
   from 481px. */
@media (max-width: 767px) {
  html body .tfe-stats-row:has(> .tfe-stat:nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (min-width: 481px) and (max-width: 767px) {
  html body .tfe-stats-row:has(> .tfe-stat:nth-child(4):last-child) {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* Home search panel on a phone: "Wszystkie kraje" and "Wszystkie miasta" were cut to "Wszystkie kr..." in two
   140px fields. A little less padding at the arrow and one point less text make them fit down to 360px. */
@media (max-width: 420px) {
  html body .tfe-discovery-home .tfe-discovery-search select {
    font-size: 12px !important;
    padding-right: 16px !important;
  }
}

/* 24. Phones: headings, titles and names sit in the middle of the screen.
   On a phone the hero title, the section headings, the names on cards and the subscribe box were set at the left edge,
   right next to posters, chips and buttons that were already centred. Several older layers did this on purpose
   (text-align:left !important), the events catalogue cards in the CRM plugin among them, so the rules here repeat
   !important and add a class of specificity with html body[class]. Reading text stays left: the event description,
   FAQ answers, contact details, schedule rows and every list of facts (label and value, icon and text). */
@media (max-width: 767px) {

  /* 24.1 Heroes: badge, title, lead text, buttons and quick links. */
  html body[class] .tfe-hero__content,
  html body[class] .tfe-discovery-intro,
  html body[class] .tfe-premium-hero__content,
  html body[class] .tfs-hero-grid > div:first-child {
    text-align: center !important;
  }
  html body[class] .tfe-hero__content { align-items: center !important; }
  html body[class] .tfe-hero__content > :is(.tfe-hero-title, .tfe-hero-desc, .tfe-stats-row, .tfe-hero-actions, .tfe-events-popular-links) {
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  html body[class] :is(.tfe-hero-title, .tfe-hero-desc, .tfe-hero-badge, .tfe-premium-kicker, .tfs-kicker, .tfs-title, .tfs-lead, .tfe-discovery-eyebrow),
  html body[class] :is(.tfe-discovery-intro, .tfe-premium-hero__content) :is(h1, p) {
    text-align: center !important;
  }
  html body[class] :is(.tfe-discovery-quicklinks, .tfe-events-popular-links, .tfs-actions, .tfe-premium-actions) {
    justify-content: center !important;
    flex-wrap: wrap;
  }
  html body[class] .tfe-events-popular-links > span { flex: 0 0 100%; text-align: center; }

  /* 24.2 Home: category row, date row and section heads. The icon tile goes above the title. */
  html body[class] .tfe-discovery-categories {
    flex-direction: column;
    align-items: center !important;
    justify-content: center;
    gap: 10px;
    text-align: center;
  }
  html body[class] .tfe-discovery-categories__items { justify-content: center !important; flex-wrap: wrap; }
  html body[class] .tfe-discovery-datebar { justify-content: center !important; flex-wrap: wrap; text-align: center; }
  html body[class] :is(.tfe-discovery-categories__label, .tfe-discovery-datebar__label) { width: 100%; text-align: center; }
  html body[class] .tfe-discovery-home .tfe-section-header {
    flex-direction: column;
    justify-content: center !important;
    align-items: center;
    gap: 10px;
    text-align: center;
  }
  html body[class] .tfe-discovery-home .tfe-section-header .tfe-section-title { text-align: center !important; }
  html body[class] .tfe-discovery-tours__heading { align-items: center !important; text-align: center; }
  html body[class] .tfe-discovery-tours__heading :is(h2, p, .tfe-discovery-tours__eyebrow) { text-align: center !important; }

  /* 24.3 Names on cards: tours, cities, artists, events catalogue. */
  html body[class] :is(.tfe-discovery-tour__info, .tfe-artist-body, .tfe-card-info, .tfe-cover-bottom, .tfe-city-card) {
    text-align: center !important;
  }
  html body[class] :is(.tfe-discovery-tour__info, .tfe-artist-body, .tfe-card-info, .tfe-cover-bottom) :is(h3, p, .tfe-card-title, .tfe-cover-name, .tfe-cover-type) {
    text-align: center !important;
  }
  html body[class] .tfe-city-card { align-items: center; }
  html body[class] .tfe-city-card > * { text-align: center; }
  html body[class] .tfe-artist-sub { justify-content: center !important; gap: 10px; }
  html body[class] .tfe-card-stats { justify-content: center !important; }
  html body[class] .tfe-events-page .tfe-wrap.tfe-instance[data-layout="grid"] :is(.tfe-card-caption, .tfe-card-caption-title, .tfe-card-caption-meta, .tfe-card-caption-price) {
    text-align: center !important;
  }
  html body[class] .tfe-events-page .tfe-wrap.tfe-instance[data-layout="grid"] .tfe-card-caption-top { justify-content: center !important; }

  /* 24.4 Subscribe box (events, tours, artists, contacts, tour and event pages). The text sat flush against the
     field (0 px). bundles/layout-mobile-core.css forces display:block !important on the box on phones, which
     switched its gap off, so the box is a flex column again here. */
  html body[class] .tfe-sub-widget {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    text-align: center !important;
  }
  html body[class] .tfe-sub-widget-text { min-width: 0; text-align: center !important; }
  html body[class] .tfe-sub-widget :is(h3, p) { text-align: center !important; }
  html body[class] .tfe-sub-widget-text p { line-height: 1.5; }
  html body[class] .tfe-sub-widget .tfe-sub-form { width: 100%; max-width: 520px; margin-left: auto; margin-right: auto; }

  /* 24.5 Events page: help block, text block at the bottom. */
  html body[class] :is(.tfe-events-section-head, .tfe-premium-section-heading, .tfe-events-seo-block__inner > :is(h2, p), .tfe-events-seo-links__group > h3) {
    text-align: center !important;
  }
  html body[class] .tfe-events-section-head :is(h2, h3) { text-align: center !important; }
  html body[class] .tfe-events-section-head > span { justify-content: center; }
  html body[class] .tfe-events-seo-links__list { justify-content: center; }

  /* 24.6 Contacts, tour schedule. Rows of facts (email, hours, address, dates) stay left. */
  html body[class] .tfe-section-label { justify-content: center !important; text-align: center !important; }
  html body[class] .tfe-card__head { justify-content: center; }
  html body[class] .tfe-tour-schedule-eyebrow { text-align: center; }
  /* Social buttons on the contacts page: three 101 px buttons broke the words ("Faceb-ook"). Two columns instead. */
  html body[class] .tfe-socials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  html body[class] .tfe-socials .tfe-soc { min-width: 0; padding: 0 12px; white-space: nowrap; }
  html body[class] .tfe-socials .tfe-soc:last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* Tour page: the anchor row has one chip. Auto margins centre it and still let a longer row scroll from its start. */
  html body[class] .tfe-tour-local-nav > :first-child { margin-left: auto; }
  html body[class] .tfe-tour-local-nav > :last-child { margin-right: auto; }
  /* Artists: the city chips under the name. */
  html body[class] .tfe-city-row { justify-content: center; flex-wrap: wrap; }
  /* Featured tours slider: the arrows and dots sit 14 px from the bottom and covered the lower edge of the button.
     The slide is a little taller and keeps a free strip at the bottom for them. */
  html body[class] .tfe-slide img { aspect-ratio: 4 / 3 !important; }
  html body[class] .tfe-slide-body { padding-bottom: 64px !important; }

  /* 24.7 About, FAQ, For organizers: section heads, cards, panels and the call to action. Lists with a check mark
     and the open and close FAQ rows keep their left edge. */
  html body[class] .tfs-page :is(.tfs-section-head, .tfs-card, .tfs-step, .tfs-panel, .tfs-cta) { text-align: center !important; }
  html body[class] .tfs-page .tfs-side > h2 { text-align: center !important; }
  html body[class] .tfs-page .tfs-mini { justify-content: center; flex-wrap: wrap; }
  html body[class] .tfs-page :is(.tfs-card, .tfs-step) > :is(div, span)[class]:first-child { margin-left: auto; margin-right: auto; }

  /* 24.8 Single event: title, section titles, "more dates" heads, share row. */
  html body.single-event .tfe-event-v3 .tfe-hero .tfe-hero-title,
  html body.single-event .tfe-event-v3 .tfe-hero .tfe-hero-title.tfe-hero-title--long {
    text-align: center !important;
  }
  html body.single-event .tfe-event-v3 :is(.tfe-event-story, .tfe-related-events) .tfe-section-title {
    text-align: center !important;
    justify-content: center;
  }
  html body.single-event .tfe-event-v3 .tfe-recs-heading {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
  }
  html body.single-event .tfe-event-v3 .tfe-recs-heading .tfe-section-title { width: 100%; }
  html body.single-event .tfe-event-v3 .tfe-event-story .tfe-content > div[style*="flex"] { justify-content: center; }
}

/* 25. Single event, one page frame.
   The hero, the section links, the two columns and the blocks under them had five different widths and side paddings
   (hero 1140 inside 1240, links in 1240, columns 1210 with 44px padding). At 1440px the poster, the first link and the
   text column started at x=150, 137 and 159, and they drifted apart at every other width. The subscribe band, the tour
   dates and the recommendations also sat in the narrow text column and left the right side of the page empty.
   Now all of them use one frame that follows the site header, so the left and right edges meet at every width from
   901px up: the content of the header (the logo to the "Browse events" button) from 1440px, the header pill itself
   between 1181px and 1370px, and a little inside the pill below 1181px, where the header is the hamburger bar.
   The three blocks that used to sit in the column are rendered after both columns (single-event.php,
   .tfe-event-story--wide) and use the whole frame.
   Phones and tablets up to 900px keep the one-column layout; only the padding of the blocks under the columns is
   repeated there, because they left the column that used to carry it. */
html body.single-event .tfe-event-v3 { --ev-w: min(1212px, 100% - 9.2vw); }
@media (min-width: 1181px) {
  /* the pill is 94% of 94% of the screen (88.36vw), 1260px at most */
  html body.single-event .tfe-event-v3 { --ev-w: min(1212px, 100% - 11.64vw); }
}

@media (min-width: 901px) {
  /* 25.1 The same frame for the hero, the section links, the columns and the wide blocks. */
  html body.single-event .tfe-event-v3 .tfe-hero > .tfe-container,
  html body.single-event .tfe-event-v3 .tfe-event-v3-nav-inner {
    max-width: var(--ev-w) !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  html body.single-event .tfe-event-v3 .tfe-hero .tfe-hero__content {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  html body.single-event .tfe-event-v3 .tfe-event-v3-nav-inner a:first-child { padding-left: 0; }
  html body.single-event .tfe-event-v3 .tfe-single-layout.tfe-event-layout-premium {
    max-width: var(--ev-w) !important;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: clamp(28px, 3vw, 40px) !important;
    grid-template-columns: minmax(0, 1fr) clamp(300px, 28%, 380px) !important;
  }
  html body.single-event .tfe-event-v3 .tfe-event-story--wide {
    max-width: var(--ev-w);
    margin: 0 auto;
    padding: 0 0 clamp(40px, 5vw, 64px);
  }
  /* The hero actions row stops at 690px; the title above it runs to the end of the frame. */
  html body.single-event .tfe-event-v3 .tfe-event-v3-purchase { max-width: none; }
  /* The title of the ticket card was 38px (an old !important rule meant for the section titles overrode the 19-23px of
     the v3 stylesheet): it filled the whole card and wrapped in two lines below 1300px. */
  html body.single-event .tfe-event-v3 .tfe-event-sidebar .tfe-section-title { font-size: clamp(24px, 2.1vw, 30px) !important; }
  /* FAQ rows: the question and the answer start at the same edge as the section title and its lines. An older rule
     meant this (padding-left:0) but lost to a more specific one, so the rows sat 20px in. */
  html body.single-event .tfe-event-v3 details.tfe-faq-item summary.tfe-faq-q,
  html body.single-event .tfe-event-v3 details.tfe-faq-item .tfe-faq-a { padding-left: 0; }

  /* The subscribe band under both columns: text on the left, the field on the right (the field used to stretch over
     the whole row under the text). */
  html body.single-event .tfe-event-v3 .tfe-event-story--wide .tfe-sub-widget {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px clamp(32px, 5vw, 72px);
    padding: clamp(22px, 2.4vw, 30px) clamp(24px, 3vw, 40px);
  }
  html body.single-event .tfe-event-v3 .tfe-event-story--wide .tfe-sub-widget-text { flex: 1 1 0; min-width: 0; }
  html body.single-event .tfe-event-v3 .tfe-event-story--wide .tfe-sub-form { flex: 0 1 min(460px, 42%); width: auto; max-width: 460px; }

  html body.single-event .tfe-event-v3 .tfe-event-story--wide .tfe-recs-directory {
    width: 100%;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
  }
}
/* 25.2 Cards of the tour dates and recommendations: no extra side padding inside the plugin wrapper (20px, and 22px
   with !important up to 1024px from layout-mobile-core.css), so the first card starts where the heading starts.
   Three per row up to 1099px, four from 1100px; a short last row stays centred. Phones keep their own gutter. */
@media (min-width: 768px) {
  html body.single-event .tfe-event-v3 .tfe-event-story--wide .tfe-related-events .tfe-wrap.tfe-instance {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}
@media (min-width: 1100px) {
  html body.single-event .tfe-event-v3 .tfe-event-story--wide .tfe-related-events .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid > .tfe-card-item {
    flex: 0 0 calc((100% - 72px) / 4);
    width: calc((100% - 72px) / 4);
  }
}
/* From 1360px the frame is about 1200px wide: six cards (184px and more) fit in one row, so the blocks of six do not
   end on two orphans. */
@media (min-width: 1360px) {
  html body.single-event .tfe-event-v3 .tfe-event-story--wide .tfe-related-events .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid {
    gap: 20px !important;
  }
  html body.single-event .tfe-event-v3 .tfe-event-story--wide .tfe-related-events .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid > .tfe-card-item {
    flex: 0 0 calc((100% - 100px) / 6);
    width: calc((100% - 100px) / 6);
  }
}

/* 25.3 Tablets, 768-900px: the hero and the section links used the 22px gutter of layout-mobile-core.css while the
   columns use 3.8vw (29-34px), so the poster stood 8-12px to the left of everything under it. */
@media (min-width: 768px) and (max-width: 900px) {
  html body.single-event .tfe-event-v3 .tfe-hero > .tfe-container,
  html body.single-event .tfe-event-v3 .tfe-event-v3-nav-inner {
    padding-left: clamp(18px, 3.8vw, 44px) !important;
    padding-right: clamp(18px, 3.8vw, 44px) !important;
  }
  html body.single-event .tfe-event-v3 .tfe-event-v3-nav-inner a:first-child { padding-left: 0; }
}
/* Up to 900px: the blocks under the columns carry the side padding the column used to carry. */
@media (max-width: 900px) {
  html body.single-event .tfe-event-v3 .tfe-single-layout.tfe-event-layout-premium { padding-bottom: 0 !important; }
  html body.single-event .tfe-event-v3 .tfe-event-story--wide { padding: clamp(24px, 3vw, 36px) clamp(18px, 3.8vw, 44px) clamp(32px, 4vw, 52px); }
}
@media (max-width: 767px) {
  html body.single-event .tfe-event-v3 .tfe-event-story--wide { padding: 22px 16px 44px; }
}

/* 26. Event landing pages: country, venue and category pages (tfe_theme_render_premium_event_landing).
   The CRM plugin styles its filters, date chips, card grid and the "Show more" step only inside .tfe-events-page (the
   /events/ page), so these pages showed raw links, a grey browser button and all 180 events at once (14000px on a phone).
   The shell around the events module carries that class now (functions.php). The class also brings the page-level rules
   of /events/ (grey background, overflow hidden, content-visibility), which do not belong on a block in the middle of a
   page, and the nesting section > container > shell > module > grid added 18 + 16 + 16 + 18px on each side of a phone
   (cards 118px wide, the date cut off). Phones now use the same 40px as /events/. */
html body[class] .tfe-premium-events-shell.tfe-events-page--landing {
  background: transparent !important;
  overflow: visible !important;
  content-visibility: visible !important;
}
@media (max-width: 767px) {
  html body[class] .tfe-premium-section--event-archive { padding-left: 16px !important; padding-right: 16px !important; }
  html body[class] .tfe-premium-section--event-archive > .tfe-container { padding-left: 0 !important; padding-right: 0 !important; }
  html body[class] .tfe-premium-events-shell.tfe-events-page--landing { padding-left: 12px !important; padding-right: 12px !important; }
  html body[class] .tfe-premium-events-shell.tfe-events-page--landing .tfe-wrap.tfe-instance { padding-left: 0 !important; padding-right: 0 !important; }
  html body[class] .tfe-premium-events-shell.tfe-events-page--landing .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid { padding-left: 12px !important; padding-right: 12px !important; }
}

/* 27. Artists: the artist page (single-performer.php) and the list (/artists/).
   Artist page, what was wrong:
   - 768-1024px: the poster was centred above a left-aligned text block (layout-mobile-core.css turns the hero into one
     column up to 1024px and centres only the poster). The hero is two columns again, as on a laptop.
   - The hero, the sections and the event cards had three different left edges on tablets and small laptops (18, 40 and
     46px at 1024px) and were wider than the header pill. They use the frame of the single event page now: the header
     pill from 1181px, a little inside it below that, one gutter from 768 to 900px.
   - Event cards (upcoming and past) sat 20-22px inside the heading and the white boxes, and were 116px wide on a phone
     with 70px of empty space on each side (the plugin wrapper, the section and the grid each added a gutter).
     Three per row from 768px, four from 900px, five from 1180px, six from 1360px; the rows of twelve and six end full.
   - Phones: the round social buttons, "Back" and "Copy link" sat in a four-column grid. With 1, 2, 3 or 5 social buttons
     the row had holes on the right or a lonely "Copy link" at the left. The buttons are wrapped in .tfe-actions__social
     (single-performer.php) and form one centred row.
   Artists list: from 641 to 767px the section heading stayed at the left under a centred hero (the page centres it up
   to 640px only). */

/* 27.1 Artist page frame. The width is the same as on the event page: 1212px at most, never wider than the header pill. */
html body.single-performer .tfe-page-wrapper.tfe-design-v4 { --pf-w: min(1212px, 100% - 9.2vw); }
@media (min-width: 1181px) {
  html body.single-performer .tfe-page-wrapper.tfe-design-v4 { --pf-w: min(1212px, 100% - 11.64vw); }
}
@media (min-width: 901px) {
  html body.single-performer .tfe-page-wrapper.tfe-design-v4 > .tfe-hero > .tfe-container,
  html body.single-performer .tfe-page-wrapper.tfe-design-v4 > .tfe-layout {
    max-width: var(--pf-w) !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  html body.single-performer .tfe-page-wrapper.tfe-design-v4 > .tfe-hero .tfe-hero__content {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  /* The Spotify player stopped at 1180px and sat 16px inside the boxes below it. */
  html body.single-performer .tfe-page-wrapper.tfe-design-v4 .tfe-spotify-wrap { max-width: none; }
  /* The biography keeps the line length it had in the 1092px frame. */
  html body.single-performer .tfe-page-wrapper.tfe-design-v4 .tfe-bio-content { max-width: 1010px; }
}
/* Tablets, 768-900px: the hero and the page share one side gutter (the same 3.8vw as the event page). */
@media (min-width: 768px) and (max-width: 900px) {
  html body.single-performer .tfe-page-wrapper.tfe-design-v4 > .tfe-hero > .tfe-container,
  html body.single-performer .tfe-page-wrapper.tfe-design-v4 > .tfe-layout {
    padding-left: clamp(18px, 3.8vw, 44px) !important;
    padding-right: clamp(18px, 3.8vw, 44px) !important;
  }
  html body.single-performer .tfe-page-wrapper.tfe-design-v4 > .tfe-hero .tfe-hero__content {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* 27.2 Hero on tablets, 768-1024px: poster on the left, text on the right, both starting at the top edge of the text. */
@media (min-width: 768px) and (max-width: 1024px) {
  html body.single-performer .tfe-page-wrapper.tfe-design-v4 > .tfe-hero .tfe-hero__content {
    grid-template-columns: clamp(220px, 29vw, 300px) minmax(0, 1fr) !important;
    gap: clamp(26px, 4vw, 44px) !important;
    align-items: end !important;
    justify-items: stretch !important;
    text-align: left !important;
  }
  html body.single-performer .tfe-page-wrapper.tfe-design-v4 > .tfe-hero .tfe-poster {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  html body.single-performer .tfe-page-wrapper.tfe-design-v4 > .tfe-hero .tfe-hero-title {
    font-size: clamp(34px, 5.2vw, 56px) !important;
    text-align: left !important;
  }
}

/* 27.3 Social buttons of the hero. The wrapper changes nothing on tablets and desktops (display:contents, set in
   pages/single-performer.css so that it also holds when this layer is switched off) and is its own centred row on phones. */
@media (max-width: 767px) {
  html body.single-performer .tfe-page-wrapper > .tfe-hero .tfe-actions .tfe-actions__social {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
}
/* Up to 374px (360px phones) five round buttons of 52px and four gaps of 12px are 308px and the row is 296px wide, so
   the fifth button stood alone in a second row. 44px (the smallest comfortable tap size) and 8px gaps fit from 320px. */
@media (max-width: 374px) {
  html body.single-performer .tfe-page-wrapper > .tfe-hero .tfe-actions .tfe-actions__social {
    gap: 8px;
  }
  html body.single-performer .tfe-page-wrapper > .tfe-hero .tfe-actions .tfe-actions__social .tfe-btn--icon {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    flex: 0 0 44px !important;
  }
}

/* 27.4 Events of the artist, upcoming and past. No extra gutter inside the plugin wrapper, so the first card starts where
   the heading starts and the cards end where the white boxes end. */
html body.single-performer .tfe-page-wrapper.tfe-design-v4 :is(#tfe-events, #tfe-past-events) .tfe-wrap.tfe-instance {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
html body.single-performer .tfe-page-wrapper.tfe-design-v4 :is(#tfe-events, #tfe-past-events) .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
@media (max-width: 767px) {
  html body.single-performer .tfe-page-wrapper.tfe-design-v4 :is(#tfe-events, #tfe-past-events) {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}
@media (min-width: 768px) {
  html body.single-performer .tfe-page-wrapper.tfe-design-v4 :is(#tfe-events, #tfe-past-events) .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid {
    display: flex !important;
    flex-flow: row wrap !important;
    justify-content: center;
    gap: 20px !important;
    overflow: visible;
  }
  html body.single-performer .tfe-page-wrapper.tfe-design-v4 :is(#tfe-events, #tfe-past-events) .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid > .tfe-card-item {
    flex: 0 0 calc((100% - 40px) / 3);
    width: calc((100% - 40px) / 3);
    min-width: 0;
    max-width: none;
  }
}
@media (min-width: 900px) {
  html body.single-performer .tfe-page-wrapper.tfe-design-v4 :is(#tfe-events, #tfe-past-events) .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid > .tfe-card-item {
    flex: 0 0 calc((100% - 60px) / 4);
    width: calc((100% - 60px) / 4);
  }
}
@media (min-width: 1180px) {
  html body.single-performer .tfe-page-wrapper.tfe-design-v4 :is(#tfe-events, #tfe-past-events) .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid > .tfe-card-item {
    flex: 0 0 calc((100% - 80px) / 5);
    width: calc((100% - 80px) / 5);
  }
}
@media (min-width: 1360px) {
  html body.single-performer .tfe-page-wrapper.tfe-design-v4 :is(#tfe-events, #tfe-past-events) .tfe-wrap.tfe-instance[data-layout="grid"] > .tfe-grid > .tfe-card-item {
    flex: 0 0 calc((100% - 100px) / 6);
    width: calc((100% - 100px) / 6);
  }
}

/* 27.5 Artists list: the section heading is centred up to 767px (the page did it up to 640px), the blue bar goes. */
@media (max-width: 767px) {
  html body.page-template-page-artists .tfe-section-heading {
    justify-content: center;
    text-align: center;
    margin-bottom: 20px;
  }
  html body.page-template-page-artists .tfe-section-heading::before { display: none; }
}

/* 27.6 Narrow cards: the events of the artist page and the tour dates and recommendations under the event page. From
   768px these grids hold 3 to 6 cards per row, so a card is 185-270px wide and its caption row (price and button, one
   nowrap row in the plugin) is 157-240px. "Event ended", "Notify me", "Розпродано", "Подія завершена" and
   "Wydarzenie zakończone" did not fit next to the price and stuck out of the card (clipped at its edge from 1360px).
   Now: the row may wrap (the button goes under the price) when both do not fit, a long label wraps into two lines
   instead of being cut, and on cards that cannot be bought (ended, sold out, not on sale yet) the price is hidden and
   the button takes the whole row. Phones are not touched: the plugin stacks price and button there. */
@media (min-width: 768px) {
  html body :is(
    .single-performer .tfe-page-wrapper.tfe-design-v4 :is(#tfe-events, #tfe-past-events),
    .single-event .tfe-event-v3 .tfe-event-story--wide .tfe-related-events
  ) .tfe-card-caption-row {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  html body :is(
    .single-performer .tfe-page-wrapper.tfe-design-v4 :is(#tfe-events, #tfe-past-events),
    .single-event .tfe-event-v3 .tfe-event-story--wide .tfe-related-events
  ) .tfe-card-caption-cta {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    margin-left: auto;
    white-space: normal;
  }
  html body :is(
    .single-performer .tfe-page-wrapper.tfe-design-v4 :is(#tfe-events, #tfe-past-events),
    .single-event .tfe-event-v3 .tfe-event-story--wide .tfe-related-events
  ) :is(.tfe-card-status--ended, .tfe-card-status--soldout, .tfe-card-status--notify) .tfe-card-caption-price {
    display: none;
  }
  html body :is(
    .single-performer .tfe-page-wrapper.tfe-design-v4 :is(#tfe-events, #tfe-past-events),
    .single-event .tfe-event-v3 .tfe-event-story--wide .tfe-related-events
  ) :is(.tfe-card-status--ended, .tfe-card-status--soldout, .tfe-card-status--notify) .tfe-card-caption-cta {
    flex: 1 1 auto;
    margin-left: 0;
  }
}

/* 27.7 Artist page on tablets. Two older rules broke the 768-820px range (iPad Air held upright is 820px wide) and the
   pill row up to 1024px:
   - layout-mobile-core.css makes every .tfe-btn 100% wide, 48px tall and 16px round up to 820px (a rule written for the
     events filter). On the artist page that turned the hero buttons, each round social button included, into
     full-width bars, and squeezed the text of the "Available for booking" block to 0px, because its button took the
     whole row (the block is a row from 768px). Here the buttons get their own size back, the same as from 821px.
   - the same file makes .tfe-meta-row a one-line swipe row up to 1024px, so the last pill ("Updated: ...") was cut at
     the edge of the text column. The pills wrap now.
   - the hero is not the first child of .tfe-page-wrapper (single-performer.php prints a <style> before it), so the rule
     of section 14 never reached it, and the older rules give it 8vw of top padding. From 768 to 1100px the label
     "Official tickets" sat 7px behind the header at 769px and 3px behind it at 820px. It starts 17px under it now.
   Phones (up to 767px) keep their own rules. */
@media (min-width: 768px) and (max-width: 820px) {
  html body.single-performer :is(.tfe-hero .tfe-actions, .tfe-booking-info) .tfe-btn {
    width: auto !important;
    min-height: 44px !important;
    border-radius: var(--radius-sm, 8px) !important;
  }
  html body.single-performer .tfe-hero .tfe-actions .tfe-btn--icon { width: 44px !important; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  html body.single-performer .tfe-hero .tfe-meta-row {
    flex-wrap: wrap !important;
    overflow: visible !important;
  }
}
@media (min-width: 768px) and (max-width: 1100px) {
  html body.single-performer .tfe-page-wrapper > .tfe-hero { padding-top: 86px !important; }
}

/* 27.8 Artists list on tablets: the category chips (All, Actor, Ballet ... Stand-up comedian) are one swipe line up to
   1024px (layout-mobile-core.css, written for phones), so at 768-860px the last chip was cut at the edge of the screen.
   From 768px there is room to let them wrap, as they do on desktop. Phones keep the swipe line. */
@media (min-width: 768px) and (max-width: 1024px) {
  html body.page-template-page-artists .tfe-filter-pills {
    flex-wrap: wrap !important;
    overflow: visible !important;
  }
}

/* 28. Action buttons on small tablets, 768-820px (an iPad Air held upright is 820px wide). layout-mobile-core.css makes
   every .tfe-btn 100% wide, 48px tall and 16px round up to 820px, a rule written for phones and the events filter.
   In the hero of a tour page (and its row of calendar and share buttons) and in the action rows of the category pages
   (concerts, theatre, cinema, advertising), the legal pages and the 404 page, that turned the buttons into bars 680 to
   730px wide. From 821px the same buttons have their own size and sit in a row, so they get it back here. The artist
   page does the same in 27.7. Buttons inside cards, forms and the ticket box of an event keep the full width. */
@media (min-width: 768px) and (max-width: 820px) {
  html body :is(.tfe-premium-actions, .tfe-tour-hero-actions, .tfe-secondary-actions) .tfe-btn {
    width: auto !important;
    min-height: 44px !important;
    border-radius: var(--radius-sm, 8px) !important;
  }
}

/* 29. Tour page (single-tour.php). What was wrong on tablets and laptops:
   - the row of tabs (Tour Schedule / About the Tour / Artist Page) started 50px to the left of the hero and the blocks
     at 1440px (x=124, the rest 174), and at 1024px the page had four different left edges (18, 22, 46 and 59px);
   - 768-1024px: the poster was centred above a left-aligned text block (layout-mobile-core.css, as on the artist page);
   - 768-1024px: the three stat boxes sat two and one, the third alone under the first (the same file);
   - 768-900px: the schedule rows dropped the price and the "Tickets" button under the title, at the left, the price
     touching the button, although the row has room for them on the right, as it has from 901px.
   The tour page uses the frame of the event and the artist page now (1212px at most, never wider than the header pill). */

/* 29.1 Frame. The hero, the row of tabs and the blocks under it share one left and right edge. */
html body.single-tour .tfe-page-wrapper { --tp-w: min(1212px, 100% - 9.2vw); }
@media (min-width: 1181px) {
  html body.single-tour .tfe-page-wrapper { --tp-w: min(1212px, 100% - 11.64vw); }
}
@media (min-width: 901px) {
  html body.single-tour .tfe-page-wrapper > .tfe-hero > .tfe-container,
  html body.single-tour .tfe-page-wrapper > .tfe-tour-local-nav,
  html body.single-tour .tfe-page-wrapper > .tfe-layout {
    max-width: var(--tp-w) !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  html body.single-tour .tfe-page-wrapper > .tfe-hero .tfe-hero__content {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  /* The description keeps the line length it had in the 1092px frame. */
  html body.single-tour .tfe-page-wrapper > .tfe-layout #tour-about .tfe-content { max-width: 1010px; }
}
/* Tablets, 768-900px: the hero, the tabs and the page share one side gutter (the same 3.8vw as the event page). */
@media (min-width: 768px) and (max-width: 900px) {
  html body.single-tour .tfe-page-wrapper > .tfe-hero > .tfe-container,
  html body.single-tour .tfe-page-wrapper > .tfe-tour-local-nav,
  html body.single-tour .tfe-page-wrapper > .tfe-layout {
    padding-left: clamp(18px, 3.8vw, 44px) !important;
    padding-right: clamp(18px, 3.8vw, 44px) !important;
  }
  html body.single-tour .tfe-page-wrapper > .tfe-hero .tfe-hero__content {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* 29.2 Hero on tablets, 768-1024px: poster on the left, text on the right, as on a laptop. The pills wrap (the older
   rule makes them a one-line swipe row up to 1024px and cut the last one). */
@media (min-width: 768px) and (max-width: 1024px) {
  html body.single-tour .tfe-page-wrapper > .tfe-hero .tfe-hero__content {
    grid-template-columns: clamp(220px, 29vw, 300px) minmax(0, 1fr) !important;
    gap: clamp(26px, 4vw, 44px) !important;
    align-items: center !important;
    justify-items: stretch !important;
    text-align: left !important;
  }
  html body.single-tour .tfe-page-wrapper > .tfe-hero .tfe-poster {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  html body.single-tour .tfe-page-wrapper > .tfe-hero .tfe-hero-title {
    font-size: clamp(34px, 5.2vw, 56px) !important;
    text-align: left !important;
  }
  html body.single-tour .tfe-hero .tfe-meta-row {
    flex-wrap: wrap !important;
    overflow: visible !important;
  }
  /* 29.3 The three stat boxes in one row, not two and one. */
  html body.single-tour .tfe-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

/* 29.4 Schedule rows on small tablets, 768-900px: date, photo, text and, on the right, the price over the button
   (as from 901px). The phone layout, with the price under the text, stays up to 767px. */
@media (min-width: 768px) and (max-width: 900px) {
  html body.single-tour #tour-schedule .tfe-tour-schedule-item {
    grid-template-columns: 74px 72px minmax(0, 1fr) minmax(132px, auto);
  }
  html body.single-tour #tour-schedule .tfe-tour-schedule-side {
    grid-column: 4;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-end;
    text-align: right;
    margin-top: 0;
  }
}

/* 30. Audit of the city, country, venue, home and service pages on tablets (10.2.70). The events filters are
   in sections 6 and 23. What else was found:
   - contacts: the three cards were one stretched column from 768 to 1024px (a blanket rule of the mobile layers
     overrides the two columns the page asks for), and the subscribe button wrapped under its field and out of the pill
     (601-1024px);
   - home: the tours strip had four cards in three columns from 701 to 1050px, the fourth alone at the left;
   - FAQ and volunteers: three cards in two columns at 768-1024px, the third alone at the left;
   - city and country pages: the centred short last row did not apply when "Show more" had hidden cards;
   - country and venue pages: the events block was 46px narrower on each side than on /events/ on tablets. */

/* 30.1 Contacts, tablets: two columns, an odd last card spans both (as the page asks for; three across from 1025px).
   The subscribe field and button stay in one line inside the pill, from 601px (below that the page stacks them). */
@media (min-width: 768px) and (max-width: 1024px) {
  html body .tfe-c-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  html body .tfe-c-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  /* The four social buttons: two by two (in a card 420-480px wide they made three and one). */
  html body .tfe-c-grid .tfe-socials {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 601px) and (max-width: 1024px) {
  html body #tfe-contacts-sub {
    flex-wrap: nowrap !important;
  }
  html body #tfe-contacts-sub .tfe-sub-input {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
  }
}

/* 30.2 Home, tours strip on tablets, 768-1050px: four cards (or eight) in four columns, not three and one. The page asks
   for three columns from 701px, which left the fourth card alone at the left. Other counts keep three columns. */
@media (min-width: 768px) and (max-width: 1050px) {
  html body .tfe-discovery-home .tfe-discovery-tours__grid:is(:has(> :nth-child(4):last-child), :has(> :nth-child(8):last-child)) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* 30.3 FAQ topics and volunteers: a block of exactly three cards stays in one row of three on tablets, 768-1024px.
   The FAQ asked for two columns up to 980px and the mobile layers for two up to 1024px, which left the third card alone. */
@media (min-width: 768px) and (max-width: 1024px) {
  html body :is(.tfs-grid-3, .tfv-grid-3):has(> :nth-child(3):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* 30.4 Country, venue and category pages, tablets 768-1100px: the events block stood 74px from the screen edge (section
   28px + container 24px + module 22px), /events/ has 28px, and the hero text stood at 46px, /events/ has 24px (hero grid
   22px + hero content 24px). The extra padding of the container, the module and the hero grid goes, so both pages
   share one edge. Phones (section 26) are not touched.
   From 1025px the container was as wide as the screen minus 40px (up to 1140px), 16px wider than the section it sits in,
   so from 1101 to 1195px (iPad landscape, small laptops) the filters and cards leaned to the right: 52px from the left
   edge, 36px from the right. It is as wide as the section now, so the block is centred. At 1196px and up the width is
   the same as before (1140px). */
@media (min-width: 768px) and (max-width: 1100px) {
  html body[class] .tfe-premium-section--event-archive > .tfe-container,
  html body[class] .tfe-premium-events-shell .tfe-wrap.tfe-instance,
  html body[class] .tfe-premium-hero > .tfe-container.tfe-premium-hero__grid {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}
html body[class] .tfe-premium-section--event-archive > .tfe-container {
  width: 100% !important;
}

/* 31. 10.2.73 audit of all devices: 34 page types at 360, 390, 768, 1024, 1280, 1440 and 1920px.

   31.1 One line height for every page title (h1): 1.08. The page rules set their own, from 0.96 to 1.14: 0.96 on the about,
   advertising, FAQ, organisers and legal pages, 1.0 on concerts, theatre, search and 404, 1.02 on the lists of events,
   tours and artists, on contacts and on volunteers, 1.04 on the artist page, 1.14 on the event page. At 0.96 and 1.0 a
   title of three or four lines, Ukrainian above all, had its lines touching. The id inside :not() lifts this rule above
   the page rules (they use classes and !important); no element has that id. Sizes, weights and spacing of letters stay
   as they are. */
html body h1:not(#tfe-h1) {
  line-height: 1.08 !important;
}

/* 31.2 Footer rows and the e-mail link, phones and tablets (up to 1023px). A link was 17px high and 28px from the next
   one, so a thumb often missed it or hit the neighbour. A row is 32px high now and the whole row can be tapped; the links
   stay centred and look the same, the footer is 58 to 68px taller on a phone and 49px on a tablet. */
@media (max-width: 1023px) {
  html body .site-footer .footer-links {
    gap: 0 !important;
  }
  html body .site-footer .footer-links a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding-inline: 6px;
  }
  html body .site-footer .footer-email {
    min-height: 32px;
  }
}

/* 31.3 Footer column titles: 11px instead of 10px. */
html body .site-footer .footer-heading {
  font-size: 11px !important;
}

/* 31.4 Home and city cards on tablets, 768-1279px: date, place, price and button text followed the screen width and
   stopped at 9-10px; they are 11px like on phones and desktops. */
@media (min-width: 768px) and (max-width: 1279px) {
  html body .tfe-discovery-home .tfe-slider-lock .tfe-card-caption-date,
  html body .tfe-discovery-home .tfe-slider-lock .tfe-card-caption-meta,
  html body .tfe-discovery-home .tfe-slider-lock .tfe-card-caption-price,
  html body .tfe-discovery-home .tfe-slider-lock .tfe-card-caption-cta {
    font-size: 11px !important;
  }
}

/* 31.5 Tours page slider: the dots stay 7px, the touch area around them grows (the hero slider of the home page has it). */
html body .tfe-slider-dot {
  position: relative;
}
html body .tfe-slider-dot::before {
  content: "";
  position: absolute;
  inset: -12px -4px;
}


/* 10.2.79 - artists list.
   Phones: the last card of an odd row was meant to stay half-width and centred (rule above), but another width rule
   won and it filled the whole row, twice the size of the other cards. The intended size is enforced here.
   Desktop and tablet: less empty space between the hero and the list. */
@media (max-width: 767px) {
  html body .tfe-page-wrapper .tfe-artists-grid > .tfe-artist-card:last-child:nth-child(odd) {
    width: calc(50% - 6px) !important;
    max-width: calc(50% - 6px) !important;
    flex: 0 0 auto !important;
  }
}
@media (min-width: 768px) {
  html body.page-template-page-artists .tfe-page-wrapper > .tfe-hero { margin-bottom: 16px !important; }
  html body.page-template-page-artists .tfe-page-wrapper > .tfe-layout { padding-top: 28px !important; }
}
