:root {
  color-scheme: dark;
  --bg: #050608;
  --surface: #0c0f14;
  --surface-2: #121720;
  --border: #252c38;
  --border-strong: #394355;
  --text: #f4f7fb;
  --muted: #a8b2c1;
  --accent: #ff3b3b;
  --accent-soft: rgba(255, 59, 59, 0.12);
}

* { box-sizing: border-box; }

html { background: var(--bg); scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% -10%, rgba(255, 59, 59, 0.11), transparent 30rem),
    var(--bg) !important;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  line-height: 1.65;
}

a { color: #ff6b6b; }
a:hover { color: #ff9a9a; }

body > #root > .container,
body > .mt-8 {
  width: min(100% - 2rem, 1440px) !important;
  max-width: 1440px !important;
  margin-inline: auto !important;
}

body > #root > .container { padding: 2rem 0 1rem !important; }
body > .mt-8 { margin-top: 1rem !important; margin-bottom: 3rem !important; }

#root .container > h2 {
  max-width: calc(100% - 9rem);
  margin: 0 0 1.25rem;
  color: var(--text);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

#root .container > a.absolute {
  position: absolute;
  top: 2rem;
  right: max(1rem, calc((100vw - 1440px) / 2));
  padding: .55rem .85rem;
  border: 1px solid var(--border-strong);
  border-radius: .5rem;
  background: rgba(12, 15, 20, .9);
  color: var(--text) !important;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none !important;
}

#root .container > .flex { align-items: stretch; }
#root [class*="flex-[3]"] {
  min-width: 0;
  border-color: var(--border) !important;
  border-radius: .75rem;
  overflow: hidden;
  background: #fff !important;
}

#root .flex-1.p-4 {
  min-width: 280px;
  border: 1px solid var(--border) !important;
  border-radius: .75rem !important;
  background: var(--surface-2) !important;
  color: var(--muted);
}

#root .flex-1.p-4 h3,
#root .flex-1.p-4 strong { color: var(--text); }
#root pre { color: var(--muted); font-family: inherit; }

body > .mt-8 {
  padding: clamp(1rem, 3vw, 2rem) !important;
  border: 1px solid var(--border);
  border-radius: .9rem !important;
  background: var(--surface) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.28) !important;
  color: var(--muted);
}

body > .mt-8 h2,
body > .mt-8 h3,
body > .mt-8 strong { color: var(--text); }
body > .mt-8 section + h2,
body > .mt-8 section + section,
body > .mt-8 div + h2 { margin-top: 2.5rem; }

.overflow-x-auto {
  border: 1px solid var(--border);
  border-radius: .65rem;
  overflow-x: auto;
}

table { background: transparent !important; color: var(--muted); border-color: var(--border) !important; }
thead, tr.bg-gray-200 { background: #161b24 !important; }
th { color: var(--text); text-align: left; font-size: .78rem; letter-spacing: .035em; text-transform: uppercase; }
th, td { min-width: 150px; padding: .8rem .9rem !important; border-color: var(--border) !important; vertical-align: top; }
tbody tr:nth-child(even) { background: rgba(255,255,255,.018); }

@media (max-width: 820px) {
  body > #root > .container,
  body > .mt-8 { width: min(100% - 1.25rem, 1440px) !important; }
  body > #root > .container { padding-top: 1rem !important; }
  #root .container > h2 { max-width: none; padding-right: 0; margin-top: 3.6rem; }
  #root .container > a.absolute { top: 1rem; left: .625rem; right: auto; }
  #root .container > .flex { flex-direction: column; }
  #root [class*="flex-[3]"], #root .flex-1.p-4 { width: 100%; min-width: 0; height: 480px !important; }
  th, td { min-width: 190px; }
}

@media (max-width: 520px) {
  #root [class*="flex-[3]"], #root .flex-1.p-4 { height: 420px !important; }
  body > .mt-8 { padding: 1rem !important; }
}
