/*!
 * UMD Love Data Week -- Utilities gate (see js/umd-gate.js for the mechanism)
 * Self-contained: no dependency on this page's own CSS variables, since this
 * file is shared across the site-chrome tool pages and the bare standalone
 * app pages alike -- colors are written out literally below rather than as
 * var(...), so this never breaks on a page that doesn't define the same
 * custom properties docs.html/hub.html do.
 * Dark is still the base/default look (the values a rule starts with, same
 * as before this page had a light mode at all) with a :root:not(.dark)
 * override underneath each one for light mode -- the same interleaved
 * pattern .ldw-gate-banner below already uses. A bare standalone app page
 * that never loads js/main.js (so <html> never gets a `dark` class either
 * way) simply never matches the override and keeps the original all-dark
 * look, exactly as before. */
.ldw-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 18, 19, 0.94);
  font-family: "Interstate", "Overpass", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
:root:not(.dark) .ldw-gate-overlay {
  background: rgba(255, 255, 255, 0.94);
}
.ldw-gate-card {
  max-width: 380px;
  width: 100%;
  background: #1b1c1e;
  color: #ffffff;
  border: 1px solid #2c2e31;
  border-radius: 14px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
:root:not(.dark) .ldw-gate-card {
  background: #ffffff;
  color: #1b1b1c;
  border-color: #e6e6e6;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
}
.ldw-gate-icon {
  color: #ffd200;
  margin-bottom: 12px;
}
.ldw-gate-card h1, .ldw-gate-card h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  font-weight: 700;
}
.ldw-gate-card p {
  margin: 0 0 20px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #b9bbbe;
}
:root:not(.dark) .ldw-gate-card p {
  color: #55585d;
}
.ldw-gate-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ldw-gate-label {
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  color: #b9bbbe;
}
:root:not(.dark) .ldw-gate-label {
  color: #55585d;
}
.ldw-gate-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #2c2e31;
  background: #111213;
  color: #ffffff;
  font-size: 1rem;
}
:root:not(.dark) .ldw-gate-input {
  background: #f6f6f7;
  border-color: #c9cbce;
  color: #1b1b1c;
}
.ldw-gate-input:focus-visible {
  outline: 2px solid #ffd200;
  outline-offset: 1px;
}
.ldw-gate-submit {
  margin-top: 4px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: #e21833;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.ldw-gate-submit:hover,
.ldw-gate-submit:focus-visible {
  background: #b81227;
}
.ldw-gate-submit:focus-visible {
  outline: 2px solid #ffd200;
  outline-offset: 2px;
}
.ldw-gate-card .ldw-gate-error {
  color: #ff8a8a;
  font-size: 0.85rem;
  margin: 0;
  text-align: left;
}
:root:not(.dark) .ldw-gate-card .ldw-gate-error {
  color: #b3121f;
}
.ldw-gate-back {
  display: inline-block;
  margin-top: 18px;
  color: #b9bbbe;
  font-size: 0.85rem;
  text-decoration: underline;
}
.ldw-gate-back:hover,
.ldw-gate-back:focus-visible {
  color: #ffffff;
}
:root:not(.dark) .ldw-gate-back {
  color: #55585d;
}
:root:not(.dark) .ldw-gate-back:hover,
:root:not(.dark) .ldw-gate-back:focus-visible {
  color: #1b1b1c;
}

/* The unlock trigger on hub.html and docs.html */
/* The glow lives right on the element, not a pseudo */
.ldw-gate-banner {
  position: absolute;
  z-index: 10;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  height: 2.3rem;
  min-width: 2.3rem;
  padding: 0 .625rem;
  border-radius: 30px;
  cursor: pointer;
  color: var(--text-main);
  background-color: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at center, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 100% 100% at center, #000 55%, transparent 100%);
  transition: background-color 0.3s ease, color 0.3s ease, backdrop-filter 0.3s ease;
}
:root:not(.dark) .ldw-gate-banner {
  background-color: rgba(0, 0, 0, 0.06);
}
.ldw-gate-banner:hover,
.ldw-gate-banner:focus-visible {
  background-color: rgba(255, 255, 255, 0.16);
  color: var(--text-accent);
  backdrop-filter: blur(11px) saturate(170%);
  -webkit-backdrop-filter: blur(11px) saturate(170%);
}
:root:not(.dark) .ldw-gate-banner:hover,
:root:not(.dark) .ldw-gate-banner:focus-visible {
  background-color: rgba(0, 0, 0, 0.12);
}
.ldw-gate-banner:focus-visible {
  outline: 2px solid var(--text-accent);
  outline-offset: 2px;
}
/* Active gets its own look, not just its own text */
.ldw-gate-banner.is-unlocked {
  background-color: rgba(255, 210, 0, 0.16);
}
.ldw-gate-banner.is-unlocked:hover,
.ldw-gate-banner.is-unlocked:focus-visible {
  background-color: rgba(255, 210, 0, 0.24);
}
.ldw-gate-banner.is-unlocked::before {
  content: "";
  display: block;
  flex: none;
  width: .5rem;
  height: .5rem;
  margin-right: .5rem;
  border-radius: 50%;
  background: #ffd200;
  animation: ldw-gate-dot-pulse 2.4s ease-in-out infinite;
}
:root:not(.dark) .ldw-gate-banner.is-unlocked::before {
  background: #e21833;
}
@keyframes ldw-gate-dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}
.ldw-gate-banner::after {
  content: "";
  display: block;
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  background-color: currentColor;
  -webkit-mask-image: url("/images/branding/low-poly-heart-filled-red.png");
  mask-image: url("/images/branding/low-poly-heart-filled-red.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.ldw-gate-banner__label {
  display: inline-block;
  max-width: 0;
  padding-right: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
  opacity: 0;
  transition: max-width .3s ease-out .1s, padding-right .3s ease-out .1s, opacity .22s ease-out .1s;
}
.ldw-gate-banner:hover .ldw-gate-banner__label,
.ldw-gate-banner:focus-visible .ldw-gate-banner__label,
.ldw-gate-banner.is-unlocked .ldw-gate-banner__label {
  max-width: 14rem;
  padding-right: .5rem;
  opacity: 1;
  transition: max-width .3s ease-out, padding-right .3s ease-out, opacity .22s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .ldw-gate-banner,
  .ldw-gate-banner__label {
    transition: none;
  }
}
.ldw-gate-input, .ldw-gate-submit { min-height: 44px; }
.ldw-gate-back { display: inline-flex; align-items: center; min-height: 44px; }
