/* The public blog (/blog, backend/src/services/blog/pages.js): TicketEx colours and type, mobile first; in Gen Z mode
   the website's dark theme (end of this file).
   Text colours meet WCAG AA on their backgrounds; focus is always visible; no layout depends on script. */
:root {
  --tx-brand: #5b2df0;
  --tx-brand-dark: #3f1ea8;
  --tx-brand-soft: #f3f1ff;
  --tx-ink: #0f1222;
  --tx-muted: #4a4f63;
  --tx-line: #e4e3ee;
  --tx-bg: #ffffff;
  --tx-bg-soft: #f8f7fc;
  --tx-radius: 16px;
  --tx-font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
/* With the website's own header and footer (body.tx-site, services/blog/siteShell.js) the site's stylesheets are loaded
   too: these rules only style the blog's own parts (#main, and the fallback header and footer), with :where() so they
   add no weight against the site's classes. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--tx-bg); color: var(--tx-ink); }
body:not(.tx-site) { font-family: var(--tx-font); }
#main { font-size: 17px; line-height: 1.6; }
:where(#main, .tx-header, .tx-footer) img { max-width: 100%; height: auto; display: block; }
:where(#main, .tx-header, .tx-footer) a { color: var(--tx-brand); text-underline-offset: 2px; }
:where(#main, .tx-header, .tx-footer) a:hover { color: var(--tx-brand-dark); }
:where(#main, .tx-header, .tx-footer) :focus-visible { outline: 3px solid var(--tx-brand); outline-offset: 2px; border-radius: 4px; }
:where(#main, .tx-header, .tx-footer) :is(h1, h2, h3, h4) { line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 .5em; }
:where(#main) h1 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); font-weight: 800; }
:where(#main) h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 700; }
:where(#main) h3 { font-size: 1.2rem; font-weight: 700; }
:where(#main) h4 { font-size: 1.05rem; font-weight: 700; }
:where(#main, .tx-header, .tx-footer) p { margin: 0 0 1em; }

/* The website's container (.container-x): the blog lines up under the site's header. */
.tx-wrap { width: 100%; max-width: 80rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 40rem) { .tx-wrap { padding: 0 24px; } }
@media (min-width: 64rem) { .tx-wrap { padding: 0 32px; } }
/* The website's header is fixed (64px, 72px from 1024px): the page starts below it. */
body.tx-site #main { padding-top: 76px; min-height: 70vh; }
@media (min-width: 64rem) { body.tx-site #main { padding-top: 84px; } }
body.tx-site .tx-article-aside { top: 96px; }
.tx-narrow { max-width: 760px; }
.tx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tx-skip { position: absolute; left: 8px; top: -60px; z-index: 10; background: var(--tx-ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.tx-skip:focus { top: 8px; color: #fff; }

.tx-preview-banner { margin: 0; padding: 10px 16px; background: #fff7e6; color: #6b3b00; border-bottom: 1px solid #f3d29a; font-weight: 700; text-align: center; font-size: .95rem; }
/* Under the website's fixed header (it would hide the banner at the top of the page), and it stays there on scroll. */
body.tx-site .tx-preview-banner { position: sticky; top: 64px; z-index: 39; }
@media (min-width: 64rem) { body.tx-site .tx-preview-banner { top: 72px; } }

/* Header */
.tx-header { border-bottom: 1px solid var(--tx-line); background: #fff; position: sticky; top: 0; z-index: 5; }
.tx-header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 10px; padding-bottom: 10px; }
.tx-logo img { width: 120px; height: auto; }
.tx-nav { order: 3; width: 100%; overflow-x: auto; }
.tx-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.tx-nav a { display: inline-block; padding: 8px 12px; border-radius: 999px; color: var(--tx-ink); text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.tx-nav a:hover { background: var(--tx-brand-soft); }
.tx-nav a[aria-current="page"] { background: var(--tx-brand-soft); color: var(--tx-brand-dark); }
.tx-search { display: flex; flex: 1 1 200px; min-width: 0; margin-left: auto; max-width: 360px; }
.tx-search input { flex: 1; min-width: 0; font: inherit; font-size: .95rem; padding: 9px 14px; border: 1px solid var(--tx-line); border-right: 0; border-radius: 999px 0 0 999px; }
.tx-search button { font: inherit; font-weight: 700; font-size: .95rem; padding: 9px 16px; border: 0; border-radius: 0 999px 999px 0; background: var(--tx-brand); color: #fff; cursor: pointer; }
.tx-search button:hover { background: var(--tx-brand-dark); }
@media (min-width: 900px) {
  .tx-nav { order: 0; width: auto; }
  .tx-logo img { width: 140px; }
}

/* Lists */
.tx-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 20px 0 12px; font-size: .9rem; color: var(--tx-muted); }
.tx-crumbs li + li::before { content: "›"; margin-right: 4px; }
.tx-crumbs a { color: var(--tx-muted); }
.tx-crumbs [aria-current] { color: var(--tx-ink); }
.tx-page-head { display: flex; gap: 20px; align-items: flex-start; margin: 8px 0 24px; }
.tx-lead { font-size: 1.15rem; color: var(--tx-muted); max-width: 70ch; }
.tx-meta { font-size: .9rem; color: var(--tx-muted); margin: 0; }
.tx-meta a { color: inherit; font-weight: 600; }
.tx-kicker { margin: 0 0 6px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.tx-kicker a { text-decoration: none; }
.tx-topics ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 28px; }
.tx-topics a { display: inline-block; padding: 6px 14px; border: 1px solid var(--tx-line); border-radius: 999px; text-decoration: none; color: var(--tx-ink); font-weight: 600; font-size: .9rem; }
.tx-topics a:hover { border-color: var(--tx-brand); color: var(--tx-brand-dark); }
.tx-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 640px) { .tx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .tx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tx-card { display: flex; flex-direction: column; border: 1px solid var(--tx-line); border-radius: var(--tx-radius); overflow: hidden; background: #fff; }
.tx-card-media { display: block; aspect-ratio: 16 / 10; background: var(--tx-bg-soft); }
.tx-card-media img { width: 100%; height: 100%; object-fit: cover; }
.tx-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.tx-card-title { font-size: 1.15rem; margin-bottom: 8px; }
.tx-card-title a { color: var(--tx-ink); text-decoration: none; }
.tx-card-title a:hover { color: var(--tx-brand-dark); text-decoration: underline; }
.tx-card-excerpt { color: var(--tx-muted); font-size: .95rem; flex: 1; }
@media (min-width: 640px) {
  .tx-card--featured { grid-column: 1 / -1; flex-direction: row; }
  .tx-card--featured .tx-card-media { flex: 1 1 55%; aspect-ratio: auto; min-height: 280px; }
  .tx-card--featured .tx-card-body { flex: 1 1 45%; padding: 28px; justify-content: center; }
  .tx-card--featured .tx-card-title { font-size: 1.6rem; }
}
.tx-blog-noimg { display: block; width: 100%; height: 100%; min-height: 120px; background: linear-gradient(135deg, var(--tx-brand-soft), #e9e5ff 60%, #d5cdff); }
.tx-pages { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 32px 0; font-weight: 600; }
.tx-empty, .tx-message { text-align: center; padding: 48px 16px; background: var(--tx-bg-soft); border-radius: var(--tx-radius); margin: 16px 0 40px; }
.tx-message { background: none; padding-top: 64px; }
.tx-button { display: inline-block; margin: 4px; padding: 11px 20px; border-radius: 999px; background: var(--tx-brand); color: #fff; font-weight: 700; text-decoration: none; }
.tx-button:hover { background: var(--tx-brand-dark); color: #fff; }
.tx-button--ghost { background: #fff; color: var(--tx-brand-dark); border: 1px solid var(--tx-brand); }
.tx-button--ghost:hover { background: var(--tx-brand-soft); color: var(--tx-brand-dark); }
.tx-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.tx-page-head .tx-avatar { width: 96px; height: 96px; }

/* Article: one container (.tx-wrap) and one left edge for the header, the cover, the article and the sections below it.
   Desktop: the text (a comfortable reading width) and a sticky sidebar (contents, author, destination). Below 1024px:
   one column, the contents first. */
.tx-article-head { margin: 4px 0 28px; max-width: 880px; }
.tx-article-head h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.12; letter-spacing: -0.025em; margin-bottom: .4em; }
.tx-article-head .tx-lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; margin-bottom: 18px; max-width: 760px; }
.tx-cover { margin: 0 0 40px; }
.tx-cover img { width: 100%; aspect-ratio: 21 / 9; height: auto; object-fit: cover; border-radius: 20px; background: var(--tx-bg-soft); }
.tx-article-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.tx-article-main { min-width: 0; max-width: 760px; }
.tx-article-aside { min-width: 0; }
.tx-desktop-only { display: none; }
@media (min-width: 1024px) {
  .tx-article-layout { grid-template-columns: minmax(0, 1fr) 300px; column-gap: 72px; align-items: start; }
  .tx-article-main { grid-column: 1; grid-row: 1; }
  .tx-article-aside { grid-column: 2; grid-row: 1; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto;
    display: flex; flex-direction: column; gap: 16px; padding-bottom: 8px; }
  .tx-desktop-only { display: flex; flex-direction: column; gap: 16px; }
  .tx-mobile-only { display: none; }
}
.tx-toc { border: 1px solid var(--tx-line); border-radius: 16px; padding: 16px 18px; margin: 0 0 28px; background: var(--tx-bg-soft); }
.tx-toc-title, .tx-side-title { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--tx-muted); margin: 0 0 8px; }
.tx-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.tx-toc li { margin: 2px 0; }
.tx-toc a { display: block; min-height: 24px; padding: 4px 10px; border-left: 2px solid transparent; color: var(--tx-ink); text-decoration: none; font-size: .95rem; line-height: 1.4; border-radius: 0 8px 8px 0; }
.tx-toc a:hover { color: var(--tx-brand-dark); background: #fff; }
.tx-toc a[aria-current="true"] { border-left-color: var(--tx-brand); color: var(--tx-brand-dark); font-weight: 700; background: #fff; }
.tx-toc .tx-toc-3 a { padding-left: 24px; font-size: .9rem; color: var(--tx-muted); }
@media (min-width: 1024px) { .tx-toc { margin: 0; background: none; border: 0; border-left: 1px solid var(--tx-line); border-radius: 0; padding: 2px 0 2px 14px; } }
.tx-side-card { border: 1px solid var(--tx-line); border-radius: 16px; padding: 16px 18px; background: #fff; }
.tx-side-card p { margin: 0; }
.tx-side-author { display: flex; gap: 12px; align-items: center; }
.tx-side-author p { display: flex; flex-direction: column; font-weight: 700; line-height: 1.35; }
.tx-side-author p a { color: var(--tx-ink); text-decoration: none; min-height: 24px; display: inline-flex; align-items: center; }
.tx-side-author p a:hover { color: var(--tx-brand-dark); text-decoration: underline; }
.tx-side-author span { font-weight: 500; font-size: .88rem; color: var(--tx-muted); }
.tx-avatar--sm { width: 44px; height: 44px; }
.tx-avatar--letter { display: grid; place-items: center; border-radius: 50%; background: var(--tx-brand-soft); color: var(--tx-brand-dark); font-weight: 800; }
.tx-side-dest { background: var(--tx-brand-soft); border-color: #e9e5ff; }
.tx-side-dest p:last-child { font-weight: 600; line-height: 1.45; }
.tx-prose { font-size: 1.125rem; line-height: 1.75; overflow-wrap: anywhere; }
.tx-prose > p, .tx-prose > ul, .tx-prose > ol { margin-bottom: 1.25em; }
.tx-prose h2 { font-size: clamp(1.45rem, 2.4vw, 1.8rem); margin-top: 2em; margin-bottom: .55em; scroll-margin-top: 90px; }
.tx-prose > h2:first-child { margin-top: 0; }
.tx-prose h3, .tx-prose h4 { margin-top: 1.6em; margin-bottom: .45em; scroll-margin-top: 90px; }
.tx-prose ul, .tx-prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
/* The website's reset removes list markers: articles keep theirs. */
.tx-prose ul { list-style: disc; }
.tx-prose ol { list-style: decimal; }
.tx-prose li { margin: .3em 0; }
.tx-prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--tx-brand); font-size: 1.1rem; }
.tx-prose blockquote cite { display: block; font-style: normal; color: var(--tx-muted); font-size: .95rem; }
.tx-prose blockquote cite::before { content: "— "; }
.tx-prose figure { margin: 1.8em 0; }
.tx-prose figure img { border-radius: 12px; }
.tx-prose figcaption { font-size: .9rem; color: var(--tx-muted); margin-top: 8px; }
.tx-blog-credit { display: inline-block; font-size: .85rem; }
.tx-prose hr { border: 0; border-top: 1px solid var(--tx-line); margin: 2.4em 0; }
.tx-blog-callout { margin: 1.5em 0; padding: 14px 18px; border-radius: 12px; background: var(--tx-brand-soft); border-left: 4px solid var(--tx-brand); }
.tx-blog-callout p { margin: 0; }
.tx-blog-callout-tip { background: #ecfdf3; border-left-color: #0f7b45; }
.tx-blog-callout-warning { background: #fff7e6; border-left-color: #a35a00; }
.tx-blog-faq details { border: 1px solid var(--tx-line); border-radius: 12px; padding: 12px 16px; margin: 10px 0; }
.tx-blog-faq summary { font-weight: 700; cursor: pointer; }
.tx-blog-faq details > div { margin-top: 8px; }
.tx-blog-table { margin: 1.5em 0; overflow-x: auto; border: 1px solid var(--tx-line); border-radius: 12px; }
.tx-blog-table table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tx-blog-table caption { text-align: left; font-weight: 700; padding: 10px 14px 0; }
.tx-blog-table th, .tx-blog-table td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--tx-line); min-width: 120px; }
.tx-blog-table th { background: var(--tx-bg-soft); font-weight: 700; }
.tx-blog-table tr:last-child td { border-bottom: 0; }
.tx-callout-dest { margin: 32px 0; padding: 20px; border-radius: var(--tx-radius); background: var(--tx-brand-soft); }
.tx-callout-dest h2 { font-size: 1.2rem; }
.tx-callout-dest p { margin: 0; font-weight: 600; }
.tx-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 24px 0; }
.tx-tags span { font-weight: 700; }
.tx-tags a { padding: 4px 12px; border-radius: 999px; background: var(--tx-bg-soft); border: 1px solid var(--tx-line); text-decoration: none; color: var(--tx-ink); font-size: .9rem; }
.tx-author { display: flex; gap: 16px; align-items: flex-start; border-top: 1px solid var(--tx-line); border-bottom: 1px solid var(--tx-line); padding: 24px 0; margin: 32px 0; }
.tx-author h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tx-muted); margin-bottom: 4px; }
.tx-author p { margin: 0 0 6px; }
.tx-section { margin: 56px auto; }
.tx-section > h2 { margin-bottom: 20px; }
/* The line between the article and what follows: on the heading, so it is exactly as wide as the content. */
.tx-article .tx-section:first-of-type > h2 { padding-top: 40px; border-top: 1px solid var(--tx-line); }
.tx-article-main .tx-author { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

/* Product cards (in the post's body and in their own section) */
.tx-products { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .tx-products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .tx-products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tx-blog-product { margin: 1.5em 0; }
.tx-products .tx-blog-product { margin: 0; }
.tx-blog-product-link { display: flex; gap: 14px; align-items: stretch; border: 1px solid var(--tx-line); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--tx-ink); background: #fff; height: 100%; }
.tx-blog-product-link:hover { border-color: var(--tx-brand); }
.tx-blog-product-link img, .tx-blog-product-link .tx-blog-noimg { width: 120px; min-height: 120px; flex: none; object-fit: cover; }
.tx-blog-product-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 12px 0; min-width: 0; }
.tx-blog-product-title { display: block; font-size: 1rem; font-weight: 700; margin: 0; }
.tx-blog-product-place, .tx-blog-product-rating { font-size: .88rem; color: var(--tx-muted); }
.tx-blog-product-price { margin-top: auto; font-weight: 700; color: var(--tx-brand-dark); }
.tx-blog-product-note { font-size: .85rem; color: var(--tx-muted); }

/* Footer */
.tx-footer { margin-top: 56px; background: var(--tx-ink); color: #d9dbe6; font-size: .95rem; }
.tx-footer a { color: #fff; }
.tx-footer-grid { display: grid; grid-template-columns: 1fr; gap: 24px; padding-top: 40px; padding-bottom: 24px; }
@media (min-width: 760px) { .tx-footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.tx-footer .tx-logo img { width: 130px; background: #fff; border-radius: 10px; padding: 6px 10px; }
.tx-footer-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: #b7bbd0; margin: 0 0 10px; }
.tx-footer ul { list-style: none; padding: 0; margin: 0; }
.tx-footer li { margin: 6px 0; }
.tx-footer-legal { border-top: 1px solid #2a2e45; padding-top: 16px; padding-bottom: 24px; color: #b7bbd0; }
.tx-footer-legal p { margin: 0; }

/* Tap targets at least 24px high (WCAG 2.2, 2.5.8) for links that stand alone; links inside sentences keep their line. */
.tx-crumbs a, .tx-kicker a, .tx-toc a, .tx-footer li a, .tx-footer p a, .tx-meta a, .tx-tags a, .tx-author p a { display: inline-block; min-height: 24px; line-height: 24px; }
.tx-nav a { min-height: 36px; }
.tx-card-title { line-height: 1.35; }
.tx-card-title a { display: inline-block; min-height: 24px; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print { .tx-header, .tx-footer, .tx-toc, .tx-search, .tx-products, .tx-section { display: none; } }

/* ---------- Gen Z mode: the website's dark theme ---------- */
/* Dark page and cards, lime links and buttons with dark text on them. Each rule restates only what changes; :where keeps its specificity, so it wins by coming last. */
:root:where([data-genz="on"]){--tx-brand:#d9f99d;--tx-on-brand:#0f0d15;--tx-brand-dark:#c4b5fd;--tx-brand-soft:#2c2449;--tx-ink:#f5f3ff;--tx-muted:#b8b0cc;--tx-line:#342d4b;--tx-bg:#0f0d15;--tx-bg-soft:#231e33}
:where(html[data-genz="on"]) .tx-skip{background:var(--tx-brand);color:var(--tx-on-brand)}
:where(html[data-genz="on"]) .tx-skip:focus{color:var(--tx-on-brand)}
:where(html[data-genz="on"]) .tx-preview-banner{background:#38353e;color:#f7cc97}
:where(html[data-genz="on"]) .tx-header{background:#181523}
:where(html[data-genz="on"]) .tx-search button{color:var(--tx-on-brand)}
:where(html[data-genz="on"]) .tx-card{background:#181523}
:where(html[data-genz="on"]) .tx-blog-noimg{background:linear-gradient(135deg, var(--tx-brand-soft), #2c2449 60%, #40346a)}
:where(html[data-genz="on"]) .tx-button{color:var(--tx-on-brand)}
:where(html[data-genz="on"]) .tx-button:hover{color:var(--tx-on-brand)}
:where(html[data-genz="on"]) .tx-button--ghost{background:#181523;color:var(--tx-ink);border:1px solid var(--tx-line)}
:where(html[data-genz="on"]) .tx-toc a:hover{background:#181523}
:where(html[data-genz="on"]) .tx-toc a[aria-current="true"]{background:#181523}
:where(html[data-genz="on"]) .tx-side-card{background:#181523}
:where(html[data-genz="on"]) .tx-side-dest{border-color:#2c2449}
:where(html[data-genz="on"]) .tx-blog-callout-tip{background:#14231f}
:where(html[data-genz="on"]) .tx-blog-callout-warning{background:#38353e}
:where(html[data-genz="on"]) .tx-blog-product-link{background:#181523}
:where(html[data-genz="on"]) .tx-footer .tx-logo img{background:#181523}
