/* ═══════════════════════════════════════════════════════════════════════════
   Settings (#/profile-settings)

   Two columns: a sectioned card on the left (icon rail + rows), a stack of
   status cards on the right. Built from the Fey settings reference, on the same
   monochrome the landing page, the login and the connect screen now share —
   the coloured section chips are the one exception, and they are the reference's
   own device for telling the four sections apart at a glance.

   Palette tokens (--tm-*) come from terminal.css. This sheet only adds layout.
   ══════════════════════════════════════════════════════════════════════════ */

.st {
	box-sizing: border-box;
	min-height: 100%;
	padding: 26px 30px 40px;
	background: var(--tm-bg);
	color: var(--tm-ink);
}

.st ::selection {
	background: rgba(255, 255, 255, 0.2);
}

/* ── header ───────────────────────────────────────────────────────────────── */

.st-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 24px;
}

.st-head__title {
	margin: 0;
	font-size: 25px;
	font-weight: 700;
	letter-spacing: -0.03em;
	color: #fff;
}

.st-head__right {
	display: flex;
	align-items: center;
	gap: 10px;
}

.st-head__who {
	padding: 9px 14px;
	border: 1px solid var(--tm-line);
	border-radius: 999px;
	font-size: 13.5px;
	color: var(--tm-ink-3);
	max-width: 42vw;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ── grid ─────────────────────────────────────────────────────────────────── */

.st-grid {
	display: grid;
	gap: 18px;
	grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
	align-items: start;
}

@media (max-width: 980px) {
	.st-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.st-left {
	display: grid;
	gap: 30px;
	padding: 26px 26px 30px;
	border: 1px solid var(--tm-line);
	border-radius: 18px;
	background: var(--tm-panel);
}

.st-right {
	display: grid;
	gap: 18px;
}

/* ── section (icon rail + rows) ───────────────────────────────────────────── */

.st-sec {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

@media (max-width: 700px) {
	.st-sec {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}
}

.st-sec__rail {
	display: flex;
	align-items: center;
	gap: 11px;
	padding-top: 8px;
}

.st-sec__label {
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #fff;
}

/* The one place colour survives: four chips that make the sections findable
   without reading them. They are not status — nothing here is a market state. */
.st-chip {
	width: 30px;
	height: 30px;
	flex: none;
	border-radius: 9px;
	display: grid;
	place-items: center;
}

.st-chip--a {
	background: rgba(232, 168, 124, 0.16);
	color: #e8a87c;
}

.st-chip--b {
	background: rgba(150, 160, 235, 0.16);
	color: #96a0eb;
}

.st-chip--c {
	background: rgba(120, 200, 170, 0.15);
	color: #78c8aa;
}

/* ── rows ─────────────────────────────────────────────────────────────────── */

.st-panel {
	border: 1px solid var(--tm-line);
	border-radius: 13px;
	background: rgba(255, 255, 255, 0.018);
	overflow: hidden;
}

.st-row {
	display: flex;
	align-items: center;
	gap: 13px;
	width: 100%;
	padding: 14px 15px;
	border: 0;
	border-top: 1px solid var(--tm-line);
	background: none;
	color: var(--tm-ink);
	font-family: inherit;
	font-size: 14.5px;
	text-align: left;
}

.st-panel > .st-row:first-child {
	border-top: 0;
}

.st-row--link {
	cursor: pointer;
	transition: background 0.18s;
}

.st-row--link:hover {
	background: rgba(255, 255, 255, 0.04);
}

.st-row__ico {
	flex: none;
	color: var(--tm-ink-3);
}

.st-row__label {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
	letter-spacing: -0.01em;
}

.st-row__label--btn {
	cursor: pointer;
}

.st-row__hint {
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--tm-ink-4);
}

.st-row__go {
	flex: none;
	color: var(--tm-ink-4);
}

.st-row--link:hover .st-row__go {
	color: #fff;
}

.st-note {
	margin: 0;
	padding: 12px 15px 13px;
	border-top: 1px solid var(--tm-line);
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--tm-ink-4);
}

/* ── switch ───────────────────────────────────────────────────────────────── */

.st-switch {
	position: relative;
	flex: none;
	width: 42px;
	height: 24px;
}

.st-switch__input {
	position: absolute;
	inset: 0;
	margin: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.st-switch__track {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.11);
	transition: background 0.22s var(--tm-ease);
	pointer-events: none;
}

.st-switch__track::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 999px;
	background: #8b8e91;
	transition: transform 0.22s var(--tm-ease), background 0.22s var(--tm-ease);
}

.st-switch__input:checked + .st-switch__track {
	background: #fff;
}

.st-switch__input:checked + .st-switch__track::after {
	transform: translateX(18px);
	background: #000;
}

.st-switch__input:focus-visible + .st-switch__track {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

/* ── cards ────────────────────────────────────────────────────────────────── */

.st-card {
	padding: 20px 20px 22px;
	border: 1px solid var(--tm-line);
	border-radius: 16px;
	background: var(--tm-panel);
}

.st-card__head {
	display: flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 16px;
	font-size: 12.5px;
	letter-spacing: 0.02em;
	color: var(--tm-ink-3);
}

.st-card__ico {
	color: var(--tm-ink-4);
}

.st-card__big {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 19px;
	font-weight: 600;
	letter-spacing: -0.024em;
	color: #fff;
	text-wrap: balance;
}

.st-card__sub {
	margin: 9px 0 0;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--tm-ink-4);
}

.st-card__acts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid var(--tm-line);
}

.st-pill {
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.st-pill--on {
	background: rgba(62, 207, 142, 0.14);
	color: #3ecf8e;
}

.st-dot {
	width: 8px;
	height: 8px;
	flex: none;
	border-radius: 999px;
	background: var(--tm-ink-4);
}

.st-dot.is-on {
	background: #3ecf8e;
	box-shadow: 0 0 12px rgba(62, 207, 142, 0.55);
}

.st-dot.is-warn {
	background: #e8a87c;
}

.st-dot.is-off {
	background: #ff6b5e;
}

/* ── buttons ──────────────────────────────────────────────────────────────── */

.st-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	/* NOT --tm-line-2: in this scale that token is FAINTER than --tm-line, so a
	   button borrowed it and came out with no visible edge. */
	border: 1px solid rgba(255, 255, 255, 0.17);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
	color: #e8eaec;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 500;
	letter-spacing: -0.01em;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s, transform 0.2s var(--tm-ease);
}

.st-btn:hover {
	background: rgba(255, 255, 255, 0.09);
	border-color: rgba(255, 255, 255, 0.3);
	transform: translateY(-1px);
}

.st-btn--go {
	background: #fff;
	border-color: #fff;
	color: #000;
	font-weight: 600;
}

.st-btn--go:hover {
	background: #fff;
	border-color: #fff;
	box-shadow: 0 8px 30px rgba(255, 255, 255, 0.22);
}

.st-btn--out {
	padding: 9px 15px;
}

.st :where(button, a, input):focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
	border-radius: 999px;
}

/* ── the two preferences this page owns ───────────────────────────────────── */

/* "Hide the navigation dock" — the floating dock on Terminal and Legend. ⌘K
   still reaches every screen, which is why hiding it is safe to offer. */
html.sx-pref-nodock .tm-dock,
html.sx-pref-nodock .cn-dock,
html.sx-pref-nodock .cn-search {
	display: none;
}

/* "Reduce motion" — the same switch `prefers-reduced-motion` throws, made
   explicit for people whose OS setting says otherwise. */
html.sx-pref-still *,
html.sx-pref-still *::before,
html.sx-pref-still *::after {
	animation-duration: 0.001ms !important;
	animation-iteration-count: 1 !important;
	transition-duration: 0.001ms !important;
	scroll-behavior: auto !important;
}
