/* ==========================================================================
   Anubis Market clearnet (anubisofficial.store)
   Dark neutral theme, gold accent. Self-hosted fonts (see fonts.css).
   ========================================================================== */

:root {
  --bg:        #0a0c10;
  --bg-panel:  #10141b;
  --bg-inset:  #0d1017;
  --border:    #1e2530;
  --border-2:  #2a3342;
  --text:      #c9cfda;
  --muted:     #8a93a3;
  --dim:       #5c6575;
  --gold:      #c8a24a;
  --gold-hi:   #e0be6a;
  --green:     #3fbf7f;
  --red:       #e0604f;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'IBM Plex Sans', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  word-break: break-all;
}

::selection { background: rgba(200, 162, 74, 0.3); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: #0a0c10;
  padding: 8px 16px;
  z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* --------------------------------------------------------------------------
   Top status bar
   -------------------------------------------------------------------------- */
.topbar {
  background: #07090d;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted);
}
.topbar-in {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 7px;
  padding-bottom: 7px;
  flex-wrap: wrap;
}
.mono { font-family: var(--font-mono); }
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: baseline;
}
.dot.ok  { background: var(--green); box-shadow: 0 0 6px rgba(63, 191, 127, 0.7); }
.dot.err { background: var(--red); }
.topbar-right { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }

/* --------------------------------------------------------------------------
   Site header + nav
   -------------------------------------------------------------------------- */
.site-head {
  background: rgba(10, 12, 16, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.head-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(200, 162, 74, 0.35));
}
.brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--text);
}
.brand-name b { color: var(--gold); font-weight: 700; }

.main-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.main-nav a {
  font-size: 14px;
  color: var(--muted);
  padding: 7px 11px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.main-nav a:hover { color: var(--text); background: var(--bg-panel); }
.main-nav a.active { color: var(--gold); background: rgba(200, 162, 74, 0.08); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-2);
  border-radius: 6px;
  width: 40px;
  height: 36px;
  cursor: pointer;
  padding: 8px 9px;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 1px;
}

/* --------------------------------------------------------------------------
   Main content column
   -------------------------------------------------------------------------- */
main#main {
  min-height: calc(100vh - 260px);
  padding-bottom: 64px;
}

.crumbs {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 24px 0;
  font-size: 13px;
  color: var(--dim);
}
.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.crumbs li { display: flex; align-items: center; gap: 4px; }
.crumbs li + li::before {
  content: '\203a';
  color: var(--dim);
  margin-right: 8px;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--gold); }
.crumbs [aria-current] { color: var(--text); }

.content-block {
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 24px 8px;
}
.content-block:first-of-type { padding-top: 28px; }

.prose-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 18px;
  color: #e8ecf3;
}

h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #e8ecf3;
  margin: 40px 0 14px;
  letter-spacing: 0.01em;
}
.content-block h2:first-child { margin-top: 0; }

h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: #dde2ea;
  margin: 24px 0 8px;
}

p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }
li::marker { color: var(--gold); }

strong { color: #e8ecf3; }

/* Tables (mirrors, fees) */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 22px;
  font-size: 14.5px;
}
th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
td code { word-break: break-all; }
tbody tr:hover { background: rgba(200, 162, 74, 0.04); }

/* Callout (PGP fingerprint etc.) */
.callout {
  background: var(--bg-panel);
  border: 1px solid var(--border-2);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 18px 0;
}
.callout-k {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}
.callout .pgp {
  display: block;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--gold-hi);
  letter-spacing: 0.05em;
  background: none;
  border: none;
  padding: 0;
  word-break: break-all;
}
.callout p { margin: 10px 0 0; font-size: 14.5px; color: var(--muted); }

/* Steps (getting started) */
.steps {
  list-style: none;
  margin: 18px 0 22px;
  padding: 0;
  counter-reset: step;
}
.step {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }
.step-num {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(200, 162, 74, 0.07);
}
.step div { flex: 1; min-width: 0; }
.step h3 { margin: 4px 0 6px; font-size: 16px; }
.step p { margin: 0; font-size: 15px; color: var(--muted); }

/* FAQ */
.faq-list { margin: 18px 0 26px; }
details.faq {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  background: var(--bg-panel);
  overflow: hidden;
}
details.faq summary {
  cursor: pointer;
  padding: 14px 18px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
  color: #dde2ea;
  list-style: none;
  position: relative;
  padding-right: 40px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: '+';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 18px;
  font-family: var(--font-body);
}
details.faq[open] summary::after { content: '\2212'; }
details.faq[open] summary { border-bottom: 1px solid var(--border); }
details.faq p { margin: 0; padding: 14px 18px; font-size: 15px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Hero (home)
   -------------------------------------------------------------------------- */
.hero-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 56px 24px 8px;
}
.hero-logo img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(200, 162, 74, 0.4));
}
.hero-logo .name {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.28em;
  text-transform: lowercase;
  color: var(--muted);
}
.hero-logo .name b { color: var(--gold); }

.page-title {
  max-width: 820px;
  margin: 18px auto 0;
  padding: 0 24px;
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.18;
  color: #eef1f6;
  text-align: center;
  letter-spacing: -0.01em;
}

.hero-lead {
  max-width: 760px;
  margin: 20px auto 0;
  padding: 0 24px;
  text-align: center;
  font-size: 16.5px;
  color: var(--muted);
}
.hero-lead p { margin: 0; }

.status-strip {
  max-width: 760px;
  margin: 28px auto 0;
  padding: 12px 18px;
  background: rgba(63, 191, 127, 0.06);
  border: 1px solid rgba(63, 191, 127, 0.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #bfe6d2;
}
.status-strip .dot { margin-right: 10px; }
.status-meta {
  margin-left: auto;
  color: var(--dim);
  font-size: 13px;
  font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
   Mirrors
   -------------------------------------------------------------------------- */
.mirrors {
  max-width: 760px;
  margin: 34px auto 0;
  padding: 0 24px;
}
.links-label {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 14px;
}
.mirror-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border-2);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 13px 16px;
  margin-bottom: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.mirror-row:hover { border-color: var(--gold); background: #131924; }
.mirror-link {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text);
  word-break: break-all;
  line-height: 1.5;
}
.mirror-link:hover { color: var(--gold-hi); }
.copy-btn {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(200, 162, 74, 0.08);
  border: 1px solid rgba(200, 162, 74, 0.4);
  border-radius: 6px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.copy-btn:hover { background: rgba(200, 162, 74, 0.18); color: var(--gold-hi); }
.copy-btn.copied { background: var(--green); border-color: var(--green); color: #06130c; }
.mirrors p { font-size: 14.5px; color: var(--muted); margin-top: 14px; }

/* --------------------------------------------------------------------------
   News feed (home + journal)
   -------------------------------------------------------------------------- */
.news-feed .news-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
  padding: 18px 20px;
  margin-bottom: 12px;
}
.news-item:hover { border-color: var(--border-2); }
.news-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12.5px;
  color: var(--dim);
  margin-bottom: 8px;
}
.news-date { font-family: var(--font-mono); }
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  background: rgba(200, 162, 74, 0.08);
  border: 1px solid rgba(200, 162, 74, 0.3);
  border-radius: 4px;
  padding: 2px 8px;
}
.news-item h3 { margin: 0 0 6px; font-size: 17px; }
.news-item h3 a { color: #e8ecf3; }
.news-item h3 a:hover { color: var(--gold-hi); }
.news-item .dek { margin: 0; font-size: 14.5px; color: var(--muted); }

.journal-list {
  list-style: none;
  margin: 18px 0 26px;
  padding: 0;
}
.journal-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  padding: 13px 4px;
  border-bottom: 1px solid var(--border);
}
.journal-list li:last-child { border-bottom: none; }
.journal-list a { color: #dde2ea; font-size: 15.5px; }
.journal-list a:hover { color: var(--gold-hi); }
.journal-list .news-date { flex: 0 0 auto; color: var(--dim); font-size: 13px; }

/* --------------------------------------------------------------------------
   Guides nav (home)
   -------------------------------------------------------------------------- */
.guides .guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.guides .guide-links a {
  font-size: 13.5px;
  color: var(--muted);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  padding: 6px 14px;
  transition: color 0.15s, border-color 0.15s;
}
.guides .guide-links a:hover { color: var(--gold-hi); border-color: var(--gold); }

/* --------------------------------------------------------------------------
   Article pages
   -------------------------------------------------------------------------- */
article {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 24px 0;
}
.post-head { margin-bottom: 26px; }
.post-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: var(--dim);
  margin-bottom: 12px;
}
.post-head h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.22;
  color: #eef1f6;
  margin: 0 0 12px;
}
.dek {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.post-body { font-size: 16px; }
.post-body h2 { margin-top: 36px; }

.related {
  max-width: 820px;
  margin: 36px auto 0;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
}
.related h2 { margin: 0 0 12px; font-size: 16px; }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.related li:last-child { border-bottom: none; }
.related a { color: #dde2ea; font-size: 15px; }
.related a:hover { color: var(--gold-hi); }

.news-nav {
  max-width: 820px;
  margin: 28px auto 0;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}
.news-nav a { color: var(--muted); }
.news-nav a:hover { color: var(--gold-hi); }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.err {
  max-width: 640px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}
.err-code {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 700;
  color: var(--gold);
  margin: 0;
  line-height: 1;
}
.err h1 {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 18px 0 12px;
  color: #e8ecf3;
}
.err p { color: var(--muted); }
.btn {
  display: inline-block;
  background: var(--gold);
  color: #0a0c10;
  font-weight: 600;
  border-radius: 8px;
  padding: 11px 22px;
  margin-top: 10px;
}
.btn:hover { background: var(--gold-hi); color: #0a0c10; }

/* --------------------------------------------------------------------------
   Footer (same container width as content)
   -------------------------------------------------------------------------- */
.site-foot {
  background: #07090d;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.3fr;
  gap: 40px;
  padding-top: 44px;
  padding-bottom: 36px;
}
.foot-about .brand { margin-bottom: 14px; }
.foot-about p { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.foot-disc { color: var(--dim); font-size: 13px; }
.foot-h {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin: 0 0 14px;
}
.foot-col { display: flex; flex-direction: column; }
.foot-col a {
  color: var(--muted);
  font-size: 14px;
  padding: 4px 0;
}
.foot-col a:hover { color: var(--gold-hi); }
.foot-onion {
  font-family: var(--font-mono);
  font-size: 12px;
  word-break: break-all;
  line-height: 1.6;
}
.foot-more { color: var(--gold) !important; margin-top: 8px; }
.foot-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 18px;
  padding-bottom: 22px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--dim);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .foot-about { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0b0e14;
    border-bottom: 1px solid var(--border-2);
    flex-direction: column;
    padding: 12px 24px 18px;
    gap: 2px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 8px; border-radius: 6px; }

  .topbar-right { display: none; }

  .hero-logo { padding-top: 40px; }
  .status-meta { margin-left: 0; width: 100%; }

  .mirror-row { flex-wrap: wrap; }
  .mirror-link { flex: 1 1 100%; }
  .copy-btn { margin-left: auto; }

  .foot-grid { grid-template-columns: 1fr; gap: 28px; }

  .news-nav { flex-direction: column; }
  .journal-list li { flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
