/* Wise Members public portal. Scoped to .wm-portal so themes stay untouched.
   --wm-brand comes from the community's brand colour when it has one.
   Type and colours follow the WiseMembers portal (Inter, stone greys). */

/* Inter, bundled (SIL Open Font License, see fonts/OFL.txt): no request to Google. */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("fonts/inter-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;
}

.wm-portal {
	--wm-brand: #15803d;
	--wm-brand-ink: #ffffff;
	--wm-ink: #1c1917;
	--wm-muted: #78716c;
	--wm-line: #e7e5e4;
	--wm-line-strong: #d6d3d1;
	--wm-bg-soft: #f5f5f4;
	--wm-canvas: #fafaf7;
	--wm-card: #ffffff;
	--wm-accent-soft: color-mix(in srgb, var(--wm-brand) 9%, var(--wm-card));
	/* Customisable in Wise Members > Appearance (see Appearance::css()). */
	--wm-button: var(--wm-brand);
	--wm-button-ink: var(--wm-brand-ink);
	--wm-button-radius: 8px;
	--wm-button-radius-lg: 12px;
	--wm-round: 1;
	--wm-radius: calc(14px * var(--wm-round));
	--wm-shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 12px 32px -24px rgba(28, 25, 23, 0.25);
	--wm-success-bg: #e9f8ee;
	--wm-success-ink: #166534;
	--wm-warn-bg: #fdf6e3;
	--wm-warn-ink: #7a5a00;
	--wm-error-bg: #fdecec;
	--wm-error-ink: #9f1d1d;
	color: var(--wm-ink);
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	max-width: 1120px;
	margin: 0 auto;
}

/* Wider than a theme's reading column. Block themes widen .alignwide
   themselves; this covers classic themes with a narrow content area. */
.wm-portal.alignwide {
	width: min(1120px, calc(100vw - 2rem));
	max-width: none;
	margin-left: 50% !important;
	margin-right: 0 !important;
	transform: translateX(-50%);
}

.wm-portal *,
.wm-portal *::before,
.wm-portal *::after {
	box-sizing: border-box;
}

.wm-portal h1,
.wm-portal h2,
.wm-portal h3,
.wm-portal h4 {
	color: var(--wm-ink);
	font-family: inherit;
	margin: 0;
	line-height: 1.25;
}

.wm-portal a {
	color: var(--wm-brand);
}

/* Focus rings for keyboard users only. Themes often draw an outline on any
   :focus, which shows up after a mouse click (and gets clipped into two bars
   inside the scrolling tab bar); :focus-visible keeps it for the keyboard. */
.wm-portal :focus:not(:focus-visible) {
	outline: none;
}

.wm-portal a:focus-visible,
.wm-portal button:focus-visible,
.wm-portal summary:focus-visible,
.wm-portal [tabindex]:focus-visible {
	outline: 2px solid var(--wm-brand);
	outline-offset: 2px;
}

/* Inside the tab bar the ring sits within the tab, so the scroll area can't clip it. */
.wm-portal .wm-tab:focus-visible {
	outline-offset: -4px;
	border-radius: 6px;
}

/* ---------- Layout ---------- */

.wm-card {
	background: var(--wm-card);
	border: 1px solid var(--wm-line);
	border-radius: var(--wm-radius);
	box-shadow: var(--wm-shadow);
	padding: 1.5rem;
	margin-bottom: 1.25rem;
}

.wm-card h3 {
	font-size: 1.05rem;
	font-weight: 600;
	margin-bottom: 1rem;
}

.wm-card-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
}

.wm-card-head a {
	font-weight: 600;
	text-decoration: none;
}

.wm-narrow {
	max-width: 560px;
}

/* ---------- Forms ---------- */

.wm-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin: 0 0 1rem;
}

.wm-label {
	font-weight: 600;
	font-size: 0.95rem;
}

.wm-req {
	color: var(--wm-error-ink);
}

.wm-portal .wm-input {
	width: 100%;
	min-height: 44px;
	padding: 0.55rem 0.8rem;
	border: 1px solid var(--wm-line-strong);
	border-radius: calc(8px * var(--wm-round));
	background: var(--wm-card);
	color: var(--wm-ink);
	font: inherit;
	box-shadow: none;
}

.wm-portal .wm-input:focus {
	outline: 2px solid var(--wm-brand);
	outline-offset: 1px;
	border-color: var(--wm-brand);
}

.wm-portal .wm-input:disabled {
	background: var(--wm-bg-soft);
	color: var(--wm-muted);
}

.wm-portal textarea.wm-input {
	min-height: 0;
}

.wm-code {
	letter-spacing: 0.35em;
	font-size: 1.2rem;
	text-align: center;
}

.wm-grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 1rem;
}

.wm-span-2 {
	grid-column: 1 / -1;
}

.wm-error {
	color: var(--wm-error-ink);
	font-size: 0.85rem;
	font-weight: 600;
}

.wm-check {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	margin-bottom: 1rem;
}

/* A join form tick box ("I agree"): the label sits beside it. */
.wm-join-custom .wm-check {
	align-items: flex-start;
	margin: 0;
}

.wm-join-custom .wm-check input {
	margin-top: 0.2rem;
}

.wm-check-strong > span {
	font-weight: 600;
	font-size: 0.95rem;
}

.wm-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.wm-actions {
	display: flex;
	gap: 0.75rem;
	justify-content: center;
	margin-top: 1.25rem;
}

.wm-actions-end {
	justify-content: flex-end;
}

.wm-inline {
	display: inline;
	margin: 0;
}

/* ---------- Buttons ---------- */

.wm-portal .wm-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 44px;
	padding: 0.6rem 1.4rem;
	border: 1px solid var(--wm-button);
	border-radius: var(--wm-button-radius);
	background: var(--wm-button);
	color: var(--wm-button-ink);
	font: inherit;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-decoration: none;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.15s ease;
}

.wm-portal .wm-button:hover {
	filter: brightness(0.92);
}

.wm-portal .wm-button:active {
	transform: translateY(1px);
}

.wm-portal .wm-button:focus-visible {
	outline: 2px solid var(--wm-ink);
	outline-offset: 2px;
}

.wm-portal .wm-button-ghost {
	background: transparent;
	color: var(--wm-ink);
	border-color: var(--wm-line-strong);
}

.wm-portal .wm-button-block {
	width: 100%;
}

.wm-portal .wm-button-sm {
	min-height: 36px;
	padding: 0.35rem 0.9rem;
	font-size: 0.9rem;
}

.wm-portal .wm-link {
	background: none;
	border: 0;
	padding: 0;
	color: var(--wm-brand);
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.wm-chip {
	border: 1px solid var(--wm-line-strong);
	background: var(--wm-card);
	border-radius: calc(999px * var(--wm-round));
	padding: 0.35rem 1rem;
	font: inherit;
	cursor: pointer;
}

.wm-chip.is-active,
.wm-chip:hover {
	border-color: var(--wm-brand);
	color: var(--wm-brand);
}

.wm-amounts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

/* ---------- Join / sign in ----------
   A welcome header, then one surface split in two: "Become a member" (levels
   as selectable cards) and "Already a member?" on a softly tinted panel. */

.wm-gate {
	max-width: 1040px;
	margin: 0 auto;
}

.wm-gate-head {
	max-width: 640px;
	margin: 0 auto 32px;
	text-align: center;
}

.wm-gate-logo {
	display: block;
	width: 56px;
	height: 56px;
	margin: 0 auto 14px;
	padding: 4px;
	border: 1px solid var(--wm-line);
	border-radius: calc(14px * var(--wm-round));
	background: #fff;
	object-fit: contain;
	box-shadow: var(--wm-shadow);
}

.wm-gate-head .wm-eyebrow {
	margin-bottom: 8px;
}

.wm-portal .wm-gate-title {
	font-size: clamp(1.75rem, 3.6vw, 2.5rem);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.03em;
}

.wm-gate-lede {
	max-width: 520px;
	margin: 12px auto 0;
	color: var(--wm-muted);
	font-size: 1.02rem;
	line-height: 1.6;
}

.wm-gate-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	overflow: hidden;
	border: 1px solid var(--wm-line);
	border-radius: calc(20px * var(--wm-round));
	background: var(--wm-card);
	box-shadow: 0 1px 2px rgba(28, 25, 23, 0.05), 0 30px 60px -36px rgba(28, 25, 23, 0.35);
}

.wm-gate-panel {
	display: flex;
	flex-direction: column;
	gap: 22px;
	min-width: 0;
	padding: 36px 40px 40px;
}

.wm-gate-signin {
	border-left: 1px solid var(--wm-line);
	background: linear-gradient(180deg, var(--wm-accent-soft), var(--wm-canvas) 60%);
}

/* [wisemembers_join] / [wisemembers_login] on their own. */
.wm-gate-single .wm-gate-panel {
	max-width: 560px;
	margin: 0 auto;
	border: 1px solid var(--wm-line);
	border-radius: calc(20px * var(--wm-round));
	background: var(--wm-card);
	box-shadow: var(--wm-shadow);
}

.wm-gate-panel-head {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.wm-gate-icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: calc(12px * var(--wm-round));
	background: var(--wm-accent-soft);
	color: var(--wm-brand);
}

.wm-gate-signin .wm-gate-icon {
	background: var(--wm-card);
	box-shadow: 0 0 0 1px var(--wm-line);
}

.wm-gate-icon::before {
	content: "";
	width: 22px;
	height: 22px;
	background-color: currentColor;
	-webkit-mask: var(--wm-i) center / contain no-repeat;
	mask: var(--wm-i) center / contain no-repeat;
}

.wm-gate-icon-join {
	--wm-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M19 8v6M22 11h-6'/%3E%3C/svg%3E");
}

.wm-gate-icon-user {
	--wm-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3Cpath d='m10 17 5-5-5-5'/%3E%3Cpath d='M15 12H3'/%3E%3C/svg%3E");
}

.wm-portal .wm-gate-panel-title {
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.015em;
}

.wm-gate-panel-sub {
	margin: 4px 0 0;
	color: var(--wm-muted);
	font-size: 0.92rem;
}

.wm-gate-empty {
	margin: 0;
	color: var(--wm-muted);
}

/* Membership levels as selectable cards */
.wm-join-pick {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.wm-levels {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.wm-level {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid var(--wm-line-strong);
	border-radius: calc(12px * var(--wm-round));
	background: var(--wm-card);
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.wm-level:hover {
	border-color: var(--wm-brand);
}

.wm-level:has(input:checked) {
	border-color: var(--wm-brand);
	background: var(--wm-accent-soft);
	box-shadow: inset 0 0 0 1px var(--wm-brand);
}

.wm-level:has(input:focus-visible) {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wm-brand) 18%, transparent), inset 0 0 0 1px var(--wm-brand);
}

.wm-level input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--wm-brand);
}

.wm-level-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.wm-level-name {
	color: var(--wm-ink);
	font-size: 0.98rem;
	font-weight: 600;
}

/* Long descriptions stay to two lines until the level is chosen. */
.wm-level-desc {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	color: var(--wm-muted);
	font-size: 0.84rem;
	line-height: 1.5;
}

.wm-level:has(input:checked) .wm-level-desc {
	-webkit-line-clamp: 8;
}

.wm-level-note {
	align-self: flex-start;
	margin-top: 4px;
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--wm-warn-bg);
	color: var(--wm-warn-ink);
	font-size: 0.72rem;
	font-weight: 600;
}

.wm-level-price {
	display: flex;
	flex: none;
	flex-direction: column;
	align-items: flex-end;
	text-align: right;
}

.wm-level-price strong {
	color: var(--wm-ink);
	font-size: 0.98rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.wm-level-price span {
	color: var(--wm-muted);
	font-size: 0.75rem;
}

.wm-level-price.is-free strong {
	padding: 1px 10px;
	border-radius: 999px;
	background: var(--wm-success-bg);
	color: var(--wm-success-ink);
	font-size: 0.8rem;
}

.wm-portal .wm-join-continue {
	min-height: 50px;
	border-radius: var(--wm-button-radius-lg);
	font-size: 1rem;
}

.wm-gate-fine {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 0;
	color: var(--wm-muted);
	font-size: 0.8rem;
	text-align: center;
}

/* ---------- Documents tab ----------
   Like Documents in the WiseMembers portal: search + category chips, a
   heading per category, and a card per document — a file-type tile, title,
   meta and description on the left, its files in one column on the right. */

.wm-docs-t-pdf { --wm-doc-type: #dc2626; }
.wm-docs-t-doc { --wm-doc-type: #2563eb; }
.wm-docs-t-sheet { --wm-doc-type: #16a34a; }
.wm-docs-t-slides { --wm-doc-type: #ea580c; }
.wm-docs-t-image { --wm-doc-type: #7c3aed; }
.wm-docs-t-media { --wm-doc-type: #db2777; }
.wm-docs-t-archive { --wm-doc-type: #a16207; }
.wm-docs-t-other { --wm-doc-type: var(--wm-muted); }

.wm-docs svg {
	display: block;
	width: 100%;
	height: 100%;
}

.wm-docs-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	margin-bottom: 1.5rem;
}

.wm-docs-tools[hidden],
.wm-docs-group[hidden],
.wm-doc[hidden],
.wm-docs-none[hidden] {
	display: none;
}

.wm-docs-search {
	position: relative;
	flex: 0 1 320px;
	min-width: 220px;
}

.wm-docs-search > svg {
	position: absolute;
	top: 50%;
	left: 14px;
	width: 16px;
	height: 16px;
	color: var(--wm-muted);
	transform: translateY(-50%);
	pointer-events: none;
}

.wm-portal .wm-docs-search-input {
	min-height: 40px;
	padding-left: 38px;
	border-radius: 999px;
}

.wm-docs-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.wm-docs-search ~ .wm-docs-chips {
	flex: 1 1 100%;
	order: 1;
}

.wm-portal .wm-docs-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 8px 0 14px;
	border: 1px solid var(--wm-line-strong);
	border-radius: 999px;
	background: var(--wm-card);
	color: var(--wm-ink);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
}

.wm-portal .wm-docs-chip:hover {
	border-color: var(--wm-brand);
	color: var(--wm-brand);
}

.wm-portal .wm-docs-chip[aria-pressed="true"] {
	border-color: var(--wm-brand);
	background: var(--wm-brand);
	color: var(--wm-brand-ink);
}

.wm-docs-chip-count,
.wm-docs-count {
	display: inline-grid;
	place-items: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--wm-bg-soft);
	color: var(--wm-muted);
	font-size: 11px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.wm-docs-chip[aria-pressed="true"] .wm-docs-chip-count {
	background: color-mix(in srgb, var(--wm-brand-ink) 22%, transparent);
	color: var(--wm-brand-ink);
}

.wm-docs-status {
	margin: 0 0 0 auto;
	color: var(--wm-muted);
	font-size: 13px;
	white-space: nowrap;
}

.wm-docs-group {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.wm-docs-group + .wm-docs-group {
	margin-top: 1.75rem;
}

.wm-docs-group-head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.wm-docs-group-icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 9px;
	border-radius: calc(10px * var(--wm-round));
	background: var(--wm-accent-soft);
	color: var(--wm-brand);
}

.wm-docs-group-text {
	min-width: 0;
}

.wm-docs-group-row {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 36px;
}

.wm-portal .wm-docs-group-title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: -0.015em;
	overflow-wrap: anywhere;
}

.wm-docs-group-desc {
	max-width: 72ch;
	margin: 2px 0 0;
	color: var(--wm-muted);
	font-size: 0.9rem;
}

.wm-portal .wm-docs-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* One document: a header row (icon, title, New, summary · author, date,
   attachments) above a row per attachment (type, name, kind, size, actions). */
.wm-portal .wm-doc {
	margin: 0;
	overflow: hidden;
	border: 1px solid var(--wm-line);
	border-radius: var(--wm-radius);
	background: var(--wm-card);
	box-shadow: var(--wm-shadow);
}

.wm-doc-head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 20px;
}

.wm-doc-icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 9px;
	border-radius: calc(10px * var(--wm-round));
	background: var(--wm-accent-soft);
	color: var(--wm-brand);
}

.wm-doc-heading {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.wm-portal .wm-doc-title {
	flex: 0 1 auto;
	min-width: 0;
	margin: 0;
	overflow-wrap: anywhere;
	font-size: 1.02rem;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.01em;
}

.wm-doc-new {
	flex: none;
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--wm-accent-soft);
	color: var(--wm-brand);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.5;
}

.wm-doc-sep {
	flex: none;
	width: 1px;
	height: 20px;
	background: var(--wm-line-strong);
}

.wm-portal .wm-doc-summary {
	min-width: 0;
	margin: 0;
	overflow: hidden;
	color: var(--wm-muted);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wm-portal .wm-doc-meta {
	flex: none;
	margin: 0 0 0 auto;
	color: var(--wm-muted);
	font-size: 0.9rem;
	white-space: nowrap;
}

.wm-portal .wm-doc-desc {
	margin: -4px 0 0;
	padding: 0 20px 16px 70px;
	color: var(--wm-muted);
	font-size: 0.92rem;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.wm-portal .wm-doc-files {
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--wm-line);
	list-style: none;
}

.wm-portal .wm-doc-file {
	display: grid;
	grid-template-columns: 26px minmax(0, 1fr) minmax(120px, 190px) 72px 80px;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 10px 20px;
	transition: background-color 0.15s ease;
}

.wm-portal .wm-doc-file + .wm-doc-file {
	border-top: 1px solid var(--wm-line);
}

.wm-portal .wm-doc-file:hover {
	background: var(--wm-accent-soft);
}

/* File type: a small sheet with a folded corner and its extension. */
.wm-doc-ftype {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	width: 22px;
	height: 28px;
	padding-bottom: 4px;
	border-radius: 3px;
	background: color-mix(in srgb, var(--wm-doc-type) 15%, var(--wm-card));
	clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

.wm-doc-ftype::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 8px;
	height: 8px;
	border-bottom-left-radius: 2px;
	background: color-mix(in srgb, var(--wm-doc-type) 45%, var(--wm-card));
}

.wm-doc-ftype span {
	color: color-mix(in srgb, var(--wm-doc-type) 80%, #000);
	font-size: 6.5px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0.02em;
}

.wm-doc-ftype.wm-doc-ftype-link {
	align-items: center;
	width: 26px;
	height: 26px;
	padding: 5px;
	border-radius: 7px;
	background: #e3edfb;
	color: #2563eb;
	clip-path: none;
}

.wm-doc-ftype-link::before {
	display: none;
}

.wm-doc-fname {
	display: flex;
	align-items: baseline;
	gap: 10px;
	min-width: 0;
}

.wm-portal .wm-doc-fname a {
	overflow: hidden;
	color: var(--wm-ink);
	font-weight: 500;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wm-portal .wm-doc-file:hover .wm-doc-fname a,
.wm-portal .wm-doc-fname a:focus-visible {
	color: var(--wm-brand);
}

.wm-doc-fhost {
	flex: none;
	color: var(--wm-muted);
	font-size: 0.9rem;
}

.wm-doc-fkind {
	overflow: hidden;
	color: var(--wm-muted);
	font-size: 0.9rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wm-doc-fsize {
	color: var(--wm-muted);
	font-size: 0.9rem;
	font-variant-numeric: tabular-nums;
	text-align: right;
	white-space: nowrap;
}

.wm-doc-factions {
	display: flex;
	justify-content: flex-end;
	gap: 6px;
}

.wm-portal .wm-doc-act {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 8px;
	border: 1px solid transparent;
	border-radius: calc(8px * var(--wm-round));
	color: var(--wm-ink);
	opacity: 0.8;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.wm-portal .wm-doc-act:hover,
.wm-portal .wm-doc-act:focus-visible {
	border-color: var(--wm-brand);
	background: color-mix(in srgb, var(--wm-brand) 14%, var(--wm-card));
	color: var(--wm-brand);
	opacity: 1;
}

.wm-portal .wm-docs-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 2.5rem 1.5rem;
	text-align: center;
}

.wm-portal .wm-docs-empty h3 {
	margin: 0.25rem 0 0;
}

.wm-docs-empty p {
	margin: 0 0 0.5rem;
}

.wm-docs-empty-icon {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 12px;
	border-radius: 50%;
	background: var(--wm-accent-soft);
	color: var(--wm-brand);
}

@media (max-width: 820px) {
	.wm-doc-head {
		flex-wrap: wrap;
	}

	.wm-portal .wm-doc-meta {
		flex-basis: 100%;
		margin: -6px 0 0 50px;
		white-space: normal;
	}

	.wm-portal .wm-doc-file {
		grid-template-columns: 26px minmax(0, 1fr) 72px 80px;
	}

	.wm-doc-fkind {
		display: none;
	}
}

@media (max-width: 600px) {
	.wm-docs-search {
		flex: 1 1 100%;
	}

	.wm-docs-chips {
		flex: 1 1 100%;
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.wm-docs-status {
		order: 2;
		margin-left: 0;
	}

	.wm-doc-head,
	.wm-portal .wm-doc-file {
		padding-right: 14px;
		padding-left: 14px;
	}

	.wm-doc-heading {
		flex-wrap: wrap;
		row-gap: 4px;
	}

	.wm-doc-sep {
		display: none;
	}

	.wm-portal .wm-doc-summary {
		flex-basis: 100%;
		white-space: normal;
	}

	.wm-portal .wm-doc-desc {
		padding-left: 14px;
	}

	.wm-portal .wm-doc-file {
		grid-template-columns: 26px minmax(0, 1fr) auto;
		gap: 12px;
	}

	.wm-doc-fsize {
		display: none;
	}
}

/* ---------- Payment link (?wm_pay=) ---------- */

.wm-pay-head {
	text-align: center;
}

.wm-portal .wm-pay-title {
	margin: 0;
	font-size: 1.6rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.wm-pay-lede {
	margin: 0.5rem 0 0;
}

.wm-pay-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 18px 20px;
	border: 1.5px solid var(--wm-brand);
	border-radius: calc(12px * var(--wm-round));
	background: var(--wm-accent-soft);
}

.wm-pay-what {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.wm-pay-what strong {
	font-size: 1.05rem;
}

.wm-pay-price {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	text-align: right;
}

.wm-pay-price strong {
	font-size: 1.35rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.wm-pay-price span {
	color: var(--wm-muted);
	font-size: 0.8rem;
}

.wm-portal .wm-pay-points {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--wm-ink);
	font-size: 0.92rem;
}

.wm-pay-points li {
	position: relative;
	margin: 0;
	padding-left: 26px;
}

.wm-pay-points li::before {
	content: "";
	position: absolute;
	top: 0.2em;
	left: 0;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--wm-success-bg);
	box-shadow: inset 0 0 0 5px var(--wm-success-bg), inset 0 0 0 16px var(--wm-success-ink);
}

.wm-pay-form {
	margin: 0;
}

/* Sign in */
.wm-gate-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
}

.wm-gate-form .wm-field {
	margin: 0;
}

.wm-portal .wm-gate-form .wm-button {
	min-height: 48px;
}

.wm-gate-sent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid var(--wm-line);
	border-radius: calc(10px * var(--wm-round));
	background: var(--wm-card);
	font-size: 0.9rem;
}

.wm-gate-sent .wm-ficon {
	margin-top: 2px;
	color: var(--wm-brand);
}

.wm-gate-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin-top: -8px;
}

.wm-gate-links .wm-inline + .wm-inline::before {
	content: "·";
	margin: 0 0.5rem;
	color: var(--wm-muted);
}

.wm-gate-perks {
	display: grid;
	gap: 10px;
	margin: 4px 0 0;
	padding: 20px 0 0;
	border-top: 1px solid var(--wm-line);
	list-style: none;
}

.wm-gate-perks li {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	color: var(--wm-ink);
	font-size: 0.9rem;
}

.wm-gate-perks li::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background-color: var(--wm-brand);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wm-gate-help {
	margin: auto 0 0;
	padding-top: 8px;
	color: var(--wm-muted);
	font-size: 0.85rem;
}

.wm-portal .wm-gate-help a {
	font-weight: 600;
	text-decoration: none;
}

/* Signed out on the portal page: the welcome header replaces the theme's page title. */
body.wm-portal-gate .wp-block-post-title,
body.wm-portal-gate .entry-header .entry-title {
	display: none;
}

@media (max-width: 860px) {
	.wm-gate-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.wm-gate-signin {
		border-top: 1px solid var(--wm-line);
		border-left: 0;
	}

	.wm-gate-panel {
		padding: 28px 22px 30px;
	}

	.wm-gate-head {
		margin-bottom: 24px;
	}
}

/* ---------- Alerts ---------- */

.wm-alert {
	border-radius: calc(10px * var(--wm-round));
	padding: 0.85rem 1rem;
	margin: 0 0 1.25rem;
	border: 1px solid transparent;
}

.wm-alert-success {
	background: var(--wm-success-bg);
	color: var(--wm-success-ink);
	border-color: #bfe8cc;
}

.wm-alert-info {
	background: var(--wm-bg-soft);
	color: var(--wm-ink);
	border-color: var(--wm-line);
}

.wm-alert-error {
	background: var(--wm-error-bg);
	color: var(--wm-error-ink);
	border-color: #f3c4c4;
}

.wm-alert-big {
	padding: 1.1rem 1.25rem;
	font-size: 1.05rem;
}

.wm-muted {
	color: var(--wm-muted);
}

.wm-small {
	font-size: 0.875rem;
}

.wm-portal-setup {
	padding: 1rem;
	border: 1px dashed var(--wm-line-strong);
	border-radius: calc(8px * var(--wm-round));
}

/* ---------- Pop-up ---------- */

.wm-dialog {
	width: min(560px, calc(100vw - 2rem));
	max-height: calc(100vh - 2rem);
	padding: 0;
	border: 0;
	border-radius: calc(16px * var(--wm-round));
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
	color: var(--wm-ink);
}

.wm-dialog::backdrop {
	background: rgba(28, 25, 23, 0.55);
}

.wm-dialog:not([open]) {
	display: none;
}

.wm-dialog-head,
.wm-dialog-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.5rem;
}

.wm-dialog-head {
	border-bottom: 1px solid var(--wm-line);
}

.wm-dialog-head h3 {
	font-size: 1.2rem;
}

.wm-dialog-foot {
	justify-content: flex-end;
	border-top: 1px solid var(--wm-line);
	background: var(--wm-bg-soft);
}

/* Header and buttons stay put; only the fields scroll on short screens. */
.wm-dialog[open] > form {
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 2rem);
}

.wm-dialog-body {
	flex: 1 1 auto;
	min-height: 0;
	padding: 1.25rem 1.5rem 0.25rem;
	overflow: auto;
}

.wm-fieldset {
	margin: 0.25rem 0 1rem;
	padding: 1rem 1rem 0;
	border: 1px solid var(--wm-line);
	border-radius: calc(10px * var(--wm-round));
}

.wm-legend {
	padding: 0 0.4rem;
	font-weight: 600;
	font-size: 0.95rem;
}

.wm-label-light {
	font-weight: 500;
	color: var(--wm-muted);
}

.wm-dialog-close {
	background: none;
	border: 0;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	color: var(--wm-muted);
}

.wm-summary {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
	padding: 1rem;
	margin-bottom: 1.25rem;
	border-radius: calc(10px * var(--wm-round));
	background: var(--wm-bg-soft);
	border: 1px solid var(--wm-line);
}

.wm-summary p {
	margin: 0.25rem 0 0;
	font-size: 0.875rem;
}

.wm-summary-price {
	font-weight: 700;
	white-space: nowrap;
	color: var(--wm-brand);
}

.wm-portal.wm-js .wm-field-level {
	display: none;
}

.wm-note {
	font-size: 0.875rem;
	color: var(--wm-muted);
	margin: 0 0 1rem;
}

/* ---------- Member portal ---------- */

.wm-account {
	background: var(--wm-bg-soft);
	border: 1px solid var(--wm-line);
	border-radius: calc(18px * var(--wm-round));
	overflow: hidden;
	/* Clips the corners without becoming a scroll box, so sticky parts (the
	   profile summary and save bar) stick to the window. */
	overflow: clip;
}

.wm-account-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	padding: 1rem 1.5rem;
	background: var(--wm-card);
	border-bottom: 1px solid var(--wm-line);
}

.wm-brand {
	display: flex;
	align-items: center;
	gap: 0.85rem;
}

.wm-brand-logo {
	width: 48px;
	height: 48px;
	border-radius: calc(12px * var(--wm-round));
	border: 1px solid var(--wm-line);
	object-fit: contain;
	background: #fff;
}

.wm-brand-initial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1.3rem;
	color: var(--wm-brand);
}

.wm-brand-name {
	display: block;
	font-size: 1.05rem;
}

.wm-brand-sub {
	display: block;
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--wm-brand);
}

.wm-user {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.3rem 0.9rem 0.3rem 0.3rem;
	border: 1px solid var(--wm-line);
	border-radius: calc(999px * var(--wm-round));
}

.wm-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--wm-brand);
	color: var(--wm-brand-ink);
	font-weight: 700;
	font-size: 0.9rem;
	flex-shrink: 0;
	overflow: hidden;
}

.wm-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wm-user-email {
	font-size: 0.95rem;
}

.wm-tabs {
	display: flex;
	gap: 2rem;
	padding: 0 1.5rem;
	background: var(--wm-card);
	border-bottom: 1px solid var(--wm-line);
	overflow-x: auto;
}

.wm-portal .wm-tab {
	padding: 1rem 0 0.85rem;
	color: var(--wm-muted);
	text-decoration: none;
	font-weight: 500;
	border-bottom: 2px solid transparent;
	white-space: nowrap;
}

.wm-portal .wm-tab.is-active,
.wm-portal .wm-tab:hover {
	color: var(--wm-ink);
}

.wm-portal .wm-tab.is-active {
	border-bottom-color: var(--wm-ink);
}

.wm-account-body {
	padding: 2rem 1.5rem;
}

.wm-eyebrow {
	margin: 0 0 0.4rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wm-brand);
}

.wm-welcome {
	font-size: clamp(1.8rem, 3.5vw, 2.4rem);
	font-weight: 700;
	letter-spacing: -0.01em;
}

.wm-lead {
	margin: 0.5rem 0 2rem;
	font-size: 1.05rem;
}

.wm-section-title {
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 1.25rem !important;
}

.wm-home-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
	gap: 1.5rem;
	align-items: start;
}

.wm-mlist,
.wm-links,
.wm-options {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wm-mlist {
	border: 1px solid var(--wm-line);
	border-radius: calc(12px * var(--wm-round));
	margin-bottom: 1rem;
}

.wm-mlist > li {
	padding: 1rem;
}

.wm-mlist > li + li {
	border-top: 1px solid var(--wm-line);
}

.wm-mrow {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.wm-mrow-main {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.wm-mrow-main b {
	letter-spacing: 0.05em;
}

.wm-pay {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
	margin: 0.75rem 0 0;
}

.wm-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.2rem 0.7rem;
	border-radius: calc(999px * var(--wm-round));
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	background: var(--wm-bg-soft);
	color: var(--wm-muted);
	border: 1px solid var(--wm-line);
	white-space: nowrap;
}

.wm-badge::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
}

.wm-badge-active,
.wm-badge-expiring {
	background: var(--wm-success-bg);
	color: var(--wm-success-ink);
	border-color: #bfe8cc;
}

.wm-badge-awaiting_approval,
.wm-badge-awaiting_payment,
.wm-badge-pending,
.wm-badge-ending,
.wm-badge-payment_overdue {
	background: var(--wm-warn-bg);
	color: var(--wm-warn-ink);
	border-color: #f1dfa6;
}

.wm-links li + li {
	border-top: 1px solid var(--wm-line);
}

.wm-portal .wm-links a {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 0.85rem 0;
	color: var(--wm-ink);
	text-decoration: none;
	font-weight: 500;
}

.wm-links a:hover {
	color: var(--wm-brand);
}

.wm-chevron {
	margin-left: auto;
	color: var(--wm-muted);
	font-size: 1.3rem;
}

.wm-options li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 1rem 0;
}

.wm-options li + li {
	border-top: 1px solid var(--wm-line);
}

.wm-options p {
	margin: 0.25rem 0 0;
}

.wm-price {
	margin-left: 0.5rem;
	color: var(--wm-brand);
	font-weight: 600;
}

/* Line icons drawn with CSS, so the portal needs no icon font. */
.wm-icon {
	position: relative;
	display: inline-block;
	flex: none;
	width: 36px;
	height: 36px;
	border: 1px solid var(--wm-line);
	border-radius: calc(10px * var(--wm-round));
	background: var(--wm-card);
}

.wm-icon::before {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	border: 1.6px solid var(--wm-ink);
}

.wm-icon-card::before {
	width: 16px;
	height: 11px;
	border-radius: calc(2px * var(--wm-round));
	box-shadow: inset 0 3px 0 -1.6px var(--wm-ink);
}

.wm-icon-user::before {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	top: -8px;
}

.wm-icon-user::after {
	content: "";
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 9px;
	height: 7px;
	border: 1.6px solid var(--wm-ink);
	border-bottom: 0;
	border-radius: 8px 8px 0 0;
}

.wm-icon-list::before {
	width: 13px;
	height: 16px;
	border-radius: calc(2px * var(--wm-round));
}

.wm-icon-heart::before {
	content: "\2665";
	width: auto;
	height: auto;
	border: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 17px;
	line-height: 1;
	color: var(--wm-ink);
}

.wm-icon-tile {
	width: 48px;
	height: 48px;
	border: 0;
	background: var(--wm-success-bg);
}

.wm-icon-tile.wm-icon-card::before {
	border-color: var(--wm-success-ink);
	box-shadow: inset 0 3px 0 -1.6px var(--wm-success-ink);
}

/* ---------- Membership card ---------- */

.wm-card-intro {
	margin: -0.5rem 0 1.25rem;
}

.wm-card-item {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.wm-wallet-form {
	margin: 0;
}

/* Same look as the WiseMembers portal's Google Wallet button. */
.wm-portal .wm-gwallet {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 1.5rem 0 1.25rem;
	border: 0;
	border-radius: calc(999px * var(--wm-round));
	background-color: #1f1f1f;
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.01em;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.wm-portal .wm-gwallet:hover {
	background-color: #3c4043;
}

.wm-portal .wm-gwallet:active {
	transform: translateY(1px);
}

.wm-portal .wm-gwallet:focus-visible {
	outline: 2px solid var(--wm-ink);
	outline-offset: 2px;
}

.wm-gwallet-icon {
	flex-shrink: 0;
}

.wm-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 1.25rem;
}

.wm-member-card {
	position: relative;
	padding: 1.5rem;
	border-radius: calc(18px * var(--wm-round));
	color: var(--wm-brand-ink);
	background:
		radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, 0.22), transparent 55%),
		var(--wm-brand);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
	aspect-ratio: 1.586;
	display: flex;
	flex-direction: column;
}

.wm-member-card header {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.wm-card-logo {
	width: 34px;
	height: 34px;
	border-radius: calc(8px * var(--wm-round));
	background: #fff;
	object-fit: contain;
}

.wm-card-org {
	font-weight: 700;
	letter-spacing: 0.04em;
}

.wm-card-type {
	margin: auto 0 0;
	font-size: 0.8rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.85;
}

.wm-card-name {
	margin: 0.15rem 0 0.9rem;
	font-size: 1.35rem;
	font-weight: 700;
}

.wm-member-card dl {
	display: flex;
	gap: 1.5rem;
	margin: 0;
}

.wm-member-card dt {
	font-size: 0.68rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.8;
}

.wm-member-card dd {
	margin: 0;
	font-weight: 700;
	letter-spacing: 0.04em;
}

/* ---------- My profile ---------- */

.wm-profile {
	display: grid;
	grid-template-columns: 300px minmax(0, 1fr);
	gap: 1.5rem;
	align-items: start;
}

.wm-profile-summary {
	position: sticky;
	top: 24px;
	margin: 0;
	padding: 2rem 1.5rem 1.5rem;
	text-align: center;
}

.wm-photo {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.wm-photo-frame {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 112px;
	height: 112px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--wm-accent-soft);
	color: var(--wm-brand);
	font-size: 2.5rem;
	font-weight: 700;
	box-shadow: 0 0 0 4px var(--wm-card), 0 0 0 5px var(--wm-line);
}

label.wm-photo-frame {
	cursor: pointer;
}

.wm-photo-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wm-photo-img[hidden],
.wm-photo-initial[hidden],
.wm-photo-status[hidden] {
	display: none;
}

/* Out of sight but still reachable by keyboard; "Change photo" shows its focus. */
.wm-photo-input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.wm-portal .wm-photo-input:focus-visible + .wm-button {
	outline: 2px solid var(--wm-brand);
	outline-offset: 2px;
}

.wm-photo-status {
	margin: 0;
	color: var(--wm-success-ink);
	font-weight: 600;
}

.wm-profile-name {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.wm-profile-email {
	margin: 0.25rem 0 0;
	overflow-wrap: anywhere;
}

.wm-profile-facts {
	display: grid;
	gap: 0.6rem;
	margin: 1.25rem 0 0;
	padding-top: 1.25rem;
	border-top: 1px solid var(--wm-line);
	text-align: left;
}

.wm-profile-facts div {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

.wm-profile-facts dt {
	color: var(--wm-muted);
	font-size: 0.9rem;
}

.wm-profile-facts dd {
	margin: 0;
	font-weight: 600;
	text-align: right;
}

.wm-profile-pills {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
}

.wm-profile-pills li {
	margin: 0;
	padding: 0.3rem 0.8rem;
	border-radius: calc(999px * var(--wm-round));
	background: var(--wm-accent-soft);
	color: var(--wm-brand);
	font-size: 0.875rem;
	font-weight: 600;
}

.wm-photo-note {
	margin: 1.25rem 0 0;
}

.wm-portal .wm-profile-card {
	margin: 0;
	padding: 0 2rem;
}

.wm-profile-section {
	padding: 2rem 0 1rem;
}

.wm-profile-section + .wm-profile-section {
	border-top: 1px solid var(--wm-line);
}

.wm-profile-section-head {
	margin-bottom: 1.5rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--wm-line);
}

.wm-portal .wm-profile-section-head h3 {
	margin: 0 0 0.25rem;
	font-size: 1.1rem;
	font-weight: 600;
}

.wm-profile-section-head p {
	margin: 0;
}

.wm-profile .wm-grid-2 {
	gap: 0.25rem 1.25rem;
}

.wm-profile .wm-field {
	margin-bottom: 1.1rem;
}

/* "x.com/" before a handle, inside the same box. */
.wm-prefixed {
	display: flex;
	align-items: stretch;
	border: 1px solid var(--wm-line-strong);
	border-radius: calc(8px * var(--wm-round));
	background: var(--wm-card);
	overflow: hidden;
}

.wm-prefixed:focus-within {
	outline: 2px solid var(--wm-brand);
	outline-offset: 1px;
	border-color: var(--wm-brand);
}

.wm-prefix {
	display: flex;
	align-items: center;
	padding: 0 0.75rem;
	border-right: 1px solid var(--wm-line);
	background: var(--wm-bg-soft);
	color: var(--wm-muted);
	font-size: 0.9rem;
	white-space: nowrap;
}

.wm-portal .wm-prefixed .wm-input,
.wm-portal .wm-prefixed .wm-input:focus {
	min-width: 0;
	border: 0;
	border-radius: 0;
	outline: none;
}

.wm-save-bar {
	position: sticky;
	bottom: 16px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 1rem;
	padding: 0.9rem 1rem 0.9rem 1.5rem;
	border: 1px solid var(--wm-line);
	border-radius: var(--wm-radius);
	background: color-mix(in srgb, var(--wm-card) 88%, transparent);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	box-shadow: var(--wm-shadow);
}

.wm-save-bar p {
	margin: 0;
}

@media (max-width: 860px) {
	.wm-profile {
		grid-template-columns: minmax(0, 1fr);
	}

	.wm-profile-summary {
		position: static;
	}
}

/* ---------- Small screens ---------- */

@media (max-width: 782px) {
	.wm-portal .wm-profile-card {
		padding: 0 1.25rem;
	}

	.wm-save-bar {
		flex-direction: column;
		align-items: stretch;
		bottom: 8px;
		padding: 0.9rem 1rem;
		text-align: center;
	}

	.wm-home-grid,
	.wm-grid-2 {
		grid-template-columns: minmax(0, 1fr);
	}

	.wm-account-body {
		padding: 1.5rem 1rem;
	}

	/* A long email mustn't push "Sign out" onto two lines. */
	.wm-user {
		max-width: 100%;
	}

	.wm-user-email {
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.wm-user .wm-link {
		white-space: nowrap;
	}

	.wm-tabs {
		gap: 1.25rem;
		padding: 0 1rem;
	}

	.wm-options li {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media print {
	body * {
		visibility: hidden;
	}

	.wm-cards,
	.wm-cards * {
		visibility: visible;
	}

	.wm-cards {
		position: absolute;
		top: 0;
		left: 0;
	}

	.wm-cards .wm-wallet-form {
		display: none;
	}
}
