/* Tom's Prague tips. Look: red enamel street signs + verdigris copper domes. */

:root {
  --bg: #F6F6F3;
  --surface: #FFFFFF;
  --ink: #1A2233;
  --muted: #555D6B;
  --line: #DCDFD8;
  --red: #B3121A;
  --red-text: #B3121A;
  --on-red: #FFFFFF;
  --link: #2B6E62;
  --on-link: #FFFFFF;
  --chip: #E8EBE6;
  --open: #1B6E38;
  --open-bg: #E3F1E7;
  --closed: #9B1C1C;
  --closed-bg: #FBE9E9;
  --validator: #F2C200;
  --star: #B7791F;
  --shadow: 0 18px 48px rgba(26, 34, 51, .18), 0 2px 6px rgba(26, 34, 51, .08);
  --radius: 10px;
  --font-sign: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Literata', Georgia, serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151D;
    --surface: #1A202B;
    --ink: #E7E9EC;
    --muted: #A3AAB6;
    --line: #2C3442;
    --red: #C41E27;
    --red-text: #F19A9A;
    --on-red: #FFFFFF;
    --link: #7CC9B6;
    --on-link: #11151D;
    --chip: #232A36;
    --open: #7AD69C;
    --open-bg: #1D3226;
    --closed: #F19A9A;
    --closed-bg: #3A1F24;
    --star: #F2C200;
    --shadow: 0 18px 48px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .3);
  }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-optical-sizing: auto;
}

img { max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: .18em; }
/* Hover styles only for real pointers: on touch screens :hover sticks after a tap. */
@media (hover: hover) { a:hover { color: var(--ink); } }

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1.125rem;
}
.skip-link:focus { top: 1rem; color: var(--bg); }

/* ---------- Enamel street sign (the one bold element) ---------- */

.sign {
  display: inline-flex;
  background: var(--red);
  padding: 6px;
  border-radius: 7px;
  max-width: 100%;
}
.sign__frame {
  border: 2px solid var(--on-red);
  border-radius: 3px;
  padding: .35rem 1.4rem .5rem 1.1rem;
  min-width: 0;
}
.sign__heading {
  margin: 0;
  display: flex;
  flex-direction: column-reverse;
  color: var(--on-red);
  font-family: var(--font-sign);
  font-weight: 700;
  line-height: 1;
}
.sign__name { font-size: clamp(1.875rem, 1.5rem + 1.2vw, 2.375rem); overflow-wrap: anywhere; }
.sign__small { font-size: .9375rem; font-weight: 500; line-height: 1.2; }

.hero {
  position: relative;
  margin-bottom: clamp(4rem, 3rem + 4vw, 7rem);
}
.hero__img {
  display: block;
  width: 100%;
  height: clamp(16rem, 45vw, 35rem);
  object-fit: cover;
  object-position: center 60%;
}
.hero .sign {
  position: absolute;
  left: max(1rem, calc((100% - 72.5rem) / 2 + 2rem));
  bottom: clamp(-4.5rem, -1rem - 4vw, -2.5rem);
  padding: 8px;
  border-radius: 9px;
  box-shadow: var(--shadow);
  max-width: calc(100% - 2rem);
}
.hero .sign__frame { border-width: 3px; padding: .6rem 2rem 1rem 1.6rem; }
.hero .sign__name {
  font-size: clamp(2.75rem, 1.5rem + 6vw, 6.5rem);
  line-height: .92;
  letter-spacing: -.01em;
}
.hero .sign__small { font-size: clamp(.9375rem, .8rem + .5vw, 1.375rem); margin-bottom: .2rem; }

/* ---------- Layout ---------- */

.wrap {
  max-width: 72.5rem;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 48rem) { .wrap { padding: 0 2rem; } }

.intro {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 3rem;
  align-items: flex-end;
}
.intro__lede {
  margin: 0;
  flex: 999 1 30rem;
  max-width: 42rem;
  font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem);
  line-height: 1.55;
}
.intro__updated {
  margin: 0;
  flex: 1 1 12rem;
  color: var(--muted);
  font-family: var(--font-sign);
  font-weight: 500;
  font-size: 1.125rem;
}

.layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem 3.5rem;
  margin-top: 2.5rem;
  align-items: flex-start;
}

.sidebar { flex: 1 1 15rem; max-width: 16.5rem; }
.content {
  flex: 999 1 35rem;
  min-width: 0;
  max-width: 45rem;
  display: flex;
  flex-direction: column;
  gap: 5.5rem;
  padding-bottom: 6rem;
}
.content:focus { outline: none; }

@media (min-width: 60rem) {
  .layout { margin-top: 4rem; }
  .sidebar {
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 4px;
    margin: -4px;
  }
}

/* Mobile: search + horizontal sticky chips */
@media (max-width: 59.99rem) {
  .layout { display: block; }
  .sidebar { display: contents; }
  .content { max-width: none; padding-top: 2rem; gap: 4rem; }
}

/* ---------- Search ---------- */

.search__label {
  display: block;
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--muted);
  margin-bottom: .35rem;
}
.search__box {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--surface);
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  padding: 0 .75rem;
  min-height: 3rem;
}
.search__box:focus-within { outline: 3px solid var(--link); outline-offset: 2px; }
.search__box svg { flex: none; color: var(--muted); }
.search__input {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  width: 100%;
  min-width: 0;
  padding: .7rem 0;
}
.search__input:focus { outline: none; }
.search__input::placeholder { color: var(--muted); opacity: 1; }
.search__status {
  margin: .5rem 0 0;
  min-height: 1.5em;
  font-size: .9375rem;
  color: var(--muted);
}
.search__status:empty { display: none; }

/* ---------- Table of contents ---------- */

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1.25rem;
}
.toc li { border-top: 1px solid var(--line); }
.toc li:last-child { border-bottom: 1px solid var(--line); }
.toc a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem .25rem;
  color: var(--ink);
  text-decoration: none;
}
@media (hover: hover) { .toc a:hover { color: var(--red-text); text-decoration: underline; } }
.toc a[aria-current="true"] { color: var(--red-text); }
.toc__count { color: var(--muted); font-weight: 500; }

@media (max-width: 59.99rem) {
  .search { margin-top: 1.5rem; }
  .toc {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    margin: 1rem -1rem 0;
  }
  .toc ul {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding: .6rem 1rem;
    scrollbar-width: none;
    font-size: 1.0625rem;
  }
  .toc ul::-webkit-scrollbar { display: none; }
  .toc li, .toc li:last-child { border: 0; flex: none; }
  .toc a {
    min-height: 2.75rem;
    align-items: center;
    padding: 0 .9rem;
    border-radius: 999px;
    background: var(--chip);
  }
  .toc a[aria-current="true"] { background: var(--red); color: var(--on-red); }
  .toc__count { display: none; }
}

/* ---------- Sections ---------- */

.section { display: flex; flex-direction: column; gap: 1.25rem; scroll-margin-top: 4.5rem; }
@media (min-width: 60rem) { .section { scroll-margin-top: 1.5rem; } }

.section__title {
  margin: 0;
  font-family: var(--font-sign);
  font-weight: 700;
  font-size: clamp(2rem, 1.6rem + 1.2vw, 2.5rem);
  line-height: 1;
}
.section p { margin: 0; }
.section .sign { align-self: flex-start; margin-bottom: .25rem; }
.section__intro { color: var(--muted); }

/* Practical info */
.tickets {
  width: 100%;
  border-collapse: separate;
  border-spacing: .5rem 0;
  margin: 0 -.5rem;
  width: calc(100% + 1rem);
  table-layout: fixed;
  font-family: var(--font-sign);
}
.tickets caption {
  text-align: left;
  font-weight: 600;
  font-size: 1.125rem;
  padding: 0 .5rem .4rem;
}
.tickets th, .tickets td {
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
  padding: .6rem .9rem;
}
.tickets th {
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  font-weight: 500;
  font-size: 1.0625rem;
  color: var(--muted);
  padding-bottom: 0;
}
.tickets td {
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 700;
  font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem);
  padding-top: 0;
}
.tickets th, .tickets td { white-space: nowrap; }
@media (max-width: 30rem) {
  .tickets { border-spacing: .3rem 0; margin: 0 -.3rem; width: calc(100% + .6rem); }
  .tickets th, .tickets td { padding-left: .5rem; padding-right: .3rem; }
  .tickets th { font-size: .9375rem; }
  .tickets td { font-size: 1.25rem; }
}

.note {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.note__validator {
  flex: none;
  width: 2.5rem;
  height: 3.25rem;
  border-radius: 6px;
  background: var(--validator);
  display: flex;
  justify-content: center;
  padding-top: .5rem;
}
.note__validator::after {
  content: "";
  width: 1.4rem;
  height: 4px;
  border-radius: 2px;
  background: #1A2233;
}

.bullets { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: .6rem; }

.money { display: flex; flex-wrap: wrap; gap: 1.75rem; align-items: flex-start; }
.money .bullets { flex: 999 1 22rem; }
.atm { flex: 1 1 12rem; max-width: 14rem; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.atm img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }
.atm figcaption { font-family: var(--font-sign); font-weight: 500; font-size: 1.0625rem; line-height: 1.3; color: var(--muted); }

/* ---------- Places ---------- */

.places { list-style: none; margin: 0; padding: 0; }
.place {
  position: relative;
  border-top: 1px solid var(--line);
  padding: 1.1rem 0;
}
.place:last-child { border-bottom: 1px solid var(--line); }
.place[hidden] { display: none; }

.place__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .6rem;
}
.place__name {
  color: var(--link);
  text-decoration: underline dotted 2px;
  text-underline-offset: .22em;
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.15;
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
}
.place__name svg { flex: none; align-self: center; }
@media (hover: hover) { .place__name:hover { color: var(--ink); text-decoration-style: solid; } }
.place__name--small { font-size: 1.25rem; }

.place__info {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  min-height: 2.25rem;
  padding: 0 .7rem 0 .55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}
@media (hover: hover) { .place__info:hover { border-color: var(--link); color: var(--link); } }
.place__info[aria-expanded="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.tag {
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: .9375rem;
  background: var(--chip);
  border-radius: 999px;
  padding: .1rem .65rem;
  white-space: nowrap;
}

.place__tip { margin: .4rem 0 0; }
.place__getthere {
  margin: .5rem 0 0;
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  font-family: var(--font-sign);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.35;
  color: var(--muted);
}
.place__getthere svg { flex: none; margin-top: .15rem; }

.group { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }

.empty { color: var(--muted); }

/* ---------- Place card (desktop popover + mobile sheet) ---------- */

.card {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.card--popover {
  position: absolute;
  z-index: 20;
  left: 0;
  top: calc(100% - .4rem);
  width: min(23rem, 100%);
  box-shadow: var(--shadow);
}
.card__media { position: relative; background: var(--chip); }
.card__media img { display: block; width: 100%; height: 11.25rem; object-fit: cover; }
.card__credit {
  position: absolute;
  left: .5rem; bottom: .5rem;
  max-width: calc(100% - 1rem);
  background: rgba(0, 0, 0, .65);
  color: #fff;
  font: .75rem/1.3 system-ui, sans-serif;
  padding: .2rem .5rem;
  border-radius: 4px;
}
.card__credit a { color: #fff; }
.card__body { padding: 1rem 1.1rem .8rem; display: flex; flex-direction: column; gap: .65rem; }
.card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.card__title { margin: 0; font-family: var(--font-sign); font-weight: 700; font-size: 1.75rem; line-height: 1.05; }
.card__close {
  flex: none;
  width: 2.75rem; height: 2.75rem;
  margin: -.35rem -.45rem 0 0;
  border: 0; border-radius: 50%;
  background: var(--chip); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
@media (hover: hover) { .card__close:hover { background: var(--line); } }
.card__rating { display: inline-flex; align-items: center; gap: .25rem; font-family: var(--font-sign); font-weight: 600; font-size: 1.125rem; }
.card__rating svg { color: var(--star); }
.card__rating-count { color: var(--muted); font-weight: 500; }
.card__status { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; font-size: .9375rem; color: var(--muted); }
.pill { font-family: var(--font-sign); font-weight: 600; font-size: 1rem; border-radius: 999px; padding: .05rem .65rem; }
.pill--open { background: var(--open-bg); color: var(--open); }
.pill--closed { background: var(--closed-bg); color: var(--closed); }
.card__line { margin: 0; display: flex; gap: .5rem; font-size: .9375rem; line-height: 1.5; color: var(--muted); }
.card__line svg { flex: none; margin-top: .2rem; }
.card__tip { margin: 0; font-style: italic; font-size: 1rem; }
.card__msg { margin: 0; font-size: .9375rem; color: var(--muted); }
.card__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .2rem; }
.btn {
  flex: 1 1 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  border-radius: var(--radius);
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1.1875rem;
  text-decoration: none;
}
.btn--primary { background: var(--link); color: var(--on-link); }
@media (hover: hover) { .btn--primary:hover { background: var(--ink); color: var(--bg); } }
.btn--secondary { border: 1px solid var(--line); color: var(--ink); flex-grow: 0; }
@media (hover: hover) { .btn--secondary:hover { border-color: var(--ink); color: var(--ink); } }
.card__attribution {
  border-top: 1px solid var(--line);
  padding-top: .5rem;
  text-align: right;
  font: .75rem/1.2 Roboto, Arial, sans-serif;
  color: var(--muted);
}

.skeleton { display: flex; flex-direction: column; gap: .5rem; }
.skeleton span { display: block; height: .9rem; border-radius: 4px; background: var(--chip); }
.skeleton span:nth-child(1) { width: 40%; }
.skeleton span:nth-child(2) { width: 70%; }
.skeleton span:nth-child(3) { width: 55%; }
@media (prefers-reduced-motion: no-preference) {
  .skeleton span { animation: pulse 1.2s ease-in-out infinite alternate; }
  @keyframes pulse { to { opacity: .45; } }
}

/* Mobile bottom sheet */
.sheet {
  margin: auto 0 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  max-height: 88vh;
  border: 0;
  border-radius: 20px 20px 0 0;
  background: var(--surface);
  color: var(--ink);
  overflow-y: auto;
  overscroll-behavior: contain;   /* scrolling inside the sheet never moves the page */
}
/* Freeze the page behind an open sheet. */
html:has(.sheet[open]) { overflow: hidden; }
.sheet::backdrop { background: rgba(10, 14, 20, .5); }
.sheet .card { border: 0; border-radius: 0; }
.sheet .card__body { padding: .75rem 1rem 1.5rem; }
.sheet .card__media { margin: 0 1rem; border-radius: 12px; overflow: hidden; }
.sheet .btn { flex-basis: 100%; min-height: 3.125rem; }
/* Drag zone: the handle (stays on top while the sheet scrolls) and the title row. */
.sheet__handle {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: center;
  padding: .75rem 0 .65rem;
  background: var(--surface);
  cursor: grab;
}
.sheet__handle::before { content: ""; width: 2.75rem; height: 5px; border-radius: 3px; background: var(--muted); opacity: .55; }
.sheet__handle, .sheet .card__top { touch-action: none; }
.sheet.is-dragging { transition: none !important; cursor: grabbing; }

/* Slide in from the bottom and back out on close (where @starting-style / allow-discrete exist;
   elsewhere the sheet simply appears and disappears). */
@media (prefers-reduced-motion: no-preference) {
  .sheet {
    transform: translateY(100%);
    transition: transform .3s var(--ease-out), overlay .3s allow-discrete, display .3s allow-discrete;
  }
  .sheet[open] { transform: none; }
  @starting-style { .sheet[open] { transform: translateY(100%); } }
  .sheet::backdrop {
    background: rgba(10, 14, 20, 0);
    transition: background-color .3s, overlay .3s allow-discrete, display .3s allow-discrete;
  }
  .sheet[open]::backdrop { background: rgba(10, 14, 20, .5); }
  @starting-style { .sheet[open]::backdrop { background: rgba(10, 14, 20, 0); } }
}

/* ---------- Footer & back to top ---------- */

.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer__inner {
  max-width: 72.5rem;
  margin: 0 auto;
  padding: 2rem 1rem 6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  justify-content: space-between;
  font-size: .9375rem;
  color: var(--muted);
}
@media (min-width: 48rem) { .footer__inner { padding: 2rem 2rem 2.5rem; } }
.footer__block { display: flex; flex-direction: column; gap: .25rem; }
.footer p { margin: 0; max-width: 34rem; }

/* Back to top. Deliberately not named "to-top"/"back-to-top": ad blockers' annoyance lists hide those. */
.guide-lift {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  width: 3rem; height: 3rem;
  border-radius: 50%;
  background: var(--red);
  color: var(--on-red);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  visibility: hidden;
  opacity: 0;
}
.guide-lift.is-visible { visibility: visible; opacity: 1; }
@media (hover: hover) { .guide-lift:hover { color: var(--on-red); background: var(--ink); } }
@media (prefers-reduced-motion: no-preference) {
  .guide-lift { transition: opacity .2s, visibility .2s; }
}
@media (min-width: 48rem) { .guide-lift { right: 1.5rem; bottom: 1.5rem; } }

/* ---------- Locked page ---------- */

.locked { max-width: 34rem; display: flex; flex-direction: column; gap: 1.25rem; padding-bottom: 5rem; }
.locked p { margin: 0; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-family: var(--font-sign); font-weight: 600; font-size: 1.1875rem; }
.field input {
  font: inherit;
  font-size: 1.125rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  padding: .65rem .85rem;
  min-height: 3rem;
}
.field input[aria-invalid="true"] { border: 2px solid var(--closed); }
.field__help { font-size: .9375rem; color: var(--muted); }
.field__error { font-size: .9375rem; color: var(--closed); font-weight: 600; }
.locked .btn { align-self: flex-start; border: 0; cursor: pointer; padding: 0 1.5rem; }

@media print {
  .hero__img, .toc, .search, .guide-lift, .place__info { display: none !important; }
  .hero .sign { position: static; box-shadow: none; }
  .hero { margin-bottom: 1rem; }
  body { background: #fff; color: #000; }
}

/* JS-rendered category sections join the main column's flex layout */
.places-root { display: contents; }
.card__rating, .card__attribution { margin: 0; }
.card--popover { list-style: none; }

/* Locked page: keep the code field in the first screen. */
.locked .intro__lede { flex: none; }
.locked-page .hero { margin-bottom: clamp(4.5rem, 3.5rem + 3vw, 6.5rem); }
.locked-page .hero__img { height: clamp(11rem, 30vh, 20rem); }
.locked-page .hero .sign__name { font-size: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }

/* ---------- Unlock moment (first view after a correct code; html.is-unlocking is set by PHP) ---------- */

:root { --ease-out: cubic-bezier(.2, .7, .2, 1); --ease-spring: cubic-bezier(.34, 1.4, .64, 1); }
@supports (animation-timing-function: linear(0, 1)) {
  /* Real spring with a soft overshoot and settle, where linear() easing is supported. */
  :root {
    --ease-spring: linear(0, .009, .035 2.1%, .141, .281 6.7%, .723 12.9%, .938 16.7%, 1.017, 1.077,
      1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%,
      .991, .977 51%, .974 53.8%, .975 57.1%, .997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .is-unlocking .hero__img {
    transform-origin: center 60%;
    animation: unlock-photo 1.2s var(--ease-out) both;
  }
  .is-unlocking .hero .sign {
    transform-origin: 1.5rem 0;   /* hung from its top-left corner */
    animation: unlock-sign 1.1s var(--ease-spring) .35s both;
  }
  .is-unlocking .intro,
  .is-unlocking .layout {
    animation: unlock-rise .6s var(--ease-out) both;
  }
  .is-unlocking .intro { animation-delay: .75s; }
  .is-unlocking .layout { animation-delay: .9s; }

  @keyframes unlock-photo {
    from { filter: blur(16px) saturate(.5) brightness(.75); transform: scale(1.08); }
    to { filter: none; transform: none; }
  }
  @keyframes unlock-sign {
    from { opacity: 0; transform: translateY(-2.5rem) rotate(-9deg); }
    15% { opacity: 1; }
    to { opacity: 1; transform: none; }
  }
  @keyframes unlock-rise {
    from { opacity: 0; transform: translateY(.75rem); }
    to { opacity: 1; transform: none; }
  }

  /* Locked page: the field shakes once when the code was wrong. */
  .field input[aria-invalid="true"] { animation: field-shake .45s ease-in-out .1s; }
  @keyframes field-shake {
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
  }
}

/* Locked page: "Unlocking…" state while the code is being checked. */
.btn[aria-disabled="true"] { cursor: progress; opacity: .85; }
.btn__spinner {
  width: 1rem; height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .btn__spinner { animation: spin .7s linear infinite; }
  @keyframes spin { to { transform: rotate(1turn); } }
}
