/*
Theme Name: Metis
Theme URI: https://themeshaper.com/metis/
Author: Automattic
Author URI: https://automattic.com/
Description: Mētis is a block theme for creators in an unmapped moment: people who work in more than one form and keep finding their way as the work changes. Six starter-site templates share one pattern library, six style variations, and a Dark Mode switch, all designed to be customized in the Site Editor until the site feels like yours.
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 7.2
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: metis
Tags: one-column, full-site-editing, block-patterns, block-styles, style-variations, blog, translation-ready
*/

/*
 * Mētis stylesheet
 *
 * Most of the design lives in theme.json, so you can change it in the Site
 * Editor under Styles. This file holds only what theme.json can't do, for
 * the site. The Editor loads assets/css/editor-style.css, which follows the
 * same sections; when you change a rule in one file, change it in the other.
 *
 *   1. Base             Site-wide refinements. Automatic.
 *   2. Buttons          Hover and press motion for every Button, plus the
 *                       Glossy style (Button → Styles).
 *   3. Gradient         The Gradient style for Groups (Group → Styles), and
 *                       the matching metis-day-night class.
 *   4. Utility classes  Opt-in helpers. Select a block, open Advanced →
 *                       Additional CSS class(es) and type the class name.
 *   5. Motion           Text entrances on load and on scroll. Automatic
 *                       where a pattern adds the class; silent otherwise.
 *   6. Back to top      The round control in the bottom corner. Automatic.
 *   7. Block fixes      Small fixes to core blocks. Automatic.
 *
 * Animations stop for visitors who ask their device to reduce motion.
 */


/* ==========================================================================
   1. Base
   ========================================================================== */

/* Crossfade between pages. */
@media (prefers-reduced-motion: no-preference) {
	@view-transition {
		navigation: auto;
	}
}

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

/* Fewer lonely last words in text. */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

/* Selection is a translucent wash of the action colour. It sets no text
   colour on purpose: the copy keeps whatever colour its background gives it,
   so it stays readable on light sections and in the dark footer alike. */
::selection {
	background: color-mix(in srgb, var(--wp--preset--color--theme-7) 36%, transparent);
}

:where(a, button, input, textarea, select, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--theme-7);
	outline-offset: 2px;
}

/* Inverse surface. Add metis-inverse to a Group to pin it to the darkest
   surface with light copy, whatever palette is in use: it re-points the colour
   slots inside the block, so headline, text, rules and outline Buttons keep
   using the same slots they already used. theme-2 becomes the surface, theme-1
   and theme-5 its text. theme-6 stays alone: it is the label colour of a
   filled Button, so it has to keep following the palette. In Dark Mode the
   page itself is near-black, so the surface steps up to a panel to stay a
   distinct band. */
.metis-inverse {
	--wp--preset--color--theme-1: #F7F9FC;
	--wp--preset--color--theme-2: #17243B;
	--wp--preset--color--theme-3: #F7F9FCB3;
	--wp--preset--color--theme-5: #F7F9FC99;
	background-color: var(--wp--preset--color--theme-2);
	color: var(--wp--preset--color--theme-1);
}

html[data-metis-mode="dark"] .metis-inverse {
	--wp--preset--color--theme-2: #131C2E;
}

/* Chinese copy needs a touch more leading than Latin at the same size, and
   long unbroken Latin strings inside it have to be allowed to wrap. */
:lang(zh) p,
:lang(zh) li {
	line-height: 1.8;
	overflow-wrap: break-word;
}

/* Thin underlines, a little below the text. Core sometimes underlines a
   child element (the Accordion title), and thickness does not inherit. */
a,
button,
a *,
button * {
	text-decoration-thickness: 1px !important;
	text-underline-offset: 0.1em;
}

/* The "Continue reading" link of a post using the More block. */
.more-link {
	display: block;
}

:where(pre) {
	overflow-x: auto;
}

/* No gap above the footer. */
footer.wp-block-template-part {
	margin-block-start: 0 !important;
}


/* ==========================================================================
   2. Buttons
   ========================================================================== */

/* Every Button darkens on hover and shows the same pressed colours.
   !important outranks the colour picked for a single button. The secondary
   (outline) button is excluded: it keeps its own quiet behaviour below. */
.wp-block-button .wp-block-button__link {
	transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	background-color: color-mix(in srgb, var(--wp--preset--color--theme-7) 78%, var(--wp--preset--color--theme-2));
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:active {
	background: color-mix(in srgb, var(--wp--preset--color--theme-7) 64%, var(--wp--preset--color--theme-2)) !important;
	color: var(--wp--preset--color--theme-6) !important;
}

/* Secondary Button: outline. Text and rule take the block's own text colour
   through currentColor, so the same button works on paper and on ink: a 1px
   rule at 30%, a whisper of fill on hover, never a solid slab. */
.wp-block-button.is-style-outline.is-style-outline .wp-block-button__link {
	background-color: transparent;
	border-style: solid;
	border-width: 1px;
	border-color: color-mix(in srgb, currentColor 36%, transparent);
	color: inherit;
}

.wp-block-button.is-style-outline.is-style-outline .wp-block-button__link:hover {
	background-color: color-mix(in srgb, currentColor 7%, transparent);
	border-color: color-mix(in srgb, currentColor 55%, transparent);
}

.wp-block-button.is-style-outline.is-style-outline .wp-block-button__link:active {
	background-color: color-mix(in srgb, currentColor 12%, transparent);
	border-color: color-mix(in srgb, currentColor 60%, transparent);
}

/* Glossy (Button → Styles): kept flat on purpose. The style name stays so
   existing patterns keep working; the sheen and inner rim are removed. */
.wp-block-button.is-style-glossy .wp-block-button__link {
	box-shadow: none;
}

.wp-block-button.is-style-glossy .wp-block-button__link::before {
	content: none;
}

.wp-block-button.is-style-glossy .wp-block-button__link:hover:not(:active) {
	background-color: color-mix(in srgb, var(--wp--preset--color--theme-7) 78%, var(--wp--preset--color--theme-2)) !important;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-button .wp-block-button__link {
		transition: none;
	}
}


/* ==========================================================================
   3. Gradient
   ========================================================================== */

/* Gradient (Group → Styles): a short wash of theme-7 over the top of the
   section, fading into theme-1. It used to breathe; it now sits still, so
   the colour reads as light rather than motion. Leave the Group's own
   Background empty: a picked colour shows below the wash and leaves a hard
   edge on tall sections. */
.wp-block-group.is-style-gradient-flow {
	--metis-gradient-top: color-mix(in srgb, var(--wp--preset--color--theme-7) 12%, transparent);
	background-color: var(--wp--preset--color--theme-1);
	background-image: linear-gradient(180deg, var(--metis-gradient-top) 0%, transparent 100%);
	background-repeat: no-repeat;
	background-size: 100% 14rem;
	background-position: 50% 0%;
}

/* metis-day-night: a solid background in the Gradient's top colour.
   Clear the block's own Background colour. */
.metis-day-night {
	background-color: var(--wp--preset--color--theme-7);
}


/* ==========================================================================
   4. Utility classes

   Select a block, open Advanced → Additional CSS class(es), and type the
   class name. Separate several classes with spaces. Doubled selectors
   (.grow.grow) let a class win over the block's own layout settings.
   ========================================================================== */

/* --- Layout -------------------------------------------------------------- */

/* grow: a Row child takes the space left over. Example: the "Search
   Wrapper" group in "Header, uppercase title and search bar". */
.grow.grow {
	flex-grow: 1;
}

/* equal-widths: on a Row, every child gets the same width, whatever its
   content. Example: "Contact, closing band". */
.equal-widths.equal-widths > *:not(.block-list-appender) {
	flex: 1 1 0;
	min-width: 0;
}

.equal-widths.equal-widths > .wp-block-button > .wp-block-button__link,
.equal-widths.equal-widths > .wp-block-image img {
	width: 100%;
}

/* equal-widths-phone: the same, on phones only (480px and narrower).
   Example: the button pair in the Business template. */
@media (max-width: 480px) {
	.equal-widths-phone.equal-widths-phone > *:not(.block-list-appender) {
		flex: 1 1 0;
		min-width: 0;
	}

	.equal-widths-phone.equal-widths-phone > .wp-block-button > .wp-block-button__link {
		width: 100%;
	}
}

/* fill-width: a block fills its Row cell. Needed by Search, whose own
   width setting only reaches its inner box.
   Example: "Header, uppercase title and search bar". */
.fill-width.fill-width {
	width: 100%;
	flex-grow: 1;
}

/* fill-cover: add to a Cover so its content fills the full height, for
   example a Stack that spaces its items from top to bottom.
   Example: "About, builder portrait". */
.fill-cover.fill-cover > .wp-block-cover__inner-container {
	align-self: stretch;
	display: flex;
	flex-direction: column;
}

.fill-cover.fill-cover > .wp-block-cover__inner-container > * {
	flex-grow: 1;
}

/* pull-sides: pulls a block sideways under its neighbours by one spacing
   step on each side (Groups have no side-margin controls). Give the
   neighbours on-top so they stay above it.
   Example: the image stack in the Business template. */
.pull-sides.pull-sides {
	margin-left: calc(-1 * var(--wp--preset--spacing--60));
	margin-right: calc(-1 * var(--wp--preset--spacing--60));
}

/* on-top: keeps a block above anything that overlaps it.
   Example: the 404 and Magazine templates. */
.on-top.on-top {
	position: relative;
	z-index: 100;
}

/* clip-overflow: add to a container to hide whatever sticks out of its
   edges. Example: the footer group of "Footer, watermark on gradient",
   which crops its large title. */
.clip-overflow {
	overflow: hidden;
}

/* no-stacking: on a row of image + text, keeps both side by side so a long
   title wraps instead of dropping below the image, and every image keeps
   its set size. Above 782px; on screens 782px and narrower (tablets and
   phones) the row stacks as designed. Example: "Posts, media list". */
@media (min-width: 783px) {
	.no-stacking.no-stacking {
		flex-wrap: nowrap;
	}

	.no-stacking.no-stacking > * {
		min-width: 0;
	}

	.no-stacking.no-stacking > .wp-block-post-featured-image {
		flex-shrink: 0;
	}
}

/* --- Query Loops (add to the Post Template) ------------------------------ */

/* alternate-ratios: Featured Images alternate between 3:4 and 1:1.
   Example: "Posts, alternating image grid". The Editor adds a hidden copy
   of the selected post, so only visible items are counted. */
.alternate-ratios > li:nth-child(odd of li:not([style*="none"])) .wp-block-post-featured-image {
	aspect-ratio: 3/4 !important;
}

.alternate-ratios > li:nth-child(even of li:not([style*="none"])) .wp-block-post-featured-image {
	aspect-ratio: 1/1 !important;
}

.alternate-ratios .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* no-orphan: on a Grid of four posts with 16rem columns and a 16px gap,
   hides the fourth post while only three fit in a row, so the last card
   never sits alone. Four, two or one per row show all four.
   Example: "Posts, alternating image grid". */
@container (width >= calc(48rem + 32px)) and (width < calc(64rem + 48px)) {
	.no-orphan > li:nth-child(4 of li:not([style*="none"])) {
		display: none;
	}
}

/* stagger-middle: on a three-column grid, steps the middle card down.
   Above 782px only; narrower grids stay even.
   Example: "Posts, staggered cards". */
@media (min-width: 783px) {
	.stagger-middle > li:nth-child(3n+2 of li:not([style*="none"])) {
		margin-top: var(--wp--preset--spacing--70);
	}
}

/* --- Text and links ------------------------------------------------------ */

/* balance-text: evens out the line lengths of a heading.
   Example: "Features, mirrored rows". */
.balance-text.balance-text {
	text-wrap: balance;
}

/* indent-first-line: indents the first line by a third of the width.
   Example: the heading under "Meet Mētis" on the front page. */
.indent-first-line {
	text-indent: 33.33%;
}

/* no-underline: links inside show no underline until hovered or focused.
   Example: dates and meta in the post lists. */
.no-underline a {
	text-decoration: none;
}

.no-underline a:hover,
.no-underline a:focus-visible {
	text-decoration: underline;
}

/* no-symbol: removes the small ¬ before an Author Name. For the line
   beside a Date, use no-stroke. Example: the author in the Single template. */
.no-symbol.no-symbol::before {
	content: none;
}

/* no-stroke: removes the line beside a Date.
   Example: the Single template. */
.no-stroke.no-stroke {
	border-left: none;
	padding-left: 0;
}

/* --- Images -------------------------------------------------------------- */

/* dim-images: images inside show at half strength and brighten when
   hovered or focused. Example: "Clients, logo row". */
.dim-images .wp-block-image img {
	opacity: 0.5;
	transition: opacity 0.2s ease-out;
}

.dim-images .wp-block-image img:hover,
.dim-images .wp-block-image:focus-within img {
	opacity: 1;
}

/* metis-motion-blur: add to a Cover to blur its image sideways, like
   movement; the text stays sharp. Shows on the site, not in the Editor.
   Example: the Single with Sidebar template. */
.wp-block-cover.metis-motion-blur img.wp-block-cover__image-background {
	filter: url(#metis-motion-blur);
	transform: scale(1.08);
}

/* --- Header and navigation ----------------------------------------------- */

/* menu-and-icon: shows the menu icon before the "Menu" label on the
   Navigation's open button (core offers one or the other) and sets the
   label in capitals. Example: "Header, uppercase title and search bar". */
.menu-and-icon .wp-block-navigation__responsive-container-open {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	text-transform: uppercase;
}

.menu-and-icon .wp-block-navigation__responsive-container-open::before {
	content: "";
	width: 1.1em;
	height: 1.1em;
	background-color: currentColor;
	-webkit-mask: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M5 8v1.5h14V8H5zm0 6.5v1.5h14v-1.5H5z%22/%3E%3C/svg%3E') no-repeat center / contain;
	mask: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M5 8v1.5h14V8H5zm0 6.5v1.5h14v-1.5H5z%22/%3E%3C/svg%3E') no-repeat center / contain;
}

/* search-inset: moves the Search text away from rounded corners.
   Example: "Header, uppercase title and search bar". */
.search-inset .wp-block-search__input {
	padding-inline-start: var(--wp--preset--spacing--30);
}

/* metis-mode-toggle: turns a Group (an Icon inside works well) into the
   Dark Mode switch. Visitors switch to the Cimmeria colours, and their
   choice stays on every page until they switch back. functions.php makes
   the Group a keyboard-accessible button.
   Example: "Header, minimal with menu button" and the Navigation Overlay. */
.metis-mode-toggle {
	cursor: pointer;
}

/* --- Sections ------------------------------------------------------------ */

/* hero-rotate: add to a Row of 2 to 5 Covers; they take turns opening,
   four seconds each. The Row keeps a 2:1 shape.
   Example: "Hero, taking turns", and the hero of the front page. */
.hero-rotate.hero-rotate {
	aspect-ratio: 2/1;
}

.hero-rotate.hero-rotate > .wp-block-cover {
	flex: 0 1 15%;
	aspect-ratio: auto !important;
	min-height: 0;
	overflow: hidden;
	animation: metis-hero-turn-4 16s ease-in-out infinite;
}

.hero-rotate.hero-rotate > .wp-block-cover:nth-child(2) {
	animation-delay: 4s;
}

.hero-rotate.hero-rotate > .wp-block-cover:nth-child(3) {
	animation-delay: 8s;
}

.hero-rotate.hero-rotate > .wp-block-cover:nth-child(4) {
	animation-delay: 12s;
}

.hero-rotate.hero-rotate > .wp-block-cover:nth-child(5) {
	animation-delay: 16s;
}

/* The cycle is timed for four Covers; these retime it for two, three or five. */
.hero-rotate.hero-rotate > .wp-block-cover:first-child:nth-last-child(2 of .wp-block-cover),
.hero-rotate.hero-rotate > .wp-block-cover:first-child:nth-last-child(2 of .wp-block-cover) ~ .wp-block-cover {
	animation-name: metis-hero-turn-2;
	animation-duration: 8s;
}

.hero-rotate.hero-rotate > .wp-block-cover:first-child:nth-last-child(3 of .wp-block-cover),
.hero-rotate.hero-rotate > .wp-block-cover:first-child:nth-last-child(3 of .wp-block-cover) ~ .wp-block-cover {
	animation-name: metis-hero-turn-3;
	animation-duration: 12s;
}

.hero-rotate.hero-rotate > .wp-block-cover:first-child:nth-last-child(5 of .wp-block-cover),
.hero-rotate.hero-rotate > .wp-block-cover:first-child:nth-last-child(5 of .wp-block-cover) ~ .wp-block-cover {
	animation-name: metis-hero-turn-5;
	animation-duration: 20s;
}

@keyframes metis-hero-turn-2 {
	0% { flex-grow: 0; }
	10% { flex-grow: 1; }
	50% { flex-grow: 1; }
	60% { flex-grow: 0; }
	100% { flex-grow: 0; }
}

@keyframes metis-hero-turn-3 {
	0% { flex-grow: 0; }
	6.7% { flex-grow: 1; }
	33.3% { flex-grow: 1; }
	40% { flex-grow: 0; }
	100% { flex-grow: 0; }
}

@keyframes metis-hero-turn-4 {
	0% { flex-grow: 0; }
	5% { flex-grow: 1; }
	25% { flex-grow: 1; }
	30% { flex-grow: 0; }
	100% { flex-grow: 0; }
}

@keyframes metis-hero-turn-5 {
	0% { flex-grow: 0; }
	4% { flex-grow: 1; }
	20% { flex-grow: 1; }
	24% { flex-grow: 0; }
	100% { flex-grow: 0; }
}

/* Reduced motion: the Covers stand still, the first one open. !important
   outranks the retiming rules above. */
@media (prefers-reduced-motion: reduce) {
	.hero-rotate.hero-rotate > .wp-block-cover {
		animation: none !important;
	}

	.hero-rotate.hero-rotate > .wp-block-cover:first-child {
		flex-grow: 1;
	}
}

/* tabs-split: add to a Tabs block to put the tab list in a left column
   and the panels on the right, like a Columns block (auto + 66.66%).
   Each tab is a large heading with a + that turns into − when open. The
   tabs use the Tabs block font, so style variations can change it. On
   screens 782px and narrower the tabs return above the panels.
   Example: "Tabs, sidebar and stage". */
@media (max-width: 782px) {
	.wp-block-tabs.tabs-split {
		padding: 0;
	}

	.wp-block-tabs.tabs-split > .wp-block-tab-panels {
		margin-block-start: var(--wp--style--block-gap, 2em);
	}
}

@media (min-width: 783px) {
	.wp-block-tabs.tabs-split {
		display: flex;
		padding: 0;
		gap: var(--wp--style--block-gap, 2em);
		align-items: flex-start;
	}

	.wp-block-tabs.tabs-split > .wp-block-tab-list {
		flex-direction: column;
		flex: 1 1 0;
		min-width: 0;
	}

	.wp-block-tabs.tabs-split > .wp-block-tab-list button {
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		border-top: 1px dotted currentColor;
		padding: var(--wp--preset--spacing--30) 0;
		font-family: inherit;
		font-size: var(--wp--preset--font-size--x-large);
		font-weight: 600;
		letter-spacing: -0.02em;
		line-height: 1.3;
	}

	/* The + and − are decoration (the tab already announces its state),
	   so screen readers skip them. */
	.wp-block-tabs.tabs-split > .wp-block-tab-list button::after {
		content: "+";
		content: "+" / "";
		font-family: var(--wp--preset--font-family--recursive-linear);
		font-size: var(--wp--preset--font-size--large);
		font-weight: 400;
		letter-spacing: 0;
	}

	.wp-block-tabs.tabs-split > .wp-block-tab-list button[aria-selected="true"]::after {
		content: "\2212";
		content: "\2212" / "";
	}

	.wp-block-tabs.tabs-split > .wp-block-tab-list button[aria-selected="true"]::before {
		content: none;
	}

	.wp-block-tabs.tabs-split > .wp-block-tab-panels {
		flex: 0 1 66.66%;
		min-width: 0;
	}
}


/* ==========================================================================
   5. Motion

   Three entrances, all opt-in through a class on the block, all using only
   transform and opacity so nothing reflows and the layout never jumps.

   - metis-line: the line rises out of metis-mask, a clipping box, so it looks
     pushed up from behind the edge. Set --metis-delay to stagger several lines.
   - metis-enter: fade and a short lift, for the copy that follows a headline.
     Quick, because the first screen is already there when it plays.
   - metis-scroll-in: a longer, slower lift for blocks further down the page,
     where the visitor is moving and the eye needs time to catch it.
   - metis-stagger: on a Group, hands the same lift to each child in turn, so a
     row of cards or a list of steps arrives as a sequence.

   None of them play on arrival. The script in functions.php adds metis-js
   before the first paint, which declares every entrance already holding its
   first frame; metis-ready then starts the first screen, once the page and its
   fonts have loaded. Everything below the fold waits for its own turn: the
   script marks a block is-in the first time it is scrolled into view, and the
   entrance plays then, once. A block nobody scrolls to never animates.

   Without JavaScript nothing is held back: the entrances are simply not
   declared, and every block sits in its final place from the start.
   ========================================================================== */

@keyframes metis-line-rise {
	from {
		transform: translateY(112%);
	}

	to {
		transform: translateY(0);
	}
}

@keyframes metis-fade-up {
	from {
		opacity: 0;
		transform: translateY(16px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* The scroll entrance travels further and takes its time: a block should be
   seen arriving, not found already in place. --metis-travel lets a row of
   small items move less than a whole section does. */
@keyframes metis-rise {
	from {
		opacity: 0;
		transform: translateY(var(--metis-travel, 2.5rem));
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: no-preference) {
	html.metis-js .metis-mask {
		display: block;
		overflow: hidden;
	}

	html.metis-js .metis-line {
		display: block;
		animation: metis-line-rise 760ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
		animation-delay: var(--metis-delay, 0ms);
		animation-play-state: paused;
	}

	html.metis-js .metis-enter {
		animation: metis-fade-up 560ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
		animation-delay: var(--metis-delay, 0ms);
		animation-play-state: paused;
	}

	/* Fill mode is backwards, not both: the entrance has to hold its first
	   frame before it starts — otherwise a block flashes in place — but it must
	   let go once it ends. With `both` the final translateY(0) keeps winning
	   over a later :hover transform, and a card that lifts everywhere else in
	   the design sits still here. */
	html.metis-js .metis-scroll-in {
		animation: metis-rise 900ms cubic-bezier(0.4, 0, 0.2, 1) backwards;
		animation-delay: var(--metis-delay, 0ms);
		animation-play-state: paused;
	}

	/* A stagger Group does not move itself: its children do, one after another,
	   so a row of cards or a list of steps arrives in order rather than as one
	   slab. The animation sits on the children, which is why the Group can be
	   moved or edited in the editor without touching this rule. */
	html.metis-js .metis-stagger > * {
		--metis-travel: 1.75rem;
		animation: metis-rise 900ms cubic-bezier(0.4, 0, 0.2, 1) backwards;
		animation-play-state: paused;
	}

	html.metis-js .metis-stagger > :nth-child(2) {
		animation-delay: 90ms;
	}

	html.metis-js .metis-stagger > :nth-child(3) {
		animation-delay: 180ms;
	}

	html.metis-js .metis-stagger > :nth-child(4) {
		animation-delay: 270ms;
	}

	html.metis-js .metis-stagger > :nth-child(5) {
		animation-delay: 360ms;
	}

	html.metis-js .metis-stagger > :nth-child(6) {
		animation-delay: 450ms;
	}

	html.metis-js .metis-stagger > :nth-child(n + 7) {
		animation-delay: 540ms;
	}

	html.metis-ready .metis-line,
	html.metis-ready .metis-enter,
	html.metis-js .metis-scroll-in.is-in,
	html.metis-js .metis-stagger.is-in > * {
		animation-play-state: running;
	}
}


/* Printing has no scroll to drive the timeline, so everything is shown. */
@media print {
	.metis-line,
	.metis-enter,
	.metis-scroll-in,
	.metis-stagger > * {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}


/* ==========================================================================
   6. Back to top

   A round control in the bottom corner, out of the way until the first screen
   is behind the visitor. The script in functions.php shows it; without
   JavaScript it is never rendered as a visible button at all.
   ========================================================================== */

.metis-to-top {
	display: none;
}

html.metis-js .metis-to-top {
	position: fixed;
	z-index: 20;
	inset-inline-end: clamp(1rem, 2.5vw, 2rem);
	bottom: calc(clamp(1rem, 2.5vw, 2rem) + env(safe-area-inset-bottom, 0px));
	display: grid;
	place-items: center;
	width: 2.875rem;
	height: 2.875rem;
	padding: 0;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--theme-2) 18%, transparent);
	border-radius: 50%;
	background-color: var(--wp--preset--color--theme-6);
	color: var(--wp--preset--color--theme-2);
	box-shadow: 0 8px 22px -10px rgb(0 0 0 / 35%);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(0.5rem);
	transition: opacity 200ms ease, transform 200ms ease, visibility 200ms, color 160ms ease, border-color 160ms ease;
}

/* Dark Mode puts the surface within a shade of the panels behind it, so the
   control steps up a little and its ring steps with it: it has to read as a
   thing above the page, not a hole in it. */
html[data-metis-mode="dark"] .metis-to-top {
	background-color: color-mix(in srgb, var(--wp--preset--color--theme-6) 88%, var(--wp--preset--color--theme-2));
	border-color: color-mix(in srgb, var(--wp--preset--color--theme-2) 16%, transparent);
}

html.metis-js .metis-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

html.metis-js .metis-to-top:hover {
	color: var(--wp--preset--color--theme-7);
	border-color: color-mix(in srgb, var(--wp--preset--color--theme-7) 45%, transparent);
}

html.metis-js .metis-to-top svg {
	display: block;
	width: 1.125rem;
	height: 1.125rem;
}

@media (prefers-reduced-motion: reduce) {
	html.metis-js .metis-to-top {
		transition: none;
	}
}

@media print {
	.metis-to-top,
	.metis-mobile-kf {
		display: none !important;
	}
}

.metis-mobile-kf {
	display: none;
}

@media (max-width: 767px) {
	html.metis-js .metis-mobile-kf {
		position: fixed;
		z-index: 20;
		inset-inline-end: calc(clamp(1rem, 2.5vw, 2rem) + 3.5rem);
		bottom: calc(clamp(1rem, 2.5vw, 2rem) + env(safe-area-inset-bottom, 0px));
		display: inline-flex;
		align-items: center;
		gap: 0.45rem;
		height: 2.875rem;
		padding: 0 1.05rem;
		border-radius: 999px;
		background-color: var(--wp--preset--color--theme-7);
		color: #ffffff;
		font-size: 0.875rem;
		font-weight: 500;
		text-decoration: none;
		box-shadow: 0 6px 20px -4px rgba(49, 94, 251, 0.42);
		opacity: 0;
		visibility: hidden;
		transform: translateY(10px);
		transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
	}

	html.metis-js .metis-mobile-kf.is-visible {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	html.metis-js .metis-mobile-kf svg {
		display: block;
		width: 1rem;
		height: 1rem;
		flex: 0 0 auto;
	}
}

.metis-hero-trust {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin: var(--wp--preset--spacing--40) 0 0;
	line-height: 1.6;
}

.metis-list-canvas {
	background-color: #F7F9FC;
	border-top: 1px solid var(--wp--preset--color--theme-4);
}

html[data-metis-mode="dark"] .metis-list-canvas {
	background-color: var(--wp--preset--color--theme-1);
}

.metis-list-canvas .metis-card {
	box-shadow: 0 1px 2px rgba(23, 36, 59, 0.03), 0 8px 20px -14px rgba(23, 36, 59, 0.07);
}

html[data-metis-mode="dark"] .metis-list-canvas .metis-card {
	box-shadow: none;
}

.metis-faq-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--40);
}

.metis-faq-grid > * {
	margin-block: 0;
}

.metis-faq-card {
	box-shadow: 0 1px 2px rgba(23, 36, 59, 0.03), 0 8px 20px -16px rgba(23, 36, 59, 0.08);
}

html[data-metis-mode="dark"] .metis-faq-card {
	box-shadow: none;
}

@media (max-width: 767px) {
	.metis-faq-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.metis-cta-lead {
	max-width: 34rem;
	margin-inline: auto;
	line-height: 1.75;
	text-wrap: balance;
}

.metis-footer-qr {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	margin-top: var(--wp--preset--spacing--40);
}

.metis-footer-qr__plate {
	flex: 0 0 auto;
	display: block;
	width: 100px;
	height: 100px;
	padding: 6px;
	border-radius: 10px;
	background-color: #ffffff;
	line-height: 0;
}

.metis-footer-qr__plate img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 4px;
	object-fit: contain;
}

.metis-footer-qr__meta {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.metis-footer-qr__title {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--wp--preset--color--theme-1);
}

.metis-footer-qr__desc {
	margin: 0;
	font-size: 0.75rem;
	line-height: 1.55;
	color: var(--wp--preset--color--theme-5);
	max-width: 14.5rem;
}



/* ==========================================================================
   7. Block fixes
   ========================================================================== */

/* Accordion items that overlap (a -40px top margin, as in "Accordions,
   bleeding list"): each item paints in order, an open item makes room for the
   one overlapping it, and closed panels drop their padding so they
   don't hold space. */
.wp-block-accordion-item {
	position: relative;
}

.wp-block-accordion-item[style*="margin-top:-40"].is-open {
	margin-bottom: 40px !important;
}

.wp-block-accordion-item:not(.is-open) .wp-block-accordion-panel {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

/* Space between the Playlist's current track and its track list. */
.wp-block-playlist .wp-block-playlist__tracklist {
	margin-top: var(--wp--preset--spacing--40) !important;
}

/* Search placeholder on reversed colours (theme-1 text, as in the bar of
   "Header, dark bar with inline menu"): the light 75% colour, theme-5.
   Everywhere else the Search block uses theme-3 (theme.json). */
.has-theme-1-color .wp-block-search__input::placeholder {
	color: var(--wp--preset--color--theme-5);
}

/* Navigation submenus open above Groups marked on-top (z-index 100), such
   as the stat cards beside the phone in the Business hero. */
.wp-block-navigation .wp-block-navigation-item.has-child .wp-block-navigation__submenu-container {
	z-index: 101;
}


/* ==========================================================================
   8. Site chrome

   The pieces a company site needs that the theme did not have: a sticky
   header with a real menu, the section furniture (numbered rows, cards, tags)
   and the abstract hero figure. Everything reads the same tokens as the rest
   of the theme, so a palette change still reaches all of it.
   ========================================================================== */

/* --- Header -------------------------------------------------------------- */

/* WordPress wraps a template part in an element named after its area, so the
   header arrives inside <header class="wp-block-template-part">. That wrapper
   is exactly as tall as the header, which leaves position:sticky nowhere to
   travel — it scrolls away with the page. Stick the wrapper instead; its own
   parent (.wp-site-blocks) is as tall as the document, so it has room. */
header.wp-block-template-part:has(> .metis-header) {
	position: sticky;
	top: 0;
	z-index: 30;
}

/* Remove WordPress's root blockGap between the sticky header, full-bleed
   sections, and footer so tinted bands and the hero sit flush with no
   accidental white strip underneath the header. */
body .wp-site-blocks > * + * {
	margin-block-start: 0;
}

.wp-block-post-content > .alignfull:first-child,
.wp-block-post-content > .alignfull + .alignfull {
	margin-block-start: 0;
}

.metis-header {
	padding-block: 0.875rem;
	border-bottom: 1px solid var(--wp--preset--color--theme-4);
	background: color-mix(in srgb, var(--wp--preset--color--theme-1) 86%, transparent);
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
}

/* The admin bar is fixed too; keep the header under it rather than over it. */
body.admin-bar header.wp-block-template-part:has(> .metis-header) {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar header.wp-block-template-part:has(> .metis-header) {
		top: 46px;
	}
}

.metis-brand {
	flex-wrap: nowrap;
}

/* The mark is a transparent PNG whose ink already fills its box, so it only
   needs a size — CSS wins over the width/height attributes that reserve space
   before the file arrives. */
.metis-brand-mark img {
	display: block;
	width: 1.875rem;
	height: auto;
}

.metis-footer .metis-brand-mark img {
	width: 1.6875rem;
}

.metis-brand-mark {
	display: flex;
	line-height: 0;
}

.metis-brand .wp-block-site-title {
	margin: 0;
	letter-spacing: -0.01em;
}

/* Scoped to the header. Inside .metis-inverse theme-2 is the surface itself,
   so an unscoped rule here painted the footer wordmark ink-on-ink. */
.metis-header .metis-brand .wp-block-site-title a {
	color: var(--wp--preset--color--theme-2);
	text-decoration: none;
}

/* Primary navigation: ink by default, brand colour where you are. 500 weight
   at this size reads solid rather than washed out against the page tint. */
.metis-nav .wp-block-navigation-item__content {
	padding-block: 0.35rem;
	color: var(--wp--preset--color--theme-2);
	font-weight: 500;
	text-decoration: none;
	transition: color 140ms ease;
}

.metis-nav .wp-block-navigation-item__content:hover,
.metis-nav .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--theme-7);
}

.metis-nav .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
	font-weight: 500;
}

/* One step deeper and colder than ink. The invitation above ends in a lit
   gradient, so the footer needs a different surface for the seam to read as a
   decision rather than as two dark panels melting together. The inset hairline
   draws the edge on displays where the two navies are nearly equal. */
.metis-footer.metis-inverse {
	background-color: color-mix(in srgb, var(--wp--preset--color--theme-2) 55%, #0A0F1A);
	box-shadow: inset 0 1px 0 color-mix(in srgb, #FFFFFF 13%, transparent);
}

/* Footer link columns are navigation, not prose: no underlines, and colour is
   what moves on hover. Deliberately no base colour here — the links carry their
   own has-theme-N-color classes, and "inherit" would beat them and turn the
   whole column into body-text colour. */
.metis-footer a:not(.wp-element-button) {
	text-decoration: none;
}

.metis-footer a:not(.wp-element-button):hover,
.metis-footer a:not(.wp-element-button):focus-visible {
	color: var(--wp--preset--color--theme-8);
}

/* The back-to-top button floats over the bottom-right corner, which is exactly
   where the legal links sit once you reach the end of the page. */
.metis-footer-bar {
	padding-inline-end: 3.75rem;
}

/* The filing number is one token: 「鲁ICP备19013538号-19」 must not break at
   the hyphen or between the Latin and the Chinese. */
.metis-icp {
	white-space: nowrap;
}

/* --- Section furniture --------------------------------------------------- */

/* Metis rows: a hairline-separated list. Reads as an index rather than a
   stack of identical cards, which is what most company sites look like. */
.metis-rows .metis-row > * {
	margin-block: 0;
}

.metis-row h3 {
	margin: 0;
}

.metis-row h3 a {
	color: var(--wp--preset--color--theme-2);
	text-decoration: none;
	transition: color 140ms ease;
}

.metis-row:hover h3 a {
	color: var(--wp--preset--color--theme-7);
}

.metis-row p:last-child {
	margin-block-end: 0;
}

/* Numerals sit in the mono face so they line up down the column. */
.metis-num {
	font-family: var(--wp--preset--font-family--recursive-mono);
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.08em;
	margin-block: 0 0.35rem;
}

/* Indexed rows: the numeral gets a column of its own, so every title starts on
   the same line and the list scans like an index instead of a stack of text.
   The arrow only appears on hover — the row is a link, this says so without
   adding a permanent icon to five rows. */
.metis-rows--index .metis-row {
	position: relative;
	display: grid;
	grid-template-columns: 2.5rem 17.5rem minmax(0, 1fr);
	column-gap: 1.5rem;
	align-items: baseline;
	margin-inline: -0.75rem;
	padding-inline: 0.75rem;
	transition: background-color 180ms ease;
}

.metis-rows--index .metis-row > .metis-num {
	grid-column: 1;
	margin: 0;
}

.metis-rows--index .metis-row > h3 {
	grid-column: 2;
	text-wrap: balance;
}

/* Description only: the numeral is a <p> too, and inheriting this padding
   would squeeze "01" into two lines inside its 2.5rem column. */
.metis-rows--index .metis-row > p:not(.metis-num) {
	grid-column: 3;
	padding-inline-end: 2rem;
}

.metis-rows--index .metis-row:hover {
	background-color: color-mix(in srgb, var(--wp--preset--color--theme-13) 55%, transparent);
}

.metis-rows--index .metis-row::after {
	content: "→";
	position: absolute;
	inset-inline-end: 0.75rem;
	top: 0.35rem;
	color: var(--wp--preset--color--theme-7);
	opacity: 0;
	transform: translateX(-0.35rem);
	transition: opacity 180ms ease, transform 180ms ease;
}

.metis-rows--index .metis-row:hover::after {
	opacity: 1;
	transform: none;
}

.metis-rows--index .metis-row h3 {
	padding-inline-end: 2rem;
}

/* Below the wide breakpoint the three tracks stop fitting: fall back to
   numeral | title, with the description under the title. */
@media (max-width: 1023px) {
	.metis-rows--index .metis-row {
		grid-template-columns: 2.25rem minmax(0, 1fr);
		row-gap: 0.4rem;
	}

	.metis-rows--index .metis-row > h3,
	.metis-rows--index .metis-row > p:not(.metis-num) {
		grid-column: 2;
		padding-inline-end: 1.5rem;
	}
}

/* The intro travels with the list on wide screens, so the column no longer
   ends in a long empty tail while you read the four rows. */
@media (min-width: 960px) {
	.metis-sticky-intro {
		position: sticky;
		top: 6rem;
		align-self: flex-start;
	}
}

/* Capability chips: a list, styled as pills. Scannable, and much lighter than
   the "能力：A · B · C · D" sentence it replaces. */
.metis-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.metis-chips li {
	margin: 0;
	padding: 0.2rem 0.65rem;
	border: 1px solid var(--wp--preset--color--theme-4);
	border-radius: 999px;
	background-color: color-mix(in srgb, var(--wp--preset--color--theme-6) 65%, transparent);
	color: var(--wp--preset--color--theme-3);
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.6;
}

.metis-chips li::marker {
	content: none;
}

/* Solutions: one lead card and four supporting ones. The grid is declared in
   CSS rather than in block attributes so the asymmetry — one tall card with a
   2×2 block beside it — lives in a single place, together with the two
   breakpoints that undo it. */
.metis-bento {
	display: grid;
	grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
	align-items: stretch;
	gap: 1.25rem;
}

.metis-bento-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
}

/* Core still treats both containers as flow layout — it gives every child
   after the first a block-gap top margin. In a grid that margin shrinks the
   item instead of separating it, which pushed the cards apart unevenly and
   left the lead card 40px out of line with the row. The gap above is the only
   spacing this grid needs. */
.metis-bento > .wp-block-group,
.metis-bento-grid > .wp-block-group {
	margin-block: 0;
}

/* Cards stretch, so a shorter sentence never leaves one card floating above
   the line of its neighbour. */
.metis-bento .metis-card {
	position: relative;
	display: flex;
	flex-direction: column;
	/* .metis-card asks for 100% height, which is a percentage of an
	   auto-sized row here; stretch already equalises the column. */
	height: auto;
	border: 1px solid var(--wp--preset--color--theme-4);
}

.metis-bento .metis-bento-kicker {
	margin-block: 0;
	letter-spacing: 0.14em;
	line-height: 1.4;
}

/* The whole card is the link. The anchor wraps the title — so the accessible
   name stays the title, the tab order stays sane and "open in new tab" still
   works — and its ::after stretches over the card to make the rest of the
   surface clickable. No "read more" line: the pointer and the title are the
   cue. */
.metis-bento .metis-card .wp-block-heading a {
	color: inherit;
	text-decoration: none;
	transition: color 160ms ease;
}

/* The title inherits the card's radius only so the overlay below can inherit
   it in turn: without this the click target would be a square sitting under a
   rounded card, and the four cut-off corners would still open the link. */
.metis-bento .metis-card > .wp-block-heading {
	border-radius: inherit;
}

.metis-bento .metis-card .wp-block-heading a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.metis-bento .metis-card:not(.metis-card--primary):hover .wp-block-heading a {
	color: var(--wp--preset--color--theme-7);
}

/* The focus ring belongs to the card, not to the two words inside it. */
.metis-bento .metis-card:has(.wp-block-heading a:focus-visible) {
	outline: 2px solid var(--wp--preset--color--theme-7);
	outline-offset: 2px;
}

.metis-bento .metis-card .wp-block-heading a:focus-visible {
	outline: none;
}

/* No arrow, no reserved slot at the foot: a card whose whole surface is the
   link does not need a marker, and an invisible element holding space at the
   bottom would just read as uneven padding. The lift, the brand hairline and
   the title changing colour are the whole hover state. */

/* The lead card is a solid brand field. It carries metis-inverse so that
   theme-1 means light copy here in both palettes — without it the slot means
   "page" and the title would go dark on the blue in Dark Mode. Inside an
   inverse block theme-2 is the dark surface in both modes, which is what the
   Dark Mode mix below needs. */
.metis-bento .metis-card--primary {
	background-color: var(--wp--preset--color--theme-7);
	border-color: transparent;
}

.metis-bento .metis-card--primary:hover {
	border-color: transparent;
}

.metis-card--primary .wp-block-heading {
	color: var(--wp--preset--color--theme-1);
	text-wrap: balance;
}

.metis-card--primary .metis-bento-kicker {
	color: color-mix(in srgb, var(--wp--preset--color--theme-1) 74%, transparent);
}

.metis-card--primary .metis-bento-text {
	color: color-mix(in srgb, var(--wp--preset--color--theme-1) 88%, transparent);
}

/* Dark Mode lifts theme-7 to a lighter blue; the white copy on it drops to
   3.46:1. Mixing the brand back toward ink restores the contrast the light
   palette already had instead of swapping the card to a light surface. */
html[data-metis-mode="dark"] .metis-bento .metis-card--primary {
	background-color: color-mix(in srgb, var(--wp--preset--color--theme-7) 62%, var(--wp--preset--color--theme-2));
}

/* Below this width the cards are too narrow for their titles: 「AI 内容生产
   与自动化」 needs ~210px and would break mid-word. The lead card takes the
   full width first, and the 2×2 block survives down to the tablet breakpoint. */
@media (max-width: 1359px) {
	.metis-bento {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 899px) {
	.metis-bento,
	.metis-bento-grid {
		gap: 1rem;
	}

	.metis-bento-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.metis-advantage {
	height: 100%;
}

/* Cards: white on tint, a hairline that warms on hover, and a lift that is
   small enough to stay quiet. */
.metis-card {
	height: 100%;
	background-color: var(--wp--preset--color--theme-6);
	transition: box-shadow 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.metis-card:hover {
	border-color: color-mix(in srgb, var(--wp--preset--color--theme-7) 32%, transparent);
	box-shadow: var(--wp--preset--shadow--shadow-4);
	transform: translateY(-2px);
}

.metis-card .wp-block-post-title a {
	color: var(--wp--preset--color--theme-2);
	text-decoration: none;
}

.metis-card:hover .wp-block-post-title a {
	color: var(--wp--preset--color--theme-7);
}

/* --- Post cards: insights and archive listings ---------------------------
   Cover on top, then the meta line, the title and the excerpt. The card is
   the link, not just its title: the title's stretched ::after covers the
   picture as well, because a picture is the first thing a reader clicks. */
.metis-post-card {
	position: relative;
	display: flex;
	flex-direction: column;
	/* Clips the cover to the card's radius without a second element. */
	overflow: clip;
}

.metis-post-card__media {
	margin: 0;
	line-height: 0;
}

.metis-post-card__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	transition: transform 420ms ease;
}

.metis-post-card:hover .metis-post-card__media img {
	transform: scale(1.03);
}

.metis-post-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

/* Two lines, so a short excerpt and a long one still leave the next card on
   the same baseline. */
.metis-post-card__excerpt .wp-block-post-excerpt__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	margin-block-end: 0;
}

/* The title carries the card's radius only so the overlay below can inherit
   it, and the four cut-off corners do not still open the link. */
.metis-post-card .wp-block-post-title {
	border-radius: inherit;
}

.metis-post-card .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.metis-post-card:has(.wp-block-post-title a:focus-visible) {
	outline: 2px solid var(--wp--preset--color--theme-7);
	outline-offset: 2px;
}

.metis-post-card .wp-block-post-title a:focus-visible {
	outline: none;
}

@media (prefers-reduced-motion: reduce) {
	.metis-post-card__media img {
		transition: none;
	}

	.metis-post-card:hover .metis-post-card__media img {
		transform: none;
	}
}

/* Taxonomy and category labels: small capsules, not another heading. */
.metis-tag {
	margin-block: 0;
}

.metis-tag a {
	display: inline-block;
	padding: 0.1rem 0.55rem;
	border: 1px solid var(--wp--preset--color--theme-4);
	border-radius: 999px;
	color: var(--wp--preset--color--theme-3);
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.6;
	text-decoration: none;
}

.metis-tag a:hover {
	border-color: color-mix(in srgb, var(--wp--preset--color--theme-7) 40%, transparent);
	color: var(--wp--preset--color--theme-7);
}

.metis-article-row .wp-block-post-title a {
	color: var(--wp--preset--color--theme-2);
	text-decoration: none;
}

.metis-article-row:hover .wp-block-post-title a {
	color: var(--wp--preset--color--theme-7);
}

.metis-article-row p {
	margin-block: 0;
}

/* --- Article reading column ---------------------------------------------- */

/* core/post-content carries has-global-padding, so left alone it hangs on the
   root padding and drifts ~20px off the headline above it. Pin the measure and
   the left edge here, once, rather than repeating it in every single template. */
.wp-block-post-content.metis-reading {
	max-width: 46rem;
	padding-inline: 0;
	margin-inline: 0 auto;
}

.metis-reading > p,
.metis-reading > ul,
.metis-reading > ol,
.metis-reading > blockquote {
	text-wrap: pretty;
}

.metis-reading > p:first-child {
	margin-block-start: 0;
}

/* Two-column reading layout: the measure on the left, the rail on the right.
   Keeps the headline's left edge and stops the page feeling empty on wide
   screens. Collapses to one column before the aside gets squeezed.

   The rail track is `1fr` and the aside is capped at 24rem inside it, so the
   rail's right edge lands on the same 1320 line as the cover image above while
   the extra space is absorbed by the rail track rather than the measure. With a
   fixed `24rem` track instead, the article column would give up its width first
   and drop to 516px at 1024 — a sidebar fatter than the text it sits beside. */
.metis-single-shell {
	background-color: #F7F9FC;
}

html[data-metis-mode="dark"] .metis-single-shell {
	background-color: var(--wp--preset--color--theme-1);
}

.metis-single-crumb p {
	margin: 0;
}

.metis-single-crumb a {
	color: var(--wp--preset--color--theme-3);
	text-decoration: none;
	transition: color 180ms ease;
}

.metis-single-crumb a:hover {
	color: var(--wp--preset--color--theme-7);
}

.metis-article-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(17.5rem, 20rem);
	column-gap: clamp(1.75rem, 3.5vw, 2.75rem);
	align-items: start;
}

.metis-article-layout > * {
	margin-block: 0;
}

/* Pure white reading surface on top of the cool light canvas for clear visual
   boundaries and airy readability. */
.metis-article-sheet {
	min-width: 0;
	background-color: var(--wp--preset--color--theme-6);
	border: 1px solid var(--wp--preset--color--theme-4);
	border-radius: 16px;
	padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4.5vw, 3.25rem);
	box-shadow: 0 1px 2px rgba(23, 36, 59, 0.03), 0 12px 28px -18px rgba(23, 36, 59, 0.08);
}

html[data-metis-mode="dark"] .metis-article-sheet {
	box-shadow: none;
}

.metis-article-head {
	padding-bottom: var(--wp--preset--spacing--40);
	margin-bottom: var(--wp--preset--spacing--50);
	border-bottom: 1px solid var(--wp--preset--color--theme-4);
}

.metis-article-head .wp-block-post-title {
	margin: 0;
	line-height: 1.28;
}

.metis-article-sheet > .wp-block-post-featured-image {
	margin-top: 0;
	margin-bottom: var(--wp--preset--spacing--50);
	overflow: hidden;
}

.metis-article-sheet .metis-reading {
	line-height: 1.82;
}

.metis-article-sheet .metis-reading h2 {
	margin-top: 2.25rem;
	margin-bottom: 0.9rem;
}

.metis-article-sheet .metis-reading h3,
.metis-article-sheet .metis-reading h4 {
	margin-top: 1.75rem;
	margin-bottom: 0.75rem;
}

.metis-article-sheet .metis-reading table {
	width: 100%;
	border-collapse: collapse;
	margin-block: 1.5rem;
	font-size: var(--wp--preset--font-size--small);
}

.metis-article-sheet .metis-reading th,
.metis-article-sheet .metis-reading td {
	padding: 0.75rem 1rem;
	border: 1px solid var(--wp--preset--color--theme-4);
	text-align: left;
	vertical-align: top;
}

.metis-article-sheet .metis-reading th {
	background-color: var(--wp--preset--color--theme-13);
	font-weight: 600;
	color: var(--wp--preset--color--theme-2);
}

.metis-article-sheet .wp-block-table {
	overflow-x: auto;
}

.metis-article-aside {
	position: sticky;
	top: 6rem;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
	width: 100%;
	font-size: var(--wp--preset--font-size--small);
}

.metis-aside-label {
	font-family: var(--wp--preset--font-family--recursive-mono);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin: 0;
}

.metis-aside-cta p {
	margin-block: 0;
}

.metis-aside-cta p + p {
	margin-block-start: 0.35rem;
}

/* --- Article sidebar: byline, official account, WeCom --------------------
   Three stacked cards down a 16rem rail: who wrote it, the account code, and
   the one action worth taking. The rail is a flex column here rather than a
   margin-driven flow, so the rhythm survives whatever block order an editor
   leaves behind; the direct children are zeroed out because WordPress would
   otherwise add the same gap again as a margin. */
.metis-article-aside > * {
	margin-block: 0;
}

.metis-aside-card {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--20);
	padding: var(--wp--preset--spacing--30);
	background-color: var(--wp--preset--color--theme-6);
	border: 1px solid var(--wp--preset--color--theme-4);
	border-radius: 16px;
}

.metis-aside-card > * {
	margin-block: 0;
}

/* Size comes from the block's own `x-small` preset: core prints that as
   `!important`, so setting a font-size here would only be a lie. */
.metis-aside-card .metis-aside-eyebrow {
	margin: 0;
	font-family: var(--wp--preset--font-family--recursive-mono);
	line-height: 1.4;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--theme-3);
}

.metis-author__head > * {
	margin-block: 0;
}

/* The mark is a square PNG with a transparent field, so the circle is drawn
   with padding + tint rather than cropping — `object-fit: contain` on a
   transparent logo would leave the corners of the badge bare. */
.metis-author__avatar {
	flex: 0 0 auto;
	margin: 0;
	line-height: 0;
}

.metis-author__avatar img {
	display: block;
	width: 46px;
	height: 46px;
	padding: 8px;
	border-radius: 999px;
	background-color: var(--wp--preset--color--theme-13);
	object-fit: contain;
}

.metis-author__name {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--wp--preset--color--theme-2);
}

.metis-author__role,
.metis-author__bio {
	margin: 0;
	color: var(--wp--preset--color--theme-3);
}

.metis-author__role {
	margin-block-start: 2px;
}

.metis-author__bio {
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.7;
}

/* The code is centred on its own plate. The plate stays white in dark mode on
   purpose: a QR on a tinted ground loses contrast exactly where a phone camera
   needs it. */
.metis-qr {
	text-align: center;
}

.metis-qr__media {
	max-width: 10.5rem;
	margin-inline: auto;
	padding: 8px;
	background-color: #ffffff;
	border: 1px solid var(--wp--preset--color--theme-4);
	border-radius: 12px;
	line-height: 0;
}

.metis-qr__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
}

.metis-qr__title {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--wp--preset--color--theme-2);
}

.metis-qr__desc {
	margin: 0;
	color: var(--wp--preset--color--theme-3);
}

.metis-wecom {
	background-color: var(--wp--preset--color--theme-13);
	border-color: color-mix(in srgb, var(--wp--preset--color--theme-7) 22%, transparent);
}

.metis-wecom__title {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.45;
	color: var(--wp--preset--color--theme-2);
}

.metis-wecom__desc,
.metis-wecom .metis-aside-eyebrow {
	margin: 0;
	/* #68758A on the tint only reaches 4.1:1 — under the 4.5 a 12px line needs.
	   Pulling the muted tone toward ink lifts it to 5.9:1 without going black. */
	color: color-mix(in srgb, var(--wp--preset--color--theme-3) 70%, var(--wp--preset--color--theme-2));
}

/* In dark mode the tint is the dark panel, so the ink side of that mix would
   sink into it; the standard muted tone already clears 6:1 there. */
html[data-metis-mode="dark"] .metis-wecom__desc,
html[data-metis-mode="dark"] .metis-wecom .metis-aside-eyebrow {
	color: var(--wp--preset--color--theme-3);
}

.metis-wecom .wp-block-buttons,
.metis-wecom .wp-block-button {
	width: 100%;
	margin: 0;
}

.metis-wecom .wp-block-button__link {
	width: 100%;
	justify-content: center;
	font-size: 0.875rem;
}

@media (max-width: 960px) {
	.metis-article-layout {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 2.5rem;
	}

	.metis-article-aside {
		position: static;
		/* Single column: the cap and the auto margin would leave the cards
		   pinned right with dead space on their left. */
		max-width: none;
		margin-inline: 0;
	}

	.metis-article-aside .metis-wecom {
		order: -1;
	}

	.metis-wecom .wp-block-button__link {
		min-height: 48px;
		font-size: 0.9375rem;
	}
}

.metis-article-follow {
	margin-top: var(--wp--preset--spacing--60);
	padding: var(--wp--preset--spacing--40);
	border: 1px solid var(--wp--preset--color--theme-4);
	border-radius: 12px;
	background-color: var(--wp--preset--color--theme-13);
	text-align: center;
}

.metis-article-follow__picture {
	display: block;
	max-width: 520px;
	margin-inline: auto;
}

.metis-article-follow__picture img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
}

.metis-article-follow__caption {
	margin: var(--wp--preset--spacing--30) 0 0;
	font-size: 0.875rem;
	color: var(--wp--preset--color--theme-3);
}

@media (max-width: 639px) {
	.metis-article-aside .metis-qr {
		display: none;
	}

	.metis-article-follow {
		padding: var(--wp--preset--spacing--30);
	}
}

/* --- Hero figure --------------------------------------------------------- */

.metis-hero-visual {
	margin: 0;
	color: var(--wp--preset--color--theme-2);
}

.metis-hero-visual svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

/* A one-off draw of the trend line, so the figure arrives with the copy. */
@media (prefers-reduced-motion: no-preference) {
	html.metis-ready .metis-hero-line {
		stroke-dasharray: 320;
		stroke-dashoffset: 320;
		animation: metis-draw 1400ms 520ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
	}
}

@keyframes metis-draw {
	to {
		stroke-dashoffset: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.metis-hero-line {
		stroke-dasharray: none;
		stroke-dashoffset: 0;
	}
}

/* --- Closing invitation -------------------------------------------------- */

/* The invitation is the one place that does not use a flat field: three soft
   brand glows sit behind the headline, so the band reads as a horizon rather
   than as a second dark slab pressed against the footer. They are painted as
   background layers of the section itself — no extra element, no filter, no
   repaint on scroll. Inside .metis-inverse the brand slots keep following the
   palette; theme-1 and theme-2 are re-pointed, 7/8/10 are not. */
.metis-cta.metis-inverse {
	background-image:
		radial-gradient(60% 84% at 6% -22%, color-mix(in srgb, var(--wp--preset--color--theme-10) 76%, transparent) 0%, transparent 60%),
		radial-gradient(54% 74% at 94% -16%, color-mix(in srgb, var(--wp--preset--color--theme-8) 62%, transparent) 0%, transparent 62%),
		radial-gradient(140% 68% at 50% 120%, color-mix(in srgb, var(--wp--preset--color--theme-7) 62%, transparent) 0%, transparent 74%);
	background-repeat: no-repeat;
	background-size: 100% 100%;
}

.metis-cta .wp-block-heading {
	color: var(--wp--preset--color--theme-1);
	text-wrap: balance;
	/* The band is wide and the line is short; a touch of tracking keeps the
	   centred sentence from looking crowded at display size. */
	letter-spacing: 0.01em;
}

.metis-cta .is-style-eyebrow {
	color: var(--wp--preset--color--theme-8);
}

/* One readable measure for the supporting line, however wide the band gets. */
.metis-cta-lead {
	max-width: 40rem;
	margin-inline: auto;
	text-wrap: balance;
}

.metis-cta-actions {
	justify-content: center;
}

/* On the glowing field a brand-blue button would sink into the blue behind
   it, so the primary action inverts: light slab, ink label — the same idea as
   the reference. theme-1 is near-white in both palettes inside .metis-inverse,
   so this holds in Dark Mode too. */
.metis-cta .wp-block-button:not(.is-style-outline) .wp-block-button__link {
	background-color: var(--wp--preset--color--theme-1);
	color: var(--wp--preset--color--theme-2);
}

.metis-cta .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
.metis-cta .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus-visible {
	background-color: color-mix(in srgb, var(--wp--preset--color--theme-1) 86%, var(--wp--preset--color--theme-7));
	color: var(--wp--preset--color--theme-2);
}

.metis-cta .wp-block-button:not(.is-style-outline) .wp-block-button__link:active {
	background-color: color-mix(in srgb, var(--wp--preset--color--theme-1) 74%, var(--wp--preset--color--theme-7)) !important;
	color: var(--wp--preset--color--theme-2) !important;
}

/* A 36% hairline disappears over a bright glow; the secondary action needs a
   firmer edge here to stay legible as a button. */
.metis-cta .wp-block-button.is-style-outline.is-style-outline .wp-block-button__link {
	border-color: color-mix(in srgb, currentColor 52%, transparent);
}

/* Cards in a row keep their footers level even when a title wraps. */
.metis-card .wp-block-post-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	min-height: 2.6em;
}

.metis-card .wp-block-post-excerpt__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	margin-block-end: 0;
}

.metis-card-link a,
.metis-card .wp-block-read-more {
	color: var(--wp--preset--color--theme-7);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
}

.metis-card:hover .wp-block-read-more {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

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

.metis-form-card {
	background-color: var(--wp--preset--color--theme-6);
}

.metis-form {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	margin-top: var(--wp--preset--spacing--40);
}

.metis-field {
	display: grid;
	gap: 0.35rem;
}

.metis-field label {
	color: var(--wp--preset--color--theme-2);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
}

.metis-field label span {
	color: var(--wp--preset--color--theme-12);
}

.metis-field input,
.metis-field select,
.metis-field textarea {
	width: 100%;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--wp--preset--color--theme-4);
	border-radius: 8px;
	background-color: var(--wp--preset--color--theme-6);
	color: var(--wp--preset--color--theme-2);
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	transition: border-color 140ms ease, box-shadow 140ms ease;
}

.metis-field textarea {
	resize: vertical;
	min-height: 7rem;
}

.metis-field input::placeholder,
.metis-field textarea::placeholder {
	color: color-mix(in srgb, var(--wp--preset--color--theme-3) 72%, transparent);
}

.metis-field input:focus,
.metis-field select:focus,
.metis-field textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--theme-7);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--theme-7) 16%, transparent);
}

/* Off-screen for people, still submitted to the handler. clip-path keeps the
   field out of the scroll area entirely, so a -9999px offset can never leave
   a stray scrollbar behind. */
.metis-form-honeypot {
	position: absolute;
	left: 0;
	top: 0;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
}

.metis-form-submit {
	justify-self: start;
	border: 0;
	cursor: pointer;
}

.metis-form-foot {
	margin: 0;
	color: var(--wp--preset--color--theme-3);
	font-size: var(--wp--preset--font-size--x-small);
}

/* Search field: the same input skin as the contact form, so a search reads as
   part of the site rather than as a core block that was left on defaults. */
.metis-search-box {
	max-width: 32rem;
}

.metis-search-box .wp-block-search__inside-wrapper {
	display: flex;
	gap: 0.25rem;
	padding: 0.3rem;
	border: 1px solid var(--wp--preset--color--theme-4);
	border-radius: 10px;
	background-color: var(--wp--preset--color--theme-6);
	transition: border-color 140ms ease, box-shadow 140ms ease;
}

.metis-search-box:focus-within .wp-block-search__inside-wrapper {
	border-color: var(--wp--preset--color--theme-7);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--theme-7) 16%, transparent);
}

.metis-search-box .wp-block-search__input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.55rem 0.75rem;
	border: 0;
	background-color: transparent;
	color: var(--wp--preset--color--theme-2);
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
}

.metis-search-box .wp-block-search__input::placeholder {
	color: color-mix(in srgb, var(--wp--preset--color--theme-3) 72%, transparent);
}

.metis-search-box .wp-block-search__input:focus {
	outline: none;
}

.metis-search-box .wp-block-search__button {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	margin: 0;
	padding: 0 0.9rem;
	border: 0;
	border-radius: 8px;
	background-color: var(--wp--preset--color--theme-7);
	color: var(--wp--preset--color--theme-6);
	cursor: pointer;
	transition: background-color 140ms ease;
}

.metis-search-box .wp-block-search__button:hover {
	background-color: color-mix(in srgb, var(--wp--preset--color--theme-7) 86%, #000);
}

.metis-search-box .wp-block-search__button svg {
	fill: currentColor;
	width: 1.05rem;
	height: 1.05rem;
}

/* --- Notices ------------------------------------------------------------- */

/* Form feedback. Sits directly under the sticky header as a full-bleed status
   strip: a rounded card floating above the hero reads as a mistake, because
   the hero already owns the top of the page. */
.metis-notice {
	margin: 0;
	padding: var(--wp--preset--spacing--30) clamp(1.25rem, 4vw, 3rem);
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--theme-4);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	text-align: center;
}

.metis-notice.is-success {
	border-bottom-color: color-mix(in srgb, var(--wp--preset--color--theme-9) 32%, transparent);
	background-color: color-mix(in srgb, var(--wp--preset--color--theme-9) 10%, var(--wp--preset--color--theme-6));
	color: var(--wp--preset--color--theme-2);
}

.metis-notice.is-error {
	border-bottom-color: color-mix(in srgb, var(--wp--preset--color--theme-12) 32%, transparent);
	background-color: color-mix(in srgb, var(--wp--preset--color--theme-12) 8%, var(--wp--preset--color--theme-6));
	color: var(--wp--preset--color--theme-2);
}

.metis-muted {
	color: var(--wp--preset--color--theme-3);
	font-size: var(--wp--preset--font-size--x-small);
}

/* Anchors used by the services index, and by any in-page jump link. */
.metis-anchor-list a {
	color: var(--wp--preset--color--theme-3);
	text-decoration: none;
	transition: color 140ms ease;
}

.metis-anchor-list a:hover {
	color: var(--wp--preset--color--theme-7);
}

html {
	scroll-behavior: smooth;
}

/* The header is sticky, so a jump to #contact-form or #ai would land with the
   heading hidden behind it. Reserve the header's height plus a little air. */
:where([id]) {
	scroll-margin-block-start: 6rem;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
