/*
Theme Name:   Antigua Post
Description:  Antigua Post design on GeneratePress (child theme). Built step by step - see UI-UX/antigua-post-design/STATUS.md.
Template:     generatepress
Version:      0.11.3
Text Domain:  antiguapost-gp
*/

/* ==========================================================================
   Step 1 - Global styles: colours, fonts, light / dark
   ========================================================================== */

:root {
	--ap-accent: #a0002a;      /* brand red */
	--ap-accent-ink: #a0002a;  /* red used for text/links (lighter in dark mode) */
	--ap-ink: #212121;         /* main text */
	--ap-meta: #5f5f5f;        /* dates, captions (4.5:1 on white) */
	--ap-bg: #ffffff;
	--ap-soft: #f5f5f5;        /* grey bands */
	--ap-card: #ffffff;
	--ap-line: #eeeeee;
	--ap-font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	--ap-font-head: "Roboto Slab", Georgia, "Times New Roman", serif;
	color-scheme: light;
}

/* Dark: follows the device setting, unless the reader picked a mode with the toggle */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--ap-accent-ink: #ff6f8a;
		--ap-ink: #ededed;
		--ap-meta: #a9a9a9;
		--ap-bg: #121212;
		--ap-soft: #1d1d1d;
		--ap-card: #1a1a1a;
		--ap-line: #2e2e2e;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--ap-accent-ink: #ff6f8a;
	--ap-ink: #ededed;
	--ap-meta: #a9a9a9;
	--ap-bg: #121212;
	--ap-soft: #1d1d1d;
	--ap-card: #1a1a1a;
	--ap-line: #2e2e2e;
	color-scheme: dark;
}

/* Base */
body {
	background: var(--ap-bg);
	color: var(--ap-ink);
	font-family: var(--ap-font);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6,
.entry-title, .page-title, .widget-title {
	font-family: var(--ap-font-head);
	font-weight: 700;
	color: var(--ap-ink);
	line-height: 1.25;
	letter-spacing: -0.01em;
}
h1, .entry-title { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: clamp(18px, 2vw, 22px); }

a { color: var(--ap-accent-ink); }
a:hover, a:focus { color: var(--ap-ink); }
/* Links inside articles: brand red + underline (GeneratePress's own link colour is overridden) */
.entry-content a, .page-content a, .comment-content a {
	color: var(--ap-accent-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.entry-content a:hover, .page-content a:hover { color: var(--ap-ink); }
:focus-visible { outline: 3px solid var(--ap-accent-ink); outline-offset: 2px; }

/* GeneratePress surfaces follow the tokens (so dark mode works everywhere) */
.site, .site-content, .site-header, .site-footer, .footer-widgets, .site-info,
.inside-article, .comments-area, .page-header, .sidebar .widget,
.separate-containers .inside-article, .separate-containers .comments-area,
.separate-containers .page-header, .separate-containers .paging-navigation,
.one-container .site-content, .main-navigation, .main-navigation ul ul {
	background-color: var(--ap-bg);
	color: var(--ap-ink);
}
.separate-containers .inside-article, .sidebar .widget { background-color: var(--ap-card); }
.entry-meta, .entry-meta a, .posted-on, .byline, .cat-links, .tags-links,
.comments-link, .site-info, .wp-caption-text, figcaption {
	color: var(--ap-meta);
}
hr, .entry-content hr { border-color: var(--ap-line); }

/* Buttons */
button, .button, input[type="submit"], .wp-block-button__link {
	background: var(--ap-accent);
	color: #fff;
	border-radius: 4px;
	font-family: var(--ap-font);
	font-weight: 500;
}
button:hover, .button:hover, input[type="submit"]:hover, .wp-block-button__link:hover {
	background: var(--ap-ink);
	color: var(--ap-bg);
}

/* Forms (contact page, search) */
input[type="text"], input[type="email"], input[type="search"], input[type="url"], textarea, select {
	background: var(--ap-bg);
	color: var(--ap-ink);
	border: 1px solid var(--ap-line);
	border-radius: 4px;
}

/* Comfortable reading on phones: no horizontal scroll, 16px side gutter */
html, body { overflow-x: clip; }
@media (max-width: 768px) {
	body { font-size: 16px; }
	.inside-article, .site-content { padding-left: 16px; padding-right: 16px; }
}

/* Never show ads in this design */
.ap-ad, .adsbygoogle { display: none !important; }

/* ==========================================================================
   Steps 2 + 3 - Top bar and header
   ========================================================================== */
.ap-container { max-width: 1240px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

.ap-topbar { background: var(--ap-soft); border-bottom: 1px solid var(--ap-line); font-size: 13px; color: var(--ap-meta); }
.ap-topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 36px; }
.ap-topbar__weather { display: inline-flex; align-items: center; gap: 6px; }

.ap-header { background: var(--ap-bg); border-bottom: 1px solid var(--ap-line); position: sticky; top: 0; z-index: 50; }
.admin-bar .ap-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ap-header { top: 0; } }
.ap-header__bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 76px; }
.ap-header__end { display: flex; justify-content: flex-end; gap: 4px; }
.ap-logo { display: inline-flex; align-items: center; }
.ap-logo img { height: 40px; width: auto; display: block; }
.ap-logo__dark { display: none !important; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .ap-logo__light { display: none !important; }
	:root:not([data-theme="light"]) .ap-logo__dark { display: block !important; }
}
:root[data-theme="dark"] .ap-logo__light { display: none !important; }
:root[data-theme="dark"] .ap-logo__dark { display: block !important; }

.ap-icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--ap-ink); border: 0; border-radius: 8px; padding: 0; cursor: pointer; }
.ap-icon-btn:hover { background: var(--ap-soft); color: var(--ap-ink); }
.ap-menu-btn { display: none; }
.ap-ico-close, .ap-ico-moon { display: none; }
.ap-menu-btn[aria-expanded="true"] .ap-ico-open { display: none; }
.ap-menu-btn[aria-expanded="true"] .ap-ico-close { display: inline-flex; }
/* show the moon in light mode, the sun in dark mode */
.ap-ico-moon { display: inline-flex; }
.ap-ico-sun { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .ap-ico-moon { display: none; }
	:root:not([data-theme="light"]) .ap-ico-sun { display: inline-flex; }
}
:root[data-theme="dark"] .ap-ico-moon { display: none; }
:root[data-theme="dark"] .ap-ico-sun { display: inline-flex; }

.ap-nav { border-top: 1px solid var(--ap-line); }
.ap-nav__list { list-style: none; margin: 0 auto; display: flex; justify-content: center; flex-wrap: wrap; }
.ap-nav__list a { display: flex; align-items: center; height: 48px; padding: 0 14px; font-size: 15px; font-weight: 500; color: var(--ap-ink); text-decoration: none; border-bottom: 3px solid transparent; }
.ap-nav__list a:hover { color: var(--ap-accent-ink); }
.ap-nav__list a[aria-current="page"] { border-bottom-color: var(--ap-accent); }

.ap-search { border-top: 1px solid var(--ap-line); background: var(--ap-bg); }
.ap-search__inner { display: flex; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
.ap-search input[type="search"] { flex: 1; min-height: 44px; padding: 0 14px; font-size: 16px; }
.ap-search button { min-height: 44px; padding: 0 18px; }

@media (max-width: 768px) {
	.ap-container { padding: 0 16px; }
	.ap-topbar__inner { min-height: 32px; font-size: 12px; }
	.ap-header__bar { min-height: 60px; }
	.ap-logo img { height: 30px; }
	.ap-menu-btn { display: inline-flex; margin-left: -10px; }
	.ap-nav { display: none; }
	.ap-nav.is-open { display: block; }
	.ap-nav__list { flex-direction: column; padding: 4px 16px 12px; }
	.ap-nav__list a { height: 48px; padding: 0; border-bottom: 1px solid var(--ap-line); }
	.ap-nav__list a[aria-current="page"] { color: var(--ap-accent-ink); border-bottom-color: var(--ap-line); }
}

/* ==========================================================================
   Step 4 - Footer (always dark, like the design)
   ========================================================================== */
.ap-footer { background: #111111; color: #ededed; margin-top: 64px; font-size: 15px; }
.ap-footer a { color: #ededed; text-decoration: none; }
.ap-footer a:hover { color: #ff6f8a; text-decoration: underline; }
.ap-footer__grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 40px 64px; padding-top: 56px; padding-bottom: 40px; }
.ap-footer__logo img { height: 34px; width: auto; }
.ap-footer__brand p, .ap-footer__brand address { color: #b5b5b5; font-style: normal; line-height: 1.6; margin: 16px 0 0; max-width: 36ch; }
.ap-footer__col h2 { font-family: var(--ap-font); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #b5b5b5; margin: 0 0 8px; }
.ap-footer__col ul { list-style: none; margin: 0; padding: 0; }
.ap-footer__col a { display: flex; align-items: center; min-height: 40px; }
.ap-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid #2e2e2e; font-size: 13px; color: #b5b5b5; }
.ap-footer__bottom a { color: #b5b5b5; min-height: 24px; }
@media (max-width: 768px) {
	.ap-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; padding-top: 40px; }
	.ap-footer__brand { grid-column: 1 / -1; }
}

/* ==========================================================================
   Step 5 - Homepage and cards
   ========================================================================== */
/* The homepage uses the full width (our own containers inside) */
.ap-wide .site.grid-container, .ap-wide .site-content { max-width: none; padding: 0; display: block; background: var(--ap-bg); }
.ap-home { display: flex; flex-direction: column; gap: 56px; padding-top: 28px; }

/* Cards */
.ap-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ap-card__media { display: block; overflow: hidden; border-radius: 4px; background: var(--ap-soft); aspect-ratio: 16 / 10; }
.ap-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.ap-card:hover .ap-card__media img { transform: scale(1.03); }
.ap-card__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ap-card__kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ap-accent-ink); text-decoration: none; }
.ap-card__title { margin: 0; font-size: 19px; line-height: 1.3; }
.ap-card__title a { color: var(--ap-ink); text-decoration: none; }
.ap-card__title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ap-card__summary { margin: 0; color: var(--ap-meta); font-size: 15px; line-height: 1.55; }
.ap-card__meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--ap-meta); }
.ap-card--hero .ap-card__title { font-size: clamp(26px, 3.2vw, 40px); line-height: 1.15; }
.ap-card--hero .ap-card__summary { font-size: 17px; }
.ap-card--large .ap-card__title { font-size: clamp(22px, 2.2vw, 28px); }
.ap-card--small .ap-card__title { font-size: 17px; }
.ap-card--list { flex-direction: row; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--ap-line); }
.ap-card--list .ap-card__media { flex: 0 0 120px; aspect-ratio: 4 / 3; }
.ap-card--list .ap-card__title { font-size: 16px; }
.ap-card--text { padding: 20px; border: 1px solid var(--ap-line); border-radius: 4px; background: var(--ap-card); }
.ap-card--text .ap-card__title { font-size: 20px; }

/* Sections */
.ap-section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 3px solid var(--ap-ink); padding-top: 12px; margin-bottom: 20px; }
.ap-section__title { margin: 0; display: flex; align-items: center; gap: 10px; font-size: clamp(22px, 2.4vw, 28px); }
.ap-section__more { font-size: 15px; font-weight: 500; color: var(--ap-accent-ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.ap-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ap-accent); }

/* Top stories */
.ap-top { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 32px; }
.ap-top__list { display: flex; flex-direction: column; }
.ap-top__list .ap-card--list:first-child { padding-top: 0; }

/* Latest + aside */
.ap-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.ap-latest__list { list-style: none; margin: 0; padding: 0; }
.ap-latest__list li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--ap-line); }
.ap-latest__list time { font-size: 13px; color: var(--ap-meta); line-height: 22px; }
.ap-latest__list div { display: flex; flex-direction: column; gap: 4px; }
.ap-latest__title { font-family: var(--ap-font-head); font-weight: 700; font-size: 18px; line-height: 1.35; color: var(--ap-ink); text-decoration: none; }
.ap-latest__title:hover { text-decoration: underline; }
.ap-button-outline { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; margin-top: 20px; border: 1px solid var(--ap-ink); border-radius: 4px; color: var(--ap-ink); text-decoration: none; font-weight: 500; }
.ap-button-outline:hover { background: var(--ap-ink); color: var(--ap-bg); }

/* Grids */
.ap-grid-lead { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; }
.ap-grid-4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; align-content: start; }
.ap-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ap-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }

/* Sport band: brand dark, not a different colour (design review) */
.ap-band { background: #161616; padding: 8px 0 40px; }
.ap-band, .ap-band .ap-card__title a, .ap-band .ap-section__title { color: #ffffff; }
.ap-band .ap-section__head { border-top-color: var(--ap-accent); }
.ap-band .ap-card__kicker, .ap-band .ap-section__more { color: #ff6f8a; }
.ap-band .ap-card__meta, .ap-band .ap-card__summary { color: #b5b5b5; }
.ap-band .ap-card__media { background: #222; }

@media (max-width: 960px) {
	.ap-top, .ap-split, .ap-grid-lead, .ap-pair { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.ap-grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
	.ap-home { gap: 40px; padding-top: 16px; }
	.ap-grid-4 { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.ap-grid-4 .ap-card--small { flex-direction: row; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--ap-line); }
	.ap-grid-4 .ap-card--small .ap-card__media { flex: 0 0 120px; aspect-ratio: 4 / 3; }
	.ap-band .ap-grid-4 .ap-card--small { border-bottom-color: #2e2e2e; }
	.ap-card--list .ap-card__media { flex-basis: 104px; }
	.ap-latest__list li { grid-template-columns: 1fr; gap: 4px; }
}

/* ==========================================================================
   Step 6 - Article page
   ========================================================================== */
.ap-article-page { padding-top: 20px; }
.ap-breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ap-meta); margin-bottom: 8px; }
.ap-breadcrumb a { color: var(--ap-meta); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.ap-breadcrumb a:hover { color: var(--ap-ink); }
.ap-article { max-width: 840px; }
.ap-article__header { display: flex; flex-direction: column; gap: 14px; }
.ap-article__kicker { align-self: flex-start; border-bottom: 2px solid var(--ap-accent-ink); padding-bottom: 2px; }
.ap-article__title { margin: 0; font-size: clamp(30px, 4.2vw, 46px); line-height: 1.12; letter-spacing: -0.02em; }
.ap-article__meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--ap-line); border-bottom: 1px solid var(--ap-line); }
.ap-article__info { display: flex; flex-direction: column; gap: 2px; }
.ap-article__byline { font-weight: 500; }
.ap-article__facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--ap-meta); }
.ap-share { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-share__btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--ap-line); border-radius: 20px; background: transparent; color: var(--ap-ink); font: 500 14px var(--ap-font); text-decoration: none; cursor: pointer; }
.ap-share__btn:hover { border-color: var(--ap-ink); background: transparent; color: var(--ap-ink); }
.ap-article__image { margin: 24px 0 8px; }
.ap-article__image img { width: 100%; height: auto; max-height: 70vh; object-fit: cover; object-position: center 20%; border-radius: 4px; display: block; }
.ap-article__image figcaption { font-size: 14px; color: var(--ap-meta); margin-top: 8px; }
.ap-prose { max-width: 680px; font-size: 19px; line-height: 1.7; margin-top: 24px; }
.ap-prose p { margin: 0 0 1.2em; }
.ap-prose h2 { font-size: 26px; margin: 1.6em 0 .6em; }
.ap-prose h3 { font-size: 21px; margin: 1.4em 0 .5em; }
.ap-prose img, .ap-prose iframe, .ap-prose video { max-width: 100%; height: auto; }
.ap-prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--ap-accent); font-family: var(--ap-font-head); font-size: 22px; line-height: 1.45; }
.ap-prevnext { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 40px; }
.ap-prevnext a { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--ap-line); border-radius: 4px; text-decoration: none; color: var(--ap-ink); }
.ap-prevnext a:hover { border-color: var(--ap-ink); }
.ap-prevnext span { font-size: 13px; color: var(--ap-meta); }
.ap-prevnext strong { font-family: var(--ap-font-head); font-size: 17px; line-height: 1.35; }
.ap-prevnext__next { text-align: right; }
.ap-related { margin-top: 64px; }
.ap-grid-related { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; }
@media (max-width: 960px) { .ap-grid-related { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) {
	.ap-prose { font-size: 17px; }
	.ap-article__meta { flex-direction: column; align-items: flex-start; }
	.ap-grid-related { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.ap-grid-related .ap-card--small { flex-direction: row; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--ap-line); }
	.ap-grid-related .ap-card--small .ap-card__media { flex: 0 0 120px; aspect-ratio: 4 / 3; }
}

/* ==========================================================================
   Step 7 - Sections, search, 404
   ========================================================================== */
.ap-archive { padding-top: 28px; }
.ap-archive__header { display: flex; flex-direction: column; gap: 10px; border-bottom: 3px solid var(--ap-ink); padding-bottom: 16px; margin-bottom: 28px; }
.ap-archive__title { margin: 0; font-size: clamp(32px, 4.5vw, 48px); }
.ap-archive__count, .ap-archive__desc { margin: 0; color: var(--ap-meta); }
.ap-archive__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
.ap-archive__lead { grid-column: 1 / -1; }
.ap-archive__lead .ap-card--hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.ap-search-inline { display: flex; gap: 8px; max-width: 560px; }
.ap-search-inline input[type="search"] { flex: 1; min-height: 44px; padding: 0 14px; font-size: 16px; }
.ap-search-inline button { min-height: 44px; padding: 0 18px; }
.ap-search-results { max-width: 820px; }
.ap-empty h2 { margin: 0 0 8px; }
.ap-chips { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ap-chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--ap-line); border-radius: 22px; color: var(--ap-ink); text-decoration: none; }
.ap-chips a:hover { border-color: var(--ap-ink); }
.ap-pagination { margin-top: 40px; }
.ap-pagination ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ap-pagination a, .ap-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--ap-line); border-radius: 4px; color: var(--ap-ink); text-decoration: none; }
.ap-pagination .current { background: var(--ap-ink); color: var(--ap-bg); border-color: var(--ap-ink); }
.ap-404 .ap-archive__header { border-bottom: 0; }
@media (max-width: 960px) { .ap-archive__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ap-archive__lead .ap-card--hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 768px) {
	.ap-archive__grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.ap-archive__grid > .ap-card--small { flex-direction: row; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--ap-line); }
	.ap-archive__grid > .ap-card--small .ap-card__media { flex: 0 0 120px; aspect-ratio: 4 / 3; }
	.ap-archive__lead { padding-bottom: 16px; border-bottom: 1px solid var(--ap-line); }
}

/* ==========================================================================
   Step 8 - Static pages + contact form
   ========================================================================== */
.ap-page { padding-top: 28px; }
.ap-page .ap-prose { margin-top: 0; }
.ap-prose ul, .ap-prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.ap-prose li { margin-bottom: .4em; }
.ap-prose address { font-style: normal; }
.wpcf7 form { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.wpcf7 label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 15px; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 textarea { width: 100%; min-height: 44px; padding: 10px 14px; font-size: 16px; box-sizing: border-box; }
.wpcf7 textarea { min-height: 160px; }
.wpcf7 input[type="submit"] { align-self: flex-start; min-height: 44px; padding: 0 24px; cursor: pointer; }
.wpcf7-not-valid-tip { color: var(--ap-accent-ink); font-size: 14px; }
.wpcf7 form .wpcf7-response-output { margin: 0; padding: 12px 14px; border-radius: 4px; }

/* Step 9 - Most read */
.ap-mostread { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.ap-mostread li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--ap-line); }
.ap-mostread__n { font-family: var(--ap-font-head); font-size: 30px; line-height: 1; color: var(--ap-accent-ink); font-weight: 700; }
.ap-mostread a { font-family: var(--ap-font-head); font-weight: 700; font-size: 17px; line-height: 1.35; color: var(--ap-ink); text-decoration: none; }
.ap-mostread a:hover { text-decoration: underline; }

/* Language switcher in the top bar (GTranslate's floating box is hidden in this design) */
.gtranslate_wrapper .gt_float_switcher { display: none !important; }
.ap-topbar__end { display: flex; align-items: center; gap: 14px; }
.ap-lang { display: inline-flex; border: 1px solid var(--ap-line); border-radius: 999px; padding: 2px; }
.ap-lang button { min-width: 36px; min-height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--ap-meta); font: 600 12px var(--ap-font); cursor: pointer; }
.ap-lang button[aria-pressed="true"] { background: var(--ap-ink); color: var(--ap-bg); }
.ap-lang button:hover { color: var(--ap-ink); }
.ap-lang button[aria-pressed="true"]:hover { color: var(--ap-bg); }
@media (max-width: 480px) { .ap-topbar__weather span { display: none; } .ap-topbar__end { gap: 8px; } }

/* Language switcher on phones: thumb-sized buttons, always visible in the top bar */
@media (max-width: 768px) {
	.ap-topbar__inner { min-height: 48px; }
	.ap-lang { padding: 3px; }
	.ap-lang button { min-width: 44px; min-height: 38px; font-size: 13px; }
}

/* 404 illustration (inline SVG, follows light/dark) */
.ap-404__hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 40px; align-items: center; margin-bottom: 8px; }
.ap-404__hero .ap-archive__header { margin-bottom: 0; }
.ap-404__art { max-width: 420px; width: 100%; justify-self: center; }
.ap-404__svg { width: 100%; height: auto; display: block; }
@media (max-width: 768px) { .ap-404__hero { grid-template-columns: minmax(0, 1fr); gap: 16px; } .ap-404__art { order: -1; max-width: 300px; } }
.a4-soft { fill: var(--ap-soft); }
.a4-sun { fill: #f2b233; }
.a4-sea { fill: var(--ap-accent); opacity: .18; }
.a4-paper { fill: var(--ap-card); stroke: var(--ap-line); stroke-width: 2; }
.a4-ink { fill: var(--ap-ink); }
.a4-line { fill: var(--ap-line); }
.a4-headline { font: 700 68px var(--ap-font-head); fill: var(--ap-accent-ink); }
.a4-glass { fill: none; stroke: var(--ap-ink); stroke-width: 10; stroke-linecap: round; }
.a4-lens { fill: var(--ap-accent); opacity: .12; }

/* Latest-headlines ticker (pauses on hover/focus; static and swipeable if the reader prefers less motion) */
.ap-ticker { background: var(--ap-soft); border-bottom: 1px solid var(--ap-line); }
.ap-ticker__inner { display: flex; align-items: center; gap: 14px; min-height: 42px; }
.ap-ticker__label { flex: none; display: inline-flex; align-items: center; gap: 8px; font: 700 12px var(--ap-font); letter-spacing: .08em; text-transform: uppercase; color: var(--ap-accent-ink); }
.ap-ticker__viewport { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.ap-ticker__track { display: flex; width: max-content; margin: 0; padding: 0; list-style: none; animation: ap-ticker var(--ap-ticker-time, 70s) linear infinite; }
.ap-ticker__viewport:hover .ap-ticker__track, .ap-ticker__viewport:focus-within .ap-ticker__track { animation-play-state: paused; }
.ap-ticker__track li { display: flex; align-items: center; white-space: nowrap; }
.ap-ticker__track li::after { content: ""; width: 4px; height: 4px; margin: 0 18px; border-radius: 50%; background: var(--ap-meta); }
.ap-ticker__track a { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; color: var(--ap-ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.ap-ticker__track a:hover { color: var(--ap-accent-ink); text-decoration: underline; }
.ap-ticker__track time { color: var(--ap-meta); font-size: 13px; font-variant-numeric: tabular-nums; }
@keyframes ap-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.ap-ticker__viewport { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
	.ap-ticker__track { animation: none; }
	.ap-ticker__track li[aria-hidden="true"] { display: none; }
}
@media (max-width: 768px) {
	.ap-ticker__label { font-size: 11px; }
	.ap-ticker__track a { font-size: 13px; }
}
/* Ticker in right-to-left (Arabic): scroll the other way */
[dir="rtl"] .ap-ticker__track, .translated-rtl .ap-ticker__track { animation-name: ap-ticker-rtl; }
@keyframes ap-ticker-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* Static pages: one centred reading column (title, rule and text line up; no empty half on wide screens) */
.ap-page__article { max-width: 760px; margin: 0 auto; }
.ap-page .ap-prose { max-width: none; }
.ap-page .ap-prose h2 { margin-top: 1.6em; }

/* Top-bar date: full on wide screens, short on phones (never wraps) */
.ap-topbar__date { white-space: nowrap; }
.ap-date-short { display: none; }
@media (max-width: 600px) { .ap-date-long { display: none; } .ap-date-short { display: inline; } }

/* Sticky header: always flush at the top (JS sets the exact offset under the admin toolbar, if any),
   one-line menu on desktop, and a compact logo row once the reader scrolls */
.ap-header { transition: box-shadow .2s; }
.ap-header__bar, .ap-logo img { transition: min-height .2s, height .2s; }
.ap-header.is-compact { box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.ap-header.is-compact .ap-header__bar { min-height: 52px; }
.ap-header.is-compact .ap-logo img { height: 28px; }
@media (min-width: 769px) {
	.ap-nav__list { flex-wrap: nowrap; }
	.ap-nav__list > li { flex: none; }
	.ap-nav__list a, .ap-nav__more-btn { white-space: nowrap; }
}
@media (min-width: 769px) and (max-width: 1300px) {
	.ap-nav__list a, .ap-nav__more-btn { padding: 0 10px; font-size: 14px; }
}
