:root {
  --bg: #070707;
  --panel: #10141f;
  --panel-2: #151922;
  --text: #fff8e7;
  --muted: #c9c1ad;
  --gold: #d4af37;
  --gold-2: #f1c94c;
  --border: rgba(212, 175, 55, 0.32);
  --shadow: rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: radial-gradient(circle at top left, rgba(212, 175, 55, 0.12), transparent 34%),
    linear-gradient(180deg, #06070b 0%, #080808 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  padding: max(18px, env(safe-area-inset-top)) 16px calc(92px + env(safe-area-inset-bottom));
}

button {
  font: inherit;
}

.app-shell {
  width: min(980px, 100%);
  margin: 0 auto;
}

.tab-panel {
  display: none;
  animation: fadeIn 180ms ease-out;
}

.tab-panel.active {
  display: block;
}

.hero,
.section-header,
.card,
.app-row {
  border: 1px solid var(--border);
  background: rgba(16, 20, 31, 0.9);
  box-shadow: 0 18px 44px var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 18px;
}

.hub-logo {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid var(--gold);
}

.start-hero { align-items: center; }
.start-hero .hub-logo { background: #07101f; border-radius: 20px; box-shadow: 0 14px 34px rgba(0,0,0,.36); }
.home-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.primary-action, .secondary-action { min-height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 800; cursor: pointer; }
.primary-action { border: 0; background: linear-gradient(135deg,#4d7fff,#55d9e0); color: #07101f; }
.secondary-action { border: 1px solid rgba(84,217,224,.55); background: rgba(9,20,42,.55); color: #dffcff; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

p,
li,
small {
  color: var(--muted);
  line-height: 1.55;
}

.lead {
  margin-bottom: 0;
  font-size: 17px;
}

.card,
.section-header {
  margin-top: 16px;
  padding: 18px;
  border-radius: 16px;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.clean-list {
  padding-left: 18px;
  margin-bottom: 0;
}

.app-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.program-section {
  margin-top: 16px;
}

.program-heading {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(16, 20, 31, 0.9);
  box-shadow: 0 18px 44px var(--shadow);
}

.program-heading p:last-child {
  margin-bottom: 0;
}

.secondary-inline {
  width: fit-content;
  margin-top: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.program-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: start;
  min-height: 188px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(16, 20, 31, 0.9);
  box-shadow: 0 18px 44px var(--shadow);
}

.program-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--gold);
  border-radius: 18px;
}

.program-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.15;
}

.program-card small {
  display: block;
  font-size: 14px;
}

.program-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.program-actions a,
.program-actions button,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #0d111b;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.program-actions a:first-child {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #111;
}

.program-actions button {
  cursor: pointer;
}

.inline-downloads {
  margin: -6px 0 10px 86px;
}

.status-pill {
  color: var(--gold-2);
}

.app-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  align-items: center;
  width: 100%;
  min-height: 108px;
  padding: 14px;
  color: var(--text);
  text-align: left;
  border-radius: 18px;
}

.app-row:active {
  transform: scale(0.99);
}

.app-row img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--gold);
}

.app-row strong {
  display: block;
  margin-bottom: 5px;
  font-size: 22px;
}

.app-row small {
  display: block;
  font-size: 15px;
}

.link-card {
  display: grid;
  gap: 12px;
}

.link-card button {
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0d111b;
  color: var(--text);
  font-weight: 800;
}

.bottom-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 620px;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(7, 7, 7, 0.94);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}

.nav-item {
  min-height: 50px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.nav-item.active {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #111;
}

@media (max-width: 680px) {
  body {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero {
    grid-template-columns: 76px 1fr;
    gap: 14px;
  }

  .hub-logo {
    width: 76px;
    height: 76px;
    border-radius: 18px;
  }

  h1 {
    font-size: 28px;
  }

  .grid-two {
    grid-template-columns: 1fr;
  }

  .program-grid {
    grid-template-columns: 1fr;
  }

  .app-row {
    grid-template-columns: 64px 1fr;
    min-height: 96px;
  }

  .app-row img {
    width: 64px;
    height: 64px;
    border-radius: 15px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
