/* /account — builds on portal.css (tokens, nav, .wrap, .btn, .pill, footer). */

.acct-head { padding-top: 48px; max-width: 1100px; }
.acct-head h1 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; overflow-wrap: anywhere; }
.acct-lede { color: #c3cfcb; max-width: 56ch; font-size: clamp(16px, 1.8vw, 18px); }
.acct-stack { max-width: 1100px; display: grid; gap: 20px; padding-top: 32px; }

.card { background: linear-gradient(180deg, #0c151c, #08101a); border: 1px solid var(--line); border-radius: 20px;
  padding: 26px 28px; scroll-margin-top: 84px; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 16px; }
.card h2 { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.15; font-weight: 800; }
.card h2 small { font-size: 14px; font-weight: 700; color: var(--muted); margin-left: 4px; }
.card-lede { color: var(--muted); font-size: 15px; margin: -6px 0 16px; max-width: 64ch; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn.small { min-height: 38px; padding: 7px 14px; font-size: 14px; border-radius: 10px; }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }
button.btn { font: inherit; font-weight: 800; cursor: pointer; }
button.btn.small { font-size: 14px; }
.btn.danger { background: transparent; border-color: #8a3a2a; color: #f2a48f; }
.btn.danger:hover { border-color: #e2603b; }
.btn.danger.armed { background: #e2603b; border-color: #e2603b; color: var(--hm-ink); }
.status { font-size: 14px; color: var(--hm-teal); min-height: 1.2em; }
.status.err { color: #f2a48f; }

/* level pills on top of portal.css's .pill */
.pill { display: inline-block; white-space: nowrap; }
.pill.is-done { background: #1a2a22; color: #3ecf78; }
.pill.is-wait { background: #1a222a; color: #8ec8ff; }
.pill.is-run { background: #2a2214; color: var(--hm-amber); }
.pill.is-err { background: #2a1814; color: #f2a48f; }
.pill.is-demo { background: #22202a; color: #c9b8ff; }

/* ---------- profile ---------- */
.profile { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: start; }
.avatar-col { display: grid; justify-items: center; gap: 12px; text-align: center; }
.avatar { position: relative; width: 132px; height: 132px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #2a4a40, #0b1218); border: 2px solid var(--hm-teal-dk);
  font-size: 44px; font-weight: 800; letter-spacing: .02em; color: var(--hm-cream); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.file-btn { position: relative; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-btn:focus-within { outline: 2px solid var(--hm-amber); outline-offset: 3px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; min-width: 0; }
.fields .row { grid-column: 1 / -1; margin-top: 4px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field input, .field select {
  width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border-radius: 10px; font: inherit; font-size: 16px;
  color: var(--hm-cream); background: #060c14; border: 1px solid #2a3a44; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--hm-teal) 50%), linear-gradient(135deg, var(--hm-teal) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--hm-teal); box-shadow: 0 0 0 3px rgba(90,160,143,.2); }
.field input[readonly] { color: var(--muted); background: transparent; border-style: dashed; }

/* ---------- lists ---------- */
.list { list-style: none; display: grid; gap: 10px; }
.list .empty { color: var(--muted); font-size: 15px; padding: 14px 16px; border: 1px dashed var(--hm-teal-dk); border-radius: 12px; }
.list .empty a { color: var(--hm-teal); font-weight: 700; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center;
  padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.item .what { min-width: 0; }
.item .t { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-weight: 800; font-size: 16px; }
.item .t span { min-width: 0; overflow-wrap: anywhere; }
.item .m { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.item .m b { color: var(--hm-amber-lt); font-weight: 800; }
.item .acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.item .acts .note { font-size: 13px; color: var(--hm-teal); }
.item .acts .note.err { color: #f2a48f; }
.item.here { border-color: var(--hm-teal-dk); }
.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .12em; }

/* ---------- access ---------- */
.meter { list-style: none; border-top: 1px solid var(--line); margin-bottom: 18px; }
.meter li { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.meter li span { color: var(--hm-teal); font-weight: 800; text-align: right; white-space: nowrap; }
.meter li.locked span { color: var(--muted); font-weight: 400; }

/* ---------- toggles ---------- */
.toggles { display: grid; gap: 10px; margin-bottom: 8px; }
.toggle { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line); cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { flex: none; position: relative; width: 46px; height: 26px; border-radius: 999px; background: #22303a; border: 1px solid #2a3a44; transition: background .15s; margin-top: 2px; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--hm-cream); transition: transform .15s; }
.toggle input:checked + .switch { background: var(--hm-teal); border-color: var(--hm-teal); }
.toggle input:checked + .switch::after { transform: translateX(20px); }
.toggle input:focus-visible + .switch { outline: 2px solid var(--hm-amber); outline-offset: 3px; }
.t-text b { display: block; font-size: 16px; }
.t-text small { display: block; color: var(--muted); font-size: 14px; }

/* ---------- danger ---------- */
.danger-zone { margin-top: 16px; padding: 18px; border-radius: 14px; border: 1px solid #8a3a2a; background: rgba(226,96,59,.06); display: grid; gap: 14px; }
.danger-zone p { color: #e9d5c4; font-size: 15px; }
.danger-zone .field { max-width: 320px; }
.danger-zone .field b { color: #f2a48f; }

footer { margin-top: 56px; padding-bottom: 56px; }

@media (max-width: 760px) {
  .card { padding: 20px 16px; border-radius: 16px; }
  .profile { grid-template-columns: 1fr; gap: 20px; }
  .fields { grid-template-columns: 1fr; }
  .item { grid-template-columns: 1fr; }
  .item .acts { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .acct-head { padding-top: 32px; }
  .row .btn { flex: 1 1 auto; }
  .header-actions #hm-who .hm-mail { max-width: 120px; }
}
