:root {
  --bg: #040404;
  --bg-alt: #080808;
  --bg-panel: #0b0b0b;
  --bg-panel-alt: #101010;

  --fg: #f5f5f5;
  --fg-muted: #b0b0b0;
  --fg-softer: #7a7a7a;

  --accent: #f7931a;   /* bitcoin orange */
  --accent-2: #32ffb5; /* toxic green */

  --border-strong: #f5f5f5;
  --border-soft: #3a3a3a;

  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;

  --radius-none: 0;
  --radius-sm: 2px;

  --transition-fast: 120ms ease-out;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background:
    repeating-linear-gradient(
      0deg,
      #030303 0,
      #030303 2px,
      #020202 2px,
      #020202 4px
    );
  color: var(--fg);
  font-family: var(--font-mono);
  line-height: 1.6;
  font-size: 14px;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

::selection {
  background: var(--accent);
  color: #000;
}

.page {
  min-height: 100vh;
  padding: 20px 10px 32px;
  display: flex;
  justify-content: center;
}

.frame {
  width: 100%;
  max-width: 980px;
  border: 2px solid var(--border-strong);
  background: var(--bg);
  padding: 10px 12px 14px;
  position: relative;
  box-shadow:
    0 0 0 2px #000,
    0 0 0 6px #111;
  overflow: hidden;
}

/* corner markers */
.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-strong);
  pointer-events: none;
}

.frame::before {
  left: -2px;
  top: -2px;
  border-right: none;
  border-bottom: none;
}

.frame::after {
  right: -2px;
  bottom: -2px;
  border-left: none;
  border-top: none;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.25;
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: -1;
}

/* STATUS BAR */

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 8px;
  color: var(--fg-muted);
}

.status-left,
.status-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill {
  padding: 2px 6px 1px;
  border-radius: var(--radius-none);
  border: 1px solid var(--border-soft);
  background: var(--bg-alt);
  white-space: nowrap;
}

/* HEADER / NAV */

.header {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 8px 0 6px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr);
  gap: 12px;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* brand acts as home button */
.brand-home {
  text-decoration: none;
  color: inherit;
}

.brand-home:hover {
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-none);
  border: 2px solid var(--border-strong);
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px dashed var(--border-soft);
  pointer-events: none;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.1) saturate(1.1);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--fg);
  line-height: 1.1;
}

.brand-tagline {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg-muted);
}

.nav {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.nav-link {
  padding: 3px 8px 2px;
  border-radius: var(--radius-none);
  border: 1px solid transparent;
  color: var(--fg-muted);
  cursor: pointer;
  position: relative;
  background: transparent;
  transition:
    border-color var(--transition-fast),
    color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

.nav-link::before {
  content: "[";
  margin-right: 3px;
  opacity: 0.5;
}

.nav-link::after {
  content: "]";
  margin-left: 3px;
  opacity: 0.5;
}

.nav-link:hover {
  border-color: var(--border-strong);
  color: var(--fg);
  background: var(--bg-panel-alt);
  transform: translateY(-1px);
  text-decoration: none;
}

/* GRID LAYOUT */

.grid-top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.grid-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.grid-bottom:last-of-type {
  margin-bottom: 0;
}

/* CARDS */

.card {
  background: var(--bg-panel);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  padding: 10px 10px 9px;
  position: relative;
}

.card::before {
  content: attr(data-label);
  position: absolute;
  top: 3px;
  right: 6px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg-softer);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

/* CHIPS / HERO */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 2px 6px 1px;
  border-radius: var(--radius-none);
  border: 1px solid var(--border-strong);
  background: var(--bg-panel-alt);
  color: var(--fg);
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-none);
  background: var(--accent-2);
  border: 1px solid #000;
}

h1 {
  margin: 0;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  padding-top: 4px;
}

.hero-sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--fg-muted);
  margin: 4px 0 10px;
}

.hero-sub span {
  color: var(--accent-2);
}

.hero-body {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--fg-muted);
  margin: 0 0 10px;
  max-width: 540px;
}

.hero-body strong {
  color: var(--fg);
  font-weight: 600;
}

/* PILLS / META */

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.pill {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 3px 7px 2px;
  border-radius: var(--radius-none);
  border: 1px solid var(--border-soft);
  color: var(--fg-muted);
  background: var(--bg-alt);
}

.pill-accent {
  border-color: var(--accent);
  color: var(--accent);
}

.divider {
  border-bottom: 1px dashed var(--border-soft);
  margin: 6px 0 7px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: var(--fg-softer);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.meta-label {
  font-size: 10px;
  color: var(--fg-muted);
}

.meta-item strong {
  color: var(--accent-2);
  font-weight: 500;
}

/* SECTION TITLES / LISTS */

.section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--fg-muted);
  margin-bottom: 6px;
}

.bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--fg-muted);
  font-family: var(--font-sans);
}

.bullet-list li {
  position: relative;
  padding-left: 14px;
}

.bullet-list li::before {
  content: "-";
  position: absolute;
  left: 2px;
  top: 0;
  color: var(--accent);
}

/* --- HOVER-DETAIL BULLETS (added) --- */

.bullet-title {
  display: inline-block;
  cursor: help;
  outline: none;
}

/* hidden detail bubble */
.bullet-detail {
  display: none;
  position: absolute;
  left: 14px; /* aligns with your list text */
  top: calc(100% + 6px);
  z-index: 80;

  width: min(46rem, 92vw);
  padding: 10px 12px 9px;

  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.55;

  color: var(--fg-muted);
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);

  box-shadow:
    0 0 0 2px #000,
    0 14px 34px rgba(0, 0, 0, 0.55);

  backdrop-filter: blur(2px);
}

/* pointer */
.bullet-detail::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 14px;
  width: 10px;
  height: 10px;
  background: var(--bg-panel-alt);
  border-left: 1px solid var(--border-soft);
  border-top: 1px solid var(--border-soft);
  transform: rotate(45deg);
}

/* show on hover OR keyboard focus (tab onto title) */
.bullet-list li:hover .bullet-detail,
.bullet-list li:focus-within .bullet-detail {
  display: block;
}

/* optional title emphasis */
.bullet-list li:hover .bullet-title,
.bullet-list li:focus-within .bullet-title {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.inline-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--fg-softer);
  margin-bottom: 2px;
}

.inline-tag span {
  color: var(--accent-2);
}

/* BUTTONS */

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px 3px;
  border-radius: var(--radius-none);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--fg);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    border-color var(--transition-fast);
}

.button:hover {
  background: var(--fg);
  color: #000;
  transform: translateY(-1px);
  text-decoration: none;
}

.button-secondary {
  border-color: var(--border-soft);
  color: var(--fg-muted);
}

.button-secondary:hover {
  border-color: var(--fg);
  color: #000;
  background: var(--fg);
}

/* STACK / SIGNAL LISTS */

.stack-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--fg-muted);
}

.stack-list li span {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fg);
}

.signal-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--fg-muted);
}

.signal-key {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-panel-alt);
  padding: 4px 6px 3px;
  border-radius: var(--radius-none);
  border: 1px solid var(--border-soft);
  color: #f0f0f0;
  word-break: break-all;
}

/* TAG CLOUD */

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 3px 7px 2px;
  border-radius: var(--radius-none);
  border: 1px solid var(--border-soft);
  background: var(--bg-alt);
  color: var(--fg-muted);
}

/* FOOTER */

footer {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg-softer);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-2);
  border-radius: var(--radius-none);
  border: 1px solid #000;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-links a {
  color: var(--fg-softer);
}

.footer-links a:hover {
  color: var(--fg);
  text-decoration: underline;
}

/* RESPONSIVE */

@media (max-width: 860px) {
  .header {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav {
    justify-content: flex-start;
  }

  .grid-top,
  .grid-bottom {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .page {
    padding: 14px 6px 26px;
  }

  .frame {
    padding: 8px 8px 12px;
  }

  .brand-name {
    font-size: 14px;
  }

  h1 {
    font-size: 20px;
    letter-spacing: 0.22em;
  }

  .hero-body {
    font-size: 12px;
  }
}


/* --- HOVER-DETAIL STACK LIST (add-on) --- */

.stack-list li {
  position: relative; /* so the detail bubble anchors correctly */
}

.stack-title {
  display: inline-block;
  cursor: help;
  outline: none;
}

.stack-detail {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 80;

  width: min(46rem, 92vw);
  padding: 10px 12px 9px;

  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.55;

  color: var(--fg-muted);
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);

  box-shadow:
    0 0 0 2px #000,
    0 14px 34px rgba(0, 0, 0, 0.55);

  backdrop-filter: blur(2px);
}

.stack-detail::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 14px;
  width: 10px;
  height: 10px;
  background: var(--bg-panel-alt);
  border-left: 1px solid var(--border-soft);
  border-top: 1px solid var(--border-soft);
  transform: rotate(45deg);
}

.stack-list li:hover .stack-detail,
.stack-list li:focus-within .stack-detail {
  display: block;
}

.stack-list li:hover .stack-title,
.stack-list li:focus-within .stack-title {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
