/* Inner-page layouts (archives, posts, pages, search, 404, footer).
   Driven by the same colour variables as the home page, so every theme stays consistent.
   Optional per-theme variables: --c3, --c4 (extra accents), --band (banner background), --band-ink (banner text). */
:root {
	--c3: #ff7a59;
	--c4: #2dd4bf;
	--band: linear-gradient(120deg, var(--accent), var(--accent-2));
	--band-ink: var(--accent-ink);
}

/* Sticky, frosted header */
.site-header { position: sticky; top: 0; background: var(--bg); box-shadow: 0 1px 0 var(--line); }
@supports (backdrop-filter: blur(10px)) {
	.site-header { background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(160%) blur(14px); }
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* Colour banner for archive / search / 404 / page titles */
.page-head, .entry__head {
	position: relative; overflow: hidden; isolation: isolate;
	margin-top: 28px; padding: clamp(28px, 5vw, 56px); border-radius: calc(var(--radius-card) + 6px);
	background: var(--band); color: var(--band-ink);
}
.page-head::after, .entry__head::after {
	content: ''; position: absolute; z-index: -1; right: -90px; top: -90px; width: 320px; height: 320px; border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 70%);
}
.page-head::before, .entry__head::before {
	content: ''; position: absolute; z-index: -1; left: 38%; bottom: -120px; width: 260px; height: 260px; border-radius: 50%;
	background: radial-gradient(circle, var(--c3), transparent 70%); opacity: 0.45;
}
.page-head__title, .entry__title { color: inherit; }
.page-head__lead { color: inherit; opacity: 0.9; }
.page-head .breadcrumbs, .entry__head .breadcrumbs, .page-head .breadcrumbs a, .entry__head .breadcrumbs a,
.entry__meta, .entry__meta a { color: inherit; }
.entry__meta { opacity: 0.92; }
.entry__meta a { text-decoration: underline; text-underline-offset: 3px; }
.entry { padding-top: 0; }
.entry__head { margin-bottom: 28px; }
.page-head { margin-bottom: 8px; }
.wrap--narrow.entry { max-width: 900px; }
.entry__image { margin: 0 0 36px; }
.entry__image img { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22); }

/* Article typography */
.entry__content > p:first-of-type { font-size: 1.12em; color: var(--ink-soft); }
.entry__content h2 { position: relative; padding-bottom: 12px; }
.entry__content h2::after { content: ''; position: absolute; left: 0; bottom: 0; width: 64px; height: 5px; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.entry__content blockquote { padding: 22px 26px; border-left: 0; border-radius: var(--radius-card); background: var(--surface); box-shadow: inset 5px 0 0 var(--accent-2); }
.entry__content img { box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16); }
.entry__content table { width: 100%; border-collapse: collapse; font-size: 16px; }
.entry__content th, .entry__content td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.entry__content th { background: var(--surface); }
.entry__content ul li::marker, .entry__content ol li::marker { color: var(--accent-2); font-weight: 700; }

.tags a:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.entry__cta { border: 0; background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: var(--accent-ink); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2); }
.entry__cta .btn { background: var(--ink); color: var(--bg); }
.post-navigation a { padding: 16px 20px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); transition: transform 0.2s ease; }
.post-navigation a:hover { transform: translateY(-3px); }

/* Cards: colour-coded top bars, pill categories, bigger first card */
.card { position: relative; border-top: 5px solid var(--accent); display: flex; flex-direction: column; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); }
.cards3 > .card:nth-child(4n + 2) { border-top-color: var(--accent-2); }
.cards3 > .card:nth-child(4n + 3) { border-top-color: var(--c3); }
.cards3 > .card:nth-child(4n + 4) { border-top-color: var(--c4); }
.card:hover { box-shadow: 0 22px 50px rgba(0, 0, 0, 0.18); }
.card__body { display: flex; flex-direction: column; flex: 1 1 auto; }
.card__cat { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.card__title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size 0.3s ease; }
.card:hover .card__title a { background-size: 100% 2px; }
.card__excerpt { flex: 1 1 auto; }
@media (min-width: 901px) {
	body.archive:not(.paged) .cards3 > .card:first-child,
	body.blog:not(.paged) .cards3 > .card:first-child,
	body.search:not(.paged) .cards3 > .card:first-child { grid-column: span 3; flex-direction: row; }
	body.archive:not(.paged) .cards3 > .card:first-child .card__media,
	body.blog:not(.paged) .cards3 > .card:first-child .card__media,
	body.search:not(.paged) .cards3 > .card:first-child .card__media { flex: 0 0 58%; aspect-ratio: auto; min-height: 340px; }
	body.archive:not(.paged) .cards3 > .card:first-child .card__body,
	body.blog:not(.paged) .cards3 > .card:first-child .card__body,
	body.search:not(.paged) .cards3 > .card:first-child .card__body { justify-content: center; padding: 40px; }
	body.archive:not(.paged) .cards3 > .card:first-child .card__title,
	body.blog:not(.paged) .cards3 > .card:first-child .card__title,
	body.search:not(.paged) .cards3 > .card:first-child .card__title { font-size: clamp(26px, 3vw, 38px); }
	body.archive:not(.paged) .cards3 > .card:first-child .card__excerpt,
	body.blog:not(.paged) .cards3 > .card:first-child .card__excerpt,
	body.search:not(.paged) .cards3 > .card:first-child .card__excerpt { flex: 0 0 auto; font-size: 17px; }
}

/* Related stories band */
.related { margin-top: 24px; background: var(--surface); }
.related .section__title--small { margin-bottom: 4px; }

/* Pagination, search, comments */
.pagination .page-numbers { font-weight: 700; transition: transform 0.2s ease; }
.pagination .page-numbers:hover { transform: translateY(-2px); }
.searchform__input:focus, .comment-form input:focus, .comment-form textarea:focus { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.comments { padding: 28px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); }
.notfound { text-align: center; }
.notfound .page-head__title { font-size: clamp(60px, 14vw, 180px); line-height: 0.9; }

/* Footer: gradient edge, pill links */
.site-footer { border-top: 0; position: relative; }
.site-footer::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--c3), var(--c4)); }
.social-list a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid currentColor; font-weight: 700; transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease; }
.social-list a:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: translateY(-3px); }

@media (max-width: 900px) {
	.page-head, .entry__head { margin-top: 16px; }
	.comments { padding: 20px; }
}
