/* Shared feedback for existing controls; navigation never waits for motion. */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ui-press: 100ms;
  --ui-release: 160ms;
  --ui-hover: 200ms;
}

/* Fluid controls: the surface, label and arrow have separate motion tracks. */
body .motion-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  gap: 12px;
  transition: transform 240ms var(--ease-out);
}
body .motion-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #fff;
  opacity: .14;
  border-radius: inherit;
  transform: translateX(-102%);
  transition: transform 240ms var(--ease-out), opacity 160ms var(--ease-out);
  pointer-events: none;
}
body .motion-button-label { display: inline-flex; align-items: center; gap: 10px; }
body .motion-button-arrow { display: block; flex: 0 0 1em; width: 1em; height: 1.25em; overflow: hidden; }
body .motion-button-arrow > span {
  position: relative;
  display: block;
  line-height: 1.25;
  transition: transform 240ms var(--ease-out);
}
body .motion-button-arrow > span::after {
  content: attr(data-glyph);
  position: absolute;
  inset: 0;
  transform: translate(-140%, 140%);
}
body .motion-button:active { transform: translateY(1px) scale(.955); }
@media (hover:hover) and (pointer:fine) {
  body .motion-button:hover::before { transform: translateX(0); }
  body .motion-button:hover .motion-button-arrow > span { transform: translate(140%, -140%); }
  body .motion-button:hover:active { transform: translateY(1px) scale(.955); }
  body .motion-button:hover:active::before { opacity: .22; }
}

/* Three transform-only pieces keep rounded ends intact while the pill stretches. */
body .motion-tabs { position: relative; isolation: isolate; }
body .motion-tabs > button { z-index: 1; background: transparent; }
body .motion-tabs > button::after { display: none; }
body .motion-tabs > .motion-tab-marker {
  display: block;
  position: absolute;
  top: 0; left: 0; width: 0;
  pointer-events: none;
  z-index: 0;
}
body .motion-tabs > .motion-tab-marker[hidden] { display: none; }
body .motion-tab-marker > i {
  position: absolute;
  display: block;
  top: 0; left: 0; height: 100%; width: 8px;
  background: #e3d4a7;
  transform-origin: left center;
}
body .motion-tab-marker > .motion-tab-start { border-radius: 8px 0 0 8px; }
body .motion-tab-marker > .motion-tab-end { border-radius: 0 8px 8px 0; }
body .motion-tab-marker > .motion-tab-middle { width: 1px; }
body :is(.dc-main, .ss, .xu-surface, .site-flow) .motion-tabs > button:is([aria-selected="true"], [aria-pressed="true"]) {
  background: transparent; border-color: transparent; box-shadow: none; color: #10100e;
}
body .site-flow .motion-tabs > button[aria-selected="true"] > span { color: #10100e; }
body .site-flow .motion-tabs > button { padding-inline: 12px; }
body .dc-main .dc-language-tabs.motion-tabs { gap: 8px; }
body .dc-main .dc-language-tabs.motion-tabs > button { padding-inline: 14px; }

/* Both copy labels occupy one grid cell, reserving width before the response. */
body .motion-copy { display: inline-grid; align-items: center; justify-items: center; }
body .motion-copy > span {
  grid-area: 1 / 1;
  transition: transform 200ms var(--ease-out), opacity 160ms var(--ease-out);
  pointer-events: none;
}
body .motion-copy-original { opacity: 1; transform: translateY(0); }
body .motion-copy-result { opacity: 0; transform: translateY(6px); }
body .motion-copy:is([data-copy-state="success"], [data-copy-state="error"]) > .motion-copy-original { opacity: 0; transform: translateY(-6px); }
body .motion-copy:is([data-copy-state="success"], [data-copy-state="error"]) > .motion-copy-result { opacity: 1; transform: translateY(0); }
body .motion-copy[data-copy-state="success"] { color: #e3d4a7; }
body .ss .ss-copy[data-copy-state="success"] { color: #10100e; }
.motion-sr-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body :is(.safe-faq, .site-faq) summary[aria-expanded="false"]::after { transform: rotate(0); }

/* Keyboard and reduced-motion interactions retain immediate state feedback. */
html[data-ui-input="keyboard"] body .motion-copy > span,
html[data-ui-input="keyboard"] body .motion-button::before,
html[data-ui-input="keyboard"] body .motion-button-arrow > span { transition: none !important; }
@media (prefers-reduced-motion:reduce) {
  body .motion-button::before,
  body .motion-button-arrow > span { transform: none !important; transition: none !important; }
  body .motion-button::before { opacity: 0; }
  body .motion-button-arrow > span::after { display: none; }
  body .motion-copy > span { transform: none !important; transition: none !important; }
}

/* Presses retarget naturally, including when released before they finish. */
body :is(button, .site-button, .dc-button, .tmgt-footer-button,
  .tmgt-footer-social-link, .tmgt-trust-resource-list a) {
  transition: transform var(--ui-release) var(--ease-out), opacity var(--ui-release) var(--ease-out);
  transform-origin: center;
}
body :is(button, .site-button, .dc-button, .tmgt-footer-button,
  .tmgt-footer-social-link, .tmgt-trust-resource-list a):not(:disabled):not([aria-disabled="true"]):active {
  transform: scale(0.97);
  transition-duration: var(--ui-press);
}

/* Text links keep a stable hit area while their underline and arrow respond. */
body a.site-text-link {
  position: relative;
}
body a.site-text-link::after {
  content: "";
  position: absolute;
  bottom: -1px;
  inset-inline: 0;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ui-hover) var(--ease-out);
  pointer-events: none;
}
body a.site-text-link > span[aria-hidden="true"],
body .site-card .site-text-link > span[aria-hidden="true"],
body .dc-button > svg {
  display: inline-block;
  transition: transform var(--ui-hover) var(--ease-out);
}

/* Navigation and tabs show state without moving their label or hit area. */
body .site-nav-group > summary,
body .site-navigation > a:not(.site-button),
body :is(.ss-segmented, .ss-tabs, .dc-language-tabs, .xu-filter-tabs, .site-flow-track) > button {
  position: relative;
}
body .site-nav-group > summary::before,
body .site-navigation > a:not(.site-button)::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 17px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ui-hover) var(--ease-out);
  pointer-events: none;
}
body .site-navigation > a:not(.site-button)::before { bottom: -7px; }
body .site-nav-group[open] > summary::before,
body .site-navigation > a[aria-current]:not(.site-button)::before { transform: scaleX(1); }
body .site-nav-group > summary::after {
  transition: transform var(--ui-hover) var(--ease-out);
}
body :is(.ss-segmented, .ss-tabs, .dc-language-tabs, .xu-filter-tabs, .site-flow-track) > button::after {
  content: "";
  position: absolute;
  inset-inline: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.75);
  transition: transform var(--ui-release) var(--ease-out), opacity var(--ui-release) var(--ease-out);
  pointer-events: none;
}
body :is(.ss-segmented, .ss-tabs, .dc-language-tabs, .xu-filter-tabs, .site-flow-track)
  > button:is([aria-selected="true"], [aria-pressed="true"])::after {
  transform: scaleX(1);
  opacity: 0.6;
}
/* Replace the existing SDK underline rather than stacking a second one. */
body .dc-main .dc-language-tabs > button[aria-selected="true"] { border-bottom-color: transparent; }
body .dc-main .dc-language-tabs > button::after { inset-inline: 0; bottom: -2px; }
body .dc-main .dc-language-tabs > button[aria-selected="true"]::after { opacity: 1; }

/* Keep the same plus glyph so opening a disclosure has a continuous change. */
body .safe-faq summary::after,
body .site-faq summary::after {
  content: "+";
  display: inline-block;
  transform: rotate(0);
  transform-origin: center;
  transition: transform var(--ui-hover) var(--ease-out), opacity var(--ui-release) var(--ease-out);
}
body .safe-faq details[open] > summary::after,
body .site-faq details[open] > summary::after { content: "+"; transform: rotate(45deg); }
body :is(.safe-faq, .site-faq) details[open] > summary[aria-expanded="false"]::after { transform: rotate(0); }
body :is(.safe-faq, .site-faq) summary:active::after { opacity: 0.5; }

body :is(a.site-card, a.dc-card, a.xu-directory-card) {
  transition: transform var(--ui-hover) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  body :is(button, .site-button, .dc-button, .tmgt-footer-button,
    .tmgt-footer-social-link, .tmgt-trust-resource-list a):not(:disabled):not([aria-disabled="true"]):hover {
    transform: translateY(-2px);
  }
  body :is(button, .site-button, .dc-button, .tmgt-footer-button,
    .tmgt-footer-social-link, .tmgt-trust-resource-list a):not(:disabled):not([aria-disabled="true"]):hover:active {
    transform: scale(0.97);
  }
  body :is(.ss-segmented, .ss-tabs, .dc-language-tabs, .xu-filter-tabs, .site-flow-track) > button:hover {
    transform: none;
  }
  body a.site-text-link:hover::after,
  body .site-nav-group > summary:hover::before,
  body .site-navigation > a:not(.site-button):hover::before { transform: scaleX(1); }
  body a.site-text-link:hover > span[aria-hidden="true"],
  body .site-card:hover .site-text-link > span[aria-hidden="true"],
  body .dc-button:hover > svg { transform: translateX(3px); }
  body :is(a.site-card, a.dc-card, a.xu-directory-card):hover { transform: translateY(-2px); }
  body :is(a.site-card, a.dc-card, a.xu-directory-card):active {
    transform: translateY(0) scale(0.995);
    transition-duration: var(--ui-press);
  }
}

/* Touch gets a real press response, never a sticky hover lift. */
@media (hover: none), (pointer: coarse) {
  body :is(a.site-card, a.dc-card, a.xu-directory-card):hover { transform: none; }
}
@media (max-width: 800px) {
  body .site-nav-group > summary::before,
  body .site-navigation > a:not(.site-button)::before { bottom: 7px; }
}

/* Keyboard focus is immediate; never delay a command or obscure its focus ring. */
body :is(button, .site-button, .dc-button, .tmgt-footer-button,
  .tmgt-footer-social-link, a.site-card, a.dc-card, a.xu-directory-card):focus-visible {
  transform: none !important;
  transition: none !important;
}
body :is(a, button, summary):focus-visible::before,
body :is(a, button, summary):focus-visible::after { transition: none !important; }
body :is(a.site-text-link, .site-nav-group > summary):focus-visible::before,
body a.site-text-link:focus-visible::after { transform: scaleX(1); }
body :is(button:disabled, [aria-disabled="true"]) { transform: none !important; }

@media (prefers-reduced-motion: reduce) {
  body :is(button, .site-button, .dc-button, .tmgt-footer-button,
    .tmgt-footer-social-link, .tmgt-trust-resource-list a, a.site-card,
    a.dc-card, a.xu-directory-card),
  body a.site-text-link > span[aria-hidden="true"],
  body .site-card .site-text-link > span[aria-hidden="true"],
  body .dc-button > svg { transform: none !important; transition: none !important; }
  body :is(.safe-faq, .site-faq, .site-nav-group) summary::after,
  body :is(a, button, summary)::before,
  body :is(a, button, summary)::after { transition: none !important; }
  body :is(button, .site-button, .dc-button):not(:disabled):not([aria-disabled="true"]):active { opacity: 0.75; }
}

/* Task 3: shared control geometry; cards and ordinary text links keep their layout. */
body :is(button,input[type=button],input[type=submit],input[type=reset],[role=button],.site-skip,.site-button,.site-header-cta,.site-mobile-cta,.dc-button,.tmgt-footer-button,.tmgt-footer-social-link,.dc-sidebar a,.dc-pagination a,.dc-search-result){border-radius:5px!important;min-height:48px!important}
body :is(.site-button,.site-header-cta,.site-mobile-cta,.dc-button,.tmgt-footer-button){background:#171717!important;border-color:#171717!important;color:#fff!important}
body :is(.site-button,.site-header-cta,.site-mobile-cta,.dc-button,.tmgt-footer-button):is(:hover,:focus-visible){background:#333!important;border-color:#333!important;color:#fff!important}
body .tmgt-footer-social-link{min-width:48px}

/* Task 5: shared consent bar and the branded not-found page. */
body.site-page{padding-bottom:var(--site-consent-space,0px)}
body.site-page .site-cookie-banner{position:fixed;inset:auto 0 0;z-index:10010;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 24px;padding:16px clamp(24px,4.2vw,64px);border-top:1px solid #dededb;background:#fff;color:#171717;font-style:normal;font-weight:400;font-size:14px;line-height:1.5;box-sizing:border-box}
body.site-page .site-cookie-banner p{margin:0;max-width:72ch;color:#171717}
body.site-page .site-cookie-banner a{color:#171717;text-decoration:underline;text-underline-offset:3px}
body.site-page .site-cookie-actions{display:flex;flex-wrap:wrap;gap:8px}
body.site-page .site-cookie-choice{min-height:48px;padding:12px 16px;border:1px solid #171717;border-radius:5px;background:#fff;color:#171717;font-style:normal;font-weight:600;font-size:14px;line-height:1.3;cursor:pointer}
body.site-page .site-cookie-essential:hover{background:#f6f6f4}
body.site-page .site-cookie-banner :is(a,button):focus-visible{outline:2px solid #171717;outline-offset:3px}
body.site-page .site-not-found{max-width:1440px;width:100%;margin:auto;padding:100px clamp(24px,4.2vw,64px);min-height:520px;color:#171717;background:#fff;box-sizing:border-box}
body.site-page .site-not-found .site-eyebrow{font-style:normal;font-weight:400;font-size:12px;line-height:1.5;letter-spacing:.08em;color:#606060;margin:0 0 24px}
body.site-page .site-not-found h1{font-size:clamp(36px,5vw,64px);font-weight:600;line-height:1.15;letter-spacing:-.04em;margin:0;overflow-wrap:anywhere}
body.site-page .site-not-found>p:not(.site-eyebrow){font-size:18px;font-weight:400;line-height:1.6;color:#606060;margin:24px 0 0;max-width:60ch}
body.site-page .site-not-found .site-actions{margin-top:32px;gap:24px}
body.site-page .site-not-found .site-text-link{color:#171717}
@media(max-width:959px){
 html.site-menu-locked{overflow:hidden}
 body.site-page.site-menu-locked{position:fixed;top:var(--site-menu-scroll-top,0px);left:0;right:0;width:100%;overflow:hidden}
 body.site-page .site-header{height:76px!important;z-index:10020!important;backdrop-filter:none!important;background:#fff;border-bottom:1px solid #dededb}
 body.site-page .site-header.site-menu-open{position:fixed;inset:0 0 auto}
 body.site-page .site-header .site-menu-toggle{display:flex;align-items:center;gap:8px;order:2;padding:10px 0;min-height:48px;background:none;border:0;color:#171717;font-style:normal;font-weight:600;font-size:14px;line-height:1.4;cursor:pointer}
 body.site-page .site-header .site-header-cta{display:none}
 body.site-page .site-header .site-navigation{display:none;position:fixed;inset:76px 0 0;width:100%;height:calc(100dvh - 76px);max-height:none!important;margin:0;padding:20px clamp(24px,4.2vw,64px) 32px;box-sizing:border-box;background:#fff;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;border:0}
 body.site-page .site-header.site-menu-open .site-navigation{display:block}
 body.site-page .site-header .site-nav-group summary{padding:16px 0;border-bottom:1px solid #dededb;font-size:17px;color:#171717}
 body.site-page .site-header .site-nav-group summary::after{float:right;color:#606060}
 body.site-page .site-header .site-mega{position:static;display:block;max-height:none;overflow:visible;padding:16px 0;box-shadow:none;border:0;border-radius:0}
 body.site-page .site-header .site-menu-column{min-width:0;margin-bottom:20px}
 body.site-page .site-header .site-menu-column p{color:#606060}
 body.site-page .site-header .site-menu-column a{font-size:15px;min-height:44px;padding:9px 0;color:#171717}
 body.site-page .site-header .site-menu-overview{padding-bottom:16px;margin-bottom:16px;gap:16px}
 body.site-page .site-header .site-menu-overview a{color:#171717!important}
 body.site-page .site-header .site-navigation>a:not(.site-mobile-cta){display:block;padding:16px 0;min-height:50px;border-bottom:1px solid #dededb;font-size:17px;color:#171717}
 body.site-page .site-header .site-mobile-cta{display:flex;min-height:48px;margin-top:16px}
 body.site-page.site-menu-locked .site-cookie-banner{display:none}
 body.site-page .site-not-found{padding-block:64px}
}
