:root {
  --bg: #0f1115; --card: #161921; --text: #e6e8ec; --muted: #8a92a2; --faint: #2a2f3a;
  --ok: #3ccf7e; --warn: #f0a429; --bad: #ff5d5d; --unknown: #7b8494; --accent: #6ea8ff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
main { max-width: 720px; margin: 0 auto; padding: 18px 16px 60px; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; }
h1 { font-size: 22px; margin: 0; font-weight: 600; }
h2 { font-size: 17px; margin: 0; font-weight: 600; }
.st-link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; }
.st-muted { color: var(--muted); }
.st-small { font-size: 13px; }
.st-empty { color: var(--muted); font-size: 14px; padding: 8px 0; }
.st-btn { background: var(--accent); color: #0b0d12; border: 0; border-radius: 9px; padding: 10px 16px;
  font-weight: 600; cursor: pointer; }
.st-btn.ghost { background: none; color: var(--accent); border: 1px solid var(--faint); }
.st-btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.st-btn:disabled { opacity: .5; cursor: default; }

/* login */
.st-login { max-width: 360px; margin: 12vh auto 0; }
.st-login h1 { margin-bottom: 4px; }
.st-who { display: flex; gap: 8px; margin: 18px 0 12px; }
.st-who button { flex: 1; background: var(--card); border: 1px solid var(--faint); border-radius: 10px;
  padding: 12px 0; cursor: pointer; font-weight: 600; }
.st-who button.on { border-color: var(--accent); color: var(--accent); }
.st-err { color: var(--bad); font-size: 14px; min-height: 1.5em; margin-top: 8px; }

/* inputs */
.st-in { display: block; width: 100%; background: var(--bg); color: var(--text); font: inherit;
  border: 1px solid var(--faint); border-radius: 8px; padding: 8px 10px; outline: none; }
.st-in:focus { border-color: var(--accent); }
select.st-in { appearance: none; -webkit-appearance: none; padding-right: 28px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
/* text fields grow with the content -- never a resize handle, never an inner scrollbar */
textarea.st-in { resize: none; overflow: hidden; field-sizing: content; min-height: 0; line-height: 1.5; }

/* top bar */
.st-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  border-bottom: 1px solid var(--faint); padding-bottom: 10px; margin-bottom: 14px; }
.st-head .st-meta { color: var(--muted); font-size: 14px; display: flex; gap: 12px; align-items: baseline; }

/* store list */
.st-stores { list-style: none; margin: 0; padding: 0; }
.st-store { display: block; padding: 12px 0; border-bottom: 1px solid var(--faint); color: var(--text); cursor: pointer; }
.st-store:hover { text-decoration: none; }
.st-store-l1 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.st-store-name { font-weight: 600; }
.st-pill { font-size: 12px; border-radius: 99px; padding: 1px 8px; border: 1px solid var(--faint); color: var(--muted); white-space: nowrap; }
.st-pill.live { color: var(--ok); border-color: #1f5a3b; }
.st-pill.setup { color: var(--warn); border-color: #5a461f; }
.st-pill.discontinued, .st-pill.paused { color: var(--unknown); }
.st-bar { height: 5px; background: var(--faint); border-radius: 3px; margin-top: 7px; overflow: hidden; }
.st-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.st-bar.full > i { background: var(--ok); }
.st-new { margin: 18px 0; padding: 14px; background: var(--card); border-radius: 12px; display: grid; gap: 8px; }
.st-new-row { display: flex; gap: 8px; }
.st-new-row .st-in { flex: 1; }
.st-found { margin-top: 26px; }
.st-found li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--faint); font-size: 14px; }

/* store page */
.st-back { font-size: 14px; }
.st-title-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.st-total { color: var(--muted); font-size: 14px; }
.st-tools { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; margin: 8px 0 4px; align-items: center; }
.st-tools label { display: flex; gap: 6px; align-items: center; color: var(--muted); cursor: pointer; }
.st-nav { position: sticky; top: 0; z-index: 5; background: var(--bg); display: flex; gap: 6px; overflow-x: auto;
  padding: 10px 0; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none;
  border-bottom: 1px solid var(--faint); }
.st-nav::-webkit-scrollbar { display: none; }
.st-chip { flex: 0 0 auto; background: var(--card); border: 1px solid var(--faint); border-radius: 99px; padding: 4px 11px;
  font-size: 13px; cursor: pointer; white-space: nowrap; color: var(--muted); }
.st-chip b { color: var(--text); font-weight: 600; }
.st-chip.full b { color: var(--ok); }
.st-sec { margin-top: 22px; scroll-margin-top: 58px; }
.st-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.st-sec-intro { color: var(--muted); font-size: 14px; margin: 3px 0 8px; }
.st-card { background: var(--card); border-radius: 12px; padding: 2px 14px; }

.st-field { padding: 12px 0; border-bottom: 1px solid var(--faint); }
.st-field:last-child { border-bottom: 0; }
.st-f-l1 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.st-dot { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.st-dot.done { background: var(--ok); } .st-dot.bad { background: var(--bad); } .st-dot.opt { background: none; border: 1px solid var(--faint); }
.st-label { font-weight: 600; font-size: 15px; flex: 1; }
.st-opt { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 4px; }
.st-q { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--faint); background: none;
  color: var(--accent); font-weight: 700; font-size: 13px; cursor: pointer; padding: 0; line-height: 1; }
.st-q:hover { border-color: var(--accent); }
.st-f-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.st-f-meta.saving { color: var(--warn); }
.st-f-meta.err { color: var(--bad); }

.st-multi { display: flex; flex-wrap: wrap; gap: 6px; }
.st-multi button { background: var(--bg); border: 1px solid var(--faint); border-radius: 99px; padding: 4px 11px; font-size: 14px;
  cursor: pointer; color: var(--muted); }
.st-multi button.on { border-color: var(--accent); color: var(--text); background: #1b2333; }
.st-toggle { display: flex; gap: 6px; }
.st-toggle button { background: var(--bg); border: 1px solid var(--faint); border-radius: 8px; padding: 5px 14px; cursor: pointer; color: var(--muted); }
.st-toggle button.on { border-color: var(--accent); color: var(--text); background: #1b2333; }
.st-task { display: flex; gap: 10px; align-items: center; cursor: pointer; background: none; border: 0; padding: 0; text-align: left; }
.st-box { flex: 0 0 22px; width: 22px; height: 22px; border: 2px solid var(--muted); border-radius: 5px; display: inline-flex;
  align-items: center; justify-content: center; color: var(--bg); font-size: 14px; font-weight: 700; }
.st-box.on { background: var(--ok); border-color: var(--ok); }
.st-secret { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.st-secret .st-mask { font-family: ui-monospace, Menlo, monospace; color: var(--muted); letter-spacing: 1px; }
.st-secret .st-plain { font-family: ui-monospace, Menlo, monospace; overflow-wrap: anywhere; font-size: 14px; }
.st-secret-in { display: flex; gap: 8px; }
.st-secret-in .st-in { flex: 1; }

.st-check { margin-top: 8px; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.st-check-res { flex: 1; overflow-wrap: anywhere; }
.st-check-res.ok { color: var(--ok); } .st-check-res.bad { color: var(--bad); } .st-check-res.na { color: var(--muted); }
.st-check-res ul { margin: 2px 0 0; padding-left: 16px; color: var(--muted); }
.st-check-res li.bad { color: var(--bad); } .st-check-res li.ok { color: var(--ok); }

.st-creds-row { border: 1px solid var(--faint); border-radius: 10px; padding: 10px; margin-bottom: 8px; display: grid; gap: 6px; }
.st-creds-row .st-creds-top { display: flex; gap: 6px; }
.st-creds-row .st-creds-top .st-in { flex: 1; }

/* integrations */
.st-int { list-style: none; margin: 0; padding: 0; }
.st-int li { padding: 10px 0; border-bottom: 1px solid var(--faint); display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.st-int li:last-child { border-bottom: 0; }
.st-int .st-int-l { flex: 1; }
.st-int .st-int-what { color: var(--muted); font-size: 13px; }
.st-int .st-int-detail { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.st-int .st-int-detail.bad { color: var(--bad); }
.st-sym { flex: 0 0 18px; font-weight: 700; text-align: center; }
.st-sym.ok { color: var(--ok); } .st-sym.bad { color: var(--bad); } .st-sym.na { color: var(--muted); } .st-sym.part { color: var(--warn); }

.st-audit { font-size: 13px; }
.st-audit li { padding: 4px 0; border-bottom: 1px solid var(--faint); color: var(--muted); overflow-wrap: anywhere; }
.st-audit b { color: var(--text); font-weight: 500; }

/* help sheet */
.st-sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 20; }
.st-sheet { position: fixed; z-index: 21; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto;
  background: #181b23; border-radius: 16px 16px 0 0; padding: 18px 18px calc(24px + env(safe-area-inset-bottom));
  max-width: 720px; margin: 0 auto; box-shadow: 0 -8px 30px rgba(0,0,0,.4); }
@media (min-width: 760px) { .st-sheet { bottom: auto; top: 8vh; border-radius: 16px; max-height: 84vh; } }
.st-sheet h3 { margin: 0 34px 10px 0; font-size: 18px; }
.st-sheet-x { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: var(--muted); font-size: 24px; cursor: pointer; }
.st-sheet ol { padding-left: 22px; margin: 0 0 12px; }
.st-sheet ol li { margin-bottom: 8px; overflow-wrap: anywhere; }
.st-sheet code { background: var(--faint); border-radius: 4px; padding: 1px 4px; font-size: 13.5px; overflow-wrap: anywhere; }
.st-note { background: #2a2214; border-left: 3px solid var(--warn); border-radius: 6px; padding: 9px 12px; font-size: 14px; margin-bottom: 12px; }
.st-sheet .st-used { font-size: 13px; color: var(--muted); border-top: 1px solid var(--faint); padding-top: 10px; margin-top: 6px; }
.st-sheet .st-used b { color: var(--text); font-weight: 500; }

.st-toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #1d212a; border: 1px solid var(--faint); border-radius: 10px; padding: 8px 14px; font-size: 14px; z-index: 30;
  max-width: 90vw; }
