/* ==========================================================================
   Aliens Ipsum: front-end + editor styles
   Palette and type come from theme.json presets (--wp--preset--*).
   ========================================================================== */

:root {
	--ai-void: var(--wp--preset--color--void, #05080a);
	--ai-hull: var(--wp--preset--color--hull, #0c1216);
	--ai-panel: var(--wp--preset--color--panel, #131b20);
	--ai-seam: var(--wp--preset--color--seam, #25343c);
	--ai-steel: var(--wp--preset--color--steel, #7f8f96);
	--ai-fog: var(--wp--preset--color--fog, #c8d3d7);
	--ai-phosphor: var(--wp--preset--color--phosphor, #5dff8f);
	--ai-phosphor-dim: var(--wp--preset--color--phosphor-dim, #1f6b3c);
	--ai-cryo: var(--wp--preset--color--cryo, #6cc4ff);
	--ai-hazard: var(--wp--preset--color--hazard, #f3c22b);
	--ai-alarm: var(--wp--preset--color--alarm, #ff5533);
	--ai-mono: var(--wp--preset--font-family--terminal);
	--ai-stencil: var(--wp--preset--font-family--stencil);
	--ai-wordmark: var(--wp--preset--font-family--wordmark);
	--ai-sentry: var(--wp--preset--color--sentry, #e2d62b);
	--ai-sentry-dim: var(--wp--preset--color--sentry-dim, #6b6514);
	--ai-sentry-screen: var(--wp--preset--color--sentry-screen, #0d0c05);
	--ai-raster: var(--wp--preset--font-family--raster);
	--ai-readout: var(--wp--preset--font-family--readout);
	--ai-chamfer: 14px;
	--ai-hazard-stripes: repeating-linear-gradient(-45deg, var(--ai-hazard) 0 12px, #0b0b0b 12px 24px);
	color-scheme: dark;
}

/* ---- Atmosphere --------------------------------------------------------- */

body {
	background-color: var(--ai-void);
	background-image:
		radial-gradient(ellipse 80% 50% at 50% -10%, rgba(108, 196, 255, 0.13), transparent 70%),
		linear-gradient(rgba(108, 196, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(108, 196, 255, 0.035) 1px, transparent 1px);
	background-size: 100% 100%, 48px 48px, 48px 48px;
	background-attachment: fixed;
	min-height: 100vh;
}

/* Scanlines over the whole viewport. Purely decorative. */
body:not(.wp-admin)::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 9999;
	background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.18) 2px 3px);
	mix-blend-mode: multiply;
}

.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

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

::selection {
	background: var(--ai-phosphor);
	color: var(--ai-void);
}

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--ai-hazard);
	outline-offset: 3px;
}

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

.ai-header {
	position: relative;
	border-bottom: 1px solid var(--ai-seam);
	background: linear-gradient(to bottom, rgba(12, 18, 22, 0.95), rgba(5, 8, 10, 0.85));
	padding-top: calc(6px + 1.1rem);
	padding-bottom: 1.1rem;
}

.ai-header::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 6px;
	background: var(--ai-hazard-stripes);
}

.ai-brand {
	gap: 1rem;
	min-width: 0;
}

.ai-brand__text {
	min-width: 0;
}

.ai-wordmark,
.ai-wordmark a {
	margin: 0;
	font-family: var(--ai-wordmark);
	font-size: clamp(1.05rem, 2.6vw, 1.45rem);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
}

/* Cold light sliding across the letters, like the title card. */
.ai-wordmark a {
	color: #dcecff;
	background: linear-gradient(100deg, #9fb7c9 0%, #9fb7c9 38%, #ffffff 48%, var(--ai-cryo) 54%, #9fb7c9 64%, #9fb7c9 100%);
	background-size: 300% 100%;
	background-position: 100% 0;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	filter: drop-shadow(0 0 10px rgba(108, 196, 255, 0.35));
	animation: ai-title-light 9s ease-in-out infinite;
}

.ai-wordmark a:hover,
.ai-wordmark a:focus {
	filter: drop-shadow(0 0 14px rgba(108, 196, 255, 0.7));
}

@keyframes ai-title-light {
	0%, 15% { background-position: 100% 0; }
	55%, 100% { background-position: 0% 0; }
}

.ai-tagline {
	margin: 0.3rem 0 0;
	font-family: var(--ai-mono);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ai-steel);
}

.ai-nav a {
	color: var(--ai-fog);
	text-decoration: none;
	padding: 0.25rem 0;
	border-bottom: 1px solid transparent;
}

.ai-nav a:hover,
.ai-nav a:focus,
.ai-nav .current-menu-item > a,
.ai-nav [aria-current="page"] {
	color: var(--ai-hazard);
	border-bottom-color: currentColor;
}

/* ---- Main / shared ------------------------------------------------------- */

.ai-main {
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--70);
}

.ai-kicker {
	margin: 0 0 1rem;
	font-family: var(--ai-mono);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ai-phosphor);
	text-shadow: 0 0 8px rgba(93, 255, 143, 0.45);
}

.ai-kicker::before {
	content: "\25B8\00a0";
}

.ai-kicker--alarm {
	color: var(--ai-alarm);
	text-shadow: 0 0 8px rgba(255, 85, 51, 0.5);
}

.ai-page-title {
	margin-bottom: var(--wp--preset--spacing--50);
}

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

.ai-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr);
	align-items: center;
	gap: var(--wp--preset--spacing--60);
	margin-bottom: var(--wp--preset--spacing--60);
}

.ai-hero__title {
	margin: 0;
	font-size: clamp(2.4rem, 6.2vw, 4.6rem);
	line-height: 0.95;
}

.ai-hero__lede {
	margin: 1.25rem 0 0;
	max-width: 36em;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
	color: var(--ai-fog);
}

/* Motion tracker: cyan dome display with the range band underneath */
.ai-tracker {
	box-sizing: border-box;
	position: relative;
	margin: 0;
	justify-self: end;
	width: 100%;
	max-width: 400px;
	padding: 0.9rem;
	background: linear-gradient(160deg, #20282d, #0a0e11 70%);
	border: 1px solid var(--ai-seam);
	border-radius: 10px 10px 6px 6px;
	box-shadow: inset 0 0 0 4px #06090b, 0 18px 40px rgba(0, 0, 0, 0.5);
}

.ai-tracker__screen {
	overflow: hidden;
	border-radius: 6px / 10px;
	background: #01060b;
	box-shadow: 0 0 0 2px #000, 0 0 24px rgba(95, 212, 255, 0.18);
}

.ai-tracker__svg {
	display: block;
	width: 100%;
	height: auto;
}

.ai-blip {
	transition: none;
}

.ai-tracker__sound {
	position: absolute;
	top: 1.4rem;
	right: 1.4rem;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	color: #5fd4ff;
	background: rgba(1, 8, 14, 0.75);
	border: 1px solid rgba(95, 212, 255, 0.45);
	border-radius: 50%;
	cursor: pointer;
	transition: color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.ai-tracker__sound svg {
	width: 1.15rem;
	height: 1.15rem;
}

.ai-tracker__sound:hover {
	border-color: #5fd4ff;
	box-shadow: 0 0 10px rgba(95, 212, 255, 0.5);
}

.ai-tracker__sound .ai-tracker__waves,
.ai-tracker__sound[aria-pressed="true"] .ai-tracker__mute {
	display: none;
}

.ai-tracker__sound[aria-pressed="true"] .ai-tracker__waves {
	display: inline;
}

.ai-tracker__sound[aria-pressed="true"] {
	color: #01080e;
	background: #5fd4ff;
	border-color: #5fd4ff;
	box-shadow: 0 0 12px rgba(95, 212, 255, 0.6);
}

.ai-tracker__bar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 0.5rem;
	padding: 0.25rem 0.6rem;
	font-family: var(--ai-mono);
	font-size: clamp(0.6rem, 1.4vw, 0.72rem);
	letter-spacing: 0.06em;
	color: #062033;
	background: linear-gradient(to bottom, #9fe2ff, #5fc4ef);
	box-shadow: 0 0 14px rgba(95, 212, 255, 0.45);
}

.ai-tracker__code:last-child {
	text-align: right;
}

.ai-tracker__range {
	display: inline-flex;
	align-items: flex-start;
	padding: 0.05rem 0.55rem;
	font-family: var(--ai-mono);
	line-height: 1;
	color: #ff9a76;
	background: #120a0a;
	border-radius: 2px;
	text-shadow: 0 0 6px rgba(255, 120, 80, 0.85);
}

.ai-tracker__m {
	font-size: clamp(1.4rem, 3vw, 1.75rem);
	min-width: 2ch;
	text-align: right;
}

.ai-tracker__cm {
	margin: 0.1rem 0 0 0.1rem;
	font-size: 0.75rem;
	text-decoration: underline;
}

.ai-tracker__unit {
	align-self: flex-end;
	margin: 0 0 0.15rem -1.1ch;
	font-size: 0.75rem;
}

/* ---- Generator console ---------------------------------------------------- */

.ai-generator > * {
	max-width: none;
}

.ai-console {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--50);
}

.ai-console > .ai-panel { order: 1; }
.ai-console > .ai-monitor { order: 2; }

/* Hardware bezel around each sentry screen */
.ai-panel,
.ai-monitor {
	position: relative;
	padding: clamp(0.6rem, 1.4vw, 1rem);
	background: linear-gradient(170deg, #1b2328 0%, var(--ai-panel) 45%, #0b1013 100%);
	border: 1px solid var(--ai-seam);
	clip-path: polygon(var(--ai-chamfer) 0, 100% 0, 100% calc(100% - var(--ai-chamfer)), calc(100% - var(--ai-chamfer)) 100%, 0 100%, 0 var(--ai-chamfer));
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ---- Sentry screen -------------------------------------------------------- */

.ai-screen {
	--ai-rule: 3px;
	position: relative;
	color: var(--ai-sentry);
	background: radial-gradient(ellipse 120% 100% at 50% 40%, #16150a 0%, var(--ai-sentry-screen) 60%, #050502 100%);
	border: var(--ai-rule) solid var(--ai-sentry);
	border-radius: 4px;
	box-shadow: 0 0 0 5px #050605, 0 0 0 6px var(--ai-seam), 0 0 28px rgba(226, 214, 43, 0.12);
	font-family: var(--ai-raster);
	text-transform: uppercase;
	text-shadow: 0 0 5px rgba(226, 214, 43, 0.45);
	overflow: hidden;
}

/* Scanlines on the tube */
.ai-screen::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 3;
	pointer-events: none;
	background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.28) 2px 3px);
	animation: ai-flicker 6s steps(1) infinite;
}

.ai-screen ::selection {
	background: var(--ai-sentry);
	color: #000;
	text-shadow: none;
}

.ai-screen__head {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 1rem;
	padding: 0.6rem 0.9rem;
	border-bottom: var(--ai-rule) solid var(--ai-sentry);
}

.ai-screen__title {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	line-height: 1.05;
}

.ai-screen__model {
	font-size: clamp(1rem, 2vw, 1.35rem);
	letter-spacing: 0.06em;
}

.ai-screen__name {
	font-size: clamp(1.05rem, 2.7vw, 1.9rem);
	letter-spacing: 0.06em;
}

/* Circled unit letter, like the A and B guns */
.ai-badge {
	display: grid;
	place-items: center;
	width: clamp(2.3rem, 4.5vw, 3.1rem);
	aspect-ratio: 1;
	font-size: clamp(1.5rem, 3vw, 2.1rem);
	line-height: 1;
	border: var(--ai-rule) solid var(--ai-sentry);
	border-radius: 50%;
	box-shadow: inset 0 0 0 2px var(--ai-sentry-screen), inset 0 0 0 3px var(--ai-sentry-dim);
}

/* ---- Any Ipsum form as a sentry control grid ------------------------------ */

.ai-panel .anyipsum-form {
	margin: 0;
	padding: 0;
}

.ai-panel .anyipsum-table,
.ai-panel .anyipsum-table tbody {
	display: block;
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	background: none;
}

/* The yellow tbody shows through the gaps as the grid rules. */
.ai-panel .anyipsum-table tbody {
	display: grid;
	grid-template-columns: minmax(8rem, 0.8fr) minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(12rem, 1fr);
	gap: var(--ai-rule);
	background: var(--ai-sentry);
}

.ai-panel .anyipsum-table tr {
	display: flex;
	flex-direction: column;
	border: 0;
	background: var(--ai-sentry-screen);
}

.ai-panel .anyipsum-table tr:not([class^="anyipsum-"]) { grid-column: 1 / -1; }

.ai-panel .anyipsum-table td {
	display: block;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
}

.ai-panel .anyipsum-left-cell {
	padding: 0.6rem 0.75rem;
	font-size: clamp(1.05rem, 1.7vw, 1.3rem);
	line-height: 1.05;
	text-align: center;
	letter-spacing: 0.05em;
	border-bottom: var(--ai-rule) solid var(--ai-sentry);
}

.ai-panel .anyipsum-left-cell:empty {
	display: none;
}

.ai-panel .anyipsum-right-cell {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0.9rem 0;
}

/* Paragraphs: boxed readout with the pointer arrow */
.ai-panel .anyipsum-paragraphs .anyipsum-right-cell {
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.9rem 0.75rem;
}

.ai-panel .anyipsum-paragraphs .anyipsum-right-cell::before {
	content: "\25B6";
	font-family: system-ui, sans-serif;
	font-size: 1.3rem;
}

.ai-panel .anyipsum-paragraphs input[type="text"] {
	box-sizing: border-box;
	width: 3.2ch;
	min-width: 4.4rem;
	height: 3.4rem;
	padding: 0 0.4rem;
	font-family: var(--ai-raster);
	font-size: 2.3rem;
	line-height: 1;
	text-align: center;
	color: var(--ai-sentry);
	text-shadow: 0 0 6px rgba(226, 214, 43, 0.55);
	background: #000;
	border: var(--ai-rule) solid var(--ai-sentry);
	border-radius: 0;
	box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.9);
	caret-color: var(--ai-sentry);
}

.ai-panel .anyipsum-paragraphs input[type="text"]:focus {
	outline: none;
	background: #1a1806;
	box-shadow: 0 0 0 2px var(--ai-sentry-screen), 0 0 0 4px var(--ai-hazard);
}

/* Option lists: the selected line is an inverted bar */
.ai-panel .anyipsum-type input[type="radio"],
.ai-panel .anyipsum-start-with input[type="checkbox"] {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.ai-panel .anyipsum-type label,
.ai-panel .anyipsum-start-with label {
	display: block;
	padding: 0.2rem 0.75rem;
	font-size: clamp(1.05rem, 1.7vw, 1.3rem);
	line-height: 1.15;
	text-align: center;
	letter-spacing: 0.04em;
	cursor: pointer;
	user-select: none;
}

.ai-panel .anyipsum-type label:hover,
.ai-panel .anyipsum-start-with label:hover {
	background: rgba(226, 214, 43, 0.14);
}

.ai-panel .anyipsum-type input:checked + label,
.ai-panel .anyipsum-start-with input:checked + label {
	color: #000;
	background: var(--ai-sentry);
	text-shadow: none;
}

.ai-panel .anyipsum-type input:focus-visible + label,
.ai-panel .anyipsum-start-with input:focus-visible + label {
	outline: 2px solid var(--ai-hazard);
	outline-offset: -2px;
}

/* Opener: on/off pip in front of the label */
.ai-panel .anyipsum-start-with label {
	font-family: var(--ai-readout);
	font-size: 1.3rem;
	text-transform: none;
	letter-spacing: 0.02em;
}

.ai-panel .anyipsum-start-with label::before {
	content: "OFF";
	display: block;
	font-family: var(--ai-raster);
	font-size: 1.05rem;
	letter-spacing: 0.08em;
}

.ai-panel .anyipsum-start-with input:checked + label::before {
	content: "ON";
}

/* Fire control */
.ai-panel .anyipsum-submit .anyipsum-right-cell {
	padding: 0.75rem;
}

.ai-panel .anyipsum-submit input[type="submit"] {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 4rem;
	padding: 0.6rem 1rem;
	font-family: var(--ai-raster);
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #000;
	background-color: var(--ai-sentry);
	background-image: linear-gradient(var(--ai-sentry), var(--ai-sentry)), var(--ai-hazard-stripes);
	background-size: calc(100% - 12px) calc(100% - 12px), 34px 34px;
	background-position: center, 0 0;
	background-repeat: no-repeat, repeat;
	border: 0;
	border-radius: 0;
	box-shadow: 0 0 16px rgba(226, 214, 43, 0.35);
	cursor: pointer;
	-webkit-appearance: none;
}

.ai-panel .anyipsum-submit input[type="submit"]:hover {
	animation: ai-stripes 0.6s linear infinite;
}

.ai-panel .anyipsum-submit input[type="submit"]:active {
	background-image: none;
	background-color: #fff27a;
}

.ai-panel .anyipsum-submit input[type="submit"]:focus-visible {
	outline: 2px solid var(--ai-hazard);
	outline-offset: 3px;
}

@keyframes ai-stripes {
	to { background-position: center, 34px 0; }
}

/* ---- Firing monitor ------------------------------------------------------- */

.ai-monitor__head {
	display: grid;
	grid-template-columns: 1fr auto auto;
	gap: var(--ai-rule);
	background: var(--ai-sentry);
	border-bottom: var(--ai-rule) solid var(--ai-sentry);
}

.ai-monitor__head > * {
	background: var(--ai-sentry-screen);
}

.ai-monitor__status {
	display: flex;
	align-items: center;
	padding: 0.55rem 0.9rem;
	font-size: clamp(1rem, 1.7vw, 1.25rem);
	letter-spacing: 0.05em;
}

.ai-cell-btn {
	padding: 0.55rem 1.1rem;
	font-family: var(--ai-raster);
	font-size: clamp(0.95rem, 1.5vw, 1.15rem);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--ai-sentry);
	text-shadow: inherit;
	border: 0;
	border-radius: 0;
	cursor: pointer;
}

.ai-cell-btn:hover,
.ai-cell-btn.is-done {
	color: #000;
	background: var(--ai-sentry);
	text-shadow: none;
}

.ai-cell-btn:focus-visible {
	outline: 2px solid var(--ai-hazard);
	outline-offset: -4px;
}

.ai-monitor__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 15rem;
	gap: var(--ai-rule);
	background: var(--ai-sentry);
}

.ai-monitor__body > * {
	background: var(--ai-sentry-screen);
}

.ai-monitor__screen {
	position: relative;
	padding: clamp(1.1rem, 3vw, 2rem) clamp(1rem, 3vw, 2.25rem);
	background: radial-gradient(ellipse 110% 90% at 45% 40%, #17160a 0%, var(--ai-sentry-screen) 65%);
}

.ai-monitor .anyipsum-output {
	font-family: var(--ai-readout);
	font-size: clamp(1.25rem, 2vw, 1.45rem);
	line-height: 1.4;
	text-transform: none;
	color: #f0e75a;
	text-shadow: 0 0 6px rgba(226, 214, 43, 0.4);
}

.ai-monitor .anyipsum-output p {
	margin: 0 0 1em;
}

.ai-monitor .anyipsum-output p:last-child {
	margin-bottom: 0;
}

.ai-monitor .anyipsum-output p:last-child::after {
	content: "";
	display: inline-block;
	width: 0.55em;
	height: 1em;
	margin-left: 0.2em;
	vertical-align: text-bottom;
	background: var(--ai-sentry);
	animation: ai-led 1.06s steps(1) infinite;
}

.ai-monitor.is-printing .anyipsum-output p {
	animation: ai-print 0.55s steps(14, end) both;
	animation-delay: calc(var(--ai-i, 0) * 0.16s + 0.2s);
}

@keyframes ai-print {
	from { clip-path: inset(0 100% 0 0); }
	to { clip-path: inset(0 0 0 0); }
}

/* Gauges */
.ai-gauges {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	padding: 1.1rem 1rem 1.25rem;
}

.ai-readout {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
	text-align: center;
}

.ai-readout__label {
	font-size: 1.05rem;
	line-height: 1.1;
	letter-spacing: 0.04em;
}

.ai-readout__label small {
	display: block;
	font-size: 0.9em;
	text-transform: lowercase;
}

.ai-readout__value {
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

.ai-readout__arrow {
	font-family: system-ui, sans-serif;
	font-size: 1.1rem;
}

.ai-readout__box {
	min-width: 5ch;
	padding: 0.3rem 0.6rem;
	font-size: 2.1rem;
	line-height: 1;
	text-align: center;
	font-variant-numeric: tabular-nums;
	border: var(--ai-rule) solid var(--ai-sentry);
}

.ai-readout__box.is-empty {
	color: var(--ai-alarm);
	border-color: var(--ai-alarm);
	text-shadow: 0 0 8px rgba(255, 85, 51, 0.6);
	animation: ai-led 0.8s steps(1) infinite;
}

.ai-bars {
	display: flex;
	justify-content: center;
	gap: 2.25rem;
	margin-top: 0.5rem;
}

.ai-bar {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
}

.ai-bar__label {
	font-size: 1.05rem;
}

.ai-bar__track {
	position: relative;
	display: block;
	width: 1.6rem;
	height: 9rem;
	border: var(--ai-rule) solid var(--ai-sentry);
	border-top-width: 0;
	/* Tick marks up the right edge */
	background: repeating-linear-gradient(to top, var(--ai-sentry) 0 2px, transparent 2px 18px) right / 6px 100% no-repeat;
}

.ai-bar__fill {
	position: absolute;
	left: 3px;
	right: 9px;
	top: 3px;
	bottom: 3px;
	background: var(--ai-sentry);
	box-shadow: 0 0 10px rgba(226, 214, 43, 0.5);
	transform-origin: 50% 100%;
	transform: scaleY(var(--ai-fill, 0));
}

.ai-monitor.is-printing .ai-bar__fill {
	animation: ai-fill 1.8s cubic-bezier(0.2, 0.7, 0.3, 1) 0.3s both;
}

@keyframes ai-fill {
	from { transform: scaleY(0); }
}

.ai-monitor__toast {
	position: absolute;
	right: 1rem;
	bottom: 1rem;
	z-index: 4;
	margin: 0;
	padding: 0.3rem 0.8rem;
	font-family: var(--ai-raster);
	font-size: 1rem;
	letter-spacing: 0.05em;
	color: #000;
	background: var(--ai-sentry);
	text-shadow: none;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.2s, transform 0.2s;
	pointer-events: none;
}

.ai-monitor__toast.is-visible {
	opacity: 1;
	transform: none;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@keyframes ai-led {
	50% { opacity: 0.25; }
}

@keyframes ai-flicker {
	0%, 100% { opacity: 1; }
	47% { opacity: 0.75; }
	48% { opacity: 1; }
	82% { opacity: 0.85; }
	83% { opacity: 1; }
}

/* ---- Blog / pages -------------------------------------------------------- */

.ai-log-list {
	list-style: none;
	padding: 0;
}

.ai-log-entry {
	padding: 1.5rem 0;
	border-top: 1px solid var(--ai-seam);
}

.ai-log-entry h2 {
	margin: 0.35rem 0 0.6rem;
}

.ai-log-entry h2 a {
	color: #eef4f6;
	text-decoration: none;
}

.ai-log-entry h2 a:hover {
	color: var(--ai-hazard);
}

.ai-log-stamp::before {
	content: "LOG \00b7 ";
	color: var(--ai-phosphor-dim);
}

.ai-empty {
	font-family: var(--ai-mono);
	color: var(--ai-steel);
}

.ai-post-nav {
	margin-top: var(--wp--preset--spacing--60);
	padding-top: 1.25rem;
	border-top: 1px solid var(--ai-seam);
	font-family: var(--ai-mono);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: var(--wp--preset--font-size--small);
}

/* Core inputs outside the generator (comments, search) */
:where(.wp-site-blocks) :where(input[type="text"], input[type="email"], input[type="url"], input[type="search"], textarea) {
	color: var(--ai-fog);
	background: var(--ai-hull);
	border: 1px solid var(--ai-seam);
	border-radius: 2px;
	padding: 0.6rem 0.75rem;
	font-family: var(--ai-mono);
}

/* ---- 404 ----------------------------------------------------------------- */

.ai-404__title {
	font-size: clamp(2.8rem, 9vw, 6.5rem);
	line-height: 0.92;
	color: var(--ai-alarm);
	text-shadow: 0 0 24px rgba(255, 85, 51, 0.35);
}

/* ---- Footer -------------------------------------------------------------- */

.ai-footer {
	position: relative;
	margin-top: 0;
	padding-top: calc(6px + 1.75rem);
	padding-bottom: 1.75rem;
	border-top: 1px solid var(--ai-seam);
	background: var(--ai-hull);
}

.ai-footer::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 6px;
	background: var(--ai-hazard-stripes);
	opacity: 0.85;
}

.ai-footer__bar {
	gap: 0.75rem 2rem;
}

.ai-footer__signoff {
	margin: 0;
	font-family: var(--ai-stencil);
	font-weight: 800;
	font-size: 1.6rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #eef4f6;
}

.ai-footer__meta {
	margin: 0;
	max-width: 44em;
	font-family: var(--ai-mono);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.06em;
	color: var(--ai-steel);
}

/* ---- Responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
	.ai-hero {
		grid-template-columns: minmax(0, 1fr);
	}

	.ai-tracker {
		justify-self: start;
		max-width: 420px;
	}

	.ai-panel .anyipsum-table tbody {
		grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	}

	.ai-panel .anyipsum-start-with,
	.ai-panel .anyipsum-submit {
		grid-column: 1 / -1;
	}

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

	.ai-monitor__body > .ai-gauges {
		order: -1;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 1rem;
	}

	.ai-bars {
		display: none;
	}
}

@media (max-width: 560px) {
	:root { --ai-chamfer: 10px; }

	.ai-wordmark,
	.ai-wordmark a {
		letter-spacing: 0.2em;
	}

	.ai-tracker {
		max-width: none;
		padding: 0.6rem;
	}


	.ai-screen__head {
		gap: 0.5rem;
		padding: 0.5rem;
	}

	.ai-panel .anyipsum-table tbody {
		grid-template-columns: minmax(0, 1fr);
	}

	.ai-monitor__head {
		grid-template-columns: 1fr 1fr;
	}

	.ai-monitor__status {
		grid-column: 1 / -1;
		justify-content: center;
	}

	.ai-readout__box {
		font-size: 1.7rem;
	}
}

/* ---- Motion preferences -------------------------------------------------- */

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

	.ai-tracker__pulse {
		display: none;
	}
}
