/* article.css — version v1 (2026-11-30) — howtobuyinspain.com, blog articles only (loaded by build_htbis.py v45).
   Layout decided with Stéphane on 30 Nov 2026 on the prices article, for all blog articles:
   right column scrolls with the page · contents list that follows the reader (right column on a computer, slim bar on
   a phone) · quick-summary box · 4 subject tags under the byline, all tags at the end · FAQ as questions with one
   show / hide-all button · sortable tables · newsletter box above the signature box.
   Works with article.js v1. Colours are the site's own (navy #243c4f, link blue #2a5bd7, Spain orange #f47230). */

/* ---- anchors land under the fixed header / the phone bar ---- */
.article .content h2,.article .content h3,.article .content h4{scroll-margin-top:84px}
.article .viz-root .nav{position:static}                       /* chart buttons no longer stick (one sticky bar only) */

/* ---- 4 subject tags under the byline, all tags at the end ---- */
.subj-tags,.al-chips{display:flex;gap:8px;list-style:none;padding:0 0 4px;overflow-x:auto;scrollbar-width:none}
.subj-tags{margin:-6px 0 22px}
.al-chips{margin:0 0 20px}
.subj-tags::-webkit-scrollbar,.al-chips::-webkit-scrollbar{display:none}
.subj-tags li,.al-chips li{flex:none;margin:0;padding:0;list-style:none}
.subj-tags li::before,.al-chips li::before{content:none}
.subj-tags a,.content .al-chips a{display:inline-flex;align-items:center;min-height:36px;padding:3px 13px;border-radius:999px;border:1px solid #b8d4ee;background:#eef5fd;color:#2a5bd7;text-decoration:none;font-size:.9rem;font-weight:600;white-space:nowrap}
.content .al-chips a{min-height:40px;background:#fff}
.subj-tags a:hover,.content .al-chips a:hover{background:#dcebf8}
.all-tags{margin:36px 0 0;padding-top:16px;border-top:1px solid #dcdcdc}
.all-tags .w-h{margin:0 0 6px}
.all-tags .tags{font-size:.88rem;color:#6b7785;line-height:1.7;margin:0}
.all-tags .tags a{color:#3b56d6;text-decoration:none}
.all-tags .tags a:hover{text-decoration:underline}

/* ---- newsletter box inside the text, above the signature box ---- */
.after.in-text{margin:32px 0 0}
.after.in-text+.small-box{margin-top:20px}

/* ---- quick summary box ---- */
.al-sum{border:1px solid #dcdcdc;border-left:5px solid #f47230;border-radius:10px;padding:18px 20px 14px;margin:24px 0;background:#fff}
.content .al-sum>h2,.content .al-sum>h3,.content .al-sum>h4{font-size:1.2rem;margin:0 0 2px}
.al-sum .al-asof{margin:0 0 12px;font-size:.85rem;color:#5d6877}
.content ul.al-figs{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;list-style:none;padding:0;margin:0 0 12px}
.content ul.al-figs li{background:#f2f6f9;border-radius:8px;padding:10px 12px;margin:0;list-style:none}
.content ul.al-figs li::before{content:none}
.al-figs b{display:block;font-size:1.35rem;line-height:1.15;color:#243c4f;font-variant-numeric:tabular-nums}
.al-figs span{display:block;font-size:.85rem;line-height:1.35;margin-top:4px;color:#243c4f}
.al-figs em{font-style:normal;font-weight:700}
.content ul.al-pts{margin:0;padding-left:20px}
.content ul.al-pts li{margin:0 0 4px}

/* ---- contents list (article, right column, phone bar) ---- */
.toc.al-toc{padding:0;background:#fff}
.al-toc details{border:0;margin:0;padding:0;background:none}
.al-toc summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 18px;font-weight:700;color:#243c4f;min-height:48px}
.al-toc summary::-webkit-details-marker{display:none}
.al-toc summary::after{content:"+";font-size:1.4rem;font-weight:400;line-height:1;color:#2a5bd7}
.al-toc details[open] summary::after{content:"\2212"}
ol.al-list,ol.al-sub{list-style:none;margin:0;padding:0}
.toc ol.al-list{margin:0;padding:0 10px 10px}
.al-list li{margin:0;padding:0;list-style:none}
.al-list li::before{content:none}
.al-list a{display:flex;gap:8px;padding:8px;border-radius:6px;text-decoration:none;line-height:1.35;border-left:3px solid transparent;color:#2a5bd7}
.al-list a:hover{background:#f2f6f9;text-decoration:none}
.al-list a i{font-style:normal;flex:none;width:1.7em;text-align:right;color:#5d6877;font-variant-numeric:tabular-nums}
.al-list a[aria-current="true"]{background:#fff4e6;border-left-color:#f47230;color:#243c4f;font-weight:600}
ol.al-sub{padding:0 0 6px 2.3em}
.al-sub a{padding:4px 8px;font-size:.93em}
.al-rail .al-sub,.al-panel .al-sub{display:none}
.al-rail li.open>.al-sub,.al-panel li.open>.al-sub{display:block}
.al-rail{display:none}

/* ---- phone bar: one slim bar, always visible once the list has scrolled away ---- */
.al-bar{position:sticky;top:0;height:0;z-index:60}
.al-bar-in{position:absolute;left:0;right:0;top:0;background:#243c4f;color:#fff;opacity:0;visibility:hidden;transform:translateY(-100%);transition:transform .18s ease,opacity .18s ease}
.al-bar.show .al-bar-in{opacity:1;visibility:visible;transform:none}
.al-bar button{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:6px 16px;font:inherit;font-size:.94rem;color:#fff;background:none;border:0;border-radius:0;text-align:left;cursor:pointer}
.al-bar button{overflow:hidden}
.al-bar button b{flex:0 1 auto;min-width:0;max-width:42%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600;opacity:.8}
.al-bar button span{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}
.al-bar button::after{content:"\25BE";flex:none}
.al-panel{display:none;max-height:60vh;overflow:auto;background:#fff;box-shadow:0 12px 24px rgba(16,32,45,.25)}
.al-bar.open .al-panel{display:block}
.al-panel ol.al-list{padding:8px}
.al-panel .al-list a{padding:11px 8px}

/* ---- FAQ: questions only, one button for all answers ---- */
.al-faq-bar{display:flex;justify-content:flex-end;margin:0 0 12px}
.al-faq-all{font:inherit;font-weight:600;font-size:.94rem;color:#2a5bd7;background:#fff;border:1px solid #b8d4ee;border-radius:999px;padding:8px 16px;min-height:44px;cursor:pointer}
.al-faq-all:hover{background:#eef5fd}
.content .faq-item.al-q{padding:0;margin:0 0 10px}
.content .faq-item.al-q>h2,.content .faq-item.al-q>h3,.content .faq-item.al-q>h4{margin:0;font-size:1.05rem}
.al-q-btn{display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;text-align:left;font:inherit;font-weight:700;color:#243c4f;background:none;border:0;border-radius:12px;padding:14px 20px;min-height:48px;cursor:pointer}
.al-q-btn::after{content:"+";font-size:1.5rem;font-weight:400;line-height:1;color:#2a5bd7;flex:none}
.al-q.open .al-q-btn::after{content:"\2212"}
.content .al-q .faq-a{margin:0 16px 16px}
.al-q:not(.open) .faq-a{display:none}

/* ---- tables: sort from the header ---- */
.al-sort{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:5px;cursor:pointer;font:inherit;color:inherit;min-height:32px}
.al-sort:hover{color:#2a5bd7}
.al-arrow{flex:none;font-size:.95em;line-height:1}
.al-arrow::after{content:"\2195";opacity:.45}
th[aria-sort="ascending"] .al-arrow::after{content:"\25B2";opacity:1;color:#f47230}
th[aria-sort="descending"] .al-arrow::after{content:"\25BC";opacity:1;color:#f47230}
.al-sort:focus-visible,.al-q-btn:focus-visible,.al-faq-all:focus-visible,.al-bar button:focus-visible,.al-toc summary:focus-visible{outline:3px solid #f47230;outline-offset:2px;border-radius:4px}

@media (min-width:640px){.subj-tags,.al-chips{flex-wrap:wrap;overflow:visible}}

/* ---- phone and tablet (the right column is under the article): the bar is the only thing that sticks ---- */
@media (max-width:1020px){
  html.al-bar-on .site-header{position:static}
  html.al-bar-on .article .content h2,html.al-bar-on .article .content h3,html.al-bar-on .article .content h4{scroll-margin-top:60px}
}

/* ---- computer: the right column scrolls with the page; the contents list is its last block and stays in view ---- */
@media (min-width:1021px){
  .al-bar{display:none}
  .al-toc summary{cursor:default;pointer-events:none}
  .al-toc summary::after{display:none}
  .al-flat ol.al-list{columns:2;column-gap:16px}
  .al-flat .al-list>li{break-inside:avoid}
  .with-side{align-items:stretch}
  .with-side>.sidebar{position:static;max-height:none;overflow:visible;align-self:stretch}
  .al-rail{display:block;flex:none;position:sticky;top:85px;max-height:calc(100vh - 101px);overflow:auto;padding:14px 8px}
  .al-rail .w-h{padding:0 8px}
  .al-rail .al-list a{font-size:.9rem;padding:6px 8px}
}
@media (prefers-reduced-motion:reduce){.al-bar-in{transition:none}}
@media print{.al-bar,.al-rail,.al-faq-bar,.subj-tags{display:none}.al-q .faq-a{display:block!important}}
