
:root {
  --bg: #0b0f14;
  --card: #111722;
  --muted: #7d8aa0;
  --text: #e6eefb;
  --accent: #5aa9ff;
  --green: #3ccf7a;
  --yellow: #ffcd45;
  --red: #ff5a5a;
  --border: #1c2533;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, sans-serif;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 16px; }

.site-header { border-bottom: 1px solid var(--border); background: linear-gradient(180deg,#0b0f14,#0b0f14 60%,#0d141e); }
.site-header h1 { margin: 0; font-size: 28px; }
.subtitle { color: var(--muted); margin: 6px 0 12px; }
.status { color: var(--yellow); font-size: 14px; }

h2 { font-size: 20px; margin: 24px 0 12px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 148px;
}

.card h3 {
  margin: 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #0c1826;
  color: var(--muted);
  border: 1px solid var(--border);
}

.value {
  font-size: 28px;
  font-weight: 600;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sparkline {
  width: 100%;
  height: 36px;
  display: block;
  border-top: 1px dashed var(--border);
  padding-top: 6px;
}

.kv { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.kv span { display: inline-flex; align-items: center; gap: 4px; }

.dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.dot.green { background: var(--green); }
.dot.yellow { background: var(--yellow); }
.dot.red { background: var(--red); }

footer { margin: 24px 0; color: var(--muted); }

.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}
.tooltip .tip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 120%;
  left: 0;
  background: #0c1826;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  width: 260px;
  font-size: 12px;
  line-height: 1.35;
  transition: opacity .15s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  z-index: 20;
}
.tooltip:hover .tip { visibility: visible; opacity: 1; }
.tip h4 { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.tip code { background: #0b1420; padding: 0 4px; border-radius: 6px; }

.subnav{
  position: sticky; top: 0; z-index: 5;
  background: linear-gradient(180deg,#0b0f14,#0b0f14 80%, transparent);
  padding: 8px 0 12px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.subnav a{
  display:inline-block; margin-right:10px; padding:6px 10px;
  border:1px solid var(--border); border-radius:999px; color:var(--text);
  text-decoration:none; font-size:13px; opacity:.85;
}
.subnav a:hover{ opacity:1; }
.card{ min-height: 168px; }
.card .value{ font-variant-numeric: tabular-nums; }
h2{ margin-top: 28px; }

/* Two-column layout for all sections */
#macroCore, #regime, #micros, #calendar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 720px){
  #macroCore, #regime, #micros, #calendar { grid-template-columns: 1fr; }
}

/* Smaller, tighter cards */
.card { min-height: 132px; padding: 14px 16px; }
.card h3 { font-size: 15px; margin: 0 0 8px; }
.badge { font-size: 10px; padding: 2px 6px; }
.value { font-size: 22px; margin: 2px 0 6px; }
.kv span { font-size: 12px; }
.sparkline { height: 30px; }

.card a{ color: var(--text); text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,.25); }
.card a:hover{ text-decoration: underline; }
