.tor-guide-page,
.tor-guide-dialog {
  color: #eef7f3;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.tor-guide-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgba(59, 75, 68, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 75, 68, .14) 1px, transparent 1px),
    #090c0e;
  background-size: 52px 52px;
}

.tor-guide-page a,
.tor-guide-dialog a { color: inherit; }

.tor-guide-top {
  display: flex;
  width: min(860px, calc(100% - 32px));
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  border-bottom: 1px solid #29332f;
}

.tor-guide-top .brand {
  transform: scale(.68);
  transform-origin: left center;
}

.tor-guide-top nav { display: flex; gap: 6px; }

.tor-guide-top nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid #303b36;
  border-radius: 5px;
  color: #c3cec9;
  text-decoration: none;
  font-size: 10px;
  font-weight: 800;
}

.tor-guide-shell {
  width: min(780px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 34px;
}

.tor-guide-hero {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 17px;
}

.tor-guide-hero img {
  display: block;
  width: 68px;
  height: 68px;
  border: 1px solid #76508b;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(111, 61, 136, .24);
}

.tor-guide-hero p,
.tor-guide-addresses > div > p {
  margin: 0 0 4px;
  color: #f0bc48;
  font: 800 9px/1.3 Consolas, monospace;
}

.tor-guide-hero h1 {
  margin: 0;
  color: #effff8;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: 0 0 18px rgba(91, 224, 178, .2);
}

.tor-guide-hero span {
  display: block;
  margin-top: 7px;
  color: #98a59f;
  font-size: 12px;
  line-height: 1.45;
}

.tor-guide-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 20px 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #35433c;
  border-radius: 6px;
  background: #2a3530;
  list-style: none;
}

.tor-guide-steps li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  min-height: 88px;
  padding: 13px 11px;
  background: #121a17;
}

.tor-guide-steps b,
.tor-guide-mirror > span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #9a6bac;
  background: #583368;
  color: #fff;
  font: 800 10px Consolas, monospace;
}

.tor-guide-steps strong {
  display: block;
  margin: 2px 0 4px;
  font-size: 11px;
}

.tor-guide-steps p {
  margin: 0;
  color: #89958f;
  font-size: 9px;
  line-height: 1.42;
}

.tor-guide-addresses {
  padding: 15px 17px;
  border: 1px solid #35443d;
  border-radius: 6px;
  background: #0f1613;
}

.tor-guide-addresses h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.tor-guide-mirror {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 8px 9px;
  border: 1px solid #27352f;
  border-radius: 5px;
  background: #0b1210;
}

.tor-guide-mirror small {
  display: block;
  margin-bottom: 2px;
  color: #77847d;
  font-size: 8px;
  font-weight: 800;
}

.tor-guide-mirror code {
  display: block;
  overflow-wrap: anywhere;
  color: #dce8e2;
  font: 10px/1.35 Consolas, monospace;
}

.tor-guide-mirror button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid #3c5a4d;
  border-radius: 5px;
  background: #101a16;
  color: #60dcb2;
  cursor: pointer;
}

.tor-guide-mirror button:hover { border-color: #60dcb2; }

.tor-guide-mirror button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.tor-guide-mirror button span { display: none; font-size: 15px; font-weight: 900; }
.tor-guide-mirror button.is-copied { border-color: #4dd9a5; color: #4dd9a5; }
.tor-guide-mirror button.is-copied svg { display: none; }
.tor-guide-mirror button.is-copied span { display: block; }

.tor-guide-empty { color: #89958f; }

.tor-guide-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.tor-guide-download {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 0 15px;
  border-radius: 5px;
  border: 1px solid #9362a7;
  background: #5b356b;
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
}

.tor-guide-warning {
  margin: 9px 0 0;
  color: #e4ba62;
  font-size: 10px;
}

.tor-guide-dialog {
  position: fixed;
  width: min(760px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #4a5d54;
  border-radius: 7px;
  background: #0c1210;
  box-shadow: 0 24px 90px rgba(0, 0, 0, .72);
}

.tor-guide-dialog::backdrop {
  background: rgba(2, 4, 4, .78);
  backdrop-filter: blur(4px);
}

.tor-guide-dialog-fallback {
  z-index: 10000;
  inset: 12px;
  display: none;
  height: min(720px, calc(100dvh - 24px));
  box-shadow: 0 0 0 100vmax rgba(2, 4, 4, .82), 0 24px 90px rgba(0, 0, 0, .72);
}

.tor-guide-dialog-fallback.is-open { display: block; }

.tor-guide-modal-open { overflow: hidden; }

.tor-guide-dialog-close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid #3a4741;
  border-radius: 5px;
  background: #19201d;
  color: #cbd5d0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.tor-guide-dialog-close:hover {
  border-color: #ff6868;
  color: #ff6868;
}

.tor-guide-dialog-body {
  max-height: calc(100dvh - 26px);
  overflow: auto;
}

.tor-guide-dialog .tor-guide-shell {
  width: 100%;
  padding: 0 20px 18px;
}

.tor-guide-dialog .tor-guide-hero {
  margin: 0 -20px;
  padding: 18px 52px 16px 20px;
  border-bottom: 1px solid #314139;
  background: linear-gradient(110deg, rgba(81, 49, 94, .3), rgba(15, 27, 22, .72) 55%, #101714);
}

.tor-guide-dialog .tor-guide-hero img {
  border-color: #9d6caf;
  box-shadow: 0 8px 26px rgba(115, 64, 137, .28);
}

.tor-guide-dialog .tor-guide-steps { margin: 16px 0; }

.tor-guide-dialog .tor-guide-addresses { padding: 13px 14px; }

.tor-guide-loading {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: #98a59f;
  font-size: 13px;
}

@media (max-width: 700px) {
  .tor-guide-top { min-height: 64px; }
  .tor-guide-top .brand { transform: scale(.58); }
  .tor-guide-shell { padding-top: 20px; }
  .tor-guide-hero { grid-template-columns: 54px minmax(0, 1fr); gap: 12px; }
  .tor-guide-hero img { width: 54px; height: 54px; }
  .tor-guide-hero h1 { font-size: 23px; }
  .tor-guide-hero span { grid-column: 1 / -1; font-size: 11px; }
  .tor-guide-steps { grid-template-columns: 1fr; }
  .tor-guide-steps li { min-height: 0; }
  .tor-guide-actions { align-items: stretch; flex-direction: column; }
  .tor-guide-download { width: 100%; }
  .tor-guide-dialog .tor-guide-shell { padding: 18px 14px 16px; }
  .tor-guide-dialog .tor-guide-hero { padding-right: 38px; }
  .tor-guide-mirror code { font-size: 9px; }
  .tor-guide-dialog-fallback {
    inset: 8px;
    width: calc(100% - 16px);
    height: calc(100dvh - 16px);
    max-height: none;
  }
  .tor-guide-dialog-body { max-height: 100%; }
}
