/*
 * SAME components. Loaded after tokens.css.
 * Rules: token custom properties only (no literal colours, radii or shadows),
 * flat (no shadows, no gradients), `same-` class prefix, one section per
 * component in bundle.js order. Type comes from the tokens' type-style classes
 * (.label-large, .body-large, …), which the components add to their elements.
 * Theme: every colour is a role token, so a subtree with data-theme="dark"
 * repaints itself (tokens.css re-declares every colour under [data-theme]).
 */

/* =====================================================================
 * Shared
 * =================================================================== */

.same-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
}
.same-icon > svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.same-icon--mask {
  background-color: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* =====================================================================
 * Button
 * =================================================================== */

.same-button {
  position: relative;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--button-height);
  min-width: var(--touch-target);
  margin: 0;
  padding: 0 var(--space-6);
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-sm);
  background-color: transparent;
  color: var(--primary);
  font-family: var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--duration-short-3) var(--easing-standard),
    border-color var(--duration-short-3) var(--easing-standard),
    color var(--duration-short-3) var(--easing-standard);
}

/* 48px touch target around the 40px button (Material's invisible hit area). */
.same-button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: var(--touch-target);
  transform: translateY(-50%);
}

/* State layer: currentColor at the Material state opacities. */
.same-button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  background-color: currentColor;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-short-3) var(--easing-standard);
}

.same-button__label {
  position: relative;
}

.same-button__icon {
  position: relative;
  width: var(--icon-size-small);
  height: var(--icon-size-small);
}

.same-button:focus {
  outline: none;
}
.same-button:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

/* Filled: the primary action, once per section. Green fill, Deep Blue label. */
.same-button--filled {
  background-color: var(--tertiary);
  color: var(--on-tertiary);
}
.same-button--filled:hover {
  background-color: var(--tertiary-hover);
}
.same-button--filled:active {
  background-color: var(--tertiary-pressed);
}
.same-button--filled::before {
  display: none;
}

/* Outlined: secondary action. */
.same-button--outlined {
  border-color: var(--outline-button);
  background-color: var(--surface-container-lowest);
  color: var(--primary);
}

/* Text: low-emphasis action. */
.same-button--text {
  padding: 0 var(--space-3);
  color: var(--primary);
}

.same-button--outlined:hover::before,
.same-button--text:hover::before {
  opacity: var(--opacity-hover);
}
.same-button--outlined:focus-visible::before,
.same-button--text:focus-visible::before {
  opacity: var(--opacity-focus);
}
.same-button--outlined:active::before,
.same-button--text:active::before {
  opacity: var(--opacity-pressed);
}

/* Icon side gets the smaller Material padding. */
.same-button--icon-start { padding-left: var(--space-4); }
.same-button--icon-end { padding-right: var(--space-4); }
.same-button--text.same-button--icon-start { padding-left: var(--space-3); padding-right: var(--space-4); }
.same-button--text.same-button--icon-end { padding-left: var(--space-4); padding-right: var(--space-3); }

.same-button--full {
  display: flex;
  width: 100%;
}

/* Disabled: Material's 38% content / 12% container, as resolved tokens. */
.same-button:disabled,
.same-button[aria-disabled="true"] {
  cursor: default;
  pointer-events: none;
  color: var(--on-surface-disabled);
}
.same-button:disabled::before,
.same-button[aria-disabled="true"]::before {
  opacity: 0;
}
.same-button--filled:disabled,
.same-button--filled[aria-disabled="true"] {
  background-color: var(--surface-disabled);
}
.same-button--outlined:disabled,
.same-button--outlined[aria-disabled="true"] {
  border-color: var(--surface-disabled);
}

@media (prefers-reduced-motion: reduce) {
  .same-button,
  .same-button::before {
    transition: none;
  }
}

/* =====================================================================
 * TextField
 * =================================================================== */

.same-field {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
  min-width: 0;
  font-family: var(--font-sans);
  color: var(--on-surface);
}

.same-field__label {
  color: var(--on-surface);
}
.same-field__required {
  color: var(--on-surface-variant);
}

/* The control box. Its border is drawn by ::after so the 1px to 2px change
 * on focus or error never moves the text. */
.same-field__control {
  position: relative;
  box-sizing: border-box;
  display: flex;
  min-height: var(--text-field-height);
  border-radius: var(--radius-sm);
  background-color: var(--surface);
}
.same-field__control::after {
  content: "";
  position: absolute;
  inset: 0;
  border: var(--border-width) solid var(--outline);
  border-radius: var(--radius-sm);
  pointer-events: none;
  transition: border-color var(--duration-short-3) var(--easing-standard);
}
.same-field__control:hover::after {
  border-color: var(--on-surface);
}
.same-field__control:focus-within::after {
  border-width: var(--border-width-strong);
  border-color: var(--focus-ring);
}
/* Keyboard focus also draws the 2px focus ring (the 2px border alone is not enough on Deep Blue). */
.same-field__control:has(:focus-visible) {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.same-field__input {
  box-sizing: border-box;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: var(--text-field-height);
  margin: 0;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-sm);
  outline: none;
  background-color: transparent;
  color: var(--on-surface);
  caret-color: var(--on-surface);
  font-family: var(--font-sans);
}
.same-field__input::placeholder {
  color: var(--on-surface-placeholder);
  opacity: 1;
}

.same-field--multiline .same-field__input {
  height: auto;
  min-height: var(--text-field-height);
  padding: var(--space-4);
  resize: vertical;
}

.same-field__support {
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
  color: var(--on-surface-variant);
}

.same-field__support-text {
  min-width: 0;
}

.same-field__error-icon {
  flex: none;
  width: var(--icon-size-small);
  height: var(--icon-size-small);
  fill: currentColor;
}

/* Error: 2px border, the error icon and the message in `error` (the error
 * red, used only for errors). The icon and the words carry the meaning, never
 * the colour alone. On focus the border takes the focus-ring colour so focus
 * stays visible; the icon and message stay in `error`. */
.same-field--error .same-field__control::after {
  border-width: var(--border-width-strong);
  border-color: var(--error);
}
.same-field--error .same-field__control:focus-within::after {
  border-color: var(--focus-ring);
}
.same-field--error .same-field__support {
  color: var(--error);
}

/* Disabled: Material's 38% / 12%, as resolved tokens. */
.same-field--disabled .same-field__label,
.same-field--disabled .same-field__required,
.same-field--disabled .same-field__support,
.same-field--disabled .same-field__input,
.same-field--disabled .same-field__input::placeholder {
  color: var(--on-surface-disabled);
}
.same-field--disabled .same-field__input {
  cursor: default;
}
.same-field--disabled .same-field__control::after,
.same-field--disabled .same-field__control:hover::after {
  border-color: var(--surface-disabled);
}

@media (prefers-reduced-motion: reduce) {
  .same-field__control::after {
    transition: none;
  }
}

/* =====================================================================
 * IconButton
 * =================================================================== */

.same-icon-button {
  position: relative;
  box-sizing: border-box;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: var(--icon-button-size);
  height: var(--icon-button-size);
  margin: 0;
  padding: 0;
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-sm);
  background-color: transparent;
  color: var(--on-surface-variant);
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--duration-short-3) var(--easing-standard),
    border-color var(--duration-short-3) var(--easing-standard),
    color var(--duration-short-3) var(--easing-standard);
}

/* 48px touch target around the 40px button. */
.same-icon-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--touch-target);
  height: var(--touch-target);
  transform: translate(-50%, -50%);
}

/* State layer: currentColor at the Material state opacities. */
.same-icon-button::before {
  content: "";
  position: absolute;
  inset: calc(var(--border-width) * -1);
  border-radius: var(--radius-sm);
  background-color: currentColor;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-short-3) var(--easing-standard);
}
.same-icon-button:hover::before {
  opacity: var(--opacity-hover);
}
.same-icon-button:focus-visible::before {
  opacity: var(--opacity-focus);
}
.same-icon-button:active::before {
  opacity: var(--opacity-pressed);
}

.same-icon-button__icon {
  position: relative;
  width: var(--icon-size);
  height: var(--icon-size);
}

.same-icon-button:focus {
  outline: none;
}
.same-icon-button:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

/* Standard: no container (its 1px border is transparent so the size never shifts).
 * Selected (a toggle that is on) gets the neutral container plus a 1px outline border. */
.same-icon-button--standard {
  border-color: transparent;
}
.same-icon-button--standard.same-icon-button--selected {
  border-color: var(--outline);
  background-color: var(--primary-container);
  color: var(--on-primary-container);
}

/* Outlined: 1px control border. Selected fills with primary. */
.same-icon-button--outlined {
  border-color: var(--outline);
}
.same-icon-button--outlined.same-icon-button--selected {
  border-color: var(--primary);
  background-color: var(--primary);
  color: var(--on-primary);
}

/* Disabled: Material's 38% content / 12% container, as resolved tokens. */
.same-icon-button:disabled {
  cursor: default;
  pointer-events: none;
  color: var(--on-surface-disabled);
}
.same-icon-button:disabled::before {
  opacity: 0;
}
.same-icon-button--outlined:disabled {
  border-color: var(--surface-disabled);
}
.same-icon-button--selected:disabled {
  border-color: transparent;
  background-color: var(--surface-disabled);
}

@media (prefers-reduced-motion: reduce) {
  .same-icon-button,
  .same-icon-button::before {
    transition: none;
  }
}

/* =====================================================================
 * Link
 * Inline: it inherits the surrounding font, so it works inside any text
 * style. Never the type-style class of its own.
 * =================================================================== */

.same-link {
  border-radius: var(--radius-sm);
  color: var(--link);
  font: inherit;
  text-decoration-line: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: var(--border-width);
  text-underline-offset: 0.2em;
  text-decoration-skip-ink: auto;
  cursor: pointer;
  transition: text-decoration-thickness var(--duration-short-3) var(--easing-standard);
}
/* A visited link looks the same: SAME's links do not use colour for history. */
.same-link:visited {
  color: var(--link);
}
.same-link:hover {
  text-decoration-thickness: var(--border-width-strong);
}
.same-link:focus {
  outline: none;
}
.same-link:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.same-link__icon {
  display: inline-block;
  width: 1.125em;
  height: 1.125em;
  margin-left: var(--space-1);
  vertical-align: -0.2em;
  fill: currentColor;
}

/* Read by screen readers only. */
.same-link__note {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .same-link {
    transition: none;
  }
}

/* =====================================================================
 * MobileMenu
 * =================================================================== */

.same-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  color: var(--on-surface);
  font-family: var(--font-sans);
}

.same-mobile-menu__scrim {
  position: absolute;
  inset: 0;
  background-color: var(--scrim);
  opacity: var(--opacity-scrim);
  animation: same-mobile-menu-fade-in var(--duration-medium-4) var(--easing-standard) both;
}
.same-mobile-menu--closing .same-mobile-menu__scrim {
  animation: same-mobile-menu-fade-out var(--duration-short-4) var(--easing-standard) both;
}

.same-mobile-menu__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: min(360px, calc(100% - var(--space-12)));
  background-color: var(--surface-container-low);
  color: var(--on-surface);
  outline: none;
  animation: same-mobile-menu-enter-end var(--duration-medium-4) var(--easing-emphasized-decelerate) both;
}
.same-mobile-menu--closing .same-mobile-menu__panel {
  animation: same-mobile-menu-exit-end var(--duration-short-4) var(--easing-emphasized-accelerate) both;
}

/* The open edge carries the 8px corners and a 1px line (dark: a higher container and an `outline` line). */
.same-mobile-menu--end .same-mobile-menu__panel {
  right: 0;
  border-left: var(--border-width) solid var(--outline-variant);
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}
.same-mobile-menu--start .same-mobile-menu__panel {
  left: 0;
  border-right: var(--border-width) solid var(--outline-variant);
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  animation-name: same-mobile-menu-enter-start;
}
.same-mobile-menu--start.same-mobile-menu--closing .same-mobile-menu__panel {
  animation-name: same-mobile-menu-exit-start;
}

[data-theme="dark"] .same-mobile-menu__panel {
  background-color: var(--surface-container-high);
}
[data-theme="dark"] .same-mobile-menu--end .same-mobile-menu__panel,
[data-theme="dark"] .same-mobile-menu--start .same-mobile-menu__panel {
  border-color: var(--outline);
}

.same-mobile-menu__top {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
  min-height: var(--top-app-bar-height);
  padding: 0 var(--space-3);
}

.same-mobile-menu__nav {
  flex: 1 1 auto;
  min-height: 0;
  padding: var(--space-1) var(--space-3);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.same-mobile-menu__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.same-mobile-menu__item {
  margin: 0;
  padding: 0;
}
.same-mobile-menu__link {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  color: var(--on-surface);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--duration-short-3) var(--easing-standard);
}
.same-mobile-menu__link:hover {
  background-color: var(--surface-hover);
}
.same-mobile-menu__link:active {
  background-color: var(--surface-pressed);
}
.same-mobile-menu__link:focus {
  outline: none;
}
.same-mobile-menu__link:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

/* Current page: neutral container plus a short bar on the leading edge. */
.same-mobile-menu__link--current,
.same-mobile-menu__link--current:hover,
.same-mobile-menu__link--current:active {
  background-color: var(--primary-container);
  color: var(--on-primary-container);
}
.same-mobile-menu__link--current::before {
  content: "";
  position: absolute;
  top: 50%;
  left: var(--space-1);
  width: var(--space-1);
  height: var(--icon-size);
  border-radius: var(--radius-sm);
  background-color: var(--primary);
  transform: translateY(-50%);
}

.same-mobile-menu__footer {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6) var(--space-6);
  border-top: var(--border-width) solid var(--outline-variant);
}
.same-mobile-menu__action {
  display: block;
}

@keyframes same-mobile-menu-fade-in {
  from { opacity: 0; }
}
@keyframes same-mobile-menu-fade-out {
  to { opacity: 0; }
}
@keyframes same-mobile-menu-enter-end {
  from { transform: translateX(100%); }
}
@keyframes same-mobile-menu-exit-end {
  to { transform: translateX(100%); }
}
@keyframes same-mobile-menu-enter-start {
  from { transform: translateX(-100%); }
}
@keyframes same-mobile-menu-exit-start {
  to { transform: translateX(-100%); }
}
@keyframes same-mobile-menu-panel-fade-in {
  from { opacity: 0; }
}
@keyframes same-mobile-menu-panel-fade-out {
  to { opacity: 0; }
}

/* Reduced motion: no sliding, short fades only. */
@media (prefers-reduced-motion: reduce) {
  .same-mobile-menu__scrim {
    animation-duration: var(--duration-short-3);
  }
  .same-mobile-menu--closing .same-mobile-menu__scrim {
    animation-duration: var(--duration-short-3);
  }
  .same-mobile-menu .same-mobile-menu__panel {
    animation: same-mobile-menu-panel-fade-in var(--duration-short-3) var(--easing-standard) both;
  }
  .same-mobile-menu--closing .same-mobile-menu__panel {
    animation: same-mobile-menu-panel-fade-out var(--duration-short-3) var(--easing-standard) both;
  }
  .same-mobile-menu__link {
    transition: none;
  }
}

/* =====================================================================
 * Header
 * The layout switches on the header's own width (a container query), which
 * is the window width when the header spans the page: below 840px it shows
 * the logo and a menu button; from 840px the navigation and the primary
 * button.
 * =================================================================== */

.same-header-wrap {
  box-sizing: border-box;
  width: 100%;
  container: same-header / inline-size;
}
.same-header-wrap--sticky {
  position: sticky;
  top: 0;
  z-index: 100;
}

.same-header {
  box-sizing: border-box;
  height: var(--top-app-bar-height);
  padding: 0 var(--margin-compact);
  border-bottom: var(--border-width) solid var(--outline-variant);
  background-color: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-sans);
}

.same-header__inner {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  max-width: var(--content-max-width);
  height: 100%;
  margin: 0 auto;
}

.same-header__logo {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: var(--touch-target);
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
}
.same-header__logo:focus {
  outline: none;
}
.same-header__logo:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}
.same-header__logo-image {
  display: block;
  width: auto;
  min-width: var(--logo-min-width);
  height: var(--space-8);
  object-fit: contain;
  object-position: left center;
}
/* Symbol only: a square mark, not the wide horizontal logo, so no logo-min-width. */
.same-header__logo--symbol {
  min-width: var(--touch-target);
}
.same-header__logo-image--symbol {
  min-width: 0;
  height: var(--space-10);
}
.same-header__logo-image--dark {
  display: none;
}
[data-theme="dark"] .same-header__logo-image--light {
  display: none;
}
[data-theme="dark"] .same-header__logo-image--dark {
  display: block;
}

/* Compact: logo and menu button only. */
.same-header__nav,
.same-header__actions {
  display: none;
}
.same-header__menu-button {
  margin-left: auto;
}

.same-header__list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.same-header__item {
  display: flex;
  margin: 0;
  padding: 0;
}
.same-header__link {
  position: relative;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  height: var(--button-height);
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--on-surface);
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--duration-short-3) var(--easing-standard);
}
/* 48px touch target around the 40px link. */
.same-header__link::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: var(--touch-target);
  transform: translateY(-50%);
}
.same-header__link:hover {
  background-color: var(--surface-hover);
}
.same-header__link:active {
  background-color: var(--surface-pressed);
}
.same-header__link:focus {
  outline: none;
}
.same-header__link:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}
/* Current page: a 2px bar under the label, never colour alone. */
.same-header__link--current::before {
  content: "";
  position: absolute;
  right: var(--space-3);
  bottom: 0;
  left: var(--space-3);
  height: var(--border-width-strong);
  background-color: var(--primary);
}

@container same-header (min-width: 600px) {
  .same-header {
    padding: 0 var(--margin-medium);
  }
}
@container same-header (min-width: 840px) {
  .same-header {
    padding: 0 var(--margin-expanded);
  }
  .same-header__nav {
    display: block;
    margin-left: var(--space-8);
  }
  .same-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-left: auto;
  }
  .same-header__menu-button {
    display: none;
  }
}
@container same-header (min-width: 1200px) {
  .same-header {
    padding: 0 var(--margin-large);
  }
}

@media (prefers-reduced-motion: reduce) {
  .same-header__link {
    transition: none;
  }
}

/* =====================================================================
 * Section
 * =================================================================== */

.same-section {
  box-sizing: border-box;
  width: 100%;
  padding-block: var(--space-12);
  background-color: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-sans);
}
.same-section--grey {
  background-color: var(--surface-section-alt);
}
/* Dark band: the element carries data-theme="dark", so --surface is Deep Blue here. */
.same-section--dark {
  background-color: var(--surface);
}
/* On a dark page a Deep Blue band would vanish: use the slightly lighter band. */
[data-theme="dark"] .same-section--dark {
  background-color: var(--surface-section-alt);
}

/* Inner container: content-max-width, centred, page margin per window size. */
.same-section__inner {
  box-sizing: border-box;
  width: 100%;
  max-width: calc(var(--content-max-width) + 2 * var(--margin-large));
  margin-inline: auto;
  padding-inline: var(--margin-compact);
}

.same-section__header {
  margin-bottom: var(--space-8);
}
.same-section__header:last-child {
  margin-bottom: 0;
}

.same-section__eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--on-surface-variant);
  text-transform: uppercase;
}

.same-section__title {
  max-width: 28em;
  margin: 0;
  color: var(--on-surface);
}

.same-section__intro {
  max-width: 70ch;
  margin: var(--space-4) 0 0;
  color: var(--on-surface-variant);
}

.same-section__body {
  min-width: 0;
}

@media (min-width: 600px) {
  .same-section { padding-block: var(--space-16); }
  .same-section__inner { padding-inline: var(--margin-medium); }
}
@media (min-width: 840px) {
  .same-section__inner { padding-inline: var(--margin-expanded); }
}
@media (min-width: 1200px) {
  .same-section { padding-block: var(--space-20); }
  .same-section__inner { padding-inline: var(--margin-large); }
}
@media (min-width: 1600px) {
  .same-section__inner { padding-inline: var(--margin-extra-large); }
}

/* Hero spacing: one step up. */
.same-section--hero { padding-block: var(--space-16); }
@media (min-width: 600px) {
  .same-section--hero { padding-block: var(--space-20); }
}
@media (min-width: 1200px) {
  .same-section--hero { padding-block: var(--space-24); }
}

/* =====================================================================
 * Card
 * =================================================================== */

.same-card {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-md);
  background-color: var(--surface-container-lowest);
  color: var(--on-surface);
  font-family: var(--font-sans);
  transition: background-color var(--duration-short-3) var(--easing-standard);
}
/* The line shows on white (and dark) sections; on Light Grey bands the white card needs none. */
.same-card--outlined {
  border-color: var(--outline-variant);
}
.same-section--grey .same-card--outlined {
  border-color: transparent;
}

.same-card__media {
  box-sizing: border-box;
  flex: none;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin: calc(var(--border-width) * -1) calc(var(--border-width) * -1) 0;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  background-color: var(--surface-container-high);
}
.same-card__media > img,
.same-card__media > picture,
.same-card__media > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.same-card__content {
  box-sizing: border-box;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
}

.same-card__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.same-card__eyebrow {
  margin: 0;
  color: var(--on-surface-variant);
  text-transform: uppercase;
}

.same-card__title {
  margin: 0;
  color: var(--on-surface);
}

.same-card__body {
  color: var(--on-surface-variant);
}
.same-card__body > * {
  margin: 0;
}
.same-card__body > * + * {
  margin-top: var(--space-3);
}

/* Actions sit at the bottom, so cards in a row line up; above the stretched link. */
.same-card__actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-3);
}

/* Whole-card link: the title link stretches over the card. */
.same-card--link {
  cursor: pointer;
}
.same-card--link:hover {
  background-color: var(--surface-hover);
}
.same-card--link:active {
  background-color: var(--surface-pressed);
}
/* On a Light Grey band the white card keeps its colour on hover (the hover overlay would vanish). */
.same-section--grey .same-card--link:hover,
.same-section--grey .same-card--link:active {
  background-color: var(--surface-container-lowest);
}
.same-card__link {
  color: inherit;
  text-decoration: none;
}
.same-card--link:hover .same-card__link,
.same-card__link:hover,
.same-card__link:focus-visible {
  text-decoration: underline;
}
.same-card__link::after {
  content: "";
  position: absolute;
  inset: calc(var(--border-width) * -1);
  border-radius: var(--radius-md);
}
.same-card__link:focus {
  outline: none;
}
.same-card__link:focus-visible::after {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

@media (prefers-reduced-motion: reduce) {
  .same-card {
    transition: none;
  }
}

/* =====================================================================
 * Divider
 * =================================================================== */

.same-divider {
  box-sizing: border-box;
  flex: none;
  margin: 0;
  border: 0;
  background-color: var(--outline-variant);
}
.same-divider--horizontal {
  display: block;
  width: auto;
  height: var(--border-width);
}
.same-divider--vertical {
  display: block;
  align-self: stretch;
  width: var(--border-width);
  height: auto;
  min-height: var(--space-6);
}
.same-divider--horizontal.same-divider--inset-start {
  margin-inline-start: var(--space-4);
}
.same-divider--horizontal.same-divider--inset-middle {
  margin-inline: var(--space-4);
}
.same-divider--vertical.same-divider--inset-start {
  margin-block-start: var(--space-4);
}
.same-divider--vertical.same-divider--inset-middle {
  margin-block: var(--space-4);
}

/* =====================================================================
 * Footer
 * =================================================================== */

.same-footer {
  box-sizing: border-box;
  width: 100%;
  padding-block: var(--space-12);
  background-color: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-sans);
}
/* On a dark page the footer takes the slightly lighter band, so it still reads as its own band. */
[data-theme="dark"] .same-footer {
  background-color: var(--surface-section-alt);
}

.same-footer__inner {
  box-sizing: border-box;
  width: 100%;
  max-width: calc(var(--content-max-width) + 2 * var(--margin-large));
  margin-inline: auto;
  padding-inline: var(--margin-compact);
}

.same-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-10) var(--pane-gap);
}

.same-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  min-width: 0;
}

.same-footer__logo {
  display: inline-block;
  align-self: flex-start;
  min-height: var(--touch-target);
  color: inherit;
}
.same-footer__logo-img {
  display: block;
  height: var(--space-10);
  width: auto;
  min-width: var(--logo-min-width);
  object-fit: contain;
  object-position: left center;
}
a.same-footer__logo:focus {
  outline: none;
}
a.same-footer__logo:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-sm);
}

.same-footer__heading {
  margin: 0 0 var(--space-2);
  color: var(--on-surface);
}

.same-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.same-footer__nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-8) var(--space-6);
  align-content: start;
  min-width: 0;
}
.same-footer__column {
  min-width: 0;
}

.same-footer__link {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  min-height: var(--touch-target);
  color: var(--on-surface);
  text-decoration: none;
}
.same-footer__link:hover {
  text-decoration: underline;
}
.same-footer__link:focus {
  outline: none;
}
.same-footer__link:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: calc(var(--focus-ring-offset) * -1);
  border-radius: var(--radius-sm);
}

.same-footer__contact-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-sizing: border-box;
  min-height: var(--touch-target);
  color: var(--on-surface);
}
.same-footer__contact-icon {
  width: var(--icon-size);
  height: var(--icon-size);
}
.same-footer__contact-text {
  min-width: 0;
}

.same-footer__bottom {
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: var(--border-width) solid var(--outline-variant);
}
.same-footer__legal {
  min-width: 0;
  color: var(--on-surface-variant);
}

@media (min-width: 600px) {
  .same-footer { padding-block: var(--space-16); }
  .same-footer__inner { padding-inline: var(--margin-medium); }
}
@media (min-width: 840px) {
  .same-footer__inner { padding-inline: var(--margin-expanded); }
  .same-footer__top { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
}
@media (min-width: 1200px) {
  .same-footer { padding-block: var(--space-20); }
  .same-footer__inner { padding-inline: var(--margin-large); }
}
@media (min-width: 1600px) {
  .same-footer__inner { padding-inline: var(--margin-extra-large); }
}

/* =====================================================================
 * Select
 * Built on the TextField box (.same-field*): same label, 56px control,
 * border, error and disabled rules. The field is a button (role="combobox");
 * its menu (role="listbox") hangs under the box: flat, 1px line, 4px corners.
 * =================================================================== */

.same-select__input {
  display: flex;
  align-items: center;
  /* Room for the 24px chevron at the right. */
  padding-right: calc(var(--space-4) + var(--icon-size) + var(--space-3));
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.same-select__value {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* The placeholder reads as a hint until a real option is chosen. */
.same-select__value--placeholder {
  color: var(--on-surface-placeholder);
}

/* The chevron sits over the field and never takes the click. Open, it turns
 * half a circle and reads as "expand_less". */
.same-select__icon {
  position: absolute;
  top: 50%;
  right: var(--space-4);
  width: var(--icon-size);
  height: var(--icon-size);
  margin-top: calc(var(--icon-size) / -2);
  fill: currentColor;
  color: var(--on-surface-variant);
  pointer-events: none;
  transition: transform var(--duration-short-3) var(--easing-standard);
}
.same-select--open .same-select__icon {
  transform: rotate(180deg);
}

/* Open: the field keeps its focused border while its menu shows. */
.same-select--open .same-field__control::after {
  border-width: var(--border-width-strong);
  border-color: var(--focus-ring);
}

/* The menu: same width as the field, a small gap under it (above it when
 * there is no room below), surface-container fill and a 1px decorative line
 * instead of an elevation shadow. */
.same-select__menu {
  position: absolute;
  top: calc(100% + var(--space-1));
  left: 0;
  right: 0;
  z-index: 10;
  box-sizing: border-box;
  /* Six and a half options: the half option says the list scrolls. */
  max-height: calc(var(--touch-target) * 6.5 + var(--space-1));
  margin: 0;
  padding: var(--space-1);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: var(--border-width) solid var(--outline-variant);
  border-radius: var(--radius-sm);
  background-color: var(--surface-container);
  color: var(--on-surface);
  outline: none;
  animation: same-select-menu-in var(--duration-medium-1) var(--easing-emphasized-decelerate);
}
.same-select__menu[hidden] {
  display: none;
}
.same-select__menu--above {
  top: auto;
  bottom: calc(100% + var(--space-1));
  animation-name: same-select-menu-in-above;
}

.same-select__group + .same-select__group {
  margin-top: var(--space-1);
  padding-top: var(--space-1);
  border-top: var(--border-width) solid var(--outline-variant);
}
.same-select__group-label {
  padding: var(--space-3) calc(var(--space-4) - var(--space-1) - var(--border-width)) var(--space-1);
  color: var(--on-surface-variant);
}

/* An option: 48px, text lined up with the field's text (border + menu
 * padding + its own padding = space-4), check lined up with the chevron. */
.same-select__option {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--touch-target);
  padding: var(--space-2) calc(var(--space-4) - var(--space-1) - var(--border-width));
  border-radius: var(--radius-sm);
  color: var(--on-surface);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--duration-short-3) var(--easing-standard);
}
.same-select__option-text {
  flex: 1 1 auto;
  min-width: 0;
}
.same-select__check {
  width: var(--icon-size);
  height: var(--icon-size);
}

/* Hover and the option the keyboard is on share the hover fill; pressed goes
 * one step darker. Opened with the mouse, nothing is highlighted until hovered. */
.same-select__option:not(.same-select__option--disabled):hover,
.same-select__menu--keyboard .same-select__option--active {
  background-color: var(--surface-hover);
}
.same-select__option:not(.same-select__option--disabled):active {
  background-color: var(--surface-pressed);
}
/* Keyboard: the active option also draws the focus ring, inside the menu. */
.same-select__menu--keyboard .same-select__option--active {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: calc(var(--focus-ring-width) * -1);
}

/* Selected: the neutral container, Medium weight and the check, so the
 * choice never rests on colour alone. Hover and press overlay its on-colour. */
.same-select__option--selected,
.same-select__option--selected:not(.same-select__option--disabled):hover,
.same-select__menu--keyboard .same-select__option--selected.same-select__option--active,
.same-select__option--selected:not(.same-select__option--disabled):active {
  background-color: var(--primary-container);
  color: var(--on-primary-container);
  font-weight: 500;
}
.same-select__option--selected::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  background-color: currentColor;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-short-3) var(--easing-standard);
}
.same-select__option--selected:hover::before,
.same-select__menu--keyboard .same-select__option--selected.same-select__option--active::before {
  opacity: var(--opacity-hover);
}
.same-select__option--selected:active::before {
  opacity: var(--opacity-pressed);
}

.same-select__option--disabled {
  color: var(--on-surface-disabled);
  cursor: default;
}

.same-field--disabled .same-select__input {
  cursor: default;
}
.same-field--disabled .same-select__icon,
.same-field--disabled .same-select__value--placeholder {
  color: var(--on-surface-disabled);
}

@keyframes same-select-menu-in {
  from { opacity: 0; transform: translateY(calc(var(--space-2) * -1)); }
}
@keyframes same-select-menu-in-above {
  from { opacity: 0; transform: translateY(var(--space-2)); }
}
@keyframes same-select-menu-fade-in {
  from { opacity: 0; }
}

/* Reduced motion: no movement, a short fade. */
@media (prefers-reduced-motion: reduce) {
  .same-select__icon,
  .same-select__option,
  .same-select__option--selected::before {
    transition: none;
  }
  .same-select__menu,
  .same-select__menu--above {
    animation: same-select-menu-fade-in var(--duration-short-3) var(--easing-linear);
  }
}

/* =====================================================================
 * Checkbox
 * Layout: a 48px target (native input, state layer, 18px box) beside the
 * label. The input is transparent and covers the whole target.
 * =================================================================== */

.same-checkbox {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-family: var(--font-sans);
  color: var(--on-surface);
}

.same-checkbox__row {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.same-checkbox__target {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target);
  height: var(--touch-target);
}

.same-checkbox__input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

/* State layer: 40px square, 4px corners (SAME has no round shapes here). */
.same-checkbox__layer {
  position: absolute;
  inset: var(--space-1);
  border-radius: var(--radius-sm);
  background-color: var(--on-surface);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-short-3) var(--easing-standard);
}
.same-checkbox__input:checked ~ .same-checkbox__layer,
.same-checkbox__input:indeterminate ~ .same-checkbox__layer {
  background-color: var(--primary);
}
.same-checkbox--error .same-checkbox__layer {
  background-color: var(--error);
}

.same-checkbox__row:hover .same-checkbox__input:enabled ~ .same-checkbox__layer {
  opacity: var(--opacity-hover);
}
.same-checkbox__input:enabled:focus-visible ~ .same-checkbox__layer {
  opacity: var(--opacity-focus);
}
.same-checkbox__row:active .same-checkbox__input:enabled ~ .same-checkbox__layer {
  opacity: var(--opacity-pressed);
}

/* The 18px box. */
.same-checkbox__box {
  position: relative;
  box-sizing: border-box;
  width: var(--icon-size-small);
  height: var(--icon-size-small);
  border: var(--border-width-strong) solid var(--outline);
  border-radius: var(--radius-sm);
  background-color: transparent;
  color: var(--on-primary);
  transition:
    background-color var(--duration-short-3) var(--easing-standard),
    border-color var(--duration-short-3) var(--easing-standard);
}
.same-checkbox__row:hover .same-checkbox__input:enabled ~ .same-checkbox__box {
  border-color: var(--on-surface);
}

/* The mark covers the whole 18px box, borders included. */
.same-checkbox__mark {
  position: absolute;
  top: calc(var(--border-width-strong) * -1);
  left: calc(var(--border-width-strong) * -1);
  width: var(--icon-size-small);
  height: var(--icon-size-small);
  opacity: 0;
  fill: currentColor;
}
.same-checkbox__dash {
  display: none;
}

.same-checkbox__input:checked ~ .same-checkbox__box,
.same-checkbox__input:indeterminate ~ .same-checkbox__box,
.same-checkbox__row:hover .same-checkbox__input:checked:enabled ~ .same-checkbox__box,
.same-checkbox__row:hover .same-checkbox__input:indeterminate:enabled ~ .same-checkbox__box {
  border-color: var(--primary);
  background-color: var(--primary);
}
.same-checkbox__input:checked ~ .same-checkbox__box .same-checkbox__mark,
.same-checkbox__input:indeterminate ~ .same-checkbox__box .same-checkbox__mark {
  opacity: 1;
}
.same-checkbox__input:indeterminate ~ .same-checkbox__box .same-checkbox__check {
  display: none;
}
.same-checkbox__input:indeterminate ~ .same-checkbox__box .same-checkbox__dash {
  display: inline;
}

/* Keyboard focus: the 2px focus ring around the box. */
.same-checkbox__input:focus-visible ~ .same-checkbox__box {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.same-checkbox__label {
  min-width: 0;
  padding: var(--space-3) var(--space-2) var(--space-3) var(--space-1);
  color: var(--on-surface);
}
.same-checkbox__required {
  color: var(--on-surface-variant);
}

/* Helper or error text sits under the label, in line with it. */
.same-checkbox__support {
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
  margin-top: calc(var(--space-2) * -1);
  padding-bottom: var(--space-2);
  padding-left: calc(var(--touch-target) + var(--space-1));
  color: var(--on-surface-variant);
}
.same-checkbox__support-text {
  min-width: 0;
}
.same-checkbox__error-icon {
  flex: none;
  width: var(--icon-size-small);
  height: var(--icon-size-small);
  fill: currentColor;
}

/* Error: box, state layer, icon and message in `error`. The icon and the
 * words carry the meaning, never the colour alone. */
.same-checkbox--error .same-checkbox__box,
.same-checkbox--error .same-checkbox__row:hover .same-checkbox__input:enabled ~ .same-checkbox__box {
  border-color: var(--error);
}
.same-checkbox--error .same-checkbox__input:checked ~ .same-checkbox__box,
.same-checkbox--error .same-checkbox__input:indeterminate ~ .same-checkbox__box,
.same-checkbox--error .same-checkbox__row:hover .same-checkbox__input:checked:enabled ~ .same-checkbox__box,
.same-checkbox--error .same-checkbox__row:hover .same-checkbox__input:indeterminate:enabled ~ .same-checkbox__box {
  border-color: var(--error);
  background-color: var(--error);
  color: var(--on-error);
}
.same-checkbox--error .same-checkbox__support {
  color: var(--error);
}

/* Disabled: Material's 38% content, as a resolved token. */
.same-checkbox--disabled .same-checkbox__row,
.same-checkbox--disabled .same-checkbox__input {
  cursor: default;
}
.same-checkbox--disabled .same-checkbox__label,
.same-checkbox--disabled .same-checkbox__required,
.same-checkbox--disabled .same-checkbox__support {
  color: var(--on-surface-disabled);
}
.same-checkbox--disabled .same-checkbox__box {
  border-color: var(--on-surface-disabled);
}
.same-checkbox--disabled .same-checkbox__input:checked ~ .same-checkbox__box,
.same-checkbox--disabled .same-checkbox__input:indeterminate ~ .same-checkbox__box {
  border-color: var(--on-surface-disabled);
  background-color: var(--on-surface-disabled);
  color: var(--surface);
}

@media (prefers-reduced-motion: reduce) {
  .same-checkbox__layer,
  .same-checkbox__box {
    transition: none;
  }
}

/* =====================================================================
 * Snackbar
 * =================================================================== */

/* The live region. Fixed at the bottom of the window unless `inline`. It takes
 * no clicks itself, so it never blocks the page behind it. */
.same-snackbar-region {
  position: fixed;
  left: var(--space-4);
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 1000;
  display: flex;
  justify-content: center;
  pointer-events: none;
  font-family: var(--font-sans);
}
.same-snackbar-region--inline {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: auto;
  justify-content: flex-start;
}

.same-snackbar {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  min-height: var(--touch-target);
  max-width: 100%;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-sm);
  background-color: var(--inverse-surface);
  color: var(--inverse-on-surface);
  pointer-events: auto;
  animation: same-snackbar-in var(--duration-medium-1) var(--easing-emphasized-decelerate);
}
@media (min-width: 600px) {
  .same-snackbar {
    min-width: 344px;
    max-width: 560px;
  }
}

.same-snackbar--action {
  padding-right: var(--space-2);
}
.same-snackbar--close {
  padding-right: var(--space-1);
}

.same-snackbar__message {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: var(--space-2) 0;
  color: var(--inverse-on-surface);
  overflow-wrap: anywhere;
}

/* Action: a text button in inverse-primary. */
.same-snackbar__action {
  position: relative;
  box-sizing: border-box;
  flex: none;
  min-width: var(--touch-target);
  height: var(--touch-target);
  margin: 0;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: var(--radius-sm);
  background-color: transparent;
  color: var(--inverse-primary);
  font-family: var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Close: a 48px target around a 24px icon. */
.same-snackbar__close {
  position: relative;
  box-sizing: border-box;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target);
  height: var(--touch-target);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background-color: transparent;
  color: var(--inverse-on-surface);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.same-snackbar__close-icon {
  position: relative;
  width: var(--icon-size);
  height: var(--icon-size);
  fill: currentColor;
}

/* State layer for both buttons: currentColor at the Material opacities. */
.same-snackbar__action::before,
.same-snackbar__close::before {
  content: "";
  position: absolute;
  inset: var(--space-1) 0;
  border-radius: var(--radius-sm);
  background-color: currentColor;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-short-3) var(--easing-standard);
}
.same-snackbar__close::before {
  inset: var(--space-1);
}

.same-snackbar__action-label {
  position: relative;
}
.same-snackbar__action:hover::before,
.same-snackbar__close:hover::before {
  opacity: var(--opacity-hover);
}
.same-snackbar__action:focus-visible::before,
.same-snackbar__close:focus-visible::before {
  opacity: var(--opacity-focus);
}
.same-snackbar__action:active::before,
.same-snackbar__close:active::before {
  opacity: var(--opacity-pressed);
}

/* Focus ring in inverse-on-surface: the normal focus-ring colour is the same
 * Deep Blue (or Light Grey) as the container and would vanish on it. */
.same-snackbar__action:focus,
.same-snackbar__close:focus {
  outline: none;
}
.same-snackbar__action:focus-visible,
.same-snackbar__close:focus-visible {
  outline: var(--focus-ring-width) solid var(--inverse-on-surface);
  outline-offset: calc(var(--focus-ring-offset) * -1);
}

/* Phone width (Material): the action drops under a long message, right-aligned. */
@media (max-width: 599px) {
  .same-snackbar--action {
    flex-wrap: wrap;
    row-gap: 0;
  }
  /* The message only wraps the action onto a second line when it needs the room. */
  .same-snackbar--action .same-snackbar__message {
    flex: 1 1 12rem;
  }
  .same-snackbar--action .same-snackbar__action {
    margin-left: auto;
  }
}

@keyframes same-snackbar-in {
  from { opacity: 0; transform: translateY(var(--space-2)); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .same-snackbar {
    animation: none;
  }
  .same-snackbar__action::before,
  .same-snackbar__close::before {
    transition: none;
  }
}
