:root {
  --green-primary: #00B386;
  --green-hover: #00875A;
  --green-soft: #E6F7F1;
  --green-border: #C4E3D5;
  --bg-main: #FFFFFF;
  --bg-alt: #F8F9FA;
  --bg-footer: #E6F7F1;
  --text-heading: #1E3932;
  --text-body: #3B3B3B;
  --text-muted: #6B7C77;
  --text-on-green: #FFFFFF;
  --link: #00B386;
  --link-hover: #00875A;
  --btn-bg: #00B386;
  --btn-bg-hover: #00875A;
  --btn-text: #FFFFFF;
  --btn-border: #00B386;
  --border-light: #E5E7EB;
  --divider-green: #C4E3D5;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

body {
  padding: 40px;
  background-color: #f1f6f4;
  color: var(--text-body);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(0, 179, 134, 0.06), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

h1,
h2,
h3 {
  color: var(--text-heading);
}

button {
  padding: 12px 22px;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--btn-border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.15s ease, transform 0.1s ease;
}

button.toggle-btn {
  background: #ffffff;
  color: #1e3932;
  border-color: #c4e3d5;
}

button:not(.toggle-btn):hover {
  background: var(--btn-bg-hover);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  background: var(--green-border);
  border-color: var(--green-border);
  cursor: not-allowed;
}

input {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #374151;
  background: #020617;
  color: var(--text);
}

input[type="email"],
input[type="text"] {
  color: #1e3932;
  background: #ffffff;
  border: 1px solid #c4e3d5;
}

input::placeholder {
  color: #9aa9a3;
}

hr {
  border: none;
  border-top: 1px solid #1f2937;
  margin: 30px 0;
}

progress {
  width: 100%;
  height: 14px;
}

progress::-webkit-progress-bar {
  background-color: #e9eeec;
}

progress::-webkit-progress-value {
  background-color: var(--green-primary);
}

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
  border: none;
}

.muted {
  color: var(--text-muted);
}

.app-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px;
  padding-top: 60px;
  padding-bottom: 60px;
}

.status {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.status.green {
  background: #e6f7f1;
  color: #00875a;
}

.status.amber {
  background: #fff4e5;
  color: #b45309;
}

.status.red {
  background: #fdecea;
  color: #b91c1c;
}

.verdict {
  background: #ffffff;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 40px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.verdict-score {
  font-size: 56px;
  font-weight: 700;
  color: var(--text-heading);
}

.verdict-label {
  margin-top: 10px;
  font-size: 18px;
  color: var(--text-muted);
  letter-spacing: 1px;
  opacity: 0.85;
}

#criticalBox {
  background: #fdecea;
  border-left: 6px solid #b91c1c;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.domain-section {
  background: #ffffff;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 18px;
  border: 1px solid var(--border-light);
}

.tool-header {
  background: linear-gradient(90deg, rgba(192, 57, 43, 0.06) 0%, rgba(0, 179, 134, 0.06) 50%, #ffffff 100%);
  border-bottom: 1px solid var(--green-border);
}

.tool-header-inner {
  max-width: 100%;
  padding: 26px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-name {
  font-weight: 800;
  letter-spacing: 1.4px;
  color: var(--text-heading);
  font-size: 15px;
}

.tool-context {
  font-size: 13px;
  color: var(--text-muted);
}

.tool-nav {
  display: flex;
  gap: 24px;
}

.nav-link {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-link:hover {
  color: var(--green-hover);
}

.nav-link.highlight {
  color: var(--green-primary);
  font-weight: 600;
}

.tool-header::after {
  content: "";
  display: block;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, #c0392b 0%, var(--green-primary) 100%);
}

.tool-footer {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background: linear-gradient(180deg, #1e3932 0%, #162a25 100%);
}

.tool-footer-inner {
  padding: 56px 48px;
  text-align: center;
  color: #cfe7df;
  font-size: 14px;
  letter-spacing: 0.3px;
}

.tool-footer-inner::before {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: var(--green-primary);
  margin: 0 auto 20px auto;
  border-radius: 2px;
}

.content-well {
  background: #ffffff;
  border-radius: 22px;
  padding: 60px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.content-well::before {
  content: "";
  display: block;
  height: 4px;
  width: 60px;
  background: var(--green-primary);
  border-radius: 4px;
  margin-bottom: 24px;
}

#questionText {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.6;
}

.highlight {
  color: var(--green-primary);
  font-weight: 600;
}

.verification-copy {
  font-size: 15px;
  line-height: 1.6;
  color: #3b3b3b;
}

.verification-copy strong {
  display: block;
  font-size: 16px;
  color: #1e3932;
  margin-bottom: 6px;
}

.message-error {
  color: #c0392b;
  font-weight: 500;
}

.otp-actions {
  display: flex;
  gap: 14px;
  margin-top: 16px;
  align-items: center;
}

#resendOtpBtn {
  background: transparent;
  border: 1px solid #c4e3d5;
  color: #6b7c77;
  font-size: 13px;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
}

#resendOtpBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#resendOtpBtn:not(:disabled):hover {
  border-color: var(--green-primary);
  color: var(--green-primary);
}

#domainHeader h1 {
  margin-bottom: 6px;
  font-size: 26px;
  font-weight: 600;
}

#domainDescription {
  color: #6b7c77;
  margin-bottom: 20px;
}

.question-card {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.question-text {
  margin-bottom: 10px;
  color: #1e3932;
  font-size: 15px;
  font-weight: 500;
}

.toggle-group {
  display: flex;
  gap: 10px;
}

.toggle-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #c4e3d5;
  background: #ffffff;
  color: #1e3932;
  cursor: pointer;
  min-width: 70px;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.toggle-btn:not(.active):hover {
  background: #e6f7f1;
  border-color: #00b386;
}

.toggle-btn.active {
  background: #00b386;
  color: #ffffff;
  border-color: #00b386;
  transform: translateY(-1px);
}

button.toggle-btn.active:hover {
  background: #00b386;
  color: #ffffff;
  border-color: #00b386;
}

.domain-footer {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.helper-text {
  font-size: 12px;
  color: #6b7c77;
  margin-bottom: 6px;
  opacity: 0.8;
}

#nextDomainBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.final-advice-list {
  margin-top: 12px;
  padding-left: 18px;
  color: #1e3932;
}

.final-advice-list li {
  margin-bottom: 8px;
  line-height: 1.5;
}

#domainMeta {
  font-size: 12px;
  color: #6b7c77;
  margin-bottom: 6px;
}

.answer-btn {
  min-width: 90px;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #c4e3d5;
  background: #f8f9fa;
  color: #1e3932;
}

.answer-btn:not(.selected):hover {
  background: #e6f7f1;
  border-color: var(--green-primary);
}

.answer-btn.selected {
  background: var(--green-primary);
  border-color: var(--green-primary);
  color: #ffffff;
}

.answer-btn.selected:hover {
  background: var(--green-primary);
  border-color: var(--green-primary);
}

.progress-track {
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  margin-bottom: 20px;
  overflow: hidden;
}

#progressFill {
  height: 100%;
  width: 0%;
  background: #334155;
  transition: width 0.3s ease;
}

.email-note {
  margin-top: 24px;
  font-size: 13px;
  color: #6b7c77;
}

.assessment-disclaimer {
  margin: 18px 0 26px;
  padding: 14px 18px;
  font-size: 13.8px;
  line-height: 1.6;
  color: #4B5E58;
  background: linear-gradient(180deg, #F6FAF8 0%, #EDF5F1 100%);
  border-left: 4px solid #1E3932;
  border-radius: 8px;
  font-weight: 500;
}

.rules-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0;
  font-size: 15px;
  line-height: 1.5;
  color: #1e3932;
}

.rules-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--green-primary);
}

.rules-checkbox label {
  cursor: pointer;
  user-select: none;
}

.beta-symbol {
  margin-left: 12px;
  color: #000000;
  font-weight: normal;
  font-size: 1.0em;
}

.page-with-header {
  padding-top: 96px;
}

/* ========================================
   PREMIUM MOBILE OPTIMIZATION
   ======================================== */

@media screen and (max-width: 768px) {
  body {
    padding: 0;
    background: linear-gradient(135deg, #f1f6f4 0%, #e6f7f1 100%);
  }

  .app-shell {
    max-width: 100%;
    padding: 32px 24px;
    margin: 0;
  }

  main.report-shell {
    padding: 32px 24px !important;
  }

  h1 {
    font-size: 30px;
    line-height: 1.3;
    margin-bottom: 20px;
    font-weight: 700;
  }

  h2 {
    font-size: 24px;
    margin-bottom: 16px;
  }

  h3 {
    font-size: 20px;
    margin-bottom: 14px;
  }

  p {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 16px;
  }

  button,
  .primary-btn {
    width: 100%;
    padding: 18px 24px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0, 179, 134, 0.2);
    transition: all 0.3s ease;
  }

  button:active {
    transform: scale(0.98);
  }

  input {
    width: 100%;
    font-size: 16px;
    padding: 18px;
    border-radius: 14px;
    border: 2px solid #c4e3d5;
    transition: border-color 0.3s ease;
  }

  input:focus {
    outline: none;
    border-color: var(--green-primary);
    box-shadow: 0 0 0 4px rgba(0, 179, 134, 0.1);
  }

  .tool-header {
    background: linear-gradient(135deg, rgba(0, 179, 134, 0.08) 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  }

  .tool-header-inner {
    flex-direction: column;
    gap: 16px;
    padding: 24px 20px;
    text-align: center;
  }

  .brand {
    flex-direction: column;
    gap: 6px;
  }

  .brand-name {
    font-size: 20px;
    letter-spacing: 2.5px;
  }

  .tool-context {
    font-size: 14px;
  }

  .tool-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    width: 100%;
  }

  .nav-link {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }

  .content-well {
    padding: 36px 24px;
    margin: 20px 0;
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    background: #ffffff;
  }

  .verdict {
    padding: 40px 24px;
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    margin-bottom: 32px;
  }

  .verdict-score {
    font-size: 64px;
    background: linear-gradient(135deg, #1e3932 0%, #00b386 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
  }

  .verdict-label {
    font-size: 18px;
    margin-top: 12px;
  }

  #criticalBox {
    border-radius: 18px;
    padding: 24px;
    margin: 28px 0;
    box-shadow: 0 6px 20px rgba(185, 28, 28, 0.18);
  }

  #domains .domain-section {
    padding: 24px 20px;
    margin-bottom: 18px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }

  .hero-card {
    grid-template-columns: 1fr !important;
    padding: 40px 24px !important;
    border-radius: 24px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15) !important;
    text-align: center !important;
  }

  #heroScore {
    font-size: 64px !important;
    margin: 16px 0 !important;
  }

  #heroVerdict {
    font-size: 26px !important;
    margin-top: 16px !important;
    margin-bottom: 12px !important;
  }

  #heroVerdictText {
    font-size: 16px !important;
    line-height: 1.7 !important;
    opacity: 0.9 !important;
  }

  #domainMatrix {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .rec-block {
    padding: 24px 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .rec-block:last-child {
    border-bottom: none;
  }

  .rec-domain {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
  }

  .rec-bullets li {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 12px;
  }

  .rules-checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    margin: 32px 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(230, 247, 241, 0.5));
    border-radius: 16px;
    border: 2px solid #e6f7f1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }

  .rules-checkbox input[type="checkbox"] {
    width: 26px;
    height: 26px;
    margin-top: 2px;
  }

  .rules-checkbox label {
    font-size: 16px;
    line-height: 1.7;
    color: #1e3932;
  }

  .tool-footer-inner {
    padding: 40px 20px;
    font-size: 14px;
  }

  .question-card {
    padding: 24px 20px;
    margin-bottom: 18px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e6f7f1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }

  .question-text {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 16px;
  }

  .toggle-btn {
    padding: 14px 24px;
    font-size: 16px;
    min-width: 90px;
    border-radius: 12px;
  }

  .page-with-header {
    padding-top: 160px;
  }

  /* Add spacing between elements */
  .section-title {
    margin-top: 32px;
    margin-bottom: 20px;
  }

  #domainMeta {
    font-size: 14px;
    margin-bottom: 12px;
  }
}

@media screen and (max-width: 420px) {
  h1 {
    font-size: 26px;
  }

  .verdict-score {
    font-size: 56px;
  }

  #heroScore {
    font-size: 56px !important;
  }

  .content-well {
    padding: 28px 20px;
  }

  button {
    font-size: 16px;
    padding: 16px 20px;
  }
}

/* ========================================
   PDF PRINT - FORCE DESKTOP LAYOUT
   CRITICAL: Uses @media print (not screen)
   ======================================== */

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  @page {
    size: A4 portrait;
    margin: 20mm 18mm;
  }

  /* Hide all web UI elements */
  body::before,
  header,
  footer,
  nav,
  .tool-header,
  .tool-footer,
  .tool-nav,
  button,
  .exit-link,
  .nav-link,
  #viewReportWrap {
    display: none !important;
    visibility: hidden !important;
  }

  /* Force desktop rendering */
  html,
  body {
    background: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 210mm !important;
    font-size: 11pt !important;
    line-height: 1.5 !important;
  }

  /* Override ALL mobile styles */
  .app-shell,
  main.report-shell,
  .report-section {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  /* FORCE 2-COLUMN HERO CARD */
  .hero-card {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
    padding: 24px !important;
    page-break-inside: avoid !important;
    background: #1e3932 !important;
    border-radius: 10px !important;
    margin-bottom: 20px !important;
  }

  .hero-card>div:first-child {
    text-align: center !important;
  }

  .hero-card>div:last-child {
    text-align: left !important;
  }

  #heroScore {
    font-size: 56px !important;
    color: #ffffff !important;
    line-height: 1 !important;
    margin: 0 !important;
  }

  #heroVerdict {
    font-size: 22px !important;
    color: #ffffff !important;
    margin-bottom: 10px !important;
    margin-top: 0 !important;
  }

  #heroVerdictText {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    line-height: 1.6 !important;
  }

  /* FORCE 2-COLUMN DOMAIN MATRIX */
  #domainMatrix {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 18px !important;
    page-break-inside: avoid !important;
  }

  #domainMatrix>div {
    page-break-inside: avoid !important;
  }

  /* Verdict section */
  .verdict {
    padding: 20px !important;
    text-align: center !important;
    page-break-inside: avoid !important;
    margin-bottom: 20px !important;
    box-shadow: none !important;
  }

  .verdict-score {
    font-size: 48px !important;
  }

  .verdict-label {
    font-size: 15px !important;
  }

  /* Domain sections */
  .domain-section {
    padding: 12px !important;
    margin-bottom: 10px !important;
    page-break-inside: avoid !important;
    box-shadow: none !important;
  }

  /* Critical alert */
  #report-alert,
  #criticalBox {
    padding: 14px !important;
    margin: 14px 0 !important;
    page-break-inside: avoid !important;
    box-shadow: none !important;
  }

  /* Recommendations on new page */
  #report-recommendations {
    page-break-before: always !important;
    margin-top: 0 !important;
  }

  .rec-block {
    page-break-inside: avoid !important;
    margin-bottom: 16px !important;
    padding: 0 !important;
  }

  .rec-bullets li {
    font-size: 10.5pt !important;
    line-height: 1.6 !important;
    margin-bottom: 5px !important;
  }

  /* Headings */
  h1 {
    font-size: 24pt !important;
    page-break-after: avoid !important;
    margin-bottom: 14px !important;
    margin-top: 0 !important;
  }

  h2 {
    font-size: 17pt !important;
    page-break-after: avoid !important;
  }

  h3,
  .section-title {
    font-size: 13pt !important;
    page-break-after: avoid !important;
  }

  /* Content containers */
  .content-well {
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  /* Lists */
  .final-advice-list li {
    font-size: 10.5pt !important;
    line-height: 1.6 !important;
  }

  /* Force black text */
  p,
  li,
  span,
  div {
    color: #000000 !important;
  }

  /* Exception: hero card white text */
  .hero-card,
  .hero-card * {
    color: #ffffff !important;
  }

  /* Status badges */
  .status {
    padding: 3px 8px !important;
    font-size: 9pt !important;
  }

  /* Spacing */
  .report-section {
    margin-bottom: 20px !important;
  }

  /* Remove backgrounds except hero */
  .verdict,
  .domain-section,
  .question-card {
    background: #ffffff !important;
  }
}














/* Update this section in your trader.css */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.4;
  /* Keeps the gradients whisper-light */
}

/* 1. Trader Quick: Light Green to Light Red Mix */
body.rules-trader-quick::before {
  background:
    radial-gradient(at 0% 0%, rgba(0, 179, 134, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(185, 28, 28, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0, 179, 134, 0.1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(245, 158, 11, 0.05) 0px, transparent 50%);
  /* Hint of amber */
}



/* 3. Trader Detailed: All Green shades (Fresh & Focused) */
body.rules-trader-detailed::before {
  background:
    radial-gradient(at 0% 50%, rgba(0, 179, 134, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 50%, rgba(30, 57, 50, 0.1) 0px, transparent 50%),
    radial-gradient(at 50% 0%, rgba(20, 184, 166, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
}