/* "Make this site yours": a stack of cards on frosted glass. */
.qz { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; pointer-events: none; }
.qz.open { pointer-events: auto; }
html.qz-lock { overflow: hidden; }
.qz-veil { position: absolute; inset: 0; background: rgba(18, 22, 48, .28); backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); opacity: 0; transition: opacity .35s ease; }
.qz.open .qz-veil { opacity: 1; }
.qz-sheet { position: relative; width: min(440px, calc(100vw - 32px)); opacity: 0; transform: translateY(30px) scale(.96);
  transition: opacity .35s ease, transform .5s cubic-bezier(.2, .9, .25, 1.15); }
.qz.open .qz-sheet { opacity: 1; transform: none; }

.qz-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.qz-icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; font-size: 1.4rem; line-height: 1;
  color: #fff; background: rgba(255, 255, 255, .18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.qz-icon-btn:hover { background: rgba(255, 255, 255, .3); }
.qz-caps { flex: 1; display: flex; gap: 6px; }
.qz-caps i { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .3); overflow: hidden; position: relative; }
.qz-caps i::after { content: ""; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left;
  transition: transform .45s ease; }
.qz-caps i.on::after { transform: scaleX(1); }
.qz-caps i.now::after { transform: scaleX(.35); background: var(--saffron); }

/* the stack */
.qz-deck { position: relative; margin-top: 30px; }
.qz-card { position: absolute; inset: 0; background: rgba(255, 255, 255, .97); border-radius: 26px;
  padding: 26px 22px 22px; box-shadow: 0 30px 60px rgba(14, 18, 44, .28), 0 2px 0 rgba(255, 255, 255, .6) inset;
  transition: transform .5s cubic-bezier(.2, .9, .25, 1.1), opacity .4s ease; transform-origin: 50% 0; }
.qz-card[data-depth="1"] { transform: translateY(-14px) scale(.94); opacity: .7; filter: saturate(.6); }
.qz-card[data-depth="2"] { transform: translateY(-26px) scale(.88); opacity: .4; filter: saturate(.4); }
.qz-card[data-depth="1"] *, .qz-card[data-depth="2"] * { visibility: hidden; }
.qz-card[data-depth="0"] { position: relative; }
.qz-card.rise { animation: qzRise .55s cubic-bezier(.2, .9, .25, 1.15) both; }
.qz-card.from-left { animation: qzLeft .45s cubic-bezier(.2, .9, .25, 1.1) both; }
.qz-card.fly { transform: translateX(120%) rotate(9deg); opacity: 0; transition: transform .34s ease-in, opacity .3s ease-in; }
@keyframes qzRise { from { transform: translateY(-14px) scale(.94); opacity: .7; } }
@keyframes qzLeft { from { transform: translateX(-60%) rotate(-6deg); opacity: 0; } }
.qz-intro { margin: 0 0 6px; color: var(--stone); font-size: .92rem; }
.qz-card h3 { margin: 0 0 18px; font-size: 1.55rem; letter-spacing: -.01em; }

/* the choices */
.qz-tiles { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.qz-tiles.n3 { grid-template-columns: 1fr 1fr 1fr; }
.qz-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 118px; padding: 14px 8px; border-radius: 18px; border: 1.5px solid #ece4d4; background: #fffdf8;
  color: var(--indigo); font: inherit; cursor: pointer; transition: transform .25s cubic-bezier(.2, .9, .3, 1.4),
  box-shadow .25s ease, border-color .2s ease, background .3s ease; -webkit-tap-highlight-color: transparent; }
.qz-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(31, 42, 90, .12); border-color: #e2cfa8; }
.qz-tile:active { transform: scale(.95); }
.qz-tile:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }
.qz-ico { width: 46px; height: 46px; display: grid; place-items: center; }
.qz-ico svg { width: 100%; height: 100%; }
.qz-num { font: 700 1.35rem/1 ui-rounded, system-ui, sans-serif; letter-spacing: -.02em; }
.qz-label { font-weight: 600; font-size: .95rem; text-align: center; line-height: 1.25; }
.qz-check { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid;
  place-items: center; font-size: .75rem; background: #fff; color: var(--indigo); transform: scale(0);
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.6); }
.qz-tile.sel { background: linear-gradient(145deg, var(--indigo), #33407e 60%, #6b4a8f); color: #fff; border-color: transparent;
  box-shadow: 0 14px 28px rgba(31, 42, 90, .35); animation: qzPop .4s cubic-bezier(.2, .9, .3, 1.5); }
.qz-tile.sel .qz-check { transform: scale(1); }
@keyframes qzPop { 40% { transform: scale(1.07); } }
.qz-card.chosen .qz-tile:not(.sel) { opacity: .45; transform: scale(.97); }

.qz-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; color: #fff; font-size: .85rem; }
.qz-link { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; opacity: .85; padding: 6px 4px; }
.qz-link:hover { opacity: 1; text-decoration: underline; }
.qz-step { opacity: .75; }

/* the last card */
.qz-done { text-align: center; overflow: hidden; }
.qz-done h3 { margin-bottom: 6px; }
.qz-done p { margin: 6px 0; color: var(--ink); }
.qz-seal { width: 64px; height: 64px; margin: 2px auto 10px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.8rem; color: #fff; background: radial-gradient(circle at 35% 30%, #f4c46a, var(--saffron) 55%, #b86f12);
  box-shadow: 0 10px 24px rgba(227, 155, 44, .45); animation: qzSeal .8s cubic-bezier(.2, .9, .3, 1.5) both; }
@keyframes qzSeal { from { transform: scale(0) rotate(-90deg); } }
.qz-burst { position: absolute; left: 50%; top: 58px; width: 0; height: 0; }
.qz-burst i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--saffron);
  animation: qzBurst .9s ease-out var(--d) both; }
.qz-burst i:nth-child(3n) { background: var(--indigo); } .qz-burst i:nth-child(3n+1) { background: var(--kumkum); }
@keyframes qzBurst { from { transform: rotate(var(--a)) translateY(0) scale(1); opacity: 1; }
  to { transform: rotate(var(--a)) translateY(-90px) scale(.3); opacity: 0; } }
.qz-picks { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.qz-picks li { padding: 10px 14px; border-radius: 14px; background: #fff6e4; color: var(--indigo); font-weight: 600;
  animation: qzRise .5s ease both; }
.qz-picks li:nth-child(2) { animation-delay: .08s; } .qz-picks li:nth-child(3) { animation-delay: .16s; }
.qz-minor { background: var(--zebra); border-radius: 12px; padding: 8px 12px; font-size: .9rem; }
.qz-private { font-size: .82rem; color: var(--stone) !important; }
.qz-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 12px; }
.qz-primary { width: 100%; padding: 14px; border: 0; border-radius: 14px; font: 600 1.05rem/1 inherit; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, var(--indigo), #3b4a8c); box-shadow: 0 10px 22px rgba(31, 42, 90, .3); }
.qz-done .qz-link { color: var(--indigo); }

/* the launcher pill */
.qz-pill { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 90; display: flex;
  align-items: center; gap: 2px; padding: 6px 6px 6px 8px; border-radius: 999px; background: rgba(31, 42, 90, .92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 16px 40px rgba(14, 18, 44, .35);
  transform: translate(-50%, 140%); opacity: 0; transition: transform .6s cubic-bezier(.2, .9, .25, 1.2), opacity .4s ease; }
.qz-pill.in { transform: translate(-50%, 0); opacity: 1; }
.qz-pill-go { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: #fff; cursor: pointer;
  font: inherit; text-align: left; padding: 4px 8px 4px 4px; }
.qz-pill-go strong { display: block; font-size: .95rem; white-space: nowrap; }
.qz-pill-go small { display: block; opacity: .75; font-size: .78rem; }
.qz-pill-star { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 35% 30%, #f4c46a, var(--saffron) 60%, #b86f12); animation: qzTwinkle 2.4s ease-in-out infinite; }
@keyframes qzTwinkle { 50% { transform: rotate(18deg) scale(1.08); } }
.qz-pill-x { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff;
  cursor: pointer; font-size: 1.1rem; }

/* "For you" tag on the homepage services */
.qz-tag { position: absolute; top: 12px; right: 12px; z-index: 2; padding: 4px 10px; border-radius: 999px; font-size: .75rem;
  font-weight: 700; color: var(--indigo); background: #ffe7b8; }
.h-card { position: relative; }

@media (max-width: 520px) {
  .qz { place-items: end center; }
  .qz-sheet { width: calc(100vw - 20px); margin-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .qz-tile { min-height: 104px; }
  .qz-tiles.n3 .qz-label { font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  .qz-card, .qz-card.rise, .qz-card.from-left, .qz-tile, .qz-pill, .qz-seal, .qz-burst i, .qz-picks li, .qz-pill-star { animation: none !important; transition: none !important; }
}

/* behaviour card: slides in at the bottom corner, never over the middle of the content */
.nz { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 88; width: min(360px, calc(100vw - 24px));
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 14px 12px; border-radius: 20px; color: #fff;
  background: linear-gradient(150deg, rgba(31, 42, 90, .96), rgba(52, 40, 96, .96)); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); box-shadow: 0 22px 50px rgba(14, 18, 44, .4); border: 1px solid rgba(255, 255, 255, .12);
  transform: translateY(130%) scale(.96); opacity: 0; transition: transform .6s cubic-bezier(.2, .9, .25, 1.2), opacity .4s ease; }
.nz.in { transform: none; opacity: 1; }
.nz-ico { flex: 0 0 52px; width: 52px; height: 52px; display: grid; place-items: center; }
.nz-ico svg { width: 52px; height: 52px; }
.nz-body p { margin: 2px 26px 10px 0; font-weight: 600; line-height: 1.4; }
.nz-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.nz-go { display: inline-flex; gap: 6px; align-items: center; padding: 8px 16px; border-radius: 999px; font-weight: 700;
  color: var(--indigo); background: linear-gradient(135deg, #f6c66b, var(--saffron)); text-decoration: none;
  box-shadow: 0 8px 18px rgba(227, 155, 44, .35); transition: transform .2s ease; }
.nz-go:hover { transform: translateY(-1px); }
.nz-later, .nz-never { background: none; border: 0; color: rgba(255, 255, 255, .75); font: inherit; font-size: .82rem; cursor: pointer; padding: 4px 0; }
.nz-later:hover, .nz-never:hover { color: #fff; text-decoration: underline; }
.nz-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer;
  color: #fff; background: rgba(255, 255, 255, .14); font-size: 1rem; }
@media (max-width: 520px) { .nz { right: 12px; left: 12px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .nz { transition: none; } }
