/*
Theme Name:   RigTests
Theme URI:    https://rigtests.com/
Description:  Dark, fast child theme for the RigTests hardware test site. Needs the free GeneratePress theme installed.
Author:       RigTests
Template:     generatepress
Version:      1.1.0
Requires PHP: 7.4
Text Domain:  rigtests
*/

/* ===== Design tokens ===== */
:root {
	--rt-bg: #0b0f15;
	--rt-panel: #10161f;
	--rt-surface: #141b26;
	--rt-surface-2: #1a2230;
	--rt-line: #2a3446;
	--rt-text: #e8ecf3;
	--rt-muted: #9aa4b6;
	--rt-accent: #b8ff3c;
	--rt-accent-ink: #0b0f15;
	--rt-good: #3ddc84;
	--rt-warn: #ffb02e;
	--rt-bad: #ff5468;
	--rt-radius: 14px;
	--rt-radius-sm: 9px;
	--rt-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--rt-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
	--rt-content: 720px;
	--rt-wide: 1040px;
}

/* GeneratePress colors (overrides its cached inline CSS). */
:root {
	--contrast: #e8ecf3;
	--contrast-2: #9aa4b6;
	--contrast-3: #2a3446;
	--base: #141b26;
	--base-2: #0b0f15;
	--base-3: #10161f;
	--accent: #b8ff3c;
}
body, .site, .site-content, .one-container .site-content, .separate-containers .site-main > *,
.container.grid-container, .inside-article, .one-container .container, .main-navigation .main-nav ul li a { background-color: transparent; }
body, .site, .one-container .container { background-color: var(--rt-bg); }
.entry-content, .entry-summary, .page-content { color: var(--rt-text); }

/* ===== Base ===== */
html { -webkit-text-size-adjust: 100%; }
body {
	background: var(--rt-bg);
	color: var(--rt-text);
	font-family: var(--rt-font);
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
body, button, input, select, textarea { font-family: var(--rt-font); }
::selection { background: var(--rt-accent); color: var(--rt-accent-ink); }
a { color: var(--rt-accent); text-underline-offset: 3px; }
a:hover, a:focus { color: #d4ff85; }
:focus-visible { outline: 2px solid var(--rt-accent); outline-offset: 2px; }

h1, h2, h3, h4, h5, h6 {
	color: var(--rt-text);
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.25;
}
h1 { font-size: clamp(30px, 4.2vw, 44px); }
h2 { font-size: clamp(23px, 2.6vw, 29px); margin-top: 1.9em; margin-bottom: 0.55em; }
h3 { font-size: 20px; margin-top: 1.5em; margin-bottom: 0.4em; }
p { margin-bottom: 1.15em; }
strong { color: #fff; }
hr { background: var(--rt-line); }
code, kbd, pre { font-family: var(--rt-mono); }
kbd {
	display: inline-block;
	padding: 1px 7px;
	border: 1px solid var(--rt-line);
	border-bottom-width: 2px;
	border-radius: 6px;
	background: var(--rt-surface);
	font-size: 0.85em;
	line-height: 1.5;
}
img { border-radius: var(--rt-radius-sm); }

/* ===== Header ===== */
.site-header {
	background: rgba(11, 15, 21, 0.86);
	border-bottom: 1px solid var(--rt-line);
	position: sticky;
	top: 0;
	z-index: 50;
	-webkit-backdrop-filter: saturate(140%) blur(10px);
	backdrop-filter: saturate(140%) blur(10px);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.inside-header { padding-top: 14px; padding-bottom: 14px; }
.main-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.main-title a, .main-title a:hover { color: var(--rt-text); text-decoration: none; }
.rt-logo { display: inline-flex; align-items: center; gap: 9px; }
.rt-logo-text span { color: var(--rt-accent); }
.rt-logo-mark {
	width: 22px; height: 22px; border-radius: 6px;
	border: 2px solid var(--rt-accent);
	position: relative; flex: none;
}
.rt-logo-mark::after {
	content: ""; position: absolute; left: 4px; right: 4px; top: 50%;
	height: 2px; margin-top: -1px; background: var(--rt-accent);
	box-shadow: 0 -5px 0 var(--rt-accent), 0 5px 0 var(--rt-accent);
	transform: scaleX(0.7); transform-origin: left;
}

/* ===== Navigation ===== */
.main-navigation, .main-navigation ul ul { background: transparent; }
.main-navigation .main-nav ul li a {
	font-size: 15px; font-weight: 600; color: var(--rt-muted);
	padding-left: 14px; padding-right: 14px; line-height: 52px;
}
.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current-menu-ancestor > a { color: var(--rt-text); }
.main-navigation ul ul {
	background: var(--rt-surface);
	border: 1px solid var(--rt-line);
	border-radius: var(--rt-radius-sm);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
	padding: 6px 0;
	width: 240px;
}
.main-navigation .main-nav ul ul li a { line-height: 1.4; padding: 10px 16px; font-size: 14.5px; }
.main-navigation .main-nav ul ul li:hover > a { background: var(--rt-surface-2); }
.main-navigation .menu-toggle, .main-navigation .menu-toggle:hover { color: var(--rt-text); background: transparent; }
.main-navigation.toggled .main-nav ul ul { border: 0; box-shadow: none; width: 100%; background: var(--rt-panel); }
@media (max-width: 768px) {
	.main-navigation.toggled .main-nav > ul { background: var(--rt-bg); border-top: 1px solid var(--rt-line); }
	.main-navigation .main-nav ul li a { line-height: 48px; }
}

/* ===== Content area ===== */
.site-content { padding-top: 0; }
.separate-containers .inside-article,
.one-container .site-content,
.inside-page-header { background: transparent; }
.one-container .site-content { padding: 34px 20px 70px; }
@media (min-width: 769px) { .one-container .site-content { padding: 44px 40px 90px; } }

.entry-header { max-width: var(--rt-wide); margin: 0 auto 26px; text-align: center; }
.entry-title { margin-bottom: 10px; }
.entry-meta { color: var(--rt-muted); font-size: 14px; }
.entry-meta a { color: var(--rt-muted); }
.entry-summary { color: var(--rt-muted); }

/* Prose stays readable; tools and wide blocks get more room. */
.entry-content > * { max-width: var(--rt-content); margin-left: auto; margin-right: auto; }
.entry-content > .rt-wide,
.entry-content > .rt-tool,
.entry-content > .alignwide { max-width: var(--rt-wide); }
.entry-content > .alignfull { max-width: none; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin-left: auto; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content li::marker { color: var(--rt-accent); }

/* Tables */
.entry-content table, .wp-block-table table {
	width: 100%; border-collapse: collapse; font-size: 15.5px;
	border: 1px solid var(--rt-line); border-radius: var(--rt-radius-sm); overflow: hidden;
}
.entry-content th, .entry-content td { border: 1px solid var(--rt-line); padding: 10px 14px; text-align: left; }
.entry-content th { background: var(--rt-surface); color: var(--rt-text); font-weight: 650; }
.wp-block-table { overflow-x: auto; }
.wp-block-table figcaption { color: var(--rt-muted); font-size: 14px; }

/* Quotes and notes */
.entry-content blockquote {
	border-left: 3px solid var(--rt-accent);
	background: var(--rt-surface);
	border-radius: 0 var(--rt-radius-sm) var(--rt-radius-sm) 0;
	padding: 14px 20px; color: var(--rt-text); font-style: normal;
}

/* Core buttons */
.wp-block-button__link, .button, button, input[type="submit"] {
	border-radius: 999px; font-weight: 650;
}
.wp-block-button__link { background: var(--rt-accent); color: var(--rt-accent-ink); }
.wp-block-button__link:hover { background: #d4ff85; color: var(--rt-accent-ink); }
.is-style-outline > .wp-block-button__link { background: transparent; color: var(--rt-text); border: 1px solid var(--rt-line); }

/* Forms */
input[type="text"], input[type="email"], input[type="url"], input[type="search"],
input[type="number"], input[type="tel"], textarea, select {
	background: var(--rt-surface); color: var(--rt-text);
	border: 1px solid var(--rt-line); border-radius: var(--rt-radius-sm);
}

/* FAQ blocks from Rank Math and Yoast */
.rank-math-faq-item, .schema-faq-section {
	background: var(--rt-surface);
	border: 1px solid var(--rt-line);
	border-radius: var(--rt-radius-sm);
	padding: 16px 20px; margin-bottom: 12px;
}
.rank-math-question, .schema-faq-question {
	display: block; font-size: 17.5px; font-weight: 700; color: var(--rt-text); margin: 0 0 6px;
}
.rank-math-answer p:last-child, .schema-faq-answer { margin-bottom: 0; color: #c9d0dc; }

/* Latest posts block (homepage guides) */
.wp-block-latest-posts { padding-left: 0 !important; }
.wp-block-latest-posts.is-grid { gap: 16px; display: grid !important; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.wp-block-latest-posts.is-grid li { width: auto !important; margin: 0 !important; }
.wp-block-latest-posts li::marker { content: none; }
.wp-block-latest-posts li {
	background: var(--rt-surface); border: 1px solid var(--rt-line);
	border-radius: var(--rt-radius); padding: 18px 20px;
}
.wp-block-latest-posts__post-title { color: var(--rt-text); font-weight: 650; text-decoration: none; }
.wp-block-latest-posts__post-excerpt { color: var(--rt-muted); font-size: 15px; margin: 6px 0 0; }

/* Archives (Guides) */
.blog .inside-article, .archive .inside-article {
	background: var(--rt-surface); border: 1px solid var(--rt-line);
	border-radius: var(--rt-radius); padding: 24px 26px; margin-bottom: 16px;
}
.blog .entry-header, .archive .entry-header { text-align: left; margin-bottom: 8px; }
.blog .entry-title, .archive .entry-title { font-size: 24px; }
.blog .entry-title a, .archive .entry-title a { color: var(--rt-text); text-decoration: none; }
.page-header { max-width: var(--rt-wide); margin: 0 auto 24px; }
.paging-navigation, .nav-links { color: var(--rt-muted); }

/* ===== Footer ===== */
.site-footer, .site-info { background: var(--rt-panel); color: var(--rt-muted); border-top: 1px solid var(--rt-line); }
.site-info { font-size: 14.5px; }
.inside-site-info { padding: 34px 20px; justify-content: center; }
.rt-footer { text-align: center; width: 100%; }
.rt-footer-links { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.rt-footer-links a { color: var(--rt-muted); text-decoration: none; }
.rt-footer-links a:hover { color: var(--rt-text); }
.rt-footer-note { margin: 0; font-size: 13.5px; }

/* ===== Small screens ===== */
@media (max-width: 600px) {
	body { font-size: 16.5px; }
	.inside-header { padding-left: 16px; padding-right: 16px; }
}

/* Respect reduced motion for theme transitions. */
@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; }
}
