:root {
  --urlz-red: #e50914;
  --urlz-black: #050505;
  --urlz-muted: rgba(5, 5, 5, 0.58);
  --urlz-gray: #f5f5f5;
  --urlz-ring: 0 0 0 4px rgba(229, 9, 20, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  letter-spacing: -0.01em;
  background: #fff;
}

::selection {
  background: var(--urlz-red);
  color: #fff;
}

.focus-ring:focus,
.focus-ring:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--urlz-ring);
}

.button-press {
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.button-press:active {
  transform: translateY(1px) scale(0.99);
}

/* Reliable CTA colors (do not depend on Tailwind CDN JIT) */
.bg-brand-red {
  background-color: var(--urlz-red) !important;
}

.text-brand-red {
  color: var(--urlz-red) !important;
}

.bg-brand-gray {
  background-color: var(--urlz-gray) !important;
}

.btn-primary,
.btn-dark,
.btn-outline,
.btn-danger,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1.2;
  white-space: nowrap;
}

.btn-primary {
  background: var(--urlz-red) !important;
  color: #ffffff !important;
  border-color: var(--urlz-red);
}

.btn-primary:hover {
  background: #c70812 !important;
  color: #ffffff !important;
}

.btn-dark {
  background: var(--urlz-black) !important;
  color: #ffffff !important;
  border-color: var(--urlz-black);
}

.btn-dark:hover {
  background: #111111 !important;
  color: #ffffff !important;
}

.btn-outline {
  background: #ffffff !important;
  color: var(--urlz-black) !important;
  border-color: rgba(5, 5, 5, 0.16);
}

.btn-outline:hover {
  border-color: rgba(5, 5, 5, 0.35);
  color: var(--urlz-black) !important;
}

.btn-danger {
  background: #ffffff !important;
  color: var(--urlz-red) !important;
  border-color: rgba(229, 9, 20, 0.28);
}

.btn-danger:hover {
  background: rgba(229, 9, 20, 0.06) !important;
}

.btn-light {
  background: #ffffff !important;
  color: var(--urlz-black) !important;
  border-color: #ffffff;
}

.btn-on-dark {
  background: transparent !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-on-dark:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

/* Any white-text control must keep a dark fill if bg utility failed */
button.text-white:not(.btn-outline):not(.btn-danger):not(.btn-light),
a.text-white:not(.btn-outline):not(.btn-danger):not(.btn-light) {
  color: #ffffff !important;
}

button.bg-brand-red,
a.bg-brand-red,
button.bg-black,
a.bg-black {
  color: #ffffff !important;
}

button.bg-black,
a.bg-black {
  background-color: var(--urlz-black) !important;
}

.result-reveal {
  animation: result-reveal 360ms ease both;
}

@keyframes result-reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  transform: translate(-50%, 16px);
  border-radius: 999px;
  background: var(--urlz-black);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  padding: 0.7rem 1rem;
  transition: opacity 180ms ease, transform 180ms ease;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.mono-card {
  overflow-x: auto;
  border-radius: 1.25rem;
  background: #0d1117;
  color: #e6edf3;
  padding: 1.1rem 1.25rem;
  font-size: 0.86rem;
  line-height: 1.7;
}

.band-gray {
  background: var(--urlz-gray);
}

.band-black {
  background: var(--urlz-black);
  color: #fff;
}

.tagline-xs {
  margin-top: 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(5, 5, 5, 0.45);
}

.header-tagline {
  margin-top: 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: rgba(5, 5, 5, 0.42);
  white-space: nowrap;
}

.site-header {
  position: relative;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
}

.site-nav__link,
.site-nav__cta,
.mobile-nav__link {
  white-space: nowrap;
}

.site-nav__desktop {
  flex-wrap: nowrap;
}

.nav-burger {
  position: relative;
  z-index: 70;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.28rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.55rem;
  border: 1px solid rgba(5, 5, 5, 0.12);
  border-radius: 0.75rem;
  background: #fff;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.nav-burger__line {
  display: block;
  height: 2px;
  width: 100%;
  background: #050505;
  border-radius: 999px;
  transition: transform 160ms ease, opacity 160ms ease;
}

.nav-burger[aria-expanded="true"] .nav-burger__line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-burger[aria-expanded="true"] .nav-burger__line:nth-child(2) {
  opacity: 0;
}

.nav-burger[aria-expanded="true"] .nav-burger__line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(5, 5, 5, 0.06);
  background: #fff;
  position: relative;
  z-index: 65;
}

.mobile-nav[hidden],
.mobile-nav:not(.is-open) {
  display: none !important;
}

.mobile-nav.is-open {
  display: block !important;
}

.site-nav__mobile {
  position: relative;
  z-index: 70;
}

.mobile-nav__list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1.25rem 1rem;
}

.mobile-nav__link {
  display: block;
  padding: 0.85rem 0.15rem;
  border-bottom: 1px solid rgba(5, 5, 5, 0.06);
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(5, 5, 5, 0.72);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-nav__list li:last-child .mobile-nav__link {
  border-bottom: 0;
}

.mobile-nav__link.is-active,
.mobile-nav__link:hover {
  color: #050505;
}

.nav-signout {
  display: inline-flex;
  position: relative;
}

.nav-signout__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(5, 5, 5, 0.14);
  border-radius: 999px;
  background: #ffffff;
  color: #050505;
}

.nav-signout__btn:hover,
.nav-signout__btn:focus-visible {
  background: #050505;
  border-color: #050505;
  color: #ffffff;
}

.nav-signout__btn svg {
  width: 1.05rem;
  height: 1.05rem;
}

.nav-signout__tip {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 0.35rem 0.6rem;
  border-radius: 0.45rem;
  background: #050505;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 70;
}

.nav-signout__btn:hover .nav-signout__tip,
.nav-signout__btn:focus-visible .nav-signout__tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mobile-nav__signout {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.85rem 0.15rem;
  border: 0;
  border-bottom: 0;
  background: transparent;
  color: #050505;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.mobile-nav__signout svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* Zebra illustration system */
.zebra-art {
  display: block;
  max-width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.zebra-hero {
  width: min(560px, 48vw);
  max-width: 100%;
}

.zebra-full {
  width: min(440px, 100%);
}

.zebra-medium {
  width: min(360px, 100%);
}

.zebra-small {
  width: min(180px, 55%);
}

.zebra-fade {
  position: absolute;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
  max-width: none;
}

.zebra-fade-cta {
  right: -12%;
  bottom: -18%;
  width: min(820px, 90vw);
  opacity: 0.09;
}

.zebra-bleed-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  opacity: 0.12;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  filter: grayscale(1) contrast(1.05);
}

.zebra-crop-right {
  object-fit: cover;
  object-position: left center;
  width: 100%;
  max-height: 320px;
}

@media (max-width: 900px) {
  .hero-zebra-wrap,
  .home-mobile-hero {
    overflow: visible;
    max-height: none;
    width: 100%;
  }

  .home-mobile-hero .zebra-hero,
  .hero-zebra-wrap .zebra-hero,
  .zebra-hero,
  .zebra-medium {
    width: 100%;
    max-width: min(420px, 100%);
    height: auto;
    margin-inline: auto;
    object-fit: contain;
    object-position: center;
  }
}

.shorten-form {
  width: 100%;
}

.shorten-primary {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .shorten-primary {
    flex-direction: row;
    align-items: stretch;
  }
}

.url-field {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.url-field input {
  width: 100%;
  min-width: 0;
  padding-right: 5.25rem;
}

.url-field .go-btn {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  border: 0;
  min-height: 2.6rem;
  padding: 0 1.05rem;
  border-radius: 999px;
  background: var(--urlz-black);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.shorten-cta {
  width: 100%;
}

@media (min-width: 640px) {
  .shorten-cta {
    width: auto;
  }
}

.shorten-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 0.85rem;
  align-items: flex-end;
}

.shorten-alias {
  flex: 0 1 42%;
  min-width: 11rem;
  max-width: 18rem;
}

.shorten-expires {
  flex: 0 1 28%;
  min-width: 8.5rem;
  max-width: 11.5rem;
}

@media (max-width: 639px) {
  .shorten-alias,
  .shorten-expires {
    flex: 1 1 100%;
    max-width: none;
  }
}

.site-footer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.site-footer__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('/assets/img/zebra-03-gallop-trail.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  /* +25% vs previous 0.14 */
  opacity: 0.175;
  pointer-events: none;
  filter: grayscale(1) contrast(1.05);
}

.qr-page__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('/assets/img/jumping-over-qr-code-over-qr-code.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0.175;
  pointer-events: none;
  filter: grayscale(1) contrast(1.05);
}

.qr-page__wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.62) 45%, rgba(255, 255, 255, 0.72) 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0.58) 55%, rgba(255, 255, 255, 0.52) 100%);
}

.site-footer__wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.62) 45%, rgba(255, 255, 255, 0.72) 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0.58) 55%, rgba(255, 255, 255, 0.52) 100%);
}

.hall-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(5, 5, 5, 0.1);
  border-radius: 1.25rem;
  background: #fff;
}

.hall-card__media {
  aspect-ratio: 1;
  background: var(--urlz-gray);
  overflow: hidden;
}

.hall-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hall-card__name {
  padding: 1rem 1.1rem 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

.warning-countdown {
  margin-top: 2rem;
  font-size: clamp(4.5rem, 14vw, 7.5rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: var(--urlz-black);
}

.site-footer__content {
  position: relative;
  z-index: 2;
}

.site-footer__content a {
  color: inherit;
}

.site-footer__content a:hover {
  color: var(--urlz-black);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(5, 5, 5, 0.12);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(5, 5, 5, 0.7);
}

.lang-switch svg {
  width: 1rem;
  height: 1rem;
}

/* Prism-ish token colors inside docs */
.mono-card .token.comment { color: #8b949e; }
.mono-card .token.string { color: #a5d6ff; }
.mono-card .token.keyword { color: #ff7b72; }
.mono-card .token.function { color: #d2a8ff; }
.mono-card .token.class-name { color: #ffa657; }
.mono-card .token.property { color: #79c0ff; }
.mono-card .token.number { color: #79c0ff; }
.mono-card .token.operator { color: #ff7b72; }
.mono-card .token.punctuation { color: #c9d1d9; }

.section-relative {
  position: relative;
  overflow: hidden;
}

.section-relative > .content-layer {
  position: relative;
  z-index: 1;
}

/* Left-middle stacked-letter My Links control (kept clear of header) */
.my-links-rail {
  position: fixed;
  left: 0;
  top: max(50%, 7.5rem);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  max-height: calc(100vh - 8.5rem);
  padding: 0.85rem 0.35rem;
  background: #050505;
  color: #ffffff;
  text-decoration: none;
  border: 0;
  border-radius: 0 0.55rem 0.55rem 0;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.2);
  transform: translateY(-50%);
  overflow: hidden;
  transition: background-color 160ms ease, transform 160ms ease;
}

.my-links-rail:hover,
.my-links-rail:focus-visible {
  background: #111111;
  color: #ffffff;
}

.my-links-rail:active {
  transform: translateY(-50%) scale(0.98);
}

.my-links-rail__char {
  display: block;
  line-height: 1.15;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffffff;
}

.my-links-rail__gap {
  display: block;
  height: 0.45rem;
}

.my-link-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(229, 9, 20, 0.25);
  border-radius: 999px;
  color: var(--urlz-red);
  background: #fff;
}

.my-link-delete:hover {
  background: rgba(229, 9, 20, 0.06);
}

.my-link-delete svg {
  width: 1.1rem;
  height: 1.1rem;
}

@media (max-width: 640px) {
  .my-links-rail {
    width: 2rem;
    padding: 0.7rem 0.25rem;
  }

  .my-links-rail__char {
    font-size: 0.68rem;
  }

  .my-links-page {
    padding-left: 2.4rem;
  }
}
