/* FORENSE extras (v8): video embeds + weather widget. Plain CSS (no Tailwind build needed). */

/* ---------- Video ---------- */
.fx-video{margin:1.5rem 0 0;padding:0}
.fx-video__frame{position:relative;width:100%;aspect-ratio:16/9;background:#0b1220;border-radius:.75rem;overflow:hidden;box-shadow:0 1px 3px rgba(15,23,42,.12)}
@supports not (aspect-ratio:16/9){.fx-video__frame{height:0;padding-top:56.25%}}
.fx-video__frame iframe,.fx-video__frame video{position:absolute;inset:0;width:100%;height:100%;border:0;display:block;background:#000}
iframe.fx-embed{display:block;width:100%;max-width:100%;height:auto;aspect-ratio:16/9;border:0;border-radius:.6rem;background:#0b1220;margin:1.25rem 0}
@supports not (aspect-ratio:16/9){iframe.fx-embed{height:min(56.25vw,420px)}}

/* ---------- Sidebar stack (weather above «Mais lidas») ---------- */
.fx-side-stack{display:flex;flex-direction:column;gap:1rem}
@media (min-width:1024px){.fx-side-stack{position:sticky;top:6rem}}

/* ---------- Weather widget ---------- */
.fxw{container-type:inline-size;--fxw-sky1:#e0f2fe;--fxw-sky2:#f8fafc;--fxw-ink:#0f172a;--fxw-muted:#475569;--fxw-line:#e2e8f0;--fxw-chip:#f1f5f9;
  position:relative;border:2px solid #e2e8f0;background:#fff;padding:1rem;color:var(--fxw-ink);font-variant-numeric:tabular-nums}
.fxw *{box-sizing:border-box}
.fxw__head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;border-bottom:2px solid #dc2626;padding-bottom:.5rem}
.fxw__title{margin:0;font-size:1.125rem;line-height:1.5rem;font-weight:800;text-transform:uppercase;letter-spacing:.01em;color:#111}
.fxw__units{display:inline-flex;border:1px solid var(--fxw-line);border-radius:999px;overflow:hidden;flex:0 0 auto}
.fxw__units button{all:unset;cursor:pointer;padding:.15rem .5rem;font-size:.72rem;font-weight:800;color:var(--fxw-muted);line-height:1.2rem}
.fxw__units button[aria-pressed="true"]{background:#dc2626;color:#fff}
.fxw__units button:focus-visible{outline:2px solid #dc2626;outline-offset:1px}
.fxw__city{all:unset;box-sizing:border-box;cursor:pointer;display:flex;align-items:center;gap:.35rem;margin-top:.7rem;max-width:100%;font-size:.85rem;font-weight:800;color:var(--fxw-ink);border-radius:.4rem;padding:.2rem .35rem .2rem .15rem}
.fxw__city:hover{background:var(--fxw-chip)}
.fxw__city:focus-visible{outline:2px solid #dc2626;outline-offset:1px}
.fxw__city svg{flex:0 0 auto;width:1rem;height:1rem;color:#dc2626}
.fxw__city span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fxw__city .fxw__chev{color:var(--fxw-muted);width:.85rem;height:.85rem;transition:transform .2s}
.fxw__city[aria-expanded="true"] .fxw__chev{transform:rotate(180deg)}
.fxw__sky{position:relative;margin-top:.55rem;border-radius:.6rem;padding:.75rem .8rem;background:linear-gradient(135deg,var(--fxw-sky1),var(--fxw-sky2));overflow:hidden;min-height:118px}
.fxw__now{display:flex;align-items:center;gap:.6rem}
.fxw__icon{flex:0 0 auto;width:72px;height:72px;margin:-.25rem -.2rem -.25rem -.35rem}
.fxw__icon svg{width:100%;height:100%;display:block;overflow:visible}
.fxw__temp{font-size:2.6rem;line-height:1;font-weight:900;letter-spacing:-.03em}
.fxw__temp sup{font-size:1.1rem;font-weight:800;vertical-align:top;position:relative;top:.25rem;margin-left:.05rem}
.fxw__cond{margin:.2rem 0 0;font-size:.85rem;font-weight:700;line-height:1.2}
.fxw__feels{margin:.1rem 0 0;font-size:.74rem;color:var(--fxw-muted)}
.fxw__stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.35rem;margin-top:.65rem}
.fxw__stat{display:flex;flex-direction:column;align-items:flex-start;gap:.1rem;padding:.35rem .45rem;border-radius:.45rem;background:rgba(255,255,255,.55);min-width:0;overflow:hidden}
.fxw__stat small{display:block;max-width:100%;font-size:.62rem;font-weight:700;letter-spacing:.01em;color:var(--fxw-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fxw__stat b{display:flex;align-items:center;gap:.2rem;max-width:100%;font-size:.8rem;font-weight:800;white-space:nowrap}
.fxw__stat b svg{flex:0 0 auto;width:.8rem;height:.8rem;opacity:.75}
@container (max-width: 300px){
  .fxw__stats{grid-template-columns:1fr;gap:.25rem}
  .fxw__stat{flex-direction:row;align-items:center;justify-content:space-between;padding:.28rem .5rem}
  .fxw__stat small{font-size:.7rem}
  .fxw__stat b{font-size:.8rem}
}
.fxw__days{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.4rem;margin-top:.7rem}
.fxw__day{display:flex;flex-direction:column;align-items:center;gap:.1rem;padding:.4rem .2rem;border:1px solid var(--fxw-line);border-radius:.5rem;text-align:center}
.fxw__day-name{font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:var(--fxw-muted)}
.fxw__day-icon{width:34px;height:34px}
.fxw__day-icon svg{width:100%;height:100%;display:block;overflow:visible}
.fxw__day-t{font-size:.78rem;font-weight:800}
.fxw__day-t span{color:var(--fxw-muted);font-weight:600;margin-left:.2rem}
.fxw__foot{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-top:.6rem;font-size:.66rem;color:var(--fxw-muted)}
.fxw__foot a{color:inherit;text-decoration:underline;text-underline-offset:2px}
.fxw__msg{display:flex;flex-direction:column;align-items:flex-start;gap:.45rem;font-size:.8rem;color:var(--fxw-muted);padding:.35rem 0}
.fxw__retry{all:unset;cursor:pointer;font-size:.75rem;font-weight:800;color:#dc2626;text-decoration:underline}
.fxw__skel{display:block;border-radius:.4rem;background:linear-gradient(90deg,rgba(148,163,184,.18),rgba(148,163,184,.32),rgba(148,163,184,.18));background-size:200% 100%;animation:fxw-shimmer 1.4s linear infinite}
@keyframes fxw-shimmer{to{background-position:-200% 0}}

/* City panel */
.fxw__panel{margin-top:.55rem;border:1px solid var(--fxw-line);border-radius:.6rem;padding:.6rem;background:#fff}
.fxw__panel[hidden]{display:none}
.fxw__search{display:flex;align-items:center;gap:.35rem;border:1px solid #cbd5e1;border-radius:.45rem;padding:.3rem .45rem;background:#fff}
.fxw__search:focus-within{border-color:#dc2626;box-shadow:0 0 0 3px rgba(220,38,38,.12)}
.fxw__search svg{width:.95rem;height:.95rem;color:#94a3b8;flex:0 0 auto}
.fxw__search input{all:unset;flex:1;min-width:0;font-size:.82rem;color:var(--fxw-ink)}
.fxw__results{list-style:none;margin:.35rem 0 0;padding:0;max-height:180px;overflow:auto}
.fxw__results li button,.fxw__chips button{all:unset;box-sizing:border-box;cursor:pointer}
.fxw__results li button{display:block;width:100%;padding:.35rem .45rem;border-radius:.35rem;font-size:.8rem;color:var(--fxw-ink)}
.fxw__results li button small{color:var(--fxw-muted);margin-left:.3rem}
.fxw__results li button:hover,.fxw__results li button:focus-visible{background:var(--fxw-chip)}
.fxw__label{margin:.55rem 0 .3rem;font-size:.64rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:var(--fxw-muted)}
.fxw__chips{display:flex;flex-wrap:wrap;gap:.3rem}
.fxw__chips button{padding:.22rem .55rem;border-radius:999px;border:1px solid var(--fxw-line);background:var(--fxw-chip);font-size:.74rem;font-weight:700;color:var(--fxw-ink)}
.fxw__chips button:hover,.fxw__chips button:focus-visible{border-color:#dc2626;color:#b91c1c}
.fxw__chips button[aria-current="true"]{background:#dc2626;border-color:#dc2626;color:#fff}
.fxw__geo{all:unset;cursor:pointer;display:inline-flex;align-items:center;gap:.3rem;margin-top:.55rem;font-size:.74rem;font-weight:800;color:#dc2626}
.fxw__geo svg{width:.9rem;height:.9rem}

/* Sky themes (light) */
.fxw[data-sky="clear-day"]{--fxw-sky1:#dbeafe;--fxw-sky2:#fef3c7}
.fxw[data-sky="clear-night"]{--fxw-sky1:#1e293b;--fxw-sky2:#312e81;--fxw-ink-sky:#f8fafc}
.fxw[data-sky="cloudy-day"]{--fxw-sky1:#e2e8f0;--fxw-sky2:#f8fafc}
.fxw[data-sky="cloudy-night"]{--fxw-sky1:#1f2937;--fxw-sky2:#374151;--fxw-ink-sky:#f8fafc}
.fxw[data-sky="rain"]{--fxw-sky1:#cbd5e1;--fxw-sky2:#e0e7ff}
.fxw[data-sky="storm"]{--fxw-sky1:#94a3b8;--fxw-sky2:#c7d2fe}
.fxw[data-sky="fog"]{--fxw-sky1:#e5e7eb;--fxw-sky2:#f1f5f9}
.fxw[data-sky="snow"]{--fxw-sky1:#e0f2fe;--fxw-sky2:#ffffff}
.fxw[data-sky$="-night"] .fxw__sky{color:var(--fxw-ink-sky,#f8fafc)}
.fxw[data-sky$="-night"] .fxw__feels,.fxw[data-sky$="-night"] .fxw__stat small{color:rgba(226,232,240,.8)}
.fxw[data-sky$="-night"] .fxw__stat{background:rgba(255,255,255,.1)}

/* Icon animation (subtle) */
.fxw-anim-spin{transform-origin:32px 32px;animation:fxw-spin 24s linear infinite}
.fxw-anim-float{animation:fxw-float 6s ease-in-out infinite}
.fxw-anim-drop{animation:fxw-drop 1.4s linear infinite}
.fxw-anim-drop.d2{animation-delay:.45s}.fxw-anim-drop.d3{animation-delay:.9s}
.fxw-anim-flash{animation:fxw-flash 3.2s ease-in-out infinite}
.fxw-anim-twinkle{animation:fxw-twinkle 3s ease-in-out infinite}
.fxw-anim-twinkle.t2{animation-delay:1.2s}
.fxw-anim-snow{animation:fxw-snow 2.6s linear infinite}
.fxw-anim-snow.d2{animation-delay:.85s}.fxw-anim-snow.d3{animation-delay:1.7s}
.fxw-anim-fog{animation:fxw-fog 5s ease-in-out infinite}
.fxw-anim-fog.f2{animation-delay:1.5s}
@keyframes fxw-spin{to{transform:rotate(360deg)}}
@keyframes fxw-float{0%,100%{transform:translateX(0)}50%{transform:translateX(2.5px)}}
@keyframes fxw-drop{0%{transform:translateY(-3px);opacity:0}25%{opacity:1}100%{transform:translateY(7px);opacity:0}}
@keyframes fxw-flash{0%,62%,72%,100%{opacity:1}66%{opacity:.25}}
@keyframes fxw-twinkle{0%,100%{opacity:.25}50%{opacity:1}}
@keyframes fxw-snow{0%{transform:translateY(-3px);opacity:0}30%{opacity:1}100%{transform:translateY(7px);opacity:0}}
@keyframes fxw-fog{0%,100%{transform:translateX(-2px)}50%{transform:translateX(2px)}}
@media (prefers-reduced-motion:reduce){.fxw [class*="fxw-anim-"],.fxw__skel{animation:none!important}}

/* Dark mode (main site: html.dark · revistas: [data-theme=dark]) */
html.dark .fxw,[data-theme="dark"] .fxw{--fxw-ink:#f1f5f9;--fxw-muted:#94a3b8;--fxw-line:#334155;--fxw-chip:#1e293b;border-color:#334155;background:#0f172a}
html.dark .fxw__title,[data-theme="dark"] .fxw__title{color:#f1f5f9}
html.dark .fxw__panel,[data-theme="dark"] .fxw__panel,html.dark .fxw__search,[data-theme="dark"] .fxw__search{background:#0b1220;border-color:#334155}
html.dark .fxw__stat,[data-theme="dark"] .fxw__stat{background:rgba(15,23,42,.45)}
html.dark .fxw[data-sky="clear-day"],[data-theme="dark"] .fxw[data-sky="clear-day"]{--fxw-sky1:#1e3a5f;--fxw-sky2:#3b2f1a}
html.dark .fxw[data-sky="cloudy-day"],[data-theme="dark"] .fxw[data-sky="cloudy-day"]{--fxw-sky1:#1e293b;--fxw-sky2:#273449}
html.dark .fxw[data-sky="rain"],[data-theme="dark"] .fxw[data-sky="rain"]{--fxw-sky1:#1e293b;--fxw-sky2:#1e2a4a}
html.dark .fxw[data-sky="storm"],[data-theme="dark"] .fxw[data-sky="storm"]{--fxw-sky1:#1f2937;--fxw-sky2:#2e1065}
html.dark .fxw[data-sky="fog"],[data-theme="dark"] .fxw[data-sky="fog"]{--fxw-sky1:#1f2937;--fxw-sky2:#334155}
html.dark .fxw[data-sky="snow"],[data-theme="dark"] .fxw[data-sky="snow"]{--fxw-sky1:#1e293b;--fxw-sky2:#334155}
html.dark .fxw[data-sky="clear-night"],[data-theme="dark"] .fxw[data-sky="clear-night"]{--fxw-sky1:#0b1220;--fxw-sky2:#1e1b4b}
html.dark .fxw[data-sky="cloudy-night"],[data-theme="dark"] .fxw[data-sky="cloudy-night"]{--fxw-sky1:#111827;--fxw-sky2:#1f2937}
html.dark .fxw__units button[aria-pressed="true"],[data-theme="dark"] .fxw__units button[aria-pressed="true"]{background:#ef4444}

/* ---------- Homepage: Últimas notícias / secções (v8) ---------- */
/* Align with the centre column of .homepage-top-with-gutters (160px rails + 1.25rem gap on ≥1024px). */
@media (min-width:1024px){.homepage-below-top{margin-left:calc(160px + 1.25rem);margin-right:calc(160px + 1.25rem)}}
.homepage-below-top .news-grid-cards{display:grid;gap:1.1rem 1rem;grid-template-columns:minmax(0,1fr)}
@media (min-width:480px){.homepage-below-top .news-grid-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:768px){.homepage-below-top .news-grid-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (min-width:1200px){.homepage-below-top .news-grid-cards{grid-template-columns:repeat(4,minmax(0,1fr))}}
.homepage-below-top .news-grid-card__media{border-radius:.375rem;overflow:hidden}
.homepage-below-top .news-grid-card__img{display:block;width:100%;aspect-ratio:16/10;height:auto;max-height:180px;object-fit:cover}
.homepage-below-top .news-grid-card__media img{width:100%;aspect-ratio:16/10;height:auto;max-height:180px;object-fit:cover}
.homepage-below-top .news-grid-card__title{font-size:.84rem;line-height:1.3;margin-top:.45rem}
.homepage-below-top .news-meta{margin-top:.2rem;font-size:.68rem}
html.dark .homepage-below-top .news-grid-cards{background:transparent}

/* Continuar a ler / Guardados list */
.cr-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr;gap:.75rem}
@media(min-width:768px){.cr-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
.cr-item{display:flex;gap:.875rem;align-items:flex-start;background:#fff;border:1px solid #e2e8f0;border-radius:.75rem;padding:.75rem;min-width:0}
.cr-thumb{flex:0 0 112px;width:112px;height:72px;border-radius:.5rem;overflow:hidden;display:block;background:#f1f5f9}
.cr-thumb img{width:100%!important;height:100%!important;max-width:none;object-fit:cover;display:block}
.cr-body{flex:1 1 auto;min-width:0}
.cr-title{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-weight:700;font-size:.95rem;line-height:1.3;color:#0f172a;text-decoration:none;word-break:normal;overflow-wrap:anywhere}
.cr-title:hover{color:#c8102e}
.cr-excerpt{margin:.25rem 0 0;font-size:.8rem;color:#64748b;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cr-remove{margin-top:.4rem;font-size:.75rem;font-weight:600;color:#dc2626;background:none;border:0;padding:0;cursor:pointer}
html.dark .cr-item{background:#171717;border-color:#404040}
html.dark .cr-thumb{background:#262626}
html.dark .cr-title{color:#f1f5f9}
html.dark .cr-excerpt{color:#94a3b8}
@media(max-width:420px){.cr-thumb{flex-basis:88px;width:88px;height:60px}}
