/**
 * Mobile static pages and posts — screen 11i of the account settings and
 * branding handoff: About, Policies and the other plain pages, and blog
 * posts. Pairs with the "MOBILE STATIC PAGES" section of
 * proxy-complex-core-features.php.
 *
 * Only enqueued where pcf_is_mobile_static_page() holds, and scoped to
 * max-width:1025px; above that the pages are untouched. A typography pass
 * with no change to what the pages hold: the drill-down header stands in for
 * the hero's banner, the hero's title becomes the page's h1 at the design's
 * size, and the content takes the design's rhythm (h1, body, h2, list,
 * links in bold accent).
 *
 * The type rules reach only the editor's own blocks (paragraphs, headings,
 * lists, tables), so a plugin's form or tool on a page (the support ticket
 * form, the decklist importer) keeps its own styling. Tokens from
 * nav-shell.css.
 */

.pc-page-header {
	display: none;
}

@media (max-width: 1025px) {

	.pc-page-header {
		display: block;
		background: var(--surface-page);
	}

	/* ---------- Page frame ----------
	   The hero keeps only its title, as the page's h1 under the header; its
	   120px inset, stripes and the desktop column's border lines go. */
	body .wc-hero .hero-content {
		padding: 20px 18px 0 !important;
		border: 0 !important;
	}

	body .wc-hero .hero-content h1 {
		margin: 0 0 12px !important;
		font-family: var(--font-display);
		font-size: 1.4rem !important;
		font-weight: 600;
		line-height: 1.15;
		letter-spacing: normal;
		text-transform: none !important;
		color: var(--text-heading) !important;
	}

	body .wc-hero .container.px-4,
	.page-holder > .container.px-4 {
		max-width: none;
		padding: 0 !important;
	}

	body .wc-hero .row,
	.page-holder > .container.px-4 > .row {
		margin: 0 !important;
	}

	body .wc-hero .row > [class*="col-"],
	.page-holder > .container.px-4 > .row > [class*="col-"] {
		border: 0 !important;
	}

	body .wc-hero .stripes-bg {
		display: none;
	}

	.page-holder > .container.px-4 > .row > [class*="col-"] {
		padding: 0 18px 28px !important;
	}

	/* A page that brings its own heading (the decklist importer) keeps it,
	   and doesn't repeat the title above it. */
	.page-holder:has(.pc-decklist) .wc-hero {
		display: none;
	}

	/* A blog post: its banner image goes, and the title and date sit on
	   the page like a page's. */
	body.single-post .page-hero .wp-hip-block-bg-image {
		display: none;
	}

	body.single-post .page-hero {
		min-height: 0 !important;
		padding: 20px 18px 0 !important;
		background: none !important;
	}

	body.single-post .page-hero .container {
		padding: 0;
	}

	body.single-post .page-hero .post-meta {
		justify-content: flex-start !important;
		margin: 0 0 6px;
		font-family: var(--font-ui);
		font-size: 0.75rem;
		text-align: left !important;
		color: var(--pc-brown-50) !important;
	}

	body.single-post .page-hero h1 {
		margin: 0 0 12px !important;
		font-family: var(--font-display);
		font-size: 1.4rem !important;
		font-weight: 600;
		line-height: 1.15;
		text-align: left !important;
		color: var(--text-heading) !important;
		animation: none !important;
	}

	body.single-post .page-hero .wp-block-spacer {
		display: none;
	}

	body.single-post .single-content {
		padding: 0 0 28px !important;
	}

	body.single-post .single-content .container,
	body.single-post .single-content .the-content {
		padding: 0 18px !important;
	}

	/* ---------- Type (11i) ---------- */

	:is(.page-holder > .container.px-4, .single-content .the-content) :is(p.wp-block-paragraph, .the-content > p) {
		margin: 0 0 14px;
		font-family: var(--font-body);
		font-size: 0.88rem !important;
		line-height: 1.55;
		color: var(--text-body);
	}

	:is(.page-holder > .container.px-4, .single-content .the-content) :is(h2, h3, h4).wp-block-heading {
		margin: 0 0 10px;
		font-family: var(--font-display);
		font-weight: 600;
		line-height: 1.25;
		letter-spacing: normal;
		text-transform: none;
		color: var(--text-heading);
	}

	:is(.page-holder > .container.px-4, .single-content .the-content) h2.wp-block-heading {
		font-size: 1.05rem !important;
	}

	:is(.page-holder > .container.px-4, .single-content .the-content) h3.wp-block-heading {
		font-size: 0.95rem !important;
	}

	:is(.page-holder > .container.px-4, .single-content .the-content) h4.wp-block-heading {
		font-size: 0.9rem !important;
	}

	/* A heading after content gets room above it; the first one doesn't. */
	:is(.page-holder > .container.px-4, .single-content .the-content) * + :is(h2, h3, h4).wp-block-heading {
		margin-top: 22px;
	}

	:is(.page-holder > .container.px-4, .single-content .the-content) :is(ul, ol).wp-block-list {
		margin: 0 0 14px;
		padding-left: 20px;
		font-family: var(--font-body);
		font-size: 0.88rem;
		line-height: 1.6;
		color: var(--text-body);
	}

	:is(.page-holder > .container.px-4, .single-content .the-content) .wp-block-list li {
		margin: 0;
		font-size: inherit !important;
	}

	/* Links and emphasis in the copy: bold burnt orange, no underline. */
	:is(.page-holder > .container.px-4, .single-content .the-content) :is(.wp-block-paragraph, .wp-block-list, .wp-block-table) a {
		font-weight: 700;
		text-decoration: none !important;
		color: var(--accent) !important;
	}

	:is(.page-holder > .container.px-4, .single-content .the-content) :is(.wp-block-paragraph, .wp-block-list) :is(strong, b) {
		font-weight: 700;
		color: var(--text-heading);
	}

	/* Tables scroll sideways rather than squeezing their columns. */
	:is(.page-holder > .container.px-4, .single-content .the-content) .wp-block-table {
		margin: 0 0 14px;
		overflow-x: auto;
	}

	:is(.page-holder > .container.px-4, .single-content .the-content) .wp-block-table table {
		min-width: 100%;
		font-family: var(--font-body);
		font-size: 0.8rem;
		line-height: 1.45;
		color: var(--text-body);
	}

	:is(.page-holder > .container.px-4, .single-content .the-content) .wp-block-table :is(th, td) {
		padding: 8px 10px;
		border-color: var(--border-hairline);
	}

	:is(.page-holder > .container.px-4, .single-content .the-content) .wp-block-spacer {
		max-height: 16px;
	}
}

/* ---------- Tablets ----------
   Title and copy in nav-shell.css's centred column, with the type a step
   larger for reading at arm's length. */
@media (min-width: 600px) and (max-width: 1025px) {
	body .wc-hero .container.px-4,
	.page-holder > .container.px-4,
	body.single-post .page-hero .container,
	body.single-post .single-content .container {
		max-width: var(--pc-measure);
		margin-inline: auto;
	}

	body .wc-hero .hero-content {
		padding: 28px 18px 0 !important;
	}

	body .wc-hero .hero-content h1,
	body.single-post .page-hero h1 {
		font-size: 1.9rem !important;
	}

	:is(.page-holder > .container.px-4, .single-content .the-content) :is(p.wp-block-paragraph, .the-content > p),
	:is(.page-holder > .container.px-4, .single-content .the-content) :is(ul, ol).wp-block-list {
		font-size: 1rem !important;
	}

	:is(.page-holder > .container.px-4, .single-content .the-content) h2.wp-block-heading {
		font-size: 1.3rem !important;
	}

	:is(.page-holder > .container.px-4, .single-content .the-content) h3.wp-block-heading {
		font-size: 1.1rem !important;
	}

	:is(.page-holder > .container.px-4, .single-content .the-content) h4.wp-block-heading {
		font-size: 1rem !important;
	}

	:is(.page-holder > .container.px-4, .single-content .the-content) .wp-block-table table {
		font-size: 0.9rem;
	}
}
