/* site50 — Tor Markets Directory. Incarail-inspired palette: deep forest
   green, coral accent, cream background. Simple, document-like layout. */
:root {
  --green:      #053220;
  --green-2:    #143121;
  --green-3:    #325642;
  --green-soft: #cce9dd;
  --mint:       #bde7b3;
  --coral:      #fc6034;
  --coral-soft: #ffe4d4;
  --gold:       #ffbe0b;
  --cream:      #faf7f0;
  --cream-2:    #f9f7f0;
  --paper:      #ffffff;
  --line:       #e1e1e1;
  --line-2:     #eaeeed;
  --ink:        #1a171a;
  --ink-soft:   #222425;
  --muted:      #5c5d5c;
  --red:        #b01705;
  --shadow:     0 4px 16px rgba(5, 50, 32, .06);
  --radius:     8px;
}
*, *:before, *:after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink); background: var(--cream);
}
a { color: var(--coral); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--green); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

.container { max-width: 980px; margin: 0 auto; padding: 0 18px; }

/* ---- header ---- */
.topbar { background: var(--green); color: var(--cream); border-bottom: 3px solid var(--coral); }
.topbar-inner { display: flex; align-items: center; gap: 18px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--cream); text-decoration: none; }
.brand:hover, .brand:focus { color: var(--cream); text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 6px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text .b1 { font-size: 16px; font-weight: 700; }
.brand-text .b2 { font-size: 11px; color: var(--mint); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

nav.nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
nav.nav a {
  color: var(--cream); padding: 8px 14px; border-radius: 6px;
  font-size: 14px; font-weight: 600; text-decoration: none;
}
nav.nav a:hover { background: rgba(255,255,255,.08); color: var(--cream); }
nav.nav a.on { background: var(--coral); color: var(--paper); }

/* ---- hero ---- */
.hero { background: var(--paper); border-bottom: 1px solid var(--line); padding: 52px 0; }
.hero h1 {
  font-size: 38px; line-height: 1.15; margin: 0 0 14px;
  color: var(--green); letter-spacing: -.01em;
}
.hero .lead { font-size: 18px; color: var(--ink-soft); max-width: 720px; margin: 0; }
.hero .meta { margin-top: 26px; display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.hero .meta b { color: var(--green); display: block; font-size: 20px; }

.hero-sub { background: var(--green-soft); padding: 14px 16px; border-radius: var(--radius); margin-top: 22px; color: var(--green); font-size: 14px; border-left: 4px solid var(--green); }

/* ---- buttons ---- */
.btn { display: inline-block; padding: 10px 18px; border-radius: 6px; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--coral); color: var(--paper); }
.btn-primary:hover { background: #e54f29; color: var(--paper); text-decoration: none; }
.btn-ghost { background: var(--paper); color: var(--green); border: 1px solid var(--green); }
.btn-ghost:hover { background: var(--green-soft); text-decoration: none; }

/* ---- sections ---- */
section { padding: 48px 0; }
section.paper { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
section h2 {
  font-size: 28px; margin: 0 0 8px; color: var(--green);
  border-bottom: 2px solid var(--coral); display: inline-block; padding-bottom: 4px;
}
section h3 { font-size: 18px; margin: 28px 0 8px; color: var(--green-2); }
section p { color: var(--ink-soft); }
section .sub { color: var(--muted); margin-bottom: 22px; max-width: 720px; font-size: 15px; }

/* ---- main directory table ---- */
table.directory {
  width: 100%; border-collapse: collapse; background: var(--paper);
  box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden;
  margin: 10px 0 18px;
}
/* H2 following a .directory table or p/list gets a small breath of top margin
   so it doesn't squash against the previous block. */
section.paper table.directory + h2,
section.paper p + h2,
section.paper ul + h2 { margin-top: 24px; }
table.directory th, table.directory td {
  padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-2); font-size: 14px;
}
table.directory th {
  background: var(--green); color: var(--cream); font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase; font-size: 12px;
}
table.directory tr:last-child td { border-bottom: 0; }
table.directory tbody tr:hover td { background: var(--cream); }
table.directory td.name { font-weight: 700; font-size: 15px; color: var(--green); }
table.directory td.name a { color: var(--green); text-decoration: none; }
table.directory td.name a:hover { color: var(--coral); text-decoration: underline; }
table.directory td.crypto { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); }

/* ---- status pills ---- */
.status {
  display: inline-block; font-size: 11px; padding: 3px 10px; border-radius: 4px;
  font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
}
.status.active  { background: var(--mint); color: var(--green); }
.status.seized  { background: #ffd9d4; color: var(--red); }
.status.scam    { background: #fff1c4; color: #8a6700; }
.status.retired { background: var(--line); color: var(--muted); }

/* ---- legend ---- */
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---- callout / quote ---- */
.callout {
  background: var(--coral-soft); border-left: 4px solid var(--coral);
  padding: 14px 16px; border-radius: var(--radius);
  margin: 22px 0; font-size: 14px; color: var(--ink-soft);
}
.callout b { color: var(--ink); }

/* ---- detail page ---- */
.detail-head { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 22px; border-bottom: 2px solid var(--coral); }
.detail-head .badge {
  width: 64px; height: 64px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green); color: var(--cream); font-size: 28px; font-weight: 800;
}
.detail-head .badge.active  { background: var(--green); }
.detail-head .badge.seized  { background: var(--red); }
.detail-head .badge.scam    { background: #c89200; }
.detail-head .badge.retired { background: var(--muted); }
/* Logos vary wildly (Mars 6.9:1, Awazon 4.6:1, square ones at 1:1).
   No container — just render the bare logo at fixed height and let the
   aspect ratio do its thing. Drop-shadow keeps it visually weighted. */
.detail-head .badge-img {
  display: inline-flex; align-items: center;
  background: transparent; border: 0; box-shadow: none;
  padding: 0; margin-right: 4px;
}
.detail-head .badge-img img {
  display: block; height: 64px; width: auto;
  max-width: 260px; object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(5,50,32,.18));
}
.detail-head .info { flex: 1; min-width: 260px; }
.detail-head h1 { margin: 0 0 6px; font-size: 30px; color: var(--green); }
.detail-head .tags { color: var(--muted); font-size: 14px; }
.detail-head .tags b { color: var(--ink); }

.detail-grid { display: grid; grid-template-columns: 1fr 280px; gap: 28px; }
.detail-grid .side {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; align-self: start;
}
.detail-grid .side h4 { font-size: 12px; color: var(--muted); margin: 0 0 10px; letter-spacing: .04em; text-transform: uppercase; }
.detail-grid .side dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; font-size: 14px; }
.detail-grid .side dt { color: var(--muted); }
.detail-grid .side dd { margin: 0; color: var(--ink); font-weight: 600; }
.detail-grid .side .side-cta { margin-top: 18px; display: grid; gap: 8px; }
.detail-grid .side .onion {
  font-family: ui-monospace, monospace; font-size: 11px;
  background: var(--cream); padding: 8px 10px; border-radius: 6px;
  word-break: break-all; user-select: all; color: var(--ink); margin-top: 10px;
}

/* ---- breadcrumb ---- */
.breadcrumb { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li:not(:last-child)::after { content: '\203A'; margin-left: 6px; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--green); text-decoration: underline; }
.breadcrumb li[aria-current] { color: var(--ink); font-weight: 600; }

/* ---- mirror list (on /market/{slug}) ---- */
.mirror-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.mirror-list li { margin: 0; }
.mirror-link {
  display: block; padding: 10px 14px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px; color: var(--green); text-decoration: none;
  word-break: break-all; user-select: all;
  border-left: 4px solid var(--coral);
  transition: border-left-width .15s, background .15s;
}
.mirror-link:hover {
  background: var(--cream); color: var(--green); text-decoration: none;
  border-left-width: 10px;
}

/* ---- FAQ ---- */
.faq details {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 16px; margin: 0 0 10px;
}
.faq summary { cursor: pointer; font-weight: 700; color: var(--green); font-size: 15px; }
.faq p { margin: 10px 0 0; color: var(--ink-soft); }

/* ---- footer ---- */
footer {
  background: var(--green); color: var(--cream); padding: 28px 0;
  font-size: 13px; border-top: 3px solid var(--coral);
}
footer a { color: var(--mint); }
footer .row { display: flex; gap: 22px; flex-wrap: wrap; align-items: baseline; }

@media (max-width: 760px) {
  .hero h1 { font-size: 28px; }
  .detail-grid { grid-template-columns: 1fr; }
  table.directory th, table.directory td { padding: 9px 10px; font-size: 13px; }
  nav.nav a { padding: 6px 10px; font-size: 13px; }
}
