/* Template: single post. Brand v3: white article head, a calm reading column, a quiet table of contents and enquiry prompt.
   Classes "bl-". The post-card block is copied from blog.css; keep them in sync. */

/* ---------- head ---------- */
.article-head { background: #fff; padding-top: clamp(1.75rem, 1rem + 2.5vw, 3rem); }
.article-head .crumbs { color: var(--slate); margin-bottom: clamp(1.4rem, 1rem + 1.5vw, 2.2rem); }
.article-head .crumbs a:hover { color: var(--ink) !important; }
.article-head .bl-cat { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0; background: none; border-radius: 0; font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.article-head .bl-cat::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--lamp); }
.article-head .bl-cat:hover { background: none; text-decoration: underline; text-decoration-color: var(--lamp); }
.article-head h1 { font-size: clamp(2rem, 1.05rem + 3.2vw, 3.75rem); letter-spacing: -0.045em; line-height: 1.02; max-width: 24ch; text-wrap: balance; margin: 0.6rem 0 1.2rem; overflow-wrap: break-word; hyphens: auto; }
.dek { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); line-height: 1.5; color: var(--slate); max-width: 44rem; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.2rem; margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.byline__dates { display: grid; gap: 0.3rem; margin-left: auto; text-align: right; color: var(--slate); }
.part-of { margin-top: 1.1rem; color: var(--slate); }
.part-of a { color: var(--ink); font-weight: 600; }

/* ---------- layout: reading column + sticky aside ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 44rem) 17.5rem; justify-content: space-between; column-gap: clamp(2rem, 1rem + 4vw, 5rem); row-gap: clamp(1.8rem, 1.4rem + 1vw, 2.6rem); padding-block: clamp(1.4rem, 1rem + 1.2vw, 2.2rem) var(--section); }
.article-layout > .article-image, .article-layout > .article-cover { grid-column: 1; grid-row: 1; max-width: none; margin: 0; }
.article-layout > .article-body { grid-column: 1; grid-row: 2; }
.article-layout > .aside-stack { grid-column: 2; grid-row: 1 / span 2; }
.article-layout > .article-image img { border-radius: 18px; box-shadow: none; }
/* No featured image: a plain black panel with the search phrase and the red dot. */
.article-layout > .article-cover { aspect-ratio: 16 / 9; min-height: 0; border-radius: 18px; padding: clamp(1.4rem, 1rem + 2vw, 2.6rem); align-items: end; background: var(--night); color: #fff; font-family: var(--font); font-weight: 800; font-size: clamp(1.6rem, 1rem + 2.4vw, 3rem); line-height: 1.05; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.article-layout > .article-cover::after { inset: 18px 18px auto auto; width: 16px; height: 16px; border-radius: 50%; background: var(--lamp); }
.article-cover .caret { display: none; }
.article-body { min-width: 0; }

/* ---------- reading typography ---------- */
.article-body .prose { font-size: 1.125rem; line-height: 1.72; color: #2a2a2e; }
.article-body .prose > p:first-child { font-size: 1.22rem; line-height: 1.6; color: var(--ink); }
.article-body .prose > * + * { margin-top: 1.15em; }
.article-body .prose h2 { font-size: clamp(1.6rem, 1.25rem + 1.1vw, 2.2rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; margin-top: 2.2em; text-wrap: balance; }
.article-body .prose h3 { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.45rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-top: 1.8em; }
.article-body .prose h4 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; margin-top: 1.5em; }
.article-body .prose h2 + *, .article-body .prose h3 + *, .article-body .prose h4 + * { margin-top: 0.6em; }
.article-body .prose ul > li::marker { color: var(--lamp); }
.article-body .prose ol > li::marker { color: var(--ink); font-weight: 700; }
.article-body .prose li { padding-left: 0.2em; }
.article-body .prose a { text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.article-body .prose a:hover { text-decoration-thickness: 3px; }
.article-body .prose blockquote { border-radius: 0 12px 12px 0; font-size: 1.15rem; }
.article-body .prose figure, .article-body .prose .wp-block-image { margin-block: 2em; }
.article-body .prose img { border-radius: 12px; }
.article-body .prose .table-wrap, .article-body .prose .wp-block-table { border-radius: 12px; font-size: 0.97rem; }

/* ---------- table of contents: a quiet list, the red dot marks where you are ---------- */
.aside-stack { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; display: grid; gap: 1.5rem; max-height: calc(100vh - var(--header-h) - 3rem); overflow-y: auto; scrollbar-width: thin; padding: 0.3rem 0.3rem 0.3rem 0.4rem; }
.aside-stack .toc { position: static; padding: 0; border: 0; border-radius: 0; background: none; }
.aside-stack .toc summary { min-height: 44px; font-size: 1rem; font-weight: 700; color: var(--ink); }
.aside-stack .toc ol { margin-top: 0.3rem; gap: 0; border-left: 1px solid var(--line); }
.aside-stack .toc a { position: relative; border-left: 0; padding: 0.42rem 0 0.42rem 1rem; color: var(--slate); font-size: 0.92rem; line-height: 1.4; }
.aside-stack .toc a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--lamp); }
.aside-stack .toc a.is-active { color: var(--ink); font-weight: 600; }
.aside-stack .toc a.is-active::before { content: ""; position: absolute; left: -5px; top: 0.95em; width: 9px; height: 9px; border-radius: 50%; background: var(--lamp); }
.aside-stack .toc .toc__sub a { padding-left: 1.8rem; font-size: 0.88rem; }

/* quiet enquiry prompt in the aside */
.aside-stack .aside-cta { padding: 1.3rem; border-radius: 16px; background: var(--snow); color: var(--ink); --lamp-text: #b01d23; }
.aside-stack .aside-cta .eyebrow--lamp { color: var(--slate) !important; }
.aside-cta .promo-title { font-size: 1.2rem; margin: 0.5rem 0; color: var(--ink); }
.aside-cta p { color: var(--slate); font-size: 0.93rem; }
.aside-cta .btn { margin-top: 1rem; width: 100%; min-height: 44px; }

/* ---------- after the article ---------- */
.inline-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 1.5rem; align-items: center; padding: 1.4rem 1.6rem; border-radius: 18px; background: var(--snow); color: var(--ink); }
.inline-cta strong { display: flex; align-items: center; gap: 0.55rem; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.25rem; color: var(--ink); }
.inline-cta strong::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--lamp); flex: none; }
.inline-cta p { color: var(--slate); font-size: 0.98rem; }
.inline-cta p a { color: var(--ink); font-weight: 600; }
.inline-cta .btn { min-height: 44px; }
.author-box { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 1.2rem; margin-top: 3rem; padding-block: 1.8rem; border-block: 1px solid var(--line); }
.author-box p { color: var(--slate); font-size: 0.97rem; margin-top: 0.4rem; }
.author-box .person__name { color: var(--ink); font-size: 1.1rem; margin-top: 0; }
.author-box .person__role { margin-top: 0.15rem; }
.author-box .chips, .terms-box .chips { margin-top: 0.9rem; }
.author-box .chips a, .terms-box .chips a { min-height: 44px; display: inline-flex; align-items: center; }
.terms-box { padding-block: 1.6rem; border-bottom: 1px solid var(--line); }
.terms-box .eyebrow { font-weight: 700; color: var(--ink); }

/* ---------- post cards (copy of blog.css "shared: post cards") ---------- */
.post-grid { gap: 1.1rem; }
.post-grid .post-card { padding: 0.6rem 0.6rem 1.3rem; border-radius: 18px; border: 1px solid var(--line); background: #fff; overflow: visible; transition: transform 0.3s var(--ease), border-color 0.3s; }
.post-grid .post-card:hover { transform: translateY(-4px); border-color: var(--ink); box-shadow: none; }
.post-card .cover { border-radius: 12px; overflow: hidden; }
.post-card__body { gap: 0.55rem; padding: 1.1rem 0.8rem 0; }
.post-card__body .tag { padding: 0; background: none; border-radius: 0; font-size: 0.85rem; font-weight: 700; color: var(--lamp-text); }
.post-card .h3 { font-size: 1.2rem; line-height: 1.22; letter-spacing: -0.02em; }
.post-card .meta { color: var(--slate); }
.post-card__body .more { padding-top: 0.5rem; }
/* Editorial covers (mexseo_cover): the guide's category, its key phrase in big Rubik and the red dot. Real text,
   aria-hidden (the card title says it). Three looks picked per post: ed0 black, ed1 smoke with the dot as a full
   stop, ed2 black with a lighter phrase on top and the category under a rule. The featured image is not shown here. */
.cover.cover--ed { --cv-bg: var(--night); --cv-fg: #fff; --cv-mute: var(--mist); --cv-line: rgba(255, 255, 255, 0.22); --cv-pad: 1rem 1.2rem; container-type: inline-size; display: flex; flex-direction: column; align-items: stretch; aspect-ratio: 16 / 9; min-height: 0; padding: var(--cv-pad); border-radius: 12px; background: var(--cv-bg); color: var(--cv-fg); font-family: var(--font); overflow: hidden; }
.cover.cover--ed::after { display: none; }
.cover__cat { padding-right: 1.6rem; font-size: clamp(0.78rem, 3.4cqi, 1.05rem); font-weight: 500; line-height: 1.3; color: var(--cv-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover__kw { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin-top: auto; padding-bottom: 0.06em; font-size: clamp(1.45rem, 10.5cqi, 3.6rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.045em; text-wrap: balance; overflow-wrap: anywhere; }
.cover--l .cover__kw { font-size: clamp(1.3rem, 8.2cqi, 3rem); }
.cover--xl .cover__kw { font-size: clamp(1.15rem, 6.6cqi, 2.4rem); letter-spacing: -0.035em; }
.cover__dot { position: absolute; top: 1.05rem; right: 1.2rem; width: 12px; height: 12px; border-radius: 50%; background: var(--lamp); transition: transform 0.3s var(--ease); }
.cover--ed1 { --cv-bg: var(--snow); --cv-fg: var(--ink); --cv-mute: var(--slate); }
.cover--ed1 .cover__dot { position: static; display: inline-block; width: 0.2em; height: 0.2em; margin-left: 0.07em; }
.cover--ed2 .cover__kw { order: -1; margin-top: 0.15rem; font-weight: 500; letter-spacing: -0.035em; line-height: 1.06; }
.cover--ed2 .cover__cat { margin-top: auto; padding-top: 0.6rem; border-top: 1px solid var(--cv-line); }
.cover--ed2 .cover__dot { top: auto; bottom: 1.25rem; }
.post-card:hover .cover__dot, .bl-feature:hover .cover__dot { transform: scale(1.35); }
@media (prefers-reduced-motion: reduce) {
  .cover__dot { transition: none; }
}

@media (max-width: 1000px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-layout > * { grid-column: 1 !important; grid-row: auto !important; }
  .article-layout > .article-image, .article-layout > .article-cover { order: -2; }
  .aside-stack { position: static; order: -1; max-height: none; overflow: visible; padding: 0; }
  .aside-stack .toc { border: 1px solid var(--line); border-radius: 14px; padding: 0 1rem; }
  .aside-stack .toc summary { min-height: 52px; }
  .aside-stack .toc ol { margin: 0 0 1rem; }
  .aside-stack .toc a { padding-block: 0.6rem; }
  .aside-cta { display: none; }
  .byline__dates { margin-left: 0; text-align: left; }
}
@media (max-width: 640px) {
  .inline-cta { grid-template-columns: minmax(0, 1fr); }
  .author-box { grid-template-columns: minmax(0, 1fr); }
  .article-body .prose { font-size: 1.0625rem; }
  .article-body .prose > p:first-child { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  .post-grid .post-card { transition: none; }
}
