/* Shared error page ("Point of Order"): tpl/error-page.html, rendered by lib/class.ErrorPageResponse.php.
   Loaded only on error pages and the "coming soon" placeholder. Font: Source Serif 4 (SIL OFL 1.1, ../fonts/OFL.txt),
   self-hosted (variable latin subsets, weights 400-700, upright and italic). The outlined .poo-code uses a static
   Source Serif 4 Display Bold digit subset (adobe-fonts/source-serif 4.005R, OTF) instead: the variable glyphs keep
   overlapping contours, which -webkit-text-stroke draws as inner edges. */

@font-face {
	font-family: "Source Serif 4";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/source-serif-4-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Source Serif 4";
	font-style: italic;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/source-serif-4-latin-italic.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Source Serif 4 Static";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/source-serif-4-display-bold-static.woff2") format("woff2");
	unicode-range: U+0020, U+0030-0039;
}

#content.public-content { padding: 0; }
/* The page title (h1) keeps the site's Anton uppercase page title; the "document" on the right keeps its serif headings
   (undo the Anton heading defaults of public-content.css there). */
.public-content .poo h2,
.public-content .poo h3 { text-transform: none; font-synthesis: weight style; overflow-wrap: normal; }
/* Portal frame (PortalFrame::renderError): the error fills the page below the navbar. */
.portal-auth-app > #content.portal-error-content { flex: 1 0 auto; display: flex; flex-direction: column; }
.portal-auth-app > #content.portal-error-content > .poo { flex: 1 0 auto; display: flex; align-items: center; }

.poo {
	/* Shared tokens (site-tokens.css); only the paper colour of the document is the error page's own. */
	--poo-navy: var(--olmun-navy);
	--poo-blue: var(--olmun-primary);
	--poo-tint: var(--olmun-primary-soft);
	--poo-red: var(--olmun-accent);
	--poo-paper: #fffdf8;
	--poo-ink: var(--olmun-text);
	--poo-muted: var(--olmun-text-muted);
	--poo-serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
	position: relative;
	background:
		linear-gradient(90deg, var(--poo-navy) 0, var(--poo-navy) 50%, transparent 50%),
		var(--poo-tint);
	overflow: hidden;
}

.poo-inner {
	width: min(76rem, 100% - 2rem);
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
	padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 7vw, 5.5rem);
	position: relative;
}

.public-content .poo-code {
	font-family: "Source Serif 4 Static", var(--poo-serif);
	font-weight: 700;
	font-size: clamp(6.5rem, 15vw, 12.5rem);
	line-height: .82;
	letter-spacing: -.05em;
	margin: 0 0 1.4rem -.04em;
	color: transparent;
	-webkit-text-stroke: 2px #fff;
	position: relative;
	animation: poo-code-in .7s cubic-bezier(.2, .8, .2, 1) .1s both;
}
.public-content .poo-code::after {
	content: ""; position: absolute; left: .06em; bottom: -.32rem; width: 2.4rem; height: .32rem; background: var(--poo-red);
}
@keyframes poo-code-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.poo-bench { color: #fff; position: relative; padding-right: 1rem; }

.public-content .poo-kicker {
	display: inline-flex; align-items: center; gap: .6rem;
	font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
	color: #c6d4f2; margin: 0 0 1.4rem;
}

.public-content .poo-title {
	font-family: var(--olmun-font-display);
	font-weight: 400;
	font-synthesis: none;
	font-size: clamp(2.25rem, 4.4vw, 3.5rem);
	line-height: 1.08;
	letter-spacing: .02em;
	word-spacing: .08em;
	text-transform: uppercase;
	color: #fff;
	margin: 0 0 1.4rem;
	max-width: 14ch;
	text-wrap: balance;
}

.public-content .poo-lede {
	font-size: 1.08rem; line-height: 1.6; color: #d5def2; max-width: 34rem; margin: 0 0 2rem;
}

/* The shared button (site-tokens.css): white on the navy bench. */
.public-content a.poo-home {
	display: inline-flex; align-items: center; gap: .6rem;
	background: #fff; color: var(--poo-navy);
	font-size: var(--olmun-btn-font-size); font-weight: var(--olmun-btn-font-weight);
	letter-spacing: var(--olmun-btn-letter-spacing); text-transform: var(--olmun-btn-text-transform); text-decoration: none;
	padding: var(--olmun-btn-padding-y) var(--olmun-btn-padding-x); border-radius: var(--olmun-btn-radius);
	box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 8px 20px rgba(0, 0, 0, .25);
	transition: transform .2s ease, background .2s ease;
}
.public-content a.poo-home span { transition: transform .2s ease; }
.public-content a.poo-home:hover { background: var(--poo-tint); }
.public-content a.poo-home:hover span { transform: translateX(4px); }
.public-content a.poo-home:focus-visible { outline: 3px solid #8fb0ff; outline-offset: 3px; }

.poo-gavel { margin-top: clamp(1.2rem, 3vw, 2.2rem); width: min(220px, 55%); }
.poo-gavel-svg { display: block; width: 100%; height: auto; overflow: visible; }
.poo-block-shadow { fill: rgba(0, 0, 0, .35); }
.poo-block-side { fill: #6b3d1f; }
.poo-block-top { fill: #9a5a2c; }
.poo-handle { fill: #b9773f; }
.poo-head { fill: #8a4f25; }
.poo-band { fill: #d6a35a; }

.poo-hammer {
	transform-box: view-box;
	transform-origin: 250px 107px;
	animation: poo-strike 1.5s cubic-bezier(.5, 0, .2, 1) .35s both;
}
.poo-ripples ellipse { fill: none; stroke: #c6d4f2; stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; animation: poo-ripple 1s ease-out 1.02s both; }
.poo-ripples ellipse + ellipse { animation-delay: 1.1s; }

@keyframes poo-strike {
	0% { transform: rotate(32deg); }
	38% { transform: rotate(38deg); }
	52% { transform: rotate(0deg); animation-timing-function: ease-out; }
	64% { transform: rotate(7deg); animation-timing-function: ease-in; }
	74% { transform: rotate(0deg); }
	100% { transform: rotate(0deg); }
}
@keyframes poo-ripple {
	0% { opacity: .9; transform: scale(.6); }
	100% { opacity: 0; transform: scale(1.5); }
}

.poo-doc {
	position: relative; z-index: 1;
	background: var(--poo-paper);
	color: var(--poo-ink);
	font-family: var(--poo-serif);
	padding: clamp(1.6rem, 3.5vw, 3rem) clamp(1.4rem, 3.5vw, 3.2rem) clamp(1.4rem, 3vw, 2.4rem);
	border-radius: 2px;
	box-shadow:
		0 1px 1px rgba(4, 24, 68, .08),
		0 12px 24px -8px rgba(4, 24, 68, .25),
		0 40px 70px -30px rgba(4, 24, 68, .45);
	transform: rotate(.6deg);
	animation: poo-paper .8s cubic-bezier(.2, .8, .2, 1) both;
}
.poo-sheets { position: relative; }
.poo-sheets::before {
	/* second sheet peeking out underneath */
	content: ""; position: absolute; inset: 0; z-index: 0;
	background: #f3efe4; transform: rotate(-2.2deg) translate(-6px, 6px);
	box-shadow: 0 10px 30px -12px rgba(4, 24, 68, .35);
}
@keyframes poo-paper {
	from { opacity: 0; transform: translateY(24px) rotate(2deg); }
	to { opacity: 1; transform: rotate(.6deg); }
}

.poo-doc-head { border-bottom: 1px solid #d9d3c4; padding-bottom: 1.1rem; margin-bottom: 1.3rem; }
.poo-doc-meta {
	display: flex; justify-content: space-between; gap: 1rem;
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--poo-muted);
	margin-bottom: 1.4rem;
}
.poo-doc-sym { color: var(--poo-blue); }
.public-content .poo-doc-title {
	font-family: var(--poo-serif); font-weight: 700; font-size: clamp(1.2rem, 2vw, 1.45rem);
	line-height: 1.2; letter-spacing: normal; color: var(--poo-ink); margin: 0 0 .7rem;
}
.public-content .poo-doc-req { font-size: .92rem; margin: 0; color: var(--poo-muted); overflow-wrap: anywhere; }
.poo-path,
.poo-ref {
	font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .85em;
	background: #f1ece0; color: var(--poo-ink); padding: .1em .4em; border-radius: 3px;
}
.poo-path { text-decoration: line-through; text-decoration-color: var(--poo-red); text-decoration-thickness: 2px; }

.public-content .poo-pre { font-size: 1.02rem; line-height: 1.55; margin: 0 0 .4rem; font-style: italic; color: var(--poo-muted); }

.poo-ops { list-style: none; counter-reset: op; margin: .8rem 0 0; padding: 0; }
.poo-ops li { counter-increment: op; }
.public-content .poo-ops a {
	position: relative;
	display: block;
	padding: .55rem .6rem .55rem 1.6rem;
	margin: 0 -.6rem 0 0;
	border-radius: 4px;
	color: var(--poo-ink);
	text-decoration: none;
	font-size: 1.02rem; line-height: 1.45;
	transition: background .18s ease, color .18s ease;
}
.public-content .poo-ops a::before {
	content: counter(op) ".";
	position: absolute; left: 0; top: .55rem;
	font-weight: 600; color: var(--poo-muted);
}
.public-content .poo-ops a::after {
	content: "\2192";
	position: absolute; right: .6rem; top: 50%; transform: translate(-6px, -50%);
	opacity: 0; color: var(--poo-blue); transition: opacity .18s ease, transform .18s ease;
}
.public-content .poo-ops a strong { font-weight: 700; color: var(--poo-blue); }
.public-content .poo-ops a:hover,
.public-content .poo-ops a:focus-visible { background: var(--poo-tint); padding-right: 2rem; }
.public-content .poo-ops a:hover::after,
.public-content .poo-ops a:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.public-content .poo-ops a:focus-visible { outline: 2px solid var(--poo-blue); outline-offset: 1px; }

.poo-op-verb {
	text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em;
}

.poo-stamp {
	display: flex; justify-content: flex-end;
	margin: 1.4rem .4rem 0 0;
	pointer-events: none;
	animation: poo-stamp .45s cubic-bezier(.3, 1.6, .5, 1) 1s both;
}
.poo-stamp span {
	display: block;
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
	font-weight: 900; font-size: clamp(.95rem, 1.8vw, 1.25rem); letter-spacing: .14em; text-transform: uppercase;
	color: var(--poo-red);
	border: 3px solid currentColor; border-radius: 6px;
	padding: .35rem .8rem;
	box-shadow: inset 0 0 0 2px var(--poo-paper), inset 0 0 0 4px currentColor;
	transform: rotate(-9deg);
	opacity: .88;
}
@keyframes poo-stamp {
	0% { opacity: 0; transform: scale(2.2); }
	100% { opacity: 1; transform: scale(1); }
}

@media (max-width: 767.98px) {
	.poo { background: var(--poo-tint); }
	.poo-inner { grid-template-columns: 1fr; width: 100%; padding: 0; gap: 0; }
	.poo-bench {
		background: var(--poo-navy);
		padding: 2.5rem 1.25rem 0;
		display: grid;
		grid-template-columns: 1fr;
	}
	.public-content .poo-code { font-size: clamp(5.5rem, 30vw, 8rem); }
	.poo-gavel { width: 190px; margin: 1.5rem 0 .4rem auto; }
	.poo-doc { transform: rotate(0); animation-name: poo-paper-flat; }
	.poo-sheets { margin: 1.75rem 1rem 2.5rem; }
	.poo-sheets::before { transform: rotate(-1.4deg) translate(-3px, 5px); }
	@keyframes poo-paper-flat { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 575.98px) {
	.public-content .poo-pre { padding-left: 0; }
	.poo-doc-meta { margin-bottom: 1rem; }
	.poo-stamp { margin-right: 0; }
	.poo-stamp span { font-size: .8rem; letter-spacing: .1em; padding: .3rem .55rem; }
}

@media (prefers-reduced-motion: reduce) {
	.public-content .poo-code, .poo-hammer, .poo-ripples ellipse, .poo-stamp, .poo-doc { animation: none !important; }
	.poo-hammer { transform: rotate(0); }
	.public-content a.poo-home, .public-content a.poo-home span, .public-content .poo-ops a, .public-content .poo-ops a::after { transition: none; }
}
