/* ==========================================================================
   Radlett Wire — Front-end styles
   ========================================================================== */

/* Skip link
   ========================================================================== */

.skip-link {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.skip-link:focus {
	position: static;
	width: auto;
	height: auto;
	left: auto;
	overflow: visible;
	background: var(--wp--preset--color--wire-green);
	color: var(--wp--preset--color--wire-white);
	padding: 0.5em 1em;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
	outline: none;
	z-index: 9999;
}

/* Focus styles
   ========================================================================== */

:focus-visible {
	outline: 2px solid var(--wp--preset--color--wire-green);
	outline-offset: 2px;
}

/* Header
   ========================================================================== */

.rw-site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--wp--preset--color--wire-white);
	border-bottom: 2px solid var(--wp--preset--color--wire-green);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.rw-site-title {
	font-family: var(--wp--preset--font-family--playfair);
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--wire-dark);
	text-decoration: none;
}

.rw-site-title:hover {
	color: var(--wp--preset--color--wire-green);
}

/* Ko-fi button
   ========================================================================== */

.rw-kofi-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	background: var(--wp--preset--color--wire-green);
	color: var(--wp--preset--color--wire-white) !important;
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
	text-decoration: none !important;
	padding: 0.45em 0.9em;
	border-radius: 3px;
	white-space: nowrap;
	transition: background 0.15s ease;
}

.rw-kofi-btn:hover {
	background: var(--wp--preset--color--wire-dark) !important;
	color: var(--wp--preset--color--wire-white) !important;
}

.rw-kofi-btn::before {
	content: "☕";
	font-style: normal;
}

/* Ad placeholder
   ========================================================================== */

.rw-ad-slot {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--wp--preset--color--wire-green-tint);
	border: 1px dashed var(--wp--preset--color--wire-rule);
	border-radius: 2px;
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--wire-mid);
	text-align: center;
	padding: 0.5em;
}

.rw-ad-slot--leaderboard {
	width: 100%;
	height: 90px;
	max-width: 728px;
	margin: 0 auto;
}

.rw-ad-slot--rectangle {
	width: 300px;
	height: 250px;
}

/* Section labels
   ========================================================================== */

.rw-section-label {
	display: block;
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--wire-green);
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--wp--preset--color--wire-green);
}

/* Post cards
   ========================================================================== */

.rw-post-card {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--wire-white);
	border: 1px solid var(--wp--preset--color--wire-rule);
	border-radius: 3px;
	overflow: hidden;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.rw-post-card:hover {
	box-shadow: 0 2px 12px rgba(45, 125, 79, 0.12);
	border-color: var(--wp--preset--color--wire-green-light);
}

.rw-card-body {
	padding: 1rem 1.25rem 1.25rem;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.rw-card-body .wp-block-post-title {
	font-family: var(--wp--preset--font-family--playfair);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	line-height: var(--wp--custom--line-height--tight);
	margin-bottom: 0.5rem;
}

.rw-card-body .wp-block-post-title a {
	color: var(--wp--preset--color--wire-black);
	text-decoration: none;
}

.rw-card-body .wp-block-post-title a:hover {
	color: var(--wp--preset--color--wire-green);
}

.rw-card-body .wp-block-post-excerpt {
	flex: 1;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--wire-mid);
	margin-bottom: 0.75rem;
}

.rw-card-body .wp-block-post-date {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--wire-mid);
}

/* Star ratings
   ========================================================================== */

.rw-star-rating {
	display: inline-flex;
	gap: 0.1em;
	font-size: 1rem;
	line-height: 1;
}

.rw-star--filled {
	color: var(--wp--preset--color--wire-amber);
}

.rw-star--empty {
	color: var(--wp--preset--color--wire-rule);
}

.rw-rating-label {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--wire-mid);
	margin-left: 0.4em;
	vertical-align: middle;
}

/* Category badge
   ========================================================================== */

.rw-category-badge {
	display: inline-block;
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--wire-green);
	text-decoration: none;
}

.rw-category-badge:hover {
	color: var(--wp--preset--color--wire-dark);
}

/* Single post
   ========================================================================== */

.rw-post-header {
	margin-bottom: 2rem;
}

.rw-post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--wire-mid);
	margin-top: 0.75rem;
}

.rw-post-meta a {
	color: var(--wp--preset--color--wire-mid);
}

.rw-post-meta a:hover {
	color: var(--wp--preset--color--wire-green);
}

/* Tables (TablePress + core/table)
   ========================================================================== */

.wp-block-table table,
.tablepress {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}

.wp-block-table td,
.wp-block-table th,
.tablepress td,
.tablepress th {
	padding: 0.55rem 0.75rem;
	border: 1px solid var(--wp--preset--color--wire-rule);
	vertical-align: top;
}

.wp-block-table thead th,
.tablepress thead th {
	background: var(--wp--preset--color--wire-green-tint);
	font-weight: 700;
	color: var(--wp--preset--color--wire-dark);
	font-size: var(--wp--preset--font-size--xs);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.tablepress tbody tr:nth-child(even) td {
	background: var(--wp--preset--color--wire-bg);
}

.tablepress tfoot th {
	background: var(--wp--preset--color--wire-green-tint);
	font-weight: 700;
}

/* Wide tables: allow horizontal scroll at content width */
.wp-block-table.alignwide,
.tablepress-table-description,
.tablepress-wrapper {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* Wide table scroll hint on small screens */
@media (max-width: 960px) {
	.wp-block-table.alignwide::before,
	.tablepress-wrapper::before {
		content: "← scroll →";
		display: block;
		font-size: var(--wp--preset--font-size--xs);
		color: var(--wp--preset--color--wire-mid);
		text-align: center;
		padding: 0.25em 0;
	}
}

/* Pagination
   ========================================================================== */

.wp-block-query-pagination {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	align-items: center;
}

.wp-block-query-pagination-numbers a,
.wp-block-query-pagination-previous a,
.wp-block-query-pagination-next a {
	display: inline-block;
	padding: 0.35em 0.75em;
	border: 1px solid var(--wp--preset--color--wire-rule);
	border-radius: 2px;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--wire-green);
	text-decoration: none;
	transition: background 0.12s, border-color 0.12s;
}

.wp-block-query-pagination-numbers a:hover,
.wp-block-query-pagination-previous a:hover,
.wp-block-query-pagination-next a:hover {
	background: var(--wp--preset--color--wire-green-tint);
	border-color: var(--wp--preset--color--wire-green);
}

.wp-block-query-pagination-numbers .current {
	display: inline-block;
	padding: 0.35em 0.75em;
	background: var(--wp--preset--color--wire-green);
	color: var(--wp--preset--color--wire-white);
	border-radius: 2px;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

/* Archive / search header band
   ========================================================================== */

.rw-archive-band {
	background: var(--wp--preset--color--wire-green-tint);
	border-bottom: 2px solid var(--wp--preset--color--wire-rule);
	padding: 2rem 0;
}

.rw-archive-band h1 {
	font-family: var(--wp--preset--font-family--playfair);
	font-size: var(--wp--preset--font-size--xxl);
	color: var(--wp--preset--color--wire-dark);
	margin: 0;
}

/* Footer
   ========================================================================== */

.rw-site-footer {
	background: var(--wp--preset--color--wire-dark);
	color: var(--wp--preset--color--wire-white);
	font-size: var(--wp--preset--font-size--small);
}

.rw-site-footer a {
	color: var(--wp--preset--color--wire-green-light);
	text-decoration: none;
}

.rw-site-footer a:hover {
	color: var(--wp--preset--color--wire-white);
	text-decoration: underline;
}

.rw-footer-copy {
	font-size: var(--wp--preset--font-size--xs);
	color: rgba(255, 255, 255, 0.55);
	margin-top: 0.5rem;
}

/* 404
   ========================================================================== */

.rw-404-band {
	background: var(--wp--preset--color--wire-green-tint);
	padding: 3rem 0;
}

.rw-404-band h1 {
	font-family: var(--wp--preset--font-family--playfair);
	font-size: var(--wp--preset--font-size--display);
	color: var(--wp--preset--color--wire-green);
	margin: 0 0 0.25em;
}

/* Print
   ========================================================================== */

@media print {
	.rw-site-header,
	.rw-site-footer,
	.wp-block-query-pagination,
	.rw-kofi-btn,
	.rw-ad-slot {
		display: none !important;
	}

	body {
		font-size: 12pt;
		color: #000;
		background: #fff;
	}

	a {
		color: #000;
		text-decoration: underline;
	}

	.wp-block-post-content {
		max-width: 100% !important;
	}
}

/* Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
		animation: none !important;
	}
}
.rw-ad-slot { display: none; }
