/* ==========================================================================
   pages/settings.css: /settings. Scoped under .pg-settings / .st-*.
   ========================================================================== */

.pg-settings .st-head { margin-bottom: var(--s-6); }
.pg-settings .st-head .page-title { margin-top: var(--s-2); }

.st-who { display: flex; align-items: center; gap: var(--s-4); }
.st-who-main { flex: 1; min-width: 0; }
.st-who-name { font: 800 var(--fs-lg)/1.2 var(--font-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-who-status { margin-top: 4px; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.4; }
.st-who.is-mode .st-who-status { color: var(--text); }

.st-sec { margin-top: var(--s-8); }
.st-sec > .section-title { margin: 0 0 var(--s-3); }
.st-hint { margin: var(--s-2) 0 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.45; }
.st-hint.is-bad, .st-msg.is-bad { color: var(--bad); }
.st-msg { margin: 0 0 var(--s-3); color: var(--text-2); font-size: var(--fs-sm); }
.st-msg:empty { display: none; }

.st-name { display: flex; gap: var(--s-2); }
.st-name .input { flex: 1; min-width: 0; }
.st-name .btn { flex: 0 0 auto; min-height: 50px; padding: 0 22px; }

.st-method { padding: var(--s-5) 0; border-top: 1px solid var(--border); }
.st-method:first-of-type { border-top: 0; padding-top: 0; }
.st-method-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.st-h3 { margin: 0; font: 700 var(--fs-md)/1.2 var(--font-ui); color: var(--text); }
.st-method-head .btn .i { width: 16px; height: 16px; }
.st-on { display: inline-flex; align-items: center; gap: 6px; color: var(--good); font: 600 var(--fs-sm)/1 var(--font-ui); }
.st-on .i { width: 16px; height: 16px; }
.st-keys { margin-top: var(--s-3); }
.st-key { min-height: 60px; }
.st-key-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); color: var(--mode-primary); flex: 0 0 36px; }
.st-key-icon .i { width: 18px; height: 18px; }
.st-key .lr-meta { letter-spacing: .08em; }
.st-key .btn-quiet.is-danger { color: var(--bad); font-weight: 700; }
.st-warn { margin-top: 4px; color: var(--bad); font-size: var(--fs-xs); }
.st-gsi { margin-top: var(--s-3); min-height: 44px; }
.st-code { margin-top: var(--s-3); }
.st-code-val {
  margin-top: var(--s-2); font: 700 26px/1.2 var(--font-label); letter-spacing: .14em; color: var(--text);
  user-select: all; -webkit-user-select: all; word-break: break-all;
}

.st-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.st-row .section-title { margin: 0; }
.st-switch {
  position: relative; flex: 0 0 56px; width: 56px; height: 32px; padding: 0; cursor: pointer;
  border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface-2);
  transition: background-color var(--t-med, .2s), border-color var(--t-med, .2s);
}
.st-switch .st-knob {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--text-2); transition: transform var(--t-med, .2s), background-color var(--t-med, .2s);
}
.st-switch[aria-checked="true"] { background: var(--mode-tint); border-color: var(--mode-primary); }
.st-switch[aria-checked="true"] .st-knob { transform: translateX(24px); background: var(--mode-primary); }

.st-out { margin-top: var(--s-3); }
.st-foot { margin-top: var(--s-8); }
.st-foot a { color: var(--mode-primary); font-weight: 600; text-decoration: none; }
.st-foot a:hover { text-decoration: underline; }

@media (max-width: 520px) {
  .st-who { flex-wrap: wrap; }
  .st-who .btn { width: 100%; justify-content: center; }
  .st-method-head .btn { width: 100%; justify-content: center; }
}
