/*
Theme Name: Craig Jacobs
Theme URI: https://craigjacobs.com
Author: Craig Jacobs
Author URI: https://craigjacobs.com
Description: A dark, minimal child theme of Twenty Twenty-Five for craigjacobs.com. Inverts the parent palette to a near-black ground with an orange highlight.
Template: twentytwentyfive
Version: 0.1.0
Requires at least: 6.7
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: craigjacobs
*/

/*
 * Design tokens live in theme.json, not here. This file exists to declare the
 * child theme and to hold the few rules that theme.json cannot express.
 */

/*
 * Handout pages read as documents rather than blog posts: a narrower measure
 * (60 to 70 characters), looser leading, and the typographic levels the
 * handouts rely on. Legibility over decoration.
 */
/*
 * Core's constrained layout sets margin-left/right: auto !important on
 * children, which centers any box narrower than the column. That turns a
 * capped measure into what looks like an indent. !important here is not
 * laziness: it is the only thing that overrides another !important.
 */
.handout.wp-block-group p,
.handout.wp-block-group li {
	line-height: 1.75;
	max-width: 66ch;
	margin-inline: 0 !important;
}

.handout .handout-subtitle {
	margin-top: -0.5rem;
	font-size: 1.2rem;
	font-style: italic;
	color: var(--wp--preset--color--accent-4);
}

/* The in-world date panel, and the content note on Session Zero. */
.handout .handout-dateline,
.handout .handout-note {
	border-left: 3px solid var(--wp--preset--color--accent-1);
	background-color: var(--wp--preset--color--accent-3);
	padding: 1rem 1.25rem;
}

/* Kept above the measure rule's specificity so the note stays full width. */
.handout.wp-block-group .handout-note {
	max-width: none;
	font-size: 0.95rem;
}

.handout .handout-dateline p {
	margin: 0;
}

.handout .handout-dateline p + p {
	margin-top: 0.4rem;
}

/*
 * "we roll", "milestone", "both on". A distinct level sitting under its
 * heading, deliberately not body text.
 */
.handout :is(h2, h3, h4):has(+ .handout-eyebrow) {
	margin-bottom: 0.15rem;
}

.handout .handout-eyebrow {
	margin-top: 0;
	font-size: 0.9rem;
	font-style: italic;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--accent-1);
}

/* Both page 1 and page 2 end on a closing line set apart from the body. */
.handout .handout-closing-group {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--wp--preset--color--accent-5);
}

.handout .handout-closing {
	font-style: italic;
	color: var(--wp--preset--color--accent-4);
}

.handout blockquote cite {
	display: block;
	margin-top: 0.6rem;
	font-size: 0.9rem;
	font-style: normal;
	color: var(--wp--preset--color--accent-4);
}

/*
 * The core "stripes" table style hardcodes a light #f0f0f0 row background,
 * which leaves light text at roughly 1:1 contrast on a dark ground. Repoint
 * it and the table borders at the dark surface tokens.
 */
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background-color: var(--wp--preset--color--accent-3);
}

.wp-block-table.is-style-stripes {
	border-bottom-color: var(--wp--preset--color--accent-5);
}

.wp-block-table td,
.wp-block-table th {
	border-color: var(--wp--preset--color--accent-5);
	padding: 0.5em 0.75em;
}

/* Selection uses the highlight color rather than the browser default. */
::selection {
	background-color: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--base);
}

/* Keep the focus ring visible against a dark ground for keyboard users. */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-1);
	outline-offset: 2px;
}
