/* data display */
  .data-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    flex:0 0 auto;
    padding:8px 10px;
  }
  .data-block{
    background:var(--bg-panel);
    border:1px solid var(--line);
    border-radius:8px;
    padding:6px 10px;
    text-align:center;
  }
  .data-block .label{
    font-size:13px; /* Increased font size */
    color:var(--sub);
    text-transform:uppercase;
    letter-spacing:0.05em;
    margin-bottom:2px;
  }
  .data-block .value{
    font-size:22px; /* Increased font size for general data blocks */
    font-weight:700;
    color:var(--accent-dark);
  }
  /* Keep original font size for calculated Equation and Revenue on desktop */
  #equation-display, #revenue-display {
    font-size: 18px;
  }

  /* ---------- Desktop controls (sliders) ---------- */
  .controls-desktop{
    flex:0 0 auto;
    padding:8px 10px;
  }
  .controls-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
  }
  .control-block{
    background:var(--bg-panel);
    border:1px solid var(--line);
    border-radius:8px;
    padding:6px 10px;
  }
  .control-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    margin-bottom:4px;
  }
  .control-top label{
    font-size:15px; /* Increased font size */
    font-weight:600;
    color:var(--ink);
  }
  .control-top input[type="number"]{
    width:70px;
    padding:3px 6px;
    border:1px solid var(--line);
    border-radius:6px;
    font-size:16px; /* Increased font size */
    text-align:right;
  }
  input[type="range"]{
    width:100%;
    accent-color:var(--accent);
    height:18px;
  }

  /* ---------- Mobile controls (stepper rows) ---------- */
  .controls-mobile{
    display:none;
    flex:0 0 auto;
    padding:8px 10px;
    flex-direction:column;
    gap:8px;
  }
  
.stepper-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px; /* Reduced gap slightly to fit inner items snugly */

    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
    
    /* 👇 Crucial: allows child offsets to calculate correctly */
    position: relative; 
    
    /* 👇 Shrink the block container size slightly to help push buttons out */
    margin: 0 21px; /* 21px is exactly half of your 42px button width */
}

/* Target the minus button (first element) */
.stepper-row .step-btn:first-child {
    margin-left: -29px; /* Half button width (21px) + padding offset (8px) */
    position: relative;
    z-index: 2;
}

/* Target the plus button (last element) */
.stepper-row .step-btn:last-child {
    margin-right: -29px; /* Half button width (21px) + padding offset (8px) */
    position: relative;
    z-index: 2;
}

/* Adjust layout inputs to make sure they scale cleanly inside the remaining space */
.step-label {
    flex: 1; /* Allows label to take up remaining space smoothly */
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;

}

.stepper-row input[type="number"] {
    width: 65px; /* Slightly reduced to account for tighter container footprint */
    height: 42px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 17px;
    padding: 0 4px;
    flex-shrink: 0;
}

.step-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;

    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;

    /* 👇 Prevents text selection/copy popup on long-press */
    -webkit-user-select: none;  /* Safari/Chrome iOS */
    -moz-user-select: none;     /* Firefox */
    -ms-user-select: none;      /* IE/Edge */
    user-select: none;          /* Standard */
    -webkit-touch-callout: none; /* Disables standard iOS long-press menu */
}
  .step-btn:active{
    background:var(--accent);
    color:#fff;
  }

  /* Quiz */
  .quiz-header {
  display: flex;
  flex-direction: column; /* Forces layout into two lines */
  gap: 8px;
  margin-bottom: 12px;
}
  .quiz-header h2{
    
    font-size:20px;
    margin:0;

    width: 100%;
  
  
  
  } 
  
  .quiz-header .quiz-sub-row {
  display: flex;
  justify-content: space-between; /* Pushes tracker left, buttons right */
  align-items: center;
  width: 100%;
}
  
  /* Increased font size */
  #q-index{
    font-size:16px; /* Increased font size */
    color:var(--sub);
    order: 1;
  }
  .quiz-question{
    font-size:16.5px; /* Increased font size */
    line-height:1.4;
    min-height:44px;
    margin-bottom:6px;
  }
 
  .quiz-buttons{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:8px;
    order: 2;
  }
  .quiz-buttons .nav-group{
    display:flex;
    gap:20px;
  }

  .quiz-options{ display:flex; flex-direction:column; gap:6px; margin-bottom:8px; }
.opt-btn{ text-align:left; padding:8px 10px; }
.opt-btn.correct{ background:#eaf7ec; border-color:var(--good); color:var(--good); }
.opt-btn.wrong{ background:#fdecec; border-color:#e03131; color:#e03131; }
.quiz-status{ font-size:15px; font-weight:600; min-height:18px; margin-bottom:8px; } /* Increased font size */
.quiz-status.correct{ color:var(--good); }
.quiz-status.pending{ color:var(--sub); }
.quiz-action-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-top:10px;
}
.quiz-action-row #q-check{
  flex:1 1 auto;
}
  button{
    font-family:inherit;
    font-size:18px; /* Increased font size */
    padding:6px 12px;
    border-radius:8px;
    border:1px solid var(--line);
    background:#fff;
    cursor:pointer;
    color:var(--ink);
    transition:background 0.15s, transform 0.05s;
  }
  button:hover{background:var(--bg-panel);}
  button:active{transform:translateY(1px);}
  button.primary{
    background:var(--accent);
    border-color:var(--accent);
    color:#fff;
  }
  button.primary:hover{background:var(--accent-dark);}
  button:disabled{
    opacity:0.5;
    cursor:not-allowed;
  }

  /* Docs */
  .docs p{
    font-size:15.5px; /* Increased font size */
    line-height:1.45;
    color:#333;
    margin:0 0 6px 0;
  }
  .docs h2{font-size:17px;margin:0 0 6px 0;} /* Increased font size */
  .docs ul{
    margin:0;
    padding-left:16px;
    font-size:15.5px; /* Increased font size */
    line-height:1.45;
    color:#333;
  }
  .docs li{margin-bottom:4px;}

  @media (max-width: 900px){
    html,body{overflow:auto;}
    .app{flex-direction:column; height:auto;padding-right:10px;}
    .col-left, .col-right{flex:1 1 auto; max-width:100%;}
    .col-left{height:auto;}
    
    /* Removed fixed min-height and added aspect-ratio to get rid of white margin below graph */
    .graph-card{
      min-height:auto;
      aspect-ratio: 560 / 420;
    }
    
    .controls-desktop{display:none;}
    .controls-mobile{display:flex;}

    /* Reduced font size for Equation and Revenue on mobile to force it onto a single line */
    #equation-display, #revenue-display {
      font-size: 13px !important;
      white-space: nowrap;
    }

    .axis text{
      font-size:18px;
      font-weight: 600;
    }

  }


  /* Ghost Animation Styling no 1*/
  .ghost-dot {
    fill: #ffffff;
    stroke: var(--accent);
    stroke-width: 3px;
    opacity: 0.55;
    pointer-events: none;
  }
  .ghost-proj {
    stroke: var(--proj);
    stroke-width: 2.5px; /* Increased stroke width */
    stroke-dasharray: 4,4;
    opacity: 0.55;
    pointer-events: none;
  }
