:root {
  --ink: #17202a;
  --muted: #5d6d7e;
  --gold: #ffc83d;
  --gold-dark: #d99000;
  --mint: #7ee6b8;
  --blue: #5aa7ff;
  --coral: #ff7a66;
  --panel: rgba(255,255,255,.86);
  --shadow: 0 24px 60px rgba(74, 47, 0, .18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(255,200,61,.55), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(126,230,184,.55), transparent 28%),
    linear-gradient(135deg, #fff8dd, #ffe8ef 52%, #e5f3ff);
}

a { color: inherit; }

.lab-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.panel {
  background: var(--panel);
  border: 3px solid rgba(255,255,255,.75);
  border-radius: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.lab-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 18px;
  position: sticky;
  top: 10px;
  z-index: 4;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Baloo 2", Inter, sans-serif;
  font-size: 1.45rem;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--mint), #20c58b);
  box-shadow: inset -6px -6px rgba(0,0,0,.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.account-status {
  background: #fff7d0;
  border-radius: 999px;
  color: #7a5200;
  font-size: .9rem;
  font-weight: 900;
  padding: 9px 12px;
}

button, input, select {
  font: inherit;
}

button, .button-link {
  border: 0;
  cursor: pointer;
  font-weight: 900;
  border-radius: 999px;
  padding: 15px 22px;
  font-size: 1rem;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  text-decoration: none;
}

button:hover, .button-link:hover { transform: translateY(-2px); }
button:disabled { cursor: not-allowed; opacity: .65; transform: none; }
.small { padding: 10px 14px; font-size: .9rem; }
.primary { background: var(--ink); color: white; box-shadow: 0 12px 22px rgba(23,32,42,.22); }
.secondary { background: white; color: var(--ink); border: 2px solid rgba(23,32,42,.1); }

.gate, .hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: center;
  padding: 42px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  font-weight: 800;
}

h1, h2, h3 {
  font-family: "Baloo 2", Inter, sans-serif;
  line-height: .96;
  margin: 0;
}

h1 { font-size: clamp(2.8rem, 8vw, 6rem); max-width: 780px; }
h2 { font-size: clamp(1.8rem, 3vw, 2.9rem); }

.subtitle, .fine-print, .muted {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.auth-card {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: #fffdf4;
  border-radius: 24px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 900;
}

input, select {
  width: 100%;
  border: 2px solid #f0d98f;
  border-radius: 16px;
  padding: 14px;
  font-size: 1rem;
  background: white;
}

.auth-actions, .trade-box {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.auth-secondary-actions {
  display: flex;
  justify-content: flex-start;
}

.trade-box {
  grid-template-columns: 1fr 150px 100px;
  align-items: end;
  margin: 20px 0;
}

.outlook-card {
  padding: 24px;
  background: white;
  border-radius: 24px;
}

.outlook-card span {
  color: var(--muted);
  font-weight: 900;
}

.outlook-card strong {
  display: block;
  margin: 8px 0 18px;
  font-family: "Baloo 2", Inter, sans-serif;
  font-size: 2.4rem;
}

.meter {
  height: 12px;
  border-radius: 999px;
  background: #edf0f4;
  overflow: hidden;
}

.meter div {
  height: 100%;
  width: 50%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--gold), #20c58b);
}

.chart-panel, .panel:not(.lab-topbar) {
  padding: 28px;
  margin-top: 22px;
}

canvas {
  display: block;
  width: 100%;
  height: 260px;
}

.grid.two {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 22px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
}

.badge {
  background: #fff0b8;
  color: #7a5200;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 900;
  white-space: nowrap;
}

.asset-list, .learning-cards {
  display: grid;
  gap: 12px;
}

.asset-card, .learning-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: white;
  border-radius: 20px;
}

.learning-card {
  grid-template-columns: 1fr;
}

.asset-card p, .learning-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.positive { color: #08744d; }
.negative { color: #b84634; }

.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { padding: 13px 10px; border-bottom: 2px solid rgba(23,32,42,.08); text-align: left; }
th { color: var(--muted); font-size: .78rem; text-transform: uppercase; }
td:last-child { text-align: right; }

.sell-btn {
  padding: 10px 14px;
  font-size: .9rem;
  background: white;
  color: var(--ink);
  border: 2px solid rgba(23,32,42,.1);
}

.report-panel pre {
  white-space: pre-wrap;
  overflow: auto;
  margin: 0;
  padding: 18px;
  border-radius: 22px;
  background: #17202a;
  color: #fffdf4;
  line-height: 1.55;
}

.hidden { display: none !important; }

@media (max-width: 900px) {
  .gate, .hero, .grid.two, .trade-box {
    grid-template-columns: 1fr;
  }

  .lab-topbar, .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .gate, .hero, .chart-panel, .panel:not(.lab-topbar) {
    padding: 22px;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }
}
