/* AlphaBay.Market - standalone theme */

* { box-sizing: border-box; }

/* phones: stop ios from inflating text on device rotation */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* everything clickable shows the pointer: buttons, button-roles,
   summary toggles, labels that focus a control, disabled stay default */
button:not(:disabled),
[role="button"]:not(:disabled),
input[type="submit"]:not(:disabled),
input[type="button"]:not(:disabled),
input[type="checkbox"]:not(:disabled),
input[type="radio"]:not(:disabled),
input[type="range"],
summary,
label[for] {
  cursor: pointer;
}

button:disabled,
input[type="submit"]:disabled {
  cursor: default;
}

/* one clean dropdown arrow for every select, properly aligned - the
   native arrow renders inconsistently with custom padding/themes */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23777d84' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  background: #ececec;
  color: #383838;

  /* pin the footer to the bottom on tall screens */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- scrollbars: thin, themed, arrowless ---------- */

* {
  scrollbar-width: thin;
  scrollbar-color: #b9bcc0 transparent;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #b9bcc0; }
::-webkit-scrollbar-thumb:hover { background: #e06a0c; }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

@media (prefers-color-scheme: dark) {
  * { scrollbar-color: #43464c transparent; }
  ::-webkit-scrollbar-thumb { background: #43464c; }
  ::-webkit-scrollbar-thumb:hover { background: #f07a17; }
}

.tor-banner,
.site-head,
.wrap { flex-shrink: 0; }

.wrap { flex-grow: 1; }

a { color: #d96208; text-decoration: none; }
a:hover { text-decoration: underline; }

.brand, .brand:hover, .brand:visited { text-decoration: none; }

.wrap {
  max-width: 1060px;
  /* body is a flex column: auto cross-axis margins disable stretch, so
     fit-content content (nowrap address rows) can widen this beyond the
     viewport. width:100% renders identically on desktop and stops that. */
  width: 100%;
  margin: 0 auto;
  padding: 18px 20px 30px;
}

/* ---------- header ---------- */

.site-head {
  background: #232427;
  border-bottom: 3px solid #e06a0c;
}

.head-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 20px 12px;
}

.brand {
  color: #f2f3f5;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.5px;
  line-height: 1;
  text-decoration: none;
}

.brand b { color: #e06a0c; font-weight: 400; }
.brand .dot { color: #f2f3f5; font-weight: 700; }
.brand .mkt { color: #e06a0c; }

.head-nav { display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: 4px; }

.head-nav a {
  color: #b9bdc3;
  text-decoration: none;
  font-size: 13.5px;
  padding: 7px 12px;
}

.head-nav a:hover { color: #fff; background: #33353a; text-decoration: none; }

.head-nav a.here { color: #f07a17; background: #2d2e32; }

.status-strip {
  background: #1b1c1f;
  border-top: 1px solid #2d2e32;
}

.status-strip-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 20px;
  color: #9aa0a6;
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
}

/* ---------- layout ---------- */

.cols { display: flex; gap: 20px; align-items: flex-start; }

.main-col { flex: 1 1 auto; min-width: 0; }

.main { flex: 1 1 auto; min-width: 0; }

.rail { width: 265px; flex: 0 0 265px; }

/* ---------- cards ---------- */

.card {
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 16px 18px;
  margin-bottom: 18px;
}

.label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #e06a0c;
  margin: 0 0 10px;
}

.intro h1 { margin: 0 0 10px; font-size: 21px; color: #2b2b2b; line-height: 1.3; }
.intro p { margin: 0 0 10px; line-height: 1.55; }

.intro-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.intro-head h1 { margin-bottom: 8px; }

.intro-head .badge { margin-top: 4px; }

/* warning variant of the intro card - the tor gate page on /go/onion-* */
.card.warn {
  border: 1px solid rgba(214, 158, 8, 0.55);
  border-left: 5px solid #d69e08;
  background: #fdf6e0;
}
.card.warn .intro-head h1 { color: #8a6a00; }
.card.warn .intro-head h1::before { content: "\26A0"; margin-right: 9px; }
.card.warn p b { color: #8a6a00; }

@media (prefers-color-scheme: dark) {
  .card.warn { background: #262015; border-color: rgba(214, 158, 8, 0.4); border-left-color: #e3b00a; }
  .card.warn .intro-head h1 { color: #e6c341; }
  .card.warn .intro-head h1::before { color: #e3b00a; }
  .card.warn p b { color: #e6c341; }
}
.muted { color: #909090; }
.small { font-size: 12px; }

/* ---------- rail ---------- */

.rail .card { padding: 13px 15px; }

.chips { display: flex; flex-direction: column; gap: 4px; }

.chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 7px 10px;
  color: #444;
}

.chip:hover { background: #f5f5f5; text-decoration: none; }
.chip .cnt { font-size: 11px; color: #999; background: #eee; padding: 2px 7px; }

.legend p { margin: 7px 0; font-size: 12px; color: #555; }
.rail-note { font-size: 12px; color: #666; line-height: 1.55; margin: 0 0 8px; }

.rail .legend p {
  margin: 0;
  padding: 7px 0;
}
.rail .legend p:first-child { padding-top: 0; }
.rail .legend p:last-child { padding-bottom: 0; }
.rail .legend p + p { border-top: 1px solid #f1f1f1; }

.rail-links { display: flex; flex-direction: column; margin: 2px -10px 0; }

.rail-link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 7px 10px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #474747;
  border-bottom: 1px solid #f1f1f1;
}

.rail-link:first-child { border-top: 0; }
.rail-link:last-child { border-bottom: 0; }
.rail-link:hover { color: #d96208; text-decoration: none; background: #fafafa; }
.rail-link-current, .rail-link-current:hover { color: #d96208; background: #fdf1e7; }
.rail-link-title { flex: 1 1 auto; min-width: 0; }
.rail-link .badge { flex: 0 0 auto; }

.rail-link-meta {
  flex: 0 0 auto;
  font-size: 10.5px;
  color: #999;
  font-family: "Courier New", Courier, monospace;
  white-space: nowrap;
}

.rail-sub {
  margin: 14px 0 4px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #999;
}
.rail .rail-sub:first-of-type { margin-top: 2px; }

.steps-mini {
  margin: 0;
  padding-left: 18px;
  color: #555;
  font-size: 12px;
  line-height: 1.8;
}

.rail-more { margin: 10px 0 0; font-size: 12px; }
.rail-more a { font-weight: 700; }

/* ---------- clearnet tor banner ---------- */

.tor-banner {
  position: relative;
  background: #e06a0c;
  color: #fff;
  text-align: center;
}

.tor-banner-inner { padding: 10px 36px 10px 20px; font-size: 13.5px; }
.tor-banner a { color: #fff; text-decoration: underline; font-weight: 700; }

.tor-banner-close {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 19px;
  line-height: 1;
  padding: 6px 9px;
  cursor: pointer;
}
.tor-banner-close:hover { color: #fff; }

/* ---------- status badges (flat pills) ---------- */

.badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 3px 9px;
}

.st-on   { background: #e2f2e2; color: #256d25; border: 1px solid #bfe0bf; }
.st-slow { background: #faf3da; color: #8a6d00; border: 1px solid #e5d9a4; }
.st-off  { background: #fbe9e7; color: #a33327; border: 1px solid #ecc4c0; }
.st-unk  { background: #ededee; color: #606468; border: 1px solid #d5d6d8; }

/* ---------- copy button ---------- */

.copy-wrap { display: inline-flex; align-items: stretch; gap: 7px; flex-wrap: wrap; }

.copy-btn {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #666;
  background: #f0f0f0;
  border: 1px solid #ddd;
  padding: 0 8px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px; /* never collapses when used outside an address row */
  min-width: 66px; /* fixed width so it never resizes between "copy" and "copied!" */
  cursor: pointer;
}

.copy-btn:hover { color: #fff; background: #e06a0c; border-color: #e06a0c; }

.copy-btn.copied,
.copy-btn.copied:hover {
  color: #256d25;
  background: #e2f2e2;
  border-color: #bfe0bf;
}

/* ---------- link cards ---------- */

.o-card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.o-card.clickable { cursor: pointer; }

.o-card:hover { border-color: #e06a0c; }

.o-main { flex: 1 1 auto; min-width: 0; }

.o-name { font-weight: 700; font-size: 14.5px; }
.o-name:hover { text-decoration: underline; }
.o-note { color: #999; font-size: 11px; margin-left: 6px; }

.hl-tag {
  display: inline-block;
  background: #fff3e8;
  color: #c55a0a;
  border: 1px solid #f0d5be;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-left: 6px;
  vertical-align: 2px;
}
.o-desc { margin: 4px 0 0; color: #5c5c5c; font-size: 12.5px; line-height: 1.45; }

/* highlighted listing: the usual card, pinned first, tinted slightly */
.o-card.hl {
  background: #fff8f2;
  border-color: #eed9c2;
}
.o-card.hl:hover { border-color: #e06a0c; }

/* compact stats line under an address on service pages */
.o-meta-line {
  margin: 7px 0 0;
  color: #8a8a8a;
  font-size: 12px;
  line-height: 1.6;
}

.o-meta-line b { color: #4a4a4a; font-weight: 700; }

.onion-addr {
  display: inline-block;
  margin-top: 0;
  padding: 3px 8px;
  background: #f2f2f2;
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  color: #55585c;
  word-break: break-all;
}

/* when inside an address row, the row dictates the height */
.addr-link .onion-addr {
  height: 100%;
  margin: 0;
  display: flex;
  align-items: center;
}

/* side column never shrinks and its meta lines never wrap - long onion
   addresses yield the space instead (they word-break gracefully) */
.o-side { flex: 0 0 auto; min-width: 0; text-align: right; max-width: 170px; }
.o-meta { display: block; margin-top: 7px; color: #9a9a9a; font-size: 11px; line-height: 1.5; white-space: nowrap; }

/* ---------- misc sections ---------- */

.howto-list { margin: 0; padding-left: 19px; color: #474747; line-height: 1.9; font-size: 13.5px; }

.faq dt { font-weight: 700; color: #3d3d3d; margin-top: 13px; font-size: 13.5px; }
.faq dd { margin: 4px 0 0; color: #5c5c5c; font-size: 13px; line-height: 1.55; }

.faq input,
.faq select,
.faq textarea {
  width: 100%;
  max-width: 420px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #ccc;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #333;
}

.faq input:focus, .faq select:focus, .faq textarea:focus { border-color: #e06a0c; outline: none; }

/* ---------- footer ---------- */

.site-foot {
  background: #232427;
  border-top: 3px solid #e06a0c;
  margin-top: auto;
}

.site-foot-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 14px 20px;
  text-align: center;
  font-size: 12px;
}

.site-foot a { color: #9aa0a6; margin: 0 7px; }
.site-foot a:hover { color: #f07a17; }

/* ---------- ads ---------- */

.spot { margin: 10px auto; text-align: center; }
.spot img { max-height: 90px; width: auto; }

.spot.wide { text-align: left; margin: 10px 0; }
.spot.wide img { width: 100%; max-width: 100%; height: auto; max-height: none; }

/* the site-wide 728x90 above the content on every page - zero top offset so
   it starts at the exact same height as the rail's lead sidebar ad */
.top-spot-wrap .spot.wide { text-align: center; margin: 0 auto 12px; }

.bottom-spot { margin: 6px auto 10px; }
.bottom-spot-wrap { text-align: left; }

.spot.side { margin: 0 0 18px; }
.spot.side img {
  width: 300px;
  max-width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.spot-open .spot-note {
  border-style: dashed;
  background: transparent;
  color: #8a8a8a;
}

.spot-open a { text-decoration: none; }
.spot-open a:hover .spot-note { color: #d96208; border-color: #e06a0c; }

.spot-note {
  display: inline-block;
  padding: 14px 22px;
  border: 1px dashed #e06a0c;
  background: #fff8f2;
  color: #7a4a1e;
  font-size: 13px;
}

.spot-label {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #999;
  margin-top: 2px;
}

.flash-ok {
  background: #eef7ee;
  border: 1px solid #bfe0bf;
  color: #2f6b2f;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 12.5px;
}

/* ---------- error page ---------- */

.err-panel { text-align: center; padding: 46px 20px; }
.err-code { font-size: 62px; font-weight: 700; color: #e06a0c; margin: 0; }

/* ---------- service sub-page ---------- */

.crumb-line { font-size: 12px; color: #909090; margin: 0 0 12px; }
.crumb-line a { color: #d96208; }

.onion-addr.big {
  font-size: 13px;
  padding: 6px 10px;
  background: #f2f2f2;
}

.o-meta-left { margin: 8px 0 0; color: #777; font-size: 12px; }

/* ---------- KPI strip on service pages ---------- */

.kpi-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  margin-top: 10px;
}

.kpi {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #ddd;
  padding: 6px 14px;
  min-width: 110px;
}

.kpi-v { font-weight: 700; font-size: 14px; color: #3a3a3a; line-height: 1.3; }
.kpi-l { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: #999; }

.kpi-wide { flex: 1 1 260px; min-width: 240px; justify-content: space-between; gap: 5px; }

.hist-chips { display: flex; flex-wrap: wrap; gap: 4px; }

.h-chip {
  font-family: "Courier New", Courier, monospace;
  font-size: 10.5px;
  color: #666;
  background: #f0f0f0;
  border: 1px solid #e2e2e2;
  padding: 2px 7px;
  white-space: nowrap;
}

.history { border-collapse: collapse; margin-top: 10px; font-size: 11.5px; color: #666; }
.history th, .history td { text-align: left; padding: 3px 14px 3px 0; }
.history th { color: #999; font-weight: 400; text-transform: uppercase; letter-spacing: 1px; font-size: 10px; }

/* ---------- uptime overview on service pages ---------- */

.up-card { padding: 14px 16px 10px; margin-bottom: 18px; }

.up-title { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: #3a3a3a; }

.up-info {
  font-weight: 400;
  color: #999;
  cursor: help;
  font-size: 12px;
}

.up-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.up-range { font-size: 12.5px; color: #888; }

.up-pct { font-size: 14px; font-weight: 700; }

.up-ok-txt { color: #2eb872; }
.up-mid-txt { color: #c9a227; }
.up-bad-txt { color: #d9534f; }

.up-bars {
  display: flex;
  gap: 2px;
  height: 38px;
  align-items: stretch;
}

.up-bar {
  flex: 1 1 0;
  min-width: 1px;
  transform-origin: center bottom;
  transition: transform 0.12s ease, filter 0.12s ease;
  cursor: pointer;
}

.up-bars:has(.up-bar:hover) .up-bar:not(:hover) { opacity: 0.55; }

.up-bar:hover {
  transform: scaleY(1.3);
  filter: brightness(1.18) saturate(1.1);
  position: relative;
  z-index: 1;
}

.up-bar.up-ok { background: #2eb872; }
.up-bar.up-none { background: #4a4e54; }
.up-bar.up-mid { background: #d9bd52; }
.up-bar.up-bad { background: #d9534f; }

.up-ticks { position: relative; height: 18px; margin-top: 4px; }

.up-tick {
  position: absolute;
  transform: translateX(-50%);
  font-size: 11px;
  color: #999;
  white-space: nowrap;
}

.up-tick:first-child { transform: none; }
.up-tick:last-child { transform: translateX(-100%); }

.addr-link { text-decoration: none; display: inline-flex; }
.addr-link:hover { text-decoration: none; }
.addr-link:hover .onion-addr { border-color: #e06a0c; color: #d96208; }

.onion-addr { line-height: 1.5; }

.o-line {
  --row-h: 28px;
  display: flex;
  flex-wrap: nowrap; /* address, copy, open and badge always share one line */
  align-items: stretch;
  gap: 8px;
  padding: 5px 0 0;
}

.o-line.row-lg { --row-h: 36px; }

/* controls in an address row share the row height - the address shrinks
   instead of pushing the buttons to a second line */
.o-line .copy-wrap,
.o-line .addr-link,
.o-line .copy-btn,
.o-line .line-right,
.o-line .open-btn,
.o-line .badge {
  height: auto;
  min-height: var(--row-h);
}

.o-line .copy-wrap { flex: 0 1 auto; min-width: 0; flex-wrap: nowrap; }
.o-line .addr-link { min-width: 0; overflow: hidden; }
.o-line .copy-btn,
.o-line .line-right { flex: 0 0 auto; }

/* the address text itself never wraps: it truncates with an ellipsis
   instead (the copy button still copies the full address) */
.o-line .addr-link .onion-addr {
  display: block;
  width: 100%;
  height: auto;
  min-height: var(--row-h);
  margin: 0;
  padding: 8px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.line-right {
  margin-left: auto;
  display: inline-flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 8px;
}

/* status badge stretches to the exact height of the address element */
.o-line > .badge,
.line-right .badge {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  white-space: nowrap;
}

.open-btn {
  display: inline-flex;
  align-items: center;
  height: 28px; /* same as the copy button row height (--row-h) */
  padding: 0 16px;
  background: #e06a0c;
  border: 1px solid #e06a0c;
  color: #fff;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.open-btn:hover {
  background: #c55a0a;
  border-color: #c55a0a;
  color: #fff;
  text-decoration: none;
}

/* secondary action button - the quiet companion next to open-btn
   (stop / suggest / again actions; copy chips stay .copy-btn) */
.btn-sec {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 14px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  color: #555;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.5px;
  cursor: pointer;
}

.btn-sec:hover { background: #e06a0c; border-color: #e06a0c; color: #fff; }

/* inside address rows the button stays exactly one row tall */
.o-line .open-btn {
  min-height: 0;
  padding: 0 16px;
}

.o-line + .o-line { margin-top: 4px; }

/* ---------- category sections (front page) ---------- */

.cat-section {
  margin: 0 0 30px;
  border: 1px solid #d5d5d5;
  border-top: 3px solid #e06a0c;
  background: #f7f7f7;
  overflow: hidden;
}

.cat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 11px 16px;
  background: #efefef;
  border-bottom: 1px solid #ddd;
}

.cat-title {
  margin: 0;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.cat-title a { color: #3a3a3a; }
.cat-title a:hover { color: #d96208; text-decoration: none; }

.cat-more { font-size: 12px; color: #d96208; white-space: nowrap; }

.cat-body { padding: 12px 14px 4px; }

.cat-body .o-card { box-shadow: none; margin-bottom: 10px; }

/* "display more" link under a truncated category preview on the home page */
.cat-more-row { text-align: center; padding: 2px 14px 12px; }
.cat-more-row .open-btn { font-size: 12px; padding: 6px 14px; }

/* ---------- news (same card language as the rest of the site) ---------- */

.news-list { border-top: 0; }

.news-item {
  padding: 14px 2px;
  border-bottom: 1px solid #e4e4e4;
}

.news-item:first-child { padding-top: 2px; }
.news-item:last-child { border-bottom: 0; padding-bottom: 6px; }

.news-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 5px; }

.news-cat {
  font-size: 11px;
  color: #d96208;
  text-decoration: none;
}

.news-cat:hover { text-decoration: underline; }

.news-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #e06a0c;
  background: #fdeee2;
  padding: 2px 8px;
}

.news-tag:hover { background: #e06a0c; color: #fff; text-decoration: none; }

.news-date { font-size: 11px; color: #999; font-family: "Courier New", Courier, monospace; }

.news-title { margin: 0 0 6px; font-size: 16.5px; line-height: 1.35; }
.news-title a { color: #2f2f2f; }
.news-title a:hover { color: #d96208; text-decoration: none; }

.news-excerpt { margin: 0 0 8px; color: #5c5c5c; font-size: 13px; line-height: 1.5; }
.news-item .news-excerpt:last-child { margin-bottom: 0; }

.news-more { font-size: 12px; font-weight: 700; margin-left: auto; }

.news-item.clickable { cursor: pointer; }
.news-item.clickable:hover { background: #fafafa; }
.news-item.clickable:hover .news-title a { color: #d96208; }

/* ---------- pagination ---------- */

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  margin: 20px 0 4px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #ddd;
  background: #fff;
  color: #474747;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.page-btn:hover { border-color: #e06a0c; color: #d96208; text-decoration: none; }

.page-btn.current {
  background: #e06a0c;
  border-color: #e06a0c;
  color: #fff;
  cursor: default;
}

.page-gap {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  color: #999;
  font-size: 13px;
}

.news-article {
  max-width: 800px;
  padding: 30px 34px 32px;
  border-top: 3px solid #e06a0c;
  overflow-wrap: break-word;
}

.news-article h1 {
  margin: 6px 0 18px;
  font-size: 32px;
  line-height: 1.18;
  color: #222;
  letter-spacing: -0.5px;
}

.news-article .news-meta {
  margin-bottom: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8e8e8;
  font-size: 12.5px;
}

.news-article p { line-height: 1.8; color: #383838; font-size: 18px; margin: 0 0 24px; }
.news-article p:last-child { margin-bottom: 0; }
.news-article .lead { font-size: 19.5px; line-height: 1.7; color: #2b2b2b; margin: 26px 0 24px; }
.news-article strong { color: #1a1a1a; }
.news-article em { color: #333; }

.news-article h2 {
  margin: 42px 0 16px;
  font-size: 23px;
  line-height: 1.3;
  color: #1f1f1f;
  letter-spacing: -0.2px;
}

.news-article h2::before {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  background: #e06a0c;
  margin-bottom: 12px;
}

.news-article h3 { margin: 28px 0 12px; font-size: 19.5px; color: #262626; }

.news-article p + h2 { margin-top: 44px; }

.news-article a { color: #d96208; text-decoration: underline; text-decoration-color: rgba(224, 106, 12, 0.35); text-underline-offset: 2px; }
.news-article a:hover { color: #b35206; text-decoration-color: #b35206; }

.news-article blockquote {
  position: relative;
  margin: 30px 0;
  padding: 18px 24px 18px 60px;
  border-left: 3px solid #e06a0c;
  background: #f7f7f7;
  color: #383838;
  font-style: italic;
  font-size: 18px;
  line-height: 1.7;
}
.news-article blockquote::before {
  content: "\201C";
  position: absolute;
  left: 18px;
  top: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 44px;
  line-height: 1;
  color: #e06a0c;
  font-style: normal;
}
.news-article blockquote p:last-child { margin-bottom: 0; }

.news-article ul {
  margin: 0 0 24px;
  padding-left: 8px;
  list-style: none;
  color: #3f3f3f;
  font-size: 17px;
}

.news-article li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  line-height: 1.7;
}

.news-article ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  background: #e06a0c;
}

.news-article ol {
  margin: 0 0 24px;
  padding-left: 28px;
  color: #3f3f3f;
  font-size: 17px;
  line-height: 1.7;
}

.news-article ol li { margin-bottom: 12px; padding-left: 4px; }
.news-article ol li::marker { color: #d96208; font-weight: 700; }

.news-article code {
  background: #f3f3f3;
  border: 1px solid #e5e5e5;
  padding: 1px 6px;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  color: #b35206;
  word-break: break-all;
}

.news-back { margin: 18px 0; }

.news-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }

.news-tags .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  background: #fff;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.chip-on { background: #e06a0c !important; color: #fff !important; }
.chip-on .cnt { background: rgba(255, 255, 255, 0.25) !important; color: #fff !important; }

/* ---------- tools ---------- */

.tool-list { display: flex; flex-direction: column; gap: 6px; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
}
@media (max-width: 640px) { .tool-grid { grid-template-columns: 1fr; } }

.tool-item {
  display: block;
  padding: 12px 14px;
  border: 1px solid #ddd;
  background: #fafafa;
}
.tool-item:hover { border-color: #e06a0c; text-decoration: none; background: #fff8f2; }

.tool-name { display: block; font-weight: 700; font-size: 14px; color: #3a3a3a; }
.tool-item:hover .tool-name { color: #d96208; }
.tool-desc { display: block; margin-top: 4px; color: #6b6b6b; font-size: 12.5px; line-height: 1.5; }

.frow { margin: 0 0 14px; }
.frow-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

.flabel {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #777;
  margin: 0 0 6px;
}

.fhint { margin: 6px 0 0; font-size: 11.5px; color: #999; line-height: 1.5; }

.status-err { color: #a33327; }

/* ---------- processing mode selector ---------- */

.mode-select {
  border: 1px solid #d5d5d5;
  border-left: 3px solid #e06a0c;
  background: #fafafa;
  padding: 10px 14px;
  margin: 0 0 14px;
}

.mode-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #777;
  margin: 0 0 8px;
}

.mode-opts { display: flex; gap: 10px; flex-wrap: wrap; }

.mode-opt {
  flex: 1 1 240px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  background: #fff;
  border: 1px solid #ccc;
  cursor: pointer;
}
.mode-opt:hover { border-color: #e06a0c; }
.mode-opt input[type="radio"] { margin-top: 2px; accent-color: #e06a0c; cursor: pointer; }
.mode-opt:has(input:checked) { border-color: #e06a0c; background: #fff8f2; }

.mode-text strong { display: block; font-size: 13px; color: #2f2f2f; }
.mode-text small { display: block; margin-top: 2px; font-size: 11px; color: #888; line-height: 1.45; }

.mode-noscript {
  margin: 9px 0 0;
  padding: 8px 11px;
  background: #faf3da;
  border: 1px solid #e5d9a4;
  color: #6b5500;
  font-size: 12px;
  line-height: 1.5;
}

/* ---------- tool page fields (all textfields on /tools pages) ---------- */

.tool-page input[type="text"],
.tool-page input[type="password"],
.tool-page select,
.tool-page textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #c6c9cd;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  color: #2f3134;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.tool-page select {
  max-width: 380px;
  cursor: pointer;
}

.tool-page textarea {
  min-height: 88px;
  resize: vertical;
}

.tool-page textarea.mono-area {
  font-family: "Courier New", Courier, monospace;
  font-size: 11.5px;
  line-height: 1.55;
  word-break: break-all;
  white-space: pre-wrap;
}

/* readonly output fields look like result containers, not editable inputs */
.tool-page textarea[readonly] {
  background: #fafafa;
  cursor: default;
}
.tool-page textarea[readonly]:focus {
  box-shadow: none;
  border-color: #c6c9cd;
}

.tool-page ::placeholder { color: #a5aaaf; opacity: 1; }
.tool-page textarea.mono-area::placeholder { font-size: 11.5px; }

.tool-page input:focus,
.tool-page select:focus,
.tool-page textarea:focus {
  border-color: #e06a0c;
  box-shadow: 0 0 0 3px rgba(224, 106, 12, 0.14);
  outline: none;
}

.tool-page input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #e06a0c;
  cursor: pointer;
}

.verif-line {
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}
.verif-line.ok { background: #eef7ee; border: 1px solid #bfe0bf; color: #256d25; }
.verif-line.bad { background: #fbe9e7; border: 1px solid #ecc4c0; color: #a33327; }

.mono-sm { font-family: "Courier New", Courier, monospace; font-size: 12px; word-break: break-all; }

.tool-nav { flex-direction: row !important; flex-wrap: wrap; gap: 6px; margin-bottom: 0; }
.tool-nav .chip { border: 1px solid #ddd; }

.tool-nav-groups { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.tool-nav-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tool-nav-label {
  flex: 0 0 auto;
  width: 74px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #999;
}
.tool-nav-row .tool-nav { flex: 1 1 auto; }

@media (prefers-color-scheme: dark) {
  .tool-item { background: #222327; border-color: #33353a; }
  .tool-item:hover { background: #262018; }
  .tool-name { color: #e0e0e2; }
  .tool-desc { color: #989ca2; }
  .flabel { color: #85898f; }
  .fhint { color: #77797d; }
  .status-err { color: #e08a80; }
  .tool-page input[type="text"],
  .tool-page input[type="password"],
  .tool-page select,
  .tool-page textarea { background-color: #1e1f23; border-color: #3a3c41; color: #c9cbce; }
  .tool-page textarea[readonly] { background: #232428; }
  .tool-page textarea[readonly]:focus { border-color: #3a3c41; }
  .tool-page ::placeholder { color: #6d7178; }
  .verif-line.ok { background: #1d2b1d; border-color: #35502f; color: #7fc97f; }
  .verif-line.bad { background: #331a17; border-color: #5c2f28; color: #e08a80; }
  .tool-nav .chip { border-color: #33353a; }
}

/* ---------- tool workflow ui ---------- */

.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }

.step-num {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  background: #e06a0c;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.step-num.done { background: #2f8a3a; }

.step-title { margin: 0; font-size: 15.5px; color: #2b2b2b; line-height: 1.3; }
.step-hint { margin: 0 0 12px 36px; color: #777; font-size: 12.5px; line-height: 1.5; }

.gen-card { border-top: 3px solid #e06a0c; }

.btn-big { padding: 10px 22px; font-size: 14px; }

.pass-row { display: flex; gap: 7px; align-items: stretch; }
.pass-row input { flex: 1 1 auto; min-width: 0; }
/* a button beside a textbox takes the textbox's height, not its own */
.pass-row .btn-sec,
.pass-row .open-btn,
.pass-row .copy-btn { height: auto; min-height: 0; }
.pass-suggest { white-space: nowrap; }

.adv-details { margin-top: 4px; font-size: 13px; color: #555; }
.adv-details summary { cursor: pointer; color: #d96208; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.8px; }
.adv-details[open] summary { margin-bottom: 10px; }

.mono-inline {
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  background: #f2f2f2;
  padding: 1px 5px;
  white-space: nowrap;
}

.key-block-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 11px;
  margin-bottom: -1px;
}
.key-block-head.pub { background: #e2f2e2; border: 1px solid #bfe0bf; }
.key-block-head.priv { background: #fbe9e7; border: 1px solid #ecc4c0; }
.key-block-title { font-weight: 700; font-size: 13.5px; }
.key-block-head.pub .key-block-title { color: #256d25; }
.key-block-head.priv .key-block-title { color: #a33327; }
.key-block-note { font-size: 11.5px; color: #666; }
.key-block-note.warn { color: #a33327; font-weight: 700; }

.warn-box {
  background: #faf3da;
  border: 1px solid #e5d9a4;
  color: #6b5500;
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.55;
  margin-top: 16px;
}

.ok-box {
  background: #eef7ee;
  border: 1px solid #bfe0bf;
  color: #256d25;
  padding: 9px 14px;
  font-size: 12.5px;
  margin-bottom: 10px;
}

.next-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.next-row.standalone { margin: 0 0 18px; }
.next-row .chip { border: 1px solid #ddd; }

.detect-line { min-height: 18px; margin: 8px 0 0; font-size: 12.5px; font-weight: 700; color: #999; }
.detect-line.ok { color: #256d25; }
.detect-line.bad { color: #a33327; }

.verdict {
  padding: 14px 16px;
  font-size: 15px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.verdict strong { font-size: 17px; letter-spacing: 0.5px; overflow-wrap: anywhere; }
.verdict span { font-size: 13px; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }

/* long hashes/addresses rendered into tool result details must break */
#ov-detail, #xv-detail, #st-detail, .detect-line { overflow-wrap: anywhere; word-break: break-all; }
.verdict.ok { background: #eef7ee; border: 2px solid #2f8a3a; color: #1e5c28; }
.verdict.bad { background: #fbe9e7; border: 2px solid #a33327; color: #8c2318; }

.verif-line.info {
  background: #edf2fa;
  border: 1px solid #c3d4ef;
  color: #2c4d80;
}

.verdict.idle { background: #f2f2f2; border: 2px dashed #c9c9c9; color: #888; }
.verdict.warn { background: #faf3da; border: 2px solid #c9a227; color: #7a6100; }

/* passphrase generator */
.pp-controls { display: flex; gap: 18px; flex-wrap: wrap; }
.pp-half { flex: 1 1 220px; }
.pp-half input[type="range"] { width: 100%; accent-color: #e06a0c; cursor: pointer; margin-top: 8px; }

.pp-output-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pp-output {
  flex: 1 1 320px;
  min-width: 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 16.5px;
  font-weight: 700;
  word-break: break-all;
  line-height: 1.5;
  background: #f7f7f7;
  border: 1px solid #d9d9d9;
  padding: 14px 16px;
  color: #2b2b2b;
}
.pp-actions { gap: 10px; }
.pp-actions .copy-btn {
  font-size: 12px;
  padding: 10px 14px;
  min-width: 80px;
}

/* sha256 tabs + dropzone */
button.chip {
  font-family: Arial, Helvetica, sans-serif;
  background: none;
  border: 1px solid #ddd;
  cursor: pointer;
}
button.chip:hover { text-decoration: none; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 34px 20px;
  border: 2px dashed #c6c9cd;
  background: #fafafa;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.drag { border-color: #e06a0c; background: #fff8f2; }
.dropzone input[type="file"] { display: none; }
.drop-title { font-weight: 700; font-size: 14px; color: #3a3a3a; }
.drop-sub { font-size: 11.5px; color: #999; }

/* ---------- responsive ---------- */

/* collapse the rail under the content early enough that the main
   column never gets squeezed into overflow (265px rail + gap) */
@media (max-width: 1000px) {
  /* stretch (not flex-start): with flex-start the columns stay
     fit-content wide and nowrap address rows blow out the layout */
  .cols { flex-direction: column; align-items: stretch; }
  .rail { width: 100%; flex: 1 1 auto; }
  .chips { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 720px) {
  .o-side { text-align: left; max-width: none; }
  .o-card { flex-direction: column; gap: 8px; }
  /* the meta line sits full width under the card content here - let it
     wrap instead of pushing the card wide */
  .o-meta { white-space: normal; }

  /* status badge: pinned into the card's top-right corner, level with the
     service name; the title line reserves the corner so its text never
     runs under the badge */
  .o-card { position: relative; }
  .o-title { padding-right: 86px; }
  .o-side .badge { position: absolute; top: 11px; right: 11px; }

  /* meta stats on one row: each stat is wrapped in a .m-seg span (the
     spans are the flex items - a display:none <br> does not split anonymous
     runs, so bare text would merge into "uptime1 address"), the <br>s stay
     for the desktop stack, and dots mark the stat boundaries */
  .o-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 7px;
    margin-top: 0;
    line-height: 1.5;
  }
  .o-meta br { display: none; }
  .o-meta .m-seg ~ .m-seg::before {
    content: "·";
    margin: 0 7px;
    opacity: 0.55;
  }

  /* ---------- phone layout: one-hand browsing, thumb-sized controls ---------- */

  /* subtle orange flash instead of the default grey on tap */
  a, button, summary, label[for] { -webkit-tap-highlight-color: rgba(224, 106, 12, 0.18); }

  /* header: compact brand row + a single swipeable nav line */
  .head-inner { padding: 12px 14px 8px; }
  .head-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -14px;
    padding: 0 14px 6px;
    scrollbar-width: none;
  }
  .head-nav::-webkit-scrollbar { display: none; }
  .head-nav a { flex: 0 0 auto; font-size: 14px; padding: 9px 12px; }
  .status-strip-inner { padding: 6px 14px; }

  /* reclaim vertical space: tighter gutters, same hierarchy */
  .wrap { padding: 12px 14px 24px; }
  .card { padding: 14px; margin-bottom: 14px; }
  .cat-section { margin-bottom: 20px; }
  .cat-body { padding: 10px 12px 2px; }
  .cat-title { font-size: 15px; letter-spacing: 0.5px; }

  /* readable card text at arm's length */
  .o-name { font-size: 15.5px; }
  .o-note { font-size: 12px; }
  .o-desc { font-size: 13.5px; line-height: 1.55; }
  .o-meta { font-size: 12px; line-height: 1.7; }
  .o-side .badge { font-size: 11px; padding: 4px 10px; }
  .crumb-line { font-size: 13px; }
  .onion-addr { font-size: 12px; }

  /* address rows: the address gets the full width (readable instead of a
     cramped ellipsis), copy/open/badge wrap underneath at thumb size */
  .o-line { flex-wrap: wrap; row-gap: 8px; }
  .o-line .copy-wrap { flex: 1 1 100%; }
  .o-line .addr-link { flex: 1 1 auto; }
  .o-line .addr-link .onion-addr { font-size: 12.5px; padding: 11px 12px; min-height: 44px; }
  .o-line .copy-btn { min-width: 84px; min-height: 44px; font-size: 12px; }
  .o-line .line-right { width: 100%; margin-left: 0; }
  .o-line .open-btn { flex: 1 1 auto; min-height: 44px; font-size: 13px; }
  .o-line > .badge, .o-line .line-right .badge { min-height: 44px; font-size: 11px; }

  /* tor banner: tighter copy, a dismiss button fingers can hit */
  .tor-banner-inner { font-size: 12.5px; padding: 9px 42px 9px 14px; }
  .tor-banner-close { font-size: 24px; padding: 10px 12px; right: 2px; }

  /* footer: airier lines are easier to tap and read */
  .site-foot-inner { padding: 16px 14px; line-height: 2.2; font-size: 12.5px; }

  /* thumb-sized controls everywhere */
  .copy-btn, .open-btn, .btn-sec { min-height: 44px; }
  .open-btn { font-size: 13px; }
  .btn-sec { font-size: 12.5px; }
  .cat-more-row .open-btn { padding: 10px 14px; }
  .page-btn { min-width: 44px; height: 44px; }
  .pagination { gap: 7px; }
  .tool-page input[type="checkbox"] { width: 18px; height: 18px; }

  /* news list a touch larger */
  .news-title { font-size: 17px; }
  .news-excerpt { font-size: 13.5px; }
  .news-tags .chip { padding: 8px 13px; }

  /* rail cards below the content: comfortable reading */
  .rail .card { padding: 14px; }
  .rail-link { font-size: 13px; padding: 9px 10px; }
  .rail-note, .legend p { font-size: 13px; }
  .steps-mini { font-size: 13px; }

  /* tool nav: group label above, one swipeable chip strip per group */
  .tool-nav-label { width: 100%; }
  .tool-nav-row .tool-nav {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -14px;
    padding: 0 14px 4px;
    scrollbar-width: none;
  }
  .tool-nav-row .tool-nav::-webkit-scrollbar { display: none; }
  .tool-nav .chip { flex: 0 0 auto; padding: 9px 13px; font-size: 12.5px; }

  /* 16px form controls stop the iOS focus zoom */
  .faq input, .faq select, .faq textarea,
  .tool-page input, .tool-page select, .tool-page textarea { font-size: 16px; }
}

@media (max-width: 560px) {
  .brand { font-size: 26px; }

  /* rail category chips: a tidy two-column grid instead of a ragged wrap */
  .rail .chips { display: grid; grid-template-columns: 1fr 1fr; }

  /* kpi chips on service pages: same two-column treatment */
  .kpi-row { display: grid; grid-template-columns: 1fr 1fr; }
  .kpi { min-width: 0; }
  .kpi-wide { grid-column: 1 / -1; min-width: 0; }

  /* narrow phones: shave the double card padding inside category blocks */
  .cat-body { padding: 8px 8px 0; }
  .cat-body .o-card { padding: 12px 10px; }

  /* news article: reclaim horizontal space */
  .news-article { padding: 20px 16px; }
  .news-article h1 { font-size: 24px; }
  .news-article p, .news-article li { font-size: 16px; }
  .news-article blockquote { padding: 14px 16px 14px 44px; }

  /* 16px inputs prevent the iOS focus auto-zoom */
  .faq input, .faq select, .faq textarea,
  .tool-page input, .tool-page select, .tool-page textarea { font-size: 16px; }

  /* uptime bars: halve the resolution so bars stay readable */
  .up-bars { gap: 1px; }
  .up-bar:nth-child(2n) { display: none; }
  .up-tick { font-size: 10px; }
  .up-tick:nth-child(even) { display: none; }

  /* inline code snippets (vanity prefixes etc.) wrap instead of
     overflowing their paragraph */
  .mono-inline { white-space: normal; overflow-wrap: anywhere; }
}

/* ---------- mobile hamburger menu ----------
   progressive enhancement: site.js shuttles the header nav and the rail
   sidebar into a dropdown panel under the header. without javascript the
   nav stays a swipeable row and the rail stacks below the content; above
   720px the header and rail render exactly as they always have. */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle-box { display: block; width: 100%; }

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: #f2f3f5;
  border-radius: 1px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

/* the panel markup is inert until js activates it */
.site-menu { display: none; }

@media (max-width: 720px) {
  body.js-menu .nav-toggle { display: inline-flex; }

  /* the open panel + header must paint above the page overlay */
  body.js-menu .site-head { position: relative; z-index: 50; }

  /* nav lives in the panel now, so the header row is brand + toggle */
  body.js-menu .head-inner { flex-wrap: nowrap; padding-bottom: 12px; }
  body.js-menu .head-inner .head-nav { display: none; }

  body.js-menu .site-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - 100%);
    max-height: calc(100dvh - 100%);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #ececec;
    border-bottom: 3px solid #e06a0c;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
  }
  body.js-menu.menu-open .site-menu {
    display: block;
    animation: menu-drop 0.16s ease;
  }

  /* site links: full-width tap rows instead of the swipe strip */
  .site-menu .head-nav {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    overflow: visible;
    margin: 0;
    padding: 6px 0;
    scrollbar-width: auto;
    border-bottom: 1px solid #d9d9d9;
  }
  .site-menu .head-nav::-webkit-scrollbar { display: block; }
  .site-menu .head-nav a { flex: none; font-size: 15.5px; padding: 13px 18px; }
  .site-menu .head-nav a:hover { color: #b85406; background: #fdeeda; }
  .site-menu .head-nav a.here { color: #b85406; background: #fdeeda; }

  /* the page's rail renders as flat sections below the site links */
  .site-menu .rail { width: 100%; flex: none; padding: 14px 14px 0; }
  .site-menu .rail .card { margin-bottom: 14px; }

  /* footer-only site links, promoted into the menu as chips */
  .site-menu-more {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 2px 14px 16px;
  }
  .site-menu-more a {
    flex: 0 0 auto;
    font-size: 12.5px;
    color: #6b6e73;
    background: #fff;
    border: 1px solid #d2d5d9;
    padding: 9px 12px;
  }
  .site-menu-more a:hover { color: #b85406; border-color: #e06a0c; text-decoration: none; }

  /* hamburger -> x while the menu is open */
  body.menu-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.menu-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
  body.menu-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* dim and lock the page behind the open panel (js sets overflow) */
  body.menu-open { overflow: hidden; }
  body.menu-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 40;
  }

  /* sidebar ads stay in the page flow below the content while the rail
     itself is shuttled into the menu */
  .rail-spots { margin-top: 14px; }
  .rail-spots:empty { display: none; }
}

@keyframes menu-drop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .site-menu { animation: none !important; }
}

@media (prefers-color-scheme: dark) {
  body.js-menu .site-menu { background: #141518; }
  .site-menu .head-nav { border-bottom-color: #2a2c30; }
  .site-menu .head-nav a { color: #b9bdc3; }
  .site-menu .head-nav a:hover { color: #fff; background: #232427; }
  .site-menu .head-nav a.here { color: #f07a17; background: #2c1e10; }
  .site-menu-more a { color: #b0b4b9; border-color: #2a2c30; background: #1e1f23; }
  .site-menu-more a:hover { color: #f07a17; border-color: #e06a0c; }
}

/* bigger touch targets on touch devices */
@media (pointer: coarse) {
  .copy-btn, .open-btn, .btn-sec { min-height: 40px; }
  .head-nav a { padding: 10px 14px; }
  .tool-nav { gap: 8px; }
  .tool-nav .chip { padding: 9px 12px; }
}

/* ---------- auto dark mode ---------- */

@media (prefers-color-scheme: dark) {
  body { background: #141518; color: #c9cbce; }
  .card, .o-card { background: #1e1f23; border-color: #33353a; box-shadow: none; }
.o-card:hover { border-color: #e06a0c; }

  .intro h1 { color: #e8e9eb; }
  .intro p, .faq dd, .howto-list { color: #a7aaaf; }
  .faq dt { color: #d3d5d8; }
  .o-desc { color: #989ca2; }
  .o-meta-line { color: #85898f; }
  .o-meta-line b { color: #c9cbce; }
  .o-name { color: #f07a17; }
  .o-card.hl { background: #2b2115; border-color: #54401f; }
  .onion-addr { background: #26282c; color: #8f939a; }
  .onion-addr.big { background: #26282c; }
  .chip { color: #b9bdc3; }
  .chip:hover { background: #26282c; }
  .chip .cnt { background: #2c2e33; color: #888c92; }
  .legend p, .rail-note { color: #979ba1; }
  .rail .legend p + p { border-color: #2a2c30; }
  .rail-link { color: #b0b4b9; border-color: #2a2c30; }
  .rail-link:hover { color: #f07a17; background: #232428; }
  .rail-link-current, .rail-link-current:hover { color: #f07a17; background: #2c1e10; }
  .rail-link-meta, .rail-sub { color: #85898f; }
  .steps-mini { color: #979ba1; }
  .muted { color: #77797d; }
  a { color: #f07a17; }

  .kpi { background: #26282c; border-color: #33353a; }
  .kpi-v { color: #e8e9eb; }
  .kpi-l { color: #85898f; }
  .h-chip { background: #2c2e33; border-color: #3a3c41; color: #9aa0a6; }

  .up-title { color: #e8e9eb; }
  .up-info { color: #85898f; }
  .up-range { color: #979ba1; }
  .up-ok-txt { color: #55b75b; }
  .up-bar.up-ok { background: #2eb872; }
  .up-bar.up-none { background: #565a61; }
  .up-bar.up-mid { background: #d9bd52; }
  .up-bar.up-bad { background: #e06a5a; }
  .up-tick { color: #85898f; }
  .spot-open .spot-note { color: #85898f; }
  .news-item { border-color: #33353a; }
  .news-article .news-meta { border-color: #2a2c30; }
  .news-article h1 { color: #f0f1f2; }
  .news-article h2 { color: #e8e9eb; }
  .news-article h3 { color: #dfe1e4; }
  .news-article .news-meta { border-color: #2a2c30; }
  .news-article p { color: #c0c4c8; }
  .news-article .lead { color: #d8dbde; }
  .news-article .lead { color: #d2d5d8; }
  .news-article .lead::first-letter { color: #f07a17; }
  .news-article strong { color: #f5f6f7; }
  .news-article em { color: #c9cbce; }
  .news-article ul, .news-article ol { color: #b8bcc1; }
  .news-article li::marker { color: #f07a17; }
  .news-article ul li::before { background: #f07a17; }
  .news-article blockquote { background: #232428; color: #a7abb0; }
  .news-article blockquote::before { color: #f07a17; }
  .news-article code { background: #26282c; border-color: #33353a; color: #f0955a; }

  .cat-section { background: #1a1b1e; border-color: #33353a; }
  .cat-head { background: #222327; border-color: #2d2e32; }
  .cat-title a { color: #e0e0e2; }
  .cat-title a:hover { color: #f07a17; }
  .news-tag { background: #3a2413; color: #f0955a; }
  .news-tag:hover { background: #e06a0c; color: #fff; }
  .news-tags .chip { background: #1e1f23; border-color: #33353a; }
  .news-cat { color: #f0955a; }
  .news-item.clickable:hover { background: #232428; }

  .page-btn { background: #1e1f23; border-color: #33353a; color: #b0b4b9; }
  .page-btn:hover { border-color: #e06a0c; color: #f07a17; }
  .page-btn.current { background: #e06a0c; border-color: #e06a0c; color: #fff; }
  .page-gap { color: #85898f; }
  .hl-tag { background: #3a2413; color: #f0955a; border-color: #57401f; }
  .faq input, .faq select, .faq textarea { background-color: #1e1f23; border-color: #3a3c41; color: #c9cbce; }
  .news-title a { color: #e8e9eb; }
  .news-title a:hover { color: #f07a17; }
  .news-excerpt, .news-post p { color: #a7aaaf; }
  .news-post h1 { color: #e8e9eb; }

  .copy-btn { background: #2c2e33; border-color: #3a3c41; color: #9aa0a6; }
  .btn-sec { background: #2c2e33; border-color: #3a3c41; color: #9aa0a6; }
  .btn-sec:hover { background: #e06a0c; border-color: #e06a0c; color: #fff; }
  .copy-btn:hover { background: #e06a0c; border-color: #e06a0c; color: #fff; }
  .copy-btn.copied, .copy-btn.copied:hover { background: #1d2b1d; border-color: #35502f; color: #7fc97f; }

  .verdict.idle { background: #1e1f23; border-color: #3a3c41; color: #85898f; }
  .verdict.warn { background: #2e2913; border-color: #57491c; color: #d9bd52; }

  .pp-output { background: #232428; border-color: #3a3c41; color: #e8e9eb; }
  .dropzone { background: #222327; border-color: #3a3c41; }
  .dropzone:hover, .dropzone.drag { background: #2c1e10; border-color: #e06a0c; }
  .drop-title { color: #e0e0e2; }
  .drop-sub { color: #77797d; }
  button.chip { background: none; border-color: #33353a; }

  .st-on   { background: #1d2b1d; color: #7fc97f; border-color: #35502f; }
  .mode-select { background: #1e1f23; border-color: #33353a; }
  .mode-opt { background: #232428; border-color: #3a3c41; }
  .mode-opt:has(input:checked) { background: #2c1e10; border-color: #e06a0c; }
  .mode-text strong { color: #e0e0e2; }
  .mode-text small { color: #85898f; }
  .mode-noscript { background: #2e2913; border-color: #57491c; color: #d9bd52; }
  .st-slow { background: #2e2913; color: #d9bd52; border-color: #57491c; }
  .st-off  { background: #331a17; color: #e08a80; border-color: #5c2f28; }
  .st-unk  { background: #242528; color: #9a9ca1; border-color: #3a3c41; }
  .spot-note { background: #2c1e10; color: #f0955a; border-color: #57401f; }

  .step-title { color: #e8e9eb; }
  .step-hint { color: #85898f; }
  .mono-inline { background: #26282c; color: #9aa0a6; }

  .key-block-head.pub { background: #1d2b1d; border-color: #35502f; }
  .key-block-head.priv { background: #331a17; border-color: #5c2f28; }
  .key-block-head.pub .key-block-title { color: #7fc97f; }
  .key-block-head.priv .key-block-title { color: #e08a80; }
  .key-block-note { color: #979ba1; }
  .key-block-note.warn { color: #e08a80; }

  .warn-box { background: #2e2913; border-color: #57491c; color: #d9bd52; }
  .ok-box { background: #1d2b1d; border-color: #35502f; color: #7fc97f; }

  .detect-line.ok { color: #7fc97f; }
  .detect-line.bad { color: #e08a80; }
  .verdict.ok { background: #1d2b1d; border-color: #35502f; color: #7fc97f; }
  .verdict.bad { background: #331a17; border-color: #5c2f28; color: #e08a80; }
  .verif-line.info { background: #16202e; border-color: #27405e; color: #8fb4dd; }
}

/* ---------- /go tor gate interstitial ---------- */

.gate-flow { display: flex; align-items: center; flex-wrap: wrap; row-gap: 12px; }

.gate-flow .gate-step { display: flex; gap: 9px; align-items: center; }

.gate-flow .gate-step + .gate-step { margin-left: 18px; padding-left: 18px; border-left: 1px solid #e2e2e2; }

.gate-cta-row { text-align: center; margin-top: 16px; }

.gate-step-text { min-width: 0; }

.gate-step b { display: block; font-size: 14px; line-height: 1.25; }

.gate-step small { display: block; margin-top: 2px; color: #85898f; font-size: 11.5px; }

.gate-step small a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* same height as the copy button in the big address row (--row-h: 36px) */
.gate-cta {
  display: inline-flex;
  align-items: center;
  height: 36px;
  margin-left: auto;
  padding: 0 16px;
  background: #e06a0c;
  border: 1px solid #e06a0c;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

.gate-cta:hover { background: #c55a0a; border-color: #c55a0a; color: #fff; text-decoration: none; }

@media (max-width: 720px) {
  .gate-flow .gate-step + .gate-step { width: 100%; margin-left: 0; padding-left: 0; border-left: 0; border-top: 1px solid #e2e2e2; padding-top: 12px; }
  .gate-flow .gate-cta { margin-left: 0; justify-content: center; width: 100%; }
}

@media (prefers-color-scheme: dark) {
  .gate-flow .gate-step + .gate-step { border-left-color: #33353a; }
}

@media (prefers-color-scheme: dark) and (max-width: 720px) {
  .gate-flow .gate-step + .gate-step { border-top-color: #33353a; }
}
