/*
Theme Name: RigAndTech Created By Mairaj Ahmed
Theme URI: https://rigandtech.com
Author: RigAndTech
Author URI: https://rigandtech.com
Description: A fast, ad-ready tech news magazine theme. Dense editorial grid, sticky header, category ribbons, lazy-loaded ad slots and a Core Web Vitals first build. No jQuery, no webfont blocking, no page builder required.
Version: 1.0.4
Requires at least: 6.6
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: rigandtech
Tags: news, magazine, blog, two-columns, right-sidebar, custom-menu, custom-logo, featured-images, block-styles, wide-blocks, translation-ready, threaded-comments
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
	--rt-paper: #ffffff;
	--rt-paper-2: #f5f6f8;
	--rt-paper-3: #ebedf1;
	--rt-ink: #0b0d12;
	--rt-ink-soft: #1b1f28;
	--rt-text: #14171f;
	--rt-muted: #5b6270;
	--rt-line: #e3e6ec;
	--rt-line-strong: #c9ced8;

	/* Inverted bands: top strip, footer, newsletter, back-to-top, skip link.
	   These stay dark in BOTH colour schemes, so text on them is always white.
	   Never build them from --rt-ink/--rt-paper -- those flip in dark mode and
	   would leave white text on a white band. */
	--rt-band: #0b0d12;
	--rt-band-ink: #ffffff;
	--rt-band-ink-soft: rgba(255, 255, 255, 0.72);
	--rt-band-ink-link: rgba(255, 255, 255, 0.84);
	--rt-band-line: rgba(255, 255, 255, 0.14);
	--rt-band-line-strong: rgba(255, 255, 255, 0.25);
	/* Edge between a band and the page. Light mode needs none -- black against
	   white is already an obvious seam. */
	--rt-band-edge: transparent;

	--rt-accent: #ff4a1c;
	--rt-accent-ink: #d5350c;
	--rt-link: #0b4fd1;
	--rt-link-hover: #ff4a1c;
	--rt-focus: #0ea5e9;

	--rt-font-display: "Archivo", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--rt-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--rt-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--rt-step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.83rem);
	--rt-step-0: clamp(0.94rem, 0.92rem + 0.12vw, 1rem);
	--rt-step-1: clamp(1.06rem, 1rem + 0.3vw, 1.19rem);
	--rt-step-2: clamp(1.25rem, 1.14rem + 0.5vw, 1.5rem);
	--rt-step-3: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
	--rt-step-4: clamp(1.8rem, 1.45rem + 1.6vw, 2.7rem);
	--rt-step-5: clamp(2.1rem, 1.5rem + 2.8vw, 3.6rem);

	--rt-container: 1280px;
	--rt-gap: clamp(1rem, 0.6rem + 1.2vw, 1.75rem);
	--rt-radius: 3px;
	--rt-header-h: 60px;

	--rt-shadow: 0 1px 2px rgba(11, 13, 18, 0.06), 0 8px 24px rgba(11, 13, 18, 0.06);
}

[data-theme="dark"] {
	--rt-paper: #0b0d12;
	--rt-paper-2: #12151c;
	--rt-paper-3: #1b1f28;
	--rt-ink: #ffffff;
	--rt-ink-soft: #e7e9ee;
	--rt-text: #e7e9ee;
	--rt-muted: #9aa2b1;
	--rt-line: #232833;
	--rt-line-strong: #333a48;
	--rt-link: #7fb0ff;

	/* The page itself is near-black here, so lift the bands above it -- at
	   #0b0d12 they would disappear into the background. Text stays white. */
	--rt-band: #171b23;
	--rt-band-line: rgba(255, 255, 255, 0.11);
	--rt-band-line-strong: rgba(255, 255, 255, 0.2);
	--rt-band-edge: rgba(255, 255, 255, 0.09);

	--rt-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* ==========================================================================
   2. Base
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--rt-header-h) + 12px);
}

body {
	margin: 0;
	background: var(--rt-paper);
	color: var(--rt-text);
	font-family: var(--rt-font-body);
	font-size: var(--rt-step-0);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeSpeed;
	overflow-wrap: break-word;
}

img,
picture,
video,
iframe,
svg { max-width: 100%; height: auto; }

img { display: block; background: var(--rt-paper-2); }

a { color: var(--rt-link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--rt-link-hover); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--rt-font-display);
	color: var(--rt-ink);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.12;
	margin: 0 0 0.5em;
	text-wrap: balance;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.25em; }

blockquote {
	margin: 1.75em 0;
	padding: 0 0 0 1.15em;
	border-left: 4px solid var(--rt-accent);
	font-family: var(--rt-font-display);
	font-size: var(--rt-step-2);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--rt-ink);
}

figure { margin: 0; }
figcaption {
	margin-top: 0.5rem;
	font-size: var(--rt-step--1);
	color: var(--rt-muted);
	line-height: 1.45;
}

code, kbd, pre { font-family: var(--rt-font-mono); font-size: 0.9em; }
pre {
	overflow: auto;
	padding: 1rem;
	background: var(--rt-paper-2);
	border: 1px solid var(--rt-line);
	border-radius: var(--rt-radius);
}
code { background: var(--rt-paper-2); padding: 0.15em 0.35em; border-radius: 2px; }
pre code { background: none; padding: 0; }

hr { border: 0; border-top: 1px solid var(--rt-line); margin: 2rem 0; }

table { width: 100%; border-collapse: collapse; font-size: var(--rt-step--1); }
th, td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--rt-line); text-align: left; }
th { font-family: var(--rt-font-display); color: var(--rt-ink); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--rt-focus);
	outline-offset: 2px;
	border-radius: 2px;
}

::selection { background: var(--rt-accent); color: #fff; }

/* ==========================================================================
   3. Layout primitives
   ========================================================================== */

.rt-container {
	width: 100%;
	max-width: var(--rt-container);
	margin-inline: auto;
	padding-inline: clamp(0.9rem, 0.4rem + 1.6vw, 1.5rem);
}

.rt-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	padding: 0.75rem 1rem;
	background: var(--rt-band);
	color: var(--rt-band-ink);
	font-weight: 700;
}
.rt-skip:focus { left: 0; color: var(--rt-band-ink); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.rt-main { padding-block: clamp(1.25rem, 0.8rem + 1.4vw, 2.25rem); }

.rt-shell {
	display: grid;
	gap: var(--rt-gap);
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1000px) {
	.rt-shell--sidebar { grid-template-columns: minmax(0, 1fr) 300px; }
}

.rt-defer { content-visibility: auto; contain-intrinsic-size: auto 700px; }

/* ==========================================================================
   4. Header + navigation
   ========================================================================== */

.rt-topstrip {
	background: var(--rt-band);
	color: var(--rt-band-ink);
	border-bottom: 1px solid var(--rt-band-edge);
	font-size: var(--rt-step--1);
}
.rt-topstrip a { color: var(--rt-band-ink); text-decoration: none; opacity: 0.85; }
.rt-topstrip a:hover { opacity: 1; color: var(--rt-band-ink); text-decoration: underline; }
.rt-topstrip__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 34px;
	overflow: hidden;
}
.rt-topstrip__list { display: flex; gap: 1rem; margin: 0; padding: 0; list-style: none; white-space: nowrap; }
@media (max-width: 720px) { .rt-topstrip { display: none; } }

.rt-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--rt-paper);
	border-bottom: 1px solid var(--rt-line);
	transition: transform 0.25s ease;
}
.rt-header--hidden { transform: translateY(-102%); }

.rt-header__bar {
	display: flex;
	align-items: center;
	gap: clamp(0.5rem, 0.2rem + 1vw, 1.25rem);
	min-height: var(--rt-header-h);
}

.rt-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
	flex: 0 0 auto;
}
.rt-brand__mark {
	font-family: var(--rt-font-display);
	font-size: clamp(1.15rem, 1rem + 0.8vw, 1.6rem);
	font-weight: 900;
	letter-spacing: -0.045em;
	color: var(--rt-ink);
	line-height: 1;
	text-transform: uppercase;
}
.rt-brand__mark em { font-style: normal; color: var(--rt-accent); }
.rt-brand img { max-height: 40px; width: auto; }

.rt-nav { flex: 1 1 auto; min-width: 0; }
.rt-nav__list {
	display: flex;
	align-items: center;
	gap: clamp(0.6rem, 0.2rem + 0.9vw, 1.3rem);
	margin: 0; padding: 0;
	list-style: none;
}
.rt-nav__list > li { position: relative; }
.rt-nav__list a {
	display: block;
	padding: 0.35rem 0;
	font-family: var(--rt-font-display);
	font-size: 0.86rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--rt-ink);
	text-decoration: none;
	white-space: nowrap;
}
.rt-nav__list a:hover,
.rt-nav__list .current-menu-item > a { color: var(--rt-accent); }

.rt-nav__list .sub-menu {
	position: absolute;
	top: 100%;
	left: -0.75rem;
	min-width: 210px;
	margin: 0; padding: 0.4rem 0;
	list-style: none;
	background: var(--rt-paper);
	border: 1px solid var(--rt-line);
	box-shadow: var(--rt-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.rt-nav__list li:hover > .sub-menu,
.rt-nav__list li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.rt-nav__list .sub-menu a { padding: 0.5rem 0.9rem; text-transform: none; letter-spacing: 0; font-size: 0.9rem; }

@media (max-width: 999px) { .rt-nav { display: none; } }

.rt-header__tools { display: flex; align-items: center; gap: 0.35rem; margin-left: auto; }

.rt-iconbtn {
	display: inline-grid;
	place-items: center;
	width: 38px; height: 38px;
	padding: 0;
	background: none;
	border: 1px solid transparent;
	border-radius: var(--rt-radius);
	color: var(--rt-ink);
	cursor: pointer;
	line-height: 0;
}
.rt-iconbtn:hover { background: var(--rt-paper-2); border-color: var(--rt-line); color: var(--rt-accent); }
.rt-iconbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.rt-iconbtn--menu { display: none; }
@media (max-width: 999px) { .rt-iconbtn--menu { display: inline-grid; } }

[data-theme="dark"] .rt-sun,
.rt-moon { display: none; }
[data-theme="dark"] .rt-moon { display: block; }
.rt-sun { display: block; }

/* Search drawer */
.rt-searchbar {
	display: none;
	border-top: 1px solid var(--rt-line);
	background: var(--rt-paper-2);
	padding-block: 0.75rem;
}
.rt-searchbar.is-open { display: block; }

/* Mobile drawer */
.rt-drawer {
	position: fixed;
	inset: 0 0 0 auto;
	width: min(88vw, 360px);
	z-index: 200;
	background: var(--rt-paper);
	border-left: 1px solid var(--rt-line);
	transform: translateX(101%);
	transition: transform 0.28s cubic-bezier(0.3, 0.8, 0.3, 1);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 1rem 1.25rem 3rem;
}
.rt-drawer.is-open { transform: none; }
.rt-drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.rt-drawer ul { list-style: none; margin: 0; padding: 0; }
.rt-drawer li { border-bottom: 1px solid var(--rt-line); }
.rt-drawer a {
	display: block;
	padding: 0.8rem 0;
	font-family: var(--rt-font-display);
	font-weight: 700;
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--rt-ink);
	text-decoration: none;
}
.rt-drawer .sub-menu a { padding-left: 1rem; text-transform: none; font-weight: 600; font-size: 0.92rem; color: var(--rt-muted); }

.rt-scrim {
	position: fixed;
	inset: 0;
	z-index: 150;
	background: rgba(11, 13, 18, 0.55);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s;
}
.rt-scrim.is-open { opacity: 1; visibility: visible; }
body.rt-locked { overflow: hidden; }

/* Reading progress */
.rt-progress {
	position: absolute;
	left: 0; bottom: -1px;
	height: 3px;
	width: 0;
	background: var(--rt-accent);
	transition: width 0.1s linear;
}

/* ==========================================================================
   5. Kickers, meta, badges
   ========================================================================== */

.rt-kicker {
	display: inline-block;
	margin-bottom: 0.4rem;
	font-family: var(--rt-font-display);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--rt-accent);
	text-decoration: none;
}
.rt-kicker:hover { color: var(--rt-accent-ink); text-decoration: underline; }

.rt-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.6rem;
	font-size: var(--rt-step--1);
	color: var(--rt-muted);
}
.rt-meta a { color: inherit; text-decoration: none; font-weight: 600; }
.rt-meta a:hover { color: var(--rt-accent); text-decoration: underline; }
.rt-meta__sep { opacity: 0.45; }

.rt-badge {
	display: inline-block;
	padding: 0.15rem 0.45rem;
	background: var(--rt-accent);
	color: #fff;
	font-family: var(--rt-font-display);
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: 2px;
}

.rt-sectionhead {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
	padding-bottom: 0.6rem;
	border-bottom: 3px solid var(--rt-ink);
}
.rt-sectionhead__title {
	margin: 0;
	font-size: var(--rt-step-2);
	font-weight: 900;
	letter-spacing: -0.03em;
	text-transform: uppercase;
}
.rt-sectionhead__title a { color: inherit; text-decoration: none; }
.rt-sectionhead__more {
	font-family: var(--rt-font-display);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--rt-accent);
	text-decoration: none;
	white-space: nowrap;
}

/* ==========================================================================
   6. Cards
   ========================================================================== */

.rt-card { display: grid; gap: 0.7rem; min-width: 0; }
.rt-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--rt-radius);
	background: var(--rt-paper-2);
	aspect-ratio: 16 / 9;
}
.rt-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease, opacity 0.3s ease;
}
.rt-card:hover .rt-card__media img { transform: scale(1.035); }
.rt-card__title {
	margin: 0;
	font-size: var(--rt-step-1);
	line-height: 1.18;
}
.rt-card__title a { color: var(--rt-ink); text-decoration: none; }
.rt-card__title a:hover { color: var(--rt-accent); }
.rt-card__dek {
	margin: 0;
	font-size: var(--rt-step--1);
	color: var(--rt-muted);
	line-height: 1.5;
}
.rt-card__body { display: grid; gap: 0.4rem; min-width: 0; }

/* Lead / hero card */
.rt-card--lead .rt-card__media { aspect-ratio: 16 / 9; border-radius: var(--rt-radius); }
.rt-card--lead .rt-card__title { font-size: var(--rt-step-4); letter-spacing: -0.035em; }
.rt-card--lead .rt-card__dek { font-size: var(--rt-step-0); }

/* Overlay card */
.rt-card--overlay { position: relative; }
.rt-card--overlay .rt-card__media { aspect-ratio: 4 / 3; }
.rt-card--overlay .rt-card__body {
	position: absolute;
	inset: auto 0 0 0;
	padding: clamp(0.9rem, 0.5rem + 1.2vw, 1.5rem);
	background: linear-gradient(to top, rgba(6, 8, 12, 0.92) 12%, rgba(6, 8, 12, 0.55) 55%, rgba(6, 8, 12, 0) 100%);
}
.rt-card--overlay .rt-card__title a,
.rt-card--overlay .rt-card__dek,
.rt-card--overlay .rt-meta,
.rt-card--overlay .rt-meta a { color: #fff; }
.rt-card--overlay .rt-card__title a:hover { color: #ffd7cb; }
.rt-card--overlay .rt-kicker { color: #ff8c6b; }

/* Horizontal list card */
.rt-card--row {
	grid-template-columns: 116px minmax(0, 1fr);
	gap: 0.85rem;
	align-items: start;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--rt-line);
}
.rt-card--row .rt-card__media { aspect-ratio: 1 / 1; }
.rt-card--row .rt-card__title { font-size: var(--rt-step-0); line-height: 1.25; }
.rt-card--row .rt-card__dek { display: none; }

@media (min-width: 700px) {
	.rt-card--row { grid-template-columns: 220px minmax(0, 1fr); gap: 1.15rem; padding-bottom: 1.35rem; }
	.rt-card--row .rt-card__media { aspect-ratio: 16 / 10; }
	.rt-card--row .rt-card__title { font-size: var(--rt-step-2); }
	.rt-card--row .rt-card__dek { display: block; }
}

/* Numbered trending list */
.rt-rank { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.rt-rank li {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr);
	gap: 0.7rem;
	padding: 0.7rem 0;
	border-bottom: 1px solid var(--rt-line);
	counter-increment: rank;
}
.rt-rank li:last-child { border-bottom: 0; }
.rt-rank li::before {
	content: counter(rank);
	font-family: var(--rt-font-display);
	font-size: 1.4rem;
	font-weight: 900;
	line-height: 1;
	color: var(--rt-accent);
	letter-spacing: -0.05em;
}
.rt-rank a {
	font-family: var(--rt-font-display);
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1.25;
	color: var(--rt-ink);
	text-decoration: none;
}
.rt-rank a:hover { color: var(--rt-accent); }

/* Grids */
.rt-grid { display: grid; gap: var(--rt-gap); }
.rt-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.rt-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.rt-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }

.rt-river { display: grid; gap: 1.35rem; }

/* Front hero */
.rt-hero { display: grid; gap: var(--rt-gap); margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
@media (min-width: 900px) {
	.rt-hero { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; }
	.rt-hero__side { display: grid; gap: var(--rt-gap); }
	/* Overlay hero ships a single child — let it span the full width. */
	.rt-hero:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   7. Sidebar / widgets
   ========================================================================== */

.rt-sidebar { display: grid; gap: var(--rt-gap); align-content: start; }
@media (min-width: 1000px) {
	.rt-sidebar { position: sticky; top: calc(var(--rt-header-h) + 16px); }
}

.rt-widget {
	padding: 1rem;
	background: var(--rt-paper-2);
	border: 1px solid var(--rt-line);
	border-radius: var(--rt-radius);
	font-size: var(--rt-step--1);
}
.rt-widget__title,
.rt-widget .widget-title {
	margin: 0 0 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--rt-ink);
	font-size: 0.95rem;
	font-weight: 900;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}
.rt-widget ul { list-style: none; margin: 0; padding: 0; }
.rt-widget li + li { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--rt-line); }
.rt-widget a { color: var(--rt-ink); text-decoration: none; font-weight: 600; }
.rt-widget a:hover { color: var(--rt-accent); }

/* Newsletter strip */
.rt-newsletter {
	display: grid;
	gap: 1rem;
	align-items: center;
	padding: clamp(1.25rem, 0.8rem + 1.6vw, 2rem);
	margin-block: clamp(1.5rem, 1rem + 2vw, 2.5rem);
	background: var(--rt-band);
	color: var(--rt-band-ink);
	border: 1px solid var(--rt-band-edge);
	border-radius: var(--rt-radius);
}
@media (min-width: 800px) { .rt-newsletter { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); } }
.rt-newsletter h2 { color: var(--rt-band-ink); margin: 0 0 0.35rem; font-size: var(--rt-step-2); }
.rt-newsletter p { margin: 0; color: var(--rt-band-ink-soft); font-size: var(--rt-step--1); }
.rt-newsletter__form { display: flex; gap: 0.5rem; }

/* Forms */
.rt-input,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
textarea {
	width: 100%;
	padding: 0.65rem 0.8rem;
	font: inherit;
	color: var(--rt-text);
	background: var(--rt-paper);
	border: 1px solid var(--rt-line-strong);
	border-radius: var(--rt-radius);
}
textarea { min-height: 140px; resize: vertical; }

.rt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.68rem 1.15rem;
	background: var(--rt-accent);
	color: #fff;
	border: 0;
	border-radius: var(--rt-radius);
	font-family: var(--rt-font-display);
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease, transform 0.15s ease;
}
.rt-btn:hover { background: var(--rt-accent-ink); color: #fff; transform: translateY(-1px); }
.rt-btn--ghost {
	background: transparent;
	color: var(--rt-ink);
	border: 2px solid var(--rt-ink);
}
.rt-btn--ghost:hover { background: var(--rt-ink); color: var(--rt-paper); }

.rt-searchform { display: flex; gap: 0.5rem; }

/* ==========================================================================
   8. Ad slots  (space reserved to keep CLS at zero)
   ========================================================================== */

.rt-ad {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	margin-inline: auto;
	max-width: 100%;
	overflow: hidden;
	background: var(--rt-paper-2);
	border: 1px dashed var(--rt-line);
	border-radius: var(--rt-radius);
}
.rt-ad > ins,
.rt-ad > div,
.rt-ad iframe { max-width: 100%; }
.rt-ad__label {
	font-family: var(--rt-font-display);
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--rt-muted);
}
.rt-ad.is-filled { background: none; border-color: transparent; }

.rt-ad--leaderboard { min-height: 100px; margin-block: 1rem; }
@media (min-width: 780px) { .rt-ad--leaderboard { min-height: 90px; } }
.rt-ad--billboard { min-height: 250px; margin-block: 1.25rem; }
.rt-ad--rectangle { min-height: 250px; margin-block: 1.25rem; }
.rt-ad--halfpage { min-height: 600px; }
.rt-ad--infeed { min-height: 250px; }
.rt-ad--incontent { min-height: 250px; margin-block: 1.75rem; }

.rt-ad--anchor {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 120;
	min-height: 50px;
	margin: 0;
	border: 0;
	border-top: 1px solid var(--rt-line);
	background: var(--rt-paper);
	box-shadow: 0 -4px 18px rgba(11, 13, 18, 0.12);
}
.rt-ad--anchor .rt-ad__close {
	position: absolute;
	top: -26px; right: 8px;
	width: 26px; height: 26px;
	display: grid; place-items: center;
	background: var(--rt-paper);
	border: 1px solid var(--rt-line);
	border-bottom: 0;
	border-radius: 3px 3px 0 0;
	color: var(--rt-ink);
	cursor: pointer;
	font-size: 15px;
	line-height: 1;
}
@media (min-width: 1000px) { .rt-ad--anchor { display: none; } }

/* ==========================================================================
   9. Single post
   ========================================================================== */

.rt-article__head { margin-bottom: 1.25rem; }
.rt-article__title {
	font-size: var(--rt-step-5);
	letter-spacing: -0.04em;
	line-height: 1.05;
	margin-bottom: 0.5rem;
}
.rt-article__dek {
	margin: 0 0 0.9rem;
	font-size: var(--rt-step-1);
	line-height: 1.45;
	color: var(--rt-muted);
	max-width: 62ch;
}
.rt-article__hero { margin-bottom: 1.5rem; }
.rt-article__hero img { width: 100%; border-radius: var(--rt-radius); }

.rt-share { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.25rem; }
.rt-share--rail {
	display: none;
	position: sticky;
	top: calc(var(--rt-header-h) + 20px);
	flex-direction: column;
	align-self: start;
	margin-bottom: 0;
}
.rt-share--inline { display: flex; }

.rt-article__layout { display: grid; gap: var(--rt-gap); }

/* Desktop: swap the inline share row for the sticky rail, and only then add the
   rail's column. Two rules to respect here:
   1. These overrides MUST come after the base .rt-share--rail rule above -- a
      media query adds no specificity, so source order alone decides the winner.
   2. The columns hang off --rail, which single.php adds only when the rail is
      actually rendered. A layout with no rail stays single-column, instead of
      dropping its content into a 56px track and stacking one word per line. */
@media (min-width: 1000px) {
	.rt-article__layout--rail { grid-template-columns: auto minmax(0, 1fr); }
	.rt-share--rail { display: flex; }
	.rt-share--inline { display: none; }
}
.rt-share a {
	display: grid;
	place-items: center;
	width: 38px; height: 38px;
	border: 1px solid var(--rt-line-strong);
	border-radius: var(--rt-radius);
	color: var(--rt-ink);
	text-decoration: none;
}
.rt-share svg { width: 17px; height: 17px; fill: currentColor; }
.rt-share a:hover { background: var(--rt-ink); color: var(--rt-paper); border-color: var(--rt-ink); }

.rt-content { font-size: var(--rt-step-1); line-height: 1.72; }
.rt-content > * { max-width: 720px; margin-inline: auto; }
.rt-content > .alignwide { max-width: 960px; }
.rt-content > .alignfull { max-width: none; }
.rt-content h2 { font-size: var(--rt-step-3); margin-top: 2em; }
.rt-content h3 { font-size: var(--rt-step-2); margin-top: 1.6em; }
.rt-content figure,
.rt-content .wp-block-image { margin-block: 1.75em; }
.rt-content img { border-radius: var(--rt-radius); }
.rt-content a { font-weight: 600; }
.rt-content ul, .rt-content ol { padding-left: 1.35em; }
.rt-content li + li { margin-top: 0.35em; }
.rt-content .rt-ad { max-width: 100%; }

.alignleft { float: left; margin: 0.35rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.35rem 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; }
.wp-caption { max-width: 100%; }
.sticky .rt-card__title::after { content: " ★"; color: var(--rt-accent); }

.rt-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-block: 1.75rem; }
.rt-tags a {
	padding: 0.28rem 0.6rem;
	background: var(--rt-paper-2);
	border: 1px solid var(--rt-line);
	border-radius: 100px;
	font-size: var(--rt-step--1);
	font-weight: 600;
	color: var(--rt-ink);
	text-decoration: none;
}
.rt-tags a:hover { background: var(--rt-ink); color: var(--rt-paper); }

.rt-author {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 1rem;
	padding: 1.15rem;
	margin-block: 2rem;
	background: var(--rt-paper-2);
	border: 1px solid var(--rt-line);
	border-radius: var(--rt-radius);
}
.rt-author img { border-radius: 50%; }
.rt-author h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.rt-author p { margin: 0; font-size: var(--rt-step--1); color: var(--rt-muted); }

.rt-prevnext {
	display: grid;
	gap: 1rem;
	margin-block: 2rem;
	padding-block: 1.25rem;
	border-block: 1px solid var(--rt-line);
}
@media (min-width: 700px) { .rt-prevnext { grid-template-columns: 1fr 1fr; } }
.rt-prevnext__item { text-decoration: none; }
.rt-prevnext__label {
	display: block;
	font-family: var(--rt-font-display);
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--rt-muted);
	margin-bottom: 0.3rem;
}
.rt-prevnext__title {
	font-family: var(--rt-font-display);
	font-weight: 800;
	font-size: 1.02rem;
	line-height: 1.25;
	color: var(--rt-ink);
}
.rt-prevnext__item:hover .rt-prevnext__title { color: var(--rt-accent); }
.rt-prevnext__item--next { text-align: right; }

/* Comments */
.rt-comments { margin-top: 2.5rem; }
.rt-comments .comment-list { list-style: none; margin: 0; padding: 0; }
.rt-comments .comment-list ol { list-style: none; padding-left: clamp(0.75rem, 2vw, 2rem); }
.rt-comments article { padding-block: 1.15rem; border-bottom: 1px solid var(--rt-line); }
.rt-comments .comment-meta { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; font-size: var(--rt-step--1); }
.rt-comments .comment-author img { border-radius: 50%; }
.rt-comments .comment-author b { font-family: var(--rt-font-display); }
.comment-respond { margin-top: 1.75rem; }
.comment-form p { margin-bottom: 0.9rem; }
.comment-form label { display: block; font-weight: 600; font-size: var(--rt-step--1); margin-bottom: 0.25rem; }

/* Pagination */
.rt-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--rt-line);
}
.rt-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-width: 42px; height: 42px;
	padding: 0 0.7rem;
	background: var(--rt-paper-2);
	border: 1px solid var(--rt-line-strong);
	border-radius: var(--rt-radius);
	font-family: var(--rt-font-display);
	font-weight: 700;
	font-size: var(--rt-step--1);
	color: var(--rt-ink);
	text-decoration: none;
}
.rt-pagination .page-numbers.dots {
	min-width: 24px;
	padding: 0;
	background: none;
	border-color: transparent;
	color: var(--rt-muted);
}
.rt-pagination .page-numbers:hover,
.rt-pagination .page-numbers.current {
	background: var(--rt-ink);
	border-color: var(--rt-ink);
	color: var(--rt-paper);
}
/* Prev/next carry a word, so they read as the control rather than as one more
   number. An outlined chip is only ~1.6:1 against the page in either scheme,
   which is too quiet for the main way through a feed. */
.rt-pagination .prev,
.rt-pagination .next {
	background: var(--rt-ink);
	border-color: var(--rt-ink);
	color: var(--rt-paper);
}
.rt-pagination .next { margin-left: auto; }
.rt-pagination .prev:hover,
.rt-pagination .next:hover {
	background: var(--rt-accent);
	border-color: var(--rt-accent);
	color: #fff;
}
.rt-loadmore { display: grid; place-items: center; margin-top: 1.75rem; }

/* ==========================================================================
   10. Footer
   ========================================================================== */

.rt-footer {
	margin-top: clamp(2rem, 1.4rem + 2.4vw, 3.5rem);
	padding-top: clamp(1.75rem, 1.2rem + 2vw, 3rem);
	background: var(--rt-band);
	color: var(--rt-band-ink-soft);
	border-top: 1px solid var(--rt-band-edge);
	font-size: var(--rt-step--1);
}
.rt-footer h2, .rt-footer h3, .rt-footer .widget-title, .rt-footer .rt-widget__title {
	color: var(--rt-band-ink);
	border-color: var(--rt-band-line-strong);
}
.rt-footer a { color: var(--rt-band-ink-link); text-decoration: none; }
.rt-footer a:hover { color: var(--rt-band-ink); text-decoration: underline; }
.rt-footer .rt-widget { background: none; border: 0; padding: 0; }
.rt-footer .rt-widget li + li { border-color: var(--rt-band-line); }
.rt-footer__cols {
	display: grid;
	gap: var(--rt-gap);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
	padding-bottom: 1.75rem;
}
.rt-footer__brand .rt-brand__mark { color: var(--rt-band-ink); }
.rt-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding-block: 1.15rem;
	border-top: 1px solid var(--rt-band-line);
	font-size: 0.78rem;
}
.rt-footer__bottom ul { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0; padding: 0; list-style: none; }

.rt-totop {
	position: fixed;
	right: 14px; bottom: 14px;
	z-index: 110;
	width: 42px; height: 42px;
	display: grid; place-items: center;
	background: var(--rt-band);
	color: var(--rt-band-ink);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s;
}
.rt-totop.is-visible { opacity: 0.9; visibility: visible; }
.rt-totop:hover { opacity: 1; }
.rt-totop svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
body.rt-has-anchor-ad .rt-totop { bottom: 68px; }

/* ==========================================================================
   11. Misc states
   ========================================================================== */

.rt-empty { padding: clamp(1.5rem, 1rem + 2vw, 3rem) 0; text-align: center; }
.rt-empty h1 { font-size: var(--rt-step-4); }

.rt-archivehead {
	padding-bottom: 1rem;
	margin-bottom: 1.5rem;
	border-bottom: 3px solid var(--rt-ink);
}
.rt-archivehead h1 { margin: 0; font-size: var(--rt-step-4); text-transform: uppercase; letter-spacing: -0.035em; }
.rt-archivehead p { margin: 0.5rem 0 0; color: var(--rt-muted); max-width: 70ch; }

.rt-breadcrumbs { font-size: var(--rt-step--1); color: var(--rt-muted); margin-bottom: 0.75rem; }
.rt-breadcrumbs a { color: inherit; text-decoration: none; font-weight: 600; }
.rt-breadcrumbs a:hover { color: var(--rt-accent); }
.rt-breadcrumbs span + span::before { content: "/"; margin: 0 0.4rem; opacity: 0.5; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

@media print {
	.rt-header, .rt-footer, .rt-sidebar, .rt-ad, .rt-share, .rt-totop, .rt-drawer, .rt-topstrip { display: none !important; }
	.rt-content { font-size: 11pt; }
	a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
