/*
Theme Name:   adpapa Child
Theme URI:    https://adpapa.com.au/
Description:  Magazine-style child theme of Insider for adpapa: date bar, masthead and section bar, top stories with a Latest feed, Most read band, category sections, news-style articles with share links and author box.
Author:       adpapa
Template:     insider
Version:      1.1.2
License:      GNU General Public License v2 or later
Text Domain:  adpapa-child
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
	--ap-ink: #16181d;
	--ap-ink-2: #3a3d45;
	--ap-muted: #5f636b;
	--ap-paper: #fbfaf7;
	--ap-panel: #f2f0ea;
	--ap-rule: #e2dfd7;
	--ap-accent: #0b6e4f;      /* eucalyptus */
	--ap-accent-dark: #08533b;
	--ap-gold: #e3a72f;        /* wattle */
	--ap-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--ap-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--ap-max: 1240px;
	--ap-gap: 28px;
}

/* Re-point Insider's own variables */
body.adpapa {
	--bg-color: var(--ap-paper);
	--text-color: var(--ap-ink);
	--accent-color: var(--ap-accent);
	background: var(--ap-paper);
	color: var(--ap-ink);
	font-family: var(--ap-sans);
	font-size: 17px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

/* Insider's fonts (inline CSS) -> ours */
html body.adpapa, html body.adpapa input, html body.adpapa textarea, html body.adpapa select, html body.adpapa button,
html body.adpapa h1, html body.adpapa h2, html body.adpapa h3, html body.adpapa h4, html body.adpapa h5, html body.adpapa h6 {
	font-family: var(--ap-sans);
}
html body.adpapa blockquote, html body.adpapa em,
html body.adpapa .entry-header h2, html body.adpapa .entry-content > p, html body.adpapa .entry-content li,
html body.adpapa .ap-card__title, html body.adpapa .entry-content h2, html body.adpapa .entry-content h3 {
	font-family: var(--ap-serif);
}

/* No fade-in wait: show header and content immediately (better LCP) */
body.adpapa.loading main#content, body.adpapa.loading #header,
body.adpapa #header, body.adpapa main#content { opacity: 1 !important; transform: none !important; }

body.adpapa a { color: inherit; }
body.adpapa a:focus-visible, body.adpapa button:focus-visible { outline: 3px solid var(--ap-gold); outline-offset: 2px; }

body.adpapa #wrapperbox { max-width: var(--ap-max); width: 100%; margin: 0 auto; padding: 0 24px; }
.ap-wrap { width: 100%; margin: 0 auto; }
.ap-topbar .ap-wrap { max-width: var(--ap-max); padding: 0 24px; }

.ap-skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--ap-ink); color: #fff !important; padding: 10px 16px; }
.ap-skip:focus { left: 8px; top: 8px; }

/* ==========================================================================
   2. Top bar, masthead, section bar
   ========================================================================== */
.ap-topbar { background: var(--ap-ink); color: #d9dbe0; font-size: 13px; }
.ap-topbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 38px; gap: 16px; }
.ap-topbar__date { margin: 0; letter-spacing: .02em; }
.ap-topbar__links { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.ap-topbar__links li { margin: 0; padding: 0; }
.ap-topbar__links a { color: #fff !important; text-decoration: none; font-weight: 500; display: inline-block; padding: 9px 0; }
.ap-topbar__links a:hover { color: var(--ap-gold) !important; }

body.adpapa #header.ap-masthead {
	position: static; width: 100%; padding: 0; display: block; opacity: 1;
	border-bottom: 1px solid var(--ap-ink);
}
.ap-masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 0 22px; }
body.adpapa #logo.ap-logo { margin: 0; padding: 0; float: none; display: flex; flex-direction: column; gap: 6px; font-size: inherit; line-height: 1; }
body.adpapa #logo a { display: inline-flex; align-items: center; gap: 12px; font-family: var(--ap-serif); font-size: 52px; font-weight: 700; letter-spacing: -.035em; color: var(--ap-ink); text-transform: lowercase; }
body.adpapa #logo img { height: 52px; width: auto; }
.ap-logo__mark { width: 18px; height: 18px; border-radius: 50%; background: var(--ap-accent); box-shadow: 9px -9px 0 -3px var(--ap-gold); flex: none; transform: translateY(4px); }
body.adpapa #tagline.ap-tagline { display: block; margin: 0; font-family: var(--ap-sans); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ap-muted); opacity: 1; position: static; }

body.adpapa #extras { position: static; margin: 0; float: none; }
body.adpapa #searchbar fieldset { margin: 0; padding: 0; border: 0; position: relative; }
body.adpapa #searchbar input[type=text] {
	width: 240px; height: 42px; margin: 0; padding: 0 44px 0 14px;
	border: 1px solid var(--ap-rule); border-radius: 999px; background: #fff;
	font-size: 15px; color: var(--ap-ink); opacity: 1;
}
body.adpapa #searchbar input[type=text]::placeholder { color: var(--ap-muted); }
body.adpapa #searchbar input[type=text]:focus { border-color: var(--ap-ink); outline: none; }
body.adpapa #searchbar button { position: absolute; right: 4px; top: 4px; width: 34px; height: 34px; min-height: 0; margin: 0; padding: 0; border: 0; background: transparent; display: grid; place-items: center; }

/* Section bar */
body.adpapa #menu.ap-sections { float: none; margin: 0; padding: 0; position: sticky; top: 0; z-index: 20; background: var(--ap-paper); border-top: 3px solid var(--ap-ink); transform: none; }
body.adpapa .ap-sections__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
body.adpapa .ap-sections__list::-webkit-scrollbar { display: none; }
body.adpapa #menu .ap-sections__list > li { display: block; margin: 0; padding: 0; flex: none; }
body.adpapa #menu .ap-sections__list a {
	display: block; padding: 13px 14px 12px; font-family: var(--ap-sans); font-size: 14px; font-weight: 600;
	letter-spacing: .01em; color: var(--ap-ink); border: 0; border-bottom: 3px solid transparent; white-space: nowrap;
}
body.adpapa #menu .ap-sections__list > li:first-child a { padding-left: 0; }
body.adpapa #menu .ap-sections__list a:hover { color: var(--ap-accent); opacity: 1; }
body.adpapa #menu .ap-sections__list li.current-menu-item > a,
body.adpapa #menu .ap-sections__list li.current-cat > a { border-bottom-color: var(--ap-accent); color: var(--ap-accent); }
body.adpapa #menutoggle, body.adpapa #menutogglebutton { display: none !important; }

/* ==========================================================================
   3. Shared story pieces
   ========================================================================== */
.ap-kicker { display: inline-block; font-family: var(--ap-sans); font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ap-accent) !important; text-decoration: none; margin-bottom: 6px; }
a.ap-kicker:hover { text-decoration: underline; }
.ap-meta { margin: 10px 0 0; font-size: 13px; color: var(--ap-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; line-height: 1.4; }
.ap-meta a { color: var(--ap-ink-2); font-weight: 600; text-decoration: none; }
.ap-meta a:hover { color: var(--ap-accent); }
.ap-dot { color: var(--ap-rule); font-weight: 700; }

.ap-card { position: relative; margin: 0; }
.ap-card__media { display: block; overflow: hidden; background: var(--ap-panel); aspect-ratio: 3 / 2; margin-bottom: 14px; }
.ap-card__media img, .ap-card__media .ap-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.ap-card:hover .ap-card__media img { transform: scale(1.03); }
.ap-noimg { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--ap-accent) 0%, var(--ap-accent-dark) 100%); color: rgba(255,255,255,.85); font-family: var(--ap-serif); font-size: 22px; font-weight: 700; }
.ap-card__title { margin: 0; font-family: var(--ap-serif); font-weight: 700; font-size: 21px; line-height: 1.22; letter-spacing: -.01em; color: var(--ap-ink); }
.ap-card__title a { text-decoration: none; color: inherit; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .25s ease; }
.ap-card__title a:hover { background-size: 100% 1px; }
.ap-card__excerpt { margin: 8px 0 0; color: var(--ap-ink-2); font-size: 15px; line-height: 1.5; }

.ap-card--lead .ap-card__media { aspect-ratio: 16 / 10; }
.ap-card--lead .ap-card__title { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -.02em; }
.ap-card--lead .ap-card__excerpt { font-family: var(--ap-serif); font-size: 19px; line-height: 1.45; margin-top: 12px; }

.ap-card--text { padding-top: 16px; border-top: 1px solid var(--ap-rule); }
.ap-card--text .ap-card__title { font-size: 18px; }

.ap-card--side { display: grid; grid-template-columns: 1fr 96px; gap: 14px; align-items: start; padding-top: 16px; border-top: 1px solid var(--ap-rule); }
.ap-card--side .ap-card__media { order: 2; aspect-ratio: 1 / 1; margin: 0; }
.ap-card--side .ap-card__title { font-size: 17px; }
.ap-card--side .ap-kicker { display: none; }

/* Section heads */
.ap-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 3px solid var(--ap-ink); padding-top: 12px; margin-bottom: 22px; }
.ap-section__title { margin: 0; font-family: var(--ap-sans); font-size: 15px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ap-section__title a { text-decoration: none; color: var(--ap-ink); }
.ap-section__title a:hover { color: var(--ap-accent); }
.ap-section__more { font-size: 13px; font-weight: 600; color: var(--ap-muted) !important; text-decoration: none; }
.ap-section__more:hover { color: var(--ap-accent) !important; }

.ap-button { display: inline-block; padding: 14px 26px; border-radius: 999px; background: var(--ap-ink); color: #fff !important; font-weight: 600; font-size: 15px; text-decoration: none; }
.ap-button:hover { background: var(--ap-accent); }

/* ==========================================================================
   4. Homepage
   ========================================================================== */
.ap-home { padding: 28px 0 40px; }

/* Top stories: stack | lead | latest */
.ap-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr) minmax(0, 1fr); gap: var(--ap-gap); align-items: start; padding-bottom: 36px; }
.ap-top__stack { grid-column: 1; grid-row: 1; display: grid; gap: 18px; }
.ap-top__lead { grid-column: 2; grid-row: 1; padding: 0 var(--ap-gap); border-left: 1px solid var(--ap-rule); border-right: 1px solid var(--ap-rule); margin: 0 calc(var(--ap-gap) * -1 + 1px); }
.ap-top__latest { grid-column: 3; grid-row: 1; }
.ap-top__stack .ap-card--card .ap-card__excerpt { display: none; }

.ap-latest__title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 15px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; border-top: 3px solid var(--ap-ink); padding-top: 12px; }
.ap-live { width: 9px; height: 9px; border-radius: 50%; background: var(--ap-accent); box-shadow: 0 0 0 0 rgba(11,110,79,.5); animation: ap-pulse 2s infinite; }
@keyframes ap-pulse { 70% { box-shadow: 0 0 0 8px rgba(11,110,79,0); } 100% { box-shadow: 0 0 0 0 rgba(11,110,79,0); } }
@media (prefers-reduced-motion: reduce) { .ap-live { animation: none; } .ap-card__media img { transition: none; } }
.ap-latest__list { list-style: none; margin: 0; padding: 0; }
.ap-latest__list li { position: relative; margin: 0; padding: 12px 0 12px 18px; border-bottom: 1px solid var(--ap-rule); font-family: var(--ap-serif); font-size: 16px; font-weight: 600; line-height: 1.3; }
.ap-latest__list li::before { content: ""; position: absolute; left: 3px; top: 0; bottom: 0; width: 1px; background: var(--ap-rule); }
.ap-latest__list li::after { content: ""; position: absolute; left: 0; top: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--ap-paper); border: 1px solid var(--ap-accent); }
.ap-latest__list time { display: block; font-family: var(--ap-sans); font-size: 12px; font-weight: 600; color: var(--ap-accent); margin-bottom: 3px; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.ap-latest__list a { text-decoration: none; color: var(--ap-ink); }
.ap-latest__list a:hover { color: var(--ap-accent); }
.ap-latest__all { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--ap-ink) !important; text-decoration: none; }
.ap-latest__all:hover { color: var(--ap-accent) !important; }

/* Most read band */
.ap-mostread { background: var(--ap-ink); color: #fff; padding: 26px 30px 30px; margin: 0 0 44px; }
.ap-mostread__title { margin: 0 0 18px; font-size: 15px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ap-gold); }
.ap-mostread__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; counter-reset: mr; }
.ap-mostread__list li { counter-increment: mr; margin: 0; padding: 0 0 0 0; position: relative; }
.ap-mostread__list li::before { content: counter(mr); display: block; font-family: var(--ap-serif); font-size: 46px; font-weight: 700; line-height: 1; color: var(--ap-gold); margin-bottom: 10px; }
.ap-mostread__list .ap-kicker { color: #9fd3bf !important; font-size: 11px; }
.ap-mostread__list a { display: block; color: #fff; text-decoration: none; font-family: var(--ap-serif); font-size: 17px; font-weight: 600; line-height: 1.3; }
.ap-mostread__list a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Category sections */
.ap-section { margin-bottom: 48px; }
.ap-section__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--ap-gap); }
.ap-section__lead .ap-card__title { font-size: 28px; line-height: 1.12; }
.ap-section__lead .ap-card__media { aspect-ratio: 4 / 3; }
.ap-section__cards { display: grid; gap: 22px; align-content: start; }
.ap-section__cards .ap-card { display: grid; grid-template-columns: 42% 1fr; gap: 16px; align-items: start; }
.ap-section__cards .ap-card__media { margin: 0; }
.ap-section__cards .ap-card__excerpt { display: none; }
.ap-section__cards .ap-card__title { font-size: 19px; }
.ap-section__list { display: grid; align-content: start; gap: 16px; }
.ap-section__list .ap-card--text:first-child { border-top: 0; padding-top: 0; }
.ap-section--b .ap-section__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1.6fr); }
.ap-section--b .ap-section__lead { order: 3; }
.ap-section--b .ap-section__list { order: 1; }
.ap-section--b .ap-section__cards { order: 2; }

/* Three compact columns */
.ap-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ap-gap); margin-bottom: 48px; }
.ap-column { display: grid; align-content: start; gap: 16px; }
.ap-column .ap-section__head { margin-bottom: 4px; }
.ap-column .ap-card--card .ap-card__excerpt { display: none; }

/* More stories grid */
.ap-more__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px var(--ap-gap); }
.ap-more__grid .ap-card__title { font-size: 19px; }
.ap-more__grid .ap-card__excerpt { display: none; }
.ap-more__cta { text-align: center; margin: 36px 0 0; }

/* ==========================================================================
   5. Insider listings (archives, search, page 2+, "More Articles for You")
   ========================================================================== */
body.adpapa main#content > .wrapper { padding-top: 28px; }
body.adpapa .excerpts { gap: var(--ap-gap); }
body.adpapa .excerpts .excerpt { background: transparent; box-shadow: none; border: 0; border-top: 1px solid var(--ap-rule); padding-top: 18px; }
body.adpapa .excerpts.without-top-border .excerpt { border-top: 0; padding-top: 0; }
body.adpapa .excerpt .featured-image-excerpt { margin: 0 0 14px; border-radius: 0; overflow: hidden; aspect-ratio: 3 / 2; background: var(--ap-panel); }
body.adpapa .excerpt .featured-image-excerpt img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
body.adpapa .excerpt .entry-header { position: static; background: transparent; padding: 0; margin: 0; box-shadow: none; text-align: left; }
body.adpapa .excerpt .entry-header h2 { font-family: var(--ap-serif); font-weight: 700; font-size: 21px; line-height: 1.22; letter-spacing: -.01em; color: var(--ap-ink); margin: 4px 0 0; }
body.adpapa .excerpt .entry-header a { text-decoration: none; }
body.adpapa .excerpt .entry-header a:hover h2 { color: var(--ap-accent); }
body.adpapa .excerpt .entry-excerpt { font-size: 15px; color: var(--ap-ink-2); }
body.adpapa .excerpt .entry-meta,
body.adpapa article .entry-meta { font-family: var(--ap-sans); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ap-muted); }
body.adpapa .entry-meta strong a { color: var(--ap-accent); font-weight: 700; text-decoration: none; }
body.adpapa .excerpts.one-in-row .excerpt .entry-header h2 { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.1; }

/* Archive titles */
body.adpapa .archive-header, body.adpapa .page-header, body.adpapa main#content > .wrapper > h1 { border-top: 3px solid var(--ap-ink); padding-top: 14px; margin-bottom: 26px; }
body.adpapa.archive h1, body.adpapa.search h1 { font-family: var(--ap-serif); font-size: clamp(32px, 4vw, 48px); letter-spacing: -.02em; }

body.adpapa #load-more a { border-radius: 999px; background: var(--ap-ink); color: #fff; border: 0; font-family: var(--ap-sans); text-transform: none; font-weight: 600; letter-spacing: 0; padding: 14px 26px; }
body.adpapa #load-more a:hover { background: var(--ap-accent); }

/* ==========================================================================
   6. Single article
   ========================================================================== */
body.adpapa.single article.entry,
body.adpapa.page article.entry { max-width: 760px; margin: 0 auto; }
body.adpapa.single article .entry-header { height: auto; min-height: 0; display: block; color: var(--ap-ink); text-align: left; padding: 40px 0 0; margin: 0; position: static; background: none; }
body.adpapa.single article .entry-header::before, body.adpapa.single article .entry-header::after { display: none; }
body.adpapa.single article .entry-header h2,
body.adpapa.page article .entry-header h2 { font-family: var(--ap-serif); font-weight: 700; font-size: clamp(34px, 4.6vw, 54px); line-height: 1.06; letter-spacing: -.025em; color: var(--ap-ink); margin: 10px 0 14px; text-shadow: none; }
body.adpapa.single article .entry-excerpt:not(:empty) { font-family: var(--ap-serif); font-size: 21px; line-height: 1.45; color: var(--ap-ink-2); opacity: 1; margin-bottom: 18px; }
body.adpapa.single article .featured-image {
	position: relative; height: auto; min-height: 0; width: auto; max-width: none;
	margin: 26px -110px 0; left: auto; top: auto; z-index: 0; opacity: 1; filter: none;
}
body.adpapa.single article .featured-image::after { display: none; }
body.adpapa.single article .featured-image img { width: 100%; height: auto; max-height: 640px; object-fit: cover; position: static; opacity: 1; filter: none; }

body.adpapa .social-bar { display: none; }

body.adpapa.single .entry-content { padding-top: 26px; font-size: 19px; line-height: 1.7; color: #23262d; }
body.adpapa .entry-content > p, body.adpapa .entry-content li { font-family: var(--ap-serif); font-size: 19px; line-height: 1.7; }
body.adpapa .entry-content h2 { font-size: 30px; line-height: 1.2; letter-spacing: -.015em; margin: 1.6em 0 .5em; }
body.adpapa .entry-content h3 { font-size: 23px; line-height: 1.25; margin: 1.4em 0 .4em; }
body.adpapa .entry-content a { color: var(--ap-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
body.adpapa .entry-content a:hover { color: var(--ap-accent-dark); text-decoration-thickness: 2px; }
body.adpapa .entry-content blockquote { border-left: 4px solid var(--ap-gold); padding: 4px 0 4px 22px; margin: 1.6em 0; font-size: 23px; line-height: 1.4; font-style: normal; color: var(--ap-ink); }
body.adpapa .entry-content img { height: auto; }

/* Author line under the headline */
body.adpapa .entry-content .entry-author { display: flex; align-items: center; gap: 12px; padding: 0 0 22px; margin: 0 0 26px; border-bottom: 1px solid var(--ap-rule); font-family: var(--ap-sans); font-size: 14px; }
body.adpapa .entry-content .entry-author img { width: 44px; height: 44px; border-radius: 50%; margin: 0; }
body.adpapa .entry-content .entry-author strong { font-weight: 600; color: var(--ap-ink); }
body.adpapa .entry-content .entry-author strong + strong { font-weight: 400; color: var(--ap-muted); }
body.adpapa .entry-content .entry-author strong + strong::before { content: "·"; margin-right: 10px; color: var(--ap-rule); }

/* Share + author box */
.ap-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 40px 0 0; padding: 18px 0; border-top: 3px solid var(--ap-ink); border-bottom: 1px solid var(--ap-rule); font-family: var(--ap-sans); }
.ap-share__label { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ap-share ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ap-share li { margin: 0; padding: 0; font-family: var(--ap-sans) !important; font-size: 13px !important; }
body.adpapa .ap-share a, body.adpapa .ap-share button {
	display: inline-flex; align-items: center; height: 36px; min-height: 0; margin: 0; padding: 0 14px; border: 1px solid var(--ap-rule); border-radius: 999px;
	background: #fff; color: var(--ap-ink) !important; font-size: 13px; font-weight: 600; text-transform: none; text-decoration: none; letter-spacing: 0; cursor: pointer;
}
body.adpapa .ap-share a:hover, body.adpapa .ap-share button:hover { border-color: var(--ap-ink); background: var(--ap-ink); color: #fff !important; }

.ap-authorbox { display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: start; margin: 26px 0 0; padding: 22px; background: var(--ap-panel); font-family: var(--ap-sans); }
.ap-authorbox img { width: 72px; height: 72px; border-radius: 50%; margin: 0; }
.ap-authorbox p { margin: 0; font-family: var(--ap-sans) !important; }
.ap-authorbox__name { font-weight: 700; font-size: 17px !important; }
.ap-authorbox__bio { margin-top: 6px !important; font-size: 15px !important; line-height: 1.55 !important; color: var(--ap-ink-2); }
body.adpapa .ap-authorbox__more { display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--ap-accent); text-decoration: none; }

/* More Articles for You */
body.adpapa #more-excerpts { max-width: var(--ap-max); margin: 56px auto 0; padding: 0; background: transparent; }
body.adpapa #more-excerpts > h2 { font-family: var(--ap-sans); font-size: 15px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; border-top: 3px solid var(--ap-ink); padding-top: 12px; margin: 0 0 22px; text-align: left; }

/* ==========================================================================
   7. Footer
   ========================================================================== */
body.adpapa footer#footer { background: var(--ap-ink); color: #c9ccd3; margin: 56px calc(50% - 50vw) 0; padding: 52px calc(50vw - 50% + 24px) 26px; width: auto; border: 0; }
body.adpapa footer#footer .widgets { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 36px; max-width: var(--ap-max); margin: 0 auto; }
body.adpapa footer#footer .widget { width: auto; margin: 0; padding: 0; float: none; }
body.adpapa footer#footer h3 { font-family: var(--ap-sans); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid #2f333b; }
body.adpapa footer#footer p { font-size: 14px; line-height: 1.6; }
body.adpapa footer#footer a { color: #fff; text-decoration: none; }
body.adpapa footer#footer a:hover { color: var(--ap-gold); }
body.adpapa footer#footer .widget ul { list-style: none; margin: 0; padding: 0; }
body.adpapa footer#footer .widget li { margin: 0; padding: 0; font-size: 14px; }
body.adpapa footer#footer .widget li a { display: inline-block; padding: 5px 0; min-height: 24px; }
body.adpapa footer#footer .widget_categories ul { columns: 2; column-gap: 20px; }
body.adpapa footer#footer .bottom { max-width: var(--ap-max); margin: 40px auto 0; padding-top: 18px; border-top: 1px solid #2f333b; font-size: 13px; color: #9a9ea8; text-align: left; }
body.adpapa footer#footer .social-icons:empty { display: none; }

/* ==========================================================================
   8. Responsive
   ========================================================================== */
@media (max-width: 1100px) {
	.ap-top { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
	.ap-top__lead { grid-column: 1; grid-row: 1; border-left: 0; padding-left: 0; margin-left: 0; }
	.ap-top__latest { grid-column: 2; grid-row: 1 / span 2; }
	.ap-top__stack { grid-column: 1; grid-row: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ap-top__stack .ap-card--text { border-top: 0; padding-top: 0; }
	.ap-section__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.ap-section__list { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); order: 4 !important; }
	.ap-section__list .ap-card--text { border-top: 1px solid var(--ap-rule) !important; padding-top: 16px !important; }
	.ap-section--b .ap-section__lead { order: 1; }
	.ap-more__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ap-mostread__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	body.adpapa.single article .featured-image { margin-left: 0; margin-right: 0; }
	body.adpapa footer#footer .widgets { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
	:root { --ap-gap: 20px; }
	body.adpapa { font-size: 16px; }
	body.adpapa #wrapperbox { padding: 0 16px; }
	.ap-topbar .ap-wrap { padding: 0 16px; }
	.ap-topbar__links { gap: 14px; }
	.ap-topbar__date { display: none; }
	.ap-topbar__inner { justify-content: flex-end; }
	.ap-masthead__inner { padding: 18px 0 14px; }
	body.adpapa #logo a { font-size: 38px; }
	body.adpapa #tagline.ap-tagline { font-size: 10px; letter-spacing: .1em; }
	body.adpapa #searchbar input[type=text] { width: 42px; padding: 0; color: transparent; cursor: pointer; transition: width .2s ease; }
	body.adpapa #searchbar input[type=text]::placeholder { color: transparent; }
	body.adpapa #searchbar input[type=text]:focus { width: min(70vw, 260px); padding: 0 44px 0 14px; color: var(--ap-ink); position: relative; z-index: 2; }
	body.adpapa #searchbar button { z-index: 3; pointer-events: none; }

	.ap-home { padding-top: 18px; }
	.ap-top { grid-template-columns: 1fr; }
	.ap-top__lead, .ap-top__stack, .ap-top__latest { grid-column: 1; grid-row: auto; }
	.ap-top__lead { padding: 0; margin: 0; border: 0; }
	.ap-top__stack { grid-template-columns: 1fr; }
	.ap-top__stack .ap-card--text { border-top: 1px solid var(--ap-rule); padding-top: 16px; }
	.ap-top__stack .ap-card--card { display: grid; grid-template-columns: 1fr 110px; gap: 14px; border-top: 1px solid var(--ap-rule); padding-top: 16px; }
	.ap-top__stack .ap-card--card .ap-card__media { order: 2; margin: 0; aspect-ratio: 1 / 1; }
	.ap-card--lead .ap-card__excerpt { font-size: 17px; }

	.ap-mostread { margin: 0 -16px 36px; padding: 22px 16px 24px; }
	.ap-mostread__list { grid-template-columns: 1fr; gap: 0; }
	.ap-mostread__list li { display: grid; grid-template-columns: 44px 1fr; column-gap: 8px; padding: 12px 0; border-top: 1px solid #2f333b; }
	.ap-mostread__list li:first-child { border-top: 0; padding-top: 0; }
	.ap-mostread__list li::before { grid-row: 1 / span 2; font-size: 32px; margin: 0; }

	.ap-section__grid, .ap-section__list, .ap-columns, .ap-more__grid { grid-template-columns: 1fr; }
	.ap-section__cards .ap-card { grid-template-columns: 1fr 110px; }
	.ap-section__cards .ap-card__media { order: 2; aspect-ratio: 1 / 1; }
	.ap-section__lead .ap-card__title { font-size: 24px; }
	.ap-more__grid .ap-card { display: grid; grid-template-columns: 1fr 110px; gap: 14px; border-top: 1px solid var(--ap-rule); padding-top: 16px; }
	.ap-more__grid .ap-card__media { order: 2; margin: 0; aspect-ratio: 1 / 1; }
	.ap-more__grid { gap: 16px; }

	body.adpapa.single article .entry-header { padding-top: 24px; }
	body.adpapa.single article .featured-image { margin: 18px -16px 0; }
	body.adpapa.single .entry-content, body.adpapa .entry-content > p, body.adpapa .entry-content li { font-size: 18px; }
	.ap-authorbox { grid-template-columns: 56px 1fr; padding: 18px; }
	.ap-authorbox img { width: 56px; height: 56px; }
	body.adpapa footer#footer { padding-left: calc(50vw - 50% + 16px); padding-right: calc(50vw - 50% + 16px); }
	body.adpapa footer#footer .widgets { grid-template-columns: 1fr; gap: 28px; }
}

/* ==========================================================================
   9. Insider overrides (paragraph padding, search, author line, link underlines)
   ========================================================================== */
body.adpapa .ap-topbar p, body.adpapa .ap-home p, body.adpapa .ap-share p, body.adpapa .ap-authorbox p, body.adpapa #header p { padding: 0; }
body.adpapa .ap-more__cta { padding-top: 0; }

body.adpapa .ap-topbar a, body.adpapa #header a, body.adpapa .ap-home a, body.adpapa footer#footer a,
body.adpapa .ap-share a, body.adpapa .ap-authorbox a, body.adpapa .excerpt a, body.adpapa #more-excerpts a { background-image: none; }
body.adpapa .ap-home .ap-card__title a { background-image: linear-gradient(currentColor, currentColor); }

body.adpapa #header #extras #searchbar { float: none; width: auto; margin: 0; }
body.adpapa #header #extras #searchbar input[type=text] { position: static; opacity: 1; width: 240px; height: 42px; border: 1px solid var(--ap-rule); background: #fff; font-size: 15px; color: var(--ap-ink); }
body.adpapa #header #extras #searchbar input[type=text]:focus { border-color: var(--ap-ink); }
body.adpapa #header #extras #searchbar button,
body.adpapa #header #extras #searchbar.searchbar-shown button { position: absolute; transform: none; }

body.adpapa.single .entry-content .entry-author { position: static; left: auto; width: auto; text-align: left; word-break: normal; }
body.adpapa.single .entry-content .entry-author strong { display: inline; text-transform: none; opacity: 1; font-size: 14px; letter-spacing: 0; }
body.adpapa.single .entry-content .entry-author img { margin: 0; }
body.adpapa.single .entry-content .entry-author a { flex: none; }

body.adpapa .ap-home + footer#footer, body.adpapa footer#footer { margin-top: 24px; }
body.adpapa footer#footer .widgets, body.adpapa footer#footer .bottom { max-width: calc(var(--ap-max) - 48px); }

@media (max-width: 760px) {
	body.adpapa #header #extras #searchbar input[type=text] { width: 42px; padding: 0; color: transparent; cursor: pointer; }
	body.adpapa #header #extras #searchbar input[type=text]:focus { width: min(70vw, 260px); padding: 0 44px 0 14px; color: var(--ap-ink); }
}

/* ==========================================================================
   10. Insider mobile overrides (<=900px it turns #menu into a fixed drawer)
   ========================================================================== */
body.adpapa #menu.ap-sections { width: auto; height: auto; max-height: none; padding: 0; right: auto; top: 0; overflow: visible; box-shadow: none; font-size: inherit; transform: none; }
body.adpapa.admin-bar #menu.ap-sections { padding-top: 0; }
body.adpapa #menu .ap-sections__list li { display: block; margin-right: 0 !important; padding: 0; }
body.adpapa #menu .ap-sections__list a { padding: 13px 14px 12px !important; color: var(--ap-ink) !important; border-bottom: 3px solid transparent !important; }
body.adpapa #menu .ap-sections__list > li:first-child a { padding-left: 0 !important; }
body.adpapa #menu .ap-sections__list a:hover { color: var(--ap-accent) !important; }
body.adpapa #menu .ap-sections__list li.current-menu-item > a,
body.adpapa #menu .ap-sections__list li.current-cat > a { color: var(--ap-accent) !important; border-bottom-color: var(--ap-accent) !important; }
body.adpapa #header #extras #searchbar input[type=text] { min-width: 0; }

@media (max-width: 900px) {
	body.adpapa .one-in-row .excerpt, body.adpapa .two-in-row .excerpt { height: auto !important; min-height: 0 !important; }
}
@media (max-width: 760px) {
	body.adpapa #menu .ap-sections__list a { padding: 12px 10px 11px !important; font-size: 14px; }
	.ap-sections .ap-wrap { position: relative; }
	.ap-sections .ap-wrap::after { content: ""; position: absolute; right: 0; top: 0; bottom: 3px; width: 28px; background: linear-gradient(90deg, rgba(251,250,247,0), var(--ap-paper)); pointer-events: none; }
}

/* ==========================================================================
   11. PageSpeed quick wins (v1.0.4)
   ========================================================================== */
/* Contrast: Insider fades meta lines to 85% */
body.adpapa .ap-meta, body.adpapa .ap-latest__list time, body.adpapa .entry-meta { opacity: 1; }
body.adpapa .ap-meta a { color: var(--ap-ink-2); }

/* Touch targets (24px+ height / spacing) */
body.adpapa .ap-kicker { display: table; padding: 5px 0; margin: -5px 0 10px; min-height: 24px; line-height: 14px; }
body.adpapa .ap-section__more, body.adpapa .ap-latest__all, body.adpapa .ap-authorbox__more { display: inline-block; padding: 8px 0; margin: -8px 0; }
body.adpapa .ap-meta a { display: inline-block; padding: 4px 0; margin: -4px 0; }
body.adpapa .ap-card__title a { padding: 2px 0; }
body.adpapa #header #extras #searchbar input[type=text] { height: 44px; }
body.adpapa #header #extras #searchbar button { width: 44px; height: 44px; top: 0; right: 0; }
body.adpapa .ap-mostread__list a { padding: 2px 0; }

/* No loading bar or blur-in animations (non-composited, delay LCP) */
body.adpapa #loadbar { display: none; }
body.adpapa img { -webkit-animation: none !important; animation: none !important; filter: none !important; opacity: 1 !important; }

/* v1.1.1: <main>/.wrapper now opened in header.php for every template */
body.adpapa.home main#content > .wrapper { padding-top: 0; }
body.adpapa main#content { margin-bottom: 0; min-height: 0; }
body.adpapa #tagline.ap-tagline { opacity: 1 !important; color: var(--ap-muted) !important; }

/* v1.1.2: on non-home pages the logo is a <p>, which Insider fades to 85% */
body.adpapa #logo.ap-logo { opacity: 1; }
