/* settings-hub.css — the Settings hub inside #panel-settings on the dashboard.

   Phone (<900px): a root list of categories, each opening one page with a
   back row. Desktop: a left rail and a body, the category in the hash.
   Everything is drawn in the dashboard's own tokens and reuses its
   .card / .setting-row / .setting-lbl / .setting-sublbl / .toggle / .seg-cur
   so a switch here looks like a switch anywhere else on the page.

   Every class is prefixed sh- : the dashboard already owns .row, .tile,
   .main and friends, and a bare name here would collide with them. */

#settingsHub{display:grid;grid-template-columns:236px minmax(0,1fr);gap:14px;align-items:start}

/* ── rail (desktop) ── */
.sh-rail{position:sticky;top:78px;display:flex;flex-direction:column;gap:2px;padding:8px;
  background:var(--card-grad);border:1px solid var(--border);border-radius:var(--r-card);box-shadow:var(--card-lift)}
.sh-item{display:flex;align-items:center;gap:11px;width:100%;padding:7px 10px;border-radius:8px;border:1px solid transparent;
  background:none;text-align:left;text-decoration:none;cursor:pointer;color:var(--t2);
  font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;font-weight:700}
.sh-item:hover{color:var(--t1);background:rgba(255,255,255,.03)}
.sh-item[aria-current="true"]{color:var(--t1);background:rgba(255,255,255,.05);border-color:var(--border)}
.sh-item:focus-visible{outline:2px solid var(--green);outline-offset:-2px}
.sh-tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.sh-tx small{display:none;font-family:var(--sans);font-size:11.5px;font-weight:400;letter-spacing:0;text-transform:none;color:var(--t3);line-height:1.35;white-space:normal}
.sh-chev{display:none;color:var(--t3);font-size:16px;flex:none}

/* The tile: the app's own icon on a raised square. Raised means LIGHTER on
   this ground — a 1px light edge, never a dark shadow. */
.sh-tile{width:30px;height:30px;border-radius:8px;flex:none;display:inline-flex;align-items:center;justify-content:center;
  color:#e9e9ee;background:var(--surface);border:1px solid var(--border);box-shadow:inset 0 1px 0 rgba(255,255,255,.06)}
.sh-tile svg{width:16px;height:16px;display:block}

/* ── body ── */
.sh-body{min-width:0}
.sh-cat{display:none}
.sh-cat.on{display:block;animation:fadeIn .22s ease}
.sh-cat > .card + .card{margin-top:12px}
.sh-card-body{padding:4px 18px 10px}
.sh-cat-head{display:flex;align-items:center;gap:10px;margin:0 0 12px}
.sh-cat-head .sh-tile{width:26px;height:26px;border-radius:7px}
.sh-cat-head .sh-tile svg{width:14px;height:14px}
.sh-cat-head h3{margin:0;font-family:var(--mono);font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:var(--t1);font-weight:700}
.sh-cat-head p{margin:2px 0 0;font-family:var(--sans);font-size:12px;color:var(--t3);line-height:1.4}
.sh-back{display:none}

/* ── rows ──
   .setting-sublbl is 8px tracked uppercase mono: right for "SHOW 1.2M INSTEAD
   OF 1,200,000", wrong for a sentence. Sentences use .sh-sub. */
.sh-sub{font-family:var(--sans);font-size:11.5px;color:var(--t3);line-height:1.45;margin-top:3px;max-width:52ch}
/* Addresses, slugs and links: never uppercased by the sublabel they sit in. */
.sh-val{font-family:var(--mono);font-size:11px;color:var(--t1);letter-spacing:.02em;word-break:break-all;line-height:1.5;text-transform:none}
button.sh-copy{background:none;border:0;padding:0;margin:0;text-align:left;cursor:pointer;display:inline;-webkit-tap-highlight-color:transparent}
button.sh-copy:hover{color:#fff;text-decoration:underline;text-decoration-color:rgba(255,255,255,.3);text-underline-offset:2px}
button.sh-copy:focus-visible{outline:1px solid var(--green,#4ade4a);outline-offset:2px;border-radius:3px}
button.sh-copy.copied{color:var(--green,#4ade4a)}
.sh-acts{display:flex;gap:8px;align-items:center;flex:none;flex-wrap:wrap;justify-content:flex-end}
.sh-act{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;text-decoration:none;
  color:var(--green);border:1px solid rgba(74,222,74,.45);border-radius:6px;padding:7px 12px;white-space:nowrap;flex:none;
  background:none;cursor:pointer;line-height:1}
.sh-act:hover{background:rgba(74,222,74,.08)}
.sh-act.quiet{color:var(--t2);border-color:var(--border)}
.sh-act.quiet:hover{color:var(--t1);border-color:var(--t3);background:none}
.sh-act.danger:hover{color:var(--red);border-color:var(--red);background:none}
.sh-act[disabled]{opacity:.5;cursor:default;background:none}
/* ARMED: the first tap on a destructive action does not do it, it asks. Loud on
   purpose — a button that is one tap from undoing your account should not look
   like the one beside it (2026-09-11, after Unlink cost the same person their
   wallet twice in an evening). */
.sh-act.armed{color:var(--red);border-color:var(--red);background:rgba(240,68,68,.10);
  animation:shArmPulse 1s ease-in-out infinite}
@keyframes shArmPulse{0%,100%{background:rgba(240,68,68,.10)}50%{background:rgba(240,68,68,.22)}}
@media (prefers-reduced-motion:reduce){.sh-act.armed{animation:none}}
.sh-act:focus-visible{outline:2px solid var(--green);outline-offset:2px}

/* A fixed state, shown where a switch would sit. Not a control. */
.sh-chip{font-family:var(--mono);font-size:9px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  padding:5px 9px;border-radius:6px;border:1px solid rgba(74,222,74,.45);color:var(--green);white-space:nowrap;flex:none;line-height:1}
.sh-chip.dim{border-color:var(--border);color:var(--t3)}
.sh-chip.gold{border-color:rgba(255,210,63,.5);color:#ffd23f}
.sh-chip svg{width:9px;height:9px;vertical-align:-1px;margin-right:5px}

/* A switch that is waiting for the server's answer must not be flippable —
   flipping a stale false would write a false. */
.toggle.sh-wait{opacity:.35;cursor:default}

.sh-av{width:28px;height:28px;border-radius:50%;overflow:hidden;background:var(--surface);border:1px solid var(--border);flex:none}
.sh-av img{width:100%;height:100%;object-fit:cover;display:block}
.sh-person{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
.sh-person .sh-name{font-family:var(--font-handle,var(--mono));font-size:12px;font-weight:700;color:var(--t1);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sh-person .sh-addr{font-family:var(--mono);font-size:9px;color:var(--t3);letter-spacing:.04em}

.sh-empty{font-family:var(--mono);font-size:11px;color:var(--t3);padding:14px 0}
.sh-note{font-family:var(--sans);font-size:12px;color:var(--t3);line-height:1.55;max-width:64ch;padding:13px 0}
.sh-note b{color:var(--t2);font-weight:500}

/* ── phone: root list, then one page with a back row ── */
@media (max-width:899px){
  #settingsHub{display:block}
  .sh-rail{position:static;padding:0;gap:0;background:none;border:0;box-shadow:none;border-radius:0}
  .sh-item{padding:11px 4px;gap:12px;border-radius:0;border:0;border-bottom:1px solid var(--border-soft);font-size:12px;letter-spacing:.06em}
  .sh-item[aria-current="true"]{background:none;border-color:var(--border-soft)}
  .sh-item:hover{background:none}
  .sh-tile{width:34px;height:34px;border-radius:9px}
  .sh-tile svg{width:18px;height:18px}
  .sh-tx small{display:block}
  .sh-chev{display:block}
  #settingsHub.at-cat .sh-rail{display:none}
  #settingsHub.at-root .sh-body{display:none}
  .sh-back{display:inline-flex;align-items:center;gap:8px;margin:0 0 10px;padding:6px 4px 6px 0;background:none;border:0;cursor:pointer;
    font-family:var(--mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--t3)}
  .sh-back:hover{color:var(--t1)}
  .sh-back svg{width:14px;height:14px;fill:currentColor}
  .sh-card-body{padding:4px 14px 10px}
  /* A row wraps only when its controls are wide (a chip and a button); a
     lone switch stays beside its label. */
  .sh-cat .setting-row{flex-wrap:wrap}
  .sh-cat .setting-row > div:first-child{flex:1 1 180px;min-width:0}
  .sh-acts{justify-content:flex-start}
}
