/* =====================================================================
   TubeLeader — Design System v2  (rich, animated, responsive)
   Indigo/purple gradients · yellow signal borders · animated cards,
   toasts, tier badges, quota bars, lock states. Dark + light themes.
   ===================================================================== */

:root {
  --accent: #6366f1;
  --accent-2: #a855f7;
  --grad: linear-gradient(135deg, #6366f1, #a855f7);
  --yellow: #eab308;
  --green: #22c55e;
  --red: #ef4444;
  --cyan: #06b6d4;
  --signal: #6366f1;
  --signal-glow: rgba(99, 102, 241, 0.35);
  --readable-accent-text: #ffb4ba;
  --readable-danger-text: #ff9aa3;
  --text-accent-gradient: linear-gradient(90deg, #ffffff, #ffb4ba);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: "Space Grotesk", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

:root,
[data-theme="dark"] {
  --bg: #0a0a0f;
  --bg2: #12121a;
  --bg3: #1a1a25;
  --panel: #15151f;
  --panel-2: #1a1a25;
  --line: #2a2a3a;
  --line-soft: #20202c;
  --ink: #ffffff;
  /* --ink-1 is the same as --ink; it exists so panels can say "strongest text"
     without caring which theme is on. */
  --ink-1: var(--ink);
  --ink-2: #a0a0b0;
  --ink-3: #6a6a7a;
  --card-border: var(--line);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  /* Gains and losses in body text. --green and --red stay as they are because
     they are also used as fills, where a bright colour is what you want; these
     two are for coloured text, which needs a different value in each theme to
     stay readable. */
  --readable-positive-text: #4ade80;
  --readable-negative-text: #f87171;
}
[data-theme="light"] {
  --bg: #f2f3f9;
  --bg2: #ffffff;
  --bg3: #ffffff;
  --panel: #ffffff;
  --panel-2: #f6f7fc;
  --line: #e3e6f0;
  --line-soft: #eef0f7;
  --ink: #14161f;
  --ink-1: var(--ink);
  --ink-2: #4a5169;
  --ink-3: #8b93a8;
  --card-border: #e3e6f0;
  --shadow: 0 12px 40px rgba(30, 40, 80, 0.12);
  --readable-accent-text: #8f0710;
  --readable-danger-text: #a90813;
  /* #4ade80 all but disappears on white; these are the same hues taken far
     enough down to read. */
  --readable-positive-text: #15803d;
  --readable-negative-text: #b91c1c;
  --text-accent-gradient: linear-gradient(90deg, #760008, #d61a25);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition:
    background 0.3s var(--ease),
    color 0.3s var(--ease);
}
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: var(--bg2);
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
a {
  color: inherit;
  text-decoration: none;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

.aura {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.aura::before,
.aura::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 18s ease-in-out infinite;
}
.aura::before {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  top: -120px;
  right: -80px;
}
.aura::after {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, var(--accent-2), transparent 70%);
  bottom: -140px;
  left: -100px;
  animation-delay: -9s;
}
@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(40px, -30px) scale(1.08);
  }
  66% {
    transform: translate(-30px, 20px) scale(0.95);
  }
}

.container {
  width: 80%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0;
}
.container-wide {
  width: 90%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0;
}
.grid {
  display: grid;
  gap: 18px;
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.row {
  display: flex;
  gap: 14px;
}
.spread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 22px 0;
}
.muted {
  color: var(--ink-3);
}
.hidden {
  display: none !important;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.brand {
  display: flex;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  justify-content: center;
}
.brand .mark {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 6px 22px var(--signal-glow);
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 6px 22px var(--signal-glow);
  }
  50% {
    box-shadow: 0 6px 34px var(--signal-glow);
  }
}
.brand .logo-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand .brand-logo-image {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  object-fit: contain;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  padding: 9px 15px;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 14px;
  transition: 0.2s var(--ease);
}
.nav-links a:hover {
  color: var(--ink);
  background: var(--panel);
}
@media (max-width: 760px) {
  .nav-links .hide-sm {
    display: none;
  }
  .brand {
    font-size: 18px;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 3px 20px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  transition: 0.22s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  border: 1px solid var(--yellow);
  box-shadow: 0 6px 22px var(--signal-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--signal-glow);
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.28),
    transparent
  );
  transition: left 0.5s;
}
.btn-primary:hover::after {
  left: 130%;
}
.btn-ghost {
  background: var(--bg3);
  color: var(--ink);
  border: 1px solid var(--yellow);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}
.btn-block {
  width: 100%;
  justify-content: center;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--bg3);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.22s var(--ease);
  font-size: 18px;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(-15deg);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.input,
select,
textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 11px;
  background: var(--bg);
  border: 2px solid var(--line);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  transition: 0.2s var(--ease);
}
.input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--signal-glow);
}
[data-theme="light"] .input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: var(--panel-2);
}
.search-bar {
  display: flex;
  gap: 12px;
}
.search-bar .input {
  flex: 1;
}

.card {
  background: var(--bg3);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  padding: 1px;
  transition: 0.25s var(--ease);
  position: relative;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.card-pad-lg {
  padding: 28px;
}
.panel {
  background: var(--bg3);
  border: 1px solid var(--card-border);
  border-radius: var(--r-xl);
}

.stat-card {
  background: var(--bg3);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: 0.25s var(--ease);
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
}
.stat-card.g::before {
  background: var(--green);
}
.stat-card.y::before {
  background: var(--yellow);
}
.stat-card.r::before {
  background: var(--red);
}
.stat-card.c::before {
  background: var(--cyan);
}
.stat-card.p::before {
  background: var(--grad);
}
.stat-label {
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.stat-value {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}
.stat-value.grad,
.theme-text-gradient {
  background: var(--text-accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--readable-accent-text);
}
.stat-sub {
  font-size: 12px;
  color: var(--ink-3);
}
.stat-icon {
  position: absolute;
  bottom: 14px;
  right: 16px;
  font-size: 40px;
  opacity: 0.12;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat .num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat .lbl {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-3);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.tier {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tier-Diamond {
  background: linear-gradient(135deg, #b9f2ff, #00d4ff);
  color: #000;
}
.tier-Ruby {
  background: linear-gradient(135deg, #ff0000, #cc0000);
  color: #fff;
}
.tier-Platinum {
  background: linear-gradient(135deg, #e5e4e2, #c0c0c0);
  color: #000;
}
.tier-Gold {
  background: linear-gradient(135deg, #ffd700, #ffb800);
  color: #000;
}
.tier-Silver {
  background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
  color: #000;
}
.tier-Bronze {
  background: linear-gradient(135deg, #cd7f32, #b8860b);
  color: #fff;
}
.tier-Copper {
  background: linear-gradient(135deg, #b87333, #a0522d);
  color: #fff;
}
.tier-Starter {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: #fff;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.vcard {
  background: var(--bg3);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: 0.25s var(--ease);
  position: relative;
}
.vcard:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}
.card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg2);
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.3s var(--ease);
}
.vcard:hover .card-thumb img {
  transform: scale(1.06);
}
.duration {
  position: absolute;
  bottom: 9px;
  right: 9px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-family: var(--font-mono);
  z-index: 3;
}
.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 58px;
  height: 58px;
  background: rgba(234, 179, 8, 0.92);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.25s var(--ease);
  z-index: 4;
  opacity: 0;
}
.vcard:hover .play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.play-btn:hover {
  background: var(--yellow);
  transform: translate(-50%, -50%) scale(1.12);
}
.play-btn::after {
  content: "▶";
  color: #fff;
  font-size: 22px;
  margin-left: 3px;
}
.card-body {
  padding: 18px;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}
.card-meta {
  font-size: 13px;
  color: var(--ink-3);
  margin: 8px 0;
}
.card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 6px;
}
.card-stats .s {
  display: flex;
  align-items: center;
  gap: 5px;
}
.card-foot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.earnings {
  color: var(--green);
  font-weight: 700;
  font-family: var(--font-mono);
}
.eng-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-around;
}
.eng-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.eng-label {
  color: var(--ink-3);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.eng-value {
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 14px;
}
.eng-value.good {
  color: var(--green);
}
.eng-value.avg {
  color: var(--yellow);
}
.eng-value.low {
  color: var(--readable-danger-text);
}

.copy-icon {
  cursor: pointer;
  color: var(--ink-3);
  font-size: 13px;
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 5px;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.copy-icon:hover {
  color: var(--yellow);
  background: rgba(234, 179, 8, 0.12);
}
.copy-icon.copied {
  color: var(--green);
}

.star-icon {
  cursor: pointer;
  font-size: 19px;
  transition: 0.2s;
  display: inline-block;
  filter: grayscale(100%);
  opacity: 0.45;
}
button.star-icon {
  appearance: none;
  border: 0;
  padding: 2px 4px;
  background: transparent;
  font: inherit;
  line-height: 1;
}
.star-icon:hover {
  transform: scale(1.25);
}
.star-icon.active {
  color: #d90012;
  text-shadow: 0 0 10px rgba(217, 0, 18, 0.42);
  filter: grayscale(0%);
  opacity: 1;
}
html[data-theme="dark"] .star-icon.active {
  color: #ffee00;
  text-shadow: 0 0 12px rgba(255, 45, 62, 0.62);
}
.star-icon.is-busy {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}
.star-icon:disabled {
  pointer-events: none;
}

.lock-icon {
  cursor: pointer;
  color: var(--ink-3);
  font-size: 14px;
  margin-left: 6px;
  transition: 0.2s;
}
.lock-icon:hover {
  color: var(--yellow);
}
.feat-locked {
  position: relative;
  opacity: 0.55;
}

.profile-header {
  display: flex;
  gap: 28px;
  padding: 30px;
  background: var(--bg3);
  border: 1px solid var(--card-border);
  border-radius: var(--r-xl);
  margin-bottom: 26px;
  position: relative;
  flex-wrap: wrap;
  overflow: hidden;
}
.profile-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad);
}
.profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid var(--accent);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 24px var(--signal-glow);
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-info {
  flex: 1;
  min-width: 260px;
}
.profile-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.profile-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 10px;
}
.profile-meta .m {
  display: flex;
  align-items: center;
  gap: 5px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg3);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.table th {
  text-align: left;
  padding: 14px 16px;
  background: var(--bg2);
  font-weight: 700;
  font-size: 12px;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  user-select: none;
}
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.table tr:hover td {
  background: rgba(99, 102, 241, 0.06);
}
.table .num {
  font-family: var(--font-mono);
}

.filter-panel {
  margin: 18px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg2);
  animation: slideDown 0.25s var(--ease);
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-label {
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 600;
}

.seg {
  display: inline-flex;
  background: var(--bg);
  padding: 5px;
  border-radius: 12px;
  gap: 4px;
}
.seg button {
  border: none;
  background: transparent;
  color: var(--ink-2);
  padding: 8px 20px;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: 0.2s;
}
.seg button.on {
  background: var(--grad);
  color: #fff;
}

.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}
@media (max-width: 1000px) {
  .plans {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .plans {
    grid-template-columns: 1fr;
  }
}
.plan-card {
  position: relative;
  background: var(--bg3);
  border: 1px solid var(--card-border);
  border-radius: var(--r-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: 0.28s var(--ease);
}
.plan-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}
.plan-card.featured {
  border: 2px solid var(--accent);
  box-shadow: 0 0 40px var(--signal-glow);
}
.plan-card .ribbon {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 14px var(--signal-glow);
}
.plan-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
}
.plan-price {
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 10px 0;
}
.plan-price small {
  font-size: 15px;
  color: var(--ink-3);
  font-family: var(--font-body);
}
.plan-price .was {
  font-size: 20px;
  color: var(--ink-3);
  text-decoration: line-through;
  margin-right: 8px;
}
.offer-flag {
  display: inline-block;
  background: var(--green);
  color: #04250f;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 7px;
  margin-bottom: 8px;
}
.feat-list {
  list-style: none;
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
}
.feat-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-2);
  flex-wrap: wrap;
}
.feat-list li .tick {
  color: var(--green);
  flex-shrink: 0;
  font-weight: 800;
}
.feat-list li .cross {
  color: var(--ink-3);
  flex-shrink: 0;
}
.feat-list li.off {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: var(--line);
}
.feat-list li .feat-name {
  flex: 1;
  min-width: 0;
}
.feat-list li .feat-badge {
  font-size: 11px;
  flex-shrink: 0;
  opacity: 0.75;
}
.feat-list li .feat-note {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--readable-accent-text);
  background: rgba(99, 102, 241, 0.1);
  border-radius: 6px;
  padding: 2px 7px;
  flex-shrink: 0;
  text-decoration: none;
}
.feat-list li.off .feat-note {
  display: none;
}
.plan-validity {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: -4px;
  margin-bottom: 4px;
}

.hero {
  padding: 90px 0 60px;
  text-align: center;
  position: relative;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--readable-accent-text);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
  padding: 6px 16px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.hero h1 .accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.sub {
  font-size: 19px;
  color: var(--ink-2);
  max-width: 640px;
  margin: 22px auto 0;
}
.hero .search-hero {
  max-width: 660px;
  margin: 34px auto 0;
}

.ai-section {
  background: var(--bg3);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  padding: 26px;
  transition: 0.3s;
}
.ai-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}
.ai-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-badge {
  font-size: 10px;
  padding: 4px 10px;
  background: var(--grad);
  color: #fff;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}
.collapse-icon {
  cursor: pointer;
  font-size: 18px;
  transition: 0.3s;
  color: var(--ink-3);
}
.ai-section.collapsed .ai-body {
  display: none;
}
.ai-section.collapsed .collapse-icon {
  transform: rotate(180deg);
}
.ai-body {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  line-height: 1.8;
  position: relative;
}
.ai-result .title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 18px 0 8px;
  color: var(--readable-accent-text);
}
.ai-result .subtitle {
  font-size: 16px;
  font-weight: 700;
  margin: 14px 0 6px;
  color: var(--cyan);
}
.ai-result .point {
  display: flex;
  gap: 10px;
  margin: 7px 0;
}
.ai-result .point::before {
  content: "•";
  color: var(--cyan);
  font-weight: 800;
}
.ai-result .highlight {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.22),
    rgba(168, 85, 247, 0.22)
  );
  padding: 2px 8px;
  border-radius: 5px;
  color: #a5b4fc;
}
.ai-result .tip {
  background: rgba(34, 197, 94, 0.1);
  border-left: 3px solid var(--green);
  padding: 12px 15px;
  margin: 10px 0;
  border-radius: 0 6px 6px 0;
}
.ai-result .warning {
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid var(--red);
  padding: 12px 15px;
  margin: 10px 0;
  border-radius: 0 6px 6px 0;
}
.ai-result .success {
  background: rgba(34, 197, 94, 0.1);
  border-left: 3px solid var(--green);
  padding: 12px 15px;
  margin: 10px 0;
  border-radius: 0 6px 6px 0;
  color: var(--green);
}

.quota-bar {
  width: 100%;
  height: 12px;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 8px;
}
.quota-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--yellow), var(--red));
  transition: width 0.5s var(--ease);
}

.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}
.side {
  background: var(--bg2);
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 5px 10px;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  color: var(--ink-2);
  font-weight: 600;
  margin-bottom: 4px;
  transition: 0.18s var(--ease);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font-body);
}
.side-link-admin {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 5px 10px;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  color: var(--ink-2);
  font-weight: 600;
  margin-bottom: 4px;
  transition: 0.18s var(--ease);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font-body);
}
.side-link:hover {
  background: var(--bg3);
  color: var(--ink);
  transform: translateX(3px);
}
.side-link.active {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 16px var(--signal-glow);
}
.side-link-admin:hover {
  background: var(--bg3);
  color: var(--ink);
  transform: translateX(3px);
}
.side-link-admin.active {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 16px var(--signal-glow);
}
.side-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin: 18px 0 8px 14px;
  font-weight: 700;
}
.main {
  min-width: 0;
  padding: 5px 15px;
  max-width: 100%;
  overflow-x: clip;
}
.panel-mobile-nav {
  display: none;
}
.panel-side-backdrop {
  display: none;
}
@media (max-width: 900px) {
  .shell {
    display: block;
  }
  .side {
    position: fixed;
    z-index: 320;
    inset: 0 auto 0 0;
    width: min(300px, 86vw);
    height: 100vh;
    height: 100dvh;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    transform: translateX(-105%);
    visibility: hidden;
    transition:
      transform 0.24s var(--ease),
      visibility 0.24s var(--ease);
    box-shadow: 22px 0 52px rgba(0, 0, 0, 0.34);
  }
  .side.open {
    transform: translateX(0);
    visibility: visible;
  }
  .panel-side-backdrop {
    position: fixed;
    z-index: 310;
    inset: 0;
    display: block;
    pointer-events: none;
    opacity: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.64);
    backdrop-filter: blur(3px);
    transition: opacity 0.22s var(--ease);
  }
  body.panel-menu-open {
    overflow: hidden;
  }
  body.panel-menu-open .panel-side-backdrop {
    pointer-events: auto;
    opacity: 1;
  }
  .panel-mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 66px;
    padding: 10px max(14px, env(safe-area-inset-right)) 10px
      max(14px, env(safe-area-inset-left));
    background: color-mix(in srgb, var(--bg2) 94%, transparent);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
  }
  .panel-mobile-nav .brand {
    min-width: 0;
  }
  .panel-menu-button {
    flex: 0 0 42px;
  }
  .main {
    padding: 20px 16px;
  }
}

.toast-wrap {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--bg3);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 15px 40px 15px 18px;
  min-width: 280px;
  max-width: 380px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transform: translateX(460px);
  transition: transform 0.35s var(--ease);
  position: relative;
}
.toast.show {
  transform: translateX(0);
}
.toast.success {
  border-color: var(--green);
}
.toast.error {
  border-color: var(--red);
}
.toast.info {
  border-color: var(--cyan);
}
.toast.warn {
  border-color: var(--yellow);
}
.toast-title {
  font-weight: 800;
  margin-bottom: 3px;
  font-size: 14px;
}
.toast-msg {
  font-size: 13px;
  color: var(--ink-2);
}
.toast-close {
  position: absolute;
  top: 8px;
  right: 12px;
  cursor: pointer;
  color: var(--ink-3);
  font-size: 18px;
}

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}
.modal-back.open {
  display: flex;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.modal {
  background: var(--bg3);
  border: 2px solid var(--yellow);
  border-radius: var(--r-xl);
  max-width: 820px;
  width: 100%;
  max-height: 88vh;
  overflow: auto;
  box-shadow: var(--shadow);
  animation: popIn 0.25s var(--ease);
}
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 2px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg3);
}
.modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--yellow);
}
.modal-body {
  padding: 24px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}
.switch input {
  display: none;
}
.switch .slider {
  position: absolute;
  inset: 0;
  background: var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s;
}
.switch .slider:before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}
.switch input:checked + .slider {
  background: rgba(234, 179, 8, 0.35);
}
.switch input:checked + .slider:before {
  transform: translateX(24px);
  background: var(--yellow);
}

.flash {
  padding: 13px 17px;
  border-radius: 11px;
  margin-bottom: 18px;
  font-weight: 600;
}
.flash-ok {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid var(--green);
  color: var(--green);
}
.flash-warn {
  background: linear-gradient(
    135deg,
    var(--yt-red-deep),
    var(--yt-red-dark) 58%,
    var(--yt-red)
  ) !important;
  border: 1px solid var(--yellow);
  color: var(--yellow);
}
.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--yellow);
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(181, 18, 27, 0.96),
    rgba(78, 8, 14, 0.98) 58%,
    rgba(229, 9, 20, 0.94)
  );
  color: #fff;
  box-shadow: var(--shadow);
}
.impersonation-banner-copy {
  min-width: 0;
}
.impersonation-banner-copy strong {
  display: block;
  color: var(--yellow);
  font: 850 13px var(--font-display);
}
.impersonation-banner-copy span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  line-height: 1.45;
}
.impersonation-banner form {
  flex: 0 0 auto;
}
.impersonation-return-btn {
  border: 1px solid #fff !important;
  background: rgba(0, 0, 0, 0.22) !important;
  color: #fff !important;
}
.impersonation-return-btn:hover {
  background: rgba(0, 0, 0, 0.38) !important;
}
@media (max-width: 620px) {
  .impersonation-banner {
    align-items: stretch;
    flex-direction: column;
  }
  .impersonation-banner form,
  .impersonation-return-btn {
    width: 100%;
  }
  .impersonation-return-btn {
    justify-content: center;
  }
}
.payment-readiness-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}
.payment-readiness {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg2);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.02em;
}
.payment-readiness.is-ready {
  border-color: rgba(34, 197, 94, 0.7);
  background: rgba(34, 197, 94, 0.13);
  color: #4ade80;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.05);
}
.payment-readiness.is-warning {
  border-color: rgba(234, 179, 8, 0.72);
  background: rgba(234, 179, 8, 0.12);
  color: #facc15;
}
.payment-readiness.is-off {
  border-color: rgba(244, 63, 94, 0.62);
  background: rgba(244, 63, 94, 0.11);
  color: #fb7185;
}
.h-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}
@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}
.empty {
  text-align: center;
  padding: 60px 20px;
}
.empty-icon {
  font-size: 56px;
  opacity: 0.4;
  margin-bottom: 16px;
}

footer.site {
  border-top: 1px solid var(--line-soft);
  padding: 40px 0;
  margin-top: 60px;
  color: var(--ink-3);
  font-size: 14px;
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .results-grid {
    grid-template-columns: 1fr;
  }
  .row {
    flex-wrap: wrap;
  }
  .hero {
    padding: 60px 0 40px;
  }
  .container,
  .container-wide {
    width: 95%;
    padding: 0;
  }
}
@media (min-width: 641px) and (max-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================ CAROUSELS (v4) ============================ */
.carousel-wrap {
  overflow: hidden;
  position: relative;
  margin: 8px 0;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 6%,
    #000 94%,
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 6%,
    #000 94%,
    transparent
  );
}
.carousel-track {
  display: flex;
  gap: 16px;
  width: max-content;
}
.carousel-track.ltr {
  animation: scrollLTR 60s linear infinite;
}
.carousel-track.rtl {
  animation: scrollRTL 60s linear infinite;
}
.carousel-wrap:hover .carousel-track {
  animation-play-state: paused;
}
@keyframes scrollRTL {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
@keyframes scrollLTR {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}
.ccard {
  flex: 0 0 auto;
  width: 210px;
  background: var(--bg3);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  transition: 0.2s var(--ease);
  cursor: pointer;
}
.ccard:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.ccard img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  margin-bottom: 10px;
}
.ccard .nm {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ccard .sb {
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  margin-top: 4px;
}
.vcarousel {
  flex: 0 0 auto;
  width: 280px;
  background: var(--bg3);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: 0.2s var(--ease);
}
.vcarousel:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.vcarousel img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.vcarousel .vb {
  padding: 12px;
}
.vcarousel .vt {
  font-size: 13px;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* section tiles */
.sec-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 900px) {
  .sec-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px) {
  .sec-tiles {
    grid-template-columns: 1fr;
  }
}
.sec-tile {
  background: var(--bg3);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 26px;
  text-align: center;
  transition: 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}
.sec-tile:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.sec-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad);
}
.sec-tile .ic {
  font-size: 40px;
  margin-bottom: 12px;
}
.sec-tile .t {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
}
.sec-tile .d {
  color: var(--ink-3);
  font-size: 13px;
  margin-top: 6px;
}

/* ranking table */
.rank-table {
  width: 100%;
  border-collapse: collapse;
}
.rank-table th {
  background: var(--bg2);
  padding: 12px 14px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--ink-3);
  position: sticky;
  top: 0;
}
.rank-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.rank-table tr:hover td {
  background: rgba(99, 102, 241, 0.06);
}
.rank-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--readable-accent-text);
  width: 44px;
}
.rank-ch {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rank-ch img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
}
.rank-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  align-items: end;
  justify-content: center;
}
.rank-filters .fg {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.rank-filters label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.rank-filters select {
  min-width: 150px;
}

/* article / prose */
.prose {
  margin: 0 auto;
  line-height: 1.5;
  font-size: 16px;
}
.prose h2 {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 32px 0 12px;
}
.prose h3 {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 15px 0 -5px;
}
.prose p {
  margin: 0px 0px 10px;
  color: var(--ink-2);
}
.prose ul {
  margin: 14px 0 14px 22px;
  color: var(--ink-2);
}
.prose li {
  margin: 6px 0;
}
.prose a {
  color: var(--readable-accent-text);
}

/* ============================ FLAG / CATEGORY ICONS (v6) ============================ */
.icon-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  justify-content: center;
}
.icon-chip {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: var(--bg2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: 0.2s var(--ease);
  position: relative;
  text-decoration: none;
}
.icon-chip:hover {
  transform: scale(1.35);
  z-index: 5;
  border-color: var(--accent);
  box-shadow: 0 6px 18px var(--signal-glow);
}
.icon-chip.locked {
  opacity: 0.5;
  cursor: not-allowed;
}
.icon-chip.locked::after {
  content: "🔒";
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 12px;
}
.icon-chip.locked:hover {
  transform: scale(1.15);
  border-color: var(--red);
  box-shadow: none;
}
.icon-chip .tip {
  position: absolute;
  bottom: 46px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg3);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
.icon-chip:hover .tip {
  opacity: 1;
}
.cat-chip {
  width: auto;
  padding: 0 12px;
  font-size: 13px;
  gap: 6px;
  font-weight: 600;
}

/* ===== Highlighted "view all" icon chips (v7) ===== */
.icon-chip-primary {
  border: 2px solid var(--yellow, #facc15) !important;
  background: linear-gradient(
    135deg,
    rgba(250, 204, 21, 0.16),
    rgba(250, 204, 21, 0.06)
  );
  box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.55);
  animation: chipPulse 2.2s ease-in-out infinite;
  position: relative;
}
.icon-chip-primary:hover {
  animation-play-state: paused;
  transform: scale(1.4);
  border-color: var(--yellow, #facc15) !important;
  box-shadow: 0 6px 22px rgba(250, 204, 21, 0.5);
}
@keyframes chipPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.55);
  }
  50% {
    transform: scale(1.16);
    box-shadow: 0 0 0 7px rgba(250, 204, 21, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(250, 204, 21, 0);
  }
}
/* Respect users who prefer no motion */
@media (prefers-reduced-motion: reduce) {
  .icon-chip-primary {
    animation: none;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.35);
  }
}

/* =====================================================================
   TubeLeader public experience v3
   The application and admin surfaces keep the v2 component contract.
   These classes provide the new marketing, resource and policy system.
   ===================================================================== */
:root {
  --accent: #b5121b;
  --accent-strong: #760008;
  --accent-2: #ff2a2a;
  --grad: linear-gradient(135deg, #760008 0%, #9d0710 50%, #c1121f 100%);
  --signal: #b5121b;
  --signal-glow: rgba(181, 18, 27, 0.3);
  --public-max: 1240px;
  --font-display: "Manrope", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}
:root,
[data-theme="dark"] {
  --bg: #080b12;
  --bg2: #0e131d;
  --bg3: #141b27;
  --panel: #111722;
  --panel-2: #171f2c;
  --line: #273142;
  --line-soft: #1c2532;
  --ink: #f8fafc;
  --ink-2: #b7c0cf;
  --ink-3: #7f8b9e;
  --card-border: #283344;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}
[data-theme="light"] {
  --bg: #f7f7f4;
  --bg2: #ffffff;
  --bg3: #f0f1ed;
  --panel: #ffffff;
  --panel-2: #f5f5f1;
  --line: #dfe1dc;
  --line-soft: #ebede8;
  --ink: #121722;
  --ink-2: #4f5968;
  --ink-3: #727d8d;
  --card-border: #dde0da;
  --shadow: 0 24px 60px rgba(18, 23, 34, 0.1);
}
html {
  scroll-padding-top: 94px;
}
body {
  overflow-x: hidden;
}
.container {
  width: min(calc(100% - 40px), var(--public-max));
  max-width: var(--public-max);
}
.site-main {
  min-height: 66vh;
}
.aura::before {
  background: radial-gradient(circle, rgba(157, 7, 16, 0.4), transparent 70%);
}
.aura::after {
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1),
    transparent 70%
  );
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
}
.skip-link:focus {
  top: 12px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--readable-accent-text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.accent {
  color: var(--readable-accent-text);
}
.h-title,
.display-title {
  letter-spacing: -0.045em;
}
.display-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  font-weight: 800;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.section-copy {
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.2;
}
.section {
  padding: 96px 0;
}
.section-sm {
  padding: 64px 0;
}
.section-tint {
  background: color-mix(in srgb, var(--bg2) 78%, transparent);
  border-block: 1px solid var(--line-soft);
}
.section-head {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 40px;
  align-items: end;
  margin-bottom: 42px;
}
.section-head-centered {
  margin: 0 auto 44px;
  text-align: center;
}
.section-head-centered .eyebrow {
  justify-content: center;
}
.section-head-centered .section-copy {
  margin-top: 16px;
}

/* Public navigation */
.public-header {
  position: sticky;
  top: 0;
  z-index: 150;
  height: 76px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.public-nav {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand .mark {
  width: 40px;
  height: 40px;
  font-size: 13px;
  border-radius: 12px;
  letter-spacing: -0.05em;
  animation: none;
}
.brand .logo-text {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--ink);
  font-size: 21px;
}
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-group {
  position: relative;
}
.nav-trigger,
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: 600 14px var(--font-body);
  cursor: pointer;
  transition: color 0.2s var(--ease);
}
.nav-trigger:hover,
.nav-trigger:focus-visible,
.nav-link:hover {
  color: var(--ink);
}
.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  width: 340px;
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -7px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: 0.2s var(--ease);
}
.nav-dropdown::before {
  content: "";
  position: absolute;
  inset: -14px 0 auto;
  height: 14px;
}
.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown,
.nav-group.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.nav-dropdown a {
  display: grid;
  gap: 2px;
  padding: 11px 12px;
  border-radius: 10px;
}
.nav-dropdown a:hover {
  background: var(--panel-2);
}
.nav-dropdown span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.nav-dropdown small {
  color: var(--ink-3);
  font-size: 12px;
}
.nav-dropdown-compact {
  width: 230px;
}
.nav-group--mega {
  position: static;
}
.nav-dropdown--mega {
  position: fixed;
  top: 74px;
  left: 50%;
  width: min(1180px, calc(100vw - 40px));
  max-height: calc(100vh - 94px);
  padding: 0;
  overflow: hidden;
  transform: translate(-50%, -7px);
}
.features-mega-scroll {
  max-height: calc(100vh - 96px);
  overflow: auto;
  overscroll-behavior: contain;
}
.features-mega-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.features-mega-column {
  min-width: 0;
  padding: 18px 18px 20px;
}
.features-mega-column + .features-mega-column {
  border-left: 1px solid var(--line);
}
.features-mega-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 35px;
  padding: 0 2px 11px;
  border-bottom: 1px solid var(--line);
  color: var(--readable-accent-text);
  font: 800 14px var(--font-display);
  letter-spacing: -0.01em;
}
.features-mega-heading-icon {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}
.features-mega-heading-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.features-mega-list {
  display: grid;
  gap: 1px;
  padding-top: 7px;
}
.nav-dropdown .features-mega-item {
  display: grid;
  gap: 2px;
  padding: 8px 8px 9px;
  border-radius: 9px;
  border: 1px solid transparent;
  transition:
    background 0.18s var(--ease),
    border-color 0.18s var(--ease),
    transform 0.18s var(--ease);
}
.nav-dropdown .features-mega-item:hover,
.nav-dropdown .features-mega-item:focus-visible {
  border-color: color-mix(
    in srgb,
    var(--yt-red, var(--accent)) 42%,
    var(--line)
  );
  background: var(--panel-2);
  transform: translateX(2px);
  outline: none;
}
.features-mega-item-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.features-mega-item-title strong {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}
.features-mega-badge {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid red;
  border-radius: 999px;
  background: color-mix(in srgb, var(--yt-red, var(--accent)) 10%, transparent);
  color: var(--readable-accent-text);
  font: 700 9px var(--font-mono);
  letter-spacing: 0.02em;
}
.features-mega-item small {
  color: var(--ink-3);
  font-size: 10.5px;
  line-height: 1.42;
}
.features-mega-scroll::-webkit-scrollbar {
  width: 7px;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.nav-actions .theme-toggle {
  width: 40px;
  height: 40px;
}
.mobile-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  padding: 10px;
  cursor: pointer;
}
.mobile-nav-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  border-radius: 2px;
  background: var(--ink);
}
.mobile-nav {
  display: none;
  max-height: calc(100vh - 76px);
  overflow: auto;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.mobile-nav.open {
  display: block;
}
.mobile-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 28px 0;
}
.mobile-nav-grid div {
  display: grid;
  gap: 8px;
}
.mobile-nav-label {
  margin-bottom: 4px;
  color: var(--ink-3);
  font: 700 11px var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.mobile-nav a {
  padding: 5px 0;
  color: var(--ink-2);
  font-weight: 600;
}
.mobile-nav-actions {
  display: flex;
  gap: 10px;
  padding: 0 0 28px;
}

/* Shared surfaces */
.btn {
  border-radius: 11px;
  font-weight: 700;
  min-height: 30px;
  padding-inline: 20px;
}
.btn-sm {
  min-height: 40px;
  padding-inline: 15px;
}
.btn-primary {
  background: var(--grad);
  color: #15100e;
  border-color: transparent;
  box-shadow: 0 10px 30px var(--signal-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
}
.btn-ghost {
  border-color: var(--line);
  background: color-mix(in srgb, var(--panel) 76%, transparent);
}
.btn-ghost:hover {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  background: var(--panel-2);
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.card,
.feature-card,
.step-card,
.resource-card,
.policy-card {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border-radius: 18px;
  box-shadow: none;
}
.feature-card,
.step-card,
.resource-card,
.policy-card {
  padding: 28px;
}
.feature-card,
.resource-card {
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.feature-card:hover,
.resource-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}
.icon-box {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 13px;
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  color: var(--accent);
  font: 800 14px var(--font-mono);
}
.feature-card h3,
.step-card h3 {
  font: 800 20px/1.25 var(--font-display);
  letter-spacing: -0.02em;
}
.feature-card p,
.step-card p {
  margin-top: 10px;
  color: var(--ink-2);
  line-height: 1.7;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step-card {
  position: relative;
  counter-increment: step;
  padding-top: 70px;
}
.step-card::before {
  content: "0" counter(step);
  position: absolute;
  top: 25px;
  left: 28px;
  color: var(--readable-accent-text);
  font: 700 14px var(--font-mono);
  letter-spacing: 0.08em;
}
.proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.proof-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}
.proof-row span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(62, 215, 208, 0.12);
}
.media-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(157, 7, 16, 0.16), rgba(255, 255, 255, 0.05)),
    repeating-linear-gradient(
      90deg,
      transparent 0 32px,
      rgba(255, 255, 255, 0.02) 32px 33px
    ),
    var(--panel);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 10;
}
.media-frame::after {
  content: attr(data-placeholder);
  position: absolute;
  inset: auto 18px 16px;
  color: var(--ink-3);
  font: 600 11px var(--font-mono);
  letter-spacing: 0.04em;
}
/* The build-time label only belongs on frames whose asset is still missing.
   Templates drop the attribute once a real file exists; this keeps the frame
   clean even if one is left behind. */
.media-frame:not([data-placeholder])::after {
  content: none;
}
.flexible-media {
  display: block;
}
.media-frame img,
.media-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.media-frame img.image-missing {
  opacity: 0;
}
.check-list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 24px 0 0;
}
.check-list li {
  position: relative;
  padding-left: 29px;
  color: var(--ink-2);
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(62, 215, 208, 0.12);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.tag-list span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 13px;
}

/* Marketing hero and application preview */
.marketing-hero {
  padding: 86px 0 72px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
  gap: 68px;
  align-items: center;
}
.hero-copy .eyebrow {
  margin-bottom: 20px;
}
.hero-copy .section-copy {
  max-width: 650px;
  margin-top: 5px;
  font-size: 18px;
}
.product-window {
  position: relative;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(157, 7, 16, 0.14), transparent 45%),
    var(--panel);
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}
.product-window::before {
  content: "";
  display: block;
  height: 34px;
  margin: -2px -2px 8px;
  border-radius: 17px 17px 8px 8px;
  background:
    radial-gradient(circle at 18px 17px, #9d0710 0 4px, transparent 5px),
    radial-gradient(circle at 34px 17px, #e6e6e6 0 4px, transparent 5px),
    radial-gradient(circle at 50px 17px, #3ed7d0 0 4px, transparent 5px),
    var(--panel-2);
}
.product-window .media-frame {
  border-radius: 15px;
  box-shadow: none;
}
.trust-strip {
  position: relative;
  overflow: hidden;
  padding: 10px 0;
  border-block: 1px solid rgba(99, 226, 216, 0.2);
  background: linear-gradient(110deg, #17102d, #102b31, #30151f, #17102d);
  background-size: 260% 260%;
  animation: trustGradientShift 1s ease-in-out infinite;
}
.trust-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.07) 49%,
    transparent 68%
  );
  transform: translateX(-100%);
  animation: trustSheen 8s ease-in-out infinite;
}
.trust-strip-inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: #e5edf4;
  font: 700 11px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.075em;
}
.trust-strip-inner span {
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(7, 12, 20, 0.25);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s var(--ease),
    color 0.25s var(--ease);
}
.trust-strip-inner span:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 226, 216, 0.42);
  color: #72eee4;
}
.trust-strip-inner span::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 9px;
  border-radius: 50%;
  background: #63e2d8;
  box-shadow:
    0 0 0 3px rgba(99, 226, 216, 0.11),
    0 0 14px rgba(99, 226, 216, 0.48);
  animation: trustSignal 2.8s ease-in-out infinite;
}
.trust-strip-inner span:nth-child(even)::before {
  background: #ff8a64;
  box-shadow:
    0 0 0 3px rgba(255, 138, 100, 0.11),
    0 0 14px rgba(255, 138, 100, 0.48);
  animation-delay: -1.4s;
}
@keyframes trustGradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
@keyframes trustSheen {
  0%,
  35% {
    transform: translateX(-100%);
  }
  70%,
  100% {
    transform: translateX(100%);
  }
}
@keyframes trustSignal {
  0%,
  100% {
    transform: scale(0.82);
    opacity: 0.65;
  }
  50% {
    transform: scale(1.14);
    opacity: 1;
  }
}
/* The worked example on Discover. Marked so it is never taken for the
   visitor's own search, and dashed rather than solid so it reads as a
   placeholder for something they have not done yet. */
.discover-demo-flag {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 11px 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.discover-demo-flag strong {
  color: var(--readable-accent-text);
  font-size: 11.5px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.discover-demo-flag span {
  color: var(--ink-3);
  font-size: 12.5px;
}

.stat-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 42px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  overflow: hidden;
}
.stat-band > div {
  padding: 25px;
  text-align: center;
  border-right: 1px solid var(--line);
}
.stat-band > div:last-child {
  border-right: 0;
}
/* Two by two before it drops to a single column, so the figures stay large
   enough to read rather than shrinking to fit four across a phone. */
@media (max-width: 900px) {
  .stat-band {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-band > div:nth-child(2n) {
    border-right: 0;
  }
  .stat-band > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}
.stat-band strong {
  display: block;
  color: var(--readable-accent-text);
  font: 800 40px var(--font-display);
  letter-spacing: -0.5px;
}
.stat-band span {
  display: block;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 11px;
}
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}
.split-copy .section-title {
  margin: 5px 0 18px;
}
.use-case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 28px;
}
.use-case {
  padding: 17px;
  border-left: 2px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--panel);
  color: var(--ink-2);
  font-size: 14px;
}
.cta-panel {
  display: flex;
  position: relative;
  overflow: hidden;
  padding: 25px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 0%, rgba(157, 7, 16, 0.3), transparent 34%),
    radial-gradient(
      circle at 0% 100%,
      rgba(62, 215, 208, 0.13),
      transparent 36%
    ),
    var(--panel);
  flex-direction: column;
  align-content: center;
  align-items: center;
}
.cta-panel h2 {
  max-width: 720px;
}
.cta-panel p {
  max-width: 650px;
  margin-top: 16px;
  color: var(--ink-2);
}

/* Homepage */
.home-hero {
  padding: 82px 0 64px;
}
.home-hero .hero-grid {
  grid-template-columns: 1.08fr 0.92fr;
}
.home-hero .display-title {
  max-width: 740px;
}
.home-hero .section-copy {
  max-width: 660px;
}
.search-shell {
  display: flex;
  gap: 9px;
  max-width: 700px;
  margin-top: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}
.search-shell .input {
  min-height: 40px;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.search-shell .btn {
  min-height: 40px;
  flex: 0 0 auto;
}
.search-hint {
  margin-top: 0px;
  color: var(--ink-3);
  font-size: 12px;
}
.dashboard-mock {
  min-height: 430px;
  padding: 16px;
}
.mock-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.mock-metric {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg2);
}
.mock-metric span {
  display: block;
  color: var(--ink-3);
  font-size: 10px;
}
.mock-metric strong {
  display: block;
  margin-top: 3px;
  font: 800 20px var(--font-display);
}

/* Homepage channel-overview mock: pure HTML/CSS + one inline SVG chart. */
.analytics-overview-mock {
  min-height: 0;
  padding: 9px;
  transform: rotate(0.35deg);
  animation: heroDashboardFloat 8s ease-in-out infinite;
  will-change: transform;
  background:
    radial-gradient(
      circle at 10% 0%,
      rgba(139, 92, 246, 0.12),
      transparent 26%
    ),
    radial-gradient(
      circle at 100% 14%,
      rgba(66, 199, 187, 0.08),
      transparent 25%
    ),
    #10141c;
}
@keyframes heroDashboardFloat {
  0%,
  100% {
    transform: translate3d(0, 4px, 0) rotate(0.35deg);
  }
  50% {
    transform: translate3d(0, -12px, 0) rotate(-0.2deg);
  }
}
.analytics-overview-mock::before {
  height: 25px;
  margin-bottom: 7px;
  background:
    radial-gradient(circle at 14px 12px, #9d0710 0 3px, transparent 4px),
    radial-gradient(circle at 27px 12px, #e6e6e6 0 3px, transparent 4px),
    radial-gradient(circle at 40px 12px, #42c7bb 0 3px, transparent 4px),
    #171c26;
}
.demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 1px 3px 8px;
}
.demo-head strong,
.demo-head span {
  display: block;
}
.demo-head strong {
  color: #eef2f8;
  font: 800 10px var(--font-display);
  letter-spacing: -0.01em;
}
.demo-head > div > span {
  color: #697486;
  font-size: 7px;
}
.demo-status {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border: 1px solid #2b3442;
  border-radius: 999px;
  color: #8c97a8 !important;
  font: 600 6.5px var(--font-mono);
}
.demo-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #42c7bb;
  box-shadow: 0 0 0 3px rgba(66, 199, 187, 0.1);
}
.demo-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.demo-kpi {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #3b2f6f;
  border-radius: 9px;
  background: linear-gradient(
    145deg,
    rgba(139, 92, 246, 0.06),
    rgba(12, 16, 23, 0.4)
  );
}
.demo-kpi-cyan {
  border-color: #265a59;
  background: linear-gradient(
    145deg,
    rgba(66, 199, 187, 0.055),
    rgba(12, 16, 23, 0.4)
  );
}
.demo-kpi-total {
  border-color: #4d5030;
  background: linear-gradient(
    145deg,
    rgba(221, 229, 74, 0.04),
    rgba(12, 16, 23, 0.4)
  );
}
.demo-kpi span,
.demo-kpi small,
.demo-kpi strong,
.demo-kpi b {
  display: block;
}
.demo-kpi-label {
  margin-bottom: 5px;
  color: #9f7bf6;
  font: 700 7px var(--font-body);
}
.demo-kpi-cyan .demo-kpi-label {
  color: #51cfc4;
}
.demo-kpi-total .demo-kpi-label {
  color: #dfe65c;
}
.demo-kpi-label i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 4px;
  border-radius: 50%;
  background: currentColor;
}
.demo-kpi small {
  margin-top: 3px;
  color: #697486;
  font-size: 5.8px;
  line-height: 1.2;
}
.demo-kpi strong {
  color: #f2f5f9;
  font: 800 14px/1.1 var(--font-display);
  letter-spacing: -0.025em;
}
.demo-kpi b {
  color: #f2f5f9;
  font: 800 9px/1.1 var(--font-display);
}
.demo-mix,
.demo-chart-card,
.demo-audience-card {
  border: 1px solid #302b58;
  background: rgba(17, 21, 29, 0.86);
  border-radius: 7px;
}
.demo-mix {
  margin-top: 6px;
  padding: 8px 10px;
}
.demo-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #e8edf5;
  font: 700 7.5px var(--font-body);
}
.demo-card-title small {
  color: #758092;
  font: 600 6px var(--font-mono);
}
.demo-estimated {
  padding: 3px 5px;
  border: 1px solid #667085;
  border-radius: 999px;
  color: #cdd4df !important;
}
.demo-mix-track {
  display: flex;
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #212632;
}
.demo-mix-track span {
  width: 38.5%;
  background: linear-gradient(90deg, #7650ed, #9b6bff);
}
.demo-mix-track b {
  width: 61.5%;
  background: linear-gradient(90deg, #36aea5, #4ccdc0);
}
.demo-legend {
  display: flex;
  gap: 14px;
  margin-top: 6px;
  color: #667284;
  font-size: 5.8px;
}
.demo-legend span {
  display: flex;
  align-items: center;
  gap: 3px;
}
.demo-legend i,
.demo-chart-values i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8b5cf6;
}
.demo-legend i.cyan,
.demo-chart-values i.cyan {
  background: #42c7bb;
}
.demo-legend strong {
  color: #e9edf4;
  font-size: 6.2px;
}
.demo-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(125px, 0.8fr);
  gap: 6px;
  margin-top: 6px;
}
.demo-chart-card,
.demo-audience-card {
  padding: 8px 10px;
}
.demo-chart-values {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 6px;
}
.demo-chart-values strong {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #edf1f7;
  font: 800 8px var(--font-display);
}
.demo-chart-values small {
  color: #687385;
  font: 500 5.5px var(--font-body);
}
.demo-chart-svg {
  display: block;
  width: 100%;
  height: 120px;
  margin-top: 2px;
  overflow: visible;
}
.demo-grid-lines path {
  fill: none;
  stroke: #262c37;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.demo-area-purple {
  fill: url(#heroAreaPurple);
}
.demo-area-cyan {
  fill: url(#heroAreaCyan);
}
.demo-line {
  fill: none;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.demo-line-purple {
  stroke: #8154ed;
}
.demo-line-cyan {
  stroke: #42c7bb;
}
.demo-chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: -5px;
  color: #4e5868;
  font-size: 5px;
}
.demo-bar-row {
  margin-top: 8px;
}
.demo-bar-row > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #8e98a8;
  font-size: 5.8px;
}
.demo-bar-row strong {
  color: #dfe5ed;
}
.demo-bar-row > b {
  display: block;
  height: 4px;
  margin-top: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: #202631;
}
.demo-bar-row > b i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8056ef 0 15%, #42c7bb 55%);
}
.demo-audience-divider {
  height: 1px;
  margin: 11px 0 8px;
  background: #262c37;
}
.demo-gender {
  margin-top: 8px;
}
.demo-gender span {
  display: flex;
  justify-content: space-between;
  color: #8e98a8;
  font-size: 5.8px;
}
.demo-gender span b {
  color: #dfe5ed;
}
.demo-gender > i {
  display: block;
  height: 4px;
  margin-top: 3px;
  border-radius: 99px;
  background: #202631;
}
.demo-gender > i em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #8b5cf6;
}
.demo-gender.cyan > i em {
  background: #42c7bb;
}
.demo-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 6px;
}
.demo-bottom-grid div {
  padding: 7px 9px;
  border: 1px solid #302b58;
  border-radius: 7px;
  background: rgba(17, 21, 29, 0.86);
}
.demo-bottom-grid span,
.demo-bottom-grid strong {
  display: block;
}
.demo-bottom-grid span {
  color: #687385;
  font-size: 5.8px;
}
.demo-bottom-grid strong {
  margin-top: 1px;
  color: #edf1f7;
  font: 800 8px var(--font-display);
}
.result-shell {
  margin-top: 32px;
  scroll-margin-top: 100px;
}
.creator-chip {
  flex: 0 0 210px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgb(255 255 255 / 0%);
  border-radius: 14px;
  background: var(--panel);
  cursor: pointer;
}
.creator-chip img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}
.creator-chip strong,
.creator-chip span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.creator-chip strong {
  font-size: 13px;
}
.creator-chip span {
  color: var(--ink-3);
  font-size: 11px;
}
.home-marquee {
  --marquee-gap: 13px;
  margin-inline: calc(
    (100vw - min(calc(100vw - 40px), var(--public-max))) / -2
  );
  padding: 8px 0 17px;
}
.home-marquee::before,
.home-marquee::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: max(30px, calc((100vw - var(--public-max)) / 2));
  pointer-events: none;
}
.home-marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg2), transparent);
}
.home-marquee::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg2), transparent);
}
.section:not(.section-tint) .home-marquee::before {
  background: linear-gradient(90deg, var(--bg), transparent);
}
.section:not(.section-tint) .home-marquee::after {
  background: linear-gradient(270deg, var(--bg), transparent);
}
.home-marquee-track {
  gap: var(--marquee-gap);
  padding-inline: var(--marquee-gap);
  will-change: transform;
}
.home-marquee .home-marquee-track.rtl {
  animation: homeMarqueeRTL 48s linear infinite;
}
.trending-home-marquee .home-marquee-track.ltr {
  animation: homeMarqueeLTR 54s linear infinite;
}
.home-marquee:hover .home-marquee-track,
.home-marquee:focus-within .home-marquee-track {
  animation-play-state: paused;
}
.home-marquee .creator-chip {
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}
.home-marquee .creator-chip:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent-2) 55%, var(--line));
}
.trending-marquee-card {
  flex: 0 0 300px;
  width: 300px;
  min-height: 305px;
}
.trending-marquee-card .resource-card-media {
  height: 150px;
}
.trending-marquee-card h2 {
  height: 1em;
  overflow: hidden;
}
@keyframes homeMarqueeRTL {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(calc(-50% - (var(--marquee-gap) / 2)), 0, 0);
  }
}
@keyframes homeMarqueeLTR {
  from {
    transform: translate3d(calc(-50% - (var(--marquee-gap) / 2)), 0, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .home-marquee {
    overflow-x: auto;
    mask-image: none;
    -webkit-mask-image: none;
  }
  .home-marquee-track {
    transform: none !important;
  }
  .home-marquee::before,
  .home-marquee::after {
    display: none;
  }
}
.ranking-card {
  padding: 24px;
}
.ranking-card h3 {
  font: 800 21px var(--font-display);
}
.ranking-card > p {
  margin-top: 7px;
  color: var(--ink-3);
  font-size: 13px;
}
.ranking-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.ranking-links a,
.ranking-links span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 12px;
}
.ranking-links button {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font: 600 12px var(--font-body);
  cursor: pointer;
}
.ranking-links button:hover {
  border-color: var(--accent);
  color: var(--ink);
}

/* Extension page */
.extension-hero .store-note {
  margin-top: 11px;
  color: var(--ink-3);
  font-size: 12px;
}
.extension-icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin-bottom: 25px;
  border-radius: 18px;
  background: var(--grad);
  color: #15100e;
  font: 900 20px var(--font-display);
  box-shadow: 0 16px 45px var(--signal-glow);
}
.extension-surface {
  min-height: 450px;
  padding: 13px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.browser-bar {
  height: 40px;
  border-radius: 14px 14px 7px 7px;
  background: var(--panel-2);
}
.youtube-layout {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 10px;
  min-height: 370px;
  padding-top: 10px;
}
.youtube-video {
  border-radius: 12px;
  background: linear-gradient(135deg, #1d2633, #0b1018);
}
.extension-panel {
  padding: 14px;
  border: 1px solid rgba(157, 7, 16, 0.35);
  border-radius: 12px;
  background: var(--bg2);
}
.extension-panel strong {
  font: 800 15px var(--font-display);
}
.extension-panel .mini-line {
  height: 7px;
  margin-top: 12px;
  border-radius: 99px;
  background: var(--line);
}
.extension-panel .mini-line:nth-child(3) {
  width: 72%;
  background: rgba(157, 7, 16, 0.7);
}
.extension-panel .mini-line:nth-child(4) {
  width: 88%;
}
.extension-panel .mini-line:nth-child(5) {
  width: 55%;
  background: rgba(62, 215, 208, 0.5);
}
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.screenshot-card .media-frame {
  aspect-ratio: 16/10;
}
.screenshot-card h3 {
  margin-top: 16px;
  font: 800 18px var(--font-display);
}
.screenshot-card p {
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 13px;
}
.video-placeholder {
  aspect-ratio: 16/8.3;
  display: grid;
  place-items: center;
}
.play-button {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 1px solid #fff;
  border-radius: 50%;
  background: rgba(118, 0, 8, 0.95);
  color: #fff;
  font-size: 25px;
}
.permissions-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
}
.permission-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}
.permission-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 15px 0;
  border-top: 1px solid var(--line-soft);
}
.permission-row code {
  color: var(--readable-accent-text);
  font: 600 12px var(--font-mono);
}
.permission-row span {
  color: var(--ink-2);
  font-size: 13px;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
.comparison-table th,
.comparison-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.comparison-table th {
  color: var(--ink-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.comparison-table td {
  color: var(--ink-2);
  font-size: 14px;
}
.comparison-table td:nth-child(2) {
  color: var(--readable-accent-text);
  font-weight: 700;
}
.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.quote-card {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--panel);
}
.quote-card p {
  color: var(--ink-2);
  line-height: 1.7;
}
.quote-card span {
  display: block;
  margin-top: 18px;
  color: var(--ink-3);
  font-size: 11px;
}
.preview-label {
  color: var(--readable-accent-text);
  font: 700 10px var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* FAQ */
.faq-list {
  max-width: 860px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font: 700 17px/1.45 var(--font-display);
}
.faq-question span:last-child {
  color: var(--readable-accent-text);
  font-size: 22px;
  font-weight: 400;
  transition: transform 0.2s var(--ease);
}
.faq-answer {
  display: none;
  max-width: 760px;
  padding: 0 0 22px;
  color: var(--ink-2);
  line-height: 1.5;
}
.faq-item.open .faq-answer {
  display: block;
}
.faq-item.open .faq-question span:last-child {
  transform: rotate(45deg);
}

/* Resource hub and articles */
.resource-hero {
  padding: 82px 0 52px;
  text-align: center;
}
.resource-hero .section-copy {
  max-width: 720px;
  margin: 18px auto 0;
}
.resource-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
}
.resource-filter {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.resource-filter.active,
.resource-filter:hover {
  border-color: var(--accent);
  color: var(--ink);
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-bottom: 96px;
}
.resource-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.resource-card[hidden] {
  display: none !important;
}
.resource-card-media {
  position: relative;
  height: 138px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(157, 7, 16, 0.2), rgba(255, 255, 255, 0.05)),
    var(--panel-2);
}
.resource-card-media img,
.resource-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.resource-card-media img.image-missing {
  opacity: 0;
}
.resource-card-media::after {
  content: "TubeLeader field guide";
  position: absolute;
  left: 19px;
  bottom: 16px;
  color: var(--ink-3);
  font: 600 10px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.resource-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 10px;
}
.resource-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.resource-card h2 {
  margin-top: 0px;
  font: 800 19px/1.3 var(--font-display);
  letter-spacing: -0.02em;
}
.resource-card p {
  margin-top: 5px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.65;
}
.resource-card .read-link {
  color: var(--readable-accent-text);
  font-size: 13px;
  font-weight: 700;
}
.article-hero {
  padding: 72px 0 44px;
  border-bottom: 1px solid var(--line-soft);
}
.article-media-frame {
  width: min(600px, 100%);
  max-width: 600px;
  aspect-ratio: 600 / 330;
  margin-inline: auto;
}
.article-kicker {
  color: var(--readable-accent-text);
  font: 700 11px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.11em;
}
.article-title {
  max-width: 940px;
  margin-top: 18px;
  font: 800 clamp(38px, 6vw, 68px)/1.04 var(--font-display);
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.article-dek {
  max-width: 760px;
  margin-top: 20px;
  color: var(--ink-2);
  font-size: 19px;
  line-height: 1.7;
}
.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 24px;
  color: var(--ink-3);
  font-size: 12px;
}
.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 760px);
  justify-content: center;
  gap: 70px;
  padding: 56px 0 96px;
}
.article-aside {
  position: sticky;
  top: 104px;
  align-self: start;
}
.article-aside strong {
  display: block;
  margin-bottom: 12px;
  font: 700 11px var(--font-mono);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.article-aside a {
  display: block;
  padding: 7px 0;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.45;
}
.article-aside a:hover {
  color: var(--readable-accent-text);
}
.article-body {
  font-size: 17px;
  line-height: 1.85;
}
.article-body h2 {
  margin: 48px 0 15px;
  font: 800 32px/1.18 var(--font-display);
  letter-spacing: -0.03em;
}
.article-body h3 {
  margin: 30px 0 12px;
  font: 800 21px/1.25 var(--font-display);
}
.article-body p {
  margin: 16px 0;
  color: var(--ink-2);
}
.article-body ul,
.article-body ol {
  margin: 18px 0 18px 24px;
  color: var(--ink-2);
}
.article-body li {
  margin: 9px 0;
  padding-left: 5px;
}
.article-callout {
  margin: 28px 0;
  padding: 21px 23px;
  border-left: 3px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: var(--panel);
}
.article-callout strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}
.article-quick-answer p {
  margin: 0;
}
.article-source-list a {
  color: var(--readable-accent-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-steps {
  counter-reset: guide-step;
  list-style: none !important;
  margin-left: 0 !important;
}
.article-steps li {
  position: relative;
  min-height: 54px;
  padding: 0 0 21px 58px;
  counter-increment: guide-step;
}
.article-steps li::before {
  content: counter(guide-step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(157, 7, 16, 0.18);
  color: var(--readable-accent-text);
  font: 700 13px var(--font-mono);
}
.related-guides {
  padding: 70px 0 96px;
  border-top: 1px solid var(--line-soft);
}

/* Policy, company and help pages */
.page-hero {
  padding: 76px 0 50px;
  border-bottom: 1px solid var(--line-soft);
}
.page-hero .display-title {
  font-size: clamp(40px, 5vw, 62px);
}
.page-hero .section-copy {
  margin-top: 18px;
}
.legal-notice {
  display: inline-flex;
  margin-top: 22px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 208, 107, 0.35);
  border-radius: 9px;
  background: rgba(255, 208, 107, 0.08);
  color: #e9bd58;
  font-size: 12px;
}
.policy-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 760px);
  justify-content: center;
  gap: 68px;
  padding: 56px 0 96px;
}
.policy-nav {
  position: sticky;
  top: 104px;
  align-self: start;
  display: grid;
  gap: 7px;
}
.policy-nav a {
  padding: 7px 0;
  color: var(--ink-3);
  font-size: 12px;
}
.policy-nav a:hover {
  color: var(--readable-accent-text);
}
.policy-content {
  color: var(--ink-2);
  line-height: 1.8;
}
.policy-content section {
  scroll-margin-top: 105px;
  margin-bottom: 44px;
}
.policy-content h2 {
  margin-bottom: 14px;
  color: var(--ink);
  font: 800 27px/1.25 var(--font-display);
  letter-spacing: -0.02em;
}
.policy-content h3 {
  margin: 24px 0 10px;
  color: var(--ink);
  font: 700 18px var(--font-display);
}
.policy-content p,
.policy-content ul {
  margin: 12px 0;
}
.policy-content ul {
  margin-left: 21px;
}
.policy-content li {
  margin: 7px 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  padding: 64px 0 96px;
}
.contact-card {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--panel);
}
.contact-card h2 {
  font: 800 24px var(--font-display);
}
.contact-card p {
  margin-top: 12px;
  color: var(--ink-2);
}
.contact-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 0;
  border-top: 1px solid var(--line-soft);
}
.contact-route:first-of-type {
  margin-top: 20px;
}
.contact-route span {
  color: var(--ink-3);
  font-size: 12px;
}
.contact-route a {
  color: var(--readable-accent-text);
  font-weight: 700;
}

/* Public footer */
.public-footer {
  padding: 70px 0 26px;
  border-top: 1px solid var(--line);
  background: var(--bg2);
}
.footer-lead {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding-bottom: 46px;
}
.footer-lead p {
  margin-top: 0px;
  color: var(--ink-3);
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr 1fr 1fr;
  gap: 30px;
  padding: 40px 0;
  border-block: 1px solid var(--line-soft);
}
.footer-grid > div {
  display: grid;
  align-content: start;
  gap: 5px;
}
.footer-grid h2 {
  margin-bottom: 5px;
  color: var(--ink);
  font: 700 12px var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer-grid a {
  width: fit-content;
  color: var(--ink-3);
  font-size: 13px;
}
.footer-grid a:hover {
  color: var(--ink);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 28px;
  padding-top: 26px;
  color: var(--ink-3);
  font-size: 11px;
}

/* Lightweight scroll reveals; content remains visible if JavaScript is off. */
.reveal-ready {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s var(--ease),
    transform 0.55s var(--ease);
}
.reveal-ready.is-visible {
  opacity: 1;
  transform: none;
}

/* Authentication */
.auth-shell {
  width: 30%;
  display: grid;
  grid-template-columns: minmax(0, 520px) 1fr;
  gap: 22px;
  align-items: center;
  margin: 0 auto;
  padding: 62px 0 84px;
}
.auth-card,
.auth-aside {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  margin-top: 50px;
  margin-bottom: 200px;
}
.auth-card {
  padding: 36px;
}
.auth-heading {
  margin: 30px 0 26px;
  text-align: center;
}
.auth-heading .eyebrow {
  justify-content: center;
}
.auth-heading h1 {
  margin-top: 12px;
  font: 800 35px/1.15 var(--font-display);
  letter-spacing: -0.035em;
}
.auth-heading p {
  margin-top: 9px;
  color: var(--ink-3);
  font-size: 13px;
}
.auth-card .field label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
}
.auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 18px;
  color: var(--ink-3);
  font-size: 12px;
}
.auth-switch,
.auth-consent {
  color: var(--ink-3);
  font-size: 12px;
}
.auth-switch {
  margin-top: 20px;
  text-align: center;
}
.auth-consent {
  margin: 0 0 16px;
  line-height: 1.6;
}
.auth-switch a,
.auth-consent a {
  color: var(--readable-accent-text);
  font-weight: 700;
}
.auth-aside {
  padding: 42px;
  background:
    radial-gradient(circle at 100% 0%, rgba(157, 7, 16, 0.26), transparent 38%),
    radial-gradient(
      circle at 0% 100%,
      rgba(62, 215, 208, 0.1),
      transparent 42%
    ),
    var(--panel);
}
.auth-aside .section-title {
  margin-top: 16px;
  font-size: 34px;
}
.auth-aside > p {
  margin-top: 28px;
  color: var(--ink-3);
  font-size: 12px;
}

/* Pricing additions */
.pricing-toggle {
  display: inline-flex;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.pricing-toggle button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-3);
  font-weight: 700;
  cursor: pointer;
}
.pricing-toggle button.active,
.pricing-toggle button.on {
  background: var(--panel-2);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.pricing-hero {
  padding-bottom: 30px;
}
.pricing-section {
  padding-top: 24px;
}
.pricing-offer-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 12px 20px;
  overflow: hidden;
  border: 1px solid
    color-mix(in srgb, var(--yt-red-bright, var(--accent)) 58%, var(--line));
  border-radius: 999px;
  background-size: 220% 220%;
  background-image: linear-gradient(
    110deg,
    rgba(82, 0, 5, 0.3),
    rgba(181, 18, 27, 0.36),
    rgba(124, 92, 255, 0.22),
    rgba(82, 0, 5, 0.3)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 34px rgba(82, 0, 5, 0.18);
  color: var(--ink);
  animation: pricingOfferFlow 6s ease-in-out infinite;
}
.pricing-offer-banner::after,
.price-card-offer::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-140%);
  background: linear-gradient(
    100deg,
    transparent 28%,
    rgba(255, 255, 255, 0.16) 50%,
    transparent 72%
  );
  animation: pricingOfferShine 4.8s ease-in-out infinite;
  pointer-events: none;
}
.pricing-offer-banner strong {
  font-size: 13px;
}
.pricing-offer-banner span:not(.pricing-offer-icon) {
  color: var(--ink-2);
  font-size: 12px;
}
.pricing-offer-icon {
  font-size: 16px;
}
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 14px;
  align-items: stretch;
}
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px 20px 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(181, 18, 27, 0.1), transparent 34%),
    linear-gradient(
      150deg,
      color-mix(in srgb, var(--panel) 94%, transparent),
      color-mix(in srgb, var(--bg2) 98%, transparent)
    );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}
.price-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(
    in srgb,
    var(--yt-red-bright, var(--accent)) 48%,
    var(--line)
  );
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}
.price-card.highlight {
  border-color: var(--yt-red-bright, var(--accent));
  box-shadow:
    0 20px 55px var(--signal-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.price-card.highlight::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
}
.price-card-label {
  position: absolute;
  top: 0;
  right: 14px;
  padding: 5px 10px;
  border-radius: 0 0 9px 9px;
  background: linear-gradient(4deg, #760008, #f4252e);
  color: #fff;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.price-card-head {
  min-height: 45px;
}
.price-name {
  font: 800 19px var(--font-display);
}
.price-tagline {
  min-height: 15px;
  margin-top: 1px;
  color: var(--ink-3);
  font-size: 10px;
  line-height: 1.45;
}
.price-card-offer {
  position: relative;
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 5px 11px;
  overflow: hidden;
  border: 1px solid #ff737b;
  border-radius: 11px;
  background-size: 220% 220%;
  color: var(--ink);
  animation: pricingOfferFlow 1s ease-in-out infinite;
}
.price-card-offer strong {
  position: relative;
  z-index: 1;
  font-size: 15px;
}
.price-card-offer small {
  position: relative;
  z-index: 1;
  color: var(--ink-2);
  font-size: 9px;
}
.price-amount {
  min-height: 54px;
  margin: 0px 0 2px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1px;
}
.price-amount strong {
  font: 850 38px var(--font-display);
  letter-spacing: -0.045em;
  color: var(--ink);
}
.price-amount .price-free {
  color: #8b7cff;
}
.price-amount .was {
  order: 2;
  color: #f08b92;
  font-size: 15px;
  font-weight: 750;
  text-decoration: line-through;
}
.price-amount .currency-code {
  order: 3;
  color: var(--ink-3);
  font: 700 9px var(--font-mono);
  letter-spacing: 0.08em;
}
.price-validity {
  margin: 0;
  color: var(--ink-3);
  font-size: 15px;
}
.plan-features {
  display: grid;
  gap: 8px;
  margin: 18px 0 22px;
  list-style: none;
}
.plan-features.has-more {
  margin-bottom: 10px;
}
.plan-features li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: start;
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.35;
}
.plan-feature-state {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  color: #000;
  font-size: 10px;
  font-weight: 900;
}
.plan-features .off {
  color: rgb(255 255 255);
  opacity: 0.8;
}
.plan-features .off .plan-feature-state {
  background: #000;
  color: #ff0428;
}
.plan-features .partial > small:last-child {
  color: var(--ink-3);
  font-style: italic;
}
.plan-features small {
  color: #fefeff;
  font-size: 10px;
}
.plan-feature-details {
  margin: 0 0 22px;
}
.plan-feature-details summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 7px 10px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel-2) 88%, transparent);
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 750;
  list-style: none;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}
.plan-feature-details summary::-webkit-details-marker {
  display: none;
}
.plan-feature-details summary:hover {
  border-color: color-mix(
    in srgb,
    var(--yt-red-bright, var(--accent)) 48%,
    var(--line)
  );
  background: color-mix(
    in srgb,
    var(--panel-2) 76%,
    var(--yt-red-bright, var(--accent)) 8%
  );
  color: var(--ink);
}
.plan-feature-details summary small {
  color: var(--ink-3);
  font-size: 9.5px;
}
.plan-feature-hide {
  display: none;
}
.plan-feature-details[open] .plan-feature-show {
  display: none;
}
.plan-feature-details[open] .plan-feature-hide {
  display: inline;
}
.plan-feature-details[open] summary small {
  display: none;
}
.plan-features-extra {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.price-card .price-card-cta {
  width: 100%;
  min-height: 40px;
  margin-top: auto;
  justify-content: center;
  overflow: hidden;
  border: 1px solid
    color-mix(in srgb, var(--yt-red-bright, var(--accent)) 48%, var(--line)) !important;
  text-align: center;
}
.price-card-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-150%) skewX(-22deg);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: pricingButtonFlash 3.8s ease-in-out infinite;
  pointer-events: none;
}
.price-card-cta.is-current,
.price-card-cta.is-trial-used {
  opacity: 0.62;
  border-style: dashed !important;
  background: var(--panel-2) !important;
  color: var(--ink-2) !important;
}
.price-card-cta.is-current::before,
.price-card-cta.is-trial-used::before {
  display: none;
}
@keyframes pricingButtonFlash {
  0%,
  50% {
    transform: translateX(-150%) skewX(-22deg);
  }
  75%,
  100% {
    transform: translateX(150%) skewX(-22deg);
  }
}
@keyframes pricingOfferFlow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
@keyframes pricingOfferShine {
  0%,
  55% {
    transform: translateX(-140%);
  }
  80%,
  100% {
    transform: translateX(140%);
  }
}

/* Responsive */
@media (max-width: 1080px) {
  .desktop-nav {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .hero-grid,
  .home-hero .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-copy {
    max-width: 800px;
  }
  .hero-visual {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
  }
  .split-section {
    gap: 42px;
  }
  .feature-grid,
  .quote-grid,
  .resource-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 820px) {
  .section {
    padding: 72px 0;
  }
  .section-head {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .split-section,
  .permissions-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .split-section .media-frame {
    order: -1;
  }
  .article-layout,
  .policy-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .article-aside,
  .policy-nav {
    position: static;
  }
  .auth-shell {
    grid-template-columns: 1fr;
    max-width: 560px;
  }
  .auth-aside {
    display: none;
  }
  .article-aside {
    display: none;
  }
  .policy-nav {
    display: flex;
    overflow: auto;
    padding-bottom: 10px;
  }
  .policy-nav a {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
  }
  .steps-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 28px), var(--public-max));
  }
  .pricing-offer-banner {
    flex-wrap: wrap;
    border-radius: 18px;
    text-align: center;
  }
  .public-header,
  .public-nav {
    height: 68px;
  }
  .brand .mark {
    width: 36px;
    height: 36px;
  }
  .brand .brand-logo-image {
    width: 36px;
    height: 36px;
  }
  .brand .logo-text {
    font-size: 19px;
  }
  .nav-login,
  .nav-cta,
  .nav-admin {
    display: none;
  }
  .mobile-nav {
    max-height: calc(100vh - 68px);
  }
  .mobile-nav-grid {
    grid-template-columns: 1fr 1fr;
  }
  .marketing-hero,
  .home-hero {
    padding: 60px 0 48px;
  }
  .display-title {
    font-size: clamp(38px, 12vw, 54px);
  }
  .section-title {
    font-size: 31px;
  }
  .feature-grid,
  .quote-grid,
  .resource-grid,
  .screenshot-grid {
    grid-template-columns: 1fr;
  }
  .search-shell {
    flex-direction: column;
  }
  .search-shell .btn {
    width: 100%;
  }
  .mock-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .mock-metric:last-child {
    grid-column: span 2;
  }
  .dashboard-mock {
    min-height: 0;
  }
  .demo-content-grid {
    grid-template-columns: 1fr;
  }
  .demo-audience-card {
    display: none;
  }
  .demo-chart-svg {
    height: 105px;
  }
  .demo-kpi {
    padding: 8px 7px;
  }
  .demo-kpi strong {
    font-size: 11px;
  }
  .youtube-layout {
    grid-template-columns: 1fr;
  }
  .extension-panel {
    min-height: 130px;
  }
  .use-case-grid {
    grid-template-columns: 1fr;
  }
  .cta-panel {
    padding: 34px 24px;
  }
  .comparison-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .footer-lead {
    align-items: flex-start;
    flex-direction: column;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-bottom {
    display: grid;
  }
  .page-hero {
    padding-top: 56px;
  }
  .stat-band {
    grid-template-columns: 1fr;
  }
  .stat-band > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .stat-band > div:last-child {
    border-bottom: 0;
  }
  .auth-shell {
    width: min(calc(100% - 28px), 560px);
    padding: 34px 0 58px;
  }
  .auth-card {
    padding: 27px 20px;
  }
}

/* ======================= SHARED ANALYSIS MODAL ======================= */
body.analysis-modal-open {
  overflow: hidden;
}
.analysis-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overscroll-behavior: contain;
}
.analysis-modal-backdrop.open {
  display: flex;
  animation: analysisBackdropIn 0.2s ease-out;
}
.analysis-modal-dialog {
  width: min(1400px, 70vw);
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 0, rgba(181, 18, 27, 0.16), transparent 32%),
    linear-gradient(
      145deg,
      var(--bg2),
      color-mix(in srgb, var(--bg2) 92%, #3b0004)
    );
  border: 1px solid var(--theme-border, var(--line));
  border-radius: 24px;
  box-shadow:
    0 30px 100px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(181, 18, 27, 0.18);
  animation: analysisDialogIn 0.24s var(--ease);
}
.analysis-modal-header {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 60px;
  padding: 5px 18px 5px 18px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(
      105deg,
      rgba(82, 0, 5, 0.82),
      rgba(181, 18, 27, 0.24) 42%,
      rgba(124, 92, 255, 0.08)
    ),
    var(--bg2);
}
.analysis-modal-header::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(
    180deg,
    var(--yt-red-bright, var(--accent)),
    var(--yt-red-dark, var(--accent))
  );
}
.analysis-modal-heading {
  min-width: 0;
}
.analysis-modal-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--analysis-accent-text, var(--readable-accent-text));
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.analysis-modal-heading h2 {
  max-width: 920px;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.analysis-modal-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--control-bg, var(--bg3));
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 0.18s var(--ease),
    border-color 0.18s var(--ease),
    background 0.18s var(--ease);
}
.analysis-modal-close svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.analysis-modal-close:hover {
  transform: rotate(90deg);
  border-color: var(--accent);
  background: rgba(181, 18, 27, 0.14);
  color: var(--accent-2);
}
.analysis-modal-scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.analysis-modal-body {
  padding: 10px;
}
.analysis-modal-dialog.is-notice {
  width: min(680px, 92vw);
  max-height: min(520px, calc(100dvh - 48px));
}
.analysis-modal-dialog.is-notice .analysis-modal-body {
  padding: 12px;
}
.analysis-modal-dialog.is-notice .analysis-modal-body .flash {
  margin: 0;
  padding: 17px 18px;
  border-color: rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: linear-gradient(
    115deg,
    var(--yt-red-deep, #520005),
    var(--yt-red-dark, #760008) 58%,
    var(--yt-red, #b5121b)
  );
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 12px 32px rgba(82, 0, 5, 0.24);
}
.analysis-modal-body .profile-header {
  margin-bottom: 22px;
}
.analysis-modal-body .card:hover,
.analysis-modal-body .stat-card:hover {
  transform: none;
}
.analysis-modal-loading {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}
.analysis-modal-loading .spinner {
  margin: 0 0 14px;
}
.analysis-modal-loading strong {
  font-family: var(--font-display);
  font-size: 20px;
}
.analysis-modal-loading span {
  max-width: 460px;
  color: var(--ink-3);
  font-size: 13px;
}

/* Keyword Search chooser and result browser inside the shared modal/Discover. */
.analysis-modal-dialog.is-keyword-choice {
  width: min(590px, 100%);
  max-height: min(720px, calc(100dvh - 48px));
}
.analysis-modal-dialog.is-keyword-results .analysis-modal-heading {
  flex: 1 1 auto;
  padding-left: 44px;
  text-align: center;
}
.analysis-modal-dialog.is-keyword-results .analysis-modal-heading h2 {
  max-width: none;
}
.keyword-search-choice {
  max-width: 900px;
  margin: 0 auto;
  padding: 5px 0 8px;
}
.keyword-search-choice-copy {
  max-width: 520px;
  margin: 0 auto 14px;
  text-align: center;
}
.keyword-search-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  color: var(--analysis-accent-text, var(--readable-accent-text));
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.keyword-search-choice h3,
.keyword-results-head h3,
.keyword-results-empty h3,
.keyword-exact-required h3 {
  margin: 0;
  color: var(--analysis-text, var(--ink));
  font-family: var(--font-display);
}
.keyword-search-choice h3 {
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.12;
}
.keyword-search-choice-copy p,
.keyword-results-head p,
.keyword-results-empty p,
.keyword-exact-required p {
  color: var(--analysis-text-muted, var(--ink-3));
  line-height: 1.55;
}
.keyword-search-choice-copy p {
  margin: 7px 0 0;
  font-size: 12px;
}
.keyword-search-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.keyword-choice-card {
  position: relative;
  min-height: 172px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--analysis-border, var(--line));
  border-radius: 16px;
  background: linear-gradient(
    145deg,
    var(--analysis-surface-2, var(--panel-2)),
    var(--analysis-surface-3, var(--bg3))
  );
  color: var(--analysis-text, var(--ink));
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.22s var(--ease),
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}
.keyword-choice-card::before {
  content: "";
  position: absolute;
  right: -35px;
  bottom: -48px;
  width: 125px;
  height: 125px;
  border-radius: 50%;
  opacity: 0.25;
}
.keyword-choice-channel::before {
  background: radial-gradient(circle, #ff3344, transparent 68%);
}
.keyword-choice-video::before {
  background: radial-gradient(circle, #8b5cf6, transparent 68%);
}
.keyword-choice-card:hover {
  transform: translateY(-3px);
  border-color: var(--analysis-border-strong, var(--accent));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}
.keyword-choice-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 11px;
  border: 1px solid rgba(255, 75, 85, 0.52);
  border-radius: 14px;
  background: linear-gradient(
    145deg,
    rgba(255, 68, 80, 0.28),
    rgba(255, 146, 50, 0.12)
  );
  color: #ff4452;
  font-size: 22px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 8px 18px rgba(181, 18, 27, 0.13);
}
.keyword-choice-video .keyword-choice-icon {
  border-color: rgba(139, 92, 246, 0.55);
  background: linear-gradient(
    145deg,
    rgba(139, 92, 246, 0.28),
    rgba(59, 130, 246, 0.12)
  );
  color: #a78bfa;
}
[data-theme="light"] .keyword-choice-icon {
  background: linear-gradient(
    145deg,
    rgba(255, 68, 80, 0.16),
    rgba(255, 255, 255, 0.95)
  );
  color: #a5000b;
}
[data-theme="light"] .keyword-choice-video .keyword-choice-icon {
  background: linear-gradient(
    145deg,
    rgba(139, 92, 246, 0.16),
    rgba(255, 255, 255, 0.95)
  );
  color: #6d28d9;
}
.keyword-choice-card strong {
  position: relative;
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-display);
  font-size: 16px;
}
.keyword-choice-card small {
  position: relative;
  display: block;
  color: var(--analysis-text-muted, var(--ink-3));
  font-size: 11px;
  line-height: 1.45;
}
.keyword-choice-card b {
  position: absolute;
  left: 16px;
  bottom: 13px;
  color: var(--analysis-accent-text, var(--readable-accent-text));
  font-size: 10px;
}

.keyword-results-shell {
  width: 100%;
}
.keyword-results-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 2px;
  padding: 5px 8px 5px;
  border-bottom: 1px solid var(--analysis-border, var(--line-soft));
}
.keyword-results-head h3 {
  font-size: clamp(20px, 2.4vw, 28px);
}
.keyword-results-head p {
  margin: -5px 0 0;
  font-size: 12px;
}
.keyword-filter-panel {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--analysis-border, var(--line));
  border-radius: 15px;
  background: var(--analysis-surface-2, var(--panel-2));
}
.keyword-filter-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 9px;
}
.keyword-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
}
.keyword-filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
[data-theme="light"] .keyword-filter-panel label {
  color: #000000;
}
.keyword-filter-panel input,
.keyword-filter-panel select {
  min-width: 0;
  width: 100%;
  height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--analysis-border, var(--line));
  border-radius: 8px;
  outline: none;
  background: var(--analysis-surface-3, var(--bg));
  color: var(--analysis-text, var(--ink));
  font-size: 11px;
  text-transform: none;
}
.keyword-filter-panel input:focus,
.keyword-filter-panel select:focus {
  border-color: var(--analysis-border-strong, var(--accent));
  box-shadow: 0 0 0 3px var(--analysis-accent-soft, rgba(181, 18, 27, 0.1));
}
.keyword-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.keyword-results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.keyword-result-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--analysis-border, var(--line));
  border-radius: 16px;
  background: var(--analysis-surface-2, var(--panel-2));
  color: var(--analysis-text, var(--ink));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.keyword-result-card:hover {
  border-color: var(--analysis-border-strong, rgba(255, 60, 70, 0.55));
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}
.keyword-card-actions {
  position: absolute;
  z-index: 3;
  right: 10px;
  top: 10px;
  display: flex;
  gap: 5px;
}
.keyword-icon-btn {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 28px;
  padding: 0;
  border: 1px solid var(--analysis-border, var(--line));
  border-radius: 8px;
  background: var(--analysis-surface-3, var(--bg3));
  color: var(--analysis-text-soft, var(--ink-2));
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.keyword-icon-btn:hover,
.keyword-icon-btn.active {
  border-color: var(--analysis-border-strong, var(--accent));
  color: var(--analysis-accent, var(--accent));
  background: var(--analysis-accent-soft, rgba(181, 18, 27, 0.1));
}
.keyword-channel-head {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  margin: 0 64px 10px 0;
}
.keyword-channel-head img {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  object-fit: cover;
  border: 2px solid rgba(255, 60, 70, 0.55);
  border-radius: 50%;
  background: var(--analysis-surface-3, var(--bg2));
}
.keyword-channel-head > div {
  min-width: 0;
}
.keyword-channel-head h4,
.keyword-video-copy h4 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--analysis-text, var(--ink));
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.keyword-handle-row,
.keyword-channel-copy,
.keyword-title-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.keyword-handle-row span,
.keyword-channel-copy span {
  overflow: hidden;
  color: #fff;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.keyword-channel-head .tier {
  display: inline-flex;
  margin-top: 4px;
  font-style: normal;
}
.keyword-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
  color: #fff;
  font-size: 10px;
}
[data-theme="light"] .keyword-card-meta {
color: #000000;
}

[data-theme="light"] .keyword-expand-label {
color: #000000;
}

[data-theme="light"] .keyword-handle-row span {
color: #000000;
}

[data-theme="light"] .keyword-channel-copy span {
color: #000000;
}

[data-theme="light"] .keyword-metric span {
color: #000000;
}
[data-theme="light"] .keyword-expand-value {
color: #000000;
}
.keyword-card-meta span {
  padding: 4px 6px;
  border: 1px solid var(--analysis-border, var(--line-soft));
  border-radius: 999px;
  background: var(--analysis-surface-3, var(--bg2));
}
.keyword-expandable {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  padding: 7px 8px;
  border: 1px solid var(--analysis-border, var(--line-soft));
  border-radius: 9px;
  background: var(--analysis-surface-3, var(--bg2));
}
.keyword-expand-label {
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.keyword-expand-value {
  min-width: 0;
  color: #fff;
  font-size: 10px;
  line-height: 1.45;
}
.keyword-text-full {
  display: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.keyword-expandable.is-expanded {
  align-items: start;
}
.keyword-expandable.is-expanded .keyword-text-short {
  display: none;
}
.keyword-expandable.is-expanded .keyword-text-full {
  display: inline;
}
.keyword-expand-actions {
  display: flex;
  gap: 4px;
}
.keyword-detail-empty {
  margin-bottom: 7px;
  padding: 8px;
  border: 1px dashed var(--analysis-border, var(--line));
  border-radius: 9px;
  color: var(--analysis-text-muted, var(--ink-3));
  font-size: 10px;
}
.keyword-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 7px;
}
.keyword-metric {
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--analysis-border, var(--line-soft));
  border-radius: 9px;
  background: var(--analysis-surface-3, var(--bg2));
}
.keyword-metric span {
  display: block;
  overflow: hidden;
  margin-bottom: 3px;
  color: #fff;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.keyword-metric b {
  display: block;
  overflow: hidden;
  color: var(--analysis-text, var(--ink));
  font-family: var(--font-mono);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.keyword-metrics-primary .keyword-metric {
  background: linear-gradient(
    145deg,
    var(--analysis-accent-soft, rgba(181, 18, 27, 0.1)),
    var(--analysis-surface-3, var(--bg2))
  );
}
.keyword-card-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: auto;
  padding-top: 4px;
}

.keyword-result-video {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 11px;
}
.keyword-video-thumb {
  position: relative;
  min-height: 112px;
  overflow: hidden;
  border-radius: 11px;
  background: var(--analysis-surface-3, var(--bg2));
}
.keyword-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.keyword-video-thumb > span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(181, 18, 27, 0.92);
  color: #fff;
  transform: translate(-50%, -50%);
}
.keyword-video-thumb > b {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 9px;
}
.keyword-video-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-right: 58px;
}
.keyword-title-row {
  align-items: flex-start;
}
.keyword-title-row h4 {
  flex: 1;
}
.keyword-channel-copy {
  margin: 5px 0;
}
.keyword-video-metrics {
  margin-top: 2px;
}
.keyword-results-empty,
.keyword-exact-required {
  max-width: 650px;
  margin: 0 auto;
  padding: 50px 24px;
  text-align: center;
}
.keyword-results-empty > div,
.keyword-exact-required-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border: 1px solid rgba(255, 60, 70, 0.35);
  border-radius: 20px;
  background: rgba(181, 18, 27, 0.12);
  color: var(--analysis-accent, var(--accent-2));
  font-size: 32px;
}
.keyword-exact-examples {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.keyword-exact-examples span {
  padding: 7px 10px;
  border: 1px solid var(--analysis-border, var(--line));
  border-radius: 999px;
  background: var(--analysis-surface-3, var(--bg2));
  color: var(--analysis-text-soft, var(--ink-2));
  font-family: var(--font-mono);
  font-size: 10px;
}
.keyword-more-wrap {
  display: flex;
  justify-content: center;
  padding: 18px 0 6px;
}
.keyword-more-wrap .btn {
  min-width: 150px;
}
.keyword-more-notice {
  margin: 14px auto 0;
  text-align: center;
}
.keyword-more-notice a {
  color: var(--analysis-accent-text, var(--readable-accent-text));
  font-weight: 800;
}
.keyword-access-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  max-width: 620px;
  margin: 20px auto 0;
  padding: 12px;
  border: 1px solid var(--analysis-border, var(--line));
  border-radius: 13px;
  background: var(--analysis-surface-2, var(--panel-2));
  color: var(--analysis-text-muted, var(--ink-3));
  font-size: 12px;
}
.keyword-search-locked {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
}
.keyword-search-locked-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 16px;
  background: rgba(181, 18, 27, 0.13);
  color: var(--accent-2);
  font-size: 28px;
}
.keyword-search-locked > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.discover-result .keyword-results-shell {
  padding-bottom: 30px;
}

[data-theme="dark"] .keyword-choice-card,
[data-theme="dark"] .keyword-filter-panel,
[data-theme="dark"] .keyword-result-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}
[data-theme="light"] .keyword-choice-card,
[data-theme="light"] .keyword-filter-panel,
[data-theme="light"] .keyword-result-card {
  box-shadow: 0 8px 24px rgba(100, 20, 25, 0.08);
}

@keyframes analysisBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes analysisDialogIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 760px) {
  .analysis-modal-backdrop {
    padding: 0;
    align-items: stretch;
  }
  .analysis-modal-dialog {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
  .analysis-modal-header {
    min-height: 60px;
    padding: 5px 18px 5px 18px;
  }
  .analysis-modal-heading h2 {
    max-width: calc(100vw - 92px);
    font-size: 20px;
  }
  .analysis-modal-close {
    width: 42px;
    height: 42px;
  }
  .analysis-modal-body {
    padding: 10px;
  }
  .analysis-modal-body .profile-header {
    padding: 20px 16px;
    gap: 18px;
  }
  .analysis-modal-body .profile-avatar {
    width: 82px;
    height: 82px;
  }
  .analysis-modal-body .profile-info {
    min-width: 0;
    width: 100%;
  }
  .analysis-modal-body .profile-name {
    font-size: 22px;
    gap: 9px;
  }
  .analysis-modal-body .stat-card {
    padding: 18px;
  }
  .analysis-modal-body .stat-value {
    font-size: 25px;
  }
  .analysis-modal-loading {
    min-height: calc(100dvh - 120px);
  }
}

/* Resources pagination */
.resource-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -52px 0 88px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.resource-pagination-summary {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}
.resource-pagination-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.resource-page-link {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 800;
  transition:
    transform 0.2s var(--ease),
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    color 0.2s var(--ease);
}
.resource-page-link:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--ink);
}
.resource-page-link.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 0, 0, 0.2);
}
.resource-page-link.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.article-deep-dive {
  scroll-margin-top: 104px;
}
.article-check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
}
.article-check-list li {
  position: relative;
  margin: 0;
  padding: 13px 14px 13px 38px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}
.article-check-list li::before {
  content: "✓";
  position: absolute;
  left: 14px;
  top: 13px;
  color: var(--readable-accent-text);
  font-weight: 900;
}

@media (max-width: 760px) {
  .resource-pagination {
    align-items: stretch;
    flex-direction: column;
    margin-top: -56px;
    padding: 16px;
  }
  .resource-pagination-summary {
    text-align: center;
  }
  .resource-pagination-links {
    justify-content: center;
  }
  .resource-page-link {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
  }
  .article-check-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .keyword-filter-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
  .keyword-results-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .analysis-modal-dialog.is-keyword-choice {
    width: 100%;
    max-height: none;
  }
  .analysis-modal-dialog.is-keyword-results .analysis-modal-heading {
    padding-left: 38px;
  }
  .keyword-filter-top,
  .keyword-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .keyword-results-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .keyword-result-video {
    grid-template-columns: 145px minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  .keyword-search-choice {
    padding: 5px 0 8px;
  }
  .keyword-search-choice-grid {
    grid-template-columns: 1fr;
  }
  .keyword-choice-card {
    min-height: 150px;
    padding: 14px;
  }
  .keyword-choice-card b {
    left: 14px;
    bottom: 11px;
  }
  .keyword-filter-top,
  .keyword-filter-grid {
    grid-template-columns: 1fr;
  }
  .keyword-filter-actions,
  .keyword-card-buttons {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
  .keyword-filter-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .keyword-result-video {
    display: flex;
    flex-direction: column;
  }
  .keyword-video-thumb {
    width: 100%;
    aspect-ratio: 16/9;
  }
  .keyword-video-copy {
    padding-right: 0;
  }
  .keyword-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .keyword-search-locked {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .keyword-search-locked .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ================= KEYWORD / POPULAR RESULT EXPERIENCE V2 ================= */
.keyword-results-shell {
  --kw-tone: #ff3344;
  --kw-tone-2: #ff8a2b;
  --kw-soft: rgba(255, 51, 68, 0.12);
}
.keyword-filter-panel {
  position: relative;
  overflow: hidden;
  padding: 10px;
  border: 1px solid
    color-mix(
      in srgb,
      var(--analysis-border, var(--line)) 72%,
      var(--kw-tone) 28%
    );
  border-radius: 10px;
  background:
    radial-gradient(
      circle at 8% -20%,
      rgba(255, 55, 75, 0.15),
      transparent 34%
    ),
    radial-gradient(
      circle at 95% 120%,
      rgba(59, 130, 246, 0.14),
      transparent 36%
    ),
    var(--analysis-surface-2, var(--panel-2));
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.keyword-filter-top {
  gap: 10px;
  margin-bottom: 10px;
}
.keyword-filter-grid {
  gap: 9px;
}
.keyword-filter-panel label {
  gap: 0px;
  padding: 9px;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}
.keyword-filter-panel label:focus-within {
  transform: translateY(-1px);
  border-color: var(--analysis-border-strong, var(--accent));
  box-shadow: 0 8px 22px rgba(181, 18, 27, 0.1);
}
.keyword-filter-panel input,
.keyword-filter-panel select {
  height: 38px;
  border-radius: 9px;
  background: var(--analysis-surface-3, var(--bg));
  font-weight: 700;
}
.keyword-filter-actions .btn {
  min-width: 122px;
  border-radius: 11px;
}
.keyword-filter-actions .btn-primary {
  background: linear-gradient(135deg, #e60012, #ff4b2b);
  box-shadow: 0 10px 24px rgba(230, 0, 18, 0.22);
}
.keyword-filter-actions .btn-ghost {
  border-color: rgba(139, 92, 246, 0.35);
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.1),
    rgba(59, 130, 246, 0.08)
  );
}

.keyword-results-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.keyword-result-card {
  --card-tone: #ff3344;
  --card-tone-2: #ff8a2b;
  position: relative;
  isolation: isolate;
  min-height: 100%;
  padding: 16px;
  overflow: hidden;
  border: 1px solid
    color-mix(
      in srgb,
      var(--analysis-border, var(--line)) 68%,
      var(--card-tone) 32%
    );
  border-radius: 22px;
  background:
    linear-gradient(
      155deg,
      color-mix(
        in srgb,
        var(--card-tone) 9%,
        var(--analysis-surface-2, var(--panel-2))
      ),
      var(--analysis-surface-2, var(--panel-2)) 42%
    ),
    var(--analysis-surface-2, var(--panel-2));
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  transition:
    transform 0.22s var(--ease),
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}
.keyword-result-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--card-tone), var(--card-tone-2));
}
.keyword-result-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--card-tone) 65%, white 10%);
  box-shadow:
    0 24px 55px rgba(0, 0, 0, 0.19),
    0 0 0 1px color-mix(in srgb, var(--card-tone) 18%, transparent);
}
.keyword-result-card.tone-1 {
  --card-tone: #ff3046;
  --card-tone-2: #ff8a24;
}
.keyword-result-card.tone-2 {
  --card-tone: #8b5cf6;
  --card-tone-2: #3b82f6;
}
.keyword-result-card.tone-3 {
  --card-tone: #06b6d4;
  --card-tone-2: #10b981;
}
.keyword-result-card.tone-4 {
  --card-tone: #f59e0b;
  --card-tone-2: #ef4444;
}
.keyword-result-card.tone-5 {
  --card-tone: #ec4899;
  --card-tone-2: #8b5cf6;
}
.keyword-result-card.tone-6 {
  --card-tone: #22c55e;
  --card-tone-2: #14b8a6;
}
.keyword-card-glow {
  position: absolute;
  z-index: -1;
  right: -52px;
  top: -62px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--card-tone) 32%, transparent),
    transparent 68%
  );
  pointer-events: none;
}
.keyword-card-type {
  display: inline-flex;
  align-items: center;
  margin: 0 260px 0px 0;
  padding: 5px 9px;
  color: color-mix(
    in srgb,
    var(--card-tone) 76%,
    var(--analysis-text, var(--ink)) 24%
  );
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.keyword-card-actions {
  top: 13px;
  right: 13px;
}
.keyword-icon-btn {
  border-color: color-mix(
    in srgb,
    var(--card-tone, var(--analysis-border)) 28%,
    var(--analysis-border, var(--line)) 72%
  );
  border-radius: 10px;
  background: color-mix(
    in srgb,
    var(--analysis-surface-3, var(--bg3)) 88%,
    var(--card-tone, transparent) 12%
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.keyword-icon-btn:hover {
  border-color: var(--card-tone, var(--accent));
  background: color-mix(
    in srgb,
    var(--card-tone, var(--accent)) 16%,
    var(--analysis-surface-3, var(--bg3)) 84%
  );
  color: var(--card-tone, var(--accent));
  transform: translateY(-1px);
}
.keyword-channel-head {
  margin-bottom: 12px;
}
.keyword-avatar-ring {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  flex: 0 0 72px;
  padding: 3px;
  border-radius: 22px;
  background: linear-gradient(145deg, var(--card-tone), var(--card-tone-2));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--card-tone) 24%, transparent);
}
.keyword-avatar-ring img {
  width: 100%;
  height: 100%;
  border: 3px solid var(--analysis-surface-2, var(--panel-2));
  border-radius: 19px;
  object-fit: cover;
}
.keyword-channel-head h4,
.keyword-title-row h4 {
  color: var(--analysis-text, var(--ink));
  font-size: 15px;
  line-height: 1.35;
}
.keyword-handle-row {
  color: color-mix(
    in srgb,
    var(--card-tone) 72%,
    var(--analysis-text-soft, var(--ink-2)) 28%
  );
}
.keyword-card-meta {
  gap: 6px;
  margin-bottom: 10px;
}
.keyword-card-meta span {
  padding: 5px 7px;
  border: 1px solid var(--analysis-border, var(--line));
  border-radius: 8px;
  background: color-mix(
    in srgb,
    var(--analysis-surface-3, var(--bg3)) 92%,
    var(--card-tone) 8%
  );
}
.keyword-expandable {
  border-color: color-mix(
    in srgb,
    var(--analysis-border, var(--line)) 78%,
    var(--card-tone) 22%
  );
  border-radius: 11px;
  background: color-mix(
    in srgb,
    var(--analysis-surface-3, var(--bg2)) 94%,
    var(--card-tone) 6%
  );
}
.keyword-metrics-grid {
  gap: 7px;
}
.keyword-metric {
  position: relative;
  min-height: 62px;
  padding: 9px;
  overflow: hidden;
  border-color: color-mix(
    in srgb,
    var(--analysis-border, var(--line-soft)) 76%,
    var(--card-tone) 24%
  );
  border-radius: 12px;
  background: linear-gradient(
    145deg,
    color-mix(
      in srgb,
      var(--card-tone) 9%,
      var(--analysis-surface-3, var(--bg2))
    ),
    var(--analysis-surface-3, var(--bg2))
  );
}
.keyword-metric::after {
  content: "";
  position: absolute;
  right: -15px;
  bottom: -20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--card-tone) 10%, transparent);
}
.keyword-metric span {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
}
.keyword-metric span i {
  color: var(--card-tone);
  font-size: 10px;
  font-style: normal;
}
.keyword-metric b {
  position: relative;
  z-index: 1;
  font-size: 11px;
}
.keyword-metrics-primary .keyword-metric {
  border-color: color-mix(
    in srgb,
    var(--card-tone) 38%,
    var(--analysis-border, var(--line)) 62%
  );
  background: linear-gradient(
    145deg,
    color-mix(
      in srgb,
      var(--card-tone) 17%,
      var(--analysis-surface-3, var(--bg2))
    ),
    var(--analysis-surface-3, var(--bg2))
  );
}
.keyword-card-buttons {
  gap: 9px;
  padding-top: 8px;
}
.keyword-card-buttons .btn {
  min-height: 38px;
  border-radius: 11px;
  font-weight: 850;
}
.keyword-popular-btn {
  border-color: transparent !important;
  background: linear-gradient(
    135deg,
    var(--card-tone),
    var(--card-tone-2)
  ) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--card-tone) 24%, transparent);
}
.keyword-ai-btn {
  border-color: color-mix(
    in srgb,
    #8b5cf6 45%,
    var(--analysis-border, var(--line)) 55%
  ) !important;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.14),
    rgba(59, 130, 246, 0.11)
  ) !important;
}

.keyword-result-video {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.keyword-video-thumb {
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border: 1px solid
    color-mix(
      in srgb,
      var(--card-tone) 35%,
      var(--analysis-border, var(--line)) 65%
    );
  border-radius: 15px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}
.keyword-video-thumb::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.46));
  pointer-events: none;
}
.keyword-video-thumb > span,
.keyword-video-thumb > b {
  z-index: 2;
}
.keyword-video-copy {
  flex: 1;
  padding-right: 0;
}
.keyword-title-row {
  display: flex;
  gap: 8px;
}
.keyword-title-row h4 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.keyword-channel-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--analysis-border, var(--line));
  border-radius: 10px;
  background: color-mix(
    in srgb,
    var(--analysis-surface-3, var(--bg3)) 90%,
    var(--card-tone) 10%
  );
}

.popular-results-head {
  align-items: center;
  padding: 10px 10px 14px;
}
.popular-sort-control {
  min-width: 210px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--analysis-text-muted, var(--ink-3));
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.popular-sort-control select {
  height: 40px;
  padding: 7px 34px 7px 11px;
  border: 1px solid rgba(139, 92, 246, 0.38);
  border-radius: 11px;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(59, 130, 246, 0.08)),
    var(--analysis-surface-3, var(--bg3));
  color: var(--analysis-text, var(--ink));
  font-weight: 800;
}
.keyword-more-active {
  min-width: 180px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #e60012, #ff5a36 54%, #8b5cf6) !important;
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(230, 0, 18, 0.2);
}
.keyword-more-locked {
  min-width: 180px !important;
  border: 1px dashed var(--analysis-border, var(--line)) !important;
  border-radius: 12px !important;
  background: var(--analysis-surface-3, var(--bg3)) !important;
  color: var(--analysis-text-muted, var(--ink-3)) !important;
  opacity: 0.78;
}
.keyword-limit-card {
  max-width: 720px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin: 10px auto 0;
  padding: 15px 16px;
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(239, 68, 68, 0.08)),
    var(--analysis-surface-2, var(--panel-2));
  color: var(--analysis-text, var(--ink));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.1);
}
.keyword-limit-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(
    145deg,
    rgba(245, 158, 11, 0.24),
    rgba(239, 68, 68, 0.16)
  );
  font-size: 22px;
}
.keyword-limit-card strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
}
.keyword-limit-card p {
  margin: 0;
  color: var(--analysis-text-muted, var(--ink-3));
  font-size: 12px;
  line-height: 1.45;
}
.keyword-refresh-card {
  border-color: rgba(34, 197, 94, 0.38);
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.13), rgba(14, 165, 233, 0.08)),
    var(--analysis-surface-2, var(--panel-2));
}
.keyword-refresh-card .keyword-limit-icon {
  background: linear-gradient(
    145deg,
    rgba(34, 197, 94, 0.25),
    rgba(14, 165, 233, 0.16)
  );
}

[data-theme="dark"] .keyword-result-card {
  background:
    linear-gradient(
      155deg,
      color-mix(in srgb, var(--card-tone) 12%, #111622),
      #0d111b 48%,
      #0a0e17
    ),
    #0d111b;
}
[data-theme="dark"] .keyword-metric,
[data-theme="dark"] .keyword-expandable,
[data-theme="dark"] .keyword-card-meta span,
[data-theme="dark"] .keyword-channel-copy {
  background-color: rgba(255, 255, 255, 0.025);
}
[data-theme="light"] .keyword-result-card {
  background:
    linear-gradient(
      155deg,
      color-mix(in srgb, var(--card-tone) 8%, #fff),
      #fff 48%,
      #fff8f8
    ),
    #fff;
  box-shadow:
    0 18px 44px rgba(90, 28, 32, 0.1),
    inset 0 1px 0 #fff;
}
[data-theme="light"] .keyword-card-type {
  color: color-mix(in srgb, var(--card-tone) 82%, #2a1114 18%);
}
[data-theme="light"] .keyword-metric {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--card-tone) 8%, #fff),
    #fff
  );
}
[data-theme="light"] .keyword-filter-panel {
  box-shadow: 0 16px 38px rgba(90, 28, 32, 0.08);
}

/* Ranking avatars appear immediately with a styled fallback while the remote
   YouTube image decodes. */
.rank-avatar-shell {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: linear-gradient(
    145deg,
    rgba(255, 48, 70, 0.22),
    rgba(139, 92, 246, 0.2)
  );
  color: var(--ink);
  font-weight: 900;
}
.rank-avatar-shell > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.rank-avatar-shell img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.16s ease;
}
.rank-avatar-shell img.is-loaded {
  opacity: 1;
}
[data-theme="dark"] .rank-num {
  color: #fff !important;
}
[data-theme="light"] .rank-num {
  color: #e60012 !important;
}

@media (max-width: 1240px) {
  .keyword-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .keyword-results-grid {
    grid-template-columns: 1fr;
  }
  .popular-results-head {
    align-items: stretch;
  }
  .popular-sort-control {
    width: 100%;
    min-width: 0;
  }
  .keyword-limit-card {
    grid-template-columns: auto 1fr;
  }
  .keyword-limit-card .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* ================= THEME-SAFE PLAIN ACCENT TEXT =================
   Solid red remains available for buttons, borders, filled badges and icons.
   Unfilled text uses a high-contrast accent in dark mode and deep red in light mode. */
[data-theme="dark"] .theme-text-gradient,
[data-theme="dark"] .stat-value.grad {
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    #ffd5d8 52%,
    #ff9da5 100%
  ) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: #fff !important;
}
[data-theme="light"] .theme-text-gradient,
[data-theme="light"] .stat-value.grad {
  background: linear-gradient(90deg, #760008, #b5121b 58%, #d61a25) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: #8f0710 !important;
}
[data-theme="dark"] .keyword-card-type,
[data-theme="dark"] .keyword-handle-row {
  color: color-mix(in srgb, var(--card-tone) 28%, #fff 72%) !important;
}
[data-theme="dark"] .keyword-metric span i,
[data-theme="dark"] .keyword-icon-btn:hover {
  color: color-mix(in srgb, var(--card-tone) 35%, #fff 65%) !important;
}
[data-theme="dark"] .features-mega-heading,
[data-theme="dark"] .features-mega-badge {
  color: var(--readable-accent-text) !important;
}

/* ================= DASHBOARD PLAN ALLOWANCES ================= */
.dashboard-features-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}
.dashboard-features-heading .h-title {
  margin: 0 0 3px;
  font-size: 18px;
}
.dashboard-features-heading .muted {
  margin: 0;
  font-size: 12px;
}
.dashboard-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.dashboard-feature-card {
  --feature-tone: #ff3b4a;
  --feature-tone-soft: rgba(255, 59, 74, 0.12);
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 15px;
  background:
    radial-gradient(
      circle at 108% -12%,
      var(--feature-tone-soft),
      transparent 42%
    ),
    linear-gradient(145deg, var(--bg3), var(--bg2));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 12px 26px rgba(0, 0, 0, 0.08);
}
.dashboard-feature-card:nth-child(4n + 2) {
  --feature-tone: #7c5cff;
  --feature-tone-soft: rgba(124, 92, 255, 0.13);
}
.dashboard-feature-card:nth-child(4n + 3) {
  --feature-tone: #15aabf;
  --feature-tone-soft: rgba(21, 170, 191, 0.13);
}
.dashboard-feature-card:nth-child(4n + 4) {
  --feature-tone: #e59f00;
  --feature-tone-soft: rgba(229, 159, 0, 0.13);
}
.dashboard-feature-card.is-locked {
  opacity: 0.72;
  filter: saturate(0.72);
}
.dashboard-feature-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.dashboard-feature-card-head > div {
  min-width: 0;
}
.dashboard-feature-card-head h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.35;
}
.dashboard-feature-card-head p {
  display: -webkit-box;
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--ink-3);
  font-size: 10px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.dashboard-feature-status {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--feature-tone) 56%, var(--line) 44%);
  border-radius: 9px;
  background: var(--feature-tone-soft);
  color: var(--feature-tone);
  font-size: 13px;
  font-weight: 900;
}
button.dashboard-feature-status {
  cursor: pointer;
}
.dashboard-feature-status.is-off {
  border-color: var(--line);
  background: var(--bg2);
  color: var(--ink-3);
}
.dashboard-feature-allowances {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}
.dashboard-feature-chip {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 8px;
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.2;
}
.dashboard-feature-chip.is-usage {
  border-color: color-mix(in srgb, var(--feature-tone) 38%, var(--line) 62%);
}
.dashboard-feature-chip.is-locked-chip {
  border-style: dashed;
  background: var(--bg2);
  color: var(--ink-3);
}
[data-theme="light"] .dashboard-feature-card {
  box-shadow: 0 10px 24px rgba(74, 20, 26, 0.08);
}

/* Exact-identifier notice is deliberately half the width of a result modal. */
.analysis-modal-dialog.is-exact-required {
  width: min(590px, 100%);
  max-height: min(650px, calc(100dvh - 48px));
}
.analysis-modal-dialog.is-exact-required .keyword-exact-required {
  max-width: 100%;
  padding: 32px 22px 36px;
}
.analysis-modal-dialog.is-exact-required .keyword-exact-required-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 13px;
  border-radius: 17px;
  font-size: 27px;
}
.analysis-modal-dialog.is-exact-required .keyword-access-notice {
  max-width: 440px;
  flex-direction: column;
  text-align: center;
}
.analysis-modal-dialog.is-exact-required .keyword-access-notice .btn {
  min-width: 160px;
  justify-content: center;
}

.discover-upgrade-banner {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-top: 16px;
  padding: 22px 24px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 65%, #ff4650 35%);
  border-radius: 20px;
  background:
    radial-gradient(circle at 4% 50%, rgba(255, 70, 80, 0.18), transparent 24%),
    radial-gradient(
      circle at 82% -35%,
      rgba(124, 92, 255, 0.18),
      transparent 38%
    ),
    linear-gradient(135deg, var(--bg3), var(--bg2));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 18px 42px rgba(0, 0, 0, 0.12);
}
.discover-upgrade-banner::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -105px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  pointer-events: none;
}
.discover-upgrade-art {
  position: relative;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
}
.discover-upgrade-icon {
  position: relative;
  z-index: 2;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 91, 103, 0.5);
  border-radius: 17px;
  background: linear-gradient(
    145deg,
    rgba(255, 70, 80, 0.28),
    rgba(124, 92, 255, 0.17)
  );
  font-size: 25px;
  box-shadow:
    0 12px 28px rgba(181, 18, 27, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.discover-upgrade-orbit {
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(255, 91, 103, 0.42);
  border-radius: 50%;
}
.discover-upgrade-orbit.orbit-two {
  inset: 14px -4px;
  border-color: rgba(124, 92, 255, 0.38);
  transform: rotate(64deg);
}
.discover-upgrade-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}
.discover-upgrade-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--readable-accent-text);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.discover-upgrade-copy h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.2;
}
.discover-upgrade-copy p {
  max-width: 760px;
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.55;
}
.discover-upgrade-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}
.discover-upgrade-benefits span {
  padding: 5px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 750;
}
.discover-upgrade-button {
  position: relative;
  z-index: 1;
  min-width: 178px;
  justify-content: center;
}
[data-theme="light"] .discover-upgrade-banner {
  box-shadow: 0 16px 34px rgba(93, 20, 28, 0.1);
}

@media (max-width: 1120px) {
  .dashboard-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 860px) {
  .dashboard-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .discover-upgrade-banner {
    grid-template-columns: 74px minmax(0, 1fr);
  }
  .discover-upgrade-art {
    width: 68px;
    height: 68px;
  }
  .discover-upgrade-button {
    grid-column: 2;
    justify-self: start;
  }
}
@media (max-width: 760px) {
  .analysis-modal-dialog.is-exact-required {
    width: 100%;
    max-height: none;
  }
}
@media (max-width: 560px) {
  .dashboard-feature-grid {
    grid-template-columns: 1fr;
  }
  .discover-upgrade-banner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 19px;
  }
  .discover-upgrade-art {
    align-self: center;
  }
  .discover-upgrade-copy {
    text-align: center;
  }
  .discover-upgrade-benefits {
    justify-content: center;
  }
  .discover-upgrade-button {
    width: 100%;
    justify-content: center;
  }
}

/* Admin Excel settings import/export */
.settings-workbook-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 520px;
}
.settings-workbook-import {
  display: inline-flex;
  margin: 0;
}
.settings-workbook-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}
.settings-workbook-note {
  flex-basis: 100%;
  text-align: right;
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.flash-error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid #fb7185;
  color: #fecdd3;
}
[data-theme="light"] .flash-error {
  background: #fff1f2;
  border-color: #e11d48;
  color: #9f1239;
}
@media (max-width: 760px) {
  .settings-workbook-actions {
    justify-content: flex-start;
    max-width: none;
    width: 100%;
  }
  .settings-workbook-note {
    text-align: left;
  }
}

/* ================= DASHBOARD EXTENSION ENTITLEMENTS ================= */
.dashboard-extension-section {
  margin-top: 34px;
}
.dashboard-extension-heading {
  align-items: center;
  margin-bottom: 16px;
}
.dashboard-section-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--readable-accent-text);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.dashboard-extension-group {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: linear-gradient(
    150deg,
    color-mix(in srgb, var(--bg2) 92%, #7c5cff 8%),
    var(--bg2)
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.dashboard-extension-group:nth-of-type(3n + 2) {
  background: linear-gradient(
    150deg,
    color-mix(in srgb, var(--bg2) 92%, #15aabf 8%),
    var(--bg2)
  );
}
.dashboard-extension-group:nth-of-type(3n + 3) {
  background: linear-gradient(
    150deg,
    color-mix(in srgb, var(--bg2) 92%, #e59f00 8%),
    var(--bg2)
  );
}
.dashboard-extension-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
  padding: 2px 2px 10px;
  border-bottom: 1px solid var(--line-soft);
}
.dashboard-extension-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.dashboard-extension-group-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--bg);
  font-size: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.dashboard-extension-group-title h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.3;
}
.dashboard-extension-group-title p {
  margin: 3px 0 0;
  color: var(--ink-3);
  font-size: 10px;
}
.dashboard-extension-group-count {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 800;
}
.dashboard-extension-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.dashboard-extension-card {
  min-height: 164px;
}
.dashboard-extension-card.is-after-rule {
  border-style: dashed;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--bg3) 94%, #15aabf 6%),
    var(--bg2)
  );
}
.dashboard-extension-card-labels {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 5px;
}
.dashboard-extension-surface-chip,
.dashboard-extension-rule-chip {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 3px 6px;
  background: color-mix(in srgb, var(--bg) 90%, var(--feature-tone) 10%);
  color: var(--ink-2);
  font-size: 7.5px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.dashboard-extension-rule-chip {
  border-color: color-mix(in srgb, #15aabf 38%, var(--line) 62%);
  background: color-mix(in srgb, var(--bg) 88%, #15aabf 12%);
}
.dashboard-feature-chip.is-included {
  border-color: color-mix(in srgb, #22c55e 35%, var(--line) 65%);
}
.dashboard-feature-chip.is-restricted {
  background: color-mix(in srgb, var(--bg) 88%, #f59f00 12%);
  border-color: color-mix(in srgb, #f59f00 38%, var(--line) 62%);
}
.dashboard-feature-chip.is-item-limit {
  background: color-mix(in srgb, var(--bg) 86%, #15aabf 14%);
  border-color: color-mix(in srgb, #15aabf 35%, var(--line) 65%);
}
.dashboard-feature-chip.is-behavior {
  background: color-mix(in srgb, var(--bg) 88%, #7c5cff 12%);
}
.dashboard-feature-chip.is-muted-detail {
  background: var(--bg2);
  color: var(--ink-3);
  border-style: dotted;
}
.dashboard-extension-empty {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dashboard-extension-empty > span {
  font-size: 28px;
}
.dashboard-extension-empty h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
}
.dashboard-extension-empty p {
  margin: 0;
}
[data-theme="light"] .dashboard-extension-group {
  box-shadow:
    0 12px 28px rgba(74, 20, 26, 0.06),
    inset 0 1px 0 #fff;
}
@media (max-width: 1120px) {
  .dashboard-extension-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .dashboard-extension-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .dashboard-extension-heading .btn {
    width: 100%;
    justify-content: center;
  }
  .dashboard-extension-group {
    padding: 11px;
    border-radius: 17px;
  }
  .dashboard-extension-group-head {
    align-items: flex-start;
  }
  .dashboard-extension-group-count {
    display: none;
  }
  .dashboard-extension-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-extension-card {
    min-height: 0;
  }
}

/* ===================== RESPONSIVE HARDENING AUDIT =====================
   Shared safeguards for public pages, account pages, admin pages, tables,
   modals, navigation, decorative media and narrow mobile viewports. */
html,
body {
  width: 100%;
  max-width: 100%;
}
body {
  overflow-x: hidden;
  overflow-x: clip;
}
.site-main,
.shell,
.main,
.public-footer,
.home-hero {
  min-width: 0;
  max-width: 100%;
}
img,
video,
canvas,
svg {
  max-width: 100%;
}
img,
video {
  height: auto;
}
iframe {
  max-width: 100%;
}
.hero-grid > *,
.split-section > *,
.section-head > *,
.grid > *,
.row > *,
.spread > *,
.footer-grid > *,
.contact-grid > *,
.permissions-grid > *,
.article-layout > *,
.policy-layout > *,
.auth-shell > *,
.dashboard-feature-grid > *,
.dashboard-extension-grid > * {
  min-width: 0;
}
.card,
.panel,
.feature-card,
.resource-card,
.step-card,
.policy-card,
.article-body,
.prose,
.flash,
.toast-msg,
.side-link,
.side-link-admin,
.mobile-nav a {
  overflow-wrap: anywhere;
  word-break: normal;
}
pre,
code {
  max-width: 100%;
}
pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* The hero's decorative thumbnail must never participate in grid sizing or
   create horizontal scroll. It is hidden once the hero becomes one column. */
.home-hero {
  overflow: hidden;
  overflow: clip;
}
.home-hero > .home-hero-ambient-thumb {
  position: absolute !important;
  pointer-events: none;
  max-inline-size: min(440px, 42vw);
  contain: layout paint;
}

/* Horizontal data tables remain readable instead of shrinking or clipping. */
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}
.table-responsive > table {
  margin: 0;
}
.table-responsive > .table {
  border: 0;
  border-radius: 0;
  background: transparent;
}
.table-responsive .table {
  min-width: 660px;
}
.table-responsive .rank-table {
  min-width: 860px;
}
.table-responsive .matrix,
.table-responsive .ftable {
  min-width: 760px;
}
.table-responsive th,
.table-responsive td {
  white-space: nowrap;
}
.table-responsive td:nth-child(2) {
  white-space: normal;
}

/* Panel navigation is intentionally namespaced so it cannot collide with the
   public site's mobile dropdown menu. */
.panel-mobile-nav .brand {
  overflow: hidden;
}
.panel-mobile-nav .brand-logo-image {
  max-width: min(155px, 52vw);
}

/* Public mobile menu behaves like a viewport-safe drawer below the header. */
@media (max-width: 1080px) {
  body.public-menu-open {
    overflow: hidden;
  }
  .public-header .mobile-nav {
    position: fixed;
    inset: 76px 0 auto;
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom);
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 97%, transparent);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(20px);
  }
  .public-header .mobile-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 28px;
  }
  .public-header .mobile-nav a {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 8px 0;
  }
  .public-header .mobile-nav-actions {
    flex-wrap: wrap;
  }
  .hero-copy,
  .hero-visual {
    justify-self: stretch;
  }
  .home-hero > .home-hero-ambient-thumb {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .row {
    flex-wrap: wrap;
  }
  .spread {
    align-items: flex-start;
  }
  .main {
    width: 100%;
  }
  .container,
  .container-wide {
    width: min(calc(100% - 32px), var(--public-max, 1500px));
  }
  .section-head > .section-head-action {
    justify-self: start;
    margin-left: 0;
  }
  .rank-filters .fg {
    flex: 1 1 180px;
  }
  .rank-filters select {
    width: 100%;
    min-width: 0;
  }
  .toast-wrap {
    right: 14px;
    bottom: 14px;
    left: 14px;
  }
  .toast {
    width: 100%;
    min-width: 0;
    max-width: none;
    transform: translateY(130%);
  }
  .toast.show {
    transform: translateY(0);
  }
  .modal-back {
    padding: 14px;
  }
  .modal {
    max-height: calc(100dvh - 28px);
  }
  .pgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 74px;
  }
  .container,
  .container-wide {
    width: min(calc(100% - 28px), var(--public-max, 1500px));
  }
  .public-nav {
    gap: 10px;
  }
  .public-header .nav-actions {
    gap: 5px;
  }
  .public-header .nav-actions > a.btn {
    display: none;
  }
  .public-header .mobile-nav {
    top: 68px;
    max-height: calc(100dvh - 68px);
  }
  .public-header .mobile-nav-grid {
    padding: 20px 0;
    gap: 18px 22px;
  }
  .public-header .mobile-nav-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .public-header .mobile-nav-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .main {
    padding: 18px 14px;
  }
  .h-title {
    font-size: clamp(22px, 7vw, 28px);
    line-height: 1.18;
  }
  .section-copy {
    font-size: 15px;
    line-height: 1.2;
  }
  .display-title {
    font-size: clamp(34px, 11vw, 52px);
    overflow-wrap: anywhere;
  }
  .section-title {
    font-size: clamp(27px, 8vw, 38px);
  }
  .card,
  .stat-card,
  .feature-card,
  .step-card,
  .resource-card,
  .policy-card {
    border-radius: 15px;
  }
  .card,
  .feature-card,
  .step-card,
  .policy-card {
    padding: 18px;
  }
  .card-pad-lg {
    padding: 20px !important;
  }
  .cta-panel {
    padding: 28px 20px;
    border-radius: 18px;
  }
  .btn-row {
    align-items: stretch;
  }
  .btn-row .btn {
    flex: 1 1 190px;
    justify-content: center;
  }
  .search-bar {
    flex-wrap: wrap;
  }
  .search-bar .input {
    flex-basis: 100%;
  }
  .input,
  select,
  textarea {
    font-size: 16px;
  }
  .btn,
  button,
  .theme-toggle,
  .mobile-nav-toggle {
    min-height: 44px;
  }

  .profile-header {
    align-items: flex-start;
    gap: 18px;
    padding: 18px;
  }
  .profile-info {
    min-width: 0;
  }
  .profile-name {
    font-size: 23px;
  }
  .stat-value {
    font-size: 25px;
  }

  .table-responsive {
    border-radius: 14px;
  }
  .table-responsive .table {
    min-width: 620px;
  }
  .table-responsive .rank-table {
    min-width: 820px;
  }
  .table-responsive .matrix,
  .table-responsive .ftable {
    min-width: 720px;
  }
  .table th,
  .table td {
    padding: 12px;
  }

  .pgrid {
    grid-template-columns: 1fr !important;
  }
  .settings-workbook-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: none;
  }
  .settings-workbook-actions .settings-workbook-btn {
    width: 100%;
  }
  .settings-workbook-note {
    grid-column: 1 / -1;
    text-align: left;
  }

  .analysis-modal-header {
    flex-wrap: nowrap;
  }
  .analysis-modal-heading {
    min-width: 0;
  }
  .analysis-modal-heading h2 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .analysis-modal-close {
    flex: 0 0 42px;
  }
  .analysis-modal-body {
    overscroll-behavior: contain;
  }
  .keyword-filter-panel {
    padding: 11px;
    border-radius: 16px;
  }
  .keyword-result-card {
    padding: 13px;
    border-radius: 18px;
  }
  .keyword-card-type {
    margin: 0 260px 0 0;
  }
  .popular-sort-control {
    min-width: 0;
  }
  .resource-pagination {
    margin-bottom: 34px;
  }
  .article-media-frame {
    width: min(600px, 100%);
    max-width: 100%;
  }
  .article-media-frame img,
  .article-media-frame video {
    width: 100%;
    height: auto;
    aspect-ratio: 600 / 330;
    object-fit: cover;
  }
}

@media (max-width: 560px) {
  .container,
  .container-wide {
    width: min(calc(100% - 22px), var(--public-max, 1500px));
  }
  .main {
    padding: 14px 11px;
  }
  .panel-mobile-nav {
    min-height: 60px;
    padding: 8px 11px;
  }
  .panel-mobile-nav .brand-logo-image {
    max-width: 132px;
    height: 32px;
  }

  .public-header .brand-logo-image {
    max-width: 132px;
    height: 34px;
  }
  .public-header .theme-toggle {
    width: 40px;
    height: 40px;
  }
  .public-header .mobile-nav-toggle {
    width: 40px;
    height: 40px;
  }
  .public-header .mobile-nav-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .public-header .mobile-nav-grid > div {
    padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .public-header .mobile-nav-grid > div:last-child {
    border-bottom: 0;
  }
  .public-header .mobile-nav-actions {
    grid-template-columns: 1fr;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .feature-grid,
  .resource-grid,
  .quote-grid,
  .screenshot-grid,
  .use-case-grid,
  .dashboard-feature-grid,
  .dashboard-extension-grid {
    grid-template-columns: 1fr !important;
  }
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  .footer-grid > div {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-soft);
  }
  .footer-grid > div:last-child {
    border-bottom: 0;
  }
  .footer-bottom {
    gap: 10px;
  }
  .trust-strip-inner {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .trust-strip-inner::-webkit-scrollbar {
    display: none;
  }
  .trust-strip-inner span {
    flex: 0 0 auto;
  }

  .auth-card,
  .auth-aside {
    margin-top: 16px;
    margin-bottom: 32px;
  }
  .auth-card {
    padding: 22px 16px;
  }
  .article-byline {
    gap: 7px 12px;
  }
  .article-body h2 {
    font-size: 24px;
  }
  .article-body h3 {
    font-size: 18px;
  }
  .article-body p,
  .article-body li {
    font-size: 15px;
  }
  .article-steps li {
    padding-left: 42px;
  }
  .faq-question {
    gap: 12px;
    padding: 18px 0;
    font-size: 16px;
  }

  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .profile-meta {
    justify-content: center;
  }
  .profile-name {
    justify-content: center;
  }
  .analysis-modal-body .profile-header {
    align-items: center;
  }
  .analysis-modal-body .profile-meta {
    justify-content: center;
  }

  .keyword-limit-card {
    display: flex;
    flex-direction: column;
    text-align: center;
  }
  .keyword-limit-card .btn {
    width: 100%;
  }
  .keyword-channel-head {
    align-items: flex-start;
  }
  .keyword-avatar-ring {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
    border-radius: 18px;
  }
  .keyword-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .keyword-card-actions {
    top: 10px;
    right: 10px;
  }
  .keyword-card-buttons {
    grid-template-columns: 1fr !important;
  }

  .pcard .r2 {
    grid-template-columns: 1fr !important;
  }
  .settings-workbook-actions {
    grid-template-columns: 1fr;
  }
  .settings-workbook-note {
    grid-column: auto;
  }
  .spread > .btn,
  .spread > form,
  .spread > .settings-workbook-actions {
    width: 100%;
  }
  .spread > .btn {
    justify-content: center;
  }
  .toast-wrap {
    right: 9px;
    left: 9px;
    bottom: 9px;
  }
}

@media (max-width: 390px) {
  .container,
  .container-wide {
    width: calc(100% - 16px);
  }
  .main {
    padding-inline: 8px;
  }
  .public-header .brand-logo-image {
    max-width: 112px;
  }
  .public-header .nav-actions {
    gap: 3px;
  }
  .public-header .theme-toggle,
  .public-header .mobile-nav-toggle {
    width: 38px;
    height: 38px;
    min-height: 38px;
  }
  .display-title {
    font-size: clamp(31px, 11vw, 42px);
  }
  .card,
  .feature-card,
  .step-card,
  .policy-card {
    padding: 15px;
  }
  .analysis-modal-header {
    padding-inline: 10px;
  }
  .analysis-modal-heading h2 {
    font-size: 17px;
    max-width: calc(100vw - 74px);
  }
  .analysis-modal-close {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
  .keyword-metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }
  .keyword-metric {
    padding: 7px;
    min-height: 56px;
  }
  .resource-page-link {
    min-width: 36px;
    padding-inline: 9px;
  }
}

.panel-side-close {
  display: none;
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: 10px;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg3);
  color: var(--ink);
  cursor: pointer;
}
.cron-command-box {
  position: relative;
  min-width: 0;
  padding-right: 88px !important;
}
.cron-command-box #cronCmd {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 900px) {
  .panel-side-close {
    display: grid;
  }
  .side > .brand:first-of-type {
    padding-right: 48px;
  }
}
@media (max-width: 760px) {
  .main > form.row,
  .main > .panel form.row,
  .main > .card form.row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .main form.row > .input,
  .main form.row > select,
  .main form.row > textarea,
  .main form.row > .btn {
    width: 100% !important;
    max-width: none !important;
  }
  .cron-command-box {
    padding: 58px 12px 12px !important;
  }
  .cron-command-box .btn {
    top: 10px !important;
    right: 10px !important;
  }
}

/* Final small-screen visual hardening: large decorative previews and blurred
   aura layers must never create an off-canvas compositing surface. */
@media (max-width: 760px) {
  .product-window,
  .analytics-overview-mock,
  .feature-demo-window,
  .media-frame {
    max-width: 100%;
    transform: none !important;
    animation: none !important;
    will-change: auto;
  }
  .aura::before,
  .aura::after {
    width: 280px;
    height: 280px;
    filter: blur(55px);
    opacity: 0.28;
  }
  .comparison-table {
    min-width: 640px;
  }
  .comparison-table th,
  .comparison-table td {
    white-space: normal;
    min-width: 170px;
  }
}

@media (max-width: 640px) {
  .home-marquee {
    margin-inline: 0;
  }
  .home-marquee::before,
  .home-marquee::after {
    width: 24px;
  }
}

@media (hover: none), (pointer: coarse) {
  .feature-card:hover,
  .resource-card:hover,
  .step-card:hover,
  .sec-tile:hover,
  .ccard:hover,
  .vcarousel:hover,
  .icon-chip:hover,
  .nav-dropdown .features-mega-item:hover {
    transform: none;
  }
  .carousel-wrap:hover .carousel-track {
    animation-play-state: running;
  }
}

/* ===== AI insights report: continuous editorial flow ===== */
.ai-report-shell {
  background: linear-gradient(180deg, var(--bg3), var(--bg2));
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 18px;
  color: var(--ink);
}
.ai-report-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  background: linear-gradient(
    135deg,
    rgba(181, 18, 27, 0.11),
    rgba(99, 102, 241, 0.06),
    rgba(255, 255, 255, 0.03)
  );
  margin-bottom: 8px;
}
.ai-report-hero::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -70px;
  top: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(181, 18, 27, 0.25), transparent 68%);
  pointer-events: none;
}
.ai-report-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--readable-accent-text);
  margin-bottom: 8px;
}
.ai-report-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
  margin: 0 0 10px;
}
.ai-report-summary {
  position: relative;
  z-index: 1;
  max-width: 900px;
}
.ai-report-summary p {
  margin: 0 0 10px;
  color: var(--ink-2) !important;
  line-height: 1.72;
}
.ai-report-flow {
  position: relative;
  margin-top: 6px;
  padding: 2px 0 0;
}
.ai-report-flow::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 27px;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    var(--line) 6%,
    var(--line) 94%,
    transparent
  );
}
.ai-report-section {
  --section-accent: var(--yt-red);
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  padding: 24px 4px 24px 0;
  border-bottom: 1px solid var(--line);
}
.ai-report-section:last-child {
  border-bottom: 0;
}
.ai-report-section.tone-success {
  --section-accent: #22c55e;
}
.ai-report-section.tone-warning {
  --section-accent: #f59e0b;
}
.ai-report-section.tone-neutral {
  --section-accent: #818cf8;
}
.ai-report-section-marker {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.ai-report-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--section-accent) 40%, var(--line));
  background: var(--bg2);
  color: var(--section-accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}
.ai-report-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid color-mix(in srgb, var(--section-accent) 65%, transparent);
  box-shadow: 0 0 0 5px var(--bg2);
  font-size: 18px;
}
.ai-report-section-content {
  min-width: 0;
  padding-top: 1px;
}
.ai-report-section-content h3 {
  margin: 0 0 12px;
  color: var(--ink) !important;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.3;
}
.ai-report-section-body {
  padding-left: 16px;
  border-left: 3px solid
    color-mix(in srgb, var(--section-accent) 72%, transparent);
}
.ai-report-section-body p,
.ai-report-section-body li,
.ai-report-section-body strong,
.ai-report-section-body span {
  color: var(--ink) !important;
}
.ai-report-section-body p {
  margin: 0 0 12px;
  line-height: 1.78;
}
.ai-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 9px;
}
.ai-list li::marker {
  color: var(--section-accent);
}
.ai-list-numbered {
  padding-left: 24px;
}
.ai-stat-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1.5fr);
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.ai-stat-row:last-child {
  border-bottom: 0;
}
.ai-stat-row span {
  color: var(--ink-2) !important;
  font-weight: 600;
}
.ai-stat-row strong {
  color: var(--ink) !important;
  text-align: left;
}
.ai-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  margin: 0 1px;
  border-radius: 999px;
  background: rgba(181, 18, 27, 0.1);
  color: var(--readable-accent-text) !important;
  font-size: 0.92em;
  font-weight: 700;
}
.ai-report-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.ai-report-empty {
  padding: 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--ink-2);
}
[data-theme="light"] .ai-report-shell {
  background: linear-gradient(180deg, #fff, #fff8f8);
}
[data-theme="light"] .ai-report-hero {
  background: linear-gradient(
    135deg,
    rgba(181, 18, 27, 0.08),
    rgba(99, 102, 241, 0.04),
    #fff
  );
}
[data-theme="light"] .ai-report-icon,
[data-theme="light"] .ai-report-index {
  background: #fff;
}
[data-theme="dark"] .ai-report-hero {
  background: linear-gradient(
    135deg,
    rgba(181, 18, 27, 0.16),
    rgba(99, 102, 241, 0.08),
    rgba(255, 255, 255, 0.025)
  );
}
[data-theme="dark"] .ai-report-icon,
[data-theme="dark"] .ai-report-index {
  background: #151820;
}
@media (max-width: 700px) {
  .ai-report-shell {
    padding: 12px;
    border-radius: 18px;
  }
  .ai-report-hero {
    padding: 15px;
    border-radius: 16px;
  }
  .ai-report-flow::before {
    left: 19px;
  }
  .ai-report-section {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
    padding: 20px 0;
  }
  .ai-report-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
    box-shadow: 0 0 0 4px var(--bg2);
  }
  .ai-report-index {
    width: 27px;
    height: 20px;
  }
  .ai-report-section-content h3 {
    font-size: 18px;
  }
  .ai-report-section-body {
    padding-left: 12px;
  }
  .ai-stat-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .ai-report-actions {
    justify-content: stretch;
  }
  .ai-report-actions .btn {
    width: 100%;
  }
}

/* ================= KEYWORD RESULT UX V3 ================= */
.keyword-results-shell .btn,
.keyword-result-card .btn,
.keyword-filter-panel .btn,
.keyword-more-wrap .btn,
.keyword-limit-card .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
}

/* Four result cards per desktop row; scale down cleanly on narrower screens. */
.keyword-results-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.keyword-metric b {
  position: relative;
  z-index: 1;
  font-size: 15px;
}

/* Any clipped value/title can be revealed on hover/focus or tapped on touch. */
.keyword-revealable,
.keyword-truncatable {
  cursor: help;
}
.keyword-revealable:hover,
.keyword-revealable:focus,
.keyword-revealable.is-revealed {
  z-index: 8;
  overflow: visible;
  outline: none;
}
.keyword-revealable:hover b,
.keyword-revealable:focus b,
.keyword-revealable.is-revealed b {
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.keyword-truncatable:hover,
.keyword-truncatable:focus,
.keyword-truncatable.is-revealed {
  display: block !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-line-clamp: unset !important;
  outline: none;
}

/* Video result cards have one primary action, centered under the content. */
.keyword-result-video .keyword-card-buttons {
  grid-template-columns: minmax(150px, 240px);
  justify-content: center;
  width: 100%;
}
.keyword-result-video .keyword-video-ai-btn {
  width: 100%;
  margin-inline: auto;
  border-color: color-mix(
    in srgb,
    #8b5cf6 52%,
    var(--analysis-border, var(--line)) 48%
  ) !important;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.18),
    rgba(59, 130, 246, 0.14)
  ) !important;
}

/* Tier badges remain visually distinct even from the generic theme badge rules. */
.keyword-result-card .tier,
.analysis-modal-body .tier {
  border: 1px solid transparent !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 5px 14px rgba(0, 0, 0, 0.12) !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em !important;
}
.keyword-result-card .tier-Diamond,
.analysis-modal-body .tier-Diamond {
  background: linear-gradient(135deg, #dffaff, #31d7f6) !important;
  color: #063947 !important;
  border-color: #7ce7fa !important;
}
.keyword-result-card .tier-Ruby,
.analysis-modal-body .tier-Ruby {
  background: linear-gradient(135deg, #ff5b6b, #b50017) !important;
  color: #fff !important;
  border-color: #ff8090 !important;
}
.keyword-result-card .tier-Platinum,
.analysis-modal-body .tier-Platinum {
  background: linear-gradient(135deg, #f8fbff, #aeb9c8) !important;
  color: #1f2937 !important;
  border-color: #d7dee7 !important;
}
.keyword-result-card .tier-Gold,
.analysis-modal-body .tier-Gold {
  background: linear-gradient(135deg, #fff1a8, #f1b400) !important;
  color: #4c3500 !important;
  border-color: #ffd65c !important;
}
.keyword-result-card .tier-Silver,
.analysis-modal-body .tier-Silver {
  background: linear-gradient(135deg, #edf3f8, #9ba8b5) !important;
  color: #22303d !important;
  border-color: #c5d0db !important;
}
.keyword-result-card .tier-Bronze,
.analysis-modal-body .tier-Bronze {
  background: linear-gradient(135deg, #edb47a, #9b4d17) !important;
  color: #fff8ef !important;
  border-color: #d88a4d !important;
}
.keyword-result-card .tier-Copper,
.analysis-modal-body .tier-Copper {
  background: linear-gradient(135deg, #e89462, #82391f) !important;
  color: #fff !important;
  border-color: #c8673e !important;
}
.keyword-result-card .tier-Starter,
.analysis-modal-body .tier-Starter {
  background: linear-gradient(135deg, #64748b, #283548) !important;
  color: #fff !important;
  border-color: #8391a5 !important;
}
[data-theme="dark"] .keyword-result-card .tier-Platinum,
[data-theme="dark"] .analysis-modal-body .tier-Platinum,
[data-theme="dark"] .keyword-result-card .tier-Silver,
[data-theme="dark"] .analysis-modal-body .tier-Silver {
  color: #111827 !important;
}

/* Keep only the three quick dropdowns visible until Advanced is opened. */
.keyword-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}
.keyword-filter-toolbar .keyword-filter-top {
  margin-bottom: 0;
}
.keyword-advanced-toggle {
  min-width: 148px;
  align-self: stretch;
  gap: 8px;
}
.keyword-advanced-toggle span {
  font-size: 14px;
  transition: transform 0.18s ease;
}
.keyword-filter-advanced {
  display: block;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  overflow: hidden;
  transition:
    max-height 0.28s ease,
    opacity 0.2s ease,
    margin-top 0.24s ease;
}
.keyword-filter-panel.is-advanced .keyword-filter-advanced {
  max-height: 1400px;
  opacity: 1;
  margin-top: 12px;
  overflow: visible;
}
.keyword-filter-panel.is-advanced .keyword-filter-grid,
.keyword-filter-panel.is-advanced .keyword-filter-actions {
  display: grid;
}
.keyword-filter-panel:not(.is-advanced) .keyword-filter-grid,
.keyword-filter-panel:not(.is-advanced) .keyword-filter-actions {
  visibility: hidden;
  pointer-events: none;
}
.keyword-filter-panel.is-advanced .keyword-filter-actions {
  grid-template-columns: repeat(2, minmax(130px, 190px));
  justify-content: end;
}

@media (max-width: 1540px) {
  .keyword-results-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1180px) {
  .keyword-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .keyword-filter-toolbar {
    grid-template-columns: 1fr;
  }
  .keyword-advanced-toggle {
    min-height: 42px;
  }
}
@media (max-width: 760px) {
  .keyword-results-grid {
    grid-template-columns: 1fr;
  }
  .keyword-filter-top {
    grid-template-columns: 1fr;
  }
  .keyword-filter-panel.is-advanced .keyword-filter-actions {
    grid-template-columns: 1fr;
  }
  .keyword-advanced-toggle {
    width: 100%;
  }
  .keyword-metric b {
    font-size: 15px;
  }
}

/* ===== User extension page and sidebar utility controls ===== */
.side-utility-link,
.side-utility-link:hover,
.side-utility-link:focus-visible {
  width: 100%;
  text-align: left;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ink-2) !important;
}
.side-utility-link:hover,
.side-utility-link:focus-visible {
  color: var(--ink) !important;
  transform: translateX(3px);
}
.side-logout-link {
  color: var(--readable-accent-text) !important;
}

/* The keyword-search choice cards are neutral surfaces, not solid red buttons. */
.keyword-choice-card,
.keyword-choice-card:hover,
.keyword-choice-card:focus-visible {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center !important;
  background: linear-gradient(
    145deg,
    var(--analysis-surface-2, var(--panel-2)),
    var(--analysis-surface-3, var(--bg3))
  ) !important;
  color: var(--analysis-text, var(--ink)) !important;
}
.keyword-choice-card:hover,
.keyword-choice-card:focus-visible {
  border-color: var(--analysis-border-strong, var(--accent)) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2) !important;
}
.keyword-choice-card .keyword-choice-icon {
  margin: 0 auto 11px;
}
.keyword-choice-card strong,
.keyword-choice-card small,
.keyword-choice-card b {
  width: 100%;
  text-align: center;
}
.keyword-choice-card b {
  position: relative;
  left: auto;
  bottom: auto;
  margin-top: 13px;
}
[data-theme="light"] .keyword-choice-card,
[data-theme="light"] .keyword-choice-card:hover,
[data-theme="light"] .keyword-choice-card:focus-visible {
  background: linear-gradient(145deg, #fff, #fff6f7) !important;
  color: #211416 !important;
}

.user-extension-page {
  padding-bottom: 54px;
}
.user-extension-intro {
  max-width: 820px;
  margin: 0 auto 24px;
  text-align: center;
}
.user-extension-intro .section-copy {
  max-width: 720px;
  margin: 12px auto 0;
}
.user-extension-download-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 24px auto 42px;
  text-align: center;
}
.user-extension-download-wrap .btn {
  min-width: 220px;
  justify-content: center;
}
.user-extension-download-note {
  max-width: 620px;
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.6;
}
.extension-feature-catalog {
  margin-top: 38px;
}
.extension-feature-catalog-head {
  max-width: 820px;
  margin: 0 auto 28px;
  text-align: center;
}
.extension-feature-category {
  position: relative;
  margin-bottom: 18px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 22px;
  background: linear-gradient(145deg, var(--panel), var(--bg2));
}
.extension-feature-category::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--yt-red), #8b5cf6, #14b8a6);
}
.extension-feature-category-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 2px 14px;
  border-bottom: 1px solid var(--line);
}
.extension-feature-category-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}
.extension-feature-category-head span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.extension-feature-list {
  display: grid;
  gap: 0;
}
.extension-feature-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: start;
  gap: 13px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
}
.extension-feature-item:last-child {
  border-bottom: 0;
}
.extension-feature-item.is-child {
  padding-left: 30px;
}
.extension-feature-index {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--yt-red) 45%, var(--line));
  border-radius: 13px;
  background: color-mix(in srgb, var(--yt-red) 10%, var(--bg3));
  color: var(--readable-accent-text);
  font: 700 10px/1 var(--font-mono);
}
.extension-feature-copy h4 {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.35;
}
.extension-feature-copy p {
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.6;
}
.extension-feature-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.08);
  color: #45c977;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.extension-feature-status.is-locked {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.08);
  color: #d7941d;
}
[data-theme="light"] .extension-feature-category {
  background: linear-gradient(145deg, #fff, #fff8f8);
  box-shadow: 0 14px 34px rgba(104, 22, 30, 0.07);
}
[data-theme="light"] .extension-feature-status {
  color: #137d39;
}
[data-theme="light"] .extension-feature-status.is-locked {
  color: #9a5b00;
}
@media (max-width: 760px) {
  .extension-feature-category {
    padding: 14px;
    border-radius: 18px;
  }
  .extension-feature-category-head {
    flex-direction: column;
    gap: 8px;
  }
  .extension-feature-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }
  .extension-feature-item.is-child {
    padding-left: 12px;
  }
  .extension-feature-index {
    width: 34px;
    height: 34px;
  }
  .extension-feature-status {
    grid-column: 2;
    justify-self: start;
  }
}
@media (max-width: 520px) {
  .keyword-card-type {
    margin: 0 260px 0 0;
  }
  .keyword-choice-card {
    min-height: 158px;
  }
  .user-extension-download-wrap .btn {
    width: 100%;
  }
}

/* ===== My Plan, subscription controls and payment verification ===== */
.my-plan-page {
  margin: 0 auto;
  padding-bottom: 52px;
}
.my-plan-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.my-plan-header .h-title {
  margin: 5px 0 7px;
  font-size: clamp(30px, 4vw, 46px);
}
.my-plan-header p {
  max-width: 670px;
  margin: 0;
  line-height: 1.65;
}
.my-plan-flash {
  margin-bottom: 18px;
}
.my-plan-verification {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.13),
    rgba(245, 158, 11, 0.035)
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.my-plan-verification-icon {
  position: relative;
  width: 34px;
  height: 34px;
  border: 3px solid rgba(245, 158, 11, 0.22);
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: myPlanSpin 1s linear infinite;
}
.my-plan-verification strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}
.my-plan-verification p {
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.55;
}
@keyframes myPlanSpin {
  to {
    transform: rotate(360deg);
  }
}

.my-plan-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  margin-bottom: 18px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid
    color-mix(in srgb, var(--yt-red-bright, var(--accent)) 42%, var(--line));
  border-radius: 26px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--yt-red) 12%, var(--panel)),
    var(--panel) 52%,
    color-mix(in srgb, #8b5cf6 8%, var(--bg2))
  );
  box-shadow:
    0 22px 58px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.my-plan-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--yt-red),
    #ff4651,
    #8b5cf6,
    transparent
  );
}
.my-plan-hero-glow {
  position: absolute;
  right: -110px;
  top: -140px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 37, 46, 0.2), transparent 68%);
  pointer-events: none;
}
.my-plan-summary {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  z-index: 1;
}
.my-plan-logo {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: linear-gradient(145deg, #ef2530, #770008);
  box-shadow:
    0 16px 32px rgba(181, 18, 27, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.my-plan-logo svg {
  width: 35px;
  height: 35px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.my-plan-summary-copy {
  min-width: 0;
}
.my-plan-label-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.my-plan-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid rgba(34, 197, 94, 0.27);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.08);
  color: #48cf7a;
  font-size: 9px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.my-plan-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 15%, transparent);
}
.my-plan-status.is-cancelled {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(148, 163, 184, 0.09);
  color: #b2bdca;
}
.my-plan-status.is-warning {
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(245, 158, 11, 0.09);
  color: #f4ad2f;
}
.my-plan-summary h2 {
  margin: 0 0 5px;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
}
.my-plan-summary p {
  max-width: 610px;
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.6;
}
.my-plan-price-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 15px;
}
.my-plan-price-line strong {
  font: 700 25px/1 var(--font-display);
}
.my-plan-price-line span {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
}
.my-plan-primary-actions {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 205px;
  z-index: 1;
}
.my-plan-primary-actions .btn {
  width: 100%;
  justify-content: center;
}

.my-plan-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.my-plan-detail-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: linear-gradient(145deg, var(--panel), var(--bg2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.my-plan-detail-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid color-mix(in srgb, var(--yt-red) 32%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--yt-red) 9%, var(--bg3));
  color: var(--readable-accent-text);
}
.my-plan-detail-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.my-plan-detail-card small {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-3);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.my-plan-detail-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.35;
}
.my-plan-detail-card p {
  margin: 7px 0 0;
  color: var(--ink-3);
  font-size: 10.5px;
  line-height: 1.55;
}
.my-plan-inline-status {
  font-weight: 800;
}
.my-plan-inline-status.is-paid,
.my-plan-inline-status.is-active {
  color: #43c879;
}
.my-plan-inline-status.is-pending {
  color: #e9a328;
}
.my-plan-inline-status.is-refunded {
  color: #8ea0b4;
}

.my-plan-management {
  margin-bottom: 18px;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 24px !important;
}
.my-plan-management-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--yt-red) 7%, var(--panel)),
    var(--panel)
  );
}
.my-plan-management-head h2 {
  margin: 4px 0 0;
  font-size: 21px;
}
.my-plan-provider-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg3);
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.my-plan-management-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}
.my-plan-management-list {
  padding: 10px 24px;
}
.my-plan-management-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.my-plan-management-list > div:last-child {
  border-bottom: 0;
}
.my-plan-management-list span {
  color: var(--ink-3);
}
.my-plan-management-list strong {
  text-align: right;
  font-size: 12px;
}
.my-plan-management-list strong.is-positive {
  color: #45c977;
}
.my-plan-management-list strong.is-neutral {
  color: var(--ink-2);
}
.my-plan-reference {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.my-plan-management-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
  padding: 24px;
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--yt-red) 3%, var(--bg2));
}
.my-plan-management-actions > .btn {
  width: 100%;
  justify-content: center;
}
.my-plan-cancel-copy strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}
.my-plan-cancel-copy p {
  margin: 0;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.6;
}
.my-plan-cancel-button,
.my-plan-cancel-confirm {
  justify-content: center;
  border-color: rgba(244, 63, 75, 0.42) !important;
  background: rgba(181, 18, 27, 0.1) !important;
  color: #ff7078 !important;
}
.my-plan-cancel-button:hover,
.my-plan-cancel-confirm:hover {
  border-color: #f43f4b !important;
  background: #b5121b !important;
  color: #fff !important;
}
.my-plan-renewal-off {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
}
.my-plan-renewal-off > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.09);
  color: #45c977;
  font-weight: 900;
}
.my-plan-renewal-off strong {
  display: block;
  font-size: 13px;
}
.my-plan-renewal-off p {
  margin: 4px 0 0;
  color: var(--ink-3);
  font-size: 10.5px;
  line-height: 1.55;
}

.my-plan-history {
  border: 1px solid var(--card-border);
  border-radius: 22px;
  background: var(--panel);
  overflow: hidden;
}
.my-plan-history > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 22px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.18s ease;
}
.my-plan-history > summary::-webkit-details-marker {
  display: none;
}
.my-plan-history > summary:hover {
  background: color-mix(in srgb, var(--yt-red) 5%, var(--panel));
}
.my-plan-history-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.my-plan-history-title > span:last-child {
  display: grid;
  gap: 3px;
}
.my-plan-history-title strong {
  font-size: 15px;
}
.my-plan-history-title small {
  color: var(--ink-3);
  font-size: 10px;
}
.my-plan-history-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--bg3);
}
.my-plan-history-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.my-plan-history-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.my-plan-history-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.2s ease;
}
.my-plan-history .when-open {
  display: none;
}
.my-plan-history[open] .when-closed {
  display: none;
}
.my-plan-history[open] .when-open {
  display: inline;
}
.my-plan-history[open] .my-plan-history-toggle svg {
  transform: rotate(180deg);
}
.my-plan-history-table {
  margin: 0 18px 18px;
  padding: 0 !important;
  border-radius: 16px !important;
  box-shadow: none !important;
}
.my-plan-history-table .table {
  margin: 0;
}
.my-plan-pagination {
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  margin: 0 18px 18px;
}
.my-plan-pagination [aria-disabled="true"] {
  opacity: 0.48;
  pointer-events: none;
}

body.my-plan-modal-open {
  overflow: hidden;
}
.my-plan-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 3, 5, 0.82);
  backdrop-filter: blur(10px);
  z-index: 2600;
}
.my-plan-modal.open {
  display: flex;
  animation: fadeIn 0.18s ease;
}
.my-plan-modal-card {
  position: relative;
  width: min(520px, 100%);
  padding: 30px;
  border: 1px solid color-mix(in srgb, var(--yt-red) 34%, var(--line));
  border-radius: 24px;
  outline: 0;
  background: linear-gradient(145deg, var(--panel), var(--bg2));
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: popIn 0.22s var(--ease);
}
.my-plan-modal-card h2 {
  margin: 8px 0 10px;
  font: 700 25px/1.2 var(--font-display);
}
.my-plan-modal-card > p {
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.7;
}
.my-plan-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg3);
  color: var(--ink-2);
  font-size: 22px;
  cursor: pointer;
}
.my-plan-modal-close:hover {
  border-color: var(--yt-red);
  color: var(--ink);
}
.my-plan-modal-symbol {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 16px;
  font: 800 24px/1 var(--font-display);
}
.my-plan-modal-symbol.is-warning {
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
  color: #f3a71f;
}
.my-plan-modal-symbol.is-danger {
  border: 1px solid rgba(244, 63, 75, 0.35);
  background: rgba(181, 18, 27, 0.12);
  color: #ff6872;
}
.my-plan-modal-note {
  display: grid;
  gap: 7px;
  margin: 18px 0 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg3);
}
.my-plan-modal-note strong {
  font-size: 11px;
}
.my-plan-modal-note span {
  position: relative;
  padding-left: 17px;
  color: var(--ink-3);
  font-size: 10.5px;
}
.my-plan-modal-note span::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #45c977;
  font-weight: 900;
}
.my-plan-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}
.my-plan-modal-actions .btn {
  justify-content: center;
}

.payment-thanks-page {
  min-height: calc(100vh - 140px);
  display: grid;
  align-items: center;
  padding: 90px 0;
}
.payment-thanks-card {
  position: relative;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 48px;
  overflow: hidden;
  border: 1px solid
    color-mix(in srgb, var(--yt-red-bright, var(--accent)) 36%, var(--line));
  border-radius: 30px;
  background: linear-gradient(145deg, var(--panel), var(--bg2));
  text-align: center;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.payment-thanks-card::before {
  content: "";
  position: absolute;
  inset: -170px auto auto 50%;
  width: 420px;
  height: 320px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 37, 46, 0.24), transparent 68%);
  pointer-events: none;
}
.payment-thanks-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  border: 1px solid rgba(34, 197, 94, 0.32);
  border-radius: 24px;
  background: linear-gradient(
    145deg,
    rgba(34, 197, 94, 0.18),
    rgba(34, 197, 94, 0.06)
  );
  color: #4bd17c;
  box-shadow: 0 16px 40px rgba(34, 197, 94, 0.12);
}
.payment-thanks-mark svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.payment-thanks-card .eyebrow {
  position: relative;
  justify-content: center;
}
.payment-thanks-card .display-title {
  position: relative;
  max-width: 620px;
  margin: 8px auto 13px;
  font-size: clamp(34px, 6vw, 58px);
}
.payment-thanks-card > .section-copy {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.75;
}
.payment-thanks-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 30px 0 22px;
  text-align: left;
}
.payment-thanks-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg3);
}
.payment-thanks-step > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-3);
  font: 800 11px/1 var(--font-mono);
}
.payment-thanks-step strong {
  display: block;
  font-size: 11px;
  line-height: 1.35;
}
.payment-thanks-step small {
  display: block;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 9px;
  line-height: 1.45;
}
.payment-thanks-step.is-complete {
  border-color: rgba(34, 197, 94, 0.26);
  background: rgba(34, 197, 94, 0.05);
}
.payment-thanks-step.is-complete > span {
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(34, 197, 94, 0.1);
  color: #45c977;
}
.payment-thanks-step.is-current {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.05);
}
.payment-thanks-step.is-current > span {
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(245, 158, 11, 0.1);
  color: #f3a71f;
}
.payment-thanks-help {
  position: relative;
  margin: 0;
  color: var(--ink-3);
  font-size: 11px;
}
.payment-thanks-actions {
  position: relative;
  justify-content: center;
  margin-top: 20px;
}

[data-theme="light"] .my-plan-hero,
[data-theme="light"] .my-plan-detail-card,
[data-theme="light"] .my-plan-modal-card,
[data-theme="light"] .payment-thanks-card {
  box-shadow:
    0 18px 46px rgba(99, 22, 29, 0.1),
    inset 0 1px 0 #fff;
}
[data-theme="light"] .my-plan-status.is-active {
  color: #168443;
}
[data-theme="light"] .my-plan-status.is-cancelled {
  color: #5f6b7a;
}
[data-theme="light"] .my-plan-inline-status.is-paid,
[data-theme="light"] .my-plan-management-list strong.is-positive {
  color: #137d39;
}
[data-theme="light"] .my-plan-verification {
  background: linear-gradient(135deg, #fff8e8, #fff);
}

@media (max-width: 1050px) {
  .my-plan-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .my-plan-management-body {
    grid-template-columns: 1fr;
  }
  .my-plan-management-actions {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}
@media (max-width: 780px) {
  .my-plan-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .my-plan-header > .btn {
    width: 100%;
    justify-content: center;
  }
  .my-plan-verification {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .my-plan-verification > .btn {
    grid-column: 1/-1;
    width: 100%;
    justify-content: center;
  }
  .my-plan-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .my-plan-primary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }
  .payment-thanks-card {
    padding: 34px 22px;
  }
  .payment-thanks-steps {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 580px) {
  .my-plan-detail-grid {
    grid-template-columns: 1fr;
  }
  .my-plan-summary {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 13px;
  }
  .my-plan-logo {
    width: 54px;
    height: 54px;
    border-radius: 17px;
  }
  .my-plan-logo svg {
    width: 27px;
    height: 27px;
  }
  .my-plan-label-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .my-plan-primary-actions {
    grid-template-columns: 1fr;
  }
  .my-plan-management-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }
  .my-plan-management-list,
  .my-plan-management-actions {
    padding: 18px;
  }
  .my-plan-management-list > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .my-plan-management-list strong {
    text-align: left;
  }
  .my-plan-history > summary {
    padding: 16px;
  }
  .my-plan-history-toggle > span {
    display: none !important;
  }
  .my-plan-history-table {
    margin: 0 10px 10px;
  }
  .my-plan-pagination {
    justify-content: center;
    flex-wrap: wrap;
    margin: 0 10px 14px;
  }
  .my-plan-modal {
    padding: 12px;
    align-items: flex-end;
  }
  .my-plan-modal-card {
    padding: 25px 20px 20px;
    border-radius: 24px 24px 18px 18px;
  }
  .my-plan-modal-actions {
    grid-template-columns: 1fr;
  }
  .payment-thanks-page {
    padding: 55px 0;
  }
}

/* =====================================================================
   Dashboard plan label + professional account profile
   ===================================================================== */
.dashboard-plan-name {
  display: inline-block;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  color: #ffdf00 !important;
  -webkit-text-fill-color: currentColor !important;
  background: none !important;
}
[data-theme="light"] .dashboard-plan-name {
  color: var(--yt-red, #b5121b) !important;
}

.account-profile-page {
  display: grid;
  gap: 22px;
}
.account-profile-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 30px;
  overflow: hidden;
  border: 1px solid
    color-mix(in srgb, var(--yt-red, #b5121b) 34%, var(--card-border));
  border-radius: 28px;
  background:
    radial-gradient(circle at 10% 0, rgba(244, 37, 46, 0.22), transparent 34%),
    linear-gradient(145deg, var(--panel), var(--bg2));
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.account-profile-hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -90px;
  bottom: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 223, 0, 0.14), transparent 68%);
  pointer-events: none;
}
.account-profile-identity {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}
.account-profile-avatar {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 26px;
  background: linear-gradient(
    145deg,
    var(--yt-red-dark, #760008),
    var(--yt-red, #b5121b)
  );
  color: #fff;
  font: 800 30px/1 var(--font-display);
  letter-spacing: -0.04em;
  box-shadow: 0 18px 40px rgba(181, 18, 27, 0.28);
  overflow: hidden;
}
.account-profile-copy {
  min-width: 0;
}
.account-profile-copy .eyebrow {
  margin-bottom: 5px;
}
.account-profile-copy h1 {
  margin: 0;
  font: 800 clamp(26px, 4vw, 38px)/1.1 var(--font-display);
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}
.account-profile-copy > p {
  margin: 8px 0 0;
  color: var(--ink-3);
  font-size: 13px;
}
.account-profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.account-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg3) 88%, transparent);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.account-profile-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #45c977;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}
.account-profile-badge.is-plan {
  border-color: rgba(255, 223, 0, 0.28);
  color: #ffdf00;
}
[data-theme="light"] .account-profile-badge.is-plan {
  color: var(--yt-red, #b5121b);
}
.account-profile-completion {
  position: relative;
  z-index: 1;
  width: min(290px, 100%);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.13);
  backdrop-filter: blur(10px);
}
[data-theme="light"] .account-profile-completion {
  background: rgba(255, 255, 255, 0.72);
}
.account-profile-completion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.account-profile-completion-head strong {
  font-size: 12px;
}
.account-profile-completion-head span {
  font: 800 15px/1 var(--font-mono);
  color: #ffdf00;
}
[data-theme="light"] .account-profile-completion-head span {
  color: var(--yt-red, #b5121b);
}
.account-profile-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line-soft);
}
.account-profile-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--yt-red-dark, #760008),
    var(--yt-red, #b5121b),
    #ffdf00
  );
}
.account-profile-completion p {
  margin: 9px 0 0;
  color: var(--ink-3);
  font-size: 10px;
  line-height: 1.5;
}

.account-profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.account-profile-stat {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: var(--panel);
}
.account-profile-stat-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(181, 18, 27, 0.25);
  border-radius: 14px;
  background: rgba(181, 18, 27, 0.08);
  color: var(--readable-accent-text);
}
.account-profile-stat-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account-profile-stat small {
  display: block;
  color: var(--ink-3);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.account-profile-stat strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.account-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.85fr);
  gap: 20px;
  align-items: start;
}
.account-profile-main,
.account-profile-side {
  display: grid;
  gap: 20px;
}
.account-section {
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.08);
}
.account-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(181, 18, 27, 0.07), transparent 52%);
}
.account-section-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.account-section-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid rgba(181, 18, 27, 0.24);
  border-radius: 13px;
  background: rgba(181, 18, 27, 0.08);
  color: var(--readable-accent-text);
}
.account-section-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account-section-head h2 {
  margin: 0;
  font: 700 17px/1.25 var(--font-display);
}
.account-section-head p {
  margin: 4px 0 0;
  color: var(--ink-3);
  font-size: 10px;
  line-height: 1.5;
}
.account-section-body {
  padding: 22px;
}
.account-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}
.account-form-grid .field.is-wide {
  grid-column: 1/-1;
}
.account-field-note {
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 9.5px;
  line-height: 1.45;
}
.account-readonly {
  position: relative;
}
.account-readonly .input {
  padding-right: 92px;
  opacity: 0.82;
}
.account-readonly-badge {
  position: absolute;
  right: 10px;
  top: 39px;
  padding: 4px 8px;
  border: 1px solid rgba(34, 197, 94, 0.26);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.08);
  color: #45c977;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.account-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.account-form-actions p {
  margin: 0;
  color: var(--ink-3);
  font-size: 10px;
}
.account-form-actions .btn {
  justify-content: center;
}
.account-error {
  margin-top: 6px;
  color: #ff737b;
  font-size: 10px;
  font-weight: 700;
}
.account-form-alert {
  margin-bottom: 16px;
  padding: 11px 13px;
  border: 1px solid rgba(244, 63, 75, 0.34);
  border-radius: 12px;
  background: rgba(181, 18, 27, 0.08);
  color: #ff8990;
  font-size: 11px;
}

.account-security-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.account-security-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg3);
}
.account-security-item span {
  color: var(--ink-3);
  font-size: 10px;
}
.account-security-item strong {
  font-size: 11px;
  text-align: right;
}
.account-password-help {
  margin: -5px 0 15px;
  color: var(--ink-3);
  font-size: 9.5px;
  line-height: 1.55;
}
.account-password-help strong {
  color: var(--ink-2);
}

.account-danger-section {
  border-color: rgba(244, 63, 75, 0.28);
}
.account-danger-section .account-section-head {
  background: linear-gradient(90deg, rgba(181, 18, 27, 0.13), transparent 58%);
}
.account-danger-copy {
  padding: 14px;
  border: 1px solid rgba(244, 63, 75, 0.22);
  border-radius: 15px;
  background: rgba(181, 18, 27, 0.06);
}
.account-danger-copy strong {
  display: block;
  color: #ff737b;
  font-size: 12px;
}
.account-danger-copy p {
  margin: 6px 0 0;
  color: var(--ink-3);
  font-size: 10px;
  line-height: 1.6;
}
.account-delete-list {
  display: grid;
  gap: 7px;
  margin: 15px 0;
}
.account-delete-list span {
  position: relative;
  padding-left: 18px;
  color: var(--ink-3);
  font-size: 10px;
}
.account-delete-list span::before {
  content: "×";
  position: absolute;
  left: 0;
  color: #ff737b;
  font-weight: 900;
}
.account-delete-button {
  width: 100%;
  justify-content: center;
  border-color: rgba(244, 63, 75, 0.48) !important;
  background: rgba(181, 18, 27, 0.12) !important;
  color: #ff737b !important;
}
.account-delete-button:hover {
  background: #b5121b !important;
  color: #fff !important;
}

.account-delete-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(3, 3, 5, 0.84);
  backdrop-filter: blur(10px);
  z-index: 2700;
}
.account-delete-modal.open {
  display: flex;
  animation: fadeIn 0.18s ease;
}
.account-delete-dialog {
  position: relative;
  width: min(540px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(244, 63, 75, 0.34);
  border-radius: 24px;
  background: linear-gradient(145deg, var(--panel), var(--bg2));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
}
.account-delete-dialog h2 {
  margin: 8px 0 8px;
  font: 700 24px/1.2 var(--font-display);
}
.account-delete-dialog > p {
  margin: 0 0 18px;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.65;
}
.account-delete-dialog .account-section-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(181, 18, 27, 0.12);
  color: #ff737b;
}
.account-delete-dialog .account-section-icon svg {
  width: 24px;
  height: 24px;
}
.account-delete-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.account-delete-modal-actions .btn {
  justify-content: center;
}
body.account-delete-modal-open {
  overflow: hidden;
}

[data-theme="light"] .account-profile-hero,
[data-theme="light"] .account-section {
  box-shadow:
    0 18px 46px rgba(99, 22, 29, 0.09),
    inset 0 1px 0 #fff;
}
[data-theme="light"] .account-profile-stat-icon,
[data-theme="light"] .account-section-icon {
  color: var(--yt-red, #b5121b);
}
[data-theme="light"] .account-profile-badge i {
  background: #168443;
}

@media (max-width: 1050px) {
  .account-profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .account-profile-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .account-profile-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .account-profile-completion {
    width: 100%;
  }
  .account-profile-stats {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .account-profile-identity {
    align-items: flex-start;
  }
  .account-profile-avatar {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
    border-radius: 21px;
    font-size: 24px;
  }
  .account-profile-stats {
    grid-template-columns: 1fr;
  }
  .account-form-grid {
    grid-template-columns: 1fr;
  }
  .account-form-grid .field.is-wide {
    grid-column: auto;
  }
  .account-section-head,
  .account-section-body {
    padding: 18px;
  }
  .account-form-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .account-form-actions .btn {
    width: 100%;
  }
  .account-delete-modal {
    align-items: flex-end;
    padding: 10px;
  }
  .account-delete-dialog {
    padding: 22px 18px;
    border-radius: 24px 24px 16px 16px;
  }
  .account-delete-modal-actions {
    grid-template-columns: 1fr;
  }
}

.my-plan-modal-losses {
  display: grid;
  gap: 7px;
  margin-top: 17px;
  padding: 15px;
  border: 1px solid rgba(244, 63, 75, 0.25);
  border-radius: 16px;
  background: rgba(181, 18, 27, 0.07);
}
.my-plan-modal-losses strong {
  font-size: 11px;
  color: #ff737b;
}
.my-plan-modal-losses span {
  position: relative;
  padding-left: 18px;
  color: var(--ink-3);
  font-size: 10.5px;
  line-height: 1.45;
}
.my-plan-modal-losses span::before {
  content: "×";
  position: absolute;
  left: 0;
  color: #ff737b;
  font-weight: 900;
}
.account-profile-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Ranking limits, custom Top-N selector and 500-row pagination */
.rank-limit-field {
  position: relative;
}
.rank-limit-picker {
  position: relative;
  min-width: 170px;
}
.rank-limit-trigger {
  width: 100%;
  min-width: 170px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  appearance: none;
  background: var(--bg) !important;
  border: 2px solid var(--line) !important;
  color: var(--ink) !important;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
}
.rank-limit-trigger:hover {
  background: var(--bg) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}
.rank-limit-trigger:focus,
.rank-limit-trigger:focus-visible,
.rank-limit-picker.open .rank-limit-trigger {
  background: var(--bg) !important;
  border-color: var(--accent) !important;
  color: var(--ink) !important;
  outline: none;
  box-shadow: 0 0 0 4px var(--signal-glow) !important;
}
.rank-limit-trigger em,
.rank-limit-option em {
  color: var(--yellow);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
[data-theme="light"] .rank-limit-trigger em,
[data-theme="light"] .rank-limit-option em {
  color: var(--yt-red-dark);
}
.rank-limit-chevron {
  margin-left: auto;
  color: var(--ink-3);
  transition: transform 0.18s ease;
}
.rank-limit-picker.open .rank-limit-chevron {
  transform: rotate(180deg);
}
.rank-limit-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 7px);
  left: 0;
  width: max(100%, 220px);
  max-height: 320px;
  padding: 7px;
  overflow-y: auto;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow);
}
.rank-limit-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 10px;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: var(--ink) !important;
  box-shadow: none !important;
  font: 400 14px var(--font-body);
  text-align: left;
  cursor: pointer;
}
.rank-limit-option:hover,
.rank-limit-option:focus,
.rank-limit-option:focus-visible,
.rank-limit-option[aria-selected="true"] {
  border: 0 !important;
  background: transparent !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}
.rank-limit-option b {
  margin-left: auto;
  font-size: 14px;
  line-height: 1;
  opacity: 1;
}
.rank-limit-option.is-locked {
  opacity: 0.78;
}
[data-theme="light"] .rank-limit-trigger,
[data-theme="light"] .rank-limit-trigger:hover,
[data-theme="light"] .rank-limit-trigger:focus,
[data-theme="light"] .rank-limit-trigger:focus-visible,
[data-theme="light"] .rank-limit-picker.open .rank-limit-trigger {
  background: var(--panel-2) !important;
  color: var(--ink) !important;
}
[data-theme="light"] .rank-limit-menu {
  background: var(--panel-2);
}
[data-theme="light"] .rank-limit-option,
[data-theme="light"] .rank-limit-option:hover,
[data-theme="light"] .rank-limit-option:focus,
[data-theme="light"] .rank-limit-option:focus-visible,
[data-theme="light"] .rank-limit-option[aria-selected="true"] {
  border: 0 !important;
  background: transparent !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}
.rank-limit-menu[hidden],
.rank-pagination[hidden],
.rank-public-limit[hidden] {
  display: none !important;
}
.rank-table-shell {
  scroll-margin-top: 90px;
}
.rank-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
}
.rank-page-summary {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
}
.rank-page-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.rank-page-button {
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink-2);
  cursor: pointer;
  font: 700 12px var(--font-body);
}
.rank-page-button:hover,
.rank-page-button.active {
  border-color: var(--yt-red);
  background: var(--yt-red-dark);
  color: #fff;
}
.rank-page-gap {
  padding: 0 2px;
  color: var(--ink-3);
}
.rank-public-limit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  margin-top: 0;
  margin-bottom: 50px;
  padding: 18px;
  border: 1px solid var(--yellow);
  border-radius: 15px;
  background: linear-gradient(
    135deg,
    var(--yt-red-deep),
    var(--yt-red-dark) 58%,
    var(--yt-red)
  );
  color: #fff;
  box-shadow: var(--shadow);
}
.rank-public-limit-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 22px;
}
.rank-public-limit strong {
  display: block;
  color: var(--yellow);
  font: 800 16px var(--font-display);
}
.rank-public-limit p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  line-height: 1.55;
}
.rank-public-limit .btn {
  white-space: nowrap;
}
.rank-table .rank-analyze-button {
  background: linear-gradient(
    135deg,
    var(--yt-red-deep),
    var(--yt-red-dark) 58%,
    var(--yt-red)
  ) !important;
  border: 1px solid #fff;
  color: #fff !important;
  box-shadow: none;
}
.rank-table .rank-analyze-button:hover {
  border-color: var(--yellow);
  color: var(--yellow) !important;
}
@media (max-width: 720px) {
  .rank-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
  .rank-page-buttons {
    justify-content: flex-start;
  }
  .rank-public-limit {
    grid-template-columns: auto 1fr;
  }
  .rank-public-limit .btn {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }
}

/* ================= PROFESSIONAL CHECKOUT ================= */
.checkout-pro {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 120px);
  padding: 4px 0 54px;
}
.checkout-pro::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -28px -28px auto;
  height: 560px;
  pointer-events: none;
  opacity: 0.6;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(
      circle at 16% 2%,
      rgba(124, 92, 255, 0.18),
      transparent 32%
    ),
    radial-gradient(
      circle at 88% 16%,
      rgba(21, 170, 191, 0.13),
      transparent 30%
    );
  background-size:
    44px 44px,
    44px 44px,
    auto,
    auto;
  mask-image: linear-gradient(to bottom, #000 64%, transparent);
}
.checkout-pro-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}
.checkout-back-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 22px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}
.checkout-back-link:hover {
  color: var(--yellow);
}
.checkout-kicker {
  margin-bottom: 7px;
  color: var(--yellow);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.checkout-pro-head h1 {
  margin: 0;
  color: var(--ink);
  font: 850 clamp(24px, 3vw, 36px)/1.1 var(--font-display);
  letter-spacing: -0.035em;
}
.checkout-pro-head p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.6;
}
.checkout-secure-heading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 11px 15px;
  border: 1px solid color-mix(in srgb, var(--green) 42%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg3) 90%, var(--green) 10%);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.checkout-secure-heading span {
  font-size: 20px;
}
.checkout-secure-heading strong {
  font: 800 15px var(--font-display);
}
.checkout-pro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 370px);
  gap: 24px;
  align-items: start;
}
.checkout-pro-main,
.checkout-pro-side {
  min-width: 0;
}
.checkout-payment-shell {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--bg3) 94%, #7c5cff 6%),
    var(--bg3)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 24px 55px rgba(0, 0, 0, 0.13);
}
.checkout-payment-shell::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -150px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}
.checkout-section-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}
.checkout-section-heading > div > span {
  display: block;
  margin-bottom: 5px;
  color: var(--yellow);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.checkout-section-heading h2 {
  margin: 0;
  color: var(--ink);
  font: 800 19px var(--font-display);
}
.checkout-region-pill {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.checkout-method-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.checkout-method-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 25px;
  align-items: center;
  gap: 12px;
  min-height: 118px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}
.checkout-method-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--yellow) 66%, var(--line));
}
.checkout-method-card.is-active {
  border-color: var(--yellow);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--bg) 88%, var(--yellow) 12%),
    var(--bg)
  );
  box-shadow:
    0 0 0 1px var(--yellow) inset,
    0 14px 28px rgba(0, 0, 0, 0.12);
}
.checkout-method-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -42px auto;
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--yellow) 14%, transparent),
    transparent 68%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
}
.checkout-method-card.is-active::after {
  opacity: 1;
}
.checkout-method-brand {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: -0.03em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.checkout-method-brand.is-paypal {
  background: linear-gradient(145deg, #f7f9ff, #dce8ff);
  color: #003087;
  font-size: 11px;
}
.checkout-method-brand.is-crypto {
  background: linear-gradient(145deg, #ffb52d, #f7931a);
  color: #fff;
  font-size: 24px;
}
.checkout-method-brand.is-upi {
  background: linear-gradient(145deg, #fff, #e9f6ee);
  color: #09783e;
  font-size: 11px;
}
.checkout-method-brand.is-card {
  background: linear-gradient(145deg, #1f4ea8, #112b67);
  color: #fff;
  font-size: 20px;
}
.checkout-method-copy {
  display: grid;
  min-width: 0;
}
.checkout-method-copy small {
  color: var(--ink-3);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.checkout-method-copy strong {
  margin-top: 3px;
  color: var(--ink);
  font: 850 15px var(--font-display);
}
.checkout-method-copy span {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 5px;
  color: var(--ink-3);
  font-size: 10px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.checkout-method-check {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg3);
  color: transparent;
  font-size: 12px;
  font-weight: 950;
  transition: 0.2s ease;
}
.checkout-method-card.is-active .checkout-method-check {
  border-color: var(--yellow);
  background: var(--yellow);
  color: #161000;
}
.checkout-error {
  position: relative;
  z-index: 1;
  margin: 15px 0 0;
}
.checkout-method-panels {
  position: relative;
  z-index: 1;
}
.checkout-payment-panel {
  scroll-margin-top: 90px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--yellow) 62%, var(--line));
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 0%, rgba(234, 179, 8, 0.08), transparent 32%),
    linear-gradient(
      145deg,
      var(--bg),
      color-mix(in srgb, var(--bg) 95%, #7c5cff 5%)
    );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.checkout-payment-panel[hidden] {
  display: none !important;
}
.checkout-payment-panel.is-visible {
  animation: checkoutPanelIn 0.24s ease both;
}
@keyframes checkoutPanelIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.checkout-payment-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 17px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.checkout-payment-panel-head span:first-child {
  display: block;
  margin-bottom: 4px;
  color: var(--yellow);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.checkout-payment-panel-head h3 {
  margin: 0;
  color: var(--ink);
  font: 800 17px var(--font-display);
}
.checkout-billing-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--green) 40%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg3) 88%, var(--green) 12%);
  color: var(--green);
  font-size: 9px !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase;
}
.checkout-paypal-stage {
  width: min(100%, 560px);
  margin-inline: auto;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg3) 88%, #fff 12%);
  text-align: center;
}
.checkout-paypal-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 126px;
  min-height: 43px;
  padding: 8px 18px;
  border-radius: 10px;
  background: #ffc439;
  color: #003087;
  font: italic 900 24px/1 var(--font-display);
  letter-spacing: -0.05em;
  box-shadow: 0 8px 22px rgba(0, 48, 135, 0.14);
}
.checkout-paypal-stage > p {
  max-width: 470px;
  margin: 14px auto;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.55;
}
.checkout-provider-points {
  display: grid;
  gap: 7px;
  max-width: 480px;
  margin: 0 auto 18px;
  padding: 0;
  list-style: none;
  text-align: left;
}
.checkout-provider-points li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-2);
  font-size: 10px;
  line-height: 1.5;
}
.checkout-provider-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 950;
}
.checkout-paypal-button {
  width: min(100%, 390px);
  min-height: 55px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-inline: auto;
  padding: 10px 14px;
  border: 1px solid #fff;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffd65b, #ffc439);
  color: #111827;
  cursor: pointer;
  box-shadow:
    0 12px 26px rgba(255, 196, 57, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.checkout-paypal-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 17px 32px rgba(255, 196, 57, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.checkout-paypal-button span {
  color: #fff;
  font: italic 900 17px var(--font-display);
}
.checkout-paypal-button strong {
  font: 850 12px var(--font-body);
  text-align: center;
}
.checkout-paypal-button b {
  font-size: 24px;
  line-height: 1;
}
.checkout-provider-stage {
  display: grid;
  gap: 15px;
}
.checkout-provider-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 620px;
  margin-inline: auto;
}
.checkout-provider-intro strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}
.checkout-provider-intro p {
  margin: 4px 0 0;
  color: var(--ink-3);
  font-size: 10px;
  line-height: 1.5;
}
.checkout-provider-code {
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #fff;
}
.checkout-provider-code iframe {
  display: block;
  max-width: 100% !important;
}
.checkout-verification-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 620px;
  margin-inline: auto;
  padding: 11px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--bg3);
}
.checkout-verification-note p {
  margin: 0;
  color: var(--ink-3);
  font-size: 10px;
  line-height: 1.5;
}
.checkout-provider-strip {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
}
.checkout-provider-strip > span {
  color: var(--ink-3);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  white-space: nowrap;
}
.checkout-provider-strip > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.checkout-provider-strip b {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #1f2937;
  font-size: 10px;
  font-weight: 950;
}
.checkout-provider-strip b.is-paypal {
  color: #003087;
}
.checkout-provider-strip b.is-upi {
  color: #087a3f;
}
.checkout-provider-strip b.is-crypto {
  background: #f7931a;
  color: #fff;
}
.checkout-provider-strip b.is-card {
  color: #173b82;
}
.checkout-security-note {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 13px;
}
.checkout-security-note span {
  color: var(--green);
}
.checkout-security-note p,
.checkout-legal {
  margin: 0;
  color: var(--ink-3);
  font-size: 10px;
  line-height: 1.55;
}
.checkout-legal {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.checkout-legal a {
  color: var(--cyan);
  font-weight: 750;
}
.checkout-pro-side {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 12px;
}
.checkout-plan-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--yellow) 52%, var(--line));
  border-radius: 20px;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--bg3) 88%, #7c5cff 12%),
    color-mix(in srgb, var(--bg3) 91%, #15aabf 9%)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 20px 45px rgba(0, 0, 0, 0.14);
  text-align: center;
}
.checkout-plan-card-glow {
  position: absolute;
  inset: -90px -85px auto auto;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(234, 179, 8, 0.18), transparent 68%);
  pointer-events: none;
}
.checkout-plan-card > span {
  position: relative;
  display: block;
  color: var(--ink-3);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.checkout-plan-card h2 {
  position: relative;
  margin: 7px 0 12px;
  color: var(--ink);
  font: 850 23px var(--font-display);
}
.checkout-price-row {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}
.checkout-price-row strong {
  color: var(--yellow);
  font: 900 clamp(28px, 4vw, 38px) var(--font-display);
  letter-spacing: -0.04em;
}
.checkout-price-row small {
  color: var(--ink-3);
  font-size: 9px;
  font-weight: 900;
}
.checkout-offer-row {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}
.checkout-offer-row span {
  color: var(--ink-3);
  font-size: 11px;
  text-decoration: line-through;
}
.checkout-offer-row b {
  padding: 4px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 18%, transparent);
  color: var(--green);
  font-size: 9px;
}
.checkout-plan-facts {
  position: relative;
  display: grid;
  gap: 0;
  margin-top: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  text-align: left;
}
.checkout-plan-facts div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
}
.checkout-plan-facts div + div {
  border-top: 1px solid var(--line-soft);
}
.checkout-plan-facts span {
  color: var(--ink-3);
  font-size: 9px;
}
.checkout-plan-facts strong {
  color: var(--ink);
  font-size: 9px;
  text-align: right;
}
.checkout-trust-stack {
  display: grid;
  gap: 9px;
}
.checkout-trust-stack article {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--bg3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.checkout-trust-stack article > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--cyan) 30%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 86%, var(--cyan) 14%);
  font-size: 18px;
}
.checkout-trust-stack strong {
  display: block;
  color: var(--ink);
  font: 800 12px var(--font-display);
}
.checkout-trust-stack p {
  margin: 3px 0 0;
  color: var(--ink-3);
  font-size: 9px;
  line-height: 1.45;
}
.checkout-confidence-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg3);
}
.checkout-confidence-card h3 {
  margin: 0 0 14px;
  color: var(--ink);
  font: 800 13px var(--font-display);
}
.checkout-confidence-card > div {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}
.checkout-confidence-card > div + div {
  margin-top: 11px;
}
.checkout-confidence-card > div > span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: color-mix(in srgb, var(--yellow) 16%, transparent);
  color: var(--yellow);
  font-size: 10px;
  font-weight: 950;
}
.checkout-confidence-card p {
  margin: 0;
}
.checkout-confidence-card strong {
  display: block;
  color: var(--ink);
  font-size: 10px;
}
.checkout-confidence-card small {
  display: block;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 9px;
  line-height: 1.45;
}
.checkout-free-state {
  min-height: 390px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}
.checkout-free-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--green) 50%, var(--line));
  border-radius: 22px;
  background: color-mix(in srgb, var(--bg3) 82%, var(--green) 18%);
  color: var(--green);
  font-size: 31px;
  font-weight: 950;
}
.checkout-free-state h2 {
  margin: 0;
  color: var(--ink);
  font: 850 25px var(--font-display);
}
.checkout-free-state p {
  max-width: 510px;
  margin: 9px auto 18px;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.6;
}
.checkout-free-button {
  min-width: 230px;
  justify-content: center;
}
.checkout-empty-state {
  min-height: 320px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 17px;
  max-width: 620px;
  margin-inline: auto;
}
.checkout-empty-state > span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--yellow);
  border-radius: 17px;
  background: color-mix(in srgb, var(--bg3) 82%, var(--yellow) 18%);
  color: var(--yellow);
  font-size: 25px;
  font-weight: 950;
}
.checkout-empty-state h2 {
  margin: 0;
  color: var(--ink);
  font: 800 20px var(--font-display);
}
.checkout-empty-state p {
  margin: 7px 0 15px;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.55;
}
[data-theme="light"] .checkout-pro::before {
  opacity: 0.45;
  background:
    linear-gradient(rgba(76, 28, 35, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 28, 35, 0.04) 1px, transparent 1px),
    radial-gradient(
      circle at 16% 2%,
      rgba(124, 92, 255, 0.12),
      transparent 32%
    ),
    radial-gradient(circle at 88% 16%, rgba(21, 170, 191, 0.1), transparent 30%);
  background-size:
    44px 44px,
    44px 44px,
    auto,
    auto;
}
[data-theme="light"] .checkout-payment-shell,
[data-theme="light"] .checkout-plan-card,
[data-theme="light"] .checkout-trust-stack article,
[data-theme="light"] .checkout-confidence-card {
  box-shadow: 0 16px 36px rgba(76, 28, 35, 0.08);
}
@media (max-width: 1080px) {
  .checkout-pro-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}
@media (max-width: 900px) {
  .checkout-pro-head {
    align-items: flex-start;
  }
  .checkout-pro-grid {
    grid-template-columns: 1fr;
  }
  .checkout-pro-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .checkout-plan-card {
    grid-row: span 2;
  }
}
@media (max-width: 680px) {
  .checkout-pro {
    padding-bottom: 30px;
  }
  .checkout-pro-head {
    flex-direction: column;
    gap: 14px;
  }
  .checkout-back-link {
    margin-bottom: 16px;
  }
  .checkout-secure-heading {
    align-self: stretch;
    justify-content: center;
  }
  .checkout-payment-shell {
    padding: 16px;
    border-radius: 18px;
  }
  .checkout-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .checkout-method-grid {
    grid-template-columns: 1fr;
  }
  .checkout-method-card {
    min-height: 106px;
  }
  .checkout-payment-panel {
    padding: 14px;
  }
  .checkout-payment-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .checkout-provider-strip {
    align-items: flex-start;
    flex-direction: column;
  }
  .checkout-pro-side {
    grid-template-columns: 1fr;
  }
  .checkout-plan-card {
    grid-row: auto;
  }
}
@media (max-width: 440px) {
  .checkout-method-card {
    grid-template-columns: 42px minmax(0, 1fr) 22px;
    padding: 13px;
  }
  .checkout-method-brand {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
  .checkout-paypal-stage {
    padding: 17px 12px;
  }
  .checkout-paypal-button {
    grid-template-columns: 1fr auto;
  }
  .checkout-paypal-button span {
    display: none;
  }
  .checkout-provider-code {
    padding: 8px;
  }
}

/* ---- AI content studio (home) ---- */
.ai-studio-list {
  list-style: none;
  margin: 20px 0 24px;
  padding: 0;
  display: grid;
  gap: 11px;
}
.ai-studio-list li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.6;
}
.ai-studio-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-size: 13px;
}
.ai-studio-list strong {
  color: var(--ink);
}
