/* The page guests land on after tapping Connect on the Wi-Fi sign-in page.
   System fonts only and nothing loaded from other sites (the server's rules forbid it). */

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #17181a;
  --ink-2: #5b5e66;
  --line: #e3e1da;
  --ok: #1f9d55;
  --ok-soft: #d9f2e3;
  --accent: #17181a;
  --accent-ink: #ffffff;
  --step: #d8d6cf;
  --step-fill: #17181a;
  --radius: 20px;
  --shadow: 0 1px 2px rgb(20 20 20 / 6%), 0 8px 24px rgb(20 20 20 / 7%);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121314;
    --surface: #1c1d1f;
    --ink: #f2f1ed;
    --ink-2: #a3a6ad;
    --line: #2c2e31;
    --ok: #3ccf7c;
    --ok-soft: #173826;
    --accent: #f2f1ed;
    --accent-ink: #121314;
    --step: #3a3c40;
    --step-fill: #f2f1ed;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }

.page {
  max-width: 460px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* "You're online" */
.status { display: flex; align-items: center; gap: 12px; padding-top: 4px; }
.status__mark {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: var(--ok-soft); position: relative;
}
.status__mark::after {
  content: ""; position: absolute; left: 13px; top: 8px; width: 8px; height: 15px;
  border: solid var(--ok); border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.status h1 { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.status__sub { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }

/* The ads */
.ads {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 12px 14px;
}
.ads__bar { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 10px; }
.ads__label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
}
.ads__pause {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2);
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; min-height: 32px; cursor: pointer;
}
.ads__pause:focus-visible, .ads__track:focus-visible, .step:focus-visible, .go:focus-visible, .ads__visit:focus-visible {
  outline: 3px solid var(--ok); outline-offset: 2px;
}

.ads__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 14px;
  aspect-ratio: 1 / 1;
  background: var(--line);
  overscroll-behavior-x: contain;
}
.ads__track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; display: block; }
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; }

.ads__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 2px 0; }
.ads__name { margin: 0; font-weight: 600; font-size: 15px; }
.ads__visit {
  flex: none; color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
}

/* One bar per ad; the current one fills up while it is shown (like stories). */
.ads__steps { display: flex; gap: 6px; padding: 8px 2px 0; }
.step {
  flex: 1; height: 24px; padding: 10px 0; border: 0; background: none; cursor: pointer; position: relative;
}
.step::before, .step i {
  content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 2px;
}
.step::before { background: var(--step); }
.step i { background: var(--step-fill); transform-origin: left center; transform: scaleX(0); }
.step.seen i { transform: scaleX(1); }
.step.now i { animation: fill var(--dur, 6s) linear forwards; }
.paused .step.now i { animation-play-state: paused; }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Way out */
.go {
  display: flex; align-items: center; justify-content: center;
  min-height: 54px; border-radius: 16px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 17px; font-weight: 650; text-decoration: none;
}
.go:active { transform: scale(0.985); }
.hint { margin: -6px 0 0; text-align: center; font-size: 13px; color: var(--ink-2); }
.foot { text-align: center; font-size: 12px; color: var(--ink-2); padding-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  .ads__track { scroll-behavior: auto; }
  .go:active { transform: none; }
}
