/* My Account */

.ma-card,
.ma-panel {
	background: var(--paper, #fff);
	border: 1px solid var(--line, #e6e9f0);
	border-radius: var(--radius, 14px);
	padding: 22px;
}

.ma-auth {
	max-width: 440px;
	margin: 0 auto 20px;
}

.ma-auth__title {
	font-family: var(--display, system-ui, sans-serif);
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 4px;
}

.ma-auth__lead {
	color: var(--muted, #4a5060);
	font-size: 14px;
	margin: 0 0 16px;
}

/* Forms */

.ma-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ma-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.ma-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--ink, #131b2e);
}

.ma-field input,
.ma-field textarea {
	font: inherit;
	font-size: 15px;
	padding: 10px 13px;
	border: 1px solid var(--line-strong, #d3d8e3);
	border-radius: 9px;
	background: var(--paper, #fff);
	color: var(--ink, #131b2e);
	width: 100%;
	box-sizing: border-box;
}

.ma-field input:focus,
.ma-field textarea:focus {
	outline: none;
	border-color: var(--accent, #3458fa);
	box-shadow: 0 0 0 3px rgba(52, 88, 250, 0.14);
}

.ma-field input:disabled {
	background: var(--paper-2, #f6f8fb);
	color: var(--muted, #4a5060);
}

.ma-hint {
	font-size: 12px;
	color: var(--muted, #4a5060);
}

.ma-check {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.ma-fieldset {
	border: 1px solid var(--line, #e6e9f0);
	border-radius: 10px;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
}

.ma-fieldset legend {
	font-size: 13px;
	font-weight: 600;
	padding: 0 6px;
}

/* The honeypot: present for robots, gone for everyone else. */
.ma-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Buttons */

.ma-button {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	padding: 10px 18px;
	border-radius: 999px;
	border: 1px solid var(--line-strong, #d3d8e3);
	background: var(--paper, #fff);
	color: var(--ink, #131b2e);
	cursor: pointer;
	text-decoration: none;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.ma-button:hover {
	border-color: var(--accent, #3458fa);
	color: var(--accent, #3458fa);
}

.ma-button--primary {
	background: var(--accent, #3458fa);
	border-color: var(--accent, #3458fa);
	color: #fff;
}

.ma-button--primary:hover {
	background: var(--accent-hover, #2b49e0);
	color: #fff;
}

.ma-button--quiet {
	border-color: transparent;
	color: var(--muted, #4a5060);
}

.ma-actions {
	display: flex;
	gap: 8px;
	margin: 12px 0 0;
}

/* Notices */

.ma-notice {
	border-radius: 10px;
	padding: 10px 14px;
	font-size: 14px;
	margin: 0 0 14px;
}

.ma-notice--error {
	background: #fdecea;
	color: #8a2a25;
}

.ma-notice--success {
	background: #edf7ed;
	color: #2c6e2f;
}

/* Dashboard */

/* Not prose, so it should not inherit a prose measure from whatever it was
   dropped into. */
.ma-account,
.ma-signed-out {
	max-width: none;
	width: 100%;
}

.ma-account__head {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}

.ma-account__name {
	font-family: var(--display, system-ui, sans-serif);
	font-size: 22px;
	font-weight: 700;
	margin: 0;
}

.ma-account__since {
	font-size: 13px;
	color: var(--muted, #4a5060);
	margin: 2px 0 0;
}

.ma-account__out {
	margin-left: auto;
}

.ma-tabs {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	border-bottom: 1px solid var(--line, #e6e9f0);
	margin-bottom: 18px;
}

.ma-tab {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 10px 15px;
	font-size: 14px;
	font-weight: 600;
	color: var(--muted, #4a5060);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.ma-tab:hover {
	color: var(--ink, #131b2e);
}

.ma-tab.is-active {
	color: var(--accent, #3458fa);
	border-bottom-color: var(--accent, #3458fa);
}

.ma-tab__count {
	font-family: var(--mono, ui-monospace, monospace);
	font-size: 11px;
	background: var(--paper-2, #f6f8fb);
	border-radius: 999px;
	padding: 1px 8px;
}

/* Avatars */

.ma-avatar {
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	overflow: hidden;
	object-fit: cover;
	vertical-align: middle;
}

.ma-avatar--initial {
	color: #fff;
	font-family: var(--display, system-ui, sans-serif);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.02em;
}

.ma-avatar-row {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	flex-wrap: wrap;
}

.ma-form--avatar {
	padding-bottom: 20px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--line, #e6e9f0);
}

/* Stats */

.ma-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 10px;
}

.ma-stat {
	background: var(--paper-2, #f6f8fb);
	border-radius: 12px;
	padding: 16px 18px;
}

.ma-stat__value {
	font-family: var(--display, system-ui, sans-serif);
	font-size: 26px;
	font-weight: 700;
	margin: 0;
	line-height: 1.1;
}

.ma-stat__label {
	font-size: 12.5px;
	color: var(--muted, #4a5060);
	margin: 3px 0 0;
}

/* Lists */

.ma-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ma-list__item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 0;
	border-bottom: 1px solid var(--line, #e6e9f0);
}

.ma-list__item:last-child {
	border-bottom: 0;
}

.ma-list__thumb img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 9px;
	display: block;
}

.ma-list__text {
	flex: 1 1 auto;
	min-width: 0;
}

.ma-list__title {
	font-weight: 600;
	font-size: 15px;
	color: var(--ink, #131b2e);
	text-decoration: none;
	display: block;
}

.ma-list__title:hover {
	color: var(--accent, #3458fa);
}

.ma-list__meta {
	font-size: 12.5px;
	color: var(--muted, #4a5060);
	margin: 3px 0 0;
}

.ma-empty {
	color: var(--muted, #4a5060);
	font-size: 14.5px;
	margin: 0;
	text-align: center;
	padding: 26px 0;
}

/* Save button */

.ma-save-wrap {
	margin: 22px 0;
}

.ma-save {
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	padding: 9px 16px;
	border-radius: 999px;
	border: 1px solid var(--line-strong, #d3d8e3);
	background: var(--paper, #fff);
	color: var(--ink, #131b2e);
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.ma-save:hover {
	border-color: var(--data, #ec4899);
	color: var(--data, #ec4899);
}

.ma-save.is-saved {
	border-color: var(--data, #ec4899);
	color: var(--data, #ec4899);
	background: var(--data-soft, #fce7f3);
}

.ma-save.is-error {
	border-color: #c0392b;
	color: #c0392b;
}

.ma-save[disabled] {
	opacity: 0.6;
	cursor: default;
}

/* A bookmark, drawn rather than loaded. */
.ma-save-icon {
	width: 11px;
	height: 14px;
	border: 2px solid currentColor;
	border-bottom: 0;
	border-radius: 2px 2px 0 0;
	position: relative;
}

.ma-save-icon::after {
	content: "";
	position: absolute;
	left: -2px;
	right: -2px;
	bottom: -6px;
	height: 6px;
	background: linear-gradient(to bottom right, transparent 49%, currentColor 50%) left / 50% 100% no-repeat,
		linear-gradient(to bottom left, transparent 49%, currentColor 50%) right / 50% 100% no-repeat;
}

.ma-save.is-saved .ma-save-icon {
	background: currentColor;
}

.ma-comment-prompt {
	margin: 14px 0;
}

@media (max-width: 600px) {
	.ma-account__out {
		margin-left: 0;
		width: 100%;
	}

	.ma-list__thumb img {
		width: 52px;
		height: 52px;
	}
}

/* Header account control */

.ma-nav-group {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.ma-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var(--line, #e6e9f0);
	background: var(--paper, #fff);
	color: var(--ink-2, #4a5060);
	cursor: pointer;
	padding: 0;
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.ma-nav:hover,
.ma-nav:focus-visible {
	border-color: var(--accent, #3458fa);
	color: var(--accent, #3458fa);
}

/* Signed in, the avatar is the button. */
.ma-nav--in {
	padding: 0;
	overflow: hidden;
}

.ma-nav--in .ma-avatar {
	width: 100%;
	height: 100%;
	font-size: 15px;
}

.ma-nav-out {
	margin: 0;
	display: inline-flex;
}

.ma-icon {
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

@media (max-width: 560px) {
	.ma-nav--exit {
		display: none;
	}
}
