/*
Theme Name: Capitalism Lab — Classic
Theme URI: https://www.capitalismlab.com/
Template: caplab-core
Author: Built for Capitalism Lab
Description: Direction 0. The existing Rundown look, kept as-is — dark tiled background, banner, white full-width content card, brown Georgia headings, bold blue links — but with the new navigation: a wrapping menu bar with mega panels on desktop and a working drawer on mobile. The lowest-risk option: returning visitors see the site they know, and the only thing that changes is that the menu finally works on a phone.
Version: 1.0.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: caplab
*/

/* ==========================================================================
   Values below were read from Rundown's own computed styles, not estimated:
     body background   rgb(32,32,32) + black_twill.png
     wrapper width     1180px
     h2                Georgia 30px/39px, rgb(132,60,11), weight 500
     body copy         sans-serif 15px/22px, rgb(34,34,34)
     links             rgb(31,95,168), bold, no underline
     content images    border-radius 8px
     banner            1160x314
   ========================================================================== */

:root {
	--clab-bg:            #202020;
	--clab-surface:       #f2f2f2;
	--clab-surface-2:     #e6e6e6;
	--clab-text:          #222222;
	--clab-text-dim:      #5a5a5a;
	--clab-heading:       #843c0b;   /* Rundown's brown heading */

	--clab-accent:        #843c0b;
	--clab-accent-ink:    #ffffff;

	--clab-link:          #1f5fa8;
	--clab-link-hover:    #14406f;

	--clab-border:        #dcdcdc;
	--clab-border-strong: #bcbcbc;

	/* Chrome matches the page background so the bar reads as part of the
	   tiled surface, as it does now. */
	--clab-header-bg:     #202020;
	--clab-header-ink:    #ffffff;
	--clab-header-dim:    #b4b4b4;
	--clab-header-border: rgba(255, 255, 255, .22);
	--clab-mega-bg:       #262626;
	--clab-mega-ink:      #ededed;
	--clab-drawer-bg:     #1c1c1c;

	/* Rundown's footer is a white card, not a dark band. */
	--clab-footer-bg:     #ffffff;
	--clab-footer-ink:    #222222;
	--clab-footer-dim:    #5a5a5a;
	--clab-footer-border: #e2e2e2;

	--clab-code-bg:       #f2f2f2;
	--clab-shadow:        0 10px 30px rgba(0, 0, 0, .5);
	--clab-focus:         #ffb100;

	/* RESTORED 2026-08-14 — Classic is a faithful replica again.

	   These two tokens were briefly removed so Classic would inherit caplab-core's
	   Inter and Poppins. That has been reverted at the owner's request: the live
	   site is the control, and a control that has been modernised is no longer a
	   control. Direction 0's job is to reproduce Rundown exactly, and Rundown is
	   Georgia headings on a generic sans body.

	   The modern typography is not lost — it is where it belongs, on the test
	   pages, each scoped by page ID in caplab-core:

	     /home-background-test2/  (10729)  Poppins + Inter
	     /home-background-test/   (10728)  system fonts, no webfont at all

	   Everything chrome-side rides on --clab-font-body — the top menu, the brand,
	   the footer and body text all resolve to it — so these two lines move the
	   whole site, not just the article.

	   REMOVED 2026-08-14. These two overrides are why no webfont had ever loaded:
	   caplab-core declares real @font-face blocks for Inter and points its tokens
	   at them, and these lines pointed the active child back at `sans-serif` and
	   Georgia — so nothing on the site ever NAMED Inter, and a font is only
	   fetched when something sets it. The files were on disk the whole time.

	   Dropping them lets Classic inherit the parent's Inter. That ends Classic's
	   life as a strict Rundown replica, which D2 settled anyway (Direction 3,
	   theme plan §8a) and which the font overrides had already half-abandoned. */

	--clab-container:      1180px;
	--clab-container-wide: 1180px;
	--clab-radius:         8px;
	--clab-radius-lg:      8px;
}

body {
	font-size: 15px;
	line-height: 22px;
	/* The tiled image is applied by functions.php, inheriting whatever the
	   Customizer or Rundown had set. */
	background-color: var(--clab-bg);
}

/*
 * A solid near-black bar. Rundown's nav sits directly on the tiled background,
 * but that theme's header does not stick — a translucent sticky bar would show
 * content sliding underneath it, which looks worse than a slightly darker
 * band. This reads as part of the same dark surface.
 */
.clab-header {
	/* #20243A rather than the near-black Rundown used. It is a dark navy drawn
	   from the same family as the #2B304F page ground the home page now carries,
	   so the bar reads as part of one palette instead of as a black strip sitting
	   on top of a coloured page. */
	background: #20243a;
	border-bottom: 1px solid var(--clab-header-border);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}

/* ------------------------------------------------------------ logo row ----
 *
 * Classic shows the wordmark twice: once in the header bar and again, far
 * larger, in the 1160x314 banner directly below the navigation. On desktop the
 * bar used to be dropped entirely — logo, tagline and search field — so the
 * menu was the first thing in the header, which is where Rundown puts it.
 *
 * CHANGED 2026-08-14. The parent now makes the header a single flex row with
 * the app icon beside the menu, and that is the site's header on every page.
 * `display: none` here would defeat it: this rule is (0,1,0), the parent's is
 * (0,1,0) too, and the child stylesheet loads second — so the child wins on
 * order alone regardless of what the parent says.
 *
 * That is exactly what happened when the parent's rules were unscoped from
 * body.home: `body.home .clab-header__bar` was (0,2,0) and had been beating this
 * rule, so the icon showed on the home page and nowhere else. Removing the
 * scope silently dropped it below this line and the icon vanished from every
 * page, with nothing failing.
 *
 * Below 1024px the bar stays regardless: it carries the burger, and that is the
 * only way to open the drawer. The bar's search field is hidden at every width
 * by the parent; the drawer keeps its own search at the top, where it is worth
 * the space.
 */
@media (min-width: 1024px) {
	/* No bar above it, so the rule that separated the two rows has nothing
	   left to separate. */
	.clab-header__navwrap { border-top: 0; }
	.clab-header__navwrap .clab-container { padding-block: .3rem; }
}

/* ---------------------------------------------------------------- banner */

.clab-banner { padding: 22px 0 0; }
.clab-banner img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--clab-radius);
}

/* ------------------------------------------------------------ navigation */

@media (min-width: 1024px) {
	/* Rundown's nav links: white, bold, roomy. Kept, so the bar still reads
	   the way it does today. */
	.clab-nav__item--depth-0 > .clab-nav__link {
		font-weight: 700;
		font-size: .94rem;
		color: #ffffff;
	}
	.clab-nav__item--depth-0:hover > .clab-nav__link,
	.clab-nav__item--depth-0.is-open > .clab-nav__link { color: #6fa8dc; }

	/* Rundown marks the current section in blue rather than with a rule. */
	.clab-nav__item--depth-0.current-menu-item > .clab-nav__link,
	.clab-nav__item--depth-0.current-menu-ancestor > .clab-nav__link {
		color: #4a9ae1;
		box-shadow: none;
	}

	.clab-mega { border-top-color: #6fa8dc; }
	.clab-mega__heading,
	.clab-mega__col > .clab-nav__link { color: #e8b271; }
	.clab-mega__list .clab-nav__link { color: #e2e2e2; }
	.clab-mega__list .clab-nav__link:hover { color: #fff; border-left-color: #6fa8dc; }

	/* The section headings need their own hover, stated at (0,3,0) and (0,4,0).
	   caplab-core now restates `color: inherit` for every hovered link inside
	   .clab-nav, to stop the global a:hover painting page-link navy onto header
	   surfaces. That rule is (0,2,1), which outranks the bare .clab-mega__heading
	   above at (0,1,0) — so without this the amber headings dropped to the panel's
	   grey ink under the pointer. Brighter amber rather than white, so a heading
	   still reads as a heading while the list items below go to #fff. */
	.clab-nav .clab-mega__heading:hover,
	.clab-nav .clab-mega__col > .clab-nav__link:hover { color: #f7d4a8; }
}

@media (max-width: 1023.98px) {
	.clab-nav [aria-current="page"] { box-shadow: inset 3px 0 0 #6fa8dc; }
}

/* ==========================================================================
   CONTENT — a single white card, the full width of the container
   ========================================================================== */

.clab-main { padding-top: 22px; }

.clab-main > .clab-container {
	background: #ffffff;
	border-radius: var(--clab-radius);
	padding: 26px 24px 34px;
}

/* Rundown runs text the full width of the card with no reading measure. */
.clab-article > * { max-width: none; }

.clab-article h1,
.clab-article h2 {
	font-family: var(--clab-font-display);
	color: var(--clab-heading);
	font-weight: 500;
	font-size: 30px;
	line-height: 39px;
	margin: 25px 0 15px;
}
.clab-article h1:first-child,
.clab-article h2:first-child { margin-top: 0; }

.clab-article h3 {
	font-family: var(--clab-font-display);
	color: var(--clab-heading);
	font-weight: 500;
	font-size: 24px;
	line-height: 32px;
	margin: 22px 0 12px;
}

.clab-pagehead__title {
	font-family: var(--clab-font-display);
	color: var(--clab-heading);
	font-weight: 500;
	font-size: 32px;
	line-height: 41px;
}

.clab-article p,
.clab-article li {
	font-family: var(--clab-font-body);
	font-size: 15px;
	line-height: 22px;
	color: var(--clab-text);
}
.clab-article p { margin-bottom: 22.5px; }

/* Rundown's links are bold and undecorated. */
.clab-article a {
	color: var(--clab-link);
	font-weight: 700;
	text-decoration: none;
}
.clab-article a:hover { color: var(--clab-link-hover); text-decoration: underline; }

.clab-article img {
	border-radius: 8px;
	box-shadow: none;
	border: 0;
}

/* ------------------------------------------------------- docs sidebar ---- */

/* The sidebar is part of the new navigation, so it stays — toned to sit
   quietly on the white card rather than competing with the content. */
@media (min-width: 1024px) {
	.clab-docsnav { border-right: 1px solid var(--clab-border); }
}
.clab-docsnav__title { color: var(--clab-text-dim); }
.clab-docsnav__item > a { color: #3c3c3c; font-weight: 400; }
.clab-docsnav__item.is-current > a {
	background: #f0f0f0;
	color: var(--clab-heading);
	font-weight: 700;
	box-shadow: inset 2px 0 0 var(--clab-heading);
}

/* ------------------------------------------------------------ crumbs ---- */

.clab-crumbs {
	background: transparent;
	border-bottom: 0;
	color: #cfcfcf;
	padding-top: 14px;
}
.clab-crumbs a { color: #cfcfcf; }
.clab-crumbs a:hover { color: #fff; }
.clab-crumbs [aria-current="page"] { color: #fff; }

/* ------------------------------------------------------------ footer ---- */

/*
 * A white card at container width, matching Rundown, rather than a full-bleed
 * band. The card is the inner container, so the tiled background still shows
 * down both sides. The parent supplies the structure — subscribe button, link
 * row, social icons, copyright — and only the colours change here, to the
 * values Rundown's own footer uses.
 */
.clab-footer {
	background: transparent;
	margin-top: 22px;
	padding: 0 0 40px;
}
.clab-footer > .clab-container {
	background: #ffffff;
	border: 1px solid #dfe7ed;
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(16, 33, 51, .04);
	padding: 32px 24px 28px;
}
.clab-widget__title,
.clab-footer h2 { color: var(--clab-heading); font-family: var(--clab-font-display); }
.clab-footer__grid a { color: var(--clab-link); font-weight: 700; text-decoration: none; }
.clab-footer__grid a:hover { text-decoration: underline; }

/* Quieter than the bold blue used in body copy: the link row is a footer
   utility, not something to pull the eye down the page. */
.clab-footer__menu a { color: #33455a; }
.clab-footer__menu a:hover,
.clab-footer__menu a:focus { color: #3879d9; }
.clab-footer__menu li + li::before { color: #c3ced9; opacity: 1; }

.clab-footer__social a:hover,
.clab-footer__social a:focus { box-shadow: 0 4px 10px rgba(16, 33, 51, .18); }

.clab-footer__legal { color: #6b7785; border-top-color: #eaf0f4; }
