/* Rerank SaaS theme — mobile-first, breakpoints: 640 / 900 / 1200 */

/* ===== Light theme (default) ===== */
:root {
  --ink: #0f2421;
  --ink-2: #38514d;
  --mute: #6b7f7b;
  --paper: #f5f6f2;
  --card: #fff;
  --line: #dfe4de;
  --brand: #14735c;
  --brand-d: #0d5644;
  --brand-l: #e2f2ec;
  --signal: #f0b429;
  --bad: #c8402f;
  --bad-l: #fbe9e6;
  --ok-l: #e2f2ec;
  --warn-bg: #fdf1d3;
  --warn-fg: #7a5600;
  --r: 10px;
  --r-lg: 18px;
  --shadow: 0 1px 2px rgba(15, 36, 33, .06), 0 8px 24px rgba(15, 36, 33, .06);
  --font: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --head: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  color-scheme: light;
}

/* ===== Dark theme: visitor chose it with the toggle ===== */
:root[data-theme="dark"] {
  --ink: #eaf1ee;
  --ink-2: #b5c6c1;
  --mute: #8aa09a;
  --paper: #0b1816;
  --card: #12251f;
  --line: #23403a;
  --brand: #39b391;
  --brand-d: #5fd0b0;
  --brand-l: #153a31;
  --bad-l: #3a1d19;
  --ok-l: #153a31;
  --warn-bg: #3a2e0c;
  --warn-fg: #f0c866;
  --shadow: 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

/* ===== Dark theme: device is dark and visitor hasn't chosen light ===== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eaf1ee;
    --ink-2: #b5c6c1;
    --mute: #8aa09a;
    --paper: #0b1816;
    --card: #12251f;
    --line: #23403a;
    --brand: #39b391;
    --brand-d: #5fd0b0;
    --brand-l: #153a31;
    --bad-l: #3a1d19;
    --ok-l: #153a31;
    --warn-bg: #3a2e0c;
    --warn-fg: #f0c866;
    --shadow: 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

/* ===== Dark component overrides: visitor chose dark ===== */
:root[data-theme="dark"] .cta { background: var(--brand-l); }
:root[data-theme="dark"] .cta h2 { color: var(--ink); }
:root[data-theme="dark"] .cta p { color: var(--ink-2); }
:root[data-theme="dark"] .logo-img.on-light { display: none; }
:root[data-theme="dark"] .logo-img.on-dark { display: block; }
:root[data-theme="dark"] .creator-card:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, .2), 0 20px 45px rgba(0, 0, 0, .3);
}
:root[data-theme="dark"] .creator-icon { border-color: var(--line); }

/* ===== Dark component overrides: device is dark ===== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cta { background: var(--brand-l); }
  :root:not([data-theme="light"]) .cta h2 { color: var(--ink); }
  :root:not([data-theme="light"]) .cta p { color: var(--ink-2); }
  :root:not([data-theme="light"]) .logo-img.on-light { display: none; }
  :root:not([data-theme="light"]) .logo-img.on-dark { display: block; }
  :root:not([data-theme="light"]) .creator-card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2), 0 20px 45px rgba(0, 0, 0, .3);
  }
  :root:not([data-theme="light"]) .creator-icon { border-color: var(--line); }
}

/* ===== Theme toggle button ===== */
.theme-toggle {
  width: 42px;
  height: 42px;
  border: 1px dotted var(--line);
  border-radius: 38px;
  background: transparent;
  color: var(--ink);
  font-size: 1.15rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.theme-toggle:hover { border-color: var(--brand); }
* {
  box-sizing: border-box;
  margin: 0
}

html {
  scroll-behavior: smooth
}

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased
}

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

a {
  color: var(--brand);
  text-decoration: none
}

a:hover {
  text-decoration: underline
}

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

h1,
h2,
h3 {
  font-family: var(--head);
  line-height: 1.15;
  letter-spacing: -.02em
}

h1 {
  font-size: clamp(2.2rem, 6vw, 4rem)
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.5rem)
}

h3 {
  font-size: 1.15rem
}

p {
  color: var(--ink-2)
}

.wrap {
  width: min(1160px, 100% - 2rem);
  margin-inline: auto
}

.section {
  padding: clamp(3rem, 8vw, 6rem) 0
}

.center {
  text-align: center
}

.lead {
  font-size: 1.15rem;
  max-width: 56ch
}

.center .lead {
  margin-inline: auto
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.25rem;
  border-radius: var(--r);
  font: 600 .95rem var(--font);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  text-decoration: none !important
}

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

.btn-primary:hover {
  background: var(--brand-d)
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: var(--card)
}

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

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

.btn-danger:hover {
  filter: brightness(.92)
}

.btn-block {
  width: 100%
}

.btn-sm {
  padding: .4rem .8rem;
  font-size: .85rem
}

/* Site header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line)
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px
}

.logo {
  display: flex;
  align-items: center;
  gap: .55rem;
  font: 800 1.3rem var(--head);
  color: var(--ink) !important;
  text-decoration: none !important
}

.logo i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  position: relative;
  display: inline-block
}

.logo i::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--signal)
}

.menu {
  display: none;
  position: absolute;
  top: 66px;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 1rem;
  flex-direction: column;
  gap: .25rem
}

.menu.open {
  display: flex
}

.menu a {
  padding: .7rem .5rem;
  color: var(--ink);
  font-weight: 500
}

.menu .btn {
  margin-top: .5rem
}

.burger {
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  font-size: 1.3rem;
  color: var(--ink);
  cursor: pointer
}

/* Hero */
.hero {
  padding: clamp(3rem, 9vw, 6.5rem) 0 3rem;
  display: grid;
  gap: 3rem;
  align-items: center
}

.hero h1 {
  margin-bottom: 1.2rem
}

.hero .actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.75rem
}

.hero small {
  display: block;
  margin-top: 1rem;
  color: var(--mute)
}

.monitor {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 1.25rem
}

.monitor h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 1rem
}

.probe {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 0;
  border-top: 1px solid var(--line);
  font-size: .92rem
}

.probe b {
  flex: 1;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.probe span {
  color: var(--mute);
  font-size: .85rem
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  flex: none
}

.dot.warn {
  background: var(--signal)
}

.dot.down {
  background: var(--bad)
}

.bars {
  display: flex;
  gap: 2px;
  height: 34px;
  align-items: flex-end;
  margin-top: 1rem
}

.bars i {
  flex: 1;
  background: var(--brand);
  border-radius: 2px;
  opacity: .85
}

.bars i.d {
  background: var(--bad)
}

/* Logos / stats */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding: 2rem 0;
  border-block: 1px solid var(--line)
}

.stats strong {
  display: block;
  font: 800 clamp(1.6rem, 4vw, 2.4rem) var(--head);
  color: var(--ink)
}

.stats span {
  color: var(--mute);
  font-size: .9rem
}

/* Grids & cards */
.grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem
}

.card.pad-lg {
  padding: clamp(1.5rem, 4vw, 2.5rem)
}

.icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--brand-l);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 18px;
  margin-bottom: 1rem
}

.card p {
  margin-top: .4rem;
  font-size: .95rem
}

/* Pricing */
.price {
  font: 800 2.6rem var(--head);
  color: var(--ink);
  margin: .5rem 0
}

.price small {
  font: 500 1rem var(--font);
  color: var(--mute)
}

.card ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem;
  display: grid;
  gap: .5rem;
  font-size: .95rem;
  color: var(--ink-2)
}

.card li::before {
  content: "✓";
  color: var(--brand);
  font-weight: 700;
  margin-right: .5rem
}

.card.featured {
  border: 2px solid var(--brand);
  position: relative
}

.tag {
  display: inline-block;
  background: var(--signal);
  color: #2a1f00;
  font-size: .75rem;
  font-weight: 700;
  padding: .15rem .6rem;
  border-radius: 99px
}

/* CTA + footer */
.cta {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-lg);
  padding: clamp(2rem, 6vw, 4rem);
  text-align: center
}

.cta h2 {
  color: var(--paper)
}

.cta p {
  color: color-mix(in srgb, var(--paper) 75%, transparent);
  margin: 1rem auto 1.5rem;
  max-width: 50ch
}

@media (prefers-color-scheme:dark) {
  .cta {
    background: var(--brand-l)
  }

  .cta h2 {
    color: var(--ink)
  }

  .cta p {
    color: var(--ink-2)
  }
}

.footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  margin-top: 4rem
}

.footer .cols {
  display: grid;
  gap: 1.5rem
}

.footer a {
  display: block;
  color: var(--ink-2);
  padding: .15rem 0;
  font-size: .95rem
}

.footer h3 {
  font-size: .95rem;
  margin-bottom: .5rem
}

.copy {
  margin-top: 2rem;
  color: var(--mute);
  font-size: .85rem
}

/* Forms */
.field {
  display: grid;
  gap: .4rem;
  margin-bottom: 1.1rem
}

label {
  font-weight: 600;
  font-size: .9rem
}

input,
select,
textarea {
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  padding: .7rem .9rem;
  width: 100%
}

input:focus,
select:focus {
  border-color: var(--brand);
  outline: 3px solid var(--brand-l)
}

.hint {
  font-size: .82rem;
  color: var(--mute)
}

.check {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  font-weight: 400
}

.check input {
  width: auto;
  margin-top: .3rem
}

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

.notice {
  padding: .8rem 1rem;
  border-radius: var(--r);
  background: var(--ok-l);
  color: var(--brand-d);
  font-size: .92rem;
  margin-bottom: 1rem
}

.notice.bad {
  background: var(--bad-l);
  color: var(--bad)
}

.hidden {
  display: none !important
}

/* Auth pages */
.auth {
  min-height: 100vh;
  display: grid
}

.auth-side {
  display: none;
  background: var(--ink);
  color: #eaf1ee;
  padding: 3rem;
  flex-direction: column;
  justify-content: space-between
}

.auth-side h2 {
  color: #eaf1ee;
  max-width: 16ch
}

.auth-side p {
  color: #b5c6c1
}

.auth-side .logo {
  color: #eaf1ee !important
}

.auth-main {
  display: grid;
  place-items: center;
  padding: 2rem 1rem
}

.auth-box {
  width: min(420px, 100%)
}

.auth-box h1 {
  font-size: 2rem;
  margin: 1.5rem 0 .4rem
}

.auth-box form {
  margin-top: 1.75rem
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--mute);
  font-size: .85rem;
  margin: 1.25rem 0
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line)
}

/* App shell (dashboard / add / remove) */
.app {
  min-height: 100vh
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  transform: translateX(-100%);
  transition: transform .25s;
  z-index: 60
}

.sidebar.open {
  transform: none;
  box-shadow: var(--shadow)
}

.sidebar .logo {
  margin-bottom: 1.5rem
}

.sidebar a.link {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: 6px .8rem;
  border-radius: var(--r);
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: none
}

.sidebar a.link:hover {
  background: var(--brand-l)
}

.sidebar a.link.active {
  background: var(--brand-l);
  color: var(--brand);
  font-weight: 700
}

.sidebar .user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: .9rem
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--signal);
  color: #2a1f00;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: none
}

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 55;
  display: none
}

.scrim.show {
  display: block
}

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 40
}

.topbar h1 {
  font-size: 1.25rem;
  flex: 1
}

.content {
  padding: 1.25rem 1rem 3rem;
  max-width: 1100px
}

.kpis {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem
}

.kpi span {
  color: var(--mute);
  font-size: .88rem
}

.kpi strong {
  display: block;
  font: 800 2rem var(--head);
  margin-top: .2rem
}

.table-wrap {
  overflow-x: auto
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  min-width: 560px
}

th {
  text-align: left;
  color: var(--mute);
  font-weight: 600;
  font-size: .82rem;
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--line)
}

td {
  padding: .85rem .75rem;
  border-bottom: 1px solid var(--line)
}

tr:last-child td {
  border: 0
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  white-space: nowrap;      
  line-height: 1.4;
  padding: .3rem .85rem;
  font-size: .8rem;
  vertical-align: middle;
  flex: none;
  width: fit-content;
  max-width: none;
  background-color: #bff3e4;
  border-radius: 20px;
  color: black;
}

.pill.down {
  background: var(--bad-l);
  color: var(--bad)
}

.pill.warn{background:var(--warn-bg);color:var(--warn-fg)}
th { white-space: nowrap; }
td { vertical-align: middle; }
td .btn,
td .btn-sm { white-space: nowrap; }
td .page-cell { max-width: 320px; }
@media (max-width: 639px) {
  .pill { padding: .25rem .7rem; font-size: .75rem; }
  .table-wrap table { min-width: 760px; }
}

.empty {
  text-align: center;
  padding: 2.5rem 1rem
}

.empty p {
  margin: .4rem 0 1rem
}

.remove-list {
  display: grid;
  gap: .75rem
}

.remove-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card)
}

.remove-item b {
  display: block
}

.remove-item span {
  color: var(--mute);
  font-size: .85rem
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 100
}

.modal .card {
  max-width: 420px;
  width: 100%
}

.modal .actions {
  display: flex;
  gap: .75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap
}

/* ≥640px */
@media (min-width:640px) {
  .stats {
    grid-template-columns: repeat(4, 1fr)
  }

  .grid.c2,
  .grid.c3 {
    grid-template-columns: repeat(2, 1fr)
  }

  .kpis {
    grid-template-columns: repeat(2, 1fr)
  }

  .footer .cols {
    grid-template-columns: 2fr 1fr 1fr 1fr
  }

  .content {
    padding: 1.75rem 1.75rem 3rem
  }
}

/* ≥900px */
@media (min-width:900px) {
  .burger {
    display: none
  }

  .menu {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: .25rem;
    border: 0;
    padding: 0;
    background: none
  }

  .menu .btn {
    margin: 0 0 0 .5rem
  }

  .hero {
    grid-template-columns: 1.1fr .9fr
  }

  .grid.c3 {
    grid-template-columns: repeat(3, 1fr)
  }

  .auth {
    grid-template-columns: 1fr 1fr
  }

  .auth-side {
    display: flex
  }

  .sidebar {
    transform: none;
    box-shadow: none
  }

  .app-main {
    margin-left: 260px
  }

  .menu-toggle,
  .scrim {
    display: none !important
  }

  .kpis {
    grid-template-columns: repeat(4, 1fr)
  }
}

/* ≥1200px */
@media (min-width:1200px) {
  .content {
    padding: 2rem 2.5rem 4rem
  }
}

/* Small phones */
@media (max-width:479px) {
  .btn-block-sm {
    width: 100%
  }

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

  .modal .actions .btn {
    flex: 1
  }
}

@media (prefers-reduced-motion:reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important
  }
}


.message {
  max-width: 700px;
  margin: 0 auto 24px;
  padding: 14px 18px;
  border-radius: 8px;
}

.message.warning{background:var(--warn-bg);color:var(--warn-fg)}
.message.success{background:var(--ok-l);color:var(--brand-d)}
.message.error{background:var(--bad-l);color:var(--bad)}

/* Email PIN verification */
.pin {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .5rem;
  margin: 1.5rem 0 1rem
}

.pin input {
  text-align: center;
  font: 700 1.6rem var(--head);
  padding: .75rem 0;
  min-width: 0;
  height: 60px
}

.pin input.filled {
  border-color: var(--brand);
  background: var(--brand-l)
}

.pin.error input {
  border-color: var(--bad);
  background: var(--bad-l);
  animation: shake .3s
}

.mail-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--brand-l);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  margin-top: 1.5rem
}

.linkbtn {
  background: none;
  border: 0;
  color: var(--brand);
  font: 600 .92rem var(--font);
  cursor: pointer;
  padding: 0
}

.linkbtn:disabled {
  color: var(--mute);
  cursor: default
}

@keyframes shake {
  25% {
    transform: translateX(-5px)
  }

  75% {
    transform: translateX(5px)
  }
}

@media (min-width:640px) {
  .pin {
    gap: .75rem
  }

  .pin input {
    height: 68px;
    font-size: 1.8rem
  }
}

@media (max-width:359px) {
  .pin {
    gap: .3rem
  }

  .pin input {
    height: 52px;
    font-size: 1.3rem
  }
}

/* billing css */
.billing {
  display: grid;
  gap: 1.5rem
}

.billing h2 {
  font-size: 1.35rem;
  margin-bottom: .25rem
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  margin-bottom: 1rem
}

/* Django messages */
.messages {
  list-style: none;
  padding: 0;
  display: grid;
  gap: .5rem;
  margin-bottom: 10px;
}

.messages .notice {
  margin: 0
}
.notice.warning{background:var(--warn-bg);color:var(--warn-fg)}


.notice.error {
  background: var(--bad-l);
  color: var(--bad)
}

.edit {
  margin-left: 10px;
  font-weight: 800;
}

/* Current plan summary */
.summary {
  display: grid;
  gap: 1rem;
  align-items: center
}

.summary .label {
  color: var(--mute);
  font-size: .85rem
}

.summary .plan-name {
  font: 800 1.8rem var(--head);
  line-height: 1.2
}

.summary .meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-top: .4rem;
  color: var(--ink-2);
  font-size: .95rem
}

.summary form {
  margin: 0
}

/* Plan cards */
.plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem
}

.plan {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  position: relative
}

.plan h3 {
  font-size: 1.2rem
}

.plan .price {
  font-size: 2rem;
  margin: .25rem 0
}

.plan .price small {
  font-size: .9rem
}

.plan .sites {
  color: var(--ink-2);
  font-size: .95rem
}

.plan form {
  margin-top: auto;
  padding-top: 1rem
}

.plan .btn {
  width: 100%
}

.plan.current {
  border: 2px solid var(--brand);
  background: var(--brand-l)
}

.plan .badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding: .65rem;
  border-radius: var(--r);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: .92rem
}

.plan .badge-spacer {
  margin-top: auto;
  padding-top: 1rem;
  min-height: 3.5rem
}

.contact {
  font-size: .95rem;
  color: var(--ink-2)
}

/* Invoices */
.invoices table {
  min-width: 640px
}

.invoices .num {
  font-weight: 600;
  white-space: nowrap
}

.invoices .amount {
  font-variant-numeric: tabular-nums;
  white-space: nowrap
}

.invoices td.actions {
  text-align: right
}

.invoices .none {
  text-align: center;
  color: var(--mute);
  padding: 2rem 1rem
}

/* ≥640px */
@media (min-width:640px) {
  .plans {
    grid-template-columns: repeat(2, 1fr)
  }

  .summary {
    grid-template-columns: 1fr auto
  }

  .section-head {
    flex-direction: row;
    justify-content: space-between;
    align-items: center
  }
}

/* ≥900px */
@media (min-width:900px) {
  .plans {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))
  }
}

/* phones: invoice rows become stacked cards instead of a wide table */
@media (max-width:639px) {
  .invoices table {
    min-width: 0
  }

  .invoices thead {
    display: none
  }

  .invoices tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .15rem .75rem;
    padding: .9rem 0;
    border-bottom: 1px solid var(--line)
  }

  .invoices tr:last-child {
    border: 0
  }

  .invoices td {
    padding: 0;
    border: 0
  }

  .invoices td.date {
    grid-column: 1;
    color: var(--mute);
    font-size: .85rem
  }

  .invoices td.desc {
    grid-column: 1
  }

  .invoices td.amount {
    grid-column: 2;
    grid-row: 1;
    text-align: right
  }

  .invoices td.actions {
    grid-column: 2;
    grid-row: 2;
    text-align: right
  }

  .invoices td.num {
    grid-column: 1;
    grid-row: 1
  }

  .invoices td.none {
    grid-column: 1/-1
  }
}


.meter {
  height: 8px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  margin-top: .5rem
}

.meter i {
  display: block;
  height: 100%;
  background: var(--brand)
}

.meter.full i {
  background: var(--signal)
}

.loss-bars {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 120px;
  margin-top: 1rem
}

.loss-bars a {
  flex: 1;
  display: flex;
  align-items: flex-end;
  height: 100%
}

.loss-bars i {
  display: block;
  width: 100%;
  background: var(--bad);
  border-radius: 3px 3px 0 0;
  opacity: .85
}

.loss-bars a:hover i {
  opacity: 1
}

.filters {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center
}

.filters select {
  width: auto;
  padding: .4rem .7rem;
  font-size: .88rem
}

.page-cell {
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600
}

.nums {
  white-space: nowrap;
  font-variant-numeric: tabular-nums
}

details summary {
  cursor: pointer;
  color: var(--brand);
  font-size: .85rem
}

details ul {
  margin: .4rem 0 0 1rem
}



/* Newsletter, blog and contact — uses tokens from style.css; mobile-first: 640 / 900 / 1200 */

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0
}

.hint.err {
  color: var(--bad)
}

.page-head {
  margin-bottom: 2rem
}

.page-head .lead {
  margin-top: .75rem
}

/* Newsletter: copy left, form right (stacked on mobile) */
.newsletter-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start
}

.newsletter-copy h2 {
  margin-bottom: .9rem
}

.newsletter-form .nl-fields {
  display: grid;
  gap: 0 1rem
}

.newsletter-form .nl-consent {
  margin: .25rem 0 1.25rem;
  font-size: .9rem;
  color: var(--ink-2)
}

/* Blog cards */
.blog-grid {
  margin-top: 1.5rem
}

.blog-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column
}

.blog-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--brand-l)
}

.blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.blog-thumb-empty {
  display: block;
  width: 100%;
  height: 100%
}

.blog-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1
}

.blog-body h3 a {
  color: var(--ink);
  text-decoration: none
}

.blog-body h3 a:hover {
  color: var(--brand)
}

.blog-body p {
  margin: 0;
  font-size: .95rem
}

.blog-meta {
  display: flex;
  gap: 1rem;
  margin-top: auto;
  padding-top: .5rem;
  color: var(--mute);
  font-size: .85rem
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem
}

/* Blog detail */
.post {
  max-width: 760px
}

.post h1 {
  margin: .75rem 0 .75rem;
  font-size: clamp(2rem, 5vw, 3rem)
}

.post-image {
  width: 100%;
  border-radius: var(--r-lg);
  margin: 1.5rem 0;
  aspect-ratio: 16 / 9;
  object-fit: cover
}

.post-body p {
  margin: 0 0 1.1rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink)
}

.related {
  border-top: 1px solid var(--line)
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 2rem;
  align-items: start
}

.contact-copy .lead {
  margin-top: 1rem
}

textarea {
  resize: vertical;
  min-height: 140px
}

/* >=640px */
@media (min-width: 640px) {
  .blog-grid.c3 {
    grid-template-columns: repeat(2, 1fr)
  }
}

/* >=900px */
@media (min-width: 900px) {
  .newsletter-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem
  }

  .contact-copy {
    position: sticky;
    top: 100px
  }

  .blog-grid.c3 {
    grid-template-columns: repeat(3, 1fr)
  }
}

/* >=1200px */
@media (min-width: 1200px) {
  .newsletter-grid {
    gap: 5rem
  }
}



/* Features, pricing, legal — uses tokens from style.css; mobile-first: 640 / 900 / 1200 */

.section.alt {
  background: color-mix(in srgb, var(--brand-l) 55%, var(--paper))
}

.center h2+.lead,
.center h1+.lead {
  margin-top: .9rem
}

/* Decay report mockup */
.mock {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper)
}

.mock-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line)
}

.mock-bar span {
  margin-left: .6rem;
  font-size: .8rem;
  color: var(--mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.mock-body {
  padding: 1.1rem 1.25rem 1.25rem
}

.mock-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: .5rem
}

.mock-head h3 {
  font-size: 1rem
}

.decay-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .15rem .75rem;
  padding: .8rem 0;
  border-top: 1px solid var(--line)
}

.decay-page {
  min-width: 0
}

.decay-page b {
  display: block;
  font-size: .92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.decay-page span {
  color: var(--mute);
  font-size: .82rem;
  font-variant-numeric: tabular-nums
}

.spark {
  display: none;
  width: 80px;
  height: 28px;
  fill: none;
  stroke: var(--bad);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round
}

.spark.warn {
  stroke: var(--signal)
}

.spark.ok {
  stroke: var(--brand)
}

/* Email mockup */
.mail-mock {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  max-width: 520px;
  width: 100%
}

.mk-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .9rem
}

.mk-meta b {
  display: block;
  line-height: 1.2
}

.mk-meta span:not(.mk-avatar) {
  color: var(--mute);
  font-size: .82rem
}

.mk-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: none
}

.mk-subject {
  font: 700 1.15rem var(--head);
  margin: 1rem 0 .75rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--line)
}

.mk-body p {
  font-size: .95rem
}

.mk-body ul {
  list-style: none;
  padding: 0;
  margin: .9rem 0 1.1rem;
  display: grid;
  gap: .4rem
}

.mk-body li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem .8rem;
  background: var(--bad-l);
  border-radius: var(--r);
  font-size: .9rem
}

.mk-body li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink)
}

.mk-body li b {
  color: var(--bad);
  font-variant-numeric: tabular-nums
}

.mk-body small {
  display: block;
  margin-top: 1rem;
  color: var(--mute);
  font-size: .8rem
}

/* Steps */
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem
}

.step-n {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-l);
  color: var(--brand);
  font: 800 1rem var(--head);
  margin-bottom: 1rem
}

/* Split section */
.split {
  display: grid;
  gap: 2rem;
  align-items: center
}

.ticks {
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
  display: grid;
  gap: .6rem;
  color: var(--ink-2)
}

.ticks li::before {
  content: "\2713";
  color: var(--brand);
  font-weight: 700;
  margin-right: .6rem
}

/* Pricing */
.tiers {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem
}

.tier {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  position: relative
}

.tier .price {
  margin: .5rem 0 0
}

.tier ul {
  margin-bottom: 1.5rem
}

.tier .btn {
  margin-top: auto
}

.tier .tag {
  position: absolute;
  top: -.8rem;
  right: 1.25rem
}

.tier-note {
  margin-top: 1.5rem
}

/* FAQ */
.faq {
  max-width: 760px
}

.faq h2 {
  margin-bottom: 1rem
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0
}

.faq summary {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600
}

.faq details p {
  margin-top: .6rem
}

/* Legal */
.legal {
  max-width: 760px
}

.legal h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: .5rem
}

.legal h2 {
  font-size: 1.3rem;
  margin: 2rem 0 .6rem
}

.legal p {
  margin-bottom: .8rem;
  line-height: 1.7
}

.legal ul {
  padding-left: 1.25rem;
  margin-bottom: .8rem;
  color: var(--ink-2)
}

.legal li {
  margin-bottom: .4rem;
  line-height: 1.65
}

/* >=640px */
@media (min-width: 640px) {
  .spark {
    display: block
  }

  .decay-row {
    grid-template-columns: 1fr 80px auto;
    gap: .75rem
  }

  .steps {
    grid-template-columns: repeat(3, 1fr)
  }

  .mock-body {
    padding: 1.25rem 1.5rem 1.5rem
  }
}

/* >=900px */
@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 3rem
  }

  .split .mail-mock {
    justify-self: end
  }

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

/* >=1200px */
@media (min-width: 1200px) {
  .split {
    gap: 5rem
  }
}

/* Toasts */
.toasts {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 9999;
  display: grid;
  gap: .5rem;
  width: min(420px, calc(100% - 2rem));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1rem;
  border-radius: 10px;
  border-left: 4px solid #fff;
  background: #000;
  color: #fff;
  font-size: .95rem;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .15),
    0 8px 24px rgba(0, 0, 0, .3);
  pointer-events: auto;
  animation: toast-in .25s ease;
  transition: opacity .3s, transform .3s;
}

.toast.success {
  border-left-color: #22c55e;
}

.toast.error {
  border-left-color: #ef4444;
}

.toast.warning {
  border-left-color: #f59e0b;
}

.toast.hide {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.toast-close {
  flex: 0 0 auto;
  background: none;
  border: 0;
  padding: 0;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: .7;
}

.toast-close:hover {
  opacity: 1;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
}


/* Brand logo image */
.logo-img {
  display: block;
  height: 26px;
  width: auto;
  max-width: 100%;
}

.logo.has-img {
  gap: 0;
  line-height: 0;
}

.logo-img.sm {
  height: 24px;
}

.logo-img.lg {
  height: 36px;
}

.logo-img.on-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .logo-img.on-light {
    display: none;
  }

  .logo-img.on-dark {
    display: block;
  }
}

.auth-side .logo-img.on-light {
  display: none;
}

.auth-side .logo-img.on-dark {
  display: block;
}


@media (min-width: 640px) {
  .logo-img {
    height: 30px;
  }

  .logo-img.sm {
    height: 26px;
  }

  .logo-img.lg {
    height: 40px;
  }
}

@media (min-width: 900px) {
  .logo-img {
    height: 34px;
  }

  .logo-img.sm {
    height: 28px;
  }

  .logo-img.lg {
    height: 46px;
  }
}

@media (min-width: 1200px) {
  .logo-img {
    height: 36px;
  }

  .logo-img.lg {
    height: 52px;
  }
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 190;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: 1rem 1.1rem;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  margin: 0;
  font-size: .92rem;
}

.cookie-actions {
  display: flex;
  gap: .6rem;
}

.cookie-actions .btn {
  flex: 1;
}

body.has-cookie-banner .toasts {
  bottom: 9rem;
}

@media (min-width: 640px) {
  .cookie-banner {
    right: auto;
    width: min(680px, 100% - 2rem);
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
  }

  .cookie-actions {
    flex: none;
  }

  .cookie-actions .btn {
    flex: none;
  }

  body.has-cookie-banner .toasts {
    bottom: 1rem;
    left: auto;
    right: 1rem;
    transform: none;
  }
}

/* =========================================
   Built for Content Creators
   ========================================= */

.creator-section {
  position: relative;
  padding: 72px 20px;
  overflow: hidden;
  background: var(--paper);
}

.creator-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

/* Header */

.creator-header {
  max-width: 720px;
  margin: 0 auto 42px;
  text-align: center;
}

.creator-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;

  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1;
}

.creator-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-l);
}

.creator-header h2 {
  max-width: 680px;
  margin: 0 auto;

  font-family: var(--head);
  font-size: clamp(32px, 7vw, 52px);
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1.05;
  color: var(--ink);
}

.creator-header h2 span {
  color: var(--brand);
}

.creator-header p {
  max-width: 620px;
  margin: 18px auto 0;

  color: var(--mute);
  font-size: 16px;
  line-height: 1.7;
}


/* =========================================
   Cards
   ========================================= */

.creator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.creator-card {
  position: relative;
  display: flex;
  flex-direction: column;

  min-height: 270px;
  padding: 26px;

  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);

  box-shadow: var(--shadow);

  overflow: hidden;

  transition:
    transform .25s ease,
    border-color .25s ease,
    box-shadow .25s ease;
}

.creator-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  right: 26px;

  height: 2px;

  background: var(--brand);

  transform: scaleX(0);
  transform-origin: left;

  transition: transform .3s ease;
}

.creator-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb,
      var(--brand) 35%,
      var(--line));

  box-shadow:
    0 2px 4px rgba(15, 36, 33, .05),
    0 18px 40px rgba(15, 36, 33, .10);
}

.creator-card:hover::before {
  transform: scaleX(1);
}


/* =========================================
   Icons
   ========================================= */

.creator-icon {
  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 24px;

  color: var(--brand);
  background: var(--brand-l);

  border: 1px solid color-mix(in srgb,
      var(--brand) 12%,
      transparent);

  border-radius: 13px;
}

.creator-icon svg {
  width: 24px;
  height: 24px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* =========================================
   Card Content
   ========================================= */

.creator-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.creator-card h3 {
  margin: 0 0 10px;

  font-family: var(--head);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.025em;

  color: var(--ink);
}

.creator-card p {
  max-width: 390px;
  margin: 0;

  color: var(--mute);
  font-size: 15px;
  line-height: 1.65;
}

.creator-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  width: fit-content;
  margin-top: auto;
  padding-top: 24px;

  color: var(--brand);
  font-size: 14px;
  font-weight: 700;

  text-decoration: none;

  transition:
    color .2s ease,
    gap .2s ease;
}

.creator-link span {
  font-size: 18px;
  line-height: 1;

  transition: transform .2s ease;
}

.creator-link:hover {
  color: var(--brand-d);
  gap: 10px;
}

.creator-link:hover span {
  transform: translateX(2px);
}


/* =========================================
   640px
   ========================================= */

@media (min-width: 640px) {

  .creator-section {
    padding: 90px 28px;
  }

  .creator-header {
    margin-bottom: 50px;
  }

  .creator-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .creator-card {
    min-height: 285px;
    padding: 30px;
  }

}


/* =========================================
   900px
   ========================================= */

@media (min-width: 900px) {

  .creator-section {
    padding: 110px 32px;
  }

  .creator-header {
    margin-bottom: 58px;
  }

  .creator-header p {
    font-size: 17px;
  }

  .creator-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .creator-card {
    min-height: 330px;
    padding: 28px;
  }

}


/* =========================================
   1200px
   ========================================= */

@media (min-width: 1200px) {

  .creator-section {
    padding: 130px 32px;
  }

  .creator-grid {
    gap: 18px;
  }

  .creator-card {
    min-height: 345px;
    padding: 30px;
  }

}

@media (prefers-color-scheme: dark) {

  .creator-card:hover {
    box-shadow:
      0 2px 4px rgba(0, 0, 0, .20),
      0 20px 45px rgba(0, 0, 0, .30);
  }

  .creator-icon {
    border-color: var(--line);
  }

}

/* =========================================
   ReRank Footer
   ========================================= */

.site-footer {
  width: 100%;
  padding: 24px 20px;
  background: var(--card);
  border-top: 1px solid var(--line);
}

.footer-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.footer-logo {
  font-family: var(--head);
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.04em;
}

.footer-copy {
  color: var(--mute);
  font-size: 13px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-links a {
  color: var(--mute);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;

  transition: color .2s ease;
}

.footer-links a:hover {
  color: var(--brand);
}


/* =========================================
   Mobile
   ========================================= */

@media (max-width: 640px) {

  .site-footer {
    padding: 24px 20px;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }

  .footer-brand {
    flex-direction: column;
    gap: 5px;
  }

  .footer-links {
    gap: 20px;
  }

}

/* =========================================
   ReRank — Join Popup
   ========================================= */

.rerank-join-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(8, 25, 21, .62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity .25s ease,
    visibility .25s ease;
}

.rerank-join-overlay:not([hidden]) {
  opacity: 1;
  visibility: visible;
}


/* Modal */

.rerank-join-modal {
  position: relative;

  width: 100%;
  max-width: 560px;

  overflow: hidden;

  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;

  box-shadow:
    0 25px 70px rgba(0, 0, 0, .20),
    0 5px 20px rgba(15, 36, 33, .10);

  transform: translateY(18px) scale(.97);

  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.rerank-join-overlay:not([hidden]) .rerank-join-modal {
  transform: translateY(0) scale(1);
}


/* Close */

.rerank-join-close {
  position: absolute;
  top: 16px;
  right: 16px;

  z-index: 5;

  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: 1px solid var(--line);
  border-radius: 50%;

  background: var(--card);
  color: var(--mute);

  cursor: pointer;

  transition:
    color .2s ease,
    background .2s ease,
    border-color .2s ease,
    transform .2s ease;
}

.rerank-join-close svg {
  width: 17px;
  height: 17px;

  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.rerank-join-close:hover {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--ink-2);
  transform: rotate(5deg);
}


/* =========================================
   Visual
   ========================================= */

.rerank-join-visual {
  position: relative;

  height: 190px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  background:
    radial-gradient(circle at center,
      var(--brand-l) 0%,
      transparent 62%);

  border-bottom: 1px solid var(--line);
}


/* Decorative grid */

.rerank-join-visual::before {
  content: "";

  position: absolute;
  inset: 0;

  opacity: .45;

  background-image:
    linear-gradient(var(--line) 1px,
      transparent 1px),
    linear-gradient(90deg,
      var(--line) 1px,
      transparent 1px);

  background-size: 28px 28px;

  mask-image: radial-gradient(circle,
      black 10%,
      transparent 72%);

  -webkit-mask-image: radial-gradient(circle,
      black 10%,
      transparent 72%);
}


/* Logo */

.rerank-join-logo {
  position: relative;
  z-index: 2;

  width: 76px;
  height: 76px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 22px;

  background: var(--brand);

  color: #fff;

  box-shadow:
    0 12px 30px rgba(20, 115, 92, .28),
    0 0 0 8px var(--brand-l);

  animation: rerankLogoFloat 4s ease-in-out infinite;
}

.rerank-join-logo span {
  font-family: var(--head);
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.06em;
}

@keyframes rerankLogoFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}


/* Orbit */

.rerank-join-orbit {
  position: absolute;

  border: 1px solid color-mix(in srgb,
      var(--brand) 28%,
      transparent);

  border-radius: 50%;

  pointer-events: none;
}

.orbit-one {
  width: 150px;
  height: 150px;

  animation: rerankOrbit 8s linear infinite;
}

.orbit-two {
  width: 230px;
  height: 230px;

  border-style: dashed;

  opacity: .55;

  animation: rerankOrbitReverse 14s linear infinite;
}

@keyframes rerankOrbit {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes rerankOrbitReverse {
  from {
    transform: rotate(360deg);
  }

  to {
    transform: rotate(0deg);
  }
}


/* Floating signals */

.rerank-signal {
  position: absolute;
  z-index: 3;

  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;

  background: var(--card);
  border: 1px solid var(--line);

  font-size: 14px;
  font-weight: 800;

  box-shadow: var(--shadow);
}

.signal-one {
  top: 35px;
  left: calc(50% + 95px);
  color: var(--brand);

  animation: signalFloat 3.5s ease-in-out infinite;
}

.signal-two {
  bottom: 35px;
  left: calc(50% - 130px);
  color: var(--brand);

  animation: signalFloat 4s ease-in-out infinite .4s;
}

.signal-three {
  top: 42px;
  left: calc(50% - 135px);
  color: var(--signal);

  animation: signalFloat 3.8s ease-in-out infinite .8s;
}

@keyframes signalFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}


/* =========================================
   Content
   ========================================= */

.rerank-join-content {
  padding: 30px;
  text-align: center;
}

.rerank-join-label {
  display: inline-block;

  margin-bottom: 12px;

  color: var(--brand);

  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.rerank-join-content h2 {
  margin: 0 auto;

  max-width: 450px;

  font-family: var(--head);
  font-size: clamp(27px, 6vw, 36px);
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1.08;

  color: var(--ink);
}

.rerank-join-content h2 span {
  color: var(--brand);
}

.rerank-join-content>p {
  max-width: 460px;

  margin: 15px auto 0;

  color: var(--mute);

  font-size: 15px;
  line-height: 1.65;
}


/* =========================================
   Benefits
   ========================================= */

.rerank-join-benefits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;

  gap: 8px 18px;

  margin: 22px 0;
}

.rerank-join-benefits div {
  display: flex;
  align-items: center;
  gap: 6px;

  color: var(--ink-2);

  font-size: 12px;
  font-weight: 600;
}

.benefit-icon {
  width: 18px;
  height: 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: var(--brand-l);
  color: var(--brand);

  font-size: 11px;
  font-weight: 900;
}


/* =========================================
   Actions
   ========================================= */

.rerank-join-actions {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 10px;

  margin-top: 24px;
}

.rerank-join-primary {
  min-height: 46px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 0 20px;

  border-radius: 9px;

  background: var(--brand);
  color: #fff;

  font-size: 14px;
  font-weight: 700;

  text-decoration: none;

  box-shadow:
    0 5px 15px rgba(20, 115, 92, .20);

  transition:
    background .2s ease,
    transform .2s ease,
    box-shadow .2s ease;
}

.rerank-join-primary:hover {
  background: var(--brand-d);
  color: #fff;

  transform: translateY(-2px);

  box-shadow:
    0 8px 20px rgba(20, 115, 92, .28);
}

.rerank-join-primary span {
  font-size: 18px;

  transition: transform .2s ease;
}

.rerank-join-primary:hover span {
  transform: translateX(3px);
}

.rerank-join-secondary {
  min-height: 46px;

  padding: 0 18px;

  border: 1px solid var(--line);
  border-radius: 9px;

  background: transparent;
  color: var(--ink-2);

  font-family: inherit;
  font-size: 14px;
  font-weight: 600;

  cursor: pointer;

  transition:
    background .2s ease,
    border-color .2s ease,
    color .2s ease;
}

.rerank-join-secondary:hover {
  background: var(--paper);
  border-color: var(--ink-2);
  color: var(--ink);
}


/* Note */

.rerank-join-note {
  margin-top: 15px !important;

  color: var(--mute) !important;

  font-size: 11px !important;
}


/* =========================================
   640px+
   ========================================= */

@media (min-width: 640px) {

  .rerank-join-visual {
    height: 210px;
  }

  .rerank-join-content {
    padding: 34px 42px 36px;
  }

}


/* =========================================
   Mobile
   ========================================= */

@media (max-width: 480px) {

  .rerank-join-overlay {
    padding: 14px;
  }

  .rerank-join-modal {
    border-radius: 20px;
  }

  .rerank-join-visual {
    height: 165px;
  }

  .rerank-join-content {
    padding: 25px 20px 26px;
  }

  .rerank-join-content h2 {
    font-size: 28px;
  }

  .rerank-join-content>p {
    font-size: 14px;
  }

  .rerank-join-benefits {
    align-items: flex-start;
    flex-direction: column;

    width: fit-content;
    margin-left: auto;
    margin-right: auto;
  }

  .rerank-join-actions {
    flex-direction: column;
  }

  .rerank-join-primary,
  .rerank-join-secondary {
    width: 100%;
  }

  .signal-one {
    left: calc(50% + 70px);
  }

  .signal-two {
    left: calc(50% - 105px);
  }

  .signal-three {
    left: calc(50% - 110px);
  }

}


/* =========================================
   Reduced Motion
   ========================================= */

@media (prefers-reduced-motion: reduce) {

  .rerank-join-logo,
  .rerank-join-orbit,
  .rerank-signal {
    animation: none;
  }

  .rerank-join-overlay,
  .rerank-join-modal {
    transition: none;
  }

}
/* =========================
   HELP PAGE
========================= */

.help-page {
    max-width: 980px;
    margin: 0 auto;
    padding: 32px 18px 70px;
}

.help-hero {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 42px;
}

.help-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--brand);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .12em;
    margin-bottom: 12px;
}

.help-hero h1 {
    font-family: var(--head);
    font-size: clamp(2rem, 6vw, 3rem);
    line-height: 1.1;
    letter-spacing: -.04em;
    margin-bottom: 14px;
}

.help-hero p {
    color: var(--mute);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.faq-container {
    display: grid;
    gap: 38px;
}

.faq-section h2 {
    font-family: var(--head);
    font-size: 1.25rem;
    margin-bottom: 14px;
}

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-item {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 36, 33, .03);
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 19px;
    font-weight: 700;
    color: var(--ink);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary i {
    color: var(--mute);
    font-size: 19px;
    transition: transform .2s ease;
    flex: 0 0 auto;
}

.faq-item[open] summary i {
    transform: rotate(45deg);
    color: var(--brand);
}

.faq-answer {
    padding: 0 19px 19px;
    color: var(--ink-2);
    font-size: .94rem;
    line-height: 1.7;
}

.faq-answer p + p {
    margin-top: 10px;
}

.help-contact {
    margin-top: 42px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--brand-l);
    display: flex;
    align-items: center;
    gap: 16px;
}

.help-contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 22px;
    flex: 0 0 auto;
}

.help-contact h3 {
    font-family: var(--head);
    font-size: 1rem;
    margin-bottom: 2px;
}

.help-contact p {
    color: var(--ink-2);
    font-size: .88rem;
}

.help-contact-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 9px;
    font-size: .88rem;
    font-weight: 700;
    white-space: nowrap;
}

.help-contact-btn:hover {
    background: var(--brand-d);
}

@media (min-width: 640px) {
    .help-page {
        padding: 48px 28px 80px;
    }

    .faq-item summary {
        padding: 20px 22px;
    }

    .faq-answer {
        padding: 0 22px 21px;
    }

    .help-contact {
        padding: 24px;
    }
}

@media (max-width: 639px) {
    .help-contact {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .help-contact > div:nth-child(2) {
        flex: 1;
        min-width: 180px;
    }

    .help-contact-btn {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }
}
/* =========================
   BACK TO TOP
========================= */

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--card);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow);

    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);

    transition:
        opacity .2s ease,
        visibility .2s ease,
        transform .2s ease,
        background .2s ease;
    
    z-index: 1000;
}

.back-to-top:hover {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 639px) {
    .back-to-top {
        width: 42px;
        height: 42px;
        right: 14px;
        bottom: 14px;
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transition: none;
    }
}
/* =========================
   TOP INFO BAR
========================= */
.top-info-bar {
  width: 100%;
  background: var(--brand);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  overflow: hidden;
  transition:
    opacity .25s ease,
    max-height .3s ease,
    transform .3s ease;
}

.top-info-bar.is-hidden {
  opacity: 0;
  max-height: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.top-info-inner {
  width: min(1180px, calc(100% - 2rem));
  min-height: 42px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;

  position: relative;
}

.top-info-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;

  min-width: 0;

  font-size: .88rem;
  line-height: 1.4;
}

.top-info-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: .2rem .5rem;
  border-radius: 999px;

  background: rgba(255, 255, 255, .15);
  color: #fff;

  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;

  flex: 0 0 auto;
}

.top-info-text {
  color: rgba(255, 255, 255, .9);
}

.top-info-text strong {
  color: #fff;
  font-weight: 700;
}

.top-info-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;

  color: #fff;
  font-weight: 700;
  text-decoration: none;

  white-space: nowrap;

  transition:
    opacity .2s ease,
    transform .2s ease;
}

.top-info-link:hover {
  opacity: .8;
  transform: translateX(2px);
}

.top-info-link span {
  font-size: 1rem;
  line-height: 1;
}

.top-info-close {
  position: absolute;
  right: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 30px;
  height: 30px;

  padding: 0;
  border: 0;
  border-radius: 50%;

  background: transparent;
  color: rgba(255, 255, 255, .75);

  font-size: 1.35rem;
  line-height: 1;

  cursor: pointer;

  transition:
    background .2s ease,
    color .2s ease;
}

.top-info-close:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.top-info-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* =========================
   TABLET
========================= */

@media (max-width: 760px) {
  .top-info-inner {
    width: calc(100% - 3.5rem);
    min-height: 44px;
  }

  .top-info-message {
    gap: .5rem;
    font-size: .82rem;
  }

  .top-info-text strong {
    display: none;
  }

  .top-info-close {
    right: -2.5rem;
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 520px) {
  .top-info-inner {
    width: calc(100% - 3rem);
    min-height: 46px;
  }

  .top-info-message {
    justify-content: flex-start;
    width: 100%;
    gap: .5rem;
  }

  .top-info-badge {
    padding: .18rem .42rem;
    font-size: .66rem;
  }

  .top-info-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-info-link {
    flex: 0 0 auto;
    font-size: .8rem;
  }

  .top-info-link span {
    display: none;
  }

  .top-info-close {
    right: -2.25rem;
    width: 28px;
    height: 28px;
    font-size: 1.2rem;
  }
}

/* =========================
   VERY SMALL SCREENS
========================= */

@media (max-width: 360px) {
  .top-info-text {
    max-width: 135px;
  }

  .top-info-link {
    font-size: .76rem;
  }
}

/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {
  .top-info-bar,
  .top-info-link,
  .top-info-close {
    transition: none;
  }
}
/* =========================
   MONITOR & STATS RESPONSIVE
========================= */

/* Small tablets */
@media (min-width: 640px) {

    .monitor {
        padding: 1.5rem;
    }

    .monitor h3 {
        font-size: 1.05rem;
    }

    .probe {
        padding: .8rem 0;
        gap: .85rem;
    }

    .stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
        padding: 2.25rem 0;
    }

    .stats strong {
        font-size: 2rem;
    }
}


/* Desktop */
@media (min-width: 900px) {

    .monitor {
        padding: 1.5rem 1.75rem;
    }

    .monitor h3 {
        margin-bottom: 1.15rem;
    }

    .probe {
        padding: .85rem 0;
        font-size: .94rem;
    }

    .probe span {
        font-size: .86rem;
    }

    .bars {
        height: 40px;
        gap: 3px;
    }

    .stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
        padding: 2.5rem 0;
    }

    .stats strong {
        font-size: 2.25rem;
    }
}


/* Large desktop */
@media (min-width: 1200px) {

    .monitor {
        padding: 1.75rem 2rem;
    }

    .stats {
        gap: 3rem;
        padding: 3rem 0;
    }

    .stats strong {
        font-size: 2.4rem;
    }
}


/* Extra small mobile */
@media (max-width: 380px) {

    .monitor {
        padding: 1rem;
    }

    .monitor h3 {
        font-size: .95rem;
    }

    .probe {
        gap: .55rem;
        padding: .65rem 0;
        font-size: .85rem;
    }

    .probe span {
        font-size: .76rem;
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    .bars {
        height: 28px;
    }

    .stats {
        gap: 1rem;
        padding: 1.5rem 0;
    }

    .stats strong {
        font-size: 1.5rem;
    }

    .stats span {
        font-size: .78rem;
    }
}
/* ---------- 1. Base safety (all screen sizes) ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: clip; min-width: 320px; }
 
.app,
.auth { min-height: 100vh; min-height: 100dvh; }
 
.app-main,
.content,
.card,
.monitor,
.mock,
.mail-mock { min-width: 0; }
 
.table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; }
 
.nav { gap: .6rem; }
.logo { min-width: 0; flex: 0 1 auto; }
.nav .theme-toggle,
.topbar .theme-toggle,
.burger { flex: none; }
 
.topbar h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 
.sidebar { max-width: 85vw; overflow-y: auto; overscroll-behavior: contain; }
 
.menu {
  max-height: calc(100vh - 66px);
  max-height: calc(100dvh - 66px);
  overflow-y: auto;
}
 
.toast { word-break: break-word; }
 
.modal .card,
.rerank-join-modal {
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-x: hidden;
  overflow-y: auto;
}
 
 
/* ---------- 2. Light-theme counters for the older dark @media blocks ----------
   Your old "@media (prefers-color-scheme: dark)" rules for .cta, .logo-img and
   .creator-* are still in the file. These make the toggle's "light" choice win
   over them when the device itself is dark. */
:root[data-theme="light"] .cta { background: var(--ink); }
:root[data-theme="light"] .cta h2 { color: var(--paper); }
:root[data-theme="light"] .cta p { color: color-mix(in srgb, var(--paper) 75%, transparent); }
:root[data-theme="light"] .logo-img.on-light { display: block; }
:root[data-theme="light"] .logo-img.on-dark { display: none; }
:root[data-theme="light"] .auth-side .logo-img.on-light { display: none; }
:root[data-theme="light"] .auth-side .logo-img.on-dark { display: block; }
:root[data-theme="light"] .creator-card:hover {
  box-shadow: 0 2px 4px rgba(15, 36, 33, .05), 0 18px 40px rgba(15, 36, 33, .10);
}
:root[data-theme="light"] .creator-icon {
  border-color: color-mix(in srgb, var(--brand) 12%, transparent);
}
 
 
/* ---------- 3. Large screens (>= 1400px) ---------- */
@media (min-width: 1400px) {
  .wrap { width: min(1280px, 100% - 4rem); }
  .content { max-width: 1240px; }
  .creator-container,
  .footer-container { max-width: 1280px; }
  .top-info-inner { max-width: 1500px; }
}
 
 
/* ---------- 4. Small laptops / tablets landscape (900px - 1023px) ---------- */
@media (min-width: 900px) and (max-width: 1023px) {
  .menu a { padding: .7rem .55rem; font-size: .93rem; }
  .hero { gap: 2rem; }
  .creator-grid { grid-template-columns: repeat(2, 1fr); }
  .sidebar { width: 230px; }
  .app-main { margin-left: 230px; }
  .auth-side { padding: 2rem; }
}
 
 
/* ---------- 5. Tablets portrait and below (<= 767px) ---------- */
@media (max-width: 767px) {
  .section { padding: 2.5rem 0; }
  .hero { padding-top: 2rem; padding-bottom: 2rem; gap: 2rem; }
  .lead { font-size: 1.05rem; }
  .grid,
  .tiers,
  .steps { margin-top: 1.75rem; gap: 1rem; }
  .footer { margin-top: 2.5rem; }
  .cta { padding: 2rem 1.25rem; }
  .page-cell { max-width: 180px; }
  .split .mail-mock { max-width: 100%; justify-self: stretch; }
  .creator-card { min-height: 0; }
  .creator-link { padding-top: 18px; }
  .contact-copy { position: static; }
  .post-image { border-radius: var(--r); margin: 1rem 0; }
}
 
 
/* ---------- 6. Phones (<= 639px) ---------- */
@media (max-width: 639px) {
  /* 16px stops iOS Safari zooming into fields */
  input,
  select,
  textarea,
  .filters select { font-size: 16px; }
 
  .filters { width: 100%; }
  .filters select { flex: 1 1 140px; width: auto; }
 
  .topbar { padding: .7rem .85rem; gap: .6rem; }
  .topbar .btn { padding: .45rem .8rem; }
 
  .content { padding: 1rem .85rem 2.5rem; }
  .kpi strong { font-size: 1.7rem; }
  .summary .btn { width: 100%; }
  .remove-item .btn { width: 100%; }
 
  .auth-main { padding: 1.5rem 1rem; }
  .auth-box h1 { font-size: 1.7rem; }
 
  .monitor h3 { flex-wrap: wrap; gap: .4rem; }
  .mock-body { padding: 1rem; }
  .tier .tag { right: 1rem; }
 
  .pager { flex-wrap: wrap; }
  .post-body p { font-size: 1rem; line-height: 1.7; }
  .legal h2 { font-size: 1.15rem; }
 
  .footer .cols { grid-template-columns: 1fr 1fr; }
  .footer .cols > div:first-child { grid-column: 1 / -1; }
 
  .toasts { width: calc(100% - 1.5rem); }
  .cookie-banner { left: .75rem; right: .75rem; padding: .9rem; }
  .cookie-actions .btn { padding: .65rem .5rem; }
  body.has-cookie-banner .back-to-top { bottom: 9.5rem; }
 
  .help-hero h1 { font-size: 1.9rem; }
  .rerank-join-label { font-size: 10px; }
}
 
 
/* ---------- 7. Small phones (<= 479px) ---------- */
@media (max-width: 479px) {
  .wrap { width: calc(100% - 1.5rem); }
  .btn { padding: .7rem 1rem; }
  .card { padding: 1.15rem; }
  .card.pad-lg { padding: 1.25rem; }
  .stats { gap: 1rem; }
  .price { font-size: 2.2rem; }
 
  .hero .actions { flex-direction: column; }
  .hero .actions .btn { width: 100%; }
 
  .modal { padding: .75rem; }
  .modal .actions { flex-direction: column-reverse; }
  .modal .actions .btn { width: 100%; }
 
  .top-info-content { font-size: .75rem; }
 
  .creator-section { padding: 56px 16px; }
  .creator-header { margin-bottom: 32px; }
  .creator-header h2 { font-size: 30px; }
  .creator-card { padding: 22px; }
 
  .site-footer { padding: 20px 16px; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 12px 18px; }
 
  .help-page { padding: 24px 14px 56px; }
  .faq-item summary { padding: 15px; font-size: .95rem; }
  .faq-answer { padding: 0 15px 15px; }
  .help-contact { padding: 16px; }
 
  .rerank-join-visual { height: 140px; }
  .rerank-join-logo { width: 64px; height: 64px; border-radius: 18px; }
  .rerank-join-logo span { font-size: 34px; }
  .orbit-one { width: 120px; height: 120px; }
  .orbit-two { width: 190px; height: 190px; }
  .rerank-join-content h2 { font-size: 24px; }
  .rerank-join-note { font-size: 10.5px !important; }
}
 
 
/* ---------- 8. Very small phones (<= 359px) ---------- */
@media (max-width: 359px) {
  h1 { font-size: 2rem; }
  .logo { font-size: 1.15rem; }
  .logo i { width: 22px; height: 22px; }
  .logo i::after { inset: 6px; }
  .burger,
  .theme-toggle { width: 38px; height: 38px; }
  .btn { font-size: .9rem; }
 
  .pin { gap: .25rem; }
  .pin input { height: 48px; font-size: 1.15rem; padding: 0; }
 
  .kpi strong { font-size: 1.5rem; }
  .rerank-signal { display: none; }
  .footer .cols { grid-template-columns: 1fr; }
}
 
 
/* ---------- 9. Landscape phones (short screens) ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .site-header { position: static; }
  .hero { padding: 1.5rem 0; }
  .section { padding: 2rem 0; }
  .auth,
  .app { min-height: auto; }
  .auth-main { padding: 1rem; }
  .rerank-join-visual { display: none; }
  .rerank-join-content { padding: 20px 24px; }
  .cookie-banner { max-height: 60vh; overflow-y: auto; }
  .sidebar { padding: 1rem; }
  .sidebar .logo { margin-bottom: .75rem; }
}
 
 
/* ---------- 10. Touch devices ---------- */
@media (pointer: coarse) {
  .sidebar a.link { padding: .7rem .8rem; }
  .btn-sm { min-height: 40px; }
  .linkbtn { min-height: 40px; }
  .top-info-close { width: 36px; height: 36px; }
  .rerank-join-close { width: 40px; height: 40px; }
  summary { min-height: 44px; display: flex; align-items: center; }
}
 
/* No hover on touch: skip lift effects that can stick after a tap */
@media (hover: none) {
  .creator-card:hover { transform: none; }
  .creator-card:hover::before { transform: scaleX(0); }
  .rerank-join-primary:hover { transform: none; }
}
 
 /* ===== Footer Social Links ===== */

.footer-social {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: .75rem;
}

.footer-social a {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-2);
  background: var(--card);
  text-decoration: none;
  font-size: 1.1rem;
  transition:
    color .2s ease,
    background-color .2s ease,
    border-color .2s ease,
    transform .2s ease;
}

.footer-social a:hover {
  color: var(--card);
  background: var(--brand);
  border-color: var(--brand);
  transform: translateY(-2px);
}

.footer-social a:focus-visible {
  outline: 3px solid var(--brand-l);
  outline-offset: 3px;
}

/* ===== Mobile ===== */

@media (max-width: 639px) {
  .footer-social {
    gap: .5rem;
  }

  .footer-social a {
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
  }
}

/* ===== Tablet ===== */

@media (min-width: 640px) {
  .footer-social {
    gap: .65rem;
  }
}

/* ===== Desktop ===== */

@media (min-width: 900px) {
  .footer-social a {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

/* ===== Large desktop ===== */

@media (min-width: 1200px) {
  .footer-social a {
    width: 38px;
    height: 38px;
  }
}

.field-error {
  font-size: 12px;
  color: red;
}