:root {
  --hub-muted: rgba(245, 233, 215, .72);
  --hub-gold: #e7ad67;
}

html, body { min-height: 100%; }
body { background: #27150c; }

.hub-stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  isolation: isolate;
  background: #27150c;
}

.hub-stage::before,
.hub-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hub-stage::before {
  z-index: -2;
  background: url("../assets/brick-counter-v3.png") center / cover no-repeat;
}

.hub-stage::after {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(16, 7, 3, .42), rgba(16, 7, 3, .12) 52%, rgba(16, 7, 3, .4)),
    linear-gradient(0deg, rgba(16, 7, 3, .82), rgba(16, 7, 3, .1) 50%, rgba(16, 7, 3, .52));
}

.hub-header,
.hub-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px clamp(24px, 5vw, 84px);
}

.hub-header { padding-bottom: 8px; }
.hub-footer { padding-top: 18px; color: var(--chalk-muted); background: rgba(8, 8, 7, .76); box-shadow: inset 0 1px 0 rgba(209, 136, 66, .16); }
.hub-header .brand-logo { width: clamp(170px, 15vw, 270px); }
.hub-footer .footer-brand-logo { width: clamp(130px, 10vw, 190px); }

.hub-header-actions { display: flex; align-items: center; gap: 18px; }
.hub-status,
.hub-logout {
  color: var(--hub-muted);
  font-family: var(--chalk-hand);
  font-size: clamp(12px, 1vw, 17px);
  letter-spacing: -.025em;
}

.hub-status { color: var(--hub-gold); }
.hub-logout { text-decoration: none; }
.hub-logout:hover { color: var(--chalk); text-decoration: underline; text-underline-offset: 4px; }
.hub-footer p { margin: 0; font-family: var(--chalk-hand); font-size: clamp(12px, 1vw, 17px); }

.hub-board {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 48px));
  min-height: 0;
  align-self: center;
  justify-self: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(22px, 3vh, 36px);
  padding: clamp(28px, 4vw, 58px);
  border-width: 10px;
}

.hub-heading { text-align: center; }
.menu-kicker,
.app-item-type {
  margin: 0 0 12px;
  color: var(--hub-gold);
  font-family: var(--chalk-hand);
  font-size: clamp(12px, 1vw, 16px);
  letter-spacing: .08em;
}

.hub-heading h1 {
  margin: 0;
  color: var(--chalk);
  font-family: var(--chalk-hand);
  font-size: clamp(42px, 5vw, 76px);
  font-weight: 600;
  letter-spacing: -.08em;
  line-height: .9;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .14), 2px 2px 1px rgba(0, 0, 0, .62);
}

.hub-heading > p:last-child {
  max-width: 510px;
  margin: 18px auto 0;
  color: var(--hub-muted);
  font-family: var(--chalk-hand);
  font-size: clamp(14px, 1.2vw, 20px);
  line-height: 1.25;
}

.app-menu { display: grid; gap: 12px; }
.app-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(231, 173, 103, .52);
  background: rgba(0, 0, 0, .28);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .2);
}

.app-item-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(231, 173, 103, .65);
  color: var(--hub-gold);
  font-family: var(--display);
  font-size: 17px;
}

.app-item-type { margin-bottom: 3px; font-size: 11px; }
.app-item-copy h2 { margin: 0; color: var(--chalk); font-family: var(--display); font-size: clamp(24px, 2vw, 32px); font-weight: 500; letter-spacing: -.04em; }
.app-item-copy > p:last-child { margin: 4px 0 0; color: var(--hub-muted); font-family: var(--body); font-size: 13px; }
.app-item-link { color: var(--chalk); font-family: var(--chalk-hand); font-size: 15px; text-underline-offset: 4px; white-space: nowrap; }
.app-item-link:hover { color: #fffaf1; }
.app-item-link span { display: inline-block; margin-left: 5px; color: var(--hub-gold); transition: transform .2s; }
.app-item-link:hover span { transform: translate(2px, -2px); }

.app-menu-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  color: var(--hub-muted);
  font-family: var(--chalk-hand);
  font-size: 13px;
  font-style: italic;
}

.app-menu-empty span { color: var(--hub-gold); }
.app-menu-empty p { margin: 0; }
.hub-note { margin: 0; color: rgba(245, 233, 215, .46); font-family: var(--chalk-hand); font-size: 12px; text-align: center; }

@media (max-width: 720px) {
  .hub-stage { min-height: 100svh; overflow: auto; }
  .hub-header, .hub-footer { padding-inline: 16px; }
  .hub-header { padding-top: 16px; padding-bottom: 4px; }
  .hub-header .brand-logo { width: min(175px, 45vw); }
  .hub-header-actions { gap: 10px; }
  .hub-status { display: none; }
  .hub-board { width: calc(100% - 20px); margin: 14px auto; padding: 24px 16px; border-width: 6px; gap: 20px; }
  .hub-heading h1 { font-size: clamp(42px, 11vw, 56px); }
  .hub-heading > p:last-child { margin-top: 12px; font-size: 13px; }
  .app-item { grid-template-columns: auto 1fr; gap: 12px; padding: 14px; }
  .app-item-mark { width: 40px; height: 40px; font-size: 14px; }
  .app-item-copy h2 { font-size: 24px; }
  .app-item-copy > p:last-child { font-size: 12px; }
  .app-item-link { grid-column: 2; justify-self: start; font-size: 14px; }
  .hub-footer { padding-top: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .hub-footer .footer-brand-logo { width: min(108px, 28vw); }
  .hub-footer p { font-size: 10px; }
}

@media (max-width: 480px) {
  .hub-board { width: calc(100% - 16px); margin-block: 10px; padding: 20px 13px; }
  .hub-header .brand-logo { width: min(160px, 45vw); }
  .hub-footer { gap: 10px; }
  .hub-footer p { font-size: 9px; }
}