/* ============================================================
   layout.css — Tailwind-inspired layout utilities (CSS puro)
   Breakpoints: sm 640 | md 768 | lg 1024 | xl 1280 | 2xl 1536
   ============================================================ */

/* ── Display ──────────────────────────────────────────────── */
.block        { display: block; }
.inline-block { display: inline-block; }
.inline       { display: inline; }
.hidden       { display: none; }
.flex         { display: flex; }
.inline-flex  { display: inline-flex; }
.grid         { display: grid; }
.inline-grid  { display: inline-grid; }

/* ── Flex Direction ───────────────────────────────────────── */
.flex-row         { flex-direction: row; }
.flex-row-reverse { flex-direction: row-reverse; }
.flex-col         { flex-direction: column; }
.flex-col-reverse { flex-direction: column-reverse; }

/* ── Flex Wrap ────────────────────────────────────────────── */
.flex-wrap         { flex-wrap: wrap; }
.flex-wrap-reverse { flex-wrap: wrap-reverse; }
.flex-nowrap       { flex-wrap: nowrap; }

/* ── Flex Grow / Shrink / None ────────────────────────────── */
.flex-1       { flex: 1 1 0%; }
.flex-auto    { flex: 1 1 auto; }
.flex-initial { flex: 0 1 auto; }
.flex-none    { flex: none; }
.grow         { flex-grow: 1; }
.grow-0       { flex-grow: 0; }
.shrink       { flex-shrink: 1; }
.shrink-0     { flex-shrink: 0; }

/* ── Justify Content ──────────────────────────────────────── */
.justify-start   { justify-content: flex-start; }
.justify-end     { justify-content: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around  { justify-content: space-around; }
.justify-evenly  { justify-content: space-evenly; }
.justify-stretch { justify-content: stretch; }

/* ── Justify Items ────────────────────────────────────────── */
.justify-items-start   { justify-items: start; }
.justify-items-end     { justify-items: end; }
.justify-items-center  { justify-items: center; }
.justify-items-stretch { justify-items: stretch; }

/* ── Justify Self ─────────────────────────────────────────── */
.justify-self-auto    { justify-self: auto; }
.justify-self-start   { justify-self: start; }
.justify-self-end     { justify-self: end; }
.justify-self-center  { justify-self: center; }
.justify-self-stretch { justify-self: stretch; }

/* ── Align Items ──────────────────────────────────────────── */
.items-start    { align-items: flex-start; }
.items-end      { align-items: flex-end; }
.items-center   { align-items: center; }
.items-baseline { align-items: baseline; }
.items-stretch  { align-items: stretch; }

/* ── Align Self ───────────────────────────────────────────── */
.self-auto     { align-self: auto; }
.self-start    { align-self: flex-start; }
.self-end      { align-self: flex-end; }
.self-center   { align-self: center; }
.self-baseline { align-self: baseline; }
.self-stretch  { align-self: stretch; }

/* ── Align Content ────────────────────────────────────────── */
.content-start   { align-content: flex-start; }
.content-end     { align-content: flex-end; }
.content-center  { align-content: center; }
.content-between { align-content: space-between; }
.content-around  { align-content: space-around; }
.content-evenly  { align-content: space-evenly; }
.content-stretch { align-content: stretch; }

/* ── Place Items / Content / Self ─────────────────────────── */
.place-items-start   { place-items: start; }
.place-items-end     { place-items: end; }
.place-items-center  { place-items: center; }
.place-items-stretch { place-items: stretch; }

.place-content-start   { place-content: start; }
.place-content-end     { place-content: end; }
.place-content-center  { place-content: center; }
.place-content-between { place-content: space-between; }
.place-content-around  { place-content: space-around; }
.place-content-evenly  { place-content: space-evenly; }
.place-content-stretch { place-content: stretch; }

.place-self-auto    { place-self: auto; }
.place-self-start   { place-self: start; }
.place-self-end     { place-self: end; }
.place-self-center  { place-self: center; }
.place-self-stretch { place-self: stretch; }

/* ── Grid Template Columns ────────────────────────────────── */
.grid-cols-1  { grid-template-columns: repeat(1,  minmax(0, 1fr)); }
.grid-cols-2  { grid-template-columns: repeat(2,  minmax(0, 1fr)); }
.grid-cols-3  { grid-template-columns: repeat(3,  minmax(0, 1fr)); }
.grid-cols-4  { grid-template-columns: repeat(4,  minmax(0, 1fr)); }
.grid-cols-5  { grid-template-columns: repeat(5,  minmax(0, 1fr)); }
.grid-cols-6  { grid-template-columns: repeat(6,  minmax(0, 1fr)); }
.grid-cols-7  { grid-template-columns: repeat(7,  minmax(0, 1fr)); }
.grid-cols-8  { grid-template-columns: repeat(8,  minmax(0, 1fr)); }
.grid-cols-9  { grid-template-columns: repeat(9,  minmax(0, 1fr)); }
.grid-cols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.grid-cols-11 { grid-template-columns: repeat(11, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid-cols-none { grid-template-columns: none; }
.grid-cols-subgrid { grid-template-columns: subgrid; }

/* ── Grid Template Rows ───────────────────────────────────── */
.grid-rows-1  { grid-template-rows: repeat(1,  minmax(0, 1fr)); }
.grid-rows-2  { grid-template-rows: repeat(2,  minmax(0, 1fr)); }
.grid-rows-3  { grid-template-rows: repeat(3,  minmax(0, 1fr)); }
.grid-rows-4  { grid-template-rows: repeat(4,  minmax(0, 1fr)); }
.grid-rows-5  { grid-template-rows: repeat(5,  minmax(0, 1fr)); }
.grid-rows-6  { grid-template-rows: repeat(6,  minmax(0, 1fr)); }
.grid-rows-none { grid-template-rows: none; }
.grid-rows-subgrid { grid-template-rows: subgrid; }

/* ── Grid Auto Flow ───────────────────────────────────────── */
.grid-flow-row        { grid-auto-flow: row; }
.grid-flow-col        { grid-auto-flow: column; }
.grid-flow-dense      { grid-auto-flow: dense; }
.grid-flow-row-dense  { grid-auto-flow: row dense; }
.grid-flow-col-dense  { grid-auto-flow: column dense; }

/* ── Grid Auto Columns ────────────────────────────────────── */
.auto-cols-auto { grid-auto-columns: auto; }
.auto-cols-min  { grid-auto-columns: min-content; }
.auto-cols-max  { grid-auto-columns: max-content; }
.auto-cols-fr   { grid-auto-columns: minmax(0, 1fr); }

/* ── Grid Auto Rows ───────────────────────────────────────── */
.auto-rows-auto { grid-auto-rows: auto; }
.auto-rows-min  { grid-auto-rows: min-content; }
.auto-rows-max  { grid-auto-rows: max-content; }
.auto-rows-fr   { grid-auto-rows: minmax(0, 1fr); }

/* ── Col Span ─────────────────────────────────────────────── */
.col-auto      { grid-column: auto; }
.col-span-1    { grid-column: span 1  / span 1; }
.col-span-2    { grid-column: span 2  / span 2; }
.col-span-3    { grid-column: span 3  / span 3; }
.col-span-4    { grid-column: span 4  / span 4; }
.col-span-5    { grid-column: span 5  / span 5; }
.col-span-6    { grid-column: span 6  / span 6; }
.col-span-7    { grid-column: span 7  / span 7; }
.col-span-8    { grid-column: span 8  / span 8; }
.col-span-9    { grid-column: span 9  / span 9; }
.col-span-10   { grid-column: span 10 / span 10; }
.col-span-11   { grid-column: span 11 / span 11; }
.col-span-12   { grid-column: span 12 / span 12; }
.col-span-full { grid-column: 1 / -1; }

/* ── Col Start / End ──────────────────────────────────────── */
.col-start-1  { grid-column-start: 1; }
.col-start-2  { grid-column-start: 2; }
.col-start-3  { grid-column-start: 3; }
.col-start-4  { grid-column-start: 4; }
.col-start-5  { grid-column-start: 5; }
.col-start-6  { grid-column-start: 6; }
.col-start-7  { grid-column-start: 7; }
.col-start-8  { grid-column-start: 8; }
.col-start-9  { grid-column-start: 9; }
.col-start-10 { grid-column-start: 10; }
.col-start-11 { grid-column-start: 11; }
.col-start-12 { grid-column-start: 12; }
.col-start-13 { grid-column-start: 13; }
.col-start-auto { grid-column-start: auto; }

.col-end-1  { grid-column-end: 1; }
.col-end-2  { grid-column-end: 2; }
.col-end-3  { grid-column-end: 3; }
.col-end-4  { grid-column-end: 4; }
.col-end-5  { grid-column-end: 5; }
.col-end-6  { grid-column-end: 6; }
.col-end-7  { grid-column-end: 7; }
.col-end-8  { grid-column-end: 8; }
.col-end-9  { grid-column-end: 9; }
.col-end-10 { grid-column-end: 10; }
.col-end-11 { grid-column-end: 11; }
.col-end-12 { grid-column-end: 12; }
.col-end-13 { grid-column-end: 13; }
.col-end-auto { grid-column-end: auto; }

/* ── Row Span ─────────────────────────────────────────────── */
.row-auto      { grid-row: auto; }
.row-span-1    { grid-row: span 1  / span 1; }
.row-span-2    { grid-row: span 2  / span 2; }
.row-span-3    { grid-row: span 3  / span 3; }
.row-span-4    { grid-row: span 4  / span 4; }
.row-span-5    { grid-row: span 5  / span 5; }
.row-span-6    { grid-row: span 6  / span 6; }
.row-span-full { grid-row: 1 / -1; }

/* ── Row Start / End ──────────────────────────────────────── */
.row-start-1  { grid-row-start: 1; }
.row-start-2  { grid-row-start: 2; }
.row-start-3  { grid-row-start: 3; }
.row-start-4  { grid-row-start: 4; }
.row-start-5  { grid-row-start: 5; }
.row-start-6  { grid-row-start: 6; }
.row-start-7  { grid-row-start: 7; }
.row-start-auto { grid-row-start: auto; }

.row-end-1  { grid-row-end: 1; }
.row-end-2  { grid-row-end: 2; }
.row-end-3  { grid-row-end: 3; }
.row-end-4  { grid-row-end: 4; }
.row-end-5  { grid-row-end: 5; }
.row-end-6  { grid-row-end: 6; }
.row-end-7  { grid-row-end: 7; }
.row-end-auto { grid-row-end: auto; }

/* ── Gap ──────────────────────────────────────────────────── */
.gap-0    { gap: 0px; }
.gap-px   { gap: 1px; }
.gap-0\.5 { gap: 0.125rem; }
.gap-1    { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2    { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3    { gap: 0.75rem; }
.gap-3\.5 { gap: 0.875rem; }
.gap-4    { gap: 1rem; }
.gap-5    { gap: 1.25rem; }
.gap-6    { gap: 1.5rem; }
.gap-7    { gap: 1.75rem; }
.gap-8    { gap: 2rem; }
.gap-9    { gap: 2.25rem; }
.gap-10   { gap: 2.5rem; }
.gap-11   { gap: 2.75rem; }
.gap-12   { gap: 3rem; }
.gap-14   { gap: 3.5rem; }
.gap-16   { gap: 4rem; }
.gap-20   { gap: 5rem; }
.gap-24   { gap: 6rem; }
.gap-28   { gap: 7rem; }
.gap-32   { gap: 8rem; }

/* gap-x (column-gap) */
.gap-x-0    { column-gap: 0px; }
.gap-x-px   { column-gap: 1px; }
.gap-x-1    { column-gap: 0.25rem; }
.gap-x-2    { column-gap: 0.5rem; }
.gap-x-3    { column-gap: 0.75rem; }
.gap-x-4    { column-gap: 1rem; }
.gap-x-5    { column-gap: 1.25rem; }
.gap-x-6    { column-gap: 1.5rem; }
.gap-x-8    { column-gap: 2rem; }
.gap-x-10   { column-gap: 2.5rem; }
.gap-x-12   { column-gap: 3rem; }
.gap-x-16   { column-gap: 4rem; }
.gap-x-20   { column-gap: 5rem; }
.gap-x-24   { column-gap: 6rem; }

/* gap-y (row-gap) */
.gap-y-0    { row-gap: 0px; }
.gap-y-px   { row-gap: 1px; }
.gap-y-1    { row-gap: 0.25rem; }
.gap-y-2    { row-gap: 0.5rem; }
.gap-y-3    { row-gap: 0.75rem; }
.gap-y-4    { row-gap: 1rem; }
.gap-y-5    { row-gap: 1.25rem; }
.gap-y-6    { row-gap: 1.5rem; }
.gap-y-8    { row-gap: 2rem; }
.gap-y-10   { row-gap: 2.5rem; }
.gap-y-12   { row-gap: 3rem; }
.gap-y-16   { row-gap: 4rem; }
.gap-y-20   { row-gap: 5rem; }
.gap-y-24   { row-gap: 6rem; }

/* ── Order ────────────────────────────────────────────────── */
.order-first { order: -9999; }
.order-last  { order: 9999; }
.order-none  { order: 0; }
.order-1     { order: 1; }
.order-2     { order: 2; }
.order-3     { order: 3; }
.order-4     { order: 4; }
.order-5     { order: 5; }
.order-6     { order: 6; }
.order-7     { order: 7; }
.order-8     { order: 8; }
.order-9     { order: 9; }
.order-10    { order: 10; }
.order-11    { order: 11; }
.order-12    { order: 12; }

/* ── Position ─────────────────────────────────────────────── */
.static   { position: static; }
.fixed    { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.sticky   { position: sticky; }

/* ── Inset / Top / Right / Bottom / Left ──────────────────── */
.inset-0    { inset: 0px; }
.inset-auto { inset: auto; }
.inset-x-0  { left: 0; right: 0; }
.inset-y-0  { top: 0; bottom: 0; }
.top-0      { top: 0px; }
.right-0    { right: 0px; }
.bottom-0   { bottom: 0px; }
.left-0     { left: 0px; }
.top-auto   { top: auto; }
.right-auto { right: auto; }
.bottom-auto{ bottom: auto; }
.left-auto  { left: auto; }
.top-full   { top: 100%; }
.right-full { right: 100%; }
.bottom-full{ bottom: 100%; }
.left-full  { left: 100%; }

/* ── Z-Index ──────────────────────────────────────────────── */
.z-0    { z-index: 0; }
.z-10   { z-index: 10; }
.z-20   { z-index: 20; }
.z-30   { z-index: 30; }
.z-40   { z-index: 40; }
.z-50   { z-index: 50; }
.z-auto { z-index: auto; }

/* ── Overflow ─────────────────────────────────────────────── */
.overflow-auto    { overflow: auto; }
.overflow-hidden  { overflow: hidden; }
.overflow-clip    { overflow: clip; }
.overflow-visible { overflow: visible; }
.overflow-scroll  { overflow: scroll; }
.overflow-x-auto  { overflow-x: auto; }
.overflow-y-auto  { overflow-y: auto; }
.overflow-x-hidden{ overflow-x: hidden; }
.overflow-y-hidden{ overflow-y: hidden; }

/* ── Width ────────────────────────────────────────────────── */
.w-auto  { width: auto; }
.w-full  { width: 100%; }
.w-screen{ width: 100vw; }
.w-min   { width: min-content; }
.w-max   { width: max-content; }
.w-fit   { width: fit-content; }
.w-1\/2  { width: 50%; }
.w-1\/3  { width: 33.333333%; }
.w-2\/3  { width: 66.666667%; }
.w-1\/4  { width: 25%; }
.w-3\/4  { width: 75%; }
.w-1\/5  { width: 20%; }
.w-2\/5  { width: 40%; }
.w-3\/5  { width: 60%; }
.w-4\/5  { width: 80%; }

/* ── Min / Max Width ──────────────────────────────────────── */
.min-w-0      { min-width: 0px; }
.min-w-full   { min-width: 100%; }
.min-w-min    { min-width: min-content; }
.min-w-max    { min-width: max-content; }
.max-w-none   { max-width: none; }
.max-w-xs     { max-width: 20rem; }
.max-w-sm     { max-width: 24rem; }
.max-w-md     { max-width: 28rem; }
.max-w-lg     { max-width: 32rem; }
.max-w-xl     { max-width: 36rem; }
.max-w-2xl    { max-width: 42rem; }
.max-w-3xl    { max-width: 48rem; }
.max-w-4xl    { max-width: 56rem; }
.max-w-5xl    { max-width: 64rem; }
.max-w-6xl    { max-width: 72rem; }
.max-w-7xl    { max-width: 80rem; }
.max-w-full   { max-width: 100%; }
.max-w-screen { max-width: 100vw; }
.max-w-prose  { max-width: 65ch; }

/* ── Height ───────────────────────────────────────────────── */
.h-auto   { height: auto; }
.h-full   { height: 100%; }
.h-screen { height: 100vh; }
.h-min    { height: min-content; }
.h-max    { height: max-content; }
.h-fit    { height: fit-content; }
.h-1\/2   { height: 50%; }

/* ── Min / Max Height ─────────────────────────────────────── */
.min-h-0      { min-height: 0px; }
.min-h-full   { min-height: 100%; }
.min-h-screen { min-height: 100vh; }
.max-h-none   { max-height: none; }
.max-h-full   { max-height: 100%; }
.max-h-screen { max-height: 100vh; }

/* ── Container ────────────────────────────────────────────── */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* ── Columns (multi-column layout) ───────────────────────── */
.columns-1  { columns: 1; }
.columns-2  { columns: 2; }
.columns-3  { columns: 3; }
.columns-4  { columns: 4; }
.columns-auto { columns: auto; }

/* ── Aspect Ratio ─────────────────────────────────────────── */
.aspect-auto    { aspect-ratio: auto; }
.aspect-square  { aspect-ratio: 1 / 1; }
.aspect-video   { aspect-ratio: 16 / 9; }

/* ── Object Fit ───────────────────────────────────────────── */
.object-contain  { object-fit: contain; }
.object-cover    { object-fit: cover; }
.object-fill     { object-fit: fill; }
.object-none     { object-fit: none; }
.object-scale    { object-fit: scale-down; }

/* ── Visibility ───────────────────────────────────────────── */
.visible   { visibility: visible; }
.invisible { visibility: hidden; }

/* ============================================================
   RESPONSIVE PREFIXES
   Usage: <class>  →  base
          sm:<class> → @media (min-width: 640px)
          md:<class> → @media (min-width: 768px)
          lg:<class> → @media (min-width: 1024px)
          xl:<class> → @media (min-width: 1280px)
          2xl:<class>→ @media (min-width: 1536px)
   ============================================================ */

/* ── sm: 640px ────────────────────────────────────────────── */
@media (min-width: 640px) {
  .sm\:block        { display: block; }
  .sm\:inline-block { display: inline-block; }
  .sm\:hidden       { display: none; }
  .sm\:flex         { display: flex; }
  .sm\:inline-flex  { display: inline-flex; }
  .sm\:grid         { display: grid; }

  .sm\:flex-row  { flex-direction: row; }
  .sm\:flex-col  { flex-direction: column; }
  .sm\:flex-wrap { flex-wrap: wrap; }
  .sm\:flex-nowrap { flex-wrap: nowrap; }

  .sm\:justify-start   { justify-content: flex-start; }
  .sm\:justify-end     { justify-content: flex-end; }
  .sm\:justify-center  { justify-content: center; }
  .sm\:justify-between { justify-content: space-between; }
  .sm\:justify-around  { justify-content: space-around; }

  .sm\:items-start   { align-items: flex-start; }
  .sm\:items-end     { align-items: flex-end; }
  .sm\:items-center  { align-items: center; }
  .sm\:items-stretch { align-items: stretch; }

  .sm\:grid-cols-1  { grid-template-columns: repeat(1,  minmax(0, 1fr)); }
  .sm\:grid-cols-2  { grid-template-columns: repeat(2,  minmax(0, 1fr)); }
  .sm\:grid-cols-3  { grid-template-columns: repeat(3,  minmax(0, 1fr)); }
  .sm\:grid-cols-4  { grid-template-columns: repeat(4,  minmax(0, 1fr)); }
  .sm\:grid-cols-5  { grid-template-columns: repeat(5,  minmax(0, 1fr)); }
  .sm\:grid-cols-6  { grid-template-columns: repeat(6,  minmax(0, 1fr)); }
  .sm\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

  .sm\:col-span-1  { grid-column: span 1  / span 1; }
  .sm\:col-span-2  { grid-column: span 2  / span 2; }
  .sm\:col-span-3  { grid-column: span 3  / span 3; }
  .sm\:col-span-4  { grid-column: span 4  / span 4; }
  .sm\:col-span-5  { grid-column: span 5  / span 5; }
  .sm\:col-span-6  { grid-column: span 6  / span 6; }
  .sm\:col-span-full { grid-column: 1 / -1; }

  .sm\:gap-0  { gap: 0; }
  .sm\:gap-2  { gap: 0.5rem; }
  .sm\:gap-4  { gap: 1rem; }
  .sm\:gap-6  { gap: 1.5rem; }
  .sm\:gap-8  { gap: 2rem; }
  .sm\:gap-10 { gap: 2.5rem; }
  .sm\:gap-12 { gap: 3rem; }

  .sm\:w-full   { width: 100%; }
  .sm\:w-auto   { width: auto; }
  .sm\:w-1\/2   { width: 50%; }
  .sm\:w-1\/3   { width: 33.333333%; }
  .sm\:w-2\/3   { width: 66.666667%; }

  .sm\:order-first { order: -9999; }
  .sm\:order-last  { order: 9999; }
  .sm\:order-1     { order: 1; }
  .sm\:order-2     { order: 2; }

  .container { max-width: 640px; }
}

/* ── md: 768px ────────────────────────────────────────────── */
@media (min-width: 768px) {
  .md\:block        { display: block; }
  .md\:inline-block { display: inline-block; }
  .md\:hidden       { display: none; }
  .md\:flex         { display: flex; }
  .md\:inline-flex  { display: inline-flex; }
  .md\:grid         { display: grid; }

  .md\:flex-row    { flex-direction: row; }
  .md\:flex-col    { flex-direction: column; }
  .md\:flex-wrap   { flex-wrap: wrap; }
  .md\:flex-nowrap { flex-wrap: nowrap; }

  .md\:justify-start   { justify-content: flex-start; }
  .md\:justify-end     { justify-content: flex-end; }
  .md\:justify-center  { justify-content: center; }
  .md\:justify-between { justify-content: space-between; }
  .md\:justify-around  { justify-content: space-around; }
  .md\:justify-evenly  { justify-content: space-evenly; }

  .md\:items-start    { align-items: flex-start; }
  .md\:items-end      { align-items: flex-end; }
  .md\:items-center   { align-items: center; }
  .md\:items-baseline { align-items: baseline; }
  .md\:items-stretch  { align-items: stretch; }

  .md\:self-start   { align-self: flex-start; }
  .md\:self-end     { align-self: flex-end; }
  .md\:self-center  { align-self: center; }
  .md\:self-stretch { align-self: stretch; }

  .md\:grid-cols-1  { grid-template-columns: repeat(1,  minmax(0, 1fr)); }
  .md\:grid-cols-2  { grid-template-columns: repeat(2,  minmax(0, 1fr)); }
  .md\:grid-cols-3  { grid-template-columns: repeat(3,  minmax(0, 1fr)); }
  .md\:grid-cols-4  { grid-template-columns: repeat(4,  minmax(0, 1fr)); }
  .md\:grid-cols-5  { grid-template-columns: repeat(5,  minmax(0, 1fr)); }
  .md\:grid-cols-6  { grid-template-columns: repeat(6,  minmax(0, 1fr)); }
  .md\:grid-cols-8  { grid-template-columns: repeat(8,  minmax(0, 1fr)); }
  .md\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .md\:grid-cols-none { grid-template-columns: none; }

  .md\:grid-rows-1 { grid-template-rows: repeat(1, minmax(0, 1fr)); }
  .md\:grid-rows-2 { grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .md\:grid-rows-3 { grid-template-rows: repeat(3, minmax(0, 1fr)); }

  .md\:col-span-1    { grid-column: span 1  / span 1; }
  .md\:col-span-2    { grid-column: span 2  / span 2; }
  .md\:col-span-3    { grid-column: span 3  / span 3; }
  .md\:col-span-4    { grid-column: span 4  / span 4; }
  .md\:col-span-5    { grid-column: span 5  / span 5; }
  .md\:col-span-6    { grid-column: span 6  / span 6; }
  .md\:col-span-8    { grid-column: span 8  / span 8; }
  .md\:col-span-full { grid-column: 1 / -1; }

  .md\:row-span-1    { grid-row: span 1 / span 1; }
  .md\:row-span-2    { grid-row: span 2 / span 2; }
  .md\:row-span-full { grid-row: 1 / -1; }

  .md\:gap-0  { gap: 0; }
  .md\:gap-2  { gap: 0.5rem; }
  .md\:gap-4  { gap: 1rem; }
  .md\:gap-5  { gap: 1.25rem; }
  .md\:gap-6  { gap: 1.5rem; }
  .md\:gap-8  { gap: 2rem; }
  .md\:gap-10 { gap: 2.5rem; }
  .md\:gap-12 { gap: 3rem; }
  .md\:gap-16 { gap: 4rem; }

  .md\:w-full  { width: 100%; }
  .md\:w-auto  { width: auto; }
  .md\:w-1\/2  { width: 50%; }
  .md\:w-1\/3  { width: 33.333333%; }
  .md\:w-2\/3  { width: 66.666667%; }
  .md\:w-1\/4  { width: 25%; }
  .md\:w-3\/4  { width: 75%; }

  .md\:order-first { order: -9999; }
  .md\:order-last  { order: 9999; }
  .md\:order-1     { order: 1; }
  .md\:order-2     { order: 2; }
  .md\:order-3     { order: 3; }

  .container { max-width: 768px; }
}

/* ── lg: 1024px ───────────────────────────────────────────── */
@media (min-width: 1024px) {
  .lg\:block        { display: block; }
  .lg\:inline-block { display: inline-block; }
  .lg\:hidden       { display: none; }
  .lg\:flex         { display: flex; }
  .lg\:inline-flex  { display: inline-flex; }
  .lg\:grid         { display: grid; }

  .lg\:flex-row    { flex-direction: row; }
  .lg\:flex-col    { flex-direction: column; }
  .lg\:flex-wrap   { flex-wrap: wrap; }
  .lg\:flex-nowrap { flex-wrap: nowrap; }

  .lg\:justify-start   { justify-content: flex-start; }
  .lg\:justify-end     { justify-content: flex-end; }
  .lg\:justify-center  { justify-content: center; }
  .lg\:justify-between { justify-content: space-between; }
  .lg\:justify-around  { justify-content: space-around; }
  .lg\:justify-evenly  { justify-content: space-evenly; }

  .lg\:items-start    { align-items: flex-start; }
  .lg\:items-end      { align-items: flex-end; }
  .lg\:items-center   { align-items: center; }
  .lg\:items-baseline { align-items: baseline; }
  .lg\:items-stretch  { align-items: stretch; }

  .lg\:self-start   { align-self: flex-start; }
  .lg\:self-end     { align-self: flex-end; }
  .lg\:self-center  { align-self: center; }
  .lg\:self-stretch { align-self: stretch; }

  .lg\:grid-cols-1  { grid-template-columns: repeat(1,  minmax(0, 1fr)); }
  .lg\:grid-cols-2  { grid-template-columns: repeat(2,  minmax(0, 1fr)); }
  .lg\:grid-cols-3  { grid-template-columns: repeat(3,  minmax(0, 1fr)); }
  .lg\:grid-cols-4  { grid-template-columns: repeat(4,  minmax(0, 1fr)); }
  .lg\:grid-cols-5  { grid-template-columns: repeat(5,  minmax(0, 1fr)); }
  .lg\:grid-cols-6  { grid-template-columns: repeat(6,  minmax(0, 1fr)); }
  .lg\:grid-cols-8  { grid-template-columns: repeat(8,  minmax(0, 1fr)); }
  .lg\:grid-cols-10 { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

  .lg\:col-span-1    { grid-column: span 1  / span 1; }
  .lg\:col-span-2    { grid-column: span 2  / span 2; }
  .lg\:col-span-3    { grid-column: span 3  / span 3; }
  .lg\:col-span-4    { grid-column: span 4  / span 4; }
  .lg\:col-span-5    { grid-column: span 5  / span 5; }
  .lg\:col-span-6    { grid-column: span 6  / span 6; }
  .lg\:col-span-8    { grid-column: span 8  / span 8; }
  .lg\:col-span-full { grid-column: 1 / -1; }

  .lg\:row-span-1    { grid-row: span 1 / span 1; }
  .lg\:row-span-2    { grid-row: span 2 / span 2; }
  .lg\:row-span-full { grid-row: 1 / -1; }

  .lg\:gap-0  { gap: 0; }
  .lg\:gap-2  { gap: 0.5rem; }
  .lg\:gap-4  { gap: 1rem; }
  .lg\:gap-5  { gap: 1.25rem; }
  .lg\:gap-6  { gap: 1.5rem; }
  .lg\:gap-8  { gap: 2rem; }
  .lg\:gap-10 { gap: 2.5rem; }
  .lg\:gap-12 { gap: 3rem; }
  .lg\:gap-16 { gap: 4rem; }
  .lg\:gap-20 { gap: 5rem; }
  .lg\:gap-24 { gap: 6rem; }

  .lg\:w-full  { width: 100%; }
  .lg\:w-auto  { width: auto; }
  .lg\:w-1\/2  { width: 50%; }
  .lg\:w-1\/3  { width: 33.333333%; }
  .lg\:w-2\/3  { width: 66.666667%; }
  .lg\:w-1\/4  { width: 25%; }
  .lg\:w-3\/4  { width: 75%; }

  .lg\:order-first { order: -9999; }
  .lg\:order-last  { order: 9999; }
  .lg\:order-1     { order: 1; }
  .lg\:order-2     { order: 2; }
  .lg\:order-3     { order: 3; }
  .lg\:order-4     { order: 4; }

  .container { max-width: 1024px; }
}

/* ── xl: 1280px ───────────────────────────────────────────── */
@media (min-width: 1280px) {
  .xl\:block        { display: block; }
  .xl\:inline-block { display: inline-block; }
  .xl\:hidden       { display: none; }
  .xl\:flex         { display: flex; }
  .xl\:inline-flex  { display: inline-flex; }
  .xl\:grid         { display: grid; }

  .xl\:flex-row    { flex-direction: row; }
  .xl\:flex-col    { flex-direction: column; }
  .xl\:flex-wrap   { flex-wrap: wrap; }
  .xl\:flex-nowrap { flex-wrap: nowrap; }

  .xl\:justify-start   { justify-content: flex-start; }
  .xl\:justify-end     { justify-content: flex-end; }
  .xl\:justify-center  { justify-content: center; }
  .xl\:justify-between { justify-content: space-between; }
  .xl\:justify-around  { justify-content: space-around; }
  .xl\:justify-evenly  { justify-content: space-evenly; }

  .xl\:items-start    { align-items: flex-start; }
  .xl\:items-end      { align-items: flex-end; }
  .xl\:items-center   { align-items: center; }
  .xl\:items-baseline { align-items: baseline; }
  .xl\:items-stretch  { align-items: stretch; }

  .xl\:grid-cols-1  { grid-template-columns: repeat(1,  minmax(0, 1fr)); }
  .xl\:grid-cols-2  { grid-template-columns: repeat(2,  minmax(0, 1fr)); }
  .xl\:grid-cols-3  { grid-template-columns: repeat(3,  minmax(0, 1fr)); }
  .xl\:grid-cols-4  { grid-template-columns: repeat(4,  minmax(0, 1fr)); }
  .xl\:grid-cols-5  { grid-template-columns: repeat(5,  minmax(0, 1fr)); }
  .xl\:grid-cols-6  { grid-template-columns: repeat(6,  minmax(0, 1fr)); }
  .xl\:grid-cols-8  { grid-template-columns: repeat(8,  minmax(0, 1fr)); }
  .xl\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

  .xl\:col-span-1    { grid-column: span 1  / span 1; }
  .xl\:col-span-2    { grid-column: span 2  / span 2; }
  .xl\:col-span-3    { grid-column: span 3  / span 3; }
  .xl\:col-span-4    { grid-column: span 4  / span 4; }
  .xl\:col-span-6    { grid-column: span 6  / span 6; }
  .xl\:col-span-full { grid-column: 1 / -1; }

  .xl\:gap-0  { gap: 0; }
  .xl\:gap-4  { gap: 1rem; }
  .xl\:gap-6  { gap: 1.5rem; }
  .xl\:gap-8  { gap: 2rem; }
  .xl\:gap-10 { gap: 2.5rem; }
  .xl\:gap-12 { gap: 3rem; }
  .xl\:gap-16 { gap: 4rem; }
  .xl\:gap-20 { gap: 5rem; }
  .xl\:gap-24 { gap: 6rem; }

  .xl\:w-full  { width: 100%; }
  .xl\:w-auto  { width: auto; }
  .xl\:w-1\/2  { width: 50%; }
  .xl\:w-1\/3  { width: 33.333333%; }
  .xl\:w-1\/4  { width: 25%; }
  .xl\:w-3\/4  { width: 75%; }

  .container { max-width: 1280px; }
}

/* ── 2xl: 1536px ──────────────────────────────────────────── */
@media (min-width: 1536px) {
  .\32xl\:block        { display: block; }
  .\32xl\:inline-block { display: inline-block; }
  .\32xl\:hidden       { display: none; }
  .\32xl\:flex         { display: flex; }
  .\32xl\:grid         { display: grid; }

  .\32xl\:grid-cols-1  { grid-template-columns: repeat(1,  minmax(0, 1fr)); }
  .\32xl\:grid-cols-2  { grid-template-columns: repeat(2,  minmax(0, 1fr)); }
  .\32xl\:grid-cols-3  { grid-template-columns: repeat(3,  minmax(0, 1fr)); }
  .\32xl\:grid-cols-4  { grid-template-columns: repeat(4,  minmax(0, 1fr)); }
  .\32xl\:grid-cols-6  { grid-template-columns: repeat(6,  minmax(0, 1fr)); }
  .\32xl\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

  .\32xl\:col-span-1    { grid-column: span 1  / span 1; }
  .\32xl\:col-span-2    { grid-column: span 2  / span 2; }
  .\32xl\:col-span-3    { grid-column: span 3  / span 3; }
  .\32xl\:col-span-4    { grid-column: span 4  / span 4; }
  .\32xl\:col-span-full { grid-column: 1 / -1; }

  .\32xl\:gap-4  { gap: 1rem; }
  .\32xl\:gap-6  { gap: 1.5rem; }
  .\32xl\:gap-8  { gap: 2rem; }
  .\32xl\:gap-12 { gap: 3rem; }
  .\32xl\:gap-16 { gap: 4rem; }

  .container { max-width: 1536px; }
}
