  /* Results Section Styling */
  #results-container {
      margin-top: 2rem;
      padding-top: 1.5rem;
      border-top: 1px solid var(--border-color);
      text-align: center; /* Centered results */
  }
  .results-grid h3 {
      font-size: 1.125rem;
      font-weight: normal;
  }
  .results-grid .amount-primary, .amount-primary {
      font-size: 2.25rem;
      font-weight: bold;
      color: var(--main-color);
  }
    .error-message {
      text-align: center;
      color: var(--color-error-dark);
      font-weight: bold;
      min-height: 1.2em; /* Reserve space */
      margin-top: 1rem;
  }
  #math-explanation, #explanation-container {
      margin-top: 2rem;
      padding: 1.5rem;
      background-color: var(--secondary-background);
      border: 1px solid var(--border-color);
      border-radius: 0.5rem;
  }
  #explanation-container h3 {
      text-align: center;
      margin-top: 0;
  }
  
  /* Controls from fraction calculator */
  .controls {
      width: 100%;
      display: flex;
      flex-direction: column; /* Stack buttons by default for mobile */
      gap: 1rem;
      margin-top: 1.5rem;
  }
  .controls button {
      border: none;
      padding: 0.75rem 1.5rem;
      font-size: 1rem;
      font-weight: bold;
      border-radius: 4px;
      cursor: pointer;
      transition: background-color 0.2s;
      width: 100%; /* Make buttons full-width on mobile */
  }
  @media (min-width: 640px) {
        .controls {
          flex-direction: row; /* Side-by-side on larger screens */
          justify-content: center;
        }
        .controls button {
          width: auto; /* Auto-width on larger screens */
        }
  }
  
  /* === Custom styles for this specific calculator === */
  #calculate-gcf {
      background-color: var(--main-color);
      color: var(--color-white);
  }
  #calculate-gcf:hover {
      background-color: var(--secondary-color);
  }
  #clear-btn {
      background-color: var(--color-error-dark);
      color: white;
  }
  #clear-btn:hover {
      background-color: #d32f2f; /* Darken from calculators.css */
  }

  .hidden {
    display: none;
  }
  /* === Styles for new Explanation === */
  #explanation-steps {
      line-height: 1.6;
  }
  #explanation-steps h4 {
      color: var(--main-color);
      margin-top: 1rem;
      margin-bottom: 0.5rem;
      border-bottom: 1px solid var(--border-color);
      padding-bottom: 0.25rem;
  }
  #explanation-steps ul {
      list-style-type: disc;
      padding-left: 20px;
      margin: 0.5rem 0;
  }
  #explanation-steps .factor-list {
      font-family: monospace;
      font-size: 1.05rem;
      word-break: break-all;
      background-color: var(--color-white);
      padding: 0.5rem;
      border-radius: 4px;
  }

  /* === New User-Friendly Styles === */
  .intro-text {
      color: var(--color-gray);
      font-size: 1rem;
      line-height: 1.6;
      margin-bottom: 1.5rem;
      text-align: center;
  }

  .label-container {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 0.25rem;
  }
  
  #try-example {
      font-size: 0.8rem;
      font-weight: normal;
      color: var(--main-color);
      background: none;
      border: none;
      padding: 0;
      cursor: pointer;
      text-decoration: underline;
  }
  #try-example:hover {
      color: var(--secondary-color);
  }

  /* === New SEO Content Section Styles === */
  .content-section {
      background-color: var(--color-white);
      border-radius: 8px;
      padding: 2rem;
      margin-bottom: 2rem;
      margin-top: 2rem;
  }
  .content-section h2 {
      color: var(--main-color);
      border-bottom: 2px solid var(--border-color);
      padding-bottom: 0.5rem;
      margin-top: 0;
  }
  .content-section p {
      line-height: 1.6;
      font-size: 1rem;
      color: var(--color-gray);
  }
  .content-section ul {
      line-height: 1.6;
      color: var(--color-gray);
      padding-left: 20px;
  }
  /* New style for example equations */
  .example-equation {
      display: block; /* Puts it on its own line */
      margin-top: 0.25rem;
      font-family: monospace;
      font-size: 1.05rem;
      word-break: break-word; /* Will wrap if needed */
      background-color: var(--secondary-background);
      padding: 0.5rem;
      border-radius: 4px;
  }
  /* === NEW: Related Tools Grid === */
.related-tools-grid {
    list-style: none; 
    padding-left: 0; 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
    gap: 1rem;
}

.related-tool-link {
    font-weight: bold; 
    display: block; 
    padding: 0.5rem; 
    background: var(--secondary-background); 
    border-radius: 4px; 
    text-decoration: none;
    color: var(--main-color);
    transition: background-color 0.2s;
}

.related-tool-link:hover {
    background-color: var(--tertiary-background);
    text-decoration: underline;
}
  @media (max-width: 640px) {
      .card,
      .content-section {
          padding: 1.5rem 1rem; /* Reduce padding on mobile */
      }
      h1 {
          font-size: 1.75rem; /* Slightly smaller H1 on mobile */
      }
      /* New styles for mobile button stacking */
      .label-container {
          flex-direction: column;
          align-items: flex-start; /* Align label to the left */
      }
      #try-example {
          order: -1; /* Move button to the top of the flex container */
          margin-bottom: 0.5rem; /* Add space between button and label */
      }
  }