/*
 * Share sheet (Nov 2026 sharing brief).
 * Grey secondary buttons throughout: no network brand colours. Icons inherit the text colour.
 */
html.msh-open { overflow: hidden; }

.msh { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; }
.msh__backdrop { position: absolute; inset: 0; background: rgba(11, 27, 51, .42); animation: msh-fade .16s ease-out; }
.msh__panel {
    position: relative; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto;
    background: var(--media-surface, #fff); color: var(--media-text-primary, #0B1B33);
    border-radius: 18px; box-shadow: 0 24px 64px rgba(11, 27, 51, .22); padding: 20px 22px 22px;
    animation: msh-rise .18s ease-out;
}
.msh__head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.msh__title { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.msh__close {
    display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 999px;
    background: transparent; color: var(--media-text-secondary, #5C6575); cursor: pointer;
}
.msh__close:hover { background: var(--button-secondary-bg, #F0F2F5); color: var(--media-text-primary, #0B1B33); }

.msh-preview { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--media-border, #E2E5EA); border-radius: 14px; margin: 0 0 18px; }
.msh-preview__img { width: 112px; height: 59px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; background: #F0F2F5; }
.msh-preview__text { min-width: 0; }
.msh-preview__title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.msh-preview__meta { margin: 4px 0 0; font-size: 13px; color: var(--media-text-secondary, #5C6575); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msh-preview__meta:empty { display: none; }

.msh-tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.msh-tiles--more { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); margin-top: 14px; }
.msh-tile {
    display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 4px 0; border: 0; background: none;
    font: inherit; color: var(--media-text-primary, #0B1B33); text-decoration: none; cursor: pointer; min-width: 0;
}
.msh-tile__icon {
    display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 999px;
    background: var(--button-secondary-bg, #F0F2F5); color: var(--button-secondary-text, #0B1B33);
    transition: background-color .12s ease;
}
.msh-tile:hover .msh-tile__icon { background: var(--button-secondary-bg-hover, #E6EAEF); }
.msh-tile:active .msh-tile__icon { background: var(--button-secondary-bg-active, #DCE1E8); }
.msh-tile:focus-visible { outline: none; }
.msh-tile:focus-visible .msh-tile__icon { box-shadow: 0 0 0 3px var(--media-focus, rgba(21, 101, 216, .35)); }
.msh-tile__label { font-size: 12px; line-height: 1.2; color: var(--media-text-secondary, #5C6575); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.msh-more { margin-top: 2px; }
.msh-textbtn { display: inline-block; margin-top: 14px; padding: 0; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--media-text-secondary, #5C6575); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.msh-images { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.msh-image { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.msh-image__preview { border-radius: 8px; border: 1px solid var(--media-border, #E2E5EA); }
.msh-image__preview--landscape { width: 200px; }
.msh-image__preview--story { width: 90px; }
.msh-note { margin: 0; font-size: 13px; color: var(--media-text-secondary, #5C6575); }

.msh-link { display: flex; gap: 8px; align-items: center; margin-top: 18px; }
.msh-link__field {
    flex: 1 1 auto; min-width: 0; height: 42px; padding: 0 14px; border: 1px solid var(--media-border, #E2E5EA); border-radius: 999px;
    background: var(--media-surface-subtle, #F7F8FA); font: inherit; font-size: 13.5px; color: var(--media-text-secondary, #5C6575);
}
.msh-link__field:focus { outline: none; border-color: var(--media-text-secondary, #5C6575); }
.msh-link__copy { flex: 0 0 auto; padding: 10px 18px; }

@media (max-width: 560px) {
    .msh { align-items: flex-end; }
    .msh__panel { width: 100vw; max-height: 88vh; border-radius: 18px 18px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); animation-name: msh-up; }
    .msh-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 14px; }
}

@keyframes msh-fade { from { opacity: 0; } }
@keyframes msh-rise { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes msh-up { from { transform: translateY(24px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .msh__backdrop, .msh__panel { animation: none; } }

/* Embedded on the publish success page. */
.msh-inline .msh-preview { margin-bottom: 16px; }
.msh-inline .msh-tiles { grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (max-width: 560px) { .msh-inline .msh-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Article page: the share row near the heading and at the end. */
.media-share-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.media-share-row--end { margin: 32px 0 8px; padding: 18px 0; border-top: 1px solid var(--media-border, #E2E5EA); border-bottom: 1px solid var(--media-border, #E2E5EA); justify-content: space-between; }
.media-share-row__text { margin: 0; font-size: 15px; font-weight: 600; }
@media (max-width: 640px) { .media-profile__newsroom-mobile.media-profile__menu-media { display: inline-flex !important; } }

/*
 * Brand-coloured icons on neutral-grey circles (sharing icons brief, Nov 2026).
 * The colour lives on the icon artwork only; circles, labels and spacing stay neutral.
 * Tokens so every share surface (sheet, success page, More panel) reads from one place.
 */
:root {
    --share-facebook: #1877F2;
    --share-linkedin: #0A66C2;
    --share-x: #0F1419;
    --share-whatsapp: #1A9E4B; /* deeper than the official #25D366 for 3:1 contrast on grey (JM, 20 Nov 2026) */
    --share-reddit: #FF4500;
    --share-telegram: #229ED9;
    --share-threads: #0F1419;
    --share-bluesky: #1185FE;
    --share-media: #0B1B33;
}
.msh-tile__icon { color: var(--share-media); }
.msh-tile[data-msh-dest="facebook"] .msh-tile__icon { color: var(--share-facebook); }
.msh-tile[data-msh-dest="linkedin"] .msh-tile__icon { color: var(--share-linkedin); }
.msh-tile[data-msh-dest="x"] .msh-tile__icon { color: var(--share-x); }
.msh-tile[data-msh-dest="whatsapp"] .msh-tile__icon { color: var(--share-whatsapp); }
.msh-tile[data-msh-dest="reddit"] .msh-tile__icon { color: var(--share-reddit); }
.msh-tile[data-msh-dest="telegram"] .msh-tile__icon { color: var(--share-telegram); }
.msh-tile[data-msh-dest="threads"] .msh-tile__icon { color: var(--share-threads); }
.msh-tile[data-msh-dest="bluesky"] .msh-tile__icon { color: var(--share-bluesky); }
/* Logos optically matched: filled marks slightly smaller than the outline glyphs. */
.msh-tile__icon svg { width: 22px; height: 22px; }
.msh-tile[data-msh-dest="facebook"] svg, .msh-tile[data-msh-dest="whatsapp"] svg { width: 23px; height: 23px; }
.msh-tile[data-msh-dest="linkedin"] svg { width: 20px; height: 20px; }
.msh-tile[data-msh-dest="x"] svg { width: 19px; height: 19px; }
.msh-tile__label { color: var(--share-media); opacity: .78; }
.msh-tile:hover .msh-tile__label { opacity: 1; }

/* Copied: the same state on the tile and the Copy button. */
.msh-tile.is-copied .msh-tile__icon { color: #067647; background: #ECFDF3; }
.msh-tile.is-copied .msh-tile__label { color: #067647; opacity: 1; }
.msh-link__copy { display: inline-flex; align-items: center; gap: 6px; }
.msh-copy__check { display: none; }
.msh-link__copy.is-copied { background: #ECFDF3; color: #067647; }
.msh-link__copy.is-copied .msh-copy__check { display: inline-flex; }
.msh-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Focus: a visible ring on the circle, never a square box. */
.msh-tile:focus { outline: none; }
.msh-tile:focus-visible .msh-tile__icon { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0B5FFF; }
.msh-link__copy:focus-visible, .msh__close:focus-visible { outline: 2px solid #0B5FFF; outline-offset: 2px; }

/* A little tighter, still comfortable to tap (48px circles, 64px+ targets with labels). */
.msh__panel { padding: 18px 20px 20px; }
.msh__head { margin-bottom: 10px; }
.msh-preview { margin-bottom: 14px; padding: 10px; }
.msh-tile__icon { width: 48px; height: 48px; }
.msh-tiles { gap: 4px; }
.msh-link { margin-top: 14px; }
@media (max-width: 560px) {
    .msh-tiles { row-gap: 12px; }
    .msh-link__copy { padding: 10px 16px; }
}
@media (forced-colors: active) { .msh-tile__icon { border: 1px solid CanvasText; } }
.msh__panel:focus { outline: none; }
.msh-tile:focus:not(:focus-visible), .msh-tile:focus:not(:focus-visible) .msh-tile__icon { outline: none !important; box-shadow: none !important; }

/* Share beside the byline on written pages. */
.media-written__share { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; margin-left: auto; border: 0; border-radius: 999px; background: var(--button-secondary-bg, #F0F2F5); color: var(--share-media, #0B1B33); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.media-written__share:hover { background: var(--button-secondary-bg-hover, #E6EAEF); }
.media-written__share:focus-visible { outline: 2px solid #0B5FFF; outline-offset: 2px; }
.media-written__share svg { width: 16px; height: 16px; }
.media-written__follow + .media-written__share { margin-left: 8px; }
@media (max-width: 560px) { .media-written__share span { display: none; } .media-written__share { width: 34px; padding: 0; justify-content: center; } }

/* Studio analytics: Sharing section. */
.media-an-pub__sharebtn { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; }
.media-an-pub__sharecap { margin: 18px 0 8px; font-size: 13px; font-weight: 600; color: var(--share-media, #0B1B33); }
.media-an-pub__sharebars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 520px; }
.media-an-pub__sharebars li { display: grid; grid-template-columns: 110px 1fr 48px; align-items: center; gap: 10px; font-size: 13.5px; }
.media-an-pub__sharebar { height: 8px; border-radius: 999px; background: #F0F2F5; overflow: hidden; }
.media-an-pub__sharebar i { display: block; height: 100%; border-radius: 999px; background: #0B1B33; }
.media-an-pub__sharen { text-align: right; font-variant-numeric: tabular-nums; }
.media-an-pub__sharing .media-an-pub__empty-note { margin-top: 14px; }

/*
 * Universal Share (21 Nov 2026): contextual heading, preview shaped by what is shared,
 * brand-coloured destination circles, and a dedicated Copy link row.
 */
.msh__head { align-items: flex-start; margin-bottom: 14px; }
.msh__heading { min-width: 0; }
.msh__title { font-size: 19px; line-height: 1.25; }
.msh__sub { margin: 3px 0 0; font-size: 14px; color: var(--media-text-secondary, #5C6575); }
.msh__close { margin: -6px -8px 0 8px; flex: 0 0 auto; }

/* Preview */
.msh-preview { display: block; padding: 14px; margin-bottom: 18px; border-radius: 14px; background: var(--media-surface-subtle, #F7F8FA); border-color: transparent; }
.msh-pv { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.msh-pv__text { min-width: 0; flex: 1 1 auto; }
.msh-pv__by { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; min-width: 0; }
.msh-pv__name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msh-pv__tick { flex: 0 0 auto; margin-left: 2px; vertical-align: -2px; }
.msh-pv__avatar { width: 24px; height: 24px; border-radius: 999px; object-fit: cover; flex: 0 0 auto; background: #E6EAEF; }
.msh-pv__avatar--lg { width: 56px; height: 56px; }
.msh-pv__avatar--org { border-radius: 12px; }
.msh-pv__initials { display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 650; color: #3B4558; background: #E6EAEF; }
.msh-pv__avatar--lg.msh-pv__initials { font-size: 19px; }
.msh-pv__label { margin: 0 0 3px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--media-text-secondary, #5C6575); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msh-pv__title { margin: 0; font-size: 15.5px; font-weight: 650; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.msh-pv__meta { margin: 4px 0 0; font-size: 13px; color: var(--media-text-secondary, #5C6575); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msh-pv__ctx { font-weight: 600; color: var(--media-text-primary, #0B1B33); }
.msh-pv__excerpt { margin: 6px 0 0; font-size: 13.5px; line-height: 1.45; color: #3B4558; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.msh-pv--profile .msh-pv__title { -webkit-line-clamp: 1; }
.msh-pv__img { width: 96px; height: 64px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; background: #E6EAEF; }
.msh-pv--article .msh-pv__img { width: 112px; height: 74px; }
.msh-pv__icon { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex: 0 0 auto; background: #E6EAEF; }
.msh-pv__icon.msh-pv__initials { font-size: 19px; }
.msh-pv__thumb { position: relative; width: 128px; aspect-ratio: 16 / 9; flex: 0 0 auto; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #1D2A3F, #0B1B33); }
.msh-pv--short .msh-pv__thumb { width: 64px; aspect-ratio: 9 / 16; }
.msh-pv__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.msh-pv__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 999px; background: rgba(11, 27, 51, .62); }
.msh-pv__play svg { margin-left: 2px; }
.msh-pv--media .msh-pv__by { margin: 8px 0 0; }

/* Destinations: six brand-coloured circles. */
.msh-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.msh-inline .msh-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.msh-tiles--more { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.msh-tile__icon { width: 48px; height: 48px; transition: filter .12s ease, background-color .12s ease; }
.msh-tiles:not(.msh-tiles--more) .msh-tile[data-msh-dest="facebook"] .msh-tile__icon { background: #1877F2; color: #fff; }
.msh-tiles:not(.msh-tiles--more) .msh-tile[data-msh-dest="linkedin"] .msh-tile__icon { background: #0A66C2; color: #fff; }
.msh-tiles:not(.msh-tiles--more) .msh-tile[data-msh-dest="whatsapp"] .msh-tile__icon { background: #1A9E4B; color: #fff; }
.msh-tiles:not(.msh-tiles--more) .msh-tile[data-msh-dest="x"] .msh-tile__icon { background: #0F1419; color: #fff; }
.msh-tiles:not(.msh-tiles--more) .msh-tile[data-msh-dest="email"] .msh-tile__icon { background: #5C6575; color: #fff; }
.msh-tiles:not(.msh-tiles--more) .msh-tile[data-msh-dest="more"] .msh-tile__icon { background: var(--button-secondary-bg, #F0F2F5); color: var(--share-media, #0B1B33); }
.msh-tiles:not(.msh-tiles--more) .msh-tile:not([data-msh-dest="more"]):hover .msh-tile__icon { filter: brightness(1.1); }
.msh-tiles:not(.msh-tiles--more) .msh-tile:not([data-msh-dest="more"]):active .msh-tile__icon { filter: brightness(.92); }
.msh-tile[data-msh-dest="facebook"] svg, .msh-tile[data-msh-dest="whatsapp"] svg { width: 22px; height: 22px; }

/* Copy link row */
.msh-link { display: block; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--media-border, #E2E5EA); }
.msh-link__label { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--media-text-primary, #0B1B33); }
.msh-link__row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 4px 4px 14px; border: 1px solid var(--media-border, #E2E5EA); border-radius: 999px; background: var(--media-surface, #fff); }
.msh-link__icon { display: inline-flex; color: var(--media-text-secondary, #5C6575); flex: 0 0 auto; }
.msh-link__url { display: flex; min-width: 0; flex: 1 1 auto; font-size: 14px; white-space: nowrap; }
.msh-link__host { flex: 0 0 auto; font-weight: 600; color: var(--media-text-primary, #0B1B33); }
.msh-link__path { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--media-text-secondary, #5C6575); }
.msh-link__field { display: none; }
.msh-link__row.is-manual .msh-link__url { display: none; }
.msh-link__row.is-manual .msh-link__field { display: block; height: 38px; border: 0; background: transparent; padding: 0 4px; }
.msh-link__copy { min-width: 92px; justify-content: center; height: 40px; padding: 0 18px; border-radius: 999px; }

@media (max-width: 560px) {
    .msh-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 12px; }
    .msh-inline .msh-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .msh-tile__icon { width: 44px; height: 44px; }
    .msh-tile__label { font-size: 11.5px; }
    .msh-pv__thumb { width: 104px; }
    .msh-pv__img, .msh-pv--article .msh-pv__img { width: 76px; height: 56px; }
    .msh-link__copy { min-width: 84px; padding: 0 14px; }
}
@media (max-width: 360px) {
    .msh-tiles, .msh-inline .msh-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) { .msh-tiles { gap: 0; } .msh-tile__label { font-size: 11px; letter-spacing: -.01em; text-overflow: clip; } }

/* Loading skeleton: same footprint as the loaded sheet, so nothing jumps when it fills in. */
.msh-skel i { display: block; background: #E9EDF2; border-radius: 6px; position: relative; overflow: hidden; }
.msh-skel i::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent); animation: msh-shimmer 1.1s ease-in-out infinite; }
.msh-skel__preview { display: flex; gap: 14px; align-items: center; padding: 14px; margin-bottom: 18px; border-radius: 14px; background: var(--media-surface-subtle, #F7F8FA); }
.msh-skel__thumb { width: 96px; height: 64px; flex: 0 0 auto; border-radius: 10px !important; }
.msh-skel__lines { flex: 1 1 auto; display: grid; gap: 9px; }
.msh-skel__bar { height: 12px; width: 100%; }
.msh-skel__bar--sm { width: 30%; height: 10px; }
.msh-skel__bar--md { width: 70%; }
.msh-skel__bar--xs { width: 44px; height: 9px; }
.msh-skel__tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.msh-skel__tile { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 4px 0; }
.msh-skel__circle { width: 48px; height: 48px; border-radius: 999px !important; }
.msh-skel__link { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--media-border, #E2E5EA); display: grid; gap: 10px; }
.msh-skel__link .msh-skel__bar--xs { width: 64px; height: 11px; }
.msh-skel__row { height: 48px; border-radius: 999px !important; }
.msh-fail { padding: 18px 2px 6px; font-size: 14px; }
.msh .msh-body { animation: msh-fade .14s ease-out; }
@keyframes msh-shimmer { to { transform: translateX(100%); } }
@media (max-width: 560px) { .msh-skel__circle { width: 44px; height: 44px; } .msh-skel__tiles { gap: 0; } }
@media (prefers-reduced-motion: reduce) { .msh-skel i::after { animation: none; } .msh .msh-body { animation: none; } }
.msh-skel__preview { min-height: 150px; align-items: flex-start; }
.msh-skel__lines { gap: 11px; padding-top: 2px; }
.msh-skel__lines::after { content: ''; display: block; height: 12px; width: 85%; background: #E9EDF2; border-radius: 6px; }
.msh-skel__lines::before { content: ''; display: block; height: 12px; width: 55%; background: #E9EDF2; border-radius: 6px; order: 9; }
