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

    :root {
      --background: #faf8f5;
      --foreground: #3d3630;
      --card: #ffffff;
      --card-foreground: #3d3630;
      --primary: #5a8a6e;
      --primary-foreground: #ffffff;
      --secondary: #f5f3ef;
      --secondary-foreground: #4a443d;
      --muted: #f0ede8;
      --muted-foreground: #6b635a;
      --accent: #e8d5a3;
      --accent-foreground: #4a443d;
      --border: #e5e2dc;
      --input: #eae7e2;
      --ring: #5a8a6e;
      --radius: 12px;
    }

    html {
      width: 100%;
      max-width: 100vw;
      overflow-x: auto;
    }

    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      background-color: var(--background);
      color: var(--foreground);
      line-height: 1.6;
      min-height: 100vh;
      width: 100%;
      max-width: 100vw;
      margin: 0;
      padding: 0;
    }

    .container {
      max-width: min(1200px, 100%);
      margin: 0 auto;
      padding: 0 16px;
      width: 100%;
      box-sizing: border-box;
    }


    /* Header */
    header {
      padding: 10px 0 24px 0;
      border-bottom: 1px solid var(--border);
      background: var(--card);
      width: 100%;
      box-sizing: border-box;
    }

    .header-content {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      box-sizing: border-box;
    }

    .logo {
      font-size: 1.25rem;
      font-weight: 600;
      color: var(--primary);
    }

    nav a {
      color: var(--muted-foreground);
      text-decoration: none;
      font-size: 0.95rem;
      margin-left: 24px;
      transition: color 0.2s;
    }

    nav a:hover {
      color: var(--foreground);
    }

    /* Language Dropdown in Nav */
    nav {
      display: flex;
      align-items: center;
      gap: 24px;
    }

    .language-dropdown {
      position: relative;
      display: inline-block;
    }

    .lang-btn {
      background: none;
      border: none;
      padding: 0;
      cursor: pointer;
      color: var(--muted-foreground);
      display: flex;
      align-items: center;
      transition: color 0.2s;
      margin-left: 0;
    }

    .lang-btn:hover {
      color: var(--foreground);
    }

    .lang-btn svg {
      display: block;
    }

    /* Language Dropdown Container */
    .lang-menu {
      display: none;
      position: absolute;
      right: 0;
      background-color: #fff;
      border: 1px solid #ddd;
      border-radius: 4px;
      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
      padding: 4px 0;
      z-index: 1000;
      min-width: 120px;
    }
    
    /* Each flag + text row */
    .lang-item {
      display: flex;
      align-items: center;
      padding: 4px 8px;
      gap: 6px;
      cursor: pointer;
      transition: background 0.2s;
    }
    
    .lang-item:hover {
      background-color: #f0f0f0;
      border-radius: 4px;
    }
    
    .lang-item img {
      width: 24px;
      height: 18px;
      border: 1px solid transparent;
      border-radius: 2px;
    }
    
    /* Show menu when dropdown is active */
    .language-dropdown.show .lang-menu {
      display: block;
    }
.kies-taal-mid-page img{      height: 13px;    cursor: pointer;  width: 21px;}
    /* Hero */
    .hero {
      text-align: center;
      padding: 80px 16px;
      max-width: 800px;
      margin: 0 auto;
    }

    .hero h1 {
      font-size: clamp(2rem, 5vw, 3rem);
      font-weight: 700;
      line-height: 1.2;
      margin-bottom: 16px;
      text-wrap: balance;
    }

    .hero p {
      font-size: 1.125rem;
      color: var(--muted-foreground);
      margin-bottom: 32px;
      max-width: 600px;
      margin-left: auto;
      margin-right: auto;
    }

    .hero-buttons {
      display: flex;
      gap: 16px;
      justify-content: center;
      flex-wrap: wrap;
    }

    /* Buttons */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 14px 28px;
      border-radius: var(--radius);
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      border: none;
      text-decoration: none;
    }

    .btn-primary {
      background: var(--primary);
      color: var(--primary-foreground);
    }

    .btn-primary:hover {
      background: #4a7a5e;
    }

    .btn-secondary {
      background: var(--secondary);
      color: var(--secondary-foreground);
    }

    .btn-secondary:hover {
      background: var(--muted);
    }

    /* Cards */
    .card {
      background: var(--card);
      border-radius: var(--radius);
      border: 1px solid var(--border);
      padding: 32px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.04);
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      min-width: 0;
    }

    .card-title {
      font-size: 1.5rem;
      font-weight: 600;
      margin-bottom: 8px;
    }
    .section-title {
      font-size: 2.5rem;
      font-weight: 600;
      margin-bottom: 8px;
    }

    .card-description {
      color: var(--muted-foreground);
      margin-bottom: 24px;
    }

    /* Main content grid */
    .main-content {
      padding: 48px 0 80px;
      width: 100%;
      max-width: 100vw;
      box-sizing: border-box;
    }

    .grid {
      display: grid;
      gap: 24px;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
      grid-template-columns: minmax(0, 1fr);
    }

    @media (max-width: 360px) {
      .grid {
        gap: 16px;
      }
    }

    @media (min-width: 768px) {
      .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .grid .full-width {
        grid-column: 1 / -1;
      }
    }

    .full-width {
      width: 100%;
      box-sizing: border-box;
    }

    .grid-50-50 {
      grid-template-columns: 1fr 1fr !important;
    }

    @media (max-width: 767px) {
      .grid-50-50 {
        grid-template-columns: 1fr !important;
      }
    }

    /* Form elements */
    .form-group {
      margin-bottom: 20px;
      width: 100%;
      box-sizing: border-box;
    }

    .form-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      margin-bottom: 20px;
      width: 100%;
      box-sizing: border-box;
    }

    @media (max-width: 640px) {
      .form-row {
        grid-template-columns: 1fr;
      }
    }

    .form-row .form-group {
      margin-bottom: 0;
    }

    label {
      display: block;
      font-weight: 500;
      margin-bottom: 8px;
      font-size: 0.95rem;
    }

    input[type="number"],
    input[type="text"] {
      width: 100%;
      max-width: 100%;
      padding: 14px 16px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      font-size: 1.125rem;
      background: var(--input);
      color: var(--foreground);
      transition: border-color 0.2s, box-shadow 0.2s;
      box-sizing: border-box;
    }

    input:focus {
      outline: none;
      border-color: var(--ring);
      box-shadow: 0 0 0 3px rgba(90, 138, 110, 0.15);
    }

    /* Slider */
    .slider-container {
      margin: 16px 0;
    }

    input[type="range"] {
      width: 100%;
      height: 8px;
      -webkit-appearance: none;
      background: var(--muted);
      border-radius: 4px;
      cursor: pointer;
    }

    input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 24px;
      height: 24px;
      background: var(--primary);
      border-radius: 50%;
      cursor: pointer;
      transition: transform 0.2s;
    }

    input[type="range"]::-webkit-slider-thumb:hover {
      transform: scale(1.1);
    }

    /* Result boxes */
    .result-box {
      background: var(--secondary);
      border-radius: var(--radius);
      padding: 20px;
      text-align: center;
      margin-top: 16px;
    }

    .result-label {
      font-size: 0.875rem;
      color: var(--muted-foreground);
      margin-bottom: 4px;
    }

    .result-value {
      font-size: 2rem;
      font-weight: 700;
      color: var(--primary);
    }

    .result-unit {
      font-size: 1rem;
      font-weight: 400;
      color: var(--muted-foreground);
    }

    .bmi-status {
      margin-top: 8px;
      font-size: 0.95rem;
      padding: 8px 16px;
      border-radius: 20px;
      display: inline-block;
    }

    .bmi-healthy {
      background: #d4edda;
      color: #155724;
    }

    .bmi-overweight {
      background: #fff3cd;
      color: #856404;
    }

    .bmi-obese {
      background: #f8d7da;
      color: #721c24;
    }

    .bmi-underweight {
      background: #d1ecf1;
      color: #0c5460;
    }

    /* Calorie table */
    .calorie-table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 16px;
      min-width: 500px;
    }

    @media (max-width: 640px) {
      .calorie-table {
        font-size: 0.7rem;
      }
      .calorie-table th,
      .calorie-table td {
        font-size: 0.7rem;
      }
    }

    @media (max-width: 360px) {
      .calorie-table {
        min-width: 320px;
        font-size: 0.7rem;
      }
      .calorie-table th,
      .calorie-table td {
        padding: 8px 10px;
        font-size: 0.7rem;
      }
    }

    .calorie-table th,
    .calorie-table td {
      padding: 12px 16px;
      text-align: left;
      border-bottom: 1px solid var(--border);
    }

    .calorie-table th {
      background: var(--secondary);
      font-weight: 600;
      font-size: 0.875rem;
      color: var(--muted-foreground);
    }

    .calorie-table tr:hover {
      background: var(--secondary);
    }

    .calorie-table .highlight {
      background: rgba(90, 138, 110, 0.1);
      font-weight: 600;
    }

    .table-wrapper {
      overflow-x: auto;
      max-height: 400px;
      overflow-y: auto;
      border-radius: var(--radius);
      border: 1px solid var(--border);
      -webkit-overflow-scrolling: touch;
      width: 100%;
      box-sizing: border-box;
    }

    #calorie-table-container {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      width: 100%;
      box-sizing: border-box;
    }

    /* Progress bar */
    .progress-container {
      margin: 24px 0;
    }

    .progress-bar {
      width: 100%;
      height: 12px;
      background: var(--muted);
      border-radius: 6px;
      overflow: hidden;
    }

    .progress-fill {
      height: 100%;
      border-radius: 6px;
      transition: width 0.3s, background 0.3s;
    }

    .progress-green {
      background: linear-gradient(90deg, #5a8a6e, #6a9a7e);
    }

    .progress-orange {
      background: linear-gradient(90deg, #e8a83a, #f0b84a);
    }

    .progress-red {
      background: linear-gradient(90deg, #d35f5f, #e06f6f);
    }

    .progress-labels {
      display: flex;
      justify-content: space-between;
      margin-top: 8px;
      font-size: 0.875rem;
      color: var(--muted-foreground);
    }

    /* Daily tracker */
    .tracker-input-group {
      display: flex;
      gap: 12px;
      margin-bottom: 16px;
      width: 100%;
      box-sizing: border-box;
    }

    .tracker-input-group input {
      flex: 1;
      min-width: 0;
    }

    @media (max-width: 600px) {
      .tracker-input-group {
       /* flex-direction: column;*/
        gap: 8px;
      }

      .tracker-input-group input {
        width: fit-content;
        padding: 16px;
        font-size: 1rem;
        min-height: 48px;
      }

      .tracker-input-group button {
        width: fit-content;;
        padding: 16px 20px;
        min-height: 48px;
      }
    }

    @media (max-width: 360px) {
      .tracker-input-group {
        gap: 6px;
      }
      .tracker-input-group input {
        padding: 12px;
        font-size: 0.875rem;
      }
      .tracker-input-group button {
        padding: 12px 16px;
        font-size: 0.875rem;
      }
    }

    .meal-list {
      list-style: none;
      margin: 16px 0;
    }

    .meal-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 12px 16px;
      background: var(--secondary);
      border-radius: 8px;
      margin-bottom: 8px;
    }

    .meal-item span {
      font-weight: 500;
    }

    .meal-item button {
      background: transparent;
      border: none;
      color: var(--muted-foreground);
      cursor: pointer;
      padding: 4px 8px;
      font-size: 1.25rem;
    }

    .meal-item button:hover {
      color: var(--destructive, #d35f5f);
    }

    .tracker-message {
      padding: 16px;
      border-radius: var(--radius);
      text-align: center;
      font-size: 1rem;
    }

    .message-good {
      background: #d4edda;
      color: #155724;
    }

    .message-warning {
      background: #fff3cd;
      color: #856404;
    }

    .message-over {
      background: #f8d7da;
      color: #721c24;
    }

    /* Walking calculator */
    .toggle-group {
      display: flex;
      background: var(--muted);
      border-radius: var(--radius);
      padding: 4px;
      margin-bottom: 20px;
    }

    .toggle-btn {
      flex: 1;
      padding: 14px 8px;
      border: none;
      background: transparent;
      border-radius: 8px;
      cursor: pointer;
      font-weight: 600;
      transition: all 0.2s;
      color: var(--muted-foreground);
      line-height: 1.3;
      font-size: 1rem;
    }

    .toggle-btn small {
      display: block;
      font-size: 0.7rem;
      font-weight: 400;
      margin-top: 6px;
      opacity: 0.8;
      line-height: 1.3;
    }

    .toggle-btn.active {
      background: var(--card);
      color: var(--foreground);
      box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

    .toggle-btn.active small {
      opacity: 1;
    }

    /* Paper product */
    .paper-card {
      background: linear-gradient(135deg, #f5f0e6, #faf7f2);
      border: 2px dashed var(--accent);
    }

    .paper-card .card-title {
      color: var(--primary);
    }

    .paper-features {
      list-style: none;
      margin: 16px 0;
    }

    .paper-features li {
      padding: 8px 0;
      padding-left: 28px;
      position: relative;
    }

    .paper-features li::before {
      content: "✓";
      position: absolute;
      left: 0;
      color: var(--primary);
      font-weight: bold;
    }

    /* Footer */
    footer {
      border-top: 1px solid var(--border);
      padding: 40px 0;
      text-align: center;
      color: var(--muted-foreground);
      font-size: 0.875rem;
    }

    /* BMI Scale Visualization */
    .bmi-scale-container {
      margin: 24px 0;
    }

    .bmi-scale-title {
      font-size: 0.95rem;
      font-weight: 600;
      margin-bottom: 8px;
      color: var(--foreground);
    }

    .bmi-scale-wrapper {
      position: relative;
      height: 60px;
      margin: 12px 0;
      /* BMI scale: 15-40
         Zones: 15-18.5 (veel te laag), 18.5-25 (goed), 25-30 (hoog), 30-40 (veel te hoog)
         Positions: 15=0%, 18.5=14%, 25=40%, 30=60%, 40=100% */
      background: linear-gradient(to right,
        #f8d7da 0%,
        #f8d7da 14%,
        #fff3cd 14%,
        #fff3cd 14%,
        #d4edda 14%,
        #d4edda 40%,
        #fff3cd 40%,
        #fff3cd 60%,
        #f8d7da 60%,
        #f8d7da 100%
      );
      border-radius: 8px;
      border: 1px solid var(--border);
      overflow: visible;
    }

    .bmi-scale-labels {
      position: relative;
      height: 16px;
      font-size: 0.75rem;
      color: var(--muted-foreground);
      margin-top: 4px;
    }

    .bmi-scale-label {
      position: absolute;
      transform: translateX(-50%);
    }

    .bmi-indicator {
      position: absolute;
      top: -8px;
      width: 3px;
      height: 76px;
      background: #000;
      transform: translateX(-50%);
      z-index: 10;
      border-radius: 2px;
    }

    .bmi-indicator::before {
      content: '';
      position: absolute;
      bottom: -6px;
      left: 50%;
      transform: translateX(-50%);
      width: 0;
      height: 0;
      border-left: 6px solid transparent;
      border-right: 6px solid transparent;
      border-top: 6px solid #000;
    }

    .bmi-indicator.current {
      background: #000;
    }

    .bmi-indicator.future {
      background: #5a8a6e;
      border-left: 2px dashed #5a8a6e;
      border-right: 2px dashed #5a8a6e;
    }

    .bmi-indicator.future::before {
      border-top-color: #5a8a6e;
    }

    .bmi-value-display {
      position: absolute;
      top: -32px;
      left: 50%;
      transform: translateX(-50%);
      background: var(--card);
      padding: 4px 8px;
      border-radius: 4px;
      font-size: 0.875rem;
      font-weight: 600;
      white-space: nowrap;
      border: 1px solid var(--border);
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .bmi-value-display.current {
      color: var(--foreground);
    }

    .bmi-value-display.future {
      color: var(--primary);
    }

    .bmi-zone-labels {
      display: flex;
      justify-content: space-between;
      font-size: 0.7rem;
      color: var(--muted-foreground);
      margin-top: 8px;
      padding: 0 2px;
      text-align: center;
    }

    .bmi-zone-labels span {
      flex: 1;
    }

    .bmi-status-message {
      margin-top: 16px;
      padding: 12px;
      border-radius: var(--radius);
      font-size: 0.9rem;
      text-align: center;
    }

    .bmi-status-good {
      background: #d4edda;
      color: #155724;
    }

    .bmi-status-warning {
      background: #fff3cd;
      color: #856404;
    }

    /* Utilities */
    .text-center { text-align: center; }
    .mt-4 { margin-top: 16px; }
    .mt-6 { margin-top: 24px; }
    .mb-4 { margin-bottom: 16px; }
    .hidden { display: none; }

    /* Tip toggle */
    #tip-content {
      max-height: 0;
      opacity: 0;
      overflow: hidden;
      transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
      margin-top: 0;
      display: block;
    }

    #tip-content.hidden {
      max-height: 0 !important;
      opacity: 0 !important;
      margin-top: 0 !important;
    }

    #tip-content:not(.hidden) {
      max-height: 500px;
      opacity: 1;
      margin-top: 8px;
    }

    /* Modal */
    .modal {
      display: none;
      position: fixed;
      z-index: 1000;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
      background-color: rgba(0,0,0,0.5);
    }

    .modal.active {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .modal-content {
      background-color: var(--card);
      border-radius: var(--radius);
      padding: 24px;
      max-width: 600px;
      width: 100%;
      max-height: 90vh;
      overflow-y: auto;
      position: relative;
      box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    }

    .modal-close {
      position: absolute;
      top: 16px;
      right: 16px;
      font-size: 28px;
      font-weight: bold;
      color: var(--muted-foreground);
      cursor: pointer;
      background: none;
      border: none;
      padding: 0;
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      transition: all 0.2s;
    }

    .modal-close:hover {
      background: var(--muted);
      color: var(--foreground);
    }

    /* Responsive */
    @media (max-width: 640px) {
      .hero {
        padding: 48px 16px;
      }
      .card {
        padding: 24px;
      }
      .hero-buttons {
        flex-direction: column;
      }
      .btn {
        width: 100%;
      }
    }

    @media (max-width: 360px) {
      .card {
        padding: 16px;
      }
      .container {
        padding: 0 12px;
      }
      input[type="number"],
      input[type="text"] {
        padding: 12px 14px;
        font-size: 1rem;
      }
      .toggle-btn {
        padding: 12px 6px;
        font-size: 0.875rem;
      }
      .card-title {
        font-size: 1.25rem;
      }
      .section-title {
        font-size: 2rem;
      }
    }