/*
Theme Name: Preset
Text Domain: preset
Version: 1.0.1070
Description: WordPress theme for andersnoren.se. You can find my free WordPress themes at andersnoren.se/teman/. This one isn’t one of them.
Author: Anders Norén
Author URI: https://andersnoren.se
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Requires at least: 6.9
Requires PHP: 7.4
Tested up to: 7.1
*/

/* ------------------------------------------------------------------------------
 * Tokens
 * Spacing and type scale from Figma's Mobile values at 402px to Desktop at
 * 1024px, then grow from 1440px to custom.scale.factor at 1920px. Anything
 * sized for its text grows with --wp--custom--scale--px (1px plus the
 * growth). Lines and icons keep their sizes. Below 1226px the gutters narrow
 * to the mobile rule; 1226px is where the wide gutters fit beside the 896px
 * wide column.
 * --------------------------------------------------------------------------- */

@media ( max-width: 1225px ) {

	:root {
		--wp--custom--layout--gutter: max( calc( 2 * var( --wp--preset--spacing--body-margin ) ), ( 100vw - var( --wp--style--global--wide-size ) ) / 2 );

		--wp--custom--layout--header-inset: var( --wp--custom--layout--gutter );
	}
}

@media ( max-width: 599px ) {

	:root {
		--wp--custom--layout--gutter: var( --wp--preset--spacing--body-margin );
	}
}


/* ------------------------------------------------------------------------------
 * Color modes
 * Dark is the default; the light values are in theme.json's custom.light, so
 * PHP can read both. Components keep their own light mode differences.
 * --------------------------------------------------------------------------- */

/*
 * Registered as a URL so the path resolves here, also where a component
 * stylesheet printed in the page uses it.
 */
@property --preset--topography-image {
	inherits: true;
	initial-value: none;
	syntax: "<url> | none";
}

:root {
	color-scheme: dark;
	--preset--topography-opacity: 0.1;
	--preset--topography-opacity--panel: 0.05;
	--preset--topography-opacity--panel-900: 0.1;
	--preset--topography-image: url( assets/svg/topography-dark.svg );
	--preset--tint-color: var( --wp--preset--color--900 );
	--preset--tint-strength: 1;
	--preset--frame-band: var( --wp--preset--color--950 );
}

:root:not( [data-theme="light"] ) .preset-light-only,
:root[data-theme="light"] .preset-dark-only {
	display: none !important;
}

/*
 * preset-align-baseline: items share a baseline, which the blocks' alignment
 * can't set.
 */
.preset-align-baseline {
	align-items: baseline !important;
}

/*
 * Core's post title link is an inline block, whose baseline is its last line.
 */
.preset-align-baseline .wp-block-post-title a {
	display: inline;
}

:root[data-theme="light"] {
	color-scheme: light;
	--preset--topography-opacity: 0.1;
	--preset--topography-opacity--panel: 0.1;
	--preset--topography-opacity--panel-900: 0.1;
	--preset--topography-opacity--frame: 0.15;
	--preset--topography-image: url( assets/svg/topography-light.svg );
	--preset--tint-color: var( --wp--preset--color--700 );
	--preset--tint-strength: 0.6;
	--preset--frame-band: var( --wp--preset--color--850 );
	--preset--noise: none;
	--wp--preset--color--950: var( --wp--custom--light--palette--950 );
	--wp--preset--color--900: var( --wp--custom--light--palette--900 );
	--wp--preset--color--850: var( --wp--custom--light--palette--850 );
	--wp--preset--color--800: var( --wp--custom--light--palette--800 );
	--wp--preset--color--700: var( --wp--custom--light--palette--700 );
	--wp--preset--color--600: var( --wp--custom--light--palette--600 );
	--wp--preset--color--500: var( --wp--custom--light--palette--500 );
	--wp--preset--color--400: var( --wp--custom--light--palette--400 );
	--wp--preset--color--300: var( --wp--custom--light--palette--300 );
	--wp--preset--color--200: var( --wp--custom--light--palette--200 );
	--wp--preset--color--100: var( --wp--custom--light--palette--100 );
	--wp--preset--color--50: var( --wp--custom--light--palette--50 );
	--wp--preset--color--0: var( --wp--custom--light--palette--0 );
	--wp--preset--color--accent: var( --wp--custom--light--palette--accent );
	--wp--custom--shadow--rgb: var( --wp--custom--light--shadow--rgb );
	--wp--custom--shadow--strength: var( --wp--custom--light--shadow--strength );

	--wp--custom--core-code--comment: var( --wp--custom--light--core-code--comment );
	--wp--custom--core-code--keyword: var( --wp--custom--light--core-code--keyword );
	--wp--custom--core-code--boolean: var( --wp--custom--light--core-code--boolean );
	--wp--custom--core-code--literal: var( --wp--custom--light--core-code--literal );
	--wp--custom--core-code--string: var( --wp--custom--light--core-code--string );
	--wp--custom--core-code--special-string: var( --wp--custom--light--core-code--special-string );
	--wp--custom--core-code--macro-name: var( --wp--custom--light--core-code--macro-name );
	--wp--custom--core-code--variable-definition: var( --wp--custom--light--core-code--variable-definition );
	--wp--custom--core-code--type-name: var( --wp--custom--light--core-code--type-name );
	--wp--custom--core-code--class-name: var( --wp--custom--light--core-code--class-name );
	--wp--custom--core-code--invalid: var( --wp--custom--light--core-code--invalid );
}


/* ------------------------------------------------------------------------------
 * Body background
 * The page color, noise (dark mode only) and a column line on each side of
 * the Full width.
 * --------------------------------------------------------------------------- */

:root {
	--preset--column-edge: min( var( --wp--custom--layout--full ) / 2, 50% - var( --wp--custom--layout--gutter ) + var( --wp--preset--spacing--body-margin ) );
	--preset--column-line: var( --wp--preset--color--850 );
	--preset--column-lines:
		linear-gradient(
			to right,
			transparent calc( 50% - var( --preset--column-edge ) - 0.5px ),
			var( --preset--column-line ) calc( 50% - var( --preset--column-edge ) - 0.5px ),
			var( --preset--column-line ) calc( 50% - var( --preset--column-edge ) + 0.5px ),
			transparent calc( 50% - var( --preset--column-edge ) + 0.5px ),
			transparent calc( 50% + var( --preset--column-edge ) - 0.5px ),
			var( --preset--column-line ) calc( 50% + var( --preset--column-edge ) - 0.5px ),
			var( --preset--column-line ) calc( 50% + var( --preset--column-edge ) + 0.5px ),
			transparent calc( 50% + var( --preset--column-edge ) + 0.5px )
		);

	/*
	 * Firefox shows the root's color where it hasn't painted yet when
	 * scrolling fast.
	 */
	background-color: var( --wp--preset--color--900 );

	min-height: 100%;
}

/*
 * The noise is baked into 900 ahead of time rather than blended: Firefox
 * redrew blend modes at every scroll step. Light mode has none, as soft light
 * barely showed there. Registered as a URL so the path resolves here.
 */
@property --preset--noise {
	inherits: true;
	initial-value: none;
	syntax: "<url> | none";
}

:root {
	--preset--noise: url( assets/images/noise-900-dark.webp );

	/*
	 * A 128px tile drawn at 64px, so each grain is one pixel on a 2x screen.
	 */
	--preset--noise-size: 64px;
}

/* Hover durations, the arrows' nudge and the easing of every transition. */
:root {
	--preset--hover-duration--s: 0.15s;
	--preset--hover-duration--m: 0.25s;
	--preset--hover-duration--l: 0.3s;
	--preset--hover-duration--xl: 0.45s;
	--preset--hover-nudge: 2px;
	--preset--easing--out: cubic-bezier( 0.33, 1, 0.68, 1 );

	--preset--easing--intro: cubic-bezier( 0.45, 0, 0.15, 1 );
}

/*
 * iOS otherwise enlarges text it thinks is small when a phone turns sideways.
 */
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

@media ( prefers-reduced-motion: no-preference ) {

	html {
		scroll-behavior: smooth;
	}
}

/*
 * Numeral features for figures that line up: tabular lining figures, ss02,
 * case-sensitive forms and the slashed zero.
 */
:root {
	--preset--num-font-feature-settings: "tnum" on, "lnum" on, "ss02" on, "case" on, "zero" on, "kern" off;
}

.preset-mono-nums {
	font-feature-settings: var( --preset--num-font-feature-settings );
}

body {
	background-image: var( --preset--noise );
	background-size: var( --preset--noise-size ) var( --preset--noise-size );
}

@media ( min-width: 600px ) {

	body {
		background-image: var( --preset--column-lines ), var( --preset--noise );
		background-repeat: no-repeat, repeat;
		background-size: 100% 100%, var( --preset--noise-size ) var( --preset--noise-size );
	}
}


/*
 * The page frame. Above 1920px the page is a centered frame, with darker
 * bands beside it. The background is on the root, which paints past the
 * page's edges when it rubber-bands. Front end only: the editor has no .wp-
 * site-blocks.
 */
:root:has( body > .wp-site-blocks ) {
	--preset--frame-start: calc( ( 100% - var( --wp--custom--layout--frame ) ) / 2 );
	--preset--frame-end: calc( ( 100% + var( --wp--custom--layout--frame ) ) / 2 );
	--preset--frame-bands:
		linear-gradient(
			to right,
			var( --preset--frame-band ) var( --preset--frame-start ),
			transparent var( --preset--frame-start ),
			transparent var( --preset--frame-end ),
			var( --preset--frame-band ) var( --preset--frame-end )
		);
	background-image: var( --preset--frame-bands ), var( --preset--noise );
	background-size: 100% 100%, var( --preset--noise-size ) var( --preset--noise-size );
}

@media ( min-width: 600px ) {

	:root:has( body > .wp-site-blocks ) {
		background-image: var( --preset--column-lines ), var( --preset--frame-bands ), var( --preset--noise );
		background-size: 100% 100%, 100% 100%, var( --preset--noise-size ) var( --preset--noise-size );
	}
}

body:has( > .wp-site-blocks ) {
	background-color: transparent;
	background-image: none;
}

/*
 * The bands' texture is a fixed layer per band: a background layer can't be
 * translucent, and a mask made Firefox slow to paint.
 */
@media ( min-width: 1921px ) {

	:root:has( body > .wp-site-blocks )::before,
	:root:has( body > .wp-site-blocks )::after {
		background: var( --preset--topography-image ) 0 0 / 1440px 1440px repeat;
		bottom: 0;
		content: "";
		opacity: var( --preset--topography-opacity--frame, var( --preset--topography-opacity ) );
		pointer-events: none;
		position: fixed;
		top: 0;
		width: var( --preset--frame-start );
		z-index: -1;
	}

	:root:has( body > .wp-site-blocks )::before {
		background-position-x: right;
		left: 0;
	}

	:root:has( body > .wp-site-blocks )::after {
		background-position-x: calc( -1 * var( --wp--custom--layout--frame ) );
		right: 0;
	}
}

/*
 * The frame draws the background over the root's too: Safari draws the root's
 * column lines blurred.
 */
.wp-site-blocks {
	background-color: var( --wp--preset--color--900 );
	background-image: var( --preset--noise );
	background-size: var( --preset--noise-size ) var( --preset--noise-size );
}

@media ( min-width: 600px ) {

	.wp-site-blocks {
		background-image: var( --preset--column-lines ), var( --preset--noise );
		background-repeat: no-repeat, repeat;
		background-size: 100% 100%, var( --preset--noise-size ) var( --preset--noise-size );
	}
}

/* A container, so 100cqw is the page's width without a scrollbar. */
.wp-site-blocks {
	container-type: inline-size;
	margin-left: auto;
	margin-right: auto;
	max-width: var( --wp--custom--layout--frame );
}


/* ------------------------------------------------------------------------------
 * Base elements
 * Only what theme.json has no setting for.
 * --------------------------------------------------------------------------- */

body {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

/* In :where(), so a block's own line height wins. */
:where( .has-large-font-size, .has-x-large-font-size ) {
	line-height: 1.3;
}

.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/*
 * Full width runs between the column lines, stopping half a pixel short of
 * their centers where they show, so they aren't covered. preset-is-bleed
 * keeps core's full width, to the window's edges.
 */
.is-layout-constrained > .alignfull:not( .preset-is-bleed ) {
	--preset--full-width: min( var( --wp--custom--layout--full ), 100% + 2 * var( --wp--preset--spacing--body-margin ) );
	--preset--full-inset: 0px;

	margin-inline: calc( ( 100% - var( --preset--full-width ) ) / 2 + var( --preset--full-inset ) );
	max-width: none;
	width: calc( var( --preset--full-width ) - 2 * var( --preset--full-inset ) );
}

@media ( min-width: 600px ) {

	.is-layout-constrained > .alignfull:not( .preset-is-bleed ) {
		--preset--full-inset: 0.5px;
	}
}

/*
 * A Full group is padded by a body margin rather than core's page padding, so
 * its content lands on the wide and content columns.
 */
.is-layout-constrained > .alignfull.wp-block-group:not( .preset-is-bleed ) {
	padding-left: calc( var( --wp--preset--spacing--body-margin ) - var( --preset--full-inset ) );
	padding-right: calc( var( --wp--preset--spacing--body-margin ) - var( --preset--full-inset ) );
}

/* ------------------------------------------------------------------------------
 * Gutter fade
 * From 1226px, blocks reaching the window's edges cover the gutters with the
 * page background, so the back arrow passes under them. gutter-fade.js lines
 * the noise up with the page's; the cover shows once placed, so not without
 * scripting.
 * --------------------------------------------------------------------------- */
@media ( min-width: 1226px ) {

	main :is( .preset-is-bleed, .alignfull.has-background ) {
		--preset--gutter-fade: var( --wp--preset--spacing--80 );
		--preset--gutter-fade-reach: calc( var( --preset--gutter-fade ) + 1.2 * var( --wp--preset--font-size--heading-1 ) );

		isolation: isolate;
		position: relative;
	}

	main :is( .preset-is-bleed, .alignfull.has-background ).is-placed::before {
		--preset--gutter-fade-start: max( 0px, ( 100% - var( --wp--custom--layout--frame ) ) / 2 );
		--preset--gutter-fade-end: min( 100%, ( 100% + var( --wp--custom--layout--frame ) ) / 2 );

		background-color: var( --wp--preset--color--900 );
		background-image: var( --preset--noise );
		background-position: 0 calc( var( --preset--gutter-fade-reach ) - var( --preset--gutter-fade-y ) );
		background-size: var( --preset--noise-size ) var( --preset--noise-size );
		content: "";
		height: calc( 100% + 2 * var( --preset--gutter-fade-reach ) );
		left: calc( -1 * var( --preset--gutter-fade-x ) );
		mask-composite: intersect;
		mask-image:
			linear-gradient( transparent, #000 var( --preset--gutter-fade ), #000 calc( 100% - var( --preset--gutter-fade ) ), transparent ),
			linear-gradient(
				to right,
				transparent var( --preset--gutter-fade-start ),
				#000 var( --preset--gutter-fade-start ),
				#000 calc( 50% - var( --preset--column-edge ) - 0.5px ),
				transparent calc( 50% - var( --preset--column-edge ) - 0.5px ),
				transparent calc( 50% + var( --preset--column-edge ) + 0.5px ),
				#000 calc( 50% + var( --preset--column-edge ) + 0.5px ),
				#000 var( --preset--gutter-fade-end ),
				transparent var( --preset--gutter-fade-end )
			);
		pointer-events: none;
		position: absolute;
		top: calc( -1 * var( --preset--gutter-fade-reach ) );
		width: var( --preset--gutter-fade-width );
		z-index: -1;
	}
}

.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: calc( 100dvh - var( --wp-admin--admin-bar--height, 0px ) );
}

.wp-site-blocks > main {
	flex-grow: 1;
}

::selection {
	background-color: var( --wp--preset--color--accent );
	color: var( --wp--preset--color--950 );
}

:where( h1, h2, h3, h4, h5, h6 ) {
	text-wrap: balance;
}

:where( p, li, dd, figcaption, blockquote ) {
	text-wrap: pretty;
}

/* theme.json's @mobile styles don't reach elements. */
@media ( max-width: 599px ) {

	:root h1 {
		line-height: 1.1;
	}
}

/*
 * Headings in Medium read as labels, with the body's spacing. By font size,
 * which theme.json can't select; here rather than in a block stylesheet, so
 * Post Title gets it too.
 */
:is( h1, h2, h3, h4, h5, h6 ).has-medium-font-size {
	letter-spacing: 0;
	line-height: 1.4;
}

/* On every element, as form controls reset the font shorthand. */
*,
::before,
::after {
	font-synthesis: none;
}

/*
 * Fallback while Söhne loads: local fonts given Söhne's line metrics, so
 * nothing moves when it swaps in. Without it, text reflowed on Linux and some
 * Android phones.
 */
@font-face {
	ascent-override: 78%;
	descent-override: 22%;
	font-family: Soehne-Fallback;
	line-gap-override: 27.4%;
	src: local( "Arial" ), local( "Liberation Sans" ), local( "Roboto" ), local( "Helvetica Neue" ), local( "Helvetica" );
}

/*
 * Bold is Söhne Kräftig (500), the heaviest weight loaded. The editor's 700
 * is inline, so only !important reaches it.
 */
b,
strong,
th {
	font-weight: 500;
}

[style*="font-weight: 700"],
[style*="font-weight:700"] {
	font-weight: 500 !important;
}

code,
kbd {
	font-family: var( --wp--preset--font-family--mono );
}

/*
 * Inline code is 0.85em, about 15px in body text, as Figma's 16px read too
 * large. Little padding above and below, so code on lines in a row doesn't
 * touch.
 */
:not( pre ) > code {
	background-color: var( --wp--preset--color--800 );
	border-radius: var( --wp--preset--border-radius--small );
	color: var( --wp--preset--color--200 );
	font-size: 0.85em;
	padding: 0.21em 0.4em;
	white-space: nowrap;
}

/*
 * Core's copy is in its common block styles, which a block theme loading
 * styles per block doesn't get on the front end.
 */
.screen-reader-text {
	border: 0;
	clip-path: inset( 50% );
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-break: normal !important;
	overflow-wrap: normal !important;
}

/*
 * The skip link, as a Small solid button over the logo. inc/skip-link.php
 * adds the button class and drops core's styles.
 */
.skip-link.screen-reader-text:focus {
	background-color: var( --wp--preset--color--100 );
	border: 1px solid var( --wp--preset--color--100 );
	clip-path: none;
	color: var( --wp--preset--color--900 );
	font-size: var( --wp--preset--font-size--small );
	height: auto;
	left: var( --wp--preset--spacing--body-margin );
	line-height: 1.4;
	margin: 0;
	padding: calc( ( 32 * var( --wp--custom--scale--px ) - 1cap ) / 2 - 1px ) var( --wp--preset--spacing--30 );
	text-box: trim-both cap alphabetic;
	text-decoration: none;
	top: calc( var( --wp-admin--admin-bar--height, 0px ) + var( --wp--preset--spacing--body-margin ) );
	width: auto;
	z-index: 100000;
}

@supports not ( text-box: trim-both cap alphabetic ) {

	.skip-link.screen-reader-text:focus {
		line-height: 1cap;
	}
}

/*
 * Call-to-action boxes (newsletter, work with me, tutorial request): the
 * first line is trimmed to its capitals, so the padding above the text
 * matches the padding below the buttons or field.
 */
.preset-cta > :first-child > :first-child {
	text-box: trim-start cap alphabetic;
}

/* Outset's color classes that old content still uses, in Preset's colors. */
:root {
	--wp--preset--color--text-light: var( --wp--preset--color--500 );
	--wp--preset--color--contrast-2: var( --wp--preset--color--500 );
	--wp--preset--color--contrast-4: var( --wp--preset--color--800 );
	--wp--preset--color--background-light: var( --wp--preset--color--950 );
}

.has-text-light-color,
.has-contrast-2-color {
	color: var( --wp--preset--color--500 );
}

.has-background-light-background-color {
	background-color: var( --wp--preset--color--950 );
}

.has-contrast-4-border-color {
	border-color: var( --wp--preset--color--800 );
}

.has-contrast-4-background-color {
	background-color: var( --wp--preset--color--950 );
}


/* ------------------------------------------------------------------------------
 * Intros
 * Only on a fresh load, not through a view transition (preset-has-view-
 * transition), and not with reduced motion. Elements start out of sight in
 * their own style: held only by a delayed animation, Safari drew them in
 * place for a moment first.
 * --------------------------------------------------------------------------- */

@keyframes preset-intro-rise {

	to {
		opacity: 1;
		translate: 0;
	}
}

/*
 * No translate: it would make the section the containing block of fixed
 * elements inside it.
 */
@keyframes preset-intro-fade {

	to {
		opacity: 1;
	}
}


/* ------------------------------------------------------------------------------
 * Interaction states
 * --------------------------------------------------------------------------- */

/*
 * !important, so a block that sets text-decoration as a whole doesn't reset
 * the thickness.
 */
:root {
	--preset--underline: var( --wp--preset--color--600 );
}

a {
	text-decoration-color: var( --preset--underline );
	text-decoration-thickness: 1px !important;
	text-underline-offset: 0.2em;
	transition: color var( --preset--hover-duration--m ) var( --preset--easing--out ), text-decoration-color var( --preset--hover-duration--m ) var( --preset--easing--out );
}

a:is( :hover, :focus-visible ) {
	text-decoration-color: currentcolor;
}

/* A block's link color can only have a hover, not a focus. */
.has-link-color a:where( :not( .wp-element-button ) ):focus-visible {
	color: var( --wp--preset--color--100 );
}

:root {
	--preset--focus: var( --wp--preset--color--300 );
}

:focus-visible {
	outline: 2px solid var( --preset--focus );
	outline-offset: 2px;
}

.wp-block-button__link:is( .has-accent-border-color, .has-accent-background-color ):focus-visible {
	outline-color: var( --wp--preset--color--accent );
}

/* Without specificity, so any radius set elsewhere wins. */
:where( :focus-visible ) {
	border-radius: var( --wp--preset--border-radius--small );
}

@media ( prefers-reduced-motion: reduce ) {

	a {
		transition: none;
	}
}


/* ------------------------------------------------------------------------------
 * Link cover
 * preset-link-cover stretches its link over the nearest preset-has-link-
 * cover, so the whole card opens it while it stays the only link. The focus
 * outline goes round the card; inside a clipping box, it's drawn inside the
 * edges.
 * --------------------------------------------------------------------------- */

.preset-has-link-cover {
	position: relative;
}

.preset-link-cover a::after {
	content: "";
	inset: 0;
	position: absolute;
}

/*
 * In post content, a link to another site gets a ↗ (blocks/post-content.css),
 * drawn on the ::after a cover uses, on a relative link, 1em wide.
 */
.preset-link-cover a {
	padding-right: 0;
	position: static;
}

.preset-link-cover a::after {
	background: none;
	height: auto;
	mask: none;
	width: auto;
}

.preset-link-cover a:focus-visible {
	outline: 0;
}

.preset-link-cover a:focus-visible::after {
	border-radius: var( --wp--preset--border-radius--small );
	outline: 2px solid var( --preset--focus );
	outline-offset: 2px;
}

.preset-topography .preset-has-link-cover .preset-link-cover a:focus-visible::after {
	outline-offset: -4px;
}

.preset-has-link-cover.preset-topography:has( .preset-link-cover a:focus-visible ) {
	outline: 2px solid var( --preset--focus );
	outline-offset: 2px;
}

.preset-has-link-cover.preset-topography .preset-link-cover a:focus-visible::after {
	outline: 0;
}


/* ------------------------------------------------------------------------------
 * Icons
 * preset-icon-{name} picks an icon from assets/svg/icons, used as a mask
 * through var( --preset--icon ).
 * --------------------------------------------------------------------------- */

/*
 * Registered as a URL, so it resolves here rather than where a printed block
 * stylesheet uses it.
 */
@property --preset--icon {
	inherits: true;
	initial-value: none;
	syntax: "<url> | none";
}

.preset-icon-arrow-down {
	--preset--icon: url( assets/svg/icons/arrow-down.svg );
}

.preset-icon-arrow-up {
	--preset--icon: url( assets/svg/icons/arrow-up.svg );
}

.preset-icon-arrow-left {
	--preset--icon: url( assets/svg/icons/arrow-left.svg );
}

.preset-icon-arrow-right {
	--preset--icon: url( assets/svg/icons/arrow-right.svg );
}

.preset-icon-arrow-up-right {
	--preset--icon: url( assets/svg/icons/arrow-up-right.svg );
}

.preset-icon-chevron-left {
	--preset--icon: url( assets/svg/icons/chevron-left.svg );
}

.preset-icon-chevron-right {
	--preset--icon: url( assets/svg/icons/chevron-right.svg );
}

.preset-icon-link {
	--preset--icon: url( assets/svg/icons/link.svg );
}

.preset-icon-map-pin {
	--preset--icon: url( assets/svg/icons/map-pin.svg );
}

.preset-icon-plus {
	--preset--icon: url( assets/svg/icons/plus.svg );
}

.preset-icon-search {
	--preset--icon: url( assets/svg/icons/search.svg );
}

.preset-icon-star {
	--preset--icon: url( assets/svg/icons/star.svg );
}

/* ------------------------------------------------------------------------------
 * Forms
 * --------------------------------------------------------------------------- */

/* In :where(), so any field styles win. */
:root {
	--preset--field-ring: 8px;
}

/* A thinner focus ring on phones, where 8px read heavy. */
@media ( max-width: 599px ) {

	:root {
		--preset--field-ring: 6px;
	}
}

:where( input:not( [type="button"], [type="checkbox"], [type="color"], [type="file"], [type="hidden"], [type="image"], [type="radio"], [type="range"], [type="reset"], [type="submit"] ), select, textarea ) {
	background-color: var( --wp--preset--color--950 );
	border: 1px solid transparent;
	border-radius: var( --wp--preset--border-radius--medium );
	box-sizing: border-box;
	color: var( --wp--preset--color--300 );
	font-family: inherit;
	font-size: var( --wp--preset--font-size--small );
	line-height: 1.4;
	margin: 0;
	padding: calc( ( 64px - 1lh ) / 2 - 2px ) 18px calc( ( 64px - 1lh ) / 2 ); /* 1px higher, to center the capitals. */
}

:where( textarea ) {
	height: 180px;
	resize: vertical;
}

:where( input, textarea )::placeholder {
	color: var( --wp--preset--color--500 );
	opacity: 1;
}

:where( input:not( [type="button"], [type="checkbox"], [type="color"], [type="file"], [type="hidden"], [type="image"], [type="radio"], [type="range"], [type="reset"], [type="submit"] ), select, textarea ):focus {
	border-color: var( --wp--preset--color--700 );
	box-shadow: 0 0 0 var( --preset--field-ring ) var( --wp--preset--color--850 );
	color: var( --wp--preset--color--100 );
	outline: 0;
}

@media ( prefers-reduced-motion: no-preference ) {

	:where( input, select, textarea ) {
		transition: border-color var( --preset--hover-duration--m ) var( --preset--easing--out ), box-shadow var( --preset--hover-duration--m ) var( --preset--easing--out ), color var( --preset--hover-duration--m ) var( --preset--easing--out );
	}
}

input[type="search"] {
	appearance: none;
}

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
	appearance: none;
	display: none;
}
