:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --panel: #151923;
  --panel-2: #202635;
  --line: #30384a;
  --text: #f7f8fb;
  --muted: #a7b2c7;
  --accent: #7c5cff;
  --accent-2: #29d3b2;
  --green: #18d58b;
  --red: #ff6b6b;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.32);
}

.language-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  color: #aeb7c8;
  font-size: 0.76rem;
  font-weight: 800;
}

.language-picker select {
  min-height: 32px;
  border: 1px solid #343b49;
  border-radius: 7px;
  background: #1d2431;
  color: #f7f8fb;
  padding: 4px 8px;
  font: inherit;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(124, 92, 255, 0.14), transparent 28rem),
    radial-gradient(circle at 82% 14%, rgba(41, 211, 178, 0.12), transparent 24rem),
    var(--bg);
  color: var(--text);
}

.home-page {
  background:
    radial-gradient(circle at 82% 18%, rgba(39, 180, 255, 0.18), transparent 26rem),
    radial-gradient(circle at 18% 4%, rgba(124, 92, 255, 0.18), transparent 30rem),
    linear-gradient(135deg, #090a12 0%, #07131a 55%, #061c1b 100%);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.topbar,
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 950;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: white;
  filter: drop-shadow(0 12px 28px rgba(124, 92, 255, 0.28));
}

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

.brand-mark-bg {
  fill: url("#kzLogoGradient");
}

.brand-mark-play {
  fill: rgba(255, 255, 255, 0.28);
}

.brand-mark-k {
  fill: #fff;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 5.4vw, 5rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 840px;
}

.dashboard-actions {
  gap: 12px;
}

.header-status,
.header-nav,
.platform-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.header-status {
  padding-right: 4px;
}

.header-nav {
  padding: 3px;
  border: 1px solid rgba(48, 56, 74, 0.7);
  border-radius: 9px;
  background: rgba(11, 13, 18, 0.28);
}

.header-nav .button,
.platform-actions .button,
.logout-form button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.9rem;
}

.header-nav .button {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.header-nav .button:hover,
.header-nav .button:focus-visible {
  border-color: rgba(48, 56, 74, 0.9);
  color: var(--text);
}

.platform-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-color: rgba(48, 56, 74, 0.9);
  padding-inline: 9px;
}

.youtube-button {
  color: #ff7b7f;
}

.facebook-button {
  color: #75a7ff;
}

.twitch-button {
  color: #bf9cff;
  gap: 7px;
}

.platform-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.youtube-icon {
  width: 22px;
  height: 15px;
  border-radius: 5px;
  background: #ff0033;
}

.youtube-icon::before {
  content: "";
  margin-left: 2px;
  border-left: 6px solid #fff;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.facebook-icon {
  border-radius: 50%;
  background: #1877f2;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.twitch-logo {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.08));
}

.logout-form {
  margin: 0;
}

.signed-in-user {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.signed-in-user.online {
  color: var(--green);
}

.mode-badge {
  border: 1px solid rgba(25, 195, 125, 0.45);
  border-radius: 999px;
  color: var(--green);
  padding: 5px 9px;
  font-size: 0.82rem;
  font-weight: 900;
}

.mode-badge.live {
  border-color: rgba(139, 92, 246, 0.55);
  color: var(--accent);
}

.button,
button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--text);
  padding: 9px 12px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-action {
  border-color: rgba(24, 213, 139, 0.48);
  background: linear-gradient(135deg, #18d58b, #27b4ff);
  color: #07100d;
}

.secondary-action {
  background: transparent;
}

.button:hover,
button:hover {
  border-color: var(--accent);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 32px;
  align-items: center;
  min-height: 430px;
  padding: 34px 0 28px;
}

.home-hero {
  isolation: isolate;
  min-height: min(620px, calc(100vh - 120px));
  margin-top: 22px;
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid rgba(48, 56, 74, 0.72);
  border-radius: 16px;
  padding: clamp(32px, 5vw, 58px);
  background: #080b12;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: -2;
  background-image: url("/assets/kz-video-automation-hero.png");
  background-size: cover;
  background-position: 64% center;
  filter: blur(4px) saturate(0.82) contrast(0.98);
  opacity: 0.62;
  transform: scale(1.02);
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 73% 42%, rgba(39, 180, 255, 0.28), transparent 24rem),
    radial-gradient(circle at 92% 12%, rgba(41, 211, 178, 0.18), transparent 19rem),
    linear-gradient(90deg, rgba(7, 9, 17, 0.98) 0%, rgba(7, 9, 17, 0.9) 35%, rgba(7, 14, 24, 0.36) 68%, rgba(4, 14, 19, 0.58) 100%),
    linear-gradient(180deg, rgba(7, 10, 18, 0.34), rgba(7, 10, 18, 0.84));
}

.home-hero .hero-copy,
.home-hero .hero-visual {
  position: relative;
  z-index: 1;
}

.home-hero .eyebrow {
  color: #6be7ff;
}

.home-hero h1 {
  text-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
}

.home-hero .hero-copy p {
  color: #d7e2f4;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
}

.home-hero .automation-card {
  border-color: rgba(107, 231, 255, 0.28);
  background: rgba(8, 12, 22, 0.66);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.home-hero .pulse-ring {
  border-color: rgba(41, 211, 178, 0.32);
  background: radial-gradient(circle, rgba(41, 211, 178, 0.08), transparent 66%);
}

.hero-copy {
  display: grid;
  gap: 22px;
  max-width: 660px;
}

.hero-copy p {
  max-width: 620px;
  color: #c4cbda;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  min-height: 330px;
}

.automation-card {
  position: absolute;
  display: grid;
  gap: 8px;
  width: min(250px, 72%);
  border: 1px solid rgba(124, 92, 255, 0.22);
  border-radius: 8px;
  background: rgba(21, 25, 35, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 18px;
  animation: floatCard 6s ease-in-out infinite;
}

.automation-card span {
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.automation-card strong {
  font-size: 1.05rem;
}

.card-one {
  top: 30px;
  left: 8%;
}

.card-two {
  top: 118px;
  right: 3%;
  animation-delay: -1.6s;
}

.card-three {
  bottom: 32px;
  left: 18%;
  animation-delay: -3.2s;
}

.pulse-ring {
  position: absolute;
  inset: 44px 48px;
  border: 1px solid rgba(41, 211, 178, 0.28);
  border-radius: 999px;
  animation: pulseRing 4s ease-in-out infinite;
}

.value-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr);
  gap: 28px;
  align-items: start;
  margin: 8px 0 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 25, 35, 0.82);
  padding: 24px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.value-panel h2 {
  max-width: 460px;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1.04;
}

.value-panel p {
  color: var(--muted);
  line-height: 1.65;
}

.value-panel > div:first-child {
  display: grid;
  gap: 14px;
}

.value-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.value-steps article {
  display: grid;
  gap: 8px;
  min-height: 150px;
  border: 1px solid rgba(48, 56, 74, 0.9);
  border-radius: 8px;
  background: rgba(32, 38, 53, 0.72);
  padding: 16px;
}

.value-steps span {
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.value-steps strong {
  font-size: 1.05rem;
}

.dashboard-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  padding: 34px 0 22px;
  border-bottom: 1px solid rgba(48, 56, 74, 0.72);
}

.dashboard-intro > div:first-child {
  display: grid;
  gap: 10px;
}

.dashboard-intro h1 {
  font-size: clamp(2.2rem, 4.8vw, 4rem);
}

.dashboard-intro p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.dashboard-intro-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.mini-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border: 1px solid rgba(48, 56, 74, 0.86);
  border-radius: 8px;
  background: rgba(21, 25, 35, 0.76);
  padding: 7px 10px;
  cursor: pointer;
}

.mini-toggle span {
  display: grid;
  gap: 2px;
  min-width: 76px;
}

.mini-toggle strong {
  font-size: 0.78rem;
  line-height: 1;
}

.mini-toggle small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.15;
}

.mini-toggle input {
  width: 38px;
  height: 22px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  cursor: pointer;
  position: relative;
}

.mini-toggle input::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 160ms ease, background 160ms ease;
}

.mini-toggle input:checked {
  border-color: var(--green);
}

.mini-toggle input:checked::before {
  transform: translateX(16px);
  background: var(--green);
}

.mini-toggle input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.workflow-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: 16px 0 14px;
  border: 1px solid rgba(48, 56, 74, 0.72);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 900;
}

.workflow-arrow:hover,
.workflow-arrow:focus-visible {
  color: var(--text);
  border-color: var(--green);
  outline: none;
}

.workflow-arrow i {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease, color 160ms ease;
}

.workflow-arrow:hover i,
.workflow-arrow:focus-visible i {
  color: var(--green);
  transform: translateX(4px) rotate(45deg);
}

.workflow-slider {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.workflow-slider-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
}

.workflow-slider-head div {
  display: grid;
  justify-items: center;
  gap: 2px;
  color: var(--muted);
}

.workflow-slider-head span {
  color: var(--text);
  font-weight: 950;
}

.workflow-slider-head small {
  color: var(--muted);
  font-size: 0.78rem;
}

.slider-arrow {
  position: relative;
  width: 44px;
  min-height: 44px;
  border: 1px solid rgba(48, 56, 74, 0.72);
  border-radius: 999px;
  background: rgba(21, 25, 35, 0.22);
  padding: 0;
}

.slider-arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  color: var(--muted);
  transition: transform 160ms ease, color 160ms ease;
}

.slider-arrow-right::before {
  transform: translate(-65%, -50%) rotate(45deg);
}

.slider-arrow-left::before {
  transform: translate(-35%, -50%) rotate(225deg);
}

.slider-arrow:hover,
.slider-arrow:focus-visible {
  border-color: var(--green);
  outline: none;
}

.slider-arrow-right:hover::before,
.slider-arrow-right:focus-visible::before {
  color: var(--green);
  transform: translate(-45%, -50%) rotate(45deg);
}

.slider-arrow-left:hover::before,
.slider-arrow-left:focus-visible::before {
  color: var(--green);
  transform: translate(-55%, -50%) rotate(225deg);
}

.slider-arrow:disabled {
  opacity: 0.28;
}

.workflow-viewport {
  overflow: hidden;
  transition: height 220ms ease;
}

.workflow-track {
  display: flex;
  align-items: flex-start;
  transition: transform 260ms ease;
  will-change: transform;
}

.workflow-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.workflow-slide > .twitch-panel {
  margin-bottom: 0;
}

.slide-back-button {
  margin-top: 12px;
  background: transparent;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes pulseRing {
  0%, 100% {
    opacity: 0.28;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.03);
  }
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.customer-status-grid {
  grid-template-columns: 1.1fr 1fr 1.25fr 1fr;
}

.setup-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 25, 35, 0.88);
  padding: 14px;
}

.setup-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.setup-heading div {
  display: grid;
  gap: 3px;
}

.setup-heading h2 {
  font-size: 1.05rem;
}

.setup-heading p {
  color: var(--muted);
  font-size: 0.86rem;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) repeat(2, minmax(240px, 1fr));
  gap: 10px;
}

.setup-card {
  display: grid;
  align-content: space-between;
  gap: 10px;
  min-height: 112px;
  border: 1px solid rgba(48, 56, 74, 0.95);
  border-radius: 8px;
  background: rgba(11, 13, 18, 0.28);
  padding: 12px;
}

.setup-card span {
  color: var(--muted);
  font-size: 0.78rem;
}

.setup-card strong {
  line-height: 1.25;
  font-size: 0.95rem;
}

.brand-hashtag-control {
  display: grid;
  gap: 5px;
}

.brand-hashtag-control span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.brand-hashtag-control input {
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(48, 56, 74, 0.95);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--text);
  padding: 6px 9px;
  font: inherit;
  font-weight: 800;
}

.brand-hashtag-control input:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.platform-control {
  gap: 10px;
}

.platform-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.platform-card-top > div {
  display: grid;
  gap: 3px;
}

.platform-card-top small:not(.connection-status) {
  color: var(--muted);
}

.destination-note {
  margin-top: -4px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.drop-zone {
  display: grid;
  gap: 4px;
  place-items: center;
  min-height: 92px;
  margin-top: 0;
  border: 1px dashed #465063;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(21, 25, 35, 0.72), rgba(17, 21, 30, 0.82));
  color: var(--text);
  text-align: center;
  cursor: pointer;
  padding: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.drop-zone:hover,
.drop-zone.dragging,
.drop-zone:focus-visible {
  border-color: var(--green);
  outline: none;
}

.drop-zone strong {
  font-size: 1.02rem;
}

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

.rights-note {
  margin: -2px 0 0;
  max-width: 920px;
  color: #c6d0e2;
  font-size: 0.84rem;
  line-height: 1.45;
}

.rights-note::before {
  content: "Rights note: ";
  color: var(--accent-2);
  font-weight: 900;
}

.status,
.activity,
.switch-panel,
.twitch-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 25, 35, 0.92);
}

.status {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 18px;
}

.status span,
.job span,
.activity-head p {
  color: var(--muted);
  font-size: 0.86rem;
}

.status strong {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.connection-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  width: fit-content;
  font-weight: 800;
}

.connection-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.connection-status.connected {
  color: #ff5a5f;
  border-color: rgba(255, 90, 95, 0.45);
}

.connection-status.facebook.connected {
  color: #4c8dff;
  border-color: rgba(76, 141, 255, 0.45);
}

.usage-status {
  color: var(--muted);
  font-weight: 800;
}

.usage-status.warning {
  color: #ffd166;
}

.switch-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 14px;
}

.utility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.billing-panel {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #343b49;
  border-radius: 8px;
  background: rgba(21, 25, 35, 0.92);
  padding: 12px 14px;
  min-height: 74px;
}

.compact-status {
  border-color: rgba(48, 56, 74, 0.78);
  background: rgba(21, 25, 35, 0.72);
}

.activity.compact-status .activity-head {
  padding: 6px 11px;
}

.activity.compact-status .jobs .empty {
  padding: 6px 11px;
}

.activity.compact-status h2,
.billing-panel.compact-status h2 {
  font-size: 0.98rem;
}

.activity.compact-status p,
.billing-panel.compact-status p {
  font-size: 0.86rem;
}

.billing-panel.compact-status {
  min-height: 56px;
  padding: 10px 12px;
}

.billing-panel h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.billing-panel p {
  margin: 0;
  color: #aeb7c8;
  font-size: 0.9rem;
  line-height: 1.35;
}

.billing-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(21, 25, 35, 0.95), rgba(18, 28, 36, 0.82));
  padding: 18px;
}

.billing-hero div {
  display: grid;
  gap: 6px;
}

.billing-hero-actions {
  justify-items: end;
  text-align: right;
}

.billing-hero p {
  color: var(--muted);
}

.billing-hero h2 {
  font-size: 1.15rem;
}

.billing-hero-actions p {
  font-size: 0.9rem;
}

.billing-hero-actions button {
  min-height: 36px;
  padding: 8px 12px;
}

.billing-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.billing-actions.left {
  justify-content: flex-start;
}

.billing-panel .button,
.billing-panel button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.92rem;
}

.mini-list {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.billing-cycle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.billing-cycle button {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-height: 58px;
  padding: 10px 12px;
  text-align: left;
  background: rgba(18, 23, 33, 0.86);
}

.billing-cycle button.active {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(25, 195, 125, 0.18);
}

.billing-cycle strong {
  font-size: 0.98rem;
}

.billing-cycle span,
.price-note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.plan-card {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 20px;
}

.plan-card.featured {
  border-color: rgba(25, 195, 125, 0.7);
  box-shadow: inset 0 0 0 1px rgba(25, 195, 125, 0.18);
}

.plan-card.current {
  border-color: rgba(139, 92, 246, 0.75);
}

.plan-card span {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.plan-card strong {
  font-size: 1.35rem;
}

.plan-card .price-note {
  margin-top: -8px;
}

.plan-card p,
.plan-card li {
  color: var(--muted);
}

.plan-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.billing-summary-panel {
  gap: 14px;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.billing-summary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.billing-summary-list li {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.billing-summary-list strong {
  color: var(--text);
}

.donation-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  border: 1px solid rgba(32, 214, 180, 0.38);
  border-radius: 8px;
  background:
    radial-gradient(circle at 92% 18%, rgba(32, 214, 180, 0.15), transparent 34%),
    linear-gradient(135deg, rgba(18, 23, 33, 0.96), rgba(16, 27, 38, 0.86));
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.donation-panel h2 {
  margin-bottom: 5px;
  font-size: 1.3rem;
}

.donation-panel p {
  max-width: 720px;
  color: var(--muted);
}

.donation-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.donation-control {
  display: grid;
  gap: 10px;
  min-width: min(100%, 310px);
  justify-items: stretch;
}

.donation-button {
  min-width: 72px;
  min-height: 40px;
  border-color: rgba(32, 214, 180, 0.42);
}

.donation-button.active {
  color: var(--text);
  border-color: rgba(32, 214, 180, 0.82);
  box-shadow: inset 0 0 0 1px rgba(32, 214, 180, 0.2);
}

.donation-button.featured-donation.active {
  color: #05100e;
  border-color: transparent;
  background: linear-gradient(135deg, var(--green), var(--accent));
}

.donation-checkout {
  min-height: 38px;
  border-color: rgba(32, 214, 180, 0.48);
  background: rgba(32, 214, 180, 0.1);
}

.donation-note {
  grid-column: 1 / -1;
  margin-top: -8px;
  font-size: 0.85rem;
}

.support-copy {
  margin-top: 18px;
  font-size: 0.95rem;
}

.support-link {
  display: inline-flex;
  margin-top: 10px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 78px;
  padding: 16px;
  background: var(--panel);
}

.compact-switch {
  min-height: 40px;
  border: 1px solid rgba(48, 56, 74, 0.82);
  border-radius: 8px;
  background: rgba(32, 38, 53, 0.7);
  padding: 8px 10px;
}

.compact-switch span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.compact-switch input {
  width: 42px;
  height: 22px;
}

.compact-switch input::before {
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
}

.compact-switch input:checked::before {
  transform: translateX(20px);
}

.privacy-control {
  display: grid;
  gap: 5px;
}

.privacy-control span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.privacy-control select {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(48, 56, 74, 0.95);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--text);
  padding: 6px 9px;
  font: inherit;
  font-weight: 800;
  font-size: 0.88rem;
}

.privacy-control select:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.privacy-control select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.twitch-privacy-control {
  max-width: 320px;
}

.switch-row span {
  display: grid;
  gap: 5px;
}

.switch-row small {
  color: var(--muted);
}

.switch-row input {
  width: 48px;
  height: 26px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  cursor: pointer;
  position: relative;
}

.switch-row input::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 160ms ease, background 160ms ease;
}

.switch-row input:checked {
  border-color: var(--green);
}

.switch-row input:checked::before {
  transform: translateX(22px);
  background: var(--green);
}

.switch-row input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.flow {
  display: grid;
  grid-template-columns: auto minmax(36px, 1fr) auto minmax(36px, 1fr) auto minmax(36px, 1fr) auto minmax(36px, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 14px 0 16px;
}

.twitch-flow {
  margin: 12px 0 8px;
}

.node {
  position: relative;
  display: inline-grid;
  place-items: center;
  gap: 8px;
  min-height: 0;
  border-radius: 999px;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.node::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 2px solid rgba(48, 56, 74, 0.92);
  border-radius: 999px;
  background: var(--bg);
  box-shadow: 0 0 0 3px rgba(21, 25, 35, 0.86);
}

.node.done,
.node.active {
  color: #ffffff;
}

.node.done::before,
.node.active::before {
  border-color: var(--green);
  background: var(--green);
}

.node.active {
  color: var(--green);
}

.node.active::before {
  box-shadow: 0 0 0 4px rgba(25, 195, 125, 0.13);
}

.line {
  height: 1px;
  border-radius: 999px;
  background: rgba(48, 56, 74, 0.78);
}

.activity {
  overflow: hidden;
  margin-top: 10px;
}

.twitch-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  margin-bottom: 24px;
}

.twitch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.twitch-head div {
  display: grid;
  gap: 6px;
}

.twitch-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.twitch-head p,
.transfer p,
.warning-note,
.helper-note {
  color: var(--muted);
}

.warning-note {
  color: #ffd166;
  font-weight: 800;
}

.helper-note {
  margin-top: -8px;
}

.vod-paste-control span {
  color: var(--text);
  font-size: 0.86rem;
}

.vod-paste-control {
  display: grid;
  gap: 7px;
}

.vod-paste-control span {
  font-weight: 800;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
  padding: 12px;
  font: inherit;
}

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

.transfer {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: var(--panel-2);
}

.transfer span {
  color: var(--green);
  font-size: 0.86rem;
}

.transfer.failed span {
  color: var(--red);
}

.transfer a {
  color: var(--green);
  font-weight: 800;
  margin-right: 10px;
}

.activity-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
}

.activity-head div {
  display: grid;
  gap: 3px;
}

.activity-head h2 {
  font-size: 0.92rem;
}

.clear-button {
  min-width: 52px;
  min-height: 28px;
  padding: 5px 9px;
  font-size: 0.82rem;
}

.jobs {
  display: grid;
}

.job {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.job:last-child {
  border-bottom: 0;
}

.job strong {
  display: block;
  margin-top: 4px;
}

.job p {
  margin-top: 6px;
  color: var(--muted);
}

.job a {
  color: var(--green);
  font-weight: 800;
}

.job.failed span {
  color: var(--red);
}

.job.uploaded span,
.job.dry-run span {
  color: var(--green);
}

.empty {
  padding: 7px 12px;
  color: var(--muted);
  font-size: 0.84rem;
}

.footer-links {
  display: flex;
  gap: 14px;
  justify-content: center;
  padding: 24px 0 4px;
}

@media (prefers-reduced-motion: reduce) {
  .automation-card,
  .pulse-ring {
    animation: none;
  }
}

.footer-links a,
.policy-panel a {
  color: var(--green);
  font-weight: 800;
}

.policy-page h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.policy-panel {
  display: grid;
  gap: 18px;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
  line-height: 1.55;
}

.policy-panel h2 {
  margin-top: 10px;
  font-size: 1.25rem;
}

.policy-panel p {
  color: var(--muted);
}

.policy-panel strong {
  color: var(--text);
}

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

.admin-row {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  padding: 12px;
}

.receipt-line code {
  border: 1px solid rgba(48, 56, 74, 0.95);
  border-radius: 6px;
  background: rgba(11, 13, 18, 0.35);
  color: var(--text);
  padding: 2px 6px;
  font-size: 0.82rem;
}

.availability-note {
  color: var(--muted);
  line-height: 1.4;
}

.admin-row.ready strong {
  color: var(--green);
}

.admin-row.pending strong {
  color: #ffd166;
}

.admin-row span,
.admin-row small {
  color: var(--muted);
}

@media (max-width: 860px) {
  .topbar,
  .header,
  .dashboard-intro,
  .activity-head,
  .twitch-head,
  .billing-panel,
  .billing-hero,
  .donation-panel {
    display: grid;
    align-items: start;
  }

  .status-grid,
  .customer-status-grid,
  .setup-grid,
  .switch-panel,
  .utility-grid,
  .plan-grid,
  .billing-summary-list,
  .billing-cycle,
  .hero,
  .value-panel,
  .value-steps,
  .job {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding-top: 28px;
  }

  .hero-visual {
    min-height: 300px;
  }

  .actions,
  .header-status,
  .header-nav,
  .platform-actions,
  .dashboard-intro-actions,
  .billing-actions,
  .twitch-actions {
    justify-content: start;
  }

  .setup-heading,
  .platform-card-top {
    display: grid;
    align-items: start;
  }

  .billing-hero-actions {
    justify-items: start;
  }

  .donation-actions {
    justify-content: start;
  }

  .flow {
    grid-template-columns: auto minmax(34px, 1fr) auto minmax(34px, 1fr) auto minmax(34px, 1fr) auto minmax(34px, 1fr) auto;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    scrollbar-width: thin;
  }

  .flow .node {
    min-width: 68px;
    font-size: 0.68rem;
    white-space: nowrap;
  }

  .flow .line {
    width: auto;
    min-width: 34px;
    height: 1px;
    justify-self: stretch;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding: 14px 0 20px;
  }

  .topbar,
  .header {
    gap: 12px;
    padding-bottom: 12px;
  }

  .brand {
    gap: 9px;
    font-size: 0.92rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .actions,
  .dashboard-actions {
    width: 100%;
    gap: 7px;
  }

  .header-status {
    width: 100%;
    gap: 7px;
  }

  .header-nav {
    width: 100%;
    justify-content: space-between;
    gap: 3px;
    padding: 2px;
  }

  .header-nav .button {
    flex: 1 1 0;
    min-height: 32px;
    padding: 6px 7px;
    text-align: center;
  }

  .platform-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .platform-actions .button,
  .logout-form button {
    min-height: 34px;
    justify-content: center;
    padding: 7px 8px;
    font-size: 0.8rem;
  }

  .platform-actions .twitch-button {
    grid-column: 1 / -1;
  }

  .logout-form {
    width: 100%;
  }

  .logout-form button {
    width: 100%;
  }

  .mode-badge,
  .signed-in-user {
    padding: 4px 8px;
    font-size: 0.76rem;
  }

  .dashboard-intro {
    gap: 12px;
    padding: 22px 0 14px;
  }

  .dashboard-intro h1,
  .billing-page h1,
  .uploads-page h1,
  .policy-page h1 {
    font-size: clamp(2.2rem, 14vw, 3.3rem);
    line-height: 0.94;
  }

  .dashboard-intro p {
    font-size: 0.94rem;
    line-height: 1.45;
  }

  .dashboard-intro-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .mini-toggle,
  .dashboard-intro-actions .button {
    min-height: 36px;
  }

  .mini-toggle {
    padding: 6px 8px;
  }

  .mini-toggle span {
    min-width: 64px;
  }

  .mini-toggle strong,
  .mini-toggle small {
    font-size: 0.68rem;
  }

  .button,
  button {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 0.86rem;
  }

  .workflow-slider-head {
    margin: 12px 0 10px;
  }

  .slider-arrow {
    width: 34px;
    height: 34px;
  }

  .drop-zone {
    min-height: 72px;
    padding: 12px 10px;
  }

  .drop-zone strong {
    font-size: 0.94rem;
  }

  .drop-zone span {
    font-size: 0.82rem;
    line-height: 1.3;
  }

  .rights-note {
    font-size: 0.76rem;
    line-height: 1.38;
  }

  .setup-panel,
  .twitch-panel,
  .activity,
  .billing-panel,
  .policy-panel,
  .uploads-panel {
    border-radius: 8px;
  }

  .setup-panel {
    gap: 10px;
    margin-top: 12px;
    padding: 10px;
  }

  .setup-heading {
    gap: 8px;
  }

  .setup-heading h2 {
    font-size: 0.98rem;
  }

  .setup-heading p {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .setup-grid {
    gap: 8px;
  }

  .setup-card {
    min-height: 0;
    gap: 8px;
    padding: 10px;
  }

  .platform-card-top {
    display: flex;
    align-items: start;
  }

  .connection-status {
    padding: 3px 7px;
    font-size: 0.76rem;
  }

  .switch-row {
    min-height: 50px;
    padding: 10px;
  }

  .compact-switch {
    min-height: 40px;
  }

  .brand-hashtag-control input,
  .privacy-control select,
  textarea {
    font-size: 16px;
  }

  .privacy-control select {
    min-height: 36px;
  }

  .flow {
    grid-template-columns: auto minmax(22px, 1fr) auto minmax(22px, 1fr) auto minmax(22px, 1fr) auto minmax(22px, 1fr) auto;
    gap: 6px;
    margin: 10px -2px 10px;
    padding: 2px 2px 8px;
  }

  .flow .node {
    min-width: 54px;
    gap: 5px;
    font-size: 0.58rem;
    line-height: 1.15;
  }

  .node::before {
    width: 7px;
    height: 7px;
    border-width: 2px;
    box-shadow: 0 0 0 3px rgba(21, 25, 35, 0.78);
  }

  .flow .line {
    min-width: 22px;
  }

  .twitch-panel {
    gap: 10px;
    padding: 12px;
    margin-bottom: 12px;
  }

  .twitch-head {
    display: flex;
    align-items: start;
    gap: 10px;
  }

  .twitch-head h2 {
    font-size: 1.15rem;
  }

  .twitch-head p,
  .helper-note,
  .warning-note {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .twitch-actions {
    display: grid;
    gap: 6px;
    min-width: 104px;
  }

  .twitch-actions button,
  .clear-button {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 0.78rem;
  }

  .vod-paste-control {
    gap: 6px;
  }

  textarea {
    min-height: 94px;
    padding: 10px;
  }

  .activity {
    margin-top: 8px;
  }

  .activity-head {
    display: flex;
    align-items: center;
    padding: 8px 10px;
  }

  .activity-head h2 {
    font-size: 0.9rem;
  }

  .activity-head p {
    font-size: 0.76rem;
  }

  .jobs .empty {
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .compact-status {
    min-height: 0;
  }

  .footer-links {
    gap: 12px;
    justify-content: center;
    padding-top: 18px;
    font-size: 0.9rem;
  }

  .home-hero {
    min-height: auto;
    border-radius: 12px;
    padding: 26px 18px;
  }

  .home-hero h1 {
    font-size: clamp(2.35rem, 14vw, 3.8rem);
  }

  .home-hero .hero-copy p {
    font-size: 0.96rem;
    line-height: 1.55;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-visual {
    min-height: 245px;
  }

  .automation-card {
    padding: 13px;
  }

  .value-panel,
  .billing-hero,
  .donation-panel {
    padding: 14px;
  }

  .value-panel h2 {
    font-size: 1.75rem;
  }

  .value-steps article {
    min-height: 0;
    padding: 14px;
  }

  .plan-card {
    padding: 15px;
  }

  .billing-cycle button {
    min-height: 52px;
  }

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

  .donation-control {
    min-width: 0;
  }

  .donation-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .donation-button {
    min-width: 0;
  }
}
