:root {
  --upload-container: 1238px;
  --upload-border: #101010;
  --upload-muted: #676767;
  --upload-gray: #d9d9d9;
}

body {
  background: var(--white);
}

.upload-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--white);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  height: 65px;
  display: flex;
  justify-content: center;
  background: var(--accent);
}

.site-header__inner {
  width: min(calc(100% - 40px), 800px);
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--black);
}

.site-header__logo {
  width: 92px;
  height: 45px;
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
}

.site-header__logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.site-header__logo::before {
  content: none;
}

.site-nav {
  height: 25px;
  display: flex;
  align-items: center;
  gap: 48px;
  color: var(--white);
  font-size: 14px;
  line-height: 1.1;
  white-space: nowrap;
}

.site-nav a,
.account-pill,
.upload-article,
.upload-file__remove,
.catalog-card__button,
.footer-mini a,
.burger-button,
.mobile-menu__panel a {
  transition: color var(--transition), background-color var(--transition), border-color var(--transition), opacity var(--transition), transform var(--transition);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  opacity: 0.75;
}

.account-pill {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 5px 5px 12px;
  border: 1px solid var(--black);
  border-radius: 30px;
  color: var(--white);
  background: var(--black);
  font-size: 16px;
  white-space: nowrap;
}

.account-pill:hover,
.account-pill:focus-visible {
  background: var(--black);
  border-color: var(--black);
}

.account-pill__icon {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--black);
  background: var(--white);
  line-height: 1;
  transition: color var(--transition), background-color var(--transition);
}

.account-pill:hover .account-pill__icon,
.account-pill:focus-visible .account-pill__icon {
  color: var(--white);
  background: var(--accent);
}

.menu-toggle,
.burger-button,
.mobile-menu {
  display: none;
}

.upload-main {
  flex: 1;
  padding: 91px 0 116px;
}

.upload-main__inner {
  width: min(calc(100% - 80px), var(--upload-container));
  margin-inline: auto;
}

.upload-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.upload-step {
  min-height: 51px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--black);
}

.upload-step.is-active {
  padding: 0 17px 0 10px;
  border: 1px solid var(--accent);
  border-radius: 26px;
  color: var(--accent);
}

.upload-step__num {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: inherit;
  font-size: 18px;
  line-height: 1;
}

.upload-stepper__line {
  width: 15px;
  height: 1px;
  flex: 0 0 auto;
  background: var(--black);
}

.upload-main__row {
  display: grid;
  grid-template-columns: minmax(0, 786px) 426px;
  gap: 23px;
  align-items: end;
  margin-top: 37px;
}

.upload-intro h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
}

.upload-intro p {
  margin: 13px 0 0;
  font-size: 24px;
  line-height: 1.08;
}

.upload-article {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 28px;
  border: 2px solid var(--upload-border);
  border-radius: 13px;
  color: var(--upload-muted);
  background: var(--white);
  font-size: 16px;
  line-height: 1.1;
  transform: translateY(7px);
}

.upload-article:hover,
.upload-article:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.upload-article__icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid var(--upload-border);
  border-radius: 50%;
  color: var(--upload-border);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.upload-main__grid {
  display: grid;
  grid-template-columns: minmax(0, 786px) 426px;
  gap: 23px;
  align-items: start;
  margin-top: 22px;
}

.upload-workspace {
  min-width: 0;
}

.upload-dropzone {
  height: 151px;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 34px 114px;
  border: 2px solid var(--upload-border);
  border-radius: 13px;
  background: #f3f3f3;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.upload-dropzone.is-dragging,
.upload-dropzone:focus-visible {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 4px rgba(48, 61, 181, 0.12);
}

.upload-dropzone__icon {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--upload-border);
  background: var(--white);
}

.upload-dropzone__copy h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 700;
}

.upload-dropzone__copy p {
  margin: 7px 0 0;
  color: var(--upload-muted);
  font-size: 20px;
  line-height: 1.1;
}

.upload-files {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 9px;
}

.upload-file {
  position: relative;
  height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 9px 27px 9px 9px;
  border: 2px solid var(--upload-border);
  border-radius: 13px;
  background: var(--white);
}

.upload-file--progress {
  height: 102px;
  padding-bottom: 28px;
}

.upload-file__main {
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.upload-file__icon {
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #454545;
  background: #e2e2e2;
  font-size: 18px;
  line-height: 1;
}

.upload-file__icon--active {
  color: var(--white);
  background: var(--accent);
}

.upload-file__copy {
  min-width: 0;
}

.upload-file__copy h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.upload-file__copy p {
  margin: 6px 0 0;
  color: var(--upload-muted);
  font-size: 16px;
  line-height: 1.1;
}

.upload-file__remove {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: var(--upload-border);
  background: transparent;
}

.upload-file__remove:hover,
.upload-file__remove:focus-visible {
  color: var(--danger);
}

.upload-file__progress {
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 9px;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--upload-gray);
}

.upload-file__progress span {
  display: block;
  width: 27%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.upload-actions {
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  margin-top: 23px;
}

.upload-actions .btn-outline,
.upload-actions .pill {
  min-height: 32px;
  padding: 6px 28px;
  border-radius: 18px;
  font-size: 16px;
  line-height: 1;
}

.upload-actions .btn-outline {
  border: 2px solid var(--upload-border);
  color: var(--upload-border);
}

.upload-actions .btn-outline:hover,
.upload-actions .btn-outline:focus-visible {
  color: var(--white);
  background: var(--upload-border);
}

.upload-actions .pill {
  border: 2px solid var(--accent);
}

.upload-actions__back {
  min-width: 150px;
}

.upload-actions__next {
  min-width: 207px;
}

.catalog-panel {
  min-width: 0;
}

.catalog-panel__head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border: 2px solid var(--upload-border);
  border-radius: 13px;
  background: var(--white);
}

.catalog-panel__head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 700;
}

.catalog-panel__arrow {
  color: var(--upload-border);
  font-size: 32px;
  line-height: 1;
}

.catalog-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 8px;
  margin-top: 16px;
}

.catalog-card {
  min-height: 307px;
  display: flex;
  flex-direction: column;
  padding: 12px;
  border: 2px solid var(--upload-border);
  border-radius: 13px;
  background: var(--white);
}

.catalog-card__media {
  width: 100%;
  height: 138px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--upload-gray);
}

.catalog-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.catalog-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding-top: 16px;
}

.catalog-card__title {
  max-width: 160px;
  margin: 0;
  font-size: 17px;
  line-height: 1.05;
  font-weight: 400;
}

.catalog-card__price {
  margin: 10px 0 0;
  color: var(--upload-border);
  font-size: 18px;
  line-height: 1.1;
}

.catalog-card__button {
  width: 100%;
  min-height: 32px;
  margin-top: auto;
  padding: 6px 10px;
  border: 2px solid var(--accent);
  border-radius: 18px;
  color: var(--accent);
  background: var(--white);
  font-size: 16px;
  line-height: 1;
}

.catalog-card__button:hover,
.catalog-card__button:focus-visible {
  color: var(--white);
  background: var(--accent);
}

.catalog-card--added .catalog-card__button:disabled {
  border-color: var(--upload-border);
  color: var(--upload-border);
  background: var(--white);
  opacity: 1;
  cursor: default;
}

.footer-mini {
  min-height: 102px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 0;
  color: var(--white);
  background: var(--black);
}

.footer-mini__inner {
  width: min(calc(100% - 80px), var(--upload-container));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  line-height: 1.1;
  text-align: center;
}

.footer-mini a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-mini a:hover,
.footer-mini a:focus-visible {
  color: var(--white);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 1280px) {
  :root {
    --upload-container: 1080px;
  }

  .site-nav {
    gap: 48px;
  }

  .upload-main__row,
  .upload-main__grid {
    grid-template-columns: minmax(0, 1fr) 390px;
  }

  .upload-dropzone {
    padding-inline: 72px;
  }
}

@media (max-width: 1100px) {
  .site-header__inner,
  .upload-main__inner,
  .footer-mini__inner {
    width: min(calc(100% - 48px), 920px);
  }

  .site-header__inner {
    width: min(calc(100% - 40px), 800px);
  }

  .site-nav {
    gap: 48px;
    font-size: 14px;
  }

  .upload-main__row,
  .upload-main__grid {
    grid-template-columns: 1fr;
  }

  .upload-article {
    width: min(100%, 426px);
  }

  .catalog-panel {
    max-width: 426px;
  }
}

@media (max-width: 768px) {
  .site-header {
    height: 58px;
  }

  .site-header__inner {
    width: calc(100% - 24px);
    height: 58px;
  }

  .site-header__logo {
    width: 82px;
    height: 40px;
  }

  .site-header__logo::before {
    font-size: 34px;
    line-height: 1.1;
  }

  .site-nav,
  .account-pill {
    display: none;
  }

  .menu-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .burger-button {
    position: relative;
    z-index: 12;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
  }

  .burger-button span {
    position: absolute;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--white);
    transition: transform 240ms ease, opacity 180ms ease, top 240ms ease;
  }

  .burger-button span:nth-child(1) {
    top: 14px;
  }

  .burger-button span:nth-child(2) {
    top: 20px;
  }

  .burger-button span:nth-child(3) {
    top: 26px;
  }

  .menu-toggle:checked + .burger-button {
    background: var(--black);
  }

  .menu-toggle:checked + .burger-button span:nth-child(1) {
    top: 20px;
    transform: rotate(45deg);
  }

  .menu-toggle:checked + .burger-button span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle:checked + .burger-button span:nth-child(3) {
    top: 20px;
    transform: rotate(-45deg);
  }

  .mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 11;
    display: block;
    visibility: hidden;
    opacity: 0;
    padding: 98px 24px 40px;
    background: var(--white);
    transform: translateY(-10px);
    transition: opacity 240ms ease, visibility 240ms ease, transform 240ms ease;
  }

  .menu-toggle:checked ~ .mobile-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .mobile-menu__panel {
    min-height: calc(100vh - 138px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    color: var(--black);
    font-family: var(--font-heading);
    font-size: 28px;
    line-height: 1;
    text-align: center;
  }

  .mobile-menu__panel a:hover,
  .mobile-menu__panel a:focus-visible {
    color: var(--accent);
    transform: translateY(-1px);
  }

  .mobile-menu__account {
    color: inherit;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
  }

  .upload-main {
    padding: 82px 0 56px;
  }

  .upload-main__inner,
  .footer-mini__inner {
    width: calc(100% - 24px);
  }

  .upload-stepper {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 3px;
    font-size: 15px;
    scrollbar-width: none;
  }

  .upload-stepper::-webkit-scrollbar {
    display: none;
  }

  .upload-step {
    min-height: 42px;
  }

  .upload-step__num {
    width: 26px;
    height: 26px;
    font-size: 15px;
  }

  .upload-main__row {
    margin-top: 24px;
  }

  .upload-intro h1 {
    font-size: 26px;
  }

  .upload-intro p {
    font-size: 18px;
  }

  .upload-dropzone {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 14px;
    padding: 24px 18px;
    text-align: center;
  }

  .upload-file,
  .upload-file--progress {
    padding-right: 14px;
  }

  .upload-actions {
    gap: 10px;
  }

  .upload-actions .btn-outline,
  .upload-actions .pill {
    flex: 1 1 0;
    min-width: 0;
  }

  .catalog-panel {
    max-width: none;
  }
}

@media (max-width: 520px) {
  .upload-stepper {
    gap: 10px;
  }

  .upload-step span:last-child {
    max-width: 130px;
    white-space: normal;
  }

  .upload-article {
    padding-inline: 16px;
    font-size: 14px;
  }

  .upload-file__main {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .upload-file__icon {
    width: 48px;
    height: 48px;
    font-size: 16px;
  }

  .upload-file__copy h3 {
    font-size: 17px;
  }

  .upload-file__copy p {
    font-size: 13px;
  }

  .catalog-list {
    grid-template-columns: 1fr;
  }

  .catalog-card {
    min-height: 0;
  }
}
