:root {
  --bg: #0a0b20;
  --bg-deep: #060613;
  --panel: rgba(17, 19, 46, 0.72);
  --panel-solid: #121430;
  --panel-2: #1a1c42;
  --border: rgba(150, 168, 255, 0.2);
  --border-soft: rgba(150, 168, 255, 0.11);
  --border-strong: rgba(160, 190, 255, 0.48);
  --text: #eef1ff;
  --muted: #a6aed2;
  --muted-2: #727aa4;
  --accent: #7ea6ff;
  --accent-2: #a99cff;
  --ok: #8fe6c9;
  --warn: #f1c97c;
  --danger: #ff9bb4;
  --radius: 8px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "URW Gothic", "Century Gothic", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #060613; color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--text);
  background-color: #08091c;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  background-image:
    radial-gradient(900px 620px at 78% -8%, rgba(120, 138, 255, 0.16), transparent 62%),
    radial-gradient(760px 560px at 50% 34%, rgba(98, 74, 196, 0.2), transparent 68%),
    radial-gradient(1000px 700px at 12% 74%, rgba(70, 66, 168, 0.14), transparent 70%),
    radial-gradient(1200px 900px at 50% 112%, rgba(88, 76, 200, 0.16), transparent 66%),
    linear-gradient(180deg, #090c23 0%, #11143a 32%, #1e1846 60%, #08081a 100%);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
  background-image:
    radial-gradient(1.1px 1.1px at 18% 22%, rgba(255, 255, 255, 0.95), transparent 60%),
    radial-gradient(0.9px 0.9px at 72% 14%, rgba(255, 255, 255, 0.8), transparent 60%),
    radial-gradient(1.3px 1.3px at 41% 68%, rgba(226, 232, 255, 0.85), transparent 60%),
    radial-gradient(0.8px 0.8px at 88% 54%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(0.9px 0.9px at 12% 82%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(1.2px 1.2px at 63% 91%, rgba(255, 255, 255, 0.75), transparent 60%),
    radial-gradient(0.7px 0.7px at 34% 9%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1px 1px at 94% 33%, rgba(225, 233, 255, 0.65), transparent 60%),
    radial-gradient(0.7px 0.7px at 57% 43%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(0.9px 0.9px at 6% 45%, rgba(255, 255, 255, 0.5), transparent 60%);
  background-size: 460px 460px, 380px 380px, 540px 540px, 320px 320px, 480px 480px,
    400px 400px, 300px 300px, 520px 520px, 350px 350px, 430px 430px;
}

body::after {
  content: "";
  position: fixed;
  left: -12%;
  right: -12%;
  bottom: -150px;
  height: 430px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 48% 100% at 16% 100%, rgba(9, 9, 24, 0.96) 62%, transparent 63%),
    radial-gradient(ellipse 56% 100% at 56% 108%, rgba(7, 7, 20, 0.98) 60%, transparent 61%),
    radial-gradient(ellipse 42% 100% at 92% 100%, rgba(8, 8, 22, 0.95) 60%, transparent 61%);
  opacity: 0.9;
}

::selection { background: rgba(126, 166, 255, 0.35); color: #fff; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: #c3d4ff; text-decoration: underline; text-underline-offset: 3px; }

.wrap { position: relative; z-index: 1; width: min(1000px, calc(100% - 32px)); margin: 0 auto; padding: 44px 0 90px;
  min-height: 100vh; display: flex; flex-direction: column; }
.wrap > * { flex: none; }
.wrap > .footer { margin-top: auto; }
.wrap.wide { width: min(1240px, calc(100% - 32px)); }

.wrap::before {
  content: "";
  position: fixed;
  top: 118px;
  right: 7%;
  width: 152px;
  height: 152px;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.78;
  background: radial-gradient(circle at 42% 38%,
    #fffdf4 0%,
    #f1eeda 34%,
    rgba(214, 222, 255, 0.5) 52%,
    rgba(150, 170, 255, 0.14) 64%,
    transparent 74%);
  box-shadow: 0 0 120px 44px rgba(170, 190, 255, 0.1);
}

.wrap.wide::before { display: none; }

header.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 48px; padding-bottom: 0;
  border-bottom: none;
}
.brand { display: flex; align-items: center; gap: 16px; }
.logo {
  width: 46px; height: 46px; display: grid; place-items: center; flex: none;
  color: #171a38;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fffdf0 0%, #dfe6ff 38%, #8f9dda 68%, #3b3f77 100%);
  box-shadow: 0 0 34px rgba(170, 190, 255, 0.35), inset -5px -7px 16px rgba(20, 22, 56, 0.5);
}
.brand h1 { font-size: 14px; margin: 0; letter-spacing: 0.3em; text-transform: uppercase; font-weight: 300; }
.brand p { margin: 5px 0 0; font-size: 10.5px; color: var(--muted-2); letter-spacing: 0.2em; text-transform: uppercase; }
.header-links { display: flex; gap: 24px; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.header-links a { color: var(--muted); }
.header-links a:hover { color: var(--text); text-decoration: none; }

.hero { position: relative; margin-bottom: 46px; padding: 4px 0 0; }
.hero > * { position: relative; z-index: 1; }
.hero::before,
.hero::after {
  content: ""; position: absolute; pointer-events: none; z-index: 0;
}
.hero::before {
  right: 29%; top: 28px; width: 190px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(190, 220, 255, 0.9), transparent);
  box-shadow: 0 0 12px 1px rgba(150, 190, 255, 0.55);
  transform: rotate(-19deg);
  transform-origin: right center;
  opacity: 0.85;
}
.hero::after { content: none; }
.overline {
  display: block; margin-bottom: 16px; font-size: 10.5px; font-weight: 400;
  letter-spacing: 0.44em; text-transform: uppercase; color: var(--accent);
}
.hero h2 {
  font-size: clamp(32px, 5vw, 54px); line-height: 1.12; margin: 0 0 18px;
  letter-spacing: 0.005em; font-weight: 300; color: #f3f5ff;
  text-shadow: 0 0 42px rgba(160, 180, 255, 0.18);
}
.hero p { margin: 0; color: var(--muted); font-size: 14px; max-width: 590px; line-height: 1.85; font-weight: 300; }
.hero-actions { margin-top: 26px; }
.button-link {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px;
  border: 1px solid rgba(126, 166, 255, 0.45); border-radius: 3px;
  background: rgba(126, 166, 255, 0.1); color: var(--text);
  font-size: 10.5px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase;
  box-shadow: 0 0 34px -16px rgba(126, 166, 255, 0.8);
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.button-link::after { content: "\2197"; font-size: 12px; letter-spacing: 0; color: var(--accent); }
.button-link:hover { color: #fff; text-decoration: none; border-color: rgba(170, 200, 255, 0.7); background: rgba(126, 166, 255, 0.18); box-shadow: 0 0 42px -14px rgba(126, 166, 255, 0.9); }

.grid { display: grid; gap: 24px; }
@media (min-width: 860px) { .grid.two { grid-template-columns: 1.15fr 0.85fr; align-items: start; } }

.card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(24, 27, 62, 0.62), rgba(10, 11, 30, 0.86));
  backdrop-filter: blur(12px);
  box-shadow: 0 30px 70px -48px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.card::before {
  content: ""; position: absolute; top: -1px; left: 26px; right: 50%;
  height: 1px;
  background: linear-gradient(90deg, rgba(126, 166, 255, 0.75), transparent);
  opacity: 0.7;
}
.card + .card { margin-top: 24px; }
.card h3 {
  margin: 0 0 8px; font-size: 12.5px; letter-spacing: 0.26em; text-transform: uppercase;
  color: #e9edff; font-weight: 400;
}
.card .sub { margin: 0 0 24px; color: var(--muted-2); font-size: 12.5px; line-height: 1.7; font-weight: 300; }

label.field, div.field { display: block; margin-bottom: 20px; }
label.field > span, div.field > span {
  display: block; margin-bottom: 9px; font-size: 10px; font-weight: 400;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
}
label.field small, div.field small { display: block; margin-top: 8px; color: var(--muted-2); font-size: 11.5px; line-height: 1.65; font-weight: 300; }

input[type="text"], input[type="password"], input[type="number"], input[type="url"], select {
  width: 100%; padding: 13px 14px; border-radius: 3px; font-size: 13.5px;
  background: rgba(6, 8, 22, 0.66); color: var(--text);
  border: 1px solid var(--border); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  font-family: var(--sans);
}
input::placeholder { color: #5f678d; }
input:focus, select:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(126, 166, 255, 0.12), 0 0 26px -10px rgba(126, 166, 255, 0.55);
  background: rgba(6, 8, 22, 0.86);
}
input:disabled { opacity: 0.55; }

.row { display: grid; gap: 16px; }
@media (min-width: 620px) { .row.two { grid-template-columns: 1fr 1fr; } }
@media (min-width: 620px) { .row.three { grid-template-columns: 1fr 1fr 1fr; } }

button {
  font-family: var(--sans); font-size: 10.5px; font-weight: 400; cursor: pointer;
  letter-spacing: 0.2em; text-transform: uppercase;
  border-radius: 3px; border: 1px solid rgba(178, 194, 255, 0.26); padding: 12px 20px;
  background: rgba(24, 28, 62, 0.5); color: var(--text);
  transition: transform 0.06s, border-color 0.18s, background 0.18s, box-shadow 0.18s, filter 0.18s;
}
button:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: rgba(126, 166, 255, 0.1);
  box-shadow: 0 0 30px -12px rgba(126, 166, 255, 0.7);
}
button:active:not(:disabled) { transform: translateY(1px); }
button:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary {
  width: 100%; padding: 15px 22px; color: #f6f8ff;
  border: 1px solid rgba(160, 190, 255, 0.5);
  background: linear-gradient(180deg, rgba(126, 166, 255, 0.24), rgba(90, 110, 220, 0.1));
  box-shadow: 0 18px 46px -26px rgba(126, 166, 255, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
button.primary:hover:not(:disabled) {
  filter: brightness(1.12);
  background: linear-gradient(180deg, rgba(146, 184, 255, 0.38), rgba(104, 126, 236, 0.2));
}
button.ghost { background: transparent; }
button.danger { color: var(--danger); border-color: rgba(255, 155, 180, 0.32); background: rgba(255, 155, 180, 0.05); }
button.sm { padding: 7px 12px; font-size: 9.5px; border-radius: 2px; letter-spacing: 0.14em; }

.consent { display: flex; gap: 11px; align-items: flex-start; margin: 6px 0 22px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.consent input { margin-top: 3px; accent-color: var(--accent); width: 15px; height: 15px; flex: none; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 2px;
  font-size: 9px; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase;
  border: 1px solid var(--border); color: var(--muted); background: rgba(255, 255, 255, 0.02);
}
.badge.ok { color: var(--ok); border-color: rgba(143, 230, 201, 0.32); background: rgba(143, 230, 201, 0.06); }
.badge.err { color: var(--danger); border-color: rgba(255, 155, 180, 0.32); background: rgba(255, 155, 180, 0.06); }
.badge.warn { color: var(--warn); border-color: rgba(241, 201, 124, 0.32); background: rgba(241, 201, 124, 0.06); }
.badge.run { color: var(--accent); border-color: rgba(126, 166, 255, 0.38); background: rgba(126, 166, 255, 0.09); }

.steps { display: grid; gap: 9px; margin: 0 0 24px; }
.steps .step {
  display: flex; align-items: center; gap: 14px; padding: 12px 15px;
  border: 1px solid var(--border-soft); border-radius: 3px;
  background: rgba(255, 255, 255, 0.012); color: var(--muted-2);
  transition: border-color 0.2s, background 0.2s;
}
.steps .step .dot {
  width: 26px; height: 26px; flex: none; display: grid; place-items: center;
  font-size: 9.5px; font-weight: 400; color: var(--muted);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgba(126, 166, 255, 0.24), rgba(126, 166, 255, 0.07));
  border: 1px solid rgba(150, 168, 255, 0.22);
}
.steps .step .txt { font-size: 12.5px; letter-spacing: 0.02em; }
.steps .step .txt small { display: block; font-size: 10.5px; color: var(--muted-2); margin-top: 3px; letter-spacing: 0.02em; }
.steps .step.active { border-color: rgba(126, 166, 255, 0.42); background: rgba(126, 166, 255, 0.06); color: var(--text); }
.steps .step.active .dot {
  background: radial-gradient(circle at 34% 30%, rgba(150, 185, 255, 0.7), rgba(90, 110, 220, 0.35));
  color: #fff; border-color: rgba(180, 205, 255, 0.6);
  box-shadow: 0 0 22px rgba(126, 166, 255, 0.45);
}
.steps .step.done { color: var(--text); }
.steps .step.done .dot {
  background: linear-gradient(150deg, rgba(143, 230, 201, 0.4), rgba(126, 166, 255, 0.3));
  color: #fff; border-color: rgba(143, 230, 201, 0.45);
}
.steps .step.fail { border-color: rgba(255, 155, 180, 0.32); background: rgba(255, 155, 180, 0.05); color: var(--text); }
.steps .step.fail .dot { background: rgba(255, 155, 180, 0.25); color: #fff; border-color: rgba(255, 155, 180, 0.4); }

.log {
  font-family: var(--mono); font-size: 12px; line-height: 1.85;
  background: rgba(4, 5, 15, 0.72); border: 1px solid var(--border-soft); border-radius: 3px;
  padding: 16px 18px; overflow-x: auto; white-space: pre-wrap; word-break: break-word;
  color: #aeb8dd;
}
.log .ev { display: block; }
.log .ev.step { color: #a8bcff; }
.log .ev.ok { color: var(--ok); }
.log .ev.warn { color: var(--warn); }
.log .ev.error { color: var(--danger); }
.log .ev.info { color: #aab2d4; }
.log .empty { color: var(--muted-2); font-style: italic; }

.result {
  position: relative; overflow: hidden; padding: 24px; margin-bottom: 20px; border-radius: 4px;
  border: 1px solid rgba(143, 230, 201, 0.32);
  background: linear-gradient(160deg, rgba(143, 230, 201, 0.08), rgba(16, 18, 44, 0.6) 64%);
}
.result::after {
  content: ""; position: absolute; top: -40px; right: -30px; width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 230, 201, 0.16), transparent 66%);
}
.result.fail { border-color: rgba(255, 155, 180, 0.36); background: linear-gradient(160deg, rgba(255, 155, 180, 0.08), rgba(16, 18, 44, 0.6) 64%); }
.result.fail::after { background: radial-gradient(circle, rgba(255, 155, 180, 0.18), transparent 66%); }
.result.warn { border-color: rgba(241, 201, 124, 0.36); background: linear-gradient(160deg, rgba(241, 201, 124, 0.07), rgba(16, 18, 44, 0.6) 64%); }
.result.warn::after { background: radial-gradient(circle, rgba(241, 201, 124, 0.16), transparent 66%); }
.result .caption { color: var(--muted-2); font-size: 9.5px; letter-spacing: 0.24em; text-transform: uppercase; }
.result .big {
  font-size: 29px; font-weight: 300; letter-spacing: 0.01em; margin: 6px 0 6px; color: var(--ok);
}
.result.warn .big { color: var(--warn); }
.result.fail .big { color: var(--danger); }
#result-text, #status-text {
  text-transform: none; letter-spacing: 0.01em; font-size: 12.5px; line-height: 1.7;
  color: var(--muted); margin-top: 2px; font-weight: 300;
}
.kv { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 18px; }
.kv div { font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted-2); }
.kv div b { display: block; color: var(--text); font-size: 12.5px; font-weight: 400; margin-top: 5px; font-family: var(--mono); letter-spacing: 0.02em; text-transform: none; }

.note {
  border-left: 1px solid rgba(126, 166, 255, 0.55); padding: 11px 15px;
  background: rgba(126, 166, 255, 0.045); border-radius: 0 3px 3px 0;
  color: var(--muted); font-size: 12px; line-height: 1.7; font-weight: 300;
}
.note.warn { border-color: rgba(241, 201, 124, 0.6); background: rgba(241, 201, 124, 0.055); }
.note + .note { margin-top: 10px; }

.hint-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 18px; }
.hint-list li { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); line-height: 1.7; font-weight: 300; }
.hint-list .n {
  flex: none; width: 25px; height: 25px; display: grid; place-items: center; font-size: 9.5px; font-weight: 400;
  color: var(--accent); border-radius: 50%; border: 1px solid rgba(126, 166, 255, 0.3);
  background: radial-gradient(circle at 34% 30%, rgba(126, 166, 255, 0.18), rgba(126, 166, 255, 0.04));
}
code, .code {
  font-family: var(--mono); font-size: 11.5px; background: rgba(4, 5, 15, 0.6);
  border: 1px solid var(--border-soft); padding: 3px 7px; border-radius: 2px; color: #c8d4ff;
  overflow-wrap: anywhere;
}
.codeblock {
  position: relative; background: rgba(4, 5, 15, 0.68); border: 1px solid var(--border-soft);
  border-radius: 3px; padding: 14px 52px 14px 14px; font-family: var(--mono); font-size: 11.5px;
  color: #c8d4ff; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65;
}
.codeblock button { position: absolute; top: 8px; right: 8px; padding: 5px 9px; font-size: 8.5px; }

.choice { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; margin: 4px 0 14px; }
@media (max-width: 420px) { .choice { grid-template-columns: 1fr; } }
.choice-btn {
  background: rgba(9, 11, 26, 0.6); border: 1px solid var(--border-soft); color: var(--muted);
  padding: 10px 12px; border-radius: 3px; font-family: inherit; font-size: 11.5px;
  letter-spacing: 0.04em; cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.choice-btn:hover { color: #dce3ff; }
.choice-btn.active { border-color: rgba(126, 166, 255, 0.75); color: #dce3ff; background: rgba(126, 166, 255, 0.08); }
#relay-box { margin-bottom: 20px; }
#relay-box .codeblock { margin-top: 12px; margin-bottom: 0; }
#relay-url { font-size: 11px; }

.alert { padding: 12px 15px; border-radius: 3px; font-size: 12.5px; margin-bottom: 18px; display: none; }
.alert.show { display: block; }
.alert.err { background: rgba(255, 155, 180, 0.07); border: 1px solid rgba(255, 155, 180, 0.28); color: #ffd5df; }
.alert.ok { background: rgba(143, 230, 201, 0.07); border: 1px solid rgba(143, 230, 201, 0.28); color: #cdf6e9; }

.session-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 26px; border-radius: 3px;
  border: 1px solid rgba(126, 166, 255, 0.26);
  background: linear-gradient(100deg, rgba(126, 166, 255, 0.1), rgba(126, 166, 255, 0.02));
}
.session-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.session-info b { font-family: var(--mono); font-size: 12px; color: #d9e2ff; font-weight: 400; }
.session-label { color: var(--muted-2); font-size: 11px; }
.button-row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin: 6px 0 12px; }
@media (max-width: 420px) { .button-row { grid-template-columns: 1fr; } }

.hidden { display: none !important; }

table { width: 100%; border-collapse: collapse; font-size: 12px; }
th {
  text-align: left; font-size: 9px; text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--muted-2); font-weight: 400; padding: 10px 12px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td { padding: 13px 12px; border-bottom: 1px solid var(--border-soft); color: var(--muted); vertical-align: middle; font-weight: 300; }
tr:hover td { background: rgba(126, 166, 255, 0.035); }
td.mono { font-family: var(--mono); font-size: 11.5px; color: var(--text); font-weight: 400; }
.table-wrap { overflow-x: auto; margin: 0 -8px; }

.stats { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 800px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  position: relative; padding: 20px 20px 18px; border: 1px solid var(--border); border-radius: 4px;
  background: linear-gradient(180deg, rgba(24, 27, 62, 0.55), rgba(10, 11, 30, 0.8));
  overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; top: 0; left: 20px; right: 42%; height: 1px;
  background: linear-gradient(90deg, rgba(126, 166, 255, 0.7), transparent);
  opacity: 0.7;
}
.stat span { font-size: 9px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.22em; }
.stat b { display: block; font-size: 32px; margin-top: 10px; letter-spacing: 0; font-weight: 300; color: #f2f5ff; }

.tabs { display: flex; gap: 4px; margin-bottom: 22px; border-bottom: 1px solid var(--border-soft); }
.tab {
  background: none; border: none; border-bottom: 1px solid transparent; border-radius: 0;
  padding: 11px 18px; color: var(--muted-2); font-size: 10px; letter-spacing: 0.22em;
}
.tab:hover:not(:disabled) { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(4, 5, 15, 0.84); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px; z-index: 50;
}
.modal {
  width: min(900px, 100%); max-height: 86vh; overflow: auto;
  background: linear-gradient(180deg, #171a3c, #0b0c22);
  border: 1px solid var(--border); border-radius: 6px; padding: 28px;
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.modal h3 { margin: 0 0 12px; font-size: 12.5px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 400; }
.modal .pre {
  font-family: var(--mono); font-size: 11px; line-height: 1.75; white-space: pre-wrap;
  word-break: break-word; background: rgba(4, 5, 15, 0.75); border: 1px solid var(--border-soft);
  padding: 14px; border-radius: 3px; max-height: 46vh; overflow: auto; color: #aeb8dd;
}
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.section-title { margin: 24px 0 10px; font-size: 9.5px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted-2); font-weight: 400; }
.activity-list { display: grid; gap: 8px; margin-bottom: 6px; }
.activity { border: 1px solid var(--border-soft); border-radius: 3px; background: rgba(255, 255, 255, 0.012); padding: 0 13px; }
.activity summary { display: flex; align-items: center; gap: 10px; padding: 12px 0; cursor: pointer; font-size: 12px; list-style: none; flex-wrap: wrap; }
.activity summary::-webkit-details-marker { display: none; }
.activity-n {
  width: 22px; height: 22px; display: grid; place-items: center; font-size: 9px; font-weight: 400;
  background: rgba(126, 166, 255, 0.12); color: var(--accent); flex: none;
  border-radius: 50%; border: 1px solid rgba(126, 166, 255, 0.22);
}
.activity-kind { font-weight: 400; color: var(--text); letter-spacing: 0.04em; }
.activity-time { color: var(--muted-2); font-size: 10.5px; margin-left: auto; letter-spacing: 0.04em; }
.activity-body { padding: 0 0 13px 32px; display: grid; gap: 8px; }
.activity-body .pre { max-height: 260px; }

.codes { display: grid; gap: 8px; margin-top: 14px; }
.code-row {
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
  background: rgba(4, 5, 15, 0.6); border: 1px dashed rgba(126, 166, 255, 0.38);
  border-radius: 3px; padding: 11px 14px; font-family: var(--mono); font-size: 12.5px; color: #d3ddff;
}

.footer {
  margin-top: 48px; text-align: center; font-size: 9px; color: var(--muted-2);
  letter-spacing: 0.3em; text-transform: uppercase; line-height: 1.9; font-weight: 300;
}
.spin {
  width: 13px; height: 13px; border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: currentColor; border-radius: 50%; display: inline-block;
  animation: spin 0.7s linear infinite; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(6, 7, 18, 0.6); }
::-webkit-scrollbar-thumb { background: rgba(126, 166, 255, 0.22); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(126, 166, 255, 0.36); }

@media (max-width: 760px) {
  .wrap::before { display: none; }
}

@media (max-width: 640px) {
  .wrap { padding-top: 28px; padding-bottom: 70px; }
  .card { padding: 21px; }
  header.top { margin-bottom: 34px; gap: 12px; }
  .brand { gap: 11px; }
  .logo { width: 38px; height: 38px; }
  .brand h1 { font-size: 12px; letter-spacing: 0.18em; }
  .header-links { font-size: 8.5px; gap: 10px; letter-spacing: 0.12em; }
  .table-wrap table { min-width: 720px; }
  td, th { white-space: nowrap; }
  .hero { margin-bottom: 36px; }
  .hero::before { width: 130px; right: -6px; opacity: 0.55; }
  .hero::after { display: none; }
  .brand p { display: none; }
  .hero p { font-size: 13px; }
  .result .big { font-size: 24px; }
  .activity-time { width: 100%; margin-left: 32px; }
  body::after { height: 300px; bottom: -120px; opacity: 0.75; }
}
