/*
Theme Name: Horaa Magazine
Theme URI: https://horaa.xyz/
Author: Horaa
Description: A fast, accessible editorial magazine theme: lead story with rail, topic chips, category blocks, dark mode, reading progress, related posts and a newsletter band.
Version: 4.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: horaa-magazine
Tags: blog, news, magazine, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, rtl-language-support, accessibility-ready
*/

:root {
  --h-bg: #f7f2e9;
  --h-surface: #fffaf2;
  --h-ink: #10243b;
  --h-title: #000000;
  --h-muted: #627489;
  --h-line: #e4d9c8;
  --h-accent: #087f8c;
  --h-accent-ink: #ffffff;
  --h-mark: #ff9d1c;
  --h-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --h-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --h-radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --h-bg: #071526; --h-surface: #0c2136; --h-ink: #eef7f7; --h-muted: #a8bdca;
    --h-line: #1d4054; --h-accent: #20bdc5; --h-accent-ink: #0d1120; --h-title: #eef7f7;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --h-bg: #071526; --h-surface: #0c2136; --h-ink: #eef7f7; --h-muted: #a8bdca;
  --h-line: #1d4054; --h-accent: #20bdc5; --h-accent-ink: #0d1120; --h-title: #eef7f7;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--h-bg); color: var(--h-ink); font-family: var(--h-text); line-height: 1.6; overflow-wrap: break-word; }
img, video, iframe, svg { max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { font-family: var(--h-display); color: var(--h-title); text-wrap: balance; line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--h-accent); outline-offset: 3px; }
::selection { background: var(--h-mark); color: #0f1629; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 8px; inset-inline-start: 8px; width: auto; height: auto; margin: 0; padding: 10px 14px; clip: auto; background: var(--h-surface); color: var(--h-ink); z-index: 100000; border-radius: 8px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--h-surface); border-bottom: 1px solid var(--h-line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-inner { max-width: 1280px; margin: 0 auto; padding: 14px 20px; }
.header-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 28px; }
.site-title { font: 800 1.6rem var(--h-display); letter-spacing: -.03em; }
.site-title a { color: var(--h-ink); }
.site-title a::before { content: ""; display: inline-block; width: .42em; height: .42em; margin-inline-end: .3em; border-radius: 50%; background: var(--h-mark); vertical-align: .12em; }
.site-description { margin-top: 2px; font-size: .85rem; color: var(--h-muted); }
.custom-logo { display: block; height: auto; width: auto; max-width: 100%; }
.header-tools { display: flex; gap: 6px; grid-column: 3; grid-row: 1; }
.primary-nav { grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.primary-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 0; margin: 0; }
.primary-nav a { color: var(--h-ink); font-weight: 500; padding-block: 6px; display: inline-block; border-bottom: 2px solid transparent; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current_page_item > a, .primary-nav .current-cat > a { border-bottom-color: var(--h-mark); }
.primary-nav li, .primary-nav .menu-item-has-children, .primary-nav .page_item_has_children { position: relative; }
.primary-nav .sub-menu, .primary-nav .children { display: none; position: absolute; inset-inline-start: 0; top: 100%; min-width: 200px; flex-direction: column; flex-wrap: nowrap; gap: 0; padding: 8px; background: var(--h-surface); border: 1px solid var(--h-line); border-radius: var(--h-radius); box-shadow: 0 12px 30px rgba(15,22,41,.12); z-index: 10; }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu, .primary-nav li:hover > .children, .primary-nav li:focus-within > .children { display: flex; }
.primary-nav .sub-menu a, .primary-nav .children a { display: block; padding: 8px 10px; border: 0; border-radius: 8px; }
.primary-nav .sub-menu a:hover, .primary-nav .children a:hover { background: var(--h-bg); }

.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--h-line); border-radius: 10px; background: transparent; color: var(--h-ink); cursor: pointer; }
.icon-btn:hover { background: var(--h-bg); }
.menu-toggle { display: none; }
.theme-toggle .i-sun { display: none; }
.theme-toggle[aria-pressed="true"] .i-sun { display: block; }
.theme-toggle[aria-pressed="true"] .i-moon { display: none; }

.search-form { display: flex; gap: 8px; }
.search-field { padding: 9px 12px; border: 1px solid var(--h-line); border-radius: 10px; background: var(--h-bg); color: var(--h-ink); font: inherit; min-width: 0; width: 100%; }
.search-form label { flex: 1; min-width: 0; }
.search-form button { padding: 9px 16px; border: 0; border-radius: 10px; background: var(--h-accent); color: var(--h-accent-ink); font: 600 .95rem var(--h-text); cursor: pointer; }
.primary-nav .search-form { flex: 0 1 280px; }

@media (max-width: 860px) {
  .header-row { grid-template-columns: 1fr auto; }
  .header-tools { grid-column: 2; }
  .primary-nav { grid-column: 1 / -1; grid-row: 2; flex-direction: column; align-items: stretch; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav li > a { display: block; padding: 12px 0; border-bottom: 1px solid var(--h-line); }
  .primary-nav .sub-menu, .primary-nav .children { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 0 16px; background: transparent; }
  .primary-nav .search-form { flex-basis: auto; }
  .js .menu-toggle { display: inline-flex; }
  .js .primary-nav { display: none; }
  .js .primary-nav.is-open { display: flex; }
}

.reading-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; background: var(--h-accent); transform: scaleX(0); transform-origin: left; z-index: 100; }
[dir="rtl"] .reading-progress { transform-origin: right; }
.admin-bar .reading-progress { top: 32px; }
@media (max-width: 782px) { .admin-bar .reading-progress { top: 46px; } }

/* ---------- shared ---------- */
.site-main { padding-block: 40px 72px; min-height: 50vh; }
.wrap { max-width: 1280px; margin-inline: auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 64px; }
.thumb { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; background: var(--h-line); }
.placeholder-thumb { background: linear-gradient(135deg, var(--h-line), var(--h-surface)); }
.card-media { display: block; overflow: hidden; border-radius: 10px; }
.more { font-weight: 600; font-size: .9rem; color: var(--h-accent); border-bottom: 2px solid transparent; width: fit-content; }
.more:hover { border-bottom-color: var(--h-mark); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 3px solid var(--h-ink); margin-bottom: 24px; }
.sec-head h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 800; }
.sec-head a { font-size: .9rem; font-weight: 600; color: var(--h-accent); }
.post-meta { color: var(--h-muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.post-meta .kicker, .post-meta .kicker a { color: var(--h-accent); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; }
.post-meta a { text-decoration: underline; text-underline-offset: 2px; }
.post-meta .kicker a { text-decoration: none; }
.sticky .kicker::after { content: " ★"; }

/* ---------- home ---------- */
.top { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 32px; }
.lead { display: grid; gap: 14px; align-content: start; }
.lead .thumb { aspect-ratio: 16 / 9; }
.lead h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); font-weight: 800; }
.lead h1 a { background: linear-gradient(var(--h-mark), var(--h-mark)) 0 92% / 0 .3em no-repeat; transition: background-size .25s; }
.lead h1 a:hover, .lead h1 a:focus-visible { background-size: 100% .3em; }
.lead p { color: var(--h-muted); max-width: 65ch; }
.rail { display: grid; gap: 20px; align-content: start; }
.rail article { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--h-line); }
.rail article:last-child { border-bottom: 0; padding-bottom: 0; }
.rail .thumb { aspect-ratio: 1; }
.rail h3 a:hover { color: var(--h-accent); }

.latest-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
.card { display: grid; gap: 10px; align-content: start; }
.card p { color: var(--h-muted); }
.card .thumb { transition: transform .3s; }
.card:hover .thumb { transform: scale(1.03); }
.card h3 a:hover { color: var(--h-accent); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.chips a { display: inline-block; padding: 8px 16px; border-radius: 999px; background: var(--h-surface); border: 1px solid var(--h-line); font-weight: 500; font-size: .92rem; }
.chips a:hover { background: var(--h-accent); color: var(--h-accent-ink); border-color: var(--h-accent); }
.topic-mosaic { list-style: none !important; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 180px; gap: 14px; }
.topic-mosaic li { list-style: none !important; margin: 0; padding: 0; min-width: 0; }
.topic-mosaic li::marker { content: none; }
.topic-mosaic li:first-child { grid-column: span 2; grid-row: span 2; }
.topic-tile { position: relative; display: block; height: 100%; border-radius: 20px; overflow: hidden; background: linear-gradient(135deg, var(--h-accent), #101a5c); color: #fff; isolation: isolate; box-shadow: 0 6px 20px rgba(15,22,41,.12); transition: transform .25s, box-shadow .25s; }
.topic-mosaic li:nth-child(4n+2) .topic-tile { background: linear-gradient(135deg, #0f766e, #134e4a); }
.topic-mosaic li:nth-child(4n+3) .topic-tile { background: linear-gradient(135deg, #c2410c, #7c2d12); }
.topic-mosaic li:nth-child(4n+4) .topic-tile { background: linear-gradient(135deg, #7e22ce, #3b0764); }
.topic-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s; }
.topic-tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(8,12,28,.92) 0%, rgba(8,12,28,.35) 50%, rgba(8,12,28,.05) 100%); }
.topic-info { position: absolute; inset-inline: 16px; bottom: 14px; display: grid; gap: 6px; justify-items: start; padding-inline-end: 46px; }
.topic-name { font-family: var(--h-display); font-weight: 800; font-size: 1.15rem; line-height: 1.15; letter-spacing: -.01em; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.topic-mosaic li:first-child .topic-name { font-size: 2rem; }
.topic-count { font-size: .72rem; font-weight: 600; letter-spacing: .02em; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); white-space: nowrap; }
.topic-arrow { position: absolute; inset-inline-end: 14px; bottom: 14px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--h-mark); color: #0f1629; font-weight: 700; transition: transform .2s; }
.topic-tile:hover, .topic-tile:focus-visible { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15,22,41,.22); }
.topic-tile:hover .topic-img { transform: scale(1.07); }
.topic-tile:hover .topic-arrow { transform: translateX(3px); }
[dir="rtl"] .topic-arrow { transform: scaleX(-1); }
[dir="rtl"] .topic-tile:hover .topic-arrow { transform: scaleX(-1) translateX(3px); }
@media (max-width: 900px) { .topic-mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; } .topic-mosaic li:first-child { grid-column: span 2; grid-row: span 1; } .topic-mosaic li:first-child .topic-tile { } }
@media (max-width: 600px) { .topic-mosaic { gap: 10px; grid-auto-rows: 132px; } .topic-mosaic li:first-child { grid-row: span 2; } .topic-tile { border-radius: 16px; } .topic-name { font-size: 1rem; } .topic-mosaic li:first-child .topic-name { font-size: 1.5rem; } .topic-info { inset-inline: 12px; bottom: 11px; padding-inline-end: 38px; } .topic-arrow { width: 28px; height: 28px; inset-inline-end: 10px; bottom: 10px; font-size: .85rem; } }
@media (prefers-reduced-motion: reduce) { .topic-tile, .topic-img, .topic-arrow { transition: none; } .topic-tile:hover { transform: none; } }

.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cat { background: var(--h-surface); border: 1px solid var(--h-line); border-radius: 14px; padding: 22px; display: grid; gap: 16px; align-content: start; }
.cat .sec-head { margin-bottom: 0; border-bottom-width: 2px; }
.cat h3 a:hover { color: var(--h-accent); }

.newsletter { background: var(--h-accent); color: var(--h-accent-ink); border-radius: 18px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.newsletter h2, .newsletter p, .newsletter label { color: var(--h-accent-ink); }
.newsletter p { opacity: .9; margin-top: 8px; }
.newsletter a { text-decoration: underline; }
.newsletter form { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.newsletter input:not([type="checkbox"]):not([type="radio"]) { flex: 1 1 200px; min-width: 0; padding: 14px 16px; border-radius: 10px; border: 0; font: inherit; background: #fff; color: #0f1629; }
.newsletter button, .newsletter input[type="submit"] { padding: 14px 22px; border: 0; border-radius: 10px; font: inherit; font-weight: 700; background: var(--h-mark); color: #0f1629; cursor: pointer; }
.newsletter button:hover, .newsletter input[type="submit"]:hover { filter: brightness(.95); }

.subscribe-form { display: flex; gap: 8px; flex-wrap: wrap; }
.subscribe-form .hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.subscribe-form input[type="email"] { flex: 1 1 200px; min-width: 0; padding: 14px 16px; border-radius: 10px; border: 0; font: inherit; background: #fff; color: #0f1629; }
.subscribe-form button { padding: 14px 22px; border: 0; border-radius: 10px; font: inherit; font-weight: 700; background: var(--h-mark); color: #0f1629; cursor: pointer; }
.subscribe-form button:hover { filter: brightness(.95); }
.subscribe-form .subscribe-note { flex-basis: 100%; font-size: .85rem; margin-top: 0; }
.subscribe-status { flex-basis: 100%; }
.subscribe-status p { margin: 0; padding: 10px 14px; border-radius: 10px; font-weight: 600; background: rgba(255,255,255,.18); opacity: 1; }
.subscribe-status p.is-error { background: #fff; color: #b3261e; }
.newsletter .subscribe-status p.is-success { background: #fff; color: #0b6b2f; }

/* ---------- content pages ---------- */
.content-wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.content-wrap.wide { max-width: 1280px; padding-inline: max(16px, env(safe-area-inset-left, 0px)); }
.archive-desc { margin: -8px 0 28px; color: var(--h-muted); max-width: 65ch; }
.entry { background: var(--h-surface); border: 1px solid var(--h-line); border-radius: 14px; padding: clamp(20px, 4vw, 44px); }
.entry h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; margin: 8px 0 12px; }
.entry-header { margin-bottom: 20px; }
.byline span + span::before, .byline time + span::before, .byline span + time::before { content: "·"; margin-inline-end: 12px; }
.entry-featured { margin: 0 0 28px; }
.entry-featured img { display: block; width: 100%; height: auto; border-radius: 10px; }
.entry-content { font-size: 1.08rem; line-height: 1.8; overflow-wrap: anywhere; }
.entry-content > * { margin-block: 0 1.2em; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content a { color: var(--h-accent); text-decoration: underline; text-underline-offset: 2px; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 1.6em 0 .6em; }
.entry-content img { border-radius: 8px; }
.entry-content ul, .entry-content ol { padding-inline-start: 1.4em; }
.entry-content blockquote { margin-inline: 0; padding: 4px 0 4px 20px; border-inline-start: 4px solid var(--h-mark); font-family: var(--h-display); font-size: 1.25rem; line-height: 1.5; }
.entry-content pre { overflow-x: auto; padding: 16px; background: var(--h-bg); border: 1px solid var(--h-line); border-radius: 10px; font-size: .9rem; }
.entry-content code { font-size: .92em; background: var(--h-bg); padding: .1em .35em; border-radius: 5px; }
.entry-content pre code { background: none; padding: 0; }
.entry-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--h-line); padding: 8px 12px; text-align: start; }
.entry-content figure { margin-inline: 0; }
.entry-content figcaption, .wp-caption-text { font-size: .9rem; color: var(--h-muted); margin-top: 6px; }
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { display: block; margin-inline: auto; }
.alignwide { max-width: 1100px; margin-inline: auto; }
.alignfull { width: 100%; }
.wp-caption { max-width: 100%; }
.gallery { display: grid; gap: 12px; }
.sticky { outline: none; }
.entry-content::after { content: ""; display: block; clear: both; }
.tags { margin-top: 28px; }
.tags a { display: inline-block; padding: 4px 12px; margin: 0 6px 6px 0; border: 1px solid var(--h-line); border-radius: 999px; text-decoration: none; }
.tags a:hover { border-color: var(--h-accent); color: var(--h-accent); }

.author-box { display: flex; gap: 18px; align-items: center; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--h-line); }
.author-box img { border-radius: 50%; flex: none; }
.author-box h2 { font-size: 1.1rem; }
.author-box p { color: var(--h-muted); font-size: .95rem; margin-top: 4px; }

.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.post-navigation a { display: block; padding: 16px; background: var(--h-surface); border: 1px solid var(--h-line); border-radius: var(--h-radius); font-family: var(--h-display); font-weight: 700; }
.post-navigation a:hover { border-color: var(--h-accent); }
.post-navigation a span { display: block; font: 600 .75rem var(--h-text); text-transform: uppercase; letter-spacing: .06em; color: var(--h-muted); margin-bottom: 4px; }
.post-navigation .nav-next { text-align: end; grid-column: 2; }

.related { margin-top: 56px; }
.content-wrap .related .latest-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.page-numbers { padding: 8px 14px; border: 1px solid var(--h-line); border-radius: 8px; background: var(--h-surface); }
a.page-numbers:hover { border-color: var(--h-accent); color: var(--h-accent); }
.page-numbers.current { background: var(--h-accent); color: var(--h-accent-ink); border-color: var(--h-accent); }

/* ---------- comments ---------- */
.comments-area { margin-top: 32px; padding: clamp(20px, 4vw, 36px); background: var(--h-surface); border: 1px solid var(--h-line); border-radius: 14px; }
.comments-area h2 { font-size: 1.4rem; margin-bottom: 16px; }
.comment-list, .comment-list .children { list-style: none; padding: 0; margin: 0; }
.comment-list .children { padding-inline-start: 20px; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--h-line); position: relative; }
.comment-author { display: flex; align-items: center; gap: 10px; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: .85rem; color: var(--h-muted); }
.comment-metadata a, .reply a { text-decoration: underline; text-underline-offset: 2px; }
.comment-form label { display: block; margin-bottom: 4px; font-weight: 500; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--h-line); border-radius: 10px; background: var(--h-bg); color: var(--h-ink); font: inherit; }
.comment-form .submit { padding: 12px 22px; border: 0; border-radius: 10px; background: var(--h-accent); color: var(--h-accent-ink); font: 700 1rem var(--h-text); cursor: pointer; }
.comment-reply-title { font-size: 1.2rem; margin-top: 24px; }

/* ---------- footer ---------- */
.widget-title { font-size: 1.05rem; margin-bottom: 12px; }
.widget ul { padding-inline-start: 1.1em; margin: 0; }
.widget a:hover { color: var(--h-accent); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .top, .newsletter { grid-template-columns: 1fr; }
  .latest-grid, .cat-grid, .content-wrap .related .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .wrap { gap: 42px; }
  .site-main { padding-block: 24px 48px; }
}
@media (max-width: 560px) {
  .latest-grid, .cat-grid, .content-wrap .related .latest-grid { grid-template-columns: 1fr; }
  .rail article { grid-template-columns: 96px minmax(0, 1fr); }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .post-navigation .nav-next { grid-column: auto; }
  .alignleft, .alignright { float: none; margin-inline: auto; display: block; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .site-header, .site-footer, .reading-progress, .related, .comments-area, .post-navigation, .newsletter { display: none !important; }
  body { background: #fff; color: #000; }
  .entry { border: 0; padding: 0; }
}

/* ---- Hero v2.4 ---- */
.lead-media { position: relative; border-radius: 20px; box-shadow: 0 10px 30px rgba(15,22,41,.16); }
.lead-media .thumb { border-radius: 20px; transition: transform .5s; }
.lead:hover .lead-media .thumb { transform: scale(1.03); }
.lead-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,12,28,.35), transparent 45%); pointer-events: none; }
.lead-badge { position: absolute; inset-block-start: 14px; inset-inline-start: 14px; z-index: 1; background: var(--h-mark); color: #0f1629; font-weight: 800; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.lead-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; color: var(--h-accent); background: color-mix(in srgb, var(--h-accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--h-accent) 25%, transparent); transition: background .2s, color .2s; }
.chip:hover { background: var(--h-accent); color: var(--h-accent-ink); }
.lead h1 { line-height: 1.08; letter-spacing: -.02em; }
.lead-excerpt { font-size: 1.05rem; line-height: 1.65; margin: 0; padding-inline-start: 14px; border-inline-start: 4px solid var(--h-mark); }
.lead-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--h-muted); font-size: .88rem; padding-block: 12px; border-block: 1px solid var(--h-line); }
.lead-author { display: inline-flex; align-items: center; gap: 8px; color: var(--h-ink); font-weight: 600; }
.lead-author .avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--h-accent); }
.btn-read { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 12px 22px; border-radius: 999px; background: var(--h-accent); color: var(--h-accent-ink); font-weight: 700; box-shadow: 0 6px 16px color-mix(in srgb, var(--h-accent) 35%, transparent); transition: transform .2s, box-shadow .2s; }
.btn-read:hover { transform: translateY(-2px); }
.rail { background: var(--h-surface); border: 1px solid var(--h-line); border-radius: 20px; padding: 20px; box-shadow: 0 6px 20px rgba(15,22,41,.06); }
.rail-title { font-size: 1.1rem; font-weight: 800; padding-bottom: 12px; margin: 0; border-bottom: 3px solid var(--h-ink); display: flex; align-items: center; gap: 8px; }
.rail-title::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--h-mark); box-shadow: 0 0 0 4px color-mix(in srgb, var(--h-mark) 35%, transparent); }
.rail article { position: relative; grid-template-columns: 96px minmax(0, 1fr); align-items: center; }
.rail .thumb { aspect-ratio: 1; border-radius: 14px; }
.rail .card-media { border-radius: 14px; }
.rail-num { position: absolute; inset-block-start: -6px; inset-inline-start: -6px; z-index: 1; min-width: 26px; height: 26px; padding-inline: 6px; display: grid; place-items: center; border-radius: 999px; background: var(--h-ink); color: var(--h-surface); font-size: .72rem; font-weight: 800; font-family: var(--h-display); }
.rail-body { display: grid; gap: 4px; }
.rail-body h3 { font-size: 1.02rem; line-height: 1.25; }
.rail .post-meta { font-size: .78rem; gap: 2px 10px; }
@media (max-width: 900px) { .rail { padding: 16px; } .lead-excerpt { font-size: 1rem; } .btn-read { width: 100%; justify-content: center; } }
@media (max-width: 900px) { .rail article { grid-template-columns: 84px minmax(0, 1fr); } }

/* ======== Homepage v3 (hx) ======== */
.hx .wrap { gap: 44px; }
.hx .wrap > * { min-width: 0; }
.hx-card { position: relative; min-width: 0; }
.hx-media { position: absolute; inset: 0; display: block; overflow: hidden; z-index: 0; }
.hx-media .thumb, .hx-media .placeholder-thumb { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; object-fit: cover; transition: transform .6s; }
.hx-card:hover .hx-media .thumb { transform: scale(1.06); }
.hx-body { position: relative; z-index: 1; display: grid; gap: 8px; }
.hx-cat { justify-self: start; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; background: var(--h-mark); color: #0f1629; }
.hx-title { margin: 0; font-family: var(--h-display); font-weight: 800; line-height: 1.12; letter-spacing: -.015em; }
.hx-title a { color: inherit; }
.hx-title a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.hx-excerpt { margin: 0; opacity: .88; line-height: 1.55; }
.hx-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: .8rem; opacity: .82; }
.hx-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.hx-cat { position: relative; z-index: 3; }

/* Hero */
.hx-top { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 24px; }
.hx-hero-main { min-width: 0; }
.hx-card.hx-hero { min-height: 560px; height: 100%; display: flex; align-items: flex-end; border-radius: 28px; overflow: hidden; color: #fff; background: #0d1120; isolation: isolate; box-shadow: 0 18px 50px rgba(15,22,41,.28); }
.hx-card.hx-hero::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(to top, rgba(6,9,22,.95) 0%, rgba(6,9,22,.55) 45%, rgba(6,9,22,.05) 80%); pointer-events: none; }
.hx-card.hx-hero .hx-body { padding: clamp(20px, 4vw, 40px); gap: 14px; max-width: 760px; }
.hx-card.hx-hero .hx-title { font-size: clamp(1.9rem, 4.4vw, 3.3rem); }
.hx-card.hx-hero .hx-excerpt { font-size: 1.05rem; max-width: 60ch; }
.hx-card.hx-hero .hx-cat::before { content: "★ "; }
.hx-hero-side { display: grid; gap: 14px; align-content: start; }
.hx-label { margin: 0 0 2px; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--h-muted); display: flex; align-items: center; gap: 10px; }
.hx-label::after { content: ""; flex: 1; height: 1px; background: var(--h-line); }
.hx-card.hx-side { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px; background: var(--h-surface); border: 1px solid var(--h-line); border-radius: 20px; transition: transform .25s, box-shadow .25s, border-color .25s; }
.hx-card.hx-side:hover { transform: translateX(4px); border-color: var(--h-accent); box-shadow: 0 10px 26px rgba(15,22,41,.12); }
.hx-side .hx-media { position: relative; inset: auto; aspect-ratio: 1; border-radius: 14px; }
.hx-side .hx-body { gap: 6px; }
.hx-side .hx-cat { background: none; padding: 0; color: var(--h-accent); }
.hx-side .hx-title { font-size: 1.02rem; color: var(--h-ink); }
.hx-side .hx-meta { color: var(--h-muted); }

/* Topic pills */
.hx-topics { display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 20px; background: var(--h-surface); border: 1px solid var(--h-line); border-radius: 999px; }
.hx-topics-label { flex: none; font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--h-muted); }
.hx-pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding-block: 2px; }
.hx-pills::-webkit-scrollbar { display: none; }
.hx-pill { flex: none; scroll-snap-align: start; padding: 9px 16px; border-radius: 999px; background: var(--h-bg); border: 1px solid var(--h-line); font-weight: 600; font-size: .9rem; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.hx-pill b { margin-inline-start: 6px; font-size: .75rem; padding: 2px 7px; border-radius: 999px; background: var(--h-line); }
.hx-pill:hover { background: var(--h-accent); color: var(--h-accent-ink); border-color: var(--h-accent); }
.hx-pill:hover b { background: rgba(255,255,255,.25); }

/* Section heads */
.hx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.hx-head h2 { margin: 2px 0 0; font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.hx-eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--h-accent); }
.hx-all { flex: none; font-weight: 700; font-size: .9rem; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--h-ink); transition: background .2s, color .2s; }
.hx-all:hover { background: var(--h-ink); color: var(--h-surface); }

/* Fresh grid */
.hx-fresh { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.hx-card.hx-grid { display: grid; gap: 14px; align-content: start; }
.hx-grid .hx-media { position: relative; inset: auto; aspect-ratio: 16 / 10; border-radius: 20px; }
.hx-grid .hx-cat { background: none; padding: 0; color: var(--h-accent); }
.hx-grid .hx-title { font-size: 1.3rem; color: var(--h-ink); }
.hx-grid .hx-meta { color: var(--h-muted); }
.hx-card.hx-wide { grid-column: span 3; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); background: var(--h-ink); color: var(--h-surface); border-radius: 28px; overflow: hidden; }
.hx-wide .hx-media { position: relative; inset: auto; min-height: 320px; }
.hx-wide .hx-body { padding: clamp(20px, 4vw, 44px); align-content: center; gap: 14px; }
.hx-wide .hx-title { font-size: clamp(1.6rem, 3vw, 2.5rem); }

/* Stats */
.hx-stats { display: grid; grid-template-columns: repeat(3, 1fr); background: linear-gradient(135deg, var(--h-accent), #101a5c); color: #fff; border-radius: 24px; padding: 8px; }
.hx-stats div { display: grid; gap: 2px; text-align: center; padding: 22px 10px; }
.hx-stats div + div { border-inline-start: 1px solid rgba(255,255,255,.22); }
.hx-stats strong { font-family: var(--h-display); font-size: clamp(1.7rem, 4vw, 2.8rem); font-weight: 800; line-height: 1; }
.hx-stats span { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }

/* Swipe rows */
.hx-swipe { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 28%); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; scrollbar-width: thin; }
.hx-card.hx-tile { scroll-snap-align: start; aspect-ratio: 3 / 4; display: flex; align-items: flex-end; border-radius: 22px; overflow: hidden; color: #fff; background: #0d1120; isolation: isolate; }
.hx-card.hx-tile::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(to top, rgba(6,9,22,.94), rgba(6,9,22,.2) 60%, rgba(6,9,22,0)); pointer-events: none; }
.hx-tile .hx-body { padding: 18px; }
.hx-tile .hx-title { font-size: 1.2rem; }
.hx-tone-1 .hx-eyebrow { color: #0f766e; } .hx-tone-2 .hx-eyebrow { color: #c2410c; }
.hx-tone-1 .hx-cat { background: #5eead4; } .hx-tone-2 .hx-cat { background: #fdba74; }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hx-card.hx-wide { background: var(--h-surface); color: var(--h-ink); border: 1px solid var(--h-line); } :root:not([data-theme="light"]) .hx-tone-1 .hx-eyebrow { color: #5eead4; } :root:not([data-theme="light"]) .hx-tone-2 .hx-eyebrow { color: #fdba74; } }
:root[data-theme="dark"] .hx-card.hx-wide { background: var(--h-surface); color: var(--h-ink); border: 1px solid var(--h-line); }
:root[data-theme="dark"] .hx-tone-1 .hx-eyebrow { color: #5eead4; } :root[data-theme="dark"] .hx-tone-2 .hx-eyebrow { color: #fdba74; }

@media (max-width: 1000px) {
  .hx-top { grid-template-columns: 1fr; }
  .hx-card.hx-hero { min-height: 480px; }
  .hx-fresh { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-card.hx-wide { grid-column: span 2; }
  .hx-swipe { grid-auto-columns: minmax(230px, 44%); }
}
@media (max-width: 640px) {
  .hx-card.hx-hero { min-height: 440px; border-radius: 22px; }
  .hx-card.hx-hero .hx-excerpt { display: none; }
  .hx-topics { padding: 8px 8px 8px 14px; gap: 10px; }
  .hx-topics-label { display: none; }
  .hx .wrap { gap: 34px; }
  .hx-fresh { grid-template-columns: 1fr; gap: 20px; }
  .hx-card.hx-wide { grid-column: auto; grid-template-columns: 1fr; border-radius: 22px; }
  .hx-wide .hx-media { min-height: 0; aspect-ratio: 16 / 10; }
  .hx-card.hx-side { grid-template-columns: 92px minmax(0, 1fr); }
  .hx-swipe { grid-auto-columns: 76%; gap: 12px; }
  .hx-all { padding: 8px 14px; }
  .hx-stats div { padding: 16px 4px; }
}
@media (prefers-reduced-motion: reduce) { .hx-card, .hx-media .thumb { transition: none !important; } }

/* Title colours: white on image cards and the dark wide card */
.hx-title { color: inherit; }
.hx-card.hx-hero, .hx-card.hx-tile { color: #fff; }
.hx-card.hx-hero .hx-title, .hx-card.hx-hero .hx-title a,
.hx-card.hx-tile .hx-title, .hx-card.hx-tile .hx-title a,
.hx-card.hx-wide .hx-title a { color: #fff !important; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.hx-card.hx-hero .hx-excerpt, .hx-card.hx-hero .hx-meta, .hx-card.hx-tile .hx-meta { color: rgba(255,255,255,.88); }
.hx-card.hx-side .hx-title a, .hx-card.hx-grid .hx-title a { color: var(--h-ink); }

/* Phones: show the whole hero picture, text sits below on dark */
@media (max-width: 640px) {
  .hx-card.hx-hero { min-height: 0; display: grid; align-items: start; }
  .hx-card.hx-hero::before { display: none; }
  .hx-card.hx-hero .hx-media { position: relative; inset: auto; aspect-ratio: 16 / 10; }
  .hx-card.hx-hero .hx-body { padding: 18px 18px 22px; max-width: none; }
  .hx-card.hx-hero .hx-title { font-size: 1.6rem; }
}

/* v3.0.1 fixes: white titles on image cards, star only on main hero */
.hx-card.hx-hero .hx-title, .hx-card.hx-hero .hx-title a,
.hx-card.hx-tile .hx-title, .hx-card.hx-tile .hx-title a { color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.55); }
.hx-card.hx-hero .hx-excerpt, .hx-card.hx-hero .hx-meta,
.hx-card.hx-tile .hx-meta { color: #fff; }
.hx-card.hx-wide .hx-title, .hx-card.hx-wide .hx-title a { color: #fff; }
:root[data-theme="dark"] .hx-card.hx-wide .hx-title, :root[data-theme="dark"] .hx-card.hx-wide .hx-title a { color: var(--h-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hx-card.hx-wide .hx-title, :root:not([data-theme="light"]) .hx-card.hx-wide .hx-title a { color: var(--h-ink); } }
.hx-hero .hx-cat::before { content: none; }
.hx-card.hx-hero .hx-cat::before { content: "★ "; }
.hx-card.hx-side .hx-cat::before { content: none; }

/* v3.0.2: rows fill the full width on large screens */
@media (min-width: 1001px) { .hx-swipe { grid-auto-columns: calc((100% - 48px) / 4); } }

/* v3.0.3: topic rows show exactly 3 cards */
.hx-row-section .hx-head h2 { margin-top: 0; }
@media (min-width: 641px) { .hx-swipe { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; } }

/* v3.0.4: topic row cards show the whole image (no cropping), text below */
.hx-card.hx-tile { aspect-ratio: auto; display: grid; align-content: start; align-items: start; gap: 0; color: var(--h-ink); background: var(--h-surface); border: 1px solid var(--h-line); border-radius: 22px; overflow: hidden; box-shadow: 0 8px 24px rgba(15,22,41,.08); transition: transform .25s, box-shadow .25s; }
.hx-card.hx-tile:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(15,22,41,.16); }
.hx-card.hx-tile::before { content: none; }
.hx-tile .hx-media { position: relative; inset: auto; display: block; background: var(--h-line); }
.hx-tile .hx-media .thumb, .hx-tile .hx-media .placeholder-thumb { position: static; display: block; width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; border-radius: 0; }
.hx-tile .hx-media .placeholder-thumb { aspect-ratio: 16 / 9; }
.hx-card.hx-tile:hover .hx-media .thumb { transform: none; }
.hx-tile .hx-body { padding: 16px 18px 18px; gap: 10px; }
.hx-card.hx-tile .hx-title, .hx-card.hx-tile .hx-title a { color: var(--h-ink); text-shadow: none; font-size: 1.15rem; }
.hx-card.hx-tile .hx-meta { color: var(--h-muted); }
.hx-tile .hx-cat { background: none; padding: 0; color: var(--h-accent); }
.hx-tone-1 .hx-tile .hx-cat { color: #0f766e; } .hx-tone-2 .hx-tile .hx-cat { color: #c2410c; }
:root[data-theme="dark"] .hx-tone-1 .hx-tile .hx-cat { color: #5eead4; } :root[data-theme="dark"] .hx-tone-2 .hx-tile .hx-cat { color: #fdba74; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hx-tone-1 .hx-tile .hx-cat { color: #5eead4; } :root:not([data-theme="light"]) .hx-tone-2 .hx-tile .hx-cat { color: #fdba74; } }

/* v3.0.4: topic row cards use a landscape image on top, text below */
.hx-card.hx-tile { aspect-ratio: auto; display: grid; align-content: start; align-items: start; background: var(--h-surface); color: var(--h-ink); border: 1px solid var(--h-line); border-radius: 22px; box-shadow: 0 6px 20px rgba(15,22,41,.08); transition: transform .25s, box-shadow .25s; }
.hx-card.hx-tile::before { content: none; }
.hx-card.hx-tile:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(15,22,41,.16); }
.hx-tile .hx-media { position: relative; inset: auto; aspect-ratio: 16 / 9; border-radius: 0; }
.hx-tile .hx-body { padding: 16px 18px 20px; gap: 10px; }
.hx-card.hx-tile .hx-title, .hx-card.hx-tile .hx-title a { color: var(--h-ink); text-shadow: none; font-size: 1.15rem; line-height: 1.22; }
.hx-card.hx-tile .hx-meta { color: var(--h-muted); }
.hx-tile .hx-cat { background: none; padding: 0; color: var(--h-accent); }
.hx-tone-1 .hx-tile .hx-cat { color: #0f766e; } .hx-tone-2 .hx-tile .hx-cat { color: #c2410c; }
:root[data-theme="dark"] .hx-tone-1 .hx-tile .hx-cat { color: #5eead4; } :root[data-theme="dark"] .hx-tone-2 .hx-tile .hx-cat { color: #fdba74; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hx-tone-1 .hx-tile .hx-cat { color: #5eead4; } :root:not([data-theme="light"]) .hx-tone-2 .hx-tile .hx-cat { color: #fdba74; } }

/* v3.0.5: landscape topic cards with the text on top of the image */
.hx-card.hx-tile { aspect-ratio: 16 / 11; display: flex; align-items: flex-end; background: #0d1120; color: #fff; border: 0; overflow: hidden; isolation: isolate; }
.hx-card.hx-tile::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(to top, rgba(6,9,22,.92) 0%, rgba(6,9,22,.45) 42%, rgba(6,9,22,0) 75%); pointer-events: none; }
.hx-tile .hx-media { position: absolute; inset: 0; aspect-ratio: auto; }
.hx-tile .hx-body { padding: 16px 18px; gap: 8px; width: 100%; }
.hx-card.hx-tile .hx-title, .hx-card.hx-tile .hx-title a { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.6); font-size: 1.12rem; }
.hx-card.hx-tile .hx-meta { color: #fff; }
.hx-tile .hx-cat, .hx-tone-1 .hx-tile .hx-cat, .hx-tone-2 .hx-tile .hx-cat,
:root[data-theme="dark"] .hx-tone-1 .hx-tile .hx-cat, :root[data-theme="dark"] .hx-tone-2 .hx-tile .hx-cat { background: var(--h-mark); color: #0f1629; padding: 5px 11px; }
.hx-tone-1 .hx-tile .hx-cat { background: #5eead4; } .hx-tone-2 .hx-tile .hx-cat { background: #fdba74; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hx-tile .hx-cat { color: #0f1629; } }

/* v3.0.6: topic cards = clear landscape image on top + text panel below */
.hx-card.hx-tile { aspect-ratio: auto; display: grid; align-content: start; align-items: start; background: var(--h-surface); color: var(--h-ink); border: 1px solid var(--h-line); border-radius: 22px; overflow: hidden; box-shadow: 0 6px 20px rgba(15,22,41,.08); }
.hx-card.hx-tile::before { content: none; }
.hx-tile .hx-media { position: relative; inset: auto; aspect-ratio: 16 / 10; border-radius: 0; }
.hx-tile .hx-media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(to top, rgba(6,9,22,.45), transparent); pointer-events: none; }
.hx-tile .hx-body { padding: 16px 18px 20px; gap: 10px; }
.hx-card.hx-tile .hx-title, .hx-card.hx-tile .hx-title a { color: var(--h-ink); text-shadow: none; font-size: 1.2rem; line-height: 1.22; }
.hx-card.hx-tile .hx-excerpt { color: var(--h-muted); opacity: 1; font-size: .92rem; line-height: 1.5; }
.hx-card.hx-tile .hx-meta { color: var(--h-muted); }
.hx-tile .hx-cat, .hx-tone-1 .hx-tile .hx-cat, .hx-tone-2 .hx-tile .hx-cat,
:root[data-theme="dark"] .hx-tone-1 .hx-tile .hx-cat, :root[data-theme="dark"] .hx-tone-2 .hx-tile .hx-cat { background: none; padding: 0; color: var(--h-accent); }
.hx-tone-1 .hx-tile .hx-cat { color: #0f766e; } .hx-tone-2 .hx-tile .hx-cat { color: #c2410c; }
:root[data-theme="dark"] .hx-tone-1 .hx-tile .hx-cat { color: #5eead4; } :root[data-theme="dark"] .hx-tone-2 .hx-tile .hx-cat { color: #fdba74; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hx-tile .hx-cat { color: var(--h-accent); } :root:not([data-theme="light"]) .hx-tone-1 .hx-tile .hx-cat { color: #5eead4; } :root:not([data-theme="light"]) .hx-tone-2 .hx-tile .hx-cat { color: #fdba74; } }

/* v3.0.7: make sure topic-card images always render (landscape, filled) */
.hx .hx-card.hx-tile .hx-media { position: relative !important; inset: auto !important; display: block !important; width: 100%; aspect-ratio: 16 / 10 !important; overflow: hidden; background: var(--h-line); }
.hx .hx-card.hx-tile .hx-media .thumb, .hx .hx-card.hx-tile .hx-media .placeholder-thumb { position: absolute !important; inset: 0 !important; display: block !important; width: 100% !important; height: 100% !important; max-width: none !important; aspect-ratio: auto !important; object-fit: cover !important; opacity: 1 !important; visibility: visible !important; transform: none; }
.hx .hx-card.hx-tile .hx-media::after { content: none !important; }
.hx .hx-card.hx-tile:hover .hx-media .thumb { transform: scale(1.04); }

/* v3.1.0: Trending now + daily security tip (replaces the stats band) */
.hx-trend { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.hx-trend-list { background: var(--h-surface); border: 1px solid var(--h-line); border-radius: 26px; padding: clamp(18px, 3vw, 32px); }
.hx-trend-list .hx-head { margin-bottom: 8px; }
.hx-trend ol { list-style: none; margin: 0; padding: 0; display: grid; }
.hx-trend li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center; padding: 16px 0; border-top: 1px solid var(--h-line); list-style: none; }
.hx-trend li:first-child { border-top: 0; }
.hx-rank { font-family: var(--h-display); font-weight: 800; font-size: 2.4rem; line-height: 1; color: transparent; -webkit-text-stroke: 2px var(--h-accent); text-align: center; }
.hx-trend li:nth-child(-n+3) .hx-rank { color: var(--h-accent); -webkit-text-stroke: 0; }
.hx-trend li > div { display: grid; gap: 4px; }
.hx-trend-cat { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--h-accent); }
.hx-trend-title { font-family: var(--h-display); font-weight: 700; font-size: 1.12rem; line-height: 1.25; color: var(--h-ink); }
.hx-trend-title:hover { color: var(--h-accent); }
.hx-trend-date { font-size: .8rem; color: var(--h-muted); }
.hx-tip { position: relative; overflow: hidden; display: grid; align-content: center; gap: 14px; padding: clamp(22px, 4vw, 38px); border-radius: 26px; color: #fff; background: linear-gradient(145deg, #2f3cff, #101a5c 70%); box-shadow: 0 16px 40px rgba(47,60,255,.25); }
.hx-tip::after { content: ""; position: absolute; inset-inline-end: -60px; inset-block-start: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hx-tip .hx-eyebrow { color: var(--h-mark); }
.hx-tip-icon { font-size: 2.4rem; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; background: rgba(255,255,255,.14); }
.hx-tip p { margin: 0; font-family: var(--h-display); font-weight: 700; font-size: clamp(1.2rem, 2.4vw, 1.6rem); line-height: 1.3; position: relative; z-index: 1; }
.hx-tip-link { position: relative; z-index: 1; justify-self: start; padding: 10px 18px; border-radius: 999px; background: var(--h-mark); color: #0f1629; font-weight: 700; font-size: .9rem; }
@media (max-width: 900px) { .hx-trend { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .hx-rank { font-size: 2rem; } .hx-trend li { grid-template-columns: 40px minmax(0, 1fr); } }

/* ---------- footer always visible (legal/info pages) ---------- */
.site-main { position: relative; display: flow-root; overflow: visible; }
.entry, .entry-content { display: flow-root; }


/* Latest Stories inside individual posts: four newest published posts. */
@media (min-width: 1100px) {
  .single-post .content-wrap .latest-stories .latest-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- footer (dark navy, centred) ---------- */
.site-footer { background: #0a0f1f; color: #fff; padding: 44px 0 40px; margin-top: 48px; text-align: center; display: block; clear: both; position: relative; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 34px; }
.site-footer li { margin: 0; }
.site-footer nav a { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; display: inline-block; padding: 6px 0; }
.site-footer nav a:hover, .footer-top a:hover { color: var(--h-mark, #fff); }
.footer-cats { padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.14); }
.footer-pages { padding-top: 22px; }
.footer-social { margin-top: 22px !important; padding-bottom: 30px !important; border-bottom: 1px solid rgba(255,255,255,.14); gap: 14px !important; }
.footer-social a { display: inline-block; min-width: 56px; padding: 14px 26px; border: 1.5px solid #fff; border-radius: 6px; font-size: 1.05rem; font-weight: 600; }
.footer-social a:hover { background: #fff; color: #0a0f1f; }
.footer-copy { margin: 28px 0 0; font-size: 1.05rem; font-weight: 500; color: #fff; }
.footer-top { margin: 20px 0 0; }
.footer-top a { font-size: 1.05rem; font-weight: 600; }
@media (max-width: 640px) { .site-footer ul { gap: 6px 22px; } .footer-social a { padding: 10px 18px; } }


/* ---------- Footer layout hotfix: force horizontal navigation ---------- */
html body #site-footer.site-footer { display:block !important; width:100%; color:#f7faff !important; background-color:#050d1d !important; text-align:center !important; }
html body #site-footer.site-footer .site-inner { width:min(1200px, calc(100% - 40px)); max-width:1200px; margin-left:auto !important; margin-right:auto !important; }
html body #site-footer.site-footer nav { display:block !important; width:100%; }
html body #site-footer.site-footer .footer-cats ul,
html body #site-footer.site-footer .footer-pages ul,
html body #site-footer.site-footer ul.footer-social {
  display:flex !important; flex-direction:row !important; flex-wrap:wrap !important;
  align-items:center !important; justify-content:center !important;
  list-style:none !important; list-style-type:none !important;
  margin:0 auto !important; padding:0 !important; gap:10px 30px !important;
}
html body #site-footer.site-footer .footer-cats li,
html body #site-footer.site-footer .footer-pages li,
html body #site-footer.site-footer .footer-social li {
  display:block !important; float:none !important; list-style:none !important;
  margin:0 !important; padding:0 !important;
}
html body #site-footer.site-footer .footer-cats li::marker,
html body #site-footer.site-footer .footer-pages li::marker,
html body #site-footer.site-footer .footer-social li::marker { content:"" !important; }
html body #site-footer.site-footer .footer-cats { padding:0 0 20px !important; border-bottom:1px solid rgba(110,160,220,.28); }
html body #site-footer.site-footer .footer-pages { padding-top:16px !important; }
html body #site-footer.site-footer nav a { display:inline-block !important; color:#f7faff !important; text-decoration:none !important; padding:7px 0 !important; }
html body #site-footer.site-footer .footer-social { margin:16px auto 0 !important; padding:0 0 22px !important; border-bottom:1px solid rgba(110,160,220,.28); }
html body #site-footer.site-footer .footer-social a { display:inline-flex !important; min-width:78px; min-height:48px; align-items:center; justify-content:center; padding:10px 22px !important; border:2px solid #238bff; border-radius:9px; background:rgba(4,16,37,.5); }
html body #site-footer.site-footer .footer-copy { margin:18px 0 0 !important; color:#f7faff !important; text-align:center !important; }
html body #site-footer.site-footer .footer-top { margin:16px 0 0 !important; text-align:center !important; }
@media (max-width:700px) {
  html body #site-footer.site-footer .site-inner { width:calc(100% - 28px); }
  html body #site-footer.site-footer .footer-cats ul,
  html body #site-footer.site-footer .footer-pages ul { gap:7px 16px !important; }
  html body #site-footer.site-footer .footer-social { gap:8px !important; }
  html body #site-footer.site-footer .footer-social a { min-width:64px; min-height:42px; padding:8px 13px !important; }
}


/* Footer spacing: keep the same clear separation between category links,
   footer pages, and social buttons. */
html body #site-footer.site-footer .footer-pages {
  padding-top: 20px !important;
  padding-bottom: 0 !important;
}
html body #site-footer.site-footer .footer-social {
  margin-top: 36px !important;
}
@media (max-width: 700px) {
  html body #site-footer.site-footer .footer-pages { padding-top: 18px !important; }
  html body #site-footer.site-footer .footer-social { margin-top: 28px !important; }
}


/* Footer refinement: smaller navigation type and icon-only social links. */
html body #site-footer.site-footer .footer-cats,
html body #site-footer.site-footer .footer-pages { row-gap: 8px !important; }
html body #site-footer.site-footer .footer-cats ul,
html body #site-footer.site-footer .footer-pages ul { gap: 8px 22px !important; }
html body #site-footer.site-footer nav a {
  font-size: .88rem !important; font-weight: 500 !important;
  line-height: 1.45 !important; padding: 5px 0 !important;
}
html body #site-footer.site-footer .footer-pages {
  padding-top: 17px !important; padding-bottom: 0 !important;
}
html body #site-footer.site-footer .footer-social {
  /* Use padding instead of margin so the gap remains visible across themes. */
  margin: 0 auto !important;
  padding: 38px 0 22px !important;
  gap: 12px !important;
}
html body #site-footer.site-footer .footer-social a {
  box-sizing: border-box !important; width: 48px !important; min-width: 48px !important;
  height: 48px !important; min-height: 48px !important; padding: 10px !important;
  border: 2px solid #168cff !important; border-radius: 12px !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  color: #f7faff !important; font-size: 0 !important; line-height: 1 !important;
}
html body #site-footer.site-footer .footer-social a svg {
  display: block !important; width: 25px !important; height: 25px !important;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
html body #site-footer.site-footer .footer-social a:hover {
  background: #168cff !important; color: #fff !important;
}
html body #site-footer.site-footer .footer-copy {
  font-size: .88rem !important; line-height: 1.5 !important; font-weight: 400 !important;
}
html body #site-footer.site-footer .footer-top a {
  font-size: .9rem !important; font-weight: 500 !important;
}
@media (max-width: 600px) {
  html body #site-footer.site-footer .footer-cats ul,
  html body #site-footer.site-footer .footer-pages ul { gap: 7px 14px !important; }
  html body #site-footer.site-footer nav a { font-size: .82rem !important; }
  html body #site-footer.site-footer .footer-social {
    padding-top: 32px !important;
  }
  html body #site-footer.site-footer .footer-social a {
    width: 44px !important; min-width: 44px !important; height: 44px !important; min-height: 44px !important;
  }
  html body #site-footer.site-footer .footer-social a svg { width: 23px !important; height: 23px !important; }
  html body #site-footer.site-footer .footer-copy { font-size: .78rem !important; }
}


/* Final footer separation fix: keep social icons clearly below footer page links. */
html body #site-footer.site-footer nav.footer-pages {
  display: block !important;
  margin-bottom: 42px !important;
}
html body #site-footer.site-footer ul.footer-social {
  display: flex !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  clear: both !important;
}
@media (max-width: 700px) {
  html body #site-footer.site-footer nav.footer-pages {
    margin-bottom: 34px !important;
  }
}


/* HORAA MAGAZINE 3.2.4 — complete signature color system */
:root {
  --h-bg: #f7f2e9 !important;
  --h-surface: #fffaf2 !important;
  --h-ink: #10243b !important;
  --h-muted: #627489 !important;
  --h-line: #e4d9c8 !important;
  --h-accent: #087f8c !important;
  --h-accent-ink: #ffffff !important;
  --h-mark: #ff9d1c !important;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --h-bg: #071526 !important;
    --h-surface: #0c2136 !important;
    --h-ink: #eef7f7 !important;
    --h-muted: #a8bdca !important;
    --h-line: #1d4054 !important;
    --h-accent: #20bdc5 !important;
    --h-accent-ink: #061722 !important;
    --h-mark: #ff9d1c !important;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --h-bg: #071526 !important;
  --h-surface: #0c2136 !important;
  --h-ink: #eef7f7 !important;
  --h-muted: #a8bdca !important;
  --h-line: #1d4054 !important;
  --h-accent: #20bdc5 !important;
  --h-accent-ink: #061722 !important;
  --h-mark: #ff9d1c !important;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

body { background: var(--h-bg) !important; color: var(--h-ink) !important; }
.site-header, .primary-nav .sub-menu, .primary-nav .children,
.widget, .search-field, .search-form input, textarea, select {
  background-color: var(--h-surface) !important;
  color: var(--h-ink) !important;
  border-color: var(--h-line) !important;
}
h1, h2, h3, h4, .site-title a { color: var(--h-ink) !important; }
a { color: inherit; }
.primary-nav a:hover, .primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a, .primary-nav .current-cat > a {
  border-bottom-color: var(--h-mark) !important;
}
.search-form button, .more, .sec-head a, .post-meta .kicker,
.post-meta .kicker a, .pagination a:hover, .pagination .current {
  background-color: var(--h-accent);
  color: var(--h-accent-ink);
}
.more, .sec-head a, .post-meta .kicker, .post-meta .kicker a {
  background: transparent;
  color: var(--h-accent) !important;
}
.sec-head { border-bottom-color: var(--h-accent) !important; }
button, input[type="submit"], .wp-block-button__link {
  background-color: var(--h-accent);
  border-color: var(--h-accent);
  color: var(--h-accent-ink);
}
button:hover, input[type="submit"]:hover, .wp-block-button__link:hover {
  background-color: var(--h-mark);
  border-color: var(--h-mark);
  color: #10243b;
}
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible { outline-color: var(--h-mark) !important; }
::selection { background: #ffb54d !important; color: #10243b !important; }

/* Retain the deep navy signature footer in both theme modes. */
#site-footer, .site-footer {
  background: #071526 !important;
  color: #eef7f7 !important;
}
#site-footer a, .site-footer a { color: #eef7f7 !important; }
#site-footer a:hover, .site-footer a:hover { color: #ffb54d !important; }
#site-footer .footer-cats, #site-footer .footer-social {
  border-color: rgba(32,189,197,.4) !important;
}
#site-footer .footer-social a {
  border-color: #ff9d1c !important;
}

/* post titles: solid black in light mode */
.card h3 a, .rail h3 a, .cat h3 a, .lead h1 a, .entry h1, .hx-card h3 a { color: var(--h-title); }
.card h3 a:hover, .rail h3 a:hover, .cat h3 a:hover { color: var(--h-accent); }

/* v3.2.5: topic (tile), grid and side card titles were white (an old !important rule) on light cards. Force solid black in light mode, light in dark mode. */
.hx-card.hx-tile .hx-title, .hx-card.hx-tile .hx-title a,
.hx-card.hx-grid .hx-title, .hx-card.hx-grid .hx-title a,
.hx-card.hx-side .hx-title, .hx-card.hx-side .hx-title a { color: #000 !important; text-shadow: none !important; }
:root[data-theme="dark"] .hx-card.hx-tile .hx-title, :root[data-theme="dark"] .hx-card.hx-tile .hx-title a,
:root[data-theme="dark"] .hx-card.hx-grid .hx-title, :root[data-theme="dark"] .hx-card.hx-grid .hx-title a,
:root[data-theme="dark"] .hx-card.hx-side .hx-title, :root[data-theme="dark"] .hx-card.hx-side .hx-title a { color: #eef7f7 !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hx-card.hx-tile .hx-title, :root:not([data-theme="light"]) .hx-card.hx-tile .hx-title a,
  :root:not([data-theme="light"]) .hx-card.hx-grid .hx-title, :root:not([data-theme="light"]) .hx-card.hx-grid .hx-title a,
  :root:not([data-theme="light"]) .hx-card.hx-side .hx-title, :root:not([data-theme="light"]) .hx-card.hx-side .hx-title a { color: #eef7f7 !important; }
}
.hx-card.hx-tile .hx-title a:hover, .hx-card.hx-grid .hx-title a:hover, .hx-card.hx-side .hx-title a:hover { color: var(--h-accent) !important; }

/* v3.2.7: topic ticker band above the footer */
.h-ticker { margin-top: clamp(40px, 7vw, 80px); background: var(--h-mark); color: #0f1629; overflow: hidden; position: relative; padding-top: 18px; }
.h-ticker::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: repeating-linear-gradient(135deg, #0f1629 0 10px, transparent 10px 20px); opacity: .85; }
.h-tk-track { display: flex; width: max-content; direction: ltr; animation: h-tk-scroll 45s linear infinite; padding-top: 6px; }
.h-ticker:hover .h-tk-track { animation-play-state: paused; }
.h-tk-set { display: flex; align-items: center; flex: none; }
.h-tk-item a { font: 800 clamp(1.6rem, 4.5vw, 3rem)/1.1 var(--h-display); letter-spacing: -.02em; color: transparent; -webkit-text-stroke: 1.5px #0f1629; padding: 0 .35em; transition: color .2s; }
.h-tk-item a:hover { color: #0f1629; }
.h-tk-star { font-size: clamp(1.2rem, 3vw, 2rem); color: #0f1629; }
.h-tk-tag { margin: 0; padding: 12px 16px 16px; text-align: center; font: 700 .8rem var(--h-text); letter-spacing: .22em; text-transform: uppercase; color: #0f1629; }
.h-tk-tag b { margin-inline: .6em; }
@keyframes h-tk-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .h-tk-track { animation: none; } }
html body #site-footer.site-footer { margin-top: 0 !important; }
@media print { .h-ticker { display: none !important; } }

/* v3.2.8: tighter space between the newsletter box and the yellow band */
html body .site-main { padding-bottom: 20px !important; }
html body .h-ticker { margin-top: 20px !important; }
.subscribe-note a, .newsletter .subscribe-note a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; position: relative; z-index: 2; }


/* ---------- logo (v3.2.10) ---------- */
.site-branding { display: flex; align-items: center; min-width: 0; }
.site-branding.has-logo .site-description { display: none; }
.h-logo { display: inline-flex; align-items: center; line-height: 0; border-bottom: 0; }
.h-logo--header .custom-logo { width: 52px; height: 52px; max-width: none; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%; border: 2px solid var(--h-line); box-shadow: 0 2px 10px rgba(16,36,59,.12); }
.h-logo--header { transition: opacity .2s ease; }
.h-logo--header:hover { opacity: .85; }
.h-logo--header:focus-visible { outline: 2px solid var(--h-accent); outline-offset: 4px; border-radius: 6px; }
.h-logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .has-dark-logo .h-logo-img:not(.h-logo-dark) { display: none; }
  :root:not([data-theme="light"]) .has-dark-logo .h-logo-dark { display: block !important; }
}
:root[data-theme="dark"] .has-dark-logo .h-logo-img:not(.h-logo-dark) { display: none; }
:root[data-theme="dark"] .has-dark-logo .h-logo-dark { display: block !important; }
.site-header .site-inner { padding-block: 10px; }
@media (max-width: 860px) { .h-logo--header .custom-logo { width: 44px; height: 44px; } }

/* ==========================================================
   HORAA MAGAZINE 4.0 — premium editorial refinement
   Additive overrides: original templates and settings retained.
   ========================================================== */
:root {
  --h-bg: #f5f4f0 !important;
  --h-surface: #ffffff !important;
  --h-ink: #17283b !important;
  --h-title: #101b2b !important;
  --h-muted: #667487 !important;
  --h-line: #e3e7ec !important;
  --h-accent: #087f8c !important;
  --h-accent-ink: #ffffff !important;
  --h-mark: #f2a541 !important;
  --h-radius: 16px;
}
:root[data-theme="dark"] {
  --h-bg: #081522 !important;
  --h-surface: #102235 !important;
  --h-ink: #e9f0f7 !important;
  --h-title: #f5f8fc !important;
  --h-muted: #a9bacb !important;
  --h-line: #263d52 !important;
  --h-accent: #35bac0 !important;
  --h-accent-ink: #06151e !important;
  --h-mark: #f2b45e !important;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --h-bg: #081522 !important;
    --h-surface: #102235 !important;
    --h-ink: #e9f0f7 !important;
    --h-title: #f5f8fc !important;
    --h-muted: #a9bacb !important;
    --h-line: #263d52 !important;
    --h-accent: #35bac0 !important;
    --h-accent-ink: #06151e !important;
    --h-mark: #f2b45e !important;
    color-scheme: dark;
  }
}
body { line-height: 1.68; -webkit-font-smoothing: antialiased; }
.site-inner, .wrap, .content-wrap.wide { max-width: 1320px; }
.site-header { background: color-mix(in srgb, var(--h-surface) 94%, transparent); backdrop-filter: blur(14px); box-shadow: 0 4px 24px rgba(15,35,55,.045); }
.site-header .site-inner { padding-top: 13px; padding-bottom: 13px; }
.header-row { gap: 14px 32px; }
.site-title { font-size: clamp(1.35rem, 2vw, 1.7rem); }
.primary-nav { gap: 24px; }
.primary-nav ul { gap: 7px 24px; }
.primary-nav a { font-size: .92rem; font-weight: 600; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current_page_item > a { color: var(--h-accent); }
.icon-btn { width: 42px; height: 42px; border-radius: 13px; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.icon-btn:hover { transform: translateY(-1px); border-color: var(--h-accent); }
.site-main { padding-top: clamp(28px, 4vw, 52px); }
.wrap { gap: clamp(42px, 5vw, 72px); }
.sec-head { border-bottom-width: 1px; border-color: var(--h-line); position: relative; margin-bottom: 26px; }
.sec-head::after { content: ""; position: absolute; bottom: -1px; inset-inline-start: 0; width: 64px; height: 3px; background: var(--h-mark); border-radius: 4px; }
.sec-head h1, .sec-head h2 { letter-spacing: -.035em; }
.lead { gap: 16px; }
.lead .thumb { border-radius: 18px; }
.lead h1 { letter-spacing: -.045em; line-height: 1.08; }
.rail { gap: 22px; }
.rail article { gap: 17px; padding-bottom: 22px; }
.rail .thumb, .card .thumb { border-radius: 13px; }
.card { gap: 12px; }
.card h3 { line-height: 1.28; letter-spacing: -.018em; }
.card p { font-size: .94rem; line-height: 1.65; }
.card-media { background: var(--h-line); }
.card .thumb { transition: transform .45s cubic-bezier(.2,.7,.2,1), filter .35s ease; }
.card:hover .thumb { transform: scale(1.035); filter: saturate(1.06); }
.chips a { border-radius: 999px; border: 1px solid var(--h-line); background: var(--h-surface); font-size: .9rem; font-weight: 600; }
.chips a:hover { border-color: var(--h-accent); background: var(--h-accent); color: var(--h-accent-ink); }
.entry { border-radius: 20px; border-color: var(--h-line); box-shadow: 0 14px 48px rgba(20,38,58,.055); padding: clamp(22px, 5vw, 58px); }
.entry h1 { letter-spacing: -.045em; line-height: 1.08; }
.entry-featured img { border-radius: 16px; }
.entry-content { font-size: clamp(1.03rem, 1.15vw, 1.13rem); line-height: 1.88; }
.entry-content h2 { font-size: clamp(1.55rem, 2.8vw, 2.05rem); letter-spacing: -.035em; }
.entry-content h3 { font-size: 1.3rem; }
.entry-content blockquote { padding: 18px 22px; border-inline-start: 4px solid var(--h-mark); background: var(--h-bg); border-radius: 0 14px 14px 0; }
[dir="rtl"] .entry-content blockquote { border-radius: 14px 0 0 14px; }
.entry-content img { border-radius: 14px; }
.post-meta { gap: 6px 14px; }
.post-meta .kicker, .post-meta .kicker a { letter-spacing: .08em; }
.author-box { padding: 24px; background: var(--h-bg); border: 1px solid var(--h-line); border-radius: 16px; }
.author-box img { border-radius: 50%; }
.pagination a, .pagination span { border-radius: 10px; }
.site-footer { margin-top: 64px !important; padding: 54px 0 34px !important; background: #071526 !important; color: #eef5fb !important; }
#site-footer .site-inner { max-width: 1240px !important; }
#site-footer .footer-cats { padding-bottom: 24px !important; border-color: rgba(255,255,255,.13) !important; }
#site-footer .footer-cats ul { gap: 10px 26px !important; }
#site-footer .footer-pages { margin: 0 !important; padding: 24px 0 0 !important; }
#site-footer .footer-pages ul { gap: 10px 24px !important; }
#site-footer .footer-social { margin: 0 auto !important; padding: 30px 0 24px !important; gap: 12px !important; border-color: rgba(255,255,255,.13) !important; }
#site-footer .footer-social a { width: 46px !important; min-width: 46px !important; height: 46px !important; min-height: 46px !important; border: 1px solid rgba(255,255,255,.28) !important; border-radius: 14px !important; background: rgba(255,255,255,.06) !important; }
#site-footer .footer-social a:hover { background: var(--h-accent) !important; border-color: var(--h-accent) !important; color: #fff !important; transform: translateY(-2px); }
#site-footer .footer-copy { color: #b9c7d4 !important; }
#site-footer .footer-top a { color: #f2b45e !important; }
.h-ticker { border-block: 1px solid var(--h-line); }
button, input, textarea, select { font: inherit; }
:where(a, button, input, textarea, select):focus-visible { outline: 3px solid var(--h-mark); outline-offset: 3px; }

/* In-article contents navigation, created only when an article has enough headings. */
.article-toc { margin: 0 0 30px; padding: 20px 22px; border: 1px solid var(--h-line); border-radius: 16px; background: var(--h-bg); }
.article-toc[hidden] { display: none !important; }
.article-toc__title { margin: 0 0 10px; font: 700 1.05rem var(--h-display); color: var(--h-title); }
.article-toc ol { margin: 0; padding-inline-start: 1.25rem; display: grid; gap: 7px; }
.article-toc a { color: var(--h-accent); font-size: .94rem; font-weight: 600; text-decoration: none; }
.article-toc a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 860px) {
  .site-header .site-inner { padding: 12px 16px; }
  .header-row { gap: 10px; }
  .primary-nav { padding: 12px 2px 4px; gap: 14px; }
  .primary-nav ul { gap: 0; }
  .primary-nav li > a { padding: 11px 2px; }
  .site-main { padding-block: 28px 52px; }
  .top { gap: 24px; }
}
@media (max-width: 700px) {
  .wrap { gap: 42px; }
  .top { grid-template-columns: 1fr; }
  .lead h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .rail { padding: 0; }
  .latest-grid, .cat-grid, .content-wrap .related .latest-grid { gap: 26px 18px; }
  .entry { padding: 22px 18px; border-radius: 15px; }
  .entry h1 { font-size: clamp(1.85rem, 8vw, 2.55rem); }
  .entry-content { font-size: 1.02rem; line-height: 1.82; }
  .author-box { align-items: flex-start; padding: 18px; }
  .site-footer { margin-top: 44px !important; padding: 40px 0 28px !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
