/* One shared menu stylesheet for Studio, public pages and private account menus.
Copyright 2025 OpenAI

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

*/
/* Apps SDK UI 0.2.2 Menu/Select material, adapted to native Studio controls.
   SDK radius12/shadow, Studio's established4px inset and40/44px targets.
   No SDK hairline: the user explicitly requested a borderless surface. */

/* Apps SDK UI 0.2.2 Menu/Select material, adapted to native Studio controls.
   Shared field radius/shadow, Studio's common inset and40/44px targets.
   No SDK hairline: the user explicitly requested a borderless surface. */
:root{--studio-dropdown-surface:rgba(24,24,24,.796);--studio-dropdown-backdrop-blur:6.5px;--studio-dropdown-rim:#303030;--studio-dropdown-hover:#454545;--studio-dropdown-radius:var(--studio-radius-menu);--studio-dropdown-item-radius:calc(var(--studio-dropdown-radius) - var(--studio-dropdown-inset));--studio-dropdown-inset:3px;--studio-dropdown-shadow:0 8px 12px -3px #0002,0 3px 4px -3px #0002}
html body [data-studio-dropdown][data-studio-dropdown][data-studio-dropdown]{--studio-menu-surface:var(--studio-dropdown-surface);--studio-menu-hover:var(--studio-dropdown-hover);--studio-menu-border:transparent;--studio-menu-shadow:var(--studio-dropdown-shadow);--studio-menu-padding:var(--studio-dropdown-inset);--studio-menu-gap:var(--studio-dropdown-inset);--studio-menu-radius:var(--studio-dropdown-radius);--studio-menu-item-radius:var(--studio-dropdown-item-radius);--studio-hover:var(--studio-dropdown-hover);box-sizing:border-box;border:0!important;border-radius:var(--studio-dropdown-radius)!important;background:var(--studio-dropdown-surface)!important;box-shadow:var(--studio-dropdown-shadow)!important;-webkit-backdrop-filter:blur(var(--studio-dropdown-backdrop-blur))!important;backdrop-filter:blur(var(--studio-dropdown-backdrop-blur))!important}
html body [data-studio-dropdown=popup][data-studio-dropdown][data-studio-dropdown]{padding:var(--studio-dropdown-inset)!important;gap:var(--studio-dropdown-inset)!important}
html body [data-studio-dropdown=nested][data-studio-dropdown][data-studio-dropdown]{padding:0!important;gap:var(--studio-dropdown-inset)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
html body [data-studio-dropdown][data-studio-dropdown] [data-studio-dropdown-item][data-studio-dropdown-item]{position:relative;box-sizing:border-box;align-self:stretch;width:100%;min-width:0;max-width:100%;min-height:40px;height:auto!important;margin:0!important;padding:8px 12px!important;border:0!important;border-radius:var(--studio-dropdown-item-radius)!important;background:transparent!important;box-shadow:none!important;font-family:var(--studio-font-family,inherit)!important;font-size:var(--studio-ui-menu-size,14px)!important;line-height:1.4!important;text-align:left;white-space:normal!important;overflow-wrap:anywhere;transform:none!important}
html body [data-studio-dropdown][data-studio-dropdown] [data-studio-dropdown-item][data-studio-dropdown-has-icon]{padding-left:40px!important}
html body [data-studio-dropdown-icon]{display:none!important}
html body [data-studio-dropdown] [data-studio-dropdown-icon]{position:absolute;top:50%;left:12px;display:inline-block!important;width:18px;height:18px;margin:0;transform:translateY(-50%);pointer-events:none}
html body [data-studio-dropdown] [data-studio-dropdown-heading]{position:relative;padding-left:40px!important}
html body [data-studio-dropdown-heading-icon]{position:absolute;top:50%;left:12px;width:18px;height:18px;transform:translateY(-50%);pointer-events:none}
html body [data-studio-dropdown-item][data-studio-dropdown-rich]>small{display:block;white-space:normal}
/* This rich consumer has two statistics, not a single description. Keep its
   native flex layout so variation and total never run into each other. */
html body .studio-season-filter [data-seasonality-client-options]{grid-template-columns:minmax(0,1fr)}
html body [data-studio-dropdown-item][data-studio-dropdown-rich]>.revenue-dashboard-seasonality-client-meta{display:flex;flex-wrap:wrap;column-gap:12px;row-gap:4px;white-space:normal}
html body [data-studio-dropdown-rich]>.revenue-dashboard-seasonality-client-meta>span{white-space:nowrap}
html body [data-studio-dropdown][data-studio-dropdown] [data-studio-dropdown-item][data-studio-dropdown-item]:is(:focus-visible,[aria-selected=true],[aria-pressed=true],[aria-current=page],[aria-current=true],.is-active),html body [data-studio-dropdown][data-studio-dropdown] label[data-studio-dropdown-item]:has(input:checked){background:var(--studio-dropdown-hover)!important;outline:0!important}
@media(hover:hover) and (pointer:fine){html:not([data-studio-menu-input=touch]) body [data-studio-dropdown][data-studio-dropdown] [data-studio-dropdown-item][data-studio-dropdown-item]:hover:not(:disabled):not([aria-disabled=true]){background:var(--studio-dropdown-hover)!important}}
html body [data-studio-dropdown][data-studio-dropdown] [data-studio-dropdown-item]:is(:disabled,[aria-disabled=true]){cursor:not-allowed}
html body [data-studio-dropdown-separator]{display:block;box-sizing:border-box;height:1px;min-height:1px;margin:4px 8px!important;padding:0;border:0!important;background:#ffffff1a!important;box-shadow:none!important}
@media(pointer:coarse){html body [data-studio-dropdown][data-studio-dropdown] [data-studio-dropdown-item][data-studio-dropdown-item]{min-height:44px;font-size:16px!important}}
@media(forced-colors:active){:root{--studio-dropdown-rim:CanvasText}html body [data-studio-dropdown][data-studio-dropdown][data-studio-dropdown]{background:Canvas!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}html body [data-studio-dropdown=nested][data-studio-dropdown][data-studio-dropdown]{background:transparent!important}html body [data-studio-dropdown][data-studio-dropdown][data-studio-dropdown] [data-studio-dropdown-item]:focus-visible{outline:1px solid Highlight!important;outline-offset:-2px}}

/* Menu rows center their label/icon group vertically. Rich rows retain their
   native flex/grid structure and can grow to fit wrapped descriptions. */
html body [data-studio-dropdown][data-studio-dropdown] [data-studio-dropdown-item][data-studio-dropdown-item]{align-content:center!important}
html body [data-studio-dropdown][data-studio-dropdown] [data-studio-dropdown-item]:not([data-studio-dropdown-rich]){display:flex!important;align-items:center!important}
html body .studio-season-filter [data-studio-dropdown-item].revenue-dashboard-seasonality-option{align-items:center!important}
html body [data-studio-dropdown] label[data-studio-dropdown-item]{column-gap:12px!important}
html body [data-studio-dropdown] label[data-studio-dropdown-item]>input:is([type=checkbox],[type=radio]){flex:0 0 18px!important;width:18px!important;min-width:18px!important;max-width:18px!important;height:18px!important;min-height:18px!important;padding:0!important;margin:0!important;align-self:center}

/* BEGIN SHARED VISIBLE MENU RIM SPACING
   The inset-painted 1px rim is not part of the visible background gap.
   Preserve each consumer's existing inter-option gap (Studio3/public4).
   Nested lists retain their zero padding; only the painted popup adds a rim. */
html body [data-studio-dropdown=popup][data-studio-dropdown][data-studio-dropdown][data-studio-dropdown]{
 --studio-dropdown-painted-rim:1px;
 --studio-menu-padding:calc(var(--studio-dropdown-inset) + var(--studio-dropdown-painted-rim));
 --studio-menu-gap:var(--studio-dropdown-inset);
 --studio-dropdown-item-radius:calc(var(--studio-dropdown-radius) - var(--studio-dropdown-inset) - var(--studio-dropdown-painted-rim));
 padding:var(--studio-menu-padding)!important;gap:var(--studio-menu-gap)!important;
}
/* END SHARED VISIBLE MENU RIM SPACING */

/* Consumer variation only: retain the existing public/private4px gap.
   All material, rim compensation and option geometry stay in this one file. */
html body :is([data-studio-public-menu],[data-studio-private-menu]){--studio-dropdown-inset:4px}
html body [data-studio-public-icon="access"]{--studio-public-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22currentColor%22%20stroke%3D%22none%22%20data-studio-glyph%3D%22access%22%20aria-hidden%3D%22true%22%20focusable%3D%22false%22%3E%3Cpath%20d%3D%22M7.82149%205.57135C6.57883%205.57135%205.57145%206.57873%205.57145%207.82138C5.57145%209.06404%206.57883%2010.0714%207.82149%2010.0714C9.06415%2010.0714%2010.0715%209.06404%2010.0715%207.82138C10.0715%206.57873%209.06415%205.57135%207.82149%205.57135ZM3.57145%207.82138C3.57145%205.47416%205.47426%203.57135%207.82149%203.57135C10.1687%203.57135%2012.0715%205.47416%2012.0715%207.82138C12.0715%2010.1686%2010.1687%2012.0714%207.82149%2012.0714C5.47426%2012.0714%203.57145%2010.1686%203.57145%207.82138ZM16.643%206.49993C15.6568%206.49993%2014.8573%207.29944%2014.8573%208.28568C14.8573%209.27191%2015.6568%2010.0714%2016.643%2010.0714C17.6292%2010.0714%2018.4288%209.27191%2018.4288%208.28568C18.4288%207.29944%2017.6292%206.49993%2016.643%206.49993ZM12.8573%208.28568C12.8573%206.19487%2014.5522%204.49993%2016.643%204.49993C18.7338%204.49993%2020.4288%206.19487%2020.4288%208.28568C20.4288%2010.3765%2018.7338%2012.0714%2016.643%2012.0714C14.5522%2012.0714%2012.8573%2010.3765%2012.8573%208.28568ZM4.65547%2015.9973C3.83474%2016.7268%203.25%2017.8428%203.25%2019.4287C3.25%2019.9809%202.80228%2020.4287%202.25%2020.4287C1.69772%2020.4287%201.25%2019.9809%201.25%2019.4287C1.25%2017.3001%202.05813%2015.6302%203.32671%2014.5025C4.57689%2013.3912%206.21553%2012.8569%207.82148%2012.8569C9.42744%2012.8569%2011.0661%2013.3911%2012.3163%2014.5025C13.5848%2015.6301%2014.393%2017.3001%2014.393%2019.4287C14.393%2019.9809%2013.9453%2020.4287%2013.393%2020.4287C12.8407%2020.4287%2012.393%2019.9809%2012.393%2019.4287C12.393%2017.8427%2011.8082%2016.7268%2010.9875%2015.9973C10.1484%2015.2513%209.00128%2014.8569%207.82149%2014.8569C6.6417%2014.8569%205.4946%2015.2514%204.65547%2015.9973ZM19.202%2015.4402C18.2837%2014.8599%2017.0704%2014.7047%2015.9858%2015.0106C15.4543%2015.1605%2014.9019%2014.8511%2014.752%2014.3195C14.6021%2013.788%2014.9115%2013.2355%2015.443%2013.0856C17.0357%2012.6365%2018.8402%2012.8458%2020.2704%2013.7495C21.7376%2014.6766%2022.75%2016.2991%2022.75%2018.5001C22.75%2019.0524%2022.3023%2019.5001%2021.75%2019.5001C21.1977%2019.5001%2020.75%2019.0524%2020.75%2018.5001C20.75%2016.9781%2020.0833%2015.9971%2019.202%2015.4402Z%22%20fill%3D%22currentColor%22%20%2F%3E%3C%2Fsvg%3E")}
html body [data-studio-public-icon="logout"]{--studio-public-menu-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22currentColor%22%20stroke%3D%22none%22%20data-studio-glyph%3D%22logout%22%20aria-hidden%3D%22true%22%20focusable%3D%22false%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20d%3D%22M7%204a1%201%200%200%200-1%201v14a1%201%200%200%200%201%201h4a1%201%200%201%201%200%202H7a3%203%200%200%201-3-3V5a3%203%200%200%201%203-3h4a1%201%200%201%201%200%202H7Zm8.293%203.293a1%201%200%200%201%201.414%200l4%204a1%201%200%200%201%200%201.414l-4%204a1%201%200%200%201-1.414-1.414L17.586%2013H11a1%201%200%201%201%200-2h6.586l-2.293-2.293a1%201%200%200%201%200-1.414Z%22%20clip-rule%3D%22evenodd%22%20%2F%3E%3C%2Fsvg%3E")}
:root{--studio-public-menu-check:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22currentColor%22%20stroke%3D%22none%22%20data-studio-glyph%3D%22check%22%20aria-hidden%3D%22true%22%20focusable%3D%22false%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20d%3D%22M18.063%205.674a1%201%200%200%201%20.263%201.39l-7.5%2011a1%201%200%200%201-1.533.143l-4.5-4.5a1%201%200%201%201%201.414-1.414l3.647%203.647%206.82-10.003a1%201%200%200%201%201.39-.263Z%22%20clip-rule%3D%22evenodd%22%20%2F%3E%3C%2Fsvg%3E")}
/* Composition only. Menu colours, radius, shadow, rows and touch targets are
   imported verbatim from studio_dropdowns.css. Never style navigation, +,
   language switches, calendar tabs, cookies or full-screen cards as popups. */
html body .quote-dialog .quote-choice-list[data-studio-dropdown]{flex:0 0 auto!important;margin-top:34px!important}
html body .quote-dialog .quote-choice-list[data-studio-dropdown]>button[data-studio-dropdown-item]{justify-content:space-between!important;padding-right:40px!important}
/* Pure CSS state mark: the native aria-pressed value remains authoritative. */
html body .quote-dialog .quote-choice-list[data-studio-dropdown]>button[data-studio-dropdown-item]::after{content:""!important;position:absolute;right:12px;top:50%;width:18px;height:18px;transform:translateY(-50%);background:currentColor;-webkit-mask:var(--studio-public-menu-check) center/contain no-repeat;mask:var(--studio-public-menu-check) center/contain no-repeat;opacity:0;pointer-events:none}
html body .quote-dialog .quote-choice-list[data-studio-dropdown]>button[data-studio-dropdown-item][aria-pressed=true]::after{opacity:1}
html body #public-account-menu[data-studio-dropdown]{--studio-menu-surface:var(--studio-dropdown-surface);--studio-menu-border:transparent}
html body #public-account-menu[data-studio-dropdown]>span.studio-selection-option{display:block;min-height:0;height:auto;padding:8px 12px;white-space:normal;overflow-wrap:anywhere;opacity:1;color:var(--studio-ui-muted,#aaa)}
html body #public-account-menu[data-studio-dropdown]>[data-studio-dropdown-item]{display:flex;align-items:center;width:100%;text-decoration:none!important;color:var(--studio-ui-ink,#eee)!important;opacity:1;padding-left:40px!important}
html body #public-account-menu[data-studio-dropdown]>[data-studio-public-icon]::before{content:"";position:absolute;left:12px;top:50%;width:18px;height:18px;transform:translateY(-50%);background:currentColor;-webkit-mask:var(--studio-public-menu-icon) center/contain no-repeat;mask:var(--studio-public-menu-icon) center/contain no-repeat;pointer-events:none}
@media(max-width:600px){html body .quote-dialog .quote-choice-list[data-studio-dropdown]{margin-top:28px!important}}


/* The menu rim itself belongs to this stylesheet too. This explicit rule
   supersedes the legacy generic surface fallback wherever the CSS is loaded. */
html body [data-studio-dropdown=popup][data-studio-dropdown][data-studio-dropdown][data-studio-dropdown][data-studio-dropdown]{box-shadow:inset 0 0 0 var(--studio-dropdown-painted-rim,1px) var(--studio-dropdown-rim,#303030),var(--studio-dropdown-shadow)!important}

/* Shared corner radii for Studio, the portfolio and the client area. */
:root {
 --studio-radius-photo-field:8px;
 --studio-radius-document-card:12px;
 --studio-radius-desktop-sheet:20px;
 --studio-radius-tooltip:12px;
 --studio-radius-slideshow:8px;
 --studio-radius-menu:14px;
}

html:root {
 --client-photo-card-radius:var(--studio-radius-photo-field);
 --studio-ui-field-radius:var(--studio-radius-photo-field);
 --studio-field-radius:var(--studio-radius-photo-field);
 --studio-site-field-radius:var(--studio-radius-photo-field);
 --studio-search-radius:var(--studio-radius-photo-field);
 --studio-ui-embedded-field-radius:var(--studio-radius-photo-field);
}

html body .ps-home-gallery {
 --client-photo-card-radius:var(--studio-radius-photo-field);
}

html body :is(.client-resource-pdf-card,.client-resource-download-card) {
 --ui-card-radius:var(--studio-radius-document-card);
 border-radius:var(--ui-card-radius)!important;
}

/* The child action follows the card radius less its existing inset. */
html body .client-resource-pdf-card > :is(button,a) {
 border-radius:var(--client-action-radius)!important;
}

html.studio-desktop-shell body dialog.studio-record-sheet {
 --studio-ui-sheet-radius:var(--studio-radius-desktop-sheet);
 --studio-ui-record-radius:var(--studio-radius-desktop-sheet);
}
html.studio-desktop-shell body dialog.studio-record-sheet.studio-header-card.studio-page-sheet.has-record-tabs {
 border-radius:var(--studio-ui-record-radius)!important;
}

html body :is(.studio-home-chart-tooltip,.design-chart-tip,.design-tooltip,
 .studio-tooltip,.studio-interactive-tooltip,.chart-tooltip,.audience-tooltip,
 .revenue-dashboard-tooltip,.revenue-dashboard-seasonality-tooltip,
 .revenue-dashboard-client-tooltip,.revenue-dashboard-annual-tooltip,.studio-map-tooltip,
 .security-chart-tip,.studio-chart-tooltip,[data-studio-chart-tooltip]) {
 border-radius:var(--studio-radius-tooltip)!important;
}

html body :is(#accueil > .hero-story,#accueil > .ps-home-hero,
 .ps-client-selection .ps-hero,.ps-preview-page .hero-story,.ps-position-stage) {
 border-radius:var(--studio-radius-slideshow)!important;
}

/* Keep the choice menu geometry available before the role scanner mounts. */
html body .quote-dialog .quote-choice-list:not([data-studio-dropdown]) {
 border-radius:var(--studio-radius-menu)!important;
}
html body .quote-dialog .quote-choice-list:not([data-studio-dropdown]) > .quote-choice {
 border-radius:calc(var(--studio-radius-menu) - 5px)!important;
}

/* One outline for the image clip, hover veil and selection rim. */
html body .client-photo-visual {
 border-radius:var(--client-photo-card-radius);
}
html body .client-photo-visual > button,
html body .client-photo-visual > button picture,
html body .client-photo-visual::before,
html body .client-photo-visual::after {
 border-radius:inherit;
}
html body .client-photo-visual > button picture > img {
 border-radius:inherit;
}

/* The image and shade share the rounded clipping edge. */
html body :is(.ps-hero,.ps-home-hero) {
 overflow:hidden;
}
html body :is(.ps-hero,.ps-home-hero) > :is(.hero-image,.landscape-shade) {
 border-radius:inherit;
}
html body #studio-private-selection .ps-preview iframe {
 border-radius:var(--studio-radius-slideshow);
}

/* Thumbnails displayed by Studio, outside the exported Instagram canvas. */
html body :is([data-instagram-stories],[data-instagram-publications]) :is(
 .story-reference-media,.story-reference-gallery .story-tile-grid > button,
 [data-story-photos] > button,.story-photo-field > button[data-story-slot][draggable=true],
 .story-tile-tools.studio-section-photo-tools),
html body dialog.studio-record-sheet .studio-photo-picker-tile.studio-photo-picker-tile {
 border-radius:var(--client-photo-card-radius)!important;
}

html body :is([data-instagram-stories],[data-instagram-publications]) :is(
 .story-reference-media > img,.story-reference-gallery .story-tile-grid > button > img,
 [data-story-photos] > button > img,.story-photo-field > button[data-story-slot][draggable=true] > img),
html body dialog.studio-record-sheet .studio-photo-picker-tile.studio-photo-picker-tile > img {
 border-radius:inherit!important;
}

/* Resting photo rims share one color. Selection and rimless layouts keep
   their own rules. The public portrait stylesheet still has a legacy color. */
html:root {
 --studio-ui-thumbnail-rim:rgba(64,64,64,.42);
}
html body .client-photo-grid .client-photo-visual::after,
html body #studio-private-selection .ps-preview::after,
html body :is(.ps-home-hero,.ps-client-selection .ps-hero)::after {
 box-shadow:inset 0 0 0 1px var(--studio-ui-thumbnail-rim);
}
html body :is(.ps-home-hero,.ps-client-selection .ps-hero)::after {
 content:"";
 position:absolute;
 inset:0;
 z-index:3;
 border-radius:inherit;
 pointer-events:none;
}
@media(min-width:1101px) {
 html:not([data-studio-surface-device=phone]) body .ps-client-selection .ps-hero.hero-story {
  border:0!important;
 }
}
/* Paint above the embedded viewport so its clip cannot crop the rim. */
html body .ps-slideshow-only .ps-home-hero::after {
 content:none;
}
html body #studio-private-selection .ps-preview {
 display:grid;
 grid-template-columns:minmax(0,1fr);
}
html body #studio-private-selection .ps-preview > iframe,
html body #studio-private-selection .ps-preview::after {
 grid-area:3 / 1;
}
html body #studio-private-selection .ps-preview::after {
 content:"";
 z-index:1;
 width:min(100%,var(--preview-width,100%));
 margin:16px auto 0;
 border-radius:var(--studio-radius-slideshow);
 pointer-events:none;
}
html body #studio-private-selection[data-ps-preview-format=desktop] {
 --preview-width:1440px;
 --preview-ratio:calc(700 / 1440);
}
html body #studio-private-selection[data-ps-preview-format=tablet] {
 --preview-width:820px;
 --preview-ratio:calc(5 / 7);
}
html body #studio-private-selection[data-ps-preview-format=phone] {
 --preview-width:390px;
 --preview-ratio:calc(660 / 390);
}
html body #studio-private-selection .ps-preview iframe {
 border-width:0;
}

/* WebKit rounds the embedded viewport to whole CSS pixels. Match that size
   before it clips the slideshow's last row or column. */
@supports (height:round(down, 10.5px, 1px)) {
 html body #studio-private-selection .ps-preview {
  container-type:inline-size;
  grid-template-columns:1fr minmax(0,max-content) 1fr;
 }
 html body #studio-private-selection .ps-preview > :not(iframe) {
  grid-column:1 / -1;
 }
 html body #studio-private-selection .ps-preview > iframe,
 html body #studio-private-selection .ps-preview::after {
  grid-area:3 / 2;
 }
 html body #studio-private-selection[data-ps-scope][data-ps-preview-format] .ps-preview[aria-label] > iframe {
  max-width:round(down, 100cqi, 1px);
  height:round(down, calc(round(down, min(100cqi, var(--preview-width)), 1px) * var(--preview-ratio)), 1px);
 }
 /* The rim stretches to the same grid cell as the animated iframe. */
 html body #studio-private-selection .ps-preview::after {
  width:auto;
  margin-inline:0;
 }
}

/* The enhanced chart menu already shows its heading and checked years.
   The native trigger still supplies the summary to the outer button. */
html body .studio-filter-bar .studio-filter-panel [data-home-year-picker] > [data-home-year-button] {
 display:none!important;
}

/* Touch pages keep the private canvas black through rotation. */
html:is([data-studio-surface-device=phone],[data-studio-surface-device=tablet]):has(.ps-client-selection,main.client-resource-page) {
 --private-page-canvas:#000;
 background:#000!important;
}
html:is([data-studio-surface-device=phone],[data-studio-surface-device=tablet]):has(.ps-client-selection,main.client-resource-page) body,
html:is([data-studio-surface-device=phone],[data-studio-surface-device=tablet]) body :is(.ps-client-selection,main.client-resource-page) {
 background:#000!important;
}

/* The site keeps its normal gutters on wide landscape tablets. */
@media (max-width:1100px), (orientation:portrait) {
 html:is([data-studio-surface-device=phone],[data-studio-surface-device=tablet]) body :is(
  #accueil > .hero-story,.ps-client-selection :is(.ps-hero,[data-ps-entry-stage])
 ) {
  width:100%;
  max-width:none;
  margin-inline:0;
  border:0!important;
  border-radius:0!important;
 }
 html:is([data-studio-surface-device=phone],[data-studio-surface-device=tablet]) body :is(
  #accueil > .hero-story,.ps-client-selection .ps-hero
 )::after {
  content:none;
 }
}


/* The public cookie controls use the same column as the footer above. */
html body:has(#accueil) main > [class*="_privacyBar_"] {
 padding-inline:20px!important;
}
@media (min-width:1101px) {
 html body:has(#accueil) main > [class*="_privacyBar_"] {
  padding-inline:max(var(--site-card-gutter,48px),calc((100% - var(--site-card-max,1424px)) / 2))!important;
 }
}

/* The public slideshow has a clean edge against the white editorial section. */
html body #accueil > .ps-home-hero::after {
 content:none;
}

/* Section-heading rhythm shared by Studio and the public and private site. */
:root{
 --studio-section-before:44px;
 --studio-section-after:20px;
 --studio-card-section-before:36px;
 --studio-card-section-after:18px;
 --studio-card-subsection-before:24px;
 --studio-card-subsection-after:14px;
 --studio-intro-kicker-gap:8px;
 --studio-intro-lead-gap:24px;
}
@media(max-width:600px){
 :root{
  --studio-section-before:40px;
  --studio-section-after:18px;
  --studio-card-section-before:32px;
  --studio-card-section-after:16px;
  --studio-card-subsection-before:20px;
  --studio-card-subsection-after:12px;
 }
}

/* Public editorial sections. Hero framing is controlled by the slideshow. */
html body :is(.intro-dark,.after-carousel-story).editorial-grid:has(>.manifesto>h2){
 margin-block-start:0!important;
 padding-block-start:var(--studio-section-before)!important;
 row-gap:var(--studio-section-after)!important;
}
html body :is(.intro-dark,.after-carousel-story).editorial-grid>.manifesto>h2{
 margin-block:0!important;text-align:start;
}
html body .hero-story .landscape-copy.editorial-grid:has(h1:not(:empty)){
 row-gap:var(--studio-intro-lead-gap)!important;
}

/* Private page. Flow layout owns the distance between sections. */
html body .client-resource-page{
 --studio-block-gap:var(--studio-section-before);
}
html body .client-resource-page .client-resource-hero>div:has(>h1){
 row-gap:var(--studio-intro-lead-gap)!important;
}
html body .client-resource-page :is(.client-resource-texts article header>div:first-child,.client-photo-library>header>div:first-child){
 row-gap:var(--studio-section-after)!important;
}
html body .client-resource-page .client-resource-texts article{
 row-gap:var(--studio-section-after)!important;
}
html body .client-resource-page .client-photo-library>header{
 padding-block-end:var(--studio-section-after)!important;
}
html body .client-resource-page :is(.client-resource-texts,.client-photo-library) h2{
 margin-block:0!important;text-align:start;
}

/* Studio page headings and independent sections. */
html body main[data-studio-interface]:not(.stats-layout)>header>div:has(>h1+p),
html body main[data-studio-interface]:not(.stats-layout)>header:has(>h1+p){row-gap:0}
html body main[data-studio-interface]>header:has(h1) h1:not(:empty)+p:not(.eyebrow){
 margin-block-start:var(--studio-intro-lead-gap)!important;
}
html body main[data-studio-interface]>header:has(h1) .eyebrow:has(+h1){
 margin-block-end:var(--studio-intro-kicker-gap)!important;
}
html body main[data-studio-interface]:not(.portfolio-native-layout,.home-layout){--studio-block-gap:var(--studio-section-before)}
html body main[data-studio-interface]:not(.stats-layout) :is(h2,h3):is(.studio-section-title,[data-studio-type=section-title]){
 margin-inline:0;text-align:start;
 margin-block-end:var(--studio-section-after)!important;
}
html body main[data-studio-interface]:not(.stats-layout) :not(style,script,link,[hidden])+h2:is(.studio-section-title,[data-studio-type=section-title]){
 margin-block-start:var(--studio-section-before)!important;
}

/* Headings next to compact controls use the heading, rather than the touch
   target, as the reference edge. The statistics page already does this. */
html body main[data-studio-interface].stats-layout .stats-sections{
 gap:var(--studio-section-before)!important;
 margin-block-start:var(--studio-section-before)!important;
}
html body main[data-studio-interface].stats-layout .stats-sections>.stats-gallery-section{gap:var(--studio-section-after)!important}
html body main.stats-layout .stats-heading h1+p:not(.stats-contact-email){
 margin-block-start:0!important;
}
html body main.stats-layout .stats-heading>div{display:block!important}
html body main.stats-layout .stats-summary .stats-heading>div>h1{
 margin-block-start:var(--studio-intro-kicker-gap)!important;
}
html body main.stats-layout .stats-heading>div>h1+p:not(.stats-contact-email){
 padding-block-start:var(--studio-intro-lead-gap);
}

/* Cards: initial titles use the existing interior inset, internal sections
   and subordinate headings use distinct rhythms. */
html body .studio-stats-contact-detail{gap:var(--studio-card-section-after)!important}
html body .studio-stats-contact-detail:is([data-stats-contact-panel],[data-stats-region=individual])>h3{
 margin-block-start:calc(var(--studio-card-section-before) - var(--studio-card-section-after))!important;
}
html body .studio-record-sheet :is(.studio-record-inline-history,.studio-row-detail,.studio-record-studio-body)>.history-section-title,
html body .studio-record-sheet [data-report-links-document]>h3{
 margin-block:var(--studio-card-subsection-before) var(--studio-card-subsection-after)!important;
 text-align:start;
}
html body .studio-record-sheet :is(.studio-record-inline-history,.studio-row-detail,.studio-record-studio-body)>h2{
 margin-block:var(--studio-card-section-before) var(--studio-card-section-after)!important;
 text-align:start;
}
html body .client-access-dialog header>h2+p{
 margin-block-start:var(--studio-card-section-after)!important;
}

html body :is(.studio-record-sheet,.studio-header-card) :not(style,script,link,[hidden])+h2[data-studio-type=section-title]{
 margin-block:var(--studio-card-section-before) var(--studio-card-section-after)!important;text-align:start
}
html body :is(.studio-record-sheet,.studio-header-card) :not(style,script,link,[hidden])+h3[data-studio-type=section-title]{
 margin-block:var(--studio-card-subsection-before) var(--studio-card-subsection-after)!important;text-align:start
}

/* Shared typography for prominent totals and counters. */
:root{
 --studio-display-number-family:var(--studio-font-family,"Suisse Int’l",sans-serif);
 --studio-display-number-weight:500;
}
html body :is(
 [data-studio-type="metric-value"],
 .studio-home-kpi strong,
 .studio-home-metric-value,
 .revenue-dashboard-kpi-value,
 .revenue-dashboard-stat-value,
 .invoice-metrics .invoice-metric strong,
 .studio-record-sheet .studio-record-metric-value,
 .studio-stats-contact-detail .stats-fact-metric,
 .audience-kpis strong,
 .map-insight-kpis strong,
 .sd-reading
){
 font-family:var(--studio-display-number-family)!important;
 font-weight:var(--studio-display-number-weight)!important;
 font-variant-numeric:tabular-nums;
}

/* Record cards share the same entrance rhythm. */
:root{
 --studio-record-enter-duration:360ms;
 --studio-record-enter-ease:cubic-bezier(.25,.1,.25,1);
}
@media(prefers-reduced-motion:no-preference){
 html body dialog.studio-record-sheet.studio-page-sheet[open]:not(.is-closing){
  animation-duration:var(--studio-record-enter-duration)!important;
  animation-timing-function:var(--studio-record-enter-ease)!important;
 }
 html.studio-desktop-shell body dialog.studio-record-sheet.studio-page-sheet[open]:not(.is-closing),
 html.studio-ipad-docked body dialog.studio-record-sheet.studio-page-sheet:is([data-studio-record-kind=contact],[data-studio-record-kind=asset-stats])[open]:not(.is-closing){
  animation-name:studio-compact-record-enter!important;
 }
}
@keyframes studio-compact-record-enter{
 from{opacity:0;translate:0 6px}
 to{opacity:1;translate:0 0}
}

/* Fade the decorative grid into the surrounding workspace. */
html body :is([data-instagram-stories],[data-instagram-publications]) .story-editor,
#studio-private-email-banner .studio-sections-contents,
#studio-private-selection[data-ps-scope] > .ps-preview{
 position:relative;
 isolation:isolate;
 --studio-grid-outset-block:48px;
 --studio-grid-fade-block:min(120px, 35%);
 --studio-grid-fade-inline:16px;
 --studio-grid-half-fade:calc(var(--studio-grid-fade-block) / 2);
 --studio-grid-vertical-mask:linear-gradient(to bottom,
  transparent, rgb(0 0 0 / .35) var(--studio-grid-half-fade), #000 var(--studio-grid-fade-block),
  #000 calc(100% - var(--studio-grid-fade-block)), rgb(0 0 0 / .35) calc(100% - var(--studio-grid-half-fade)), transparent
 );
}
html body :is([data-instagram-stories],[data-instagram-publications]) .story-editor::before,
#studio-private-email-banner .studio-sections-contents::before,
#studio-private-selection[data-ps-scope] > .ps-preview::before{
 content:"";
 position:absolute;
 z-index:-1;
 pointer-events:none;
 inset-block:calc(-1 * var(--studio-grid-outset-block));
 inset-inline:calc(-1 * var(--studio-grid-fade-inline));
 background:radial-gradient(circle,#8884 .75px,transparent 1px) center / 16px 16px;
 mask-image:var(--studio-grid-vertical-mask),
            linear-gradient(to right,transparent,#000 var(--studio-grid-fade-inline),#000 calc(100% - var(--studio-grid-fade-inline)),transparent);
 mask-composite:intersect;
}
@media(max-width:600px){
 html body :is([data-instagram-stories],[data-instagram-publications]) .story-editor,
 #studio-private-email-banner .studio-sections-contents,
 #studio-private-selection[data-ps-scope] > .ps-preview{
  --studio-grid-outset-block:40px;
  --studio-grid-fade-block:min(112px, 35%);
 }
}
@media(max-width:600px), (pointer:coarse) and (max-height:500px){
 html body :is([data-instagram-stories],[data-instagram-publications]) .story-editor::before,
 #studio-private-email-banner .studio-sections-contents::before,
 #studio-private-selection[data-ps-scope] > .ps-preview::before{
  inset-inline:calc(50% - 50vw);
  mask-image:var(--studio-grid-vertical-mask);
 }
}
/* Desktop content is centered in the area left by the navigation rail. */
html.studio-desktop-shell body :is(
 [data-instagram-stories] .story-editor,
 [data-instagram-publications] .story-editor,
 #studio-private-email-banner .studio-sections-contents,
 #studio-private-selection[data-ps-scope] > .ps-preview
)::before{
 inset-inline:calc(50% - (100vw - var(--studio-grid-navigation-width,0px)) / 2);
 mask-image:var(--studio-grid-vertical-mask);
}
html.studio-desktop-shell[data-studio-nav-layout=side] body{
 --studio-grid-navigation-width:var(--studio-side-occupied,52px);
}
#studio-private-email-banner .studio-sections-workspace>.studio-sections-viewport{
 width:calc(100% - 16px);
}

/* Preserve the original slideshow outlines and playback progress geometry. */
html body .hero-story :is(.hero-date-action,.ps-hero-quote),
html body .hero-story :is(.ps-home-hero-controls,.ps-hero-controls) button{
 background-color:rgb(20 20 20 / 25%)!important;
}
html body .hero-story :is(.ps-home-hero-controls,.ps-hero-controls)
 .ps-playback:is([aria-pressed=true],[aria-label="Mettre le diaporama en pause"],:has(>.studio-carousel-pill-timer.is-running))>span{
 color:#fff!important;
}

/* White navigation and information toggle chevrons on slideshow media. */
html body .hero-story :is(.ps-home-hero-controls,.ps-hero-controls)
 button[data-studio-ui-shape=circle]:not([data-ps-media-info-button]),
html body .hero-story button[data-ps-info-toggle] :is(.studio-icon,svg){
 color:#fff!important;
}

/* Available outline pills in Studio share one foreground on dark surfaces. */
html:not([data-theme=light]) body :is(main[data-studio-interface],.studio-record-sheet,.studio-header-card) :is(
 [data-studio-ui-button][data-studio-ui-variant=secondary],
 :is(.invoice-control,.studio-period)>summary,
 summary[data-studio-value-filter],
 :is(button,summary)[data-studio-menu-trigger],
 select[data-studio-select-double-chevron]+button
):not(:disabled,[aria-disabled=true],[data-studio-review-tone],[data-studio-accent-ui=solid],.studio-selection-list *,[data-studio-ui-menu] *){
 --studio-command-ink:#fff;
 color:#fff!important;
 -webkit-text-fill-color:currentColor!important;
}
html:not([data-theme=light]) body :is(main[data-studio-interface],.studio-record-sheet,.studio-header-card) :is(
 [data-studio-ui-button][data-studio-ui-variant=secondary],
 :is(.invoice-control,.studio-period)>summary,
 summary[data-studio-value-filter],
 :is(button,summary)[data-studio-menu-trigger],
 select[data-studio-select-double-chevron]+button
):not(:disabled,[aria-disabled=true],[data-studio-review-tone],[data-studio-accent-ui=solid],.studio-selection-list *,[data-studio-ui-menu] *) :is(.studio-icon,.invoice-control-value){
 color:inherit!important;
}

/* Shared translucent black surface for outline pills. */
html body :is(
 [data-studio-ui-button][data-studio-ui-variant=secondary],
 :is(.invoice-control,.studio-period)>summary,
 summary[data-studio-value-filter],
 :is(button,summary)[data-studio-menu-trigger],
 select[data-studio-select-double-chevron]+button
):not([data-studio-review-tone],[data-studio-accent-ui=solid],.studio-selection-list *,[data-studio-ui-menu] *){
 --studio-command-bg:var(--studio-outline-pill-fill,rgb(20 20 20 / 25%));
 background-color:var(--studio-command-bg)!important;
}

/* The dropdown reference uses the shared double chevron. */
html body .design-section.has-overlay-menu .design-menu>summary::after{
 content:none!important;
}

/* Subtle outline-pill fill on light surfaces. */
html[data-theme=light] body,
html body .site-header[data-tone=dark],
html body:has(#accueil > .ps-home-hero) [data-site-desktop-shell] > .site-header:not(.client-private-header){
 --studio-outline-pill-fill:rgb(20 20 20 / 2%);
}
html[data-theme=light] body .hero-story,
html[data-theme=light] body .site-header[data-tone=light]{
 --studio-outline-pill-fill:rgb(20 20 20 / 25%);
}

/* The preview frame softens the workspace grid until the iframe fades in. */
#studio-private-selection[data-ps-scope] .ps-preview-viewport{
 background-color:rgb(0 0 0 / 16%);
}

/* Slideshow chevrons stay transparent in every interaction state.
   Scope excludes the media information and playback commands. */
html:root body .hero-story:is(.ps-hero,.ps-home-hero) :is(
 :is(.ps-hero-controls,.ps-home-hero-controls) button[data-studio-ui-shape=circle]:not([data-ps-media-info-button]),
 button[data-ps-info-toggle]
){--studio-command-bg:transparent!important;background:transparent!important}
html:root body .hero-story:is(.ps-hero,.ps-home-hero) :is(
 :is(.ps-hero-controls,.ps-home-hero-controls) button[data-studio-ui-shape=circle]:not([data-ps-media-info-button]),
 button[data-ps-info-toggle]
)::before,
html:root body .hero-story:is(.ps-hero,.ps-home-hero) :is(
 :is(.ps-hero-controls,.ps-home-hero-controls) button[data-studio-ui-shape=circle]:not([data-ps-media-info-button]),
 button[data-ps-info-toggle]
)::after{background:transparent!important}
