/* css/composants.css
   The pieces shared by the rewritten pages (layer composants, declared in
   css/tokens.css). Values only through the variables of tokens.css. Lot R1
   (27.10.2026) brings what the sign-in pages use; each later lot adds what
   its pages share. */

@layer composants {

  /* ---- The way home (js/public-nav.js, 17.10.2026): the console's small
     "Retour" button, a metallic gold edge around the raised panel ---- */
  .ro-home {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: var(--cs-lw) solid transparent;
    border-radius: var(--cs-r-m);
    background: linear-gradient(var(--cs-panel-2), var(--cs-panel-2)) padding-box, var(--cs-line-grad) border-box;
    color: var(--cs-fg);
    font: 500 var(--cs-fs-md)/18px var(--cs-sans);
    transition: background var(--cs-dur), color var(--cs-dur);
  }
  .ro-home:hover { color: var(--cs-gold); }
  .ro-home:focus-visible { outline: 2px solid var(--cs-gold); outline-offset: 2px; }
  .ro-home[hidden] { display: none; }

  /* ---- An icon, drawn by the ligature of its word (aria-hidden="true",
     or the word is read with the button's name) ---- */
  .md-icon {
    display: inline-block;
    font-family: var(--cs-icons);
    font-size: 24px;
    font-style: normal;
    font-weight: normal;
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
  }

  /* ---- The buttons of a window and of a question ---- */
  .ro-modal-btn {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 64px;
    padding: 5px 12px;
    border: 1px solid transparent;
    border-radius: var(--cs-r-m);
    background: linear-gradient(var(--cs-panel-2), var(--cs-panel-2)) padding-box, var(--cs-line-grad) border-box;
    background-color: var(--cs-panel-2);
    color: var(--cs-fg);
    font: 500 12.5px var(--cs-sans);
    white-space: nowrap;
    transition: border-color .2s;
  }
  /* Enregistrer, last of the foot */
  .ro-modal-btn.primary { order: 10; background: var(--cs-sheen); color: var(--cs-gold-ink); }
  .ro-modal-btn.primary:hover { box-shadow: var(--cs-elev-1); }
  .ro-modal-btn:focus-visible { outline: 2px solid var(--cs-gold); outline-offset: 2px; }
  .ro-modal-btn:disabled { opacity: .5; cursor: default; }

  /* ---- The questions (js/toast.js confirmPopup, promptPopup): the
     console's flat panel (Greg, 26.10.2026) ---- */
  /* The same panel as a window: its ring, its shadow. */
  dialog.confirm-dialog {
    width: min(540px, calc(100vw - 32px));
    max-width: min(540px, calc(100vw - 32px));
    border: 0;
    border-radius: var(--cs-r-l);
    background: var(--cs-panel);
    color: var(--cs-fg);
    font: 400 var(--cs-fs-md)/var(--cs-lh) var(--cs-sans);
    box-shadow: 0 0 0 1px var(--cs-line-2), 0 18px 40px var(--cs-shadow);
  }
  dialog.confirm-dialog::backdrop { background: var(--cs-scrim-2); }
  .confirm-dialog { min-width: 280px; padding: 24px; }
  .confirm-dialog .confirm-dialog-body { text-align: left; }
  .confirm-dialog .confirm-title { margin: 0 0 16px; }
  .confirm-dialog .confirm-dialog-text { margin: 0; letter-spacing: .25px; white-space: pre-line; }
  .confirm-dialog .confirm-dialog-text:empty { display: none; }
  .confirm-dialog .confirm-dialog-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 24px; }
  .confirm-dialog .confirm-dialog-foot .ro-modal-btn { min-height: 0; background-color: transparent; }
  .confirm-dialog .confirm-title { color: var(--cs-fg); font: 600 var(--cs-fs-xl)/1.35 var(--cs-sans); }
  .confirm-dialog .confirm-dialog-text { color: var(--cs-fg-2); font: 400 var(--cs-fs-md)/var(--cs-lh) var(--cs-sans); }
  .confirm-dialog .confirm-dialog-icon { display: none; }
  .confirm-dialog .confirm-dialog-foot .ro-modal-btn { padding: 5px 10px; font: 500 var(--cs-fs-sm) var(--cs-sans); }
  .confirm-dialog .confirm-dialog-foot .ro-modal-btn:is(.primary, .warn, .accent) { background: var(--cs-sheen); color: var(--cs-gold-ink); font-weight: 600; }
  .confirm-dialog .confirm-dialog-foot :is(.ro-modal-btn.danger, .confirm-other) { border: 1px solid var(--cs-crit); background: none; color: var(--cs-crit); font-weight: 600; }
  .confirm-dialog .confirm-dialog-foot .confirm-other { margin-right: auto; }
  .confirm-dialog .confirm-input { border: 1px solid var(--cs-line-2); border-radius: var(--cs-r-m); background: var(--cs-panel-2); color: var(--cs-fg); font: 400 var(--cs-fs-md) var(--cs-sans); }
  .confirm-dialog .confirm-dialog-foot .ro-modal-btn { order: 0; }
  .confirm-dialog .confirm-dialog-foot .ro-modal-btn.primary:hover { box-shadow: none; }

  /* ---- A question with fields (js/toast.js promptPopup, js/pin-dialog.js:
     the enrolment of a post, a PIN): a label over each field, an error
     under them ---- */
  .confirm-dialog--prompt .confirm-field { display: block; margin-top: 16px; }
  .confirm-dialog--prompt .confirm-field-label { display: block; margin: 0 0 4px; color: var(--cs-fg-2); font: 500 var(--cs-fs-sm)/16px var(--cs-sans); letter-spacing: .04em; }
  .confirm-dialog--prompt .confirm-input { width: 100%; height: 32px; min-height: 32px; padding: 0 12px; }
  .confirm-dialog--prompt .confirm-input:is(:focus, :focus-visible) { outline: none; box-shadow: inset 0 0 0 1px var(--cs-gold); }
  .pin-dialog { overflow-y: auto; overscroll-behavior: contain; }
  .pin-dialog .pin-dialog-form { margin: 0; }
  .pin-dialog select.confirm-input { padding: 0 8px; }
  .pin-dialog .pin-dialog-error { min-height: 20px; margin: 12px 0 0; color: var(--cs-crit); font: 400 var(--cs-fs-lg)/20px var(--cs-sans); }
  .pin-dialog .pin-dialog-error:empty { min-height: 0; margin: 0; }
  .pin-dialog .confirm-dialog-foot { flex-wrap: wrap; }
  /* The advice on the browser of a floor tablet (js/device-enroll.js). */
  .pin-dialog .pin-dialog-notice { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--cs-crit-bg); color: var(--cs-crit); font: 400 var(--cs-fs-md)/1.4 var(--cs-sans); }

  /* ---- The console's small button (Retour, ...), a gold edge around the
     raised panel ---- */
  .cs-btn {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: var(--cs-r-m);
    background: linear-gradient(var(--cs-panel-2), var(--cs-panel-2)) padding-box, var(--cs-line-grad) border-box;
    color: var(--cs-fg);
    font: 500 var(--cs-fs-sm) var(--cs-sans);
    white-space: nowrap;
  }
  .cs-btn.sm { display: flex; padding: 3px 8px; }
  .cs-btn:focus-visible { outline: 2px solid var(--cs-gold); }

  /* ---- The buttons of the management pages (md-btn): filled (the gold
     one to press), outlined (a gold line round it), text (a gold word),
     large, 32 px drawn ---- */
  .md-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    padding: 6px 12px;
    border: 0;
    border-radius: var(--cs-r-m);
    background: transparent;
    color: var(--cs-fg);
    font: 500 12.5px var(--cs-sans);
    text-decoration: none;
    cursor: pointer;
  }
  .md-btn:focus-visible { outline: 3px solid var(--cs-gold); outline-offset: 2px; }
  /* An icon after the word sits closer to it; one before, closer to the edge. */
  .md-btn > .md-icon { margin-right: -6px; font-size: 16px; color: inherit; }
  .md-btn > .md-icon:first-child:not(:only-child) { margin: 0 0 0 -8px; }
  .md-btn--filled { background: var(--cs-sheen); color: var(--cs-gold-ink); }
  .md-btn--outlined {
    border: 1px solid transparent;
    background: linear-gradient(var(--cs-panel-2), var(--cs-panel-2)) padding-box, var(--cs-line-grad) border-box;
    background-color: var(--cs-panel-2);
  }
  .md-btn--text { padding: 6px 4px; color: var(--cs-gold); }
  .md-btn--lg { min-height: 40px; padding: 9px 18px; font-size: 13.5px; }

  /* ---- The date, time and colour pickers (js/md-pickers.js, 28.09.2026):
     the browser's own calendar, clock and colour dialog give way to these
     surfaces. html.md-pk-on is set by the script; a popover sits in the top
     layer, above every window, its UA frame undone ---- */
  :root.md-pk-on input:is([type="date"], [type="time"])::-webkit-calendar-picker-indicator { opacity: .72; pointer-events: none; }
  :root.md-pk-on input:is([type="date"], [type="time"]):not([disabled], [readonly]), :root.md-pk-on input[type="color"]:not([disabled]) { cursor: pointer; }
  .md-pk {
    position: fixed;
    inset: auto;
    z-index: 2000;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 16px;
    background: var(--cs-panel-2);
    color: var(--cs-fg);
    box-shadow: var(--cs-elev-2);
    font: 400 var(--cs-fs-lg)/20px var(--cs-sans);
  }
  .md-pk.md-pk-fixed { display: block; }
  .md-pk button { margin: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .md-pk button:disabled { cursor: default; }
  .md-pk button:focus-visible { outline: 2px solid var(--cs-gold); outline-offset: -2px; }
  .md-pk :is(.md-pk-title, .md-pk-nav, .md-pk-text:not(:disabled), .md-pk-day:not(:disabled, .is-sel), .md-pk-year:not(:disabled, .is-sel), .md-pk-opt:not(.is-sel)):hover { background: color-mix(in srgb, var(--cs-fg) 8%, transparent); }
  /* The date: 304 px, a month, a year's list. */
  .md-pk-date { width: 304px; padding: 8px 12px 4px; }
  .md-pk-head { display: flex; align-items: center; height: 48px; padding: 0 0 0 4px; }
  .md-pk .md-pk-title { display: inline-flex; align-items: center; gap: 4px; height: 36px; margin-right: auto; padding: 0 8px; border-radius: var(--cs-r-pill); color: var(--cs-fg-2); font: 500 var(--cs-fs-lg)/20px var(--cs-sans); text-transform: capitalize; }
  .md-pk-caret { width: 0; height: 0; border-top: 5px solid currentColor; border-left: 5px solid transparent; border-right: 5px solid transparent; transition: rotate var(--cs-dur) ease; }
  .md-pk-title[aria-expanded="true"] .md-pk-caret { rotate: 180deg; }
  .md-pk .md-pk-nav { width: 40px; height: 40px; border-radius: 50%; color: var(--cs-fg-2); font-size: 22px; line-height: 1; }
  :is(.md-pk-week, .md-pk-days) { display: grid; grid-template-columns: repeat(7, 40px); justify-content: space-between; }
  .md-pk-week span { display: flex; align-items: center; justify-content: center; height: 40px; color: var(--cs-fg); font: 400 var(--cs-fs-sm)/16px var(--cs-sans); }
  .md-pk .md-pk-day { width: 40px; height: 40px; padding: 0; border-radius: 50%; color: var(--cs-fg); font: 400 var(--cs-fs-lg)/20px var(--cs-sans); }
  .md-pk .md-pk-day:is(.is-other, :disabled) { color: color-mix(in srgb, var(--cs-fg) 38%, transparent); }
  .md-pk .md-pk-day.is-today { color: var(--cs-gold); box-shadow: inset 0 0 0 1px var(--cs-gold); }
  .md-pk .md-pk-day.is-sel { background: var(--cs-gold); color: var(--cs-gold-ink); box-shadow: none; }
  .md-pk-years { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 0; max-height: 288px; padding: 4px 0 8px; overflow-y: auto; }
  .md-pk .md-pk-year { justify-self: center; width: 72px; height: 36px; border-radius: var(--cs-r-pill); color: var(--cs-fg-2); font: 400 var(--cs-fs-lg)/20px var(--cs-sans); }
  .md-pk .md-pk-year.is-sel { background: var(--cs-gold); color: var(--cs-gold-ink); }
  .md-pk .md-pk-year:disabled { color: color-mix(in srgb, var(--cs-fg) 38%, transparent); }
  .md-pk-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
  .md-pk .md-pk-text { height: 40px; padding: 0 12px; border-radius: var(--cs-r-pill); color: var(--cs-gold); font: 500 var(--cs-fs-lg)/20px var(--cs-sans); }
  .md-pk .md-pk-text:disabled { color: color-mix(in srgb, var(--cs-fg) 38%, transparent); }
  /* The time: a menu, as the lists. */
  .md-pk-time { max-height: min(280px, 50vh); padding: 8px 0; overflow-y: auto; border-radius: var(--cs-r-m); background: var(--cs-panel-2); }
  .md-pk .md-pk-opt { display: flex; align-items: center; width: 100%; min-height: 40px; padding: 0 16px; color: var(--cs-fg); font: 400 var(--cs-fs-lg)/20px var(--cs-sans); text-align: left; }
  .md-pk .md-pk-opt.is-sel { background: var(--cs-sel); color: var(--cs-fg); }
  /* The colour: the palette, the code, the system dialog as the last resort. */
  .md-pk-color { width: 248px; padding: 16px 16px 4px; }
  .md-pk-swatches { display: grid; grid-template-columns: repeat(5, 32px); justify-content: space-between; gap: 12px 0; }
  .md-pk .md-pk-swatch { width: 32px; height: 32px; padding: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cs-fg) 24%, transparent); }
  .md-pk .md-pk-swatch.is-sel { box-shadow: 0 0 0 2px var(--cs-panel-2), 0 0 0 4px var(--cs-gold); }
  .md-pk-hexrow { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
  .md-pk-chip { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cs-fg) 24%, transparent); }
  .md-pk .md-pk-hex { flex: 1 1 auto; min-width: 0; height: 40px; margin: 0; padding: 0 12px; outline: none; border: 1px solid var(--cs-line-2); border-radius: var(--cs-r-m); background: var(--cs-sel); color: var(--cs-fg); font: 400 var(--cs-fs-lg)/20px var(--cs-sans); text-transform: lowercase; }
  .md-pk .md-pk-hex:focus { border-color: var(--cs-gold); box-shadow: inset 0 0 0 1px var(--cs-gold); }
  .md-pk .md-pk-hex.is-bad { border-color: var(--cs-crit); box-shadow: inset 0 0 0 1px var(--cs-crit); }
  .md-pk-color .md-pk-foot { margin-top: 8px; }

  /* ---- A summary card: its title, its rows, a click opens its window ---- */
  .cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin: 0 0 20px; }
  .summary-card {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: var(--cs-r-l);
    background: linear-gradient(var(--cs-panel), var(--cs-panel)) padding-box, var(--cs-line-grad) border-box;
    background-color: var(--cs-panel);
    cursor: pointer;
    transition: box-shadow var(--cs-dur), background var(--cs-dur);
  }
  .summary-card:hover { background: linear-gradient(var(--cs-panel-2), var(--cs-panel-2)) padding-box, var(--cs-line-grad) border-box; background-color: var(--cs-panel-2); }
  .summary-card-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
  .summary-card-title { display: flex; align-items: center; gap: 8px; font-size: var(--cs-fs-lg); font-weight: 600; line-height: 1.4; font-variant-numeric: normal; }
  .summary-card-title svg { width: 17px; height: 17px; color: var(--cs-gold); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .summary-card-edit { color: var(--cs-gold); font: 500 12.5px var(--cs-sans); transition: opacity .2s; }
  .summary-card-body { min-width: 0; flex: 1 1 0%; overflow: hidden; color: var(--cs-fg-2); font-variant-numeric: normal; }
  .summary-row { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; color: var(--cs-fg); }
  .summary-row + .summary-row { border-top: 1px solid transparent; border-image: var(--cs-line-grad) 1; }
  .summary-label { flex-shrink: 0; color: var(--cs-fg-2); }
  .summary-value { min-width: 0; overflow: hidden; font: 12.5px var(--cs-sans); text-align: right; white-space: nowrap; text-overflow: ellipsis; }
  :is(.summary-card-desc, .summary-empty) { color: var(--cs-fg-3); font-size: 12.5px; line-height: var(--cs-lh); font-variant-numeric: normal; }

  /* ---- A window: a veil, the box, its head, its body, its foot. Opened by
     the class open (js/modal-dismiss.js closes it) ---- */
  .ro-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--cs-scrim-2);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
  }
  .ro-modal-overlay.open { opacity: 1; visibility: visible; }
  .ro-modal {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    max-width: 960px;
    max-height: min(85vh, calc(100vh - 48px));
    border-radius: 8px;
    background: var(--cs-panel);
    box-shadow: 0 0 0 1px var(--cs-line-2), 0 18px 40px var(--cs-shadow);
    transform: translateY(12px) scale(.97);
    transition: transform .25s;
  }
  .ro-modal-overlay.open .ro-modal { transform: translateY(0) scale(1); }
  .ro-modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
    border-radius: var(--cs-r-l) var(--cs-r-l) 0 0;
  }
  .ro-modal-title { display: flex; align-items: center; gap: 10px; font-size: var(--cs-fs-xl); font-weight: 600; line-height: 1.35; }
  .ro-modal-title .md-icon { color: var(--cs-gold); font-size: 18px; }
  .ro-modal-title svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .ro-modal-close {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: transparent;
    color: var(--cs-fg-2);
    font-size: 0;
    line-height: 0;
    transition: border-color .2s, color .2s;
  }
  .ro-modal-close:hover { background: color-mix(in srgb, var(--cs-fg) 8%, transparent); }
  /* The cross, drawn in the text's colour. */
  .ro-modal-close::before {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .ro-modal-body { min-height: 0; display: flex; flex-direction: column; flex-grow: 1; overflow: auto; padding: 0 24px 16px; }
  .ro-modal-foot {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px 24px;
    border-radius: 0 0 var(--cs-r-l) var(--cs-r-l);
  }
  /* "Dernier enregistrement le ... par ..." on the left of a window's foot
     (the journal), the buttons on the right. */
  .ro-modal .ro-modal-foot--meta { flex-wrap: wrap; justify-content: space-between; }
  .ro-modal .ro-modal-foot--meta > .ro-modal-foot-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; }
  .ro-modal .ro-last-saved { display: flex; flex: 1 1 220px; align-items: center; gap: 6px; min-width: 0; margin: 0; color: var(--cs-fg-2); font: 400 var(--cs-fs-md)/18px var(--cs-sans); letter-spacing: .25px; }
  .ro-modal .ro-last-saved .md-icon { flex: none; font-size: 18px; }
  .ro-modal .ro-last-saved-text { overflow-wrap: anywhere; }

  /* ---- The tablet keyboard up (js/md-keyboard.js, 30.09.2026, Greg:
     "Remonter et retrecir"): <html> carries kb-open, and --md-vv-top /
     --md-vv-height give the part of the page still visible. Every window
     moves to the top of that part and shrinks to it; its body scrolls, its
     head and its buttons stay in view. iPad Safari does not resize the
     page, so a centred window would stay under the keyboard ---- */
  .kb-open .ro-modal-overlay { align-items: flex-start; padding-top: calc(var(--md-vv-top, 0px) + 8px); padding-bottom: 8px; }
  .kb-open .ro-modal { max-height: calc(var(--md-vv-height, 100vh) - 16px); }
  /* A window without a body of its own scrolls as a whole. */
  .kb-open .ro-modal:not(:has(> .ro-modal-body)) { overflow-y: auto; }
  /* A <dialog> is centred by its auto margins. */
  .kb-open dialog.confirm-dialog[open] { margin-top: calc(var(--md-vv-top, 0px) + 8px); margin-bottom: auto; max-height: calc(var(--md-vv-height, 100vh) - 16px); }
  /* The windows with fields: the headline and the buttons stay, the fields
     between them scroll. The small inner padding keeps the focus ring of
     the first and last field from being clipped. */
  .kb-open dialog.pin-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
  .kb-open .pin-dialog .confirm-dialog-body { flex: 0 1 auto; min-height: 0; margin: -4px; padding: 4px; overflow-y: auto; overscroll-behavior: contain; }
  .kb-open .pin-dialog .confirm-dialog-foot { flex: none; margin-top: 16px; }

  /* ---- The fields of a window ---- */
  .ro-modal :is(input:is([type="text"], [type="email"], [type="number"], [type="date"], [type="password"], [type="tel"], [type="url"], [type="time"], [type="search"]), select, textarea, .ro-modal-input) { border: 1px solid transparent; border-radius: var(--cs-r-m); background: linear-gradient(var(--cs-bg), var(--cs-bg)) padding-box, var(--cs-line-grad) border-box; background-color: var(--cs-bg); color: var(--cs-fg); font: 400 var(--cs-fs-md) var(--cs-sans); box-shadow: none; }
  .ro-modal :is(input:is([type="text"], [type="number"], [type="password"]), select) { height: 32px; min-height: 32px; padding: 0 12px; }
  .ro-modal textarea { min-height: 80px; padding: 10px 12px; }
  .ro-modal :is(input, textarea)::placeholder { color: var(--cs-fg-2); opacity: .7; }
  .ro-modal :is(input, select, textarea):focus-visible { outline: 2px solid var(--cs-gold); outline-offset: 1px; }
  .ro-modal :is(input, textarea):disabled { opacity: .6; }
  .form-group label { display: block; margin: 0 0 4px; color: var(--cs-fg-2); font-size: var(--cs-fs-sm); font-weight: 500; line-height: 16px; }
  :is(.input, .select) {
    width: 100%;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: var(--cs-r-m);
    background: linear-gradient(var(--cs-bg), var(--cs-bg)) padding-box, var(--cs-line-grad) border-box;
    background-color: var(--cs-bg);
    color: var(--cs-fg);
    font-size: var(--cs-fs-md);
    transition: border-color .2s, box-shadow .2s;
  }
  :is(.input, .select):disabled { opacity: .6; }
  .input::placeholder { color: var(--cs-fg-2); opacity: .7; }
  /* A field with the focus: its gold edge, a soft halo (no outline). */
  :is(.input, .select):focus { outline: none; }
  :is(.input, .select):focus-visible { outline: 2px solid var(--cs-gold); outline-offset: 1px; }
  .pwd-match-hint { min-height: 18px; margin-top: 4px; font-size: var(--cs-fs-sm); }
  .save-msg { font-size: 12.5px; }

  /* A list: in a browser that knows the customizable <select> (Chrome,
     Edge), it opens on a menu of the page's surfaces (28.09.2026, "toutes
     les listes"); the others keep their own list, the field the same. */
  @supports (appearance: base-select) {
    select:not([multiple], [size]), select:not([multiple], [size])::picker(select) { appearance: base-select; }
    select:not([multiple], [size], [hidden]) { display: inline-flex; align-items: center; vertical-align: middle; cursor: pointer; }
    select:not([multiple], [size])::picker-icon { margin-inline-start: auto; color: var(--cs-fg-2); transition: rotate var(--cs-dur) ease; }
    select:not([multiple], [size]):open::picker-icon { rotate: 180deg; }
    select:not([multiple], [size])::picker(select) {
      min-inline-size: anchor-size(width);
      max-block-size: min(360px, 60vh);
      margin-block: 4px;
      padding: 8px 0;
      overflow-y: auto;
      border: 0;
      border-radius: var(--cs-r-m);
      background: var(--cs-panel);
      color: var(--cs-fg);
      box-shadow: var(--cs-elev-2);
    }
    select:not([multiple], [size]) option {
      display: flex;
      align-items: center;
      min-block-size: 40px;
      padding: 0 16px;
      border: 0;
      background: transparent;
      color: var(--cs-fg);
      font: 400 var(--cs-fs-lg)/20px var(--cs-sans);
      white-space: nowrap;
      cursor: pointer;
    }
    select:not([multiple], [size]) option::checkmark { display: none; }
    select:not([multiple], [size]) option:is(:hover, :focus-visible) { outline: none; background: color-mix(in srgb, var(--cs-fg) 8%, transparent); }
    select:not([multiple], [size]) option:checked { background: var(--cs-sel); color: var(--cs-fg); }
    select:not([multiple], [size]) option:disabled { color: color-mix(in srgb, var(--cs-fg) 38%, transparent); cursor: default; }
    /* The restaurant of the bar draws its own arrow. */
    .md-rsel-select::picker-icon { display: none; }
    select hr { margin: 4px 0; border: 0; border-top: 1px solid var(--cs-line); }
  }

  /* A password in a window: its eye inside, on the right */
  .password-wrapper { position: relative; display: flex; align-items: center; }
  .password-wrapper > .input { flex: 1 1 0%; }
  .password-wrapper .pwd-toggle {
    position: absolute;
    top: -4px;
    bottom: -4px;
    right: 4px;
    flex-shrink: 0;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    color: var(--cs-fg-3);
    font-size: 18px;
    line-height: 18px;
    opacity: 1;
  }
  .password-wrapper .pwd-toggle:hover { opacity: 1; }
  .password-wrapper .pwd-toggle:focus-visible { outline: 3px solid var(--cs-gold); outline-offset: 2px; }
  .password-wrapper .pwd-toggle .md-icon { font-size: 18px; }
  /* What the new password needs, in a window: smaller, quieter. */
  .form-group .pwd-requirements { margin-bottom: 12px; color: var(--cs-fg-3); font-size: var(--cs-fs-sm); line-height: 18px; }

  /* ---- The toasts (js/toast.js), the console's small box at the bottom
     right, its thin gold line; the state said by the icon's colour, or the
     line in red for an error (Greg, 26.10.2026) ---- */
  .toast-container {
    position: fixed;
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
  }
  @media (max-width: 600px) {
    /* The bottom belongs to the sticky action bars: the toast goes up. */
    .toast-container { top: calc(12px + env(safe-area-inset-top, 0px)); bottom: auto; left: 12px; right: 12px; align-items: stretch; }
  }
  .toast {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: min(460px, calc(100vw - 32px));
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: var(--cs-r-l);
    background: linear-gradient(var(--cs-panel-2), var(--cs-panel-2)) padding-box, var(--cs-line-grad) border-box;
    color: var(--cs-fg);
    font: 400 var(--cs-fs-md)/var(--cs-lh) var(--cs-sans);
    box-shadow: 0 4px 16px var(--cs-shadow-soft);
    pointer-events: auto;
    cursor: pointer;
    opacity: 0;
    transform: translateX(60px);
    animation: toast-in .35s ease forwards;
  }
  /* On a phone the toast takes the width between the margins. */
  @media (max-width: 600px) {
    .toast { max-width: none; }
  }
  .toast.toast-out { animation: toast-out .3s ease forwards; }
  .toast-icon { flex-shrink: 0; color: var(--cs-fg-2); font-size: var(--cs-fs-xl); }
  .toast-success .toast-icon { color: var(--cs-ok); }
  .toast-warning .toast-icon { color: var(--cs-warn); }
  .toast-error { background: linear-gradient(var(--cs-panel-2), var(--cs-panel-2)) padding-box, linear-gradient(var(--cs-crit), var(--cs-crit)) border-box; color: var(--cs-crit); }
  .toast-message { flex: 1; word-break: break-word; }
  .toast-close { flex-shrink: 0; padding: 0 0 0 8px; border: 0; background: none; color: var(--cs-fg-3); font-size: 18px; line-height: 1; }
  .toast-close:hover { color: var(--cs-fg); }
  @keyframes toast-in { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: translateX(0); } }
  @keyframes toast-out { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(60px); } }

  /* ---- The tooltips (js/md-tooltip.js): one plain bubble at a time, on
     the inverse surface so it reads the same on any page; in the top layer
     (a manual popover), never taking the pointer ---- */
  .md-tip {
    position: fixed;
    inset: auto;
    z-index: 2100;
    width: max-content;
    min-height: 24px;
    max-width: 280px;
    margin: 0;
    padding: 4px 8px;
    overflow: visible;
    border: 0;
    border-radius: var(--cs-r-m);
    background: var(--cs-tip-bg);
    color: var(--cs-tip-fg);
    font: 400 var(--cs-fs-sm)/16px var(--cs-sans);
    letter-spacing: .4px;
    text-align: left;
    white-space: normal;
    overflow-wrap: break-word;
    pointer-events: none;
    transition: opacity var(--cs-dur) ease;
  }
  .md-tip.md-tip-fixed { display: block; }
  @starting-style { .md-tip:popover-open { opacity: 0; } }
  /* A long press shows the tip: no selection nor magnifier meanwhile. */
  :root.md-tip-press, :root.md-tip-press * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  .md-tip.md-tip--rich { max-width: 320px; padding: 6px 10px; }
  .md-tip .md-tip-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; border: 0; clip: rect(0 0 0 0); white-space: nowrap; }

  /* ---- What a new password still needs: each condition met fades out
     (the account pages, my-account) ---- */
  .pwd-requirements { margin: 8px 0 16px; padding: 0; list-style: none; }
  .pwd-requirements li {
    display: flex;
    align-items: center;
    gap: 6px;
    max-height: 30px;
    overflow: hidden;
    color: var(--cs-fg-3);
    font-size: var(--cs-fs-md);
    line-height: 1.8;
    opacity: 1;
    transition: all .25s ease;
  }
  .pwd-requirements li::before { content: "\25CB"; flex-shrink: 0; font-size: 10px; }
  .pwd-requirements li.met { max-height: 0; margin: 0; color: var(--cs-ok); line-height: 0; opacity: 0; }

  /* ---- The eye of a password field (js/pwd-toggle.js): inside the field,
     over its right padding, so the field keeps the width of its
     neighbours ---- */
  .pwd-row { position: relative; display: block; }
  .pwd-row > input[type] { width: 100%; padding-right: 40px; }
  .pwd-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--cs-fg-2);
    line-height: 0;
    opacity: .5;
    transition: opacity var(--cs-dur);
  }
  .pwd-toggle:hover { opacity: .9; }

  /* ---- A choice of a few, side by side (the civility of the sign-up):
     js builds .md-seg buttons with role=radio and aria-checked ---- */
  .md-seg { display: flex; max-width: 100%; border-radius: var(--cs-r-m); }
  .md-seg .md-seg__btn {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 64px;
    min-height: 40px;
    padding: 6px 16px;
    border: 1px solid var(--cs-line-2);
    border-radius: 0;
    background: none;
    color: var(--cs-fg-2);
    font-size: var(--cs-fs-lg);
    font-weight: 500;
    line-height: 20px;
    letter-spacing: .1px;
    text-align: center;
  }
  .md-seg .md-seg__btn + .md-seg__btn { border-left-width: 0; border-left-style: none; }
  .md-seg .md-seg__btn:first-child { border-radius: var(--cs-r-m) 0 0 var(--cs-r-m); }
  .md-seg .md-seg__btn:last-child { border-radius: 0 var(--cs-r-m) var(--cs-r-m) 0; }
  /* The touch area reaches 48 px over the 40 px drawn. */
  .md-seg .md-seg__btn::after { content: ""; position: absolute; left: 0; right: 0; top: -5px; bottom: -5px; }
  .md-seg .md-seg__btn[aria-checked="true"] { background: var(--cs-sel); color: var(--cs-fg); }
  .md-seg .md-seg__btn:focus-visible { outline: 3px solid var(--cs-gold); outline-offset: 2px; z-index: 1; }
  .md-seg .md-seg__btn:disabled { opacity: .38; cursor: not-allowed; }
  /* The check of the chosen button. */
  .md-seg .md-seg__btn .md-icon { display: none; font-size: 18px; }
  .md-seg .md-seg__btn[aria-checked="true"] .md-icon { display: inline-block; }

  /* ---- The band at the bottom (js/md-footer.js): "Swiss made", the
     cross, the legal notice. Fixed while the content ends above it, in the
     flow once the content reaches it (md-footer-inflow on the body) ---- */
  body:has(> .md-footer-public) { padding-bottom: 28px; }
  body.md-footer-inflow { padding-bottom: 0; }
  .md-footer.md-footer-public {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 28px;
    color: var(--cs-fg-3);
    font: 500 var(--cs-fs-sm) var(--cs-sans);
    letter-spacing: .06em;
    pointer-events: none;
  }
  body.md-footer-inflow .md-footer.md-footer-public { position: static; }
  .md-footer .md-footer-sep { opacity: .6; }
  .md-footer .md-footer-legal {
    color: inherit;
    letter-spacing: .02em;
    text-decoration: underline;
    text-underline-offset: 2px;
    pointer-events: auto;
  }
  .md-footer .md-footer-legal:hover { color: var(--cs-fg); }
  /* On dev, the DEV banner (js/env-banner.js) takes the left: "Swiss made"
     goes right when the window is narrow. */
  .md-footer.env-right { justify-content: flex-end; padding-right: 12px; }

  /* ---- The splash after a sign-in (js/splash.js): the rolling die, a
     video blended with the ground, then the name. Over the sign-in pages
     it keeps the night of the brand (.splash-night) ---- */
  .splash-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cs-ground-solid);
    opacity: 1;
    transition: opacity .8s ease;
  }
  .splash-overlay.fade-out { opacity: 0; pointer-events: none; }
  .splash-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    /* A fine grain, drawn once by an SVG filter. */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: .4;
    pointer-events: none;
  }
  .splash-overlay.splash-night {
    background:
      radial-gradient(ellipse 760px 440px at 50% 50%, var(--cs-night-glow), transparent 70%),
      var(--cs-night-texture),
      var(--cs-night-vignette),
      var(--cs-night);
  }
  .splash-content { display: flex; align-items: center; gap: 0; }
  .splash-dice-wrap { width: 120px; height: 120px; }
  .splash-dice { position: relative; width: 100%; height: 100%; }
  .splash-brand {
    display: flex;
    flex-direction: column;
    margin-left: 20px;
    opacity: 0;
    transform: translateX(-30px);
    pointer-events: none;
  }
  .splash-brand.reveal { animation: splash-name-in .9s cubic-bezier(.16, 1, .3, 1) forwards; }
  .splash-brand-svg { display: block; width: auto; height: 100px; }
  /* The picture covers 230 px around the 120 px die. Its empty background
     is black (night: lighten) or white (porcelain: darken), so only the
     die and its glow show. No ancestor may form a stacking context, or the
     blend would see nothing: the fades are on the video and the name. */
  .splash-video {
    display: block;
    width: 230px;
    height: 230px;
    margin: -55px;
    background: transparent;
    mix-blend-mode: lighten;
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s ease;
  }
  .splash-video.playing { opacity: 1; }
  :root[data-theme="ivory"] .splash-overlay:not(.splash-night) .splash-video { mix-blend-mode: darken; }
  .splash-still { display: block; width: 120px; height: 114px; margin-top: 3px; }
  .splash-overlay.leaving :is(.splash-video, .splash-still, .splash-brand-svg, .splash-rule) { opacity: 0; transition: opacity .4s ease; }
  .splash-gold-hi { stop-color: var(--cs-logo-gold-hi); }
  .splash-gold-mid { stop-color: var(--cs-logo-gold-mid); }
  .splash-gold-lo { stop-color: var(--cs-logo-gold-lo); }
  .splash-gold-deep { stop-color: var(--cs-logo-gold-deep); }
  .splash-rule {
    position: absolute;
    left: 50%;
    top: calc(50% + 86px);
    width: 160px;
    height: 1px;
    margin-left: -80px;
    background: var(--cs-night-rule-line);
    opacity: 0;
    pointer-events: none;
  }
  .splash-overlay:not(.splash-night) .splash-rule { display: none; }
  .splash-rule.reveal { opacity: 1; transition: opacity .9s ease; }
  @media (max-width: 600px) {
    .splash-dice-wrap { width: 80px; height: 80px; }
    .splash-brand { margin-left: 14px; }
    .splash-brand-svg { height: 65px; }
    .splash-video { width: 153px; height: 153px; margin: -36.5px; }
    .splash-still { width: 80px; height: 76px; margin-top: 2px; }
    .splash-rule { top: calc(50% + 60px); width: 120px; margin-left: -60px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .splash-rule.reveal { transition: none; }
  }
  @keyframes splash-name-in {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
  }

  /* ---- The state layer of a button (md-state): its text's colour,
     faintly, under the pointer, the focus and the press ---- */
  .md-state { position: relative; overflow: hidden; isolation: isolate; }
  .md-state::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: currentColor; opacity: 0; transition: opacity .15s; }
  .md-state:hover::before { opacity: .08; }
  .md-state:focus-visible::before { opacity: .1; }
  .md-state:active::before { opacity: .1; }
  .md-state:focus-visible { outline: 3px solid var(--cs-fg-2); outline-offset: 2px; }
  @media (prefers-reduced-motion: reduce) { .md-state::before { transition: none; } }
  /* Help text under a control: what it does, in the user's words. */
  .md-help { margin: 4px 0 0; color: var(--cs-fg-2); font: 400 var(--cs-fs-sm)/16px var(--cs-sans); letter-spacing: .4px; }
  /* A button that is only an icon. */
  .md-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: var(--cs-r-pill); background: transparent; color: var(--cs-fg-2); cursor: pointer; }

  /* ---- The switch (js/md-switch.js): a <button role="switch"
     aria-checked> whose whole row, its words and its track, is the
     target (48 px high at least) ---- */
  .md-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 48px; margin: 0; padding: 8px 4px 8px 0; border: 0; border-radius: 8px; background: transparent; color: var(--cs-fg); font: 400 var(--cs-fs-lg)/20px var(--cs-sans); letter-spacing: .25px; text-align: left; cursor: pointer; }
  .md-switch-row__label { flex: 1; min-width: 0; }
  .md-switch-row__track { position: relative; flex: none; width: 52px; height: 32px; border: 2px solid var(--cs-line-2); border-radius: var(--cs-r-pill); background: var(--cs-sel); transition: background-color .15s, border-color .15s; }
  .md-switch-row__thumb { position: absolute; left: 6px; top: 50%; display: flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--cs-line-2); transition: left .15s, width .15s, height .15s, margin .15s, background-color .15s; }
  .md-switch-row__thumb .md-icon { color: var(--cs-fg); font-size: 16px; opacity: 0; }
  .md-switch-row:hover .md-switch-row__thumb { background: var(--cs-fg-2); }
  .md-switch-row[aria-checked="true"] .md-switch-row__track { border-color: var(--cs-gold); background: var(--cs-gold); }
  .md-switch-row[aria-checked="true"] .md-switch-row__thumb { left: 22px; width: 24px; height: 24px; margin-top: -12px; background: var(--cs-gold-ink); }
  .md-switch-row[aria-checked="true"]:hover .md-switch-row__thumb { background: var(--cs-sel); }
  .md-switch-row[aria-checked="true"] .md-switch-row__thumb .md-icon { opacity: 1; }
  .md-switch-row:focus-visible { outline: 3px solid var(--cs-fg-2); outline-offset: 2px; }
  .md-switch-row:disabled { opacity: .38; cursor: not-allowed; }
  @media (prefers-reduced-motion: reduce) { :is(.md-switch-row__track, .md-switch-row__thumb) { transition: none; } }
  /* With a mouse, the console's switch (36 x 20, thumb 14; Greg, 28.10.2026);
     a finger keeps the size above, the row its height. */
  @media (pointer: fine) {
    .md-switch-row__track { width: 36px; height: 20px; border-width: 1px; border-radius: 10px; background-origin: border-box; }
    :is(.md-switch-row__thumb, .md-switch-row[aria-checked="true"] .md-switch-row__thumb) { left: 2px; top: 2px; margin: 0; width: 14px; height: 14px; }
    .md-switch-row[aria-checked="true"] .md-switch-row__thumb { left: 18px; }
    .md-switch-row__thumb .md-icon { display: none; }
  }

  /* ---- The slider (js/md-slider.js): one for every number or duration.
     Ends and grab area of 48 px, a 4 px track, a 20 px handle, the value
     in a bubble above the handle. The script places the handle and the
     bubble through --sl-pos, --sl-end, --sl-gap, --sl-bx and --sl-ax. Its
     colours: the solid gold; locked by the plan, the text's colour ---- */
  .md-slider { position: relative; display: block; min-width: 0; padding-top: 40px; color: var(--cs-fg); font-family: var(--cs-sans); -webkit-tap-highlight-color: transparent; }
  .md-slider__row { display: flex; align-items: center; gap: 4px; }
  .md-slider__end { position: relative; flex: none; min-width: 48px; min-height: 48px; padding: 0 8px; border: 0; border-radius: var(--cs-r-pill); background: transparent; color: var(--cs-fg-2); font: 500 var(--cs-fs-lg)/20px var(--cs-sans); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; transition: background-color .15s, color .15s; }
  /* The state layer: the text's colour, faintly. */
  .md-slider__end::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; transition: opacity .15s; }
  .md-slider__end:hover::before { opacity: .08; }
  .md-slider__end:active::before { opacity: .1; }
  .md-slider__end:focus-visible { outline: 2px solid var(--cs-gold-solid); outline-offset: 2px; }
  .md-slider__end[aria-disabled="true"] { opacity: .38; cursor: default; }
  .md-slider__end[aria-disabled="true"]::before { opacity: 0; }
  .md-slider__inf { font-size: 24px; line-height: 20px; }
  /* Unlimited chosen: the end lights up, filled like the active track. */
  .md-slider.is-unlimited .md-slider__end--max { background: var(--cs-gold-solid); color: var(--cs-gold-solid-ink); opacity: 1; }
  /* A vertical swipe still scrolls the page; a horizontal one moves the
     handle. */
  .md-slider__zone { position: relative; flex: 1; min-width: 0; height: 48px; cursor: pointer; touch-action: pan-y; }
  .md-slider__rail { position: absolute; left: 12px; right: 12px; top: 50%; height: 0; }
  :is(.md-slider__track, .md-slider__fill) { position: absolute; left: 0; top: -2px; height: 4px; border-radius: var(--cs-r-pill); }
  .md-slider__track { width: var(--sl-end); background: var(--cs-sel); }
  .md-slider__fill { width: min(var(--sl-pos), var(--sl-end)); background: var(--cs-gold-solid); transition: width .15s; }
  /* The gap before unlimited: a dotted line, lit when unlimited is chosen. */
  .md-slider__gapline { display: none; position: absolute; left: var(--sl-end); top: -1px; width: var(--sl-gap); height: 2px; background: repeating-linear-gradient(90deg, var(--cs-line) 0 3px, transparent 3px 7px); }
  .md-slider.has-tail .md-slider__gapline { display: block; }
  .md-slider.is-unlimited .md-slider__gapline { background: repeating-linear-gradient(90deg, var(--cs-gold-solid) 0 3px, transparent 3px 7px); }
  .md-slider__ticks { position: absolute; left: 0; right: 0; top: 0; }
  .md-slider__tick { position: absolute; top: -1px; width: 2px; height: 2px; margin-left: -1px; border-radius: 50%; background: var(--cs-fg-2); }
  .md-slider__tick.is-on { background: var(--cs-gold-solid-ink); }
  .md-slider__taildot { position: absolute; left: 100%; top: -6px; width: 12px; height: 12px; margin-left: -6px; border: 2px solid var(--cs-line-2); border-radius: 50%; transition: background-color .15s, border-color .15s; }
  .md-slider.is-unlimited .md-slider__taildot { border-color: var(--cs-gold-solid); background: var(--cs-gold-solid); }
  .md-slider__kepttick { position: absolute; top: -5px; width: 10px; height: 10px; margin-left: -5px; border: 2px dashed var(--cs-line-2); border-radius: 50%; }
  /* The recommended value: a small point under the track. */
  .md-slider__reco { position: absolute; top: 8px; width: 0; height: 0; margin-left: -4px; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 6px solid var(--cs-fg-2); }
  .md-slider__handle { position: absolute; left: var(--sl-pos); top: -24px; z-index: 1; width: 48px; height: 48px; margin-left: -24px; border-radius: 50%; outline: none; cursor: grab; transition: left .15s; }
  .md-slider__handle::before { content: ""; position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; border-radius: 50%; background: var(--cs-gold-solid); box-shadow: var(--cs-elev-1); }
  /* The halo: hover, focus and drag. */
  .md-slider__handle::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--cs-gold-solid); opacity: 0; transition: opacity .15s; }
  .md-slider__handle:hover::after { opacity: .08; }
  .md-slider__handle:focus-visible::after { opacity: .1; }
  .md-slider__handle:focus-visible { outline: 2px solid var(--cs-gold-solid); outline-offset: -8px; }
  .md-slider.is-dragging .md-slider__handle { cursor: grabbing; }
  .md-slider.is-dragging .md-slider__handle::after { opacity: .16; }
  /* The kept value: a hollow, hatched handle, recognisable at a glance as
     "not one of the notches". */
  .md-slider.is-kept .md-slider__handle::before { border: 2px solid var(--cs-gold-solid); background: repeating-linear-gradient(45deg, var(--cs-gold-solid) 0 2px, transparent 2px 5px); box-shadow: none; }
  .md-slider.is-kept .md-slider__fill { background: var(--cs-line-2); }
  .md-slider__bubble { position: absolute; left: 0; top: 4px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--cs-gold-solid); color: var(--cs-gold-solid-ink); box-shadow: var(--cs-elev-1); font: 500 var(--cs-fs-md)/28px var(--cs-sans); font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; transform: translateX(var(--sl-bx, 0px)); transition: transform .15s; }
  .md-slider__bubble::after { content: ""; position: absolute; left: var(--sl-ax, 50%); bottom: -4px; width: 8px; height: 8px; margin-left: -4px; background: inherit; transform: rotate(45deg); }
  .md-slider__bubble .md-icon { font-size: 16px; }
  .md-slider.is-kept .md-slider__bubble { background: var(--cs-sel); color: var(--cs-fg); outline: 1px dashed var(--cs-gold-solid); }
  .md-slider.is-dragging :is(.md-slider__bubble, .md-slider__handle, .md-slider__fill) { transition: none; }
  /* Locked by the plan: everything in the text's colour, faded, no
     pointer, the handle at the value the restaurant follows. */
  .md-slider.is-locked :is(.md-slider__fill, .md-slider__bubble), .md-slider.is-locked .md-slider__handle::before { background: var(--cs-fg); }
  .md-slider.is-locked .md-slider__bubble { color: var(--cs-panel); }
  .md-slider.is-locked .md-slider__tick.is-on { background: var(--cs-panel); }
  .md-slider.is-locked :is(.md-slider__zone, .md-slider__handle) { cursor: default; }
  .md-slider.is-locked :is(.md-slider__rail, .md-slider__bubble) { opacity: .38; }
  .md-slider.is-locked .md-slider__handle::after { display: none; }
  .md-slider__note { margin-top: 4px; color: var(--cs-fg-2); font: 400 var(--cs-fs-sm)/16px var(--cs-sans); }
  .md-slider__chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 10px; border: 1px solid var(--cs-line); border-radius: 8px; background: var(--cs-panel-2); color: var(--cs-fg-2); }
  .md-slider__chip .md-icon { flex: none; color: var(--cs-gold-solid); font-size: 18px; }
  .md-slider__chip--locked .md-icon { color: var(--cs-fg-2); }
  .md-slider__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  @media (prefers-reduced-motion: reduce) {
    .md-slider *, .md-slider *::before, .md-slider *::after { transition: none; }
  }

  /* ---- A plan named (plan-pill, plan-tone-*): its colour, a tint and a
     line; and the state of a subscription (sub-badge), its word on a
     quiet fill, green when it runs, red when it is late or stopped ---- */
  .plan-pill { display: inline-block; padding: 1px 9px; border: 1px solid var(--cs-line); border-radius: var(--cs-r-pill); background: transparent; color: var(--cs-fg); font-size: var(--cs-fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
  .plan-pill.plan-tone-bistro { border-color: var(--cs-plan-bistro-line); background: var(--cs-plan-bistro-tint); color: var(--cs-plan-bistro); }
  .plan-pill.plan-tone-resto { border-color: var(--cs-plan-resto-line); background: var(--cs-plan-resto-tint); color: var(--cs-plan-resto); }
  .plan-pill.plan-tone-gastro { border-color: var(--cs-plan-gastro-line); background: var(--cs-plan-gastro-tint); color: var(--cs-plan-gastro); }
  .sub-badge { display: inline-block; padding: 2px 8px; border: 0; border-radius: var(--cs-r-l); background: var(--cs-sel); color: var(--cs-fg-2); font-family: var(--cs-sans); font-size: var(--cs-fs-sm); font-weight: 500; letter-spacing: .02em; text-transform: none; }
  .sub-badge:is(.active, .trialing) { background: var(--cs-ok-bg); color: var(--cs-ok); }
  .sub-badge:is(.pastdue, .suspended) { background: var(--cs-crit-bg); color: var(--cs-crit); }
}
