*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ===== SYSTEM COLOR CONTROL ===== */
:root {
  color-scheme: light dark;
}

.mobile-page-indicator {
  display: none;
}

/* ===== PAGE STRUCTURE ===== */

body {
  margin: 0;
  /* font-family: Arial, Helvetica, sans-serif; */
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: #222;
  margin: 0;
  padding: 0;
  background-color: #f0f0f0;
}

h1 {
  /* font-size: 28px; 
     font-weight: 600; */
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.2px;

  margin-bottom: 18px;
}

h2 {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 6px;

  /* margin-top: 28px; */
  margin-top: 22px;
}

p {
  font-size: 16px;
  line-height: 1.6;
}

/* ===== BUTTONS STRUCTURE ===== */

  .btn {
    display: inline-block;
    padding: 11px 20px;
    text-decoration: none;
    margin-right: 12px;

    border: 1px solid #2a2a2a;
    border-radius: 3px;

    font-size: 15px;
    font-weight: 500;

    background: #ffffff;
    color: #222;

    transition: all 0.15s ease;
  }

  .btn:hover {
    background: #2a2a2a;
    color: #ffffff;
  }

  .btn.primary {
    background: #2a2a2a;
    color: #fff;
  }

  .btn.secondary {
    background: transparent;
    border: 1px solid #bbb;
    color: #777;
  }

/* ===== LIUTAIO CENTERED PAGE CONTENT ===== */

  .centered-content {
    /* display: flex;
    flex-direction: column; */
    display: block;

    width: 100%;
    /* align-items: stretch; */ 
    margin: 0 auto;
    max-width: 950px;
    padding: 40px 20px; 
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  }

  .centered-content > :first-child {
    margin-top: 0;
  }

  /* --- PAGE FLOW SPACING --- */

  /* spacing around Typical Situations block */
  .situations {
    margin-top: 6px;
    margin-bottom: 28px;
  }

  /* keep the action closer to the list */
  .actions {
    margin-top: 4px;
  }

  .situations h2 {
    margin-top: 6px;      /* reduces the gap after paragraph */
    margin-bottom: 14px;
  }
  .situations ul {
    padding-left: 22px;
    margin-top: 10px;
  }

  .situations li {
    margin-bottom: 8px;
  }

/* ===== LIUTAIO HEADER SYSTEM ===== */

  /* Centering the entire header wrapper */
  .header-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    background-color: #f4f4f4;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: background-color 0.3s ease;

    position: relative;        /* ← ADD THIS */
    z-index: 10;               /* ← ADD THIS */
  }

  .header-container {
    display: flex;
    align-items: center;
    width: 100%;

    /* max-width: 1200px;  */
    max-width: 950px;

    /* height: 120px; */ /* Increased height slightly to allow for bigger text */
    height: 105px; /* Increased height slightly to allow for bigger text */
  }

  .logo-box {
    background-color: #00AEEF; /* Official Liutaio Blue */
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0; /* Zero padding for maximum image text size */
    margin: 0;
  }

  .logo-box img {
    height: 100%; 
    width: auto;
    display: block;
  }

  .header-text {
    padding-left: 30px;
    font-size: 26px; /* Increased size for high impact */
    font-weight: 600; /* Extra bold for authority */
    color: #1a1a1a;
    /* font-family: 'Segoe UI', Arial, sans-serif; */

    /* letter-spacing: -1px; */ /* Tightens the look for a modern feel */
    letter-spacing: -0.4px;

    line-height: 1;
    line-height: 1.2; /* Slightly increased for better readability */
    -webkit-font-smoothing: antialiased;
  }


/* ===== MOBILE BEHAVIOR ===== */
@media (max-width: 768px) {

  .header-wrapper {
    background-color: #00AEEF;
  }

  .header-container {
    justify-content: center;
    height: 90px;
  }

  .header-text {
    display: none;
  }

  /* ===== MOBILE PAGE INDICATOR (CORRECT SCOPE) ===== */

  .mobile-page-indicator {
    display: block;
    position: absolute;
    left: 20px;
    top: 100%;

    transform: translateY(8px);

    background: #d62828;
    color: #fff;

    font-size: 13px;
    font-weight: 600;

    padding: 6px 12px;
    border-radius: 3px;

    width: fit-content;

    box-shadow: 0 2px 6px rgba(0,0,0,0.15);

    z-index: 25;
  }

}

/* ===== DARK MODE ADJUSTMENTS ===== */
@media (prefers-color-scheme: dark) {

  body {
    background-color: #121212;
    color: #e6e6e6;
  }

  /* ---- Headings must be explicitly recolored (Android Chrome fix) ---- */
  h2 {
    color: #ffffff;
  }

  /* Slight visual separation like light mode */
  h2::after {
    content: "";
    display: block;
    height: 1px;
    background: #444;
    margin-top: 6px;
  }


  
  .centered-content {
    background: #1b1b1b;
  }

  /* Fix bullet visibility */
  .situations ul {
    color: #e6e6e6;
  }

  .situations li::marker {
    color: #e6e6e6;
  }

  .btn {
    background: #2a2a2a;
    color: #ffffff;
    border: 1px solid #555;
  }

  .btn:hover {
    background: #ffffff;
    color: #000000;
  }

  .btn.primary {
    background: #d62828;
    border-color: #d62828;
  }

  .topnav {
    background-color: #1b1b1b;
    border-bottom: 1px solid #333;
  }

  .topnav a {
    color: #e6e6e6;
  }

  .topnav a.active {
    background-color: #d62828;
    color: #ffffff;
  }
  
}
