/* ---------------------------------------------------------------------------
   Layout and readability fixes. Loaded last, so it can settle conflicts with
   the older chrome and section rules without editing them.
   --------------------------------------------------------------------------- */

/* --- letter tile for listings with no icon of their own -------------------- */
.fav-tile {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border: 2px solid var(--ink);
  border-radius: 5px;
  color: #14141C;
  font-family: var(--display); font-size: 12px; font-weight: 800;
  line-height: 1; text-transform: uppercase;
  user-select: none;
}
.show-row .fav-tile { width: 24px; height: 24px; }
.dest-card-head .fav-tile { width: 28px; height: 28px; font-size: 14px; }
.sr-favicon.fav-tile { width: 24px; height: 24px; }
.spotlight-favicon.fav-tile { width: 40px; height: 40px; font-size: 20px; border-radius: 8px; }

/* --- floating Surprise Me: steps aside when the footer is on screen ------- */
.float-surprise-wrap { transition: opacity .2s ease, visibility .2s ease; }
.float-surprise-wrap.is-away { opacity: 0; visibility: hidden; pointer-events: none; }
@media (max-width: 768px) {
  /* Room at the very end of the page so the last footer row is never under the button. */
  .site-shell > footer { padding-bottom: 84px; }
  .float-surprise { font-size: 14px; padding: 10px 16px; border-width: 3px; }
}

/* --- destination card header: long names wrap, badges never overlap ------ */
.dest-card-head { flex-wrap: wrap; row-gap: 8px; align-items: center; }
.dest-card-head .dest-name { flex: 1 1 9em; min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.dest-card-head .dest-heat { margin-left: auto; }
.dest-card.is-featured .dest-card-head .dest-name { font-size: clamp(18px, 2.4vw, 22px); }
.dest-cta { font-size: 13px; letter-spacing: .1em; display: inline-flex; align-items: center; min-height: 44px; }

/* --- showcase rows (Trending, Top Picks, Recently Added) ------------------ */
.show-row .nm {
  white-space: normal; overflow: hidden; text-overflow: clip;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}
.show-row .tg { font-size: 12px; }
@media (max-width: 640px) {
  .show-row { gap: 10px; padding: 12px; min-height: 56px; }
  .show-row .tag-slot { display: none; }          /* the category is already the sub-label */
  .show-row .rank { min-width: 30px; font-size: 18px; }
  .showcase-head { align-items: flex-start; gap: 6px 16px; }
  .showcase .section-h, .directory .section-h { font-size: clamp(34px, 11vw, 48px); overflow-wrap: normal; word-break: normal; }
  .showcase .section-h .accent, .directory .section-h .accent { display: block; }
  .view-all { min-height: 44px; display: inline-flex; align-items: center; }
}

/* --- tap targets: 44px minimum -------------------------------------------- */
@media (max-width: 768px) {
  .dest-detail-arrow { position: relative; width: 32px; height: 32px; font-size: 18px; }
  .cat-link-list .dest-detail-arrow,
  .show-row .dest-detail-arrow,
  .mini-list .dest-detail-arrow { width: 32px; height: 32px; font-size: 18px; }
  .dest-detail-arrow::after { content: ''; position: absolute; inset: -6px; }
  .cat-link-list .dest-link,
  .mini-list li { min-height: 44px; }
  .content-block#destinations .dest-link { padding-top: 12px; padding-bottom: 12px; }
  .foot-links { gap: 0 18px; }
  .foot-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .foot-social .bb-social-link { min-height: 44px; }
  .menu-panel a { min-height: 44px; display: flex; align-items: center; }
}

/* --- readable headings ------------------------------------------------------ */
.article-body h2 { color: var(--ink); -webkit-text-stroke: 0; font-size: clamp(22px, 2.6vw, 30px); text-transform: none; line-height: 1.2; }
.article-body h3 { text-transform: none; }
@media (max-width: 640px) {
  .cat-hero h1 { color: var(--ink); -webkit-text-stroke: 0; text-shadow: 2px 3px 0 var(--orange); font-size: clamp(30px, 9vw, 42px); line-height: 1.02; overflow-wrap: break-word; }
  .cat-hero h1 .accent { color: var(--blue-deep, var(--blue)); }
  .content-block#destinations .section-h { -webkit-text-stroke: 0; color: var(--bg); text-shadow: 2px 3px 0 var(--ink); }
}

/* --- header search: one clear button, and it never covers the nav --------- */
.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
@media (min-width: 821px) {
  .site-header.bbh .search.is-expanded {
    position: absolute;
    top: calc(100% + 10px); right: 0;
    width: min(440px, 92vw);
    z-index: 101;
    box-shadow: 0 6px 0 rgba(37,37,37,.25);
  }
  .site-header.bbh .search.is-expanded .search-close { right: 10px; }
  .site-header.bbh .search.is-expanded input { padding-right: 52px; }
}

/* --- link pages: category chip, visit button, more-in list ----------------- */
.site-hero .site-hero-cat { display: inline-block; margin-bottom: 12px; text-decoration: none; }
.site-actions { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.site-actions .spotlight-play { display: inline-flex; line-height: 0; }
.site-actions .spotlight-play img { height: 52px; width: auto; display: block; }
.site-actions a.spotlight-visit { min-height: 48px; font-size: 16px; }
.more-list { list-style: none; margin: 14px 0 22px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.more-list a {
  display: flex; align-items: center; min-height: 44px; padding: 8px 14px;
  border: 3px solid var(--ink); border-radius: 10px; background: var(--bg-card);
  color: var(--ink); font-family: var(--condensed); font-style: italic; font-weight: 800; font-size: 17px;
  text-decoration: none;
}
.more-list a:hover { background: var(--blue-light); }

/* --- contact form: each label sits directly above its own field, with room before the next ---- */
.bb-form .section-body { margin: 0 0 22px; }
.bb-form label { display: block; margin: 0 0 8px; }
.bb-form input:not([type="checkbox"]), .bb-form select, .bb-form textarea { display: block; width: 100%; max-width: 640px; font-size: 16px; }

/* The Trending head is a flex row in the older rules, which put "This Week" beside "Trending" and off the edge on phones. */
.showcase-head h2.section-h { display: block; min-width: 0; }

/* Phones: the button slides down out of the way while the page scrolls down (site.js adds .is-scrolling). */
.float-surprise-wrap .warn-tag { font-size: 11px; letter-spacing: .06em; top: -20px; right: -14px; }
@media (max-width: 768px) {
  .float-surprise-wrap { transition: transform .25s ease, opacity .2s ease, visibility .2s ease; }
  .float-surprise-wrap.is-scrolling { transform: translateY(calc(100% + 40px)); opacity: 0; pointer-events: none; animation: none; }
  .float-surprise-wrap .warn-tag { font-size: 11px; letter-spacing: .06em; padding: 2px 6px; right: -8px; top: -19px; }
}
@media (prefers-reduced-motion: reduce) {
  .float-surprise-wrap.is-scrolling { transform: none; }
}


/* ==========================================================================
   BATCH 2 — server-rendered directory, one content width, readable text
   ========================================================================== */

/* [hidden] must win over the display rules cards and groups carry. */
.dest-card[hidden], .mood-group[hidden], .filter-tabs[hidden] { display: none !important; }

/* Text floor: 12px for anything read or tapped. Small chips and badges keep 11px. */
.link-cat-tag, .dest-heat, .dest-tag, .cat-num, .badge, .dest-cat { font-size: 11px; }

/* --- category cards: masonry columns, so a short card never leaves a hole --- */
.cat-grid { display: block; column-width: 280px; column-gap: 22px; }
.cat-grid > .cat-card, .cat-grid > .cat-social-card {
  break-inside: avoid; display: block; margin: 0 8px 30px 0; width: auto;
}
.cat-card .cat-card-head h3 a { color: inherit; border: 0; }
.cat-card .cat-card-head h3 a:hover { text-decoration: underline; }
.cat-link-list .desc { display: block; font-size: 12px; line-height: 1.4; color: var(--ink-soft); font-weight: 400; margin-top: 2px; text-transform: none; letter-spacing: 0; }
.cat-link-list .dest-link { flex-wrap: wrap; }

/* --- one content width on landing, category and hub pages ------------------ */
.breadcrumb .inner, .cat-hero .inner,
.content-block .inner, .content-block .inner.wide { max-width: 1160px; margin-left: auto; margin-right: auto; }
.content-block .section-body, .content-block .mood-blurb { max-width: 76ch; }
.content-block .section-h { margin-bottom: 32px; }
.content-block .section-eyebrow + .section-h { margin-top: 6px; }
.mood-group { margin: 0 0 56px; }
.mood-group:last-child { margin-bottom: 0; }
.mood-h { margin-bottom: 10px !important; }
.mood-blurb { margin: 0 0 24px; opacity: .85; }
.answer { font-size: 18px; line-height: 1.6; }
.see-also a { margin-right: 2px; }

.jump-links { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 22px; }
.jump-links a { font-size: 12px; font-weight: 700; padding: 8px 12px; border: 2px solid var(--ink); background: var(--bg-card); color: var(--ink); border-radius: 999px; min-height: 36px; display: inline-flex; align-items: center; }
.jump-links a:hover { background: var(--yellow); }

/* --- listing cards: header is a grid, badges get their own row ------------- */
.dest-card-head { display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.dest-card-head .dest-title { margin: 0; font-size: inherit; min-width: 0; }
.dest-card-head .dest-name { display: block; flex: none; font-size: 17px; overflow-wrap: anywhere; }
.dest-card.is-featured .dest-card-head .dest-name { font-size: clamp(18px, 2.4vw, 22px); }
.dest-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.dest-meta .dest-heat { margin: 0; }
.dest-cat { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--ink-soft); border-bottom: 1px dashed var(--ink-faint); }
.dest-cta { font-size: 12px; text-transform: none; letter-spacing: .02em; font-weight: 700; min-height: 36px; display: flex; align-items: center; }
.dest-card .dest-desc { font-size: 14px; }

/* --- random website page --------------------------------------------------- */
.random-stage { margin: 30px 0 6px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.random-btn {
  font-family: var(--display); font-size: clamp(26px, 5vw, 44px); text-transform: uppercase; letter-spacing: .02em;
  padding: 22px 38px; background: var(--orange); color: var(--fixed-dark); border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink); cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; min-height: 64px;
}
.random-btn:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 var(--ink); }
.random-btn:active { transform: translate(6px, 6px); box-shadow: 2px 2px 0 var(--ink); }
.random-result { margin: 0; font-size: 15px; }
.random-result a { text-decoration: underline; }
.steps { margin: 0; padding-left: 1.3em; display: grid; gap: 12px; max-width: 76ch; font-size: 16px; line-height: 1.55; }
.random-cat { font-family: var(--display); font-size: 20px; margin: 0 0 10px; text-transform: uppercase; }
.random-cat a { color: inherit; }
.random-list { list-style: none; margin: 0; padding: 0; columns: 2 380px; column-gap: 36px; }
.random-list li { break-inside: avoid; padding: 8px 0; border-bottom: 1px dashed var(--ink-faint); font-size: 14px; line-height: 1.45; }
.random-list .rl-desc { color: var(--ink-soft); }

/* --- Editor's Spotlight: big icon in the left column, name as the heading -- */
.spotlight-split { display: grid !important; grid-template-columns: 112px minmax(0, 1fr); gap: 8px 26px; align-items: start; position: relative; padding: 26px 28px; }
.spotlight-split .badge { grid-column: 1 / -1; justify-self: start; }
.spotlight-split .spotlight-icon { display: flex; align-items: flex-start; justify-content: center; }
.spotlight-split .spotlight-icon .favicon { width: 96px; height: 96px; border-radius: 22px; border: 3px solid var(--ink); object-fit: cover; background: var(--bg-card); font-size: 44px; display: inline-flex; align-items: center; justify-content: center; }
.spotlight-pick.spotlight-split .spotlight-body h3 { font-family: var(--display); font-size: clamp(24px, 3vw, 36px) !important; margin: 0 0 8px; line-height: 1.1; text-transform: uppercase; letter-spacing: -.01em; }
.spotlight-split .spotlight-body h3 a { display: inline; font-size: inherit !important; font-family: inherit; }
@media (max-width: 640px) {
  .spotlight-split { grid-template-columns: 72px minmax(0, 1fr); gap: 8px 16px; padding: 20px 18px; }
  .spotlight-split .spotlight-icon .favicon { width: 64px; height: 64px; border-radius: 16px; font-size: 30px; }
}
@media (max-width: 520px) {
  .spotlight-split { grid-template-columns: 1fr; }
  .spotlight-split .spotlight-icon { justify-content: flex-start; }
}

/* --- Turnstile: no reserved space until the widget renders ------------------ */
.foot-subscribe-turnstile { min-height: 0 !important; height: auto; margin: 0; }
.foot-subscribe-turnstile:not(:has(.cf-turnstile)) { display: none; }

/* --- footer: category list, and corners that follow the shell's radius ------- */
.site-shell > footer { overflow: hidden; border-radius: 0 0 18px 18px; }
.foot-subscribe { border-radius: 0; }
.foot-cats { flex-basis: 100%; border-top: 1px dashed rgba(244,239,230,.18); padding-top: 20px; order: 5; }
.foot-cats-label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(244,239,230,.7); margin: 0 0 10px; }
.foot-cats ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 18px; }
.foot-cats a { color: var(--bg); font-size: 13px; display: inline-flex; align-items: center; min-height: 32px; }
.foot-cats a:hover { color: var(--orange); }
@media (max-width: 640px) { .site-shell > footer { border-radius: 0; } .foot-cats a { min-height: 40px; } }

/* --- breadcrumbs stay on one line; long ones scroll sideways ----------------- */
.breadcrumb .inner { white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.breadcrumb .inner::-webkit-scrollbar { display: none; }

/* --- search: one clear button, and the nav steps aside while it is open ------ */
input[type="search"]::-webkit-search-cancel-button { display: none; -webkit-appearance: none; }
.bbh:has(.search.is-expanded) .bbh-nav { visibility: hidden; }

/* --- trending page list -------------------------------------------------------- */
.trending-page-list { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.show-row .nm { overflow-wrap: anywhere; }
.dest-card .dest-title { display: block; border: 0; padding: 0; }
.dest-card .dest-name, .dest-card .dest-link { border: 0; text-decoration: none; }
.content-block#destinations .mood-h { font-size: clamp(26px, 3.2vw, 44px); line-height: .95; margin-bottom: 10px; }
.dest-card .dest-card-head .dest-name { border-bottom: 0 !important; }
.dest-card .dest-card-head .dest-name:hover { text-decoration: underline; }
.random-list .dest-link { border: 0; display: inline; padding: 0; }
.random-list li { display: block; }
.random-list .dest-detail-arrow { display: inline-flex; vertical-align: middle; margin-left: 6px; }
.random-list .dest-link { border: 0; display: inline; padding: 0; }
.random-list li { display: block; }
.random-list .dest-detail-arrow { display: inline-flex; vertical-align: middle; margin-left: 6px; }
/* Footer corner notches: the shell takes the same radius as the header and footer inside its border. */
.site-shell { border-radius: 22px; }
@media (max-width: 640px) { .site-shell { border-radius: 0; } }

/* --- Colour sweep, 21 Nov 2026 (Gray: "really bad colour combo, sweep and fix") ---
   Rule: small text on a colour must clear 4.5:1, display text 3:1 (or carry an ink outline).
   Brand blue #12A9DC and orange-red #FF6A3D are mid-tones: cream text on them fails, ink passes (~5.6:1). */

/* Listing/category hero: plain ink title on phones (was ink + orange shadow = muddy). */
@media (max-width: 640px) {
  .cat-hero h1 { color: var(--ink); text-shadow: none; -webkit-text-stroke: 0; }
  .cat-hero h1 .accent { color: var(--fixed-dark); background: var(--yellow); }
  /* headings on blue/orange bands: accent words go ink instead of orange-on-blue */
  .showcase .section-h .accent, .directory .section-h .accent,
  .content-block#destinations .section-h .accent { color: var(--ink); -webkit-text-stroke: 0; text-shadow: none; }
}

/* Hero category chip: one neutral style, full category name. */
.site-hero .link-cat-tag.site-hero-cat { background: var(--ink); color: var(--fixed-cream); border-color: var(--ink); }

/* Small text on brand blue -> ink. */
.content-block#destinations .filter-label,
.content-block#destinations .section-eyebrow,
.content-block#destinations .sub,
.content-block#destinations .sub a,
.directory .sub, .directory .sub a { color: var(--ink); }

/* Home directory band (blue): its intro line and link. */
.directory > .inner > .sub, .directory > .inner > .sub a { color: var(--ink); }

/* Phones: headings on the blue list band lose their outline, so make them ink; accents on coloured bands go ink too. */
@media (max-width: 640px) {
  .content-block#destinations .section-h { color: var(--ink); text-shadow: none; }
  .showcase.recently .section-h .accent,
  .showcase.toppicks .section-h .accent,
  .showcase.trending .section-h .accent,
  .directory .section-h .accent { color: var(--ink); -webkit-text-stroke: 0; text-shadow: none; }
}

/* Active nav pill and blue buttons: deep blue keeps cream text readable. */
.site-header.bbh .bbh-link[aria-current="page"] { background: var(--blue-deep); color: var(--fixed-cream); }

/* Orange-red chips, badges and the warning tag -> ink text. */
.float-surprise-wrap .warn-tag,
.dest-heat.heat-3,
.link-cat-tag.games, .link-cat-tag.time,
.cat-card[data-cat="games"] .cat-num,
.cat-card[data-cat="time"] .cat-num,
.cat-card[data-cat="weird"] .cat-num { color: var(--ink); }

/* Deep-blue number chips -> cream text. */
.cat-card[data-cat="brain"] .cat-num,
.cat-card[data-cat="quizzes"] .cat-num,
.cat-card[data-cat="drawing"] .cat-num,
.cat-card[data-cat="hidden"] .cat-num,
.cat-card[data-cat="astrology"] .cat-num { color: var(--fixed-cream); }

/* Lowest heat: grey was 2.2:1 on cream. */
.dest-heat.heat-1 { color: #5F5B57; }
