:root {
    --blue: #1a73e8;
    --blue-dark: #1557b0;
    --blue-soft: #e8f0fe;
    --ink: #1f2328;
    --muted: #5f6368;
    --line: #e3e6ea;
    --bg: #ffffff;
    --bg-soft: #f6f7f9;
    --green: #188038;
    --radius: 10px;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --shadow: 0 2px 8px rgba(20, 30, 50, 0.10);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
}

.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 14px;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--blue-dark); }

h1, h2, h3 { line-height: 1.25; color: var(--ink); }

/* ---------- header ---------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 40;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 56px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--ink);
    font-weight: 700;
    font-size: 16.5px;
    letter-spacing: -0.2px;
    white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo-tld { color: var(--muted); font-weight: 600; }
.logo-mark { display: block; flex: none; }

/* nav */
.nav { display: flex; align-items: center; }
.nav-list {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
}
.nav-list a {
    display: block;
    padding: 7px 10px;
    border-radius: 7px;
    color: #3c4043;
    font-size: 13.5px;
    font-weight: 500;
}
.nav-list a:hover { background: var(--bg-soft); text-decoration: none; color: var(--ink); }
.nav-list a.active { background: var(--blue-soft); color: var(--blue-dark); }
.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 9px;
    background: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: #3c4043;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.nav.open .nav-list {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 8px 14px 12px;
    box-shadow: var(--shadow);
}
.nav.open .nav-list a { padding: 10px 12px; }
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- page head ---------- */
main { padding-bottom: 44px; }
.page-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    padding: 22px 0 14px;
}
.page-head h1 {
    margin: 0;
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -0.4px;
}
.page-note {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

/* ---------- mirrors block (every page) ---------- */
.mirrors {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 14px;
    margin: 0 0 26px;
}
.mirrors-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
}
.mirror-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.mirror-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.onion {
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.5;
    word-break: break-all;
    color: var(--ink);
    background: none;
}
.onion-tail { color: var(--blue); font-weight: 700; }
.copy-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: var(--blue);
    color: #fff;
    font: 600 12.5px var(--font);
    padding: 7px 14px;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.12s ease;
}
.copy-btn:hover { background: var(--blue-dark); }
.copy-btn.copied { background: var(--green); }
.mirrors-note {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--muted);
}

/* ---------- prose ---------- */
.prose { max-width: 780px; }
.prose p { margin: 0 0 14px; }
.prose h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 30px 0 10px;
    letter-spacing: -0.2px;
}
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 7px; }
.prose code {
    font-family: var(--mono);
    font-size: 12.5px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1px 5px;
    word-break: break-all;
}
.callout {
    border: 1px solid var(--line);
    border-left: 3px solid var(--blue);
    background: var(--blue-soft);
    border-radius: 8px;
    padding: 12px 14px;
    margin: 16px 0;
    font-size: 14px;
}
.callout p { margin: 0; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 14px; }
.steps li {
    counter-increment: step;
    position: relative;
    padding: 0 0 14px 44px;
}
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.steps b { display: block; margin-bottom: 2px; }

/* screen mockups (queue / captcha / did-you-mean) */
.screen {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 14px 0;
    overflow: hidden;
    background: #fff;
}
.screen-bar {
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    padding: 7px 12px;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.screen-body { padding: 18px 14px; text-align: center; }
.screen-body .screen-quote { font-size: 13.5px; color: #3c4043; margin: 10px 0 0; }
.screen-dark { background: #101216; }
.screen-dark .screen-bar { background: #1b1e24; border-color: #2a2e35; color: #9aa0a8; }
.screen-dark .screen-quote { color: #e8eaed; }
.spinner {
    width: 44px;
    height: 44px;
    margin: 6px auto 0;
    border-radius: 50%;
    border: 4px solid #e8eaed;
    border-top-color: var(--blue);
    animation: spin 1.1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.circles-demo { position: relative; height: 90px; margin: 8px auto 4px; max-width: 240px; }
.circles-demo svg { width: 100%; height: 100%; }
.timeout-bar {
    height: 10px;
    border-radius: 6px;
    background: #f5c518;
    max-width: 320px;
    margin: 12px auto 4px;
    overflow: hidden;
    position: relative;
}
.timeout-bar i {
    display: block;
    height: 100%;
    width: 45%;
    background: #e8b400;
}
.timeout-label { font-size: 10.5px; color: #f5c518; margin-top: 2px; }

/* ---------- cards grid (home) ---------- */
.cards-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin: 34px 0 14px;
}
.cards-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    color: var(--ink);
}
.card:hover { box-shadow: var(--shadow); text-decoration: none; transform: translateY(-1px); }
.card-body { padding: 14px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-title { font-size: 13.5px; font-weight: 700; line-height: 1.35; }
.card-desc { font-size: 12px; color: var(--muted); line-height: 1.45; }
.card-foot {
    margin-top: auto;
    padding-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--blue);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; }
.faq-item {
    border: 1px solid var(--line);
    border-radius: 9px;
    margin-bottom: 10px;
    background: #fff;
    overflow: hidden;
}
.faq-item summary {
    cursor: pointer;
    padding: 13px 38px 13px 14px;
    font-weight: 600;
    font-size: 14.5px;
    position: relative;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "";
    position: absolute;
    right: 15px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.15s ease;
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-item .faq-a {
    padding: 0 14px 14px;
    font-size: 14px;
    color: #3c4043;
}
.faq-item .faq-a p { margin: 0 0 10px; }
.faq-item .faq-a p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.site-footer {
    background: var(--bg-soft);
    border-top: 1px solid var(--line);
    margin-top: 20px;
    padding: 28px 0 34px;
}
.foot-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
.foot-h {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #3c4043;
    margin: 0 0 10px;
}
.foot-list {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 1;
}
.foot-list li { margin-bottom: 6px; }
.foot-list a { color: var(--muted); font-size: 13.5px; }
.foot-list a:hover { color: var(--blue); }
.foot-p { font-size: 13.5px; color: var(--muted); margin: 0 0 8px; }
.foot-p a { color: var(--blue); }
.foot-fine { font-size: 12px; color: #80868b; margin: 10px 0 0; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 60px 0 30px; max-width: 560px; margin: 0 auto; }
.notfound .nf-code {
    font-size: 60px;
    font-weight: 800;
    letter-spacing: -2px;
    color: var(--blue);
    margin: 0;
}
.notfound h1 { font-size: 24px; margin: 8px 0 10px; }
.notfound p { color: var(--muted); margin: 0 0 18px; }

/* ---------- desktop ---------- */
@media (min-width: 640px) {
    .mirror-grid { grid-template-columns: repeat(3, 1fr); }
    .mirror-card { padding: 12px 14px 14px; }
    .onion { font-size: 12.5px; }
    .foot-grid { grid-template-columns: 1.2fr 1fr 1.2fr; }
    .foot-list { columns: 2; column-gap: 18px; }
}

@media (min-width: 900px) {
    .cards { grid-template-columns: repeat(3, 1fr); }
    .page-head { padding: 28px 0 16px; }
    .page-head h1 { font-size: 30px; }
}

@media (min-width: 1100px) {
    .nav-toggle { display: none; }
    .nav-list { display: flex; flex-direction: row; }
    .nav.open .nav-list { position: static; box-shadow: none; border: 0; padding: 0; flex-direction: row; }
    .cards { grid-template-columns: repeat(3, 1fr); }
}
