/* 3 Nov (Shali): five layout options for section 2 (The Horizon Assessment, #quiet-story), for review. Switch with ?s2=1..5
   (?s2=0 = the current layout); a small switcher appears at the foot of the screen while ?s2 is in the address. Desktop only
   (1001 px and wider); phones keep the current layout until an option is picked.
   Same content and order of importance in every option; 5 (Crisp) hides the long intro paragraph and the "Adult Horizon
   covers..." line, whose points are carried by the three figures and the nine organ chips.
   1 Centred      centred heading and intro, figures in one row, the three Horizon cards side by side, the price bar,
                  then the nine areas in one row.
   2 Price row    heading beside the intro; the three Horizon cards and the price as four equal cards in one row; the
                  figures as a tall list beside the nine areas.
   3 Bento        heading, figures, intro and price as tiles over Men / Women, Children and the nine areas.
   4 Column       one calm reading column: heading, intro, figures, the nine areas as a light two-column list, the three
                  Horizon cards as wide rows, the price.
   5 Crisp        heading with the figures as pills beside it, the nine areas as one row of chips, three compact Horizon
                  cards, the price bar. */

@media (min-width: 1001px) {
  /* every option: flatten the section's groups so each piece can be placed on the section grid */
  html[data-s2] #quiet-story.da.da-direct :is(.da-areas, .da-areas .quiet-copy, .da-horizon, .quiet-points-inner, .qx) { display: contents; }
  html[data-s2] #quiet-story.da.da-direct .da-board { grid-template-rows: none; gap: 24px; align-items: start; }
  html[data-s2] #quiet-story.da.da-direct .da-opening { grid-area: title; }
  html[data-s2] #quiet-story.da.da-direct .quiet-body-one { grid-area: body; margin: 0; }
  html[data-s2] #quiet-story.da.da-direct .quiet-scope { grid-area: scope; margin: 0; }
  html[data-s2] #quiet-story.da.da-direct .quiet-areas { grid-area: areas; }
  html[data-s2] #quiet-story.da.da-direct .qx-facts { grid-area: facts; margin: 0; padding: 0; }
  html[data-s2] #quiet-story.da.da-direct .qx-male { grid-area: male; }
  html[data-s2] #quiet-story.da.da-direct .qx-female { grid-area: female; }
  html[data-s2] #quiet-story.da.da-direct .qx-junior { grid-area: junior; }
  html[data-s2] #quiet-story.da.da-direct .qx-offer { grid-area: offer; }
  html[data-s2] #quiet-story.da.da-direct #beyond { grid-area: addons; margin-top: 48px; }

  /* shared: Children as a portrait card like Men / Women (options 1, 2, 5) */
  html:is([data-s2="1"], [data-s2="2"], [data-s2="5"]) #quiet-story.da.da-direct .qx-junior { height: 352px; min-height: 0; padding: 26px; display: flex; flex-direction: column; justify-content: flex-end; }
  html:is([data-s2="1"], [data-s2="2"], [data-s2="5"]) #quiet-story.da.da-direct .qx-junior .qx-fig { inset: 0 !important; width: 100% !important; height: 100% !important; }
  html:is([data-s2="1"], [data-s2="2"], [data-s2="5"]) #quiet-story.da.da-direct .qx-junior .qx-fig img { object-fit: contain; object-position: 50% 0 !important; transform: scale(1.5) !important; transform-origin: 50% 4% !important; }
  html:is([data-s2="1"], [data-s2="2"], [data-s2="5"]) #quiet-story.da.da-direct .qx-junior::after { inset: auto 0 0 0; width: auto; height: calc(136px + 26px + 64px); border-radius: 0 0 22px 22px;
    background: linear-gradient(180deg, rgba(234, 226, 211, 0) 0, rgba(234, 226, 211, .92) 48px, #eae2d3 64px, #eae2d3 100%); }
  html:is([data-s2="1"], [data-s2="2"], [data-s2="5"]) #quiet-story.da.da-direct .qx-junior .qx-copy { width: 100%; min-height: 136px; }
  html:is([data-s2="1"], [data-s2="2"], [data-s2="5"]) #quiet-story.da.da-direct .qx-junior .qx-copy h3 { font-size: clamp(24px, 2vw, 29px); white-space: nowrap; }
  html:is([data-s2="1"], [data-s2="2"], [data-s2="5"]) #quiet-story.da.da-direct .qx-junior .qx-copy p { font-size: 15px; line-height: 1.5; }

  /* ---------- 1 Centred ---------- */
  html[data-s2="1"] #quiet-story.da.da-direct .da-board { grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas: "title title title" "body body body" "facts facts facts" "male female junior" "offer offer offer" "scope scope scope" "areas areas areas" "addons addons addons"; }
  html[data-s2="1"] #quiet-story.da.da-direct .da-opening { justify-self: center; width: 100%; text-align: center; }
  html[data-s2="1"] #quiet-story.da.da-direct .quiet-title { text-align: center; }
  html[data-s2="1"] #quiet-story.da.da-direct .quiet-subhead { margin-inline: auto; }
  html[data-s2="1"] #quiet-story.da.da-direct .quiet-body-one { justify-self: center; max-width: 40em; text-align: center; }
  html[data-s2="1"] #quiet-story.da.da-direct .qx-facts { justify-self: center; grid-template-columns: repeat(3, auto); column-gap: 72px; margin: 16px 0 24px; text-align: center; }
  html[data-s2="1"] #quiet-story.da.da-direct .qx-fact dt { font-size: 34px !important; }
  html[data-s2="1"] #quiet-story.da.da-direct .quiet-scope { justify-self: center; margin-top: 48px; text-align: center; }
  html[data-s2="1"] #quiet-story.da.da-direct .quiet-areas { grid-template-columns: repeat(9, minmax(0, 1fr)) !important; gap: 10px !important; }
  html[data-s2="1"] #quiet-story.da.da-direct .quiet-areas li { height: 112px !important; }

  /* ---------- 2 Price row ---------- */
  html[data-s2="2"] #quiet-story.da.da-direct .da-board { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 20px;
    grid-template-areas: "title title body body" "male female junior offer" "facts facts scope scope" "facts facts areas areas" "addons addons addons addons"; }
  html[data-s2="2"] #quiet-story.da.da-direct .quiet-body-one { align-self: end; }
  html[data-s2="2"] #quiet-story.da.da-direct .qx-male { margin-top: 24px; } html[data-s2="2"] #quiet-story.da.da-direct :is(.qx-female, .qx-junior, .qx-offer) { margin-top: 24px; }
  html[data-s2="2"] #quiet-story.da.da-direct .qx-offer { height: 352px; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 14px; padding: 26px; }
  html[data-s2="2"] #quiet-story.da.da-direct .qx-offer .qx-price { flex-wrap: wrap; }
  html[data-s2="2"] #quiet-story.da.da-direct .qx-offer .qx-cta { width: 100%; justify-content: center; }
  html[data-s2="2"] #quiet-story.da.da-direct .qx-facts { grid-template-columns: 1fr; row-gap: 32px; margin-top: 48px; align-self: start; }
  html[data-s2="2"] #quiet-story.da.da-direct .qx-fact dt { font-size: 44px !important; }
  html[data-s2="2"] #quiet-story.da.da-direct .quiet-scope { margin-top: 48px; }

  /* ---------- 3 Bento ---------- */
  html[data-s2="3"] #quiet-story.da.da-direct .da-board { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: stretch;
    grid-template-areas:
      "title title title title title title title facts facts facts facts facts"
      "body body body body body body body offer offer offer offer offer"
      "male male male female female female scope scope scope scope scope scope"
      "male male male female female female areas areas areas areas areas areas"
      "junior junior junior junior junior junior areas areas areas areas areas areas"
      "addons addons addons addons addons addons addons addons addons addons addons addons"; }
  html[data-s2="3"] #quiet-story.da.da-direct :is(.da-opening, .qx-facts, .quiet-body-one) { padding: 28px; border-radius: 22px; background: rgba(233, 228, 218, .045); }
  html[data-s2="3"] #quiet-story.da.da-direct .qx-facts { align-content: center; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 16px; }
  html[data-s2="3"] #quiet-story.da.da-direct .qx-fact dt { font-size: 24px !important; white-space: normal; min-height: 2.3em; display: flex; align-items: flex-end; }
  html[data-s2="3"] #quiet-story.da.da-direct .quiet-body-one { max-width: none; }
  html[data-s2="3"] #quiet-story.da.da-direct .qx-offer { grid-template-columns: minmax(0, 1fr); row-gap: 14px; align-content: center; }
  html[data-s2="3"] #quiet-story.da.da-direct .qx-offer .qx-cta { grid-column: 1; grid-row: auto; justify-self: start; white-space: nowrap; }
  html[data-s2="3"] #quiet-story.da.da-direct .quiet-scope { align-self: end; padding: 16px 4px 0; }
  html[data-s2="3"] #quiet-story.da.da-direct .quiet-areas { grid-auto-rows: 1fr; align-self: stretch; }
  html[data-s2="3"] #quiet-story.da.da-direct .quiet-areas li { height: auto !important; min-height: 96px; }
  html[data-s2="3"] #quiet-story.da.da-direct .qx-offer { align-self: stretch; }

  /* ---------- 4 Column ---------- */
  html[data-s2="4"] #quiet-story.da.da-direct .da-board { grid-template-columns: minmax(0, 1fr) minmax(0, 860px) minmax(0, 1fr); row-gap: 28px;
    grid-template-areas: ". title ." ". body ." ". facts ." ". scope ." ". areas ." ". male ." ". female ." ". junior ." ". offer ." "addons addons addons"; }
  html[data-s2="4"] #quiet-story.da.da-direct .qx-facts { grid-template-columns: repeat(3, auto); justify-content: start; column-gap: 64px; margin: 8px 0; }
  html[data-s2="4"] #quiet-story.da.da-direct .quiet-scope { margin-top: 20px; }
  html[data-s2="4"] #quiet-story.da.da-direct .quiet-areas { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 0 32px !important; margin-bottom: 20px !important; }
  html[data-s2="4"] #quiet-story.da.da-direct .quiet-areas li { height: 56px !important; flex-direction: row !important; justify-content: flex-start !important; gap: 14px !important; padding: 0 !important; border: 0 !important; background: none !important; text-align: left; }
  html[data-s2="4"] #quiet-story.da.da-direct .quiet-areas .qa-ic { width: 26px !important; height: 26px !important; }
  html[data-s2="4"] #quiet-story.da.da-direct .qx-path { height: auto; min-height: 210px; padding: 28px 32px; display: flex; flex-direction: column; justify-content: center; }
  html[data-s2="4"] #quiet-story.da.da-direct .qx-path .qx-fig { position: absolute !important; inset: 0 0 0 auto !important; width: 42% !important; height: 100% !important; }
  html[data-s2="4"] #quiet-story.da.da-direct .qx-path .qx-fig img { width: 100% !important; height: 100% !important; object-fit: contain; object-position: 50% 0 !important; transform: scale(1.35) !important; transform-origin: 50% 0 !important; }
  html[data-s2="4"] #quiet-story.da.da-direct .qx-path::after { inset: 0 !important; width: 100% !important; height: 100% !important; border-radius: inherit;
    background: linear-gradient(90deg, #ebe3d5 0%, #ebe3d5 46%, rgba(235, 227, 213, .7) 60%, rgba(235, 227, 213, 0) 78%) !important; }
  html[data-s2="4"] #quiet-story.da.da-direct .qx-path .qx-copy { position: relative; z-index: 2; width: 56%; min-height: 0; }
  html[data-s2="4"] #quiet-story.da.da-direct .qx-path .qx-copy h3 { font-size: 30px; white-space: normal; }
  html[data-s2="4"] #quiet-story.da.da-direct .qx-path .qx-copy p { font-size: 16px; line-height: 1.55; }

  /* ---------- 5 Crisp ---------- */
  html[data-s2="5"] #quiet-story.da.da-direct .da-board { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
    grid-template-areas: "title title facts" "areas areas areas" "male female junior" "offer offer offer" "addons addons addons"; }
  html[data-s2="5"] #quiet-story.da.da-direct :is(.quiet-body-one, .quiet-scope) { display: none; }
  html[data-s2="5"] #quiet-story.da.da-direct .qx-facts { align-self: end; grid-template-columns: 1fr; justify-items: end; row-gap: 8px; }
  html[data-s2="5"] #quiet-story.da.da-direct .qx-fact { display: inline-flex; align-items: baseline; gap: 10px; padding: 10px 16px; border-radius: 999px; background: rgba(233, 228, 218, .07); }
  html[data-s2="5"] #quiet-story.da.da-direct .qx-fact dt { min-height: 0; font-size: 20px !important; }
  html[data-s2="5"] #quiet-story.da.da-direct .qx-fact dd { margin: 0; font-size: 13px; }
  html[data-s2="5"] #quiet-story.da.da-direct .quiet-areas { margin-top: 16px !important; grid-template-columns: repeat(9, minmax(0, 1fr)) !important; gap: 8px !important; }
  html[data-s2="5"] #quiet-story.da.da-direct .quiet-areas li { height: 88px !important; padding: 10px 6px !important; }
  html[data-s2="5"] #quiet-story.da.da-direct .qx-path { height: 320px; }
}

/* review switcher (only while ?s2 is in the address) */
.s2-switch { position: fixed; left: 50%; bottom: 16px; z-index: 60; transform: translateX(-50%); display: flex; gap: 4px; padding: 5px; border-radius: 999px;
  background: rgba(14, 14, 15, .88); box-shadow: inset 0 0 0 1px rgba(233, 228, 218, .16), 0 10px 30px rgba(0, 0, 0, .3); font: 500 13px/1 var(--f-text); }
.s2-switch a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; color: rgba(233, 228, 218, .75); text-decoration: none; white-space: nowrap; }
.s2-switch a[aria-current] { background: var(--star); color: var(--void); }

/* 3 Nov (Shali picked 1 Centred; now the default): the same order on tablets and phones - centred heading and intro,
   the figures, Men / Women / Children, the price, then the nine areas. */
@media (max-width: 1000px) {
  html[data-s2="1"] #quiet-story.da.da-direct :is(.da-areas, .da-areas .quiet-copy, .da-horizon, .quiet-points-inner, .qx) { display: contents; }
  html[data-s2="1"] #quiet-story.da.da-direct .da-board { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px;
    grid-template-areas: "title" "body" "facts" "male" "female" "junior" "offer" "scope" "areas" "addons"; }
  html[data-s2="1"] #quiet-story.da.da-direct .da-opening { grid-area: title; justify-self: center; width: 100%; max-width: 100%; text-align: center; }
  html[data-s2="1"] #quiet-story.da.da-direct .quiet-title { text-align: center; }
  html[data-s2="1"] #quiet-story.da.da-direct .quiet-subhead { margin-inline: auto; }
  html[data-s2="1"] #quiet-story.da.da-direct .quiet-body-one { grid-area: body; margin: 0 auto; max-width: 34em; text-align: center; }
  html[data-s2="1"] #quiet-story.da.da-direct .qx-facts { grid-area: facts; margin: 8px 0 12px; padding: 0; text-align: center; }
  html[data-s2="1"] #quiet-story.da.da-direct .qx-fact dt { justify-content: center; }
  html[data-s2="1"] #quiet-story.da.da-direct .qx-male { grid-area: male; }
  html[data-s2="1"] #quiet-story.da.da-direct .qx-female { grid-area: female; }
  html[data-s2="1"] #quiet-story.da.da-direct .qx-junior { grid-area: junior; }
  html[data-s2="1"] #quiet-story.da.da-direct .qx-offer { grid-area: offer; }
  html[data-s2="1"] #quiet-story.da.da-direct .quiet-scope { grid-area: scope; margin: 28px 0 0; text-align: center; }
  html[data-s2="1"] #quiet-story.da.da-direct .quiet-areas { grid-area: areas; }
  html[data-s2="1"] #quiet-story.da.da-direct #beyond { grid-area: addons; margin-top: 40px; }
}
@media (min-width: 601px) and (max-width: 1000px) {
  html[data-s2="1"] #quiet-story.da.da-direct .da-board { grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "title title" "body body" "facts facts" "male female" "junior junior" "offer offer" "scope scope" "areas areas" "addons addons"; }
}
