/*
 * The shell — sticker header, full-screen sheet, footer (ADR-0035).
 *
 * Replaces the Rail and the olive top bar of variant F. Every colour comes from tokens.css.
 */

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

.dcv-rail, .dcv-topbar, .dcv-account-corner { display: none !important; }

/* ---------- Header ---------- */
.stk-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: var(--dcv-canvas);
	border-bottom: 1px solid var(--stk-edge);
}
.admin-bar .stk-header { top: var(--wp-admin--admin-bar--height, 32px); }
.stk-header__in {
	max-width: var(--dcv-canvas-max);
	margin: 0 auto;
	padding: 0.6rem var(--dcv-gutter);
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: var(--dcv-topbar-height);
}
.stk-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	color: var(--dcv-ink);
	text-decoration: none;
	flex: none;
}
.stk-brand__logo {
	width: auto;
	height: 2.9rem;
	transition: transform var(--dcv-duration) var(--stk-ease-snap);
}
.stk-brand:hover .stk-brand__logo,
.stk-brand:focus-visible .stk-brand__logo { transform: rotate(-10deg) scale(1.08); }
.stk-brand__word {
	font: 400 clamp(1.25rem, 1rem + 1vw, 1.7rem)/1 var(--dcv-font-display);
	letter-spacing: 0.02em;
	text-transform: uppercase;
	padding-top: 0.2em;
}

.stk-tabs { display: none; margin-left: auto; }
.stk-tabs ul { display: flex; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.stk-tab {
	display: block;
	font: 700 0.875rem/1 var(--dcv-font-ui);
	color: var(--dcv-ink);
	text-decoration: none;
	padding: 0.6rem 0.8rem;
	border: 2px solid var(--dcv-ink);
	border-radius: 999px;
	background: var(--stk-sticker);
	white-space: nowrap;
	transition: transform var(--dcv-duration) var(--stk-ease-pop), background-color var(--dcv-duration-fast);
}
.stk-tab:hover,
.stk-tab:focus-visible { transform: translateY(-3px) rotate(-2deg); background: var(--stk-hub); color: var(--stk-on-accent); }
.stk-tab[aria-current="page"] { background: var(--dcv-ink); color: var(--dcv-canvas); }
@media (min-width: 72rem) {
	.stk-tabs { display: block; }
	.stk-tabs li:nth-child(n+6) { display: none; }
}
@media (min-width: 100rem) {
	.stk-tabs li:nth-child(n+6) { display: list-item; }
}

.stk-tools { display: flex; align-items: center; gap: 0.45rem; margin-left: auto; }
.stk-tabs + .stk-tools { margin-left: 0.6rem; }
.stk-round {
	display: inline-grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid var(--stk-edge);
	border-radius: 14px;
	background: var(--stk-sticker);
	color: var(--dcv-ink);
	box-shadow: var(--stk-soft);
	cursor: pointer;
	text-decoration: none;
	transition: transform var(--dcv-duration-fast) var(--stk-ease-pop), box-shadow var(--dcv-duration-fast);
}
.stk-round img { width: 1.7rem; height: 1.7rem; object-fit: contain; }
.stk-round:hover { transform: translate(-2px, -2px) rotate(-4deg); box-shadow: var(--stk-soft); }
.stk-round:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--stk-shadow); }
.stk-round[aria-pressed="true"] { background: var(--stk-bocage); }
.dcv-theme-toggle.stk-round .stk-theme__sun { display: none; }
.dcv-theme-toggle.stk-round[aria-pressed="true"] .stk-theme__moon { display: none; }
.dcv-theme-toggle.stk-round[aria-pressed="true"] .stk-theme__sun { display: block; }
@media (max-width: 30rem) {
	.stk-brand__word { font-size: 1.1rem; }
	.stk-brand__logo { height: 2.4rem; }
	.stk-tools { gap: 0.3rem; }
	.stk-round { width: 2.5rem; height: 2.5rem; border-radius: 12px; }
	.stk-round img { width: 1.5rem; height: 1.5rem; }
	.stk-header .dcv-theme-toggle { display: none; }
}

/* Reading progress: a bar under the header, with Marin walking on it. */
.stk-progress { position: absolute; left: 0; right: 0; bottom: calc(-1 * var(--stk-line) - 4px); height: 4px; pointer-events: none; }
.stk-progress__bar {
	position: absolute; inset: 0;
	background: var(--stk-ocre);
	transform-origin: left center;
	transform: scaleX(var(--dcv-progress, 0));
}
.stk-progress__marin {
	position: absolute;
	bottom: 2px;
	left: 0;
	width: auto;
	height: 2.6rem;
	transform: translateX(calc(var(--dcv-progress, 0) * (100vw - 2.6rem)));
}

/* ---------- Sheet (full-screen menu) ---------- */
.dcv-sheet {
	position: fixed;
	inset: 0;
	z-index: 60;
	display: none;
	flex-direction: column;
	gap: 1rem;
	overflow-y: auto;
	padding: 1rem var(--dcv-gutter) 2rem;
	background: var(--dcv-canvas);
	color: var(--dcv-ink);
}
.dcv-sheet[data-open="true"], .dcv-sheet:target { display: flex; }
.dcv-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.dcv-sheet__close { font: 700 1.1rem/1 var(--dcv-font-ui); }
.stk-sheet__marin { position: absolute; right: var(--dcv-gutter); top: 4.5rem; width: auto; height: 7rem; pointer-events: none; }
.dcv-sheet__foot { display: flex; gap: 0.75rem; align-items: center; }

/* The information architecture, as a sheet of stickers. */
.dcv-ia { display: grid; gap: 1rem; }
.dcv-ia__title { font: 400 1.6rem/1 var(--dcv-font-display); margin: 0.5rem 0 0; color: var(--dcv-ink); letter-spacing: 0.02em; }
.dcv-ia__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 0.9rem; margin: 0; padding: 0; list-style: none; }
.dcv-ia__link {
	display: grid;
	grid-template-columns: 3rem 1fr auto;
	align-items: center;
	gap: 0.75rem;
	padding: 0.8rem 0.9rem;
	color: var(--dcv-ink);
	text-decoration: none;
	background: var(--stk-sticker);
	border: 1px solid var(--stk-edge);
	border-radius: 18px;
	box-shadow: var(--stk-soft);
	transition: transform var(--dcv-duration) var(--stk-ease-pop), box-shadow var(--dcv-duration), background-color var(--dcv-duration-fast);
}
.dcv-ia__item:nth-child(odd) .dcv-ia__link:hover { transform: translate(-2px, -3px) rotate(-1.5deg); }
.dcv-ia__item:nth-child(even) .dcv-ia__link:hover { transform: translate(-2px, -3px) rotate(1.5deg); }
.dcv-ia__link:hover, .dcv-ia__link:focus-visible { box-shadow: var(--stk-soft); background: color-mix(in srgb, var(--stk-hub) 30%, var(--stk-sticker)); }
.dcv-ia__link[aria-current="page"] { background: var(--stk-hub); color: var(--stk-on-accent); }
.dcv-ia__mark { width: 3rem; height: 3rem; object-fit: contain; }
.dcv-ia__lines { display: grid; gap: 0.15rem; min-width: 0; }
.dcv-ia__intent { font: 400 1.15rem/1.05 var(--dcv-font-display); letter-spacing: 0.01em; padding-top: 0.15em; }
.dcv-ia__detail { font-size: var(--dcv-text-sm); color: var(--dcv-muted); }
.dcv-ia__link[aria-current="page"] .dcv-ia__detail { color: inherit; }
.dcv-ia__count { font: 700 0.8rem/1 var(--dcv-font-ui); padding: 0.35rem 0.5rem; border-radius: 999px; border: 2px solid currentColor; font-variant-numeric: tabular-nums; }
.dcv-ia__search {
	display: inline-flex; align-items: center; gap: 0.6rem; justify-self: start;
	font: 400 1.2rem/1 var(--dcv-font-display); color: var(--stk-on-accent); text-decoration: none;
	padding: 0.85rem 1.2rem 0.7rem; border-radius: 16px; border: 1px solid var(--stk-edge);
	background: var(--stk-ocre); box-shadow: var(--stk-soft);
}
.dcv-ia__search .dcv-mark { width: 1.8rem; height: 1.8rem; }

/* ---------- Footer ---------- */
.dcv-footer {
	margin-top: var(--dcv-space-section);
	background: var(--dcv-olive);
	color: var(--dcv-on-olive);
	border-top: 1px solid var(--stk-edge);
	padding-block: 3rem 1.5rem;
	position: relative;
}
.dcv-footer a { color: var(--dcv-on-olive); }
.dcv-footer__inner { display: grid; gap: 2rem; grid-template-columns: 1fr; position: relative; }
@media (min-width: 48rem) { .dcv-footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 72rem) {
	.dcv-footer__inner { grid-template-columns: 1.3fr 1fr 1fr 1fr 1.6fr; }
}
.dcv-footer__identity { display: grid; gap: 0.6rem; align-content: start; }
.dcv-footer__compass { width: 4rem; height: auto; }
.dcv-footer__wordmark { margin: 0; font: 400 1.9rem/1 var(--dcv-font-display); color: var(--stk-citron, #FFE27A); letter-spacing: 0.02em; }
.dcv-footer__line { margin: 0; color: var(--dcv-on-olive-muted); font-size: var(--dcv-text-sm); max-width: 28ch; }
.dcv-footer__title { margin: 0 0 0.75rem; font: 400 1.15rem/1 var(--dcv-font-display); color: #FFD24D; letter-spacing: 0.04em; text-transform: none; }
.dcv-footer__list { display: grid; gap: 0.45rem; margin: 0; padding: 0; list-style: none; font-size: var(--dcv-text-sm); }
.dcv-footer__list a { text-decoration: none; }
.dcv-footer__list a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: #FFD24D; }
.stk-footer__marin { position: absolute; right: 0; top: -6.2rem; height: 6rem; width: auto; display: none; }
@media (min-width: 72rem) { .stk-footer__marin { display: block; } }
.dcv-footer__colophon-row {
	display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
	margin-top: 2rem; padding-top: 1rem; border-top: 2px dashed var(--dcv-on-olive-line);
	font-size: var(--dcv-text-xs); color: var(--dcv-on-olive-muted);
}
.dcv-footer__colophon { margin: 0; }

/* ---------- Account menu (Community), retinted for the paper header ---------- */
.dcv-account-menu { position: relative; color: var(--dcv-ink); font-family: var(--dcv-font-ui); }

/*
 * The member's portrait, at the one size a control this small can carry it.
 * The initial stands in until a portrait is chosen — a silhouette says nothing
 * a letter does not say better, and it is the same plate the account page and
 * the discussion use.
 */
.dcv-account-menu__face {
	width: 1.5rem;
	height: 1.5rem;
	flex: none;
	border-radius: 50%;
	background: var(--dcv-olive-deep);
	object-fit: cover;
}

.dcv-account-menu__face--initial {
	display: grid;
	place-items: center;
	color: var(--dcv-cat-glow);
	font-family: var(--dcv-font-display);
	font-size: 0.8125rem;
	line-height: 1;
	user-select: none;
}

.dcv-account-menu__identity .dcv-account-menu__face {
	display: inline-grid;
	vertical-align: -0.35em;
	margin-inline-end: 0.35em;
}

/*
 * ON A PHONE THE PORTRAIT REPLACES THE NAME, IT DOES NOT JOIN IT.
 *
 * The Topbar carries the wordmark, this control and « Menu » on one line, and
 * at 360px that line was already 29px wider than the viewport before a face
 * was added to it — measured, not estimated. A 24-character handle is the one
 * thing on the row that can go, because the portrait says the same thing and
 * the panel below states the handle in full the moment the control is opened.
 *
 * The name stays in the accessible tree rather than being removed: the control
 * has to keep announcing WHOSE account it opens.
 */
@media (max-width: 34rem) {
	.dcv-topbar .dcv-account-menu__name {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.dcv-topbar .dcv-account-menu__trigger { padding-inline: var(--dcv-space-2xs); }
}
.dcv-account-menu summary { list-style: none; }
.dcv-account-menu summary::-webkit-details-marker { display: none; }

.dcv-account-menu__trigger {
	display: flex;
	min-height: 44px;
	align-items: center;
	gap: var(--dcv-space-2xs);
	padding: var(--dcv-space-2xs) var(--dcv-space-xs);
	border: 1px solid var(--dcv-on-olive-line);
	border-radius: var(--dcv-radius);
	background: var(--dcv-olive);
	color: var(--dcv-on-olive);
	cursor: pointer;
	font-size: var(--dcv-text-sm);
	font-weight: 700;
	transition: border-color var(--dcv-duration-fast) var(--dcv-ease), background-color var(--dcv-duration-fast) var(--dcv-ease), color var(--dcv-duration-fast) var(--dcv-ease);
}

.dcv-account-menu__trigger:hover,
.dcv-account-menu__trigger:focus-visible,
.dcv-account-menu[open] .dcv-account-menu__trigger {
	border-color: var(--dcv-cat-glow);
	background: var(--dcv-olive-raised);
	color: var(--dcv-cat-glow);
}

.dcv-account-menu__chevron {
	width: 0.45rem;
	height: 0.45rem;
	border-right: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	transform: translateY(-0.12rem) rotate(45deg);
	transition: transform var(--dcv-duration-fast) var(--dcv-ease);
}

.dcv-account-menu[open] .dcv-account-menu__chevron { transform: translateY(0.1rem) rotate(225deg); }

.dcv-account-menu__panel {
	position: absolute;
	inset: calc(100% + var(--dcv-space-2xs)) 0 auto auto;
	z-index: 50;
	width: min(18rem, calc(100vw - 2 * var(--dcv-gutter)));
	padding: var(--dcv-space-xs);
	border: 1px solid var(--dcv-line-strong);
	border-radius: var(--dcv-radius);
	background: var(--dcv-canvas);
	color: var(--dcv-ink);
}

.dcv-account-menu__identity {
	margin: 0;
	padding: var(--dcv-space-xs);
	border-bottom: 1px solid var(--dcv-line-strong);
	color: var(--dcv-cat-ink);
	font-size: var(--dcv-text-sm);
	font-weight: 750;
}

.dcv-account-menu__panel nav { display: grid; }
.dcv-account-menu__panel a {
	display: flex;
	min-height: 44px;
	align-items: center;
	padding-inline: var(--dcv-space-xs);
	border-radius: var(--dcv-radius);
	color: var(--dcv-ink);
	font-size: var(--dcv-text-sm);
	font-weight: 600;
	text-decoration: none;
	transition: background-color var(--dcv-duration-fast) var(--dcv-ease), color var(--dcv-duration-fast) var(--dcv-ease);
}

.dcv-account-menu__panel a:hover,
.dcv-account-menu__panel a:focus-visible { background: var(--dcv-cat-wash); color: var(--dcv-cat-ink); }
.dcv-account-menu__logout { margin-top: var(--dcv-space-2xs); border-top: 1px solid var(--dcv-line); }


/* Sticker skin for the account trigger. */
.stk-header .dcv-account-menu__trigger {
	min-height: 2.75rem;
	white-space: nowrap;
	border: 1px solid var(--stk-edge);
	border-radius: 14px;
	background: var(--stk-sticker);
	color: var(--dcv-ink);
	box-shadow: var(--stk-soft);
}
.stk-header .dcv-account-menu__trigger:hover,
.stk-header .dcv-account-menu__trigger:focus-visible,
.stk-header .dcv-account-menu[open] .dcv-account-menu__trigger { background: var(--stk-citron); color: var(--stk-on-accent); border-color: var(--dcv-ink); }
@media (max-width: 40rem) { .stk-header .dcv-account-menu__trigger span:not(.dcv-account-menu__face) { display: none; } .stk-header .dcv-account-menu:not(:has(.dcv-account-menu__face)) { display: none; } }
.stk-round[hidden] { display: none; }
