/* Mathlab (Elementor front end): the base under Elementor.
 * Elementor styles what it builds from the Site Kit (colours, fonts, buttons). This file covers the rest: the brand
 * fonts, the page background and text, WooCommerce's own markup (forms, notices, tables), the Gutenberg content of
 * journal posts, focus rings and the skip link. Tokens mirror the block theme's theme.json; the Site Kit exposes the
 * same values to Elementor as global colours and fonts (--e-global-color-*). Component styles for the Mathlab
 * Elementor widgets live in the Store Kit next to the widgets. */

@font-face { font-family: "Fraunces"; src: url("../fonts/Fraunces-normal.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/Fraunces-italic.woff2") format("woff2"); font-weight: 300 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("../fonts/NunitoSans-normal.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("../fonts/NunitoSans-italic.woff2") format("woff2"); font-weight: 300 800; font-style: italic; font-display: swap; }

:root {
	--ml-ink: #1F2A2E; --ml-ink-soft: #4A5A60; --ml-paper: #FBF7F0; --ml-white: #FFFFFF;
	--ml-river: #2F6F73; --ml-river-deep: #21555A; --ml-river-pale: #D5E6E4;
	--ml-bloom: #F2A65A; --ml-bloom-pale: #F8DFC4; --ml-moss: #8FA876; --ml-moss-pale: #DDE5D1;
	--ml-berry: #C8553D; --ml-sand: #EADFCB; --ml-line: #E4DACA;
	--ml-display: "Fraunces", "Iowan Old Style", Georgia, serif;
	--ml-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--ml-radius: 14px; --ml-radius-lg: 22px; --ml-pill: 999px;
	--ml-wide: 1320px; --ml-content: 760px;
	--ml-shadow: 0 1px 2px rgba(31, 42, 46, .06), 0 8px 24px rgba(31, 42, 46, .07);
}

html { -webkit-text-size-adjust: 100%; }
body { background: var(--ml-paper); color: var(--ml-ink); font-family: var(--ml-body); font-size: 1.0625rem; line-height: 1.65; }
h1, h2, h3, h4, h5, h6 { font-family: var(--ml-display); font-weight: 560; line-height: 1.12; letter-spacing: -0.01em; color: var(--ml-ink); }
a { color: var(--ml-river); }
a:hover { color: var(--ml-river-deep); }
:focus-visible { outline: 3px solid var(--ml-bloom); outline-offset: 3px; }
img { max-width: 100%; height: auto; }

.skip-link.screen-reader-text:focus { clip: auto; clip-path: none; width: auto; height: auto; position: fixed; top: 8px; left: 8px; z-index: 100000; padding: .75rem 1.25rem; background: var(--ml-ink); color: var(--ml-white); border-radius: var(--ml-pill); font-weight: 700; text-decoration: none; }

/* WooCommerce buttons, forms and notices (outside Elementor's widgets) follow the kit's button. */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce .single_add_to_cart_button, .wc-block-components-button:not(.is-link) {
	background: var(--ml-river); color: var(--ml-white); border: 0; border-radius: var(--ml-pill);
	font-family: var(--ml-body); font-weight: 700; font-size: .9375rem; letter-spacing: .01em; padding: .85rem 1.6rem; line-height: 1.2;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce .single_add_to_cart_button:hover, .wc-block-components-button:not(.is-link):hover { background: var(--ml-river-deep); color: var(--ml-white); }
.woocommerce .quantity .qty, .woocommerce select, .woocommerce input[type="text"], .woocommerce input[type="email"], .woocommerce textarea {
	border: 1px solid var(--ml-line); border-radius: 10px; background: var(--ml-white); padding: .6rem .8rem; font: inherit; color: var(--ml-ink);
}
.woocommerce-message, .woocommerce-info, .woocommerce-error { border-radius: var(--ml-radius); border: 1px solid var(--ml-line); background: var(--ml-white); padding: 1rem 1.25rem; list-style: none; }

/* Journal posts keep their Gutenberg content: give it the article measure and rhythm. */
.ml-article { max-width: var(--ml-content); margin-inline: auto; }
.ml-article > * + * { margin-top: 1.1em; }
.ml-article h2 { font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem); margin-top: 2em; }
.ml-article h3 { font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); margin-top: 1.6em; }
.ml-article ul, .ml-article ol { padding-left: 1.25em; }
.ml-article blockquote { border-left: 4px solid var(--ml-bloom); margin: 1.5em 0; padding: .25em 0 .25em 1.25em; font-family: var(--ml-display); font-size: 1.25rem; }
.ml-article figure { margin: 1.75em 0; }
.ml-article figcaption { font-size: .8125rem; color: var(--ml-ink-soft); }
.ml-article .wp-block-image img { border-radius: var(--ml-radius); }

/* Block preset classes used in page and post content (the block theme defined them in theme.json). */
.has-xs-font-size { font-size: .8125rem !important; }
.has-sm-font-size { font-size: .9375rem !important; }
.has-md-font-size { font-size: 1.0625rem !important; }
.has-lg-font-size { font-size: clamp(1.125rem, 1.125rem + ((1vw - 0.2rem) * 0.4), 1.375rem) !important; }
.has-xl-font-size { font-size: clamp(1.375rem, 1.375rem + ((1vw - 0.2rem) * 1), 2rem) !important; }
.has-text-align-center { text-align: center; }
.has-text-align-right { text-align: right; }
.ob-page__content .elementor-widget-text-editor li { margin-bottom: .45rem; }
.ob-page__content .elementor-widget-heading { margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.ob-page__content .elementor-widget-heading:first-child { margin-top: 0; }
.ob-page__content table { border-collapse: collapse; width: 100%; background: var(--ml-white); border-radius: 14px; overflow: hidden; }
.ob-page__content th { background: var(--ml-sand); text-align: left; font-weight: 800; }
.ob-page__content th, .ob-page__content td { padding: .75rem 1rem; border: 0; border-bottom: 1px solid var(--ml-line); }

/* Gutenberg buttons (in posts, pages and WooCommerce's block cart) look like the kit's buttons. */
.wp-block-button__link, .wp-element-button, .wc-block-components-product-button .wp-block-button__link {
	background: var(--e-global-color-accent, var(--ml-river)); color: var(--ml-white); border: 0; border-radius: var(--ml-pill, 999px);
	font-family: var(--ml-body); font-weight: 700; font-size: .9375rem; padding: .85rem 1.6rem; line-height: 1.65; text-decoration: none;
}
.wp-block-button__link:hover, .wp-element-button:hover { background: var(--e-global-color-secondary, var(--ml-river-deep)); color: var(--ml-white); }
.is-style-outline > .wp-block-button__link { background: transparent; color: var(--ml-ink); border: 1.5px solid var(--ml-ink); }
