:root {
  --bg: #070707;
  --fg: #f2f2f2;
  --muted: #8a8a8a;
  --line: rgba(242, 242, 242, 0.1);
  --red: #e82234;
  --pink: #ed5c9b;
  --teal: #5bceac;
  --cream: #f5f5f5;
  --card: #101010;
  --invite: #0c0c0c;
  --invite-ring: #070707;
  --grid: rgba(255, 255, 255, 0.035);
  --input: rgba(255, 255, 255, 0.04);
  --guards-opacity: 0.58;
  --noise-opacity: 0.05;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --max: 1120px;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f3f0ea;
  --fg: #161616;
  --muted: #6d675f;
  --line: rgba(22, 22, 22, 0.12);
  --cream: #161616;
  --card: #fffcf7;
  --invite: #fffdf9;
  --invite-ring: #f3f0ea;
  --grid: rgba(22, 22, 22, 0.06);
  --input: #fff;
  --guards-opacity: 0.7;
  --noise-opacity: 0.035;
  color-scheme: light;
}

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

html {
  background: var(--bg);
  color: var(--fg);
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  transition: background-color 0.25s ease, color 0.25s ease;
}

body {
  margin: 0;
  font-family: Manrope, "Segoe UI", sans-serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  background: var(--bg);
  color: var(--fg);
  min-height: 100dvh;
  position: relative;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

h1, h2, h3, .wordmark, .round-num, .invite-title, .invite-num, .price-sum, .stats strong, .lost-card-num {
  font-family: Unbounded, Manrope, sans-serif;
  font-weight: 600;
}

.noise,
.grid-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
}

.noise {
  z-index: 8;
  opacity: var(--noise-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

html[data-theme="light"] .noise {
  mix-blend-mode: multiply;
}

.grid-bg {
  z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 20%, transparent 75%);
}

html[data-theme="light"] body:not(.auth) .grid-bg {
  background-image: url("assets/watermark.svg");
  background-repeat: no-repeat;
  background-position: center 6%;
  background-size: min(1320px, 120vw) auto;
  opacity: 0.15;
  mask-image: radial-gradient(ellipse 90% 75% at 50% 18%, #000 28%, transparent 80%);
}

html[data-theme="light"] body.panel .grid-bg {
  opacity: 0.07;
  background-position: 72% -8%;
  background-size: min(1080px, 105vw) auto;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 10%, transparent 72%);
}

html[data-theme="light"] body.auth .grid-bg {
  background-image: url("assets/watermark.svg");
  background-repeat: no-repeat;
  background-position: center 22%;
  background-size: min(1100px, 118vw) auto;
  opacity: 0.13;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 42%, #000 12%, transparent 74%);
}

.guards {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100dvh;
  z-index: 1;
  background: url("assets/guards-bg.png?v=6") center bottom / min(980px, 82vw) auto no-repeat;
  opacity: var(--guards-opacity);
  -webkit-mask-image: linear-gradient(to top, #000 8%, rgba(0, 0, 0, 0.85) 38%, transparent 72%);
  mask-image: linear-gradient(to top, #000 8%, rgba(0, 0, 0, 0.85) 38%, transparent 72%);
}

html[data-theme="light"] .guards {
  display: none;
}

.site-footer,
.hero,
.section {
  position: relative;
  z-index: 2;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  margin: 0;
  padding: 1.25rem max(var(--pad), calc((100% - min(100%, var(--max))) / 2 + var(--pad)));
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 22%;
  background: #0A0A0A;
  margin-right: -0.7rem;
}

html[data-theme="light"] .brand img {
  background: none;
}

.wordmark {
  font-size: 1.05rem;
  letter-spacing: -0.04em;
  line-height: 1;
}

.wordmark span {
  color: var(--muted);
  font-weight: 500;
}

.wordmark .wordmark-red {
  color: var(--red);
}

.nav {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
  font-size: 0.92rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.theme-toggle,
.logout-btn,
.panel-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  flex-shrink: 0;
}

.theme-toggle:hover,
.logout-btn:hover,
.panel-nav-toggle:hover {
  border-color: var(--pink);
}

.theme-toggle svg,
.logout-btn svg,
.panel-nav-toggle svg {
  width: 20px;
  height: 20px;
}

.panel-nav-toggle {
  display: none;
}

.panel-nav-toggle .icon-close {
  display: none;
}

.panel-header.is-nav-open .panel-nav-toggle .icon-menu {
  display: none;
}

.panel-header.is-nav-open .panel-nav-toggle .icon-close {
  display: block;
}

.theme-toggle .icon-moon {
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
}

.nav a:hover {
  color: var(--fg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.15rem;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.btn-red {
  background: var(--red);
  color: #fff;
}

.btn-red:hover {
  background: #c91b2c;
}

.btn-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--fg);
}

.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  min-height: auto;
  padding-top: 5vh;
  padding-bottom: 10vh;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-copy {
  container-type: inline-size;
}

.hero h1 {
  font-size: clamp(1.55rem, 9.4cqi, 3.45rem);
  white-space: nowrap;
}

h1 em {
  font-style: normal;
  color: var(--cream);
  display: block;
}

.lead,
.section-lead {
  max-width: 36rem;
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.invite-card {
  justify-self: end;
  width: min(100%, 280px);
  aspect-ratio: 63 / 88;
  padding: 1.4rem 1.25rem 1.2rem;
  background:
    radial-gradient(circle at 50% 32%, rgba(237, 92, 155, 0.12), transparent 42%),
    var(--invite);
  border: 1px solid rgba(237, 92, 155, 0.45);
  box-shadow:
    0 0 0 8px var(--invite-ring),
    0 0 0 9px rgba(237, 92, 155, 0.35),
    0 30px 80px rgba(232, 34, 52, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.invite-kicker,
.invite-sub,
.invite-num {
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--muted);
}

.invite-sub {
  letter-spacing: 0.1em;
  line-height: 1.4;
  max-width: 16rem;
}

.invite-shapes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.7rem;
  margin: auto 0;
}

.s-circle,
.s-square {
  width: 28px;
  height: 28px;
  border: 3px solid var(--teal);
}

.s-circle {
  border-radius: 50%;
  border-color: var(--teal);
}

.s-square {
  border-color: var(--pink);
}

.s-triangle {
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 28px solid var(--red);
}

.invite-title {
  margin: 0.4rem 0 0.25rem;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.invite-num {
  margin-top: 0.85rem;
  color: var(--pink);
}

.section {
  padding-top: 5.5rem;
  padding-bottom: 5.5rem;
  border-top: 1px solid var(--line);
}

html:not([data-theme="light"]) .hero + .section {
  border-top-color: transparent;
}

h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4.4vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.4rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.5rem 1.35rem 1.6rem;
}

.card h3 {
  margin: 1.1rem 0 0.55rem;
  font-size: 1.15rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.98rem;
}

.glyph {
  display: block;
}

.glyph.square {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--pink);
}

.glyph.circle {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--teal);
  border-radius: 50%;
}

.glyph.triangle {
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-bottom: 22px solid var(--red);
}

.card-pink { box-shadow: inset 0 0 0 1px rgba(237, 92, 155, 0.12); }
.card-teal { box-shadow: inset 0 0 0 1px rgba(91, 206, 172, 0.12); }
.card-red { box-shadow: inset 0 0 0 1px rgba(232, 34, 52, 0.16); }

.rounds {
  list-style: none;
  margin: 2.4rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 2rem;
}

.rounds li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
}

.round-num {
  color: var(--red);
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  line-height: 1;
}

.rounds h3 {
  margin: 0 0 0.4rem;
  font-size: 1.08rem;
}

.rounds p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.rules {
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
  max-width: 46rem;
}

.rules li {
  position: relative;
  padding: 1.05rem 0 1.05rem 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.55;
}

.rules li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.35rem;
  width: 10px;
  height: 10px;
  border: 2px solid var(--red);
}

.rules li:nth-child(2)::before {
  border-radius: 50%;
  border-color: var(--teal);
}

.rules li:nth-child(3)::before {
  border: 0;
  width: 0;
  height: 0;
  top: 1.2rem;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 11px solid var(--pink);
}

.rules li:nth-child(4)::before {
  background: var(--red);
  border-color: var(--red);
}

.invite-block {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.invite-block .btn {
  margin-top: 1.6rem;
}

.invite-totem {
  justify-self: center;
  width: min(46%, 180px);
  height: 280px;
  position: relative;
}

.totem-sq,
.totem-ci,
.totem-tr {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.totem-sq {
  bottom: 0;
  width: 36%;
  aspect-ratio: 1;
  border: 3px solid var(--pink);
  box-shadow: 0 0 36px rgba(237, 92, 155, 0.28);
}

.totem-ci {
  bottom: 34%;
  width: 42%;
  aspect-ratio: 1;
  border: 3px solid var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 36px rgba(91, 206, 172, 0.25);
}

.totem-tr {
  bottom: 66%;
  width: 0;
  height: 0;
  border-left: 36px solid transparent;
  border-right: 36px solid transparent;
  border-bottom: 62px solid var(--red);
  filter: drop-shadow(0 0 22px rgba(232, 34, 52, 0.55));
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.75rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer .brand img {
  width: 36px;
  height: 36px;
}

.trial-note {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.stats li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 6.5rem;
}

.stats strong {
  font-size: 1.15rem;
  letter-spacing: -0.04em;
}

.stats span {
  color: var(--muted);
  font-size: 0.82rem;
}

.split,
.prizes,
.vs,
.prices {
  display: grid;
  gap: 1rem;
  margin-top: 2.2rem;
}

.split {
  grid-template-columns: 1fr 1fr;
}

.prizes {
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  margin-left: 0;
  padding: 0;
}

.prizes li {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.45rem 1.3rem 1.5rem;
}

.prizes h3,
.vs h3,
.price-card h3 {
  margin: 0.9rem 0 0.45rem;
  font-size: 1.12rem;
}

.prizes p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.98rem;
}

.vs {
  grid-template-columns: 1fr 1fr;
}

.vs-col {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.5rem 1.35rem;
}

.vs-us {
  box-shadow: inset 0 0 0 1px rgba(232, 34, 52, 0.35);
}

.vs-col h3 {
  margin-top: 0;
  color: var(--muted);
}

.vs-us h3 {
  color: var(--red);
}

.vs-col ul {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.vs-col li {
  position: relative;
  padding: 0.7rem 0 0.7rem 1.15rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.96rem;
}

.vs-col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 7px;
  height: 7px;
  background: var(--muted);
}

.vs-us li::before {
  background: var(--red);
}

.rounds.three {
  grid-template-columns: repeat(3, 1fr);
}

.prices {
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
}

.price-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.5rem 1.35rem 1.4rem;
}

.price-card.featured {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}

.price-num {
  margin: 0;
  color: var(--pink);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.price-visits {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.price-sum {
  margin: 0.85rem 0 1rem;
  font-size: 1.85rem;
  letter-spacing: -0.04em;
}

.price-sum span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  font-family: Manrope, sans-serif;
}

.price-card ul {
  margin: 0 0 1.3rem;
  padding: 0;
  list-style: none;
  flex: 1;
}

.price-card li {
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.price-card .btn {
  width: 100%;
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }

  .hero-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .site-header .header-actions {
    margin-left: auto;
  }

  .site-header .btn {
    flex-shrink: 0;
    min-height: 40px;
    padding: 0.55rem 0.9rem;
  }

  .wordmark .tld {
    display: none;
  }

  .hero,
  .invite-block,
  .cards,
  .rounds,
  .split,
  .vs,
  .prices,
  .prizes,
  .lost-main {
    grid-template-columns: 1fr;
  }

  .rounds.three {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding-top: 2.5rem;
  }

  .invite-card {
    justify-self: start;
    width: min(100%, 240px);
  }

  .invite-totem {
    display: none;
  }

  .guards {
    opacity: 0.32;
    background-size: min(720px, 160vw) auto;
  }

  html[data-theme="light"] body:not(.auth) .grid-bg {
    background-size: min(980px, 170vw) auto;
    background-position: center 0;
    opacity: 0.12;
  }

  html[data-theme="light"] body.panel .grid-bg {
    opacity: 0.06;
    background-position: 60% 0;
  }

  html[data-theme="light"] body.auth .grid-bg {
    background-size: min(920px, 165vw) auto;
    background-position: center 18%;
    opacity: 0.11;
  }

  h1 {
    font-size: clamp(2.1rem, 11vw, 3.1rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body.auth {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.auth .header-actions {
  margin-left: auto;
}

body.auth .grid-bg {
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 10%, transparent 72%);
}

.nav-back {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}

body.lost {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.lost .header-actions {
  margin-left: auto;
}

body.lost h1 {
  font-size: clamp(2rem, 11cqi, 4.6rem);
}

body.lost h1 em {
  color: var(--red);
  font-size: 1.18em;
}

.lost-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 4vh var(--pad) 8vh;
  position: relative;
  z-index: 2;
}

.lost-copy {
  container-type: inline-size;
}

.lost-card {
  position: relative;
  overflow: hidden;
}

.lost-card .invite-shapes {
  margin: 1.1rem 0 0.35rem;
}

.lost-card-label {
  margin: 0;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--muted);
}

.lost-card-num {
  margin: 0.2rem 0 0.15rem;
  font-size: clamp(3.4rem, 10vw, 4.8rem);
  line-height: 0.85;
  letter-spacing: -0.06em;
}

.lost-stamp {
  position: absolute;
  right: 10%;
  bottom: 16%;
  padding: 0.28rem 0.6rem;
  border: 2px solid var(--red);
  color: var(--red);
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transform: rotate(-18deg);
  pointer-events: none;
}

html[data-theme="light"] body.lost .grid-bg {
  background-position: center 28%;
}

@media (max-width: 860px) {
  .lost-main {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }

  .lost-card {
    justify-self: start;
  }
}

.nav-back:hover {
  color: var(--fg);
}

.auth-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 1.5rem var(--pad) 3rem;
  position: relative;
  z-index: 2;
}

.auth-card {
  width: min(100%, 400px);
  padding: 2rem 1.6rem 1.7rem;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 0 0 1px rgba(237, 92, 155, 0.18);
}

.auth-shapes {
  margin: 0 0 1.15rem;
}

.auth-card .eyebrow {
  margin-bottom: 0.55rem;
  text-align: center;
}

.auth-card h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.auth-lead {
  margin: 0.7rem 0 1.5rem;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.98rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0 0 0.95rem;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input:not([type="radio"]):not([type="checkbox"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--fg);
  font: 500 1rem/1.3 Manrope, "Segoe UI", sans-serif;
  letter-spacing: 0;
  text-transform: none;
}

.field select {
  appearance: none;
}

.field textarea {
  min-height: 8.5rem;
  resize: vertical;
  line-height: 1.45;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.field input:not([type="radio"]):not([type="checkbox"]):focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

.field-control {
  position: relative;
  display: block;
}

.field-control input {
  padding-right: 2.4rem;
}

.field-mark {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--teal);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.15s ease;
}

.field-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.field.is-valid .field-mark {
  opacity: 1;
}

.field.is-valid .field-control input {
  border-color: var(--teal);
}

.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.2rem 0 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
}

.check input {
  width: 15px;
  height: 15px;
  accent-color: var(--red);
}

.auth-submit {
  width: 100%;
}

.auth-status {
  margin: 0.85rem 0 0;
  color: var(--pink);
  font-size: 0.9rem;
  line-height: 1.45;
}

.auth-help {
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.auth-help a {
  color: var(--fg);
  text-underline-offset: 3px;
}

.auth-status.is-ok {
  color: var(--teal);
}

.auth-status.is-error {
  color: var(--pink);
}

.auth-secret {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 0.4rem;
}

.auth-secret[hidden] {
  display: none;
}

.auth-secret-label {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-secret-row {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.auth-secret-row code {
  flex: 1;
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  background: var(--input);
  font: 600 1rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
}

.auth-secret-row .btn {
  flex: 0 0 auto;
  min-height: 46px;
}

.auth-bot-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn[hidden] {
  display: none;
}

body.panel {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.panel:not(.is-ready) {
  visibility: hidden;
}

body.panel .grid-bg {
  mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000 8%, transparent 70%);
}

.panel-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 78%, var(--bg));
}

.panel-header-inner {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 0.45rem var(--pad);
}

.panel-header .brand {
  flex: 0 0 auto;
  margin-right: 0.15rem;
}

.panel-header .brand img {
  width: 36px;
  height: 36px;
}

.panel-nav {
  display: flex;
  align-items: center;
  gap: 0.12rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.panel-nav::-webkit-scrollbar {
  display: none;
}

.panel-nav a {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--muted);
  padding: 0.4rem 0.58rem;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.panel-nav a:hover {
  color: var(--fg);
  background: color-mix(in srgb, var(--fg) 8%, transparent);
}

.panel-nav a[aria-current="page"] {
  color: #fff;
  background: var(--red);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--red) 48%, transparent);
}

.panel-nav a[aria-current="page"]:hover {
  color: #fff;
  background: #ef4444;
}

.panel-balance {
  min-width: 0;
  padding: 0.2rem 0.1rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.2;
  white-space: nowrap;
}

.panel-balance:hover,
.panel-balance.is-current {
  color: var(--fg);
}

.panel-balance #panel-clicks {
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.panel-account {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  max-width: 12.5rem;
  padding: 0.15rem 0;
  text-decoration: none;
  color: inherit;
}

.panel-account:hover .panel-user-mail,
.panel-account.is-current .panel-user-mail {
  color: var(--pink);
}

.panel-account-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--red);
}

.panel-account-mark svg {
  width: 20px;
  height: 20px;
}

.panel-balance,
.panel-account,
.panel-header .header-actions {
  flex: 0 0 auto;
}

.panel-header .header-actions {
  margin-left: 0.15rem;
}

.panel-account-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.08rem;
  min-width: 0;
}

.panel-user-mail {
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.panel-user-tg {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.settings-card {
  max-width: none;
}

.settings-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  align-items: start;
}

.settings-profile {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.settings-section-title {
  margin: 0 0 0.55rem;
  font-size: 1.35rem;
}

.settings-profile .settings-section-title {
  margin-top: 0;
}

.settings-card h2 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
}

.settings-card .btn {
  min-height: 46px;
}

.balance-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.3rem 1.15rem;
  margin: 0 0 1.6rem;
  background: var(--card);
  border: 1px solid var(--line);
}

.balance-hero-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.balance-hero-value {
  margin: 0.12rem 0 0;
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.balance-hero .btn {
  min-height: 46px;
  min-width: 10rem;
}

.balance-tariff-title {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
}

.panel-table tbody tr[data-id] {
  cursor: pointer;
}

.panel-table tbody tr[data-id]:hover {
  background: color-mix(in srgb, var(--pink) 8%, transparent);
}

.project-name-link {
  color: inherit;
  text-decoration: none;
}

.project-name-link:hover {
  color: var(--red);
}

.panel-table tr.is-featured td:last-child {
  color: var(--red);
  font-weight: 700;
}

.panel-table tr.is-selected {
  background: color-mix(in srgb, var(--red) 12%, transparent);
}

.balance-note {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.balance-note a {
  color: inherit;
}

.panel-footer {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 1.15rem var(--pad) 1.45rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.panel-footer .brand img {
  width: 32px;
  height: 32px;
}

.panel-shell {
  position: relative;
  z-index: 2;
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 1.35rem var(--pad) 2rem;
  flex: 1 0 auto;
}

.panel-main {
  min-width: 0;
}

.panel-main h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.panel-lead {
  margin: 0.8rem 0 1.6rem;
  color: var(--muted);
  line-height: 1.55;
}

.panel-stats {
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.panel-stats li {
  padding: 1rem 1rem 0.95rem;
  background: var(--card);
  border: 1px solid var(--line);
}

.panel-stats strong {
  display: block;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.panel-stats span {
  color: var(--muted);
  font-size: 0.82rem;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
}

.panel-card {
  padding: 1.25rem 1.2rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--line);
}

.panel-card h2 {
  margin: 0 0 0.55rem;
  font-size: 1.2rem;
}

.panel-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.panel-card .eyebrow {
  margin-bottom: 0.45rem;
}

.panel-card-muted {
  opacity: 0.78;
}

.panel-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1rem;
  margin: 0;
}

.panel-meta dt {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-meta dd {
  margin: 0.15rem 0 0;
}

.panel-toolbar {
  margin: 0 0 1rem;
}

.panel-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--card);
}

.panel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.panel-table th,
.panel-table td {
  text-align: left;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
}

.panel-table th {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.panel-table .muted {
  color: var(--muted);
  font-size: 0.82rem;
}

.panel-empty {
  color: var(--muted);
  text-align: center;
}

.panel-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.panel-timeline li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--line);
}

.panel-timeline .dot {
  width: 10px;
  height: 10px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--muted);
}

.panel-timeline .dot.teal { background: var(--teal); }
.panel-timeline .dot.pink { background: var(--pink); }
.panel-timeline .dot.red { background: var(--red); }

.panel-timeline h2,
.panel-timeline strong {
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 1rem;
}

.panel-timeline p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.panel-switch-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.panel-switch-row p {
  margin-bottom: 0;
}

.panel-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  white-space: nowrap;
}

.panel-switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
}

.panel-soon {
  margin: 0 !important;
  color: var(--pink) !important;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.panel-integrations {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.panel-integrations li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--line);
}

.panel-integrations span {
  color: var(--muted);
  font-size: 0.88rem;
}

.panel-integrations span.is-on {
  color: var(--teal);
}

.panel-integrations li.panel-integration {
  flex-wrap: wrap;
  align-items: center;
}

.panel-integration-copy {
  flex: 1 1 14rem;
  min-width: 0;
}

.panel-integration-copy p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.panel-integration-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
}

.panel-integration-actions .btn {
  min-height: 40px;
}

.integ-form {
  display: grid;
  margin-top: 0.85rem;
  max-width: 26rem;
}

.integ-form[hidden] {
  display: none;
}

.integ-form .field {
  margin-bottom: 0.65rem;
}

.integ-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.integ-kw-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: -0.35rem 0 0.95rem;
}

.integ-kw-tools:empty,
.integ-kw-tools:not(:has(button:not([hidden]))) {
  display: none;
}

.integ-badge {
  max-width: 16rem;
  text-align: right;
}

.panel-toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.7rem 1rem;
  background: var(--card);
  border: 1px solid var(--pink);
  box-shadow: 0 0 0 1px rgba(237, 92, 155, 0.18);
  max-width: min(92vw, 28rem);
  text-align: center;
}

.panel-toast[hidden] {
  display: none;
}

.project-create-title {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem 1.2rem;
  margin-bottom: 0.35rem;
}

.project-create-title h1 {
  margin: 0;
}

.project-create {
  display: grid;
  gap: 0.9rem;
}

.project-step {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.2rem 1.15rem;
  padding: 1.2rem 1.25rem 1.15rem;
  background: var(--card);
  border: 1px solid var(--line);
}

.project-step-num {
  width: 2.45rem;
  height: 2.45rem;
  display: grid;
  place-items: center;
  margin-top: 0.1rem;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--red);
  border: 1px solid color-mix(in srgb, var(--red) 42%, var(--line));
  background: color-mix(in srgb, var(--red) 9%, transparent);
}

.project-step-body {
  min-width: 0;
}

.project-section-intro {
  margin-bottom: 0.85rem;
}

.project-section-label {
  margin: 0;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
}

.project-section-lede,
.field-hint,
.project-query-meta,
.project-toolbar-label,
.project-tool-status {
  margin: 0.3rem 0 0.7rem;
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.45;
}

.project-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem 1rem;
}

.project-choice {
  margin-bottom: 0.85rem;
}

.project-choice legend {
  padding: 0;
  margin-bottom: 0.4rem;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.choice-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--fg);
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.92rem;
  cursor: pointer;
}

.choice-row input[type="radio"] {
  width: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--red);
  outline: none;
  box-shadow: none;
  flex: 0 0 auto;
}

.choice-row input[type="radio"]:focus,
.choice-row input[type="radio"]:focus-visible {
  outline: none;
  box-shadow: none;
}

.choice-row label:has(input:checked) {
  border-color: var(--red);
  box-shadow: 0 0 0 1px rgba(232, 34, 52, 0.35);
}

.choice-row label:focus-within {
  border-color: var(--red);
}

.region-list {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.project-step .field > .btn {
  align-self: start;
}

.region-row {
  display: grid;
  grid-template-columns: 7.2rem minmax(8rem, 1fr) 4.6rem 2.6rem;
  gap: 0.4rem;
  align-items: center;
}

.region-row input,
.region-row select {
  width: 100%;
  min-height: 42px;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--fg);
  font: 500 0.95rem/1.3 Manrope, "Segoe UI", sans-serif;
}

.region-row .region-remove {
  min-width: 0;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

.btn-small {
  min-height: 38px;
  padding: 0.35rem 0.7rem;
  font-size: 0.88rem;
}

.project-query-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.2rem;
}

.project-query-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: baseline;
}

.project-query-title {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-query-meta {
  margin: 0;
}

.project-query-block textarea {
  width: 100%;
  min-height: 11rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--fg);
  font: 500 1rem/1.45 Manrope, "Segoe UI", sans-serif;
  resize: vertical;
}

.project-query-block .integ-kw-tools {
  margin: 0.4rem 0 0.55rem;
}

.project-toolbar-label {
  margin: 0;
  align-self: center;
}

.project-tool-status {
  margin: 0;
  align-self: center;
}

.integ-kw-tools .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.integ-kw-tools .btn.is-muted {
  opacity: 0.72;
}

#topvisor-pick[hidden] {
  display: none !important;
}

.project-create-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.35rem 0 0.2rem;
}

.project-create .auth-status {
  margin: 0;
}

@media (max-width: 860px) {
  .project-query-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .project-step {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .project-row-2col,
  .region-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .panel-account .panel-user-mail {
    display: none;
  }

  .panel-account {
    max-width: none;
    padding: 0.15rem 0;
    gap: 0;
  }
}

@media (max-width: 860px) {
  .nav-back {
    display: none;
  }

  .panel-account {
    max-width: none;
    padding: 0.1rem 0;
  }

  .panel-account-copy,
  .panel-account .panel-user-mail {
    display: none;
  }

  .panel-balance {
    font-size: 0.82rem;
    padding: 0.1rem 0;
  }

  .panel-account-mark {
    width: 20px;
    height: 20px;
  }

  .panel-account-mark svg {
    width: 18px;
    height: 18px;
  }

  .panel-header .brand .tld,
  .panel-header .wordmark {
    display: none;
  }

  .panel-header-inner {
    gap: 0.4rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  .panel-stats {
    grid-template-columns: 1fr 1fr;
  }

  .auth-secret-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 960px) {
  .panel-nav-toggle {
    display: inline-flex;
  }

  .panel-header-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "brand balance account actions";
    align-items: center;
    column-gap: 0.4rem;
    row-gap: 0;
  }

  .panel-header.is-nav-open .panel-header-inner {
    grid-template-areas:
      "brand balance account actions"
      "nav nav nav nav";
    row-gap: 0.35rem;
  }

  .panel-header .brand {
    grid-area: brand;
    margin-right: 0;
  }

  .panel-balance {
    grid-area: balance;
    justify-self: end;
    font-size: 0.8rem;
  }

  .panel-account {
    grid-area: account;
    max-width: none;
  }

  .panel-header .header-actions {
    grid-area: actions;
    margin-left: 0;
    gap: 0.3rem;
  }

  .panel-nav {
    display: none;
    grid-area: nav;
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
    gap: 0.2rem;
    padding: 0.5rem 0 0.2rem;
    border-top: 1px solid var(--line);
  }

  .panel-header.is-nav-open .panel-nav {
    display: flex;
  }

  .panel-nav a {
    padding: 0.75rem 0.8rem;
    font-size: 0.95rem;
  }

  .panel-header .brand .tld,
  .panel-header .wordmark {
    display: none;
  }

  .panel-header .theme-toggle,
  .panel-header .logout-btn,
  .panel-header .panel-nav-toggle {
    width: 40px;
    height: 40px;
  }

  .panel-integrations li {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-integration-actions {
    justify-content: space-between;
  }

  .settings-stack {
    grid-template-columns: 1fr;
  }
}
