/*
 * The choice of the challenge inside the app (checkout.html without a product, founder's decision of 2026-11-02): one
 * screen. A computer: the choices on the left (how you start, program, size with its fee, options), the chosen account
 * on the right (the line, its rules, the price and the one blue key); the page never taller than the window. A phone:
 * the choices and the rules scroll inside the frame, the bar with the price and the key stays at the bottom. Tokens of
 * v3.css; selector/sel-view.js marks the one-screen variant with .sel-os.
 */
.sel-os .sel-kinds { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.sel-kind { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: baseline; gap: 2px 10px; min-height: 64px; padding: 10px 14px; text-align: start; }
.sel-kind-name { unicode-bidi: plaintext; font-size: 1.05rem; font-weight: 660; font-stretch: 108%; color: var(--ink); }
.sel-kind-sub { grid-column: 1; grid-row: 2; font-size: var(--t-xs); color: var(--ink-2); }
.sel-kind-from { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.sel-rec { position: absolute; inset-block-start: 3px; inset-inline: 0; width: max-content; margin-inline: auto; padding: 0 6px; border-radius: 999px; font: 600 10.5px/1.5 var(--f-sans); letter-spacing: 0;
  color: var(--pale); background: var(--cell-solid); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--link) 60%, transparent); white-space: nowrap; }
.sel-os .sel-size { position: relative; }
.sel-os .sel-size:has(.sel-rec) { padding-top: 20px; }
.sel-os .sel-sizes .sel-size { min-height: 62px; }
.sel-os .sel-sizes { overflow: visible; }
.sel-os .sel-step[hidden] { display: none; }
.sel-os .sel-legend { margin-bottom: 6px; font-size: var(--t-sm); }
.sel-os .sel-step { gap: 6px; }
.sel-os .sel-progs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sel-os .sel-prog { min-height: 0; padding: 9px 12px 10px; }
.sel-os .sel-rules-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sel-os .sel-rules-head h3 { font-size: 1rem; }
.sel-os .sel-rule { padding: 9px 0 6px; }
.sel-os .sel-rule-v { font-size: 0.98rem; }

@media (min-width: 861px) {
  body[data-co-stage="choose"] .sp-col { height: 100dvh; min-height: 0; }
  body[data-co-stage="choose"] .sp-foot { padding: 6px var(--gutter); }
  body[data-co-stage="choose"] .co-os { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding-block: 12px; }
  body[data-co-stage="choose"] .co-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 22px; margin: 0; }
  body[data-co-stage="choose"] .co-head h1 { margin: 0; font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem); }
  body[data-co-stage="choose"] .co-lede { margin: 2px 0 0; font-size: var(--t-sm); }
  body[data-co-stage="choose"] .co-grid { flex: 1 1 auto; min-height: 0; display: block; }
  body[data-co-stage="choose"] #productPanel, body[data-co-stage="choose"] #programs { height: 100%; min-height: 0; }
  body[data-co-stage="choose"] #productPanel { container-type: inline-size; }       /* the page's width, the side menu beside it (2026-11-20) */
  .sel-os .sel-grid { height: 100%; grid-template-columns: minmax(360px, 0.85fr) minmax(0, 1.15fr); grid-template-rows: minmax(0, 1fr) auto; gap: 12px 20px; align-items: stretch; }
  .sel-os .sel-main { display: contents; }
  .sel-os .sel-choices { grid-column: 1; grid-row: 1 / span 2; display: grid; gap: 14px; align-content: start; min-height: 0; overflow: auto; padding: 10px 2px 2px; scrollbar-width: thin; }
  .sel-os .sel-rules { grid-column: 2; grid-row: 1; min-height: 0; overflow: auto; padding: 14px 18px; scrollbar-width: thin; }
  .sel-os .sel-plot { height: clamp(104px, 18vh, 180px); margin: 6px 0 2px; }
  .sel-os .sel-dl { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
  .sel-os .sel-sum { grid-column: 2; grid-row: 2; position: static; }
  .sel-os .sel-sum-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title cta" "price cta" "pay cta"; align-items: center; gap: 2px 20px; padding: 14px 18px; }
  .sel-os .sel-sum-title { grid-area: title; margin: 0; }
  .sel-os .sel-price { grid-area: price; margin: 0; }
  .sel-os .sel-pay, .sel-os .sel-pay-one { grid-area: pay; margin: 0; }
  .sel-os .sel-cta { grid-area: cta; min-width: 240px; }
}
@media (min-width: 861px) and (max-height: 820px) {
  .sel-os .sel-plot { height: 110px; }
  .sel-os .sel-prog-tags { display: none; }
  .sel-os .sel-rule small { display: none; }
}
@media (min-width: 861px) {                                      /* the selector's own phone bar and drawer stay off */
  .sel-os.sel-live { padding-bottom: 0; }
  .sel-os.sel-live .sel-sum { position: static; transform: none; visibility: visible; transition: none; }
  .sel-os .sel-bar { display: none !important; }
  .sel-os.sel-live .sel-sum-body { display: grid; max-height: none; overflow: visible; border-top: 0; }
  .sel-os .sel-allrules { display: none; }
}

/* a phone: everything in one view (founder, 2026-11-02): compact rows, a small line, six rules, the price and the key in
   the bar at the bottom; "All rules" opens the rest over the page */
@media (max-width: 860px) {
  body[data-co-stage="choose"] .sp-col { height: 100dvh; min-height: 0; overflow: hidden; }
  body[data-co-stage="choose"] .sp-foot, body[data-co-stage="choose"] .co-lede { display: none; }
  body[data-co-stage="choose"] .co-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body[data-co-stage="choose"] .co-os { flex: 1 1 auto; min-height: 0; padding: 6px var(--gutter) 0; gap: 0; }
  body[data-co-stage="choose"] .co-grid { display: block; }
  .sel-os.sel-live { padding-bottom: 0; }
  .sel-os .sel-main { display: grid; gap: 6px; }
  .sel-os .sel-choices { display: grid; gap: 6px; }
  .sel-os .sel-step { gap: 0; }
  .sel-os .sel-legend, .sel-os .sel-k { margin-bottom: 3px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
  .sel-os .v3-seg { padding: 3px; }
  .sel-os .v3-seg__opt { min-height: 44px; padding: 4px 6px; }
  .sel-os .sel-kind { grid-template-columns: auto auto; grid-template-rows: auto; justify-content: space-between; align-items: center; min-height: 44px; padding: 4px 10px; }
  .sel-os .sel-kind-sub { display: none; }
  .sel-os .sel-kind-from { grid-column: 2; grid-row: 1; font-size: 12px; white-space: nowrap; }
  .sel-os .sel-progs { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; }
  .sel-os .sel-prog { align-items: center; justify-content: center; gap: 0; padding: 4px 4px; text-align: center; }
  .sel-os .sel-prog-name { font-size: 0.95rem; }
  .sel-os .sel-prog-price { font-size: 11px; white-space: nowrap; }
  .sel-os .sel-prog-tags { display: none; }
  .sel-os .sel-sizes { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; }
  .sel-os .sel-sizes .sel-size { min-height: 44px; padding: 4px 2px; }
  .sel-os .sel-size:has(.sel-rec) { padding-top: 4px; }
  .sel-os .sel-rec { inset-block-start: -8px; padding: 0 5px; font-size: 9.5px; line-height: 1.4; }
  .sel-os .sel-size-v { font-size: 12.5px; }
  .sel-os .sel-sizes .v3-seg__sub { font-size: 10.5px; }
  .sel-os [data-step="options"] > .sel-legend, .sel-os .sel-included { display: none; }
  .sel-os .sel-opts { flex-wrap: nowrap; gap: 8px; }
  .sel-os .sel-opts .sel-seg-wrap { flex: 1 1 0; min-width: 0; }
  .sel-os .sel-opts .v3-seg__opt { font-size: 12px; white-space: nowrap; }
  .sel-os .sel-rules { position: relative; padding: 8px 10px 8px; }
  .sel-os .sel-allrules { position: absolute; inset-block-start: 6px; inset-inline-end: 8px; z-index: 2; min-height: 32px; padding: 0 4px; border: 0; background: none;
    font: 600 12.5px var(--f-sans); color: var(--link); cursor: pointer; }
  .sel-os .sel-plot { height: 136px; margin: 0; overflow: hidden; }
  .sel-os .sel-rules.is-open .sel-plot { overflow: visible; }
  .sel-os .sel-dl { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 6px 0 0; }
  .sel-os .sel-rule { padding: 5px 7px; border: 0; border-radius: 8px; background: var(--cell); box-shadow: inset 0 0 0 1px var(--hair); }
  .sel-os .sel-rule dt { overflow: hidden; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
  .sel-os .sel-rule dd { margin-top: 2px; }
  .sel-os .sel-rule-v { font-size: 0.78rem; line-height: 1.2; }
  .sel-os .sel-rule small { display: none; }
  .sel-os .sel-rules:not(.is-open) .sel-rule:nth-child(n+7) { display: none; }
  .sel-os .sel-rules.is-open { position: fixed; inset: 0; z-index: 95; overflow: auto; padding: calc(56px + env(safe-area-inset-top)) var(--gutter) calc(24px + env(safe-area-inset-bottom)); border-radius: 0; background: var(--bg); }
  .sel-os .sel-rules.is-open .sel-allrules { position: fixed; inset-block-start: calc(10px + env(safe-area-inset-top)); inset-inline-end: var(--gutter); min-height: 44px; }
  .sel-os .sel-rules.is-open .sel-rules-head { position: static; width: auto; height: auto; clip: auto; white-space: normal; }
  .sel-os .sel-rules.is-open .sel-dl { grid-template-columns: minmax(0, 1fr); }
  .sel-os .sel-rules.is-open .sel-rule small { display: block; }
  .sel-os .sel-rules.is-open .sel-plot { height: 160px; }
  .sel-os .sel-bar { padding-block: 8px; }
}
@media (max-width: 860px) and (min-height: 800px) {
  .sel-os .sel-plot { height: 180px; }
}
@media (max-width: 860px) and (max-height: 760px) {
  .sel-os .sel-plot { height: 108px; }
  .sel-os .sel-main, .sel-os .sel-choices { gap: 4px; }
  .sel-os .sel-legend, .sel-os .sel-k { margin-bottom: 2px; }
}
@media (max-width: 380px) {
  .sel-os .sel-opts .v3-seg__opt { padding-inline: 3px; font-size: 11.5px; }
}
@media (max-width: 400px) {                          /* the bar: the name on its own line, the price and "Details" under it */
  .sel-os .sel-bar-toggle { grid-template-columns: auto auto; justify-content: start; align-items: baseline; column-gap: 10px; }
  .sel-os .sel-bar-name { grid-column: 1 / -1; }
  .sel-os .sel-bar-more { grid-column: auto; }
  .sel-os .sel-bar-cta { padding-inline: 12px; font-size: 14px; }
}

/* The line takes the room that is left (founder, 2026-11-09: « l'illustration n'est pas bien optimisée en hauteur, compressée,
   une zone vide en dessous ; bien visible, pas de vide », computer and phone): the panel of the rules is a column, the line
   grows into it above the rules instead of a fixed height (162 px and a 110 px hole on a 1440 x 900 screen, 108 px on a
   phone with 150 px empty above the bar). The drawing follows its box (space-line.js: ResizeObserver). */
@media (min-width: 861px) {
  .sel-os .sel-rules { display: flex; flex-direction: column; }
  /* the price card on three short lines: the name, the price, the coins under both (the key beside them) */
  .sel-os .sel-sum-body { grid-template-areas: "title cta" "price cta" "pay pay"; gap: 2px 16px; padding: 10px 16px 12px; }
  .sel-os .sel-sum-title { font-size: 1.3rem; }
  .sel-os .sel-price-v { font-size: 2.1rem; }
  .sel-os .sel-price small { flex-basis: auto; }
  .sel-os .sel-pay-one { margin-top: 4px; font-size: 12.5px; }
  .sel-os .sel-plot { flex: 1 1 auto; height: auto; min-height: clamp(110px, 18vh, 180px); }
  .sel-os .sel-dl { flex: none; }
}
@media (min-width: 861px) and (max-height: 780px) {
  .sel-os .sel-plot { height: auto; min-height: 110px; }
}
@media (max-width: 860px) {                       /* the frame down to the bar of the price; the line fills it */
  body[data-co-stage="choose"] main.co-os { display: flex; flex-direction: column; padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }   /* the bar alone, at the bottom (the space's menu is a drawer) */
  body[data-co-stage="choose"] .co-grid, body[data-co-stage="choose"] #productPanel, body[data-co-stage="choose"] #programs { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  body[data-co-stage="choose"] #programs { overflow-y: auto; }   /* the page keeps the bar's room below (.co-os); a short phone scrolls here */
  .sel-os .sel-grid { flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .sel-os .sel-main { align-self: stretch; min-height: 0; grid-template-rows: auto minmax(0, 1fr); }
  .sel-os .sel-rules { display: flex; flex-direction: column; min-height: 0; }
  .sel-os .sel-plot { flex: 1 1 auto; height: auto; min-height: 108px; }
  .sel-os .sel-rules.is-open .sel-plot { flex: none; height: 160px; }
  .sel-os .sel-dl { flex: none; }
}
/* beside the open side menu of the space (a signed-in computer, 2026-11-20): the choices keep the room they had on the
   whole width, the line and its rules take what is left */
@media (min-width: 1024px) {
  body:not([data-guest]):not([data-rail="1"]) .sel-os .sel-grid { grid-template-columns: minmax(400px, 1fr) minmax(0, 1fr); }
  body:not([data-guest]):not([data-rail="1"]) .sel-os .sel-plot { min-height: 88px; }   /* the narrower rules (French words are longer): the line gives way */
}
/* The founder's choice A (2026-11-09): the price and the key under the choices, the line and its rules the whole height
   on the right, where the choices and the price fit one above the other (from 1300 x 760; a smaller screen keeps the price on
   the right); a tall screen gets larger choice keys, so that no hole is left under them. The width is the page's own (a
   container query on the panel: 1212 px, a 1300 px screen's page), so that the side menu of the space beside it counts. */
@media (min-height: 760px) { @container (min-width: 1212px) {
  .sel-os .sel-choices { grid-row: 1; align-content: space-evenly; }   /* Instant (no program to choose): the room left spread between the groups */
  .sel-os .sel-sum { grid-column: 1; grid-row: 2; }
  .sel-os .sel-rules { grid-row: 1 / span 2; }
  /* the left column holds the price too: the four programs of 1-Step on one row */
  .sel-os .sel-progs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .sel-os .sel-prog { padding: 8px 10px 9px; gap: 2px; }
  .sel-os .sel-prog-tags span { white-space: normal; }
} }
@media (min-height: 760px) and (max-height: 879px) { @container (min-width: 1212px) {   /* a 1366 x 768 laptop: the choices a little closer */
  .sel-os .sel-choices { gap: 8px; padding-top: 2px; }
} }
@media (min-height: 880px) { @container (min-width: 1212px) {
  .sel-os .sel-choices { gap: 20px; }
  .sel-os .sel-step { gap: 8px; }
  .sel-os .sel-kind { min-height: 76px; padding: 12px 16px; }
  .sel-os .sel-kind-name { font-size: 1.15rem; }
  .sel-os .sel-sizes .sel-size { min-height: 72px; }
  .sel-os .sel-opts .v3-seg__opt { min-height: 54px; }
} }
@media (min-height: 1000px) { @container (min-width: 1212px) {
  .sel-os .sel-choices { gap: 36px; padding-top: 18px; }
  .sel-os .sel-kind { min-height: 100px; }
  .sel-os .sel-sizes .sel-size { min-height: 96px; }
  .sel-os .sel-opts .v3-seg__opt { min-height: 72px; }
} }
@media (min-width: 861px) and (max-width: 1299px) and (max-height: 820px) {   /* a small laptop or a tablet: 1-Step's four programs on one row */
  .sel-os .sel-progs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .sel-os .sel-prog { padding: 6px 8px 7px; gap: 1px; }
}
