/* Assignment Maker — StuWiUs logo theme (blue, white, clean) */

:root {
  /* Logo blue — #3f56a0 (StudyWithUs) */
  --brand-600: #3f56a0;
  --brand-700: #354a89;
  --brand-800: #2b3e72;
  --brand-400: #6378b8;
  --brand-200: #c5cce8;
  --brand-100: #e8ebf5;
  --brand-50: #f2f4fa;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(63, 86, 160, 0.1);
}

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

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--gray-900);
  background: var(--gray-50);
}

/* Main content grows so footer stays at bottom when content is short */
body > main {
  flex: 1 0 auto;
}

/* Reserve space for fixed header so content doesn’t sit under it */
body.landing-page {
  padding-top: 64px;
}

body.app-page {
  padding-top: 64px;
}

/* Top bar — logo blue, soft; fixed on scroll */
.top-bar {
  display: none !important;
}

.top-bar span {
  opacity: 0.95;
}

/* Header — fixed at top when scrolling */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 8px 24px;
  min-height: 46px;
  box-sizing: border-box;
  background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-600) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 24px rgba(43, 62, 114, 0.24);
  overflow: visible;
}

/* When top-bar is present (logged-in), main header sits below it */
body.app-page .main-header {
  top: 0;
}

.main-header .header-head-left {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-start;
  min-width: 0;
}

.main-header .header-nav-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.main-header .header-head-right {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--gray-900);
  text-decoration: none;
  overflow: visible;
}

.logo:hover {
  color: var(--brand-600);
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Landscape logo — small layout size so bar doesn’t grow; scale up so it looks bigger (transparent bg overflows) */
.logo-landscape {
  height: 36px;
  max-width: 160px;
  width: auto;
  object-fit: contain;
  transform: scale(5);
  transform-origin: left center;
}

.logo-rect {
  height: 36px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

/* Circle logo (used on mobile headers) */
.logo-circle {
  display: none;
  height: 36px;
  width: 36px;
  border-radius: 50%;
  object-fit: contain;
}

.app-home {
  padding-top: 8px;
}

.app-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.85fr);
  grid-template-areas:
    "copy summary"
    "tools summary";
  gap: 22px;
  align-items: start;
  margin-bottom: 24px;
}

.app-home-hero-copy,
.app-home-summary,
.app-home-info-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(63, 86, 160, 0.07);
}

.app-home-hero-copy {
  grid-area: copy;
  padding: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.app-home-hero-tools {
  grid-area: tools;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  border: 1px solid #dbe5ff;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(63, 86, 160, 0.08);
}

.app-home-summary {
  grid-area: summary;
  grid-row: 1 / span 2;
  align-self: stretch;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.app-home-hero-tools-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.app-home-hero-tools-title {
  margin: 0;
  font-size: 1rem;
  color: var(--gray-900);
}

.app-home-hero-tools-toggle {
  border: 1px solid var(--brand-200);
  background: var(--brand-50);
  color: var(--brand-700);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.app-home-hero-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.app-home-hero-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cfd9ff;
  background: linear-gradient(180deg, #f5f8ff 0%, #ffffff 100%);
  color: #30458f;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-home-hero-tool-btn:hover {
  transform: translateY(-1px);
  border-color: #9fb3ff;
  box-shadow: 0 8px 16px rgba(63, 86, 160, 0.16);
}

.app-home-hero-tools.is-collapsed .app-home-hero-tool-btn.is-extra-tool {
  display: none;
}

.app-home-eyebrow {
  margin: 0 0 10px;
  color: var(--brand-600);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.app-home-title {
  margin: 0 0 12px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.75rem, 3.1vw, 2.55rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--gray-900);
  max-width: 520px;
}

.app-home-subhead {
  margin: 0;
  max-width: 560px;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--gray-600);
}

.app-home-whats-new {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid #d7e2ff;
  background: linear-gradient(120deg, #f7f9ff 0%, #eef5ff 58%, #f5f8ff 100%);
  box-shadow: 0 10px 24px rgba(63, 86, 160, 0.11);
}

.app-home-whats-new::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  top: -110px;
  right: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(128, 167, 255, 0.35) 0%, rgba(128, 167, 255, 0) 72%);
  pointer-events: none;
}

.app-home-whats-new::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  bottom: -140px;
  left: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 142, 255, 0.28) 0%, rgba(180, 142, 255, 0) 72%);
  pointer-events: none;
}

.app-home-whats-new-head {
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
}

.app-home-whats-new-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-home-whats-new-kicker {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-700);
}

.app-home-whats-new-date {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1f3f9b;
  border: 1px solid #b7c7ff;
  background: linear-gradient(180deg, #ffffff 0%, #eef3ff 100%);
  box-shadow: 0 0 0 rgba(111, 137, 233, 0.45);
  animation: app-home-date-glow 2.3s ease-in-out infinite;
}

.app-home-whats-new-title {
  margin: 0 0 6px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.45rem, 2.2vw, 1.95rem);
  color: #1f2a56;
}

.app-home-whats-new-subtitle {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.97rem;
}

.app-home-whats-new-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.app-home-whats-new-card {
  position: relative;
  overflow: hidden;
  padding: 18px 16px;
  border-radius: 14px;
  border: 1px solid #dbe4ff;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 16px rgba(63, 86, 160, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-home-whats-new-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -55%;
  width: 36%;
  height: 100%;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.45) 52%, transparent 100%);
  transform: skewX(-16deg);
  animation: app-home-card-sheen 7s ease-in-out infinite;
}

.app-home-whats-new-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(63, 86, 160, 0.14);
}

.app-home-whats-new-card h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  color: var(--gray-900);
}

.app-home-whats-new-card p {
  margin: 0 0 12px;
  color: var(--gray-600);
  font-size: 0.92rem;
  line-height: 1.6;
}

.app-home-whats-new-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--brand-700);
  text-decoration: none;
}

.app-home-whats-new-link::after {
  content: "→";
}

.app-home-whats-new-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0f766e;
  background: #def7f2;
  border: 1px solid #8ee2d3;
}

.app-home-whats-new-card.is-drillbit {
  border-color: #c9dcff;
}

.app-home-whats-new-card.is-turnitin {
  border-color: #d8cdfd;
}

.app-home-whats-new-card.is-highlight {
  border-color: #c6ece2;
}

@keyframes app-home-card-glow {
  0% {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(63, 86, 160, 0.08);
  }
  50% {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(63, 86, 160, 0.14);
  }
  100% {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(63, 86, 160, 0.08);
  }
}

@keyframes app-home-date-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(111, 137, 233, 0.3);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(111, 137, 233, 0.08), 0 6px 16px rgba(63, 86, 160, 0.16);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(111, 137, 233, 0.3);
  }
}

@keyframes app-home-card-sheen {
  0%, 72% {
    left: -55%;
  }
  92%, 100% {
    left: 125%;
  }
}

.app-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.app-home-empty-recent {
  display: inline-flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 500;
  line-height: 1.5;
}

.app-home-summary {
  padding: 14px;
  display: grid;
  gap: 10px;
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.app-home-balance-card {
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
  border: 1px solid #d9e3ff;
  display: flex;
  flex-direction: column;
  min-height: 148px;
  box-shadow: 0 4px 10px rgba(63, 86, 160, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-home-balance-card:hover {
  transform: translateY(-1px);
  border-color: #bfd0ff;
  box-shadow: 0 10px 18px rgba(63, 86, 160, 0.12);
}

.app-home-balance-label {
  margin: 0 0 6px;
  font-size: 0.84rem;
  color: var(--gray-500);
}

.app-home-balance-value {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  color: #2d438f;
  line-height: 1;
}

.app-home-add-trigger {
  margin-top: auto;
  font-size: 0.8rem;
  padding: 7px 12px;
  border-radius: 10px;
  align-self: flex-start;
}

.app-home-balance-meta {
  margin: 6px 0 0;
  font-size: 0.84rem;
  color: var(--gray-600);
}

/* Home wallet modal */
.home-wallet-modal {
  position: fixed;
  inset: 0;
  z-index: 420;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
}

.home-wallet-modal.home-wallet-modal-open {
  opacity: 1;
  visibility: visible;
}

.home-wallet-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.home-wallet-modal-content {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.home-wallet-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}

.home-wallet-modal-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-900);
}

.home-wallet-modal-close {
  border: none;
  background: none;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--gray-500);
}

.home-wallet-modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.home-wallet-modal-body {
  padding: 16px 20px 8px;
}

.home-wallet-modal-subtitle {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.home-wallet-modal-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.home-wallet-modal-row label {
  font-size: 0.9rem;
  color: var(--gray-700);
  font-weight: 600;
}

.home-wallet-amount-input-wrap {
  display: inline-flex;
  align-items: center;
  width: min(230px, 100%);
  border: 1px solid var(--brand-200);
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(63, 86, 160, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.home-wallet-amount-input-wrap:focus-within {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(63, 86, 160, 0.16);
  transform: translateY(-1px);
}

.home-wallet-amount-prefix {
  padding: 10px 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-700);
  border-right: 1px solid var(--brand-100);
  background: rgba(63, 86, 160, 0.06);
  border-top-left-radius: 11px;
  border-bottom-left-radius: 11px;
}

#home-wallet-amount-input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 0 12px 12px 0;
  background: transparent;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
  outline: none;
}

#home-wallet-amount-input::placeholder {
  color: var(--gray-400);
}

.home-wallet-modal-total {
  margin: 4px 0 8px;
  font-size: 1rem;
  color: var(--gray-700);
  font-weight: 600;
}

#home-wallet-words-out {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--brand-700);
  line-height: 1;
}

.home-wallet-modal-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--gray-500);
}

.home-wallet-modal-error {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #b91c1c;
}

.home-wallet-modal-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
}

.app-home-balance-status {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.app-home-balance-status.is-verified {
  color: #15803d;
}

.app-home-balance-status.is-pending {
  color: #b45309;
}

.app-home-verification-banner {
  margin-bottom: 28px;
}

.app-home-tools {
  margin-bottom: 22px;
}

.app-home-section-head {
  margin-bottom: 12px;
}

.app-home-section-title {
  margin: 0 0 4px;
  font-size: 1.36rem;
  color: var(--gray-900);
}

.app-home-section-text {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.5;
  font-size: 0.94rem;
}

.app-home-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.app-home-tool-card {
  display: block;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(63, 86, 160, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-home-tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-200);
  box-shadow: 0 10px 22px rgba(63, 86, 160, 0.12);
}

.app-home-tool-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--brand-50) 0%, var(--white) 100%);
  color: var(--brand-600);
  border: 1px solid var(--brand-100);
  margin-bottom: 12px;
}

.app-home-tool-title {
  margin: 0 0 6px;
  font-size: 1.04rem;
  color: var(--gray-900);
}

.app-home-tool-text {
  margin: 0 0 12px;
  font-size: 0.89rem;
  color: var(--gray-600);
  line-height: 1.45;
  min-height: 2.7em;
}

.app-home-tool-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-weight: 700;
  font-size: 0.84rem;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%);
  box-shadow: 0 6px 14px rgba(63, 86, 160, 0.24);
}

.app-home-tool-cta::after {
  content: "→";
}

.app-home-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.app-home-info-card {
  padding: 26px 24px;
}

.app-home-info-title {
  margin: 0 0 18px;
  font-size: 1.2rem;
  color: var(--gray-900);
}

.app-home-info-list {
  display: grid;
  gap: 16px;
}

.app-home-info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.app-home-info-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--gray-900);
}

.app-home-info-item p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.6;
}

.app-home-info-num {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--brand-600);
  color: var(--white);
  font-weight: 700;
}

.app-home-brief-list {
  margin: 0;
  padding-left: 18px;
  color: var(--gray-700);
}

.app-home-brief-list li {
  margin-bottom: 12px;
  line-height: 1.65;
}

@media (max-width: 960px) {
  .app-home-hero,
  .app-home-info-grid,
  .app-home-whats-new-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "summary"
      "tools";
  }
  .app-home-summary {
    grid-row: auto;
    align-self: auto;
    grid-template-rows: none;
  }
  .app-home-hero-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .app-home-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .app-home-hero-tools-grid {
    grid-template-columns: 1fr;
  }
  .app-home-tools-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-home-hero-copy,
  .app-home-summary,
  .app-home-tool-card,
  .app-home-info-card,
  .app-home-whats-new {
    padding: 20px;
  }

  .app-home-actions {
    flex-direction: column;
  }
  .app-home-whats-new-head-top {
    align-items: flex-start;
    flex-direction: column;
  }
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tool-link {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-tool-link:hover {
  color: var(--brand-600);
  background: var(--brand-50);
}

.nav-tool-link.active {
  color: var(--brand-700);
  background: var(--brand-100);
}

.nav-tools-dropdown-wrap {
  position: relative;
}

.nav-tools-trigger {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-600);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-tools-trigger:hover {
  color: var(--brand-600);
  background: var(--brand-50);
}

.nav-tools-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  min-width: 200px;
  padding: 8px 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12);
  display: none;
  z-index: 100;
  animation: dropdown-fade-in 0.2s ease-out;
}

.nav-tools-dropdown.is-open {
  display: block;
}

.nav-tools-item {
  display: block;
  padding: 10px 16px;
  font-size: 0.95rem;
  color: var(--gray-700);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-tools-item:hover {
  background: var(--brand-50);
  color: var(--brand-600);
}

/* Highlighted tools (AI Humaniser, Drillbit) with lightning and soft blink */
.nav-tools-item-highlight {
  position: relative;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, transparent 100%);
  color: var(--brand-700);
  font-weight: 500;
}

.nav-tools-item-highlight:hover {
  background: var(--brand-50);
  color: var(--brand-600);
}

.nav-tools-item-bolt {
  display: inline-block;
  margin-right: 8px;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  animation: tools-bolt-blink 1.8s ease-in-out infinite;
}

.nav-tools-item-bolt::before {
  content: "\26A1";
  font-size: 1.05em;
  color: #f59e0b;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
}

@keyframes tools-bolt-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.nav-tools-item.tools-item-coming-soon {
  color: var(--gray-500);
  cursor: default;
  pointer-events: none;
}

.nav-tools-item.tools-item-coming-soon em {
  display: block;
  font-size: 0.75rem;
  font-style: normal;
  color: var(--gray-500);
  margin-top: 2px;
}

@keyframes dropdown-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 500;
}

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

.welcome-text {
  color: var(--brand-600);
  font-weight: 500;
}

.credit-balance {
  color: var(--gray-600);
  font-weight: 500;
  font-size: 0.9rem;
}

/* Header dropdown (Welcome + three-dot menu) */
.nav-links-with-dropdown {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-dropdown-wrap {
  position: relative;
}

.header-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--gray-600);
  cursor: pointer;
}

.header-dropdown-trigger:hover {
  background: var(--brand-50);
  color: var(--brand-600);
}

.header-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  min-width: 220px;
  padding: 8px 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 100;
  display: none;
}

.header-dropdown-menu.is-open {
  display: block;
}

.dropdown-section {
  padding: 4px 0;
}

.dropdown-section + .dropdown-section {
  border-top: 1px solid var(--gray-100);
}

.dropdown-label {
  display: block;
  padding: 6px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
}

.dropdown-credits {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 16px 10px;
}

.dropdown-credit-row {
  font-size: 0.9rem;
  color: var(--gray-700);
}

.dropdown-credit-row strong {
  color: var(--gray-900);
  margin-right: 6px;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  border: none;
  background: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}

.dropdown-item-logout {
  color: var(--brand-600);
  font-weight: 600;
}

.dropdown-section-logout .dropdown-item:hover {
  background: var(--brand-100);
}

/* Profile modal */
.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.2s, opacity 0.2s;
}

.profile-modal.is-open {
  visibility: visible;
  opacity: 1;
}

.profile-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.profile-modal-content {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow: auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.profile-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
}

.profile-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
}

.profile-modal-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--gray-500);
  cursor: pointer;
}

.profile-modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.profile-modal-body {
  padding: 24px;
}

.profile-loading {
  margin: 0;
  color: var(--gray-500);
}

.profile-detail {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: var(--gray-700);
}

.profile-detail strong {
  display: inline-block;
  min-width: 100px;
  color: var(--gray-900);
}

/* Generate multiple files */
.multi-file-toggle-row {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
}

.multi-file-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
  color: var(--gray-700);
}

.multi-file-checkbox-label input {
  width: 18px;
  height: 18px;
}

.multi-file-panel {
  margin-top: 16px;
  padding: 20px;
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius);
}

.multi-file-intro {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--gray-700);
}

.multi-file-intro a {
  color: var(--brand-600);
  font-weight: 500;
}

.multi-file-drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 100px;
  margin-bottom: 16px;
  padding: 24px;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.multi-file-drop-zone:hover {
  border-color: var(--brand-400);
  background: var(--brand-50);
}

.multi-file-drop-zone.is-drag-over {
  border-color: var(--brand-600);
  background: var(--brand-100);
}

.multi-file-drop-text {
  font-weight: 500;
  color: var(--gray-700);
}

.multi-file-drop-or {
  font-size: 0.9rem;
  color: var(--gray-500);
}

.multi-file-input-hidden {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.multi-file-table-wrap {
  overflow-x: auto;
  margin-bottom: 16px;
}

.multi-file-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.multi-file-table th,
.multi-file-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
}

.multi-file-table th {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.multi-file-table td input[type="text"],
.multi-file-table td input[type="number"] {
  width: 100%;
  min-width: 100px;
  max-width: 260px;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

.multi-file-table td input[type="number"] {
  min-width: 90px;
  max-width: 120px;
}

.multi-file-table .row-remove {
  padding: 4px 10px;
  font-size: 0.85rem;
  color: var(--gray-600);
  background: transparent;
  border: none;
  cursor: pointer;
}

.multi-file-table .row-remove:hover {
  color: #b91c1c;
}

.multi-file-submit-row {
  margin-top: 8px;
}

/* My Orders page */
.orders-page-title {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
}

.orders-page-sub {
  margin: 0 0 24px;
  color: var(--gray-600);
}

.orders-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.orders-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  margin-bottom: 8px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.order-topic {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  color: var(--gray-900);
}

.order-meta {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.order-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.order-status.queue {
  background: var(--gray-100);
  color: var(--gray-600);
}

.order-status.processing {
  background: #dbeafe;
  color: #1d4ed8;
}

.order-status.complete {
  background: #d1fae5;
  color: #065f46;
}

.order-status.failed {
  background: #fee2e2;
  color: #991b1b;
}

.order-status.cancelled {
  background: #e5e7eb;
  color: #374151;
}

.order-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-download-order {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
  background: var(--brand-600);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
}

.btn-download-order:hover {
  background: var(--brand-700);
}

.btn-cancel-order {
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #991b1b;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-cancel-order:hover:not(:disabled) {
  background: #ffe4e6;
  border-color: #fda4af;
}

.btn-cancel-order:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.orders-empty {
  padding: 48px 24px;
  text-align: center;
  background: var(--white);
  border: 1px dashed var(--gray-200);
  border-radius: var(--radius);
  color: var(--gray-500);
}

/* Verification banner (main page) */
.verification-banner {
  background: #fef3c7;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}

.verification-banner-title {
  display: block;
  color: #92400e;
  margin-bottom: 8px;
}

.verification-banner-text {
  margin: 0 0 12px;
  color: #78350f;
  font-size: 0.9rem;
}

.verification-banner-form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.verify-otp-input {
  width: 140px;
  padding: 10px 16px;
  font-size: 1.25rem;
  letter-spacing: 0.4em;
  text-align: center;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
}

.verify-otp-input:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px var(--brand-100);
}

.verification-banner-footer {
  margin: 0;
  font-size: 0.9rem;
}

.verify-success-msg {
  color: #065f46;
  font-weight: 500;
  margin: 0;
}

@media (max-width: 640px) {
  .verification-banner-form {
    flex-direction: column;
    align-items: stretch;
  }
  .verify-otp-input {
    width: 100%;
  }
}

/* Main content */
.main-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

/* Admin pages - wider content */
.main-content.admin-page {
  max-width: 1400px;
}

/* Admin root body: keep desktop-style header/layout separate from landing/app pages */
body.admin-root {
  padding-top: 0;
}

body.admin-root .top-bar {
  position: static;
}

body.admin-root .main-header {
  position: static;
  box-shadow: none;
}

body.admin-root .main-header .nav-tool-link,
body.admin-root .main-header .nav-tools-trigger,
body.admin-root .main-header .header-dropdown-trigger,
body.admin-root .main-header .welcome-text,
body.admin-root .main-header .nav-links a {
  color: rgba(255, 255, 255, 0.96);
}

body.admin-root .main-header .nav-tool-link:hover,
body.admin-root .main-header .nav-tools-trigger:hover,
body.admin-root .main-header .header-dropdown-trigger:hover,
body.admin-root .main-header .nav-links a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

/* Admin dashboard stats */
body.admin-root .stats-grid {
  display: grid;
  gap: 24px;
  margin: 32px 0;
  grid-template-columns: 1fr;
}

/* ≥ 640px: two columns */
@media (min-width: 640px) {
  body.admin-root .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ≥ 1024px: four columns so all main stats fit in one row */
@media (min-width: 1024px) {
  body.admin-root .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Admin users grid: responsive columns */
body.admin-root .admin-users-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

/* ≥ 900px: at least two columns */
@media (min-width: 900px) {
  body.admin-root .admin-users-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ≥ 1400px: three columns on very wide screens */
@media (min-width: 1400px) {
  body.admin-root .admin-users-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.headline {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 8px;
  color: var(--gray-900);
  line-height: 1.2;
}

.headline .accent {
  color: var(--brand-600);
}

.subhead {
  font-size: 1.25rem;
  text-align: center;
  color: var(--gray-700);
  margin: 0 0 8px;
}

.description {
  text-align: center;
  color: var(--gray-500);
  margin: 0 0 32px;
  font-size: 0.95rem;
}

/* Input section */
.input-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 4px 16px rgba(63, 86, 160, 0.06);
  border: 1px solid var(--brand-100);
}

.input-main-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 900px) {
  .input-main-layout {
    flex-direction: row;
    align-items: stretch;
  }

  .input-main-left {
    flex: 2;
    min-width: 0;
  }

  .source-panel {
    flex: 1;
    margin-left: 24px;
  }
}

.input-label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.input-label-row label {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.95rem;
}

.input-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--gray-500);
}

.sep {
  color: var(--gray-200);
}

.link-btn {
  background: none;
  border: none;
  color: var(--brand-600);
  cursor: pointer;
  font-size: inherit;
  font-weight: 500;
  padding: 0;
}

.link-btn:hover {
  text-decoration: underline;
}

textarea {
  width: 100%;
  min-height: 200px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px var(--brand-100);
}

textarea::placeholder {
  color: var(--gray-500);
}

/* Source document panel */
.source-panel {
  border-left: 1px dashed var(--gray-200);
  padding-left: 16px;
}

.source-panel-title {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-800);
}

.source-panel-text {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: var(--gray-600);
}

.source-panel-hint {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--gray-500);
}

.source-drop-zone {
  position: relative;
  margin-top: 4px;
  padding: 16px 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--gray-300);
  background: var(--gray-50);
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.source-drop-zone:hover,
.source-drop-zone.is-drag-over {
  border-color: var(--brand-500);
  background: var(--brand-50);
}

.source-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.source-drop-label {
  font-size: 0.85rem;
  color: var(--gray-700);
}

.source-file-name {
  font-size: 0.8rem;
  color: var(--gray-500);
  word-break: break-all;
}

.source-file-list {
  margin: 8px 0 0;
  padding-left: 16px;
  font-size: 0.8rem;
  color: var(--gray-700);
}

.source-file-list li {
  list-style: disc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.source-file-remove {
  border: none;
  background: transparent;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0 4px;
  font-size: 0.85rem;
  line-height: 1;
}

.source-file-remove:hover {
  color: var(--brand-600);
}

/* Options row */
.options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.field-group {
  flex: 1;
  min-width: 140px;
}

.field-group-checkbox {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.field-group-checkbox .checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
}
.field-group-checkbox .checkbox-label input {
  width: 18px;
  height: 18px;
}
.field-hint {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 2px;
}

.batch-advance-removal-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.batch-advance-removal-label input {
  width: 16px;
  height: 16px;
}

.field-group.small {
  flex: 0 0 auto;
  width: 100px;
}

.field-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.field-group input {
  width: 100%;
  padding: 8px 12px;
  font-size: 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
}

.field-group input:focus {
  outline: none;
  border-color: var(--brand-600);
}

.field-group select {
  width: 100%;
  padding: 8px 12px;
  font-size: 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
}

.field-group select:focus {
  outline: none;
  border-color: var(--brand-600);
}

.ref-finder-options .field-group.ref-finder-year-range {
  min-width: 140px;
}

/* ----- Assignment maker (logged-in dashboard) ----- */
body.assignment-maker-page {
  background: linear-gradient(180deg, #f1f3fa 0%, #e8ecf8 45%, #f4f6fb 100%);
}

.assignment-maker-main {
  max-width: 980px;
}

body.advanced-workspace-active.assignment-maker-page {
  background: linear-gradient(180deg, #e4e8f1 0%, #d8deec 42%, #eef1f8 100%);
}

body.advanced-workspace-active .assignment-maker-main {
  max-width: 1380px;
}

.assignment-workspace {
  display: block;
}

.assignment-workspace.is-advanced-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 560px);
  gap: 32px;
  align-items: start;
}

@media (max-width: 960px) {
  .assignment-workspace.is-advanced-layout {
    grid-template-columns: 1fr;
  }

  .assignment-outline-aside-inner {
    position: relative;
    top: 0;
    max-height: none;
  }
}

.assignment-advanced-mode-bar {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  background: rgba(248, 250, 252, 0.95);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body.advanced-workspace-active .assignment-advanced-mode-bar {
  border-color: rgba(59, 77, 155, 0.35);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.04) 0%, rgba(59, 77, 155, 0.1) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.assignment-advanced-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  user-select: none;
}

.assignment-advanced-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.assignment-advanced-toggle-ui {
  flex-shrink: 0;
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: var(--gray-300);
  position: relative;
  transition: background 0.2s ease;
}

.assignment-advanced-toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease;
}

.assignment-advanced-toggle input:checked + .assignment-advanced-toggle-ui {
  background: linear-gradient(90deg, var(--brand-600), #1e3a5f);
}

.assignment-advanced-toggle input:checked + .assignment-advanced-toggle-ui::after {
  transform: translateX(22px);
}

.assignment-advanced-toggle input:focus-visible + .assignment-advanced-toggle-ui {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}

.assignment-advanced-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.assignment-advanced-toggle-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gray-900);
}

.assignment-advanced-toggle-sub {
  font-size: 0.78rem;
  color: var(--gray-500);
  line-height: 1.35;
}

body.advanced-workspace-active .assignment-input-card {
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.08),
    0 14px 40px rgba(15, 23, 42, 0.12);
}

body.advanced-workspace-active .assignment-maker-page .input-section textarea#question {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  background: #f8fafc;
  border-color: #cbd5e1;
}

.assignment-outline-aside {
  box-sizing: border-box;
}

.assignment-outline-aside[hidden] {
  display: none !important;
}

.assignment-outline-aside-inner {
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 249, 255, 0.98) 100%);
  color: var(--gray-800);
  padding: 20px 18px 18px;
  color-scheme: light;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 14px 34px rgba(59, 77, 155, 0.12);
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 100px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.assignment-outline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.assignment-outline-aside-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-900);
}

.assignment-outline-pipeline {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--brand-600);
  white-space: nowrap;
}

.assignment-outline-lead {
  margin: 0 0 16px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--gray-600);
}

.assignment-outline-loading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--gray-600);
  padding: 10px 0 8px;
}

.assignment-outline-loading-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.assignment-outline-loading-copy strong {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--gray-800);
  letter-spacing: 0.01em;
}

.assignment-outline-loading-copy span {
  font-size: 0.8rem;
  color: var(--gray-600);
}

.assignment-outline-loading-track {
  width: min(300px, 100%);
  height: 6px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.16);
  overflow: hidden;
  margin-top: 2px;
}

.assignment-outline-loading-fill {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #5f74ef 0%, #3b5ed6 100%);
  box-shadow: 0 0 12px rgba(79, 104, 231, 0.35);
  transition: width 0.35s ease;
}

.assignment-outline-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(99, 102, 241, 0.2);
  border-top-color: var(--brand-600);
  border-radius: 50%;
  animation: assignment-outline-spin 0.75s linear infinite;
}

@keyframes assignment-outline-spin {
  to {
    transform: rotate(360deg);
  }
}

.assignment-outline-editor-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.assignment-outline-sections {
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
  margin-right: -4px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: min(640px, calc(100vh - 220px));
  scrollbar-color: rgba(148, 163, 184, 0.65) rgba(226, 232, 240, 0.8);
  scrollbar-width: thin;
}

.assignment-outline-sections::-webkit-scrollbar {
  width: 8px;
}

.assignment-outline-sections::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.8);
  border-radius: 8px;
}

.assignment-outline-sections::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.75);
  border-radius: 8px;
}

.outline-sec {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 255, 0.96) 100%);
  padding: 14px 14px 16px;
}

.outline-sec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.outline-sec-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  height: 1.45rem;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--brand-700);
  font-variant-numeric: tabular-nums;
}

.outline-field-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.outline-words-block {
  margin-bottom: 10px;
}

/* Must beat .assignment-maker-page .input-section textarea (topic box) — outline lives in same section */
.assignment-outline-aside .outline-sec input.outline-field-heading,
.assignment-outline-aside .outline-sec input.outline-field-words,
.assignment-outline-aside .outline-sec textarea.outline-field-desc {
  width: 100%;
  box-sizing: border-box;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  background-image: none;
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
  caret-color: var(--brand-600);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  min-height: 0;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.assignment-outline-aside .outline-sec input.outline-field-heading {
  padding: 10px 12px;
  margin-bottom: 12px;
}

.assignment-outline-aside .outline-sec input.outline-field-words {
  padding: 10px 12px;
  max-width: 160px;
}

.assignment-outline-aside .outline-sec textarea.outline-field-desc {
  padding: 12px 14px;
  min-height: 156px;
  line-height: 1.55;
}

.assignment-outline-aside .outline-sec input.outline-field-heading:focus,
.assignment-outline-aside .outline-sec input.outline-field-words:focus,
.assignment-outline-aside .outline-sec textarea.outline-field-desc:focus {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
  background-color: #ffffff;
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
}

.assignment-outline-aside .outline-sec input.outline-field-heading::placeholder,
.assignment-outline-aside .outline-sec textarea.outline-field-desc::placeholder {
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8;
}

.assignment-outline-aside .outline-sec input:-webkit-autofill,
.assignment-outline-aside .outline-sec input:-webkit-autofill:hover,
.assignment-outline-aside .outline-sec input:-webkit-autofill:focus,
.assignment-outline-aside .outline-sec textarea:-webkit-autofill,
.assignment-outline-aside .outline-sec textarea:-webkit-autofill:hover,
.assignment-outline-aside .outline-sec textarea:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  box-shadow: 0 0 0 1000px #ffffff inset;
  -webkit-text-fill-color: #0f172a;
  border-color: #cbd5e1;
}

.assignment-outline-actions {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.32);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.assignment-outline-actions .btn-outline-add {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--gray-300);
  background: #ffffff;
  color: var(--gray-700);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.assignment-outline-actions .btn-outline-add:hover:not(:disabled) {
  background: var(--gray-100);
  border-color: var(--gray-400);
}

.assignment-outline-actions .btn-outline-add:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.assignment-outline-actions .btn-outline-generate {
  flex: 1 1 auto;
  min-width: 160px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, var(--brand-600) 0%, #2d3d7a 100%);
  box-shadow: 0 4px 14px rgba(59, 77, 155, 0.26);
}

.assignment-outline-actions .btn-outline-generate:hover:not(:disabled) {
  filter: brightness(1.06);
}

.assignment-outline-actions .btn-outline-generate:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.assignment-outline-actions .btn-outline-ghost {
  margin-left: auto;
}

.btn-outline-ghost {
  background: #ffffff;
  color: var(--gray-600);
  border: 1px solid var(--gray-300);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-outline-ghost:hover {
  color: var(--gray-900);
  border-color: var(--gray-400);
  background: var(--gray-100);
}

.outline-sec-controls {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.outline-sec-btn {
  border: 1px solid var(--gray-300);
  background: #ffffff;
  color: var(--gray-700);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  font-family: inherit;
}

.outline-sec-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
}

.outline-sec-btn.danger {
  color: #991b1b;
  border-color: #fecaca;
  background: #fff1f2;
}

.outline-sec-btn.danger:hover {
  background: #ffe4e6;
  border-color: #fda4af;
}

.assignment-maker-hero {
  margin-bottom: 28px;
}

.assignment-maker-title {
  letter-spacing: -0.02em;
}

.assignment-maker-sub {
  color: var(--gray-600);
  font-size: 1.15rem;
}

.assignment-maker-intro {
  max-width: 44rem;
  margin: 0 auto;
}

.assignment-maker-intro .description {
  margin-bottom: 12px;
  line-height: 1.55;
  text-align: left;
}

.assignment-maker-lead {
  margin-bottom: 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(99, 102, 241, 0.12);
  font-size: 0.92rem;
  color: var(--gray-600);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
  text-align: center;
}

.assignment-input-card {
  position: relative;
  border-radius: 18px;
  padding: 28px 28px 26px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 16px 48px rgba(59, 77, 155, 0.1);
  overflow: hidden;
}

.assignment-input-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-600) 0%, #7b88d4 55%, #9aa7e8 100%);
  border-radius: 18px 18px 0 0;
}

.assignment-maker-page .input-section textarea#question {
  min-height: 220px;
  border-radius: 14px;
  border: 1px solid var(--gray-200);
  background: #fafbff;
  line-height: 1.55;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.assignment-maker-page .input-section textarea#question:focus {
  background: var(--white);
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.assignment-options-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px 20px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--gray-100);
}

.assignment-maker-page .assignment-options-meta .field-group input {
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.assignment-maker-page .assignment-options-meta .field-group input:focus {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.assignment-ai-removal-wrap {
  margin-top: 14px;
}

.assignment-ai-removal-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  padding: 5px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--gray-200);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.assignment-ai-mode {
  appearance: none;
  margin: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  line-height: 1.25;
  padding: 8px 18px;
  min-height: 44px;
  min-width: 7.5rem;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gray-700);
  cursor: pointer;
  text-wrap: balance;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.assignment-ai-mode:hover {
  color: var(--gray-900);
  background: rgba(248, 250, 252, 0.95);
}

.assignment-ai-mode:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}

.assignment-ai-mode.is-active {
  color: var(--white);
  background: linear-gradient(165deg, var(--brand-600) 0%, #2d3d7a 100%);
  border-color: rgba(59, 77, 155, 0.35);
  box-shadow: 0 3px 12px rgba(59, 77, 155, 0.25);
}

.assignment-ai-mode-tag {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.9;
}

.assignment-ai-mode.is-active .assignment-ai-mode-tag {
  opacity: 1;
}

.assignment-controls-bar.controls-row {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.98) 100%);
  border: 1px solid var(--gray-200);
  border-top: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.assignment-maker-page .assignment-controls-bar .btn-primary {
  min-width: 170px;
  padding: 12px 28px;
  border-radius: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(165deg, var(--brand-600) 0%, #2d3d7a 100%);
  box-shadow: 0 4px 16px rgba(59, 77, 155, 0.3);
  transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.assignment-maker-page .assignment-controls-bar .btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(59, 77, 155, 0.38);
  filter: brightness(1.03);
}

.assignment-maker-page .assignment-controls-bar #btn-generate.is-outline-building {
  position: relative;
  padding-left: 44px;
  min-width: 188px;
}

.assignment-maker-page .assignment-controls-bar #btn-generate.is-outline-building::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 15px;
  height: 15px;
  margin-top: -7.5px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #ffffff;
  animation: assignment-outline-spin 0.72s linear infinite;
}

.assignment-maker-page .current-orders-section {
  margin-top: 28px;
  padding: 20px 22px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--gray-200);
}

.assignment-maker-page .current-orders-section .landing-section-title {
  margin-top: 0;
  font-weight: 700;
  color: var(--gray-900);
}

.assignment-maker-page .multi-file-toggle-row {
  margin-top: 18px;
}

/* Controls row */
.controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}

/* Advanced model toggle (AI Humaniser) */
.advanced-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand-50);
}

.advanced-toggle-label {
  font-size: 0.9rem;
  color: var(--gray-600);
  font-weight: 500;
}

.advanced-toggle-button {
  position: relative;
  width: 70px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--brand-400);
  background: var(--white);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.advanced-toggle-button::before {
  content: "";
  position: absolute;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--brand-400);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  transition: transform 0.2s ease, background 0.2s ease;
}

.advanced-toggle-button span {
  position: relative;
  z-index: 1;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-700);
}

.advanced-toggle-button.is-on {
  background: var(--brand-600);
  border-color: var(--brand-600);
}

.advanced-toggle-button.is-on::before {
  transform: translateX(36px);
  background: #ffffff;
}

.advanced-toggle-button.is-on span {
  color: #ffffff;
}

.btn {
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
}

.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.btn-primary {
  background: var(--brand-600);
  color: var(--white);
  margin-left: auto;
}

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

.btn-primary:disabled {
  background: var(--gray-300);
  color: var(--gray-500);
  cursor: not-allowed;
  transform: none;
}

.word-count {
  font-size: 0.9rem;
  color: var(--gray-500);
}

/* How-to section */
.how-to {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--gray-200);
}

.how-to h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-900);
  text-align: center;
  margin: 0 0 28px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--white);
  padding: 20px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-600);
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 50%;
}

.step strong {
  display: block;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.step p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--gray-500);
  line-height: 1.5;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
  z-index: 1000;
  max-width: 90vw;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.toast.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Loading section (inline) */
.loading-section {
  margin-top: 24px;
  padding: 24px;
  background: var(--brand-50);
  border: 2px solid var(--brand-200);
  border-radius: var(--radius);
  animation: slideDown 0.3s ease-out;
}

.loading-inline {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.loading-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.loading-header > div {
  flex: 1;
}

.loading-header strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.loading-header p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.loading-steps-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--brand-200);
}

.loading-step-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--gray-500);
  transition: color 0.3s;
}

.loading-step-inline.active {
  color: var(--brand-600);
  font-weight: 500;
}

.loading-step-inline.completed {
  color: var(--gray-700);
}

.step-dot-inline {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray-300);
  flex-shrink: 0;
  transition: background 0.3s;
}

.loading-step-inline.active .step-dot-inline {
  background: var(--brand-600);
  animation: blink 1s ease-in-out infinite;
}

.loading-step-inline.completed .step-dot-inline {
  background: var(--brand-600);
  opacity: 1;
  animation: none;
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* Download section */
.download-section {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--brand-50);
  border: 2px solid var(--brand-200);
  border-radius: var(--radius);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.download-content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.success-icon {
  color: #10b981;
  flex-shrink: 0;
}

.download-content > div {
  flex: 1;
  min-width: 200px;
}

.download-content strong {
  display: block;
  color: var(--gray-900);
  font-size: 1rem;
  margin-bottom: 4px;
}

.download-content p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.btn-download {
  flex-shrink: 0;
  margin-left: auto;
}

@media (max-width: 640px) {
  .headline {
    font-size: 1.85rem;
  }

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

  .btn-primary {
    margin-left: 0;
  }

  .download-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-download {
    margin-left: 0;
    width: 100%;
  }

  .loading-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .loading-steps-inline {
    grid-template-columns: 1fr;
  }

  .welcome-text {
    display: none;
  }
}

/* Auth pages */
.auth-container {
  max-width: 440px;
  margin: 60px auto;
  padding: 0 24px;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 8px 24px rgba(63, 86, 160, 0.08);
  border: 1px solid var(--brand-100);
}

.auth-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 8px;
  text-align: center;
}

.auth-subtitle {
  text-align: center;
  color: var(--gray-500);
  margin: 0 0 32px;
  font-size: 0.95rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.9rem;
}

.form-group input {
  padding: 12px 16px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px var(--brand-100);
}

.form-hint {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: -4px;
}

.btn-full {
  width: 100%;
  margin-top: 8px;
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--gray-100);
}

.auth-footer p {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.9rem;
}

.auth-link {
  color: var(--brand-600);
  text-decoration: none;
  font-weight: 500;
}

.auth-link:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .auth-container {
    margin: 40px auto;
  }

  .auth-card {
    padding: 32px 24px;
  }

  .auth-title {
    font-size: 1.75rem;
  }
}

/* Admin dashboard */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.stat-card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brand-600);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-actions {
  margin-top: 32px;
  text-align: center;
}

.admin-pricing-form {
  max-width: 480px;
  margin-top: 24px;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}
.admin-pricing-row {
  margin-bottom: 20px;
}
.admin-pricing-row label {
  display: block;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.admin-pricing-row input[type="number"] {
  width: 120px;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 1rem;
}
.admin-pricing-hint {
  display: inline-block;
  margin-left: 12px;
  font-size: 0.9rem;
  color: var(--gray-600);
}
.admin-pricing-message {
  display: inline-block;
  margin-left: 12px;
  font-size: 0.9rem;
}

/* Site analytics page */
.analytics-page {
  max-width: 1500px;
}

.analytics-subtitle {
  margin: -8px auto 8px;
  text-align: center;
  color: var(--gray-600);
  max-width: 680px;
}

.analytics-stats-grid {
  margin-top: 22px;
}

.analytics-stat-card {
  border: 1px solid var(--gray-200);
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.06);
}

.analytics-table-card {
  margin-top: 24px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(31, 41, 55, 0.08);
  overflow: hidden;
}

.analytics-table-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-200);
  background: linear-gradient(180deg, #fbfcff 0%, #f5f7ff 100%);
}

.analytics-table-head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--gray-800);
}

.analytics-table-wrap {
  overflow-x: auto;
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.analytics-table thead th {
  padding: 12px 14px;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-600);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.analytics-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-800);
  font-size: 0.93rem;
  vertical-align: middle;
}

.analytics-table tbody tr:nth-child(even) {
  background: #fcfdff;
}

.analytics-table tbody tr:hover {
  background: #f6f9ff;
}

.analytics-code {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--gray-100);
  color: var(--gray-800);
  font-size: 0.83rem;
}

/* Users table */
.users-table-container {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  overflow-x: visible;
  margin-top: 32px;
  width: 100%;
}

.admin-users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.admin-user-card {
  padding: 20px 20px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-user-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

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

.admin-user-name {
  font-weight: 600;
  color: var(--gray-900);
}

.admin-user-username {
  font-size: 0.9rem;
  color: var(--gray-500);
}

.admin-user-email {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-top: 4px;
}

.admin-user-meta {
  text-align: right;
  font-size: 0.8rem;
  color: var(--gray-500);
}

.admin-user-id {
  display: block;
  font-weight: 500;
}

.admin-user-created {
  display: block;
  margin-top: 2px;
}

.admin-user-credits-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-user-wallet {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--gray-200);
}

.wallet-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.wallet-balance {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.95rem;
}

.wallet-balance-value {
  font-weight: 600;
  color: var(--gray-900);
}

.wallet-balance-suffix {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.admin-user-adjust-row {
  border-top: 1px dashed var(--gray-200);
  padding-top: 12px;
}

.admin-user-adjust-title {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
}

.admin-user-usage-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--gray-200);
  font-size: 0.85rem;
  color: var(--gray-600);
}

.admin-user-usage-item {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
}

.usage-label {
  font-weight: 500;
}

.usage-value {
  font-weight: 600;
  color: var(--gray-900);
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  table-layout: auto;
}

.users-table th {
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid var(--gray-200);
  font-weight: 600;
  color: var(--gray-700);
  background: var(--gray-50);
  white-space: nowrap;
}

.users-table th:nth-child(1) { width: 5%; }  /* ID */
.users-table th:nth-child(2) { width: 12%; } /* Name */
.users-table th:nth-child(3) { width: 12%; } /* Username */
.users-table th:nth-child(4) { width: 20%; } /* Email */
.users-table th:nth-child(5) { width: 8%; }  /* Credits */
.users-table th:nth-child(6) { width: 10%; } /* Created */
.users-table th:nth-child(7) { width: 33%; } /* Actions */

.users-table td {
  padding: 12px;
  border-bottom: 1px solid var(--gray-100);
  word-wrap: break-word;
}

.users-table tr:hover {
  background: var(--brand-50);
}

.admin-badge {
  display: inline-block;
  background: var(--brand-600);
  color: var(--white);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 600;
}

.credit-cell {
  font-weight: 600;
  color: var(--brand-600);
}

.credit-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.credit-controls.two-columns {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.credit-control-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
}

.credit-control-group:last-child {
  border-bottom: none;
}

.credit-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  min-width: 72px;
}

.credit-input {
  width: 120px;
  padding: 6px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.reason-input {
  flex: 1;
  min-width: 200px;
  padding: 6px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.btn-small {
  padding: 6px 16px;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .users-table-container {
    padding: 16px;
  }

  .users-table {
    font-size: 0.85rem;
  }

  .users-table th,
  .users-table td {
    padding: 8px 4px;
  }

  .credit-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .credit-input,
  .reason-input {
    width: 100%;
  }
}

/* ==================== LANDING PAGE ==================== */
/* Full-width layout: no max-width on main container */
.landing-page {
  background: linear-gradient(165deg, #e8eeff 0%, #f0f4fc 25%, #fafbff 50%, #f0f4fc 75%, #e8eeff 100%);
  overflow-x: hidden;
  width: 100%;
}

/* Landing animations */
@keyframes landing-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes landing-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes landing-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 8px 48px;
  min-height: 46px;
  box-sizing: border-box;
  width: 100%;
  overflow: visible;
  background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-600) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 24px rgba(43, 62, 114, 0.24);
  animation: landing-fade-in 0.5s ease-out;
}

/* Unified blue header style across public + logged-in pages */
.main-header .nav-tool-link,
.landing-header .nav-tool-link,
.main-header .nav-tools-trigger,
.landing-header .nav-tools-trigger,
.main-header .header-dropdown-trigger,
.landing-header .header-dropdown-trigger,
.main-header .welcome-text,
.landing-header .landing-auth a {
  color: rgba(255, 255, 255, 0.95);
}

.main-header .nav-tool-link:hover,
.landing-header .nav-tool-link:hover,
.main-header .nav-tools-trigger:hover,
.landing-header .nav-tools-trigger:hover,
.main-header .header-dropdown-trigger:hover,
.landing-header .header-dropdown-trigger:hover,
.landing-header .landing-auth a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.main-header .nav-tool-link.active,
.landing-header .nav-tool-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

.landing-header .landing-auth .landing-btn-nav {
  color: var(--brand-800) !important;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.22);
}

.landing-header .landing-auth .landing-btn-nav:hover {
  color: var(--brand-900) !important;
  background: #eef4ff;
}

/* Use circular logo on the unified blue header across pages */
.main-header .logo-landscape,
.landing-header .logo-landscape {
  display: none;
}

.main-header .logo-circle,
.landing-header .logo-circle {
  display: block;
  height: 44px;
  width: 44px;
}

.landing-header .header-head-left {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-start;
  min-width: 0;
}

.landing-header .header-nav-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.landing-header .header-head-right {
  flex: 0 0 auto;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.landing-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--gray-900);
  text-decoration: none;
  overflow: visible;
}

.landing-logo:hover {
  color: var(--brand-600);
}

.landing-logo .logo-img {
  height: 44px;
}

.landing-logo .logo-landscape {
  height: 36px;
  max-width: 160px;
  transform: scale(5);
  transform-origin: left center;
}

.landing-logo .logo-circle {
  height: 40px;
  width: 40px;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.landing-nav > a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.landing-nav > a:hover {
  background: var(--brand-50);
}

.landing-auth {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: nowrap;
}

.landing-auth a {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.landing-auth a:hover {
  color: var(--brand-600);
}

/* Public landing header account dropdown (three dots) */
.landing-account-dropdown {
  display: none;
}

.landing-account-dropdown .header-dropdown-menu {
  min-width: 220px;
}

.landing-tools-dropdown-wrap {
  position: relative;
}

.landing-tools-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-700);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.landing-tools-trigger[aria-expanded="true"],
.landing-tools-trigger:hover {
  color: var(--brand-600);
  background: var(--brand-50);
}

.landing-tools-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  min-width: 200px;
  padding: 8px 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12);
  display: none;
  z-index: 1100;
  animation: dropdown-fade-in 0.2s ease-out;
}

.landing-tools-dropdown.is-open {
  display: block;
}

.landing-tools-item {
  display: block;
  padding: 10px 16px;
  font-size: 0.95rem;
  color: var(--gray-700);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.landing-tools-item:hover {
  background: var(--brand-50);
  color: var(--brand-600);
}

.landing-tools-item.tools-item-coming-soon {
  color: var(--gray-500);
  cursor: default;
  pointer-events: none;
}

.landing-tools-item.tools-item-coming-soon em {
  display: block;
  font-size: 0.75rem;
  font-style: normal;
  color: var(--gray-500);
  margin-top: 2px;
}

.landing-nav a {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.landing-nav a:hover {
  color: var(--brand-600);
}

.landing-btn-nav {
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%);
  color: var(--white) !important;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(63, 86, 160, 0.25);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.landing-btn-nav:hover {
  background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-800) 100%);
  box-shadow: 0 4px 14px rgba(63, 86, 160, 0.35);
  transform: translateY(-1px);
}

.landing-main {
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.landing-hero {
  text-align: center;
  padding: 64px 48px 72px;
  background: linear-gradient(160deg, rgba(255,255,255,0.95) 0%, var(--brand-50) 40%, rgba(255,255,255,0.9) 100%);
  margin-bottom: 0;
  width: 100%;
  box-sizing: border-box;
  border-bottom: 1px solid var(--brand-100);
  position: relative;
  overflow: hidden;
}

.landing-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 120%;
  background: radial-gradient(ellipse, rgba(63, 86, 160, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.landing-hero-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.25;
  margin: 0 0 12px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  animation: landing-fade-in-up 0.7s ease-out both;
}

.landing-hero-title .hero-accent {
  color: var(--brand-600);
}

.landing-hero-tagline {
  margin: 0 0 36px;
  font-size: 1.1rem;
  color: var(--gray-600);
  line-height: 1.6;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  animation: landing-fade-in-up 0.7s ease-out 0.15s both;
}

/* Hero stats strip */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 24px 40px;
  margin: 32px auto 40px;
  padding: 24px 40px;
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%);
  border-radius: var(--radius);
  color: var(--white);
  box-shadow: 0 12px 40px rgba(63, 86, 160, 0.35);
  width: 100%;
  max-width: 960px;
  box-sizing: border-box;
  position: relative;
  animation: landing-fade-in-up 0.7s ease-out 0.3s both;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-stats:hover {
  box-shadow: 0 16px 48px rgba(63, 86, 160, 0.4);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero-stat-stars {
  font-size: 1.25rem;
  letter-spacing: 2px;
  color: #fbbf24;
  display: inline-flex;
  align-items: center;
}

.hero-stat-stars-full {
  letter-spacing: 2px;
}

.hero-stat-star-half {
  display: inline-block;
  width: 0.55em;
  overflow: hidden;
  margin-left: 2px;
}

.hero-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero-stat-label {
  font-size: 0.85rem;
  opacity: 0.95;
}

/* Testimonials */
.hero-testimonials {
  margin-bottom: 36px;
  text-align: left;
  position: relative;
  animation: landing-fade-in 0.6s ease-out 0.25s both;
}

.landing-testimonials-cta {
  padding-top: 8px;
  padding-bottom: 8px;
}

.landing-testimonials-cta .landing-hero-btns {
  margin-top: 10px;
  margin-bottom: 26px; /* space before the blue benefits strip */
}

.hero-testimonials-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-700);
  text-align: center;
  margin: 0 0 20px;
}

.hero-testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.hero-testimonial {
  margin: 0;
  padding: 20px 20px 20px 24px;
  border-radius: var(--radius);
  border-left: 4px solid;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  animation: landing-fade-in-up 0.6s ease-out both;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-testimonial:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.hero-testimonial:nth-child(1) { animation-delay: 0.35s; }
.hero-testimonial:nth-child(2) { animation-delay: 0.45s; }
.hero-testimonial:nth-child(3) { animation-delay: 0.55s; }

.hero-testimonial-1 {
  border-left-color: var(--brand-600);
  background: linear-gradient(135deg, var(--white) 0%, var(--brand-50) 100%);
}

.hero-testimonial-2 {
  border-left-color: #059669;
  background: linear-gradient(135deg, var(--white) 0%, #ecfdf5 100%);
}

.hero-testimonial-3 {
  border-left-color: #7c3aed;
  background: linear-gradient(135deg, var(--white) 0%, #f5f3ff 100%);
}

.hero-testimonial-text {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: var(--gray-700);
  line-height: 1.55;
}

.hero-testimonial-author {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
}

.landing-hero-sub {
  font-size: 1.1rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin: 0 0 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.landing-hero-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: landing-fade-in-up 0.7s ease-out 0.5s both;
}

.landing-mobile-auth-cta {
  display: none;
}

.landing-tools-bottom-bar {
  margin-top: 18px;
  padding-top: 22px;
  border-top: 1px solid var(--gray-200);
}

.btn-landing {
  display: inline-block;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.btn-landing:hover {
  transform: translateY(-2px);
}

.btn-landing:active {
  transform: scale(0.98);
}

.btn-landing-primary {
  background: var(--brand-600);
  color: var(--white);
}

.btn-landing-primary:hover {
  background: var(--brand-700);
}

.btn-landing-secondary {
  background: var(--white);
  color: var(--brand-600);
  border: 2px solid var(--brand-200);
}

.btn-landing-secondary:hover {
  background: var(--brand-50);
  border-color: var(--brand-600);
}

.landing-section-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-900);
  text-align: center;
  margin: 0 0 32px;
}

.landing-tools-heading {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  margin: 0 0 36px;
  letter-spacing: -0.02em;
  color: var(--gray-900);
}

.tools-heading-accent {
  color: var(--brand-600);
}

/* Why choose us — benefits strip (full width) */
.landing-benefits {
  width: 100%;
  padding: 32px 48px;
  background: linear-gradient(90deg, var(--brand-600) 0%, var(--brand-700) 100%);
  color: var(--white);
  box-sizing: border-box;
  animation: landing-fade-in 0.6s ease-out 0.4s both;
}

.landing-benefits-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px 56px;
  max-width: 1000px;
  margin: 0 auto;
}

.landing-benefit {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1rem;
  font-weight: 500;
  transition: transform 0.25s ease;
}

.landing-benefit:hover {
  transform: translateY(-2px);
}

.landing-benefit-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
  flex-shrink: 0;
}

.landing-benefit-text {
  opacity: 0.98;
}

/* Landing tools sections */
.landing-tools-sections {
  max-width: 1200px;
  margin: 40px auto 32px;
  padding: 0 56px;
  box-sizing: border-box;
}

.tool-section {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1.1fr);
  gap: 32px;
  padding: 24px 24px 28px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(63, 86, 160, 0.06);
  border: 1px solid var(--brand-100);
  position: relative;
}

.tool-section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: var(--tool-accent, var(--brand-600));
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.tool-section-humaniser {
  grid-template-columns: minmax(0, 1fr);
  --tool-accent: var(--brand-600);
}

.tool-section-drillbit {
  --tool-accent: var(--brand-700);
}

.tool-section-assignment {
  --tool-accent: var(--brand-800);
}

.tool-section-references {
  --tool-accent: var(--brand-400);
}

.tool-section-assignment,
.tool-section-references {
  align-items: center;
}

.tool-section-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-section-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gray-900);
}

.tool-section-subtitle {
  margin: -2px 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-600);
  line-height: 1.4;
}

.tool-section-text {
  margin: 0;
  font-size: 0.98rem;
  color: var(--gray-700);
  line-height: 1.7;
}

.assignment-logos-row {
  margin-top: 20px;
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.assignment-logos-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.assignment-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: flex-end;
}

.assignment-logo-image {
  height: 72px;
  width: auto;
  object-fit: contain;
  filter: grayscale(0.1) drop-shadow(0 6px 14px rgba(15, 23, 42, 0.18));
}

.assignment-logo-right {
  width: 100%;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
}

.assignment-logo-image-right {
  height: clamp(170px, 18vw, 280px);
  max-width: 100%;
  object-fit: contain;
  margin-left: auto;
}

.trusted-by-right {
  margin-top: 26px;
  text-align: right;
}

/* References Finder (landing): USA logo on the right */
.tool-section-references {
  /* Use the same 2-column grid as `.tool-section` */
  align-items: center;
}

.tool-section-references .tool-section-copy {
  grid-column: 1;
  justify-self: end;
  width: 100%;
  max-width: 580px;
  text-align: left;
  align-items: flex-start;
}

.tool-section-references .trusted-by-right {
  text-align: left;
}

.tool-section-references .tool-section-text {
  text-align: justify;
  text-justify: inter-word;
}

.tool-section-references .tool-section-visual {
  display: flex;
  grid-column: 2;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
}

.tool-section-references .assignment-logo-right {
  min-height: 240px;
  width: 100%;
  align-items: stretch;
  justify-content: center;
}

.tool-section-references .assignment-logo-image-right {
  width: 100%;
  height: auto;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  object-fit: contain;
}

.drillbit-logo-wrap {
  margin-top: 18px;
  display: flex;
  justify-content: flex-start;
}

.drillbit-logo-image {
  max-width: 260px;
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 26px rgba(15, 23, 42, 0.18));
}

.tool-drillbit-card {
  width: 100%;
  max-width: 520px;
  padding: 20px 18px 16px;
  border-radius: 18px;
  background: linear-gradient(150deg, #e0f2fe 0%, #eef2ff 40%, #ffffff 100%);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.35);
  display: grid;
  gap: 12px;
}

.tool-drillbit-logo-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.tool-drillbit-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.tool-drillbit-screen-wrap {
  border-radius: 14px;
  overflow: hidden;
  background: #f9fafb;
}

.tool-drillbit-screen {
  width: 100%;
  height: auto;
  display: block;
}

.tool-section-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-section-visual-full {
  grid-column: 1 / -1;
  margin-top: 12px;
}

.tool-ai-check-card {
  width: 100%;
  max-width: 780px;
  padding: 20px 20px 18px;
  border-radius: 18px;
  background: linear-gradient(145deg, #e0f2fe 0%, #eef2ff 45%, #f9fafb 100%);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.tool-ai-check-card-large {
  max-width: 100%;
}

.tool-ai-check-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand-800);
}

.tool-ai-check-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tool-ai-check-large-image-wrap {
  width: 100%;
}

.tool-ai-check-image-large {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.tool-ai-check-figure {
  margin: 0;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.tool-ai-check-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.tool-ai-check-figure figcaption {
  margin-top: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-700);
}

.tool-ai-check-note {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--gray-600);
}

@media (max-width: 960px) {
  .landing-tools-sections {
    padding: 0 24px;
  }

  .tool-section {
    grid-template-columns: minmax(0, 1fr);
  }
}

.landing-features {
  padding: 64px 48px 72px;
  background: linear-gradient(180deg, var(--white) 0%, var(--brand-50) 20%, var(--brand-50) 80%, var(--white) 100%);
  width: 100%;
  box-sizing: border-box;
}

.landing-features .landing-section-title {
  animation: landing-fade-in-up 0.6s ease-out both;
}

.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
}

.landing-feature-card {
  background: var(--white);
  padding: 28px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.2s ease;
  min-height: 200px;
  animation: landing-fade-in-up 0.6s ease-out both;
}

.landing-feature-card:nth-child(1) { animation-delay: 0.1s; }
.landing-feature-card:nth-child(2) { animation-delay: 0.2s; }
.landing-feature-card:nth-child(3) { animation-delay: 0.3s; }

.landing-feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(63, 86, 160, 0.15);
  border-color: var(--brand-200);
}

.landing-feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-50);
  color: var(--brand-600);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.landing-feature-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 8px;
}

.landing-feature-desc {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin: 0;
}

.landing-how {
  padding: 56px 48px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
  width: 100%;
  box-sizing: border-box;
}

.landing-how .landing-section-title {
  animation: landing-fade-in 0.6s ease-out both;
}

.landing-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 36px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.landing-step {
  text-align: center;
  animation: landing-fade-in-up 0.5s ease-out both;
}

.landing-step:nth-child(1) { animation-delay: 0.1s; }
.landing-step:nth-child(2) { animation-delay: 0.2s; }
.landing-step:nth-child(3) { animation-delay: 0.3s; }

.landing-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--brand-600);
  color: var(--white);
  font-weight: 700;
  font-size: 1.2rem;
  border-radius: 50%;
  margin-bottom: 16px;
  transition: transform 0.25s ease;
}

.landing-step:hover .landing-step-num {
  transform: scale(1.08);
}

.landing-step-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 8px;
}

.landing-step-desc {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin: 0;
}

.landing-who {
  padding: 56px 48px;
  border-top: 1px solid var(--gray-200);
  background: linear-gradient(180deg, var(--white) 0%, var(--brand-50) 100%);
  width: 100%;
  box-sizing: border-box;
}

.landing-who-text {
  text-align: center;
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
}

.landing-cta {
  text-align: center;
  padding: 64px 48px;
  background: linear-gradient(135deg, var(--brand-50) 0%, var(--white) 50%, var(--brand-50) 100%);
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid var(--brand-100);
  box-shadow: 0 -4px 24px rgba(63, 86, 160, 0.08);
}

.landing-cta-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 24px;
}

.btn-landing-cta {
  background: var(--brand-600);
  color: var(--white);
  padding: 14px 32px;
  font-size: 1.05rem;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.btn-landing-cta:hover {
  background: var(--brand-700);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(63, 86, 160, 0.35);
}

.landing-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 48px;
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.landing-footer-copy {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin: 0;
}

.landing-footer-links {
  display: flex;
  gap: 20px;
}

.landing-footer-links a {
  color: var(--gray-600);
  text-decoration: none;
  font-size: 0.9rem;
}

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

/* ==================== PRICING PAGE ==================== */
.page-main {
  width: 100%;
  box-sizing: border-box;
}

.pricing-page .pricing-hero {
  text-align: center;
  padding: 64px 48px 48px;
  background: linear-gradient(160deg, rgba(255,255,255,0.98) 0%, var(--brand-50) 100%);
  border-bottom: 1px solid var(--brand-100);
  animation: landing-fade-in 0.5s ease-out;
}

.pricing-hero-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 12px;
}

.pricing-hero-title .hero-accent {
  color: var(--brand-600);
}

.pricing-hero-tagline {
  font-size: 1.1rem;
  color: var(--gray-600);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 56px 48px;
  width: 100%;
  box-sizing: border-box;
}

.pricing-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.2s ease;
  animation: landing-fade-in-up 0.6s ease-out both;
}

.pricing-card:nth-child(1) { animation-delay: 0.1s; }
.pricing-card:nth-child(2) { animation-delay: 0.2s; }

.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(63, 86, 160, 0.12);
  border-color: var(--brand-200);
}

@media (min-width: 769px) {
  .pricing-card-humaniser {
    order: 1;
  }

  .pricing-card-drillbit {
    order: 2;
  }

  .pricing-card-assignment {
    order: 3;
  }
}

.pricing-card-badge {
  display: block;
  width: fit-content;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--brand-700);
  background: var(--brand-100);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  margin: 0 auto 16px;
  text-align: center;
  letter-spacing: 0.01em;
}

.pricing-card-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 12px;
}

.pricing-card-desc {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin: 0 0 20px;
}

.pricing-card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.pricing-card-features li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: var(--gray-700);
  line-height: 1.5;
}

.pricing-card-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-600);
  font-weight: 700;
}

.pricing-card-cta {
  display: inline-block;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.pricing-buy-box {
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 14px 14px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--brand-50) 0%, var(--white) 100%);
  border: 1px solid var(--brand-100);
}
.pricing-buy-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0 0 10px;
}
.pricing-buy-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.pricing-buy-words,
.pricing-buy-amount-input {
  width: 120px;
  padding: 9px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 1rem;
}
.pricing-buy-total {
  font-weight: 700;
  color: var(--brand-700);
  font-size: 1.15rem;
}
.pricing-buy-btn {
  margin-top: 4px;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

.pricing-drillbit-box {
  margin-top: 20px;
  margin-bottom: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
}

.pricing-drillbit-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-700);
  line-height: 1;
}

.pricing-rate-suffix {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-left: 2px;
}

.pricing-wallet-rate-note {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--gray-600);
}

.pricing-coupon-note {
  margin: -4px 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--brand-50) 0%, var(--white) 100%);
  border: 1px solid var(--brand-100);
}

.pricing-coupon-title {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand-700);
}

.pricing-coupon-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--gray-700);
}

.pricing-coupon-text a {
  color: var(--brand-700);
  font-weight: 700;
  text-decoration: none;
}

.pricing-coupon-text a:hover {
  text-decoration: underline;
}
.pricing-buy-msg {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  min-height: 1.2em;
}

.pricing-buy-note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--gray-600);
}

/* Payment success toast */
.payment-success-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 9999;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  opacity: 0;
  max-width: min(480px, calc(100vw - 32px));
  width: 100%;
}
.payment-success-toast.payment-success-toast-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.payment-success-toast-inner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(5, 150, 105, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.payment-success-toast-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.1rem;
}
.payment-success-toast-body {
  flex: 1;
  min-width: 0;
}
.payment-success-toast-title {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.payment-success-toast-message {
  margin: 0 0 8px;
  font-size: 0.95rem;
  opacity: 0.95;
  line-height: 1.4;
}
.payment-success-toast-balances {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.9;
}
.payment-success-toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  border-radius: 4px;
}
.payment-success-toast-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Full-screen payment processing overlay */
.payment-processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(4px);
}
.payment-processing-overlay[hidden] {
  display: none;
}
.payment-processing-card {
  width: min(480px, 100%);
  border-radius: 16px;
  background: linear-gradient(155deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.26);
  padding: 26px 24px 22px;
  text-align: center;
}
.payment-processing-spinner {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 999px;
  border: 4px solid rgba(59, 130, 246, 0.2);
  border-top-color: #2563eb;
  animation: payment-spin 0.9s linear infinite;
}
.payment-processing-title {
  margin: 0;
  font-size: 1.08rem;
  color: #0f172a;
  font-weight: 700;
}
.payment-processing-subtitle {
  margin: 8px 0 0;
  font-size: 0.93rem;
  color: #334155;
  line-height: 1.45;
}
@keyframes payment-spin {
  to { transform: rotate(360deg); }
}

/* Drillbit page: payment success toast (in-page, no alert) */
.drillbit-payment-success-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 9999;
  transition: transform 0.35s ease-out, opacity 0.35s ease-out;
  opacity: 0;
  max-width: min(520px, calc(100vw - 32px));
  width: 100%;
  pointer-events: auto;
}
.drillbit-payment-success-toast[hidden] {
  pointer-events: none;
}
.drillbit-payment-success-toast.drillbit-payment-success-toast-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.drillbit-payment-success-toast-inner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(5, 150, 105, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.drillbit-payment-success-toast-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.2rem;
}
.drillbit-payment-success-toast-body {
  flex: 1;
  min-width: 0;
}
.drillbit-payment-success-toast-title {
  display: block;
  font-size: 1.1rem;
  margin: 0 0 6px;
  font-weight: 600;
}
.drillbit-payment-success-toast-message {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.95;
  line-height: 1.45;
}
.drillbit-payment-success-toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  border-radius: 6px;
}
.drillbit-payment-success-toast-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Drillbit high-risk (AI/plagiarism) helper toast */
.drillbit-risk-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  transform: translateY(120%);
  z-index: 9999;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  opacity: 0;
  max-width: 360px;
  width: 100%;
  pointer-events: auto;
}
.drillbit-risk-toast[hidden] {
  pointer-events: none;
}
.drillbit-risk-toast.drillbit-risk-toast-visible {
  transform: translateY(0);
  opacity: 1;
}
.drillbit-risk-toast-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background: var(--white);
  color: var(--gray-900);
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  border: 1px solid var(--gray-200);
}
.drillbit-risk-toast-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  font-weight: 700;
  font-size: 1.1rem;
}
.drillbit-risk-toast-body {
  flex: 1;
  min-width: 0;
}
.drillbit-risk-toast-title {
  display: block;
  font-size: 0.98rem;
  margin: 0 0 4px;
  font-weight: 600;
}
.drillbit-risk-toast-message {
  margin: 0 0 10px;
  font-size: 0.9rem;
  opacity: 0.96;
}
.drillbit-risk-toast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.drillbit-risk-btn-primary {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--brand-600);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.drillbit-risk-btn-primary:hover {
  background: var(--brand-700);
  color: var(--white);
}
.drillbit-risk-btn-secondary {
  padding: 7px 12px 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  font-size: 0.85rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.drillbit-risk-btn-secondary:hover {
  background: var(--gray-50);
  color: var(--gray-900);
}
.drillbit-risk-link {
  font-size: 0.8rem;
  color: var(--brand-600);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.drillbit-risk-link:hover {
  color: var(--brand-700);
  text-decoration: underline;
}
.drillbit-risk-action-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-600);
  border: 1px solid var(--brand-100);
  box-shadow: 0 2px 8px rgba(63, 86, 160, 0.08);
}
.drillbit-risk-action-icon-img {
  width: 16px;
  height: 16px;
  display: block;
  object-fit: contain;
}
.drillbit-risk-link .drillbit-risk-action-icon {
  width: 24px;
  height: 24px;
}
.drillbit-risk-action-icon-whatsapp {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #16a34a;
}
.drillbit-risk-action-icon-email {
  background: var(--brand-50);
  border-color: var(--brand-100);
  color: var(--brand-600);
}
.drillbit-risk-toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--gray-500);
  font-size: 1.3rem;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
  border-radius: 6px;
}
.drillbit-risk-toast-close:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.pricing-faq {
  padding: 56px 48px;
  background: linear-gradient(180deg, var(--white) 0%, var(--brand-50) 100%);
  width: 100%;
  box-sizing: border-box;
}

.pricing-faq .landing-section-title {
  animation: landing-fade-in 0.5s ease-out both;
}

.pricing-faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.pricing-faq-item {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  animation: landing-fade-in-up 0.5s ease-out both;
}

.pricing-faq-item:nth-child(1) { animation-delay: 0.1s; }
.pricing-faq-item:nth-child(2) { animation-delay: 0.2s; }
.pricing-faq-item:nth-child(3) { animation-delay: 0.3s; }

.pricing-faq-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 10px;
}

.pricing-faq-item p {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin: 0;
}

.pricing-cta {
  text-align: center;
  padding: 56px 48px;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
}

/* ==================== TOOL PAGE ==================== */
.tool-split {
  padding: 40px 24px 48px;
  background: linear-gradient(180deg, var(--brand-50) 0%, var(--gray-50) 100%);
  border-bottom: 1px solid var(--brand-100);
  animation: landing-fade-in 0.5s ease-out;
}

.tool-split-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}

@media (min-width: 900px) {
  .tool-split-inner {
    grid-template-columns: 380px 1fr;
    gap: 56px;
    align-items: stretch;
  }
}

@media (min-width: 1100px) {
  .tool-split-inner {
    grid-template-columns: 420px 1fr;
  }
}

.tool-about {
  position: sticky;
  top: 72px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px 36px;
  border: 1px solid var(--gray-200);
  box-shadow: 0 4px 24px rgba(63, 86, 160, 0.06);
  border-left: 4px solid var(--brand-600);
}

@media (min-width: 900px) {
  .tool-about {
    padding: 40px 36px 44px;
  }
}

.tool-about-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 14px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.tool-about-tagline {
  font-size: 1.15rem;
  color: var(--brand-700);
  font-weight: 500;
  margin: 0 0 24px;
  line-height: 1.5;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-100);
}

.tool-about-desc {
  font-size: 1.05rem;
  color: var(--gray-700);
  line-height: 1.7;
  margin: 0 0 24px;
}

.tool-about-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tool-about-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 14px;
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.55;
}

.tool-about-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--brand-600);
  font-weight: 700;
  font-size: 1.1rem;
}

.tool-privacy-card {
  margin-top: 24px;
  padding: 18px 18px 16px;
  background: linear-gradient(180deg, var(--brand-50) 0%, var(--white) 100%);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-sm);
}

.tool-privacy-title {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--brand-700);
}

.tool-privacy-text {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--gray-700);
  line-height: 1.6;
}

.tool-privacy-text:last-child {
  margin-bottom: 0;
}

.tool-content {
  padding: 40px 24px 56px;
  width: 100%;
  box-sizing: border-box;
  background: var(--gray-50);
}

.tool-content-inner {
  max-width: 720px;
  margin: 0 auto;
}

.tool-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 8px;
}

@media (min-width: 640px) {
  .tool-info-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.tool-feature-block {
  margin-bottom: 0;
  animation: landing-fade-in-up 0.5s ease-out both;
}

.tool-feature-block.tool-feature-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.tool-feature-block:nth-child(1) { animation-delay: 0.05s; }
.tool-feature-block:nth-child(2) { animation-delay: 0.1s; }

.tool-feature-heading,
.tool-feature-block h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.tool-feature-block p {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.65;
  margin: 0;
}

.tool-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tool-feature-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: var(--gray-700);
  line-height: 1.5;
}

.tool-feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-600);
  font-weight: 700;
}

.tool-cta-block {
  margin-top: 32px;
  text-align: center;
  animation: landing-fade-in-up 0.5s ease-out 0.2s both;
}

.btn-landing-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
}

.tool-other {
  padding: 40px 24px 48px;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  width: 100%;
  box-sizing: border-box;
}

.tool-other .landing-section-title {
  animation: landing-fade-in 0.5s ease-out both;
}

.tool-other-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.tool-other-card {
  display: inline-block;
  padding: 14px 24px;
  background: var(--white);
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.tool-other-card:hover {
  background: var(--brand-50);
  color: var(--brand-600);
  border-color: var(--brand-200);
  transform: translateY(-2px);
}

.tool-nav-active {
  background: var(--brand-50);
  color: var(--brand-600);
  font-weight: 600;
}

/* ----- Tool page: tool input form ----- */
.tool-try {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tool-form-card {
  background: var(--white);
  border-radius: 16px;
  padding: 28px 24px 24px;
  box-shadow: 0 8px 32px rgba(63, 86, 160, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--gray-200);
  flex: 1;
  min-width: 0;
}

@media (min-width: 900px) {
  .tool-form-card {
    padding: 32px 28px 28px;
  }
}

.tool-demo-form {
  max-width: 100%;
  margin: 0;
}

.tool-demo-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 10px;
}

.tool-demo-textarea,
.tool-demo-input {
  width: 100%;
  padding: 16px 18px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--gray-900);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  margin-bottom: 22px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
}

.tool-demo-textarea:hover,
.tool-demo-input:hover {
  border-color: var(--gray-300);
}

.tool-demo-textarea:focus,
.tool-demo-input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(63, 86, 160, 0.18);
  background: var(--white);
}

.tool-demo-textarea::placeholder,
.tool-demo-input::placeholder {
  color: var(--gray-500);
}

.tool-demo-textarea {
  min-height: 120px;
  resize: vertical;
}

.tool-demo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.tool-demo-field {
  margin-bottom: 0;
}

.tool-demo-field-inline {
  max-width: 220px;
}

.tool-demo-btn {
  display: inline-block;
  width: 100%;
  padding: 16px 28px;
  font-family: inherit;
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 14px rgba(63, 86, 160, 0.3);
}

.tool-demo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(63, 86, 160, 0.4);
}

.tool-demo-btn:active {
  transform: translateY(0);
}

.tool-demo-btn-inline {
  width: auto;
  text-decoration: none;
}

.tool-demo-static {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.98rem;
  color: var(--gray-900);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  margin-bottom: 22px;
}

.tool-demo-drillbit-upload {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  margin-bottom: 22px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--brand-50) 0%, var(--white) 100%);
  border: 1px solid var(--brand-200);
}

.tool-demo-drillbit-upload-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-600);
  background: rgba(63, 86, 160, 0.1);
  border-radius: 14px;
}

.tool-demo-drillbit-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--gray-900);
}

.tool-demo-drillbit-subtitle {
  margin: 0;
  font-size: 0.93rem;
  color: var(--gray-600);
  line-height: 1.6;
}

.tool-demo-drillbit-grid {
  margin-bottom: 2px;
}

.tool-demo-turnitin-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.tool-demo-turnitin-real-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.tool-demo-turnitin-real-title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.1;
  color: #121a30;
}

.tool-demo-turnitin-real-title span {
  color: var(--brand-600);
}

.tool-demo-turnitin-real-subtitle {
  margin: 0 0 16px;
  color: var(--gray-700);
  font-size: 0.98rem;
}

.tool-demo-turnitin-queue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #bbe9d7;
  background: #ecfdf4;
  color: #0b6b49;
}

.tool-demo-turnitin-queue-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.66rem;
  font-weight: 700;
}

.tool-demo-turnitin-queue-count {
  font-size: 1.1rem;
  line-height: 1;
}

.tool-demo-turnitin-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--brand-700);
  background: linear-gradient(180deg, var(--brand-50) 0%, #eef2ff 100%);
  border: 1px solid var(--brand-200);
}

.tool-demo-drillbit-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  margin-bottom: 24px;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  box-shadow: 0 4px 18px rgba(63, 86, 160, 0.06);
}

.tool-demo-auth-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 640px) {
  .tool-demo-drillbit-price {
    flex-direction: column;
    align-items: stretch;
  }
  .tool-demo-auth-actions {
    width: 100%;
    justify-content: stretch;
  }
  .tool-demo-auth-actions .tool-demo-btn-inline {
    flex: 1;
    text-align: center;
  }
}

.tool-demo-price-label {
  margin: 0 0 4px;
  font-size: 0.85rem;
  color: var(--gray-500);
}

.tool-demo-price-value {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--gray-700);
}

.tool-demo-drillbit-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  background: var(--white);
}

.tool-demo-turnitin-landing .tool-demo-drillbit-table-wrap {
  border-color: #d9e1ff;
  box-shadow: 0 8px 24px rgba(63, 86, 160, 0.06);
}

.tool-demo-turnitin-sample-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 6px 0 10px;
}

.tool-demo-turnitin-sample-title {
  margin: 0 0 3px;
  font-size: 1.12rem;
  color: var(--gray-900);
}

.tool-demo-turnitin-sample-note {
  margin: 0;
  font-size: 0.84rem;
  color: var(--gray-600);
}

.tool-demo-turnitin-sample-search {
  min-width: 160px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--gray-50);
  color: var(--gray-500);
  font-size: 0.84rem;
  padding: 9px 12px;
  text-align: left;
}

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

.tool-demo-drillbit-table th,
.tool-demo-drillbit-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
  white-space: nowrap;
}

.tool-demo-drillbit-table th {
  background: var(--gray-50);
  color: var(--gray-700);
  font-weight: 600;
}

.tool-demo-drillbit-table tbody tr:last-child td {
  border-bottom: none;
}

.tool-demo-empty-state {
  text-align: center;
  font-size: 0.93rem;
  color: var(--gray-600);
  line-height: 1.6;
  white-space: normal !important;
  padding: 24px 16px !important;
}

.tool-demo-score-ready {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.tool-demo-score-safe {
  background: #e8f9ef;
  color: #0f8a53;
  border: 1px solid #bdeecf;
}

.tool-demo-score-risk {
  background: #ffecee;
  color: #c1272d;
  border: 1px solid #ffc7cb;
}

.tool-demo-score-pending {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-600);
  font-weight: 600;
}

.tool-demo-actions-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--brand-600);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
}

.tool-demo-actions-pill.muted {
  background: var(--gray-200);
  color: var(--gray-700);
}

.tool-demo-btn-ghost {
  background: var(--white);
  color: var(--brand-700);
  border: 1px solid var(--brand-300);
  box-shadow: none;
}

.tool-demo-btn-ghost:hover {
  background: var(--brand-50);
  box-shadow: 0 6px 20px rgba(63, 86, 160, 0.12);
}

.tool-demo-how {
  margin-top: 18px;
  border: 1px solid var(--gray-200);
  background: linear-gradient(180deg, #fbfcff 0%, #f6f8ff 100%);
  border-radius: 14px;
  padding: 16px 18px;
}

.tool-demo-how-title {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--gray-900);
}

.tool-demo-how-list {
  margin: 0;
  padding-left: 18px;
  color: var(--gray-700);
  line-height: 1.6;
  font-size: 0.93rem;
}

@media (max-width: 760px) {
  .tool-demo-turnitin-real-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .tool-demo-turnitin-sample-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .tool-demo-turnitin-sample-search {
    width: 100%;
  }
}

/* ----- Result box below Generate button (loading + blurred text → unlock) ----- */
.tool-result-box {
  position: relative;
  margin-top: 28px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  transition: max-height 0.4s ease, opacity 0.35s ease, visibility 0.35s ease, margin 0.35s ease;
}

.tool-result-box.is-visible {
  max-height: 420px;
  min-height: 320px;
  opacity: 1;
  visibility: visible;
}

.tool-result-blur-wrap {
  position: relative;
  min-height: 280px;
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
}

.tool-result-blur-content {
  padding: 24px 28px;
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.tool-result-fake-line {
  height: 14px;
  background: linear-gradient(90deg, var(--gray-300) 40%, var(--gray-200) 100%);
  border-radius: 4px;
  margin: 0 0 14px;
  max-width: 100%;
  animation: tool-fake-line-in 0.6s ease-out both;
}

.tool-result-fake-line:nth-child(1) { animation-delay: 0.2s; }
.tool-result-fake-line:nth-child(2) { animation-delay: 0.5s; }
.tool-result-fake-line:nth-child(3) { animation-delay: 0.9s; }
.tool-result-fake-line:nth-child(4) { animation-delay: 1.3s; }
.tool-result-fake-line:nth-child(5) { animation-delay: 1.6s; }
.tool-result-fake-line:nth-child(6) { animation-delay: 2s; }
.tool-result-fake-line:nth-child(7) { animation-delay: 2.4s; }

.tool-result-fake-line.short {
  max-width: 65%;
}

.tool-result-fake-line.medium {
  max-width: 80%;
}

@keyframes tool-fake-line-in {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

.tool-result-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  padding: 24px 32px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  min-width: 280px;
  transition: opacity 0.4s ease;
}

.tool-result-box.is-unlock .tool-result-loading {
  opacity: 0;
  pointer-events: none;
}

.tool-result-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 20px;
  border: 3px solid var(--brand-100);
  border-top-color: var(--brand-600);
  border-radius: 50%;
  animation: tool-spin 0.85s linear infinite;
}

@keyframes tool-spin {
  to { transform: rotate(360deg); }
}

.tool-result-steps {
  margin-bottom: 16px;
}

.tool-result-step {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--gray-500);
  transition: color 0.3s ease;
}

.tool-result-step.is-active {
  color: var(--gray-900);
}

.tool-result-step-dot {
  width: 6px;
  height: 6px;
  background: var(--gray-300);
  border-radius: 50%;
  flex-shrink: 0;
}

.tool-result-step.is-active .tool-result-step-dot {
  background: var(--brand-600);
  animation: tool-dot-pulse 1s ease-in-out infinite;
}

@keyframes tool-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.85; }
}

.tool-result-status {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-700);
  margin: 0;
}

.tool-result-unlock {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  padding: 28px 32px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  min-width: 260px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.tool-result-box.is-unlock .tool-result-unlock {
  opacity: 1;
  visibility: visible;
}

.tool-result-unlock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--brand-50);
  color: var(--brand-600);
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 14px;
}

.tool-result-unlock-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 8px;
}

.tool-result-unlock-text {
  font-size: 0.95rem;
  color: var(--gray-600);
  margin: 0 0 20px;
  line-height: 1.5;
}

.tool-result-unlock-btn {
  display: inline-block;
}

/* ==================== CONTACT PAGE ==================== */
.contact-page .contact-hero {
  text-align: center;
  padding: 64px 48px 48px;
  background: linear-gradient(160deg, rgba(255,255,255,0.98) 0%, var(--brand-50) 100%);
  border-bottom: 1px solid var(--brand-100);
  animation: landing-fade-in 0.5s ease-out;
}

.contact-hero-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 12px;
}

.contact-hero-title .hero-accent {
  color: var(--brand-600);
}

.contact-hero-tagline {
  font-size: 1.1rem;
  color: var(--gray-600);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 28px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 56px 48px;
  width: 100%;
  box-sizing: border-box;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.2s ease;
  animation: landing-fade-in-up 0.6s ease-out both;
}

.contact-card:nth-child(1) { animation-delay: 0.1s; }
.contact-card:nth-child(2) { animation-delay: 0.2s; }
.contact-card:nth-child(3) { animation-delay: 0.3s; }
.contact-card:nth-child(4) { animation-delay: 0.4s; }
.contact-card:nth-child(5) { animation-delay: 0.5s; }

.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(63, 86, 160, 0.12);
  border-color: var(--brand-200);
}

.contact-card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-50);
  color: var(--brand-600);
  border-radius: var(--radius);
  margin-bottom: 20px;
  transition: transform 0.25s ease;
}

.contact-card:hover .contact-card-icon {
  transform: scale(1.05);
}

.contact-card-icon-img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}

.contact-card-icon-whatsapp {
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  color: #16a34a;
}

.contact-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 8px;
}

.contact-card-desc {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin: 0 0 12px;
}

.contact-card-meta {
  font-size: 0.9rem;
  color: var(--brand-600);
  font-weight: 500;
  margin: 0;
}

.contact-card-link {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-600);
  text-decoration: none;
  margin-top: 8px;
  transition: color 0.2s ease;
}

.contact-card-link:hover {
  color: var(--brand-700);
}

.contact-message {
  padding: 48px 48px 40px;
  background: linear-gradient(180deg, var(--white) 0%, var(--brand-50) 100%);
  width: 100%;
  box-sizing: border-box;
}

.contact-message-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  animation: landing-fade-in 0.6s ease-out both;
}

.contact-message-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 16px;
}

.contact-message-text {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin: 0;
}

.contact-cta {
  text-align: center;
  padding: 40px 48px 56px;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  animation: landing-fade-in 0.5s ease-out 0.2s both;
}

.contact-cta .btn-landing-cta {
  display: inline-block;
}

@media (max-width: 768px) {
  .top-bar {
    display: none;
  }

  /* Apply compact header layout only on landing + logged-in app pages, not on admin pages */
  body.landing-page .landing-header,
  body.app-page .main-header {
    padding: 8px 20px;
    flex-wrap: wrap;
  }

  /* Mobile public header: logo left, Tools + 3-dots right (single row) */
  body.landing-page .landing-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 10px;
    padding: 10px 14px;
    flex-wrap: nowrap;
    background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 18px rgba(32, 52, 119, 0.28);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.landing-page .landing-header .header-head-left {
    order: 1;
    flex: 0 0 auto;
  }

  body.landing-page .landing-header .header-nav-center {
    order: 2;
    width: auto;
    flex: 1;
    justify-content: flex-end;
    padding-right: 0;
  }

  body.landing-page .landing-header .header-head-right {
    order: 3;
    flex: 0 0 auto;
    justify-content: flex-end;
  }

  body.landing-page .landing-nav > a {
    display: none !important;
  }

  body.landing-page .landing-header .nav-tool-link {
    display: none !important;
  }

  body.landing-page .landing-header .landing-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }

  body.landing-page .landing-header .landing-nav .nav-tools-dropdown-wrap,
  body.landing-page .landing-header .landing-nav .landing-tools-dropdown-wrap {
    order: 2;
  }

  body.landing-page .landing-header .landing-pricing-link {
    display: inline-flex !important;
    order: 1;
    color: var(--white);
    font-weight: 600;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
  }

  body.landing-page .landing-header .landing-nav > a[href*="contact"] {
    display: none !important;
  }

  body.landing-page .landing-auth > a {
    display: none;
  }

  body.landing-page .landing-account-dropdown {
    display: inline-flex;
    align-items: center;
  }

  body.landing-page .landing-tools-trigger {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
    padding: 7px 12px;
    border-radius: 999px;
    font-weight: 600;
  }

  body.landing-page .landing-tools-trigger[aria-expanded="true"],
  body.landing-page .landing-tools-trigger:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.22);
  }

  body.landing-page .landing-account-dropdown .header-dropdown-trigger {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.14);
  }

  body.landing-page .landing-header .header-head-left,
  body.landing-page .landing-header .header-head-right,
  body.app-page .main-header .header-head-left,
  body.app-page .main-header .header-head-right {
    flex: 0 1 auto;
  }

  body.landing-page .landing-header .header-nav-center,
  body.app-page .main-header .header-nav-center {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  body.landing-page .landing-header .header-nav-center {
    order: 2;
    width: auto;
    justify-content: flex-end;
  }

  /* Mobile logged-in header: logo left, Tools + 3-dots right (single row) */
  body.app-page {
    padding-top: 46px;
  }

  body.app-page .main-header {
    top: 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 10px;
    padding: 3px 12px;
    min-height: 44px;
    background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 18px rgba(32, 52, 119, 0.28);
  }

  body.app-page .main-header .header-head-left {
    order: 1;
    flex: 0 0 auto;
  }

  body.app-page .main-header .header-nav-center {
    order: 2;
    width: auto;
    justify-content: flex-end;
    padding-right: 8px;
  }

  body.app-page .main-header .header-head-right {
    order: 3;
    flex: 0 0 auto;
    justify-content: flex-end;
  }

  body.app-page .main-header .nav-tool-link {
    display: none !important;
  }

  body.app-page .main-header .welcome-text {
    display: none;
  }

  body.app-page .main-header .header-nav-center > a,
  body.app-page .main-header .nav-links > a {
    display: none !important;
  }

  body.app-page .main-header .nav-tools-trigger {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
    padding: 7px 12px;
    border-radius: 999px;
    font-weight: 600;
  }

  body.app-page .main-header .nav-tools-trigger[aria-expanded="true"],
  body.app-page .main-header .nav-tools-trigger:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.22);
  }

  body.app-page .main-header .header-dropdown-trigger {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.14);
  }

  .landing-hero {
    padding: 40px 20px 56px;
  }

  .landing-benefits {
    padding: 24px 20px;
  }

  .landing-benefits-inner {
    gap: 24px 20px;
    flex-direction: column;
  }

  .landing-features {
    padding: 48px 20px 56px;
  }

  .landing-how {
    padding: 40px 20px;
  }

  .landing-who {
    padding: 40px 20px;
  }

  .landing-cta {
    padding: 48px 20px;
  }

  .landing-footer {
    padding: 20px;
  }

  /* Use compact circle logo on tablets/phones (landing + app pages only) */
  body.landing-page .logo-landscape,
  body.landing-page .landing-logo .logo-landscape,
  body.app-page .logo-landscape,
  body.app-page .landing-logo .logo-landscape {
    display: none;
  }

  body.landing-page .logo-circle,
  body.landing-page .landing-logo .logo-circle,
  body.app-page .logo-circle,
  body.app-page .landing-logo .logo-circle {
    display: block;
    height: 32px;
    width: 32px;
  }

  body.landing-page .landing-account-dropdown .header-dropdown-menu {
    top: 56px;
    right: 10px;
    left: auto;
    width: min(280px, calc(100% - 20px));
  }

  body.landing-page .landing-tools-dropdown {
    top: 56px;
    right: 10px;
    left: auto;
    width: min(320px, calc(100% - 20px));
  }

  body.app-page .main-header .header-dropdown-menu {
    position: fixed;
    top: 56px;
    right: 10px;
    left: auto;
    width: min(300px, calc(100% - 20px));
    max-height: 60vh;
    overflow-y: auto;
    z-index: 1200;
  }

  body.app-page .main-header .nav-tools-dropdown {
    position: fixed;
    top: 56px;
    right: 10px;
    left: auto;
    width: min(320px, calc(100% - 20px));
    max-height: 60vh;
    overflow-y: auto;
    z-index: 1150;
  }

  .landing-hero-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .landing-hero-tagline {
    font-size: 1rem;
    margin-bottom: 28px;
  }

  .hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px 16px;
  }

  .hero-stat-value {
    font-size: 1.5rem;
  }

  .hero-testimonials {
    margin-bottom: 28px;
  }

  .hero-testimonials-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-testimonial {
    padding: 16px 16px 16px 20px;
  }

  .landing-hero-btns {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .landing-tools-bottom-bar {
    margin-top: 14px;
    padding-top: 16px;
  }

  .landing-hero-btns .btn-landing {
    width: 100%;
    max-width: 280px;
    display: inline-flex;
    justify-content: center;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .landing-tools-sections {
    padding: 0 16px;
  }

  .tool-section {
    padding: 22px 16px;
    gap: 14px;
  }

  .tool-section-copy {
    width: 100%;
    max-width: none;
  }

  .tool-section-text {
    text-align: left;
    text-justify: auto;
    word-spacing: normal;
  }

  .tool-section-references .tool-section-copy {
    grid-column: auto;
    justify-self: stretch;
    max-width: none;
    align-items: flex-start;
  }

  .tool-section-references .tool-section-text {
    text-align: left;
    text-justify: auto;
    word-spacing: normal;
  }

  .tool-section-visual,
  .tool-section-references .tool-section-visual {
    grid-column: auto;
    justify-content: center;
    align-items: center;
  }

  .assignment-logo-right,
  .tool-section-references .assignment-logo-right {
    align-items: center;
    min-height: 0;
  }

  .assignment-logo-image-right,
  .tool-section-references .assignment-logo-image-right {
    margin-left: auto;
    margin-right: auto;
  }

  .landing-features {
    margin: 0;
    padding: 40px 16px;
  }

  .landing-section-title {
    font-size: 1.35rem;
    margin-bottom: 24px;
  }

  .landing-steps {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 0 8px;
  }

  .landing-how,
  .landing-who {
    padding: 40px 16px;
  }

  .landing-cta {
    padding: 40px 16px;
  }

  .landing-footer {
    flex-direction: column;
    text-align: center;
    padding: 20px 16px;
  }

  .pricing-page .pricing-hero {
    padding: 48px 20px 40px;
  }

  .pricing-cards {
    padding: 40px 20px;
    gap: 24px;
  }

  .pricing-card-humaniser {
    order: 1;
  }

  .pricing-card-assignment {
    order: 2;
  }

  .pricing-faq {
    padding: 40px 20px;
  }

  .pricing-cta {
    padding: 40px 20px;
  }

  .tool-other {
    padding: 40px 20px 48px;
  }

  .tool-split {
    padding: 24px 20px 32px;
  }

  .tool-form-card {
    padding: 20px 16px 16px;
  }

  .tool-about {
    position: static;
  }

  .tool-demo-row {
    grid-template-columns: 1fr;
  }

  .contact-page .contact-hero {
    padding: 48px 20px 40px;
  }

  .contact-cards {
    padding: 40px 20px 48px;
    gap: 24px;
  }

  .contact-message {
    padding: 40px 20px 32px;
  }

  .contact-cta {
    padding: 32px 20px 48px;
  }
}

@media (max-width: 480px) {
  /* Simplify landing header on very small phones */
  .landing-header {
    padding: 10px 14px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 8px;
  }

  /* Show only Tools in the top nav; move Marketing links to hero/footer */
  .landing-nav > a {
    display: none !important;
  }

  .landing-header .landing-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }

  .landing-header .landing-nav .nav-tools-dropdown-wrap,
  .landing-header .landing-nav .landing-tools-dropdown-wrap {
    order: 2;
  }

  .landing-header .landing-pricing-link {
    display: inline-flex !important;
    order: 1;
    color: var(--white);
    font-weight: 600;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
  }

  .landing-header .landing-nav > a[href*="contact"] {
    display: none !important;
  }

  /* Hide Login / Sign Up buttons from top row on very small phones */
  .landing-auth {
    justify-content: flex-end;
    gap: 10px;
  }

  .landing-auth > a {
    display: none;
  }

  /* Keep only Sign Up on the right; other links move to 3-dots menu */
  .landing-auth > a:not(.landing-btn-nav) {
    display: none;
  }

  /* Use 3-dots menu on mobile to reduce clutter */
  .landing-account-dropdown {
    display: flex;
    align-items: center;
  }

  .landing-header .header-head-left {
    order: 0;
  }

  .landing-header .header-nav-center {
    order: 2;
    display: flex;
    width: auto;
    justify-content: flex-end;
    justify-self: end;
  }

  .landing-header .header-head-right {
    order: 3;
    justify-content: flex-end;
  }

  .landing-header .header-nav-center {
    order: 2;
  }

  .landing-logo .logo-circle {
    height: 40px;
    width: 40px;
  }

  /* Mobile account dropdown: full-width card under header so it is always visible */
  .landing-account-dropdown .header-dropdown-menu {
    position: fixed;
    top: 56px;
    right: 12px;
    left: auto;
    min-width: 0;
    width: min(260px, calc(100% - 24px));
    margin-top: 0;
    max-height: 60vh;
    overflow-y: auto;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    z-index: 1200;
  }

  .landing-account-dropdown .dropdown-item {
    padding: 14px 20px;
    font-size: 1rem;
  }

  /* Mobile Tools dropdown: right-aligned card near three-dot menu */
  .landing-tools-dropdown,
  .landing-nav .nav-tools-dropdown {
    position: fixed;
    top: 56px;
    right: 12px;
    left: auto;
    transform: none;
    min-width: 0;
    width: min(320px, calc(100% - 24px));
    margin-top: 0;
    max-height: 60vh;
    overflow-y: auto;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    z-index: 1150;
  }

  .landing-tools-dropdown .landing-tools-item,
  .landing-tools-dropdown .tools-item-coming-soon,
  .landing-nav .nav-tools-dropdown .nav-tools-item {
    padding: 14px 20px;
    font-size: 1rem;
  }

  .landing-hero {
    padding: 32px 16px 40px;
  }

  .landing-hero-title {
    font-size: 1.5rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 14px;
    padding: 16px 14px;
    margin-bottom: 28px;
  }

  .landing-mobile-auth-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin: -8px auto 20px;
    width: 100%;
    max-width: 320px;
  }

  .landing-mobile-auth-cta .btn-landing {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    text-align: center;
  }

  .hero-stat {
    text-align: center;
  }

  .hero-stat-value {
    font-size: 1.4rem;
  }

  .hero-testimonials-grid .hero-testimonial:nth-child(n + 2) {
    display: none;
  }

  .landing-feature-card {
    min-height: auto;
  }
}

/* ========== AI Humaniser page ========== */
body.humaniser-page {
  background-color: #f0f2fa;
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(99, 102, 241, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 40%, rgba(59, 77, 155, 0.06), transparent 45%),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(99, 102, 241, 0.05), transparent 40%);
  background-attachment: fixed;
}

.humaniser-main {
  max-width: 880px;
  padding-bottom: 72px;
}

.humaniser-page-header {
  margin-bottom: 32px;
  text-align: center;
}

.humaniser-eyebrow {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-600);
  opacity: 0.92;
}

.humaniser-headline {
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.humaniser-subhead {
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.15rem;
  color: var(--gray-600);
  line-height: 1.45;
}

.humaniser-intro {
  max-width: min(34rem, 92vw);
  margin: 12px auto 0;
  padding: 10px 20px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--gray-600);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.humaniser-balance-num {
  color: var(--brand-700);
  font-weight: 700;
}

.humaniser-card {
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 16px 48px rgba(59, 77, 155, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
}

.humaniser-page .input-section,
.humaniser-page .output-section {
  position: relative;
  border: none;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 16px 48px rgba(59, 77, 155, 0.1);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  padding: 26px 28px 24px;
  overflow: hidden;
}

.humaniser-page .input-section::before,
.humaniser-page .output-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, var(--brand-600) 0%, #6b7fd7 42%, #8b9ae8 100%);
  opacity: 0.95;
}

.humaniser-page .output-section::before {
  background: linear-gradient(90deg, #4a5a9e 0%, var(--brand-600) 50%, #7b88d4 100%);
  opacity: 0.88;
}

.humaniser-page .output-section {
  border-top: none;
  margin-top: 24px;
  padding: 26px 28px 24px;
}

.humaniser-input-top {
  margin-bottom: 14px;
}

.humaniser-field-eyebrow {
  display: block;
  margin-bottom: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-600);
}

.humaniser-field-eyebrow-muted {
  color: var(--gray-500);
}

.humaniser-input-main-label {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.01em;
  cursor: pointer;
  line-height: 1.3;
}

.humaniser-output-top {
  margin-bottom: 4px;
}

.humaniser-page .humaniser-output-header {
  margin-top: 4px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-100);
}

.humaniser-page .output-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gray-900);
}

.humaniser-textarea {
  border-radius: 14px;
  border: 1px solid var(--gray-200);
  background: #fafbff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  line-height: 1.55;
  font-size: 1rem;
}

.humaniser-page .humaniser-textarea {
  min-height: 228px;
}

.humaniser-page .output-textarea {
  min-height: 200px;
  background: linear-gradient(180deg, #fafbff 0%, #f6f8fc 100%);
  color: var(--gray-800);
}

.humaniser-textarea:hover {
  border-color: var(--gray-300);
}

.humaniser-textarea:focus {
  outline: none;
  border-color: var(--brand-400);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
}

.humaniser-textarea::placeholder {
  color: var(--gray-400);
}

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

.humaniser-mode-hidden {
  display: none !important;
}

.humaniser-method-switch {
  margin: 4px 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid rgba(99, 102, 241, 0.22);
}

.humaniser-method-pill {
  border: 1px solid transparent;
  background: transparent;
  color: var(--gray-700);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.humaniser-method-pill:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--gray-900);
}

.humaniser-method-pill.is-active {
  background: linear-gradient(165deg, var(--brand-600) 0%, #2d3d7a 100%);
  color: #fff;
  border-color: rgba(59, 77, 155, 0.35);
  box-shadow: 0 4px 14px rgba(59, 77, 155, 0.22);
}

.humaniser-engine-panel {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(59, 77, 155, 0.05) 100%);
  border: 1px solid rgba(99, 102, 241, 0.14);
  border-left: 4px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.25s ease;
}

.humaniser-docx-panel {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--gray-200);
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.humaniser-docx-head {
  margin-bottom: 10px;
}

.humaniser-docx-title {
  margin: 2px 0 6px;
  font-size: 1rem;
  color: var(--gray-900);
}

.humaniser-docx-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.45;
}

.humaniser-docx-drop {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.humaniser-docx-file-wrap {
  flex: 1 1 300px;
  min-width: 240px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.humaniser-docx-file-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.humaniser-docx-file-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  background: linear-gradient(180deg, #ffffff 0%, #f3f5ff 100%);
  color: var(--brand-700);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.humaniser-docx-file-trigger:hover {
  border-color: var(--brand-500);
  box-shadow: 0 4px 12px rgba(59, 77, 155, 0.16);
}

.humaniser-docx-file-trigger:active {
  transform: translateY(1px);
}

.humaniser-docx-file-trigger.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.humaniser-docx-file-icon {
  font-size: 0.95rem;
}

.humaniser-docx-file-picked {
  min-width: 0;
  flex: 1;
  font-size: 0.84rem;
  color: var(--gray-600);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.humaniser-docx-selection {
  margin-top: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.humaniser-docx-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: space-between;
  align-items: center;
}

.humaniser-docx-file-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--gray-700);
}

.humaniser-docx-toolbar-actions {
  display: inline-flex;
  gap: 8px;
}

.humaniser-docx-toolbar-actions .btn {
  padding: 6px 10px;
  font-size: 0.82rem;
}

.humaniser-docx-meta {
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--gray-600);
}

.humaniser-docx-list {
  margin-top: 10px;
  height: 320px;
  max-height: 70vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.humaniser-docx-list-resizer {
  margin-top: 10px;
  position: relative;
  resize: vertical;
  overflow: auto;
  min-height: 220px;
  max-height: 70vh;
  border-radius: 12px;
}

.humaniser-docx-list-resizer .humaniser-docx-list {
  margin-top: 0;
  height: 100%;
  min-height: 220px;
  max-height: none;
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  padding: 10px 10px 12px;
  background: rgba(255, 255, 255, 0.76);
}

.humaniser-docx-resize-hint {
  position: absolute;
  right: 8px;
  bottom: 6px;
  width: 13px;
  height: 13px;
  pointer-events: none;
  background-image: linear-gradient(
    135deg,
    transparent 0 28%,
    rgba(99, 102, 241, 0.48) 28% 38%,
    transparent 38% 54%,
    rgba(99, 102, 241, 0.58) 54% 64%,
    transparent 64% 80%,
    rgba(99, 102, 241, 0.68) 80% 92%,
    transparent 92% 100%
  );
  opacity: 0.9;
}

.humaniser-docx-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.humaniser-docx-item:hover {
  border-color: var(--brand-300);
  box-shadow: 0 4px 14px rgba(59, 77, 155, 0.1);
}

.humaniser-docx-item.is-selected {
  border-color: rgba(22, 163, 74, 0.35);
  background: linear-gradient(180deg, #ffffff 0%, #f3fff7 100%);
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.16), 0 6px 16px rgba(22, 163, 74, 0.1);
}

.humaniser-docx-item.is-unselected {
  border-color: rgba(239, 68, 68, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #fff7f7 100%);
}

.humaniser-docx-item-check {
  margin-top: 3px;
  accent-color: #16a34a;
}

.humaniser-docx-item-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.humaniser-docx-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.humaniser-docx-item-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.9rem;
  height: 1.35rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--brand-700);
  background: rgba(99, 102, 241, 0.12);
}

.humaniser-docx-item-top {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.humaniser-docx-item-words {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--gray-600);
  background: #fff;
}

.humaniser-docx-item-reason {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.7);
}

.humaniser-docx-item-preview {
  font-size: 0.88rem;
  color: var(--gray-900);
  line-height: 1.52;
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  background: #ffffff;
  padding: 9px 10px;
}

.humaniser-docx-item.is-unselected .humaniser-docx-item-preview {
  color: #7f1d1d;
  background: #fff5f5;
  border-color: rgba(254, 202, 202, 0.9);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(220, 38, 38, 0.7);
}

.humaniser-docx-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

.humaniser-docx-cost {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.86rem;
  color: var(--gray-700);
  font-weight: 600;
  line-height: 1.4;
}

#btn-humaniser-docx-run {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(59, 77, 155, 0.22);
}

#btn-humaniser-docx-run:hover:not(:disabled) {
  box-shadow: 0 6px 18px rgba(59, 77, 155, 0.28);
}

@media (max-width: 860px) {
  .humaniser-docx-footer {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .humaniser-docx-cost {
    flex: 1 1 100%;
    order: 1;
  }

  #btn-humaniser-docx-run {
    order: 2;
    width: 100%;
    justify-content: center;
  }
}

.humaniser-docx-result-meta {
  font-size: 0.85rem;
  color: var(--gray-600);
}

.humaniser-docx-progress {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.07) 0%, rgba(59, 77, 155, 0.05) 100%);
}

.humaniser-docx-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.humaniser-docx-progress-label {
  font-size: 0.84rem;
  color: var(--gray-700);
  font-weight: 600;
}

.humaniser-docx-progress-percent {
  font-size: 0.82rem;
  color: var(--brand-700);
  font-weight: 800;
  min-width: 2.5rem;
  text-align: right;
}

.humaniser-docx-progress-track {
  margin-top: 8px;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.14);
  overflow: hidden;
}

.humaniser-docx-progress-done {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.humaniser-docx-progress.is-complete .humaniser-docx-progress-top {
  margin-bottom: 0;
}

.humaniser-docx-progress.is-complete .humaniser-docx-progress-track {
  display: none;
}

.humaniser-docx-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5 0%, #2563eb 40%, #06b6d4 100%);
  box-shadow: 0 2px 8px rgba(59, 77, 155, 0.28);
  position: relative;
  transition: width 0.35s ease;
}

.humaniser-docx-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.2) 75%,
    transparent 75%,
    transparent
  );
  background-size: 24px 24px;
  animation: humaniser-docx-progress-move 0.9s linear infinite;
}

@keyframes humaniser-docx-progress-move {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 24px 0;
  }
}

.humaniser-engine-panel.is-advance {
  border-left-color: var(--brand-600);
  background: linear-gradient(135deg, rgba(59, 77, 155, 0.1) 0%, rgba(99, 102, 241, 0.06) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(99, 102, 241, 0.12),
    0 10px 28px rgba(59, 77, 155, 0.12);
}

.humaniser-engine-head {
  margin-bottom: 14px;
}

.humaniser-engine-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-700);
}

.humaniser-engine-hint {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.45;
}

.humaniser-engine-radios {
  margin: 0;
  padding: 0;
  border: none;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 14px 28px;
}

.humaniser-radio-option {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 4px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.humaniser-radio-option:hover {
  background: rgba(255, 255, 255, 0.55);
}

.humaniser-radio-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.humaniser-radio-dot {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  background: var(--white);
  box-shadow: inset 0 0 0 3px var(--white);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.humaniser-radio-option:hover .humaniser-radio-dot {
  border-color: var(--brand-400);
}

.humaniser-radio-input:checked + .humaniser-radio-dot {
  border-color: var(--brand-600);
  background: var(--brand-600);
  box-shadow: inset 0 0 0 3px var(--white);
}

.humaniser-radio-input:focus-visible + .humaniser-radio-dot {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}

.humaniser-radio-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.humaniser-radio-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
}

.humaniser-radio-sub {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-500);
  line-height: 1.35;
}

.humaniser-engine-panel.is-advance .humaniser-radio-input:checked ~ .humaniser-radio-copy .humaniser-radio-title {
  color: var(--brand-800);
}

.advance-model-options {
  margin-top: 4px;
  display: block;
}

.advance-model-options-inner {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid rgba(59, 77, 155, 0.18);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.07);
  animation: humaniser-advance-reveal 0.28s ease;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

@keyframes humaniser-advance-reveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.advance-model-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--brand-800);
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.12), rgba(59, 77, 155, 0.06));
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.advance-model-banner-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.advance-model-options .advance-model-field {
  display: block;
}

@media (max-width: 560px) {
  .advance-model-options-inner {
    grid-template-columns: 1fr;
  }
}

.advance-model-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.humaniser-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--gray-200);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--white);
  color: var(--gray-900);
  cursor: pointer;
}

.humaniser-select:focus {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.advance-model-min-hint {
  margin: 12px 0 0;
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.4;
}

.humaniser-engine-panel.is-advance .advance-model-min-hint:not(.humaniser-collapsed) {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px dashed rgba(59, 77, 155, 0.25);
}

.humaniser-collapsed {
  display: none !important;
}

.humaniser-controls-row {
  margin-top: 22px;
  padding: 16px 18px;
  align-items: center;
  gap: 14px;
  border-top: none;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.98) 100%);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.humaniser-page .humaniser-controls-row .btn-ghost {
  font-weight: 600;
  color: var(--gray-600);
  padding: 8px 12px;
  border-radius: 10px;
}

.humaniser-page .humaniser-controls-row .btn-ghost:hover {
  color: var(--brand-700);
  background: rgba(255, 255, 255, 0.9);
}

.humaniser-page .word-count {
  flex: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  background: var(--white);
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.humaniser-primary-btn {
  margin-left: auto;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: linear-gradient(165deg, var(--brand-600) 0%, #2d3d7a 100%);
  box-shadow:
    0 4px 14px rgba(59, 77, 155, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.12s ease, box-shadow 0.18s ease;
}

.humaniser-primary-btn:hover:not(:disabled) {
  box-shadow:
    0 6px 20px rgba(59, 77, 155, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.humaniser-primary-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.humaniser-page .output-below {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}

.humaniser-page .output-word-count {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--gray-600);
}

.humaniser-page .progress-status.active {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.humaniser-page .human-score {
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(59, 77, 155, 0.2);
}

.wh-variation-wrap {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.wh-variation-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
}

.wh-variation-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wh-variation-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wh-variation-chip:hover {
  border-color: var(--brand-300);
  color: var(--brand-700);
}

.wh-variation-chip.is-active {
  border-color: var(--brand-600);
  background: var(--brand-600);
  color: var(--white);
}

.humaniser-howto.how-to {
  margin-top: 44px;
  padding-top: 0;
  border-top: none;
}

.humaniser-howto h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  text-align: center;
  margin: 0 0 24px;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

.humaniser-steps {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .humaniser-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}

.humaniser-step {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 16px;
  padding: 20px 20px 20px 18px;
  border: 1px solid rgba(99, 102, 241, 0.12);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.humaniser-step:hover {
  border-color: rgba(99, 102, 241, 0.22);
  box-shadow: 0 12px 36px rgba(59, 77, 155, 0.1);
  transform: translateY(-2px);
}

.humaniser-step .step-num {
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(59, 77, 155, 0.25);
}

.humaniser-step strong {
  font-size: 1rem;
  color: var(--gray-900);
}

.humaniser-step p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--gray-600);
  margin-top: 6px;
}

.slider-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
}

.slider-label {
  font-size: 0.9rem;
  color: var(--gray-600);
}

.slider {
  width: 140px;
  height: 6px;
  accent-color: var(--brand-600);
  cursor: pointer;
}

.slider-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand-600);
  min-width: 2.5em;
}

.progress-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--brand-600);
  min-height: 1.4em;
}

.progress-status:not(.active) {
  display: none;
}

.progress-status.active .progress-text {
  font-weight: 500;
}

.thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.thinking-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-600);
  animation: humaniser-glow-dot 0.8s ease-in-out infinite both;
}

.thinking-dots .dot:nth-child(1) { animation-delay: 0s; }
.thinking-dots .dot:nth-child(2) { animation-delay: 0.15s; }
.thinking-dots .dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes humaniser-glow-dot {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

.output-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.output-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--gray-900);
}

.output-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.human-score {
  background: var(--brand-600);
  color: var(--white);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

.output-textarea {
  min-height: 200px;
}

.output-below {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
}

.output-word-count {
  font-size: 0.9rem;
  color: var(--gray-600);
  font-weight: 500;
}

.controls-humaniser {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}

/* References Finder */
.ref-finder-options {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px;
}

.ref-finder-progress {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--brand-600);
}

.ref-finder-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--brand-600);
  border-radius: 50%;
  animation: ref-finder-spin 0.8s linear infinite;
}

@keyframes ref-finder-spin {
  to {
    transform: rotate(360deg);
  }
}

.ref-finder-stop-btn {
  margin-left: 8px;
}

.references-list {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px 24px;
  min-height: 120px;
}

.references-placeholder {
  margin: 0;
  color: var(--gray-500);
  font-size: 0.95rem;
}

.references-ol {
  margin: 0;
  padding-left: 1.5rem;
  list-style: decimal;
}

.reference-item {
  margin-bottom: 12px;
  line-height: 1.5;
  color: var(--gray-900);
  font-size: 0.95rem;
}

.reference-item:last-child {
  margin-bottom: 0;
}

.ref-count {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-600);
}

.references-stats {
  margin: 16px 0 0;
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

/* Drillbit Checker */
.drillbit-main {
  padding-bottom: 80px;
}

/* Turnitin user — compact head bar queue */
.turnitin-headbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.turnitin-headbar-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.turnitin-headline {
  margin-bottom: 0;
}
.turnitin-subhead {
  margin-top: 8px;
}
.turnitin-site-queue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.turnitin-site-queue-label {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-700);
}
.turnitin-site-queue-count {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  min-width: 1.25em;
  text-align: center;
}
.turnitin-wallet-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}
.turnitin-wallet-badge-label {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1e3a8a;
}
.turnitin-wallet-badge-value {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #1d4ed8;
  font-variant-numeric: tabular-nums;
}
.turnitin-site-queue--low {
  background: #ecfdf5;
  border-color: #6ee7b7;
}
.turnitin-site-queue--low .turnitin-site-queue-count {
  color: #065f46;
}
.turnitin-site-queue--mid {
  background: #fffbeb;
  border-color: #fcd34d;
}
.turnitin-site-queue--mid .turnitin-site-queue-count {
  color: #92400e;
}
.turnitin-site-queue--elevated {
  background: #fff7ed;
  border-color: #fdba74;
}
.turnitin-site-queue--elevated .turnitin-site-queue-count {
  color: #9a3412;
}
.turnitin-site-queue--critical {
  background: #fef2f2;
  border-color: #f87171;
}
.turnitin-site-queue--critical .turnitin-site-queue-count {
  color: #991b1b;
}
@media (max-width: 600px) {
  .turnitin-headbar {
    align-items: flex-start;
  }
  .turnitin-site-queue {
    padding: 9px 14px;
    gap: 8px;
  }
  .turnitin-wallet-badge {
    padding: 9px 12px;
    gap: 6px;
  }
  .turnitin-site-queue-count {
    font-size: 1.3rem;
  }
  .turnitin-wallet-badge-value {
    font-size: 0.95rem;
  }
}

.drillbit-table-section {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 24px;
}

.drillbit-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}

.drillbit-table-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gray-900);
}

.drillbit-count {
  font-weight: 400;
  color: var(--gray-600);
}

.drillbit-table-header-left {
  flex: 1;
  min-width: 0;
}

.drillbit-table-note {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--gray-500);
}

.drillbit-table-header .drillbit-table-actions {
  margin-left: auto;
}

.drillbit-table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drillbit-search {
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  min-width: 180px;
}

.btn-icon {
  padding: 8px 12px;
}

.drillbit-refresh-loading {
  pointer-events: none;
  animation: drillbit-refresh-spin 0.6s ease-in-out;
}
@keyframes drillbit-refresh-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.drillbit-table-wrap {
  overflow-x: auto;
}

.turnitin-main .drillbit-table-wrap {
  overflow-x: hidden;
}

.turnitin-main .drillbit-table th,
.turnitin-main .drillbit-table td {
  padding: 10px 12px;
}

.turnitin-main .drillbit-file-name {
  max-width: 150px;
}

.drillbit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.drillbit-table th,
.drillbit-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
}

.drillbit-table th {
  font-weight: 600;
  color: var(--gray-700);
  background: var(--gray-50);
}

.drillbit-table tbody tr:hover {
  background: var(--gray-50);
}

.drillbit-table tbody tr.drillbit-row-risk {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.08) 0%, rgba(255, 255, 255, 1) 18%, rgba(255, 255, 255, 1) 100%);
  box-shadow: inset 4px 0 0 rgba(220, 38, 38, 0.18);
}

.drillbit-table tbody tr.drillbit-row-risk:hover {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.12) 0%, rgba(254, 242, 242, 0.9) 18%, rgba(255, 255, 255, 1) 100%);
}

.drillbit-table tbody tr.drillbit-row-safe {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.08) 0%, rgba(255, 255, 255, 1) 18%, rgba(255, 255, 255, 1) 100%);
  box-shadow: inset 4px 0 0 rgba(22, 163, 74, 0.14);
}

.drillbit-table tbody tr.drillbit-row-safe:hover {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.11) 0%, rgba(240, 253, 244, 0.95) 18%, rgba(255, 255, 255, 1) 100%);
}

.drillbit-empty-row td {
  color: var(--gray-500);
  font-style: italic;
  text-align: center;
  padding: 32px 16px;
}

.drillbit-file-name {
  max-width: 180px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drillbit-action-btn {
  font-size: 0.85rem;
}

/* Drillbit table: actions dropdown (3-dots) */
.drillbit-actions-cell {
  position: relative;
  vertical-align: middle;
}

.drillbit-action-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.drillbit-inline-refund-btn {
  border: 1px solid #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.drillbit-inline-refund-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
  filter: brightness(1.02);
}

.drillbit-inline-refund-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.drillbit-inline-delete-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  color: #be123c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.drillbit-inline-delete-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 12px rgba(190, 24, 93, 0.18);
  filter: brightness(1.02);
}

.drillbit-inline-delete-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.drillbit-actions-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.drillbit-actions-btn {
  padding: 6px 10px;
  min-width: 36px;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--gray-600);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
}

.drillbit-actions-btn:hover {
  color: var(--gray-800);
  background: var(--gray-100);
}

.drillbit-actions-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 180px;
  padding: 6px 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 50;
  list-style: none;
}

.drillbit-actions-menu[hidden] {
  display: none !important;
}

.drillbit-actions-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--gray-700);
  text-align: left;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  transition: background 0.15s;
}

.drillbit-actions-item:hover {
  background: var(--gray-50);
  color: var(--gray-900);
}

.drillbit-actions-item-delete {
  color: #b91c1c;
  border-top: 1px solid var(--gray-100);
}

.drillbit-actions-item-delete:hover {
  background: #fef2f2;
  color: #991b1b;
}

.drillbit-fab-row {
  margin-top: 20px;
  padding: 8px 0;
}

.drillbit-fab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--brand-600);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(63, 86, 160, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.drillbit-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(63, 86, 160, 0.45);
  color: var(--white);
  background: var(--brand-700);
}

.drillbit-fab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

/* Drillbit modal */
.drillbit-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.2s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.drillbit-modal.drillbit-modal-open {
  visibility: visible;
  opacity: 1;
}

.drillbit-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.drillbit-modal-content {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drillbit-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}

.drillbit-modal-back {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--gray-600);
  padding: 4px 8px;
}

.drillbit-modal-back:hover {
  color: var(--brand-600);
}

.drillbit-modal-title {
  flex: 1;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.drillbit-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--gray-500);
  border-radius: var(--radius-sm);
}

.drillbit-modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.drillbit-modal-body {
  padding: 24px;
  overflow-y: auto;
}

.drillbit-upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 24px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.drillbit-upload-zone:hover {
  border-color: var(--brand-400);
  background: var(--brand-50);
}

.drillbit-file-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.drillbit-upload-inner {
  pointer-events: none;
}

.drillbit-upload-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}

.drillbit-upload-text {
  margin: 4px 0;
  font-size: 0.85rem;
  color: var(--gray-600);
}

.drillbit-browse {
  display: inline-block;
  margin-top: 12px;
  color: var(--brand-600);
  font-weight: 600;
  font-size: 0.95rem;
}

.drillbit-browse:hover {
  text-decoration: underline;
}

.drillbit-file-tags {
  margin-top: 12px;
  min-height: 24px;
}

.drillbit-file-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--gray-100);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--gray-700);
}

.drillbit-file-tag-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--gray-500);
  padding: 0 2px;
}

.drillbit-file-tag-remove:hover {
  color: var(--gray-800);
}

.drillbit-form-file-label {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 16px;
}

.drillbit-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 520px) {
  .drillbit-form-grid {
    grid-template-columns: 1fr;
  }
}

.drillbit-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drillbit-field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
}

.drillbit-field input,
.drillbit-field select {
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.drillbit-step-actions {
  margin-top: 24px;
}

.turnitin-checkout-card {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #dbe3f7;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
}

.turnitin-checkout-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #2c3a64;
}

.turnitin-checkout-mode-grid {
  display: grid;
  gap: 10px;
}

.turnitin-checkout-mode-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e2e8f8;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.turnitin-checkout-mode-option:has(input:checked) {
  border-color: #4864b3;
  box-shadow: 0 0 0 2px rgba(72, 100, 179, 0.12);
}

.turnitin-checkout-mode-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.turnitin-checkout-mode-copy strong {
  font-size: 0.95rem;
  color: #1f2a44;
}

.turnitin-checkout-mode-copy small {
  font-size: 0.8rem;
  color: #6b7898;
}

.turnitin-checkout-mode-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: #2f4ea2;
}

.drillbit-cost-label {
  margin: 0 0 4px;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.drillbit-cost-amount {
  margin: 0 0 20px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}


.drillbit-cost-sublabel {
  margin: -6px 0 16px;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.drillbit-cost-original {
  margin-right: 8px;
}

.drillbit-cost-discount-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #166534;
  font-size: 0.8rem;
  font-weight: 600;
}

.drillbit-coupon-status {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.drillbit-coupon-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #166534;
  font-size: 0.8rem;
  font-weight: 600;
}

.drillbit-coupon-status-text {
  color: var(--gray-700);
}

.drillbit-coupon-status-text span + span {
  margin-left: 6px;
}

.drillbit-coupon-remove {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--gray-500);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
}

.drillbit-coupon-remove:hover {
  color: var(--gray-700);
}

.drillbit-coupon-row {
  margin-bottom: 20px;
}

.drillbit-coupon-prompt {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: var(--gray-700);
}

.drillbit-coupon-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.drillbit-coupon-input-row {
  display: flex;
  gap: 8px;
}

.drillbit-coupon-input-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.drillbit-error {
  margin-top: 12px;
  font-size: 0.9rem;
  color: #b91c1c;
}

/* Broader drillbit section */
.drillbit-table-section-broad {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.drillbit-main .drillbit-table-section {
  margin-left: -24px;
  margin-right: -24px;
  width: calc(100% + 48px);
  max-width: none;
}

@media (min-width: 900px) {
  .drillbit-main .drillbit-table-section {
    margin-left: -48px;
    margin-right: -48px;
    width: calc(100% + 96px);
  }
}

/* Processing icon (animated dots) */
.drillbit-processing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.drillbit-processing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.drillbit-processing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.drillbit-processing-dots::before,
.drillbit-processing-dots::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-600);
  animation: drillbit-dot 0.6s ease-in-out infinite both;
}

.drillbit-processing-dots::before {
  animation-delay: 0s;
}

.drillbit-processing-dots::after {
  animation-delay: 0.2s;
}

.drillbit-processing-dots {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-600);
  animation: drillbit-dot 0.6s ease-in-out infinite both;
  animation-delay: 0.4s;
  flex-shrink: 0;
}

@keyframes drillbit-dot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

.drillbit-score {
  font-weight: 600;
  color: var(--gray-700);
  margin-right: 6px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
}

.drillbit-score-risk {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.drillbit-score-safe {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.drillbit-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 4px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  color: var(--gray-600);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.drillbit-download-btn:hover {
  background: var(--brand-50);
  border-color: var(--brand-200);
  color: var(--brand-700);
  box-shadow: 0 1px 4px rgba(63, 86, 160, 0.25);
}

.drillbit-download-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.drillbit-status-cell {
  white-space: nowrap;
  text-align: center;
}

.drillbit-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Admin Drillbit reports uploader */
.admin-drillbit-subhead {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--gray-800);
}

.admin-table {
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th,
.admin-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}
.admin-table th {
  font-weight: 600;
  color: var(--gray-700);
}

.admin-paper-id-cell {
  white-space: nowrap;
}
.admin-paper-id-cell code.admin-paper-id {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 6px;
  background: var(--gray-100);
  border-radius: 4px;
  font-size: 0.9rem;
}
.admin-paper-id-cell .btn-copy-paper-id {
  font-size: 0.8rem;
  padding: 4px 8px;
}
.btn.btn-sm {
  font-size: 0.85rem;
  padding: 6px 12px;
}

.admin-drillbit-desc {
  max-width: 640px;
  margin: 0 0 24px;
  font-size: 0.95rem;
  color: var(--gray-700);
  line-height: 1.5;
}

.admin-drillbit-dropbox {
  max-width: 560px;
  margin-top: 24px;
}

.admin-drillbit-form {
  margin: 0;
}

.admin-drillbit-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  background: var(--gray-50);
  transition: border-color 0.2s, background 0.2s;
}

.admin-drillbit-zone.is-dragover {
  border-color: var(--brand-600);
  background: var(--brand-50);
}

.admin-drillbit-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.admin-drillbit-zone-title {
  margin: 0 0 8px;
  font-weight: 600;
  color: var(--gray-900);
}

.admin-drillbit-zone-hint {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.admin-drillbit-zone-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.admin-drillbit-filenames {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--brand-600);
}

.admin-drillbit-submit {
  margin-top: 20px;
}

.admin-drillbit-msg {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--gray-600);
}

/* Admin — Turnitin reports page polish */
.tr-admin-page {
  max-width: 1240px;
  margin-inline: auto;
}
.tr-hero {
  margin-bottom: 18px;
}
.tr-hero-subtitle {
  margin: 8px 0 0;
  color: var(--gray-600);
  font-size: 0.98rem;
}
.tr-page-intro {
  max-width: 900px;
}
.tr-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  padding: 20px 22px;
}
.tr-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.tr-count-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 600;
  font-size: 0.82rem;
  border: 1px solid var(--brand-100);
}
.tr-price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.tr-section-minor-title {
  font-size: 1rem;
  margin-bottom: 8px;
}
.tr-coupon-add-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-table {
  width: 100%;
}
.admin-table th {
  background: var(--gray-50);
  position: sticky;
  top: 0;
}
.admin-table tbody tr:hover {
  background: #f8fbff;
}
.tr-upload-card {
  max-width: 760px;
}
.admin-drillbit-zone {
  border-radius: 12px;
}

@media (max-width: 900px) {
  .tr-card {
    padding: 16px;
  }
  .tr-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Turnitin admin — all submissions registry (wide table) */
.tr-all-subs-intro {
  margin: 0 0 10px;
  max-width: 720px;
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.55;
}
.tr-all-subs-details {
  margin: 0 0 16px;
  max-width: 720px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--gray-50);
  padding: 0 14px;
}
.tr-all-subs-details summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-700);
  padding: 10px 0;
  list-style-position: outside;
}
.tr-all-subs-details-body {
  margin: 0 0 12px;
  padding-top: 2px;
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.5;
}
.tr-all-subs-scroll {
  overflow: auto;
  max-height: min(70vh, 620px);
  margin-top: 4px;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.tr-all-subs-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}
.tr-all-subs-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
  text-align: left;
}
.tr-all-subs-table td {
  padding: 12px 14px;
  vertical-align: middle;
  border-bottom: 1px solid var(--gray-100);
  background: var(--white);
  line-height: 1.35;
}
.tr-all-subs-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}
.tr-all-subs-table tbody tr:hover td {
  background: #f0f7ff;
}
.tr-all-subs-table tbody tr:nth-child(even):hover td {
  background: #e8f2fc;
}
.tr-col-id {
  width: 52px;
  font-variant-numeric: tabular-nums;
}
.tr-col-paper code {
  font-size: 0.82rem;
  padding: 3px 7px;
  background: var(--gray-100);
  border-radius: 6px;
}
.tr-col-user {
  min-width: 188px;
  max-width: 220px;
  white-space: normal;
  word-break: break-word;
  font-size: 0.82rem;
  color: var(--gray-800);
}
.tr-col-pay {
  width: 112px;
}
.tr-pay-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: capitalize;
  border: 1px solid transparent;
  max-width: 100%;
  white-space: nowrap;
}
.tr-pay-pill--ok {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}
.tr-pay-pill--pending {
  background: #fef9c3;
  color: #854d0e;
  border-color: #fde047;
}
.tr-pay-pill--bad {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}
.tr-pay-pill--muted {
  background: var(--gray-100);
  color: var(--gray-600);
  border-color: var(--gray-200);
}
.tr-col-time {
  white-space: nowrap;
  font-size: 0.8rem;
  color: var(--gray-700);
  font-variant-numeric: tabular-nums;
}
.tr-badge {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  display: inline-block;
  line-height: 1.2;
}
.tr-badge--ok {
  background: #dcfce7;
  color: #166534;
}
.tr-badge--warn {
  background: #fef3c7;
  color: #92400e;
}
.tr-badge--muted {
  background: #e5e7eb;
  color: #4b5563;
}
.tr-col-scores {
  font-size: 0.8rem;
  color: var(--gray-700);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tr-score-sep {
  margin: 0 6px;
  color: var(--gray-300);
}
.tr-score-label {
  font-weight: 600;
  color: var(--gray-500);
  margin-right: 3px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tr-col-vendor {
  min-width: 120px;
  max-width: 160px;
}
.tr-vendor-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.tr-vendor-meta {
  font-size: 0.72rem;
  color: var(--gray-500);
  line-height: 1.3;
  word-break: break-word;
}
.tr-col-disk {
  width: 1%;
}
.tr-disk-inline {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
}
.tr-mini-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.tr-mini-file--yes {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}
.tr-mini-file--no {
  background: #f3f4f6;
  color: #9ca3af;
  border: 1px solid #e5e7eb;
}
.tr-col-dl {
  width: 1%;
}
.tr-dl-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}
.tr-dl-link {
  display: inline-block;
  text-align: center;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  transition: background 0.15s, border-color 0.15s;
}
.tr-dl-link:hover {
  background: var(--brand-100);
  border-color: var(--brand-200);
  color: var(--brand-800);
}
.tr-dl-link--disabled {
  color: var(--gray-400);
  background: var(--gray-50);
  border-color: var(--gray-200);
  cursor: default;
  pointer-events: none;
}
.tr-col-actions {
  width: 1%;
  padding-left: 8px;
}
.tr-btn-purge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: var(--white);
  color: #b91c1c;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.tr-btn-purge:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #f87171;
  color: #991b1b;
}
.tr-btn-purge:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.tr-purge-banner {
  min-height: 0;
  margin: 0 0 12px;
  padding: 0;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 10px;
  transition: padding 0.15s, background 0.15s;
}
.tr-purge-banner:not(:empty) {
  padding: 10px 14px;
}
.tr-purge-banner--ok {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #a7f3d0;
}
.tr-purge-banner--err {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.tr-admin-back-row {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: center;
}
.tr-admin-back-row .btn-primary {
  min-width: 200px;
  padding: 12px 24px;
  font-weight: 600;
}

/* Turnitin admin — pricing, coupons, pending queue, upload */
.tr-callout {
  margin: 0 0 22px;
  padding: 14px 16px 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--gray-700);
}
.tr-callout--info {
  background: linear-gradient(135deg, #f8fafc 0%, #f0f9ff 100%);
  border-color: #e0e7ff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  border-left: 4px solid var(--brand-500, #3b82f6);
}
.tr-callout--info code {
  font-size: 0.84em;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  border: 1px solid var(--gray-200);
}
.tr-card-h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}
.tr-card-h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--gray-800);
}
.tr-card-divider {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 20px 0;
}
.tr-price-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 18px;
  padding: 16px 18px;
  background: var(--gray-50);
  border-radius: 12px;
  border: 1px solid var(--gray-200);
}
.tr-price-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: min(100%, 280px);
}
.tr-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
}
.tr-label--sm {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
}
.tr-input-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.tr-input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  font-size: 0.9rem;
  background: var(--white);
  color: var(--gray-900);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tr-input:focus {
  outline: none;
  border-color: var(--brand-500, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.tr-input--num {
  width: 120px;
  font-variant-numeric: tabular-nums;
}
.tr-input--narrow {
  width: 72px;
}
.tr-price-equals {
  color: var(--gray-400);
  font-weight: 600;
  font-size: 0.9rem;
}
.tr-price-rupee {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  font-variant-numeric: tabular-nums;
}
.tr-price-unit {
  font-size: 0.85rem;
  color: var(--gray-500);
}
.tr-inline-msg {
  font-size: 0.85rem;
  color: var(--gray-600);
  flex: 1 1 100%;
  min-width: 140px;
}
.tr-price-panel .btn-primary {
  padding: 10px 20px;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.tr-coupon-section {
  margin-top: 4px;
}
.tr-coupon-scroll {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  margin-bottom: 16px;
}
.tr-coupon-table {
  margin: 0;
  min-width: 360px;
}
.tr-coupon-table th {
  padding: 10px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 2px solid var(--gray-200);
}
.tr-coupon-table td {
  padding: 12px 14px;
  vertical-align: middle;
}
.tr-coupon-table tbody tr:nth-child(even) {
  background: #fafbfc;
}
.tr-coupon-table tbody tr:hover {
  background: #f0f7ff;
}
.tr-coupon-table tbody td[colspan] {
  text-align: center;
  color: var(--gray-500);
  font-size: 0.9rem;
  padding: 20px 14px;
}
.tr-coupon-discount {
  font-size: 0.78rem !important;
  padding: 5px 11px !important;
}
.tr-coupon-table code {
  font-size: 0.88rem;
  padding: 4px 8px;
  background: var(--gray-100);
  border-radius: 6px;
}
.tr-btn-coupon-del {
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 8px;
  color: #b91c1c;
  border: 1px solid #fecaca;
  background: var(--white);
  font-weight: 600;
}
.tr-btn-coupon-del:hover {
  background: #fef2f2;
  border-color: #f87171;
  color: #991b1b;
}
.tr-coupon-add-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 16px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #fafbfc 0%, var(--white) 100%);
  border: 1px dashed var(--gray-300);
  border-radius: 12px;
}
.tr-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.tr-form-field .tr-input {
  width: 100%;
  min-width: 140px;
}
.tr-form-field:first-of-type .tr-input {
  min-width: 160px;
}
.tr-coupon-add-btn {
  margin-top: 0;
  padding: 10px 22px;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.tr-coupon-add .tr-inline-msg {
  display: block;
  margin-top: 10px;
  padding-left: 4px;
}
.tr-pending-section .admin-drillbit-subhead {
  margin-bottom: 0;
}
.tr-pending-intro {
  margin: 10px 0 8px;
  max-width: 800px;
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.55;
}
.tr-pending-details {
  margin: 0 0 16px;
  max-width: 800px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--gray-50);
  padding: 0 14px;
}
.tr-pending-details summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-700);
  padding: 10px 0;
}
.tr-pending-details-body {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.55;
}
.tr-pending-details-body code {
  font-size: 0.88em;
}
.tr-pending-scroll {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.tr-pending-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
  margin: 0;
}
.tr-pending-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
  text-align: left;
}
.tr-pending-table td {
  padding: 12px 14px;
  vertical-align: middle;
  border-bottom: 1px solid var(--gray-100);
  background: var(--white);
}
.tr-pending-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}
.tr-pending-table tbody tr:hover td {
  background: #f0f7ff;
}
.tr-pending-table tbody tr:nth-child(even):hover td {
  background: #e8f2fc;
}
.tr-pending-table .tr-col-action {
  width: 1%;
  white-space: nowrap;
}
.tr-pending-table .btn-primary.btn-sm {
  border-radius: 9px;
  font-weight: 600;
  padding: 8px 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.tr-pending-file {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  color: var(--gray-800);
}
.tr-pending-title {
  max-width: 168px;
  font-size: 0.82rem;
  color: var(--gray-800);
  line-height: 1.35;
  word-break: break-word;
}
.tr-pending-time {
  white-space: nowrap;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: var(--gray-700);
}
.tr-pending-user {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gray-800);
}
.tr-pending-empty td {
  text-align: center;
  color: var(--gray-500);
  padding: 28px 16px !important;
  font-size: 0.95rem;
}
.tr-pending-tip {
  margin: 14px 0 0;
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.5;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
}
.tr-pending-tip code {
  font-size: 0.88em;
}
.tr-admin-page--turnitin .tr-upload-card {
  max-width: none;
}
.tr-upload-card .admin-drillbit-zone {
  background: linear-gradient(180deg, #fafbfc 0%, var(--white) 50%);
  border-color: var(--gray-300);
}
.tr-upload-card .admin-drillbit-submit {
  margin-top: 16px;
  padding: 11px 24px;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.admin-flash {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.admin-flash-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.admin-flash-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

/* Admin — Turnitin vendors */
.tv-admin .tv-admin-lead {
  max-width: 720px;
  margin-bottom: 28px;
}
.tv-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.tv-detail-head__tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 600;
  font-size: 0.78rem;
}
.tv-vendor-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.tv-vendor-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.tv-vendor-summary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
}
.tv-vendor-summary-row__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  min-width: 0;
  flex: 1 1 260px;
}
.tv-vendor-summary-row__name {
  font-weight: 700;
  font-size: 1.06rem;
  color: var(--gray-900);
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.02em;
}
.tv-vendor-summary-row__meta {
  font-size: 0.84rem;
  color: var(--gray-600);
  word-break: break-word;
  max-width: 100%;
}
.tv-vendor-wallet-wrap {
  font-size: 0.84rem;
  color: var(--gray-600);
  white-space: nowrap;
}
.tv-vendor-wallet-label {
  font-weight: 600;
  margin-right: 6px;
  color: var(--gray-500);
}
.tv-vendor-wallet-display {
  font-weight: 700;
  color: var(--brand-700);
  font-variant-numeric: tabular-nums;
}
.tv-vendor-summary-row__chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.tv-btn-toggle-payments {
  flex-shrink: 0;
  font-weight: 600;
}
@media (max-width: 640px) {
  .tv-vendor-summary-row {
    flex-direction: column;
    align-items: stretch;
  }
  .tv-vendor-summary-row__main {
    flex-direction: column;
    align-items: flex-start;
  }
  .tv-btn-toggle-payments {
    width: 100%;
  }
}
.tv-vendor-card__top {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--gray-100);
  background: linear-gradient(180deg, var(--brand-50) 0%, var(--white) 100%);
}
.tv-vendor-card__top--settings {
  padding: 16px 22px 18px;
}
.tv-vendor-card__controls--full {
  width: 100%;
  justify-content: flex-start;
}
.tv-vendor-card__name {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  font-family: "Fraunces", Georgia, serif;
}
.tv-vendor-card__meta {
  margin: 0 0 10px;
  font-size: 0.875rem;
  color: var(--gray-600);
}
.tv-vendor-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tv-chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.tv-chip--neutral {
  background: var(--gray-100);
  color: var(--gray-700);
}
.tv-chip--ok {
  background: #d1fae5;
  color: #065f46;
}
.tv-chip--off {
  background: var(--gray-200);
  color: var(--gray-600);
}
.tv-vendor-card__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
}
.tv-detail-analytics {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  padding: 14px 22px 12px;
  border-bottom: 1px solid var(--gray-100);
  background: linear-gradient(180deg, var(--gray-50) 0%, #fff 100%);
}
.tv-analytic-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(39, 52, 84, 0.05);
}
.tv-analytic-card__label {
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  margin-bottom: 4px;
  font-weight: 700;
}
.tv-analytic-card__value {
  display: block;
  font-size: 1.02rem;
  color: var(--gray-900);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tv-analytic-card__value--small {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
}
.tv-payout-ledger {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 20px 24px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
  align-items: start;
}
.tv-payout-ledger[hidden] {
  display: none !important;
}
@media (max-width: 960px) {
  .tv-payout-ledger {
    grid-template-columns: 1fr;
  }
}
.tv-payout-box {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.tv-payout-box__title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
}
.tv-payout-box__hint {
  margin: 0 0 12px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--gray-600);
}
.tv-payout-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tv-field--inline {
  min-width: 0;
}
.tv-field--grow {
  min-width: 0;
  flex: 1;
}
.tv-payout-fields .btn-primary {
  align-self: flex-start;
  margin-top: 4px;
}
.tv-ledger-preview__title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-800);
}
.tv-ledger-preview__scroll {
  overflow-x: auto;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  max-height: 280px;
  overflow-y: auto;
}
.tv-table--compact th,
.tv-table--compact td {
  padding: 8px 10px;
  font-size: 0.82rem;
}
.tv-ledger-note {
  max-width: 220px;
  word-break: break-word;
  font-size: 0.8rem;
  color: var(--gray-700);
}
.tv-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}
.tv-field__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tv-input,
.tv-select {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--white);
}
.tv-input:focus,
.tv-select:focus {
  outline: 2px solid var(--brand-200);
  border-color: var(--brand-400);
}
.tv-history {
  padding: 16px 22px 22px;
}
.tv-history__title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
}
.tv-history__count {
  font-weight: 500;
  color: var(--gray-500);
}
.tv-history__scroll {
  overflow-x: auto;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--gray-50);
}
.tv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 640px;
}
.tv-table th,
.tv-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: top;
}
.tv-table th {
  font-weight: 600;
  color: var(--gray-700);
  background: var(--white);
  white-space: nowrap;
}
.tv-table tbody tr:last-child td {
  border-bottom: none;
}
.tv-table tbody tr:hover td {
  background: rgba(63, 86, 160, 0.04);
}
.tv-code {
  font-size: 0.85rem;
  padding: 2px 8px;
  background: var(--white);
  border-radius: 4px;
  border: 1px solid var(--gray-200);
}
.tv-file-title {
  font-weight: 500;
  color: var(--gray-900);
}
.tv-file-sub {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 2px;
}
.tv-scores {
  white-space: nowrap;
}
.tv-score-pill {
  display: inline-block;
  margin-right: 6px;
  margin-bottom: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--brand-100);
  color: var(--brand-800);
}
.tv-score-pill--ai {
  background: #e0e7ff;
  color: #3730a3;
}
.tv-nowrap {
  white-space: nowrap;
  color: var(--gray-700);
}
.tv-muted {
  color: var(--gray-400);
}
.tv-dl-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
a.tv-dl {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--brand-600);
  color: var(--white);
  border: none;
  transition: background 0.15s ease;
}
a.tv-dl:hover {
  background: var(--brand-700);
  color: var(--white);
}
span.tv-dl--muted {
  display: inline-block;
  padding: 6px 10px;
  font-size: 0.75rem;
  color: var(--gray-400);
  cursor: default;
}
.tv-empty {
  margin: 0;
  padding: 12px 0;
  color: var(--gray-600);
  font-size: 0.9rem;
}
.tv-empty--large {
  padding: 32px;
  text-align: center;
  background: var(--gray-100);
  border-radius: var(--radius);
}
.tv-msg {
  margin-top: 20px;
}
.tv-msg--ok {
  color: #065f46;
}
.tv-msg--err {
  color: #b91c1c;
}
@media (max-width: 768px) {
  .tv-detail-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .tv-detail-head .btn {
    width: 100%;
  }
  .tv-detail-analytics {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    padding: 12px 14px;
  }
  .tv-vendor-card__controls {
    width: 100%;
  }
  .tv-field {
    flex: 1 1 140px;
  }
}
@media (min-width: 769px) and (max-width: 1100px) {
  .tv-detail-analytics {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
}
@media (max-width: 520px) {
  .tv-detail-analytics {
    grid-template-columns: 1fr;
  }
}
