/*
Theme Name:   Graph Lines
Theme URI:    https://graphlines.com/
Description:  Accessible child theme for Astra, made for graphlines.com, the free printable graph paper generator. Atkinson Hyperlegible Next and JetBrains Mono are self-hosted, so pages make no requests to Google. Colours meet WCAG 2.2 AA, with a dark scheme that follows the visitor's system setting, visible focus rings, forced-colours support and reduced motion. Includes block patterns, block styles and page content for the Graph Lines site.
Author:       Graph Lines
Author URI:   https://graphlines.com/
Template:     astra
Version:      1.0.0
Requires at least: 6.3
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:  graphlines
Tags:         custom-colors, block-patterns, block-styles
*/

/* ==========================================================================
   1. Fonts (self-hosted, SIL Open Font License; see fonts/OFL-*.txt)
   ========================================================================== */
@font-face {
	font-family: "Atkinson Hyperlegible Next";
	src: url("fonts/AtkinsonHyperlegibleNext-Variable.woff2") format("woff2");
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Atkinson Hyperlegible Next";
	src: url("fonts/AtkinsonHyperlegibleNext-Italic-Variable.woff2") format("woff2");
	font-weight: 200 800;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: "JetBrains Mono";
	src: url("fonts/JetBrainsMono-Variable.woff2") format("woff2");
	font-weight: 100 800;
	font-style: normal;
	font-display: swap;
}

/* ==========================================================================
   2. Tokens. Astra's nine global colours point at these, so the Customizer
      palette, the block editor and the front end stay in step.
   ========================================================================== */
:root {
	--gl-brand: #1D56C2;        /* links, buttons, focus */
	--gl-brand-hover: #133E8F;
	--gl-ink: #141A24;          /* headings */
	--gl-text: #2B3340;         /* body */
	--gl-surface: #F3F6FA;      /* bands, footer */
	--gl-paper: #FFFFFF;
	--gl-line: #DDE3EB;         /* decorative borders */
	--gl-muted: #3F4958;        /* secondary text */
	--gl-tint: #EAF1FD;         /* notices */
	--gl-tint-line: #BCD0F2;
	--gl-on-brand: #FFFFFF;
	--gl-band: #0E2A52;         /* blueprint band background */
	--gl-band-text: #D9E4F5;
	--gl-band-link: #A9C8FF;
	--gl-grid: rgba(29, 86, 194, 0.09);       /* background graph paper */
	--gl-grid-major: rgba(29, 86, 194, 0.16);

	/* Chip colours, taken from the generator's default ink colours (darkened for contrast). */
	--gl-tag-h: #1D56C2;        /* grids: blue */
	--gl-tag-p: #586273;        /* dots: grey */
	--gl-tag-figure: #2F7A3A;   /* scientific: green */
	--gl-tag-table: #B4373A;    /* writing: margin-line red */

	--gl-font: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, -apple-system, sans-serif;
	--gl-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	--gl-wrap: 1200px;
	--gl-gutter: clamp(16px, 4vw, 24px);
	--gl-radius: 12px;

	--ast-global-color-0: var(--gl-brand);
	--ast-global-color-1: var(--gl-brand-hover);
	--ast-global-color-2: var(--gl-ink);
	--ast-global-color-3: var(--gl-text);
	--ast-global-color-4: var(--gl-surface);
	--ast-global-color-5: var(--gl-paper);
	--ast-global-color-6: var(--gl-line);
	--ast-global-color-7: var(--gl-muted);
	--ast-global-color-8: var(--gl-tint);

	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--gl-brand: #8FB4FF;
		--gl-brand-hover: #B9D0FF;
		--gl-ink: #FFFFFF;
		--gl-text: #E5E9EF;
		--gl-surface: #18202B;
		--gl-paper: #10151C;
		--gl-line: #2A3442;
		--gl-muted: #AAB4C2;
		--gl-tint: #182640;
		--gl-tint-line: #2F4A7A;
		--gl-on-brand: #10151C;
		--gl-band: #081A33;
		--gl-band-text: #D9E4F5;
		--gl-band-link: #A9C8FF;
		--gl-grid: rgba(143, 180, 255, 0.06);
		--gl-grid-major: rgba(143, 180, 255, 0.11);
		color-scheme: dark;
	}
	/* The logo wordmark is dark ink; flip it for dark pages. The blue tile flips back to blue. */
	.custom-logo, .site-logo-img img { filter: invert(1) hue-rotate(180deg); }
}

/* ==========================================================================
   3. Base
   ========================================================================== */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; }

body,
button,
input,
select,
textarea,
.ast-button,
.ast-custom-button {
	font-family: var(--gl-font);
}
body {
	background-color: var(--gl-paper);
	color: var(--gl-text);
	font-size: 18px;
	font-size: 1.125rem;
	line-height: 1.65;
}

h1, h2, h3, h4, h5, h6,
.entry-content :where(h1, h2, h3, h4, h5, h6),
.site-title, .site-title a {
	font-family: var(--gl-font);
	font-weight: 700;
	color: var(--gl-ink);
	line-height: 1.2;
}
h1, .entry-content h1 { font-size: clamp(2.125rem, 4vw, 3rem); letter-spacing: -0.02em; line-height: 1.1; }
h2, .entry-content h2 { font-size: clamp(1.75rem, 3vw, 2rem); letter-spacing: -0.01em; }
h3, .entry-content h3 { font-size: clamp(1.3rem, 2vw, 1.45rem); line-height: 1.3; }
h4, .entry-content h4 { font-size: 1.2rem; line-height: 1.35; }
.entry-content :where(h2) { margin-top: 2.2em; margin-bottom: 0.5em; }
.entry-content :where(h3) { margin-top: 1.6em; margin-bottom: 0.4em; }
.entry-content > :first-child { margin-top: 0; }

.entry-content p,
.entry-content li { max-width: 70ch; }

/* Links: underlined in running text, thicker on hover. */
a { color: var(--gl-brand); }
a:hover, a:focus { color: var(--gl-brand-hover); }
.entry-content a:where(:not(.wp-block-button__link, .wp-element-button)),
.site-footer .widget a,
.site-footer .footer-widget-area a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}
.entry-content a:where(:not(.wp-block-button__link, .wp-element-button)):hover {
	text-decoration-thickness: 3px;
}

/* One focus style everywhere. */
:focus { outline: none; }
:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.wp-block-button__link:focus-visible,
.ast-custom-button:focus-visible,
.menu-toggle:focus-visible {
	outline: 3px solid var(--gl-brand) !important;
	outline-offset: 3px !important;
	box-shadow: none;
	border-radius: 4px;
}

/* Skip link: Astra prints it; make it obvious when focused. */
.skip-link.screen-reader-text:focus {
	clip: auto !important;
	clip-path: none;
	height: auto;
	width: auto;
	left: 16px;
	top: 16px;
	z-index: 100000;
	padding: 12px 18px;
	background: var(--gl-ink);
	color: var(--gl-paper);
	font-size: 1rem;
	font-weight: 700;
	border-radius: 8px;
	text-decoration: none;
}

::selection { background: var(--gl-tint); color: var(--gl-ink); }

code, kbd, pre, samp, tt { font-family: var(--gl-mono); font-size: 0.88em; }
:not(pre) > code {
	padding: 0.1em 0.35em;
	border-radius: 4px;
	background: var(--gl-surface);
	color: var(--gl-ink);
}
kbd {
	display: inline-block;
	padding: 0 0.4em;
	border: 1px solid #AEB4BE;
	border-bottom-width: 2px;
	border-radius: 4px;
	background: var(--gl-paper);
	color: var(--gl-ink);
	line-height: 1.5;
}

hr, .wp-block-separator {
	border: 0;
	border-top: 1px solid var(--gl-line);
	opacity: 1;
}

/* ==========================================================================
   4. Header (Astra header builder)
   ========================================================================== */
.site-header,
.ast-primary-header-bar,
.main-header-bar,
.ast-mobile-header-wrap .ast-primary-header-bar {
	background-color: var(--gl-paper);
	border-bottom: 1px solid var(--gl-line);
}
.site-title a,
.site-title a:hover { color: var(--gl-ink); text-decoration: none; letter-spacing: -0.01em; }

.main-header-menu .menu-link,
.ast-builder-menu .menu-item > .menu-link {
	min-height: 44px;
	display: flex;
	align-items: center;
	color: var(--gl-ink);
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none;
}
.main-header-menu .menu-link:hover,
.ast-builder-menu .menu-item > .menu-link:hover { color: var(--gl-brand); }
.main-header-menu .current-menu-item > .menu-link,
.main-header-menu .current_page_item > .menu-link,
.ast-builder-menu .current-menu-item > .menu-link {
	color: var(--gl-brand);
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: 10px;
}

/* Header button element ("Open the editor"). */
.ast-header-button-1 .ast-custom-button,
.ast-header-button-1 .ast-custom-button-link .ast-custom-button {
	min-height: 48px;
	display: inline-flex;
	align-items: center;
	padding: 0 20px;
	border-radius: 8px;
	border: 0;
	background-color: var(--gl-brand);
	color: var(--gl-on-brand);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
}
.ast-header-button-1 .ast-custom-button:hover { background-color: var(--gl-brand-hover); color: var(--gl-on-brand); }

/* Mobile menu toggle: a labelled button, not a bare icon. */
.menu-toggle,
.ast-mobile-menu-trigger-minimal,
.ast-mobile-menu-trigger-outline,
.ast-mobile-menu-trigger-fill {
	min-height: 48px;
	min-width: 48px;
	border: 2px solid var(--gl-ink) !important;
	border-radius: 8px !important;
	background: var(--gl-paper) !important;
	color: var(--gl-ink) !important;
}
.menu-toggle .ast-mobile-svg { fill: var(--gl-ink); }
.ast-mobile-header-content,
.ast-mobile-popup-drawer .ast-mobile-popup-inner {
	background-color: var(--gl-paper);
}
.ast-mobile-header-content .menu-link,
.ast-mobile-popup-drawer .menu-link { min-height: 48px; border-color: var(--gl-line) !important; }

/* ==========================================================================
   5. Page title band (inner pages)
   ========================================================================== */
.page .entry-header,
.single .entry-header {
	position: relative;
	margin-bottom: 2.5rem;
	padding: 2.5rem 0 2.75rem;
	background: var(--gl-surface);
	box-shadow: 0 0 0 100vmax var(--gl-surface);
	clip-path: inset(0 -100vmax);
	border-bottom: 1px solid var(--gl-line);
}
.page .entry-header .entry-title,
.single .entry-header .entry-title {
	margin: 0;
	font-size: clamp(2.125rem, 4vw, 3rem);
	line-height: 1.1;
	letter-spacing: -0.02em;
}
.ast-breadcrumbs, .ast-breadcrumbs-wrapper { font-size: 0.9375rem; color: var(--gl-muted); }
.ast-breadcrumbs a { color: var(--gl-brand); }

/* ==========================================================================
   6. Core blocks
   ========================================================================== */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-block-button__link,
.wp-element-button,
.ast-button,
button.ast-button,
input[type="submit"],
.wp-block-search__button {
	min-height: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 24px;
	border: 2px solid var(--gl-brand);
	border-radius: 8px;
	background-color: var(--gl-brand);
	color: var(--gl-on-brand);
	font-family: var(--gl-font);
	font-weight: 700;
	font-size: 1.0625rem;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.wp-block-button__link:hover,
.wp-element-button:hover,
.ast-button:hover,
input[type="submit"]:hover {
	background-color: var(--gl-brand-hover);
	border-color: var(--gl-brand-hover);
	color: var(--gl-on-brand);
}
.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button.is-style-outline > .wp-element-button {
	background: transparent;
	border-color: var(--gl-ink);
	color: var(--gl-ink);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--gl-ink);
	border-color: var(--gl-ink);
	color: var(--gl-paper);
}

/* Tables: header row, rules, and scrolling inside their own box. */
.wp-block-table {
	overflow-x: auto;
	border: 1px solid var(--gl-line);
	border-radius: 10px;
	margin: 1.5em 0;
}
.wp-block-table table { width: 100%; border-collapse: collapse; font-size: 1.0625rem; margin: 0; }
.wp-block-table th,
.wp-block-table td {
	padding: 12px 16px;
	border: 0;
	border-bottom: 1px solid var(--gl-line);
	text-align: left;
	vertical-align: top;
}
.wp-block-table thead th {
	background: var(--gl-surface);
	color: var(--gl-ink);
	border-bottom: 2px solid var(--gl-ink);
}
.wp-block-table tbody tr:last-child td { border-bottom: 0; }
.wp-block-table figcaption,
.wp-block-table .wp-element-caption {
	padding: 10px 16px;
	font-size: 0.9375rem;
	color: var(--gl-muted);
	text-align: left;
	margin: 0;
	border-top: 1px solid var(--gl-line);
}

/* Details (FAQ). Keeps the browser's own open/close marker. */
.wp-block-details {
	border-top: 1px solid var(--gl-line);
	border-bottom: 1px solid var(--gl-line);
	margin: 0;
	padding: 2px 0;
}
.wp-block-details + .wp-block-details { border-top: 0; }
.wp-block-details summary {
	min-height: 52px;
	display: list-item;
	padding: 13px 0;
	font-weight: 700;
	color: var(--gl-ink);
	cursor: pointer;
}
.wp-block-details summary::marker { color: var(--gl-brand); }
.wp-block-details > :not(summary) { margin: 0 0 1em 1.25em; }

/* Columns: a gap that doesn't depend on WordPress's generated layout styles. */
.wp-block-columns { gap: 2rem clamp(24px, 4vw, 48px); }

/* Lists. */
.entry-content ul, .entry-content ol { margin-left: 1.4em; }
.entry-content li + li { margin-top: 0.35em; }

/* Images. */
.wp-block-image img { border-radius: 6px; }
.wp-block-image figcaption { color: var(--gl-muted); font-size: 0.9375rem; }

/* ==========================================================================
   7. Block styles registered by the theme
   ========================================================================== */

/* Group › Notice */
.wp-block-group.is-style-gl-notice {
	position: relative;
	padding: 18px 20px 18px 56px;
	border: 1px solid var(--gl-tint-line);
	border-radius: 10px;
	background: var(--gl-tint);
	color: var(--gl-ink);
	margin: 1.5em 0;
}
.wp-block-group.is-style-gl-notice::before {
	content: "";
	position: absolute;
	left: 20px;
	top: 21px;
	width: 22px;
	height: 22px;
	background-color: var(--gl-brand);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='7.5'/%3E%3Cpath d='M10 9v5M10 6.3v.1'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='7.5'/%3E%3Cpath d='M10 9v5M10 6.3v.1'/%3E%3C/svg%3E") center / contain no-repeat;
}
.wp-block-group.is-style-gl-notice > :first-child { margin-top: 0; }
.wp-block-group.is-style-gl-notice > :last-child { margin-bottom: 0; }

/* List › Contents (an "On this page" box) */
.wp-block-list.is-style-gl-toc,
ul.is-style-gl-toc, ol.is-style-gl-toc {
	margin: 0 0 2em;
	padding: 18px 22px 18px 44px;
	border: 1px solid var(--gl-line);
	border-radius: var(--gl-radius);
	columns: 2 16em;
	column-gap: 2.5em;
	font-size: 1rem;
	line-height: 1.45;
}
.is-style-gl-toc li { break-inside: avoid; margin: 0 0 0.45em; }

/* Paragraph › Eyebrow label */
p.is-style-gl-eyebrow {
	display: inline-block;
	margin-bottom: 1rem;
	padding: 4px 14px;
	border: 1px solid #C9CED6;
	border-radius: 999px;
	background: var(--gl-paper);
	color: var(--gl-muted);
	font-size: 0.9375rem;
	font-weight: 700;
}

/* ==========================================================================
   8. Pattern layout (classes used by the theme's block patterns)
   ========================================================================== */

/* Full-width bands work in any Astra content layout. */
.entry-content > .alignfull.gl-band {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}
.gl-wrap {
	max-width: var(--gl-wrap);
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: var(--gl-gutter);
	padding-right: var(--gl-gutter);
}
.gl-band { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px); margin-top: 0; margin-bottom: 0; }
.gl-band + .gl-band { margin-top: 0; }
.gl-band--surface { background: var(--gl-surface); border-top: 1px solid var(--gl-line); border-bottom: 1px solid var(--gl-line); }
.gl-band--dark { background: var(--gl-band); color: var(--gl-band-text); }
.gl-band--dark :where(h1, h2, h3, h4) { color: #FFFFFF; }
.gl-band--dark p { color: var(--gl-band-text); font-size: 1.25rem; }
.gl-band--dark a:where(:not(.wp-block-button__link)) { color: var(--gl-band-link); font-weight: 700; }

/* Hero */
.gl-hero { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(56px, 8vw, 96px); }
.gl-hero .wp-block-columns { align-items: center; gap: clamp(32px, 5vw, 56px); }
.entry-content .gl-hero-title,
.gl-hero-title {
	margin: 0 0 0.4em;
	font-size: clamp(2.5rem, 5vw, 4rem);
	line-height: 1.04;
	letter-spacing: -0.025em;
}
.gl-lead,
.entry-content p.gl-lead { font-size: clamp(1.15rem, 1.6vw, 1.3125rem); line-height: 1.55; color: var(--gl-text); }
.gl-note { display: flex; align-items: center; gap: 8px; font-size: 1rem; color: var(--gl-muted); }
.gl-note::before {
	content: "";
	flex: none;
	width: 20px;
	height: 20px;
	background-color: var(--gl-brand);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='9' width='12' height='8' rx='1.5'/%3E%3Cpath d='M7 9V6.5a3 3 0 0 1 6 0V9'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='9' width='12' height='8' rx='1.5'/%3E%3Cpath d='M7 9V6.5a3 3 0 0 1 6 0V9'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Hero illustration: a sheet of graph paper with a plotted line.
   The sheet stays white in dark mode, because it represents printed paper. */
.gl-figure { position: relative; max-width: 470px; margin: 0 auto; }
.gl-sheet {
	position: relative;
	aspect-ratio: 210 / 297;
	border-radius: 4px;
	background: #FFFFFF;
	color: #141A24;
	box-shadow: 0 1px 2px rgba(20, 26, 36, 0.12), 0 18px 40px rgba(20, 26, 36, 0.14);
	overflow: hidden;
	transform: rotate(-1.2deg);
}
.gl-sheet svg { display: block; width: 100%; height: 100%; }
.gl-sheet-stack {
	position: absolute;
	inset: 0;
	border-radius: 4px;
	background: #FFFFFF;
	box-shadow: 0 1px 2px rgba(20, 26, 36, 0.10), 0 10px 26px rgba(20, 26, 36, 0.10);
	transform: rotate(3deg) translate(14px, 6px);
}
.gl-dim {
	position: absolute;
	top: 18%;
	left: -18px;
	padding: 4px 8px;
	border-radius: 4px;
	background: #1D56C2;
	color: #FFFFFF;
	font-family: var(--gl-mono);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
	box-shadow: 0 4px 12px rgba(20, 26, 36, 0.18);
}
.gl-ready {
	position: absolute;
	right: -20px;
	bottom: -28px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	border-radius: 10px;
	background: #FFFFFF;
	color: #141A24;
	border: 1px solid #DDE3EB;
	box-shadow: 0 10px 28px rgba(20, 26, 36, 0.16);
	line-height: 1.3;
}
.gl-ready strong { display: block; font-size: 15px; }
.gl-ready small { display: block; font-size: 13.5px; color: #3F4958; }
.gl-ready svg { flex: none; }
.gl-formats { display: flex; gap: 6px; margin-top: 6px; }
.gl-formats span {
	padding: 2px 6px;
	border-radius: 3px;
	background: #EAF1FD;
	color: #133E8F;
	font-family: var(--gl-mono);
	font-size: 11.5px;
	font-weight: 600;
}

/* Background graph paper for the hero and the blueprint band. Purely decorative. */
.gl-gridbg {
	background-image:
		linear-gradient(var(--gl-grid-major) 1px, transparent 1px),
		linear-gradient(90deg, var(--gl-grid-major) 1px, transparent 1px),
		linear-gradient(var(--gl-grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--gl-grid) 1px, transparent 1px);
	background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
	background-position: -1px -1px;
}
.gl-band--surface.gl-gridbg { background-color: var(--gl-surface); }
.gl-band--dark {
	background-image:
		linear-gradient(rgba(169, 200, 255, 0.10) 1px, transparent 1px),
		linear-gradient(90deg, rgba(169, 200, 255, 0.10) 1px, transparent 1px),
		linear-gradient(rgba(169, 200, 255, 0.045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(169, 200, 255, 0.045) 1px, transparent 1px);
	background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
}

/* Section intro */
.gl-intro { max-width: 720px; margin-bottom: 2.5rem; }
.gl-intro h2 { margin: 0 0 0.35em; font-size: clamp(1.9rem, 3.2vw, 2.5rem); }
.gl-intro p { margin: 0; color: var(--gl-muted); }

/* Cards */
.gl-cards { gap: 24px; }
.gl-card {
	height: 100%;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 28px;
	border: 1px solid var(--gl-line);
	border-radius: var(--gl-radius);
	background: var(--gl-paper);
}
.gl-card > * { margin: 0 !important; }
.gl-card h3 { font-size: 1.5rem; }
.gl-card p:last-child { margin-top: auto !important; font-weight: 700; }

/* Tag chip (decorative label) */
.gl-chip {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 4px;
	background: var(--gl-tag-h);
	color: #FFFFFF;
	font-family: var(--gl-mono);
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.3;
}
.gl-chip--check { background: var(--gl-tag-table); }
.gl-chip--export { background: var(--gl-tag-figure); }
.gl-chip--p { background: var(--gl-tag-p); }
.gl-chip--ink { background: #141A24; }
.gl-chip--artifact { background: transparent; color: var(--gl-muted); border: 1.5px dashed var(--gl-tag-p); }
p.gl-chip-row { margin: 0; }

/* Steps */
ol.gl-steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 24px;
	counter-reset: gl-step;
}
ol.gl-steps > li {
	counter-increment: gl-step;
	max-width: none;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
	color: var(--gl-text);
}
ol.gl-steps > li::before {
	content: counter(gl-step);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--gl-ink);
	color: var(--gl-paper);
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}
ol.gl-steps > li:last-child::before { background: var(--gl-brand); color: var(--gl-on-brand); }
ol.gl-steps strong { display: block; font-size: 1.25rem; color: var(--gl-ink); }

/* "What every PDF includes" list */
ul.gl-includes {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 18px 32px;
}
ul.gl-includes > li { display: flex; gap: 14px; align-items: flex-start; margin: 0; max-width: none; }
ul.gl-includes .gl-chip { flex: none; min-width: 72px; text-align: center; margin-top: 4px; }

/* Call to action box */
.gl-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px 32px;
	padding: clamp(24px, 4vw, 40px);
	border: 2px solid var(--gl-ink);
	border-radius: 16px;
}
.gl-cta > .wp-block-group:first-child { flex: 1 1 520px; }
.gl-cta h2 { margin: 0 0 0.3em; font-size: 1.875rem; }
.gl-cta p { margin: 0; }

/* ==========================================================================
   9. Footer (Astra footer builder)
   ========================================================================== */
.site-footer,
.site-primary-footer-wrap,
.site-above-footer-wrap,
.site-below-footer-wrap {
	background-color: var(--gl-surface) !important;
	color: var(--gl-muted);
	font-size: 1rem;
}
.site-footer { border-top: 1px solid var(--gl-line); }
.site-below-footer-wrap { border-top: 1px solid var(--gl-line); }
.site-footer a { color: var(--gl-brand); }
.site-footer .widget-title,
.site-footer .footer-widget-area .widget-title {
	font-size: 0.9375rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--gl-muted);
}
.footer-nav-wrap .menu-link,
.site-footer .ast-builder-menu .menu-link { min-height: 44px; display: flex; align-items: center; }
.ast-footer-copyright { color: var(--gl-muted); font-size: 0.9375rem; }

/* ==========================================================================
   10. Forms
   ========================================================================== */
input[type="text"], input[type="email"], input[type="url"], input[type="search"],
input[type="password"], input[type="tel"], input[type="number"], textarea, select {
	min-height: 48px;
	border: 1px solid #8A919C;
	border-radius: 8px;
	background: var(--gl-paper);
	color: var(--gl-ink);
	font-size: 1rem;
}
label { font-weight: 700; color: var(--gl-ink); }

/* ==========================================================================
   11. Responsive, motion and forced colours
   ========================================================================== */
@media (max-width: 781px) {
	.gl-ready { right: 8px; bottom: -36px; }
	.gl-figure { max-width: 320px; }
	.gl-sheet-stack { transform: rotate(2.5deg) translate(6px, 4px); }
	.gl-hero .wp-block-columns { gap: 56px; }
	.wp-block-buttons > .wp-block-button { flex: 1 1 100%; }
	.wp-block-buttons > .wp-block-button > .wp-block-button__link { width: 100%; }
	.is-style-gl-toc { columns: 1; }
}

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

@media (forced-colors: active) {
	.wp-block-button__link, .ast-custom-button, .menu-toggle { border: 2px solid ButtonText !important; }
	.gl-card, .gl-cta, .wp-block-table, .is-style-gl-toc, .is-style-gl-notice { border: 1px solid CanvasText; }
	.gl-chip, .gl-tag { border: 1px solid CanvasText; }
	.gl-note::before, .is-style-gl-notice::before { background-color: CanvasText; }
	:focus-visible { outline: 3px solid Highlight !important; }
}

@media print {
	.site-header, .site-footer, .gl-figure, .gl-thumb, .wp-block-buttons { display: none !important; }
	.gl-band--dark { background: none; color: #000; }
	.gl-band--dark :where(h2, p, a) { color: #000 !important; }
	a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}

/* ==========================================================================
   12. Graph Lines extras
   ========================================================================== */

/* Paper-type gallery: nine cards with a thumbnail of each paper. */
.gl-types {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}
.gl-types > .gl-type { margin: 0 !important; }
.gl-type {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 16px 20px;
	border: 1px solid var(--gl-line);
	border-radius: var(--gl-radius);
	background: var(--gl-paper);
}
.gl-type > * { margin: 0 !important; }
.gl-type h3 { font-size: 1.25rem; margin-top: 6px !important; }
.gl-type p { font-size: 1rem; color: var(--gl-muted); }
.gl-type .gl-chip { align-self: flex-start; }
.gl-thumb {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	border-radius: 6px;
	border: 1px solid #DDE3EB;
	background: #FFFFFF;
}
.gl-type-group { margin: 2.5rem 0 1rem !important; font-size: 0.9375rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gl-muted); }

/* Spec row: small facts ("A3–A6, Letter…") shown as a definition-style list. */
ul.gl-specs {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1px;
	border: 1px solid var(--gl-line);
	border-radius: var(--gl-radius);
	background: var(--gl-line);
	overflow: hidden;
}
ul.gl-specs > li {
	margin: 0 !important;
	max-width: none;
	padding: 18px 20px;
	background: var(--gl-paper);
	font-size: 1rem;
}
ul.gl-specs strong { display: block; font-family: var(--gl-mono); font-size: 1.375rem; font-weight: 600; color: var(--gl-ink); }

@media (max-width: 921px) {
	.gl-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
	.gl-types { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 781px) {
	.gl-dim { left: 4px; }
}
@media (forced-colors: active) {
	.gl-type, .gl-thumb, ul.gl-specs { border: 1px solid CanvasText; }
	.gl-gridbg, .gl-band--dark { background-image: none; }
}
@media print {
	.gl-gridbg, .gl-band--dark { background-image: none; }
}

/* Chip aliases named after the paper groups. */
.gl-chip--grids { background: var(--gl-tag-h); }
.gl-chip--dots { background: var(--gl-tag-p); }
.gl-chip--sci { background: var(--gl-tag-figure); }
.gl-chip--writing { background: var(--gl-tag-table); }
