/**
 * Westphal Solutions: Metadata tool (ws-metadata)
 *
 * Owns everything under the `wsmeta` prefix. Reads only brand tokens from
 * main.css. Four slots: upload, controls, record, copy.
 *
 * The controls sit in a sticky right rail and the record sits beside them,
 * so a switch and the rows it governs are on screen at the same time. That
 * pairing is the whole layout. Anything that breaks it breaks the tool.
 */

.wsmeta {
	font-family: var(--ws-font);
	color: var(--ws-text);
	display: grid;
	gap: 16px;
}

/* A class with a display value outranks the browser rule for [hidden],
   and most of what this tool hides is flex. Without this the edit rail
   and the clean rail stack on top of each other. State it once. */
.wsmeta [hidden] { display: none !important; }

/* === Slots === */
/* Source order is upload, controls, record, copy, which is the mobile
   stack. Narrow screens use that order and nothing else, so grid-area
   stays inside the desktop query. Named areas with no template attached
   invent their own lines and drop every slot into one cell. */
@media (min-width: 901px) {
	.wsmeta {
		grid-template-columns: minmax(0, 1fr) 372px;
		grid-template-areas:
			"upload options"
			"detail options"
			"copy   copy";
		column-gap: 20px;
	}
	.wsmeta__slot--upload  { grid-area: upload; }
	.wsmeta__slot--options { grid-area: options; min-width: 0; }
	.wsmeta__slot--detail  { grid-area: detail; min-width: 0; }
	.wsmeta__slot--copy    { grid-area: copy; }

	/* Sticky goes on the rail, not on the slot. Sticking the slot itself
	   takes it out of row sizing, so a rail taller than the record spills
	   over the copy block underneath instead of pushing it down. */
	.wsmeta__rail {
		position: sticky;
		top: 20px;
	}
}

/* === Drop zone === */
/* One row. Choosing a file is a small act and does not earn a hero. */
.wsmeta__drop {
	display: flex;
	align-items: center;
	gap: 14px;
	height: 100%;
	padding: 16px 18px;
	border: 2px dashed var(--ws-border);
	border-radius: var(--ws-radius);
	background: var(--ws-surface);
	cursor: pointer;
	transition: border-color 0.2s var(--ws-ease), background-color 0.2s var(--ws-ease);
}
.wsmeta__drop:hover,
.wsmeta__drop:focus-visible,
.wsmeta__drop.is-drag {
	border-color: var(--ws-accent);
	outline: 0;
}
.wsmeta__drop.is-drag {
	background: color-mix(in srgb, var(--ws-accent) 8%, var(--ws-surface));
}
.wsmeta__drop-icon {
	flex: 0 0 auto;
	display: inline-flex;
	color: var(--ws-muted);
}
.wsmeta__drop-icon svg { width: 26px; height: 26px; }
.wsmeta__drop:hover .wsmeta__drop-icon,
.wsmeta__drop.is-drag .wsmeta__drop-icon { color: var(--ws-heading); }
.wsmeta__drop-txt { min-width: 0; }
.wsmeta__drop-title {
	display: block;
	font-size: 1rem;
	font-weight: 700;
	color: var(--ws-heading);
}
.wsmeta__browse {
	text-decoration: underline;
	text-decoration-color: var(--ws-accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.wsmeta__drop-hint {
	display: block;
	margin-top: 2px;
	font-size: 0.8rem;
	color: var(--ws-muted);
}

/* === File bar === */
.wsmeta__file {
	display: flex;
	align-items: center;
	gap: 14px;
	height: 100%;
	padding: 15px 18px;
	border: 1px solid var(--ws-border);
	border-left: 3px solid var(--ws-accent);
	border-radius: var(--ws-radius);
	background: var(--ws-surface);
}
.wsmeta__file-icon { flex: 0 0 auto; display: inline-flex; color: var(--ws-heading); }
.wsmeta__file-icon svg { width: 24px; height: 24px; }
.wsmeta__file-info {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
	flex: 1;
}
.wsmeta__file-name {
	font-weight: 700;
	font-size: 1rem;
	color: var(--ws-heading);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.wsmeta__file-meta {
	font-size: 0.76rem;
	color: var(--ws-muted);
	font-family: var(--ws-code);
}
.wsmeta__file-x {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius);
	background: transparent;
	color: var(--ws-muted);
	cursor: pointer;
	transition: border-color 0.2s var(--ws-ease), color 0.2s var(--ws-ease);
}
.wsmeta__file-x svg { width: 15px; height: 15px; }
.wsmeta__file-x:hover { border-color: var(--ws-error); color: var(--ws-error); }
.wsmeta__file-x:focus-visible { outline: 2px solid var(--ws-accent); outline-offset: 2px; }

/* === Status === */
.wsmeta__status {
	margin: 10px 0 0;
	font-size: 0.85rem;
	color: var(--ws-muted);
}
.wsmeta__status--error { color: var(--ws-error); font-weight: 700; }

/* === Rail === */
.wsmeta__rail { display: flex; flex-direction: column; gap: 12px; }
.wsmeta__railset { display: flex; flex-direction: column; gap: 12px; }
.wsmeta__railnote {
	margin: -2px 0 0;
	font-size: 0.78rem;
	color: var(--ws-muted);
}

/* Two modes, so a switch. Three would have been a tab strip. */
.wsmeta__seg {
	display: flex;
	gap: 3px;
	padding: 3px;
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius-pill);
	background: var(--ws-surface);
}
.wsmeta__seg[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.wsmeta__seg-btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 9px 12px;
	border: 0;
	border-radius: var(--ws-radius-pill);
	background: transparent;
	color: var(--ws-muted);
	font-family: var(--ws-font);
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s var(--ws-ease), color 0.2s var(--ws-ease);
}
.wsmeta__seg-btn svg { width: 15px; height: 15px; }
.wsmeta__seg-btn:hover { color: var(--ws-heading); }
.wsmeta__seg-btn[aria-selected="true"] { background: var(--ws-accent); color: var(--ws-black); }
.wsmeta__seg-btn:focus-visible { outline: 2px solid var(--ws-accent); outline-offset: 2px; }

/* === Drawer === */
/* Native details. Shut by default, because the common visit is drop the
   file and press the button. Every switch lives inside it. */
.wsmeta__drawer {
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius);
	background: var(--ws-surface);
}
.wsmeta__drawer-sum {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 13px 14px;
	list-style: none;
	cursor: pointer;
	transition: color 0.2s var(--ws-ease);
}
.wsmeta__drawer-sum::-webkit-details-marker { display: none; }
.wsmeta__drawer-sum:focus-visible { outline: 2px solid var(--ws-accent); outline-offset: -2px; }
.wsmeta__drawer-ico {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius);
	color: var(--ws-heading);
}
.wsmeta__drawer-ico svg { width: 15px; height: 15px; }
.wsmeta__drawer-hd { flex: 1; min-width: 0; }
.wsmeta__drawer-name {
	display: block;
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--ws-heading);
	line-height: 1.3;
}
.wsmeta__drawer-n {
	display: block;
	margin-top: 1px;
	font-size: 0.74rem;
	color: var(--ws-muted);
	font-variant-numeric: tabular-nums;
}

/* Chevron drawn in CSS. One less icon file to ship. */
.wsmeta__drawer-sum::after {
	content: '';
	flex: 0 0 auto;
	width: 7px;
	height: 7px;
	border-right: 2px solid var(--ws-muted);
	border-bottom: 2px solid var(--ws-muted);
	transform: rotate(45deg) translateY(-2px);
	transition: transform 0.2s var(--ws-ease);
}
.wsmeta__drawer[open] > .wsmeta__drawer-sum::after { transform: rotate(-135deg) translateY(-2px); }
.wsmeta__drawer[open] > .wsmeta__drawer-sum { border-bottom: 1px solid var(--ws-border); }
.wsmeta__drawer-body { padding: 12px; }
.wsmeta__drawer-note {
	margin: 12px 2px 0;
	font-size: 0.78rem;
	color: var(--ws-muted);
}

/* === Control groups === */
.wsmeta__group {
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius);
	overflow: hidden;
}
.wsmeta__group + .wsmeta__group { margin-top: 12px; }
.wsmeta__group--warn { border-style: dashed; }
.wsmeta__group-h {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 10px 14px;
	border-bottom: 1px solid var(--ws-border);
	font-size: 10.5px;
	font-weight: 900;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--ws-error);
}
.wsmeta__group-h svg { flex: 0 0 auto; width: 14px; height: 14px; }

/* === Control row === */
/* One row is one decision. Icon, name, count, switch. */
.wsmeta__row {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 12px 14px;
	border-bottom: 1px solid var(--ws-border);
	transition: background-color 0.15s var(--ws-ease), opacity 0.2s var(--ws-ease);
}
.wsmeta__row:last-child { border-bottom: 0; }
.wsmeta__row.is-hot { background: color-mix(in srgb, var(--ws-accent) 14%, transparent); }
.wsmeta__row.is-off .wsmeta__row-name,
.wsmeta__row.is-off .wsmeta__row-ico { opacity: 0.5; }
.wsmeta__row-ico {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius);
	color: var(--ws-heading);
}
.wsmeta__row-ico svg { width: 15px; height: 15px; }
.wsmeta__row-hd { flex: 1; min-width: 0; }
.wsmeta__row-name {
	display: block;
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--ws-heading);
	line-height: 1.3;
}
.wsmeta__row-n {
	display: block;
	margin-top: 1px;
	font-size: 0.74rem;
	color: var(--ws-muted);
	font-variant-numeric: tabular-nums;
}

/* === Switch === */
/* Reads as a state at a glance, which a checkbox does not. */
.wsmeta__sw {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	cursor: pointer;
}
.wsmeta__sw input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}
.wsmeta__sw-track {
	position: relative;
	width: 40px;
	height: 22px;
	border-radius: var(--ws-radius-pill);
	background: var(--ws-border);
	transition: background-color 0.2s var(--ws-ease);
}
.wsmeta__sw-knob {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--ws-white);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
	transition: transform 0.2s var(--ws-ease);
}
.wsmeta__sw input:checked + .wsmeta__sw-track { background: var(--ws-accent); }
.wsmeta__sw input:checked + .wsmeta__sw-track .wsmeta__sw-knob { transform: translateX(18px); }
.wsmeta__sw input:focus-visible + .wsmeta__sw-track {
	outline: 2px solid var(--ws-accent);
	outline-offset: 2px;
}
[data-theme="dark"] .wsmeta__sw-knob { background: var(--ws-charcoal); }

/* === Rail panels, edit mode === */
.wsmeta__panel {
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius);
	background: var(--ws-surface);
	overflow: hidden;
}
.wsmeta__panel-h {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 11px 14px;
	border-bottom: 1px solid var(--ws-border);
	font-size: 10.5px;
	font-weight: 900;
	letter-spacing: 1.8px;
	text-transform: uppercase;
	color: var(--ws-muted);
}

/* Same row shell, selectable instead of switchable. */
.wsmeta__pick {
	display: flex;
	align-items: center;
	gap: 11px;
	width: 100%;
	padding: 12px 14px;
	border: 0;
	border-bottom: 1px solid var(--ws-border);
	border-left: 3px solid transparent;
	background: transparent;
	text-align: left;
	cursor: pointer;
	font-family: var(--ws-font);
	transition: background-color 0.15s var(--ws-ease), border-color 0.15s var(--ws-ease);
}
.wsmeta__pick:last-child { border-bottom: 0; }
.wsmeta__pick:hover { background: color-mix(in srgb, var(--ws-accent) 10%, transparent); }
.wsmeta__pick[aria-current="true"] { border-left-color: var(--ws-accent); }
.wsmeta__pick:focus-visible { outline: 2px solid var(--ws-accent); outline-offset: -2px; }
.wsmeta__pick-now {
	display: block;
	margin-top: 1px;
	font-size: 0.74rem;
	color: var(--ws-muted);
	font-family: var(--ws-code);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wsmeta__opt {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 12px 14px;
	border-bottom: 1px solid var(--ws-border);
	font-size: 0.84rem;
	cursor: pointer;
}
.wsmeta__opt:last-child { border-bottom: 0; }
.wsmeta__opt input { margin: 3px 0 0; flex-shrink: 0; accent-color: var(--ws-slate); }
.wsmeta__opt-body { display: flex; flex-direction: column; gap: 2px; }
.wsmeta__opt-name { font-weight: 700; color: var(--ws-heading); }
.wsmeta__opt-why { font-size: 0.76rem; color: var(--ws-muted); }

/* === Buttons. Same spec as the site small button. === */
.wsmeta__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 13px 20px;
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius);
	background: transparent;
	color: var(--ws-heading);
	font-family: var(--ws-font);
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 2px;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s var(--ws-ease), color 0.2s var(--ws-ease), border-color 0.2s var(--ws-ease);
}
.wsmeta__btn svg { width: 16px; height: 16px; }
.wsmeta__btn--primary {
	border-color: var(--ws-accent);
	background: var(--ws-accent);
	color: var(--ws-black);
}
.wsmeta__btn--primary:hover {
	background: var(--ws-heading);
	border-color: var(--ws-heading);
	color: var(--ws-bg);
}
.wsmeta__btn--ghost:hover { border-color: var(--ws-heading); }
.wsmeta__btn--block { width: 100%; }
.wsmeta__btn--sm { padding: 7px 12px; font-size: 11px; letter-spacing: 1.2px; }
.wsmeta__btn:focus-visible { outline: 2px solid var(--ws-accent); outline-offset: 2px; }
.wsmeta__btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.wsmeta__btn--primary[disabled]:hover {
	background: var(--ws-accent);
	border-color: var(--ws-accent);
	color: var(--ws-black);
}

/* === Record === */
.wsmeta__detail {
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius);
	background: var(--ws-surface);
	overflow: hidden;
}

.wsmeta__blank {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 280px;
	padding: 40px 24px;
	text-align: center;
}
.wsmeta__blank-ico { display: inline-flex; color: var(--ws-border); }
.wsmeta__blank-ico svg { width: 30px; height: 30px; }
.wsmeta__blank p {
	margin: 0;
	max-width: 38ch;
	font-size: 0.88rem;
	color: var(--ws-muted);
}

/* The answer, in numerals, before any control is read. */
.wsmeta__verdict {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	border-bottom: 1px solid var(--ws-border);
}
.wsmeta__vcell { padding: 16px 18px; border-left: 1px solid var(--ws-border); }
.wsmeta__vcell:first-child { border-left: 0; }
.wsmeta__vnum {
	display: block;
	font-size: 2.2rem;
	font-weight: 900;
	line-height: 1;
	color: var(--ws-heading);
	font-variant-numeric: tabular-nums;
}
.wsmeta__vcell--removed .wsmeta__vnum { color: var(--ws-error); }
.wsmeta__vlab {
	display: block;
	margin-top: 5px;
	font-size: 0.68rem;
	font-weight: 900;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: var(--ws-muted);
}

.wsmeta__dhead {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding: 16px 18px 0;
}
.wsmeta__dh {
	margin: 0;
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--ws-heading);
}
.wsmeta__dnote { font-size: 0.8rem; color: var(--ws-muted); }
.wsmeta__body { padding: 14px 18px 18px; }

/* === Record groups === */
/* One group per control row, drawn from the same bucket key. */
.wsmeta__grp {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--ws-border);
	transition: background-color 0.15s var(--ws-ease), box-shadow 0.15s var(--ws-ease);
}
.wsmeta__grp:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.wsmeta__grp.is-hot {
	background: color-mix(in srgb, var(--ws-accent) 12%, transparent);
	box-shadow: 0 0 0 8px color-mix(in srgb, var(--ws-accent) 12%, transparent);
}
.wsmeta__grp-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.wsmeta__grp-head svg { flex: 0 0 auto; width: 14px; height: 14px; color: var(--ws-muted); }
.wsmeta__grp-name {
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--ws-heading);
}
.wsmeta__grp-state {
	margin-left: auto;
	font-size: 0.7rem;
	font-weight: 900;
	letter-spacing: 1.1px;
	text-transform: uppercase;
	color: var(--ws-muted);
}

/* Table scrolls on narrow screens rather than crushing the value column. */
.wsmeta__scroll { overflow-x: auto; }
.wsmeta__table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.wsmeta__table td {
	padding: 7px 14px 7px 0;
	border-bottom: 1px solid var(--ws-border);
	vertical-align: top;
}
.wsmeta__table tr:last-child td { border-bottom: 0; }
.wsmeta__k {
	width: 1%;
	font-weight: 700;
	color: var(--ws-heading);
	white-space: nowrap;
}
.wsmeta__v {
	font-family: var(--ws-code);
	font-size: 0.76rem;
	word-break: break-word;
	min-width: 12ch;
}
.wsmeta__v--gone {
	color: var(--ws-muted);
	text-decoration: line-through;
	text-decoration-color: var(--ws-error);
}
.wsmeta__v--empty {
	color: var(--ws-grey);
	font-style: italic;
	text-decoration: none;
}
.wsmeta__res { width: 1%; padding-right: 0; white-space: nowrap; text-align: right; }
.wsmeta__tag {
	display: inline-block;
	padding: 2px 7px;
	border-radius: var(--ws-radius-sm);
	font-family: var(--ws-font);
	font-size: 0.64rem;
	font-weight: 900;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.wsmeta__tag--removed { background: var(--ws-error); color: var(--ws-white); }
.wsmeta__tag--replaced { background: var(--ws-slate); color: var(--ws-white); }
.wsmeta__tag--kept { background: var(--ws-border); color: var(--ws-heading); }
.wsmeta__after {
	display: block;
	margin-top: 3px;
	font-family: var(--ws-code);
	font-size: 0.72rem;
	color: var(--ws-muted);
	text-align: right;
}
.wsmeta__none { margin: 0; font-size: 0.86rem; color: var(--ws-muted); }

/* === Saved banner === */
/* Sits above the record. The layout does not move, so nothing jumps. */
.wsmeta__saved {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 18px;
	border-bottom: 1px solid var(--ws-border);
	background: color-mix(in srgb, var(--ws-accent) 16%, transparent);
}
.wsmeta__saved-ico {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--ws-accent);
	color: var(--ws-black);
}
.wsmeta__saved-ico svg { width: 19px; height: 19px; }
.wsmeta__saved-h {
	display: block;
	font-size: 1rem;
	font-weight: 900;
	color: var(--ws-heading);
}
.wsmeta__saved-sub {
	display: block;
	margin-top: 1px;
	font-size: 0.78rem;
	color: var(--ws-muted);
	font-family: var(--ws-code);
}

/* === Editor === */
.wsmeta__field + .wsmeta__field,
.wsmeta__field + .wsmeta__grid2,
.wsmeta__grid2 + .wsmeta__field,
.wsmeta__grid2 + .wsmeta__grid2 { margin-top: 16px; }
.wsmeta__grid2 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px 20px;
}
.wsmeta__flabel {
	display: block;
	margin-bottom: 6px;
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--ws-heading);
}
.wsmeta__flabel-why {
	display: block;
	margin-top: 2px;
	font-size: 0.76rem;
	font-weight: 400;
	color: var(--ws-muted);
}
.wsmeta__input {
	width: 100%;
	padding: 9px 10px;
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius);
	background: var(--ws-bg);
	color: var(--ws-text);
	font-family: var(--ws-font);
	font-size: 0.9rem;
}
.wsmeta__input:focus-visible {
	outline: 0;
	border-color: var(--ws-accent);
	box-shadow: 0 0 0 1px var(--ws-accent);
}
.wsmeta__textarea { resize: vertical; line-height: 1.5; }

/* Field plus its action button. min-width 0 or the input refuses to
   shrink and pushes the button off the row. */
.wsmeta__inline { display: flex; gap: 8px; align-items: stretch; }
.wsmeta__inline .wsmeta__input { min-width: 0; }

/* Author rows: name, sort name, remove. */
.wsmeta__author {
	display: grid;
	grid-template-columns: 1fr 1fr 34px;
	gap: 8px;
	margin-bottom: 8px;
}
.wsmeta__rowbtn {
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius);
	background: transparent;
	color: var(--ws-muted);
	font-size: 1.05rem;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.2s var(--ws-ease), color 0.2s var(--ws-ease);
}
.wsmeta__rowbtn:hover { border-color: var(--ws-error); color: var(--ws-error); }
.wsmeta__rowbtn:focus-visible { outline: 2px solid var(--ws-accent); outline-offset: 2px; }

/* === Cover === */
.wsmeta__cover { display: flex; gap: 18px; align-items: flex-start; }
.wsmeta__cover-frame {
	flex: 0 0 116px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 116px;
	min-height: 168px;
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius-sm);
	background: var(--ws-bg);
	overflow: hidden;
}
.wsmeta__cover-img { display: block; width: 100%; height: auto; }
.wsmeta__cover-none { font-size: 0.74rem; color: var(--ws-grey); font-family: var(--ws-code); }
.wsmeta__cover-side { flex: 1; min-width: 0; }
.wsmeta__cover-meta {
	margin: 0 0 12px;
	font-family: var(--ws-code);
	font-size: 0.76rem;
	color: var(--ws-muted);
	word-break: break-word;
}
.wsmeta__cover-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.wsmeta__hint {
	margin: 12px 0 0;
	max-width: 56ch;
	font-size: 0.78rem;
	color: var(--ws-muted);
}

/* === Copy === */
/* Server rendered and always present. The record above is assembled by
   JavaScript, so this block is what a crawler actually reads. */
.wsmeta__copy { padding-top: 10px; border-top: 1px solid var(--ws-border); }
.wsmeta__copy-h {
	margin: 22px 0 0;
	font-size: 1.35rem;
	font-weight: 900;
	color: var(--ws-heading);
}
.wsmeta__copy-lede {
	margin: 10px 0 0;
	max-width: 74ch;
	font-size: 0.95rem;
	color: var(--ws-muted);
}
.wsmeta__cols {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 0 40px;
	margin-top: 8px;
}
.wsmeta__ref-sub {
	display: inline-block;
	margin: 28px 0 0;
	padding-bottom: 8px;
	border-bottom: 3px solid var(--ws-accent);
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ws-heading);
}
.wsmeta__ref-note {
	margin: 14px 0 0;
	max-width: 70ch;
	font-size: 0.88rem;
	color: var(--ws-muted);
}
.wsmeta__ref-list { margin: 14px 0 0; }
.wsmeta__ref-k {
	padding: 11px 0 0;
	border-top: 1px solid var(--ws-border);
	font-size: 0.86rem;
	font-weight: 700;
	color: var(--ws-heading);
}
.wsmeta__ref-v {
	margin: 0;
	padding: 2px 0 12px;
	font-size: 0.86rem;
	color: var(--ws-muted);
}
.wsmeta__ref-list > .wsmeta__ref-k:first-child { border-top: 0; padding-top: 0; }

/* === Mobile === */
@media (max-width: 900px) {
	.wsmeta__vnum { font-size: 1.7rem; }
	.wsmeta__vcell { padding: 13px 12px; }
	.wsmeta__btn { width: 100%; }
	.wsmeta__btn--sm { width: auto; }
	.wsmeta__author { grid-template-columns: 1fr 34px; }
	.wsmeta__author > .wsmeta__input:first-child { grid-column: 1 / -1; }
	.wsmeta__cover { flex-direction: column; }
	.wsmeta__cover-frame { flex: none; }
	.wsmeta__drop { flex-wrap: wrap; }
}

@media (max-width: 480px) {
	.wsmeta__verdict { grid-template-columns: 1fr; }
	.wsmeta__vcell { border-left: 0; border-top: 1px solid var(--ws-border); }
	.wsmeta__vcell:first-child { border-top: 0; }
	.wsmeta__cover-btns .wsmeta__btn--sm { width: 100%; }
}

/* Motion is decoration here. Nothing depends on it. */
@media (prefers-reduced-motion: reduce) {
	.wsmeta__sw-knob,
	.wsmeta__sw-track,
	.wsmeta__drawer-sum::after,
	.wsmeta__row,
	.wsmeta__grp { transition: none; }
}
