:root {
  color-scheme: dark;
  --bg: #0f1012; --surface: #17181b; --raised: #1f2125; --line: #2a2d32; --line-strong: #3b3f46;
  --text: #eef0f3; --text-2: #b4b9c2; --text-3: #8d939d;
  --accent: #2f6fed; --accent-down: #2559c4; --link: #86adff;
  --ok: #45bf82; --warn: #e8a93f; --info: #86adff;
  --radius: 12px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) var(--bg); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); caret-color: var(--accent);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: rgb(47 111 237 / 45%); color: #fff; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }

header.site {
  display: flex; align-items: baseline; gap: 10px; padding: 18px 24px;
  margin-bottom: 32px; border-bottom: 1px solid var(--line);
}
.wordmark { color: var(--text); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; }
.for { color: var(--text-3); font-size: 14px; }

main.panel {
  width: min(100% - 32px, 440px); margin: auto; padding: 32px 28px 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 16px 40px -12px rgb(0 0 0 / 55%);
}
main.panel.wide { width: min(100% - 32px, 680px); margin: 8px auto 0; }
footer.site {
  display: flex; justify-content: center; gap: 20px; margin-top: 24px; padding: 20px 16px 28px; font-size: 14px;
}
footer.site a { color: var(--text-3); text-decoration: none; }
footer.site a:hover { color: var(--text-2); text-decoration: underline; }

h1 { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 650; letter-spacing: -0.015em; text-wrap: balance; }
h2 { margin: 32px 0 8px; font-size: 17px; line-height: 1.3; font-weight: 650; }
p, li { color: var(--text-2); overflow-wrap: anywhere; }
p { margin: 12px 0 0; }
strong { color: var(--text); font-weight: 600; }
ul { margin: 12px 0 0; padding-left: 20px; }
li + li { margin-top: 6px; }
.subtitle { margin-top: 6px; color: var(--text-3); font-size: 15px; }
.wide p, .wide li { max-width: 68ch; }
.small { font-size: 14px; color: var(--text-3); }

.status {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px;
  border-radius: 50%; background: var(--raised); border: 1px solid var(--line);
}
.status .icon { width: 24px; height: 24px; }
.status-ok { color: var(--ok); } .status-warn { color: var(--warn); } .status-info { color: var(--info); }
.status-ok .draw { stroke-dasharray: 12; animation: draw 420ms cubic-bezier(0.16, 1, 0.3, 1) 120ms backwards; }
@keyframes draw { from { stroke-dashoffset: 12; } to { stroke-dashoffset: 0; } }

.pair { position: relative; margin-top: 24px; }
.accounts { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); }
.accounts li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center; margin: 0; padding: 14px 16px; }
.accounts li + li { border-top: 1px solid var(--line); }
.tile {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); font-weight: 700;
}
.account-label { display: block; font-size: 13px; color: var(--text-3); }
.account-name { display: block; color: var(--text); font-weight: 600; }
.account-name .handle { color: var(--text-2); font-weight: 400; }
.joint {
  position: absolute; left: 36px; top: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--text-2);
}
.joint .icon { width: 16px; height: 16px; }

fieldset { margin: 24px 0 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; font-size: 13px; font-weight: 600; color: var(--text-3); text-transform: none; }
.option { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; margin-top: 4px; padding: 8px 0; cursor: pointer; color: var(--text); }
.option input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; }

.actions { display: flex; gap: 12px; margin-top: 24px; }
.actions .button, .actions button { flex: 1; }
.button, button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 8px; background: var(--accent); color: #fff;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color 120ms ease-out, border-color 120ms ease-out;
}
.button:hover, button:hover { background: var(--accent-down); }
.button.secondary, button.secondary { background: transparent; color: var(--text); border-color: var(--line-strong); }
.button.secondary:hover, button.secondary:hover { background: var(--raised); }
button:disabled { opacity: 0.55; cursor: not-allowed; }

@media (max-width: 420px) {
  header.site { padding: 16px; margin-bottom: 16px; }
  main.panel { padding: 24px 20px 20px; }
  .actions { flex-direction: column-reverse; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}