/* ==================================================================
 * Quoin — design system
 *
 * Palette  Warm Sand          Direction  Bento Grid
 * Type     Cormorant Garamond + Raleway
 * Edges    asymmetric organic, mirrored on neighbouring tiles
 * Accent   colour lives on headings and rules
 * ================================================================== */

/* ---------- 1. Tokens ------------------------------------------- */

:root {
	--bg:          #FAF6EF;
	--surface:     #FFFDF8;
	--ink:         #2E261A;
	--muted:       #6B5F4B;
	/* --accent is a FILL that carries --on-accent text on top of it.
	   --link is the same bronze used AS text, on the page background.
	   They have to be separate tokens: one colour cannot be dark enough to
	   hold white text and light enough to read on a dark page. */
	--accent:      #8C6A3F;
	--accent-2:    #D9C29A;
	--on-accent:   #FFFDF8;
	--accent-over: #75562F;
	--link:        #7E5C33;
	--ink-h:       #8C6A3F;

	--tile-a:      rgba(217, 194, 154, .30);
	--tile-b:      rgba(140, 106, 63, .11);
	--tile-c:      rgba(255, 253, 248, .92);
	--hair:        rgba(140, 106, 63, .22);
	--veil-bg:     rgba(250, 246, 239, .82);
	--gate-grad:   linear-gradient(135deg, #FBF3E4, #F3E6CC 50%, #EAD7B4);
	--shade:       0 12px 28px rgba(93, 70, 40, .13);
	--shade-lift:  0 18px 40px rgba(93, 70, 40, .18);

	--skin:        #E8C6A4;
	--skin-2:      #C9926B;
	--hairtone:    #4A3524;

	--r-a:         40px 12px 40px 12px;
	--r-b:         12px 40px 12px 40px;
	--r-s:         18px 6px 18px 6px;
	--r-s-b:       6px 18px 6px 18px;
	--r-pill:      999px;

	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 24px;
	--space-6: 32px;
	--space-7: 48px;
	--space-8: 64px;

	--t-xs:   .8125rem;
	--t-sm:   .9375rem;
	--t-base: 1.0625rem;
	--t-md:   1.1875rem;
	--t-lg:   clamp(1.35rem, 1.1rem + .9vw, 1.7rem);
	--t-xl:   clamp(1.7rem, 1.25rem + 1.9vw, 2.5rem);
	--t-2xl:  clamp(2.1rem, 1.4rem + 3.1vw, 3.6rem);

	--col:   44rem;
	--wrap:  1140px;
	--pad:   clamp(16px, 4vw, 32px);

	--head:  'Cormorant Garamond', Georgia, 'Times New Roman', serif;
	--body:  'Raleway', 'Segoe UI', system-ui, -apple-system, sans-serif;

	--ease:  cubic-bezier(.22, .68, .36, 1);
}

[data-theme="dark"] {
	--bg:          #1B1712;
	--surface:     #251F17;
	--ink:         #F0EAE0;
	--muted:       #C0B29C;
	--accent:      #8F6B3C;
	--accent-2:    #C6A572;
	--on-accent:   #FFFDF8;
	--accent-over: #75562F;
	--link:        #D3B384;
	--ink-h:       #C6A572;

	--tile-a:      rgba(198, 165, 114, .13);
	--tile-b:      rgba(240, 234, 224, .05);
	--tile-c:      rgba(37, 31, 23, .92);
	--hair:        rgba(198, 165, 114, .24);
	--veil-bg:     rgba(27, 23, 18, .84);
	--gate-grad:   linear-gradient(135deg, #2B231A, #33291D 50%, #3D3022);
	--shade:       0 12px 28px rgba(0, 0, 0, .40);
	--shade-lift:  0 18px 40px rgba(0, 0, 0, .52);

	--skin:        #C79A72;
	--skin-2:      #A87850;
	--hairtone:    #2A1F16;
}

/* ---------- 2. Base --------------------------------------------- */

body {
	margin-block: 0;
	margin-inline: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--body);
	font-size: var(--t-base);
	line-height: 1.72;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
	font-family: var(--head);
	font-weight: 700;
	line-height: 1.16;
	letter-spacing: .004em;
	color: var(--ink-h);
	scroll-margin-top: 96px;
}

h1 { font-size: var(--t-2xl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-md); font-family: var(--body); font-weight: 600; letter-spacing: 0; }

::selection {
	background: var(--accent-2);
	color: var(--ink);
}

:focus-visible {
	outline: 2px solid var(--link);
	outline-offset: 3px;
	border-radius: 4px;
}

.quo-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 60;
	background: var(--surface);
	color: var(--ink);
	padding: var(--space-3) var(--space-4);
	border-radius: var(--r-s);
}

.quo-skip:focus {
	left: var(--space-4);
	top: var(--space-4);
}

/* custom scrollbar — the accent, quietly */
* {
	scrollbar-color: var(--accent-2) transparent;
	scrollbar-width: thin;
}

*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-track { background: transparent; }

*::-webkit-scrollbar-thumb {
	background: var(--accent-2);
	border: 3px solid var(--bg);
	border-radius: var(--r-pill);
}

*::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------- 3. Reading column ----------------------------------- */

.quo-main {
	display: block;
	padding-inline: var(--pad);
	padding-block: 0 var(--space-8);
}

.quo-entry {
	max-width: var(--wrap);
	margin-inline: auto;
	margin-block: 0;
	padding-block: var(--space-6) 0;
}

/* Zero-specificity floor: every direct child sits on the same column and
   the same two edges. Component rules below can always override it.
   The gate is the one exemption — it is a wider card of its own. */
.quo-entry > :where(*:not(.quo-gate)) {
	max-width: var(--col);
	margin-inline: auto;
}

.quo-entry > p {
	margin-block: 0 var(--space-5);
	color: var(--ink);
}

.quo-entry > h2 {
	margin-block: var(--space-8) var(--space-4);
	position: relative;
	padding-top: var(--space-5);
}

.quo-entry > h2::before {
	content: "";
	position: absolute;
	inset-block-start: 0;
	inset-inline-start: 0;
	width: 92px;
	height: 3px;
	border-radius: var(--r-pill);
	background: var(--accent-2);
}

/* No wider max-width here. A heading given its own column measures a correct
   width and still starts further left than every paragraph under it, and the
   mismatched left edges are what reads as broken. */
.quo-entry > h1 {
	margin-block: var(--space-7) var(--space-5);
}

.quo-entry a:not([class]) {
	color: var(--link);
	text-decoration: none;
	background-image: linear-gradient(var(--link), var(--link));
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 100% 1px;
	transition: background-size .3s var(--ease);
}

.quo-entry a:not([class]):hover { background-size: 100% 2px; }

/* Chat-path guard, as a zero-specificity floor. The body-link treatment above
   would otherwise paint the gate button's text accent-on-accent, and a floor
   written with :where() contributes no specificity, so every button class
   still wins outright rather than by luck of source order. */
:where(.quo-entry a[href="/randomchat.html"], .quo-cta-bar a[href="/randomchat.html"]) {
	background-image: none;
	text-decoration: none;
}

.quo-entry .wp-block-list {
	margin-block: 0 var(--space-5);
	padding-inline-start: 1.4em;
	list-style: disc;
}

.quo-entry .wp-block-list li { margin-block: var(--space-2); }

.quo-entry > .quo-kicker {
	font-family: var(--head);
	font-size: var(--t-lg);
	font-weight: 600;
	color: var(--muted);
	text-align: center;
	margin-block: var(--space-5) var(--space-5);
}

/* ---------- 4. Header ------------------------------------------- */

.quo-hd {
	position: sticky;
	top: 0;
	z-index: 30;
	background: var(--veil-bg);
	backdrop-filter: blur(14px) saturate(150%);
	-webkit-backdrop-filter: blur(14px) saturate(150%);
	border-bottom: 1px solid var(--hair);
	transition: transform .32s var(--ease);
}

.quo-hd[data-hidden="1"] { transform: translateY(-101%); }

/* The admin bar is fixed at 32px on desktop and NOT fixed below 783px,
   so the offset has to be given back or the header sits 46px too low. */
.admin-bar .quo-hd { top: 32px; }

.quo-hd-in {
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: var(--pad);
	padding-block: var(--space-3);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	min-height: 60px;
}

.quo-brand {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	text-decoration: none;
	min-width: 0;
	flex: 0 1 auto;
}

.quo-brand-ico {
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	color: var(--link);
}

.quo-brand-ico svg { width: 34px; height: 34px; display: block; }

.quo-brand-txt {
	font-family: var(--head);
	font-weight: 700;
	font-size: clamp(1.05rem, .82rem + .9vw, 1.45rem);
	line-height: 1.1;
	color: var(--ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}

.quo-hd-act {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	flex: 0 0 auto;
}

/* Icon-only buttons are fixed boxes and grid-centred. Never let the svg
   inside inherit a percentage cap: iOS Safari clamps it to zero width and
   the button turns into a tall empty pill. */
.quo-ico-btn {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
	border-radius: var(--r-s);
	color: var(--ink);
	background: transparent;
	transition: background .2s var(--ease), color .2s var(--ease);
}

.quo-ico-btn svg { width: 21px; height: 21px; display: block; }

.quo-ico-btn:hover { background: var(--tile-b); color: var(--link); }

.quo-toggle .quo-moon { display: none; }
[data-theme="dark"] .quo-toggle .quo-sun { display: none; }
[data-theme="dark"] .quo-toggle .quo-moon { display: block; }

.quo-toggle svg { transition: transform .4s var(--ease); }
.quo-toggle:hover svg { transform: rotate(28deg); }

.quo-burger-box {
	display: block;
	position: relative;
	width: 21px;
	height: 15px;
}

.quo-burger-bar,
.quo-burger-bar::before,
.quo-burger-bar::after {
	position: absolute;
	left: 0;
	width: 21px;
	height: 2px;
	border-radius: var(--r-pill);
	background: currentColor;
	transition: transform .28s var(--ease), opacity .18s linear;
}

.quo-burger-bar { top: 6.5px; }
.quo-burger-bar::before { content: ""; top: -6.5px; }
.quo-burger-bar::after { content: ""; top: 6.5px; }

.quo-burger[aria-expanded="true"] .quo-burger-bar { transform: rotate(45deg); }
.quo-burger[aria-expanded="true"] .quo-burger-bar::before { opacity: 0; transform: translateY(6.5px); }
.quo-burger[aria-expanded="true"] .quo-burger-bar::after { transform: rotate(-90deg) translateX(6.5px); }

/* ---------- 5. Language control --------------------------------- */

.quo-lang { position: relative; }

.quo-lang-btn {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	height: 44px;
	padding-inline: var(--space-4);
	border-radius: var(--r-s);
	font-size: var(--t-sm);
	font-weight: 500;
	color: var(--ink);
	transition: background .2s var(--ease);
}

.quo-lang-btn svg { width: 19px; height: 19px; flex: 0 0 19px; }
.quo-lang-btn .quo-chev { width: 15px; height: 15px; flex: 0 0 15px; transition: transform .25s var(--ease); }
.quo-lang-btn[aria-expanded="true"] .quo-chev { transform: rotate(180deg); }
.quo-lang-btn:hover { background: var(--tile-b); }

.quo-lang-pop {
	position: absolute;
	inset-block-start: calc(100% + 10px);
	inset-inline-end: 0;
	min-width: 208px;
	padding: var(--space-2);
	background: var(--surface);
	border: 1px solid var(--hair);
	border-radius: var(--r-b);
	box-shadow: var(--shade);
	z-index: 40;
}

.quo-lang-list,
.quo-foot-list {
	list-style: none;
	margin-block: 0;
	padding-inline: 0;
}

.quo-lang-list li a,
.quo-lang-sheet a,
.quo-lang-pop .trp-language-switcher-container a {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	min-height: 44px;
	padding-inline: var(--space-3);
	border-radius: var(--r-s);
	color: var(--ink);
	text-decoration: none;
	font-size: var(--t-sm);
	transition: background .18s var(--ease);
}

.quo-lang-list li a:hover,
.quo-lang-sheet a:hover { background: var(--tile-a); color: var(--link); }

.quo-lang-list img,
.quo-lang-sheet img { width: 20px; height: auto; border-radius: 3px; }

/* TranslatePress ships a floating picker of its own and it is ON by
   default. The theme provides the switcher, so the plugin's is retired. */
#trp-floater-ls,
.trp-floater,
.trp-language-switcher-container.trp-floater { display: none !important; }

/* ---------- 6. Mobile sheet ------------------------------------- */

.quo-sheet { position: fixed; inset: 0; z-index: 50; }

.quo-sheet-scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: rgba(46, 38, 26, .42);
	opacity: 0;
	transition: opacity .26s var(--ease);
}

.quo-sheet[data-open="1"] .quo-sheet-scrim { opacity: 1; }

.quo-sheet-panel {
	position: absolute;
	inset-block-start: 0;
	inset-inline: 0;
	z-index: 2;
	background: var(--surface);
	border-bottom-left-radius: 40px;
	border-bottom-right-radius: 12px;
	padding: var(--space-4) var(--pad) var(--space-6);
	box-shadow: var(--shade-lift);
	transform: translateY(-102%);
	transition: transform .32s var(--ease);
	max-height: 86dvh;
	overflow-y: auto;
}

.quo-sheet[data-open="1"] .quo-sheet-panel { transform: translateY(0); }

.quo-sheet-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	margin-block: 0 var(--space-3);
}

.quo-sheet-title {
	font-family: var(--head);
	font-size: var(--t-lg);
	font-weight: 700;
	color: var(--ink-h);
}

.quo-sheet-links {
	margin-block: var(--space-5) 0;
	padding-block: var(--space-4) 0;
	border-top: 1px solid var(--hair);
}

.quo-sheet-links a {
	display: flex;
	align-items: center;
	min-height: 44px;
	color: var(--muted);
	text-decoration: none;
	font-size: var(--t-sm);
}

.quo-sheet-links a:hover { color: var(--link); }

/* ---------- 7. Age gate ----------------------------------------- */

.quo-gate {
	max-width: 62rem;
	margin-inline: auto;
	margin-block: 0 var(--space-6);
	padding: clamp(28px, 6vw, 56px) var(--pad);
	background: var(--gate-grad);
	border-radius: var(--r-a);
	box-shadow: var(--shade);
	text-align: center;
	position: relative;
	overflow: hidden;
}

.quo-gate-card {
	max-width: 34rem;
	margin-inline: auto;
	margin-block: 0;
	display: grid;
	justify-items: center;
	gap: var(--space-4);
}

.quo-gate-badge {
	position: relative;
	display: grid;
	place-items: center;
	width: 96px;
	height: 96px;
	margin-block: 0;
	margin-inline: 0;
}

/* Halo: a 6px conic ring, cut out with a radial mask, turning slowly. */
.quo-gate-ring {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: conic-gradient(from 0deg, #D9C29A, #8C6A3F 32%, #EAD7B4 58%, #B08A55 78%, #D9C29A);
	-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 6px));
	mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 6px));
	animation: quo-turn 12s linear infinite;
}

.quo-gate-badge::after {
	content: "";
	position: absolute;
	inset: 10px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 253, 248, .95), rgba(255, 253, 248, .55) 70%, transparent);
	animation: quo-breathe 7s var(--ease) infinite;
}

[data-theme="dark"] .quo-gate-badge::after {
	background: radial-gradient(circle, rgba(37, 31, 23, .95), rgba(37, 31, 23, .6) 70%, transparent);
}

.quo-gate-badge-txt {
	position: relative;
	z-index: 2;
	font-family: var(--head);
	font-weight: 700;
	font-size: 1.65rem;
	line-height: 1;
	color: var(--ink);
	letter-spacing: .01em;
}

@keyframes quo-turn { to { transform: rotate(360deg); } }

@keyframes quo-breathe {
	0%, 100% { transform: scale(1); opacity: .9; }
	50%      { transform: scale(1.09); opacity: 1; }
}

.quo-gate-q {
	font-family: var(--head);
	font-size: clamp(1.5rem, 1.1rem + 1.9vw, 2.3rem);
	font-weight: 700;
	line-height: 1.2;
	color: #3A2E1E;
	margin-block: 0;
	margin-inline: 0;
	max-width: 22ch;
}

.quo-gate-note {
	color: #55452E;
	font-size: var(--t-sm);
	margin-block: 0;
	margin-inline: 0;
	max-width: 44ch;
}

[data-theme="dark"] .quo-gate-q   { color: #F3EADC; }
[data-theme="dark"] .quo-gate-note { color: #CDBB9F; }

.quo-gate-act { margin-block: var(--space-2) 0; margin-inline: 0; }

.quo-gate-go,
.quo-btn,
.quo-cta-go {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	padding: var(--space-3) var(--space-7);
	border-radius: var(--r-s);
	background: var(--accent);
	color: var(--on-accent);
	font-family: var(--body);
	font-weight: 600;
	font-size: var(--t-md);
	line-height: 1.2;
	text-decoration: none;
	background-image: none;
	box-shadow: var(--shade);
	transition: transform .22s var(--ease), box-shadow .22s var(--ease), background .22s var(--ease);
}

.quo-gate-go:hover,
.quo-btn:hover,
.quo-cta-go:hover {
	transform: translateY(-2px);
	box-shadow: var(--shade-lift);
	background: var(--accent-over);
}

.quo-btn { min-height: 48px; padding-inline: var(--space-6); font-size: var(--t-base); }

/* ---------- 8. Entry components --------------------------------- */

.quo-figure {
	max-width: var(--col);
	margin-inline: auto;
	margin-block: var(--space-7);
	padding: 0;
}

.quo-illus {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--r-b);
	overflow: hidden;
}

.quo-figure-cap {
	margin-block: var(--space-3) 0;
	font-size: var(--t-sm);
	color: var(--muted);
	text-align: center;
}

.quo-illus-bg      { fill: var(--tile-c); }
.quo-illus-tile    { fill: var(--tile-a); }
.quo-illus-tile-alt { fill: var(--tile-b); }
.quo-illus-skin    { fill: var(--skin); }
.quo-illus-skin-alt { fill: var(--skin-2); }
.quo-illus-hair    { fill: var(--hairtone); }
.quo-illus-ink     { fill: var(--ink); }
.quo-illus-stroke  { stroke: var(--ink); }
.quo-illus-shoulder { fill: var(--accent); }
.quo-illus-shoulder-alt { fill: var(--accent-2); }
.quo-illus-fig     { fill: var(--accent); }
.quo-illus-hand    { fill: var(--skin); }
.quo-illus-line    { stroke: var(--accent-2); }
.quo-illus-link    { stroke: var(--accent); }
.quo-illus-accent  { fill: var(--accent-2); }
.quo-illus-accent-soft { fill: var(--tile-a); }

.quo-entry .wp-block-quote {
	margin-block: var(--space-7);
	margin-inline: auto;
	padding: var(--space-6) var(--space-6) var(--space-6) var(--space-7);
	border: 0;
	border-radius: var(--r-a);
	background: var(--tile-a);
	position: relative;
}

.quo-entry .wp-block-quote::before {
	content: "\201C";
	position: absolute;
	inset-block-start: -6px;
	inset-inline-start: 14px;
	font-family: var(--head);
	font-size: 5.2rem;
	line-height: 1;
	color: var(--link);
	opacity: .34;
}

.quo-entry .wp-block-quote p {
	margin-block: 0;
	font-family: var(--head);
	font-size: var(--t-lg);
	font-weight: 600;
	line-height: 1.34;
	color: var(--ink);
	position: relative;
}

/* the bento: three tiles, mirrored edges, one lightness */
.quo-tiles {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-3);
	margin-block: var(--space-5) var(--space-6);
	margin-inline: auto;
}

.quo-tile {
	padding: var(--space-5);
	background: var(--tile-a);
	border-radius: var(--r-a);
	transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.quo-tile:nth-child(even) {
	background: var(--tile-b);
	border-radius: var(--r-b);
}

.quo-tile:hover {
	transform: scale(1.01);
	box-shadow: var(--shade);
}

.quo-tile-ico {
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: var(--r-s);
	background: var(--surface);
	color: var(--link);
	margin-block: 0 var(--space-3);
}

.quo-tile-ico svg { width: 22px; height: 22px; display: block; }

/* Ink, not accent: bronze-on-tint measured 4.0 against the composited tile
   background, and at 19px/600 this is not large text. The accent still runs
   the H2s, the rules and the tile icons. */
.quo-tile-h {
	margin-block: 0 var(--space-2);
	font-size: var(--t-md);
	color: var(--ink);
}

.quo-tile-p {
	margin-block: 0;
	font-size: var(--t-sm);
	color: var(--muted);
	line-height: 1.65;
}

/* ---------- 9. Footer ------------------------------------------- */

.quo-ft {
	border-top: 1px solid var(--hair);
	background: var(--surface);
	padding-block: var(--space-6);
	padding-inline: var(--pad);
}

.quo-ft-in {
	max-width: var(--wrap);
	margin-inline: auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
}

.quo-ft-mark {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin-block: 0;
	font-size: var(--t-sm);
	color: var(--muted);
}

.quo-ft-ico {
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	color: var(--link);
}

.quo-ft-ico svg { width: 26px; height: 26px; display: block; }

.quo-ft-nav .quo-foot-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2) var(--space-5);
}

.quo-ft-nav a {
	color: var(--muted);
	text-decoration: none;
	font-size: var(--t-sm);
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

.quo-ft-nav a:hover { color: var(--link); }

/* ---------- 10. Cookie notice, sticky CTA, back to top ---------- */

.quo-cookie {
	position: fixed;
	inset-inline: var(--space-4);
	inset-block-end: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
	z-index: 45;
	max-width: 30rem;
	margin-inline: auto;
	padding: var(--space-4) var(--space-5);
	background: var(--surface);
	border: 1px solid var(--hair);
	border-radius: var(--r-b);
	box-shadow: var(--shade-lift);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-3);
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .3s var(--ease), transform .3s var(--ease);
}

.quo-cookie[data-open="1"] { opacity: 1; transform: translateY(0); }

/* The notice ALWAYS sits at the bottom. An earlier version moved it to the
   top of the viewport when it would land on the age-gate button; on a phone
   that put it over the header, which reads as broken. So the remedy is to
   shrink it instead: the copy clamps to two lines and the row goes
   single-file, which takes the card clear of the button without moving it
   anywhere the reader would not expect to find it. JS decides this by
   measuring, and the decision is one-way so it can never flip back and forth. */
.quo-cookie[data-compact="1"] {
	inset-inline: var(--space-2);
	inset-block-end: calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
	max-width: none;
	padding: var(--space-2) var(--space-3);
	gap: var(--space-2);
	border-radius: var(--r-s);
	flex-wrap: nowrap;
}

.quo-cookie[data-compact="1"] .quo-cookie-txt {
	flex: 1 1 auto;
	min-width: 0;
	font-size: .75rem;
	line-height: 1.45;
}

/* Drop the closing reassurance rather than clamping the paragraph: a clamp
   would cut the Terms link off the second line, and both links have to stay
   visible and tappable for the notice to be worth anything. */
.quo-cookie[data-compact="1"] .quo-cookie-more { display: none; }

.quo-cookie[data-compact="1"] .quo-cookie-ok {
	min-height: 44px;
	padding-inline: var(--space-4);
	font-size: var(--t-xs);
}

.quo-cookie-txt {
	margin-block: 0;
	flex: 1 1 15rem;
	font-size: var(--t-xs);
	line-height: 1.6;
	color: var(--muted);
}

.quo-cookie-txt a { color: var(--link); text-decoration: underline; }

.quo-cookie-ok {
	flex: 0 0 auto;
	min-height: 44px;
	padding-inline: var(--space-5);
	border-radius: var(--r-s);
	background: var(--accent);
	color: var(--on-accent);
	font-size: var(--t-sm);
	font-weight: 600;
	transition: background .2s var(--ease);
}

/* One hover colour in both themes: it has to stay dark enough to keep
   --on-accent readable, so a lighter dark-mode hover is not available. */
.quo-cookie-ok:hover { background: var(--accent-over); }

.quo-cta-bar {
	position: fixed;
	inset-inline: 0;
	inset-block-end: 0;
	z-index: 42;
	display: none;
	padding: var(--space-3) var(--pad) calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
	background: var(--veil-bg);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-top: 1px solid var(--hair);
	transform: translateY(102%);
	transition: transform .3s var(--ease);
}

.quo-cta-bar[data-open="1"] { transform: translateY(0); }
.quo-cta-go { width: 100%; min-height: 50px; box-shadow: none; }

.quo-top {
	position: fixed;
	inset-inline-end: var(--space-5);
	inset-block-end: calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
	z-index: 41;
	width: 46px;
	height: 46px;
	flex: 0 0 46px;
	border-radius: 50%;
	background: var(--surface);
	border: 1px solid var(--hair);
	box-shadow: var(--shade);
	opacity: 0;
	transform: translateY(10px);
	transition: opacity .26s var(--ease), transform .26s var(--ease);
}

.quo-top[data-open="1"] { opacity: 1; transform: translateY(0); }

/* ---------- 11. Inner pages and 404 ----------------------------- */

.quo-entry-inner { padding-block: var(--space-7) var(--space-7); }

.quo-entry-inner > * {
	max-width: var(--col);
	margin-inline: auto;
}

.quo-entry-inner p { margin-block: 0 var(--space-5); }
.quo-entry-inner h1 { margin-block: 0 var(--space-5); }

.quo-404 { text-align: center; }

.quo-404-num {
	font-family: var(--head);
	font-size: clamp(5rem, 3rem + 14vw, 11rem);
	font-weight: 700;
	line-height: .9;
	margin-block: 0 var(--space-3);
	color: var(--accent-2);
	letter-spacing: -.02em;
}

/* ---------- 12. Reveal -----------------------------------------
 * The veil class is put on by JS and taken off by an observer AND by a
 * timer. Nothing on this page is hidden by the stylesheet alone, so a
 * dead callback costs an animation, never the article.
 * -------------------------------------------------------------- */

.quo-veil {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .6s var(--ease), transform .6s var(--ease);
	transition-delay: calc(var(--i, 0) * 70ms);
}

.quo-veil.quo-seen {
	opacity: 1;
	transform: translateY(0);
}

/* ---------- 13. Breakpoints ------------------------------------- */

@media (min-width: 600px) {
	.quo-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
	.quo-tile:first-child { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
	.quo-burger { display: none; }
	.quo-cta-bar { display: none !important; }
	.quo-entry { padding-block: var(--space-7) 0; }
}

@media (max-width: 899px) {
	.quo-hd-act .quo-lang { display: none; }
	.quo-cta-bar { display: block; }
}

@media (max-width: 782px) {
	.admin-bar .quo-hd { top: 0; }
}

@media (max-width: 600px) {
	/* Tighten the gate's vertical rhythm on a phone. This is not cosmetic:
	   it lifts the confirm button roughly 60px up the fold, which is what
	   keeps it clear of the consent notice pinned at the bottom. */
	.quo-gate { border-radius: var(--r-s); padding-inline: var(--space-4); padding-block: var(--space-5); }
	.quo-gate-card { gap: var(--space-3); }
	.quo-gate-badge { width: 76px; height: 76px; }
	.quo-gate-badge-txt { font-size: 1.3rem; }
	.quo-entry .wp-block-quote { padding: var(--space-5) var(--space-4) var(--space-5) var(--space-6); }
	.quo-ft-in { flex-direction: column; align-items: flex-start; }
	.quo-top { inset-block-end: calc(var(--space-8) + var(--space-5)); }
}

/* Short phones, where the gate and the consent notice compete for the fold.
   Static rather than JS-driven so nothing jumps when the notice appears. */
@media (max-width: 600px) and (max-height: 740px) {
	.quo-gate { padding-block: var(--space-3); }
	.quo-gate-badge { width: 64px; height: 64px; }
	.quo-gate-badge-txt { font-size: 1.15rem; }
	.quo-gate-q { font-size: 1.28rem; line-height: 1.24; }
	.quo-gate-note { font-size: .84rem; line-height: 1.5; }
	.quo-entry > .quo-kicker { margin-block: var(--space-3) var(--space-4); }
	.quo-entry { padding-block: var(--space-4) 0; }
	.quo-cookie[data-compact="1"] .quo-cookie-txt { font-size: .7rem; line-height: 1.36; }
}

@media (max-width: 400px) {
	.quo-brand-txt { font-size: 1rem; max-width: 8.6em; }
	.quo-hd-in { gap: var(--space-2); }
	.quo-ico-btn { width: 40px; height: 40px; flex: 0 0 40px; }
	.quo-gate-go { padding-inline: var(--space-5); width: 100%; }
}

/* ---------- 14. Motion preferences ------------------------------ */

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

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

	.quo-gate-ring { transform: rotate(28deg); }
	.quo-veil { opacity: 1; transform: none; }
}
