
:root {
  --bg: #07110f;
  --bg-2: #0a1614;
  --shell: #12201c;
  --panel: #162823;
  --line: #243832;
  --text: #e7f2ec;
  --mute: #8aa399;
  --copper: #e8a05c;
  --mint: #7dcfb6;
  --danger: #ff7a6e;
  --warn-bg: rgba(232,160,92,.12);
  --info-bg: rgba(125,207,182,.10);
  --serif: Georgia, "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: "Trebuchet MS", "Segoe UI", Candara, sans-serif;
  --mono: Consolas, "Courier New", monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background:
    radial-gradient(1200px 600px at 8% -8%, rgba(232,160,92,.13), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(125,207,182,.09), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  padding: 1rem;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(125,207,182,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125,207,182,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridDrift 48s linear infinite;
  opacity: .5;
}
@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 48px 48px, 48px 48px; }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes borderGlow {
  0%, 100% { box-shadow: 0 0 0 1px var(--line), 0 18px 50px rgba(0,0,0,.45); }
  50% { box-shadow: 0 0 0 1px rgba(232,160,92,.35), 0 18px 50px rgba(0,0,0,.45); }
}
@keyframes underlineIn {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes logoShine {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(232,160,92,0)); }
  50% { filter: drop-shadow(0 0 8px rgba(232,160,92,.35)); }
}
.site-shell {
  position: relative; z-index: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  background: var(--shell);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  min-height: 88vh;
  animation: riseIn .55s ease both, borderGlow 7s ease-in-out infinite;
  display: flex;
  flex-direction: column;
}

/* ===== HEADER ===== */
.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .7rem 1.1rem;
  background: linear-gradient(180deg, #0f1d19 0%, #0c1714 100%);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.brand img {
  width: 46px; height: 46px;
  border-radius: 12px;
  animation: logoShine 4.5s ease-in-out infinite;
}
.brand-text h1 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1.1;
}
.brand-text h1 span { color: var(--copper); }
.brand-text .sub {
  font-size: .65rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mute);
}
.nav-toggle { display: none; }
.nav-toggle-btn {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  padding: .45rem .7rem;
  font: inherit;
  cursor: pointer;
}
.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem .2rem;
  margin-left: auto;
  align-items: center;
}
.header-nav a {
  position: relative;
  display: inline-block;
  padding: .45rem .7rem;
  color: var(--mute);
  text-decoration: none;
  font-size: .9rem;
  border-radius: 8px;
  transition: color .2s ease, background .2s ease;
}
.header-nav a::after {
  content: "";
  position: absolute; left: .55rem; right: .55rem; bottom: .2rem;
  height: 1px; background: var(--copper);
  transform: scaleX(0); transform-origin: left;
  transition: transform .22s ease;
}
.header-nav a:hover { color: var(--text); background: rgba(232,160,92,.08); }
.header-nav a:hover::after, .header-nav a.active::after { transform: scaleX(1); }
.header-nav a.active { color: var(--copper); background: rgba(232,160,92,.12); }

/* ===== BODY: two sidebars + main ===== */
.layout-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  min-height: 0;
  flex: 1;
}
.sidebar {
  background: #0d1815;
  padding: 1rem .75rem 1.2rem;
}
.sidebar-left {
  border-right: 1px solid var(--line);
}
.sidebar-right {
  border-left: 1px solid var(--line);
  background: #0e1a16;
}
.sidebar-title {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 .35rem .55rem;
}
.sidebar-nav a {
  display: block;
  padding: .42rem .65rem;
  margin-bottom: 2px;
  color: var(--mute);
  text-decoration: none;
  font-size: .86rem;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.sidebar-nav a:hover {
  color: var(--text);
  background: rgba(125,207,182,.08);
  border-left-color: var(--mint);
}
.sidebar-nav a.active {
  color: var(--mint);
  background: rgba(125,207,182,.12);
  border-left-color: var(--mint);
}
.sidebar-note {
  margin: .85rem .35rem 0;
  padding: .65rem .7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(232,160,92,.08);
  font-size: .78rem;
  color: var(--mute);
}
.main-content {
  min-width: 0;
  padding: 1.6rem 1.7rem 2rem;
  animation: riseIn .65s .08s ease both;
}
.main-content h2 {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 400;
  margin: 0 0 .75rem;
  letter-spacing: .01em;
}
.main-content h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--mint);
  margin: 1.35rem 0 .45rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: .25rem;
}
.main-content p { margin: 0 0 .8rem; color: #d5e6dc; }
.main-content ul, .main-content ol { margin: 0 0 1rem 1.25rem; color: #d5e6dc; }
.main-content li { margin: .25rem 0; }
.main-content a { color: var(--mint); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.main-content a:hover { color: var(--copper); }
.lead { font-size: 1.05rem; color: var(--mute); }
.warning-box, .info-box, .scan-box {
  border-radius: 12px;
  padding: .9rem 1rem;
  margin: 1rem 0;
  border: 1px solid var(--line);
}
.warning-box {
  background: var(--warn-bg);
  border-left: 3px solid var(--danger);
  animation: riseIn .5s .15s ease both;
}
.info-box, .scan-box {
  background: var(--info-bg);
  border-left: 3px solid var(--mint);
}
.onion-vault {
  margin: 1.1rem 0 1.4rem;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.onion-vault::before {
  content: "";
  position: absolute; inset: 0 auto 0 0; width: 3px;
  background: linear-gradient(180deg, var(--copper), var(--mint));
  animation: underlineIn .8s ease both;
}
.onion-vault h3 { margin-top: 0; border: 0; }
.onion-block { margin: .85rem 0; }
.onion-block h4 {
  font-size: .92rem;
  color: var(--copper);
  margin: 0 0 .35rem;
  font-weight: 600;
}
.mirror-link, code.onion-line {
  display: block;
  font-family: var(--mono);
  font-size: .82rem;
  word-break: break-all;
  background: #0b1512;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .55rem .7rem;
  margin: .3rem 0;
  color: #cfe9dc;
}
.mirror-link a, code.onion-line a { color: #cfe9dc; text-decoration: none; }
.mirror-link a:hover, code.onion-line a:hover { color: var(--copper); }
.news-card {
  display: block;
  padding: .95rem 1rem;
  margin: .7rem 0;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform .2s ease, border-color .2s ease;
  animation: riseIn .5s ease both;
}
.news-card:hover { transform: translateY(-2px); border-color: rgba(232,160,92,.45); }
.news-card time { display: block; font-size: .78rem; color: var(--mute); letter-spacing: .04em; }
.news-card h3 { margin: .2rem 0 .35rem; border: 0; font-size: 1.05rem; color: var(--text); }
.news-card h3 a { color: var(--text); text-decoration: none; }
.news-card h3 a:hover { color: var(--copper); }
.grid-2 {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 1rem;
  margin-top: 1rem;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .95rem 1rem;
}
.card h3 { margin-top: 0; border: 0; }
.tag {
  display: inline-block;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: .45rem;
}
.footer-note {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: .85rem;
  color: var(--mute);
}
.source-list { columns: 2; column-gap: 1.5rem; list-style: none; margin-left: 0; }
.source-list li { break-inside: avoid; margin: .35rem 0; }

@media (max-width: 1100px) {
  .layout-body { grid-template-columns: 200px minmax(0, 1fr); }
  .sidebar-right { display: none; }
}
@media (max-width: 820px) {
  body { padding: .45rem; }
  .site-shell { border-radius: 14px; }
  .site-header { flex-wrap: wrap; }
  .nav-toggle-btn { display: inline-block; }
  .header-nav {
    display: none;
    width: 100%;
    margin-left: 0;
    padding-top: .35rem;
  }
  .nav-toggle:checked ~ .header-nav { display: flex; }
  .layout-body { grid-template-columns: 1fr; }
  .sidebar-left {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem;
  }
  .sidebar-nav a { border-left: 0; }
  .main-content { padding: 1.15rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .source-list { columns: 1; }
}
