/* =========================
   RESET
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* =========================
   PAGE LAYOUT (GRID)
========================= */
body {
  font-family: "SF Pro Text", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #101010;

  padding: 2rem 3rem;
  margin-inline: auto;
  max-inline-size: 1500px;

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto 1fr auto auto;
  grid-template-areas:
    "header  header  header  header"
    "sidebar box-0   box-0   box-0"
    "sidebar box-1   box-1   box-1"
    "sidebar box-2   box-2   box-2"
    "sidebar box-3   box-3   box-3"
    "footer  footer  footer  footer";
  gap: 1rem;
  min-height: 100vh;

  overflow: visible; /* allow sticky */
}

/* =========================
   GRID AREAS
========================= */
.page-spec-title     { grid-area: header; }
.sidebar             { grid-area: sidebar; }
.main-content-box-0  { grid-area: box-0; }
.main-content-box-1  { grid-area: box-1; }
.main-content-box-2  { grid-area: box-2; }
.main-content-box-3  { grid-area: box-3; }
.footer              { grid-area: footer; }

/* =========================
   SHARED PANEL STYLES
========================= */
.page-spec-title,
.footer {
  border: 1px solid var(--clr--blue_lite);
  padding: 1rem 1.5rem;
}

/* =========================
   HEADER / NAV
========================= */
.page-spec-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--clr--blue_dark);
}

.site-nav-toggle {
  font-size: 1.75rem;
  line-height: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.site-nav {
  display: none;
  justify-content: flex-end;
  gap: 1.25rem;
}

.site-nav.is-open { display: flex; }

.site-nav a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--clr--blue_dark);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav-toggle:hover {
  color: var(--clr-gray70);
}

.spec-title a {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.spec-title a:hover {
  opacity: 0.8;
}

/* =========================
   TYPOGRAPHY
========================= */
h1 {
  font-size: 1rem;
  line-height: 1.5;
  margin-block-end: 0.25em;
}

h2 {
  font-size: 1.15rem;
  line-height: 1.5;
  margin-block-end: 0.5em;
}

p + p {
  margin-block-start: 1em;
}

/* =========================
   SIDEBAR
   ✅ Mobile = normal flow (relative)
   ✅ Desktop = sticky (set in @media min-width:650px)
========================= */
.sidebar {
  position: relative; /* default (mobile-safe) */
  top: auto;

  align-self: start;
  height: fit-content;
  border-radius: var(--radius);
  padding: 1rem;
}

.house-y_room-y {
  display: grid;
  margin-top: 150px;
  gap: 0.05rem;
}

.sidebar-nav {
  width: 100%;
  text-align: left;

  font-family: "Roboto", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;

  padding: 0.6rem 0.85rem;
  border-radius: 5px;

  border: 1px solid var(--clr--green_forest);
  background-color: var(--clr--green_aqua);
  color: var(--clr--green_dark);

  cursor: pointer;
  transition: transform 120ms ease, box-shadow 160ms ease;
}

.sidebar-nav:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}
.sidebar-nav:active { transform: translateY(0); }

/* ===== Sidebar toggle button ===== */
.sidebar-toggle{
  font-size: 1rem;
  line-height: 1;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
}

.sidebar-toggle:hover { border-color: var(--clr--blue_lite); }

.house-y_room-y a {
  display: inline-block;
  text-decoration: none;

  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;

  white-space: nowrap;           /* ✅ prevents EP-A111 from breaking */

  justify-self: start;
  width: fit-content;

  margin-top: 3px;

  padding: 0.35rem 0.6rem;
  border-radius: 6px;

  border: 1px solid var(--clr--blue_mid);
  
  

  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 120ms ease;
}
.house-y_room-y a:hover {
 
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}




/* ===== DESKTOP: sidebar always visible, toggle hidden ===== */
@media (min-width: 650px){
  .sidebar-toggle{
    display: none;
  }
  .sidebar{
    display: block !important;  /* force visible */
  }
}

/* =========================
   PARTS DROPDOWN (MOBILE)
   house-y_room-y becomes dropdown menu
========================= */
.parts-dropdown-toggle {
  display: none; /* hidden on desktop */

  width: 50%;
  text-align: left;

  font-family: "Roboto", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;

  padding: 0.75rem 0.9rem;
  border-radius: 12px;

  border: 1px solid var(--clr-gray30);
  background: var(--clr--blue_lite);
  color: var(--clr-gray70);

  cursor: pointer;
  transition: transform 120ms ease, box-shadow 160ms ease;
}

.parts-dropdown-toggle:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.parts-dropdown-toggle:active { transform: translateY(0); }

.parts-dropdown-toggle:focus-visible {
  outline: 2px solid var(--clr-gray10);
  outline-offset: 2px;
}

.parts-dropdown-toggle .chev {
  float: right;
  transition: transform 160ms ease;
}

.parts-dropdown {
  /* desktop default = open (so your list shows normally) */
}

/* ✅ MOBILE behavior */
@media (max-width: 649px) {
  .sidebar {
    display: block;
    position: relative;
    top: auto;
    padding: 0.75rem;
  }

  .parts-dropdown-toggle {
    display: block;
  }

  .parts-dropdown {
    display: none;
    margin-top: 0.5rem;

    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 0.5rem;
    background: #fff;
  }

  .parts-dropdown.is-open {
    display: block;
  }

  .house-y_room-y {
    margin-top: 0;
    gap: 0.015rem;
  }

  .house-y_room-y button {
    margin-left: 0;
  }

  .parts-dropdown-toggle[aria-expanded="true"] .chev {
    transform: rotate(180deg);
  }
}

/* ✅ DESKTOP behavior stays normal + ✅ STICKY SIDEBAR (your example) */
@media (min-width: 650px) {
  .parts-dropdown-toggle {
    display: none;
  }

  .parts-dropdown {
    display: block !important;
  }

  /* ✅ STICKY ON DESKTOP */
  .sidebar {
    position: sticky;
    top: 15rem;       /* <-- your example */
    align-self: start;
    height: fit-content;
  }

  .house-y_room-y {
    margin-top: 100px;
  }
}

/* =========================
   MAIN BOX FLEX LAYOUT
========================= */
.main-content-box-0,
.main-content-box-1,
.main-content-box-2,
.main-content-box-3 {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

/* full-width description row */
.main-content-box-0 > .assembly-description,
.main-content-box-1 > .assembly-description2,
.main-content-box-2 > .assembly-description3,
.main-content-box-3 > .assembly-description4  {
  flex: 0 0 100%;
}

/* equal-width columns (houses) */
.main-content-box-0 > .house-1,
.main-content-box-0 > .house-2,
.main-content-box-1 > .house-3,
.main-content-box-1 > .house-4,
.main-content-box-2 > .house-5,
.main-content-box-2 > .house-6,
.main-content-box-3 > .house-7,
.main-content-box-3 > .house-8  {
  flex: 1 1 0;
  max-width: none;
  min-width: 280px;
}

/* =========================
   ICON / SVG SIZING
========================= */
.assembly-description {
  width: 100%;
  text-align: center;
  font-size: 200%;
  margin: 0.25rem auto 0.75rem;
  margin-top: 100px;
}

.assembly-description2 {
  width: 100%;
  text-align: center;
  font-size: 200%;
  margin: 0.25rem auto 0.75rem;
  margin-top: 150px;
}

.assembly-description3 {
  width: 100%;
  text-align: center;
  font-size: 200%;
  margin: 0.25rem auto 0.75rem;
  margin-top: 100px;
}

.assembly-description4 {
  width: 100%;
  text-align: center;
  font-size: 200%;
  margin: 0.25rem auto 0.75rem;
  margin-top: 150px;
}

.assembly-icon-1,
.assembly-icon-2,
.assembly-icon-3,
.assembly-icon-4,
.assembly-icon-5,
.assembly-icon-6
 {
  display: block;
  height: auto;
  max-width: 100%;
}

/* NOTE: your large % widths kept as-is */
.assembly-icon-1 {
  margin-left: 100px;
  width: 140%;
  max-width: 1000px;
}

.assembly-icon-2 {
  margin-left: 70px;
  margin-top: 210px;
  width: 170%;
  max-width: 800px;
}

.assembly-icon-3 {
  margin-left: 100px;
  width: 140%;
  max-width: 1000px;
}


.assembly-icon-4 {
  margin-top: 150px;
  margin-left: 80px;
  width: 110%;
  max-width: 700px;
}

.spec11-wrap {
  margin-left: 50px;
  margin-top: 250px;
  width: 140%;
  max-width: 1000px;
}

/* zoom (fixed broken comments) */
.assembly-icon-1 {
  transform-origin: center;
  transition: transform 180ms ease, filter 180ms ease;
}

/* =========================
   BUTTONS
========================= */
.house-y_room-y button {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;

  justify-self: start;
  width: fit-content;

  margin-top: 3px;

  padding: 0.35rem 0.6rem;
  border-radius: 6px;

  border: 1px solid var(--clr--blue_mid);
  background-color: transparent;
  color: var(--clr--blue_dark);

  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 120ms ease;
}

.house-y_room-y button:hover {
  background-color: var(--clr--blue_mid);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.house-y_room-y button:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.house-y_room-y button:focus-visible {
  outline: 2px solid var(--clr--blue_sky);
  outline-offset: 2px;
}

/* Apply the green/aqua look to ALL part-number buttons (1–10) */
.assembly-part-number-1,
.assembly-part-number-2,
.assembly-part-number-3,
.assembly-part-number-4,
.assembly-part-number-5,
.assembly-part-number-6,
.assembly-part-number-7,
.assembly-part-number-8,
.assembly-part-number-9,
.assembly-part-number-10 {
  background-color: var(--clr-primary);
  border-color: var(--clr--blue_dark);
  color: var(--clr--blue_dark);
}

/* =========================
   CENTER ROOMS
========================= */
.house-1_room-1,
.house-2_room-2,
.house-3_room-3,
.house-4_room-4,
.house-5_room-5,
.house-6_room-6,
.house-7_room-7,
.house-8_room-8  {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  width: 100%;
  margin-top: 10px;
}

.house-1 { margin-top: 20px; }
.house-2 { margin-top: -200px; }
.house-3 { margin-top: -100px; }
.house-4 { margin-top: -100px; }
.house-5 { margin-top: -100px; }
.house-6 { margin-top: -200px; }
.house-7 { margin-top: -120px; }
.house-8 { margin-top: -80px; }


/* =========================
   TRAINING SUMMARY
========================= */
.training-summary {
  border-radius: 12px;
  padding: 1rem 1.1rem;
  max-width: 70ch;
  font-family: "Roboto", system-ui, sans-serif;
  color: #101010;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ts-kicker {
  display: block;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.ts-sub {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.ts-title {
  display: block;
  font-weight: 700;
  font-size: 1.1rem;
  padding-top: 0.25rem;
  margin-bottom: 0.35rem;
}

.ts-h {
  display: block;
  font-weight: 700;
  font-size: 0.98rem;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ts-text {
  display: block;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #1a1a1a;
}

.ts-item {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: #101010;
  margin-top: 0.35rem;
}

.ts-bullet {
  display: block;
  font-size: 0.93rem;
  line-height: 1.55;
  color: #1a1a1a;
  padding-left: 1.1rem;
  position: relative;
}

.ts-bullet::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}

.ts-subbullet {
  display: block;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #1a1a1a;
  margin-left: 1.35rem;
  padding-left: 1.1rem;
  position: relative;
}

.ts-subbullet::before {
  content: "◦";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}

.ts-item + .ts-bullet {
  margin-top: 0.15rem;
}

@media (max-width: 700px) {
  .training-summary {
    padding: 0.9rem;
    max-width: 100%;
  }

  .ts-title {
    font-size: 1.05rem;
  }
}

/* =========================
   RESPONSIVE (MEDIA)
========================= */
@media (max-width: 649px) {
  body {
    padding: 1rem;
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas:
      "header  header  header  header"
      "sidebar sidebar sidebar sidebar"
      "box-0 box-0   box-0   box-0"
      "box-1 box-1   box-1   box-1"
      "box-2 box-2   box-2   box-2"
      "box-3 box-3   box-3   box-3"
      "footer  footer  footer  footer";
  }
}

/* =========================
   DESKTOP GRID (your original sidebar-left layout)
   ✅ FIXED: removed the rule that killed sticky
========================= */
@media (min-width: 650px) {
  body {
    padding: 2rem 3rem;
    grid-template-columns: 1fr 5fr 5fr 5fr;
    grid-template-areas:
      "header  header  header  header"
      "sidebar box-0   box-0   box-0"
      "sidebar box-1   box-1   box-1"
      "sidebar box-2   box-2   box-2"
      "sidebar box-3   box-3   box-3"
      "footer  footer  footer  footer";
  }

  .site-nav { display: flex; }

  /* ✅ DO NOT set .sidebar to position:relative here */
}

/* =========================
   CONTAINER QUERIES
========================= */
.main-content-box-0,
.main-content-box-1,
.main-content-box-2,
.main-content-box-3  {
  container-type: inline-size;
  container-name: content;
}

.sidebar {
  container-type: inline-size;
  container-name: sidebar;
}

@container content (width > 40rem) {
  .house-1,
  .house-2,
  .house-3,
  .house-4,
  .house-5,
  .house-6,
  .house-7,
  .house-8 {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  p {
    font-size: clamp(0.5rem, 0.5rem + 1.25cqw, 1rem);
  }
}

@media (min-width: 720px) {
  .sidebar {
    border: 1px solid #fff;
  }
}