/* ============================================================
   CSS 06.06 — box-sizing: the surprise in width
   ============================================================
   content-box  → width = content only. Padding + border are ADDED on top.
                  (the browser default — confusing)
                  300 + 20 + 20 (padding) + 5 + 5 (border) = 350px
   border-box   → width = content + padding + border.
                  What you write is what you get. ✔  = 300px

   Almost every website starts with:
     * { box-sizing: border-box; }
   (* = every element. The other files in this lesson do NOT have it,
    so their boxes use the default, content-box.)
   ============================================================ */

.bs-box {
  width: 300px;
  padding: 20px;
  border: 5px solid #2D62EF;
}

.bs-content {
  box-sizing: content-box;          /* width = content only → 300 + 40 + 10 = 350px */
}

.bs-border {
  box-sizing: border-box;           /* width = everything → exactly 300px            */
}
/* Try it: change .bs-box padding to 40px → the red box grows to
   390px wide (300 + 80 + 10), the green box stays 300px.
   Try it: add  * { box-sizing: border-box; }  at the top of this file
   → now BOTH boxes are 300px. */


/* ------------------------------------------------------------
   Only to make the boxes visible — not part of this lesson
   ------------------------------------------------------------ */
.bs-box {
  margin-bottom: 10px;
  background-color: #EEF3FF;
  font-size: 15px;
}

.bs-content {
  border-color: #E54B4F;
  background-color: #FDECEC;
}

.bs-border {
  border-color: #1F9D55;
  background-color: #EAF7EF;
}

.ruler {
  width: 300px;                     /* no side padding or border → really 300px */
  background-color: #525252;
  color: #FFFFFF;
  font-size: 13px;
  text-align: center;
  padding: 2px 0;
}
