[hidden] {
  display: none !important;
}

body.page-hub.is-access-locked {
  overflow: hidden;
}

.hub-access-gate {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px;
  overflow: auto;
  background:
    radial-gradient(circle at 18% 12%, rgba(53, 113, 245, .2), transparent 34%),
    radial-gradient(circle at 84% 88%, rgba(22, 163, 120, .13), transparent 32%),
    #07111f;
}

.hub-access-layout {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(540px, 1fr);
  gap: 18px;
  align-items: stretch;
  width: min(1240px, 100%);
}

.hub-access-card {
  width: 100%;
  padding: 34px;
  border: 1px solid rgba(148, 172, 211, .22);
  border-radius: 28px;
  background: rgba(13, 30, 54, .96);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .38);
  color: #f8fbff;
}

.hub-access-news {
  width: 100%;
  margin: 0 !important;
  padding: 24px !important;
  border-color: rgba(186, 202, 226, .7) !important;
  border-radius: 28px !important;
  background: rgba(249, 251, 255, .98) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .26) !important;
  color: #10233f;
}

.hub-access-news .news-board-head h2 { color: #10233f; }
.hub-access-news .news-board-head > div > p:last-child { color: #61728a; }
.hub-access-news .news-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 390px; overflow: auto; }
.hub-access-news .news-card { min-height: 128px; background: #fff; color: #10233f; }
.hub-access-news .news-card p,
.hub-access-news .news-card time,
.hub-access-news .news-empty { color: #61728a; }
.hub-access-news .news-manage { white-space: nowrap; background: #fff; color: #10233f; }

.hub-access-logo {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 22px;
  border-radius: 18px;
  background: #fff;
}

.hub-access-logo img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.hub-access-card .eyebrow {
  margin: 0 0 8px;
  color: #75a7ff;
}

.hub-access-card h1 {
  margin: 0;
  font-size: clamp(1.85rem, 6vw, 2.45rem);
  line-height: 1.14;
}

.hub-access-card > p:not(.eyebrow):not(.hub-access-error) {
  margin: 10px 0 24px;
  color: #afbdd1;
}

.hub-access-card label,
.hub-code-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.hub-access-card input,
.hub-code-form input {
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid #9eb0c9;
  border-radius: 14px;
  background: #fff;
  color: #07182e;
  font: inherit;
  font-size: 1.15rem;
  letter-spacing: .12em;
}

.hub-access-card input:focus,
.hub-code-form input:focus {
  outline: 3px solid rgba(47, 113, 244, .24);
  border-color: #2f71f4;
}

.hub-access-error {
  min-height: 24px;
  margin: 10px 0;
  color: #ff9b9b;
  font-weight: 800;
}

.hub-access-submit,
.hub-access-admin {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.hub-access-submit {
  border: 0;
  background: #2f71f4;
  color: #fff;
  box-shadow: 0 12px 30px rgba(47, 113, 244, .25);
}

.hub-access-submit:disabled {
  opacity: .64;
  cursor: wait;
}

.hub-access-admin {
  margin-top: 10px;
  border: 1px solid rgba(189, 207, 232, .3);
  background: transparent;
  color: #d9e6f8;
}

.hub-code-settings {
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid #cbd9eb;
  border-radius: 18px;
  background: #f4f8ff;
  color: #10233f;
}

.hub-code-settings h3,
.hub-code-settings p {
  margin: 0;
}

.hub-code-settings > div > p:last-child {
  margin-top: 5px;
  color: #526782;
}

.hub-code-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.hub-code-form input {
  min-height: 44px;
  font-size: 1rem;
}

.hub-code-form button {
  min-height: 44px;
  white-space: nowrap;
}

.hub-code-message {
  min-height: 22px;
  margin-top: 10px !important;
}

.hub-code-message[data-tone="success"] {
  color: #087a50;
}

html[data-dark="true"] .hub-code-settings {
  border-color: #31445e;
  background: #13243c;
  color: #f4f8ff;
}

html[data-dark="true"] .hub-code-settings > div > p:last-child {
  color: #aebdd1;
}

@media (max-width: 760px) {
  .hub-access-gate {
    padding: 16px;
  }

  .hub-access-card {
    padding: 26px 22px;
    border-radius: 22px;
  }

  .hub-access-layout { grid-template-columns: 1fr; }
  .hub-access-news { padding: 18px !important; border-radius: 22px !important; }
  .hub-access-news .news-board-head { display: grid; }
  .hub-access-news .news-list { grid-template-columns: 1fr; max-height: none; }

  .hub-code-form {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 761px) and (max-width: 980px) {
  .hub-access-layout { grid-template-columns: 1fr; width: min(720px, 100%); }
}

.page-hub .hero + .primary-heading { margin-top: 12px; }
